@fragment-dev/cli 2026.5.7 → 2026.5.8-2

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 (65) hide show
  1. package/dist/{chunk-MPP2BYYR.js → chunk-2UEYQ34C.js} +3 -3
  2. package/dist/{chunk-EZAKI7FR.js → chunk-7DLF4ROM.js} +1 -1
  3. package/dist/{chunk-AKSDRSVF.js → chunk-7QICAVCH.js} +1 -1
  4. package/dist/{chunk-EPXIRZ7C.js → chunk-C6G5VS2N.js} +2 -2
  5. package/dist/{chunk-E7SDNECJ.js → chunk-C7YTQ6BB.js} +2 -2
  6. package/dist/{chunk-LPCTRQEO.js → chunk-CSSMGU2E.js} +1 -1
  7. package/dist/{chunk-RGW5NRXA.js → chunk-DR6JWXVF.js} +2 -2
  8. package/dist/{chunk-SDXDY4TI.js → chunk-EJ7BSQ4G.js} +2 -2
  9. package/dist/{chunk-TDSDPICI.js → chunk-FLOP7UZS.js} +2 -2
  10. package/dist/{chunk-5LYH7YNZ.js → chunk-HNECLJVK.js} +2 -2
  11. package/dist/{chunk-5K5PBQMP.js → chunk-JUAFCM3X.js} +1 -1
  12. package/dist/{chunk-XQSHACVC.js → chunk-KRDXRKAH.js} +1 -1
  13. package/dist/{chunk-MSSYUMEG.js → chunk-L3ZNGAPY.js} +1 -1
  14. package/dist/{chunk-F33AWQ46.js → chunk-M5X3GRYG.js} +2 -2
  15. package/dist/{chunk-VDZ6HPRI.js → chunk-MBAU3K3S.js} +1 -1
  16. package/dist/{chunk-XPMRKX2Q.js → chunk-OCEOGNO6.js} +6 -1
  17. package/dist/{chunk-RL2B63Z3.js → chunk-OSY76DIN.js} +5 -5
  18. package/dist/{chunk-XPZCRTQ6.js → chunk-Q6HQVMXZ.js} +1 -1
  19. package/dist/{chunk-WEZR3OSK.js → chunk-RCIUPDRC.js} +1 -1
  20. package/dist/{chunk-2FTK5BAV.js → chunk-SNADJKMJ.js} +2 -2
  21. package/dist/{chunk-PIINGBPH.js → chunk-SS44PHXB.js} +23 -23
  22. package/dist/{chunk-OASOBTXX.js → chunk-VGJJO3TO.js} +2 -2
  23. package/dist/{chunk-TUOIGRBA.js → chunk-VZ2CPEPR.js} +2 -2
  24. package/dist/{chunk-DOZX2N25.js → chunk-WAPUAO2X.js} +2 -2
  25. package/dist/{chunk-JORACMYD.js → chunk-WCMNBPIT.js} +2 -2
  26. package/dist/{chunk-37RP7T65.js → chunk-WMPWO3EU.js} +2 -2
  27. package/dist/{chunk-TB6XLFM3.js → chunk-WWS2QAQ3.js} +1 -1
  28. package/dist/{chunk-MSDN6VWB.js → chunk-WWUN4GV2.js} +2 -2
  29. package/dist/{chunk-BTT5XSZ6.js → chunk-WXUF6LL2.js} +1 -1
  30. package/dist/{chunk-G6PHNUPW.js → chunk-X34FYDI4.js} +2 -2
  31. package/dist/{chunk-Q7JG7P63.js → chunk-X5EVCFUA.js} +3 -3
  32. package/dist/{chunk-WQBRUOJS.js → chunk-Z2CERENO.js} +3 -3
  33. package/dist/{chunk-YSPQD7QM.js → chunk-ZMR35FCP.js} +1611 -879
  34. package/dist/commands/add-ledger-entry.js +3 -3
  35. package/dist/commands/create-custom-link.js +3 -3
  36. package/dist/commands/create-ledger.js +3 -3
  37. package/dist/commands/delete-custom-txs.js +3 -3
  38. package/dist/commands/delete-ledger.js +3 -3
  39. package/dist/commands/delete-schema.js +3 -3
  40. package/dist/commands/gen-graphql.js +7 -7
  41. package/dist/commands/get-schema.js +4 -4
  42. package/dist/commands/init.js +2 -2
  43. package/dist/commands/login.js +3 -3
  44. package/dist/commands/migrate-ledger-entry.js +3 -3
  45. package/dist/commands/query/ledgerAccounts.js +3 -3
  46. package/dist/commands/query/ledgers.js +3 -3
  47. package/dist/commands/query/schema.js +3 -3
  48. package/dist/commands/query/schemas.js +3 -3
  49. package/dist/commands/reverse-ledger-entry.js +3 -3
  50. package/dist/commands/start.js +2 -2
  51. package/dist/commands/store-schema.js +3 -3
  52. package/dist/commands/token.js +3 -3
  53. package/dist/commands/update-ledger-account.js +3 -3
  54. package/dist/commands/update.js +3 -3
  55. package/dist/commands/verify-schema.js +7 -7
  56. package/dist/commands/workspace.js +3 -3
  57. package/dist/commands.js +33 -33
  58. package/dist/graphql.js +3 -3
  59. package/dist/index.js +33 -33
  60. package/dist/lib/authenticatedCommand.js +2 -2
  61. package/dist/lib/baseCommand.js +1 -1
  62. package/dist/utils/formatValidationErrors.js +2 -2
  63. package/dist/utils/schemaValidation.js +5 -5
  64. package/oclif.manifest.json +1 -1
  65. package/package.json +1 -1
@@ -7669,10 +7669,10 @@ var require_unescape = __commonJS({
7669
7669
  init_cjs_shims();
7670
7670
  Object.defineProperty(exports, "__esModule", { value: true });
7671
7671
  exports.unescape = void 0;
7672
- var unescape2 = (s, { windowsPathsNoEscape = false } = {}) => {
7672
+ var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
7673
7673
  return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
7674
7674
  };
7675
- exports.unescape = unescape2;
7675
+ exports.unescape = unescape;
7676
7676
  }
7677
7677
  });
7678
7678
 
@@ -10487,14 +10487,15 @@ var require_braces = __commonJS({
10487
10487
  }
10488
10488
  });
10489
10489
 
10490
- // ../../node_modules/picomatch/lib/constants.js
10490
+ // ../../node_modules/micromatch/node_modules/picomatch/lib/constants.js
10491
10491
  var require_constants2 = __commonJS({
10492
- "../../node_modules/picomatch/lib/constants.js"(exports, module) {
10492
+ "../../node_modules/micromatch/node_modules/picomatch/lib/constants.js"(exports, module) {
10493
10493
  "use strict";
10494
10494
  init_cjs_shims();
10495
10495
  var path = __require("path");
10496
10496
  var WIN_SLASH = "\\\\/";
10497
10497
  var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
10498
+ var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
10498
10499
  var DOT_LITERAL = "\\.";
10499
10500
  var PLUS_LITERAL = "\\+";
10500
10501
  var QMARK_LITERAL = "\\?";
@@ -10542,6 +10543,7 @@ var require_constants2 = __commonJS({
10542
10543
  END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
10543
10544
  };
10544
10545
  var POSIX_REGEX_SOURCE = {
10546
+ __proto__: null,
10545
10547
  alnum: "a-zA-Z0-9",
10546
10548
  alpha: "a-zA-Z",
10547
10549
  ascii: "\\x00-\\x7F",
@@ -10558,6 +10560,7 @@ var require_constants2 = __commonJS({
10558
10560
  xdigit: "A-Fa-f0-9"
10559
10561
  };
10560
10562
  module.exports = {
10563
+ DEFAULT_MAX_EXTGLOB_RECURSION,
10561
10564
  MAX_LENGTH: 1024 * 64,
10562
10565
  POSIX_REGEX_SOURCE,
10563
10566
  // regular expressions
@@ -10569,6 +10572,7 @@ var require_constants2 = __commonJS({
10569
10572
  REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
10570
10573
  // Replace globs with equivalent patterns to reduce parsing time.
10571
10574
  REPLACEMENTS: {
10575
+ __proto__: null,
10572
10576
  "***": "*",
10573
10577
  "**/**": "**",
10574
10578
  "**/**/**": "**"
@@ -10685,9 +10689,9 @@ var require_constants2 = __commonJS({
10685
10689
  }
10686
10690
  });
10687
10691
 
10688
- // ../../node_modules/picomatch/lib/utils.js
10692
+ // ../../node_modules/micromatch/node_modules/picomatch/lib/utils.js
10689
10693
  var require_utils3 = __commonJS({
10690
- "../../node_modules/picomatch/lib/utils.js"(exports) {
10694
+ "../../node_modules/micromatch/node_modules/picomatch/lib/utils.js"(exports) {
10691
10695
  "use strict";
10692
10696
  init_cjs_shims();
10693
10697
  var path = __require("path");
@@ -10749,9 +10753,9 @@ var require_utils3 = __commonJS({
10749
10753
  }
10750
10754
  });
10751
10755
 
10752
- // ../../node_modules/picomatch/lib/scan.js
10756
+ // ../../node_modules/micromatch/node_modules/picomatch/lib/scan.js
10753
10757
  var require_scan = __commonJS({
10754
- "../../node_modules/picomatch/lib/scan.js"(exports, module) {
10758
+ "../../node_modules/micromatch/node_modules/picomatch/lib/scan.js"(exports, module) {
10755
10759
  "use strict";
10756
10760
  init_cjs_shims();
10757
10761
  var utils = require_utils3();
@@ -11083,9 +11087,9 @@ var require_scan = __commonJS({
11083
11087
  }
11084
11088
  });
11085
11089
 
11086
- // ../../node_modules/picomatch/lib/parse.js
11090
+ // ../../node_modules/micromatch/node_modules/picomatch/lib/parse.js
11087
11091
  var require_parse2 = __commonJS({
11088
- "../../node_modules/picomatch/lib/parse.js"(exports, module) {
11092
+ "../../node_modules/micromatch/node_modules/picomatch/lib/parse.js"(exports, module) {
11089
11093
  "use strict";
11090
11094
  init_cjs_shims();
11091
11095
  var constants = require_constants2();
@@ -11113,6 +11117,213 @@ var require_parse2 = __commonJS({
11113
11117
  var syntaxError = (type, char) => {
11114
11118
  return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
11115
11119
  };
11120
+ var splitTopLevel = (input) => {
11121
+ const parts = [];
11122
+ let bracket = 0;
11123
+ let paren = 0;
11124
+ let quote = 0;
11125
+ let value = "";
11126
+ let escaped = false;
11127
+ for (const ch of input) {
11128
+ if (escaped === true) {
11129
+ value += ch;
11130
+ escaped = false;
11131
+ continue;
11132
+ }
11133
+ if (ch === "\\") {
11134
+ value += ch;
11135
+ escaped = true;
11136
+ continue;
11137
+ }
11138
+ if (ch === '"') {
11139
+ quote = quote === 1 ? 0 : 1;
11140
+ value += ch;
11141
+ continue;
11142
+ }
11143
+ if (quote === 0) {
11144
+ if (ch === "[") {
11145
+ bracket++;
11146
+ } else if (ch === "]" && bracket > 0) {
11147
+ bracket--;
11148
+ } else if (bracket === 0) {
11149
+ if (ch === "(") {
11150
+ paren++;
11151
+ } else if (ch === ")" && paren > 0) {
11152
+ paren--;
11153
+ } else if (ch === "|" && paren === 0) {
11154
+ parts.push(value);
11155
+ value = "";
11156
+ continue;
11157
+ }
11158
+ }
11159
+ }
11160
+ value += ch;
11161
+ }
11162
+ parts.push(value);
11163
+ return parts;
11164
+ };
11165
+ var isPlainBranch = (branch) => {
11166
+ let escaped = false;
11167
+ for (const ch of branch) {
11168
+ if (escaped === true) {
11169
+ escaped = false;
11170
+ continue;
11171
+ }
11172
+ if (ch === "\\") {
11173
+ escaped = true;
11174
+ continue;
11175
+ }
11176
+ if (/[?*+@!()[\]{}]/.test(ch)) {
11177
+ return false;
11178
+ }
11179
+ }
11180
+ return true;
11181
+ };
11182
+ var normalizeSimpleBranch = (branch) => {
11183
+ let value = branch.trim();
11184
+ let changed = true;
11185
+ while (changed === true) {
11186
+ changed = false;
11187
+ if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
11188
+ value = value.slice(2, -1);
11189
+ changed = true;
11190
+ }
11191
+ }
11192
+ if (!isPlainBranch(value)) {
11193
+ return;
11194
+ }
11195
+ return value.replace(/\\(.)/g, "$1");
11196
+ };
11197
+ var hasRepeatedCharPrefixOverlap = (branches) => {
11198
+ const values = branches.map(normalizeSimpleBranch).filter(Boolean);
11199
+ for (let i = 0; i < values.length; i++) {
11200
+ for (let j = i + 1; j < values.length; j++) {
11201
+ const a = values[i];
11202
+ const b = values[j];
11203
+ const char = a[0];
11204
+ if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
11205
+ continue;
11206
+ }
11207
+ if (a === b || a.startsWith(b) || b.startsWith(a)) {
11208
+ return true;
11209
+ }
11210
+ }
11211
+ }
11212
+ return false;
11213
+ };
11214
+ var parseRepeatedExtglob = (pattern, requireEnd = true) => {
11215
+ if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
11216
+ return;
11217
+ }
11218
+ let bracket = 0;
11219
+ let paren = 0;
11220
+ let quote = 0;
11221
+ let escaped = false;
11222
+ for (let i = 1; i < pattern.length; i++) {
11223
+ const ch = pattern[i];
11224
+ if (escaped === true) {
11225
+ escaped = false;
11226
+ continue;
11227
+ }
11228
+ if (ch === "\\") {
11229
+ escaped = true;
11230
+ continue;
11231
+ }
11232
+ if (ch === '"') {
11233
+ quote = quote === 1 ? 0 : 1;
11234
+ continue;
11235
+ }
11236
+ if (quote === 1) {
11237
+ continue;
11238
+ }
11239
+ if (ch === "[") {
11240
+ bracket++;
11241
+ continue;
11242
+ }
11243
+ if (ch === "]" && bracket > 0) {
11244
+ bracket--;
11245
+ continue;
11246
+ }
11247
+ if (bracket > 0) {
11248
+ continue;
11249
+ }
11250
+ if (ch === "(") {
11251
+ paren++;
11252
+ continue;
11253
+ }
11254
+ if (ch === ")") {
11255
+ paren--;
11256
+ if (paren === 0) {
11257
+ if (requireEnd === true && i !== pattern.length - 1) {
11258
+ return;
11259
+ }
11260
+ return {
11261
+ type: pattern[0],
11262
+ body: pattern.slice(2, i),
11263
+ end: i
11264
+ };
11265
+ }
11266
+ }
11267
+ }
11268
+ };
11269
+ var getStarExtglobSequenceOutput = (pattern) => {
11270
+ let index = 0;
11271
+ const chars = [];
11272
+ while (index < pattern.length) {
11273
+ const match = parseRepeatedExtglob(pattern.slice(index), false);
11274
+ if (!match || match.type !== "*") {
11275
+ return;
11276
+ }
11277
+ const branches = splitTopLevel(match.body).map((branch2) => branch2.trim());
11278
+ if (branches.length !== 1) {
11279
+ return;
11280
+ }
11281
+ const branch = normalizeSimpleBranch(branches[0]);
11282
+ if (!branch || branch.length !== 1) {
11283
+ return;
11284
+ }
11285
+ chars.push(branch);
11286
+ index += match.end + 1;
11287
+ }
11288
+ if (chars.length < 1) {
11289
+ return;
11290
+ }
11291
+ const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
11292
+ return `${source}*`;
11293
+ };
11294
+ var repeatedExtglobRecursion = (pattern) => {
11295
+ let depth = 0;
11296
+ let value = pattern.trim();
11297
+ let match = parseRepeatedExtglob(value);
11298
+ while (match) {
11299
+ depth++;
11300
+ value = match.body.trim();
11301
+ match = parseRepeatedExtglob(value);
11302
+ }
11303
+ return depth;
11304
+ };
11305
+ var analyzeRepeatedExtglob = (body, options) => {
11306
+ if (options.maxExtglobRecursion === false) {
11307
+ return { risky: false };
11308
+ }
11309
+ const max = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
11310
+ const branches = splitTopLevel(body).map((branch) => branch.trim());
11311
+ if (branches.length > 1) {
11312
+ if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
11313
+ return { risky: true };
11314
+ }
11315
+ }
11316
+ for (const branch of branches) {
11317
+ const safeOutput = getStarExtglobSequenceOutput(branch);
11318
+ if (safeOutput) {
11319
+ return { risky: true, safeOutput };
11320
+ }
11321
+ if (repeatedExtglobRecursion(branch) > max) {
11322
+ return { risky: true };
11323
+ }
11324
+ }
11325
+ return { risky: false };
11326
+ };
11116
11327
  var parse2 = (input, options) => {
11117
11328
  if (typeof input !== "string") {
11118
11329
  throw new TypeError("Expected a string");
@@ -11245,6 +11456,8 @@ var require_parse2 = __commonJS({
11245
11456
  token.prev = prev;
11246
11457
  token.parens = state.parens;
11247
11458
  token.output = state.output;
11459
+ token.startIndex = state.index;
11460
+ token.tokensIndex = tokens.length;
11248
11461
  const output = (opts.capture ? "(" : "") + token.open;
11249
11462
  increment("parens");
11250
11463
  push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
@@ -11252,6 +11465,26 @@ var require_parse2 = __commonJS({
11252
11465
  extglobs.push(token);
11253
11466
  };
11254
11467
  const extglobClose = (token) => {
11468
+ const literal = input.slice(token.startIndex, state.index + 1);
11469
+ const body = input.slice(token.startIndex + 2, state.index);
11470
+ const analysis = analyzeRepeatedExtglob(body, opts);
11471
+ if ((token.type === "plus" || token.type === "star") && analysis.risky) {
11472
+ const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
11473
+ const open = tokens[token.tokensIndex];
11474
+ open.type = "text";
11475
+ open.value = literal;
11476
+ open.output = safeOutput || utils.escapeRegex(literal);
11477
+ for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
11478
+ tokens[i].value = "";
11479
+ tokens[i].output = "";
11480
+ delete tokens[i].suffix;
11481
+ }
11482
+ state.output = token.output + open.output;
11483
+ state.backtrack = true;
11484
+ push({ type: "paren", extglob: true, value, output: "" });
11485
+ decrement("parens");
11486
+ return;
11487
+ }
11255
11488
  let output = token.close + (opts.capture ? ")" : "");
11256
11489
  let rest;
11257
11490
  if (token.type === "negate") {
@@ -11865,9 +12098,9 @@ var require_parse2 = __commonJS({
11865
12098
  }
11866
12099
  });
11867
12100
 
11868
- // ../../node_modules/picomatch/lib/picomatch.js
12101
+ // ../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js
11869
12102
  var require_picomatch = __commonJS({
11870
- "../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
12103
+ "../../node_modules/micromatch/node_modules/picomatch/lib/picomatch.js"(exports, module) {
11871
12104
  "use strict";
11872
12105
  init_cjs_shims();
11873
12106
  var path = __require("path");
@@ -12010,9 +12243,9 @@ var require_picomatch = __commonJS({
12010
12243
  }
12011
12244
  });
12012
12245
 
12013
- // ../../node_modules/picomatch/index.js
12246
+ // ../../node_modules/micromatch/node_modules/picomatch/index.js
12014
12247
  var require_picomatch2 = __commonJS({
12015
- "../../node_modules/picomatch/index.js"(exports, module) {
12248
+ "../../node_modules/micromatch/node_modules/picomatch/index.js"(exports, module) {
12016
12249
  "use strict";
12017
12250
  init_cjs_shims();
12018
12251
  module.exports = require_picomatch();
@@ -36506,80 +36739,9 @@ var require_form_data = __commonJS({
36506
36739
  }
36507
36740
  });
36508
36741
 
36509
- // ../../node_modules/proxy-from-env/index.js
36510
- var require_proxy_from_env = __commonJS({
36511
- "../../node_modules/proxy-from-env/index.js"(exports) {
36512
- "use strict";
36513
- init_cjs_shims();
36514
- var parseUrl = __require("url").parse;
36515
- var DEFAULT_PORTS = {
36516
- ftp: 21,
36517
- gopher: 70,
36518
- http: 80,
36519
- https: 443,
36520
- ws: 80,
36521
- wss: 443
36522
- };
36523
- var stringEndsWith = String.prototype.endsWith || function(s) {
36524
- return s.length <= this.length && this.indexOf(s, this.length - s.length) !== -1;
36525
- };
36526
- function getProxyForUrl(url) {
36527
- var parsedUrl = typeof url === "string" ? parseUrl(url) : url || {};
36528
- var proto = parsedUrl.protocol;
36529
- var hostname = parsedUrl.host;
36530
- var port = parsedUrl.port;
36531
- if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
36532
- return "";
36533
- }
36534
- proto = proto.split(":", 1)[0];
36535
- hostname = hostname.replace(/:\d*$/, "");
36536
- port = parseInt(port) || DEFAULT_PORTS[proto] || 0;
36537
- if (!shouldProxy(hostname, port)) {
36538
- return "";
36539
- }
36540
- var proxy = getEnv("npm_config_" + proto + "_proxy") || getEnv(proto + "_proxy") || getEnv("npm_config_proxy") || getEnv("all_proxy");
36541
- if (proxy && proxy.indexOf("://") === -1) {
36542
- proxy = proto + "://" + proxy;
36543
- }
36544
- return proxy;
36545
- }
36546
- function shouldProxy(hostname, port) {
36547
- var NO_PROXY = (getEnv("npm_config_no_proxy") || getEnv("no_proxy")).toLowerCase();
36548
- if (!NO_PROXY) {
36549
- return true;
36550
- }
36551
- if (NO_PROXY === "*") {
36552
- return false;
36553
- }
36554
- return NO_PROXY.split(/[,\s]/).every(function(proxy) {
36555
- if (!proxy) {
36556
- return true;
36557
- }
36558
- var parsedProxy = proxy.match(/^(.+):(\d+)$/);
36559
- var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
36560
- var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
36561
- if (parsedProxyPort && parsedProxyPort !== port) {
36562
- return true;
36563
- }
36564
- if (!/^[.*]/.test(parsedProxyHostname)) {
36565
- return hostname !== parsedProxyHostname;
36566
- }
36567
- if (parsedProxyHostname.charAt(0) === "*") {
36568
- parsedProxyHostname = parsedProxyHostname.slice(1);
36569
- }
36570
- return !stringEndsWith.call(hostname, parsedProxyHostname);
36571
- });
36572
- }
36573
- function getEnv(key) {
36574
- return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
36575
- }
36576
- exports.getProxyForUrl = getProxyForUrl;
36577
- }
36578
- });
36579
-
36580
- // ../../node_modules/axios/node_modules/follow-redirects/debug.js
36742
+ // ../../node_modules/follow-redirects/debug.js
36581
36743
  var require_debug = __commonJS({
36582
- "../../node_modules/axios/node_modules/follow-redirects/debug.js"(exports, module) {
36744
+ "../../node_modules/follow-redirects/debug.js"(exports, module) {
36583
36745
  init_cjs_shims();
36584
36746
  var debug;
36585
36747
  module.exports = function() {
@@ -36598,9 +36760,9 @@ var require_debug = __commonJS({
36598
36760
  }
36599
36761
  });
36600
36762
 
36601
- // ../../node_modules/axios/node_modules/follow-redirects/index.js
36763
+ // ../../node_modules/follow-redirects/index.js
36602
36764
  var require_follow_redirects = __commonJS({
36603
- "../../node_modules/axios/node_modules/follow-redirects/index.js"(exports, module) {
36765
+ "../../node_modules/follow-redirects/index.js"(exports, module) {
36604
36766
  init_cjs_shims();
36605
36767
  var url = __require("url");
36606
36768
  var URL2 = url.URL;
@@ -36623,6 +36785,11 @@ var require_follow_redirects = __commonJS({
36623
36785
  } catch (error) {
36624
36786
  useNativeURL = error.code === "ERR_INVALID_URL";
36625
36787
  }
36788
+ var sensitiveHeaders = [
36789
+ "Authorization",
36790
+ "Proxy-Authorization",
36791
+ "Cookie"
36792
+ ];
36626
36793
  var preservedUrlFields = [
36627
36794
  "auth",
36628
36795
  "host",
@@ -36687,6 +36854,7 @@ var require_follow_redirects = __commonJS({
36687
36854
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
36688
36855
  }
36689
36856
  };
36857
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex).join("|") + ")$", "i");
36690
36858
  this._performRequest();
36691
36859
  }
36692
36860
  RedirectableRequest.prototype = Object.create(Writable.prototype);
@@ -36824,6 +36992,9 @@ var require_follow_redirects = __commonJS({
36824
36992
  if (!options.headers) {
36825
36993
  options.headers = {};
36826
36994
  }
36995
+ if (!isArray(options.sensitiveHeaders)) {
36996
+ options.sensitiveHeaders = [];
36997
+ }
36827
36998
  if (options.host) {
36828
36999
  if (!options.hostname) {
36829
37000
  options.hostname = options.host;
@@ -36929,7 +37100,7 @@ var require_follow_redirects = __commonJS({
36929
37100
  this._isRedirect = true;
36930
37101
  spreadUrlObject(redirectUrl, this._options);
36931
37102
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
36932
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
37103
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
36933
37104
  }
36934
37105
  if (isFunction(beforeRedirect)) {
36935
37106
  var responseDetails = {
@@ -37078,6 +37249,9 @@ var require_follow_redirects = __commonJS({
37078
37249
  var dot = subdomain.length - domain.length - 1;
37079
37250
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
37080
37251
  }
37252
+ function isArray(value) {
37253
+ return value instanceof Array;
37254
+ }
37081
37255
  function isString(value) {
37082
37256
  return typeof value === "string" || value instanceof String;
37083
37257
  }
@@ -37090,6 +37264,9 @@ var require_follow_redirects = __commonJS({
37090
37264
  function isURL(value) {
37091
37265
  return URL2 && value instanceof URL2;
37092
37266
  }
37267
+ function escapeRegex(regex) {
37268
+ return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
37269
+ }
37093
37270
  module.exports = wrap({ http, https });
37094
37271
  module.exports.wrap = wrap;
37095
37272
  }
@@ -37103,37 +37280,30 @@ var require_axios = __commonJS({
37103
37280
  var FormData$1 = require_form_data();
37104
37281
  var crypto = __require("crypto");
37105
37282
  var url = __require("url");
37106
- var proxyFromEnv = require_proxy_from_env();
37107
37283
  var http = __require("http");
37108
37284
  var https = __require("https");
37109
37285
  var http2 = __require("http2");
37110
37286
  var util = __require("util");
37287
+ var path = __require("path");
37111
37288
  var followRedirects = require_follow_redirects();
37112
37289
  var zlib = __require("zlib");
37113
37290
  var stream = __require("stream");
37114
37291
  var events = __require("events");
37115
- function _interopDefaultLegacy(e) {
37116
- return e && typeof e === "object" && "default" in e ? e : { "default": e };
37117
- }
37118
- var FormData__default = /* @__PURE__ */ _interopDefaultLegacy(FormData$1);
37119
- var crypto__default = /* @__PURE__ */ _interopDefaultLegacy(crypto);
37120
- var url__default = /* @__PURE__ */ _interopDefaultLegacy(url);
37121
- var proxyFromEnv__default = /* @__PURE__ */ _interopDefaultLegacy(proxyFromEnv);
37122
- var http__default = /* @__PURE__ */ _interopDefaultLegacy(http);
37123
- var https__default = /* @__PURE__ */ _interopDefaultLegacy(https);
37124
- var http2__default = /* @__PURE__ */ _interopDefaultLegacy(http2);
37125
- var util__default = /* @__PURE__ */ _interopDefaultLegacy(util);
37126
- var followRedirects__default = /* @__PURE__ */ _interopDefaultLegacy(followRedirects);
37127
- var zlib__default = /* @__PURE__ */ _interopDefaultLegacy(zlib);
37128
- var stream__default = /* @__PURE__ */ _interopDefaultLegacy(stream);
37129
37292
  function bind(fn, thisArg) {
37130
37293
  return function wrap() {
37131
37294
  return fn.apply(thisArg, arguments);
37132
37295
  };
37133
37296
  }
37134
- var { toString } = Object.prototype;
37135
- var { getPrototypeOf } = Object;
37136
- var { iterator, toStringTag } = Symbol;
37297
+ var {
37298
+ toString
37299
+ } = Object.prototype;
37300
+ var {
37301
+ getPrototypeOf
37302
+ } = Object;
37303
+ var {
37304
+ iterator,
37305
+ toStringTag
37306
+ } = Symbol;
37137
37307
  var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
37138
37308
  const str = toString.call(thing);
37139
37309
  return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
@@ -37143,7 +37313,9 @@ var require_axios = __commonJS({
37143
37313
  return (thing) => kindOf(thing) === type;
37144
37314
  };
37145
37315
  var typeOfTest = (type) => (thing) => typeof thing === type;
37146
- var { isArray } = Array;
37316
+ var {
37317
+ isArray
37318
+ } = Array;
37147
37319
  var isUndefined = typeOfTest("undefined");
37148
37320
  function isBuffer(val) {
37149
37321
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
@@ -37182,23 +37354,48 @@ var require_axios = __commonJS({
37182
37354
  };
37183
37355
  var isDate = kindOfTest("Date");
37184
37356
  var isFile = kindOfTest("File");
37357
+ var isReactNativeBlob = (value) => {
37358
+ return !!(value && typeof value.uri !== "undefined");
37359
+ };
37360
+ var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
37185
37361
  var isBlob = kindOfTest("Blob");
37186
37362
  var isFileList = kindOfTest("FileList");
37187
37363
  var isStream = (val) => isObject(val) && isFunction$1(val.pipe);
37364
+ function getGlobal() {
37365
+ if (typeof globalThis !== "undefined")
37366
+ return globalThis;
37367
+ if (typeof self !== "undefined")
37368
+ return self;
37369
+ if (typeof window !== "undefined")
37370
+ return window;
37371
+ if (typeof global !== "undefined")
37372
+ return global;
37373
+ return {};
37374
+ }
37375
+ var G = getGlobal();
37376
+ var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
37188
37377
  var isFormData = (thing) => {
37189
- let kind;
37190
- return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
37191
- kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]"));
37378
+ if (!thing)
37379
+ return false;
37380
+ if (FormDataCtor && thing instanceof FormDataCtor)
37381
+ return true;
37382
+ const proto = getPrototypeOf(thing);
37383
+ if (!proto || proto === Object.prototype)
37384
+ return false;
37385
+ if (!isFunction$1(thing.append))
37386
+ return false;
37387
+ const kind = kindOf(thing);
37388
+ return kind === "formdata" || // detect form-data instance
37389
+ kind === "object" && isFunction$1(thing.toString) && thing.toString() === "[object FormData]";
37192
37390
  };
37193
37391
  var isURLSearchParams = kindOfTest("URLSearchParams");
37194
- var [isReadableStream, isRequest, isResponse, isHeaders] = [
37195
- "ReadableStream",
37196
- "Request",
37197
- "Response",
37198
- "Headers"
37199
- ].map(kindOfTest);
37200
- var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37201
- function forEach(obj, fn, { allOwnKeys = false } = {}) {
37392
+ var [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
37393
+ var trim = (str) => {
37394
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
37395
+ };
37396
+ function forEach(obj, fn, {
37397
+ allOwnKeys = false
37398
+ } = {}) {
37202
37399
  if (obj === null || typeof obj === "undefined") {
37203
37400
  return;
37204
37401
  }
@@ -37246,16 +37443,20 @@ var require_axios = __commonJS({
37246
37443
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
37247
37444
  })();
37248
37445
  var isContextDefined = (context) => !isUndefined(context) && context !== _global;
37249
- function merge() {
37250
- const { caseless, skipUndefined } = isContextDefined(this) && this || {};
37446
+ function merge(...objs) {
37447
+ const {
37448
+ caseless,
37449
+ skipUndefined
37450
+ } = isContextDefined(this) && this || {};
37251
37451
  const result = {};
37252
37452
  const assignValue = (val, key) => {
37253
37453
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
37254
37454
  return;
37255
37455
  }
37256
37456
  const targetKey = caseless && findKey(result, key) || key;
37257
- if (isPlainObject2(result[targetKey]) && isPlainObject2(val)) {
37258
- result[targetKey] = merge(result[targetKey], val);
37457
+ const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
37458
+ if (isPlainObject2(existing) && isPlainObject2(val)) {
37459
+ result[targetKey] = merge(existing, val);
37259
37460
  } else if (isPlainObject2(val)) {
37260
37461
  result[targetKey] = merge({}, val);
37261
37462
  } else if (isArray(val)) {
@@ -37264,33 +37465,37 @@ var require_axios = __commonJS({
37264
37465
  result[targetKey] = val;
37265
37466
  }
37266
37467
  };
37267
- for (let i = 0, l = arguments.length; i < l; i++) {
37268
- arguments[i] && forEach(arguments[i], assignValue);
37468
+ for (let i = 0, l = objs.length; i < l; i++) {
37469
+ objs[i] && forEach(objs[i], assignValue);
37269
37470
  }
37270
37471
  return result;
37271
37472
  }
37272
- var extend = (a, b, thisArg, { allOwnKeys } = {}) => {
37273
- forEach(
37274
- b,
37275
- (val, key) => {
37276
- if (thisArg && isFunction$1(val)) {
37277
- Object.defineProperty(a, key, {
37278
- value: bind(val, thisArg),
37279
- writable: true,
37280
- enumerable: true,
37281
- configurable: true
37282
- });
37283
- } else {
37284
- Object.defineProperty(a, key, {
37285
- value: val,
37286
- writable: true,
37287
- enumerable: true,
37288
- configurable: true
37289
- });
37290
- }
37291
- },
37292
- { allOwnKeys }
37293
- );
37473
+ var extend = (a, b, thisArg, {
37474
+ allOwnKeys
37475
+ } = {}) => {
37476
+ forEach(b, (val, key) => {
37477
+ if (thisArg && isFunction$1(val)) {
37478
+ Object.defineProperty(a, key, {
37479
+ // Null-proto descriptor so a polluted Object.prototype.get cannot
37480
+ // hijack defineProperty's accessor-vs-data resolution.
37481
+ __proto__: null,
37482
+ value: bind(val, thisArg),
37483
+ writable: true,
37484
+ enumerable: true,
37485
+ configurable: true
37486
+ });
37487
+ } else {
37488
+ Object.defineProperty(a, key, {
37489
+ __proto__: null,
37490
+ value: val,
37491
+ writable: true,
37492
+ enumerable: true,
37493
+ configurable: true
37494
+ });
37495
+ }
37496
+ }, {
37497
+ allOwnKeys
37498
+ });
37294
37499
  return a;
37295
37500
  };
37296
37501
  var stripBOM = (content) => {
@@ -37300,17 +37505,16 @@ var require_axios = __commonJS({
37300
37505
  return content;
37301
37506
  };
37302
37507
  var inherits = (constructor, superConstructor, props, descriptors) => {
37303
- constructor.prototype = Object.create(
37304
- superConstructor.prototype,
37305
- descriptors
37306
- );
37508
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
37307
37509
  Object.defineProperty(constructor.prototype, "constructor", {
37510
+ __proto__: null,
37308
37511
  value: constructor,
37309
37512
  writable: true,
37310
37513
  enumerable: false,
37311
37514
  configurable: true
37312
37515
  });
37313
37516
  Object.defineProperty(constructor, "super", {
37517
+ __proto__: null,
37314
37518
  value: superConstructor.prototype
37315
37519
  });
37316
37520
  props && Object.assign(constructor.prototype, props);
@@ -37388,7 +37592,9 @@ var require_axios = __commonJS({
37388
37592
  return p1.toUpperCase() + p2;
37389
37593
  });
37390
37594
  };
37391
- var hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
37595
+ var hasOwnProperty = (({
37596
+ hasOwnProperty: hasOwnProperty2
37597
+ }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
37392
37598
  var isRegExp = kindOfTest("RegExp");
37393
37599
  var reduceDescriptors = (obj, reducer) => {
37394
37600
  const descriptors = Object.getOwnPropertyDescriptors(obj);
@@ -37403,7 +37609,7 @@ var require_axios = __commonJS({
37403
37609
  };
37404
37610
  var freezeMethods = (obj) => {
37405
37611
  reduceDescriptors(obj, (descriptor, name) => {
37406
- if (isFunction$1(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
37612
+ if (isFunction$1(obj) && ["arguments", "caller", "callee"].includes(name)) {
37407
37613
  return false;
37408
37614
  }
37409
37615
  const value = obj[name];
@@ -37471,15 +37677,14 @@ var require_axios = __commonJS({
37471
37677
  return setImmediate;
37472
37678
  }
37473
37679
  return postMessageSupported ? ((token, callbacks) => {
37474
- _global.addEventListener(
37475
- "message",
37476
- ({ source, data }) => {
37477
- if (source === _global && data === token) {
37478
- callbacks.length && callbacks.shift()();
37479
- }
37480
- },
37481
- false
37482
- );
37680
+ _global.addEventListener("message", ({
37681
+ source,
37682
+ data
37683
+ }) => {
37684
+ if (source === _global && data === token) {
37685
+ callbacks.length && callbacks.shift()();
37686
+ }
37687
+ }, false);
37483
37688
  return (cb) => {
37484
37689
  callbacks.push(cb);
37485
37690
  _global.postMessage(token, "*");
@@ -37507,6 +37712,8 @@ var require_axios = __commonJS({
37507
37712
  isUndefined,
37508
37713
  isDate,
37509
37714
  isFile,
37715
+ isReactNativeBlob,
37716
+ isReactNative,
37510
37717
  isBlob,
37511
37718
  isRegExp,
37512
37719
  isFunction: isFunction$1,
@@ -37548,11 +37755,349 @@ var require_axios = __commonJS({
37548
37755
  asap,
37549
37756
  isIterable
37550
37757
  };
37758
+ var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
37759
+ var parseHeaders = (rawHeaders) => {
37760
+ const parsed = {};
37761
+ let key;
37762
+ let val;
37763
+ let i;
37764
+ rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
37765
+ i = line.indexOf(":");
37766
+ key = line.substring(0, i).trim().toLowerCase();
37767
+ val = line.substring(i + 1).trim();
37768
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
37769
+ return;
37770
+ }
37771
+ if (key === "set-cookie") {
37772
+ if (parsed[key]) {
37773
+ parsed[key].push(val);
37774
+ } else {
37775
+ parsed[key] = [val];
37776
+ }
37777
+ } else {
37778
+ parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
37779
+ }
37780
+ });
37781
+ return parsed;
37782
+ };
37783
+ var $internals = Symbol("internals");
37784
+ var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
37785
+ function trimSPorHTAB(str) {
37786
+ let start = 0;
37787
+ let end = str.length;
37788
+ while (start < end) {
37789
+ const code = str.charCodeAt(start);
37790
+ if (code !== 9 && code !== 32) {
37791
+ break;
37792
+ }
37793
+ start += 1;
37794
+ }
37795
+ while (end > start) {
37796
+ const code = str.charCodeAt(end - 1);
37797
+ if (code !== 9 && code !== 32) {
37798
+ break;
37799
+ }
37800
+ end -= 1;
37801
+ }
37802
+ return start === 0 && end === str.length ? str : str.slice(start, end);
37803
+ }
37804
+ function normalizeHeader(header) {
37805
+ return header && String(header).trim().toLowerCase();
37806
+ }
37807
+ function sanitizeHeaderValue(str) {
37808
+ return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
37809
+ }
37810
+ function normalizeValue(value) {
37811
+ if (value === false || value == null) {
37812
+ return value;
37813
+ }
37814
+ return utils$1.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
37815
+ }
37816
+ function parseTokens(str) {
37817
+ const tokens = /* @__PURE__ */ Object.create(null);
37818
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
37819
+ let match;
37820
+ while (match = tokensRE.exec(str)) {
37821
+ tokens[match[1]] = match[2];
37822
+ }
37823
+ return tokens;
37824
+ }
37825
+ var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
37826
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
37827
+ if (utils$1.isFunction(filter)) {
37828
+ return filter.call(this, value, header);
37829
+ }
37830
+ if (isHeaderNameFilter) {
37831
+ value = header;
37832
+ }
37833
+ if (!utils$1.isString(value))
37834
+ return;
37835
+ if (utils$1.isString(filter)) {
37836
+ return value.indexOf(filter) !== -1;
37837
+ }
37838
+ if (utils$1.isRegExp(filter)) {
37839
+ return filter.test(value);
37840
+ }
37841
+ }
37842
+ function formatHeader(header) {
37843
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
37844
+ return char.toUpperCase() + str;
37845
+ });
37846
+ }
37847
+ function buildAccessors(obj, header) {
37848
+ const accessorName = utils$1.toCamelCase(" " + header);
37849
+ ["get", "set", "has"].forEach((methodName) => {
37850
+ Object.defineProperty(obj, methodName + accessorName, {
37851
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
37852
+ // this data descriptor into an accessor descriptor on the way in.
37853
+ __proto__: null,
37854
+ value: function(arg1, arg2, arg3) {
37855
+ return this[methodName].call(this, header, arg1, arg2, arg3);
37856
+ },
37857
+ configurable: true
37858
+ });
37859
+ });
37860
+ }
37861
+ var AxiosHeaders = class {
37862
+ constructor(headers) {
37863
+ headers && this.set(headers);
37864
+ }
37865
+ set(header, valueOrRewrite, rewrite) {
37866
+ const self2 = this;
37867
+ function setHeader(_value, _header, _rewrite) {
37868
+ const lHeader = normalizeHeader(_header);
37869
+ if (!lHeader) {
37870
+ throw new Error("header name must be a non-empty string");
37871
+ }
37872
+ const key = utils$1.findKey(self2, lHeader);
37873
+ if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
37874
+ self2[key || _header] = normalizeValue(_value);
37875
+ }
37876
+ }
37877
+ const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
37878
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
37879
+ setHeaders(header, valueOrRewrite);
37880
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
37881
+ setHeaders(parseHeaders(header), valueOrRewrite);
37882
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
37883
+ let obj = {}, dest, key;
37884
+ for (const entry of header) {
37885
+ if (!utils$1.isArray(entry)) {
37886
+ throw TypeError("Object iterator must return a key-value pair");
37887
+ }
37888
+ obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
37889
+ }
37890
+ setHeaders(obj, valueOrRewrite);
37891
+ } else {
37892
+ header != null && setHeader(valueOrRewrite, header, rewrite);
37893
+ }
37894
+ return this;
37895
+ }
37896
+ get(header, parser) {
37897
+ header = normalizeHeader(header);
37898
+ if (header) {
37899
+ const key = utils$1.findKey(this, header);
37900
+ if (key) {
37901
+ const value = this[key];
37902
+ if (!parser) {
37903
+ return value;
37904
+ }
37905
+ if (parser === true) {
37906
+ return parseTokens(value);
37907
+ }
37908
+ if (utils$1.isFunction(parser)) {
37909
+ return parser.call(this, value, key);
37910
+ }
37911
+ if (utils$1.isRegExp(parser)) {
37912
+ return parser.exec(value);
37913
+ }
37914
+ throw new TypeError("parser must be boolean|regexp|function");
37915
+ }
37916
+ }
37917
+ }
37918
+ has(header, matcher) {
37919
+ header = normalizeHeader(header);
37920
+ if (header) {
37921
+ const key = utils$1.findKey(this, header);
37922
+ return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
37923
+ }
37924
+ return false;
37925
+ }
37926
+ delete(header, matcher) {
37927
+ const self2 = this;
37928
+ let deleted = false;
37929
+ function deleteHeader(_header) {
37930
+ _header = normalizeHeader(_header);
37931
+ if (_header) {
37932
+ const key = utils$1.findKey(self2, _header);
37933
+ if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
37934
+ delete self2[key];
37935
+ deleted = true;
37936
+ }
37937
+ }
37938
+ }
37939
+ if (utils$1.isArray(header)) {
37940
+ header.forEach(deleteHeader);
37941
+ } else {
37942
+ deleteHeader(header);
37943
+ }
37944
+ return deleted;
37945
+ }
37946
+ clear(matcher) {
37947
+ const keys = Object.keys(this);
37948
+ let i = keys.length;
37949
+ let deleted = false;
37950
+ while (i--) {
37951
+ const key = keys[i];
37952
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
37953
+ delete this[key];
37954
+ deleted = true;
37955
+ }
37956
+ }
37957
+ return deleted;
37958
+ }
37959
+ normalize(format) {
37960
+ const self2 = this;
37961
+ const headers = {};
37962
+ utils$1.forEach(this, (value, header) => {
37963
+ const key = utils$1.findKey(headers, header);
37964
+ if (key) {
37965
+ self2[key] = normalizeValue(value);
37966
+ delete self2[header];
37967
+ return;
37968
+ }
37969
+ const normalized = format ? formatHeader(header) : String(header).trim();
37970
+ if (normalized !== header) {
37971
+ delete self2[header];
37972
+ }
37973
+ self2[normalized] = normalizeValue(value);
37974
+ headers[normalized] = true;
37975
+ });
37976
+ return this;
37977
+ }
37978
+ concat(...targets) {
37979
+ return this.constructor.concat(this, ...targets);
37980
+ }
37981
+ toJSON(asStrings) {
37982
+ const obj = /* @__PURE__ */ Object.create(null);
37983
+ utils$1.forEach(this, (value, header) => {
37984
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
37985
+ });
37986
+ return obj;
37987
+ }
37988
+ [Symbol.iterator]() {
37989
+ return Object.entries(this.toJSON())[Symbol.iterator]();
37990
+ }
37991
+ toString() {
37992
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
37993
+ }
37994
+ getSetCookie() {
37995
+ return this.get("set-cookie") || [];
37996
+ }
37997
+ get [Symbol.toStringTag]() {
37998
+ return "AxiosHeaders";
37999
+ }
38000
+ static from(thing) {
38001
+ return thing instanceof this ? thing : new this(thing);
38002
+ }
38003
+ static concat(first, ...targets) {
38004
+ const computed = new this(first);
38005
+ targets.forEach((target) => computed.set(target));
38006
+ return computed;
38007
+ }
38008
+ static accessor(header) {
38009
+ const internals = this[$internals] = this[$internals] = {
38010
+ accessors: {}
38011
+ };
38012
+ const accessors = internals.accessors;
38013
+ const prototype2 = this.prototype;
38014
+ function defineAccessor(_header) {
38015
+ const lHeader = normalizeHeader(_header);
38016
+ if (!accessors[lHeader]) {
38017
+ buildAccessors(prototype2, _header);
38018
+ accessors[lHeader] = true;
38019
+ }
38020
+ }
38021
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
38022
+ return this;
38023
+ }
38024
+ };
38025
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
38026
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({
38027
+ value
38028
+ }, key) => {
38029
+ let mapped = key[0].toUpperCase() + key.slice(1);
38030
+ return {
38031
+ get: () => value,
38032
+ set(headerValue) {
38033
+ this[mapped] = headerValue;
38034
+ }
38035
+ };
38036
+ });
38037
+ utils$1.freezeMethods(AxiosHeaders);
38038
+ var REDACTED = "[REDACTED ****]";
38039
+ function hasOwnOrPrototypeToJSON(source) {
38040
+ if (utils$1.hasOwnProp(source, "toJSON")) {
38041
+ return true;
38042
+ }
38043
+ let prototype2 = Object.getPrototypeOf(source);
38044
+ while (prototype2 && prototype2 !== Object.prototype) {
38045
+ if (utils$1.hasOwnProp(prototype2, "toJSON")) {
38046
+ return true;
38047
+ }
38048
+ prototype2 = Object.getPrototypeOf(prototype2);
38049
+ }
38050
+ return false;
38051
+ }
38052
+ function redactConfig(config, redactKeys) {
38053
+ const lowerKeys = new Set(redactKeys.map((k) => String(k).toLowerCase()));
38054
+ const seen = [];
38055
+ const visit = (source) => {
38056
+ if (source === null || typeof source !== "object")
38057
+ return source;
38058
+ if (utils$1.isBuffer(source))
38059
+ return source;
38060
+ if (seen.indexOf(source) !== -1)
38061
+ return void 0;
38062
+ if (source instanceof AxiosHeaders) {
38063
+ source = source.toJSON();
38064
+ }
38065
+ seen.push(source);
38066
+ let result;
38067
+ if (utils$1.isArray(source)) {
38068
+ result = [];
38069
+ source.forEach((v, i) => {
38070
+ const reducedValue = visit(v);
38071
+ if (!utils$1.isUndefined(reducedValue)) {
38072
+ result[i] = reducedValue;
38073
+ }
38074
+ });
38075
+ } else {
38076
+ if (!utils$1.isPlainObject(source) && hasOwnOrPrototypeToJSON(source)) {
38077
+ seen.pop();
38078
+ return source;
38079
+ }
38080
+ result = /* @__PURE__ */ Object.create(null);
38081
+ for (const [key, value] of Object.entries(source)) {
38082
+ const reducedValue = lowerKeys.has(key.toLowerCase()) ? REDACTED : visit(value);
38083
+ if (!utils$1.isUndefined(reducedValue)) {
38084
+ result[key] = reducedValue;
38085
+ }
38086
+ }
38087
+ }
38088
+ seen.pop();
38089
+ return result;
38090
+ };
38091
+ return visit(config);
38092
+ }
37551
38093
  var AxiosError = class _AxiosError extends Error {
37552
38094
  static from(error, code, config, request, response, customProps) {
37553
38095
  const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
37554
38096
  axiosError.cause = error;
37555
38097
  axiosError.name = error.name;
38098
+ if (error.status != null && axiosError.status == null) {
38099
+ axiosError.status = error.status;
38100
+ }
37556
38101
  customProps && Object.assign(axiosError, customProps);
37557
38102
  return axiosError;
37558
38103
  }
@@ -37569,6 +38114,15 @@ var require_axios = __commonJS({
37569
38114
  */
37570
38115
  constructor(message, code, config, request, response) {
37571
38116
  super(message);
38117
+ Object.defineProperty(this, "message", {
38118
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
38119
+ // this data descriptor into an accessor descriptor on the way in.
38120
+ __proto__: null,
38121
+ value: message,
38122
+ enumerable: true,
38123
+ writable: true,
38124
+ configurable: true
38125
+ });
37572
38126
  this.name = "AxiosError";
37573
38127
  this.isAxiosError = true;
37574
38128
  code && (this.code = code);
@@ -37580,6 +38134,9 @@ var require_axios = __commonJS({
37580
38134
  }
37581
38135
  }
37582
38136
  toJSON() {
38137
+ const config = this.config;
38138
+ const redactKeys = config && utils$1.hasOwnProp(config, "redact") ? config.redact : void 0;
38139
+ const serializedConfig = utils$1.isArray(redactKeys) && redactKeys.length > 0 ? redactConfig(config, redactKeys) : utils$1.toJSONObject(config);
37583
38140
  return {
37584
38141
  // Standard
37585
38142
  message: this.message,
@@ -37593,7 +38150,7 @@ var require_axios = __commonJS({
37593
38150
  columnNumber: this.columnNumber,
37594
38151
  stack: this.stack,
37595
38152
  // Axios
37596
- config: utils$1.toJSONObject(this.config),
38153
+ config: serializedConfig,
37597
38154
  code: this.code,
37598
38155
  status: this.status
37599
38156
  };
@@ -37603,6 +38160,7 @@ var require_axios = __commonJS({
37603
38160
  AxiosError.ERR_BAD_OPTION = "ERR_BAD_OPTION";
37604
38161
  AxiosError.ECONNABORTED = "ECONNABORTED";
37605
38162
  AxiosError.ETIMEDOUT = "ETIMEDOUT";
38163
+ AxiosError.ECONNREFUSED = "ECONNREFUSED";
37606
38164
  AxiosError.ERR_NETWORK = "ERR_NETWORK";
37607
38165
  AxiosError.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
37608
38166
  AxiosError.ERR_DEPRECATED = "ERR_DEPRECATED";
@@ -37611,17 +38169,17 @@ var require_axios = __commonJS({
37611
38169
  AxiosError.ERR_CANCELED = "ERR_CANCELED";
37612
38170
  AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
37613
38171
  AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
37614
- var AxiosError$1 = AxiosError;
38172
+ AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
37615
38173
  function isVisitable(thing) {
37616
38174
  return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
37617
38175
  }
37618
38176
  function removeBrackets(key) {
37619
38177
  return utils$1.endsWith(key, "[]") ? key.slice(0, -2) : key;
37620
38178
  }
37621
- function renderKey(path, key, dots) {
37622
- if (!path)
38179
+ function renderKey(path2, key, dots) {
38180
+ if (!path2)
37623
38181
  return key;
37624
- return path.concat(key).map(function each(token, i) {
38182
+ return path2.concat(key).map(function each(token, i) {
37625
38183
  token = removeBrackets(token);
37626
38184
  return !dots && i ? "[" + token + "]" : token;
37627
38185
  }).join(dots ? "." : "");
@@ -37636,7 +38194,7 @@ var require_axios = __commonJS({
37636
38194
  if (!utils$1.isObject(obj)) {
37637
38195
  throw new TypeError("target must be an object");
37638
38196
  }
37639
- formData = formData || new (FormData__default["default"] || FormData)();
38197
+ formData = formData || new (FormData$1 || FormData)();
37640
38198
  options = utils$1.toFlatObject(options, {
37641
38199
  metaTokens: true,
37642
38200
  dots: false,
@@ -37649,6 +38207,7 @@ var require_axios = __commonJS({
37649
38207
  const dots = options.dots;
37650
38208
  const indexes = options.indexes;
37651
38209
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
38210
+ const maxDepth = options.maxDepth === void 0 ? 100 : options.maxDepth;
37652
38211
  const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
37653
38212
  if (!utils$1.isFunction(visitor)) {
37654
38213
  throw new TypeError("visitor must be a function");
@@ -37663,16 +38222,20 @@ var require_axios = __commonJS({
37663
38222
  return value.toString();
37664
38223
  }
37665
38224
  if (!useBlob && utils$1.isBlob(value)) {
37666
- throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
38225
+ throw new AxiosError("Blob is not supported. Use a Buffer instead.");
37667
38226
  }
37668
38227
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
37669
38228
  return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
37670
38229
  }
37671
38230
  return value;
37672
38231
  }
37673
- function defaultVisitor(value, key, path) {
38232
+ function defaultVisitor(value, key, path2) {
37674
38233
  let arr = value;
37675
- if (value && !path && typeof value === "object") {
38234
+ if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
38235
+ formData.append(renderKey(path2, key, dots), convertValue(value));
38236
+ return false;
38237
+ }
38238
+ if (value && !path2 && typeof value === "object") {
37676
38239
  if (utils$1.endsWith(key, "{}")) {
37677
38240
  key = metaTokens ? key : key.slice(0, -2);
37678
38241
  value = JSON.stringify(value);
@@ -37691,7 +38254,7 @@ var require_axios = __commonJS({
37691
38254
  if (isVisitable(value)) {
37692
38255
  return true;
37693
38256
  }
37694
- formData.append(renderKey(path, key, dots), convertValue(value));
38257
+ formData.append(renderKey(path2, key, dots), convertValue(value));
37695
38258
  return false;
37696
38259
  }
37697
38260
  const stack = [];
@@ -37700,23 +38263,20 @@ var require_axios = __commonJS({
37700
38263
  convertValue,
37701
38264
  isVisitable
37702
38265
  });
37703
- function build(value, path) {
38266
+ function build(value, path2, depth = 0) {
37704
38267
  if (utils$1.isUndefined(value))
37705
38268
  return;
38269
+ if (depth > maxDepth) {
38270
+ throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
38271
+ }
37706
38272
  if (stack.indexOf(value) !== -1) {
37707
- throw Error("Circular reference detected in " + path.join("."));
38273
+ throw Error("Circular reference detected in " + path2.join("."));
37708
38274
  }
37709
38275
  stack.push(value);
37710
38276
  utils$1.forEach(value, function each(el, key) {
37711
- const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
37712
- formData,
37713
- el,
37714
- utils$1.isString(key) ? key.trim() : key,
37715
- path,
37716
- exposedHelpers
37717
- );
38277
+ const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path2, exposedHelpers);
37718
38278
  if (result === true) {
37719
- build(el, path ? path.concat(key) : [key]);
38279
+ build(el, path2 ? path2.concat(key) : [key], depth + 1);
37720
38280
  }
37721
38281
  });
37722
38282
  stack.pop();
@@ -37734,10 +38294,9 @@ var require_axios = __commonJS({
37734
38294
  "(": "%28",
37735
38295
  ")": "%29",
37736
38296
  "~": "%7E",
37737
- "%20": "+",
37738
- "%00": "\0"
38297
+ "%20": "+"
37739
38298
  };
37740
- return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
38299
+ return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
37741
38300
  return charMap[match];
37742
38301
  });
37743
38302
  }
@@ -37846,14 +38405,13 @@ var require_axios = __commonJS({
37846
38405
  });
37847
38406
  }
37848
38407
  };
37849
- var InterceptorManager$1 = InterceptorManager;
37850
38408
  var transitionalDefaults = {
37851
38409
  silentJSONParsing: true,
37852
38410
  forcedJSONParsing: true,
37853
38411
  clarifyTimeoutError: false,
37854
38412
  legacyInterceptorReqResOrdering: true
37855
38413
  };
37856
- var URLSearchParams = url__default["default"].URLSearchParams;
38414
+ var URLSearchParams = url.URLSearchParams;
37857
38415
  var ALPHA = "abcdefghijklmnopqrstuvwxyz";
37858
38416
  var DIGIT = "0123456789";
37859
38417
  var ALPHABET = {
@@ -37863,9 +38421,11 @@ var require_axios = __commonJS({
37863
38421
  };
37864
38422
  var generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
37865
38423
  let str = "";
37866
- const { length } = alphabet;
38424
+ const {
38425
+ length
38426
+ } = alphabet;
37867
38427
  const randomValues = new Uint32Array(size);
37868
- crypto__default["default"].randomFillSync(randomValues);
38428
+ crypto.randomFillSync(randomValues);
37869
38429
  for (let i = 0; i < size; i++) {
37870
38430
  str += alphabet[randomValues[i] % length];
37871
38431
  }
@@ -37875,7 +38435,7 @@ var require_axios = __commonJS({
37875
38435
  isNode: true,
37876
38436
  classes: {
37877
38437
  URLSearchParams,
37878
- FormData: FormData__default["default"],
38438
+ FormData: FormData$1,
37879
38439
  Blob: typeof Blob !== "undefined" && Blob || null
37880
38440
  },
37881
38441
  ALPHABET,
@@ -37893,8 +38453,8 @@ var require_axios = __commonJS({
37893
38453
  var utils = /* @__PURE__ */ Object.freeze({
37894
38454
  __proto__: null,
37895
38455
  hasBrowserEnv,
37896
- hasStandardBrowserWebWorkerEnv,
37897
38456
  hasStandardBrowserEnv,
38457
+ hasStandardBrowserWebWorkerEnv,
37898
38458
  navigator: _navigator,
37899
38459
  origin
37900
38460
  });
@@ -37904,7 +38464,7 @@ var require_axios = __commonJS({
37904
38464
  };
37905
38465
  function toURLEncodedForm(data, options) {
37906
38466
  return toFormData(data, new platform.classes.URLSearchParams(), {
37907
- visitor: function(value, key, path, helpers) {
38467
+ visitor: function(value, key, path2, helpers) {
37908
38468
  if (platform.isNode && utils$1.isBuffer(value)) {
37909
38469
  this.append(key, value.toString("base64"));
37910
38470
  return false;
@@ -37932,16 +38492,16 @@ var require_axios = __commonJS({
37932
38492
  return obj;
37933
38493
  }
37934
38494
  function formDataToJSON(formData) {
37935
- function buildPath(path, value, target, index) {
37936
- let name = path[index++];
38495
+ function buildPath(path2, value, target, index) {
38496
+ let name = path2[index++];
37937
38497
  if (name === "__proto__")
37938
38498
  return true;
37939
38499
  const isNumericKey = Number.isFinite(+name);
37940
- const isLast = index >= path.length;
38500
+ const isLast = index >= path2.length;
37941
38501
  name = !name && utils$1.isArray(target) ? target.length : name;
37942
38502
  if (isLast) {
37943
38503
  if (utils$1.hasOwnProp(target, name)) {
37944
- target[name] = [target[name], value];
38504
+ target[name] = utils$1.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
37945
38505
  } else {
37946
38506
  target[name] = value;
37947
38507
  }
@@ -37950,7 +38510,7 @@ var require_axios = __commonJS({
37950
38510
  if (!target[name] || !utils$1.isObject(target[name])) {
37951
38511
  target[name] = [];
37952
38512
  }
37953
- const result = buildPath(path, value, target[name], index);
38513
+ const result = buildPath(path2, value, target[name], index);
37954
38514
  if (result && utils$1.isArray(target[name])) {
37955
38515
  target[name] = arrayToObject(target[name]);
37956
38516
  }
@@ -37965,6 +38525,7 @@ var require_axios = __commonJS({
37965
38525
  }
37966
38526
  return null;
37967
38527
  }
38528
+ var own = (obj, key) => obj != null && utils$1.hasOwnProp(obj, key) ? obj[key] : void 0;
37968
38529
  function stringifySafely(rawValue, parser, encoder) {
37969
38530
  if (utils$1.isString(rawValue)) {
37970
38531
  try {
@@ -38004,16 +38565,16 @@ var require_axios = __commonJS({
38004
38565
  }
38005
38566
  let isFileList2;
38006
38567
  if (isObjectPayload) {
38568
+ const formSerializer = own(this, "formSerializer");
38007
38569
  if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
38008
- return toURLEncodedForm(data, this.formSerializer).toString();
38570
+ return toURLEncodedForm(data, formSerializer).toString();
38009
38571
  }
38010
38572
  if ((isFileList2 = utils$1.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
38011
- const _FormData = this.env && this.env.FormData;
38012
- return toFormData(
38013
- isFileList2 ? { "files[]": data } : data,
38014
- _FormData && new _FormData(),
38015
- this.formSerializer
38016
- );
38573
+ const env = own(this, "env");
38574
+ const _FormData = env && env.FormData;
38575
+ return toFormData(isFileList2 ? {
38576
+ "files[]": data
38577
+ } : data, _FormData && new _FormData(), formSerializer);
38017
38578
  }
38018
38579
  }
38019
38580
  if (isObjectPayload || hasJSONContentType) {
@@ -38023,21 +38584,22 @@ var require_axios = __commonJS({
38023
38584
  return data;
38024
38585
  }],
38025
38586
  transformResponse: [function transformResponse(data) {
38026
- const transitional = this.transitional || defaults.transitional;
38587
+ const transitional = own(this, "transitional") || defaults.transitional;
38027
38588
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
38028
- const JSONRequested = this.responseType === "json";
38589
+ const responseType = own(this, "responseType");
38590
+ const JSONRequested = responseType === "json";
38029
38591
  if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
38030
38592
  return data;
38031
38593
  }
38032
- if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
38594
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
38033
38595
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
38034
38596
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
38035
38597
  try {
38036
- return JSON.parse(data, this.parseReviver);
38598
+ return JSON.parse(data, own(this, "parseReviver"));
38037
38599
  } catch (e) {
38038
38600
  if (strictJSONParsing) {
38039
38601
  if (e.name === "SyntaxError") {
38040
- throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
38602
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, own(this, "response"));
38041
38603
  }
38042
38604
  throw e;
38043
38605
  }
@@ -38063,290 +38625,18 @@ var require_axios = __commonJS({
38063
38625
  },
38064
38626
  headers: {
38065
38627
  common: {
38066
- "Accept": "application/json, text/plain, */*",
38628
+ Accept: "application/json, text/plain, */*",
38067
38629
  "Content-Type": void 0
38068
38630
  }
38069
38631
  }
38070
38632
  };
38071
- utils$1.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
38633
+ utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query"], (method) => {
38072
38634
  defaults.headers[method] = {};
38073
38635
  });
38074
- var defaults$1 = defaults;
38075
- var ignoreDuplicateOf = utils$1.toObjectSet([
38076
- "age",
38077
- "authorization",
38078
- "content-length",
38079
- "content-type",
38080
- "etag",
38081
- "expires",
38082
- "from",
38083
- "host",
38084
- "if-modified-since",
38085
- "if-unmodified-since",
38086
- "last-modified",
38087
- "location",
38088
- "max-forwards",
38089
- "proxy-authorization",
38090
- "referer",
38091
- "retry-after",
38092
- "user-agent"
38093
- ]);
38094
- var parseHeaders = (rawHeaders) => {
38095
- const parsed = {};
38096
- let key;
38097
- let val;
38098
- let i;
38099
- rawHeaders && rawHeaders.split("\n").forEach(function parser(line) {
38100
- i = line.indexOf(":");
38101
- key = line.substring(0, i).trim().toLowerCase();
38102
- val = line.substring(i + 1).trim();
38103
- if (!key || parsed[key] && ignoreDuplicateOf[key]) {
38104
- return;
38105
- }
38106
- if (key === "set-cookie") {
38107
- if (parsed[key]) {
38108
- parsed[key].push(val);
38109
- } else {
38110
- parsed[key] = [val];
38111
- }
38112
- } else {
38113
- parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
38114
- }
38115
- });
38116
- return parsed;
38117
- };
38118
- var $internals = Symbol("internals");
38119
- function normalizeHeader(header) {
38120
- return header && String(header).trim().toLowerCase();
38121
- }
38122
- function normalizeValue(value) {
38123
- if (value === false || value == null) {
38124
- return value;
38125
- }
38126
- return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
38127
- }
38128
- function parseTokens(str) {
38129
- const tokens = /* @__PURE__ */ Object.create(null);
38130
- const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
38131
- let match;
38132
- while (match = tokensRE.exec(str)) {
38133
- tokens[match[1]] = match[2];
38134
- }
38135
- return tokens;
38136
- }
38137
- var isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
38138
- function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
38139
- if (utils$1.isFunction(filter)) {
38140
- return filter.call(this, value, header);
38141
- }
38142
- if (isHeaderNameFilter) {
38143
- value = header;
38144
- }
38145
- if (!utils$1.isString(value))
38146
- return;
38147
- if (utils$1.isString(filter)) {
38148
- return value.indexOf(filter) !== -1;
38149
- }
38150
- if (utils$1.isRegExp(filter)) {
38151
- return filter.test(value);
38152
- }
38153
- }
38154
- function formatHeader(header) {
38155
- return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
38156
- return char.toUpperCase() + str;
38157
- });
38158
- }
38159
- function buildAccessors(obj, header) {
38160
- const accessorName = utils$1.toCamelCase(" " + header);
38161
- ["get", "set", "has"].forEach((methodName) => {
38162
- Object.defineProperty(obj, methodName + accessorName, {
38163
- value: function(arg1, arg2, arg3) {
38164
- return this[methodName].call(this, header, arg1, arg2, arg3);
38165
- },
38166
- configurable: true
38167
- });
38168
- });
38169
- }
38170
- var AxiosHeaders = class {
38171
- constructor(headers) {
38172
- headers && this.set(headers);
38173
- }
38174
- set(header, valueOrRewrite, rewrite) {
38175
- const self2 = this;
38176
- function setHeader(_value, _header, _rewrite) {
38177
- const lHeader = normalizeHeader(_header);
38178
- if (!lHeader) {
38179
- throw new Error("header name must be a non-empty string");
38180
- }
38181
- const key = utils$1.findKey(self2, lHeader);
38182
- if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
38183
- self2[key || _header] = normalizeValue(_value);
38184
- }
38185
- }
38186
- const setHeaders = (headers, _rewrite) => utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
38187
- if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
38188
- setHeaders(header, valueOrRewrite);
38189
- } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
38190
- setHeaders(parseHeaders(header), valueOrRewrite);
38191
- } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
38192
- let obj = {}, dest, key;
38193
- for (const entry of header) {
38194
- if (!utils$1.isArray(entry)) {
38195
- throw TypeError("Object iterator must return a key-value pair");
38196
- }
38197
- obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
38198
- }
38199
- setHeaders(obj, valueOrRewrite);
38200
- } else {
38201
- header != null && setHeader(valueOrRewrite, header, rewrite);
38202
- }
38203
- return this;
38204
- }
38205
- get(header, parser) {
38206
- header = normalizeHeader(header);
38207
- if (header) {
38208
- const key = utils$1.findKey(this, header);
38209
- if (key) {
38210
- const value = this[key];
38211
- if (!parser) {
38212
- return value;
38213
- }
38214
- if (parser === true) {
38215
- return parseTokens(value);
38216
- }
38217
- if (utils$1.isFunction(parser)) {
38218
- return parser.call(this, value, key);
38219
- }
38220
- if (utils$1.isRegExp(parser)) {
38221
- return parser.exec(value);
38222
- }
38223
- throw new TypeError("parser must be boolean|regexp|function");
38224
- }
38225
- }
38226
- }
38227
- has(header, matcher) {
38228
- header = normalizeHeader(header);
38229
- if (header) {
38230
- const key = utils$1.findKey(this, header);
38231
- return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
38232
- }
38233
- return false;
38234
- }
38235
- delete(header, matcher) {
38236
- const self2 = this;
38237
- let deleted = false;
38238
- function deleteHeader(_header) {
38239
- _header = normalizeHeader(_header);
38240
- if (_header) {
38241
- const key = utils$1.findKey(self2, _header);
38242
- if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
38243
- delete self2[key];
38244
- deleted = true;
38245
- }
38246
- }
38247
- }
38248
- if (utils$1.isArray(header)) {
38249
- header.forEach(deleteHeader);
38250
- } else {
38251
- deleteHeader(header);
38252
- }
38253
- return deleted;
38254
- }
38255
- clear(matcher) {
38256
- const keys = Object.keys(this);
38257
- let i = keys.length;
38258
- let deleted = false;
38259
- while (i--) {
38260
- const key = keys[i];
38261
- if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
38262
- delete this[key];
38263
- deleted = true;
38264
- }
38265
- }
38266
- return deleted;
38267
- }
38268
- normalize(format) {
38269
- const self2 = this;
38270
- const headers = {};
38271
- utils$1.forEach(this, (value, header) => {
38272
- const key = utils$1.findKey(headers, header);
38273
- if (key) {
38274
- self2[key] = normalizeValue(value);
38275
- delete self2[header];
38276
- return;
38277
- }
38278
- const normalized = format ? formatHeader(header) : String(header).trim();
38279
- if (normalized !== header) {
38280
- delete self2[header];
38281
- }
38282
- self2[normalized] = normalizeValue(value);
38283
- headers[normalized] = true;
38284
- });
38285
- return this;
38286
- }
38287
- concat(...targets) {
38288
- return this.constructor.concat(this, ...targets);
38289
- }
38290
- toJSON(asStrings) {
38291
- const obj = /* @__PURE__ */ Object.create(null);
38292
- utils$1.forEach(this, (value, header) => {
38293
- value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(", ") : value);
38294
- });
38295
- return obj;
38296
- }
38297
- [Symbol.iterator]() {
38298
- return Object.entries(this.toJSON())[Symbol.iterator]();
38299
- }
38300
- toString() {
38301
- return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
38302
- }
38303
- getSetCookie() {
38304
- return this.get("set-cookie") || [];
38305
- }
38306
- get [Symbol.toStringTag]() {
38307
- return "AxiosHeaders";
38308
- }
38309
- static from(thing) {
38310
- return thing instanceof this ? thing : new this(thing);
38311
- }
38312
- static concat(first, ...targets) {
38313
- const computed = new this(first);
38314
- targets.forEach((target) => computed.set(target));
38315
- return computed;
38316
- }
38317
- static accessor(header) {
38318
- const internals = this[$internals] = this[$internals] = {
38319
- accessors: {}
38320
- };
38321
- const accessors = internals.accessors;
38322
- const prototype2 = this.prototype;
38323
- function defineAccessor(_header) {
38324
- const lHeader = normalizeHeader(_header);
38325
- if (!accessors[lHeader]) {
38326
- buildAccessors(prototype2, _header);
38327
- accessors[lHeader] = true;
38328
- }
38329
- }
38330
- utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
38331
- return this;
38332
- }
38333
- };
38334
- AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
38335
- utils$1.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
38336
- let mapped = key[0].toUpperCase() + key.slice(1);
38337
- return {
38338
- get: () => value,
38339
- set(headerValue) {
38340
- this[mapped] = headerValue;
38341
- }
38342
- };
38343
- });
38344
- utils$1.freezeMethods(AxiosHeaders);
38345
- var AxiosHeaders$1 = AxiosHeaders;
38346
38636
  function transformData(fns, response) {
38347
- const config = this || defaults$1;
38637
+ const config = this || defaults;
38348
38638
  const context = response || config;
38349
- const headers = AxiosHeaders$1.from(context.headers);
38639
+ const headers = AxiosHeaders.from(context.headers);
38350
38640
  let data = context.data;
38351
38641
  utils$1.forEach(fns, function transform(fn) {
38352
38642
  data = fn.call(config, data, headers.normalize(), response ? response.status : void 0);
@@ -38357,7 +38647,7 @@ var require_axios = __commonJS({
38357
38647
  function isCancel(value) {
38358
38648
  return !!(value && value.__CANCEL__);
38359
38649
  }
38360
- var CanceledError = class extends AxiosError$1 {
38650
+ var CanceledError = class extends AxiosError {
38361
38651
  /**
38362
38652
  * A `CanceledError` is an object that is thrown when an operation is canceled.
38363
38653
  *
@@ -38368,24 +38658,17 @@ var require_axios = __commonJS({
38368
38658
  * @returns {CanceledError} The created error.
38369
38659
  */
38370
38660
  constructor(message, config, request) {
38371
- super(message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config, request);
38661
+ super(message == null ? "canceled" : message, AxiosError.ERR_CANCELED, config, request);
38372
38662
  this.name = "CanceledError";
38373
38663
  this.__CANCEL__ = true;
38374
38664
  }
38375
38665
  };
38376
- var CanceledError$1 = CanceledError;
38377
38666
  function settle(resolve, reject, response) {
38378
38667
  const validateStatus = response.config.validateStatus;
38379
38668
  if (!response.status || !validateStatus || validateStatus(response.status)) {
38380
38669
  resolve(response);
38381
38670
  } else {
38382
- reject(new AxiosError$1(
38383
- "Request failed with status code " + response.status,
38384
- [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
38385
- response.config,
38386
- response.request,
38387
- response
38388
- ));
38671
+ reject(new AxiosError("Request failed with status code " + response.status, response.status >= 400 && response.status < 500 ? AxiosError.ERR_BAD_REQUEST : AxiosError.ERR_BAD_RESPONSE, response.config, response.request, response));
38389
38672
  }
38390
38673
  }
38391
38674
  function isAbsoluteURL(url2) {
@@ -38399,14 +38682,79 @@ var require_axios = __commonJS({
38399
38682
  }
38400
38683
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
38401
38684
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
38402
- if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
38685
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
38403
38686
  return combineURLs(baseURL, requestedURL);
38404
38687
  }
38405
38688
  return requestedURL;
38406
38689
  }
38407
- var VERSION = "1.13.5";
38690
+ var DEFAULT_PORTS$1 = {
38691
+ ftp: 21,
38692
+ gopher: 70,
38693
+ http: 80,
38694
+ https: 443,
38695
+ ws: 80,
38696
+ wss: 443
38697
+ };
38698
+ function parseUrl(urlString) {
38699
+ try {
38700
+ return new URL(urlString);
38701
+ } catch {
38702
+ return null;
38703
+ }
38704
+ }
38705
+ function getProxyForUrl(url2) {
38706
+ var parsedUrl = (typeof url2 === "string" ? parseUrl(url2) : url2) || {};
38707
+ var proto = parsedUrl.protocol;
38708
+ var hostname = parsedUrl.host;
38709
+ var port = parsedUrl.port;
38710
+ if (typeof hostname !== "string" || !hostname || typeof proto !== "string") {
38711
+ return "";
38712
+ }
38713
+ proto = proto.split(":", 1)[0];
38714
+ hostname = hostname.replace(/:\d*$/, "");
38715
+ port = parseInt(port) || DEFAULT_PORTS$1[proto] || 0;
38716
+ if (!shouldProxy(hostname, port)) {
38717
+ return "";
38718
+ }
38719
+ var proxy = getEnv(proto + "_proxy") || getEnv("all_proxy");
38720
+ if (proxy && proxy.indexOf("://") === -1) {
38721
+ proxy = proto + "://" + proxy;
38722
+ }
38723
+ return proxy;
38724
+ }
38725
+ function shouldProxy(hostname, port) {
38726
+ var NO_PROXY = getEnv("no_proxy").toLowerCase();
38727
+ if (!NO_PROXY) {
38728
+ return true;
38729
+ }
38730
+ if (NO_PROXY === "*") {
38731
+ return false;
38732
+ }
38733
+ return NO_PROXY.split(/[,\s]/).every(function(proxy) {
38734
+ if (!proxy) {
38735
+ return true;
38736
+ }
38737
+ var parsedProxy = proxy.match(/^(.+):(\d+)$/);
38738
+ var parsedProxyHostname = parsedProxy ? parsedProxy[1] : proxy;
38739
+ var parsedProxyPort = parsedProxy ? parseInt(parsedProxy[2]) : 0;
38740
+ if (parsedProxyPort && parsedProxyPort !== port) {
38741
+ return true;
38742
+ }
38743
+ if (!/^[.*]/.test(parsedProxyHostname)) {
38744
+ return hostname !== parsedProxyHostname;
38745
+ }
38746
+ if (parsedProxyHostname.charAt(0) === "*") {
38747
+ parsedProxyHostname = parsedProxyHostname.slice(1);
38748
+ }
38749
+ return !hostname.endsWith(parsedProxyHostname);
38750
+ });
38751
+ }
38752
+ function getEnv(key) {
38753
+ return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
38754
+ }
38755
+ var VERSION = "1.16.0";
38408
38756
  function parseProtocol(url2) {
38409
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url2);
38757
+ const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
38410
38758
  return match && match[1] || "";
38411
38759
  }
38412
38760
  var DATA_URL_PATTERN = /^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;
@@ -38420,7 +38768,7 @@ var require_axios = __commonJS({
38420
38768
  uri = protocol.length ? uri.slice(protocol.length + 1) : uri;
38421
38769
  const match = DATA_URL_PATTERN.exec(uri);
38422
38770
  if (!match) {
38423
- throw new AxiosError$1("Invalid URL", AxiosError$1.ERR_INVALID_URL);
38771
+ throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
38424
38772
  }
38425
38773
  const mime = match[1];
38426
38774
  const isBase64 = match[2];
@@ -38428,16 +38776,18 @@ var require_axios = __commonJS({
38428
38776
  const buffer = Buffer.from(decodeURIComponent(body), isBase64 ? "base64" : "utf8");
38429
38777
  if (asBlob) {
38430
38778
  if (!_Blob) {
38431
- throw new AxiosError$1("Blob is not supported", AxiosError$1.ERR_NOT_SUPPORT);
38779
+ throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
38432
38780
  }
38433
- return new _Blob([buffer], { type: mime });
38781
+ return new _Blob([buffer], {
38782
+ type: mime
38783
+ });
38434
38784
  }
38435
38785
  return buffer;
38436
38786
  }
38437
- throw new AxiosError$1("Unsupported protocol " + protocol, AxiosError$1.ERR_NOT_SUPPORT);
38787
+ throw new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_NOT_SUPPORT);
38438
38788
  }
38439
38789
  var kInternals = Symbol("internals");
38440
- var AxiosTransformStream = class extends stream__default["default"].Transform {
38790
+ var AxiosTransformStream = class extends stream.Transform {
38441
38791
  constructor(options) {
38442
38792
  options = utils$1.toFlatObject(options, {
38443
38793
  maxRate: 0,
@@ -38547,8 +38897,9 @@ var require_axios = __commonJS({
38547
38897
  });
38548
38898
  }
38549
38899
  };
38550
- var AxiosTransformStream$1 = AxiosTransformStream;
38551
- var { asyncIterator } = Symbol;
38900
+ var {
38901
+ asyncIterator
38902
+ } = Symbol;
38552
38903
  var readBlob = async function* (blob) {
38553
38904
  if (blob.stream) {
38554
38905
  yield* blob.stream();
@@ -38560,21 +38911,23 @@ var require_axios = __commonJS({
38560
38911
  yield blob;
38561
38912
  }
38562
38913
  };
38563
- var readBlob$1 = readBlob;
38564
38914
  var BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + "-_";
38565
- var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util__default["default"].TextEncoder();
38915
+ var textEncoder = typeof TextEncoder === "function" ? new TextEncoder() : new util.TextEncoder();
38566
38916
  var CRLF = "\r\n";
38567
38917
  var CRLF_BYTES = textEncoder.encode(CRLF);
38568
38918
  var CRLF_BYTES_COUNT = 2;
38569
38919
  var FormDataPart = class {
38570
38920
  constructor(name, value) {
38571
- const { escapeName } = this.constructor;
38921
+ const {
38922
+ escapeName
38923
+ } = this.constructor;
38572
38924
  const isStringValue = utils$1.isString(value);
38573
38925
  let headers = `Content-Disposition: form-data; name="${escapeName(name)}"${!isStringValue && value.name ? `; filename="${escapeName(value.name)}"` : ""}${CRLF}`;
38574
38926
  if (isStringValue) {
38575
38927
  value = textEncoder.encode(String(value).replace(/\r?\n|\r\n?/g, CRLF));
38576
38928
  } else {
38577
- headers += `Content-Type: ${value.type || "application/octet-stream"}${CRLF}`;
38929
+ const safeType = String(value.type || "application/octet-stream").replace(/[\r\n]/g, "");
38930
+ headers += `Content-Type: ${safeType}${CRLF}`;
38578
38931
  }
38579
38932
  this.headers = textEncoder.encode(headers + CRLF);
38580
38933
  this.contentLength = isStringValue ? value.byteLength : value.size;
@@ -38584,11 +38937,13 @@ var require_axios = __commonJS({
38584
38937
  }
38585
38938
  async *encode() {
38586
38939
  yield this.headers;
38587
- const { value } = this;
38940
+ const {
38941
+ value
38942
+ } = this;
38588
38943
  if (utils$1.isTypedArray(value)) {
38589
38944
  yield value;
38590
38945
  } else {
38591
- yield* readBlob$1(value);
38946
+ yield* readBlob(value);
38592
38947
  }
38593
38948
  yield CRLF_BYTES;
38594
38949
  }
@@ -38610,7 +38965,7 @@ var require_axios = __commonJS({
38610
38965
  throw TypeError("FormData instance required");
38611
38966
  }
38612
38967
  if (boundary.length < 1 || boundary.length > 70) {
38613
- throw Error("boundary must be 10-70 characters long");
38968
+ throw Error("boundary must be 1-70 characters long");
38614
38969
  }
38615
38970
  const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
38616
38971
  const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
@@ -38637,8 +38992,7 @@ var require_axios = __commonJS({
38637
38992
  yield footerBytes;
38638
38993
  }());
38639
38994
  };
38640
- var formDataToStream$1 = formDataToStream;
38641
- var ZlibHeaderTransformStream = class extends stream__default["default"].Transform {
38995
+ var ZlibHeaderTransformStream = class extends stream.Transform {
38642
38996
  __transform(chunk, encoding, callback) {
38643
38997
  this.push(chunk);
38644
38998
  callback();
@@ -38656,7 +39010,6 @@ var require_axios = __commonJS({
38656
39010
  this.__transform(chunk, encoding, callback);
38657
39011
  }
38658
39012
  };
38659
- var ZlibHeaderTransformStream$1 = ZlibHeaderTransformStream;
38660
39013
  var callbackify = (fn, reducer) => {
38661
39014
  return utils$1.isAsyncFn(fn) ? function(...args) {
38662
39015
  const cb = args.pop();
@@ -38669,7 +39022,136 @@ var require_axios = __commonJS({
38669
39022
  }, cb);
38670
39023
  } : fn;
38671
39024
  };
38672
- var callbackify$1 = callbackify;
39025
+ var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
39026
+ var isIPv4Loopback = (host) => {
39027
+ const parts = host.split(".");
39028
+ if (parts.length !== 4)
39029
+ return false;
39030
+ if (parts[0] !== "127")
39031
+ return false;
39032
+ return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
39033
+ };
39034
+ var isIPv6Loopback = (host) => {
39035
+ if (host === "::1")
39036
+ return true;
39037
+ const v4MappedDotted = host.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);
39038
+ if (v4MappedDotted)
39039
+ return isIPv4Loopback(v4MappedDotted[1]);
39040
+ const v4MappedHex = host.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);
39041
+ if (v4MappedHex) {
39042
+ const high = parseInt(v4MappedHex[1], 16);
39043
+ return high >= 32512 && high <= 32767;
39044
+ }
39045
+ const groups = host.split(":");
39046
+ if (groups.length === 8) {
39047
+ for (let i = 0; i < 7; i++) {
39048
+ if (!/^0+$/.test(groups[i]))
39049
+ return false;
39050
+ }
39051
+ return /^0*1$/.test(groups[7]);
39052
+ }
39053
+ return false;
39054
+ };
39055
+ var isLoopback = (host) => {
39056
+ if (!host)
39057
+ return false;
39058
+ if (LOOPBACK_HOSTNAMES.has(host))
39059
+ return true;
39060
+ if (isIPv4Loopback(host))
39061
+ return true;
39062
+ return isIPv6Loopback(host);
39063
+ };
39064
+ var DEFAULT_PORTS = {
39065
+ http: 80,
39066
+ https: 443,
39067
+ ws: 80,
39068
+ wss: 443,
39069
+ ftp: 21
39070
+ };
39071
+ var parseNoProxyEntry = (entry) => {
39072
+ let entryHost = entry;
39073
+ let entryPort = 0;
39074
+ if (entryHost.charAt(0) === "[") {
39075
+ const bracketIndex = entryHost.indexOf("]");
39076
+ if (bracketIndex !== -1) {
39077
+ const host = entryHost.slice(1, bracketIndex);
39078
+ const rest = entryHost.slice(bracketIndex + 1);
39079
+ if (rest.charAt(0) === ":" && /^\d+$/.test(rest.slice(1))) {
39080
+ entryPort = Number.parseInt(rest.slice(1), 10);
39081
+ }
39082
+ return [host, entryPort];
39083
+ }
39084
+ }
39085
+ const firstColon = entryHost.indexOf(":");
39086
+ const lastColon = entryHost.lastIndexOf(":");
39087
+ if (firstColon !== -1 && firstColon === lastColon && /^\d+$/.test(entryHost.slice(lastColon + 1))) {
39088
+ entryPort = Number.parseInt(entryHost.slice(lastColon + 1), 10);
39089
+ entryHost = entryHost.slice(0, lastColon);
39090
+ }
39091
+ return [entryHost, entryPort];
39092
+ };
39093
+ var IPV4_MAPPED_DOTTED_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i;
39094
+ var IPV4_MAPPED_HEX_RE = /^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i;
39095
+ var unmapIPv4MappedIPv6 = (host) => {
39096
+ if (typeof host !== "string" || host.indexOf(":") === -1)
39097
+ return host;
39098
+ const dotted = host.match(IPV4_MAPPED_DOTTED_RE);
39099
+ if (dotted)
39100
+ return dotted[1];
39101
+ const hex = host.match(IPV4_MAPPED_HEX_RE);
39102
+ if (hex) {
39103
+ const high = parseInt(hex[1], 16);
39104
+ const low = parseInt(hex[2], 16);
39105
+ return `${high >> 8}.${high & 255}.${low >> 8}.${low & 255}`;
39106
+ }
39107
+ return host;
39108
+ };
39109
+ var normalizeNoProxyHost = (hostname) => {
39110
+ if (!hostname) {
39111
+ return hostname;
39112
+ }
39113
+ if (hostname.charAt(0) === "[" && hostname.charAt(hostname.length - 1) === "]") {
39114
+ hostname = hostname.slice(1, -1);
39115
+ }
39116
+ return unmapIPv4MappedIPv6(hostname.replace(/\.+$/, ""));
39117
+ };
39118
+ function shouldBypassProxy(location) {
39119
+ let parsed;
39120
+ try {
39121
+ parsed = new URL(location);
39122
+ } catch (_err) {
39123
+ return false;
39124
+ }
39125
+ const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").toLowerCase();
39126
+ if (!noProxy) {
39127
+ return false;
39128
+ }
39129
+ if (noProxy === "*") {
39130
+ return true;
39131
+ }
39132
+ const port = Number.parseInt(parsed.port, 10) || DEFAULT_PORTS[parsed.protocol.split(":", 1)[0]] || 0;
39133
+ const hostname = normalizeNoProxyHost(parsed.hostname.toLowerCase());
39134
+ return noProxy.split(/[\s,]+/).some((entry) => {
39135
+ if (!entry) {
39136
+ return false;
39137
+ }
39138
+ let [entryHost, entryPort] = parseNoProxyEntry(entry);
39139
+ entryHost = normalizeNoProxyHost(entryHost);
39140
+ if (!entryHost) {
39141
+ return false;
39142
+ }
39143
+ if (entryPort && entryPort !== port) {
39144
+ return false;
39145
+ }
39146
+ if (entryHost.charAt(0) === "*") {
39147
+ entryHost = entryHost.slice(1);
39148
+ }
39149
+ if (entryHost.charAt(0) === ".") {
39150
+ return hostname.endsWith(entryHost);
39151
+ }
39152
+ return hostname === entryHost || isLoopback(hostname) && isLoopback(entryHost);
39153
+ });
39154
+ }
38673
39155
  function speedometer(samplesCount, min) {
38674
39156
  samplesCount = samplesCount || 10;
38675
39157
  const bytes = new Array(samplesCount);
@@ -38739,19 +39221,19 @@ var require_axios = __commonJS({
38739
39221
  let bytesNotified = 0;
38740
39222
  const _speedometer = speedometer(50, 250);
38741
39223
  return throttle((e) => {
38742
- const loaded = e.loaded;
39224
+ const rawLoaded = e.loaded;
38743
39225
  const total = e.lengthComputable ? e.total : void 0;
38744
- const progressBytes = loaded - bytesNotified;
39226
+ const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
39227
+ const progressBytes = Math.max(0, loaded - bytesNotified);
38745
39228
  const rate = _speedometer(progressBytes);
38746
- const inRange = loaded <= total;
38747
- bytesNotified = loaded;
39229
+ bytesNotified = Math.max(bytesNotified, loaded);
38748
39230
  const data = {
38749
39231
  loaded,
38750
39232
  total,
38751
39233
  progress: total ? loaded / total : void 0,
38752
39234
  bytes: progressBytes,
38753
39235
  rate: rate ? rate : void 0,
38754
- estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
39236
+ estimated: rate && total ? (total - loaded) / rate : void 0,
38755
39237
  event: e,
38756
39238
  lengthComputable: total != null,
38757
39239
  [isDownloadStream ? "download" : "upload"]: true
@@ -38815,25 +39297,74 @@ var require_axios = __commonJS({
38815
39297
  }
38816
39298
  }
38817
39299
  const groups = Math.floor(effectiveLen / 4);
38818
- const bytes = groups * 3 - (pad || 0);
38819
- return bytes > 0 ? bytes : 0;
39300
+ const bytes2 = groups * 3 - (pad || 0);
39301
+ return bytes2 > 0 ? bytes2 : 0;
39302
+ }
39303
+ if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
39304
+ return Buffer.byteLength(body, "utf8");
38820
39305
  }
38821
- return Buffer.byteLength(body, "utf8");
39306
+ let bytes = 0;
39307
+ for (let i = 0, len = body.length; i < len; i++) {
39308
+ const c = body.charCodeAt(i);
39309
+ if (c < 128) {
39310
+ bytes += 1;
39311
+ } else if (c < 2048) {
39312
+ bytes += 2;
39313
+ } else if (c >= 55296 && c <= 56319 && i + 1 < len) {
39314
+ const next = body.charCodeAt(i + 1);
39315
+ if (next >= 56320 && next <= 57343) {
39316
+ bytes += 4;
39317
+ i++;
39318
+ } else {
39319
+ bytes += 3;
39320
+ }
39321
+ } else {
39322
+ bytes += 3;
39323
+ }
39324
+ }
39325
+ return bytes;
38822
39326
  }
38823
39327
  var zlibOptions = {
38824
- flush: zlib__default["default"].constants.Z_SYNC_FLUSH,
38825
- finishFlush: zlib__default["default"].constants.Z_SYNC_FLUSH
39328
+ flush: zlib.constants.Z_SYNC_FLUSH,
39329
+ finishFlush: zlib.constants.Z_SYNC_FLUSH
38826
39330
  };
38827
39331
  var brotliOptions = {
38828
- flush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH,
38829
- finishFlush: zlib__default["default"].constants.BROTLI_OPERATION_FLUSH
39332
+ flush: zlib.constants.BROTLI_OPERATION_FLUSH,
39333
+ finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
38830
39334
  };
38831
- var isBrotliSupported = utils$1.isFunction(zlib__default["default"].createBrotliDecompress);
38832
- var { http: httpFollow, https: httpsFollow } = followRedirects__default["default"];
39335
+ var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
39336
+ var {
39337
+ http: httpFollow,
39338
+ https: httpsFollow
39339
+ } = followRedirects;
38833
39340
  var isHttps = /https:?/;
39341
+ var FORM_DATA_CONTENT_HEADERS$1 = ["content-type", "content-length"];
39342
+ function setFormDataHeaders$1(headers, formHeaders, policy) {
39343
+ if (policy !== "content-only") {
39344
+ headers.set(formHeaders);
39345
+ return;
39346
+ }
39347
+ Object.entries(formHeaders).forEach(([key, val]) => {
39348
+ if (FORM_DATA_CONTENT_HEADERS$1.includes(key.toLowerCase())) {
39349
+ headers.set(key, val);
39350
+ }
39351
+ });
39352
+ }
39353
+ var kAxiosSocketListener = Symbol("axios.http.socketListener");
39354
+ var kAxiosCurrentReq = Symbol("axios.http.currentReq");
38834
39355
  var supportedProtocols = platform.protocols.map((protocol) => {
38835
39356
  return protocol + ":";
38836
39357
  });
39358
+ var decodeURIComponentSafe = (value) => {
39359
+ if (!utils$1.isString(value)) {
39360
+ return value;
39361
+ }
39362
+ try {
39363
+ return decodeURIComponent(value);
39364
+ } catch (error) {
39365
+ return value;
39366
+ }
39367
+ };
38837
39368
  var flushOnFinish = (stream2, [throttled, flush]) => {
38838
39369
  stream2.on("end", flush).on("error", flush);
38839
39370
  return throttled;
@@ -38851,12 +39382,12 @@ var require_axios = __commonJS({
38851
39382
  let len = authoritySessions.length;
38852
39383
  for (let i = 0; i < len; i++) {
38853
39384
  const [sessionHandle, sessionOptions] = authoritySessions[i];
38854
- if (!sessionHandle.destroyed && !sessionHandle.closed && util__default["default"].isDeepStrictEqual(sessionOptions, options)) {
39385
+ if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
38855
39386
  return sessionHandle;
38856
39387
  }
38857
39388
  }
38858
39389
  }
38859
- const session = http2__default["default"].connect(authority, options);
39390
+ const session = http2.connect(authority, options);
38860
39391
  let removed;
38861
39392
  const removeSession = () => {
38862
39393
  if (removed) {
@@ -38871,12 +39402,17 @@ var require_axios = __commonJS({
38871
39402
  } else {
38872
39403
  entries.splice(i, 1);
38873
39404
  }
39405
+ if (!session.closed) {
39406
+ session.close();
39407
+ }
38874
39408
  return;
38875
39409
  }
38876
39410
  }
38877
39411
  };
38878
39412
  const originalRequestFn = session.request;
38879
- const { sessionTimeout } = options;
39413
+ const {
39414
+ sessionTimeout
39415
+ } = options;
38880
39416
  if (sessionTimeout != null) {
38881
39417
  let timer;
38882
39418
  let streamsCount = 0;
@@ -38899,57 +39435,83 @@ var require_axios = __commonJS({
38899
39435
  };
38900
39436
  }
38901
39437
  session.once("close", removeSession);
38902
- let entry = [
38903
- session,
38904
- options
38905
- ];
39438
+ let entry = [session, options];
38906
39439
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
38907
39440
  return session;
38908
39441
  }
38909
39442
  };
38910
39443
  var http2Sessions = new Http2Sessions();
38911
- function dispatchBeforeRedirect(options, responseDetails) {
39444
+ function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
38912
39445
  if (options.beforeRedirects.proxy) {
38913
39446
  options.beforeRedirects.proxy(options);
38914
39447
  }
38915
39448
  if (options.beforeRedirects.config) {
38916
- options.beforeRedirects.config(options, responseDetails);
39449
+ options.beforeRedirects.config(options, responseDetails, requestDetails);
38917
39450
  }
38918
39451
  }
38919
- function setProxy(options, configProxy, location) {
39452
+ function setProxy(options, configProxy, location, isRedirect) {
38920
39453
  let proxy = configProxy;
38921
39454
  if (!proxy && proxy !== false) {
38922
- const proxyUrl = proxyFromEnv__default["default"].getProxyForUrl(location);
39455
+ const proxyUrl = getProxyForUrl(location);
38923
39456
  if (proxyUrl) {
38924
- proxy = new URL(proxyUrl);
39457
+ if (!shouldBypassProxy(location)) {
39458
+ proxy = new URL(proxyUrl);
39459
+ }
38925
39460
  }
38926
39461
  }
38927
- if (proxy) {
38928
- if (proxy.username) {
38929
- proxy.auth = (proxy.username || "") + ":" + (proxy.password || "");
39462
+ if (isRedirect && options.headers) {
39463
+ for (const name of Object.keys(options.headers)) {
39464
+ if (name.toLowerCase() === "proxy-authorization") {
39465
+ delete options.headers[name];
39466
+ }
38930
39467
  }
38931
- if (proxy.auth) {
38932
- const validProxyAuth = Boolean(proxy.auth.username || proxy.auth.password);
39468
+ }
39469
+ if (proxy) {
39470
+ const isProxyURL = proxy instanceof URL;
39471
+ const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
39472
+ const proxyUsername = readProxyField("username");
39473
+ const proxyPassword = readProxyField("password");
39474
+ let proxyAuth = utils$1.hasOwnProp(proxy, "auth") ? proxy.auth : void 0;
39475
+ if (proxyUsername) {
39476
+ proxyAuth = (proxyUsername || "") + ":" + (proxyPassword || "");
39477
+ }
39478
+ if (proxyAuth) {
39479
+ const authIsObject = typeof proxyAuth === "object";
39480
+ const authUsername = authIsObject && utils$1.hasOwnProp(proxyAuth, "username") ? proxyAuth.username : void 0;
39481
+ const authPassword = authIsObject && utils$1.hasOwnProp(proxyAuth, "password") ? proxyAuth.password : void 0;
39482
+ const validProxyAuth = Boolean(authUsername || authPassword);
38933
39483
  if (validProxyAuth) {
38934
- proxy.auth = (proxy.auth.username || "") + ":" + (proxy.auth.password || "");
38935
- } else if (typeof proxy.auth === "object") {
38936
- throw new AxiosError$1("Invalid proxy authorization", AxiosError$1.ERR_BAD_OPTION, { proxy });
39484
+ proxyAuth = (authUsername || "") + ":" + (authPassword || "");
39485
+ } else if (authIsObject) {
39486
+ throw new AxiosError("Invalid proxy authorization", AxiosError.ERR_BAD_OPTION, {
39487
+ proxy
39488
+ });
38937
39489
  }
38938
- const base64 = Buffer.from(proxy.auth, "utf8").toString("base64");
39490
+ const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
38939
39491
  options.headers["Proxy-Authorization"] = "Basic " + base64;
38940
39492
  }
38941
- options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
38942
- const proxyHost = proxy.hostname || proxy.host;
39493
+ let hasUserHostHeader = false;
39494
+ for (const name of Object.keys(options.headers)) {
39495
+ if (name.toLowerCase() === "host") {
39496
+ hasUserHostHeader = true;
39497
+ break;
39498
+ }
39499
+ }
39500
+ if (!hasUserHostHeader) {
39501
+ options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
39502
+ }
39503
+ const proxyHost = readProxyField("hostname") || readProxyField("host");
38943
39504
  options.hostname = proxyHost;
38944
39505
  options.host = proxyHost;
38945
- options.port = proxy.port;
39506
+ options.port = readProxyField("port");
38946
39507
  options.path = location;
38947
- if (proxy.protocol) {
38948
- options.protocol = proxy.protocol.includes(":") ? proxy.protocol : `${proxy.protocol}:`;
39508
+ const proxyProtocol = readProxyField("protocol");
39509
+ if (proxyProtocol) {
39510
+ options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
38949
39511
  }
38950
39512
  }
38951
39513
  options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
38952
- setProxy(redirectOptions, configProxy, redirectOptions.href);
39514
+ setProxy(redirectOptions, configProxy, redirectOptions.href, true);
38953
39515
  };
38954
39516
  }
38955
39517
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
@@ -38974,7 +39536,10 @@ var require_axios = __commonJS({
38974
39536
  asyncExecutor(_resolve, _reject, (onDoneHandler) => onDone = onDoneHandler).catch(_reject);
38975
39537
  });
38976
39538
  };
38977
- var resolveFamily = ({ address, family }) => {
39539
+ var resolveFamily = ({
39540
+ address,
39541
+ family
39542
+ }) => {
38978
39543
  if (!utils$1.isString(address)) {
38979
39544
  throw TypeError("address must be a string");
38980
39545
  }
@@ -38983,18 +39548,24 @@ var require_axios = __commonJS({
38983
39548
  family: family || (address.indexOf(".") < 0 ? 6 : 4)
38984
39549
  };
38985
39550
  };
38986
- var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : { address, family });
39551
+ var buildAddressEntry = (address, family) => resolveFamily(utils$1.isObject(address) ? address : {
39552
+ address,
39553
+ family
39554
+ });
38987
39555
  var http2Transport = {
38988
39556
  request(options, cb) {
38989
39557
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
38990
- const { http2Options, headers } = options;
39558
+ const {
39559
+ http2Options,
39560
+ headers
39561
+ } = options;
38991
39562
  const session = http2Sessions.getSession(authority, http2Options);
38992
39563
  const {
38993
39564
  HTTP2_HEADER_SCHEME,
38994
39565
  HTTP2_HEADER_METHOD,
38995
39566
  HTTP2_HEADER_PATH,
38996
39567
  HTTP2_HEADER_STATUS
38997
- } = http2__default["default"].constants;
39568
+ } = http2.constants;
38998
39569
  const http2Headers = {
38999
39570
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
39000
39571
  [HTTP2_HEADER_METHOD]: options.method,
@@ -39018,12 +39589,21 @@ var require_axios = __commonJS({
39018
39589
  };
39019
39590
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
39020
39591
  return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
39021
- let { data, lookup, family, httpVersion = 1, http2Options } = config;
39022
- const { responseType, responseEncoding } = config;
39592
+ const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
39593
+ let data = own2("data");
39594
+ let lookup = own2("lookup");
39595
+ let family = own2("family");
39596
+ let httpVersion = own2("httpVersion");
39597
+ if (httpVersion === void 0)
39598
+ httpVersion = 1;
39599
+ let http2Options = own2("http2Options");
39600
+ const responseType = own2("responseType");
39601
+ const responseEncoding = own2("responseEncoding");
39023
39602
  const method = config.method.toUpperCase();
39024
39603
  let isDone;
39025
39604
  let rejected = false;
39026
39605
  let req;
39606
+ let connectPhaseTimer;
39027
39607
  httpVersion = +httpVersion;
39028
39608
  if (Number.isNaN(httpVersion)) {
39029
39609
  throw TypeError(`Invalid protocol version: '${config.httpVersion}' is not a number`);
@@ -39033,7 +39613,7 @@ var require_axios = __commonJS({
39033
39613
  }
39034
39614
  const isHttp2 = httpVersion === 2;
39035
39615
  if (lookup) {
39036
- const _lookup = callbackify$1(lookup, (value) => utils$1.isArray(value) ? value : [value]);
39616
+ const _lookup = callbackify(lookup, (value) => utils$1.isArray(value) ? value : [value]);
39037
39617
  lookup = (hostname, opt, cb) => {
39038
39618
  _lookup(hostname, opt, (err, arg0, arg1) => {
39039
39619
  if (err) {
@@ -39047,13 +39627,28 @@ var require_axios = __commonJS({
39047
39627
  const abortEmitter = new events.EventEmitter();
39048
39628
  function abort(reason) {
39049
39629
  try {
39050
- abortEmitter.emit("abort", !reason || reason.type ? new CanceledError$1(null, config, req) : reason);
39630
+ abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
39051
39631
  } catch (err) {
39052
39632
  console.warn("emit error", err);
39053
39633
  }
39054
39634
  }
39635
+ function clearConnectPhaseTimer() {
39636
+ if (connectPhaseTimer) {
39637
+ clearTimeout(connectPhaseTimer);
39638
+ connectPhaseTimer = null;
39639
+ }
39640
+ }
39641
+ function createTimeoutError() {
39642
+ let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
39643
+ const transitional = config.transitional || transitionalDefaults;
39644
+ if (config.timeoutErrorMessage) {
39645
+ timeoutErrorMessage = config.timeoutErrorMessage;
39646
+ }
39647
+ return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
39648
+ }
39055
39649
  abortEmitter.once("abort", reject);
39056
39650
  const onFinished = () => {
39651
+ clearConnectPhaseTimer();
39057
39652
  if (config.cancelToken) {
39058
39653
  config.cancelToken.unsubscribe(abort);
39059
39654
  }
@@ -39070,14 +39665,17 @@ var require_axios = __commonJS({
39070
39665
  }
39071
39666
  onDone((response, isRejected) => {
39072
39667
  isDone = true;
39668
+ clearConnectPhaseTimer();
39073
39669
  if (isRejected) {
39074
39670
  rejected = true;
39075
39671
  onFinished();
39076
39672
  return;
39077
39673
  }
39078
- const { data: data2 } = response;
39079
- if (data2 instanceof stream__default["default"].Readable || data2 instanceof stream__default["default"].Duplex) {
39080
- const offListeners = stream__default["default"].finished(data2, () => {
39674
+ const {
39675
+ data: data2
39676
+ } = response;
39677
+ if (data2 instanceof stream.Readable || data2 instanceof stream.Duplex) {
39678
+ const offListeners = stream.finished(data2, () => {
39081
39679
  offListeners();
39082
39680
  onFinished();
39083
39681
  });
@@ -39093,11 +39691,7 @@ var require_axios = __commonJS({
39093
39691
  const dataUrl = String(config.url || fullPath || "");
39094
39692
  const estimated = estimateDataURLDecodedBytes(dataUrl);
39095
39693
  if (estimated > config.maxContentLength) {
39096
- return reject(new AxiosError$1(
39097
- "maxContentLength size of " + config.maxContentLength + " exceeded",
39098
- AxiosError$1.ERR_BAD_RESPONSE,
39099
- config
39100
- ));
39694
+ return reject(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
39101
39695
  }
39102
39696
  }
39103
39697
  let convertedData;
@@ -39114,7 +39708,7 @@ var require_axios = __commonJS({
39114
39708
  Blob: config.env && config.env.Blob
39115
39709
  });
39116
39710
  } catch (err) {
39117
- throw AxiosError$1.from(err, AxiosError$1.ERR_BAD_REQUEST, config);
39711
+ throw AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config);
39118
39712
  }
39119
39713
  if (responseType === "text") {
39120
39714
  convertedData = convertedData.toString(responseEncoding);
@@ -39122,42 +39716,41 @@ var require_axios = __commonJS({
39122
39716
  convertedData = utils$1.stripBOM(convertedData);
39123
39717
  }
39124
39718
  } else if (responseType === "stream") {
39125
- convertedData = stream__default["default"].Readable.from(convertedData);
39719
+ convertedData = stream.Readable.from(convertedData);
39126
39720
  }
39127
39721
  return settle(resolve, reject, {
39128
39722
  data: convertedData,
39129
39723
  status: 200,
39130
39724
  statusText: "OK",
39131
- headers: new AxiosHeaders$1(),
39725
+ headers: new AxiosHeaders(),
39132
39726
  config
39133
39727
  });
39134
39728
  }
39135
39729
  if (supportedProtocols.indexOf(protocol) === -1) {
39136
- return reject(new AxiosError$1(
39137
- "Unsupported protocol " + protocol,
39138
- AxiosError$1.ERR_BAD_REQUEST,
39139
- config
39140
- ));
39730
+ return reject(new AxiosError("Unsupported protocol " + protocol, AxiosError.ERR_BAD_REQUEST, config));
39141
39731
  }
39142
- const headers = AxiosHeaders$1.from(config.headers).normalize();
39732
+ const headers = AxiosHeaders.from(config.headers).normalize();
39143
39733
  headers.set("User-Agent", "axios/" + VERSION, false);
39144
- const { onUploadProgress, onDownloadProgress } = config;
39734
+ const {
39735
+ onUploadProgress,
39736
+ onDownloadProgress
39737
+ } = config;
39145
39738
  const maxRate = config.maxRate;
39146
39739
  let maxUploadRate = void 0;
39147
39740
  let maxDownloadRate = void 0;
39148
39741
  if (utils$1.isSpecCompliantForm(data)) {
39149
39742
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
39150
- data = formDataToStream$1(data, (formHeaders) => {
39743
+ data = formDataToStream(data, (formHeaders) => {
39151
39744
  headers.set(formHeaders);
39152
39745
  }, {
39153
39746
  tag: `axios-${VERSION}-boundary`,
39154
39747
  boundary: userBoundary && userBoundary[1] || void 0
39155
39748
  });
39156
- } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders)) {
39157
- headers.set(data.getHeaders());
39749
+ } else if (utils$1.isFormData(data) && utils$1.isFunction(data.getHeaders) && data.getHeaders !== Object.prototype.getHeaders) {
39750
+ setFormDataHeaders$1(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
39158
39751
  if (!headers.hasContentLength()) {
39159
39752
  try {
39160
- const knownLength = await util__default["default"].promisify(data.getLength).call(data);
39753
+ const knownLength = await util.promisify(data.getLength).call(data);
39161
39754
  Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
39162
39755
  } catch (e) {
39163
39756
  }
@@ -39165,7 +39758,7 @@ var require_axios = __commonJS({
39165
39758
  } else if (utils$1.isBlob(data) || utils$1.isFile(data)) {
39166
39759
  data.size && headers.setContentType(data.type || "application/octet-stream");
39167
39760
  headers.setContentLength(data.size || 0);
39168
- data = stream__default["default"].Readable.from(readBlob$1(data));
39761
+ data = stream.Readable.from(readBlob(data));
39169
39762
  } else if (data && !utils$1.isStream(data)) {
39170
39763
  if (Buffer.isBuffer(data))
39171
39764
  ;
@@ -39174,19 +39767,11 @@ var require_axios = __commonJS({
39174
39767
  } else if (utils$1.isString(data)) {
39175
39768
  data = Buffer.from(data, "utf-8");
39176
39769
  } else {
39177
- return reject(new AxiosError$1(
39178
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
39179
- AxiosError$1.ERR_BAD_REQUEST,
39180
- config
39181
- ));
39770
+ return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
39182
39771
  }
39183
39772
  headers.setContentLength(data.length, false);
39184
39773
  if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
39185
- return reject(new AxiosError$1(
39186
- "Request body larger than maxBodyLength limit",
39187
- AxiosError$1.ERR_BAD_REQUEST,
39188
- config
39189
- ));
39774
+ return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
39190
39775
  }
39191
39776
  }
39192
39777
  const contentLength = utils$1.toFiniteNumber(headers.getContentLength());
@@ -39198,38 +39783,31 @@ var require_axios = __commonJS({
39198
39783
  }
39199
39784
  if (data && (onUploadProgress || maxUploadRate)) {
39200
39785
  if (!utils$1.isStream(data)) {
39201
- data = stream__default["default"].Readable.from(data, { objectMode: false });
39786
+ data = stream.Readable.from(data, {
39787
+ objectMode: false
39788
+ });
39202
39789
  }
39203
- data = stream__default["default"].pipeline([data, new AxiosTransformStream$1({
39790
+ data = stream.pipeline([data, new AxiosTransformStream({
39204
39791
  maxRate: utils$1.toFiniteNumber(maxUploadRate)
39205
39792
  })], utils$1.noop);
39206
- onUploadProgress && data.on("progress", flushOnFinish(
39207
- data,
39208
- progressEventDecorator(
39209
- contentLength,
39210
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
39211
- )
39212
- ));
39793
+ onUploadProgress && data.on("progress", flushOnFinish(data, progressEventDecorator(contentLength, progressEventReducer(asyncDecorator(onUploadProgress), false, 3))));
39213
39794
  }
39214
39795
  let auth = void 0;
39215
- if (config.auth) {
39216
- const username = config.auth.username || "";
39217
- const password = config.auth.password || "";
39796
+ const configAuth = own2("auth");
39797
+ if (configAuth) {
39798
+ const username = configAuth.username || "";
39799
+ const password = configAuth.password || "";
39218
39800
  auth = username + ":" + password;
39219
39801
  }
39220
39802
  if (!auth && parsed.username) {
39221
- const urlUsername = parsed.username;
39222
- const urlPassword = parsed.password;
39803
+ const urlUsername = decodeURIComponentSafe(parsed.username);
39804
+ const urlPassword = decodeURIComponentSafe(parsed.password);
39223
39805
  auth = urlUsername + ":" + urlPassword;
39224
39806
  }
39225
39807
  auth && headers.delete("authorization");
39226
- let path;
39808
+ let path$1;
39227
39809
  try {
39228
- path = buildURL(
39229
- parsed.pathname + parsed.search,
39230
- config.params,
39231
- config.paramsSerializer
39232
- ).replace(/^\?/, "");
39810
+ path$1 = buildURL(parsed.pathname + parsed.search, config.params, config.paramsSerializer).replace(/^\?/, "");
39233
39811
  } catch (err) {
39234
39812
  const customErr = new Error(err.message);
39235
39813
  customErr.config = config;
@@ -39237,25 +39815,35 @@ var require_axios = __commonJS({
39237
39815
  customErr.exists = true;
39238
39816
  return reject(customErr);
39239
39817
  }
39240
- headers.set(
39241
- "Accept-Encoding",
39242
- "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""),
39243
- false
39244
- );
39245
- const options = {
39246
- path,
39818
+ headers.set("Accept-Encoding", "gzip, compress, deflate" + (isBrotliSupported ? ", br" : ""), false);
39819
+ const options = Object.assign(/* @__PURE__ */ Object.create(null), {
39820
+ path: path$1,
39247
39821
  method,
39248
39822
  headers: headers.toJSON(),
39249
- agents: { http: config.httpAgent, https: config.httpsAgent },
39823
+ agents: {
39824
+ http: config.httpAgent,
39825
+ https: config.httpsAgent
39826
+ },
39250
39827
  auth,
39251
39828
  protocol,
39252
39829
  family,
39253
39830
  beforeRedirect: dispatchBeforeRedirect,
39254
- beforeRedirects: {},
39831
+ beforeRedirects: /* @__PURE__ */ Object.create(null),
39255
39832
  http2Options
39256
- };
39833
+ });
39257
39834
  !utils$1.isUndefined(lookup) && (options.lookup = lookup);
39258
39835
  if (config.socketPath) {
39836
+ if (typeof config.socketPath !== "string") {
39837
+ return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
39838
+ }
39839
+ if (config.allowedSocketPaths != null) {
39840
+ const allowed = Array.isArray(config.allowedSocketPaths) ? config.allowedSocketPaths : [config.allowedSocketPaths];
39841
+ const resolvedSocket = path.resolve(config.socketPath);
39842
+ const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
39843
+ if (!isAllowed) {
39844
+ return reject(new AxiosError(`socketPath "${config.socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
39845
+ }
39846
+ }
39259
39847
  options.socketPath = config.socketPath;
39260
39848
  } else {
39261
39849
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
@@ -39263,21 +39851,25 @@ var require_axios = __commonJS({
39263
39851
  setProxy(options, config.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
39264
39852
  }
39265
39853
  let transport;
39854
+ let isNativeTransport = false;
39266
39855
  const isHttpsRequest = isHttps.test(options.protocol);
39267
39856
  options.agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
39268
39857
  if (isHttp2) {
39269
39858
  transport = http2Transport;
39270
39859
  } else {
39271
- if (config.transport) {
39272
- transport = config.transport;
39860
+ const configTransport = own2("transport");
39861
+ if (configTransport) {
39862
+ transport = configTransport;
39273
39863
  } else if (config.maxRedirects === 0) {
39274
- transport = isHttpsRequest ? https__default["default"] : http__default["default"];
39864
+ transport = isHttpsRequest ? https : http;
39865
+ isNativeTransport = true;
39275
39866
  } else {
39276
39867
  if (config.maxRedirects) {
39277
39868
  options.maxRedirects = config.maxRedirects;
39278
39869
  }
39279
- if (config.beforeRedirect) {
39280
- options.beforeRedirects.config = config.beforeRedirect;
39870
+ const configBeforeRedirect = own2("beforeRedirect");
39871
+ if (configBeforeRedirect) {
39872
+ options.beforeRedirects.config = configBeforeRedirect;
39281
39873
  }
39282
39874
  transport = isHttpsRequest ? httpsFollow : httpFollow;
39283
39875
  }
@@ -39287,25 +39879,18 @@ var require_axios = __commonJS({
39287
39879
  } else {
39288
39880
  options.maxBodyLength = Infinity;
39289
39881
  }
39290
- if (config.insecureHTTPParser) {
39291
- options.insecureHTTPParser = config.insecureHTTPParser;
39292
- }
39882
+ options.insecureHTTPParser = Boolean(own2("insecureHTTPParser"));
39293
39883
  req = transport.request(options, function handleResponse(res) {
39884
+ clearConnectPhaseTimer();
39294
39885
  if (req.destroyed)
39295
39886
  return;
39296
39887
  const streams = [res];
39297
39888
  const responseLength = utils$1.toFiniteNumber(res.headers["content-length"]);
39298
39889
  if (onDownloadProgress || maxDownloadRate) {
39299
- const transformStream = new AxiosTransformStream$1({
39890
+ const transformStream = new AxiosTransformStream({
39300
39891
  maxRate: utils$1.toFiniteNumber(maxDownloadRate)
39301
39892
  });
39302
- onDownloadProgress && transformStream.on("progress", flushOnFinish(
39303
- transformStream,
39304
- progressEventDecorator(
39305
- responseLength,
39306
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
39307
- )
39308
- ));
39893
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(transformStream, progressEventDecorator(responseLength, progressEventReducer(asyncDecorator(onDownloadProgress), true, 3))));
39309
39894
  streams.push(transformStream);
39310
39895
  }
39311
39896
  let responseStream = res;
@@ -39319,30 +39904,47 @@ var require_axios = __commonJS({
39319
39904
  case "x-gzip":
39320
39905
  case "compress":
39321
39906
  case "x-compress":
39322
- streams.push(zlib__default["default"].createUnzip(zlibOptions));
39907
+ streams.push(zlib.createUnzip(zlibOptions));
39323
39908
  delete res.headers["content-encoding"];
39324
39909
  break;
39325
39910
  case "deflate":
39326
- streams.push(new ZlibHeaderTransformStream$1());
39327
- streams.push(zlib__default["default"].createUnzip(zlibOptions));
39911
+ streams.push(new ZlibHeaderTransformStream());
39912
+ streams.push(zlib.createUnzip(zlibOptions));
39328
39913
  delete res.headers["content-encoding"];
39329
39914
  break;
39330
39915
  case "br":
39331
39916
  if (isBrotliSupported) {
39332
- streams.push(zlib__default["default"].createBrotliDecompress(brotliOptions));
39917
+ streams.push(zlib.createBrotliDecompress(brotliOptions));
39333
39918
  delete res.headers["content-encoding"];
39334
39919
  }
39335
39920
  }
39336
39921
  }
39337
- responseStream = streams.length > 1 ? stream__default["default"].pipeline(streams, utils$1.noop) : streams[0];
39922
+ responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
39338
39923
  const response = {
39339
39924
  status: res.statusCode,
39340
39925
  statusText: res.statusMessage,
39341
- headers: new AxiosHeaders$1(res.headers),
39926
+ headers: new AxiosHeaders(res.headers),
39342
39927
  config,
39343
39928
  request: lastRequest
39344
39929
  };
39345
39930
  if (responseType === "stream") {
39931
+ if (config.maxContentLength > -1) {
39932
+ const limit = config.maxContentLength;
39933
+ const source = responseStream;
39934
+ async function* enforceMaxContentLength() {
39935
+ let totalResponseBytes = 0;
39936
+ for await (const chunk of source) {
39937
+ totalResponseBytes += chunk.length;
39938
+ if (totalResponseBytes > limit) {
39939
+ throw new AxiosError("maxContentLength size of " + limit + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest);
39940
+ }
39941
+ yield chunk;
39942
+ }
39943
+ }
39944
+ responseStream = stream.Readable.from(enforceMaxContentLength(), {
39945
+ objectMode: false
39946
+ });
39947
+ }
39346
39948
  response.data = responseStream;
39347
39949
  settle(resolve, reject, response);
39348
39950
  } else {
@@ -39354,31 +39956,21 @@ var require_axios = __commonJS({
39354
39956
  if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
39355
39957
  rejected = true;
39356
39958
  responseStream.destroy();
39357
- abort(new AxiosError$1(
39358
- "maxContentLength size of " + config.maxContentLength + " exceeded",
39359
- AxiosError$1.ERR_BAD_RESPONSE,
39360
- config,
39361
- lastRequest
39362
- ));
39959
+ abort(new AxiosError("maxContentLength size of " + config.maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
39363
39960
  }
39364
39961
  });
39365
39962
  responseStream.on("aborted", function handlerStreamAborted() {
39366
39963
  if (rejected) {
39367
39964
  return;
39368
39965
  }
39369
- const err = new AxiosError$1(
39370
- "stream has been aborted",
39371
- AxiosError$1.ERR_BAD_RESPONSE,
39372
- config,
39373
- lastRequest
39374
- );
39966
+ const err = new AxiosError("stream has been aborted", AxiosError.ERR_BAD_RESPONSE, config, lastRequest, response);
39375
39967
  responseStream.destroy(err);
39376
39968
  reject(err);
39377
39969
  });
39378
39970
  responseStream.on("error", function handleStreamError(err) {
39379
- if (req.destroyed)
39971
+ if (rejected)
39380
39972
  return;
39381
- reject(AxiosError$1.from(err, null, config, lastRequest));
39973
+ reject(AxiosError.from(err, null, config, lastRequest, response));
39382
39974
  });
39383
39975
  responseStream.on("end", function handleStreamEnd() {
39384
39976
  try {
@@ -39391,7 +39983,7 @@ var require_axios = __commonJS({
39391
39983
  }
39392
39984
  response.data = responseData;
39393
39985
  } catch (err) {
39394
- return reject(AxiosError$1.from(err, null, config, response.request, response));
39986
+ return reject(AxiosError.from(err, null, config, response.request, response));
39395
39987
  }
39396
39988
  settle(resolve, reject, response);
39397
39989
  });
@@ -39411,37 +40003,47 @@ var require_axios = __commonJS({
39411
40003
  }
39412
40004
  });
39413
40005
  req.on("error", function handleRequestError(err) {
39414
- reject(AxiosError$1.from(err, null, config, req));
40006
+ reject(AxiosError.from(err, null, config, req));
39415
40007
  });
40008
+ const boundSockets = /* @__PURE__ */ new Set();
39416
40009
  req.on("socket", function handleRequestSocket(socket) {
39417
40010
  socket.setKeepAlive(true, 1e3 * 60);
40011
+ if (!socket[kAxiosSocketListener]) {
40012
+ socket.on("error", function handleSocketError(err) {
40013
+ const current = socket[kAxiosCurrentReq];
40014
+ if (current && !current.destroyed) {
40015
+ current.destroy(err);
40016
+ }
40017
+ });
40018
+ socket[kAxiosSocketListener] = true;
40019
+ }
40020
+ socket[kAxiosCurrentReq] = req;
40021
+ boundSockets.add(socket);
40022
+ });
40023
+ req.once("close", function clearCurrentReq() {
40024
+ clearConnectPhaseTimer();
40025
+ for (const socket of boundSockets) {
40026
+ if (socket[kAxiosCurrentReq] === req) {
40027
+ socket[kAxiosCurrentReq] = null;
40028
+ }
40029
+ }
40030
+ boundSockets.clear();
39418
40031
  });
39419
40032
  if (config.timeout) {
39420
40033
  const timeout = parseInt(config.timeout, 10);
39421
40034
  if (Number.isNaN(timeout)) {
39422
- abort(new AxiosError$1(
39423
- "error trying to parse `config.timeout` to int",
39424
- AxiosError$1.ERR_BAD_OPTION_VALUE,
39425
- config,
39426
- req
39427
- ));
40035
+ abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
39428
40036
  return;
39429
40037
  }
39430
- req.setTimeout(timeout, function handleRequestTimeout() {
40038
+ const handleTimeout = function handleTimeout2() {
39431
40039
  if (isDone)
39432
40040
  return;
39433
- let timeoutErrorMessage = config.timeout ? "timeout of " + config.timeout + "ms exceeded" : "timeout exceeded";
39434
- const transitional = config.transitional || transitionalDefaults;
39435
- if (config.timeoutErrorMessage) {
39436
- timeoutErrorMessage = config.timeoutErrorMessage;
39437
- }
39438
- abort(new AxiosError$1(
39439
- timeoutErrorMessage,
39440
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
39441
- config,
39442
- req
39443
- ));
39444
- });
40041
+ abort(createTimeoutError());
40042
+ };
40043
+ if (isNativeTransport && timeout > 0) {
40044
+ connectPhaseTimer = setTimeout(handleTimeout, timeout);
40045
+ }
40046
+ req.setTimeout(timeout, handleTimeout);
39445
40047
  } else {
39446
40048
  req.setTimeout(0);
39447
40049
  }
@@ -39457,10 +40059,28 @@ var require_axios = __commonJS({
39457
40059
  });
39458
40060
  data.on("close", () => {
39459
40061
  if (!ended && !errored) {
39460
- abort(new CanceledError$1("Request stream has been aborted", config, req));
40062
+ abort(new CanceledError("Request stream has been aborted", config, req));
39461
40063
  }
39462
40064
  });
39463
- data.pipe(req);
40065
+ let uploadStream = data;
40066
+ if (config.maxBodyLength > -1 && config.maxRedirects === 0) {
40067
+ const limit = config.maxBodyLength;
40068
+ let bytesSent = 0;
40069
+ uploadStream = stream.pipeline([data, new stream.Transform({
40070
+ transform(chunk, _enc, cb) {
40071
+ bytesSent += chunk.length;
40072
+ if (bytesSent > limit) {
40073
+ return cb(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, req));
40074
+ }
40075
+ cb(null, chunk);
40076
+ }
40077
+ })], utils$1.noop);
40078
+ uploadStream.on("error", (err) => {
40079
+ if (!req.destroyed)
40080
+ req.destroy(err);
40081
+ });
40082
+ }
40083
+ uploadStream.pipe(req);
39464
40084
  } else {
39465
40085
  data && req.write(data);
39466
40086
  req.end();
@@ -39470,22 +40090,19 @@ var require_axios = __commonJS({
39470
40090
  var isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url2) => {
39471
40091
  url2 = new URL(url2, platform.origin);
39472
40092
  return origin2.protocol === url2.protocol && origin2.host === url2.host && (isMSIE || origin2.port === url2.port);
39473
- })(
39474
- new URL(platform.origin),
39475
- platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
39476
- ) : () => true;
40093
+ })(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : () => true;
39477
40094
  var cookies = platform.hasStandardBrowserEnv ? (
39478
40095
  // Standard browser envs support document.cookie
39479
40096
  {
39480
- write(name, value, expires, path, domain, secure, sameSite) {
40097
+ write(name, value, expires, path2, domain, secure, sameSite) {
39481
40098
  if (typeof document === "undefined")
39482
40099
  return;
39483
40100
  const cookie = [`${name}=${encodeURIComponent(value)}`];
39484
40101
  if (utils$1.isNumber(expires)) {
39485
40102
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
39486
40103
  }
39487
- if (utils$1.isString(path)) {
39488
- cookie.push(`path=${path}`);
40104
+ if (utils$1.isString(path2)) {
40105
+ cookie.push(`path=${path2}`);
39489
40106
  }
39490
40107
  if (utils$1.isString(domain)) {
39491
40108
  cookie.push(`domain=${domain}`);
@@ -39501,8 +40118,15 @@ var require_axios = __commonJS({
39501
40118
  read(name) {
39502
40119
  if (typeof document === "undefined")
39503
40120
  return null;
39504
- const match = document.cookie.match(new RegExp("(?:^|; )" + name + "=([^;]*)"));
39505
- return match ? decodeURIComponent(match[1]) : null;
40121
+ const cookies2 = document.cookie.split(";");
40122
+ for (let i = 0; i < cookies2.length; i++) {
40123
+ const cookie = cookies2[i].replace(/^\s+/, "");
40124
+ const eq = cookie.indexOf("=");
40125
+ if (eq !== -1 && cookie.slice(0, eq) === name) {
40126
+ return decodeURIComponent(cookie.slice(eq + 1));
40127
+ }
40128
+ }
40129
+ return null;
39506
40130
  },
39507
40131
  remove(name) {
39508
40132
  this.write(name, "", Date.now() - 864e5, "/");
@@ -39520,13 +40144,26 @@ var require_axios = __commonJS({
39520
40144
  }
39521
40145
  }
39522
40146
  );
39523
- var headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
40147
+ var headersToObject = (thing) => thing instanceof AxiosHeaders ? {
40148
+ ...thing
40149
+ } : thing;
39524
40150
  function mergeConfig(config1, config2) {
39525
40151
  config2 = config2 || {};
39526
- const config = {};
40152
+ const config = /* @__PURE__ */ Object.create(null);
40153
+ Object.defineProperty(config, "hasOwnProperty", {
40154
+ // Null-proto descriptor so a polluted Object.prototype.get cannot turn
40155
+ // this data descriptor into an accessor descriptor on the way in.
40156
+ __proto__: null,
40157
+ value: Object.prototype.hasOwnProperty,
40158
+ enumerable: false,
40159
+ writable: true,
40160
+ configurable: true
40161
+ });
39527
40162
  function getMergedValue(target, source, prop, caseless) {
39528
40163
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
39529
- return utils$1.merge.call({ caseless }, target, source);
40164
+ return utils$1.merge.call({
40165
+ caseless
40166
+ }, target, source);
39530
40167
  } else if (utils$1.isPlainObject(source)) {
39531
40168
  return utils$1.merge({}, source);
39532
40169
  } else if (utils$1.isArray(source)) {
@@ -39554,9 +40191,9 @@ var require_axios = __commonJS({
39554
40191
  }
39555
40192
  }
39556
40193
  function mergeDirectKeys(a, b, prop) {
39557
- if (prop in config2) {
40194
+ if (utils$1.hasOwnProp(config2, prop)) {
39558
40195
  return getMergedValue(a, b);
39559
- } else if (prop in config1) {
40196
+ } else if (utils$1.hasOwnProp(config1, prop)) {
39560
40197
  return getMergedValue(void 0, a);
39561
40198
  }
39562
40199
  }
@@ -39587,49 +40224,68 @@ var require_axios = __commonJS({
39587
40224
  httpsAgent: defaultToConfig2,
39588
40225
  cancelToken: defaultToConfig2,
39589
40226
  socketPath: defaultToConfig2,
40227
+ allowedSocketPaths: defaultToConfig2,
39590
40228
  responseEncoding: defaultToConfig2,
39591
40229
  validateStatus: mergeDirectKeys,
39592
40230
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
39593
40231
  };
39594
- utils$1.forEach(
39595
- Object.keys({ ...config1, ...config2 }),
39596
- function computeConfigValue(prop) {
39597
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
39598
- return;
39599
- const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
39600
- const configValue = merge2(config1[prop], config2[prop], prop);
39601
- utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
39602
- }
39603
- );
40232
+ utils$1.forEach(Object.keys({
40233
+ ...config1,
40234
+ ...config2
40235
+ }), function computeConfigValue(prop) {
40236
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
40237
+ return;
40238
+ const merge2 = utils$1.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
40239
+ const a = utils$1.hasOwnProp(config1, prop) ? config1[prop] : void 0;
40240
+ const b = utils$1.hasOwnProp(config2, prop) ? config2[prop] : void 0;
40241
+ const configValue = merge2(a, b, prop);
40242
+ utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
40243
+ });
39604
40244
  return config;
39605
40245
  }
40246
+ var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
40247
+ function setFormDataHeaders(headers, formHeaders, policy) {
40248
+ if (policy !== "content-only") {
40249
+ headers.set(formHeaders);
40250
+ return;
40251
+ }
40252
+ Object.entries(formHeaders).forEach(([key, val]) => {
40253
+ if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
40254
+ headers.set(key, val);
40255
+ }
40256
+ });
40257
+ }
40258
+ var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
39606
40259
  var resolveConfig = (config) => {
39607
40260
  const newConfig = mergeConfig({}, config);
39608
- let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
39609
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
39610
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
40261
+ const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
40262
+ const data = own2("data");
40263
+ let withXSRFToken = own2("withXSRFToken");
40264
+ const xsrfHeaderName = own2("xsrfHeaderName");
40265
+ const xsrfCookieName = own2("xsrfCookieName");
40266
+ let headers = own2("headers");
40267
+ const auth = own2("auth");
40268
+ const baseURL = own2("baseURL");
40269
+ const allowAbsoluteUrls = own2("allowAbsoluteUrls");
40270
+ const url2 = own2("url");
40271
+ newConfig.headers = headers = AxiosHeaders.from(headers);
40272
+ newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls), config.params, config.paramsSerializer);
39611
40273
  if (auth) {
39612
- headers.set(
39613
- "Authorization",
39614
- "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
39615
- );
40274
+ headers.set("Authorization", "Basic " + btoa((auth.username || "") + ":" + (auth.password ? encodeUTF8(auth.password) : "")));
39616
40275
  }
39617
40276
  if (utils$1.isFormData(data)) {
39618
40277
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
39619
40278
  headers.setContentType(void 0);
39620
40279
  } else if (utils$1.isFunction(data.getHeaders)) {
39621
- const formHeaders = data.getHeaders();
39622
- const allowedHeaders = ["content-type", "content-length"];
39623
- Object.entries(formHeaders).forEach(([key, val]) => {
39624
- if (allowedHeaders.includes(key.toLowerCase())) {
39625
- headers.set(key, val);
39626
- }
39627
- });
40280
+ setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
39628
40281
  }
39629
40282
  }
39630
40283
  if (platform.hasStandardBrowserEnv) {
39631
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
39632
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
40284
+ if (utils$1.isFunction(withXSRFToken)) {
40285
+ withXSRFToken = withXSRFToken(newConfig);
40286
+ }
40287
+ const shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && isURLSameOrigin(newConfig.url);
40288
+ if (shouldSendXSRF) {
39633
40289
  const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
39634
40290
  if (xsrfValue) {
39635
40291
  headers.set(xsrfHeaderName, xsrfValue);
@@ -39643,8 +40299,12 @@ var require_axios = __commonJS({
39643
40299
  return new Promise(function dispatchXhrRequest(resolve, reject) {
39644
40300
  const _config = resolveConfig(config);
39645
40301
  let requestData = _config.data;
39646
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
39647
- let { responseType, onUploadProgress, onDownloadProgress } = _config;
40302
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
40303
+ let {
40304
+ responseType,
40305
+ onUploadProgress,
40306
+ onDownloadProgress
40307
+ } = _config;
39648
40308
  let onCanceled;
39649
40309
  let uploadThrottled, downloadThrottled;
39650
40310
  let flushUpload, flushDownload;
@@ -39661,9 +40321,7 @@ var require_axios = __commonJS({
39661
40321
  if (!request) {
39662
40322
  return;
39663
40323
  }
39664
- const responseHeaders = AxiosHeaders$1.from(
39665
- "getAllResponseHeaders" in request && request.getAllResponseHeaders()
39666
- );
40324
+ const responseHeaders = AxiosHeaders.from("getAllResponseHeaders" in request && request.getAllResponseHeaders());
39667
40325
  const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
39668
40326
  const response = {
39669
40327
  data: responseData,
@@ -39689,7 +40347,7 @@ var require_axios = __commonJS({
39689
40347
  if (!request || request.readyState !== 4) {
39690
40348
  return;
39691
40349
  }
39692
- if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
40350
+ if (request.status === 0 && !(request.responseURL && request.responseURL.startsWith("file:"))) {
39693
40351
  return;
39694
40352
  }
39695
40353
  setTimeout(onloadend);
@@ -39699,14 +40357,16 @@ var require_axios = __commonJS({
39699
40357
  if (!request) {
39700
40358
  return;
39701
40359
  }
39702
- reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config, request));
40360
+ reject(new AxiosError("Request aborted", AxiosError.ECONNABORTED, config, request));
40361
+ done();
39703
40362
  request = null;
39704
40363
  };
39705
40364
  request.onerror = function handleError(event) {
39706
40365
  const msg = event && event.message ? event.message : "Network Error";
39707
- const err = new AxiosError$1(msg, AxiosError$1.ERR_NETWORK, config, request);
40366
+ const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
39708
40367
  err.event = event || null;
39709
40368
  reject(err);
40369
+ done();
39710
40370
  request = null;
39711
40371
  };
39712
40372
  request.ontimeout = function handleTimeout() {
@@ -39715,12 +40375,8 @@ var require_axios = __commonJS({
39715
40375
  if (_config.timeoutErrorMessage) {
39716
40376
  timeoutErrorMessage = _config.timeoutErrorMessage;
39717
40377
  }
39718
- reject(new AxiosError$1(
39719
- timeoutErrorMessage,
39720
- transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
39721
- config,
39722
- request
39723
- ));
40378
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
40379
+ done();
39724
40380
  request = null;
39725
40381
  };
39726
40382
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -39749,8 +40405,9 @@ var require_axios = __commonJS({
39749
40405
  if (!request) {
39750
40406
  return;
39751
40407
  }
39752
- reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
40408
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
39753
40409
  request.abort();
40410
+ done();
39754
40411
  request = null;
39755
40412
  };
39756
40413
  _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
@@ -39759,15 +40416,17 @@ var require_axios = __commonJS({
39759
40416
  }
39760
40417
  }
39761
40418
  const protocol = parseProtocol(_config.url);
39762
- if (protocol && platform.protocols.indexOf(protocol) === -1) {
39763
- reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config));
40419
+ if (protocol && !platform.protocols.includes(protocol)) {
40420
+ reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
39764
40421
  return;
39765
40422
  }
39766
40423
  request.send(requestData || null);
39767
40424
  });
39768
40425
  };
39769
40426
  var composeSignals = (signals, timeout) => {
39770
- const { length } = signals = signals ? signals.filter(Boolean) : [];
40427
+ const {
40428
+ length
40429
+ } = signals = signals ? signals.filter(Boolean) : [];
39771
40430
  if (timeout || length) {
39772
40431
  let controller = new AbortController();
39773
40432
  let aborted;
@@ -39776,12 +40435,12 @@ var require_axios = __commonJS({
39776
40435
  aborted = true;
39777
40436
  unsubscribe();
39778
40437
  const err = reason instanceof Error ? reason : this.reason;
39779
- controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
40438
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
39780
40439
  }
39781
40440
  };
39782
40441
  let timer = timeout && setTimeout(() => {
39783
40442
  timer = null;
39784
- onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
40443
+ onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
39785
40444
  }, timeout);
39786
40445
  const unsubscribe = () => {
39787
40446
  if (signals) {
@@ -39794,15 +40453,16 @@ var require_axios = __commonJS({
39794
40453
  }
39795
40454
  };
39796
40455
  signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
39797
- const { signal } = controller;
40456
+ const {
40457
+ signal
40458
+ } = controller;
39798
40459
  signal.unsubscribe = () => utils$1.asap(unsubscribe);
39799
40460
  return signal;
39800
40461
  }
39801
40462
  };
39802
- var composeSignals$1 = composeSignals;
39803
40463
  var streamChunk = function* (chunk, chunkSize) {
39804
40464
  let len = chunk.byteLength;
39805
- if (!chunkSize || len < chunkSize) {
40465
+ if (len < chunkSize) {
39806
40466
  yield chunk;
39807
40467
  return;
39808
40468
  }
@@ -39827,7 +40487,10 @@ var require_axios = __commonJS({
39827
40487
  const reader = stream2.getReader();
39828
40488
  try {
39829
40489
  for (; ; ) {
39830
- const { done, value } = await reader.read();
40490
+ const {
40491
+ done,
40492
+ value
40493
+ } = await reader.read();
39831
40494
  if (done) {
39832
40495
  break;
39833
40496
  }
@@ -39850,7 +40513,10 @@ var require_axios = __commonJS({
39850
40513
  return new ReadableStream({
39851
40514
  async pull(controller) {
39852
40515
  try {
39853
- const { done: done2, value } = await iterator2.next();
40516
+ const {
40517
+ done: done2,
40518
+ value
40519
+ } = await iterator2.next();
39854
40520
  if (done2) {
39855
40521
  _onFinish();
39856
40522
  controller.close();
@@ -39876,15 +40542,9 @@ var require_axios = __commonJS({
39876
40542
  });
39877
40543
  };
39878
40544
  var DEFAULT_CHUNK_SIZE = 64 * 1024;
39879
- var { isFunction } = utils$1;
39880
- var globalFetchAPI = (({ Request, Response }) => ({
39881
- Request,
39882
- Response
39883
- }))(utils$1.global);
39884
40545
  var {
39885
- ReadableStream: ReadableStream$1,
39886
- TextEncoder: TextEncoder$1
39887
- } = utils$1.global;
40546
+ isFunction
40547
+ } = utils$1;
39888
40548
  var test = (fn, ...args) => {
39889
40549
  try {
39890
40550
  return !!fn(...args);
@@ -39893,28 +40553,45 @@ var require_axios = __commonJS({
39893
40553
  }
39894
40554
  };
39895
40555
  var factory = (env) => {
40556
+ var _utils$global;
40557
+ const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== void 0 ? _utils$global : globalThis;
40558
+ const {
40559
+ ReadableStream: ReadableStream2,
40560
+ TextEncoder: TextEncoder2
40561
+ } = globalObject;
39896
40562
  env = utils$1.merge.call({
39897
40563
  skipUndefined: true
39898
- }, globalFetchAPI, env);
39899
- const { fetch: envFetch, Request, Response } = env;
40564
+ }, {
40565
+ Request: globalObject.Request,
40566
+ Response: globalObject.Response
40567
+ }, env);
40568
+ const {
40569
+ fetch: envFetch,
40570
+ Request,
40571
+ Response
40572
+ } = env;
39900
40573
  const isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === "function";
39901
40574
  const isRequestSupported = isFunction(Request);
39902
40575
  const isResponseSupported = isFunction(Response);
39903
40576
  if (!isFetchSupported) {
39904
40577
  return false;
39905
40578
  }
39906
- const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
39907
- const encodeText = isFetchSupported && (typeof TextEncoder$1 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
40579
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream2);
40580
+ const encodeText = isFetchSupported && (typeof TextEncoder2 === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder2()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
39908
40581
  const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
39909
40582
  let duplexAccessed = false;
39910
- const hasContentType = new Request(platform.origin, {
39911
- body: new ReadableStream$1(),
40583
+ const request = new Request(platform.origin, {
40584
+ body: new ReadableStream2(),
39912
40585
  method: "POST",
39913
40586
  get duplex() {
39914
40587
  duplexAccessed = true;
39915
40588
  return "half";
39916
40589
  }
39917
- }).headers.has("Content-Type");
40590
+ });
40591
+ const hasContentType = request.headers.has("Content-Type");
40592
+ if (request.body != null) {
40593
+ request.body.cancel();
40594
+ }
39918
40595
  return duplexAccessed && !hasContentType;
39919
40596
  });
39920
40597
  const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
@@ -39928,7 +40605,7 @@ var require_axios = __commonJS({
39928
40605
  if (method) {
39929
40606
  return method.call(res);
39930
40607
  }
39931
- throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
40608
+ throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
39932
40609
  });
39933
40610
  });
39934
40611
  })();
@@ -39973,17 +40650,33 @@ var require_axios = __commonJS({
39973
40650
  responseType,
39974
40651
  headers,
39975
40652
  withCredentials = "same-origin",
39976
- fetchOptions
40653
+ fetchOptions,
40654
+ maxContentLength,
40655
+ maxBodyLength
39977
40656
  } = resolveConfig(config);
40657
+ const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
40658
+ const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
39978
40659
  let _fetch2 = envFetch || fetch;
39979
40660
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
39980
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
40661
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
39981
40662
  let request = null;
39982
40663
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
39983
40664
  composedSignal.unsubscribe();
39984
40665
  });
39985
40666
  let requestContentLength;
39986
40667
  try {
40668
+ if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
40669
+ const estimated = estimateDataURLDecodedBytes(url2);
40670
+ if (estimated > maxContentLength) {
40671
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
40672
+ }
40673
+ }
40674
+ if (hasMaxBodyLength && method !== "get" && method !== "head") {
40675
+ const outboundLength = await resolveBodyLength(headers, data);
40676
+ if (typeof outboundLength === "number" && isFinite(outboundLength) && outboundLength > maxBodyLength) {
40677
+ throw new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
40678
+ }
40679
+ }
39987
40680
  if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
39988
40681
  let _request = new Request(url2, {
39989
40682
  method: "POST",
@@ -39995,10 +40688,7 @@ var require_axios = __commonJS({
39995
40688
  headers.setContentType(contentTypeHeader);
39996
40689
  }
39997
40690
  if (_request.body) {
39998
- const [onProgress, flush] = progressEventDecorator(
39999
- requestContentLength,
40000
- progressEventReducer(asyncDecorator(onUploadProgress))
40001
- );
40691
+ const [onProgress, flush] = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress)));
40002
40692
  data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
40003
40693
  }
40004
40694
  }
@@ -40006,6 +40696,13 @@ var require_axios = __commonJS({
40006
40696
  withCredentials = withCredentials ? "include" : "omit";
40007
40697
  }
40008
40698
  const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
40699
+ if (utils$1.isFormData(data)) {
40700
+ const contentType = headers.getContentType();
40701
+ if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
40702
+ headers.delete("content-type");
40703
+ }
40704
+ }
40705
+ headers.set("User-Agent", "axios/" + VERSION, false);
40009
40706
  const resolvedOptions = {
40010
40707
  ...fetchOptions,
40011
40708
  signal: composedSignal,
@@ -40017,32 +40714,57 @@ var require_axios = __commonJS({
40017
40714
  };
40018
40715
  request = isRequestSupported && new Request(url2, resolvedOptions);
40019
40716
  let response = await (isRequestSupported ? _fetch2(request, fetchOptions) : _fetch2(url2, resolvedOptions));
40717
+ if (hasMaxContentLength) {
40718
+ const declaredLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
40719
+ if (declaredLength != null && declaredLength > maxContentLength) {
40720
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
40721
+ }
40722
+ }
40020
40723
  const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
40021
- if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
40724
+ if (supportsResponseStream && response.body && (onDownloadProgress || hasMaxContentLength || isStreamResponse && unsubscribe)) {
40022
40725
  const options = {};
40023
40726
  ["status", "statusText", "headers"].forEach((prop) => {
40024
40727
  options[prop] = response[prop];
40025
40728
  });
40026
40729
  const responseContentLength = utils$1.toFiniteNumber(response.headers.get("content-length"));
40027
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
40028
- responseContentLength,
40029
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
40030
- ) || [];
40031
- response = new Response(
40032
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
40033
- flush && flush();
40034
- unsubscribe && unsubscribe();
40035
- }),
40036
- options
40037
- );
40730
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
40731
+ let bytesRead = 0;
40732
+ const onChunkProgress = (loadedBytes) => {
40733
+ if (hasMaxContentLength) {
40734
+ bytesRead = loadedBytes;
40735
+ if (bytesRead > maxContentLength) {
40736
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
40737
+ }
40738
+ }
40739
+ onProgress && onProgress(loadedBytes);
40740
+ };
40741
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onChunkProgress, () => {
40742
+ flush && flush();
40743
+ unsubscribe && unsubscribe();
40744
+ }), options);
40038
40745
  }
40039
40746
  responseType = responseType || "text";
40040
40747
  let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || "text"](response, config);
40748
+ if (hasMaxContentLength && !supportsResponseStream && !isStreamResponse) {
40749
+ let materializedSize;
40750
+ if (responseData != null) {
40751
+ if (typeof responseData.byteLength === "number") {
40752
+ materializedSize = responseData.byteLength;
40753
+ } else if (typeof responseData.size === "number") {
40754
+ materializedSize = responseData.size;
40755
+ } else if (typeof responseData === "string") {
40756
+ materializedSize = typeof TextEncoder2 === "function" ? new TextEncoder2().encode(responseData).byteLength : responseData.length;
40757
+ }
40758
+ }
40759
+ if (typeof materializedSize === "number" && materializedSize > maxContentLength) {
40760
+ throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
40761
+ }
40762
+ }
40041
40763
  !isStreamResponse && unsubscribe && unsubscribe();
40042
40764
  return await new Promise((resolve, reject) => {
40043
40765
  settle(resolve, reject, {
40044
40766
  data: responseData,
40045
- headers: AxiosHeaders$1.from(response.headers),
40767
+ headers: AxiosHeaders.from(response.headers),
40046
40768
  status: response.status,
40047
40769
  statusText: response.statusText,
40048
40770
  config,
@@ -40051,27 +40773,31 @@ var require_axios = __commonJS({
40051
40773
  });
40052
40774
  } catch (err) {
40053
40775
  unsubscribe && unsubscribe();
40776
+ if (composedSignal && composedSignal.aborted && composedSignal.reason instanceof AxiosError) {
40777
+ const canceledError = composedSignal.reason;
40778
+ canceledError.config = config;
40779
+ request && (canceledError.request = request);
40780
+ err !== canceledError && (canceledError.cause = err);
40781
+ throw canceledError;
40782
+ }
40054
40783
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
40055
- throw Object.assign(
40056
- new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config, request, err && err.response),
40057
- {
40058
- cause: err.cause || err
40059
- }
40060
- );
40784
+ throw Object.assign(new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response), {
40785
+ cause: err.cause || err
40786
+ });
40061
40787
  }
40062
- throw AxiosError$1.from(err, err && err.code, config, request, err && err.response);
40788
+ throw AxiosError.from(err, err && err.code, config, request, err && err.response);
40063
40789
  }
40064
40790
  };
40065
40791
  };
40066
40792
  var seedCache = /* @__PURE__ */ new Map();
40067
40793
  var getFetch2 = (config) => {
40068
40794
  let env = config && config.env || {};
40069
- const { fetch: fetch2, Request, Response } = env;
40070
- const seeds = [
40795
+ const {
40796
+ fetch: fetch2,
40071
40797
  Request,
40072
- Response,
40073
- fetch2
40074
- ];
40798
+ Response
40799
+ } = env;
40800
+ const seeds = [Request, Response, fetch2];
40075
40801
  let len = seeds.length, i = len, seed, target, map = seedCache;
40076
40802
  while (i--) {
40077
40803
  seed = seeds[i];
@@ -40092,17 +40818,25 @@ var require_axios = __commonJS({
40092
40818
  utils$1.forEach(knownAdapters, (fn, value) => {
40093
40819
  if (fn) {
40094
40820
  try {
40095
- Object.defineProperty(fn, "name", { value });
40821
+ Object.defineProperty(fn, "name", {
40822
+ __proto__: null,
40823
+ value
40824
+ });
40096
40825
  } catch (e) {
40097
40826
  }
40098
- Object.defineProperty(fn, "adapterName", { value });
40827
+ Object.defineProperty(fn, "adapterName", {
40828
+ __proto__: null,
40829
+ value
40830
+ });
40099
40831
  }
40100
40832
  });
40101
40833
  var renderReason = (reason) => `- ${reason}`;
40102
40834
  var isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
40103
40835
  function getAdapter(adapters2, config) {
40104
40836
  adapters2 = utils$1.isArray(adapters2) ? adapters2 : [adapters2];
40105
- const { length } = adapters2;
40837
+ const {
40838
+ length
40839
+ } = adapters2;
40106
40840
  let nameOrAdapter;
40107
40841
  let adapter;
40108
40842
  const rejectedReasons = {};
@@ -40113,7 +40847,7 @@ var require_axios = __commonJS({
40113
40847
  if (!isResolvedHandle(nameOrAdapter)) {
40114
40848
  adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
40115
40849
  if (adapter === void 0) {
40116
- throw new AxiosError$1(`Unknown adapter '${id}'`);
40850
+ throw new AxiosError(`Unknown adapter '${id}'`);
40117
40851
  }
40118
40852
  }
40119
40853
  if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
@@ -40122,14 +40856,9 @@ var require_axios = __commonJS({
40122
40856
  rejectedReasons[id || "#" + i] = adapter;
40123
40857
  }
40124
40858
  if (!adapter) {
40125
- const reasons = Object.entries(rejectedReasons).map(
40126
- ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
40127
- );
40859
+ const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
40128
40860
  let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
40129
- throw new AxiosError$1(
40130
- `There is no suitable adapter to dispatch the request ` + s,
40131
- "ERR_NOT_SUPPORT"
40132
- );
40861
+ throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, "ERR_NOT_SUPPORT");
40133
40862
  }
40134
40863
  return adapter;
40135
40864
  }
@@ -40150,39 +40879,38 @@ var require_axios = __commonJS({
40150
40879
  config.cancelToken.throwIfRequested();
40151
40880
  }
40152
40881
  if (config.signal && config.signal.aborted) {
40153
- throw new CanceledError$1(null, config);
40882
+ throw new CanceledError(null, config);
40154
40883
  }
40155
40884
  }
40156
40885
  function dispatchRequest(config) {
40157
40886
  throwIfCancellationRequested(config);
40158
- config.headers = AxiosHeaders$1.from(config.headers);
40159
- config.data = transformData.call(
40160
- config,
40161
- config.transformRequest
40162
- );
40887
+ config.headers = AxiosHeaders.from(config.headers);
40888
+ config.data = transformData.call(config, config.transformRequest);
40163
40889
  if (["post", "put", "patch"].indexOf(config.method) !== -1) {
40164
40890
  config.headers.setContentType("application/x-www-form-urlencoded", false);
40165
40891
  }
40166
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
40892
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
40167
40893
  return adapter(config).then(function onAdapterResolution(response) {
40168
40894
  throwIfCancellationRequested(config);
40169
- response.data = transformData.call(
40170
- config,
40171
- config.transformResponse,
40172
- response
40173
- );
40174
- response.headers = AxiosHeaders$1.from(response.headers);
40895
+ config.response = response;
40896
+ try {
40897
+ response.data = transformData.call(config, config.transformResponse, response);
40898
+ } finally {
40899
+ delete config.response;
40900
+ }
40901
+ response.headers = AxiosHeaders.from(response.headers);
40175
40902
  return response;
40176
40903
  }, function onAdapterRejection(reason) {
40177
40904
  if (!isCancel(reason)) {
40178
40905
  throwIfCancellationRequested(config);
40179
40906
  if (reason && reason.response) {
40180
- reason.response.data = transformData.call(
40181
- config,
40182
- config.transformResponse,
40183
- reason.response
40184
- );
40185
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
40907
+ config.response = reason.response;
40908
+ try {
40909
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
40910
+ } finally {
40911
+ delete config.response;
40912
+ }
40913
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
40186
40914
  }
40187
40915
  }
40188
40916
  return Promise.reject(reason);
@@ -40201,19 +40929,11 @@ var require_axios = __commonJS({
40201
40929
  }
40202
40930
  return (value, opt, opts) => {
40203
40931
  if (validator2 === false) {
40204
- throw new AxiosError$1(
40205
- formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")),
40206
- AxiosError$1.ERR_DEPRECATED
40207
- );
40932
+ throw new AxiosError(formatMessage(opt, " has been removed" + (version2 ? " in " + version2 : "")), AxiosError.ERR_DEPRECATED);
40208
40933
  }
40209
40934
  if (version2 && !deprecatedWarnings[opt]) {
40210
40935
  deprecatedWarnings[opt] = true;
40211
- console.warn(
40212
- formatMessage(
40213
- opt,
40214
- " has been deprecated since v" + version2 + " and will be removed in the near future"
40215
- )
40216
- );
40936
+ console.warn(formatMessage(opt, " has been deprecated since v" + version2 + " and will be removed in the near future"));
40217
40937
  }
40218
40938
  return validator2 ? validator2(value, opt, opts) : true;
40219
40939
  };
@@ -40226,23 +40946,23 @@ var require_axios = __commonJS({
40226
40946
  };
40227
40947
  function assertOptions(options, schema, allowUnknown) {
40228
40948
  if (typeof options !== "object") {
40229
- throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
40949
+ throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
40230
40950
  }
40231
40951
  const keys = Object.keys(options);
40232
40952
  let i = keys.length;
40233
40953
  while (i-- > 0) {
40234
40954
  const opt = keys[i];
40235
- const validator2 = schema[opt];
40955
+ const validator2 = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : void 0;
40236
40956
  if (validator2) {
40237
40957
  const value = options[opt];
40238
40958
  const result = value === void 0 || validator2(value, opt, options);
40239
40959
  if (result !== true) {
40240
- throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
40960
+ throw new AxiosError("option " + opt + " must be " + result, AxiosError.ERR_BAD_OPTION_VALUE);
40241
40961
  }
40242
40962
  continue;
40243
40963
  }
40244
40964
  if (allowUnknown !== true) {
40245
- throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
40965
+ throw new AxiosError("Unknown option " + opt, AxiosError.ERR_BAD_OPTION);
40246
40966
  }
40247
40967
  }
40248
40968
  }
@@ -40255,8 +40975,8 @@ var require_axios = __commonJS({
40255
40975
  constructor(instanceConfig) {
40256
40976
  this.defaults = instanceConfig || {};
40257
40977
  this.interceptors = {
40258
- request: new InterceptorManager$1(),
40259
- response: new InterceptorManager$1()
40978
+ request: new InterceptorManager(),
40979
+ response: new InterceptorManager()
40260
40980
  };
40261
40981
  }
40262
40982
  /**
@@ -40274,12 +40994,23 @@ var require_axios = __commonJS({
40274
40994
  if (err instanceof Error) {
40275
40995
  let dummy = {};
40276
40996
  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
40277
- const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
40997
+ const stack = (() => {
40998
+ if (!dummy.stack) {
40999
+ return "";
41000
+ }
41001
+ const firstNewlineIndex = dummy.stack.indexOf("\n");
41002
+ return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
41003
+ })();
40278
41004
  try {
40279
41005
  if (!err.stack) {
40280
41006
  err.stack = stack;
40281
- } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
40282
- err.stack += "\n" + stack;
41007
+ } else if (stack) {
41008
+ const firstNewlineIndex = stack.indexOf("\n");
41009
+ const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
41010
+ const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
41011
+ if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
41012
+ err.stack += "\n" + stack;
41013
+ }
40283
41014
  }
40284
41015
  } catch (e) {
40285
41016
  }
@@ -40295,7 +41026,11 @@ var require_axios = __commonJS({
40295
41026
  config = configOrUrl || {};
40296
41027
  }
40297
41028
  config = mergeConfig(this.defaults, config);
40298
- const { transitional, paramsSerializer, headers } = config;
41029
+ const {
41030
+ transitional,
41031
+ paramsSerializer,
41032
+ headers
41033
+ } = config;
40299
41034
  if (transitional !== void 0) {
40300
41035
  validator.assertOptions(transitional, {
40301
41036
  silentJSONParsing: validators.transitional(validators.boolean),
@@ -40328,17 +41063,11 @@ var require_axios = __commonJS({
40328
41063
  withXsrfToken: validators.spelling("withXSRFToken")
40329
41064
  }, true);
40330
41065
  config.method = (config.method || this.defaults.method || "get").toLowerCase();
40331
- let contextHeaders = headers && utils$1.merge(
40332
- headers.common,
40333
- headers[config.method]
40334
- );
40335
- headers && utils$1.forEach(
40336
- ["delete", "get", "head", "post", "put", "patch", "common"],
40337
- (method) => {
40338
- delete headers[method];
40339
- }
40340
- );
40341
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
41066
+ let contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
41067
+ headers && utils$1.forEach(["delete", "get", "head", "post", "put", "patch", "query", "common"], (method) => {
41068
+ delete headers[method];
41069
+ });
41070
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
40342
41071
  const requestInterceptorChain = [];
40343
41072
  let synchronousRequestInterceptors = true;
40344
41073
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
@@ -40411,7 +41140,7 @@ var require_axios = __commonJS({
40411
41140
  }));
40412
41141
  };
40413
41142
  });
40414
- utils$1.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
41143
+ utils$1.forEach(["post", "put", "patch", "query"], function forEachMethodWithData(method) {
40415
41144
  function generateHTTPMethod(isForm) {
40416
41145
  return function httpMethod(url2, data, config) {
40417
41146
  return this.request(mergeConfig(config || {}, {
@@ -40425,9 +41154,10 @@ var require_axios = __commonJS({
40425
41154
  };
40426
41155
  }
40427
41156
  Axios.prototype[method] = generateHTTPMethod();
40428
- Axios.prototype[method + "Form"] = generateHTTPMethod(true);
41157
+ if (method !== "query") {
41158
+ Axios.prototype[method + "Form"] = generateHTTPMethod(true);
41159
+ }
40429
41160
  });
40430
- var Axios$1 = Axios;
40431
41161
  var CancelToken = class _CancelToken {
40432
41162
  constructor(executor) {
40433
41163
  if (typeof executor !== "function") {
@@ -40462,7 +41192,7 @@ var require_axios = __commonJS({
40462
41192
  if (token.reason) {
40463
41193
  return;
40464
41194
  }
40465
- token.reason = new CanceledError$1(message, config, request);
41195
+ token.reason = new CanceledError(message, config, request);
40466
41196
  resolvePromise(token.reason);
40467
41197
  });
40468
41198
  }
@@ -40524,7 +41254,6 @@ var require_axios = __commonJS({
40524
41254
  };
40525
41255
  }
40526
41256
  };
40527
- var CancelToken$1 = CancelToken;
40528
41257
  function spread(callback) {
40529
41258
  return function wrap(arr) {
40530
41259
  return callback.apply(null, arr);
@@ -40607,25 +41336,28 @@ var require_axios = __commonJS({
40607
41336
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
40608
41337
  HttpStatusCode[value] = key;
40609
41338
  });
40610
- var HttpStatusCode$1 = HttpStatusCode;
40611
41339
  function createInstance(defaultConfig) {
40612
- const context = new Axios$1(defaultConfig);
40613
- const instance = bind(Axios$1.prototype.request, context);
40614
- utils$1.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
40615
- utils$1.extend(instance, context, null, { allOwnKeys: true });
41340
+ const context = new Axios(defaultConfig);
41341
+ const instance = bind(Axios.prototype.request, context);
41342
+ utils$1.extend(instance, Axios.prototype, context, {
41343
+ allOwnKeys: true
41344
+ });
41345
+ utils$1.extend(instance, context, null, {
41346
+ allOwnKeys: true
41347
+ });
40616
41348
  instance.create = function create(instanceConfig) {
40617
41349
  return createInstance(mergeConfig(defaultConfig, instanceConfig));
40618
41350
  };
40619
41351
  return instance;
40620
41352
  }
40621
- var axios = createInstance(defaults$1);
40622
- axios.Axios = Axios$1;
40623
- axios.CanceledError = CanceledError$1;
40624
- axios.CancelToken = CancelToken$1;
41353
+ var axios = createInstance(defaults);
41354
+ axios.Axios = Axios;
41355
+ axios.CanceledError = CanceledError;
41356
+ axios.CancelToken = CancelToken;
40625
41357
  axios.isCancel = isCancel;
40626
41358
  axios.VERSION = VERSION;
40627
41359
  axios.toFormData = toFormData;
40628
- axios.AxiosError = AxiosError$1;
41360
+ axios.AxiosError = AxiosError;
40629
41361
  axios.Cancel = axios.CanceledError;
40630
41362
  axios.all = function all(promises) {
40631
41363
  return Promise.all(promises);
@@ -40633,10 +41365,10 @@ var require_axios = __commonJS({
40633
41365
  axios.spread = spread;
40634
41366
  axios.isAxiosError = isAxiosError;
40635
41367
  axios.mergeConfig = mergeConfig;
40636
- axios.AxiosHeaders = AxiosHeaders$1;
41368
+ axios.AxiosHeaders = AxiosHeaders;
40637
41369
  axios.formToJSON = (thing) => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
40638
41370
  axios.getAdapter = adapters.getAdapter;
40639
- axios.HttpStatusCode = HttpStatusCode$1;
41371
+ axios.HttpStatusCode = HttpStatusCode;
40640
41372
  axios.default = axios;
40641
41373
  module.exports = axios;
40642
41374
  }
@@ -47243,7 +47975,7 @@ mime-types/index.js:
47243
47975
  *)
47244
47976
 
47245
47977
  axios/dist/node/axios.cjs:
47246
- (*! Axios v1.13.5 Copyright (c) 2026 Matt Zabriskie and contributors *)
47978
+ (*! Axios v1.16.0 Copyright (c) 2026 Matt Zabriskie and contributors *)
47247
47979
 
47248
47980
  posthog-node/lib/node/index.mjs:
47249
47981
  (**