@docbox-nz/hapi-gateway 0.3.0 → 0.3.1

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.
@@ -40,7 +40,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
40
40
  value: mod,
41
41
  enumerable: true
42
42
  }) : target, mod));
43
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
43
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
44
44
  //#endregion
45
45
  //#region node_modules/.pnpm/@hapi+hoek@11.0.7/node_modules/@hapi/hoek/lib/assertError.js
46
46
  var require_assertError = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -71,9 +71,10 @@ var require_assert = /* @__PURE__ */ __commonJSMin(((exports, module) => {
71
71
  const assert = module.exports = function(condition, ...args) {
72
72
  if (condition) return;
73
73
  if (args.length === 1 && args[0] instanceof Error) throw args[0];
74
- throw new AssertError(args.filter((arg) => arg !== "").map((arg) => {
74
+ const msgs = args.filter((arg) => arg !== "").map((arg) => {
75
75
  return typeof arg === "string" ? arg : arg instanceof Error ? arg.message : Stringify(arg);
76
- }).join(" "), assert);
76
+ });
77
+ throw new AssertError(msgs.join(" "), assert);
77
78
  };
78
79
  }));
79
80
  //#endregion
@@ -131,7 +132,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
131
132
  weakMap: WeakMap.prototype,
132
133
  weakSet: WeakSet.prototype
133
134
  };
134
- internals.typeMap = new Map([
135
+ internals.typeMap = /* @__PURE__ */ new Map([
135
136
  ["[object Error]", exports.error],
136
137
  ["[object Map]", exports.map],
137
138
  ["[object Promise]", exports.promise],
@@ -164,7 +165,7 @@ var require_clone = /* @__PURE__ */ __commonJSMin(((exports, module) => {
164
165
  const Types = require_types();
165
166
  const Utils = require_utils();
166
167
  const internals = {
167
- needsProtoHack: new Set([
168
+ needsProtoHack: /* @__PURE__ */ new Set([
168
169
  Types.set,
169
170
  Types.map,
170
171
  Types.weakSet,
@@ -308,8 +309,9 @@ var require_applyToDefaults = /* @__PURE__ */ __commonJSMin(((exports, module) =
308
309
  if (options.shallow) return internals.applyToDefaultsWithShallow(defaults, source, options);
309
310
  const copy = Clone(defaults);
310
311
  if (source === true) return copy;
312
+ const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
311
313
  return Merge(copy, source, {
312
- nullOverride: options.nullOverride !== void 0 ? options.nullOverride : false,
314
+ nullOverride,
313
315
  mergeArrays: false
314
316
  });
315
317
  };
@@ -327,8 +329,9 @@ var require_applyToDefaults = /* @__PURE__ */ __commonJSMin(((exports, module) =
327
329
  const copy = Clone(defaults, {}, seen);
328
330
  if (!merge) return copy;
329
331
  for (const key of merge) internals.reachCopy(copy, source, key);
332
+ const nullOverride = options.nullOverride !== void 0 ? options.nullOverride : false;
330
333
  return Merge(copy, source, {
331
- nullOverride: options.nullOverride !== void 0 ? options.nullOverride : false,
334
+ nullOverride,
332
335
  mergeArrays: false
333
336
  });
334
337
  };
@@ -689,7 +692,7 @@ var require_escapeHtml = /* @__PURE__ */ __commonJSMin(((exports, module) => {
689
692
  internals.isSafe = function(charCode) {
690
693
  return internals.safeCharCodes.has(charCode);
691
694
  };
692
- internals.namedHtml = new Map([
695
+ internals.namedHtml = /* @__PURE__ */ new Map([
693
696
  [38, "&"],
694
697
  [60, "<"],
695
698
  [62, ">"],
@@ -718,7 +721,7 @@ var require_escapeJson = /* @__PURE__ */ __commonJSMin(((exports, module) => {
718
721
  internals.escape = function(char) {
719
722
  return internals.replacements.get(char);
720
723
  };
721
- internals.replacements = new Map([
724
+ internals.replacements = /* @__PURE__ */ new Map([
722
725
  ["<", "\\u003c"],
723
726
  [">", "\\u003e"],
724
727
  ["&", "\\u0026"],
@@ -838,10 +841,10 @@ var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
838
841
  exports.wait = require_wait();
839
842
  }));
840
843
  //#endregion
841
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/bind.js
844
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/bind.js
842
845
  var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
843
846
  const Hoek = require_lib$1();
844
- const internals = { codes: new Map([
847
+ const internals = { codes: /* @__PURE__ */ new Map([
845
848
  [100, "Continue"],
846
849
  [101, "Switching Protocols"],
847
850
  [102, "Processing"],
@@ -1214,10 +1217,46 @@ function bind(fn, thisArg) {
1214
1217
  };
1215
1218
  }
1216
1219
  //#endregion
1217
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/utils.js
1220
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/utils.js
1218
1221
  const { toString } = Object.prototype;
1219
1222
  const { getPrototypeOf } = Object;
1220
1223
  const { iterator, toStringTag } = Symbol;
1224
+ const hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
1225
+ /**
1226
+ * Walk the prototype chain (excluding the shared Object.prototype) looking for
1227
+ * an own `prop`. This distinguishes genuine own/inherited members — including
1228
+ * class accessors and template prototypes — from members injected via
1229
+ * Object.prototype pollution (e.g. `Object.prototype.username = '...'`), which
1230
+ * live on Object.prototype itself and are therefore never matched.
1231
+ *
1232
+ * @param {*} thing The value whose chain to inspect
1233
+ * @param {string|symbol} prop The property key to look for
1234
+ *
1235
+ * @returns {boolean} True when `prop` is owned below Object.prototype
1236
+ */
1237
+ const hasOwnInPrototypeChain = (thing, prop) => {
1238
+ let obj = thing;
1239
+ const seen = [];
1240
+ while (obj != null && obj !== Object.prototype) {
1241
+ if (seen.indexOf(obj) !== -1) return false;
1242
+ seen.push(obj);
1243
+ if (hasOwnProperty(obj, prop)) return true;
1244
+ obj = getPrototypeOf(obj);
1245
+ }
1246
+ return false;
1247
+ };
1248
+ /**
1249
+ * Read `obj[prop]` only when it is safe from Object.prototype pollution. Own
1250
+ * properties and members inherited from a non-Object.prototype source (a class
1251
+ * instance or template object) are honored; a value reachable only through a
1252
+ * polluted Object.prototype is ignored and `undefined` is returned.
1253
+ *
1254
+ * @param {*} obj The source object
1255
+ * @param {string|symbol} prop The property key to read
1256
+ *
1257
+ * @returns {*} The resolved value, or undefined when unsafe/absent
1258
+ */
1259
+ const getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
1221
1260
  const kindOf = ((cache) => (thing) => {
1222
1261
  const str = toString.call(thing);
1223
1262
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -1320,9 +1359,9 @@ const isBoolean = (thing) => thing === true || thing === false;
1320
1359
  * @returns {boolean} True if value is a plain Object, otherwise false
1321
1360
  */
1322
1361
  const isPlainObject = (val) => {
1323
- if (kindOf(val) !== "object") return false;
1362
+ if (!isObject(val)) return false;
1324
1363
  const prototype = getPrototypeOf(val);
1325
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
1364
+ return (prototype === null || prototype === Object.prototype || getPrototypeOf(prototype) === null) && !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
1326
1365
  };
1327
1366
  /**
1328
1367
  * Determine if a value is an empty object (safely handles Buffers)
@@ -1532,14 +1571,24 @@ function merge(...objs) {
1532
1571
  const result = {};
1533
1572
  const assignValue = (val, key) => {
1534
1573
  if (key === "__proto__" || key === "constructor" || key === "prototype") return;
1535
- const targetKey = caseless && findKey(result, key) || key;
1574
+ const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
1536
1575
  const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
1537
1576
  if (isPlainObject(existing) && isPlainObject(val)) result[targetKey] = merge(existing, val);
1538
1577
  else if (isPlainObject(val)) result[targetKey] = merge({}, val);
1539
1578
  else if (isArray(val)) result[targetKey] = val.slice();
1540
1579
  else if (!skipUndefined || !isUndefined(val)) result[targetKey] = val;
1541
1580
  };
1542
- for (let i = 0, l = objs.length; i < l; i++) objs[i] && forEach(objs[i], assignValue);
1581
+ for (let i = 0, l = objs.length; i < l; i++) {
1582
+ const source = objs[i];
1583
+ if (!source || isBuffer(source)) continue;
1584
+ forEach(source, assignValue);
1585
+ if (typeof source !== "object" || isArray(source)) continue;
1586
+ const symbols = Object.getOwnPropertySymbols(source);
1587
+ for (let j = 0; j < symbols.length; j++) {
1588
+ const symbol = symbols[j];
1589
+ if (propertyIsEnumerable.call(source, symbol)) assignValue(source[symbol], symbol);
1590
+ }
1591
+ }
1543
1592
  return result;
1544
1593
  }
1545
1594
  /**
@@ -1718,7 +1767,7 @@ const toCamelCase = (str) => {
1718
1767
  return p1.toUpperCase() + p2;
1719
1768
  });
1720
1769
  };
1721
- const hasOwnProperty = (({ hasOwnProperty }) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
1770
+ const { propertyIsEnumerable } = Object.prototype;
1722
1771
  /**
1723
1772
  * Determine if a value is a RegExp object
1724
1773
  *
@@ -1860,6 +1909,18 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
1860
1909
  */
1861
1910
  const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
1862
1911
  const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
1912
+ /**
1913
+ * Determine if a value is iterable via an iterator that is NOT sourced solely
1914
+ * from a polluted Object.prototype. Use this instead of `isIterable` whenever
1915
+ * the iterable comes from untrusted input (e.g. user-supplied header sources),
1916
+ * so `Object.prototype[Symbol.iterator] = ...` cannot turn an ordinary object
1917
+ * into an attacker-controlled entries iterator.
1918
+ *
1919
+ * @param {*} thing The value to test
1920
+ *
1921
+ * @returns {boolean} True if value has a non-polluted iterator
1922
+ */
1923
+ const isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
1863
1924
  var utils_default = {
1864
1925
  isArray,
1865
1926
  isArrayBuffer,
@@ -1904,6 +1965,8 @@ var utils_default = {
1904
1965
  isHTMLForm,
1905
1966
  hasOwnProperty,
1906
1967
  hasOwnProp: hasOwnProperty,
1968
+ hasOwnInPrototypeChain,
1969
+ getSafeProp,
1907
1970
  reduceDescriptors,
1908
1971
  freezeMethods,
1909
1972
  toObjectSet,
@@ -1919,10 +1982,11 @@ var utils_default = {
1919
1982
  isThenable,
1920
1983
  setImmediate: _setImmediate,
1921
1984
  asap,
1922
- isIterable
1985
+ isIterable,
1986
+ isSafeIterable
1923
1987
  };
1924
1988
  //#endregion
1925
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/parseHeaders.js
1989
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/parseHeaders.js
1926
1990
  const ignoreDuplicateOf = utils_default.toObjectSet([
1927
1991
  "age",
1928
1992
  "authorization",
@@ -1973,7 +2037,7 @@ var parseHeaders_default = (rawHeaders) => {
1973
2037
  return parsed;
1974
2038
  };
1975
2039
  //#endregion
1976
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
2040
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
1977
2041
  function trimSPorHTAB(str) {
1978
2042
  let start = 0;
1979
2043
  let end = str.length;
@@ -2005,7 +2069,7 @@ function toByteStringHeaderObject(headers) {
2005
2069
  return byteStringHeaders;
2006
2070
  }
2007
2071
  //#endregion
2008
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/AxiosHeaders.js
2072
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/AxiosHeaders.js
2009
2073
  const $internals = Symbol("internals");
2010
2074
  function normalizeHeader(header) {
2011
2075
  return header && String(header).trim().toLowerCase();
@@ -2058,18 +2122,22 @@ var AxiosHeaders$1 = class {
2058
2122
  const self = this;
2059
2123
  function setHeader(_value, _header, _rewrite) {
2060
2124
  const lHeader = normalizeHeader(_header);
2061
- if (!lHeader) throw new Error("header name must be a non-empty string");
2125
+ if (!lHeader) return;
2062
2126
  const key = utils_default.findKey(self, lHeader);
2063
2127
  if (!key || self[key] === void 0 || _rewrite === true || _rewrite === void 0 && self[key] !== false) self[key || _header] = normalizeValue(_value);
2064
2128
  }
2065
2129
  const setHeaders = (headers, _rewrite) => utils_default.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
2066
2130
  if (utils_default.isPlainObject(header) || header instanceof this.constructor) setHeaders(header, valueOrRewrite);
2067
2131
  else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) setHeaders(parseHeaders_default(header), valueOrRewrite);
2068
- else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
2069
- let obj = {}, dest, key;
2132
+ else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
2133
+ let obj = Object.create(null), dest, key;
2070
2134
  for (const entry of header) {
2071
- if (!utils_default.isArray(entry)) throw TypeError("Object iterator must return a key-value pair");
2072
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
2135
+ if (!utils_default.isArray(entry)) throw new TypeError("Object iterator must return a key-value pair");
2136
+ key = entry[0];
2137
+ if (utils_default.hasOwnProp(obj, key)) {
2138
+ dest = obj[key];
2139
+ obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
2140
+ } else obj[key] = entry[1];
2073
2141
  }
2074
2142
  setHeaders(obj, valueOrRewrite);
2075
2143
  } else header != null && setHeader(valueOrRewrite, header, rewrite);
@@ -2207,7 +2275,7 @@ utils_default.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
2207
2275
  });
2208
2276
  utils_default.freezeMethods(AxiosHeaders$1);
2209
2277
  //#endregion
2210
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/AxiosError.js
2278
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/AxiosError.js
2211
2279
  const REDACTED = "[REDACTED ****]";
2212
2280
  function hasOwnOrPrototypeToJSON(source) {
2213
2281
  if (utils_default.hasOwnProp(source, "toJSON")) return true;
@@ -2253,7 +2321,13 @@ function redactConfig(config, redactKeys) {
2253
2321
  var AxiosError$1 = class AxiosError$1 extends Error {
2254
2322
  static from(error, code, config, request, response, customProps) {
2255
2323
  const axiosError = new AxiosError$1(error.message, code || error.code, config, request, response);
2256
- axiosError.cause = error;
2324
+ Object.defineProperty(axiosError, "cause", {
2325
+ __proto__: null,
2326
+ value: error,
2327
+ writable: true,
2328
+ enumerable: false,
2329
+ configurable: true
2330
+ });
2257
2331
  axiosError.name = error.name;
2258
2332
  if (error.status != null && axiosError.status == null) axiosError.status = error.status;
2259
2333
  customProps && Object.assign(axiosError, customProps);
@@ -9984,7 +10058,7 @@ var require_asynckit = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9984
10058
  };
9985
10059
  }));
9986
10060
  //#endregion
9987
- //#region node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js
10061
+ //#region node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/index.js
9988
10062
  var require_es_object_atoms = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9989
10063
  /** @type {import('.')} */
9990
10064
  module.exports = Object;
@@ -10304,7 +10378,7 @@ var require_get_proto = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10304
10378
  } : null;
10305
10379
  }));
10306
10380
  //#endregion
10307
- //#region node_modules/.pnpm/hasown@2.0.3/node_modules/hasown/index.js
10381
+ //#region node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js
10308
10382
  var require_hasown = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10309
10383
  var call = Function.prototype.call;
10310
10384
  var $hasOwn = Object.prototype.hasOwnProperty;
@@ -10669,7 +10743,7 @@ var require_es_set_tostringtag = /* @__PURE__ */ __commonJSMin(((exports, module
10669
10743
  };
10670
10744
  }));
10671
10745
  //#endregion
10672
- //#region node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/populate.js
10746
+ //#region node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js
10673
10747
  var require_populate = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10674
10748
  module.exports = function(dst, src) {
10675
10749
  Object.keys(src).forEach(function(prop) {
@@ -10694,6 +10768,17 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10694
10768
  var hasOwn = require_hasown();
10695
10769
  var populate = require_populate();
10696
10770
  /**
10771
+ * Escape CR, LF, and `"` in a multipart `name`/`filename` parameter, so a field
10772
+ * name or filename can not break out of its header line to inject headers or
10773
+ * smuggle additional parts. Matches the WHATWG HTML multipart/form-data encoding.
10774
+ *
10775
+ * @param {string} str - the parameter value to escape
10776
+ * @returns {string} the escaped value
10777
+ */
10778
+ function escapeHeaderParam(str) {
10779
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
10780
+ }
10781
+ /**
10697
10782
  * Create readable "multipart/form-data" streams.
10698
10783
  * Can be used to submit forms
10699
10784
  * and file uploads to other web applications.
@@ -10763,7 +10848,7 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10763
10848
  var contentType = this._getContentType(value, options);
10764
10849
  var contents = "";
10765
10850
  var headers = {
10766
- "Content-Disposition": ["form-data", "name=\"" + field + "\""].concat(contentDisposition || []),
10851
+ "Content-Disposition": ["form-data", "name=\"" + escapeHeaderParam(field) + "\""].concat(contentDisposition || []),
10767
10852
  "Content-Type": [].concat(contentType || [])
10768
10853
  };
10769
10854
  if (typeof options.header === "object") populate(headers, options.header);
@@ -10781,7 +10866,7 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10781
10866
  if (typeof options.filepath === "string") filename = path.normalize(options.filepath).replace(/\\/g, "/");
10782
10867
  else if (options.filename || value && (value.name || value.path)) filename = path.basename(options.filename || value && (value.name || value.path));
10783
10868
  else if (value && value.readable && hasOwn(value, "httpVersion")) filename = path.basename(value.client._httpMessage.path || "");
10784
- if (filename) return "filename=\"" + filename + "\"";
10869
+ if (filename) return "filename=\"" + escapeHeaderParam(filename) + "\"";
10785
10870
  };
10786
10871
  FormData.prototype._getContentType = function(value, options) {
10787
10872
  var contentType = options.contentType;
@@ -10911,8 +10996,6 @@ var FormData_default = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin((
10911
10996
  setToStringTag(FormData.prototype, "FormData");
10912
10997
  module.exports = FormData;
10913
10998
  })))(), 1)).default;
10914
- //#endregion
10915
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/toFormData.js
10916
10999
  /**
10917
11000
  * Determines if the given thing is a array or js object.
10918
11001
  *
@@ -11001,15 +11084,34 @@ function toFormData$1(obj, formData, options) {
11001
11084
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
11002
11085
  const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
11003
11086
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
11087
+ const stack = [];
11004
11088
  if (!utils_default.isFunction(visitor)) throw new TypeError("visitor must be a function");
11005
11089
  function convertValue(value) {
11006
11090
  if (value === null) return "";
11007
11091
  if (utils_default.isDate(value)) return value.toISOString();
11008
11092
  if (utils_default.isBoolean(value)) return value.toString();
11009
11093
  if (!useBlob && utils_default.isBlob(value)) throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
11010
- if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
11094
+ if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
11095
+ if (useBlob && typeof _Blob === "function") return new _Blob([value]);
11096
+ if (typeof Buffer !== "undefined") return Buffer.from(value);
11097
+ throw new AxiosError$1("Blob is not supported. Use a Buffer instead.", AxiosError$1.ERR_NOT_SUPPORT);
11098
+ }
11011
11099
  return value;
11012
11100
  }
11101
+ function throwIfMaxDepthExceeded(depth) {
11102
+ if (depth > maxDepth) throw new AxiosError$1("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED);
11103
+ }
11104
+ function stringifyWithDepthLimit(value, depth) {
11105
+ if (maxDepth === Infinity) return JSON.stringify(value);
11106
+ const ancestors = [];
11107
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
11108
+ if (!utils_default.isObject(currentValue)) return currentValue;
11109
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) ancestors.pop();
11110
+ ancestors.push(currentValue);
11111
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
11112
+ return currentValue;
11113
+ });
11114
+ }
11013
11115
  /**
11014
11116
  * Default visitor.
11015
11117
  *
@@ -11029,7 +11131,7 @@ function toFormData$1(obj, formData, options) {
11029
11131
  if (value && !path && typeof value === "object") {
11030
11132
  if (utils_default.endsWith(key, "{}")) {
11031
11133
  key = metaTokens ? key : key.slice(0, -2);
11032
- value = JSON.stringify(value);
11134
+ value = stringifyWithDepthLimit(value, 1);
11033
11135
  } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
11034
11136
  key = removeBrackets(key);
11035
11137
  arr.forEach(function each(el, index) {
@@ -11042,7 +11144,6 @@ function toFormData$1(obj, formData, options) {
11042
11144
  formData.append(renderKey(path, key, dots), convertValue(value));
11043
11145
  return false;
11044
11146
  }
11045
- const stack = [];
11046
11147
  const exposedHelpers = Object.assign(predicates, {
11047
11148
  defaultVisitor,
11048
11149
  convertValue,
@@ -11050,8 +11151,8 @@ function toFormData$1(obj, formData, options) {
11050
11151
  });
11051
11152
  function build(value, path, depth = 0) {
11052
11153
  if (utils_default.isUndefined(value)) return;
11053
- if (depth > maxDepth) throw new AxiosError$1("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED);
11054
- if (stack.indexOf(value) !== -1) throw Error("Circular reference detected in " + path.join("."));
11154
+ throwIfMaxDepthExceeded(depth);
11155
+ if (stack.indexOf(value) !== -1) throw new Error("Circular reference detected in " + path.join("."));
11055
11156
  stack.push(value);
11056
11157
  utils_default.forEach(value, function each(el, key) {
11057
11158
  if ((!(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers)) === true) build(el, path ? path.concat(key) : [key], depth + 1);
@@ -11063,7 +11164,7 @@ function toFormData$1(obj, formData, options) {
11063
11164
  return formData;
11064
11165
  }
11065
11166
  //#endregion
11066
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
11167
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
11067
11168
  /**
11068
11169
  * It encodes a string by replacing all characters that are not in the unreserved set with
11069
11170
  * their percent-encoded equivalents
@@ -11102,15 +11203,13 @@ prototype.append = function append(name, value) {
11102
11203
  this._pairs.push([name, value]);
11103
11204
  };
11104
11205
  prototype.toString = function toString(encoder) {
11105
- const _encode = encoder ? function(value) {
11106
- return encoder.call(this, value, encode$1);
11107
- } : encode$1;
11206
+ const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
11108
11207
  return this._pairs.map(function each(pair) {
11109
11208
  return _encode(pair[0]) + "=" + _encode(pair[1]);
11110
11209
  }, "").join("&");
11111
11210
  };
11112
11211
  //#endregion
11113
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/buildURL.js
11212
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/buildURL.js
11114
11213
  /**
11115
11214
  * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
11116
11215
  * their plain counterparts (`:`, `$`, `,`, `+`).
@@ -11133,9 +11232,10 @@ function encode(val) {
11133
11232
  */
11134
11233
  function buildURL(url, params, options) {
11135
11234
  if (!params) return url;
11136
- const _encode = options && options.encode || encode;
11235
+ url = url || "";
11137
11236
  const _options = utils_default.isFunction(options) ? { serialize: options } : options;
11138
- const serializeFn = _options && _options.serialize;
11237
+ const _encode = utils_default.getSafeProp(_options, "encode") || encode;
11238
+ const serializeFn = utils_default.getSafeProp(_options, "serialize");
11139
11239
  let serializedParams;
11140
11240
  if (serializeFn) serializedParams = serializeFn(params, _options);
11141
11241
  else serializedParams = utils_default.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, _options).toString(_encode);
@@ -11147,7 +11247,7 @@ function buildURL(url, params, options) {
11147
11247
  return url;
11148
11248
  }
11149
11249
  //#endregion
11150
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/InterceptorManager.js
11250
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/InterceptorManager.js
11151
11251
  var InterceptorManager = class {
11152
11252
  constructor() {
11153
11253
  this.handlers = [];
@@ -11205,18 +11305,20 @@ var InterceptorManager = class {
11205
11305
  }
11206
11306
  };
11207
11307
  //#endregion
11208
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/defaults/transitional.js
11308
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/defaults/transitional.js
11209
11309
  var transitional_default = {
11210
11310
  silentJSONParsing: true,
11211
11311
  forcedJSONParsing: true,
11212
11312
  clarifyTimeoutError: false,
11213
- legacyInterceptorReqResOrdering: true
11313
+ legacyInterceptorReqResOrdering: true,
11314
+ advertiseZstdAcceptEncoding: false,
11315
+ validateStatusUndefinedResolves: true
11214
11316
  };
11215
11317
  //#endregion
11216
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
11318
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
11217
11319
  var URLSearchParams_default = url.URLSearchParams;
11218
11320
  //#endregion
11219
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/platform/node/index.js
11321
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/platform/node/index.js
11220
11322
  const ALPHA = "abcdefghijklmnopqrstuvwxyz";
11221
11323
  const DIGIT = "0123456789";
11222
11324
  const ALPHABET = {
@@ -11249,7 +11351,7 @@ var node_default = {
11249
11351
  ]
11250
11352
  };
11251
11353
  //#endregion
11252
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/platform/common/utils.js
11354
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/platform/common/utils.js
11253
11355
  var utils_exports = /* @__PURE__ */ __exportAll({
11254
11356
  hasBrowserEnv: () => hasBrowserEnv,
11255
11357
  hasStandardBrowserEnv: () => hasStandardBrowserEnv,
@@ -11290,16 +11392,18 @@ const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || [
11290
11392
  * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
11291
11393
  * This leads to a problem when axios post `FormData` in webWorker
11292
11394
  */
11293
- const hasStandardBrowserWebWorkerEnv = typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
11395
+ const hasStandardBrowserWebWorkerEnv = (() => {
11396
+ return typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
11397
+ })();
11294
11398
  const origin = hasBrowserEnv && window.location.href || "http://localhost";
11295
11399
  //#endregion
11296
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/platform/index.js
11400
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/platform/index.js
11297
11401
  var platform_default = {
11298
11402
  ...utils_exports,
11299
11403
  ...node_default
11300
11404
  };
11301
11405
  //#endregion
11302
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
11406
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
11303
11407
  function toURLEncodedForm(data, options) {
11304
11408
  return toFormData$1(data, new platform_default.classes.URLSearchParams(), {
11305
11409
  visitor: function(value, key, path, helpers) {
@@ -11313,7 +11417,11 @@ function toURLEncodedForm(data, options) {
11313
11417
  });
11314
11418
  }
11315
11419
  //#endregion
11316
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/formDataToJSON.js
11420
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/formDataToJSON.js
11421
+ const MAX_DEPTH = 100;
11422
+ function throwIfDepthExceeded(index) {
11423
+ if (index > MAX_DEPTH) throw new AxiosError$1("FormData field is too deeply nested (" + index + " levels). Max depth: 100", AxiosError$1.ERR_FORM_DATA_DEPTH_EXCEEDED);
11424
+ }
11317
11425
  /**
11318
11426
  * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
11319
11427
  *
@@ -11322,9 +11430,14 @@ function toURLEncodedForm(data, options) {
11322
11430
  * @returns An array of strings.
11323
11431
  */
11324
11432
  function parsePropPath(name) {
11325
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
11326
- return match[0] === "[]" ? "" : match[1] || match[0];
11327
- });
11433
+ const path = [];
11434
+ const pattern = /\w+|\[(\w*)]/g;
11435
+ let match;
11436
+ while ((match = pattern.exec(name)) !== null) {
11437
+ throwIfDepthExceeded(path.length);
11438
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
11439
+ }
11440
+ return path;
11328
11441
  }
11329
11442
  /**
11330
11443
  * Convert an array to an object.
@@ -11354,6 +11467,7 @@ function arrayToObject(arr) {
11354
11467
  */
11355
11468
  function formDataToJSON(formData) {
11356
11469
  function buildPath(path, value, target, index) {
11470
+ throwIfDepthExceeded(index);
11357
11471
  let name = path[index++];
11358
11472
  if (name === "__proto__") return true;
11359
11473
  const isNumericKey = Number.isFinite(+name);
@@ -11378,7 +11492,7 @@ function formDataToJSON(formData) {
11378
11492
  return null;
11379
11493
  }
11380
11494
  //#endregion
11381
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/defaults/index.js
11495
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/defaults/index.js
11382
11496
  const own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
11383
11497
  /**
11384
11498
  * It takes a string, tries to parse it, and if it fails, it returns the stringified version
@@ -11486,7 +11600,7 @@ utils_default.forEach([
11486
11600
  defaults.headers[method] = {};
11487
11601
  });
11488
11602
  //#endregion
11489
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/transformData.js
11603
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/transformData.js
11490
11604
  /**
11491
11605
  * Transform the data for a request or a response
11492
11606
  *
@@ -11507,12 +11621,12 @@ function transformData(fns, response) {
11507
11621
  return data;
11508
11622
  }
11509
11623
  //#endregion
11510
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/cancel/isCancel.js
11624
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/cancel/isCancel.js
11511
11625
  function isCancel$1(value) {
11512
11626
  return !!(value && value.__CANCEL__);
11513
11627
  }
11514
11628
  //#endregion
11515
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/cancel/CanceledError.js
11629
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/cancel/CanceledError.js
11516
11630
  var CanceledError$1 = class extends AxiosError$1 {
11517
11631
  /**
11518
11632
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -11530,7 +11644,7 @@ var CanceledError$1 = class extends AxiosError$1 {
11530
11644
  }
11531
11645
  };
11532
11646
  //#endregion
11533
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/settle.js
11647
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/settle.js
11534
11648
  /**
11535
11649
  * Resolve or reject a Promise based on response status.
11536
11650
  *
@@ -11546,7 +11660,7 @@ function settle(resolve, reject, response) {
11546
11660
  else reject(new AxiosError$1("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError$1.ERR_BAD_REQUEST : AxiosError$1.ERR_BAD_RESPONSE, response.config, response.request, response));
11547
11661
  }
11548
11662
  //#endregion
11549
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
11663
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
11550
11664
  /**
11551
11665
  * Determines whether the specified URL is absolute
11552
11666
  *
@@ -11559,7 +11673,7 @@ function isAbsoluteURL(url) {
11559
11673
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
11560
11674
  }
11561
11675
  //#endregion
11562
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/combineURLs.js
11676
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/combineURLs.js
11563
11677
  /**
11564
11678
  * Creates a new URL by combining the specified URLs
11565
11679
  *
@@ -11572,7 +11686,20 @@ function combineURLs(baseURL, relativeURL) {
11572
11686
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
11573
11687
  }
11574
11688
  //#endregion
11575
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/buildFullPath.js
11689
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/buildFullPath.js
11690
+ const malformedHttpProtocol = /^https?:(?!\/\/)/i;
11691
+ const httpProtocolControlCharacters = /[\t\n\r]/g;
11692
+ function stripLeadingC0ControlOrSpace(url) {
11693
+ let i = 0;
11694
+ while (i < url.length && url.charCodeAt(i) <= 32) i++;
11695
+ return url.slice(i);
11696
+ }
11697
+ function normalizeURLForProtocolCheck(url) {
11698
+ return stripLeadingC0ControlOrSpace(url).replace(httpProtocolControlCharacters, "");
11699
+ }
11700
+ function assertValidHttpProtocolURL(url, config) {
11701
+ if (typeof url === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url))) throw new AxiosError$1("Invalid URL: missing \"//\" after protocol", AxiosError$1.ERR_INVALID_URL, config);
11702
+ }
11576
11703
  /**
11577
11704
  * Creates a new URL by combining the baseURL with the requestedURL,
11578
11705
  * only when the requestedURL is not already an absolute URL.
@@ -11583,9 +11710,13 @@ function combineURLs(baseURL, relativeURL) {
11583
11710
  *
11584
11711
  * @returns {string} The combined full path
11585
11712
  */
11586
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
11713
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
11714
+ assertValidHttpProtocolURL(requestedURL, config);
11587
11715
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
11588
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) return combineURLs(baseURL, requestedURL);
11716
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
11717
+ assertValidHttpProtocolURL(baseURL, config);
11718
+ return combineURLs(baseURL, requestedURL);
11719
+ }
11589
11720
  return requestedURL;
11590
11721
  }
11591
11722
  //#endregion
@@ -12530,7 +12661,8 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12530
12661
  req.onSocket(socket);
12531
12662
  return;
12532
12663
  }
12533
- onerror(/* @__PURE__ */ new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``));
12664
+ const err = /* @__PURE__ */ new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
12665
+ onerror(err);
12534
12666
  };
12535
12667
  if (typeof this.callback !== "function") {
12536
12668
  onerror(/* @__PURE__ */ new Error("`callback` is not defined"));
@@ -13242,18 +13374,18 @@ var require_follow_redirects = /* @__PURE__ */ __commonJSMin(((exports, module)
13242
13374
  module.exports.wrap = wrap;
13243
13375
  }));
13244
13376
  //#endregion
13245
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/env/data.js
13377
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/env/data.js
13246
13378
  var import_dist = /* @__PURE__ */ __toESM(require_dist(), 1);
13247
13379
  var import_follow_redirects = /* @__PURE__ */ __toESM(require_follow_redirects(), 1);
13248
- const VERSION$1 = "1.16.1";
13380
+ const VERSION$1 = "1.18.1";
13249
13381
  //#endregion
13250
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/parseProtocol.js
13382
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/parseProtocol.js
13251
13383
  function parseProtocol(url) {
13252
13384
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url);
13253
13385
  return match && match[1] || "";
13254
13386
  }
13255
13387
  //#endregion
13256
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/fromDataURI.js
13388
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/fromDataURI.js
13257
13389
  const DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
13258
13390
  /**
13259
13391
  * Parse data uri to a Buffer or Blob
@@ -13277,10 +13409,10 @@ function fromDataURI(uri, asBlob, options) {
13277
13409
  const params = match[2];
13278
13410
  const encoding = match[3] ? "base64" : "utf8";
13279
13411
  const body = match[4];
13280
- let mime;
13412
+ let mime = "";
13281
13413
  if (type) mime = params ? type + params : type;
13282
13414
  else if (params) mime = "text/plain" + params;
13283
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
13415
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
13284
13416
  if (asBlob) {
13285
13417
  if (!_Blob) throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
13286
13418
  return new _Blob([buffer], { type: mime });
@@ -13290,7 +13422,7 @@ function fromDataURI(uri, asBlob, options) {
13290
13422
  throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
13291
13423
  }
13292
13424
  //#endregion
13293
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
13425
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
13294
13426
  const kInternals = Symbol("internals");
13295
13427
  var AxiosTransformStream = class extends stream.Transform {
13296
13428
  constructor(options) {
@@ -13384,7 +13516,7 @@ var AxiosTransformStream = class extends stream.Transform {
13384
13516
  }
13385
13517
  };
13386
13518
  //#endregion
13387
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/readBlob.js
13519
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/readBlob.js
13388
13520
  const { asyncIterator } = Symbol;
13389
13521
  const readBlob = async function* (blob) {
13390
13522
  if (blob.stream) yield* blob.stream();
@@ -13393,7 +13525,7 @@ const readBlob = async function* (blob) {
13393
13525
  else yield blob;
13394
13526
  };
13395
13527
  //#endregion
13396
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/formDataToStream.js
13528
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/formDataToStream.js
13397
13529
  const BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
13398
13530
  const textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
13399
13531
  const CRLF = "\r\n";
@@ -13432,8 +13564,8 @@ var FormDataPart = class {
13432
13564
  };
13433
13565
  const formDataToStream = (form, headersHandler, options) => {
13434
13566
  const { tag = "form-data-boundary", size = 25, boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET) } = options || {};
13435
- if (!utils_default.isFormData(form)) throw TypeError("FormData instance required");
13436
- if (boundary.length < 1 || boundary.length > 70) throw Error("boundary must be 1-70 characters long");
13567
+ if (!utils_default.isFormData(form)) throw new TypeError("FormData instance required");
13568
+ if (boundary.length < 1 || boundary.length > 70) throw new Error("boundary must be 1-70 characters long");
13437
13569
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
13438
13570
  const footerBytes = textEncoder.encode("--" + boundary + "--\r\n");
13439
13571
  let contentLength = footerBytes.byteLength;
@@ -13456,7 +13588,7 @@ const formDataToStream = (form, headersHandler, options) => {
13456
13588
  })());
13457
13589
  };
13458
13590
  //#endregion
13459
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
13591
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
13460
13592
  var ZlibHeaderTransformStream = class extends stream.Transform {
13461
13593
  __transform(chunk, encoding, callback) {
13462
13594
  this.push(chunk);
@@ -13476,7 +13608,67 @@ var ZlibHeaderTransformStream = class extends stream.Transform {
13476
13608
  }
13477
13609
  };
13478
13610
  //#endregion
13479
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/callbackify.js
13611
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/Http2Sessions.js
13612
+ var Http2Sessions = class {
13613
+ constructor() {
13614
+ this.sessions = Object.create(null);
13615
+ }
13616
+ getSession(authority, options) {
13617
+ options = Object.assign({ sessionTimeout: 1e3 }, options);
13618
+ let authoritySessions = this.sessions[authority];
13619
+ if (authoritySessions) {
13620
+ let len = authoritySessions.length;
13621
+ for (let i = 0; i < len; i++) {
13622
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
13623
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) return sessionHandle;
13624
+ }
13625
+ }
13626
+ const session = http2.connect(authority, options);
13627
+ let removed;
13628
+ let timer;
13629
+ const removeSession = () => {
13630
+ if (removed) return;
13631
+ removed = true;
13632
+ if (timer) {
13633
+ clearTimeout(timer);
13634
+ timer = null;
13635
+ }
13636
+ let entries = authoritySessions, len = entries.length, i = len;
13637
+ while (i--) if (entries[i][0] === session) {
13638
+ if (len === 1) delete this.sessions[authority];
13639
+ else entries.splice(i, 1);
13640
+ if (!session.closed) session.close();
13641
+ return;
13642
+ }
13643
+ };
13644
+ const originalRequestFn = session.request;
13645
+ const { sessionTimeout } = options;
13646
+ if (sessionTimeout != null) {
13647
+ let streamsCount = 0;
13648
+ session.request = function() {
13649
+ const stream = originalRequestFn.apply(this, arguments);
13650
+ streamsCount++;
13651
+ if (timer) {
13652
+ clearTimeout(timer);
13653
+ timer = null;
13654
+ }
13655
+ stream.once("close", () => {
13656
+ if (!--streamsCount) timer = setTimeout(() => {
13657
+ timer = null;
13658
+ removeSession();
13659
+ }, sessionTimeout);
13660
+ });
13661
+ return stream;
13662
+ };
13663
+ }
13664
+ session.once("close", removeSession);
13665
+ let entry = [session, options];
13666
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
13667
+ return session;
13668
+ }
13669
+ };
13670
+ //#endregion
13671
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/callbackify.js
13480
13672
  const callbackify = (fn, reducer) => {
13481
13673
  return utils_default.isAsyncFn(fn) ? function(...args) {
13482
13674
  const cb = args.pop();
@@ -13490,14 +13682,29 @@ const callbackify = (fn, reducer) => {
13490
13682
  } : fn;
13491
13683
  };
13492
13684
  //#endregion
13493
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
13494
- const LOOPBACK_HOSTNAMES = new Set(["localhost"]);
13685
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
13686
+ const LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
13495
13687
  const isIPv4Loopback = (host) => {
13496
13688
  const parts = host.split(".");
13497
13689
  if (parts.length !== 4) return false;
13498
13690
  if (parts[0] !== "127") return false;
13499
13691
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
13500
13692
  };
13693
+ const isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
13694
+ const isIPv6Unspecified = (host) => {
13695
+ if (host === "::") return true;
13696
+ const compressionIndex = host.indexOf("::");
13697
+ if (compressionIndex !== -1) {
13698
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
13699
+ const left = host.slice(0, compressionIndex);
13700
+ const right = host.slice(compressionIndex + 2);
13701
+ const leftGroups = left ? left.split(":") : [];
13702
+ const rightGroups = right ? right.split(":") : [];
13703
+ return leftGroups.length + rightGroups.length < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
13704
+ }
13705
+ const groups = host.split(":");
13706
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
13707
+ };
13501
13708
  const isIPv6Loopback = (host) => {
13502
13709
  if (host === "::1") return true;
13503
13710
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -13518,6 +13725,7 @@ const isLoopback = (host) => {
13518
13725
  if (!host) return false;
13519
13726
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
13520
13727
  if (isIPv4Loopback(host)) return true;
13728
+ if (isIPv6Unspecified(host)) return true;
13521
13729
  return isIPv6Loopback(host);
13522
13730
  };
13523
13731
  const DEFAULT_PORTS = {
@@ -13590,7 +13798,7 @@ function shouldBypassProxy(location) {
13590
13798
  });
13591
13799
  }
13592
13800
  //#endregion
13593
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/speedometer.js
13801
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/speedometer.js
13594
13802
  /**
13595
13803
  * Calculate data maxRate
13596
13804
  * @param {Number} [samplesCount= 10]
@@ -13625,7 +13833,7 @@ function speedometer(samplesCount, min) {
13625
13833
  };
13626
13834
  }
13627
13835
  //#endregion
13628
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/throttle.js
13836
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/throttle.js
13629
13837
  /**
13630
13838
  * Throttle decorator
13631
13839
  * @param {Function} fn
@@ -13662,7 +13870,7 @@ function throttle(fn, freq) {
13662
13870
  return [throttled, flush];
13663
13871
  }
13664
13872
  //#endregion
13665
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/progressEventReducer.js
13873
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/progressEventReducer.js
13666
13874
  const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
13667
13875
  let bytesNotified = 0;
13668
13876
  const _speedometer = speedometer(50, 250);
@@ -13697,16 +13905,18 @@ const progressEventDecorator = (total, throttled) => {
13697
13905
  };
13698
13906
  const asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
13699
13907
  //#endregion
13700
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
13908
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
13701
13909
  /**
13702
13910
  * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
13703
13911
  * - For base64: compute exact decoded size using length and padding;
13704
13912
  * handle %XX at the character-count level (no string allocation).
13705
- * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
13913
+ * - For non-base64: compute the exact percent-decoded UTF-8 byte length.
13706
13914
  *
13707
13915
  * @param {string} url
13708
13916
  * @returns {number}
13709
13917
  */
13918
+ const isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
13919
+ const isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
13710
13920
  function estimateDataURLDecodedBytes(url) {
13711
13921
  if (!url || typeof url !== "string") return 0;
13712
13922
  if (!url.startsWith("data:")) return 0;
@@ -13720,7 +13930,7 @@ function estimateDataURLDecodedBytes(url) {
13720
13930
  for (let i = 0; i < len; i++) if (body.charCodeAt(i) === 37 && i + 2 < len) {
13721
13931
  const a = body.charCodeAt(i + 1);
13722
13932
  const b = body.charCodeAt(i + 2);
13723
- if ((a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102)) {
13933
+ if (isHexDigit(a) && isHexDigit(b)) {
13724
13934
  effectiveLen -= 2;
13725
13935
  i += 2;
13726
13936
  }
@@ -13744,11 +13954,13 @@ function estimateDataURLDecodedBytes(url) {
13744
13954
  const bytes = Math.floor(effectiveLen / 4) * 3 - (pad || 0);
13745
13955
  return bytes > 0 ? bytes : 0;
13746
13956
  }
13747
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") return Buffer.byteLength(body, "utf8");
13748
13957
  let bytes = 0;
13749
13958
  for (let i = 0, len = body.length; i < len; i++) {
13750
13959
  const c = body.charCodeAt(i);
13751
- if (c < 128) bytes += 1;
13960
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
13961
+ bytes += 1;
13962
+ i += 2;
13963
+ } else if (c < 128) bytes += 1;
13752
13964
  else if (c < 2048) bytes += 2;
13753
13965
  else if (c >= 55296 && c <= 56319 && i + 1 < len) {
13754
13966
  const next = body.charCodeAt(i + 1);
@@ -13761,7 +13973,7 @@ function estimateDataURLDecodedBytes(url) {
13761
13973
  return bytes;
13762
13974
  }
13763
13975
  //#endregion
13764
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/adapters/http.js
13976
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/adapters/http.js
13765
13977
  const zlibOptions = {
13766
13978
  flush: zlib.constants.Z_SYNC_FLUSH,
13767
13979
  finishFlush: zlib.constants.Z_SYNC_FLUSH
@@ -13770,7 +13982,14 @@ const brotliOptions = {
13770
13982
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
13771
13983
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
13772
13984
  };
13985
+ const zstdOptions = {
13986
+ flush: zlib.constants.ZSTD_e_flush,
13987
+ finishFlush: zlib.constants.ZSTD_e_flush
13988
+ };
13773
13989
  const isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
13990
+ const isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
13991
+ const ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
13992
+ const ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
13774
13993
  const { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
13775
13994
  const isHttps = /https:?/;
13776
13995
  const FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
@@ -13788,6 +14007,25 @@ const kAxiosCurrentReq = Symbol("axios.http.currentReq");
13788
14007
  const kAxiosInstalledTunnel = Symbol("axios.http.installedTunnel");
13789
14008
  const tunnelingAgentCache = /* @__PURE__ */ new Map();
13790
14009
  const tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
14010
+ const NODE_NATIVE_ENV_PROXY_SUPPORT = {
14011
+ 22: 21,
14012
+ 24: 5
14013
+ };
14014
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
14015
+ if (!nodeVersion) return false;
14016
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
14017
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) return false;
14018
+ if (major > 24) return true;
14019
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
14020
+ }
14021
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
14022
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) return false;
14023
+ const agentOptions = agent && agent.options;
14024
+ return Boolean(agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
14025
+ }
14026
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
14027
+ return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
14028
+ }
13791
14029
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
13792
14030
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
13793
14031
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -13797,6 +14035,16 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
13797
14035
  ...userHttpsAgent.options,
13798
14036
  ...agentOptions
13799
14037
  } : agentOptions);
14038
+ if (userHttpsAgent && userHttpsAgent.options) {
14039
+ const originTLSOptions = { ...userHttpsAgent.options };
14040
+ const callback = agent.callback;
14041
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
14042
+ return callback.call(this, req, {
14043
+ ...originTLSOptions,
14044
+ ...opts
14045
+ });
14046
+ };
14047
+ }
13800
14048
  agent[kAxiosInstalledTunnel] = true;
13801
14049
  cache.set(key, agent);
13802
14050
  return agent;
@@ -13804,7 +14052,7 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
13804
14052
  const supportedProtocols = platform_default.protocols.map((protocol) => {
13805
14053
  return protocol + ":";
13806
14054
  });
13807
- const decodeURIComponentSafe = (value) => {
14055
+ const decodeURIComponentSafe$1 = (value) => {
13808
14056
  if (!utils_default.isString(value)) return value;
13809
14057
  try {
13810
14058
  return decodeURIComponent(value);
@@ -13816,64 +14064,10 @@ const flushOnFinish = (stream, [throttled, flush]) => {
13816
14064
  stream.on("end", flush).on("error", flush);
13817
14065
  return throttled;
13818
14066
  };
13819
- var Http2Sessions = class {
13820
- constructor() {
13821
- this.sessions = Object.create(null);
13822
- }
13823
- getSession(authority, options) {
13824
- options = Object.assign({ sessionTimeout: 1e3 }, options);
13825
- let authoritySessions = this.sessions[authority];
13826
- if (authoritySessions) {
13827
- let len = authoritySessions.length;
13828
- for (let i = 0; i < len; i++) {
13829
- const [sessionHandle, sessionOptions] = authoritySessions[i];
13830
- if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) return sessionHandle;
13831
- }
13832
- }
13833
- const session = http2.connect(authority, options);
13834
- let removed;
13835
- const removeSession = () => {
13836
- if (removed) return;
13837
- removed = true;
13838
- let entries = authoritySessions, len = entries.length, i = len;
13839
- while (i--) if (entries[i][0] === session) {
13840
- if (len === 1) delete this.sessions[authority];
13841
- else entries.splice(i, 1);
13842
- if (!session.closed) session.close();
13843
- return;
13844
- }
13845
- };
13846
- const originalRequestFn = session.request;
13847
- const { sessionTimeout } = options;
13848
- if (sessionTimeout != null) {
13849
- let timer;
13850
- let streamsCount = 0;
13851
- session.request = function() {
13852
- const stream = originalRequestFn.apply(this, arguments);
13853
- streamsCount++;
13854
- if (timer) {
13855
- clearTimeout(timer);
13856
- timer = null;
13857
- }
13858
- stream.once("close", () => {
13859
- if (!--streamsCount) timer = setTimeout(() => {
13860
- timer = null;
13861
- removeSession();
13862
- }, sessionTimeout);
13863
- });
13864
- return stream;
13865
- };
13866
- }
13867
- session.once("close", removeSession);
13868
- let entry = [session, options];
13869
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
13870
- return session;
13871
- }
13872
- };
13873
14067
  const http2Sessions = new Http2Sessions();
13874
14068
  /**
13875
- * If the proxy or config beforeRedirects functions are defined, call them with the options
13876
- * object.
14069
+ * If the proxy, auth, sensitive header, or config beforeRedirects functions are defined,
14070
+ * call them with the options object.
13877
14071
  *
13878
14072
  * @param {Object<string, any>} options - The options object that was passed to the request.
13879
14073
  *
@@ -13881,8 +14075,24 @@ const http2Sessions = new Http2Sessions();
13881
14075
  */
13882
14076
  function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
13883
14077
  if (options.beforeRedirects.proxy) options.beforeRedirects.proxy(options);
14078
+ if (options.beforeRedirects.auth) options.beforeRedirects.auth(options);
14079
+ if (options.beforeRedirects.sensitiveHeaders) options.beforeRedirects.sensitiveHeaders(options, requestDetails);
13884
14080
  if (options.beforeRedirects.config) options.beforeRedirects.config(options, responseDetails, requestDetails);
13885
14081
  }
14082
+ function stripMatchingHeaders(headers, sensitiveSet) {
14083
+ if (!headers) return;
14084
+ Object.keys(headers).forEach((header) => {
14085
+ if (sensitiveSet.has(header.toLowerCase())) delete headers[header];
14086
+ });
14087
+ }
14088
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
14089
+ if (!requestDetails) return false;
14090
+ try {
14091
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
14092
+ } catch (e) {
14093
+ return false;
14094
+ }
14095
+ }
13886
14096
  /**
13887
14097
  * If the proxy or config afterRedirects functions are defined, call them with the options
13888
14098
  *
@@ -13892,9 +14102,10 @@ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
13892
14102
  *
13893
14103
  * @returns {http.ClientRequestArgs}
13894
14104
  */
13895
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
14105
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
13896
14106
  let proxy = configProxy;
13897
- if (!proxy && proxy !== false) {
14107
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
14108
+ if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
13898
14109
  const proxyUrl = getProxyForUrl(location);
13899
14110
  if (proxyUrl) {
13900
14111
  if (!shouldBypassProxy(location)) proxy = new URL(proxyUrl);
@@ -13958,7 +14169,7 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
13958
14169
  }
13959
14170
  }
13960
14171
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
13961
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
14172
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
13962
14173
  };
13963
14174
  }
13964
14175
  const isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
@@ -14020,16 +14231,25 @@ const http2Transport = { request(options, cb) {
14020
14231
  } };
14021
14232
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14022
14233
  return wrapAsync(async function dispatchHttpRequest(resolve$1, reject, onDone) {
14023
- const own = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
14234
+ const own = (key) => utils_default.getSafeProp(config, key);
14235
+ const transitional = own("transitional") || transitional_default;
14024
14236
  let data = own("data");
14025
14237
  let lookup = own("lookup");
14026
14238
  let family = own("family");
14027
14239
  let httpVersion = own("httpVersion");
14028
14240
  if (httpVersion === void 0) httpVersion = 1;
14029
14241
  let http2Options = own("http2Options");
14242
+ const httpAgent = own("httpAgent");
14243
+ const httpsAgent = own("httpsAgent");
14244
+ const configProxy = own("proxy");
14030
14245
  const responseType = own("responseType");
14031
14246
  const responseEncoding = own("responseEncoding");
14032
- const method = config.method.toUpperCase();
14247
+ const socketPath = own("socketPath");
14248
+ const method = own("method").toUpperCase();
14249
+ const maxRedirects = own("maxRedirects");
14250
+ const maxBodyLength = own("maxBodyLength");
14251
+ const maxContentLength = own("maxContentLength");
14252
+ const decompress = own("decompress");
14033
14253
  let isDone;
14034
14254
  let rejected = false;
14035
14255
  let req;
@@ -14052,9 +14272,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14052
14272
  function abort(reason) {
14053
14273
  try {
14054
14274
  abortEmitter.emit("abort", !reason || reason.type ? new CanceledError$1(null, config, req) : reason);
14055
- } catch (err) {
14056
- console.warn("emit error", err);
14057
- }
14275
+ } catch (err) {}
14058
14276
  }
14059
14277
  function clearConnectPhaseTimer() {
14060
14278
  if (connectPhaseTimer) {
@@ -14063,9 +14281,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14063
14281
  }
14064
14282
  }
14065
14283
  function createTimeoutError() {
14066
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
14067
- const transitional = config.transitional || transitional_default;
14068
- if (config.timeoutErrorMessage) timeoutErrorMessage = config.timeoutErrorMessage;
14284
+ const configTimeout = own("timeout");
14285
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
14286
+ const configTimeoutErrorMessage = own("timeoutErrorMessage");
14287
+ if (configTimeoutErrorMessage) timeoutErrorMessage = configTimeoutErrorMessage;
14069
14288
  return new AxiosError$1(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED, config, req);
14070
14289
  }
14071
14290
  abortEmitter.once("abort", reject);
@@ -14095,12 +14314,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14095
14314
  });
14096
14315
  } else onFinished();
14097
14316
  });
14098
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
14099
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
14317
+ const fullPath = buildFullPath(own("baseURL"), own("url"), own("allowAbsoluteUrls"), config);
14318
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
14319
+ const parsed = new URL(fullPath, urlBase);
14100
14320
  const protocol = parsed.protocol || supportedProtocols[0];
14101
14321
  if (protocol === "data:") {
14102
- if (config.maxContentLength > -1) {
14103
- if (estimateDataURLDecodedBytes(String(config.url || fullPath || "")) > config.maxContentLength) return reject(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config));
14322
+ if (maxContentLength > -1) {
14323
+ if (estimateDataURLDecodedBytes(String(own("url") || fullPath || "")) > maxContentLength) return reject(new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config));
14104
14324
  }
14105
14325
  let convertedData;
14106
14326
  if (method !== "GET") return settle(resolve$1, reject, {
@@ -14110,7 +14330,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14110
14330
  config
14111
14331
  });
14112
14332
  try {
14113
- convertedData = fromDataURI(config.url, responseType === "blob", { Blob: config.env && config.env.Blob });
14333
+ convertedData = fromDataURI(own("url"), responseType === "blob", { Blob: config.env && config.env.Blob });
14114
14334
  } catch (err) {
14115
14335
  throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
14116
14336
  }
@@ -14128,7 +14348,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14128
14348
  }
14129
14349
  if (supportedProtocols.indexOf(protocol) === -1) return reject(new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_BAD_REQUEST, config));
14130
14350
  const headers = AxiosHeaders$1.from(config.headers).normalize();
14131
- headers.set("User-Agent", "axios/1.16.1", false);
14351
+ headers.set("User-Agent", "axios/1.18.1", false);
14132
14352
  const { onUploadProgress, onDownloadProgress } = config;
14133
14353
  const maxRate = config.maxRate;
14134
14354
  let maxUploadRate = void 0;
@@ -14138,7 +14358,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14138
14358
  data = formDataToStream(data, (formHeaders) => {
14139
14359
  headers.set(formHeaders);
14140
14360
  }, {
14141
- tag: `axios-1.16.1-boundary`,
14361
+ tag: `axios-1.18.1-boundary`,
14142
14362
  boundary: userBoundary && userBoundary[1] || void 0
14143
14363
  });
14144
14364
  } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
@@ -14156,7 +14376,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14156
14376
  else if (utils_default.isString(data)) data = Buffer.from(data, "utf-8");
14157
14377
  else return reject(new AxiosError$1("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError$1.ERR_BAD_REQUEST, config));
14158
14378
  headers.setContentLength(data.length, false);
14159
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) return reject(new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config));
14379
+ if (maxBodyLength > -1 && data.length > maxBodyLength) return reject(new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config));
14160
14380
  }
14161
14381
  const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
14162
14382
  if (utils_default.isArray(maxRate)) {
@@ -14171,34 +14391,33 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14171
14391
  let auth = void 0;
14172
14392
  const configAuth = own("auth");
14173
14393
  if (configAuth) {
14174
- const username = configAuth.username || "";
14175
- const password = configAuth.password || "";
14394
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
14395
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
14176
14396
  auth = username + ":" + password;
14177
14397
  }
14178
- if (!auth && parsed.username) {
14179
- const urlUsername = decodeURIComponentSafe(parsed.username);
14180
- const urlPassword = decodeURIComponentSafe(parsed.password);
14398
+ if (!auth && (parsed.username || parsed.password)) {
14399
+ const urlUsername = decodeURIComponentSafe$1(parsed.username);
14400
+ const urlPassword = decodeURIComponentSafe$1(parsed.password);
14181
14401
  auth = urlUsername + ":" + urlPassword;
14182
14402
  }
14183
14403
  auth && headers.delete("authorization");
14184
14404
  let path;
14185
14405
  try {
14186
- path = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
14406
+ path = buildURL(parsed.pathname + parsed.search, own("params"), own("paramsSerializer")).replace(/^\?/, "");
14187
14407
  } catch (err) {
14188
- const customErr = new Error(err.message);
14189
- customErr.config = config;
14190
- customErr.url = config.url;
14191
- customErr.exists = true;
14192
- return reject(customErr);
14408
+ return reject(AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config, null, null, {
14409
+ url: own("url"),
14410
+ exists: true
14411
+ }));
14193
14412
  }
14194
- headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
14413
+ headers.set("Accept-Encoding", utils_default.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
14195
14414
  const options = Object.assign(Object.create(null), {
14196
14415
  path,
14197
14416
  method,
14198
14417
  headers: toByteStringHeaderObject(headers),
14199
14418
  agents: {
14200
- http: config.httpAgent,
14201
- https: config.httpsAgent
14419
+ http: httpAgent,
14420
+ https: httpsAgent
14202
14421
  },
14203
14422
  auth,
14204
14423
  protocol,
@@ -14208,38 +14427,66 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14208
14427
  http2Options
14209
14428
  });
14210
14429
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
14211
- if (config.socketPath) {
14212
- if (typeof config.socketPath !== "string") return reject(new AxiosError$1("socketPath must be a string", AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14213
- if (config.allowedSocketPaths != null) {
14214
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
14215
- const resolvedSocket = resolve(config.socketPath);
14216
- if (!allowed.some((entry) => typeof entry === "string" && resolve(entry) === resolvedSocket)) return reject(new AxiosError$1(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14430
+ if (socketPath) {
14431
+ if (typeof socketPath !== "string") return reject(new AxiosError$1("socketPath must be a string", AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14432
+ const allowedSocketPaths = own("allowedSocketPaths");
14433
+ if (allowedSocketPaths != null) {
14434
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
14435
+ const resolvedSocket = resolve(socketPath);
14436
+ if (!allowed.some((entry) => typeof entry === "string" && resolve(entry) === resolvedSocket)) return reject(new AxiosError$1(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14217
14437
  }
14218
- options.socketPath = config.socketPath;
14438
+ options.socketPath = socketPath;
14219
14439
  } else {
14220
14440
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
14221
14441
  options.port = parsed.port;
14222
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, config.httpsAgent);
14442
+ setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
14223
14443
  }
14224
14444
  let transport;
14225
14445
  let isNativeTransport = false;
14446
+ let transportEnforcesMaxBodyLength = false;
14226
14447
  const isHttpsRequest = isHttps.test(options.protocol);
14227
- if (options.agent == null) options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
14448
+ if (options.agent == null) options.agent = isHttpsRequest ? httpsAgent : httpAgent;
14228
14449
  if (isHttp2) transport = http2Transport;
14229
14450
  else {
14230
14451
  const configTransport = own("transport");
14231
14452
  if (configTransport) transport = configTransport;
14232
- else if (config.maxRedirects === 0) {
14453
+ else if (maxRedirects === 0) {
14233
14454
  transport = isHttpsRequest ? https : http;
14234
14455
  isNativeTransport = true;
14235
14456
  } else {
14236
- if (config.maxRedirects) options.maxRedirects = config.maxRedirects;
14457
+ transportEnforcesMaxBodyLength = true;
14458
+ options.sensitiveHeaders = [];
14459
+ if (maxRedirects) options.maxRedirects = maxRedirects;
14237
14460
  const configBeforeRedirect = own("beforeRedirect");
14238
14461
  if (configBeforeRedirect) options.beforeRedirects.config = configBeforeRedirect;
14462
+ if (auth) {
14463
+ const requestOrigin = parsed.origin;
14464
+ const authToRestore = auth;
14465
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
14466
+ try {
14467
+ if (new URL(redirectOptions.href).origin === requestOrigin) redirectOptions.auth = authToRestore;
14468
+ } catch (e) {}
14469
+ };
14470
+ }
14471
+ const sensitiveHeaders = own("sensitiveHeaders");
14472
+ if (sensitiveHeaders != null) {
14473
+ if (!utils_default.isArray(sensitiveHeaders)) return reject(new AxiosError$1("sensitiveHeaders must be an array of strings", AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14474
+ const sensitiveSet = /* @__PURE__ */ new Set();
14475
+ for (const header of sensitiveHeaders) {
14476
+ if (!utils_default.isString(header)) return reject(new AxiosError$1("sensitiveHeaders must be an array of strings", AxiosError$1.ERR_BAD_OPTION_VALUE, config));
14477
+ sensitiveSet.add(header.toLowerCase());
14478
+ }
14479
+ if (sensitiveSet.size) {
14480
+ options.sensitiveHeaders = Array.from(sensitiveSet);
14481
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
14482
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
14483
+ };
14484
+ }
14485
+ }
14239
14486
  transport = isHttpsRequest ? httpsFollow : httpFollow;
14240
14487
  }
14241
14488
  }
14242
- if (config.maxBodyLength > -1) options.maxBodyLength = config.maxBodyLength;
14489
+ if (maxBodyLength > -1) options.maxBodyLength = maxBodyLength;
14243
14490
  else options.maxBodyLength = Infinity;
14244
14491
  options.insecureHTTPParser = Boolean(own("insecureHTTPParser"));
14245
14492
  req = transport.request(options, function handleResponse(res) {
@@ -14254,7 +14501,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14254
14501
  }
14255
14502
  let responseStream = res;
14256
14503
  const lastRequest = res.req || req;
14257
- if (config.decompress !== false && res.headers["content-encoding"]) {
14504
+ if (decompress !== false && res.headers["content-encoding"]) {
14258
14505
  if (method === "HEAD" || res.statusCode === 204) delete res.headers["content-encoding"];
14259
14506
  switch ((res.headers["content-encoding"] || "").toLowerCase()) {
14260
14507
  case "gzip":
@@ -14269,10 +14516,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14269
14516
  streams.push(zlib.createUnzip(zlibOptions));
14270
14517
  delete res.headers["content-encoding"];
14271
14518
  break;
14272
- case "br": if (isBrotliSupported) {
14273
- streams.push(zlib.createBrotliDecompress(brotliOptions));
14274
- delete res.headers["content-encoding"];
14275
- }
14519
+ case "br":
14520
+ if (isBrotliSupported) {
14521
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
14522
+ delete res.headers["content-encoding"];
14523
+ }
14524
+ break;
14525
+ case "zstd":
14526
+ if (isZstdSupported) {
14527
+ streams.push(zlib.createZstdDecompress(zstdOptions));
14528
+ delete res.headers["content-encoding"];
14529
+ }
14530
+ break;
14276
14531
  }
14277
14532
  }
14278
14533
  responseStream = streams.length > 1 ? stream.pipeline(streams, utils_default.noop) : streams[0];
@@ -14284,8 +14539,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14284
14539
  request: lastRequest
14285
14540
  };
14286
14541
  if (responseType === "stream") {
14287
- if (config.maxContentLength > -1) {
14288
- const limit = config.maxContentLength;
14542
+ if (maxContentLength > -1) {
14543
+ const limit = maxContentLength;
14289
14544
  const source = responseStream;
14290
14545
  async function* enforceMaxContentLength() {
14291
14546
  let totalResponseBytes = 0;
@@ -14305,10 +14560,10 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14305
14560
  responseStream.on("data", function handleStreamData(chunk) {
14306
14561
  responseBuffer.push(chunk);
14307
14562
  totalResponseBytes += chunk.length;
14308
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
14563
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
14309
14564
  rejected = true;
14310
14565
  responseStream.destroy();
14311
- abort(new AxiosError$1("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest));
14566
+ abort(new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, lastRequest));
14312
14567
  }
14313
14568
  });
14314
14569
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -14351,7 +14606,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14351
14606
  });
14352
14607
  const boundSockets = /* @__PURE__ */ new Set();
14353
14608
  req.on("socket", function handleRequestSocket(socket) {
14354
- socket.setKeepAlive(true, 1e3 * 60);
14609
+ if (typeof socket.setKeepAlive === "function") socket.setKeepAlive(true, 1e3 * 60);
14355
14610
  if (!socket[kAxiosSocketListener]) {
14356
14611
  socket.on("error", function handleSocketError(err) {
14357
14612
  const current = socket[kAxiosCurrentReq];
@@ -14367,8 +14622,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14367
14622
  for (const socket of boundSockets) if (socket[kAxiosCurrentReq] === req) socket[kAxiosCurrentReq] = null;
14368
14623
  boundSockets.clear();
14369
14624
  });
14370
- if (config.timeout) {
14371
- const timeout = parseInt(config.timeout, 10);
14625
+ if (own("timeout")) {
14626
+ const timeout = parseInt(own("timeout"), 10);
14372
14627
  if (Number.isNaN(timeout)) {
14373
14628
  abort(new AxiosError$1("error trying to parse `config.timeout` to int", AxiosError$1.ERR_BAD_OPTION_VALUE, config, req));
14374
14629
  return;
@@ -14394,8 +14649,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14394
14649
  if (!ended && !errored) abort(new CanceledError$1("Request stream has been aborted", config, req));
14395
14650
  });
14396
14651
  let uploadStream = data;
14397
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
14398
- const limit = config.maxBodyLength;
14652
+ if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
14653
+ const limit = maxBodyLength;
14399
14654
  let bytesSent = 0;
14400
14655
  uploadStream = stream.pipeline([data, new stream.Transform({ transform(chunk, _enc, cb) {
14401
14656
  bytesSent += chunk.length;
@@ -14414,13 +14669,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14414
14669
  });
14415
14670
  };
14416
14671
  //#endregion
14417
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
14672
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
14418
14673
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
14419
14674
  url = new URL(url, platform_default.origin);
14420
14675
  return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
14421
14676
  })(new URL(platform_default.origin), platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)) : () => true;
14422
14677
  //#endregion
14423
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/cookies.js
14678
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/cookies.js
14424
14679
  var cookies_default = platform_default.hasStandardBrowserEnv ? {
14425
14680
  write(name, value, expires, path, domain, secure, sameSite) {
14426
14681
  if (typeof document === "undefined") return;
@@ -14438,7 +14693,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
14438
14693
  for (let i = 0; i < cookies.length; i++) {
14439
14694
  const cookie = cookies[i].replace(/^\s+/, "");
14440
14695
  const eq = cookie.indexOf("=");
14441
- if (eq !== -1 && cookie.slice(0, eq) === name) return decodeURIComponent(cookie.slice(eq + 1));
14696
+ if (eq !== -1 && cookie.slice(0, eq) === name) try {
14697
+ return decodeURIComponent(cookie.slice(eq + 1));
14698
+ } catch (e) {
14699
+ return cookie.slice(eq + 1);
14700
+ }
14442
14701
  }
14443
14702
  return null;
14444
14703
  },
@@ -14453,7 +14712,7 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? {
14453
14712
  remove() {}
14454
14713
  };
14455
14714
  //#endregion
14456
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/mergeConfig.js
14715
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/mergeConfig.js
14457
14716
  const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
14458
14717
  /**
14459
14718
  * Config-specific merge-function which creates a new config-object
@@ -14465,6 +14724,7 @@ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing
14465
14724
  * @returns {Object} New object resulting from merging config2 to config1
14466
14725
  */
14467
14726
  function mergeConfig$1(config1, config2) {
14727
+ config1 = config1 || {};
14468
14728
  config2 = config2 || {};
14469
14729
  const config = Object.create(null);
14470
14730
  Object.defineProperty(config, "hasOwnProperty", {
@@ -14491,6 +14751,14 @@ function mergeConfig$1(config1, config2) {
14491
14751
  if (!utils_default.isUndefined(b)) return getMergedValue(void 0, b);
14492
14752
  else if (!utils_default.isUndefined(a)) return getMergedValue(void 0, a);
14493
14753
  }
14754
+ function getMergedTransitionalOption(prop) {
14755
+ const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
14756
+ if (!utils_default.isUndefined(transitional2)) if (utils_default.isPlainObject(transitional2)) {
14757
+ if (utils_default.hasOwnProp(transitional2, prop)) return transitional2[prop];
14758
+ } else return;
14759
+ const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
14760
+ if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) return transitional1[prop];
14761
+ }
14494
14762
  function mergeDirectKeys(a, b, prop) {
14495
14763
  if (utils_default.hasOwnProp(config2, prop)) return getMergedValue(a, b);
14496
14764
  else if (utils_default.hasOwnProp(config1, prop)) return getMergedValue(void 0, a);
@@ -14536,17 +14804,19 @@ function mergeConfig$1(config1, config2) {
14536
14804
  const configValue = merge(utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0, utils_default.hasOwnProp(config2, prop) ? config2[prop] : void 0, prop);
14537
14805
  utils_default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
14538
14806
  });
14807
+ if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) if (utils_default.hasOwnProp(config1, "validateStatus")) config.validateStatus = getMergedValue(void 0, config1.validateStatus);
14808
+ else delete config.validateStatus;
14539
14809
  return config;
14540
14810
  }
14541
14811
  //#endregion
14542
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/resolveConfig.js
14812
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/resolveConfig.js
14543
14813
  const FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14544
14814
  function setFormDataHeaders(headers, formHeaders, policy) {
14545
14815
  if (policy !== "content-only") {
14546
14816
  headers.set(formHeaders);
14547
14817
  return;
14548
14818
  }
14549
- Object.entries(formHeaders).forEach(([key, val]) => {
14819
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
14550
14820
  if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) headers.set(key, val);
14551
14821
  });
14552
14822
  }
@@ -14558,8 +14828,8 @@ function setFormDataHeaders(headers, formHeaders, policy) {
14558
14828
  *
14559
14829
  * @returns {string} UTF-8 bytes as a Latin-1 string
14560
14830
  */
14561
- const encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
14562
- var resolveConfig_default = (config) => {
14831
+ const encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
14832
+ function resolveConfig(config) {
14563
14833
  const newConfig = mergeConfig$1({}, config);
14564
14834
  const own = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
14565
14835
  const data = own("data");
@@ -14572,10 +14842,18 @@ var resolveConfig_default = (config) => {
14572
14842
  const allowAbsoluteUrls = own("allowAbsoluteUrls");
14573
14843
  const url = own("url");
14574
14844
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
14575
- newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
14576
- if (auth) headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
14845
+ newConfig.url = buildURL(buildFullPath(baseURL, url, allowAbsoluteUrls, newConfig), own("params"), own("paramsSerializer"));
14846
+ if (auth) {
14847
+ const username = utils_default.getSafeProp(auth, "username") || "";
14848
+ const password = utils_default.getSafeProp(auth, "password") || "";
14849
+ try {
14850
+ headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
14851
+ } catch (e) {
14852
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_OPTION_VALUE, config);
14853
+ }
14854
+ }
14577
14855
  if (utils_default.isFormData(data)) {
14578
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) headers.setContentType(void 0);
14856
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) headers.setContentType(void 0);
14579
14857
  else if (utils_default.isFunction(data.getHeaders)) setFormDataHeaders(headers, data.getHeaders(), own("formDataHeaderPolicy"));
14580
14858
  }
14581
14859
  if (platform_default.hasStandardBrowserEnv) {
@@ -14586,10 +14864,10 @@ var resolveConfig_default = (config) => {
14586
14864
  }
14587
14865
  }
14588
14866
  return newConfig;
14589
- };
14867
+ }
14590
14868
  var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
14591
14869
  return new Promise(function dispatchXhrRequest(resolve, reject) {
14592
- const _config = resolveConfig_default(config);
14870
+ const _config = resolveConfig(config);
14593
14871
  let requestData = _config.data;
14594
14872
  const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
14595
14873
  let { responseType, onUploadProgress, onDownloadProgress } = _config;
@@ -14680,13 +14958,14 @@ var xhr_default = typeof XMLHttpRequest !== "undefined" && function(config) {
14680
14958
  const protocol = parseProtocol(_config.url);
14681
14959
  if (protocol && !platform_default.protocols.includes(protocol)) {
14682
14960
  reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
14961
+ done();
14683
14962
  return;
14684
14963
  }
14685
14964
  request.send(requestData || null);
14686
14965
  });
14687
14966
  };
14688
14967
  //#endregion
14689
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/composeSignals.js
14968
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/composeSignals.js
14690
14969
  const composeSignals = (signals, timeout) => {
14691
14970
  signals = signals ? signals.filter(Boolean) : [];
14692
14971
  if (!timeout && !signals.length) return;
@@ -14713,13 +14992,13 @@ const composeSignals = (signals, timeout) => {
14713
14992
  });
14714
14993
  signals = null;
14715
14994
  };
14716
- signals.forEach((signal) => signal.addEventListener("abort", onabort));
14995
+ signals.forEach((signal) => signal.addEventListener("abort", onabort, { once: true }));
14717
14996
  const { signal } = controller;
14718
14997
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
14719
14998
  return signal;
14720
14999
  };
14721
15000
  //#endregion
14722
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/trackStream.js
15001
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/trackStream.js
14723
15002
  const streamChunk = function* (chunk, chunkSize) {
14724
15003
  let len = chunk.byteLength;
14725
15004
  if (!chunkSize || len < chunkSize) {
@@ -14787,9 +15066,26 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
14787
15066
  }, { highWaterMark: 2 });
14788
15067
  };
14789
15068
  //#endregion
14790
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/adapters/fetch.js
15069
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/adapters/fetch.js
14791
15070
  const DEFAULT_CHUNK_SIZE = 64 * 1024;
14792
15071
  const { isFunction } = utils_default;
15072
+ /**
15073
+ * Encode a UTF-8 string to a Latin-1 byte string for use with btoa().
15074
+ * This is a modern replacement for the deprecated unescape(encodeURIComponent(str)) pattern.
15075
+ *
15076
+ * @param {string} str The string to encode
15077
+ *
15078
+ * @returns {string} UTF-8 bytes as a Latin-1 string
15079
+ */
15080
+ const encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
15081
+ const decodeURIComponentSafe = (value) => {
15082
+ if (!utils_default.isString(value)) return value;
15083
+ try {
15084
+ return decodeURIComponent(value);
15085
+ } catch (error) {
15086
+ return value;
15087
+ }
15088
+ };
14793
15089
  const test = (fn, ...args) => {
14794
15090
  try {
14795
15091
  return !!fn(...args);
@@ -14797,6 +15093,12 @@ const test = (fn, ...args) => {
14797
15093
  return false;
14798
15094
  }
14799
15095
  };
15096
+ const maybeWithAuthCredentials = (url) => {
15097
+ const protocolIndex = url.indexOf("://");
15098
+ let urlToCheck = url;
15099
+ if (protocolIndex !== -1) urlToCheck = urlToCheck.slice(protocolIndex + 3);
15100
+ return urlToCheck.includes("@") || urlToCheck.includes(":");
15101
+ };
14800
15102
  const factory = (env) => {
14801
15103
  const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis;
14802
15104
  const { ReadableStream, TextEncoder } = globalObject;
@@ -14827,19 +15129,21 @@ const factory = (env) => {
14827
15129
  });
14828
15130
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils_default.isReadableStream(new Response("").body));
14829
15131
  const resolvers = { stream: supportsResponseStream && ((res) => res.body) };
14830
- isFetchSupported && [
14831
- "text",
14832
- "arrayBuffer",
14833
- "blob",
14834
- "formData",
14835
- "stream"
14836
- ].forEach((type) => {
14837
- !resolvers[type] && (resolvers[type] = (res, config) => {
14838
- let method = res && res[type];
14839
- if (method) return method.call(res);
14840
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
15132
+ isFetchSupported && (() => {
15133
+ [
15134
+ "text",
15135
+ "arrayBuffer",
15136
+ "blob",
15137
+ "formData",
15138
+ "stream"
15139
+ ].forEach((type) => {
15140
+ !resolvers[type] && (resolvers[type] = (res, config) => {
15141
+ let method = res && res[type];
15142
+ if (method) return method.call(res);
15143
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
15144
+ });
14841
15145
  });
14842
- });
15146
+ })();
14843
15147
  const getBodyLength = async (body) => {
14844
15148
  if (body == null) return 0;
14845
15149
  if (utils_default.isBlob(body)) return body.size;
@@ -14856,9 +15160,10 @@ const factory = (env) => {
14856
15160
  return length == null ? getBodyLength(body) : length;
14857
15161
  };
14858
15162
  return async (config) => {
14859
- let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength } = resolveConfig_default(config);
15163
+ let { url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, withCredentials = "same-origin", fetchOptions, maxContentLength, maxBodyLength } = resolveConfig(config);
14860
15164
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
14861
15165
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
15166
+ const own = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
14862
15167
  let _fetch = envFetch || fetch;
14863
15168
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
14864
15169
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
@@ -14867,34 +15172,70 @@ const factory = (env) => {
14867
15172
  composedSignal.unsubscribe();
14868
15173
  });
14869
15174
  let requestContentLength;
15175
+ let pendingBodyError = null;
15176
+ const maxBodyLengthError = () => new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config, request);
14870
15177
  try {
15178
+ let auth = void 0;
15179
+ const configAuth = own("auth");
15180
+ if (configAuth) auth = {
15181
+ username: utils_default.getSafeProp(configAuth, "username") || "",
15182
+ password: utils_default.getSafeProp(configAuth, "password") || ""
15183
+ };
15184
+ if (maybeWithAuthCredentials(url)) {
15185
+ const parsedURL = new URL(url, platform_default.origin);
15186
+ if (!auth && (parsedURL.username || parsedURL.password)) auth = {
15187
+ username: decodeURIComponentSafe(parsedURL.username),
15188
+ password: decodeURIComponentSafe(parsedURL.password)
15189
+ };
15190
+ if (parsedURL.username || parsedURL.password) {
15191
+ parsedURL.username = "";
15192
+ parsedURL.password = "";
15193
+ url = parsedURL.href;
15194
+ }
15195
+ }
15196
+ if (auth) {
15197
+ headers.delete("authorization");
15198
+ headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || ""))));
15199
+ }
14871
15200
  if (hasMaxContentLength && typeof url === "string" && url.startsWith("data:")) {
14872
15201
  if (estimateDataURLDecodedBytes(url) > maxContentLength) throw new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request);
14873
15202
  }
14874
15203
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
14875
- const outboundLength = await resolveBodyLength(headers, data);
14876
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) throw new AxiosError$1("Request body larger than maxBodyLength limit", AxiosError$1.ERR_BAD_REQUEST, config, request);
14877
- }
14878
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
14879
- let _request = new Request(url, {
14880
- method: "POST",
14881
- body: data,
14882
- duplex: "half"
14883
- });
14884
- let contentTypeHeader;
14885
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
14886
- if (_request.body) {
14887
- const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
14888
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
15204
+ const outboundLength = await getBodyLength(data);
15205
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
15206
+ requestContentLength = outboundLength;
15207
+ if (outboundLength > maxBodyLength) throw maxBodyLengthError();
14889
15208
  }
14890
15209
  }
15210
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
15211
+ const trackRequestStream = (stream, onProgress, flush) => trackStream(stream, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
15212
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) throw pendingBodyError = maxBodyLengthError();
15213
+ onProgress && onProgress(loadedBytes);
15214
+ }, flush);
15215
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
15216
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
15217
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
15218
+ let _request = new Request(url, {
15219
+ method: "POST",
15220
+ body: data,
15221
+ duplex: "half"
15222
+ });
15223
+ let contentTypeHeader;
15224
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) headers.setContentType(contentTypeHeader);
15225
+ if (_request.body) {
15226
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
15227
+ data = trackRequestStream(_request.body, onProgress, flush);
15228
+ }
15229
+ }
15230
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") data = trackRequestStream(data);
15231
+ else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") throw new AxiosError$1("Stream request bodies are not supported by the current fetch implementation", AxiosError$1.ERR_NOT_SUPPORT, config, request);
14891
15232
  if (!utils_default.isString(withCredentials)) withCredentials = withCredentials ? "include" : "omit";
14892
15233
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
14893
15234
  if (utils_default.isFormData(data)) {
14894
15235
  const contentType = headers.getContentType();
14895
15236
  if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) headers.delete("content-type");
14896
15237
  }
14897
- headers.set("User-Agent", "axios/" + VERSION$1, false);
15238
+ headers.set("User-Agent", "axios/1.18.1", false);
14898
15239
  const resolvedOptions = {
14899
15240
  ...fetchOptions,
14900
15241
  signal: composedSignal,
@@ -14906,8 +15247,9 @@ const factory = (env) => {
14906
15247
  };
14907
15248
  request = isRequestSupported && new Request(url, resolvedOptions);
14908
15249
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
15250
+ const responseHeaders = AxiosHeaders$1.from(response.headers);
14909
15251
  if (hasMaxContentLength) {
14910
- const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
15252
+ const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
14911
15253
  if (declaredLength != null && declaredLength > maxContentLength) throw new AxiosError$1("maxContentLength size of " + maxContentLength + " exceeded", AxiosError$1.ERR_BAD_RESPONSE, config, request);
14912
15254
  }
14913
15255
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
@@ -14920,7 +15262,7 @@ const factory = (env) => {
14920
15262
  ].forEach((prop) => {
14921
15263
  options[prop] = response[prop];
14922
15264
  });
14923
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
15265
+ const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
14924
15266
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
14925
15267
  let bytesRead = 0;
14926
15268
  const onChunkProgress = (loadedBytes) => {
@@ -14963,10 +15305,34 @@ const factory = (env) => {
14963
15305
  const canceledError = composedSignal.reason;
14964
15306
  canceledError.config = config;
14965
15307
  request && (canceledError.request = request);
14966
- err !== canceledError && (canceledError.cause = err);
15308
+ if (err !== canceledError) Object.defineProperty(canceledError, "cause", {
15309
+ __proto__: null,
15310
+ value: err,
15311
+ writable: true,
15312
+ enumerable: false,
15313
+ configurable: true
15314
+ });
14967
15315
  throw canceledError;
14968
15316
  }
14969
- if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) throw Object.assign(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response), { cause: err.cause || err });
15317
+ if (pendingBodyError) {
15318
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
15319
+ throw pendingBodyError;
15320
+ }
15321
+ if (err instanceof AxiosError$1) {
15322
+ request && !err.request && (err.request = request);
15323
+ throw err;
15324
+ }
15325
+ if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
15326
+ const networkError = new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response);
15327
+ Object.defineProperty(networkError, "cause", {
15328
+ __proto__: null,
15329
+ value: err.cause || err,
15330
+ writable: true,
15331
+ enumerable: false,
15332
+ configurable: true
15333
+ });
15334
+ throw networkError;
15335
+ }
14970
15336
  throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
14971
15337
  }
14972
15338
  };
@@ -14991,7 +15357,7 @@ const getFetch = (config) => {
14991
15357
  };
14992
15358
  getFetch();
14993
15359
  //#endregion
14994
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/adapters/adapters.js
15360
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/adapters/adapters.js
14995
15361
  /**
14996
15362
  * Known adapters mapping.
14997
15363
  * Provides environment-specific adapters for Axios:
@@ -15063,7 +15429,7 @@ function getAdapter$1(adapters, config) {
15063
15429
  }
15064
15430
  if (!adapter) {
15065
15431
  const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
15066
- throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), "ERR_NOT_SUPPORT");
15432
+ throw new AxiosError$1(`There is no suitable adapter to dispatch the request ` + (length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified"), AxiosError$1.ERR_NOT_SUPPORT);
15067
15433
  }
15068
15434
  return adapter;
15069
15435
  }
@@ -15083,7 +15449,7 @@ var adapters_default = {
15083
15449
  adapters: knownAdapters
15084
15450
  };
15085
15451
  //#endregion
15086
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/dispatchRequest.js
15452
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/dispatchRequest.js
15087
15453
  /**
15088
15454
  * Throws a `CanceledError` if cancellation has been requested.
15089
15455
  *
@@ -15138,7 +15504,7 @@ function dispatchRequest(config) {
15138
15504
  });
15139
15505
  }
15140
15506
  //#endregion
15141
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/validator.js
15507
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/validator.js
15142
15508
  const validators$1 = {};
15143
15509
  [
15144
15510
  "object",
@@ -15164,7 +15530,7 @@ const deprecatedWarnings = {};
15164
15530
  */
15165
15531
  validators$1.transitional = function transitional(validator, version, message) {
15166
15532
  function formatMessage(opt, desc) {
15167
- return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
15533
+ return "[Axios v1.18.1] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
15168
15534
  }
15169
15535
  return (value, opt, opts) => {
15170
15536
  if (validator === false) throw new AxiosError$1(formatMessage(opt, " has been removed" + (version ? " in " + version : "")), AxiosError$1.ERR_DEPRECATED);
@@ -15191,7 +15557,7 @@ validators$1.spelling = function spelling(correctSpelling) {
15191
15557
  * @returns {object}
15192
15558
  */
15193
15559
  function assertOptions(options, schema, allowUnknown) {
15194
- if (typeof options !== "object") throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
15560
+ if (typeof options !== "object" || options === null) throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
15195
15561
  const keys = Object.keys(options);
15196
15562
  let i = keys.length;
15197
15563
  while (i-- > 0) {
@@ -15211,7 +15577,7 @@ var validator_default = {
15211
15577
  validators: validators$1
15212
15578
  };
15213
15579
  //#endregion
15214
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/core/Axios.js
15580
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/core/Axios.js
15215
15581
  const validators = validator_default.validators;
15216
15582
  /**
15217
15583
  * Create a new instance of Axios
@@ -15272,7 +15638,9 @@ var Axios$1 = class {
15272
15638
  silentJSONParsing: validators.transitional(validators.boolean),
15273
15639
  forcedJSONParsing: validators.transitional(validators.boolean),
15274
15640
  clarifyTimeoutError: validators.transitional(validators.boolean),
15275
- legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
15641
+ legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
15642
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
15643
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
15276
15644
  }, false);
15277
15645
  if (paramsSerializer != null) if (utils_default.isFunction(paramsSerializer)) config.paramsSerializer = { serialize: paramsSerializer };
15278
15646
  else validator_default.assertOptions(paramsSerializer, {
@@ -15349,7 +15717,7 @@ var Axios$1 = class {
15349
15717
  }
15350
15718
  getUri(config) {
15351
15719
  config = mergeConfig$1(this.defaults, config);
15352
- return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls), config.params, config.paramsSerializer);
15720
+ return buildURL(buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config), config.params, config.paramsSerializer);
15353
15721
  }
15354
15722
  };
15355
15723
  utils_default.forEach([
@@ -15362,7 +15730,7 @@ utils_default.forEach([
15362
15730
  return this.request(mergeConfig$1(config || {}, {
15363
15731
  method,
15364
15732
  url,
15365
- data: (config || {}).data
15733
+ data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
15366
15734
  }));
15367
15735
  };
15368
15736
  });
@@ -15386,7 +15754,7 @@ utils_default.forEach([
15386
15754
  if (method !== "query") Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
15387
15755
  });
15388
15756
  //#endregion
15389
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/cancel/CancelToken.js
15757
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/cancel/CancelToken.js
15390
15758
  /**
15391
15759
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
15392
15760
  *
@@ -15474,7 +15842,7 @@ var CancelToken$1 = class CancelToken$1 {
15474
15842
  }
15475
15843
  };
15476
15844
  //#endregion
15477
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/spread.js
15845
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/spread.js
15478
15846
  /**
15479
15847
  * Syntactic sugar for invoking a function and expanding an array for arguments.
15480
15848
  *
@@ -15502,7 +15870,7 @@ function spread$1(callback) {
15502
15870
  };
15503
15871
  }
15504
15872
  //#endregion
15505
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/isAxiosError.js
15873
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/isAxiosError.js
15506
15874
  /**
15507
15875
  * Determines whether the payload is an error thrown by Axios
15508
15876
  *
@@ -15514,7 +15882,7 @@ function isAxiosError$1(payload) {
15514
15882
  return utils_default.isObject(payload) && payload.isAxiosError === true;
15515
15883
  }
15516
15884
  //#endregion
15517
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/helpers/HttpStatusCode.js
15885
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/helpers/HttpStatusCode.js
15518
15886
  const HttpStatusCode$1 = {
15519
15887
  Continue: 100,
15520
15888
  SwitchingProtocols: 101,
@@ -15590,7 +15958,7 @@ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
15590
15958
  HttpStatusCode$1[value] = key;
15591
15959
  });
15592
15960
  //#endregion
15593
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/lib/axios.js
15961
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/lib/axios.js
15594
15962
  /**
15595
15963
  * Create an instance of Axios
15596
15964
  *
@@ -15629,7 +15997,7 @@ axios.getAdapter = adapters_default.getAdapter;
15629
15997
  axios.HttpStatusCode = HttpStatusCode$1;
15630
15998
  axios.default = axios;
15631
15999
  //#endregion
15632
- //#region node_modules/.pnpm/axios@1.16.1/node_modules/axios/index.js
16000
+ //#region node_modules/.pnpm/axios@1.18.1/node_modules/axios/index.js
15633
16001
  const { Axios, AxiosError, CanceledError, isCancel, CancelToken, VERSION, all, Cancel, isAxiosError, spread, toFormData, AxiosHeaders, HttpStatusCode, formToJSON, getAdapter, mergeConfig, create } = axios;
15634
16002
  //#endregion
15635
16003
  //#region src/error.ts
@@ -15702,7 +16070,10 @@ function createDocboxRoutes(options) {
15702
16070
  if (scope === void 0 || typeof scope !== "string") return (0, import_lib.badRequest)("scope must be defined and a string");
15703
16071
  const path = request.path.substring(basePath.length);
15704
16072
  if (!await options.isAllowedWrite(request, scope, path)) return (0, import_lib.forbidden)("you don't have permission to access this resource");
15705
- return forwardRequest(axiosInstance, request, await options.getRequestTenant(request), await getRequestUser(request), await getApiKey(), h, path);
16073
+ const tenant = await options.getRequestTenant(request);
16074
+ const user = await getRequestUser(request);
16075
+ const apiKey = await getApiKey();
16076
+ return forwardRequest(axiosInstance, request, tenant, user, apiKey, h, path);
15706
16077
  },
15707
16078
  options: baseRouteOptions
15708
16079
  },
@@ -15714,7 +16085,10 @@ function createDocboxRoutes(options) {
15714
16085
  if (scope === void 0 || typeof scope !== "string") return (0, import_lib.badRequest)("scope must be defined and a string");
15715
16086
  const path = request.path.substring(basePath.length);
15716
16087
  if (!await options.isAllowedRead(request, scope, path)) return (0, import_lib.forbidden)("you don't have permission to access this resource");
15717
- return forwardRequest(axiosInstance, request, await options.getRequestTenant(request), await getRequestUser(request), await getApiKey(), h, path);
16088
+ const tenant = await options.getRequestTenant(request);
16089
+ const user = await getRequestUser(request);
16090
+ const apiKey = await getApiKey();
16091
+ return forwardRequest(axiosInstance, request, tenant, user, apiKey, h, path);
15718
16092
  },
15719
16093
  options: {
15720
16094
  ...baseRouteOptions,
@@ -15734,7 +16108,10 @@ function createDocboxRoutes(options) {
15734
16108
  if (scope === void 0 || typeof scope !== "string") return (0, import_lib.badRequest)("scope must be defined and a string");
15735
16109
  const path = request.path.substring(basePath.length);
15736
16110
  if (!await (isWriteRequest(request, path) ? options.isAllowedWrite : options.isAllowedRead)(request, scope, path)) return (0, import_lib.forbidden)("you don't have permission to access this resource");
15737
- return forwardRequest(axiosInstance, request, await options.getRequestTenant(request), await getRequestUser(request), await getApiKey(), h, path);
16111
+ const tenant = await options.getRequestTenant(request);
16112
+ const user = await getRequestUser(request);
16113
+ const apiKey = await getApiKey();
16114
+ return forwardRequest(axiosInstance, request, tenant, user, apiKey, h, path);
15738
16115
  },
15739
16116
  options: {
15740
16117
  ...baseRouteOptions,