@jerome-benoit/sap-ai-provider-v2 4.7.1 → 4.9.0

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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/dist/{chunk-BZWUUBX2.js → chunk-33WLQYKB.js} +8 -2
  3. package/dist/chunk-33WLQYKB.js.map +1 -0
  4. package/dist/{chunk-RUCURXS7.js → chunk-3KCERYUB.js} +12 -6
  5. package/dist/chunk-3KCERYUB.js.map +1 -0
  6. package/dist/{chunk-XIWHF23D.js → chunk-4PLJVJX4.js} +746 -203
  7. package/dist/{chunk-XIWHF23D.js.map → chunk-4PLJVJX4.js.map} +1 -1
  8. package/dist/{chunk-HDOSHLV6.js → chunk-4SQ5HC6Y.js} +2 -2
  9. package/dist/{chunk-OA6TJHD2.js → chunk-RW6WSPU2.js} +10 -4
  10. package/dist/chunk-RW6WSPU2.js.map +1 -0
  11. package/dist/{foundation-models-embedding-model-strategy-TACUPFS2.js → foundation-models-embedding-model-strategy-RVJQSJPU.js} +7 -6
  12. package/dist/foundation-models-embedding-model-strategy-RVJQSJPU.js.map +1 -0
  13. package/dist/{foundation-models-language-model-strategy-LLWYUGA3.js → foundation-models-language-model-strategy-UWJ6FHBI.js} +14 -9
  14. package/dist/foundation-models-language-model-strategy-UWJ6FHBI.js.map +1 -0
  15. package/dist/index.cjs +795 -222
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +26 -5
  18. package/dist/index.d.ts +26 -5
  19. package/dist/index.js +14 -10
  20. package/dist/index.js.map +1 -1
  21. package/dist/{orchestration-embedding-model-strategy-RYI3HWRZ.js → orchestration-embedding-model-strategy-OMIXGLHJ.js} +8 -7
  22. package/dist/orchestration-embedding-model-strategy-OMIXGLHJ.js.map +1 -0
  23. package/dist/{orchestration-language-model-strategy-NIUPRYDW.js → orchestration-language-model-strategy-UE7OQO5K.js} +16 -10
  24. package/dist/orchestration-language-model-strategy-UE7OQO5K.js.map +1 -0
  25. package/package.json +20 -20
  26. package/dist/chunk-BZWUUBX2.js.map +0 -1
  27. package/dist/chunk-OA6TJHD2.js.map +0 -1
  28. package/dist/chunk-RUCURXS7.js.map +0 -1
  29. package/dist/foundation-models-embedding-model-strategy-TACUPFS2.js.map +0 -1
  30. package/dist/foundation-models-language-model-strategy-LLWYUGA3.js.map +0 -1
  31. package/dist/orchestration-embedding-model-strategy-RYI3HWRZ.js.map +0 -1
  32. package/dist/orchestration-language-model-strategy-NIUPRYDW.js.map +0 -1
  33. /package/dist/{chunk-HDOSHLV6.js.map → chunk-4SQ5HC6Y.js.map} +0 -0
@@ -11338,7 +11338,7 @@ var require_error_with_cause = __commonJS({
11338
11338
  this.addStack(cause);
11339
11339
  }
11340
11340
  isAxiosError(err) {
11341
- return err["isAxiosError"] === true;
11341
+ return "isAxiosError" in err && err.isAxiosError === true;
11342
11342
  }
11343
11343
  addStack(cause) {
11344
11344
  if (this.isAxiosError(cause)) {
@@ -23227,6 +23227,9 @@ var require_form_data = __commonJS({
23227
23227
  var setToStringTag = require_es_set_tostringtag();
23228
23228
  var hasOwn = require_hasown();
23229
23229
  var populate = require_populate();
23230
+ function escapeHeaderParam(str) {
23231
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
23232
+ }
23230
23233
  function FormData2(options) {
23231
23234
  if (!(this instanceof FormData2)) {
23232
23235
  return new FormData2(options);
@@ -23316,7 +23319,7 @@ var require_form_data = __commonJS({
23316
23319
  var contents = "";
23317
23320
  var headers = {
23318
23321
  // add custom disposition as third element or keep it two elements if not
23319
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
23322
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
23320
23323
  // if no content type. allow it to be empty array
23321
23324
  "Content-Type": [].concat(contentType || [])
23322
23325
  };
@@ -23350,7 +23353,7 @@ var require_form_data = __commonJS({
23350
23353
  filename = path.basename(value.client._httpMessage.path || "");
23351
23354
  }
23352
23355
  if (filename) {
23353
- return 'filename="' + filename + '"';
23356
+ return 'filename="' + escapeHeaderParam(filename) + '"';
23354
23357
  }
23355
23358
  };
23356
23359
  FormData2.prototype._getContentType = function(value, options) {
@@ -25194,6 +25197,25 @@ var require_axios = __commonJS({
25194
25197
  iterator,
25195
25198
  toStringTag
25196
25199
  } = Symbol;
25200
+ var hasOwnProperty = (({
25201
+ hasOwnProperty: hasOwnProperty2
25202
+ }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
25203
+ var hasOwnInPrototypeChain = (thing, prop) => {
25204
+ let obj = thing;
25205
+ const seen = [];
25206
+ while (obj != null && obj !== Object.prototype) {
25207
+ if (seen.indexOf(obj) !== -1) {
25208
+ return false;
25209
+ }
25210
+ seen.push(obj);
25211
+ if (hasOwnProperty(obj, prop)) {
25212
+ return true;
25213
+ }
25214
+ obj = getPrototypeOf(obj);
25215
+ }
25216
+ return false;
25217
+ };
25218
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
25197
25219
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
25198
25220
  const str = toString2.call(thing);
25199
25221
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -25226,11 +25248,14 @@ var require_axios = __commonJS({
25226
25248
  var isObject = (thing) => thing !== null && typeof thing === "object";
25227
25249
  var isBoolean = (thing) => thing === true || thing === false;
25228
25250
  var isPlainObject2 = (val) => {
25229
- if (kindOf(val) !== "object") {
25251
+ if (!isObject(val)) {
25230
25252
  return false;
25231
25253
  }
25232
25254
  const prototype2 = getPrototypeOf(val);
25233
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
25255
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
25256
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
25257
+ // than a plain object, while ignoring keys injected onto Object.prototype.
25258
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
25234
25259
  };
25235
25260
  var isEmptyObject = (val) => {
25236
25261
  if (!isObject(val) || isBuffer(val)) {
@@ -25250,6 +25275,7 @@ var require_axios = __commonJS({
25250
25275
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
25251
25276
  var isBlob = kindOfTest("Blob");
25252
25277
  var isFileList = kindOfTest("FileList");
25278
+ var isSet = kindOfTest("Set");
25253
25279
  var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
25254
25280
  function getGlobal() {
25255
25281
  if (typeof globalThis !== "undefined") return globalThis;
@@ -25483,9 +25509,6 @@ var require_axios = __commonJS({
25483
25509
  return p1.toUpperCase() + p2;
25484
25510
  });
25485
25511
  };
25486
- var hasOwnProperty = (({
25487
- hasOwnProperty: hasOwnProperty2
25488
- }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
25489
25512
  var {
25490
25513
  propertyIsEnumerable
25491
25514
  } = Object.prototype;
@@ -25550,11 +25573,20 @@ var require_axios = __commonJS({
25550
25573
  }
25551
25574
  if (!("toJSON" in source)) {
25552
25575
  visited.add(source);
25553
- const target = isArray(source) ? [] : {};
25554
- forEach(source, (value, key) => {
25555
- const reducedValue = visit(value);
25556
- !isUndefined(reducedValue) && (target[key] = reducedValue);
25557
- });
25576
+ let target;
25577
+ if (isSet(source)) {
25578
+ target = [];
25579
+ for (const value of source) {
25580
+ const reducedValue = visit(value);
25581
+ !isUndefined(reducedValue) && target.push(reducedValue);
25582
+ }
25583
+ } else {
25584
+ target = isArray(source) ? [] : {};
25585
+ forEach(source, (value, key) => {
25586
+ const reducedValue = visit(value);
25587
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
25588
+ });
25589
+ }
25558
25590
  visited.delete(source);
25559
25591
  return target;
25560
25592
  }
@@ -25586,6 +25618,7 @@ var require_axios = __commonJS({
25586
25618
  })(typeof setImmediate === "function", isFunction$1(_global.postMessage));
25587
25619
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
25588
25620
  var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
25621
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
25589
25622
  var utils$1 = {
25590
25623
  isArray,
25591
25624
  isArrayBuffer,
@@ -25631,6 +25664,8 @@ var require_axios = __commonJS({
25631
25664
  hasOwnProperty,
25632
25665
  hasOwnProp: hasOwnProperty,
25633
25666
  // an alias to avoid ESLint no-prototype-builtins detection
25667
+ hasOwnInPrototypeChain,
25668
+ getSafeProp,
25634
25669
  reduceDescriptors,
25635
25670
  freezeMethods,
25636
25671
  toObjectSet,
@@ -25646,7 +25681,8 @@ var require_axios = __commonJS({
25646
25681
  isThenable,
25647
25682
  setImmediate: _setImmediate,
25648
25683
  asap,
25649
- isIterable
25684
+ isIterable,
25685
+ isSafeIterable
25650
25686
  };
25651
25687
  var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
25652
25688
  var parseHeaders = (rawHeaders) => {
@@ -25658,17 +25694,18 @@ var require_axios = __commonJS({
25658
25694
  i = line.indexOf(":");
25659
25695
  key = line.substring(0, i).trim().toLowerCase();
25660
25696
  val = line.substring(i + 1).trim();
25661
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
25697
+ const hasKey = utils$1.hasOwnProp(parsed, key);
25698
+ if (!key || hasKey && utils$1.hasOwnProp(ignoreDuplicateOf, key)) {
25662
25699
  return;
25663
25700
  }
25664
25701
  if (key === "set-cookie") {
25665
- if (parsed[key]) {
25702
+ if (hasKey) {
25666
25703
  parsed[key].push(val);
25667
25704
  } else {
25668
25705
  parsed[key] = [val];
25669
25706
  }
25670
25707
  } else {
25671
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
25708
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
25672
25709
  }
25673
25710
  });
25674
25711
  return parsed;
@@ -25728,6 +25765,90 @@ var require_axios = __commonJS({
25728
25765
  }
25729
25766
  return tokens;
25730
25767
  }
25768
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
25769
+ function trimOWS(value) {
25770
+ let start = 0;
25771
+ let end = value.length;
25772
+ while (start < end) {
25773
+ const code = value.charCodeAt(start);
25774
+ if (code !== 9 && code !== 32) {
25775
+ break;
25776
+ }
25777
+ start += 1;
25778
+ }
25779
+ while (end > start) {
25780
+ const code = value.charCodeAt(end - 1);
25781
+ if (code !== 9 && code !== 32) {
25782
+ break;
25783
+ }
25784
+ end -= 1;
25785
+ }
25786
+ return start === 0 && end === value.length ? value : value.slice(start, end);
25787
+ }
25788
+ function decodeQuotedString(value) {
25789
+ const last2 = value.length - 1;
25790
+ if (last2 < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last2) !== 34) {
25791
+ return value;
25792
+ }
25793
+ let decoded = "";
25794
+ for (let i = 1; i < last2; i++) {
25795
+ const code = value.charCodeAt(i);
25796
+ if (code === 34) {
25797
+ return value;
25798
+ }
25799
+ if (code === 92) {
25800
+ i += 1;
25801
+ if (i >= last2) {
25802
+ return value;
25803
+ }
25804
+ }
25805
+ decoded += value[i];
25806
+ }
25807
+ return decoded;
25808
+ }
25809
+ function parseParameters(value) {
25810
+ const parameters = /* @__PURE__ */ Object.create(null);
25811
+ const str = String(value);
25812
+ let start = 0;
25813
+ let quoted = false;
25814
+ let escaped = false;
25815
+ function parseParameter(end) {
25816
+ const part = trimOWS(str.slice(start, end));
25817
+ const equals = part.indexOf("=");
25818
+ if (equals < 1) {
25819
+ return;
25820
+ }
25821
+ const name = trimOWS(part.slice(0, equals));
25822
+ if (!parameterNameRE.test(name)) {
25823
+ return;
25824
+ }
25825
+ const normalizedName = name.toLowerCase();
25826
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
25827
+ return;
25828
+ }
25829
+ const parameterValue = trimOWS(part.slice(equals + 1));
25830
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
25831
+ }
25832
+ for (let i = 0; i < str.length; i++) {
25833
+ const code = str.charCodeAt(i);
25834
+ if (quoted) {
25835
+ if (escaped) {
25836
+ escaped = false;
25837
+ } else if (code === 92) {
25838
+ escaped = true;
25839
+ } else if (code === 34) {
25840
+ quoted = false;
25841
+ }
25842
+ } else if (code === 34) {
25843
+ quoted = true;
25844
+ } else if (code === 44 || code === 59) {
25845
+ parseParameter(i);
25846
+ start = i + 1;
25847
+ }
25848
+ }
25849
+ parseParameter(str.length);
25850
+ return parameters;
25851
+ }
25731
25852
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
25732
25853
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
25733
25854
  if (utils$1.isFunction(filter)) {
@@ -25784,13 +25905,19 @@ var require_axios = __commonJS({
25784
25905
  setHeaders(header, valueOrRewrite);
25785
25906
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
25786
25907
  setHeaders(parseHeaders(header), valueOrRewrite);
25787
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
25788
- let obj = {}, dest, key;
25908
+ } else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
25909
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
25789
25910
  for (const entry of header) {
25790
25911
  if (!utils$1.isArray(entry)) {
25791
25912
  throw new TypeError("Object iterator must return a key-value pair");
25792
25913
  }
25793
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
25914
+ key = entry[0];
25915
+ if (utils$1.hasOwnProp(obj, key)) {
25916
+ dest = obj[key];
25917
+ obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
25918
+ } else {
25919
+ obj[key] = entry[1];
25920
+ }
25794
25921
  }
25795
25922
  setHeaders(obj, valueOrRewrite);
25796
25923
  } else {
@@ -25897,7 +26024,8 @@ var require_axios = __commonJS({
25897
26024
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
25898
26025
  }
25899
26026
  getSetCookie() {
25900
- return this.get("set-cookie") || [];
26027
+ const value = this.get("set-cookie");
26028
+ return utils$1.isArray(value) ? value : value == null || value === false ? [] : [value];
25901
26029
  }
25902
26030
  get [Symbol.toStringTag]() {
25903
26031
  return "AxiosHeaders";
@@ -25905,6 +26033,9 @@ var require_axios = __commonJS({
25905
26033
  static from(thing) {
25906
26034
  return thing instanceof this ? thing : new this(thing);
25907
26035
  }
26036
+ static parseParameters(value) {
26037
+ return parseParameters(value);
26038
+ }
25908
26039
  static concat(first2, ...targets) {
25909
26040
  const computed = new this(first2);
25910
26041
  targets.forEach((target) => computed.set(target));
@@ -25992,10 +26123,37 @@ var require_axios = __commonJS({
25992
26123
  };
25993
26124
  return visit(config);
25994
26125
  }
26126
+ function stringifySafely$1(value) {
26127
+ try {
26128
+ return String(value);
26129
+ } catch (err) {
26130
+ return "";
26131
+ }
26132
+ }
26133
+ function aggregateErrorMessage(error) {
26134
+ const message = error.errors.map((entry) => {
26135
+ try {
26136
+ return entry && entry.message ? stringifySafely$1(entry.message) : stringifySafely$1(entry);
26137
+ } catch (err) {
26138
+ return "";
26139
+ }
26140
+ }).filter(Boolean).join("; ");
26141
+ return message || error.name || "AggregateError";
26142
+ }
25995
26143
  var AxiosError = class _AxiosError extends Error {
25996
26144
  static from(error, code, config, request, response, customProps) {
25997
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
25998
- axiosError.cause = error;
26145
+ let message = error.message;
26146
+ if (!message && utils$1.isArray(error.errors) && error.errors.length) {
26147
+ message = aggregateErrorMessage(error);
26148
+ }
26149
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
26150
+ Object.defineProperty(axiosError, "cause", {
26151
+ __proto__: null,
26152
+ value: error,
26153
+ writable: true,
26154
+ enumerable: false,
26155
+ configurable: true
26156
+ });
25999
26157
  axiosError.name = error.name;
26000
26158
  if (error.status != null && axiosError.status == null) {
26001
26159
  axiosError.status = error.status;
@@ -26072,6 +26230,15 @@ var require_axios = __commonJS({
26072
26230
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
26073
26231
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
26074
26232
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
26233
+ var PlatformBuffer = {
26234
+ isBufferAvailable() {
26235
+ return typeof Buffer !== "undefined";
26236
+ },
26237
+ from(value) {
26238
+ return Buffer.from(value);
26239
+ }
26240
+ };
26241
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
26075
26242
  function isVisitable(thing) {
26076
26243
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
26077
26244
  }
@@ -26108,8 +26275,9 @@ var require_axios = __commonJS({
26108
26275
  const dots = options.dots;
26109
26276
  const indexes = options.indexes;
26110
26277
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
26111
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
26278
+ const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
26112
26279
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
26280
+ const stack = [];
26113
26281
  if (!utils$1.isFunction(visitor)) {
26114
26282
  throw new TypeError("visitor must be a function");
26115
26283
  }
@@ -26125,10 +26293,38 @@ var require_axios = __commonJS({
26125
26293
  throw new AxiosError("Blob is not supported. Use a Buffer instead.");
26126
26294
  }
26127
26295
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
26128
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
26296
+ if (useBlob && typeof _Blob === "function") {
26297
+ return new _Blob([value]);
26298
+ }
26299
+ if (PlatformBuffer && PlatformBuffer.isBufferAvailable()) {
26300
+ return PlatformBuffer.from(value);
26301
+ }
26302
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
26129
26303
  }
26130
26304
  return value;
26131
26305
  }
26306
+ function throwIfMaxDepthExceeded(depth) {
26307
+ if (depth > maxDepth) {
26308
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
26309
+ }
26310
+ }
26311
+ function stringifyWithDepthLimit(value, depth) {
26312
+ if (maxDepth === Infinity) {
26313
+ return JSON.stringify(value);
26314
+ }
26315
+ const ancestors = [];
26316
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
26317
+ if (!utils$1.isObject(currentValue)) {
26318
+ return currentValue;
26319
+ }
26320
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
26321
+ ancestors.pop();
26322
+ }
26323
+ ancestors.push(currentValue);
26324
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
26325
+ return currentValue;
26326
+ });
26327
+ }
26132
26328
  function defaultVisitor(value, key, path2) {
26133
26329
  let arr = value;
26134
26330
  if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
@@ -26138,7 +26334,7 @@ var require_axios = __commonJS({
26138
26334
  if (value && !path2 && typeof value === "object") {
26139
26335
  if (utils$1.endsWith(key, "{}")) {
26140
26336
  key = metaTokens ? key : key.slice(0, -2);
26141
- value = JSON.stringify(value);
26337
+ value = stringifyWithDepthLimit(value, 1);
26142
26338
  } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
26143
26339
  key = removeBrackets(key);
26144
26340
  arr.forEach(function each(el, index) {
@@ -26157,7 +26353,6 @@ var require_axios = __commonJS({
26157
26353
  formData.append(renderKey(path2, key, dots), convertValue(value));
26158
26354
  return false;
26159
26355
  }
26160
- const stack = [];
26161
26356
  const exposedHelpers = Object.assign(predicates, {
26162
26357
  defaultVisitor,
26163
26358
  convertValue,
@@ -26165,9 +26360,7 @@ var require_axios = __commonJS({
26165
26360
  });
26166
26361
  function build(value, path2, depth = 0) {
26167
26362
  if (utils$1.isUndefined(value)) return;
26168
- if (depth > maxDepth) {
26169
- throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
26170
- }
26363
+ throwIfMaxDepthExceeded(depth);
26171
26364
  if (stack.indexOf(value) !== -1) {
26172
26365
  throw new Error("Circular reference detected in " + path2.join("."));
26173
26366
  }
@@ -26208,9 +26401,7 @@ var require_axios = __commonJS({
26208
26401
  this._pairs.push([name, value]);
26209
26402
  };
26210
26403
  prototype.toString = function toString3(encoder) {
26211
- const _encode = encoder ? function(value) {
26212
- return encoder.call(this, value, encode$1);
26213
- } : encode$1;
26404
+ const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
26214
26405
  return this._pairs.map(function each(pair) {
26215
26406
  return _encode(pair[0]) + "=" + _encode(pair[1]);
26216
26407
  }, "").join("&");
@@ -26222,11 +26413,12 @@ var require_axios = __commonJS({
26222
26413
  if (!params) {
26223
26414
  return url2;
26224
26415
  }
26225
- const _encode = options && options.encode || encode;
26416
+ url2 = url2 || "";
26226
26417
  const _options = utils$1.isFunction(options) ? {
26227
26418
  serialize: options
26228
26419
  } : options;
26229
- const serializeFn = _options && _options.serialize;
26420
+ const _encode = utils$1.getSafeProp(_options, "encode") || encode;
26421
+ const serializeFn = utils$1.getSafeProp(_options, "serialize");
26230
26422
  let serializedParams;
26231
26423
  if (serializeFn) {
26232
26424
  serializedParams = serializeFn(params, _options);
@@ -26309,7 +26501,8 @@ var require_axios = __commonJS({
26309
26501
  forcedJSONParsing: true,
26310
26502
  clarifyTimeoutError: false,
26311
26503
  legacyInterceptorReqResOrdering: true,
26312
- advertiseZstdAcceptEncoding: false
26504
+ advertiseZstdAcceptEncoding: false,
26505
+ validateStatusUndefinedResolves: true
26313
26506
  };
26314
26507
  var URLSearchParams = url.URLSearchParams;
26315
26508
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
@@ -26374,10 +26567,21 @@ var require_axios = __commonJS({
26374
26567
  ...options
26375
26568
  });
26376
26569
  }
26570
+ var MAX_DEPTH2 = DEFAULT_FORM_DATA_MAX_DEPTH;
26571
+ function throwIfDepthExceeded(index) {
26572
+ if (index > MAX_DEPTH2) {
26573
+ throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH2, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
26574
+ }
26575
+ }
26377
26576
  function parsePropPath(name) {
26378
- return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => {
26379
- return match2[0] === "[]" ? "" : match2[1] || match2[0];
26380
- });
26577
+ const path2 = [];
26578
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
26579
+ let match2;
26580
+ while ((match2 = pattern.exec(name)) !== null) {
26581
+ throwIfDepthExceeded(path2.length);
26582
+ path2.push(match2[0] === "[]" ? "" : match2[1] || match2[0]);
26583
+ }
26584
+ return path2;
26381
26585
  }
26382
26586
  function arrayToObject(arr) {
26383
26587
  const obj = {};
@@ -26393,6 +26597,7 @@ var require_axios = __commonJS({
26393
26597
  }
26394
26598
  function formDataToJSON(formData) {
26395
26599
  function buildPath(path2, value, target, index) {
26600
+ throwIfDepthExceeded(index);
26396
26601
  let name = path2[index++];
26397
26602
  if (name === "__proto__") return true;
26398
26603
  const isNumericKey = Number.isFinite(+name);
@@ -26577,11 +26782,58 @@ var require_axios = __commonJS({
26577
26782
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
26578
26783
  }
26579
26784
  function combineURLs(baseURL, relativeURL) {
26580
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
26785
+ if (!relativeURL) {
26786
+ return baseURL;
26787
+ }
26788
+ let end = baseURL.length;
26789
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
26790
+ end--;
26791
+ }
26792
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
26581
26793
  }
26582
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
26794
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
26795
+ var httpProtocolControlCharacters = /[\t\n\r]/g;
26796
+ function stripLeadingC0ControlOrSpace(url2) {
26797
+ let i = 0;
26798
+ while (i < url2.length && url2.charCodeAt(i) <= 32) {
26799
+ i++;
26800
+ }
26801
+ return url2.slice(i);
26802
+ }
26803
+ function normalizeURLForProtocolCheck(url2) {
26804
+ return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
26805
+ }
26806
+ function redactFragment(fragment) {
26807
+ if (!fragment) {
26808
+ return fragment;
26809
+ }
26810
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match2, separator, parameterName = "") => {
26811
+ return `${separator}${parameterName}${REDACTED}`;
26812
+ });
26813
+ }
26814
+ function redactSensitiveURLParts(url2) {
26815
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
26816
+ const fragmentIndex = redactedURL.indexOf("#");
26817
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
26818
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(/([?&][^=&#]*=)[^&#]*/g, `$1${REDACTED}`);
26819
+ if (fragmentIndex === -1) {
26820
+ return redactedURLWithoutFragment;
26821
+ }
26822
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
26823
+ }
26824
+ function assertValidHttpProtocolURL(url2, config) {
26825
+ if (typeof url2 === "string") {
26826
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
26827
+ if (malformedHttpProtocol.test(normalizedURL)) {
26828
+ throw new AxiosError(`Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`, AxiosError.ERR_INVALID_URL, config);
26829
+ }
26830
+ }
26831
+ }
26832
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
26833
+ assertValidHttpProtocolURL(requestedURL, config);
26583
26834
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
26584
26835
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
26836
+ assertValidHttpProtocolURL(baseURL, config);
26585
26837
  return combineURLs(baseURL, requestedURL);
26586
26838
  }
26587
26839
  return requestedURL;
@@ -26651,7 +26903,7 @@ var require_axios = __commonJS({
26651
26903
  function getEnv(key) {
26652
26904
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
26653
26905
  }
26654
- var VERSION2 = "1.17.0";
26906
+ var VERSION2 = "1.19.0";
26655
26907
  function parseProtocol(url2) {
26656
26908
  const match2 = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
26657
26909
  return match2 && match2[1] || "";
@@ -26673,13 +26925,13 @@ var require_axios = __commonJS({
26673
26925
  const params = match2[2];
26674
26926
  const encoding = match2[3] ? "base64" : "utf8";
26675
26927
  const body = match2[4];
26676
- let mime;
26928
+ let mime = "";
26677
26929
  if (type) {
26678
26930
  mime = params ? type + params : type;
26679
26931
  } else if (params) {
26680
26932
  mime = "text/plain" + params;
26681
26933
  }
26682
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
26934
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
26683
26935
  if (asBlob) {
26684
26936
  if (!_Blob) {
26685
26937
  throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
@@ -26692,6 +26944,18 @@ var require_axios = __commonJS({
26692
26944
  }
26693
26945
  throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
26694
26946
  }
26947
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
26948
+ function setFormDataHeaders(headers, formHeaders, policy) {
26949
+ if (policy !== "content-only") {
26950
+ headers.set(formHeaders);
26951
+ return;
26952
+ }
26953
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
26954
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
26955
+ headers.set(key, val);
26956
+ }
26957
+ });
26958
+ }
26695
26959
  var kInternals = /* @__PURE__ */ Symbol("internals");
26696
26960
  var AxiosTransformStream = class extends stream.Transform {
26697
26961
  constructor(options) {
@@ -27003,13 +27267,83 @@ var require_axios = __commonJS({
27003
27267
  }, cb);
27004
27268
  } : fn;
27005
27269
  };
27006
- var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
27270
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
27007
27271
  var isIPv4Loopback = (host) => {
27008
27272
  const parts = host.split(".");
27009
27273
  if (parts.length !== 4) return false;
27010
27274
  if (parts[0] !== "127") return false;
27011
27275
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
27012
27276
  };
27277
+ var parseIPv4Octet = (text) => {
27278
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
27279
+ const n = parseInt(text.slice(2), 16);
27280
+ return Number.isFinite(n) ? n : null;
27281
+ }
27282
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
27283
+ const n = parseInt(text, 8);
27284
+ return Number.isFinite(n) ? n : null;
27285
+ }
27286
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
27287
+ return null;
27288
+ }
27289
+ if (/^[0-9]+$/.test(text)) {
27290
+ const n = parseInt(text, 10);
27291
+ return Number.isFinite(n) ? n : null;
27292
+ }
27293
+ return null;
27294
+ };
27295
+ var normalizeIPAddress = (host) => {
27296
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
27297
+ return host;
27298
+ }
27299
+ let h = host;
27300
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
27301
+ h = h.slice(1, -1);
27302
+ }
27303
+ h = h.replace(/\.+$/, "");
27304
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
27305
+ const parts = h.split(".");
27306
+ if (parts.some((p) => p === "")) return host;
27307
+ if (parts.length === 4) {
27308
+ const octets = parts.map(parseIPv4Octet);
27309
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
27310
+ return octets.join(".");
27311
+ }
27312
+ if (parts.length > 4) {
27313
+ return host;
27314
+ }
27315
+ if (parts.length === 1) return host;
27316
+ const literalOctets = parts.slice(0, -1);
27317
+ const tail = parts[parts.length - 1];
27318
+ const tailSlots = 4 - literalOctets.length;
27319
+ const tailValue = parseIPv4Octet(tail);
27320
+ if (tailValue === null) return host;
27321
+ const maxTail = (1 << 8 * tailSlots) - 1;
27322
+ if (tailValue < 0 || tailValue > maxTail) return host;
27323
+ const tailOctets = new Array(tailSlots).fill(0);
27324
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
27325
+ tailOctets[i] = v & 255;
27326
+ }
27327
+ const literal2 = literalOctets.map(parseIPv4Octet);
27328
+ if (literal2.some((n) => n === null || n < 0 || n > 255)) return host;
27329
+ return [...literal2, ...tailOctets].join(".");
27330
+ };
27331
+ var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
27332
+ var isIPv6Unspecified = (host) => {
27333
+ if (host === "::") return true;
27334
+ const compressionIndex = host.indexOf("::");
27335
+ if (compressionIndex !== -1) {
27336
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
27337
+ const left = host.slice(0, compressionIndex);
27338
+ const right = host.slice(compressionIndex + 2);
27339
+ const leftGroups = left ? left.split(":") : [];
27340
+ const rightGroups = right ? right.split(":") : [];
27341
+ const explicitGroups = leftGroups.length + rightGroups.length;
27342
+ return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
27343
+ }
27344
+ const groups = host.split(":");
27345
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
27346
+ };
27013
27347
  var isIPv6Loopback = (host) => {
27014
27348
  if (host === "::1") return true;
27015
27349
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -27032,6 +27366,7 @@ var require_axios = __commonJS({
27032
27366
  if (!host) return false;
27033
27367
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
27034
27368
  if (isIPv4Loopback(host)) return true;
27369
+ if (isIPv6Unspecified(host)) return true;
27035
27370
  return isIPv6Loopback(host);
27036
27371
  };
27037
27372
  var DEFAULT_PORTS = {
@@ -27084,7 +27419,12 @@ var require_axios = __commonJS({
27084
27419
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
27085
27420
  hostname = hostname.slice(1, -1);
27086
27421
  }
27087
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
27422
+ const trimmed = hostname.replace(/\.+$/, "");
27423
+ const ipv4 = normalizeIPAddress(trimmed);
27424
+ if (ipv4 !== trimmed) {
27425
+ return ipv4;
27426
+ }
27427
+ return unmapIPv4MappedIPv6(trimmed);
27088
27428
  };
27089
27429
  function shouldBypassProxy(location) {
27090
27430
  let parsed;
@@ -27106,6 +27446,9 @@ var require_axios = __commonJS({
27106
27446
  if (!entry) {
27107
27447
  return false;
27108
27448
  }
27449
+ if (entry === "*") {
27450
+ return true;
27451
+ }
27109
27452
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
27110
27453
  entryHost = normalizeNoProxyHost(entryHost);
27111
27454
  if (!entryHost) {
@@ -27197,7 +27540,7 @@ var require_axios = __commonJS({
27197
27540
  }
27198
27541
  const rawLoaded = e.loaded;
27199
27542
  const total = e.lengthComputable ? e.total : void 0;
27200
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
27543
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
27201
27544
  const progressBytes = Math.max(0, loaded - bytesNotified);
27202
27545
  const rate = _speedometer(progressBytes);
27203
27546
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -27223,8 +27566,64 @@ var require_axios = __commonJS({
27223
27566
  loaded
27224
27567
  }), throttled[1]];
27225
27568
  };
27226
- var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
27227
- function estimateDataURLDecodedBytes(url2) {
27569
+ var asyncDecorator = (fn, scheduler = utils$1.asap) => (...args) => scheduler(() => fn(...args));
27570
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
27571
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
27572
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
27573
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
27574
+ charCode >= 97 && charCode <= 122 || // a-z
27575
+ charCode >= 48 && charCode <= 57 || // 0-9
27576
+ charCode === 43 || // +
27577
+ charCode === 47 || // /
27578
+ charCode === 45 || // - (base64url)
27579
+ charCode === 95;
27580
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
27581
+ var base64Bytes = (significant) => {
27582
+ const groups = Math.floor(significant / 4);
27583
+ const remainder = significant % 4;
27584
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
27585
+ };
27586
+ var estimateBase64BufferAllocation = (body) => {
27587
+ const len = body.length;
27588
+ let padding = 0;
27589
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
27590
+ padding++;
27591
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
27592
+ padding++;
27593
+ }
27594
+ }
27595
+ return Math.floor((len - padding) * 3 / 4);
27596
+ };
27597
+ var estimatePercentDecodedBase64Bytes = (body) => {
27598
+ const len = body.length;
27599
+ let significant = 0;
27600
+ let padding = 0;
27601
+ let invalid = false;
27602
+ for (let i = 0; i < len; i++) {
27603
+ let code = body.charCodeAt(i);
27604
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
27605
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
27606
+ i += 2;
27607
+ }
27608
+ if (isBase64Whitespace(code)) {
27609
+ continue;
27610
+ }
27611
+ if (code === 61) {
27612
+ padding++;
27613
+ continue;
27614
+ }
27615
+ if (!isBase64Char(code) || padding > 0) {
27616
+ invalid = true;
27617
+ continue;
27618
+ }
27619
+ significant++;
27620
+ }
27621
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
27622
+ return estimateBase64BufferAllocation(body);
27623
+ }
27624
+ return base64Bytes(significant);
27625
+ };
27626
+ var estimateDataURLBytes = (url2, estimateBase64) => {
27228
27627
  if (!url2 || typeof url2 !== "string") return 0;
27229
27628
  if (!url2.startsWith("data:")) return 0;
27230
27629
  const comma = url2.indexOf(",");
@@ -27233,51 +27632,15 @@ var require_axios = __commonJS({
27233
27632
  const body = url2.slice(comma + 1);
27234
27633
  const isBase64 = /;base64/i.test(meta);
27235
27634
  if (isBase64) {
27236
- let effectiveLen = body.length;
27237
- const len = body.length;
27238
- for (let i = 0; i < len; i++) {
27239
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
27240
- const a = body.charCodeAt(i + 1);
27241
- const b = body.charCodeAt(i + 2);
27242
- const isHex = (a >= 48 && a <= 57 || a >= 65 && a <= 70 || a >= 97 && a <= 102) && (b >= 48 && b <= 57 || b >= 65 && b <= 70 || b >= 97 && b <= 102);
27243
- if (isHex) {
27244
- effectiveLen -= 2;
27245
- i += 2;
27246
- }
27247
- }
27248
- }
27249
- let pad3 = 0;
27250
- let idx = len - 1;
27251
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
27252
- body.charCodeAt(j - 1) === 51 && // '3'
27253
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
27254
- if (idx >= 0) {
27255
- if (body.charCodeAt(idx) === 61) {
27256
- pad3++;
27257
- idx--;
27258
- } else if (tailIsPct3D(idx)) {
27259
- pad3++;
27260
- idx -= 3;
27261
- }
27262
- }
27263
- if (pad3 === 1 && idx >= 0) {
27264
- if (body.charCodeAt(idx) === 61) {
27265
- pad3++;
27266
- } else if (tailIsPct3D(idx)) {
27267
- pad3++;
27268
- }
27269
- }
27270
- const groups = Math.floor(effectiveLen / 4);
27271
- const bytes2 = groups * 3 - (pad3 || 0);
27272
- return bytes2 > 0 ? bytes2 : 0;
27273
- }
27274
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
27275
- return Buffer.byteLength(body, "utf8");
27635
+ return estimateBase64(body);
27276
27636
  }
27277
27637
  let bytes = 0;
27278
27638
  for (let i = 0, len = body.length; i < len; i++) {
27279
27639
  const c = body.charCodeAt(i);
27280
- if (c < 128) {
27640
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
27641
+ bytes += 1;
27642
+ i += 2;
27643
+ } else if (c < 128) {
27281
27644
  bytes += 1;
27282
27645
  } else if (c < 2048) {
27283
27646
  bytes += 2;
@@ -27294,6 +27657,13 @@ var require_axios = __commonJS({
27294
27657
  }
27295
27658
  }
27296
27659
  return bytes;
27660
+ };
27661
+ function estimateDataURLDecodedBytes(url2) {
27662
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
27663
+ return estimateDataURLBytes(fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex), estimatePercentDecodedBase64Bytes);
27664
+ }
27665
+ function estimateDataURLBufferAllocation(url2) {
27666
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
27297
27667
  }
27298
27668
  var zlibOptions = {
27299
27669
  flush: zlib.constants.Z_SYNC_FLUSH,
@@ -27311,28 +27681,44 @@ var require_axios = __commonJS({
27311
27681
  var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
27312
27682
  var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
27313
27683
  var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
27684
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils$1.asap;
27314
27685
  var {
27315
27686
  http: httpFollow,
27316
27687
  https: httpsFollow
27317
27688
  } = followRedirects;
27318
27689
  var isHttps = /https:?/;
27319
- var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
27320
- function setFormDataHeaders$1(headers, formHeaders, policy) {
27321
- if (policy !== "content-only") {
27322
- headers.set(formHeaders);
27323
- return;
27324
- }
27325
- Object.entries(formHeaders).forEach(([key, val]) => {
27326
- if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
27327
- headers.set(key, val);
27328
- }
27329
- });
27330
- }
27331
27690
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
27332
27691
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
27333
27692
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
27334
27693
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
27335
27694
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
27695
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
27696
+ 22: 21,
27697
+ 24: 5
27698
+ };
27699
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
27700
+ if (!nodeVersion) {
27701
+ return false;
27702
+ }
27703
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
27704
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) {
27705
+ return false;
27706
+ }
27707
+ if (major > 24) {
27708
+ return true;
27709
+ }
27710
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
27711
+ }
27712
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
27713
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
27714
+ return false;
27715
+ }
27716
+ const agentOptions = agent && agent.options;
27717
+ return Boolean(agentOptions && utils$1.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
27718
+ }
27719
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
27720
+ return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
27721
+ }
27336
27722
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
27337
27723
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
27338
27724
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -27384,13 +27770,37 @@ var require_axios = __commonJS({
27384
27770
  if (options.beforeRedirects.auth) {
27385
27771
  options.beforeRedirects.auth(options);
27386
27772
  }
27773
+ if (options.beforeRedirects.sensitiveHeaders) {
27774
+ options.beforeRedirects.sensitiveHeaders(options, requestDetails);
27775
+ }
27387
27776
  if (options.beforeRedirects.config) {
27388
27777
  options.beforeRedirects.config(options, responseDetails, requestDetails);
27389
27778
  }
27390
27779
  }
27391
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
27780
+ function stripMatchingHeaders(headers, sensitiveSet) {
27781
+ if (!headers) {
27782
+ return;
27783
+ }
27784
+ Object.keys(headers).forEach((header) => {
27785
+ if (sensitiveSet.has(header.toLowerCase())) {
27786
+ delete headers[header];
27787
+ }
27788
+ });
27789
+ }
27790
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
27791
+ if (!requestDetails) {
27792
+ return false;
27793
+ }
27794
+ try {
27795
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
27796
+ } catch (e) {
27797
+ return false;
27798
+ }
27799
+ }
27800
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
27392
27801
  let proxy = configProxy;
27393
- if (!proxy && proxy !== false) {
27802
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
27803
+ if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
27394
27804
  const proxyUrl = getProxyForUrl(location);
27395
27805
  if (proxyUrl) {
27396
27806
  if (!shouldBypassProxy(location)) {
@@ -27481,7 +27891,7 @@ var require_axios = __commonJS({
27481
27891
  }
27482
27892
  }
27483
27893
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
27484
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
27894
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
27485
27895
  };
27486
27896
  }
27487
27897
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
@@ -27558,7 +27968,7 @@ var require_axios = __commonJS({
27558
27968
  };
27559
27969
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
27560
27970
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
27561
- const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
27971
+ const own2 = (key) => utils$1.getSafeProp(config, key);
27562
27972
  const transitional = own2("transitional") || transitionalDefaults;
27563
27973
  let data = own2("data");
27564
27974
  let lookup = own2("lookup");
@@ -27566,9 +27976,17 @@ var require_axios = __commonJS({
27566
27976
  let httpVersion = own2("httpVersion");
27567
27977
  if (httpVersion === void 0) httpVersion = 1;
27568
27978
  let http2Options = own2("http2Options");
27979
+ const httpAgent = own2("httpAgent");
27980
+ const httpsAgent = own2("httpsAgent");
27981
+ const configProxy = own2("proxy");
27569
27982
  const responseType = own2("responseType");
27570
27983
  const responseEncoding = own2("responseEncoding");
27571
- const method = config.method.toUpperCase();
27984
+ const socketPath = own2("socketPath");
27985
+ const method = own2("method").toUpperCase();
27986
+ const maxRedirects = own2("maxRedirects");
27987
+ const maxBodyLength = own2("maxBodyLength");
27988
+ const maxContentLength = own2("maxContentLength");
27989
+ const decompress = own2("decompress");
27572
27990
  let isDone;
27573
27991
  let rejected = false;
27574
27992
  let req;
@@ -27607,9 +28025,11 @@ var require_axios = __commonJS({
27607
28025
  }
27608
28026
  }
27609
28027
  function createTimeoutError() {
27610
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
27611
- if (config.timeoutErrorMessage) {
27612
- timeoutErrorMessage = config.timeoutErrorMessage;
28028
+ const configTimeout = own2("timeout");
28029
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
28030
+ const configTimeoutErrorMessage = own2("timeoutErrorMessage");
28031
+ if (configTimeoutErrorMessage) {
28032
+ timeoutErrorMessage = configTimeoutErrorMessage;
27613
28033
  }
27614
28034
  return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
27615
28035
  }
@@ -27650,15 +28070,16 @@ var require_axios = __commonJS({
27650
28070
  onFinished();
27651
28071
  }
27652
28072
  });
27653
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
27654
- const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : void 0);
28073
+ const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
28074
+ const urlBase = socketPath ? "http://localhost" : platform.hasBrowserEnv ? platform.origin : void 0;
28075
+ const parsed = new URL(fullPath, urlBase);
27655
28076
  const protocol = parsed.protocol || supportedProtocols[0];
27656
28077
  if (protocol === "data:") {
27657
- if (config.maxContentLength > -1) {
27658
- const dataUrl = String(config.url || fullPath || "");
27659
- const estimated = estimateDataURLDecodedBytes(dataUrl);
27660
- if (estimated > config.maxContentLength) {
27661
- return reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
28078
+ if (maxContentLength > -1) {
28079
+ const dataUrl = String(own2("url") || fullPath || "");
28080
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
28081
+ if (estimated > maxContentLength) {
28082
+ return reject(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
27662
28083
  }
27663
28084
  }
27664
28085
  let convertedData;
@@ -27671,7 +28092,7 @@ var require_axios = __commonJS({
27671
28092
  });
27672
28093
  }
27673
28094
  try {
27674
- convertedData = fromDataURI(config.url, responseType === "blob", {
28095
+ convertedData = fromDataURI(own2("url"), responseType === "blob", {
27675
28096
  Blob: config.env && config.env.Blob
27676
28097
  });
27677
28098
  } catch (err) {
@@ -27714,7 +28135,7 @@ var require_axios = __commonJS({
27714
28135
  boundary: userBoundary && userBoundary[1] || void 0
27715
28136
  });
27716
28137
  } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
27717
- setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
28138
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
27718
28139
  if (!headers.hasContentLength()) {
27719
28140
  try {
27720
28141
  const knownLength = await util.promisify(data.getLength).call(data);
@@ -27736,7 +28157,7 @@ var require_axios = __commonJS({
27736
28157
  return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
27737
28158
  }
27738
28159
  headers.setContentLength(data.length, false);
27739
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
28160
+ if (maxBodyLength > -1 && data.length > maxBodyLength) {
27740
28161
  return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
27741
28162
  }
27742
28163
  }
@@ -27756,13 +28177,13 @@ var require_axios = __commonJS({
27756
28177
  data = stream.pipeline([data, new AxiosTransformStream({
27757
28178
  maxRate: utils$1.toFiniteNumber(maxUploadRate)
27758
28179
  })], utils$1.noop);
27759
- onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
28180
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3))));
27760
28181
  }
27761
28182
  let auth = void 0;
27762
28183
  const configAuth = own2("auth");
27763
28184
  if (configAuth) {
27764
- const username = configAuth.username || "";
27765
- const password = configAuth.password || "";
28185
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
28186
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
27766
28187
  auth = username + ":" + password;
27767
28188
  }
27768
28189
  if (!auth && (parsed.username || parsed.password)) {
@@ -27773,13 +28194,12 @@ var require_axios = __commonJS({
27773
28194
  auth && headers.delete("authorization");
27774
28195
  let path$1;
27775
28196
  try {
27776
- path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
28197
+ path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
27777
28198
  } catch (err) {
27778
- const customErr = new Error(err.message);
27779
- customErr.config = config;
27780
- customErr.url = config.url;
27781
- customErr.exists = true;
27782
- return reject(customErr);
28199
+ return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, {
28200
+ url: own2("url"),
28201
+ exists: true
28202
+ }));
27783
28203
  }
27784
28204
  headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
27785
28205
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
@@ -27787,8 +28207,8 @@ var require_axios = __commonJS({
27787
28207
  method,
27788
28208
  headers: toByteStringHeaderObject(headers),
27789
28209
  agents: {
27790
- http: config.httpAgent,
27791
- https: config.httpsAgent
28210
+ http: httpAgent,
28211
+ https: httpsAgent
27792
28212
  },
27793
28213
  auth,
27794
28214
  protocol,
@@ -27798,7 +28218,6 @@ var require_axios = __commonJS({
27798
28218
  http2Options
27799
28219
  });
27800
28220
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
27801
- const socketPath = own2("socketPath");
27802
28221
  if (socketPath) {
27803
28222
  if (typeof socketPath !== "string") {
27804
28223
  return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
@@ -27816,13 +28235,14 @@ var require_axios = __commonJS({
27816
28235
  } else {
27817
28236
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
27818
28237
  options.port = parsed.port;
27819
- setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, config.httpsAgent);
28238
+ setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
27820
28239
  }
27821
28240
  let transport;
27822
28241
  let isNativeTransport = false;
28242
+ let transportEnforcesMaxBodyLength = false;
27823
28243
  const isHttpsRequest = isHttps.test(options.protocol);
27824
28244
  if (options.agent == null) {
27825
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
28245
+ options.agent = isHttpsRequest ? httpsAgent : httpAgent;
27826
28246
  }
27827
28247
  if (isHttp2) {
27828
28248
  transport = http2Transport;
@@ -27830,12 +28250,14 @@ var require_axios = __commonJS({
27830
28250
  const configTransport = own2("transport");
27831
28251
  if (configTransport) {
27832
28252
  transport = configTransport;
27833
- } else if (config.maxRedirects === 0) {
28253
+ } else if (maxRedirects === 0) {
27834
28254
  transport = isHttpsRequest ? https : http;
27835
28255
  isNativeTransport = true;
27836
28256
  } else {
27837
- if (config.maxRedirects) {
27838
- options.maxRedirects = config.maxRedirects;
28257
+ transportEnforcesMaxBodyLength = true;
28258
+ options.sensitiveHeaders = [];
28259
+ if (maxRedirects) {
28260
+ options.maxRedirects = maxRedirects;
27839
28261
  }
27840
28262
  const configBeforeRedirect = own2("beforeRedirect");
27841
28263
  if (configBeforeRedirect) {
@@ -27853,11 +28275,32 @@ var require_axios = __commonJS({
27853
28275
  }
27854
28276
  };
27855
28277
  }
28278
+ const sensitiveHeaders = own2("sensitiveHeaders");
28279
+ if (sensitiveHeaders != null) {
28280
+ if (!utils$1.isArray(sensitiveHeaders)) {
28281
+ return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
28282
+ }
28283
+ const sensitiveSet = /* @__PURE__ */ new Set();
28284
+ for (const header of sensitiveHeaders) {
28285
+ if (!utils$1.isString(header)) {
28286
+ return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
28287
+ }
28288
+ sensitiveSet.add(header.toLowerCase());
28289
+ }
28290
+ if (sensitiveSet.size) {
28291
+ options.sensitiveHeaders = Array.from(sensitiveSet);
28292
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
28293
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
28294
+ stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
28295
+ }
28296
+ };
28297
+ }
28298
+ }
27856
28299
  transport = isHttpsRequest ? httpsFollow : httpFollow;
27857
28300
  }
27858
28301
  }
27859
- if (config.maxBodyLength > -1) {
27860
- options.maxBodyLength = config.maxBodyLength;
28302
+ if (maxBodyLength > -1) {
28303
+ options.maxBodyLength = maxBodyLength;
27861
28304
  } else {
27862
28305
  options.maxBodyLength = Infinity;
27863
28306
  }
@@ -27871,12 +28314,12 @@ var require_axios = __commonJS({
27871
28314
  const transformStream = new AxiosTransformStream({
27872
28315
  maxRate: utils$1.toFiniteNumber(maxDownloadRate)
27873
28316
  });
27874
- onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
28317
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress, scheduleProgress), true, 3))));
27875
28318
  streams.push(transformStream);
27876
28319
  }
27877
28320
  let responseStream = res;
27878
28321
  const lastRequest = res.req || req;
27879
- if (config.decompress !== false && res.headers["content-encoding"]) {
28322
+ if (decompress !== false && res.headers["content-encoding"]) {
27880
28323
  if (method === "HEAD" || res.statusCode === 204) {
27881
28324
  delete res.headers["content-encoding"];
27882
28325
  }
@@ -27917,8 +28360,8 @@ var require_axios = __commonJS({
27917
28360
  request: lastRequest
27918
28361
  };
27919
28362
  if (responseType === "stream") {
27920
- if (config.maxContentLength > -1) {
27921
- const limit = config.maxContentLength;
28363
+ if (maxContentLength > -1) {
28364
+ const limit = maxContentLength;
27922
28365
  const source = responseStream;
27923
28366
  async function* enforceMaxContentLength() {
27924
28367
  let totalResponseBytes = 0;
@@ -27942,10 +28385,10 @@ var require_axios = __commonJS({
27942
28385
  responseStream.on("data", function handleStreamData(chunk) {
27943
28386
  responseBuffer.push(chunk);
27944
28387
  totalResponseBytes += chunk.length;
27945
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
28388
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
27946
28389
  rejected = true;
27947
28390
  responseStream.destroy();
27948
- abort(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
28391
+ abort(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
27949
28392
  }
27950
28393
  });
27951
28394
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -27995,7 +28438,9 @@ var require_axios = __commonJS({
27995
28438
  });
27996
28439
  const boundSockets = /* @__PURE__ */ new Set();
27997
28440
  req.on("socket", function handleRequestSocket(socket) {
27998
- socket.setKeepAlive(true, 1e3 * 60);
28441
+ if (typeof socket.setKeepAlive === "function") {
28442
+ socket.setKeepAlive(true, 1e3 * 60);
28443
+ }
27999
28444
  if (!socket[kAxiosSocketListener]) {
28000
28445
  socket.on("error", function handleSocketError(err) {
28001
28446
  const current = socket[kAxiosCurrentReq];
@@ -28017,8 +28462,8 @@ var require_axios = __commonJS({
28017
28462
  }
28018
28463
  boundSockets.clear();
28019
28464
  });
28020
- if (config.timeout) {
28021
- const timeout = parseInt(config.timeout, 10);
28465
+ if (own2("timeout")) {
28466
+ const timeout = parseInt(own2("timeout"), 10);
28022
28467
  if (Number.isNaN(timeout)) {
28023
28468
  abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
28024
28469
  return;
@@ -28050,8 +28495,8 @@ var require_axios = __commonJS({
28050
28495
  }
28051
28496
  });
28052
28497
  let uploadStream = data;
28053
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
28054
- const limit = config.maxBodyLength;
28498
+ if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
28499
+ const limit = maxBodyLength;
28055
28500
  let bytesSent = 0;
28056
28501
  uploadStream = stream.pipeline([data, new stream.Transform({
28057
28502
  transform(chunk, _enc, cb) {
@@ -28107,7 +28552,11 @@ var require_axios = __commonJS({
28107
28552
  const cookie = cookies2[i].replace(/^\s+/, "");
28108
28553
  const eq = cookie.indexOf("=");
28109
28554
  if (eq !== -1 && cookie.slice(0, eq) === name) {
28110
- return decodeURIComponent(cookie.slice(eq + 1));
28555
+ try {
28556
+ return decodeURIComponent(cookie.slice(eq + 1));
28557
+ } catch (e) {
28558
+ return cookie.slice(eq + 1);
28559
+ }
28111
28560
  }
28112
28561
  }
28113
28562
  return null;
@@ -28131,7 +28580,14 @@ var require_axios = __commonJS({
28131
28580
  var headersToObject = (thing) => thing instanceof AxiosHeaders ? {
28132
28581
  ...thing
28133
28582
  } : thing;
28583
+ var ownEnumerableKeys = (thing) => {
28584
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
28585
+ return Object.keys(thing).concat(Object.getOwnPropertySymbols(thing).filter((symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable));
28586
+ }
28587
+ return Object.keys(thing);
28588
+ };
28134
28589
  function mergeConfig(config1, config2) {
28590
+ config1 = config1 || {};
28135
28591
  config2 = config2 || {};
28136
28592
  const config = /* @__PURE__ */ Object.create(null);
28137
28593
  Object.defineProperty(config, "hasOwnProperty", {
@@ -28174,6 +28630,23 @@ var require_axios = __commonJS({
28174
28630
  return getMergedValue(void 0, a);
28175
28631
  }
28176
28632
  }
28633
+ function getMergedTransitionalOption(prop) {
28634
+ const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
28635
+ if (!utils$1.isUndefined(transitional2)) {
28636
+ if (utils$1.isPlainObject(transitional2)) {
28637
+ if (utils$1.hasOwnProp(transitional2, prop)) {
28638
+ return transitional2[prop];
28639
+ }
28640
+ } else {
28641
+ return void 0;
28642
+ }
28643
+ }
28644
+ const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
28645
+ if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
28646
+ return transitional1[prop];
28647
+ }
28648
+ return void 0;
28649
+ }
28177
28650
  function mergeDirectKeys(a, b, prop) {
28178
28651
  if (utils$1.hasOwnProp(config2, prop)) {
28179
28652
  return getMergedValue(a, b);
@@ -28213,7 +28686,7 @@ var require_axios = __commonJS({
28213
28686
  validateStatus: mergeDirectKeys,
28214
28687
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
28215
28688
  };
28216
- utils$1.forEach(Object.keys({
28689
+ utils$1.forEach(ownEnumerableKeys({
28217
28690
  ...config1,
28218
28691
  ...config2
28219
28692
  }), function computeConfigValue(prop) {
@@ -28224,19 +28697,14 @@ var require_axios = __commonJS({
28224
28697
  const configValue = merge2(a, b, prop);
28225
28698
  utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
28226
28699
  });
28227
- return config;
28228
- }
28229
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
28230
- function setFormDataHeaders(headers, formHeaders, policy) {
28231
- if (policy !== "content-only") {
28232
- headers.set(formHeaders);
28233
- return;
28234
- }
28235
- Object.entries(formHeaders).forEach(([key, val]) => {
28236
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
28237
- headers.set(key, val);
28700
+ if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
28701
+ if (utils$1.hasOwnProp(config1, "validateStatus")) {
28702
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
28703
+ } else {
28704
+ delete config.validateStatus;
28238
28705
  }
28239
- });
28706
+ }
28707
+ return config;
28240
28708
  }
28241
28709
  var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
28242
28710
  function resolveConfig(config) {
@@ -28252,9 +28720,15 @@ var require_axios = __commonJS({
28252
28720
  const allowAbsoluteUrls = own2("allowAbsoluteUrls");
28253
28721
  const url2 = own2("url");
28254
28722
  newConfig.headers = headers = AxiosHeaders.from(headers);
28255
- newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), own2("params"), own2("paramsSerializer"));
28723
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), own2("params"), own2("paramsSerializer"));
28256
28724
  if (auth) {
28257
- headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8$1(auth.password) : "")));
28725
+ const username = utils$1.getSafeProp(auth, "username") || "";
28726
+ const password = utils$1.getSafeProp(auth, "password") || "";
28727
+ try {
28728
+ headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
28729
+ } catch (e) {
28730
+ throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
28731
+ }
28258
28732
  }
28259
28733
  if (utils$1.isFormData(data)) {
28260
28734
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
@@ -28401,6 +28875,7 @@ var require_axios = __commonJS({
28401
28875
  const protocol = parseProtocol(_config.url);
28402
28876
  if (protocol && !platform.protocols.includes(protocol)) {
28403
28877
  reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
28878
+ done();
28404
28879
  return;
28405
28880
  }
28406
28881
  request.send(requestData || null);
@@ -28436,7 +28911,18 @@ var require_axios = __commonJS({
28436
28911
  });
28437
28912
  signals = null;
28438
28913
  };
28439
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
28914
+ signals.forEach((signal2) => {
28915
+ if (aborted) {
28916
+ return;
28917
+ }
28918
+ if (signal2.aborted) {
28919
+ onabort.call(signal2);
28920
+ return;
28921
+ }
28922
+ signal2.addEventListener("abort", onabort, {
28923
+ once: true
28924
+ });
28925
+ });
28440
28926
  const {
28441
28927
  signal
28442
28928
  } = controller;
@@ -28666,12 +29152,14 @@ var require_axios = __commonJS({
28666
29152
  composedSignal.unsubscribe();
28667
29153
  });
28668
29154
  let requestContentLength;
29155
+ let pendingBodyError = null;
29156
+ const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
28669
29157
  try {
28670
29158
  let auth = void 0;
28671
29159
  const configAuth = own2("auth");
28672
29160
  if (configAuth) {
28673
- const username = configAuth.username || "";
28674
- const password = configAuth.password || "";
29161
+ const username = utils$1.getSafeProp(configAuth, "username") || "";
29162
+ const password = utils$1.getSafeProp(configAuth, "password") || "";
28675
29163
  auth = {
28676
29164
  username,
28677
29165
  password
@@ -28704,25 +29192,42 @@ var require_axios = __commonJS({
28704
29192
  }
28705
29193
  }
28706
29194
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
28707
- const outboundLength = await resolveBodyLength(headers, data);
28708
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
28709
- throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
29195
+ const outboundLength = await getBodyLength(data);
29196
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
29197
+ requestContentLength = outboundLength;
29198
+ if (outboundLength > maxBodyLength) {
29199
+ throw maxBodyLengthError();
29200
+ }
28710
29201
  }
28711
29202
  }
28712
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
28713
- let _request = new Request(url2, {
28714
- method: "POST",
28715
- body: data,
28716
- duplex: "half"
28717
- });
28718
- let contentTypeHeader;
28719
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
28720
- headers.setContentType(contentTypeHeader);
29203
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
29204
+ const trackRequestStream = (stream2, onProgress, flush) => trackStream(stream2, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
29205
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
29206
+ throw pendingBodyError = maxBodyLengthError();
28721
29207
  }
28722
- if (_request.body) {
28723
- const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
28724
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
29208
+ onProgress && onProgress(loadedBytes);
29209
+ }, flush);
29210
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
29211
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
29212
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
29213
+ let _request = new Request(url2, {
29214
+ method: "POST",
29215
+ body: data,
29216
+ duplex: "half"
29217
+ });
29218
+ let contentTypeHeader;
29219
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
29220
+ headers.setContentType(contentTypeHeader);
29221
+ }
29222
+ if (_request.body) {
29223
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
29224
+ data = trackRequestStream(_request.body, onProgress, flush);
29225
+ }
28725
29226
  }
29227
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
29228
+ data = trackRequestStream(data);
29229
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
29230
+ throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
28726
29231
  }
28727
29232
  if (!utils$1.isString(withCredentials)) {
28728
29233
  withCredentials = withCredentials ? "include" : "omit";
@@ -28746,8 +29251,9 @@ var require_axios = __commonJS({
28746
29251
  };
28747
29252
  request = isRequestSupported && new Request(url2, resolvedOptions);
28748
29253
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
29254
+ const responseHeaders = AxiosHeaders.from(response.headers);
28749
29255
  if (hasMaxContentLength) {
28750
- const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
29256
+ const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
28751
29257
  if (declaredLength != null && declaredLength > maxContentLength) {
28752
29258
  throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
28753
29259
  }
@@ -28758,7 +29264,7 @@ var require_axios = __commonJS({
28758
29264
  ["status", "statusText", "headers"].forEach((prop) => {
28759
29265
  options[prop] = response[prop];
28760
29266
  });
28761
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
29267
+ const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
28762
29268
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
28763
29269
  let bytesRead = 0;
28764
29270
  const onChunkProgress = (loadedBytes) => {
@@ -28809,13 +29315,35 @@ var require_axios = __commonJS({
28809
29315
  const canceledError = composedSignal.reason;
28810
29316
  canceledError.config = config;
28811
29317
  request && (canceledError.request = request);
28812
- err !== canceledError && (canceledError.cause = err);
29318
+ if (err !== canceledError) {
29319
+ Object.defineProperty(canceledError, "cause", {
29320
+ __proto__: null,
29321
+ value: err,
29322
+ writable: true,
29323
+ enumerable: false,
29324
+ configurable: true
29325
+ });
29326
+ }
28813
29327
  throw canceledError;
28814
29328
  }
29329
+ if (pendingBodyError) {
29330
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
29331
+ throw pendingBodyError;
29332
+ }
29333
+ if (err instanceof AxiosError) {
29334
+ request && !err.request && (err.request = request);
29335
+ throw err;
29336
+ }
28815
29337
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
28816
- throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
28817
- cause: err.cause || err
29338
+ const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
29339
+ Object.defineProperty(networkError, "cause", {
29340
+ __proto__: null,
29341
+ value: err.cause || err,
29342
+ writable: true,
29343
+ enumerable: false,
29344
+ configurable: true
28818
29345
  });
29346
+ throw networkError;
28819
29347
  }
28820
29348
  throw AxiosError.from(err, err && err.code, config, request, err && err.response);
28821
29349
  }
@@ -28890,7 +29418,7 @@ var require_axios = __commonJS({
28890
29418
  if (!adapter) {
28891
29419
  const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
28892
29420
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
28893
- throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
29421
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, AxiosError.ERR_NOT_SUPPORT);
28894
29422
  }
28895
29423
  return adapter;
28896
29424
  }
@@ -28977,7 +29505,7 @@ var require_axios = __commonJS({
28977
29505
  };
28978
29506
  };
28979
29507
  function assertOptions(options, schema, allowUnknown) {
28980
- if (typeof options !== "object") {
29508
+ if (typeof options !== "object" || options === null) {
28981
29509
  throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
28982
29510
  }
28983
29511
  const keys = Object.keys(options);
@@ -29069,7 +29597,8 @@ var require_axios = __commonJS({
29069
29597
  forcedJSONParsing: validators.transitional(validators.boolean),
29070
29598
  clarifyTimeoutError: validators.transitional(validators.boolean),
29071
29599
  legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
29072
- advertiseZstdAcceptEncoding: validators.transitional(validators.boolean)
29600
+ advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
29601
+ validateStatusUndefinedResolves: validators.transitional(validators.boolean)
29073
29602
  }, false);
29074
29603
  }
29075
29604
  if (paramsSerializer != null) {
@@ -29139,16 +29668,29 @@ var require_axios = __commonJS({
29139
29668
  const onFulfilled = requestInterceptorChain[i++];
29140
29669
  const onRejected = requestInterceptorChain[i++];
29141
29670
  try {
29142
- newConfig = onFulfilled(newConfig);
29671
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
29143
29672
  } catch (error) {
29144
- onRejected.call(this, error);
29673
+ if (!onRejected) {
29674
+ promise = Promise.reject(error);
29675
+ break;
29676
+ }
29677
+ try {
29678
+ const rejectedResult = onRejected.call(this, error);
29679
+ if (utils$1.isThenable(rejectedResult)) {
29680
+ promise = Promise.resolve(rejectedResult).then(() => dispatchRequest.call(this, newConfig));
29681
+ }
29682
+ } catch (rejectedError) {
29683
+ promise = Promise.reject(rejectedError);
29684
+ }
29145
29685
  break;
29146
29686
  }
29147
29687
  }
29148
- try {
29149
- promise = dispatchRequest.call(this, newConfig);
29150
- } catch (error) {
29151
- return Promise.reject(error);
29688
+ if (!promise) {
29689
+ try {
29690
+ promise = dispatchRequest.call(this, newConfig);
29691
+ } catch (error) {
29692
+ promise = Promise.reject(error);
29693
+ }
29152
29694
  }
29153
29695
  i = 0;
29154
29696
  len = responseInterceptorChain.length;
@@ -29159,7 +29701,7 @@ var require_axios = __commonJS({
29159
29701
  }
29160
29702
  getUri(config) {
29161
29703
  config = mergeConfig(this.defaults, config);
29162
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
29704
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
29163
29705
  return buildURL(fullPath, config.params, config.paramsSerializer);
29164
29706
  }
29165
29707
  };
@@ -29168,7 +29710,7 @@ var require_axios = __commonJS({
29168
29710
  return this.request(mergeConfig(config || {}, {
29169
29711
  method,
29170
29712
  url: url2,
29171
- data: (config || {}).data
29713
+ data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
29172
29714
  }));
29173
29715
  };
29174
29716
  });
@@ -29357,6 +29899,7 @@ var require_axios = __commonJS({
29357
29899
  LoopDetected: 508,
29358
29900
  NotExtended: 510,
29359
29901
  NetworkAuthenticationRequired: 511,
29902
+ WebServerReturnsAnUnknownError: 520,
29360
29903
  WebServerIsDown: 521,
29361
29904
  ConnectionTimedOut: 522,
29362
29905
  OriginIsUnreachable: 523,
@@ -30184,7 +30727,7 @@ function tryExtractSAPErrorFromMessage(message) {
30184
30727
  }
30185
30728
 
30186
30729
  // src/version.ts
30187
- var VERSION = true ? "4.7.1" : "0.0.0-test";
30730
+ var VERSION = true ? "4.9.0" : "0.0.0-test";
30188
30731
 
30189
30732
  export {
30190
30733
  __toESM,
@@ -30236,6 +30779,6 @@ mime-types/index.js:
30236
30779
  *)
30237
30780
 
30238
30781
  axios/dist/node/axios.cjs:
30239
- (*! Axios v1.17.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
30782
+ (*! Axios v1.19.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
30240
30783
  */
30241
- //# sourceMappingURL=chunk-XIWHF23D.js.map
30784
+ //# sourceMappingURL=chunk-4PLJVJX4.js.map