@fre4x/fred 1.1.3 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +472 -487
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13,7 +13,11 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
13
13
  throw Error('Dynamic require of "' + x + '" is not supported');
14
14
  });
15
15
  var __commonJS = (cb, mod) => function __require2() {
16
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ try {
17
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
18
+ } catch (e) {
19
+ throw mod = 0, e;
20
+ }
17
21
  };
18
22
  var __export = (target, all3) => {
19
23
  for (var name in all3)
@@ -3112,6 +3116,9 @@ var require_utils = __commonJS({
3112
3116
  "use strict";
3113
3117
  var isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu);
3114
3118
  var isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);
3119
+ var isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu);
3120
+ var isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu);
3121
+ var isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);
3115
3122
  function stringArrayToHexStripped(input) {
3116
3123
  let acc = "";
3117
3124
  let code = 0;
@@ -3304,27 +3311,77 @@ var require_utils = __commonJS({
3304
3311
  }
3305
3312
  return output.join("");
3306
3313
  }
3307
- function normalizeComponentEncoding(component, esc2) {
3308
- const func = esc2 !== true ? escape : unescape;
3309
- if (component.scheme !== void 0) {
3310
- component.scheme = func(component.scheme);
3311
- }
3312
- if (component.userinfo !== void 0) {
3313
- component.userinfo = func(component.userinfo);
3314
- }
3315
- if (component.host !== void 0) {
3316
- component.host = func(component.host);
3314
+ var HOST_DELIMS = { "@": "%40", "/": "%2F", "?": "%3F", "#": "%23", ":": "%3A" };
3315
+ var HOST_DELIM_RE = /[@/?#:]/g;
3316
+ var HOST_DELIM_NO_COLON_RE = /[@/?#]/g;
3317
+ function reescapeHostDelimiters(host, isIP) {
3318
+ const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;
3319
+ re.lastIndex = 0;
3320
+ return host.replace(re, (ch) => HOST_DELIMS[ch]);
3321
+ }
3322
+ function normalizePercentEncoding(input, decodeUnreserved = false) {
3323
+ if (input.indexOf("%") === -1) {
3324
+ return input;
3317
3325
  }
3318
- if (component.path !== void 0) {
3319
- component.path = func(component.path);
3326
+ let output = "";
3327
+ for (let i = 0; i < input.length; i++) {
3328
+ if (input[i] === "%" && i + 2 < input.length) {
3329
+ const hex3 = input.slice(i + 1, i + 3);
3330
+ if (isHexPair(hex3)) {
3331
+ const normalizedHex = hex3.toUpperCase();
3332
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3333
+ if (decodeUnreserved && isUnreserved(decoded)) {
3334
+ output += decoded;
3335
+ } else {
3336
+ output += "%" + normalizedHex;
3337
+ }
3338
+ i += 2;
3339
+ continue;
3340
+ }
3341
+ }
3342
+ output += input[i];
3320
3343
  }
3321
- if (component.query !== void 0) {
3322
- component.query = func(component.query);
3344
+ return output;
3345
+ }
3346
+ function normalizePathEncoding(input) {
3347
+ let output = "";
3348
+ for (let i = 0; i < input.length; i++) {
3349
+ if (input[i] === "%" && i + 2 < input.length) {
3350
+ const hex3 = input.slice(i + 1, i + 3);
3351
+ if (isHexPair(hex3)) {
3352
+ const normalizedHex = hex3.toUpperCase();
3353
+ const decoded = String.fromCharCode(parseInt(normalizedHex, 16));
3354
+ if (decoded !== "." && isUnreserved(decoded)) {
3355
+ output += decoded;
3356
+ } else {
3357
+ output += "%" + normalizedHex;
3358
+ }
3359
+ i += 2;
3360
+ continue;
3361
+ }
3362
+ }
3363
+ if (isPathCharacter(input[i])) {
3364
+ output += input[i];
3365
+ } else {
3366
+ output += escape(input[i]);
3367
+ }
3323
3368
  }
3324
- if (component.fragment !== void 0) {
3325
- component.fragment = func(component.fragment);
3369
+ return output;
3370
+ }
3371
+ function escapePreservingEscapes(input) {
3372
+ let output = "";
3373
+ for (let i = 0; i < input.length; i++) {
3374
+ if (input[i] === "%" && i + 2 < input.length) {
3375
+ const hex3 = input.slice(i + 1, i + 3);
3376
+ if (isHexPair(hex3)) {
3377
+ output += "%" + hex3.toUpperCase();
3378
+ i += 2;
3379
+ continue;
3380
+ }
3381
+ }
3382
+ output += escape(input[i]);
3326
3383
  }
3327
- return component;
3384
+ return output;
3328
3385
  }
3329
3386
  function recomposeAuthority(component) {
3330
3387
  const uriTokens = [];
@@ -3339,7 +3396,7 @@ var require_utils = __commonJS({
3339
3396
  if (ipV6res.isIPV6 === true) {
3340
3397
  host = `[${ipV6res.escapedHost}]`;
3341
3398
  } else {
3342
- host = component.host;
3399
+ host = reescapeHostDelimiters(host, false);
3343
3400
  }
3344
3401
  }
3345
3402
  uriTokens.push(host);
@@ -3353,7 +3410,10 @@ var require_utils = __commonJS({
3353
3410
  module.exports = {
3354
3411
  nonSimpleDomain,
3355
3412
  recomposeAuthority,
3356
- normalizeComponentEncoding,
3413
+ reescapeHostDelimiters,
3414
+ normalizePercentEncoding,
3415
+ normalizePathEncoding,
3416
+ escapePreservingEscapes,
3357
3417
  removeDotSegments,
3358
3418
  isIPv4,
3359
3419
  isUUID,
@@ -3577,12 +3637,12 @@ var require_schemes = __commonJS({
3577
3637
  var require_fast_uri = __commonJS({
3578
3638
  "../node_modules/fast-uri/index.js"(exports, module) {
3579
3639
  "use strict";
3580
- var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizeComponentEncoding, isIPv4, nonSimpleDomain } = require_utils();
3640
+ var { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();
3581
3641
  var { SCHEMES, getSchemeHandler } = require_schemes();
3582
3642
  function normalize(uri, options) {
3583
3643
  if (typeof uri === "string") {
3584
3644
  uri = /** @type {T} */
3585
- serialize(parse3(uri, options), options);
3645
+ normalizeString(uri, options);
3586
3646
  } else if (typeof uri === "object") {
3587
3647
  uri = /** @type {T} */
3588
3648
  parse3(serialize(uri, options), options);
@@ -3649,19 +3709,9 @@ var require_fast_uri = __commonJS({
3649
3709
  return target;
3650
3710
  }
3651
3711
  function equal(uriA, uriB, options) {
3652
- if (typeof uriA === "string") {
3653
- uriA = unescape(uriA);
3654
- uriA = serialize(normalizeComponentEncoding(parse3(uriA, options), true), { ...options, skipEscape: true });
3655
- } else if (typeof uriA === "object") {
3656
- uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true });
3657
- }
3658
- if (typeof uriB === "string") {
3659
- uriB = unescape(uriB);
3660
- uriB = serialize(normalizeComponentEncoding(parse3(uriB, options), true), { ...options, skipEscape: true });
3661
- } else if (typeof uriB === "object") {
3662
- uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true });
3663
- }
3664
- return uriA.toLowerCase() === uriB.toLowerCase();
3712
+ const normalizedA = normalizeComparableURI(uriA, options);
3713
+ const normalizedB = normalizeComparableURI(uriB, options);
3714
+ return normalizedA !== void 0 && normalizedB !== void 0 && normalizedA.toLowerCase() === normalizedB.toLowerCase();
3665
3715
  }
3666
3716
  function serialize(cmpts, opts) {
3667
3717
  const component = {
@@ -3686,12 +3736,12 @@ var require_fast_uri = __commonJS({
3686
3736
  if (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);
3687
3737
  if (component.path !== void 0) {
3688
3738
  if (!options.skipEscape) {
3689
- component.path = escape(component.path);
3739
+ component.path = escapePreservingEscapes(component.path);
3690
3740
  if (component.scheme !== void 0) {
3691
3741
  component.path = component.path.split("%3A").join(":");
3692
3742
  }
3693
3743
  } else {
3694
- component.path = unescape(component.path);
3744
+ component.path = normalizePercentEncoding(component.path);
3695
3745
  }
3696
3746
  }
3697
3747
  if (options.reference !== "suffix" && component.scheme) {
@@ -3726,7 +3776,16 @@ var require_fast_uri = __commonJS({
3726
3776
  return uriTokens.join("");
3727
3777
  }
3728
3778
  var URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;
3729
- function parse3(uri, opts) {
3779
+ function getParseError(parsed, matches) {
3780
+ if (matches[2] !== void 0 && parsed.path && parsed.path[0] !== "/") {
3781
+ return 'URI path must start with "/" when authority is present.';
3782
+ }
3783
+ if (typeof parsed.port === "number" && (parsed.port < 0 || parsed.port > 65535)) {
3784
+ return "URI port is malformed.";
3785
+ }
3786
+ return void 0;
3787
+ }
3788
+ function parseWithStatus(uri, opts) {
3730
3789
  const options = Object.assign({}, opts);
3731
3790
  const parsed = {
3732
3791
  scheme: void 0,
@@ -3737,6 +3796,7 @@ var require_fast_uri = __commonJS({
3737
3796
  query: void 0,
3738
3797
  fragment: void 0
3739
3798
  };
3799
+ let malformedAuthorityOrPort = false;
3740
3800
  let isIP = false;
3741
3801
  if (options.reference === "suffix") {
3742
3802
  if (options.scheme) {
@@ -3757,6 +3817,11 @@ var require_fast_uri = __commonJS({
3757
3817
  if (isNaN(parsed.port)) {
3758
3818
  parsed.port = matches[5];
3759
3819
  }
3820
+ const parseError = getParseError(parsed, matches);
3821
+ if (parseError !== void 0) {
3822
+ parsed.error = parsed.error || parseError;
3823
+ malformedAuthorityOrPort = true;
3824
+ }
3760
3825
  if (parsed.host) {
3761
3826
  const ipv4result = isIPv4(parsed.host);
3762
3827
  if (ipv4result === false) {
@@ -3795,14 +3860,18 @@ var require_fast_uri = __commonJS({
3795
3860
  parsed.scheme = unescape(parsed.scheme);
3796
3861
  }
3797
3862
  if (parsed.host !== void 0) {
3798
- parsed.host = unescape(parsed.host);
3863
+ parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP);
3799
3864
  }
3800
3865
  }
3801
3866
  if (parsed.path) {
3802
- parsed.path = escape(unescape(parsed.path));
3867
+ parsed.path = normalizePathEncoding(parsed.path);
3803
3868
  }
3804
3869
  if (parsed.fragment) {
3805
- parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3870
+ try {
3871
+ parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment));
3872
+ } catch {
3873
+ parsed.error = parsed.error || "URI malformed";
3874
+ }
3806
3875
  }
3807
3876
  }
3808
3877
  if (schemeHandler && schemeHandler.parse) {
@@ -3811,7 +3880,29 @@ var require_fast_uri = __commonJS({
3811
3880
  } else {
3812
3881
  parsed.error = parsed.error || "URI can not be parsed.";
3813
3882
  }
3814
- return parsed;
3883
+ return { parsed, malformedAuthorityOrPort };
3884
+ }
3885
+ function parse3(uri, opts) {
3886
+ return parseWithStatus(uri, opts).parsed;
3887
+ }
3888
+ function normalizeString(uri, opts) {
3889
+ return normalizeStringWithStatus(uri, opts).normalized;
3890
+ }
3891
+ function normalizeStringWithStatus(uri, opts) {
3892
+ const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts);
3893
+ return {
3894
+ normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
3895
+ malformedAuthorityOrPort
3896
+ };
3897
+ }
3898
+ function normalizeComparableURI(uri, opts) {
3899
+ if (typeof uri === "string") {
3900
+ const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts);
3901
+ return malformedAuthorityOrPort ? void 0 : normalized;
3902
+ }
3903
+ if (typeof uri === "object") {
3904
+ return serialize(uri, opts);
3905
+ }
3815
3906
  }
3816
3907
  var fastUri = {
3817
3908
  SCHEMES,
@@ -16773,6 +16864,9 @@ var require_form_data = __commonJS({
16773
16864
  var setToStringTag = require_es_set_tostringtag();
16774
16865
  var hasOwn = require_hasown();
16775
16866
  var populate = require_populate();
16867
+ function escapeHeaderParam(str) {
16868
+ return String(str).replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/"/g, "%22");
16869
+ }
16776
16870
  function FormData3(options) {
16777
16871
  if (!(this instanceof FormData3)) {
16778
16872
  return new FormData3(options);
@@ -16862,7 +16956,7 @@ var require_form_data = __commonJS({
16862
16956
  var contents = "";
16863
16957
  var headers = {
16864
16958
  // add custom disposition as third element or keep it two elements if not
16865
- "Content-Disposition": ["form-data", 'name="' + field + '"'].concat(contentDisposition || []),
16959
+ "Content-Disposition": ["form-data", 'name="' + escapeHeaderParam(field) + '"'].concat(contentDisposition || []),
16866
16960
  // if no content type. allow it to be empty array
16867
16961
  "Content-Type": [].concat(contentType || [])
16868
16962
  };
@@ -16896,7 +16990,7 @@ var require_form_data = __commonJS({
16896
16990
  filename = path.basename(value.client._httpMessage.path || "");
16897
16991
  }
16898
16992
  if (filename) {
16899
- return 'filename="' + filename + '"';
16993
+ return 'filename="' + escapeHeaderParam(filename) + '"';
16900
16994
  }
16901
16995
  };
16902
16996
  FormData3.prototype._getContentType = function(value, options) {
@@ -17963,6 +18057,11 @@ var require_follow_redirects = __commonJS({
17963
18057
  } catch (error48) {
17964
18058
  useNativeURL = error48.code === "ERR_INVALID_URL";
17965
18059
  }
18060
+ var sensitiveHeaders = [
18061
+ "Authorization",
18062
+ "Proxy-Authorization",
18063
+ "Cookie"
18064
+ ];
17966
18065
  var preservedUrlFields = [
17967
18066
  "auth",
17968
18067
  "host",
@@ -18027,6 +18126,7 @@ var require_follow_redirects = __commonJS({
18027
18126
  self2.emit("error", cause instanceof RedirectionError ? cause : new RedirectionError({ cause }));
18028
18127
  }
18029
18128
  };
18129
+ this._headerFilter = new RegExp("^(?:" + sensitiveHeaders.concat(options.sensitiveHeaders).map(escapeRegex2).join("|") + ")$", "i");
18030
18130
  this._performRequest();
18031
18131
  }
18032
18132
  RedirectableRequest.prototype = Object.create(Writable.prototype);
@@ -18164,6 +18264,9 @@ var require_follow_redirects = __commonJS({
18164
18264
  if (!options.headers) {
18165
18265
  options.headers = {};
18166
18266
  }
18267
+ if (!isArray2(options.sensitiveHeaders)) {
18268
+ options.sensitiveHeaders = [];
18269
+ }
18167
18270
  if (options.host) {
18168
18271
  if (!options.hostname) {
18169
18272
  options.hostname = options.host;
@@ -18269,7 +18372,7 @@ var require_follow_redirects = __commonJS({
18269
18372
  this._isRedirect = true;
18270
18373
  spreadUrlObject(redirectUrl, this._options);
18271
18374
  if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
18272
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
18375
+ removeMatchingHeaders(this._headerFilter, this._options.headers);
18273
18376
  }
18274
18377
  if (isFunction3(beforeRedirect)) {
18275
18378
  var responseDetails = {
@@ -18418,6 +18521,9 @@ var require_follow_redirects = __commonJS({
18418
18521
  var dot = subdomain.length - domain2.length - 1;
18419
18522
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain2);
18420
18523
  }
18524
+ function isArray2(value) {
18525
+ return value instanceof Array;
18526
+ }
18421
18527
  function isString2(value) {
18422
18528
  return typeof value === "string" || value instanceof String;
18423
18529
  }
@@ -18430,6 +18536,9 @@ var require_follow_redirects = __commonJS({
18430
18536
  function isURL(value) {
18431
18537
  return URL2 && value instanceof URL2;
18432
18538
  }
18539
+ function escapeRegex2(regex) {
18540
+ return regex.replace(/[\]\\/()*+?.$]/g, "\\$&");
18541
+ }
18433
18542
  module.exports = wrap({ http: http3, https: https3 });
18434
18543
  module.exports.wrap = wrap;
18435
18544
  }
@@ -42132,25 +42241,12 @@ var isEmptyObject = (val) => {
42132
42241
  };
42133
42242
  var isDate = kindOfTest("Date");
42134
42243
  var isFile = kindOfTest("File");
42135
- var isReactNativeBlob = (value) => {
42136
- return !!(value && typeof value.uri !== "undefined");
42137
- };
42138
- var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
42139
42244
  var isBlob = kindOfTest("Blob");
42140
42245
  var isFileList = kindOfTest("FileList");
42141
42246
  var isStream = (val) => isObject2(val) && isFunction(val.pipe);
42142
- function getGlobal() {
42143
- if (typeof globalThis !== "undefined") return globalThis;
42144
- if (typeof self !== "undefined") return self;
42145
- if (typeof window !== "undefined") return window;
42146
- if (typeof global !== "undefined") return global;
42147
- return {};
42148
- }
42149
- var G = getGlobal();
42150
- var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
42151
42247
  var isFormData = (thing) => {
42152
42248
  let kind;
42153
- return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
42249
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
42154
42250
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
42155
42251
  };
42156
42252
  var isURLSearchParams = kindOfTest("URLSearchParams");
@@ -42160,9 +42256,7 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [
42160
42256
  "Response",
42161
42257
  "Headers"
42162
42258
  ].map(kindOfTest);
42163
- var trim = (str) => {
42164
- return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
42165
- };
42259
+ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
42166
42260
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
42167
42261
  if (obj === null || typeof obj === "undefined") {
42168
42262
  return;
@@ -42264,7 +42358,10 @@ var stripBOM = (content) => {
42264
42358
  return content;
42265
42359
  };
42266
42360
  var inherits = (constructor, superConstructor, props, descriptors) => {
42267
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
42361
+ constructor.prototype = Object.create(
42362
+ superConstructor.prototype,
42363
+ descriptors
42364
+ );
42268
42365
  Object.defineProperty(constructor.prototype, "constructor", {
42269
42366
  value: constructor,
42270
42367
  writable: true,
@@ -42463,8 +42560,6 @@ var utils_default = {
42463
42560
  isUndefined,
42464
42561
  isDate,
42465
42562
  isFile,
42466
- isReactNativeBlob,
42467
- isReactNative,
42468
42563
  isBlob,
42469
42564
  isRegExp,
42470
42565
  isFunction,
@@ -42513,9 +42608,6 @@ var AxiosError = class _AxiosError extends Error {
42513
42608
  const axiosError = new _AxiosError(error48.message, code || error48.code, config2, request, response);
42514
42609
  axiosError.cause = error48;
42515
42610
  axiosError.name = error48.name;
42516
- if (error48.status != null && axiosError.status == null) {
42517
- axiosError.status = error48.status;
42518
- }
42519
42611
  customProps && Object.assign(axiosError, customProps);
42520
42612
  return axiosError;
42521
42613
  }
@@ -42532,12 +42624,6 @@ var AxiosError = class _AxiosError extends Error {
42532
42624
  */
42533
42625
  constructor(message, code, config2, request, response) {
42534
42626
  super(message);
42535
- Object.defineProperty(this, "message", {
42536
- value: message,
42537
- enumerable: true,
42538
- writable: true,
42539
- configurable: true
42540
- });
42541
42627
  this.name = "AxiosError";
42542
42628
  this.isAxiosError = true;
42543
42629
  code && (this.code = code);
@@ -42611,18 +42697,13 @@ function toFormData(obj, formData, options) {
42611
42697
  throw new TypeError("target must be an object");
42612
42698
  }
42613
42699
  formData = formData || new (FormData_default || FormData)();
42614
- options = utils_default.toFlatObject(
42615
- options,
42616
- {
42617
- metaTokens: true,
42618
- dots: false,
42619
- indexes: false
42620
- },
42621
- false,
42622
- function defined(option, source) {
42623
- return !utils_default.isUndefined(source[option]);
42624
- }
42625
- );
42700
+ options = utils_default.toFlatObject(options, {
42701
+ metaTokens: true,
42702
+ dots: false,
42703
+ indexes: false
42704
+ }, false, function defined(option, source) {
42705
+ return !utils_default.isUndefined(source[option]);
42706
+ });
42626
42707
  const metaTokens = options.metaTokens;
42627
42708
  const visitor = options.visitor || defaultVisitor;
42628
42709
  const dots = options.dots;
@@ -42650,10 +42731,6 @@ function toFormData(obj, formData, options) {
42650
42731
  }
42651
42732
  function defaultVisitor(value, key, path) {
42652
42733
  let arr = value;
42653
- if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
42654
- formData.append(renderKey(path, key, dots), convertValue(value));
42655
- return false;
42656
- }
42657
42734
  if (value && !path && typeof value === "object") {
42658
42735
  if (utils_default.endsWith(key, "{}")) {
42659
42736
  key = metaTokens ? key : key.slice(0, -2);
@@ -42689,7 +42766,13 @@ function toFormData(obj, formData, options) {
42689
42766
  }
42690
42767
  stack.push(value);
42691
42768
  utils_default.forEach(value, function each(el, key) {
42692
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path, exposedHelpers);
42769
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
42770
+ formData,
42771
+ el,
42772
+ utils_default.isString(key) ? key.trim() : key,
42773
+ path,
42774
+ exposedHelpers
42775
+ );
42693
42776
  if (result === true) {
42694
42777
  build(el, path ? path.concat(key) : [key]);
42695
42778
  }
@@ -42984,74 +43067,70 @@ function stringifySafely(rawValue, parser, encoder) {
42984
43067
  var defaults = {
42985
43068
  transitional: transitional_default,
42986
43069
  adapter: ["xhr", "http", "fetch"],
42987
- transformRequest: [
42988
- function transformRequest(data, headers) {
42989
- const contentType = headers.getContentType() || "";
42990
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
42991
- const isObjectPayload = utils_default.isObject(data);
42992
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
42993
- data = new FormData(data);
42994
- }
42995
- const isFormData2 = utils_default.isFormData(data);
42996
- if (isFormData2) {
42997
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
42998
- }
42999
- if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
43000
- return data;
43001
- }
43002
- if (utils_default.isArrayBufferView(data)) {
43003
- return data.buffer;
43004
- }
43005
- if (utils_default.isURLSearchParams(data)) {
43006
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
43007
- return data.toString();
43008
- }
43009
- let isFileList2;
43010
- if (isObjectPayload) {
43011
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
43012
- return toURLEncodedForm(data, this.formSerializer).toString();
43013
- }
43014
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
43015
- const _FormData = this.env && this.env.FormData;
43016
- return toFormData_default(
43017
- isFileList2 ? { "files[]": data } : data,
43018
- _FormData && new _FormData(),
43019
- this.formSerializer
43020
- );
43021
- }
43070
+ transformRequest: [function transformRequest(data, headers) {
43071
+ const contentType = headers.getContentType() || "";
43072
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
43073
+ const isObjectPayload = utils_default.isObject(data);
43074
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
43075
+ data = new FormData(data);
43076
+ }
43077
+ const isFormData2 = utils_default.isFormData(data);
43078
+ if (isFormData2) {
43079
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
43080
+ }
43081
+ if (utils_default.isArrayBuffer(data) || utils_default.isBuffer(data) || utils_default.isStream(data) || utils_default.isFile(data) || utils_default.isBlob(data) || utils_default.isReadableStream(data)) {
43082
+ return data;
43083
+ }
43084
+ if (utils_default.isArrayBufferView(data)) {
43085
+ return data.buffer;
43086
+ }
43087
+ if (utils_default.isURLSearchParams(data)) {
43088
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
43089
+ return data.toString();
43090
+ }
43091
+ let isFileList2;
43092
+ if (isObjectPayload) {
43093
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
43094
+ return toURLEncodedForm(data, this.formSerializer).toString();
43022
43095
  }
43023
- if (isObjectPayload || hasJSONContentType) {
43024
- headers.setContentType("application/json", false);
43025
- return stringifySafely(data);
43096
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
43097
+ const _FormData = this.env && this.env.FormData;
43098
+ return toFormData_default(
43099
+ isFileList2 ? { "files[]": data } : data,
43100
+ _FormData && new _FormData(),
43101
+ this.formSerializer
43102
+ );
43026
43103
  }
43104
+ }
43105
+ if (isObjectPayload || hasJSONContentType) {
43106
+ headers.setContentType("application/json", false);
43107
+ return stringifySafely(data);
43108
+ }
43109
+ return data;
43110
+ }],
43111
+ transformResponse: [function transformResponse(data) {
43112
+ const transitional2 = this.transitional || defaults.transitional;
43113
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
43114
+ const JSONRequested = this.responseType === "json";
43115
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
43027
43116
  return data;
43028
43117
  }
43029
- ],
43030
- transformResponse: [
43031
- function transformResponse(data) {
43032
- const transitional2 = this.transitional || defaults.transitional;
43033
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
43034
- const JSONRequested = this.responseType === "json";
43035
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
43036
- return data;
43037
- }
43038
- if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
43039
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
43040
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
43041
- try {
43042
- return JSON.parse(data, this.parseReviver);
43043
- } catch (e) {
43044
- if (strictJSONParsing) {
43045
- if (e.name === "SyntaxError") {
43046
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
43047
- }
43048
- throw e;
43118
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
43119
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
43120
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
43121
+ try {
43122
+ return JSON.parse(data, this.parseReviver);
43123
+ } catch (e) {
43124
+ if (strictJSONParsing) {
43125
+ if (e.name === "SyntaxError") {
43126
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
43049
43127
  }
43128
+ throw e;
43050
43129
  }
43051
43130
  }
43052
- return data;
43053
43131
  }
43054
- ],
43132
+ return data;
43133
+ }],
43055
43134
  /**
43056
43135
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
43057
43136
  * timeout is not created.
@@ -43070,7 +43149,7 @@ var defaults = {
43070
43149
  },
43071
43150
  headers: {
43072
43151
  common: {
43073
- Accept: "application/json, text/plain, */*",
43152
+ "Accept": "application/json, text/plain, */*",
43074
43153
  "Content-Type": void 0
43075
43154
  }
43076
43155
  }
@@ -43341,14 +43420,7 @@ var AxiosHeaders = class {
43341
43420
  return this;
43342
43421
  }
43343
43422
  };
43344
- AxiosHeaders.accessor([
43345
- "Content-Type",
43346
- "Content-Length",
43347
- "Accept",
43348
- "Accept-Encoding",
43349
- "User-Agent",
43350
- "Authorization"
43351
- ]);
43423
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
43352
43424
  utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
43353
43425
  let mapped = key[0].toUpperCase() + key.slice(1);
43354
43426
  return {
@@ -43404,15 +43476,13 @@ function settle(resolve, reject, response) {
43404
43476
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
43405
43477
  resolve(response);
43406
43478
  } else {
43407
- reject(
43408
- new AxiosError_default(
43409
- "Request failed with status code " + response.status,
43410
- [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
43411
- response.config,
43412
- response.request,
43413
- response
43414
- )
43415
- );
43479
+ reject(new AxiosError_default(
43480
+ "Request failed with status code " + response.status,
43481
+ [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
43482
+ response.config,
43483
+ response.request,
43484
+ response
43485
+ ));
43416
43486
  }
43417
43487
  }
43418
43488
 
@@ -43448,7 +43518,7 @@ import util3 from "util";
43448
43518
  import zlib from "zlib";
43449
43519
 
43450
43520
  // ../node_modules/axios/lib/env/data.js
43451
- var VERSION = "1.13.6";
43521
+ var VERSION = "1.13.5";
43452
43522
 
43453
43523
  // ../node_modules/axios/lib/helpers/parseProtocol.js
43454
43524
  function parseProtocol(url3) {
@@ -43493,21 +43563,16 @@ import stream from "stream";
43493
43563
  var kInternals = /* @__PURE__ */ Symbol("internals");
43494
43564
  var AxiosTransformStream = class extends stream.Transform {
43495
43565
  constructor(options) {
43496
- options = utils_default.toFlatObject(
43497
- options,
43498
- {
43499
- maxRate: 0,
43500
- chunkSize: 64 * 1024,
43501
- minChunkSize: 100,
43502
- timeWindow: 500,
43503
- ticksRate: 2,
43504
- samplesCount: 15
43505
- },
43506
- null,
43507
- (prop, source) => {
43508
- return !utils_default.isUndefined(source[prop]);
43509
- }
43510
- );
43566
+ options = utils_default.toFlatObject(options, {
43567
+ maxRate: 0,
43568
+ chunkSize: 64 * 1024,
43569
+ minChunkSize: 100,
43570
+ timeWindow: 500,
43571
+ ticksRate: 2,
43572
+ samplesCount: 15
43573
+ }, null, (prop, source) => {
43574
+ return !utils_default.isUndefined(source[prop]);
43575
+ });
43511
43576
  super({
43512
43577
  readableHighWaterMark: options.chunkSize
43513
43578
  });
@@ -43590,12 +43655,9 @@ var AxiosTransformStream = class extends stream.Transform {
43590
43655
  chunkRemainder = _chunk.subarray(maxChunkSize);
43591
43656
  _chunk = _chunk.subarray(0, maxChunkSize);
43592
43657
  }
43593
- pushChunk(
43594
- _chunk,
43595
- chunkRemainder ? () => {
43596
- process.nextTick(_callback, null, chunkRemainder);
43597
- } : _callback
43598
- );
43658
+ pushChunk(_chunk, chunkRemainder ? () => {
43659
+ process.nextTick(_callback, null, chunkRemainder);
43660
+ } : _callback);
43599
43661
  };
43600
43662
  transformChunk(chunk, function transformNextChunk(err, _chunk) {
43601
43663
  if (err) {
@@ -43666,14 +43728,11 @@ var FormDataPart = class {
43666
43728
  yield CRLF_BYTES;
43667
43729
  }
43668
43730
  static escapeName(name) {
43669
- return String(name).replace(
43670
- /[\r\n"]/g,
43671
- (match) => ({
43672
- "\r": "%0D",
43673
- "\n": "%0A",
43674
- '"': "%22"
43675
- })[match]
43676
- );
43731
+ return String(name).replace(/[\r\n"]/g, (match) => ({
43732
+ "\r": "%0D",
43733
+ "\n": "%0A",
43734
+ '"': "%22"
43735
+ })[match]);
43677
43736
  }
43678
43737
  };
43679
43738
  var formDataToStream = (form, headersHandler, options) => {
@@ -43705,15 +43764,13 @@ var formDataToStream = (form, headersHandler, options) => {
43705
43764
  computedHeaders["Content-Length"] = contentLength;
43706
43765
  }
43707
43766
  headersHandler && headersHandler(computedHeaders);
43708
- return Readable.from(
43709
- (async function* () {
43710
- for (const part of parts) {
43711
- yield boundaryBytes;
43712
- yield* part.encode();
43713
- }
43714
- yield footerBytes;
43715
- })()
43716
- );
43767
+ return Readable.from((async function* () {
43768
+ for (const part of parts) {
43769
+ yield boundaryBytes;
43770
+ yield* part.encode();
43771
+ }
43772
+ yield footerBytes;
43773
+ })());
43717
43774
  };
43718
43775
  var formDataToStream_default = formDataToStream;
43719
43776
 
@@ -43852,14 +43909,11 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
43852
43909
  };
43853
43910
  var progressEventDecorator = (total, throttled) => {
43854
43911
  const lengthComputable = total != null;
43855
- return [
43856
- (loaded) => throttled[0]({
43857
- lengthComputable,
43858
- total,
43859
- loaded
43860
- }),
43861
- throttled[1]
43862
- ];
43912
+ return [(loaded) => throttled[0]({
43913
+ lengthComputable,
43914
+ total,
43915
+ loaded
43916
+ }), throttled[1]];
43863
43917
  };
43864
43918
  var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
43865
43919
 
@@ -43938,12 +43992,9 @@ var Http2Sessions = class {
43938
43992
  this.sessions = /* @__PURE__ */ Object.create(null);
43939
43993
  }
43940
43994
  getSession(authority, options) {
43941
- options = Object.assign(
43942
- {
43943
- sessionTimeout: 1e3
43944
- },
43945
- options
43946
- );
43995
+ options = Object.assign({
43996
+ sessionTimeout: 1e3
43997
+ }, options);
43947
43998
  let authoritySessions = this.sessions[authority];
43948
43999
  if (authoritySessions) {
43949
44000
  let len = authoritySessions.length;
@@ -43997,7 +44048,10 @@ var Http2Sessions = class {
43997
44048
  };
43998
44049
  }
43999
44050
  session.once("close", removeSession);
44000
- let entry = [session, options];
44051
+ let entry = [
44052
+ session,
44053
+ options
44054
+ ];
44001
44055
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
44002
44056
  return session;
44003
44057
  }
@@ -44083,7 +44137,12 @@ var http2Transport = {
44083
44137
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
44084
44138
  const { http2Options, headers } = options;
44085
44139
  const session = http2Sessions.getSession(authority, http2Options);
44086
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
44140
+ const {
44141
+ HTTP2_HEADER_SCHEME,
44142
+ HTTP2_HEADER_METHOD,
44143
+ HTTP2_HEADER_PATH,
44144
+ HTTP2_HEADER_STATUS
44145
+ } = http2.constants;
44087
44146
  const http2Headers = {
44088
44147
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
44089
44148
  [HTTP2_HEADER_METHOD]: options.method,
@@ -44136,10 +44195,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44136
44195
  const abortEmitter = new EventEmitter();
44137
44196
  function abort(reason) {
44138
44197
  try {
44139
- abortEmitter.emit(
44140
- "abort",
44141
- !reason || reason.type ? new CanceledError_default(null, config2, req) : reason
44142
- );
44198
+ abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config2, req) : reason);
44143
44199
  } catch (err) {
44144
44200
  console.warn("emit error", err);
44145
44201
  }
@@ -44185,13 +44241,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44185
44241
  const dataUrl = String(config2.url || fullPath || "");
44186
44242
  const estimated = estimateDataURLDecodedBytes(dataUrl);
44187
44243
  if (estimated > config2.maxContentLength) {
44188
- return reject(
44189
- new AxiosError_default(
44190
- "maxContentLength size of " + config2.maxContentLength + " exceeded",
44191
- AxiosError_default.ERR_BAD_RESPONSE,
44192
- config2
44193
- )
44194
- );
44244
+ return reject(new AxiosError_default(
44245
+ "maxContentLength size of " + config2.maxContentLength + " exceeded",
44246
+ AxiosError_default.ERR_BAD_RESPONSE,
44247
+ config2
44248
+ ));
44195
44249
  }
44196
44250
  }
44197
44251
  let convertedData;
@@ -44227,9 +44281,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44227
44281
  });
44228
44282
  }
44229
44283
  if (supportedProtocols.indexOf(protocol) === -1) {
44230
- return reject(
44231
- new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config2)
44232
- );
44284
+ return reject(new AxiosError_default(
44285
+ "Unsupported protocol " + protocol,
44286
+ AxiosError_default.ERR_BAD_REQUEST,
44287
+ config2
44288
+ ));
44233
44289
  }
44234
44290
  const headers = AxiosHeaders_default.from(config2.headers).normalize();
44235
44291
  headers.set("User-Agent", "axios/" + VERSION, false);
@@ -44239,16 +44295,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44239
44295
  let maxDownloadRate = void 0;
44240
44296
  if (utils_default.isSpecCompliantForm(data)) {
44241
44297
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
44242
- data = formDataToStream_default(
44243
- data,
44244
- (formHeaders) => {
44245
- headers.set(formHeaders);
44246
- },
44247
- {
44248
- tag: `axios-${VERSION}-boundary`,
44249
- boundary: userBoundary && userBoundary[1] || void 0
44250
- }
44251
- );
44298
+ data = formDataToStream_default(data, (formHeaders) => {
44299
+ headers.set(formHeaders);
44300
+ }, {
44301
+ tag: `axios-${VERSION}-boundary`,
44302
+ boundary: userBoundary && userBoundary[1] || void 0
44303
+ });
44252
44304
  } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
44253
44305
  headers.set(data.getHeaders());
44254
44306
  if (!headers.hasContentLength()) {
@@ -44269,23 +44321,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44269
44321
  } else if (utils_default.isString(data)) {
44270
44322
  data = Buffer.from(data, "utf-8");
44271
44323
  } else {
44272
- return reject(
44273
- new AxiosError_default(
44274
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
44275
- AxiosError_default.ERR_BAD_REQUEST,
44276
- config2
44277
- )
44278
- );
44324
+ return reject(new AxiosError_default(
44325
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
44326
+ AxiosError_default.ERR_BAD_REQUEST,
44327
+ config2
44328
+ ));
44279
44329
  }
44280
44330
  headers.setContentLength(data.length, false);
44281
44331
  if (config2.maxBodyLength > -1 && data.length > config2.maxBodyLength) {
44282
- return reject(
44283
- new AxiosError_default(
44284
- "Request body larger than maxBodyLength limit",
44285
- AxiosError_default.ERR_BAD_REQUEST,
44286
- config2
44287
- )
44288
- );
44332
+ return reject(new AxiosError_default(
44333
+ "Request body larger than maxBodyLength limit",
44334
+ AxiosError_default.ERR_BAD_REQUEST,
44335
+ config2
44336
+ ));
44289
44337
  }
44290
44338
  }
44291
44339
  const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
@@ -44299,25 +44347,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44299
44347
  if (!utils_default.isStream(data)) {
44300
44348
  data = stream3.Readable.from(data, { objectMode: false });
44301
44349
  }
44302
- data = stream3.pipeline(
44303
- [
44304
- data,
44305
- new AxiosTransformStream_default({
44306
- maxRate: utils_default.toFiniteNumber(maxUploadRate)
44307
- })
44308
- ],
44309
- utils_default.noop
44310
- );
44311
- onUploadProgress && data.on(
44312
- "progress",
44313
- flushOnFinish(
44314
- data,
44315
- progressEventDecorator(
44316
- contentLength,
44317
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
44318
- )
44350
+ data = stream3.pipeline([data, new AxiosTransformStream_default({
44351
+ maxRate: utils_default.toFiniteNumber(maxUploadRate)
44352
+ })], utils_default.noop);
44353
+ onUploadProgress && data.on("progress", flushOnFinish(
44354
+ data,
44355
+ progressEventDecorator(
44356
+ contentLength,
44357
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
44319
44358
  )
44320
- );
44359
+ ));
44321
44360
  }
44322
44361
  let auth = void 0;
44323
44362
  if (config2.auth) {
@@ -44368,11 +44407,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44368
44407
  } else {
44369
44408
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
44370
44409
  options.port = parsed.port;
44371
- setProxy(
44372
- options,
44373
- config2.proxy,
44374
- protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
44375
- );
44410
+ setProxy(options, config2.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
44376
44411
  }
44377
44412
  let transport;
44378
44413
  const isHttpsRequest = isHttps.test(options.protocol);
@@ -44410,16 +44445,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44410
44445
  const transformStream = new AxiosTransformStream_default({
44411
44446
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
44412
44447
  });
44413
- onDownloadProgress && transformStream.on(
44414
- "progress",
44415
- flushOnFinish(
44416
- transformStream,
44417
- progressEventDecorator(
44418
- responseLength,
44419
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
44420
- )
44448
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(
44449
+ transformStream,
44450
+ progressEventDecorator(
44451
+ responseLength,
44452
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
44421
44453
  )
44422
- );
44454
+ ));
44423
44455
  streams.push(transformStream);
44424
44456
  }
44425
44457
  let responseStream = res;
@@ -44469,14 +44501,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44469
44501
  if (config2.maxContentLength > -1 && totalResponseBytes > config2.maxContentLength) {
44470
44502
  rejected = true;
44471
44503
  responseStream.destroy();
44472
- abort(
44473
- new AxiosError_default(
44474
- "maxContentLength size of " + config2.maxContentLength + " exceeded",
44475
- AxiosError_default.ERR_BAD_RESPONSE,
44476
- config2,
44477
- lastRequest
44478
- )
44479
- );
44504
+ abort(new AxiosError_default(
44505
+ "maxContentLength size of " + config2.maxContentLength + " exceeded",
44506
+ AxiosError_default.ERR_BAD_RESPONSE,
44507
+ config2,
44508
+ lastRequest
44509
+ ));
44480
44510
  }
44481
44511
  });
44482
44512
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -44535,14 +44565,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44535
44565
  if (config2.timeout) {
44536
44566
  const timeout = parseInt(config2.timeout, 10);
44537
44567
  if (Number.isNaN(timeout)) {
44538
- abort(
44539
- new AxiosError_default(
44540
- "error trying to parse `config.timeout` to int",
44541
- AxiosError_default.ERR_BAD_OPTION_VALUE,
44542
- config2,
44543
- req
44544
- )
44545
- );
44568
+ abort(new AxiosError_default(
44569
+ "error trying to parse `config.timeout` to int",
44570
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
44571
+ config2,
44572
+ req
44573
+ ));
44546
44574
  return;
44547
44575
  }
44548
44576
  req.setTimeout(timeout, function handleRequestTimeout() {
@@ -44552,14 +44580,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44552
44580
  if (config2.timeoutErrorMessage) {
44553
44581
  timeoutErrorMessage = config2.timeoutErrorMessage;
44554
44582
  }
44555
- abort(
44556
- new AxiosError_default(
44557
- timeoutErrorMessage,
44558
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44559
- config2,
44560
- req
44561
- )
44562
- );
44583
+ abort(new AxiosError_default(
44584
+ timeoutErrorMessage,
44585
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44586
+ config2,
44587
+ req
44588
+ ));
44563
44589
  });
44564
44590
  } else {
44565
44591
  req.setTimeout(0);
@@ -44714,12 +44740,16 @@ function mergeConfig(config1, config2) {
44714
44740
  validateStatus: mergeDirectKeys,
44715
44741
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
44716
44742
  };
44717
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
44718
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
44719
- const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
44720
- const configValue = merge3(config1[prop], config2[prop], prop);
44721
- utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
44722
- });
44743
+ utils_default.forEach(
44744
+ Object.keys({ ...config1, ...config2 }),
44745
+ function computeConfigValue(prop) {
44746
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
44747
+ return;
44748
+ const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
44749
+ const configValue = merge3(config1[prop], config2[prop], prop);
44750
+ utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
44751
+ }
44752
+ );
44723
44753
  return config3;
44724
44754
  }
44725
44755
 
@@ -44728,17 +44758,11 @@ var resolveConfig_default = (config2) => {
44728
44758
  const newConfig = mergeConfig({}, config2);
44729
44759
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
44730
44760
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
44731
- newConfig.url = buildURL(
44732
- buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
44733
- config2.params,
44734
- config2.paramsSerializer
44735
- );
44761
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
44736
44762
  if (auth) {
44737
44763
  headers.set(
44738
44764
  "Authorization",
44739
- "Basic " + btoa(
44740
- (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
44741
- )
44765
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
44742
44766
  );
44743
44767
  }
44744
44768
  if (utils_default.isFormData(data)) {
@@ -44802,17 +44826,13 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
44802
44826
  config: config2,
44803
44827
  request
44804
44828
  };
44805
- settle(
44806
- function _resolve(value) {
44807
- resolve(value);
44808
- done();
44809
- },
44810
- function _reject(err) {
44811
- reject(err);
44812
- done();
44813
- },
44814
- response
44815
- );
44829
+ settle(function _resolve(value) {
44830
+ resolve(value);
44831
+ done();
44832
+ }, function _reject(err) {
44833
+ reject(err);
44834
+ done();
44835
+ }, response);
44816
44836
  request = null;
44817
44837
  }
44818
44838
  if ("onloadend" in request) {
@@ -44848,14 +44868,12 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
44848
44868
  if (_config.timeoutErrorMessage) {
44849
44869
  timeoutErrorMessage = _config.timeoutErrorMessage;
44850
44870
  }
44851
- reject(
44852
- new AxiosError_default(
44853
- timeoutErrorMessage,
44854
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44855
- config2,
44856
- request
44857
- )
44858
- );
44871
+ reject(new AxiosError_default(
44872
+ timeoutErrorMessage,
44873
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44874
+ config2,
44875
+ request
44876
+ ));
44859
44877
  request = null;
44860
44878
  };
44861
44879
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -44895,13 +44913,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
44895
44913
  }
44896
44914
  const protocol = parseProtocol(_config.url);
44897
44915
  if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
44898
- reject(
44899
- new AxiosError_default(
44900
- "Unsupported protocol " + protocol + ":",
44901
- AxiosError_default.ERR_BAD_REQUEST,
44902
- config2
44903
- )
44904
- );
44916
+ reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
44905
44917
  return;
44906
44918
  }
44907
44919
  request.send(requestData || null);
@@ -44919,9 +44931,7 @@ var composeSignals = (signals, timeout) => {
44919
44931
  aborted2 = true;
44920
44932
  unsubscribe();
44921
44933
  const err = reason instanceof Error ? reason : this.reason;
44922
- controller.abort(
44923
- err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
44924
- );
44934
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
44925
44935
  }
44926
44936
  };
44927
44937
  let timer = timeout && setTimeout(() => {
@@ -44994,36 +45004,33 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
44994
45004
  onFinish && onFinish(e);
44995
45005
  }
44996
45006
  };
44997
- return new ReadableStream(
44998
- {
44999
- async pull(controller) {
45000
- try {
45001
- const { done: done2, value } = await iterator2.next();
45002
- if (done2) {
45003
- _onFinish();
45004
- controller.close();
45005
- return;
45006
- }
45007
- let len = value.byteLength;
45008
- if (onProgress) {
45009
- let loadedBytes = bytes += len;
45010
- onProgress(loadedBytes);
45011
- }
45012
- controller.enqueue(new Uint8Array(value));
45013
- } catch (err) {
45014
- _onFinish(err);
45015
- throw err;
45007
+ return new ReadableStream({
45008
+ async pull(controller) {
45009
+ try {
45010
+ const { done: done2, value } = await iterator2.next();
45011
+ if (done2) {
45012
+ _onFinish();
45013
+ controller.close();
45014
+ return;
45016
45015
  }
45017
- },
45018
- cancel(reason) {
45019
- _onFinish(reason);
45020
- return iterator2.return();
45016
+ let len = value.byteLength;
45017
+ if (onProgress) {
45018
+ let loadedBytes = bytes += len;
45019
+ onProgress(loadedBytes);
45020
+ }
45021
+ controller.enqueue(new Uint8Array(value));
45022
+ } catch (err) {
45023
+ _onFinish(err);
45024
+ throw err;
45021
45025
  }
45022
45026
  },
45023
- {
45024
- highWaterMark: 2
45027
+ cancel(reason) {
45028
+ _onFinish(reason);
45029
+ return iterator2.return();
45025
45030
  }
45026
- );
45031
+ }, {
45032
+ highWaterMark: 2
45033
+ });
45027
45034
  };
45028
45035
 
45029
45036
  // ../node_modules/axios/lib/adapters/fetch.js
@@ -45033,7 +45040,10 @@ var globalFetchAPI = (({ Request, Response }) => ({
45033
45040
  Request,
45034
45041
  Response
45035
45042
  }))(utils_default.global);
45036
- var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
45043
+ var {
45044
+ ReadableStream: ReadableStream2,
45045
+ TextEncoder: TextEncoder2
45046
+ } = utils_default.global;
45037
45047
  var test = (fn, ...args) => {
45038
45048
  try {
45039
45049
  return !!fn(...args);
@@ -45042,13 +45052,9 @@ var test = (fn, ...args) => {
45042
45052
  }
45043
45053
  };
45044
45054
  var factory = (env) => {
45045
- env = utils_default.merge.call(
45046
- {
45047
- skipUndefined: true
45048
- },
45049
- globalFetchAPI,
45050
- env
45051
- );
45055
+ env = utils_default.merge.call({
45056
+ skipUndefined: true
45057
+ }, globalFetchAPI, env);
45052
45058
  const { fetch: envFetch, Request, Response } = env;
45053
45059
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
45054
45060
  const isRequestSupported = isFunction2(Request);
@@ -45081,11 +45087,7 @@ var factory = (env) => {
45081
45087
  if (method) {
45082
45088
  return method.call(res);
45083
45089
  }
45084
- throw new AxiosError_default(
45085
- `Response type '${type}' is not supported`,
45086
- AxiosError_default.ERR_NOT_SUPPORT,
45087
- config2
45088
- );
45090
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config2);
45089
45091
  });
45090
45092
  });
45091
45093
  })();
@@ -45134,10 +45136,7 @@ var factory = (env) => {
45134
45136
  } = resolveConfig_default(config2);
45135
45137
  let _fetch = envFetch || fetch;
45136
45138
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
45137
- let composedSignal = composeSignals_default(
45138
- [signal, cancelToken && cancelToken.toAbortSignal()],
45139
- timeout
45140
- );
45139
+ let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
45141
45140
  let request = null;
45142
45141
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
45143
45142
  composedSignal.unsubscribe();
@@ -45197,10 +45196,7 @@ var factory = (env) => {
45197
45196
  );
45198
45197
  }
45199
45198
  responseType = responseType || "text";
45200
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
45201
- response,
45202
- config2
45203
- );
45199
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
45204
45200
  !isStreamResponse && unsubscribe && unsubscribe();
45205
45201
  return await new Promise((resolve, reject) => {
45206
45202
  settle(resolve, reject, {
@@ -45216,13 +45212,7 @@ var factory = (env) => {
45216
45212
  unsubscribe && unsubscribe();
45217
45213
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
45218
45214
  throw Object.assign(
45219
- new AxiosError_default(
45220
- "Network Error",
45221
- AxiosError_default.ERR_NETWORK,
45222
- config2,
45223
- request,
45224
- err && err.response
45225
- ),
45215
+ new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config2, request, err && err.response),
45226
45216
  {
45227
45217
  cause: err.cause || err
45228
45218
  }
@@ -45236,7 +45226,11 @@ var seedCache = /* @__PURE__ */ new Map();
45236
45226
  var getFetch = (config2) => {
45237
45227
  let env = config2 && config2.env || {};
45238
45228
  const { fetch: fetch2, Request, Response } = env;
45239
- const seeds = [Request, Response, fetch2];
45229
+ const seeds = [
45230
+ Request,
45231
+ Response,
45232
+ fetch2
45233
+ ];
45240
45234
  let len = seeds.length, i = len, seed, target, map2 = seedCache;
45241
45235
  while (i--) {
45242
45236
  seed = seeds[i];
@@ -45325,33 +45319,37 @@ function throwIfCancellationRequested(config2) {
45325
45319
  function dispatchRequest(config2) {
45326
45320
  throwIfCancellationRequested(config2);
45327
45321
  config2.headers = AxiosHeaders_default.from(config2.headers);
45328
- config2.data = transformData.call(config2, config2.transformRequest);
45322
+ config2.data = transformData.call(
45323
+ config2,
45324
+ config2.transformRequest
45325
+ );
45329
45326
  if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
45330
45327
  config2.headers.setContentType("application/x-www-form-urlencoded", false);
45331
45328
  }
45332
45329
  const adapter2 = adapters_default.getAdapter(config2.adapter || defaults_default.adapter, config2);
45333
- return adapter2(config2).then(
45334
- function onAdapterResolution(response) {
45330
+ return adapter2(config2).then(function onAdapterResolution(response) {
45331
+ throwIfCancellationRequested(config2);
45332
+ response.data = transformData.call(
45333
+ config2,
45334
+ config2.transformResponse,
45335
+ response
45336
+ );
45337
+ response.headers = AxiosHeaders_default.from(response.headers);
45338
+ return response;
45339
+ }, function onAdapterRejection(reason) {
45340
+ if (!isCancel(reason)) {
45335
45341
  throwIfCancellationRequested(config2);
45336
- response.data = transformData.call(config2, config2.transformResponse, response);
45337
- response.headers = AxiosHeaders_default.from(response.headers);
45338
- return response;
45339
- },
45340
- function onAdapterRejection(reason) {
45341
- if (!isCancel(reason)) {
45342
- throwIfCancellationRequested(config2);
45343
- if (reason && reason.response) {
45344
- reason.response.data = transformData.call(
45345
- config2,
45346
- config2.transformResponse,
45347
- reason.response
45348
- );
45349
- reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
45350
- }
45342
+ if (reason && reason.response) {
45343
+ reason.response.data = transformData.call(
45344
+ config2,
45345
+ config2.transformResponse,
45346
+ reason.response
45347
+ );
45348
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
45351
45349
  }
45352
- return Promise.reject(reason);
45353
45350
  }
45354
- );
45351
+ return Promise.reject(reason);
45352
+ });
45355
45353
  }
45356
45354
 
45357
45355
  // ../node_modules/axios/lib/helpers/validator.js
@@ -45404,10 +45402,7 @@ function assertOptions(options, schema, allowUnknown) {
45404
45402
  const value = options[opt];
45405
45403
  const result = value === void 0 || validator(value, opt, options);
45406
45404
  if (result !== true) {
45407
- throw new AxiosError_default(
45408
- "option " + opt + " must be " + result,
45409
- AxiosError_default.ERR_BAD_OPTION_VALUE
45410
- );
45405
+ throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
45411
45406
  }
45412
45407
  continue;
45413
45408
  }
@@ -45469,16 +45464,12 @@ var Axios = class {
45469
45464
  config2 = mergeConfig(this.defaults, config2);
45470
45465
  const { transitional: transitional2, paramsSerializer, headers } = config2;
45471
45466
  if (transitional2 !== void 0) {
45472
- validator_default.assertOptions(
45473
- transitional2,
45474
- {
45475
- silentJSONParsing: validators2.transitional(validators2.boolean),
45476
- forcedJSONParsing: validators2.transitional(validators2.boolean),
45477
- clarifyTimeoutError: validators2.transitional(validators2.boolean),
45478
- legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
45479
- },
45480
- false
45481
- );
45467
+ validator_default.assertOptions(transitional2, {
45468
+ silentJSONParsing: validators2.transitional(validators2.boolean),
45469
+ forcedJSONParsing: validators2.transitional(validators2.boolean),
45470
+ clarifyTimeoutError: validators2.transitional(validators2.boolean),
45471
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
45472
+ }, false);
45482
45473
  }
45483
45474
  if (paramsSerializer != null) {
45484
45475
  if (utils_default.isFunction(paramsSerializer)) {
@@ -45486,14 +45477,10 @@ var Axios = class {
45486
45477
  serialize: paramsSerializer
45487
45478
  };
45488
45479
  } else {
45489
- validator_default.assertOptions(
45490
- paramsSerializer,
45491
- {
45492
- encode: validators2.function,
45493
- serialize: validators2.function
45494
- },
45495
- true
45496
- );
45480
+ validator_default.assertOptions(paramsSerializer, {
45481
+ encode: validators2.function,
45482
+ serialize: validators2.function
45483
+ }, true);
45497
45484
  }
45498
45485
  }
45499
45486
  if (config2.allowAbsoluteUrls !== void 0) {
@@ -45502,19 +45489,21 @@ var Axios = class {
45502
45489
  } else {
45503
45490
  config2.allowAbsoluteUrls = true;
45504
45491
  }
45505
- validator_default.assertOptions(
45506
- config2,
45507
- {
45508
- baseUrl: validators2.spelling("baseURL"),
45509
- withXsrfToken: validators2.spelling("withXSRFToken")
45510
- },
45511
- true
45512
- );
45492
+ validator_default.assertOptions(config2, {
45493
+ baseUrl: validators2.spelling("baseURL"),
45494
+ withXsrfToken: validators2.spelling("withXSRFToken")
45495
+ }, true);
45513
45496
  config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
45514
- let contextHeaders = headers && utils_default.merge(headers.common, headers[config2.method]);
45515
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
45516
- delete headers[method];
45517
- });
45497
+ let contextHeaders = headers && utils_default.merge(
45498
+ headers.common,
45499
+ headers[config2.method]
45500
+ );
45501
+ headers && utils_default.forEach(
45502
+ ["delete", "get", "head", "post", "put", "patch", "common"],
45503
+ (method) => {
45504
+ delete headers[method];
45505
+ }
45506
+ );
45518
45507
  config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);
45519
45508
  const requestInterceptorChain = [];
45520
45509
  let synchronousRequestInterceptors = true;
@@ -45581,28 +45570,24 @@ var Axios = class {
45581
45570
  };
45582
45571
  utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
45583
45572
  Axios.prototype[method] = function(url3, config2) {
45584
- return this.request(
45585
- mergeConfig(config2 || {}, {
45586
- method,
45587
- url: url3,
45588
- data: (config2 || {}).data
45589
- })
45590
- );
45573
+ return this.request(mergeConfig(config2 || {}, {
45574
+ method,
45575
+ url: url3,
45576
+ data: (config2 || {}).data
45577
+ }));
45591
45578
  };
45592
45579
  });
45593
45580
  utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
45594
45581
  function generateHTTPMethod(isForm) {
45595
45582
  return function httpMethod(url3, data, config2) {
45596
- return this.request(
45597
- mergeConfig(config2 || {}, {
45598
- method,
45599
- headers: isForm ? {
45600
- "Content-Type": "multipart/form-data"
45601
- } : {},
45602
- url: url3,
45603
- data
45604
- })
45605
- );
45583
+ return this.request(mergeConfig(config2 || {}, {
45584
+ method,
45585
+ headers: isForm ? {
45586
+ "Content-Type": "multipart/form-data"
45587
+ } : {},
45588
+ url: url3,
45589
+ data
45590
+ }));
45606
45591
  };
45607
45592
  }
45608
45593
  Axios.prototype[method] = generateHTTPMethod();