@alpic-ai/sdk 0.0.0-dev.gafee556 → 0.0.0-dev.gb017cb7

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 (53) hide show
  1. package/dist/api/auth-scope.js +1 -0
  2. package/dist/api/auth-scope.js.map +1 -1
  3. package/dist/auth/api-key.d.ts +1 -0
  4. package/dist/auth/api-key.js +23 -0
  5. package/dist/auth/api-key.js.map +1 -0
  6. package/dist/auth/index.d.ts +4 -0
  7. package/dist/auth/index.js +13 -1
  8. package/dist/auth/index.js.map +1 -1
  9. package/dist/auth/oauth-client.js +3 -2
  10. package/dist/auth/oauth-client.js.map +1 -1
  11. package/dist/auth/server/assets/authorize.html +1 -1
  12. package/dist/auth/store.js +1 -0
  13. package/dist/auth/store.js.map +1 -1
  14. package/dist/client.d.ts +6 -0
  15. package/dist/client.js +10 -0
  16. package/dist/client.js.map +1 -1
  17. package/dist/deploy/archive.d.ts +8 -0
  18. package/dist/deploy/archive.js +61 -0
  19. package/dist/deploy/archive.js.map +1 -0
  20. package/dist/deploy/deployments.d.ts +45 -0
  21. package/dist/deploy/deployments.js +90 -0
  22. package/dist/deploy/deployments.js.map +1 -0
  23. package/dist/deploy/poll.d.ts +2 -0
  24. package/dist/deploy/poll.js +10 -0
  25. package/dist/deploy/poll.js.map +1 -0
  26. package/dist/deploy/upload.d.ts +1 -0
  27. package/dist/deploy/upload.js +13 -0
  28. package/dist/deploy/upload.js.map +1 -0
  29. package/dist/index.d.ts +5 -0
  30. package/dist/index.js +1 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/lib/emitter.js +5 -6
  33. package/dist/lib/emitter.js.map +1 -1
  34. package/dist/lib/errors.d.ts +3 -0
  35. package/dist/lib/errors.js +7 -0
  36. package/dist/lib/errors.js.map +1 -0
  37. package/dist/project/config.d.ts +10 -0
  38. package/dist/project/config.js +31 -0
  39. package/dist/project/config.js.map +1 -0
  40. package/dist/project/detect-runtime.d.ts +2 -0
  41. package/dist/project/detect-runtime.js +25 -0
  42. package/dist/project/detect-runtime.js.map +1 -0
  43. package/dist/project/projects.d.ts +21 -0
  44. package/dist/project/projects.js +52 -0
  45. package/dist/project/projects.js.map +1 -0
  46. package/dist/tunnel/tunnel.js +9 -19
  47. package/dist/tunnel/tunnel.js.map +1 -1
  48. package/dist/vendor/pipenet.js +1146 -439
  49. package/dist/vendor/pipenet.js.map +4 -4
  50. package/dist/whoami.d.ts +15 -0
  51. package/dist/whoami.js +13 -0
  52. package/dist/whoami.js.map +1 -0
  53. package/package.json +12 -11
@@ -45,7 +45,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
45
45
  var require_delayed_stream = __commonJS({
46
46
  "../../node_modules/.pnpm/delayed-stream@1.0.0/node_modules/delayed-stream/lib/delayed_stream.js"(exports, module) {
47
47
  var Stream = __require("stream").Stream;
48
- var util3 = __require("util");
48
+ var util4 = __require("util");
49
49
  module.exports = DelayedStream;
50
50
  function DelayedStream() {
51
51
  this.source = null;
@@ -56,7 +56,7 @@ var require_delayed_stream = __commonJS({
56
56
  this._released = false;
57
57
  this._bufferedEvents = [];
58
58
  }
59
- util3.inherits(DelayedStream, Stream);
59
+ util4.inherits(DelayedStream, Stream);
60
60
  DelayedStream.create = function(source, options) {
61
61
  var delayedStream = new this();
62
62
  options = options || {};
@@ -135,7 +135,7 @@ var require_delayed_stream = __commonJS({
135
135
  // ../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js
136
136
  var require_combined_stream = __commonJS({
137
137
  "../../node_modules/.pnpm/combined-stream@1.0.8/node_modules/combined-stream/lib/combined_stream.js"(exports, module) {
138
- var util3 = __require("util");
138
+ var util4 = __require("util");
139
139
  var Stream = __require("stream").Stream;
140
140
  var DelayedStream = require_delayed_stream();
141
141
  module.exports = CombinedStream;
@@ -151,7 +151,7 @@ var require_combined_stream = __commonJS({
151
151
  this._insideLoop = false;
152
152
  this._pendingNext = false;
153
153
  }
154
- util3.inherits(CombinedStream, Stream);
154
+ util4.inherits(CombinedStream, Stream);
155
155
  CombinedStream.create = function(options) {
156
156
  var combinedStream = new this();
157
157
  options = options || {};
@@ -9593,9 +9593,9 @@ var require_get_proto = __commonJS({
9593
9593
  }
9594
9594
  });
9595
9595
 
9596
- // ../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
9596
+ // ../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js
9597
9597
  var require_hasown = __commonJS({
9598
- "../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
9598
+ "../../node_modules/.pnpm/hasown@2.0.4/node_modules/hasown/index.js"(exports, module) {
9599
9599
  "use strict";
9600
9600
  var call = Function.prototype.call;
9601
9601
  var $hasOwn = Object.prototype.hasOwnProperty;
@@ -9978,9 +9978,9 @@ var require_es_set_tostringtag = __commonJS({
9978
9978
  }
9979
9979
  });
9980
9980
 
9981
- // ../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/populate.js
9981
+ // ../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js
9982
9982
  var require_populate = __commonJS({
9983
- "../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/populate.js"(exports, module) {
9983
+ "../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/populate.js"(exports, module) {
9984
9984
  "use strict";
9985
9985
  module.exports = function(dst, src) {
9986
9986
  Object.keys(src).forEach(function(prop) {
@@ -9991,12 +9991,12 @@ var require_populate = __commonJS({
9991
9991
  }
9992
9992
  });
9993
9993
 
9994
- // ../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/form_data.js
9994
+ // ../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js
9995
9995
  var require_form_data = __commonJS({
9996
- "../../node_modules/.pnpm/form-data@4.0.5/node_modules/form-data/lib/form_data.js"(exports, module) {
9996
+ "../../node_modules/.pnpm/form-data@4.0.6/node_modules/form-data/lib/form_data.js"(exports, module) {
9997
9997
  "use strict";
9998
9998
  var CombinedStream = require_combined_stream();
9999
- var util3 = __require("util");
9999
+ var util4 = __require("util");
10000
10000
  var path = __require("path");
10001
10001
  var http3 = __require("http");
10002
10002
  var https2 = __require("https");
@@ -10009,6 +10009,9 @@ var require_form_data = __commonJS({
10009
10009
  var setToStringTag = require_es_set_tostringtag();
10010
10010
  var hasOwn = require_hasown();
10011
10011
  var populate = require_populate();
10012
+ function escapeHeaderParam(str) {
10013
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
10014
+ }
10012
10015
  function FormData3(options) {
10013
10016
  if (!(this instanceof FormData3)) {
10014
10017
  return new FormData3(options);
@@ -10022,7 +10025,7 @@ var require_form_data = __commonJS({
10022
10025
  this[option] = options[option];
10023
10026
  }
10024
10027
  }
10025
- util3.inherits(FormData3, CombinedStream);
10028
+ util4.inherits(FormData3, CombinedStream);
10026
10029
  FormData3.LINE_BREAK = "\r\n";
10027
10030
  FormData3.DEFAULT_CONTENT_TYPE = "application/octet-stream";
10028
10031
  FormData3.prototype.append = function(field, value, options) {
@@ -10098,7 +10101,7 @@ var require_form_data = __commonJS({
10098
10101
  var contents = "";
10099
10102
  var headers = {
10100
10103
  // add custom disposition as third element or keep it two elements if not
10101
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
10104
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
10102
10105
  // if no content type. allow it to be empty array
10103
10106
  "Content-Type": [].concat(contentType || [])
10104
10107
  };
@@ -10132,7 +10135,7 @@ var require_form_data = __commonJS({
10132
10135
  filename = path.basename(value.client._httpMessage.path || "");
10133
10136
  }
10134
10137
  if (filename) {
10135
- return 'filename="' + filename + '"';
10138
+ return 'filename="' + escapeHeaderParam(filename) + '"';
10136
10139
  }
10137
10140
  };
10138
10141
  FormData3.prototype._getContentType = function(value, options) {
@@ -10426,9 +10429,9 @@ var require_ms = __commonJS({
10426
10429
  }
10427
10430
  });
10428
10431
 
10429
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js
10432
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js
10430
10433
  var require_common = __commonJS({
10431
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/common.js"(exports, module) {
10434
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/common.js"(exports, module) {
10432
10435
  function setup(env) {
10433
10436
  createDebug.debug = createDebug;
10434
10437
  createDebug.default = createDebug;
@@ -10603,9 +10606,9 @@ var require_common = __commonJS({
10603
10606
  }
10604
10607
  });
10605
10608
 
10606
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js
10609
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js
10607
10610
  var require_browser = __commonJS({
10608
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/browser.js"(exports, module) {
10611
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/browser.js"(exports, module) {
10609
10612
  exports.formatArgs = formatArgs;
10610
10613
  exports.save = save;
10611
10614
  exports.load = load;
@@ -10900,18 +10903,18 @@ var require_supports_color = __commonJS({
10900
10903
  }
10901
10904
  });
10902
10905
 
10903
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js
10906
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js
10904
10907
  var require_node = __commonJS({
10905
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/node.js"(exports, module) {
10908
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/node.js"(exports, module) {
10906
10909
  var tty = __require("tty");
10907
- var util3 = __require("util");
10910
+ var util4 = __require("util");
10908
10911
  exports.init = init;
10909
10912
  exports.log = log3;
10910
10913
  exports.formatArgs = formatArgs;
10911
10914
  exports.save = save;
10912
10915
  exports.load = load;
10913
10916
  exports.useColors = useColors;
10914
- exports.destroy = util3.deprecate(
10917
+ exports.destroy = util4.deprecate(
10915
10918
  () => {
10916
10919
  },
10917
10920
  "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
@@ -11042,7 +11045,7 @@ var require_node = __commonJS({
11042
11045
  return (/* @__PURE__ */ new Date()).toISOString() + " ";
11043
11046
  }
11044
11047
  function log3(...args) {
11045
- return process.stderr.write(util3.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11048
+ return process.stderr.write(util4.formatWithOptions(exports.inspectOpts, ...args) + "\n");
11046
11049
  }
11047
11050
  function save(namespaces) {
11048
11051
  if (namespaces) {
@@ -11065,18 +11068,18 @@ var require_node = __commonJS({
11065
11068
  var { formatters } = module.exports;
11066
11069
  formatters.o = function(v) {
11067
11070
  this.inspectOpts.colors = this.useColors;
11068
- return util3.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11071
+ return util4.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
11069
11072
  };
11070
11073
  formatters.O = function(v) {
11071
11074
  this.inspectOpts.colors = this.useColors;
11072
- return util3.inspect(v, this.inspectOpts);
11075
+ return util4.inspect(v, this.inspectOpts);
11073
11076
  };
11074
11077
  }
11075
11078
  });
11076
11079
 
11077
- // ../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js
11080
+ // ../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js
11078
11081
  var require_src = __commonJS({
11079
- "../../node_modules/.pnpm/debug@4.4.3/node_modules/debug/src/index.js"(exports, module) {
11082
+ "../../node_modules/.pnpm/debug@4.4.3_supports-color@8.1.1/node_modules/debug/src/index.js"(exports, module) {
11080
11083
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
11081
11084
  module.exports = require_browser();
11082
11085
  } else {
@@ -11085,9 +11088,9 @@ var require_src = __commonJS({
11085
11088
  }
11086
11089
  });
11087
11090
 
11088
- // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js
11091
+ // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js
11089
11092
  var require_promisify = __commonJS({
11090
- "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/promisify.js"(exports) {
11093
+ "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/promisify.js"(exports) {
11091
11094
  "use strict";
11092
11095
  Object.defineProperty(exports, "__esModule", { value: true });
11093
11096
  function promisify(fn) {
@@ -11107,9 +11110,9 @@ var require_promisify = __commonJS({
11107
11110
  }
11108
11111
  });
11109
11112
 
11110
- // ../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js
11113
+ // ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js
11111
11114
  var require_src2 = __commonJS({
11112
- "../../node_modules/.pnpm/agent-base@6.0.2/node_modules/agent-base/dist/src/index.js"(exports, module) {
11115
+ "../../node_modules/.pnpm/agent-base@6.0.2_supports-color@8.1.1/node_modules/agent-base/dist/src/index.js"(exports, module) {
11113
11116
  "use strict";
11114
11117
  var __importDefault = exports && exports.__importDefault || function(mod) {
11115
11118
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11290,9 +11293,9 @@ var require_src2 = __commonJS({
11290
11293
  }
11291
11294
  });
11292
11295
 
11293
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11296
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js
11294
11297
  var require_parse_proxy_response = __commonJS({
11295
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11298
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
11296
11299
  "use strict";
11297
11300
  var __importDefault = exports && exports.__importDefault || function(mod) {
11298
11301
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11356,9 +11359,9 @@ var require_parse_proxy_response = __commonJS({
11356
11359
  }
11357
11360
  });
11358
11361
 
11359
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js
11362
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js
11360
11363
  var require_agent = __commonJS({
11361
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11364
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/agent.js"(exports) {
11362
11365
  "use strict";
11363
11366
  var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
11364
11367
  function adopt(value) {
@@ -11516,9 +11519,9 @@ var require_agent = __commonJS({
11516
11519
  }
11517
11520
  });
11518
11521
 
11519
- // ../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js
11522
+ // ../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js
11520
11523
  var require_dist = __commonJS({
11521
- "../../node_modules/.pnpm/https-proxy-agent@5.0.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11524
+ "../../node_modules/.pnpm/https-proxy-agent@5.0.1_supports-color@8.1.1/node_modules/https-proxy-agent/dist/index.js"(exports, module) {
11522
11525
  "use strict";
11523
11526
  var __importDefault = exports && exports.__importDefault || function(mod) {
11524
11527
  return mod && mod.__esModule ? mod : { "default": mod };
@@ -11535,9 +11538,9 @@ var require_dist = __commonJS({
11535
11538
  }
11536
11539
  });
11537
11540
 
11538
- // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js
11541
+ // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js
11539
11542
  var require_debug = __commonJS({
11540
- "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/debug.js"(exports, module) {
11543
+ "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/debug.js"(exports, module) {
11541
11544
  var debug3;
11542
11545
  module.exports = function() {
11543
11546
  if (!debug3) {
@@ -11555,9 +11558,9 @@ var require_debug = __commonJS({
11555
11558
  }
11556
11559
  });
11557
11560
 
11558
- // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js
11561
+ // ../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js
11559
11562
  var require_follow_redirects = __commonJS({
11560
- "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3/node_modules/follow-redirects/index.js"(exports, module) {
11563
+ "../../node_modules/.pnpm/follow-redirects@1.16.0_debug@4.4.3_supports-color@8.1.1_/node_modules/follow-redirects/index.js"(exports, module) {
11561
11564
  var url2 = __require("url");
11562
11565
  var URL2 = url2.URL;
11563
11566
  var http3 = __require("http");
@@ -12066,17 +12069,34 @@ var require_follow_redirects = __commonJS({
12066
12069
  }
12067
12070
  });
12068
12071
 
12069
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/bind.js
12072
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/bind.js
12070
12073
  function bind(fn, thisArg) {
12071
12074
  return function wrap() {
12072
12075
  return fn.apply(thisArg, arguments);
12073
12076
  };
12074
12077
  }
12075
12078
 
12076
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/utils.js
12079
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/utils.js
12077
12080
  var { toString } = Object.prototype;
12078
12081
  var { getPrototypeOf } = Object;
12079
12082
  var { iterator, toStringTag } = Symbol;
12083
+ var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12084
+ var hasOwnInPrototypeChain = (thing, prop) => {
12085
+ let obj = thing;
12086
+ const seen = [];
12087
+ while (obj != null && obj !== Object.prototype) {
12088
+ if (seen.indexOf(obj) !== -1) {
12089
+ return false;
12090
+ }
12091
+ seen.push(obj);
12092
+ if (hasOwnProperty(obj, prop)) {
12093
+ return true;
12094
+ }
12095
+ obj = getPrototypeOf(obj);
12096
+ }
12097
+ return false;
12098
+ };
12099
+ var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
12080
12100
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
12081
12101
  const str = toString.call(thing);
12082
12102
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -12107,11 +12127,14 @@ var isNumber = typeOfTest("number");
12107
12127
  var isObject = (thing) => thing !== null && typeof thing === "object";
12108
12128
  var isBoolean = (thing) => thing === true || thing === false;
12109
12129
  var isPlainObject = (val) => {
12110
- if (kindOf(val) !== "object") {
12130
+ if (!isObject(val)) {
12111
12131
  return false;
12112
12132
  }
12113
12133
  const prototype2 = getPrototypeOf(val);
12114
- return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
12134
+ return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
12135
+ // Symbol.iterator as evidence the value is a tagged/iterable type rather
12136
+ // than a plain object, while ignoring keys injected onto Object.prototype.
12137
+ !hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
12115
12138
  };
12116
12139
  var isEmptyObject = (val) => {
12117
12140
  if (!isObject(val) || isBuffer(val)) {
@@ -12131,6 +12154,7 @@ var isReactNativeBlob = (value) => {
12131
12154
  var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
12132
12155
  var isBlob = kindOfTest("Blob");
12133
12156
  var isFileList = kindOfTest("FileList");
12157
+ var isSet = kindOfTest("Set");
12134
12158
  var isStream = (val) => isObject(val) && isFunction(val.pipe);
12135
12159
  function getGlobal() {
12136
12160
  if (typeof globalThis !== "undefined") return globalThis;
@@ -12215,7 +12239,7 @@ function merge(...objs) {
12215
12239
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
12216
12240
  return;
12217
12241
  }
12218
- const targetKey = caseless && findKey(result, key) || key;
12242
+ const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
12219
12243
  const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
12220
12244
  if (isPlainObject(existing) && isPlainObject(val)) {
12221
12245
  result[targetKey] = merge(existing, val);
@@ -12228,7 +12252,21 @@ function merge(...objs) {
12228
12252
  }
12229
12253
  };
12230
12254
  for (let i = 0, l = objs.length; i < l; i++) {
12231
- objs[i] && forEach(objs[i], assignValue);
12255
+ const source = objs[i];
12256
+ if (!source || isBuffer(source)) {
12257
+ continue;
12258
+ }
12259
+ forEach(source, assignValue);
12260
+ if (typeof source !== "object" || isArray(source)) {
12261
+ continue;
12262
+ }
12263
+ const symbols = Object.getOwnPropertySymbols(source);
12264
+ for (let j = 0; j < symbols.length; j++) {
12265
+ const symbol = symbols[j];
12266
+ if (propertyIsEnumerable.call(source, symbol)) {
12267
+ assignValue(source[symbol], symbol);
12268
+ }
12269
+ }
12232
12270
  }
12233
12271
  return result;
12234
12272
  }
@@ -12350,7 +12388,7 @@ var toCamelCase = (str) => {
12350
12388
  return p1.toUpperCase() + p2;
12351
12389
  });
12352
12390
  };
12353
- var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
12391
+ var { propertyIsEnumerable } = Object.prototype;
12354
12392
  var isRegExp = kindOfTest("RegExp");
12355
12393
  var reduceDescriptors = (obj, reducer) => {
12356
12394
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -12412,11 +12450,20 @@ var toJSONObject = (obj) => {
12412
12450
  }
12413
12451
  if (!("toJSON" in source)) {
12414
12452
  visited.add(source);
12415
- const target = isArray(source) ? [] : {};
12416
- forEach(source, (value, key) => {
12417
- const reducedValue = visit(value);
12418
- !isUndefined(reducedValue) && (target[key] = reducedValue);
12419
- });
12453
+ let target;
12454
+ if (isSet(source)) {
12455
+ target = [];
12456
+ for (const value of source) {
12457
+ const reducedValue = visit(value);
12458
+ !isUndefined(reducedValue) && target.push(reducedValue);
12459
+ }
12460
+ } else {
12461
+ target = isArray(source) ? [] : {};
12462
+ forEach(source, (value, key) => {
12463
+ const reducedValue = visit(value);
12464
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
12465
+ });
12466
+ }
12420
12467
  visited.delete(source);
12421
12468
  return target;
12422
12469
  }
@@ -12449,6 +12496,7 @@ var _setImmediate = ((setImmediateSupported, postMessageSupported) => {
12449
12496
  })(typeof setImmediate === "function", isFunction(_global.postMessage));
12450
12497
  var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
12451
12498
  var isIterable = (thing) => thing != null && isFunction(thing[iterator]);
12499
+ var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
12452
12500
  var utils_default = {
12453
12501
  isArray,
12454
12502
  isArrayBuffer,
@@ -12494,6 +12542,8 @@ var utils_default = {
12494
12542
  hasOwnProperty,
12495
12543
  hasOwnProp: hasOwnProperty,
12496
12544
  // an alias to avoid ESLint no-prototype-builtins detection
12545
+ hasOwnInPrototypeChain,
12546
+ getSafeProp,
12497
12547
  reduceDescriptors,
12498
12548
  freezeMethods,
12499
12549
  toObjectSet,
@@ -12509,10 +12559,11 @@ var utils_default = {
12509
12559
  isThenable,
12510
12560
  setImmediate: _setImmediate,
12511
12561
  asap,
12512
- isIterable
12562
+ isIterable,
12563
+ isSafeIterable
12513
12564
  };
12514
12565
 
12515
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/parseHeaders.js
12566
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseHeaders.js
12516
12567
  var ignoreDuplicateOf = utils_default.toObjectSet([
12517
12568
  "age",
12518
12569
  "authorization",
@@ -12541,23 +12592,24 @@ var parseHeaders_default = (rawHeaders) => {
12541
12592
  i = line.indexOf(":");
12542
12593
  key = line.substring(0, i).trim().toLowerCase();
12543
12594
  val = line.substring(i + 1).trim();
12544
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
12595
+ const hasKey = utils_default.hasOwnProp(parsed, key);
12596
+ if (!key || hasKey && utils_default.hasOwnProp(ignoreDuplicateOf, key)) {
12545
12597
  return;
12546
12598
  }
12547
12599
  if (key === "set-cookie") {
12548
- if (parsed[key]) {
12600
+ if (hasKey) {
12549
12601
  parsed[key].push(val);
12550
12602
  } else {
12551
12603
  parsed[key] = [val];
12552
12604
  }
12553
12605
  } else {
12554
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
12606
+ parsed[key] = hasKey ? parsed[key] + ", " + val : val;
12555
12607
  }
12556
12608
  });
12557
12609
  return parsed;
12558
12610
  };
12559
12611
 
12560
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12612
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/sanitizeHeaderValue.js
12561
12613
  function trimSPorHTAB(str) {
12562
12614
  let start = 0;
12563
12615
  let end = str.length;
@@ -12595,7 +12647,7 @@ function toByteStringHeaderObject(headers) {
12595
12647
  return byteStringHeaders;
12596
12648
  }
12597
12649
 
12598
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/AxiosHeaders.js
12650
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosHeaders.js
12599
12651
  var $internals = /* @__PURE__ */ Symbol("internals");
12600
12652
  function normalizeHeader(header) {
12601
12653
  return header && String(header).trim().toLowerCase();
@@ -12615,6 +12667,90 @@ function parseTokens(str) {
12615
12667
  }
12616
12668
  return tokens;
12617
12669
  }
12670
+ var parameterNameRE = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
12671
+ function trimOWS(value) {
12672
+ let start = 0;
12673
+ let end = value.length;
12674
+ while (start < end) {
12675
+ const code = value.charCodeAt(start);
12676
+ if (code !== 9 && code !== 32) {
12677
+ break;
12678
+ }
12679
+ start += 1;
12680
+ }
12681
+ while (end > start) {
12682
+ const code = value.charCodeAt(end - 1);
12683
+ if (code !== 9 && code !== 32) {
12684
+ break;
12685
+ }
12686
+ end -= 1;
12687
+ }
12688
+ return start === 0 && end === value.length ? value : value.slice(start, end);
12689
+ }
12690
+ function decodeQuotedString(value) {
12691
+ const last = value.length - 1;
12692
+ if (last < 1 || value.charCodeAt(0) !== 34 || value.charCodeAt(last) !== 34) {
12693
+ return value;
12694
+ }
12695
+ let decoded = "";
12696
+ for (let i = 1; i < last; i++) {
12697
+ const code = value.charCodeAt(i);
12698
+ if (code === 34) {
12699
+ return value;
12700
+ }
12701
+ if (code === 92) {
12702
+ i += 1;
12703
+ if (i >= last) {
12704
+ return value;
12705
+ }
12706
+ }
12707
+ decoded += value[i];
12708
+ }
12709
+ return decoded;
12710
+ }
12711
+ function parseParameters(value) {
12712
+ const parameters = /* @__PURE__ */ Object.create(null);
12713
+ const str = String(value);
12714
+ let start = 0;
12715
+ let quoted = false;
12716
+ let escaped = false;
12717
+ function parseParameter(end) {
12718
+ const part = trimOWS(str.slice(start, end));
12719
+ const equals = part.indexOf("=");
12720
+ if (equals < 1) {
12721
+ return;
12722
+ }
12723
+ const name = trimOWS(part.slice(0, equals));
12724
+ if (!parameterNameRE.test(name)) {
12725
+ return;
12726
+ }
12727
+ const normalizedName = name.toLowerCase();
12728
+ if (normalizedName === "__proto__" || normalizedName === "constructor" || normalizedName === "prototype") {
12729
+ return;
12730
+ }
12731
+ const parameterValue = trimOWS(part.slice(equals + 1));
12732
+ parameters[normalizedName] = decodeQuotedString(parameterValue);
12733
+ }
12734
+ for (let i = 0; i < str.length; i++) {
12735
+ const code = str.charCodeAt(i);
12736
+ if (quoted) {
12737
+ if (escaped) {
12738
+ escaped = false;
12739
+ } else if (code === 92) {
12740
+ escaped = true;
12741
+ } else if (code === 34) {
12742
+ quoted = false;
12743
+ }
12744
+ } else if (code === 34) {
12745
+ quoted = true;
12746
+ } else if (code === 44 || code === 59) {
12747
+ parseParameter(i);
12748
+ start = i + 1;
12749
+ }
12750
+ }
12751
+ parseParameter(str.length);
12752
+ return parameters;
12753
+ }
12618
12754
  var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
12619
12755
  function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
12620
12756
  if (utils_default.isFunction(filter2)) {
@@ -12659,7 +12795,7 @@ var AxiosHeaders = class {
12659
12795
  function setHeader(_value, _header, _rewrite) {
12660
12796
  const lHeader = normalizeHeader(_header);
12661
12797
  if (!lHeader) {
12662
- throw new Error("header name must be a non-empty string");
12798
+ return;
12663
12799
  }
12664
12800
  const key = utils_default.findKey(self2, lHeader);
12665
12801
  if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
@@ -12671,13 +12807,19 @@ var AxiosHeaders = class {
12671
12807
  setHeaders(header, valueOrRewrite);
12672
12808
  } else if (utils_default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
12673
12809
  setHeaders(parseHeaders_default(header), valueOrRewrite);
12674
- } else if (utils_default.isObject(header) && utils_default.isIterable(header)) {
12675
- let obj = {}, dest, key;
12810
+ } else if (utils_default.isObject(header) && utils_default.isSafeIterable(header)) {
12811
+ let obj = /* @__PURE__ */ Object.create(null), dest, key;
12676
12812
  for (const entry of header) {
12677
12813
  if (!utils_default.isArray(entry)) {
12678
- throw TypeError("Object iterator must return a key-value pair");
12814
+ throw new TypeError("Object iterator must return a key-value pair");
12815
+ }
12816
+ key = entry[0];
12817
+ if (utils_default.hasOwnProp(obj, key)) {
12818
+ dest = obj[key];
12819
+ obj[key] = utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
12820
+ } else {
12821
+ obj[key] = entry[1];
12679
12822
  }
12680
- obj[key = entry[0]] = (dest = obj[key]) ? utils_default.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
12681
12823
  }
12682
12824
  setHeaders(obj, valueOrRewrite);
12683
12825
  } else {
@@ -12784,7 +12926,8 @@ var AxiosHeaders = class {
12784
12926
  return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
12785
12927
  }
12786
12928
  getSetCookie() {
12787
- return this.get("set-cookie") || [];
12929
+ const value = this.get("set-cookie");
12930
+ return utils_default.isArray(value) ? value : value == null || value === false ? [] : [value];
12788
12931
  }
12789
12932
  get [Symbol.toStringTag]() {
12790
12933
  return "AxiosHeaders";
@@ -12792,6 +12935,9 @@ var AxiosHeaders = class {
12792
12935
  static from(thing) {
12793
12936
  return thing instanceof this ? thing : new this(thing);
12794
12937
  }
12938
+ static parseParameters(value) {
12939
+ return parseParameters(value);
12940
+ }
12795
12941
  static concat(first, ...targets) {
12796
12942
  const computed = new this(first);
12797
12943
  targets.forEach((target) => computed.set(target));
@@ -12834,7 +12980,7 @@ utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
12834
12980
  utils_default.freezeMethods(AxiosHeaders);
12835
12981
  var AxiosHeaders_default = AxiosHeaders;
12836
12982
 
12837
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/AxiosError.js
12983
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/AxiosError.js
12838
12984
  var REDACTED = "[REDACTED ****]";
12839
12985
  function hasOwnOrPrototypeToJSON(source) {
12840
12986
  if (utils_default.hasOwnProp(source, "toJSON")) {
@@ -12887,10 +13033,37 @@ function redactConfig(config, redactKeys) {
12887
13033
  };
12888
13034
  return visit(config);
12889
13035
  }
13036
+ function stringifySafely(value) {
13037
+ try {
13038
+ return String(value);
13039
+ } catch (err) {
13040
+ return "";
13041
+ }
13042
+ }
13043
+ function aggregateErrorMessage(error) {
13044
+ const message = error.errors.map((entry) => {
13045
+ try {
13046
+ return entry && entry.message ? stringifySafely(entry.message) : stringifySafely(entry);
13047
+ } catch (err) {
13048
+ return "";
13049
+ }
13050
+ }).filter(Boolean).join("; ");
13051
+ return message || error.name || "AggregateError";
13052
+ }
12890
13053
  var AxiosError = class _AxiosError extends Error {
12891
13054
  static from(error, code, config, request, response, customProps) {
12892
- const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
12893
- axiosError.cause = error;
13055
+ let message = error.message;
13056
+ if (!message && utils_default.isArray(error.errors) && error.errors.length) {
13057
+ message = aggregateErrorMessage(error);
13058
+ }
13059
+ const axiosError = new _AxiosError(message, code || error.code, config, request, response);
13060
+ Object.defineProperty(axiosError, "cause", {
13061
+ __proto__: null,
13062
+ value: error,
13063
+ writable: true,
13064
+ enumerable: false,
13065
+ configurable: true
13066
+ });
12894
13067
  axiosError.name = error.name;
12895
13068
  if (error.status != null && axiosError.status == null) {
12896
13069
  axiosError.status = error.status;
@@ -12969,11 +13142,22 @@ AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
12969
13142
  AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
12970
13143
  var AxiosError_default = AxiosError;
12971
13144
 
12972
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/classes/FormData.js
13145
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/FormData.js
12973
13146
  var import_form_data = __toESM(require_form_data(), 1);
12974
13147
  var FormData_default = import_form_data.default;
12975
13148
 
12976
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/toFormData.js
13149
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/Buffer.js
13150
+ var Buffer_default = {
13151
+ isBufferAvailable() {
13152
+ return typeof Buffer !== "undefined";
13153
+ },
13154
+ from(value) {
13155
+ return Buffer.from(value);
13156
+ }
13157
+ };
13158
+
13159
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toFormData.js
13160
+ var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
12977
13161
  function isVisitable(thing) {
12978
13162
  return utils_default.isPlainObject(thing) || utils_default.isArray(thing);
12979
13163
  }
@@ -13015,8 +13199,9 @@ function toFormData(obj, formData, options) {
13015
13199
  const dots = options.dots;
13016
13200
  const indexes = options.indexes;
13017
13201
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
13018
- const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
13202
+ const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
13019
13203
  const useBlob = _Blob && utils_default.isSpecCompliantForm(formData);
13204
+ const stack = [];
13020
13205
  if (!utils_default.isFunction(visitor)) {
13021
13206
  throw new TypeError("visitor must be a function");
13022
13207
  }
@@ -13032,10 +13217,41 @@ function toFormData(obj, formData, options) {
13032
13217
  throw new AxiosError_default("Blob is not supported. Use a Buffer instead.");
13033
13218
  }
13034
13219
  if (utils_default.isArrayBuffer(value) || utils_default.isTypedArray(value)) {
13035
- return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
13220
+ if (useBlob && typeof _Blob === "function") {
13221
+ return new _Blob([value]);
13222
+ }
13223
+ if (Buffer_default && Buffer_default.isBufferAvailable()) {
13224
+ return Buffer_default.from(value);
13225
+ }
13226
+ throw new AxiosError_default("Blob is not supported. Use a Buffer instead.", AxiosError_default.ERR_NOT_SUPPORT);
13036
13227
  }
13037
13228
  return value;
13038
13229
  }
13230
+ function throwIfMaxDepthExceeded(depth) {
13231
+ if (depth > maxDepth) {
13232
+ throw new AxiosError_default(
13233
+ "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13234
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13235
+ );
13236
+ }
13237
+ }
13238
+ function stringifyWithDepthLimit(value, depth) {
13239
+ if (maxDepth === Infinity) {
13240
+ return JSON.stringify(value);
13241
+ }
13242
+ const ancestors = [];
13243
+ return JSON.stringify(value, function limitDepth(_key, currentValue) {
13244
+ if (!utils_default.isObject(currentValue)) {
13245
+ return currentValue;
13246
+ }
13247
+ while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
13248
+ ancestors.pop();
13249
+ }
13250
+ ancestors.push(currentValue);
13251
+ throwIfMaxDepthExceeded(depth + ancestors.length - 1);
13252
+ return currentValue;
13253
+ });
13254
+ }
13039
13255
  function defaultVisitor(value, key, path) {
13040
13256
  let arr = value;
13041
13257
  if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
@@ -13045,7 +13261,7 @@ function toFormData(obj, formData, options) {
13045
13261
  if (value && !path && typeof value === "object") {
13046
13262
  if (utils_default.endsWith(key, "{}")) {
13047
13263
  key = metaTokens ? key : key.slice(0, -2);
13048
- value = JSON.stringify(value);
13264
+ value = stringifyWithDepthLimit(value, 1);
13049
13265
  } else if (utils_default.isArray(value) && isFlatArray(value) || (utils_default.isFileList(value) || utils_default.endsWith(key, "[]")) && (arr = utils_default.toArray(value))) {
13050
13266
  key = removeBrackets(key);
13051
13267
  arr.forEach(function each(el, index) {
@@ -13064,7 +13280,6 @@ function toFormData(obj, formData, options) {
13064
13280
  formData.append(renderKey(path, key, dots), convertValue(value));
13065
13281
  return false;
13066
13282
  }
13067
- const stack = [];
13068
13283
  const exposedHelpers = Object.assign(predicates, {
13069
13284
  defaultVisitor,
13070
13285
  convertValue,
@@ -13072,14 +13287,9 @@ function toFormData(obj, formData, options) {
13072
13287
  });
13073
13288
  function build(value, path, depth = 0) {
13074
13289
  if (utils_default.isUndefined(value)) return;
13075
- if (depth > maxDepth) {
13076
- throw new AxiosError_default(
13077
- "Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth,
13078
- AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13079
- );
13080
- }
13290
+ throwIfMaxDepthExceeded(depth);
13081
13291
  if (stack.indexOf(value) !== -1) {
13082
- throw Error("Circular reference detected in " + path.join("."));
13292
+ throw new Error("Circular reference detected in " + path.join("."));
13083
13293
  }
13084
13294
  stack.push(value);
13085
13295
  utils_default.forEach(value, function each(el, key) {
@@ -13098,7 +13308,7 @@ function toFormData(obj, formData, options) {
13098
13308
  }
13099
13309
  var toFormData_default = toFormData;
13100
13310
 
13101
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13311
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosURLSearchParams.js
13102
13312
  function encode(str) {
13103
13313
  const charMap = {
13104
13314
  "!": "%21",
@@ -13121,16 +13331,14 @@ prototype.append = function append(name, value) {
13121
13331
  this._pairs.push([name, value]);
13122
13332
  };
13123
13333
  prototype.toString = function toString2(encoder) {
13124
- const _encode = encoder ? function(value) {
13125
- return encoder.call(this, value, encode);
13126
- } : encode;
13334
+ const _encode = encoder ? (value) => encoder.call(this, value, encode) : encode;
13127
13335
  return this._pairs.map(function each(pair) {
13128
13336
  return _encode(pair[0]) + "=" + _encode(pair[1]);
13129
13337
  }, "").join("&");
13130
13338
  };
13131
13339
  var AxiosURLSearchParams_default = AxiosURLSearchParams;
13132
13340
 
13133
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/buildURL.js
13341
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/buildURL.js
13134
13342
  function encode2(val) {
13135
13343
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
13136
13344
  }
@@ -13138,11 +13346,12 @@ function buildURL(url2, params, options) {
13138
13346
  if (!params) {
13139
13347
  return url2;
13140
13348
  }
13141
- const _encode = options && options.encode || encode2;
13349
+ url2 = url2 || "";
13142
13350
  const _options = utils_default.isFunction(options) ? {
13143
13351
  serialize: options
13144
13352
  } : options;
13145
- const serializeFn = _options && _options.serialize;
13353
+ const _encode = utils_default.getSafeProp(_options, "encode") || encode2;
13354
+ const serializeFn = utils_default.getSafeProp(_options, "serialize");
13146
13355
  let serializedParams;
13147
13356
  if (serializeFn) {
13148
13357
  serializedParams = serializeFn(params, _options);
@@ -13159,7 +13368,7 @@ function buildURL(url2, params, options) {
13159
13368
  return url2;
13160
13369
  }
13161
13370
 
13162
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/InterceptorManager.js
13371
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/InterceptorManager.js
13163
13372
  var InterceptorManager = class {
13164
13373
  constructor() {
13165
13374
  this.handlers = [];
@@ -13224,22 +13433,24 @@ var InterceptorManager = class {
13224
13433
  };
13225
13434
  var InterceptorManager_default = InterceptorManager;
13226
13435
 
13227
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/defaults/transitional.js
13436
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/transitional.js
13228
13437
  var transitional_default = {
13229
13438
  silentJSONParsing: true,
13230
13439
  forcedJSONParsing: true,
13231
13440
  clarifyTimeoutError: false,
13232
- legacyInterceptorReqResOrdering: true
13441
+ legacyInterceptorReqResOrdering: true,
13442
+ advertiseZstdAcceptEncoding: false,
13443
+ validateStatusUndefinedResolves: true
13233
13444
  };
13234
13445
 
13235
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/index.js
13446
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13236
13447
  import crypto from "crypto";
13237
13448
 
13238
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13449
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/classes/URLSearchParams.js
13239
13450
  import url from "url";
13240
13451
  var URLSearchParams_default = url.URLSearchParams;
13241
13452
 
13242
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/node/index.js
13453
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/node/index.js
13243
13454
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
13244
13455
  var DIGIT = "0123456789";
13245
13456
  var ALPHABET = {
@@ -13269,7 +13480,7 @@ var node_default = {
13269
13480
  protocols: ["http", "https", "file", "data"]
13270
13481
  };
13271
13482
 
13272
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/common/utils.js
13483
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/common/utils.js
13273
13484
  var utils_exports = {};
13274
13485
  __export(utils_exports, {
13275
13486
  hasBrowserEnv: () => hasBrowserEnv,
@@ -13287,13 +13498,13 @@ var hasStandardBrowserWebWorkerEnv = (() => {
13287
13498
  })();
13288
13499
  var origin = hasBrowserEnv && window.location.href || "http://localhost";
13289
13500
 
13290
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/platform/index.js
13501
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/platform/index.js
13291
13502
  var platform_default = {
13292
13503
  ...utils_exports,
13293
13504
  ...node_default
13294
13505
  };
13295
13506
 
13296
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/toURLEncodedForm.js
13507
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/toURLEncodedForm.js
13297
13508
  function toURLEncodedForm(data, options) {
13298
13509
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
13299
13510
  visitor: function(value, key, path, helpers) {
@@ -13307,11 +13518,25 @@ function toURLEncodedForm(data, options) {
13307
13518
  });
13308
13519
  }
13309
13520
 
13310
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToJSON.js
13521
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToJSON.js
13522
+ var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
13523
+ function throwIfDepthExceeded(index) {
13524
+ if (index > MAX_DEPTH) {
13525
+ throw new AxiosError_default(
13526
+ "FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH,
13527
+ AxiosError_default.ERR_FORM_DATA_DEPTH_EXCEEDED
13528
+ );
13529
+ }
13530
+ }
13311
13531
  function parsePropPath(name) {
13312
- return utils_default.matchAll(/\w+|\[(\w*)]/g, name).map((match) => {
13313
- return match[0] === "[]" ? "" : match[1] || match[0];
13314
- });
13532
+ const path = [];
13533
+ const pattern = /[^.[\]]+|\[([^.[\]]*)]/g;
13534
+ let match;
13535
+ while ((match = pattern.exec(name)) !== null) {
13536
+ throwIfDepthExceeded(path.length);
13537
+ path.push(match[0] === "[]" ? "" : match[1] || match[0]);
13538
+ }
13539
+ return path;
13315
13540
  }
13316
13541
  function arrayToObject(arr) {
13317
13542
  const obj = {};
@@ -13327,6 +13552,7 @@ function arrayToObject(arr) {
13327
13552
  }
13328
13553
  function formDataToJSON(formData) {
13329
13554
  function buildPath(path, value, target, index) {
13555
+ throwIfDepthExceeded(index);
13330
13556
  let name = path[index++];
13331
13557
  if (name === "__proto__") return true;
13332
13558
  const isNumericKey = Number.isFinite(+name);
@@ -13360,9 +13586,9 @@ function formDataToJSON(formData) {
13360
13586
  }
13361
13587
  var formDataToJSON_default = formDataToJSON;
13362
13588
 
13363
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/defaults/index.js
13589
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/defaults/index.js
13364
13590
  var own = (obj, key) => obj != null && utils_default.hasOwnProp(obj, key) ? obj[key] : void 0;
13365
- function stringifySafely(rawValue, parser, encoder) {
13591
+ function stringifySafely2(rawValue, parser, encoder) {
13366
13592
  if (utils_default.isString(rawValue)) {
13367
13593
  try {
13368
13594
  (parser || JSON.parse)(rawValue);
@@ -13418,7 +13644,7 @@ var defaults = {
13418
13644
  }
13419
13645
  if (isObjectPayload || hasJSONContentType) {
13420
13646
  headers.setContentType("application/json", false);
13421
- return stringifySafely(data);
13647
+ return stringifySafely2(data);
13422
13648
  }
13423
13649
  return data;
13424
13650
  }
@@ -13477,7 +13703,7 @@ utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "query"]
13477
13703
  });
13478
13704
  var defaults_default = defaults;
13479
13705
 
13480
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/transformData.js
13706
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/transformData.js
13481
13707
  function transformData(fns, response) {
13482
13708
  const config = this || defaults_default;
13483
13709
  const context = response || config;
@@ -13490,12 +13716,12 @@ function transformData(fns, response) {
13490
13716
  return data;
13491
13717
  }
13492
13718
 
13493
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/isCancel.js
13719
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/isCancel.js
13494
13720
  function isCancel(value) {
13495
13721
  return !!(value && value.__CANCEL__);
13496
13722
  }
13497
13723
 
13498
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/CanceledError.js
13724
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CanceledError.js
13499
13725
  var CanceledError = class extends AxiosError_default {
13500
13726
  /**
13501
13727
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -13514,7 +13740,7 @@ var CanceledError = class extends AxiosError_default {
13514
13740
  };
13515
13741
  var CanceledError_default = CanceledError;
13516
13742
 
13517
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/settle.js
13743
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/settle.js
13518
13744
  function settle(resolve, reject, response) {
13519
13745
  const validateStatus2 = response.config.validateStatus;
13520
13746
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
@@ -13530,7 +13756,7 @@ function settle(resolve, reject, response) {
13530
13756
  }
13531
13757
  }
13532
13758
 
13533
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isAbsoluteURL.js
13759
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAbsoluteURL.js
13534
13760
  function isAbsoluteURL(url2) {
13535
13761
  if (typeof url2 !== "string") {
13536
13762
  return false;
@@ -13538,15 +13764,69 @@ function isAbsoluteURL(url2) {
13538
13764
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url2);
13539
13765
  }
13540
13766
 
13541
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/combineURLs.js
13767
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/combineURLs.js
13542
13768
  function combineURLs(baseURL, relativeURL) {
13543
- return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
13769
+ if (!relativeURL) {
13770
+ return baseURL;
13771
+ }
13772
+ let end = baseURL.length;
13773
+ while (end > 0 && baseURL.charCodeAt(end - 1) === 47) {
13774
+ end--;
13775
+ }
13776
+ return baseURL.slice(0, end) + "/" + relativeURL.replace(/^\/+/, "");
13544
13777
  }
13545
13778
 
13546
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/buildFullPath.js
13547
- function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
13779
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/buildFullPath.js
13780
+ var malformedHttpProtocol = /^https?:(?!\/\/)/i;
13781
+ var httpProtocolControlCharacters = /[\t\n\r]/g;
13782
+ function stripLeadingC0ControlOrSpace(url2) {
13783
+ let i = 0;
13784
+ while (i < url2.length && url2.charCodeAt(i) <= 32) {
13785
+ i++;
13786
+ }
13787
+ return url2.slice(i);
13788
+ }
13789
+ function normalizeURLForProtocolCheck(url2) {
13790
+ return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
13791
+ }
13792
+ function redactFragment(fragment) {
13793
+ if (!fragment) {
13794
+ return fragment;
13795
+ }
13796
+ return fragment.replace(/(^|&)([^=&]*=)?[^&]+/g, (match, separator, parameterName = "") => {
13797
+ return `${separator}${parameterName}${REDACTED}`;
13798
+ });
13799
+ }
13800
+ function redactSensitiveURLParts(url2) {
13801
+ const redactedURL = url2.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${REDACTED}@`);
13802
+ const fragmentIndex = redactedURL.indexOf("#");
13803
+ const urlWithoutFragment = fragmentIndex === -1 ? redactedURL : redactedURL.slice(0, fragmentIndex);
13804
+ const redactedURLWithoutFragment = urlWithoutFragment.replace(
13805
+ /([?&][^=&#]*=)[^&#]*/g,
13806
+ `$1${REDACTED}`
13807
+ );
13808
+ if (fragmentIndex === -1) {
13809
+ return redactedURLWithoutFragment;
13810
+ }
13811
+ return `${redactedURLWithoutFragment}#${redactFragment(redactedURL.slice(fragmentIndex + 1))}`;
13812
+ }
13813
+ function assertValidHttpProtocolURL(url2, config) {
13814
+ if (typeof url2 === "string") {
13815
+ const normalizedURL = normalizeURLForProtocolCheck(url2);
13816
+ if (malformedHttpProtocol.test(normalizedURL)) {
13817
+ throw new AxiosError_default(
13818
+ `Invalid URL ${JSON.stringify(redactSensitiveURLParts(normalizedURL))}: missing "//" after protocol`,
13819
+ AxiosError_default.ERR_INVALID_URL,
13820
+ config
13821
+ );
13822
+ }
13823
+ }
13824
+ }
13825
+ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
13826
+ assertValidHttpProtocolURL(requestedURL, config);
13548
13827
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
13549
13828
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
13829
+ assertValidHttpProtocolURL(baseURL, config);
13550
13830
  return combineURLs(baseURL, requestedURL);
13551
13831
  }
13552
13832
  return requestedURL;
@@ -13619,26 +13899,26 @@ function getEnv(key) {
13619
13899
  return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
13620
13900
  }
13621
13901
 
13622
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
13902
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13623
13903
  var import_https_proxy_agent = __toESM(require_dist(), 1);
13624
13904
  var import_follow_redirects = __toESM(require_follow_redirects(), 1);
13625
13905
  import http from "http";
13626
13906
  import https from "https";
13627
- import http2 from "http2";
13628
- import util2 from "util";
13907
+ import http22 from "http2";
13908
+ import util3 from "util";
13629
13909
  import { resolve as resolvePath } from "path";
13630
13910
  import zlib from "zlib";
13631
13911
 
13632
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/env/data.js
13633
- var VERSION = "1.16.1";
13912
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/env/data.js
13913
+ var VERSION = "1.19.0";
13634
13914
 
13635
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/parseProtocol.js
13915
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/parseProtocol.js
13636
13916
  function parseProtocol(url2) {
13637
13917
  const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
13638
13918
  return match && match[1] || "";
13639
13919
  }
13640
13920
 
13641
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/fromDataURI.js
13921
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/fromDataURI.js
13642
13922
  var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
13643
13923
  function fromDataURI(uri, asBlob, options) {
13644
13924
  const _Blob = options && options.Blob || platform_default.classes.Blob;
@@ -13656,13 +13936,13 @@ function fromDataURI(uri, asBlob, options) {
13656
13936
  const params = match[2];
13657
13937
  const encoding = match[3] ? "base64" : "utf8";
13658
13938
  const body = match[4];
13659
- let mime;
13939
+ let mime = "";
13660
13940
  if (type) {
13661
13941
  mime = params ? type + params : type;
13662
13942
  } else if (params) {
13663
13943
  mime = "text/plain" + params;
13664
13944
  }
13665
- const buffer = Buffer.from(decodeURIComponent(body), encoding);
13945
+ const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
13666
13946
  if (asBlob) {
13667
13947
  if (!_Blob) {
13668
13948
  throw new AxiosError_default("Blob is not supported", AxiosError_default.ERR_NOT_SUPPORT);
@@ -13674,10 +13954,24 @@ function fromDataURI(uri, asBlob, options) {
13674
13954
  throw new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_NOT_SUPPORT);
13675
13955
  }
13676
13956
 
13677
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
13957
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13678
13958
  import stream3 from "stream";
13679
13959
 
13680
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/AxiosTransformStream.js
13960
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/setFormDataHeaders.js
13961
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
13962
+ function setFormDataHeaders(headers, formHeaders, policy) {
13963
+ if (policy !== "content-only") {
13964
+ headers.set(formHeaders);
13965
+ return;
13966
+ }
13967
+ Object.entries(formHeaders || {}).forEach(([key, val]) => {
13968
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
13969
+ headers.set(key, val);
13970
+ }
13971
+ });
13972
+ }
13973
+
13974
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/AxiosTransformStream.js
13681
13975
  import stream from "stream";
13682
13976
  var kInternals = /* @__PURE__ */ Symbol("internals");
13683
13977
  var AxiosTransformStream = class extends stream.Transform {
@@ -13800,14 +14094,14 @@ var AxiosTransformStream = class extends stream.Transform {
13800
14094
  };
13801
14095
  var AxiosTransformStream_default = AxiosTransformStream;
13802
14096
 
13803
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
14097
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
13804
14098
  import { EventEmitter } from "events";
13805
14099
 
13806
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToStream.js
14100
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13807
14101
  import util from "util";
13808
14102
  import { Readable } from "stream";
13809
14103
 
13810
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/readBlob.js
14104
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/readBlob.js
13811
14105
  var { asyncIterator } = Symbol;
13812
14106
  var readBlob = async function* (blob) {
13813
14107
  if (blob.stream) {
@@ -13822,7 +14116,7 @@ var readBlob = async function* (blob) {
13822
14116
  };
13823
14117
  var readBlob_default = readBlob;
13824
14118
 
13825
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/formDataToStream.js
14119
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/formDataToStream.js
13826
14120
  var BOUNDARY_ALPHABET = platform_default.ALPHABET.ALPHA_DIGIT + "-_";
13827
14121
  var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
13828
14122
  var CRLF = "\r\n";
@@ -13873,10 +14167,10 @@ var formDataToStream = (form, headersHandler, options) => {
13873
14167
  boundary = tag + "-" + platform_default.generateString(size, BOUNDARY_ALPHABET)
13874
14168
  } = options || {};
13875
14169
  if (!utils_default.isFormData(form)) {
13876
- throw TypeError("FormData instance required");
14170
+ throw new TypeError("FormData instance required");
13877
14171
  }
13878
14172
  if (boundary.length < 1 || boundary.length > 70) {
13879
- throw Error("boundary must be 1-70 characters long");
14173
+ throw new Error("boundary must be 1-70 characters long");
13880
14174
  }
13881
14175
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
13882
14176
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -13907,7 +14201,7 @@ var formDataToStream = (form, headersHandler, options) => {
13907
14201
  };
13908
14202
  var formDataToStream_default = formDataToStream;
13909
14203
 
13910
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
14204
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js
13911
14205
  import stream2 from "stream";
13912
14206
  var ZlibHeaderTransformStream = class extends stream2.Transform {
13913
14207
  __transform(chunk, encoding, callback) {
@@ -13929,7 +14223,88 @@ var ZlibHeaderTransformStream = class extends stream2.Transform {
13929
14223
  };
13930
14224
  var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
13931
14225
 
13932
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/callbackify.js
14226
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/Http2Sessions.js
14227
+ import http2 from "http2";
14228
+ import util2 from "util";
14229
+ var Http2Sessions = class {
14230
+ constructor() {
14231
+ this.sessions = /* @__PURE__ */ Object.create(null);
14232
+ }
14233
+ getSession(authority, options) {
14234
+ options = Object.assign(
14235
+ {
14236
+ sessionTimeout: 1e3
14237
+ },
14238
+ options
14239
+ );
14240
+ let authoritySessions = this.sessions[authority];
14241
+ if (authoritySessions) {
14242
+ let len = authoritySessions.length;
14243
+ for (let i = 0; i < len; i++) {
14244
+ const [sessionHandle, sessionOptions] = authoritySessions[i];
14245
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14246
+ return sessionHandle;
14247
+ }
14248
+ }
14249
+ }
14250
+ const session = http2.connect(authority, options);
14251
+ let removed;
14252
+ let timer;
14253
+ const removeSession = () => {
14254
+ if (removed) {
14255
+ return;
14256
+ }
14257
+ removed = true;
14258
+ if (timer) {
14259
+ clearTimeout(timer);
14260
+ timer = null;
14261
+ }
14262
+ let entries = authoritySessions, len = entries.length, i = len;
14263
+ while (i--) {
14264
+ if (entries[i][0] === session) {
14265
+ if (len === 1) {
14266
+ delete this.sessions[authority];
14267
+ } else {
14268
+ entries.splice(i, 1);
14269
+ }
14270
+ if (!session.closed) {
14271
+ session.close();
14272
+ }
14273
+ return;
14274
+ }
14275
+ }
14276
+ };
14277
+ const originalRequestFn = session.request;
14278
+ const { sessionTimeout } = options;
14279
+ if (sessionTimeout != null) {
14280
+ let streamsCount = 0;
14281
+ session.request = function() {
14282
+ const stream4 = originalRequestFn.apply(this, arguments);
14283
+ streamsCount++;
14284
+ if (timer) {
14285
+ clearTimeout(timer);
14286
+ timer = null;
14287
+ }
14288
+ stream4.once("close", () => {
14289
+ if (!--streamsCount) {
14290
+ timer = setTimeout(() => {
14291
+ timer = null;
14292
+ removeSession();
14293
+ }, sessionTimeout);
14294
+ }
14295
+ });
14296
+ return stream4;
14297
+ };
14298
+ }
14299
+ session.once("close", removeSession);
14300
+ let entry = [session, options];
14301
+ authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14302
+ return session;
14303
+ }
14304
+ };
14305
+ var Http2Sessions_default = Http2Sessions;
14306
+
14307
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/callbackify.js
13933
14308
  var callbackify = (fn, reducer) => {
13934
14309
  return utils_default.isAsyncFn(fn) ? function(...args) {
13935
14310
  const cb = args.pop();
@@ -13944,14 +14319,84 @@ var callbackify = (fn, reducer) => {
13944
14319
  };
13945
14320
  var callbackify_default = callbackify;
13946
14321
 
13947
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/shouldBypassProxy.js
13948
- var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
14322
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/shouldBypassProxy.js
14323
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
13949
14324
  var isIPv4Loopback = (host) => {
13950
14325
  const parts = host.split(".");
13951
14326
  if (parts.length !== 4) return false;
13952
14327
  if (parts[0] !== "127") return false;
13953
14328
  return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
13954
14329
  };
14330
+ var parseIPv4Octet = (text) => {
14331
+ if (/^0[xX][0-9a-fA-F]+$/.test(text)) {
14332
+ const n = parseInt(text.slice(2), 16);
14333
+ return Number.isFinite(n) ? n : null;
14334
+ }
14335
+ if (text.length > 1 && /^0[0-7]+$/.test(text)) {
14336
+ const n = parseInt(text, 8);
14337
+ return Number.isFinite(n) ? n : null;
14338
+ }
14339
+ if (text.length > 1 && /^0[0-9]+$/.test(text)) {
14340
+ return null;
14341
+ }
14342
+ if (/^[0-9]+$/.test(text)) {
14343
+ const n = parseInt(text, 10);
14344
+ return Number.isFinite(n) ? n : null;
14345
+ }
14346
+ return null;
14347
+ };
14348
+ var normalizeIPAddress = (host) => {
14349
+ if (typeof host !== "string" || !host || host.indexOf(":") !== -1) {
14350
+ return host;
14351
+ }
14352
+ let h = host;
14353
+ if (h.charAt(0) === "[" && h.charAt(h.length - 1) === "]") {
14354
+ h = h.slice(1, -1);
14355
+ }
14356
+ h = h.replace(/\.+$/, "");
14357
+ if (!/^[0-9.xXa-fA-F]+$/.test(h)) return host;
14358
+ const parts = h.split(".");
14359
+ if (parts.some((p) => p === "")) return host;
14360
+ if (parts.length === 4) {
14361
+ const octets = parts.map(parseIPv4Octet);
14362
+ if (octets.some((n) => n === null || n < 0 || n > 255)) return host;
14363
+ return octets.join(".");
14364
+ }
14365
+ if (parts.length > 4) {
14366
+ return host;
14367
+ }
14368
+ if (parts.length === 1) return host;
14369
+ const literalOctets = parts.slice(0, -1);
14370
+ const tail = parts[parts.length - 1];
14371
+ const tailSlots = 4 - literalOctets.length;
14372
+ const tailValue = parseIPv4Octet(tail);
14373
+ if (tailValue === null) return host;
14374
+ const maxTail = (1 << 8 * tailSlots) - 1;
14375
+ if (tailValue < 0 || tailValue > maxTail) return host;
14376
+ const tailOctets = new Array(tailSlots).fill(0);
14377
+ for (let i = tailSlots - 1, v = tailValue; i >= 0; i--, v >>= 8) {
14378
+ tailOctets[i] = v & 255;
14379
+ }
14380
+ const literal = literalOctets.map(parseIPv4Octet);
14381
+ if (literal.some((n) => n === null || n < 0 || n > 255)) return host;
14382
+ return [...literal, ...tailOctets].join(".");
14383
+ };
14384
+ var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
14385
+ var isIPv6Unspecified = (host) => {
14386
+ if (host === "::") return true;
14387
+ const compressionIndex = host.indexOf("::");
14388
+ if (compressionIndex !== -1) {
14389
+ if (compressionIndex !== host.lastIndexOf("::")) return false;
14390
+ const left = host.slice(0, compressionIndex);
14391
+ const right = host.slice(compressionIndex + 2);
14392
+ const leftGroups = left ? left.split(":") : [];
14393
+ const rightGroups = right ? right.split(":") : [];
14394
+ const explicitGroups = leftGroups.length + rightGroups.length;
14395
+ return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
14396
+ }
14397
+ const groups = host.split(":");
14398
+ return groups.length === 8 && groups.every(isIPv6ZeroGroup);
14399
+ };
13955
14400
  var isIPv6Loopback = (host) => {
13956
14401
  if (host === "::1") return true;
13957
14402
  const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
@@ -13974,6 +14419,7 @@ var isLoopback = (host) => {
13974
14419
  if (!host) return false;
13975
14420
  if (LOOPBACK_HOSTNAMES.has(host)) return true;
13976
14421
  if (isIPv4Loopback(host)) return true;
14422
+ if (isIPv6Unspecified(host)) return true;
13977
14423
  return isIPv6Loopback(host);
13978
14424
  };
13979
14425
  var DEFAULT_PORTS2 = {
@@ -14026,7 +14472,12 @@ var normalizeNoProxyHost = (hostname) => {
14026
14472
  if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
14027
14473
  hostname = hostname.slice(1, -1);
14028
14474
  }
14029
- return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
14475
+ const trimmed = hostname.replace(/\.+$/, "");
14476
+ const ipv4 = normalizeIPAddress(trimmed);
14477
+ if (ipv4 !== trimmed) {
14478
+ return ipv4;
14479
+ }
14480
+ return unmapIPv4MappedIPv6(trimmed);
14030
14481
  };
14031
14482
  function shouldBypassProxy(location) {
14032
14483
  let parsed;
@@ -14048,6 +14499,9 @@ function shouldBypassProxy(location) {
14048
14499
  if (!entry) {
14049
14500
  return false;
14050
14501
  }
14502
+ if (entry === "*") {
14503
+ return true;
14504
+ }
14051
14505
  let [entryHost, entryPort] = parseNoProxyEntry(entry);
14052
14506
  entryHost = normalizeNoProxyHost(entryHost);
14053
14507
  if (!entryHost) {
@@ -14066,7 +14520,7 @@ function shouldBypassProxy(location) {
14066
14520
  });
14067
14521
  }
14068
14522
 
14069
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/speedometer.js
14523
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/speedometer.js
14070
14524
  function speedometer(samplesCount, min) {
14071
14525
  samplesCount = samplesCount || 10;
14072
14526
  const bytes = new Array(samplesCount);
@@ -14102,7 +14556,7 @@ function speedometer(samplesCount, min) {
14102
14556
  }
14103
14557
  var speedometer_default = speedometer;
14104
14558
 
14105
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/throttle.js
14559
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/throttle.js
14106
14560
  function throttle(fn, freq) {
14107
14561
  let timestamp = 0;
14108
14562
  let threshold = 1e3 / freq;
@@ -14137,7 +14591,7 @@ function throttle(fn, freq) {
14137
14591
  }
14138
14592
  var throttle_default = throttle;
14139
14593
 
14140
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/progressEventReducer.js
14594
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/progressEventReducer.js
14141
14595
  var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
14142
14596
  let bytesNotified = 0;
14143
14597
  const _speedometer = speedometer_default(50, 250);
@@ -14147,7 +14601,7 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
14147
14601
  }
14148
14602
  const rawLoaded = e.loaded;
14149
14603
  const total = e.lengthComputable ? e.total : void 0;
14150
- const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
14604
+ const loaded = Math.max(0, total != null ? Math.min(rawLoaded, total) : rawLoaded);
14151
14605
  const progressBytes = Math.max(0, loaded - bytesNotified);
14152
14606
  const rate = _speedometer(progressBytes);
14153
14607
  bytesNotified = Math.max(bytesNotified, loaded);
@@ -14176,10 +14630,66 @@ var progressEventDecorator = (total, throttled) => {
14176
14630
  throttled[1]
14177
14631
  ];
14178
14632
  };
14179
- var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
14633
+ var asyncDecorator = (fn, scheduler = utils_default.asap) => (...args) => scheduler(() => fn(...args));
14180
14634
 
14181
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
14182
- function estimateDataURLDecodedBytes(url2) {
14635
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js
14636
+ var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
14637
+ var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
14638
+ var hexValue = (charCode) => charCode <= 57 ? charCode - 48 : (charCode & 223) - 55;
14639
+ var isBase64Char = (charCode) => charCode >= 65 && charCode <= 90 || // A-Z
14640
+ charCode >= 97 && charCode <= 122 || // a-z
14641
+ charCode >= 48 && charCode <= 57 || // 0-9
14642
+ charCode === 43 || // +
14643
+ charCode === 47 || // /
14644
+ charCode === 45 || // - (base64url)
14645
+ charCode === 95;
14646
+ var isBase64Whitespace = (charCode) => charCode === 9 || charCode === 10 || charCode === 12 || charCode === 13 || charCode === 32;
14647
+ var base64Bytes = (significant) => {
14648
+ const groups = Math.floor(significant / 4);
14649
+ const remainder = significant % 4;
14650
+ return groups * 3 + (remainder === 2 ? 1 : remainder === 3 ? 2 : 0);
14651
+ };
14652
+ var estimateBase64BufferAllocation = (body) => {
14653
+ const len = body.length;
14654
+ let padding = 0;
14655
+ if (len > 0 && body.charCodeAt(len - 1) === 61) {
14656
+ padding++;
14657
+ if (len > 1 && body.charCodeAt(len - 2) === 61) {
14658
+ padding++;
14659
+ }
14660
+ }
14661
+ return Math.floor((len - padding) * 3 / 4);
14662
+ };
14663
+ var estimatePercentDecodedBase64Bytes = (body) => {
14664
+ const len = body.length;
14665
+ let significant = 0;
14666
+ let padding = 0;
14667
+ let invalid = false;
14668
+ for (let i = 0; i < len; i++) {
14669
+ let code = body.charCodeAt(i);
14670
+ if (code === 37 && isPercentEncodedByte(body, i, len)) {
14671
+ code = hexValue(body.charCodeAt(i + 1)) * 16 + hexValue(body.charCodeAt(i + 2));
14672
+ i += 2;
14673
+ }
14674
+ if (isBase64Whitespace(code)) {
14675
+ continue;
14676
+ }
14677
+ if (code === 61) {
14678
+ padding++;
14679
+ continue;
14680
+ }
14681
+ if (!isBase64Char(code) || padding > 0) {
14682
+ invalid = true;
14683
+ continue;
14684
+ }
14685
+ significant++;
14686
+ }
14687
+ if (invalid || padding > 2 || padding > 0 && (significant + padding) % 4 !== 0 || significant % 4 === 1) {
14688
+ return estimateBase64BufferAllocation(body);
14689
+ }
14690
+ return base64Bytes(significant);
14691
+ };
14692
+ var estimateDataURLBytes = (url2, estimateBase64) => {
14183
14693
  if (!url2 || typeof url2 !== "string") return 0;
14184
14694
  if (!url2.startsWith("data:")) return 0;
14185
14695
  const comma = url2.indexOf(",");
@@ -14188,51 +14698,15 @@ function estimateDataURLDecodedBytes(url2) {
14188
14698
  const body = url2.slice(comma + 1);
14189
14699
  const isBase64 = /;base64/i.test(meta);
14190
14700
  if (isBase64) {
14191
- let effectiveLen = body.length;
14192
- const len = body.length;
14193
- for (let i = 0; i < len; i++) {
14194
- if (body.charCodeAt(i) === 37 && i + 2 < len) {
14195
- const a = body.charCodeAt(i + 1);
14196
- const b = body.charCodeAt(i + 2);
14197
- 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);
14198
- if (isHex) {
14199
- effectiveLen -= 2;
14200
- i += 2;
14201
- }
14202
- }
14203
- }
14204
- let pad = 0;
14205
- let idx = len - 1;
14206
- const tailIsPct3D = (j) => j >= 2 && body.charCodeAt(j - 2) === 37 && // '%'
14207
- body.charCodeAt(j - 1) === 51 && // '3'
14208
- (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100);
14209
- if (idx >= 0) {
14210
- if (body.charCodeAt(idx) === 61) {
14211
- pad++;
14212
- idx--;
14213
- } else if (tailIsPct3D(idx)) {
14214
- pad++;
14215
- idx -= 3;
14216
- }
14217
- }
14218
- if (pad === 1 && idx >= 0) {
14219
- if (body.charCodeAt(idx) === 61) {
14220
- pad++;
14221
- } else if (tailIsPct3D(idx)) {
14222
- pad++;
14223
- }
14224
- }
14225
- const groups = Math.floor(effectiveLen / 4);
14226
- const bytes2 = groups * 3 - (pad || 0);
14227
- return bytes2 > 0 ? bytes2 : 0;
14228
- }
14229
- if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
14230
- return Buffer.byteLength(body, "utf8");
14701
+ return estimateBase64(body);
14231
14702
  }
14232
14703
  let bytes = 0;
14233
14704
  for (let i = 0, len = body.length; i < len; i++) {
14234
14705
  const c = body.charCodeAt(i);
14235
- if (c < 128) {
14706
+ if (c === 37 && isPercentEncodedByte(body, i, len)) {
14707
+ bytes += 1;
14708
+ i += 2;
14709
+ } else if (c < 128) {
14236
14710
  bytes += 1;
14237
14711
  } else if (c < 2048) {
14238
14712
  bytes += 2;
@@ -14249,9 +14723,19 @@ function estimateDataURLDecodedBytes(url2) {
14249
14723
  }
14250
14724
  }
14251
14725
  return bytes;
14726
+ };
14727
+ function estimateDataURLDecodedBytes(url2) {
14728
+ const fragmentIndex = typeof url2 === "string" ? url2.indexOf("#") : -1;
14729
+ return estimateDataURLBytes(
14730
+ fragmentIndex === -1 ? url2 : url2.slice(0, fragmentIndex),
14731
+ estimatePercentDecodedBase64Bytes
14732
+ );
14733
+ }
14734
+ function estimateDataURLBufferAllocation(url2) {
14735
+ return estimateDataURLBytes(url2, estimateBase64BufferAllocation);
14252
14736
  }
14253
14737
 
14254
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/http.js
14738
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/http.js
14255
14739
  var zlibOptions = {
14256
14740
  flush: zlib.constants.Z_SYNC_FLUSH,
14257
14741
  finishFlush: zlib.constants.Z_SYNC_FLUSH
@@ -14260,26 +14744,51 @@ var brotliOptions = {
14260
14744
  flush: zlib.constants.BROTLI_OPERATION_FLUSH,
14261
14745
  finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
14262
14746
  };
14747
+ var zstdOptions = {
14748
+ flush: zlib.constants.ZSTD_e_flush,
14749
+ finishFlush: zlib.constants.ZSTD_e_flush
14750
+ };
14263
14751
  var isBrotliSupported = utils_default.isFunction(zlib.createBrotliDecompress);
14752
+ var isZstdSupported = utils_default.isFunction(zlib.createZstdDecompress);
14753
+ var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
14754
+ var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
14755
+ var scheduleProgress = typeof process !== "undefined" && process.nextTick ? process.nextTick.bind(process) : utils_default.asap;
14264
14756
  var { http: httpFollow, https: httpsFollow } = import_follow_redirects.default;
14265
14757
  var isHttps = /https:?/;
14266
- var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
14267
- function setFormDataHeaders(headers, formHeaders, policy) {
14268
- if (policy !== "content-only") {
14269
- headers.set(formHeaders);
14270
- return;
14271
- }
14272
- Object.entries(formHeaders).forEach(([key, val]) => {
14273
- if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
14274
- headers.set(key, val);
14275
- }
14276
- });
14277
- }
14278
14758
  var kAxiosSocketListener = /* @__PURE__ */ Symbol("axios.http.socketListener");
14279
14759
  var kAxiosCurrentReq = /* @__PURE__ */ Symbol("axios.http.currentReq");
14280
14760
  var kAxiosInstalledTunnel = /* @__PURE__ */ Symbol("axios.http.installedTunnel");
14281
14761
  var tunnelingAgentCache = /* @__PURE__ */ new Map();
14282
14762
  var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
14763
+ var NODE_NATIVE_ENV_PROXY_SUPPORT = {
14764
+ 22: 21,
14765
+ 24: 5
14766
+ };
14767
+ function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
14768
+ if (!nodeVersion) {
14769
+ return false;
14770
+ }
14771
+ const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
14772
+ if (!Number.isInteger(major) || !Number.isInteger(minor)) {
14773
+ return false;
14774
+ }
14775
+ if (major > 24) {
14776
+ return true;
14777
+ }
14778
+ return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
14779
+ }
14780
+ function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
14781
+ if (!isNodeNativeEnvProxySupported(nodeVersion)) {
14782
+ return false;
14783
+ }
14784
+ const agentOptions = agent && agent.options;
14785
+ return Boolean(
14786
+ agentOptions && utils_default.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null
14787
+ );
14788
+ }
14789
+ function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
14790
+ return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
14791
+ }
14283
14792
  function getTunnelingAgent(agentOptions, userHttpsAgent) {
14284
14793
  const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
14285
14794
  const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
@@ -14287,6 +14796,13 @@ function getTunnelingAgent(agentOptions, userHttpsAgent) {
14287
14796
  if (agent) return agent;
14288
14797
  const merged = userHttpsAgent && userHttpsAgent.options ? { ...userHttpsAgent.options, ...agentOptions } : agentOptions;
14289
14798
  agent = new import_https_proxy_agent.default(merged);
14799
+ if (userHttpsAgent && userHttpsAgent.options) {
14800
+ const originTLSOptions = { ...userHttpsAgent.options };
14801
+ const callback = agent.callback;
14802
+ agent.callback = function axiosTunnelingAgentCallback(req, opts) {
14803
+ return callback.call(this, req, { ...originTLSOptions, ...opts });
14804
+ };
14805
+ }
14290
14806
  agent[kAxiosInstalledTunnel] = true;
14291
14807
  cache.set(key, agent);
14292
14808
  return agent;
@@ -14308,90 +14824,45 @@ var flushOnFinish = (stream4, [throttled, flush]) => {
14308
14824
  stream4.on("end", flush).on("error", flush);
14309
14825
  return throttled;
14310
14826
  };
14311
- var Http2Sessions = class {
14312
- constructor() {
14313
- this.sessions = /* @__PURE__ */ Object.create(null);
14314
- }
14315
- getSession(authority, options) {
14316
- options = Object.assign(
14317
- {
14318
- sessionTimeout: 1e3
14319
- },
14320
- options
14321
- );
14322
- let authoritySessions = this.sessions[authority];
14323
- if (authoritySessions) {
14324
- let len = authoritySessions.length;
14325
- for (let i = 0; i < len; i++) {
14326
- const [sessionHandle, sessionOptions] = authoritySessions[i];
14327
- if (!sessionHandle.destroyed && !sessionHandle.closed && util2.isDeepStrictEqual(sessionOptions, options)) {
14328
- return sessionHandle;
14329
- }
14330
- }
14331
- }
14332
- const session = http2.connect(authority, options);
14333
- let removed;
14334
- const removeSession = () => {
14335
- if (removed) {
14336
- return;
14337
- }
14338
- removed = true;
14339
- let entries = authoritySessions, len = entries.length, i = len;
14340
- while (i--) {
14341
- if (entries[i][0] === session) {
14342
- if (len === 1) {
14343
- delete this.sessions[authority];
14344
- } else {
14345
- entries.splice(i, 1);
14346
- }
14347
- if (!session.closed) {
14348
- session.close();
14349
- }
14350
- return;
14351
- }
14352
- }
14353
- };
14354
- const originalRequestFn = session.request;
14355
- const { sessionTimeout } = options;
14356
- if (sessionTimeout != null) {
14357
- let timer;
14358
- let streamsCount = 0;
14359
- session.request = function() {
14360
- const stream4 = originalRequestFn.apply(this, arguments);
14361
- streamsCount++;
14362
- if (timer) {
14363
- clearTimeout(timer);
14364
- timer = null;
14365
- }
14366
- stream4.once("close", () => {
14367
- if (!--streamsCount) {
14368
- timer = setTimeout(() => {
14369
- timer = null;
14370
- removeSession();
14371
- }, sessionTimeout);
14372
- }
14373
- });
14374
- return stream4;
14375
- };
14376
- }
14377
- session.once("close", removeSession);
14378
- let entry = [session, options];
14379
- authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
14380
- return session;
14381
- }
14382
- };
14383
- var http2Sessions = new Http2Sessions();
14827
+ var http2Sessions = new Http2Sessions_default();
14384
14828
  function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
14385
14829
  if (options.beforeRedirects.proxy) {
14386
14830
  options.beforeRedirects.proxy(options);
14387
14831
  }
14832
+ if (options.beforeRedirects.auth) {
14833
+ options.beforeRedirects.auth(options);
14834
+ }
14835
+ if (options.beforeRedirects.sensitiveHeaders) {
14836
+ options.beforeRedirects.sensitiveHeaders(options, requestDetails);
14837
+ }
14388
14838
  if (options.beforeRedirects.config) {
14389
14839
  options.beforeRedirects.config(options, responseDetails, requestDetails);
14390
14840
  }
14391
14841
  }
14392
- function setProxy(options, configProxy, location, isRedirect, configHttpsAgent) {
14842
+ function stripMatchingHeaders(headers, sensitiveSet) {
14843
+ if (!headers) {
14844
+ return;
14845
+ }
14846
+ Object.keys(headers).forEach((header) => {
14847
+ if (sensitiveSet.has(header.toLowerCase())) {
14848
+ delete headers[header];
14849
+ }
14850
+ });
14851
+ }
14852
+ function isSameOriginRedirect(redirectOptions, requestDetails) {
14853
+ if (!requestDetails) {
14854
+ return false;
14855
+ }
14856
+ try {
14857
+ return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
14858
+ } catch (e) {
14859
+ return false;
14860
+ }
14861
+ }
14862
+ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
14393
14863
  let proxy = configProxy;
14394
- if (!proxy && proxy !== false) {
14864
+ const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
14865
+ if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
14395
14866
  const proxyUrl = getProxyForUrl(location);
14396
14867
  if (proxyUrl) {
14397
14868
  if (!shouldBypassProxy(location)) {
@@ -14482,7 +14953,14 @@ function setProxy(options, configProxy, location, isRedirect, configHttpsAgent)
14482
14953
  }
14483
14954
  }
14484
14955
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
14485
- setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent);
14956
+ setProxy(
14957
+ redirectOptions,
14958
+ configProxy,
14959
+ redirectOptions.href,
14960
+ true,
14961
+ configHttpsAgent,
14962
+ configHttpAgent
14963
+ );
14486
14964
  };
14487
14965
  }
14488
14966
  var isHttpAdapterSupported = typeof process !== "undefined" && utils_default.kindOf(process) === "process";
@@ -14521,7 +14999,7 @@ var http2Transport = {
14521
14999
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
14522
15000
  const { http2Options, headers } = options;
14523
15001
  const session = http2Sessions.getSession(authority, http2Options);
14524
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
15002
+ const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http22.constants;
14525
15003
  const http2Headers = {
14526
15004
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
14527
15005
  [HTTP2_HEADER_METHOD]: options.method,
@@ -14545,16 +15023,25 @@ var http2Transport = {
14545
15023
  };
14546
15024
  var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14547
15025
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
14548
- const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15026
+ const own2 = (key) => utils_default.getSafeProp(config, key);
15027
+ const transitional2 = own2("transitional") || transitional_default;
14549
15028
  let data = own2("data");
14550
15029
  let lookup = own2("lookup");
14551
15030
  let family = own2("family");
14552
15031
  let httpVersion = own2("httpVersion");
14553
15032
  if (httpVersion === void 0) httpVersion = 1;
14554
15033
  let http2Options = own2("http2Options");
15034
+ const httpAgent = own2("httpAgent");
15035
+ const httpsAgent = own2("httpsAgent");
15036
+ const configProxy = own2("proxy");
14555
15037
  const responseType = own2("responseType");
14556
15038
  const responseEncoding = own2("responseEncoding");
14557
- const method = config.method.toUpperCase();
15039
+ const socketPath = own2("socketPath");
15040
+ const method = own2("method").toUpperCase();
15041
+ const maxRedirects = own2("maxRedirects");
15042
+ const maxBodyLength = own2("maxBodyLength");
15043
+ const maxContentLength = own2("maxContentLength");
15044
+ const decompress = own2("decompress");
14558
15045
  let isDone;
14559
15046
  let rejected = false;
14560
15047
  let req;
@@ -14587,7 +15074,6 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14587
15074
  !reason || reason.type ? new CanceledError_default(null, config, req) : reason
14588
15075
  );
14589
15076
  } catch (err) {
14590
- console.warn("emit error", err);
14591
15077
  }
14592
15078
  }
14593
15079
  function clearConnectPhaseTimer() {
@@ -14597,10 +15083,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14597
15083
  }
14598
15084
  }
14599
15085
  function createTimeoutError() {
14600
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
14601
- const transitional2 = config.transitional || transitional_default;
14602
- if (config.timeoutErrorMessage) {
14603
- timeoutErrorMessage = config.timeoutErrorMessage;
15086
+ const configTimeout = own2("timeout");
15087
+ let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
15088
+ const configTimeoutErrorMessage = own2("timeoutErrorMessage");
15089
+ if (configTimeoutErrorMessage) {
15090
+ timeoutErrorMessage = configTimeoutErrorMessage;
14604
15091
  }
14605
15092
  return new AxiosError_default(
14606
15093
  timeoutErrorMessage,
@@ -14644,17 +15131,18 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14644
15131
  onFinished();
14645
15132
  }
14646
15133
  });
14647
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
14648
- const parsed = new URL(fullPath, platform_default.hasBrowserEnv ? platform_default.origin : void 0);
15134
+ const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
15135
+ const urlBase = socketPath ? "http://localhost" : platform_default.hasBrowserEnv ? platform_default.origin : void 0;
15136
+ const parsed = new URL(fullPath, urlBase);
14649
15137
  const protocol = parsed.protocol || supportedProtocols[0];
14650
15138
  if (protocol === "data:") {
14651
- if (config.maxContentLength > -1) {
14652
- const dataUrl = String(config.url || fullPath || "");
14653
- const estimated = estimateDataURLDecodedBytes(dataUrl);
14654
- if (estimated > config.maxContentLength) {
15139
+ if (maxContentLength > -1) {
15140
+ const dataUrl = String(own2("url") || fullPath || "");
15141
+ const estimated = estimateDataURLBufferAllocation(dataUrl);
15142
+ if (estimated > maxContentLength) {
14655
15143
  return reject(
14656
15144
  new AxiosError_default(
14657
- "maxContentLength size of " + config.maxContentLength + " exceeded",
15145
+ "maxContentLength size of " + maxContentLength + " exceeded",
14658
15146
  AxiosError_default.ERR_BAD_RESPONSE,
14659
15147
  config
14660
15148
  )
@@ -14671,7 +15159,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14671
15159
  });
14672
15160
  }
14673
15161
  try {
14674
- convertedData = fromDataURI(config.url, responseType === "blob", {
15162
+ convertedData = fromDataURI(own2("url"), responseType === "blob", {
14675
15163
  Blob: config.env && config.env.Blob
14676
15164
  });
14677
15165
  } catch (err) {
@@ -14720,7 +15208,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14720
15208
  setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
14721
15209
  if (!headers.hasContentLength()) {
14722
15210
  try {
14723
- const knownLength = await util2.promisify(data.getLength).call(data);
15211
+ const knownLength = await util3.promisify(data.getLength).call(data);
14724
15212
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
14725
15213
  } catch (e) {
14726
15214
  }
@@ -14745,7 +15233,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14745
15233
  );
14746
15234
  }
14747
15235
  headers.setContentLength(data.length, false);
14748
- if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
15236
+ if (maxBodyLength > -1 && data.length > maxBodyLength) {
14749
15237
  return reject(
14750
15238
  new AxiosError_default(
14751
15239
  "Request body larger than maxBodyLength limit",
@@ -14781,7 +15269,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14781
15269
  data,
14782
15270
  progressEventDecorator(
14783
15271
  contentLength,
14784
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
15272
+ progressEventReducer(asyncDecorator(onUploadProgress, scheduleProgress), false, 3)
14785
15273
  )
14786
15274
  )
14787
15275
  );
@@ -14789,11 +15277,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14789
15277
  let auth = void 0;
14790
15278
  const configAuth = own2("auth");
14791
15279
  if (configAuth) {
14792
- const username = configAuth.username || "";
14793
- const password = configAuth.password || "";
15280
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
15281
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
14794
15282
  auth = username + ":" + password;
14795
15283
  }
14796
- if (!auth && parsed.username) {
15284
+ if (!auth && (parsed.username || parsed.password)) {
14797
15285
  const urlUsername = decodeURIComponentSafe(parsed.username);
14798
15286
  const urlPassword = decodeURIComponentSafe(parsed.password);
14799
15287
  auth = urlUsername + ":" + urlPassword;
@@ -14803,26 +15291,27 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14803
15291
  try {
14804
15292
  path = buildURL(
14805
15293
  parsed.pathname + parsed.search,
14806
- config.params,
14807
- config.paramsSerializer
15294
+ own2("params"),
15295
+ own2("paramsSerializer")
14808
15296
  ).replace(/^\?/, "");
14809
15297
  } catch (err) {
14810
- const customErr = new Error(err.message);
14811
- customErr.config = config;
14812
- customErr.url = config.url;
14813
- customErr.exists = true;
14814
- return reject(customErr);
15298
+ return reject(
15299
+ AxiosError_default.from(err, AxiosError_default.ERR_BAD_REQUEST, config, null, null, {
15300
+ url: own2("url"),
15301
+ exists: true
15302
+ })
15303
+ );
14815
15304
  }
14816
15305
  headers.set(
14817
15306
  "Accept-Encoding",
14818
- "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
15307
+ utils_default.hasOwnProp(transitional2, "advertiseZstdAcceptEncoding") && transitional2.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING,
14819
15308
  false
14820
15309
  );
14821
15310
  const options = Object.assign(/* @__PURE__ */ Object.create(null), {
14822
15311
  path,
14823
15312
  method,
14824
15313
  headers: toByteStringHeaderObject(headers),
14825
- agents: { http: config.httpAgent, https: config.httpsAgent },
15314
+ agents: { http: httpAgent, https: httpsAgent },
14826
15315
  auth,
14827
15316
  protocol,
14828
15317
  family,
@@ -14831,45 +15320,48 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14831
15320
  http2Options
14832
15321
  });
14833
15322
  !utils_default.isUndefined(lookup) && (options.lookup = lookup);
14834
- if (config.socketPath) {
14835
- if (typeof config.socketPath !== "string") {
15323
+ if (socketPath) {
15324
+ if (typeof socketPath !== "string") {
14836
15325
  return reject(
14837
15326
  new AxiosError_default("socketPath must be a string", AxiosError_default.ERR_BAD_OPTION_VALUE, config)
14838
15327
  );
14839
15328
  }
14840
- if (config.allowedSocketPaths != null) {
14841
- const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
14842
- const resolvedSocket = resolvePath(config.socketPath);
15329
+ const allowedSocketPaths = own2("allowedSocketPaths");
15330
+ if (allowedSocketPaths != null) {
15331
+ const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
15332
+ const resolvedSocket = resolvePath(socketPath);
14843
15333
  const isAllowed = allowed.some(
14844
15334
  (entry) => typeof entry === "string" && resolvePath(entry) === resolvedSocket
14845
15335
  );
14846
15336
  if (!isAllowed) {
14847
15337
  return reject(
14848
15338
  new AxiosError_default(
14849
- `socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`,
15339
+ `socketPath "${socketPath}" is not permitted by allowedSocketPaths`,
14850
15340
  AxiosError_default.ERR_BAD_OPTION_VALUE,
14851
15341
  config
14852
15342
  )
14853
15343
  );
14854
15344
  }
14855
15345
  }
14856
- options.socketPath = config.socketPath;
15346
+ options.socketPath = socketPath;
14857
15347
  } else {
14858
15348
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
14859
15349
  options.port = parsed.port;
14860
15350
  setProxy(
14861
15351
  options,
14862
- config.proxy,
15352
+ configProxy,
14863
15353
  protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path,
14864
15354
  false,
14865
- config.httpsAgent
15355
+ httpsAgent,
15356
+ httpAgent
14866
15357
  );
14867
15358
  }
14868
15359
  let transport;
14869
15360
  let isNativeTransport = false;
15361
+ let transportEnforcesMaxBodyLength = false;
14870
15362
  const isHttpsRequest = isHttps.test(options.protocol);
14871
15363
  if (options.agent == null) {
14872
- options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
15364
+ options.agent = isHttpsRequest ? httpsAgent : httpAgent;
14873
15365
  }
14874
15366
  if (isHttp2) {
14875
15367
  transport = http2Transport;
@@ -14877,22 +15369,69 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14877
15369
  const configTransport = own2("transport");
14878
15370
  if (configTransport) {
14879
15371
  transport = configTransport;
14880
- } else if (config.maxRedirects === 0) {
15372
+ } else if (maxRedirects === 0) {
14881
15373
  transport = isHttpsRequest ? https : http;
14882
15374
  isNativeTransport = true;
14883
15375
  } else {
14884
- if (config.maxRedirects) {
14885
- options.maxRedirects = config.maxRedirects;
15376
+ transportEnforcesMaxBodyLength = true;
15377
+ options.sensitiveHeaders = [];
15378
+ if (maxRedirects) {
15379
+ options.maxRedirects = maxRedirects;
14886
15380
  }
14887
15381
  const configBeforeRedirect = own2("beforeRedirect");
14888
15382
  if (configBeforeRedirect) {
14889
15383
  options.beforeRedirects.config = configBeforeRedirect;
14890
15384
  }
15385
+ if (auth) {
15386
+ const requestOrigin = parsed.origin;
15387
+ const authToRestore = auth;
15388
+ options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
15389
+ try {
15390
+ if (new URL(redirectOptions.href).origin === requestOrigin) {
15391
+ redirectOptions.auth = authToRestore;
15392
+ }
15393
+ } catch (e) {
15394
+ }
15395
+ };
15396
+ }
15397
+ const sensitiveHeaders = own2("sensitiveHeaders");
15398
+ if (sensitiveHeaders != null) {
15399
+ if (!utils_default.isArray(sensitiveHeaders)) {
15400
+ return reject(
15401
+ new AxiosError_default(
15402
+ "sensitiveHeaders must be an array of strings",
15403
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15404
+ config
15405
+ )
15406
+ );
15407
+ }
15408
+ const sensitiveSet = /* @__PURE__ */ new Set();
15409
+ for (const header of sensitiveHeaders) {
15410
+ if (!utils_default.isString(header)) {
15411
+ return reject(
15412
+ new AxiosError_default(
15413
+ "sensitiveHeaders must be an array of strings",
15414
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
15415
+ config
15416
+ )
15417
+ );
15418
+ }
15419
+ sensitiveSet.add(header.toLowerCase());
15420
+ }
15421
+ if (sensitiveSet.size) {
15422
+ options.sensitiveHeaders = Array.from(sensitiveSet);
15423
+ options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
15424
+ if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
15425
+ stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
15426
+ }
15427
+ };
15428
+ }
15429
+ }
14891
15430
  transport = isHttpsRequest ? httpsFollow : httpFollow;
14892
15431
  }
14893
15432
  }
14894
- if (config.maxBodyLength > -1) {
14895
- options.maxBodyLength = config.maxBodyLength;
15433
+ if (maxBodyLength > -1) {
15434
+ options.maxBodyLength = maxBodyLength;
14896
15435
  } else {
14897
15436
  options.maxBodyLength = Infinity;
14898
15437
  }
@@ -14912,7 +15451,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14912
15451
  transformStream,
14913
15452
  progressEventDecorator(
14914
15453
  responseLength,
14915
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
15454
+ progressEventReducer(asyncDecorator(onDownloadProgress, scheduleProgress), true, 3)
14916
15455
  )
14917
15456
  )
14918
15457
  );
@@ -14920,7 +15459,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14920
15459
  }
14921
15460
  let responseStream = res;
14922
15461
  const lastRequest = res.req || req;
14923
- if (config.decompress !== false && res.headers["content-encoding"]) {
15462
+ if (decompress !== false && res.headers["content-encoding"]) {
14924
15463
  if (method === "HEAD" || res.statusCode === 204) {
14925
15464
  delete res.headers["content-encoding"];
14926
15465
  }
@@ -14943,6 +15482,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14943
15482
  streams.push(zlib.createBrotliDecompress(brotliOptions));
14944
15483
  delete res.headers["content-encoding"];
14945
15484
  }
15485
+ break;
15486
+ case "zstd":
15487
+ if (isZstdSupported) {
15488
+ streams.push(zlib.createZstdDecompress(zstdOptions));
15489
+ delete res.headers["content-encoding"];
15490
+ }
15491
+ break;
14946
15492
  }
14947
15493
  }
14948
15494
  responseStream = streams.length > 1 ? stream3.pipeline(streams, utils_default.noop) : streams[0];
@@ -14954,8 +15500,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14954
15500
  request: lastRequest
14955
15501
  };
14956
15502
  if (responseType === "stream") {
14957
- if (config.maxContentLength > -1) {
14958
- const limit = config.maxContentLength;
15503
+ if (maxContentLength > -1) {
15504
+ const limit = maxContentLength;
14959
15505
  const source = responseStream;
14960
15506
  async function* enforceMaxContentLength() {
14961
15507
  let totalResponseBytes = 0;
@@ -14984,12 +15530,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
14984
15530
  responseStream.on("data", function handleStreamData(chunk) {
14985
15531
  responseBuffer.push(chunk);
14986
15532
  totalResponseBytes += chunk.length;
14987
- if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
15533
+ if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
14988
15534
  rejected = true;
14989
15535
  responseStream.destroy();
14990
15536
  abort(
14991
15537
  new AxiosError_default(
14992
- "maxContentLength size of " + config.maxContentLength + " exceeded",
15538
+ "maxContentLength size of " + maxContentLength + " exceeded",
14993
15539
  AxiosError_default.ERR_BAD_RESPONSE,
14994
15540
  config,
14995
15541
  lastRequest
@@ -15050,7 +15596,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15050
15596
  });
15051
15597
  const boundSockets = /* @__PURE__ */ new Set();
15052
15598
  req.on("socket", function handleRequestSocket(socket) {
15053
- socket.setKeepAlive(true, 1e3 * 60);
15599
+ if (typeof socket.setKeepAlive === "function") {
15600
+ socket.setKeepAlive(true, 1e3 * 60);
15601
+ }
15054
15602
  if (!socket[kAxiosSocketListener]) {
15055
15603
  socket.on("error", function handleSocketError(err) {
15056
15604
  const current = socket[kAxiosCurrentReq];
@@ -15072,8 +15620,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15072
15620
  }
15073
15621
  boundSockets.clear();
15074
15622
  });
15075
- if (config.timeout) {
15076
- const timeout = parseInt(config.timeout, 10);
15623
+ if (own2("timeout")) {
15624
+ const timeout = parseInt(own2("timeout"), 10);
15077
15625
  if (Number.isNaN(timeout)) {
15078
15626
  abort(
15079
15627
  new AxiosError_default(
@@ -15112,8 +15660,8 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15112
15660
  }
15113
15661
  });
15114
15662
  let uploadStream = data;
15115
- if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
15116
- const limit = config.maxBodyLength;
15663
+ if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
15664
+ const limit = maxBodyLength;
15117
15665
  let bytesSent = 0;
15118
15666
  uploadStream = stream3.pipeline(
15119
15667
  [
@@ -15149,7 +15697,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
15149
15697
  });
15150
15698
  };
15151
15699
 
15152
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isURLSameOrigin.js
15700
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isURLSameOrigin.js
15153
15701
  var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
15154
15702
  url2 = new URL(url2, platform_default.origin);
15155
15703
  return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
@@ -15158,7 +15706,7 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
15158
15706
  platform_default.navigator && /(msie|trident)/i.test(platform_default.navigator.userAgent)
15159
15707
  ) : () => true;
15160
15708
 
15161
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/cookies.js
15709
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/cookies.js
15162
15710
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
15163
15711
  // Standard browser envs support document.cookie
15164
15712
  {
@@ -15189,7 +15737,11 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
15189
15737
  const cookie = cookies[i].replace(/^\s+/, "");
15190
15738
  const eq = cookie.indexOf("=");
15191
15739
  if (eq !== -1 && cookie.slice(0, eq) === name) {
15192
- return decodeURIComponent(cookie.slice(eq + 1));
15740
+ try {
15741
+ return decodeURIComponent(cookie.slice(eq + 1));
15742
+ } catch (e) {
15743
+ return cookie.slice(eq + 1);
15744
+ }
15193
15745
  }
15194
15746
  }
15195
15747
  return null;
@@ -15211,9 +15763,20 @@ var cookies_default = platform_default.hasStandardBrowserEnv ? (
15211
15763
  }
15212
15764
  );
15213
15765
 
15214
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/mergeConfig.js
15766
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/mergeConfig.js
15215
15767
  var headersToObject = (thing) => thing instanceof AxiosHeaders_default ? { ...thing } : thing;
15768
+ var ownEnumerableKeys = (thing) => {
15769
+ if (Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor) {
15770
+ return Object.keys(thing).concat(
15771
+ Object.getOwnPropertySymbols(thing).filter(
15772
+ (symbol) => Object.getOwnPropertyDescriptor(thing, symbol).enumerable
15773
+ )
15774
+ );
15775
+ }
15776
+ return Object.keys(thing);
15777
+ };
15216
15778
  function mergeConfig(config1, config2) {
15779
+ config1 = config1 || {};
15217
15780
  config2 = config2 || {};
15218
15781
  const config = /* @__PURE__ */ Object.create(null);
15219
15782
  Object.defineProperty(config, "hasOwnProperty", {
@@ -15254,6 +15817,23 @@ function mergeConfig(config1, config2) {
15254
15817
  return getMergedValue(void 0, a);
15255
15818
  }
15256
15819
  }
15820
+ function getMergedTransitionalOption(prop) {
15821
+ const transitional2 = utils_default.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
15822
+ if (!utils_default.isUndefined(transitional2)) {
15823
+ if (utils_default.isPlainObject(transitional2)) {
15824
+ if (utils_default.hasOwnProp(transitional2, prop)) {
15825
+ return transitional2[prop];
15826
+ }
15827
+ } else {
15828
+ return void 0;
15829
+ }
15830
+ }
15831
+ const transitional1 = utils_default.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
15832
+ if (utils_default.isPlainObject(transitional1) && utils_default.hasOwnProp(transitional1, prop)) {
15833
+ return transitional1[prop];
15834
+ }
15835
+ return void 0;
15836
+ }
15257
15837
  function mergeDirectKeys(a, b, prop) {
15258
15838
  if (utils_default.hasOwnProp(config2, prop)) {
15259
15839
  return getMergedValue(a, b);
@@ -15293,7 +15873,7 @@ function mergeConfig(config1, config2) {
15293
15873
  validateStatus: mergeDirectKeys,
15294
15874
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
15295
15875
  };
15296
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
15876
+ utils_default.forEach(ownEnumerableKeys({ ...config1, ...config2 }), function computeConfigValue(prop) {
15297
15877
  if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
15298
15878
  const merge2 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
15299
15879
  const a = utils_default.hasOwnProp(config1, prop) ? config1[prop] : void 0;
@@ -15301,27 +15881,22 @@ function mergeConfig(config1, config2) {
15301
15881
  const configValue = merge2(a, b, prop);
15302
15882
  utils_default.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
15303
15883
  });
15884
+ if (utils_default.hasOwnProp(config2, "validateStatus") && utils_default.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
15885
+ if (utils_default.hasOwnProp(config1, "validateStatus")) {
15886
+ config.validateStatus = getMergedValue(void 0, config1.validateStatus);
15887
+ } else {
15888
+ delete config.validateStatus;
15889
+ }
15890
+ }
15304
15891
  return config;
15305
15892
  }
15306
15893
 
15307
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/resolveConfig.js
15308
- var FORM_DATA_CONTENT_HEADERS2 = ["content-type", "content-length"];
15309
- function setFormDataHeaders2(headers, formHeaders, policy) {
15310
- if (policy !== "content-only") {
15311
- headers.set(formHeaders);
15312
- return;
15313
- }
15314
- Object.entries(formHeaders).forEach(([key, val]) => {
15315
- if (FORM_DATA_CONTENT_HEADERS2.includes(key.toLowerCase())) {
15316
- headers.set(key, val);
15317
- }
15318
- });
15319
- }
15894
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/resolveConfig.js
15320
15895
  var encodeUTF8 = (str) => encodeURIComponent(str).replace(
15321
15896
  /%([0-9A-F]{2})/gi,
15322
15897
  (_, hex) => String.fromCharCode(parseInt(hex, 16))
15323
15898
  );
15324
- var resolveConfig_default = (config) => {
15899
+ function resolveConfig(config) {
15325
15900
  const newConfig = mergeConfig({}, config);
15326
15901
  const own2 = (key) => utils_default.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
15327
15902
  const data = own2("data");
@@ -15335,21 +15910,27 @@ var resolveConfig_default = (config) => {
15335
15910
  const url2 = own2("url");
15336
15911
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
15337
15912
  newConfig.url = buildURL(
15338
- buildFullPath(baseURL, url2, allowAbsoluteUrls),
15339
- config.params,
15340
- config.paramsSerializer
15913
+ buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig),
15914
+ own2("params"),
15915
+ own2("paramsSerializer")
15341
15916
  );
15342
15917
  if (auth) {
15343
- headers.set(
15344
- "Authorization",
15345
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : ""))
15346
- );
15918
+ const username = utils_default.getSafeProp(auth, "username") || "";
15919
+ const password = utils_default.getSafeProp(auth, "password") || "";
15920
+ try {
15921
+ headers.set(
15922
+ "Authorization",
15923
+ "Basic " + btoa(username + ":" + (password ? encodeUTF8(password) : ""))
15924
+ );
15925
+ } catch (e) {
15926
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_OPTION_VALUE, config);
15927
+ }
15347
15928
  }
15348
15929
  if (utils_default.isFormData(data)) {
15349
- if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv) {
15930
+ if (platform_default.hasStandardBrowserEnv || platform_default.hasStandardBrowserWebWorkerEnv || utils_default.isReactNative(data)) {
15350
15931
  headers.setContentType(void 0);
15351
15932
  } else if (utils_default.isFunction(data.getHeaders)) {
15352
- setFormDataHeaders2(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
15933
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
15353
15934
  }
15354
15935
  }
15355
15936
  if (platform_default.hasStandardBrowserEnv) {
@@ -15365,9 +15946,10 @@ var resolveConfig_default = (config) => {
15365
15946
  }
15366
15947
  }
15367
15948
  return newConfig;
15368
- };
15949
+ }
15950
+ var resolveConfig_default = resolveConfig;
15369
15951
 
15370
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/xhr.js
15952
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/xhr.js
15371
15953
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
15372
15954
  var xhr_default = isXHRAdapterSupported && function(config) {
15373
15955
  return new Promise(function dispatchXhrRequest(resolve, reject) {
@@ -15507,13 +16089,14 @@ var xhr_default = isXHRAdapterSupported && function(config) {
15507
16089
  config
15508
16090
  )
15509
16091
  );
16092
+ done();
15510
16093
  return;
15511
16094
  }
15512
16095
  request.send(requestData || null);
15513
16096
  });
15514
16097
  };
15515
16098
 
15516
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/composeSignals.js
16099
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/composeSignals.js
15517
16100
  var composeSignals = (signals, timeout) => {
15518
16101
  signals = signals ? signals.filter(Boolean) : [];
15519
16102
  if (!timeout && !signals.length) {
@@ -15546,14 +16129,23 @@ var composeSignals = (signals, timeout) => {
15546
16129
  });
15547
16130
  signals = null;
15548
16131
  };
15549
- signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
16132
+ signals.forEach((signal2) => {
16133
+ if (aborted) {
16134
+ return;
16135
+ }
16136
+ if (signal2.aborted) {
16137
+ onabort.call(signal2);
16138
+ return;
16139
+ }
16140
+ signal2.addEventListener("abort", onabort, { once: true });
16141
+ });
15550
16142
  const { signal } = controller;
15551
16143
  signal.unsubscribe = () => utils_default.asap(unsubscribe);
15552
16144
  return signal;
15553
16145
  };
15554
16146
  var composeSignals_default = composeSignals;
15555
16147
 
15556
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/trackStream.js
16148
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/trackStream.js
15557
16149
  var streamChunk = function* (chunk, chunkSize) {
15558
16150
  let len = chunk.byteLength;
15559
16151
  if (!chunkSize || len < chunkSize) {
@@ -15633,9 +16225,23 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
15633
16225
  );
15634
16226
  };
15635
16227
 
15636
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/fetch.js
16228
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/fetch.js
15637
16229
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
15638
16230
  var { isFunction: isFunction2 } = utils_default;
16231
+ var encodeUTF82 = (str) => encodeURIComponent(str).replace(
16232
+ /%([0-9A-F]{2})/gi,
16233
+ (_, hex) => String.fromCharCode(parseInt(hex, 16))
16234
+ );
16235
+ var decodeURIComponentSafe2 = (value) => {
16236
+ if (!utils_default.isString(value)) {
16237
+ return value;
16238
+ }
16239
+ try {
16240
+ return decodeURIComponent(value);
16241
+ } catch (error) {
16242
+ return value;
16243
+ }
16244
+ };
15639
16245
  var test = (fn, ...args) => {
15640
16246
  try {
15641
16247
  return !!fn(...args);
@@ -15643,6 +16249,14 @@ var test = (fn, ...args) => {
15643
16249
  return false;
15644
16250
  }
15645
16251
  };
16252
+ var maybeWithAuthCredentials = (url2) => {
16253
+ const protocolIndex = url2.indexOf("://");
16254
+ let urlToCheck = url2;
16255
+ if (protocolIndex !== -1) {
16256
+ urlToCheck = urlToCheck.slice(protocolIndex + 3);
16257
+ }
16258
+ return urlToCheck.includes("@") || urlToCheck.includes(":");
16259
+ };
15646
16260
  var factory = (env) => {
15647
16261
  const globalObject = utils_default.global !== void 0 && utils_default.global !== null ? utils_default.global : globalThis;
15648
16262
  const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
@@ -15747,6 +16361,7 @@ var factory = (env) => {
15747
16361
  } = resolveConfig_default(config);
15748
16362
  const hasMaxContentLength = utils_default.isNumber(maxContentLength) && maxContentLength > -1;
15749
16363
  const hasMaxBodyLength = utils_default.isNumber(maxBodyLength) && maxBodyLength > -1;
16364
+ const own2 = (key) => utils_default.hasOwnProp(config, key) ? config[key] : void 0;
15750
16365
  let _fetch = envFetch || fetch;
15751
16366
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
15752
16367
  let composedSignal = composeSignals_default(
@@ -15758,7 +16373,47 @@ var factory = (env) => {
15758
16373
  composedSignal.unsubscribe();
15759
16374
  });
15760
16375
  let requestContentLength;
16376
+ let pendingBodyError = null;
16377
+ const maxBodyLengthError = () => new AxiosError_default(
16378
+ "Request body larger than maxBodyLength limit",
16379
+ AxiosError_default.ERR_BAD_REQUEST,
16380
+ config,
16381
+ request
16382
+ );
15761
16383
  try {
16384
+ let auth = void 0;
16385
+ const configAuth = own2("auth");
16386
+ if (configAuth) {
16387
+ const username = utils_default.getSafeProp(configAuth, "username") || "";
16388
+ const password = utils_default.getSafeProp(configAuth, "password") || "";
16389
+ auth = {
16390
+ username,
16391
+ password
16392
+ };
16393
+ }
16394
+ if (maybeWithAuthCredentials(url2)) {
16395
+ const parsedURL = new URL(url2, platform_default.origin);
16396
+ if (!auth && (parsedURL.username || parsedURL.password)) {
16397
+ const urlUsername = decodeURIComponentSafe2(parsedURL.username);
16398
+ const urlPassword = decodeURIComponentSafe2(parsedURL.password);
16399
+ auth = {
16400
+ username: urlUsername,
16401
+ password: urlPassword
16402
+ };
16403
+ }
16404
+ if (parsedURL.username || parsedURL.password) {
16405
+ parsedURL.username = "";
16406
+ parsedURL.password = "";
16407
+ url2 = parsedURL.href;
16408
+ }
16409
+ }
16410
+ if (auth) {
16411
+ headers.delete("authorization");
16412
+ headers.set(
16413
+ "Authorization",
16414
+ "Basic " + btoa(encodeUTF82((auth.username || "") + ":" + (auth.password || "")))
16415
+ );
16416
+ }
15762
16417
  if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
15763
16418
  const estimated = estimateDataURLDecodedBytes(url2);
15764
16419
  if (estimated > maxContentLength) {
@@ -15771,33 +16426,55 @@ var factory = (env) => {
15771
16426
  }
15772
16427
  }
15773
16428
  if (hasMaxBodyLength && method !== "get" && method !== "head") {
15774
- const outboundLength = await resolveBodyLength(headers, data);
15775
- if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
15776
- throw new AxiosError_default(
15777
- "Request body larger than maxBodyLength limit",
15778
- AxiosError_default.ERR_BAD_REQUEST,
15779
- config,
15780
- request
15781
- );
16429
+ const outboundLength = await getBodyLength(data);
16430
+ if (typeof outboundLength === "number" && isFinite(outboundLength)) {
16431
+ requestContentLength = outboundLength;
16432
+ if (outboundLength > maxBodyLength) {
16433
+ throw maxBodyLengthError();
16434
+ }
15782
16435
  }
15783
16436
  }
15784
- if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
15785
- let _request = new Request(url2, {
15786
- method: "POST",
15787
- body: data,
15788
- duplex: "half"
15789
- });
15790
- let contentTypeHeader;
15791
- if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
15792
- headers.setContentType(contentTypeHeader);
15793
- }
15794
- if (_request.body) {
15795
- const [onProgress, flush] = progressEventDecorator(
15796
- requestContentLength,
15797
- progressEventReducer(asyncDecorator(onUploadProgress))
15798
- );
15799
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
16437
+ const mustEnforceStreamBody = hasMaxBodyLength && (utils_default.isReadableStream(data) || utils_default.isStream(data));
16438
+ const trackRequestStream = (stream4, onProgress, flush) => trackStream(
16439
+ stream4,
16440
+ DEFAULT_CHUNK_SIZE,
16441
+ (loadedBytes) => {
16442
+ if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
16443
+ throw pendingBodyError = maxBodyLengthError();
16444
+ }
16445
+ onProgress && onProgress(loadedBytes);
16446
+ },
16447
+ flush
16448
+ );
16449
+ if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
16450
+ requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
16451
+ if (requestContentLength !== 0 || mustEnforceStreamBody) {
16452
+ let _request = new Request(url2, {
16453
+ method: "POST",
16454
+ body: data,
16455
+ duplex: "half"
16456
+ });
16457
+ let contentTypeHeader;
16458
+ if (utils_default.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
16459
+ headers.setContentType(contentTypeHeader);
16460
+ }
16461
+ if (_request.body) {
16462
+ const [onProgress, flush] = onUploadProgress && progressEventDecorator(
16463
+ requestContentLength,
16464
+ progressEventReducer(asyncDecorator(onUploadProgress))
16465
+ ) || [];
16466
+ data = trackRequestStream(_request.body, onProgress, flush);
16467
+ }
15800
16468
  }
16469
+ } else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
16470
+ data = trackRequestStream(data);
16471
+ } else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
16472
+ throw new AxiosError_default(
16473
+ "Stream request bodies are not supported by the current fetch implementation",
16474
+ AxiosError_default.ERR_NOT_SUPPORT,
16475
+ config,
16476
+ request
16477
+ );
15801
16478
  }
15802
16479
  if (!utils_default.isString(withCredentials)) {
15803
16480
  withCredentials = withCredentials ? "include" : "omit";
@@ -15821,8 +16498,9 @@ var factory = (env) => {
15821
16498
  };
15822
16499
  request = isRequestSupported && new Request(url2, resolvedOptions);
15823
16500
  let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url2, resolvedOptions));
16501
+ const responseHeaders = AxiosHeaders_default.from(response.headers);
15824
16502
  if (hasMaxContentLength) {
15825
- const declaredLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16503
+ const declaredLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15826
16504
  if (declaredLength != null && declaredLength > maxContentLength) {
15827
16505
  throw new AxiosError_default(
15828
16506
  "maxContentLength size of " + maxContentLength + " exceeded",
@@ -15838,7 +16516,7 @@ var factory = (env) => {
15838
16516
  ["status", "statusText", "headers"].forEach((prop) => {
15839
16517
  options[prop] = response[prop];
15840
16518
  });
15841
- const responseContentLength = utils_default.toFiniteNumber(response.headers.get("content-length"));
16519
+ const responseContentLength = utils_default.toFiniteNumber(responseHeaders.getContentLength());
15842
16520
  const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
15843
16521
  responseContentLength,
15844
16522
  progressEventReducer(asyncDecorator(onDownloadProgress), true)
@@ -15908,22 +16586,41 @@ var factory = (env) => {
15908
16586
  const canceledError = composedSignal.reason;
15909
16587
  canceledError.config = config;
15910
16588
  request && (canceledError.request = request);
15911
- err !== canceledError && (canceledError.cause = err);
16589
+ if (err !== canceledError) {
16590
+ Object.defineProperty(canceledError, "cause", {
16591
+ __proto__: null,
16592
+ value: err,
16593
+ writable: true,
16594
+ enumerable: false,
16595
+ configurable: true
16596
+ });
16597
+ }
15912
16598
  throw canceledError;
15913
16599
  }
16600
+ if (pendingBodyError) {
16601
+ request && !pendingBodyError.request && (pendingBodyError.request = request);
16602
+ throw pendingBodyError;
16603
+ }
16604
+ if (err instanceof AxiosError_default) {
16605
+ request && !err.request && (err.request = request);
16606
+ throw err;
16607
+ }
15914
16608
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
15915
- throw Object.assign(
15916
- new AxiosError_default(
15917
- "Network Error",
15918
- AxiosError_default.ERR_NETWORK,
15919
- config,
15920
- request,
15921
- err && err.response
15922
- ),
15923
- {
15924
- cause: err.cause || err
15925
- }
16609
+ const networkError = new AxiosError_default(
16610
+ "Network Error",
16611
+ AxiosError_default.ERR_NETWORK,
16612
+ config,
16613
+ request,
16614
+ err && err.response
15926
16615
  );
16616
+ Object.defineProperty(networkError, "cause", {
16617
+ __proto__: null,
16618
+ value: err.cause || err,
16619
+ writable: true,
16620
+ enumerable: false,
16621
+ configurable: true
16622
+ });
16623
+ throw networkError;
15927
16624
  }
15928
16625
  throw AxiosError_default.from(err, err && err.code, config, request, err && err.response);
15929
16626
  }
@@ -15945,7 +16642,7 @@ var getFetch = (config) => {
15945
16642
  };
15946
16643
  var adapter = getFetch();
15947
16644
 
15948
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/adapters/adapters.js
16645
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/adapters/adapters.js
15949
16646
  var knownAdapters = {
15950
16647
  http: http_default,
15951
16648
  xhr: xhr_default,
@@ -15992,7 +16689,7 @@ function getAdapter(adapters, config) {
15992
16689
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
15993
16690
  throw new AxiosError_default(
15994
16691
  `There is no suitable adapter to dispatch the request ` + s,
15995
- "ERR_NOT_SUPPORT"
16692
+ AxiosError_default.ERR_NOT_SUPPORT
15996
16693
  );
15997
16694
  }
15998
16695
  return adapter2;
@@ -16010,7 +16707,7 @@ var adapters_default = {
16010
16707
  adapters: knownAdapters
16011
16708
  };
16012
16709
 
16013
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/dispatchRequest.js
16710
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/dispatchRequest.js
16014
16711
  function throwIfCancellationRequested(config) {
16015
16712
  if (config.cancelToken) {
16016
16713
  config.cancelToken.throwIfRequested();
@@ -16061,7 +16758,7 @@ function dispatchRequest(config) {
16061
16758
  );
16062
16759
  }
16063
16760
 
16064
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/validator.js
16761
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/validator.js
16065
16762
  var validators = {};
16066
16763
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
16067
16764
  validators[type] = function validator(thing) {
@@ -16099,7 +16796,7 @@ validators.spelling = function spelling(correctSpelling) {
16099
16796
  };
16100
16797
  };
16101
16798
  function assertOptions(options, schema, allowUnknown) {
16102
- if (typeof options !== "object") {
16799
+ if (typeof options !== "object" || options === null) {
16103
16800
  throw new AxiosError_default("options must be an object", AxiosError_default.ERR_BAD_OPTION_VALUE);
16104
16801
  }
16105
16802
  const keys = Object.keys(options);
@@ -16128,7 +16825,7 @@ var validator_default = {
16128
16825
  validators
16129
16826
  };
16130
16827
 
16131
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/core/Axios.js
16828
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/core/Axios.js
16132
16829
  var validators2 = validator_default.validators;
16133
16830
  var Axios = class {
16134
16831
  constructor(instanceConfig) {
@@ -16193,7 +16890,9 @@ var Axios = class {
16193
16890
  silentJSONParsing: validators2.transitional(validators2.boolean),
16194
16891
  forcedJSONParsing: validators2.transitional(validators2.boolean),
16195
16892
  clarifyTimeoutError: validators2.transitional(validators2.boolean),
16196
- legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
16893
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean),
16894
+ advertiseZstdAcceptEncoding: validators2.transitional(validators2.boolean),
16895
+ validateStatusUndefinedResolves: validators2.transitional(validators2.boolean)
16197
16896
  },
16198
16897
  false
16199
16898
  );
@@ -16273,16 +16972,31 @@ var Axios = class {
16273
16972
  const onFulfilled = requestInterceptorChain[i++];
16274
16973
  const onRejected = requestInterceptorChain[i++];
16275
16974
  try {
16276
- newConfig = onFulfilled(newConfig);
16975
+ newConfig = onFulfilled ? onFulfilled(newConfig) : newConfig;
16277
16976
  } catch (error) {
16278
- onRejected.call(this, error);
16977
+ if (!onRejected) {
16978
+ promise = Promise.reject(error);
16979
+ break;
16980
+ }
16981
+ try {
16982
+ const rejectedResult = onRejected.call(this, error);
16983
+ if (utils_default.isThenable(rejectedResult)) {
16984
+ promise = Promise.resolve(rejectedResult).then(
16985
+ () => dispatchRequest.call(this, newConfig)
16986
+ );
16987
+ }
16988
+ } catch (rejectedError) {
16989
+ promise = Promise.reject(rejectedError);
16990
+ }
16279
16991
  break;
16280
16992
  }
16281
16993
  }
16282
- try {
16283
- promise = dispatchRequest.call(this, newConfig);
16284
- } catch (error) {
16285
- return Promise.reject(error);
16994
+ if (!promise) {
16995
+ try {
16996
+ promise = dispatchRequest.call(this, newConfig);
16997
+ } catch (error) {
16998
+ promise = Promise.reject(error);
16999
+ }
16286
17000
  }
16287
17001
  i = 0;
16288
17002
  len = responseInterceptorChain.length;
@@ -16293,7 +17007,7 @@ var Axios = class {
16293
17007
  }
16294
17008
  getUri(config) {
16295
17009
  config = mergeConfig(this.defaults, config);
16296
- const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
17010
+ const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
16297
17011
  return buildURL(fullPath, config.params, config.paramsSerializer);
16298
17012
  }
16299
17013
  };
@@ -16303,7 +17017,7 @@ utils_default.forEach(["delete", "get", "head", "options"], function forEachMeth
16303
17017
  mergeConfig(config || {}, {
16304
17018
  method,
16305
17019
  url: url2,
16306
- data: (config || {}).data
17020
+ data: config && utils_default.hasOwnProp(config, "data") ? config.data : void 0
16307
17021
  })
16308
17022
  );
16309
17023
  };
@@ -16330,7 +17044,7 @@ utils_default.forEach(["post", "put", "patch", "query"], function forEachMethodW
16330
17044
  });
16331
17045
  var Axios_default = Axios;
16332
17046
 
16333
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/cancel/CancelToken.js
17047
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/cancel/CancelToken.js
16334
17048
  var CancelToken = class _CancelToken {
16335
17049
  constructor(executor) {
16336
17050
  if (typeof executor !== "function") {
@@ -16428,19 +17142,19 @@ var CancelToken = class _CancelToken {
16428
17142
  };
16429
17143
  var CancelToken_default = CancelToken;
16430
17144
 
16431
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/spread.js
17145
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/spread.js
16432
17146
  function spread(callback) {
16433
17147
  return function wrap(arr) {
16434
17148
  return callback.apply(null, arr);
16435
17149
  };
16436
17150
  }
16437
17151
 
16438
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/isAxiosError.js
17152
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/isAxiosError.js
16439
17153
  function isAxiosError(payload) {
16440
17154
  return utils_default.isObject(payload) && payload.isAxiosError === true;
16441
17155
  }
16442
17156
 
16443
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/helpers/HttpStatusCode.js
17157
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/helpers/HttpStatusCode.js
16444
17158
  var HttpStatusCode = {
16445
17159
  Continue: 100,
16446
17160
  SwitchingProtocols: 101,
@@ -16505,6 +17219,7 @@ var HttpStatusCode = {
16505
17219
  LoopDetected: 508,
16506
17220
  NotExtended: 510,
16507
17221
  NetworkAuthenticationRequired: 511,
17222
+ WebServerReturnsAnUnknownError: 520,
16508
17223
  WebServerIsDown: 521,
16509
17224
  ConnectionTimedOut: 522,
16510
17225
  OriginIsUnreachable: 523,
@@ -16517,7 +17232,7 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
16517
17232
  });
16518
17233
  var HttpStatusCode_default = HttpStatusCode;
16519
17234
 
16520
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/lib/axios.js
17235
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/lib/axios.js
16521
17236
  function createInstance(defaultConfig) {
16522
17237
  const context = new Axios_default(defaultConfig);
16523
17238
  const instance = bind(Axios_default.prototype.request, context);
@@ -16550,7 +17265,7 @@ axios.HttpStatusCode = HttpStatusCode_default;
16550
17265
  axios.default = axios;
16551
17266
  var axios_default = axios;
16552
17267
 
16553
- // ../../node_modules/.pnpm/axios@1.16.1_debug@4.4.3/node_modules/axios/index.js
17268
+ // ../../node_modules/.pnpm/axios@1.19.0_debug@4.4.3_supports-color@8.1.1__supports-color@8.1.1/node_modules/axios/index.js
16554
17269
  var {
16555
17270
  Axios: Axios2,
16556
17271
  AxiosError: AxiosError2,
@@ -16571,18 +17286,18 @@ var {
16571
17286
  create
16572
17287
  } = axios_default;
16573
17288
 
16574
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/Tunnel.js
17289
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16575
17290
  var import_debug2 = __toESM(require_src(), 1);
16576
17291
  import { EventEmitter as EventEmitter3 } from "events";
16577
17292
 
16578
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/TunnelCluster.js
17293
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16579
17294
  var import_debug = __toESM(require_src(), 1);
16580
17295
  import { EventEmitter as EventEmitter2 } from "events";
16581
17296
  import fs from "fs";
16582
17297
  import net from "net";
16583
17298
  import tls from "tls";
16584
17299
 
16585
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/HeaderHostTransformer.js
17300
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/HeaderHostTransformer.js
16586
17301
  import { Transform } from "stream";
16587
17302
  var HeaderHostTransformer = class extends Transform {
16588
17303
  host;
@@ -16600,7 +17315,7 @@ var HeaderHostTransformer = class extends Transform {
16600
17315
  }
16601
17316
  };
16602
17317
 
16603
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/TunnelCluster.js
17318
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/TunnelCluster.js
16604
17319
  var log = (0, import_debug.default)("pipenet:client");
16605
17320
  var TunnelCluster = class extends EventEmitter2 {
16606
17321
  opts;
@@ -16633,18 +17348,10 @@ var TunnelCluster = class extends EventEmitter2 {
16633
17348
  }
16634
17349
  remote.end();
16635
17350
  });
16636
- let deadEmitted = false;
16637
- const emitDead = () => {
16638
- if (deadEmitted) {
16639
- return;
16640
- }
16641
- deadEmitted = true;
16642
- this.emit("dead", remote);
16643
- };
16644
17351
  const connLocal = () => {
16645
17352
  if (remote.destroyed) {
16646
17353
  log("remote destroyed");
16647
- emitDead();
17354
+ this.emit("dead", remote);
16648
17355
  return;
16649
17356
  }
16650
17357
  log("connecting locally to %s://%s:%d", localProtocol, localHost, localPort);
@@ -16660,7 +17367,7 @@ var TunnelCluster = class extends EventEmitter2 {
16660
17367
  const local = opt.localHttps ? tls.connect({ host: localHost, port: localPort, ...getLocalCertOpts() }) : net.connect({ host: localHost, port: localPort });
16661
17368
  const remoteClose = () => {
16662
17369
  log("remote close");
16663
- emitDead();
17370
+ this.emit("dead", remote);
16664
17371
  local.end();
16665
17372
  };
16666
17373
  remote.once("close", remoteClose);
@@ -16708,7 +17415,7 @@ var TunnelCluster = class extends EventEmitter2 {
16708
17415
  }
16709
17416
  };
16710
17417
 
16711
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/Tunnel.js
17418
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/Tunnel.js
16712
17419
  var log2 = (0, import_debug2.default)("pipenet:client");
16713
17420
  var Tunnel = class extends EventEmitter3 {
16714
17421
  cachedUrl;
@@ -16856,7 +17563,7 @@ var Tunnel = class extends EventEmitter3 {
16856
17563
  }
16857
17564
  };
16858
17565
 
16859
- // ../../node_modules/.pnpm/pipenet@1.4.0_patch_hash=24bd89f8b5bea6a63243b7a7d4ad888dcf7049e36eac19b10006403b29758c35/node_modules/pipenet/dist/pipenet.js
17566
+ // ../../node_modules/.pnpm/pipenet@1.4.2_patch_hash=6563a9cc9b0f2a1e688a2ed680b80f8623092856e6c4c446e0cdc8d98f497ac9_supports-color@8.1.1/node_modules/pipenet/dist/pipenet.js
16860
17567
  function pipenet(arg1, arg2, arg3) {
16861
17568
  const options = typeof arg1 === "object" ? arg1 : { ...arg2, port: arg1 };
16862
17569
  const callback = typeof arg1 === "object" ? arg2 : arg3;