@fre4x/grok 1.1.3 → 1.1.6

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 = path3.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
  }
@@ -42246,25 +42355,12 @@ var isEmptyObject = (val) => {
42246
42355
  };
42247
42356
  var isDate = kindOfTest("Date");
42248
42357
  var isFile = kindOfTest("File");
42249
- var isReactNativeBlob = (value) => {
42250
- return !!(value && typeof value.uri !== "undefined");
42251
- };
42252
- var isReactNative = (formData) => formData && typeof formData.getParts !== "undefined";
42253
42358
  var isBlob = kindOfTest("Blob");
42254
42359
  var isFileList = kindOfTest("FileList");
42255
42360
  var isStream = (val) => isObject2(val) && isFunction(val.pipe);
42256
- function getGlobal() {
42257
- if (typeof globalThis !== "undefined") return globalThis;
42258
- if (typeof self !== "undefined") return self;
42259
- if (typeof window !== "undefined") return window;
42260
- if (typeof global !== "undefined") return global;
42261
- return {};
42262
- }
42263
- var G = getGlobal();
42264
- var FormDataCtor = typeof G.FormData !== "undefined" ? G.FormData : void 0;
42265
42361
  var isFormData = (thing) => {
42266
42362
  let kind;
42267
- return thing && (FormDataCtor && thing instanceof FormDataCtor || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
42363
+ return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
42268
42364
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
42269
42365
  };
42270
42366
  var isURLSearchParams = kindOfTest("URLSearchParams");
@@ -42274,9 +42370,7 @@ var [isReadableStream, isRequest, isResponse, isHeaders] = [
42274
42370
  "Response",
42275
42371
  "Headers"
42276
42372
  ].map(kindOfTest);
42277
- var trim = (str) => {
42278
- return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
42279
- };
42373
+ var trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
42280
42374
  function forEach(obj, fn, { allOwnKeys = false } = {}) {
42281
42375
  if (obj === null || typeof obj === "undefined") {
42282
42376
  return;
@@ -42378,7 +42472,10 @@ var stripBOM = (content) => {
42378
42472
  return content;
42379
42473
  };
42380
42474
  var inherits = (constructor, superConstructor, props, descriptors) => {
42381
- constructor.prototype = Object.create(superConstructor.prototype, descriptors);
42475
+ constructor.prototype = Object.create(
42476
+ superConstructor.prototype,
42477
+ descriptors
42478
+ );
42382
42479
  Object.defineProperty(constructor.prototype, "constructor", {
42383
42480
  value: constructor,
42384
42481
  writable: true,
@@ -42577,8 +42674,6 @@ var utils_default = {
42577
42674
  isUndefined,
42578
42675
  isDate,
42579
42676
  isFile,
42580
- isReactNativeBlob,
42581
- isReactNative,
42582
42677
  isBlob,
42583
42678
  isRegExp,
42584
42679
  isFunction,
@@ -42627,9 +42722,6 @@ var AxiosError = class _AxiosError extends Error {
42627
42722
  const axiosError = new _AxiosError(error48.message, code || error48.code, config2, request, response);
42628
42723
  axiosError.cause = error48;
42629
42724
  axiosError.name = error48.name;
42630
- if (error48.status != null && axiosError.status == null) {
42631
- axiosError.status = error48.status;
42632
- }
42633
42725
  customProps && Object.assign(axiosError, customProps);
42634
42726
  return axiosError;
42635
42727
  }
@@ -42646,12 +42738,6 @@ var AxiosError = class _AxiosError extends Error {
42646
42738
  */
42647
42739
  constructor(message, code, config2, request, response) {
42648
42740
  super(message);
42649
- Object.defineProperty(this, "message", {
42650
- value: message,
42651
- enumerable: true,
42652
- writable: true,
42653
- configurable: true
42654
- });
42655
42741
  this.name = "AxiosError";
42656
42742
  this.isAxiosError = true;
42657
42743
  code && (this.code = code);
@@ -42725,18 +42811,13 @@ function toFormData(obj, formData, options) {
42725
42811
  throw new TypeError("target must be an object");
42726
42812
  }
42727
42813
  formData = formData || new (FormData_default || FormData)();
42728
- options = utils_default.toFlatObject(
42729
- options,
42730
- {
42731
- metaTokens: true,
42732
- dots: false,
42733
- indexes: false
42734
- },
42735
- false,
42736
- function defined(option, source) {
42737
- return !utils_default.isUndefined(source[option]);
42738
- }
42739
- );
42814
+ options = utils_default.toFlatObject(options, {
42815
+ metaTokens: true,
42816
+ dots: false,
42817
+ indexes: false
42818
+ }, false, function defined(option, source) {
42819
+ return !utils_default.isUndefined(source[option]);
42820
+ });
42740
42821
  const metaTokens = options.metaTokens;
42741
42822
  const visitor = options.visitor || defaultVisitor;
42742
42823
  const dots = options.dots;
@@ -42764,10 +42845,6 @@ function toFormData(obj, formData, options) {
42764
42845
  }
42765
42846
  function defaultVisitor(value, key, path3) {
42766
42847
  let arr = value;
42767
- if (utils_default.isReactNative(formData) && utils_default.isReactNativeBlob(value)) {
42768
- formData.append(renderKey(path3, key, dots), convertValue(value));
42769
- return false;
42770
- }
42771
42848
  if (value && !path3 && typeof value === "object") {
42772
42849
  if (utils_default.endsWith(key, "{}")) {
42773
42850
  key = metaTokens ? key : key.slice(0, -2);
@@ -42803,7 +42880,13 @@ function toFormData(obj, formData, options) {
42803
42880
  }
42804
42881
  stack.push(value);
42805
42882
  utils_default.forEach(value, function each(el, key) {
42806
- const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(formData, el, utils_default.isString(key) ? key.trim() : key, path3, exposedHelpers);
42883
+ const result = !(utils_default.isUndefined(el) || el === null) && visitor.call(
42884
+ formData,
42885
+ el,
42886
+ utils_default.isString(key) ? key.trim() : key,
42887
+ path3,
42888
+ exposedHelpers
42889
+ );
42807
42890
  if (result === true) {
42808
42891
  build(el, path3 ? path3.concat(key) : [key]);
42809
42892
  }
@@ -43098,74 +43181,70 @@ function stringifySafely(rawValue, parser, encoder) {
43098
43181
  var defaults = {
43099
43182
  transitional: transitional_default,
43100
43183
  adapter: ["xhr", "http", "fetch"],
43101
- transformRequest: [
43102
- function transformRequest(data, headers) {
43103
- const contentType = headers.getContentType() || "";
43104
- const hasJSONContentType = contentType.indexOf("application/json") > -1;
43105
- const isObjectPayload = utils_default.isObject(data);
43106
- if (isObjectPayload && utils_default.isHTMLForm(data)) {
43107
- data = new FormData(data);
43108
- }
43109
- const isFormData2 = utils_default.isFormData(data);
43110
- if (isFormData2) {
43111
- return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
43112
- }
43113
- 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)) {
43114
- return data;
43115
- }
43116
- if (utils_default.isArrayBufferView(data)) {
43117
- return data.buffer;
43118
- }
43119
- if (utils_default.isURLSearchParams(data)) {
43120
- headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
43121
- return data.toString();
43122
- }
43123
- let isFileList2;
43124
- if (isObjectPayload) {
43125
- if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
43126
- return toURLEncodedForm(data, this.formSerializer).toString();
43127
- }
43128
- if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
43129
- const _FormData = this.env && this.env.FormData;
43130
- return toFormData_default(
43131
- isFileList2 ? { "files[]": data } : data,
43132
- _FormData && new _FormData(),
43133
- this.formSerializer
43134
- );
43135
- }
43184
+ transformRequest: [function transformRequest(data, headers) {
43185
+ const contentType = headers.getContentType() || "";
43186
+ const hasJSONContentType = contentType.indexOf("application/json") > -1;
43187
+ const isObjectPayload = utils_default.isObject(data);
43188
+ if (isObjectPayload && utils_default.isHTMLForm(data)) {
43189
+ data = new FormData(data);
43190
+ }
43191
+ const isFormData2 = utils_default.isFormData(data);
43192
+ if (isFormData2) {
43193
+ return hasJSONContentType ? JSON.stringify(formDataToJSON_default(data)) : data;
43194
+ }
43195
+ 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)) {
43196
+ return data;
43197
+ }
43198
+ if (utils_default.isArrayBufferView(data)) {
43199
+ return data.buffer;
43200
+ }
43201
+ if (utils_default.isURLSearchParams(data)) {
43202
+ headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
43203
+ return data.toString();
43204
+ }
43205
+ let isFileList2;
43206
+ if (isObjectPayload) {
43207
+ if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
43208
+ return toURLEncodedForm(data, this.formSerializer).toString();
43136
43209
  }
43137
- if (isObjectPayload || hasJSONContentType) {
43138
- headers.setContentType("application/json", false);
43139
- return stringifySafely(data);
43210
+ if ((isFileList2 = utils_default.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
43211
+ const _FormData = this.env && this.env.FormData;
43212
+ return toFormData_default(
43213
+ isFileList2 ? { "files[]": data } : data,
43214
+ _FormData && new _FormData(),
43215
+ this.formSerializer
43216
+ );
43140
43217
  }
43218
+ }
43219
+ if (isObjectPayload || hasJSONContentType) {
43220
+ headers.setContentType("application/json", false);
43221
+ return stringifySafely(data);
43222
+ }
43223
+ return data;
43224
+ }],
43225
+ transformResponse: [function transformResponse(data) {
43226
+ const transitional2 = this.transitional || defaults.transitional;
43227
+ const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
43228
+ const JSONRequested = this.responseType === "json";
43229
+ if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
43141
43230
  return data;
43142
43231
  }
43143
- ],
43144
- transformResponse: [
43145
- function transformResponse(data) {
43146
- const transitional2 = this.transitional || defaults.transitional;
43147
- const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
43148
- const JSONRequested = this.responseType === "json";
43149
- if (utils_default.isResponse(data) || utils_default.isReadableStream(data)) {
43150
- return data;
43151
- }
43152
- if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
43153
- const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
43154
- const strictJSONParsing = !silentJSONParsing && JSONRequested;
43155
- try {
43156
- return JSON.parse(data, this.parseReviver);
43157
- } catch (e) {
43158
- if (strictJSONParsing) {
43159
- if (e.name === "SyntaxError") {
43160
- throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
43161
- }
43162
- throw e;
43232
+ if (data && utils_default.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
43233
+ const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
43234
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
43235
+ try {
43236
+ return JSON.parse(data, this.parseReviver);
43237
+ } catch (e) {
43238
+ if (strictJSONParsing) {
43239
+ if (e.name === "SyntaxError") {
43240
+ throw AxiosError_default.from(e, AxiosError_default.ERR_BAD_RESPONSE, this, null, this.response);
43163
43241
  }
43242
+ throw e;
43164
43243
  }
43165
43244
  }
43166
- return data;
43167
43245
  }
43168
- ],
43246
+ return data;
43247
+ }],
43169
43248
  /**
43170
43249
  * A timeout in milliseconds to abort a request. If set to 0 (default) a
43171
43250
  * timeout is not created.
@@ -43184,7 +43263,7 @@ var defaults = {
43184
43263
  },
43185
43264
  headers: {
43186
43265
  common: {
43187
- Accept: "application/json, text/plain, */*",
43266
+ "Accept": "application/json, text/plain, */*",
43188
43267
  "Content-Type": void 0
43189
43268
  }
43190
43269
  }
@@ -43455,14 +43534,7 @@ var AxiosHeaders = class {
43455
43534
  return this;
43456
43535
  }
43457
43536
  };
43458
- AxiosHeaders.accessor([
43459
- "Content-Type",
43460
- "Content-Length",
43461
- "Accept",
43462
- "Accept-Encoding",
43463
- "User-Agent",
43464
- "Authorization"
43465
- ]);
43537
+ AxiosHeaders.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
43466
43538
  utils_default.reduceDescriptors(AxiosHeaders.prototype, ({ value }, key) => {
43467
43539
  let mapped = key[0].toUpperCase() + key.slice(1);
43468
43540
  return {
@@ -43518,15 +43590,13 @@ function settle(resolve, reject, response) {
43518
43590
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
43519
43591
  resolve(response);
43520
43592
  } else {
43521
- reject(
43522
- new AxiosError_default(
43523
- "Request failed with status code " + response.status,
43524
- [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
43525
- response.config,
43526
- response.request,
43527
- response
43528
- )
43529
- );
43593
+ reject(new AxiosError_default(
43594
+ "Request failed with status code " + response.status,
43595
+ [AxiosError_default.ERR_BAD_REQUEST, AxiosError_default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
43596
+ response.config,
43597
+ response.request,
43598
+ response
43599
+ ));
43530
43600
  }
43531
43601
  }
43532
43602
 
@@ -43562,7 +43632,7 @@ import util3 from "util";
43562
43632
  import zlib from "zlib";
43563
43633
 
43564
43634
  // ../node_modules/axios/lib/env/data.js
43565
- var VERSION = "1.13.6";
43635
+ var VERSION = "1.13.5";
43566
43636
 
43567
43637
  // ../node_modules/axios/lib/helpers/parseProtocol.js
43568
43638
  function parseProtocol(url3) {
@@ -43607,21 +43677,16 @@ import stream from "stream";
43607
43677
  var kInternals = /* @__PURE__ */ Symbol("internals");
43608
43678
  var AxiosTransformStream = class extends stream.Transform {
43609
43679
  constructor(options) {
43610
- options = utils_default.toFlatObject(
43611
- options,
43612
- {
43613
- maxRate: 0,
43614
- chunkSize: 64 * 1024,
43615
- minChunkSize: 100,
43616
- timeWindow: 500,
43617
- ticksRate: 2,
43618
- samplesCount: 15
43619
- },
43620
- null,
43621
- (prop, source) => {
43622
- return !utils_default.isUndefined(source[prop]);
43623
- }
43624
- );
43680
+ options = utils_default.toFlatObject(options, {
43681
+ maxRate: 0,
43682
+ chunkSize: 64 * 1024,
43683
+ minChunkSize: 100,
43684
+ timeWindow: 500,
43685
+ ticksRate: 2,
43686
+ samplesCount: 15
43687
+ }, null, (prop, source) => {
43688
+ return !utils_default.isUndefined(source[prop]);
43689
+ });
43625
43690
  super({
43626
43691
  readableHighWaterMark: options.chunkSize
43627
43692
  });
@@ -43704,12 +43769,9 @@ var AxiosTransformStream = class extends stream.Transform {
43704
43769
  chunkRemainder = _chunk.subarray(maxChunkSize);
43705
43770
  _chunk = _chunk.subarray(0, maxChunkSize);
43706
43771
  }
43707
- pushChunk(
43708
- _chunk,
43709
- chunkRemainder ? () => {
43710
- process.nextTick(_callback, null, chunkRemainder);
43711
- } : _callback
43712
- );
43772
+ pushChunk(_chunk, chunkRemainder ? () => {
43773
+ process.nextTick(_callback, null, chunkRemainder);
43774
+ } : _callback);
43713
43775
  };
43714
43776
  transformChunk(chunk, function transformNextChunk(err, _chunk) {
43715
43777
  if (err) {
@@ -43780,14 +43842,11 @@ var FormDataPart = class {
43780
43842
  yield CRLF_BYTES;
43781
43843
  }
43782
43844
  static escapeName(name) {
43783
- return String(name).replace(
43784
- /[\r\n"]/g,
43785
- (match) => ({
43786
- "\r": "%0D",
43787
- "\n": "%0A",
43788
- '"': "%22"
43789
- })[match]
43790
- );
43845
+ return String(name).replace(/[\r\n"]/g, (match) => ({
43846
+ "\r": "%0D",
43847
+ "\n": "%0A",
43848
+ '"': "%22"
43849
+ })[match]);
43791
43850
  }
43792
43851
  };
43793
43852
  var formDataToStream = (form, headersHandler, options) => {
@@ -43819,15 +43878,13 @@ var formDataToStream = (form, headersHandler, options) => {
43819
43878
  computedHeaders["Content-Length"] = contentLength;
43820
43879
  }
43821
43880
  headersHandler && headersHandler(computedHeaders);
43822
- return Readable.from(
43823
- (async function* () {
43824
- for (const part of parts) {
43825
- yield boundaryBytes;
43826
- yield* part.encode();
43827
- }
43828
- yield footerBytes;
43829
- })()
43830
- );
43881
+ return Readable.from((async function* () {
43882
+ for (const part of parts) {
43883
+ yield boundaryBytes;
43884
+ yield* part.encode();
43885
+ }
43886
+ yield footerBytes;
43887
+ })());
43831
43888
  };
43832
43889
  var formDataToStream_default = formDataToStream;
43833
43890
 
@@ -43966,14 +44023,11 @@ var progressEventReducer = (listener, isDownloadStream, freq = 3) => {
43966
44023
  };
43967
44024
  var progressEventDecorator = (total, throttled) => {
43968
44025
  const lengthComputable = total != null;
43969
- return [
43970
- (loaded) => throttled[0]({
43971
- lengthComputable,
43972
- total,
43973
- loaded
43974
- }),
43975
- throttled[1]
43976
- ];
44026
+ return [(loaded) => throttled[0]({
44027
+ lengthComputable,
44028
+ total,
44029
+ loaded
44030
+ }), throttled[1]];
43977
44031
  };
43978
44032
  var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
43979
44033
 
@@ -44052,12 +44106,9 @@ var Http2Sessions = class {
44052
44106
  this.sessions = /* @__PURE__ */ Object.create(null);
44053
44107
  }
44054
44108
  getSession(authority, options) {
44055
- options = Object.assign(
44056
- {
44057
- sessionTimeout: 1e3
44058
- },
44059
- options
44060
- );
44109
+ options = Object.assign({
44110
+ sessionTimeout: 1e3
44111
+ }, options);
44061
44112
  let authoritySessions = this.sessions[authority];
44062
44113
  if (authoritySessions) {
44063
44114
  let len = authoritySessions.length;
@@ -44111,7 +44162,10 @@ var Http2Sessions = class {
44111
44162
  };
44112
44163
  }
44113
44164
  session.once("close", removeSession);
44114
- let entry = [session, options];
44165
+ let entry = [
44166
+ session,
44167
+ options
44168
+ ];
44115
44169
  authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
44116
44170
  return session;
44117
44171
  }
@@ -44197,7 +44251,12 @@ var http2Transport = {
44197
44251
  const authority = options.protocol + "//" + options.hostname + ":" + (options.port || (options.protocol === "https:" ? 443 : 80));
44198
44252
  const { http2Options, headers } = options;
44199
44253
  const session = http2Sessions.getSession(authority, http2Options);
44200
- const { HTTP2_HEADER_SCHEME, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_STATUS } = http2.constants;
44254
+ const {
44255
+ HTTP2_HEADER_SCHEME,
44256
+ HTTP2_HEADER_METHOD,
44257
+ HTTP2_HEADER_PATH,
44258
+ HTTP2_HEADER_STATUS
44259
+ } = http2.constants;
44201
44260
  const http2Headers = {
44202
44261
  [HTTP2_HEADER_SCHEME]: options.protocol.replace(":", ""),
44203
44262
  [HTTP2_HEADER_METHOD]: options.method,
@@ -44250,10 +44309,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44250
44309
  const abortEmitter = new EventEmitter();
44251
44310
  function abort(reason) {
44252
44311
  try {
44253
- abortEmitter.emit(
44254
- "abort",
44255
- !reason || reason.type ? new CanceledError_default(null, config2, req) : reason
44256
- );
44312
+ abortEmitter.emit("abort", !reason || reason.type ? new CanceledError_default(null, config2, req) : reason);
44257
44313
  } catch (err) {
44258
44314
  console.warn("emit error", err);
44259
44315
  }
@@ -44299,13 +44355,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44299
44355
  const dataUrl = String(config2.url || fullPath || "");
44300
44356
  const estimated = estimateDataURLDecodedBytes(dataUrl);
44301
44357
  if (estimated > config2.maxContentLength) {
44302
- return reject(
44303
- new AxiosError_default(
44304
- "maxContentLength size of " + config2.maxContentLength + " exceeded",
44305
- AxiosError_default.ERR_BAD_RESPONSE,
44306
- config2
44307
- )
44308
- );
44358
+ return reject(new AxiosError_default(
44359
+ "maxContentLength size of " + config2.maxContentLength + " exceeded",
44360
+ AxiosError_default.ERR_BAD_RESPONSE,
44361
+ config2
44362
+ ));
44309
44363
  }
44310
44364
  }
44311
44365
  let convertedData;
@@ -44341,9 +44395,11 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44341
44395
  });
44342
44396
  }
44343
44397
  if (supportedProtocols.indexOf(protocol) === -1) {
44344
- return reject(
44345
- new AxiosError_default("Unsupported protocol " + protocol, AxiosError_default.ERR_BAD_REQUEST, config2)
44346
- );
44398
+ return reject(new AxiosError_default(
44399
+ "Unsupported protocol " + protocol,
44400
+ AxiosError_default.ERR_BAD_REQUEST,
44401
+ config2
44402
+ ));
44347
44403
  }
44348
44404
  const headers = AxiosHeaders_default.from(config2.headers).normalize();
44349
44405
  headers.set("User-Agent", "axios/" + VERSION, false);
@@ -44353,16 +44409,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44353
44409
  let maxDownloadRate = void 0;
44354
44410
  if (utils_default.isSpecCompliantForm(data)) {
44355
44411
  const userBoundary = headers.getContentType(/boundary=([-_\w\d]{10,70})/i);
44356
- data = formDataToStream_default(
44357
- data,
44358
- (formHeaders) => {
44359
- headers.set(formHeaders);
44360
- },
44361
- {
44362
- tag: `axios-${VERSION}-boundary`,
44363
- boundary: userBoundary && userBoundary[1] || void 0
44364
- }
44365
- );
44412
+ data = formDataToStream_default(data, (formHeaders) => {
44413
+ headers.set(formHeaders);
44414
+ }, {
44415
+ tag: `axios-${VERSION}-boundary`,
44416
+ boundary: userBoundary && userBoundary[1] || void 0
44417
+ });
44366
44418
  } else if (utils_default.isFormData(data) && utils_default.isFunction(data.getHeaders)) {
44367
44419
  headers.set(data.getHeaders());
44368
44420
  if (!headers.hasContentLength()) {
@@ -44383,23 +44435,19 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44383
44435
  } else if (utils_default.isString(data)) {
44384
44436
  data = Buffer.from(data, "utf-8");
44385
44437
  } else {
44386
- return reject(
44387
- new AxiosError_default(
44388
- "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
44389
- AxiosError_default.ERR_BAD_REQUEST,
44390
- config2
44391
- )
44392
- );
44438
+ return reject(new AxiosError_default(
44439
+ "Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",
44440
+ AxiosError_default.ERR_BAD_REQUEST,
44441
+ config2
44442
+ ));
44393
44443
  }
44394
44444
  headers.setContentLength(data.length, false);
44395
44445
  if (config2.maxBodyLength > -1 && data.length > config2.maxBodyLength) {
44396
- return reject(
44397
- new AxiosError_default(
44398
- "Request body larger than maxBodyLength limit",
44399
- AxiosError_default.ERR_BAD_REQUEST,
44400
- config2
44401
- )
44402
- );
44446
+ return reject(new AxiosError_default(
44447
+ "Request body larger than maxBodyLength limit",
44448
+ AxiosError_default.ERR_BAD_REQUEST,
44449
+ config2
44450
+ ));
44403
44451
  }
44404
44452
  }
44405
44453
  const contentLength = utils_default.toFiniteNumber(headers.getContentLength());
@@ -44413,25 +44461,16 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44413
44461
  if (!utils_default.isStream(data)) {
44414
44462
  data = stream3.Readable.from(data, { objectMode: false });
44415
44463
  }
44416
- data = stream3.pipeline(
44417
- [
44418
- data,
44419
- new AxiosTransformStream_default({
44420
- maxRate: utils_default.toFiniteNumber(maxUploadRate)
44421
- })
44422
- ],
44423
- utils_default.noop
44424
- );
44425
- onUploadProgress && data.on(
44426
- "progress",
44427
- flushOnFinish(
44428
- data,
44429
- progressEventDecorator(
44430
- contentLength,
44431
- progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
44432
- )
44464
+ data = stream3.pipeline([data, new AxiosTransformStream_default({
44465
+ maxRate: utils_default.toFiniteNumber(maxUploadRate)
44466
+ })], utils_default.noop);
44467
+ onUploadProgress && data.on("progress", flushOnFinish(
44468
+ data,
44469
+ progressEventDecorator(
44470
+ contentLength,
44471
+ progressEventReducer(asyncDecorator(onUploadProgress), false, 3)
44433
44472
  )
44434
- );
44473
+ ));
44435
44474
  }
44436
44475
  let auth = void 0;
44437
44476
  if (config2.auth) {
@@ -44482,11 +44521,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44482
44521
  } else {
44483
44522
  options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
44484
44523
  options.port = parsed.port;
44485
- setProxy(
44486
- options,
44487
- config2.proxy,
44488
- protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path
44489
- );
44524
+ setProxy(options, config2.proxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path);
44490
44525
  }
44491
44526
  let transport;
44492
44527
  const isHttpsRequest = isHttps.test(options.protocol);
@@ -44524,16 +44559,13 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44524
44559
  const transformStream = new AxiosTransformStream_default({
44525
44560
  maxRate: utils_default.toFiniteNumber(maxDownloadRate)
44526
44561
  });
44527
- onDownloadProgress && transformStream.on(
44528
- "progress",
44529
- flushOnFinish(
44530
- transformStream,
44531
- progressEventDecorator(
44532
- responseLength,
44533
- progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
44534
- )
44562
+ onDownloadProgress && transformStream.on("progress", flushOnFinish(
44563
+ transformStream,
44564
+ progressEventDecorator(
44565
+ responseLength,
44566
+ progressEventReducer(asyncDecorator(onDownloadProgress), true, 3)
44535
44567
  )
44536
- );
44568
+ ));
44537
44569
  streams.push(transformStream);
44538
44570
  }
44539
44571
  let responseStream = res;
@@ -44583,14 +44615,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44583
44615
  if (config2.maxContentLength > -1 && totalResponseBytes > config2.maxContentLength) {
44584
44616
  rejected = true;
44585
44617
  responseStream.destroy();
44586
- abort(
44587
- new AxiosError_default(
44588
- "maxContentLength size of " + config2.maxContentLength + " exceeded",
44589
- AxiosError_default.ERR_BAD_RESPONSE,
44590
- config2,
44591
- lastRequest
44592
- )
44593
- );
44618
+ abort(new AxiosError_default(
44619
+ "maxContentLength size of " + config2.maxContentLength + " exceeded",
44620
+ AxiosError_default.ERR_BAD_RESPONSE,
44621
+ config2,
44622
+ lastRequest
44623
+ ));
44594
44624
  }
44595
44625
  });
44596
44626
  responseStream.on("aborted", function handlerStreamAborted() {
@@ -44649,14 +44679,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44649
44679
  if (config2.timeout) {
44650
44680
  const timeout = parseInt(config2.timeout, 10);
44651
44681
  if (Number.isNaN(timeout)) {
44652
- abort(
44653
- new AxiosError_default(
44654
- "error trying to parse `config.timeout` to int",
44655
- AxiosError_default.ERR_BAD_OPTION_VALUE,
44656
- config2,
44657
- req
44658
- )
44659
- );
44682
+ abort(new AxiosError_default(
44683
+ "error trying to parse `config.timeout` to int",
44684
+ AxiosError_default.ERR_BAD_OPTION_VALUE,
44685
+ config2,
44686
+ req
44687
+ ));
44660
44688
  return;
44661
44689
  }
44662
44690
  req.setTimeout(timeout, function handleRequestTimeout() {
@@ -44666,14 +44694,12 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config2) {
44666
44694
  if (config2.timeoutErrorMessage) {
44667
44695
  timeoutErrorMessage = config2.timeoutErrorMessage;
44668
44696
  }
44669
- abort(
44670
- new AxiosError_default(
44671
- timeoutErrorMessage,
44672
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44673
- config2,
44674
- req
44675
- )
44676
- );
44697
+ abort(new AxiosError_default(
44698
+ timeoutErrorMessage,
44699
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44700
+ config2,
44701
+ req
44702
+ ));
44677
44703
  });
44678
44704
  } else {
44679
44705
  req.setTimeout(0);
@@ -44828,12 +44854,16 @@ function mergeConfig(config1, config2) {
44828
44854
  validateStatus: mergeDirectKeys,
44829
44855
  headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
44830
44856
  };
44831
- utils_default.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
44832
- if (prop === "__proto__" || prop === "constructor" || prop === "prototype") return;
44833
- const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
44834
- const configValue = merge3(config1[prop], config2[prop], prop);
44835
- utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
44836
- });
44857
+ utils_default.forEach(
44858
+ Object.keys({ ...config1, ...config2 }),
44859
+ function computeConfigValue(prop) {
44860
+ if (prop === "__proto__" || prop === "constructor" || prop === "prototype")
44861
+ return;
44862
+ const merge3 = utils_default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
44863
+ const configValue = merge3(config1[prop], config2[prop], prop);
44864
+ utils_default.isUndefined(configValue) && merge3 !== mergeDirectKeys || (config3[prop] = configValue);
44865
+ }
44866
+ );
44837
44867
  return config3;
44838
44868
  }
44839
44869
 
@@ -44842,17 +44872,11 @@ var resolveConfig_default = (config2) => {
44842
44872
  const newConfig = mergeConfig({}, config2);
44843
44873
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
44844
44874
  newConfig.headers = headers = AxiosHeaders_default.from(headers);
44845
- newConfig.url = buildURL(
44846
- buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls),
44847
- config2.params,
44848
- config2.paramsSerializer
44849
- );
44875
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
44850
44876
  if (auth) {
44851
44877
  headers.set(
44852
44878
  "Authorization",
44853
- "Basic " + btoa(
44854
- (auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : "")
44855
- )
44879
+ "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
44856
44880
  );
44857
44881
  }
44858
44882
  if (utils_default.isFormData(data)) {
@@ -44916,17 +44940,13 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
44916
44940
  config: config2,
44917
44941
  request
44918
44942
  };
44919
- settle(
44920
- function _resolve(value) {
44921
- resolve(value);
44922
- done();
44923
- },
44924
- function _reject(err) {
44925
- reject(err);
44926
- done();
44927
- },
44928
- response
44929
- );
44943
+ settle(function _resolve(value) {
44944
+ resolve(value);
44945
+ done();
44946
+ }, function _reject(err) {
44947
+ reject(err);
44948
+ done();
44949
+ }, response);
44930
44950
  request = null;
44931
44951
  }
44932
44952
  if ("onloadend" in request) {
@@ -44962,14 +44982,12 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
44962
44982
  if (_config.timeoutErrorMessage) {
44963
44983
  timeoutErrorMessage = _config.timeoutErrorMessage;
44964
44984
  }
44965
- reject(
44966
- new AxiosError_default(
44967
- timeoutErrorMessage,
44968
- transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44969
- config2,
44970
- request
44971
- )
44972
- );
44985
+ reject(new AxiosError_default(
44986
+ timeoutErrorMessage,
44987
+ transitional2.clarifyTimeoutError ? AxiosError_default.ETIMEDOUT : AxiosError_default.ECONNABORTED,
44988
+ config2,
44989
+ request
44990
+ ));
44973
44991
  request = null;
44974
44992
  };
44975
44993
  requestData === void 0 && requestHeaders.setContentType(null);
@@ -45009,13 +45027,7 @@ var xhr_default = isXHRAdapterSupported && function(config2) {
45009
45027
  }
45010
45028
  const protocol = parseProtocol(_config.url);
45011
45029
  if (protocol && platform_default.protocols.indexOf(protocol) === -1) {
45012
- reject(
45013
- new AxiosError_default(
45014
- "Unsupported protocol " + protocol + ":",
45015
- AxiosError_default.ERR_BAD_REQUEST,
45016
- config2
45017
- )
45018
- );
45030
+ reject(new AxiosError_default("Unsupported protocol " + protocol + ":", AxiosError_default.ERR_BAD_REQUEST, config2));
45019
45031
  return;
45020
45032
  }
45021
45033
  request.send(requestData || null);
@@ -45033,9 +45045,7 @@ var composeSignals = (signals, timeout) => {
45033
45045
  aborted2 = true;
45034
45046
  unsubscribe();
45035
45047
  const err = reason instanceof Error ? reason : this.reason;
45036
- controller.abort(
45037
- err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err)
45038
- );
45048
+ controller.abort(err instanceof AxiosError_default ? err : new CanceledError_default(err instanceof Error ? err.message : err));
45039
45049
  }
45040
45050
  };
45041
45051
  let timer = timeout && setTimeout(() => {
@@ -45108,36 +45118,33 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
45108
45118
  onFinish && onFinish(e);
45109
45119
  }
45110
45120
  };
45111
- return new ReadableStream(
45112
- {
45113
- async pull(controller) {
45114
- try {
45115
- const { done: done2, value } = await iterator2.next();
45116
- if (done2) {
45117
- _onFinish();
45118
- controller.close();
45119
- return;
45120
- }
45121
- let len = value.byteLength;
45122
- if (onProgress) {
45123
- let loadedBytes = bytes += len;
45124
- onProgress(loadedBytes);
45125
- }
45126
- controller.enqueue(new Uint8Array(value));
45127
- } catch (err) {
45128
- _onFinish(err);
45129
- throw err;
45121
+ return new ReadableStream({
45122
+ async pull(controller) {
45123
+ try {
45124
+ const { done: done2, value } = await iterator2.next();
45125
+ if (done2) {
45126
+ _onFinish();
45127
+ controller.close();
45128
+ return;
45130
45129
  }
45131
- },
45132
- cancel(reason) {
45133
- _onFinish(reason);
45134
- return iterator2.return();
45130
+ let len = value.byteLength;
45131
+ if (onProgress) {
45132
+ let loadedBytes = bytes += len;
45133
+ onProgress(loadedBytes);
45134
+ }
45135
+ controller.enqueue(new Uint8Array(value));
45136
+ } catch (err) {
45137
+ _onFinish(err);
45138
+ throw err;
45135
45139
  }
45136
45140
  },
45137
- {
45138
- highWaterMark: 2
45141
+ cancel(reason) {
45142
+ _onFinish(reason);
45143
+ return iterator2.return();
45139
45144
  }
45140
- );
45145
+ }, {
45146
+ highWaterMark: 2
45147
+ });
45141
45148
  };
45142
45149
 
45143
45150
  // ../node_modules/axios/lib/adapters/fetch.js
@@ -45147,7 +45154,10 @@ var globalFetchAPI = (({ Request, Response }) => ({
45147
45154
  Request,
45148
45155
  Response
45149
45156
  }))(utils_default.global);
45150
- var { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = utils_default.global;
45157
+ var {
45158
+ ReadableStream: ReadableStream2,
45159
+ TextEncoder: TextEncoder2
45160
+ } = utils_default.global;
45151
45161
  var test = (fn, ...args) => {
45152
45162
  try {
45153
45163
  return !!fn(...args);
@@ -45156,13 +45166,9 @@ var test = (fn, ...args) => {
45156
45166
  }
45157
45167
  };
45158
45168
  var factory = (env) => {
45159
- env = utils_default.merge.call(
45160
- {
45161
- skipUndefined: true
45162
- },
45163
- globalFetchAPI,
45164
- env
45165
- );
45169
+ env = utils_default.merge.call({
45170
+ skipUndefined: true
45171
+ }, globalFetchAPI, env);
45166
45172
  const { fetch: envFetch, Request, Response } = env;
45167
45173
  const isFetchSupported = envFetch ? isFunction2(envFetch) : typeof fetch === "function";
45168
45174
  const isRequestSupported = isFunction2(Request);
@@ -45195,11 +45201,7 @@ var factory = (env) => {
45195
45201
  if (method) {
45196
45202
  return method.call(res);
45197
45203
  }
45198
- throw new AxiosError_default(
45199
- `Response type '${type}' is not supported`,
45200
- AxiosError_default.ERR_NOT_SUPPORT,
45201
- config2
45202
- );
45204
+ throw new AxiosError_default(`Response type '${type}' is not supported`, AxiosError_default.ERR_NOT_SUPPORT, config2);
45203
45205
  });
45204
45206
  });
45205
45207
  })();
@@ -45248,10 +45250,7 @@ var factory = (env) => {
45248
45250
  } = resolveConfig_default(config2);
45249
45251
  let _fetch = envFetch || fetch;
45250
45252
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
45251
- let composedSignal = composeSignals_default(
45252
- [signal, cancelToken && cancelToken.toAbortSignal()],
45253
- timeout
45254
- );
45253
+ let composedSignal = composeSignals_default([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
45255
45254
  let request = null;
45256
45255
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
45257
45256
  composedSignal.unsubscribe();
@@ -45311,10 +45310,7 @@ var factory = (env) => {
45311
45310
  );
45312
45311
  }
45313
45312
  responseType = responseType || "text";
45314
- let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](
45315
- response,
45316
- config2
45317
- );
45313
+ let responseData = await resolvers[utils_default.findKey(resolvers, responseType) || "text"](response, config2);
45318
45314
  !isStreamResponse && unsubscribe && unsubscribe();
45319
45315
  return await new Promise((resolve, reject) => {
45320
45316
  settle(resolve, reject, {
@@ -45330,13 +45326,7 @@ var factory = (env) => {
45330
45326
  unsubscribe && unsubscribe();
45331
45327
  if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
45332
45328
  throw Object.assign(
45333
- new AxiosError_default(
45334
- "Network Error",
45335
- AxiosError_default.ERR_NETWORK,
45336
- config2,
45337
- request,
45338
- err && err.response
45339
- ),
45329
+ new AxiosError_default("Network Error", AxiosError_default.ERR_NETWORK, config2, request, err && err.response),
45340
45330
  {
45341
45331
  cause: err.cause || err
45342
45332
  }
@@ -45350,7 +45340,11 @@ var seedCache = /* @__PURE__ */ new Map();
45350
45340
  var getFetch = (config2) => {
45351
45341
  let env = config2 && config2.env || {};
45352
45342
  const { fetch: fetch2, Request, Response } = env;
45353
- const seeds = [Request, Response, fetch2];
45343
+ const seeds = [
45344
+ Request,
45345
+ Response,
45346
+ fetch2
45347
+ ];
45354
45348
  let len = seeds.length, i = len, seed, target, map2 = seedCache;
45355
45349
  while (i--) {
45356
45350
  seed = seeds[i];
@@ -45439,33 +45433,37 @@ function throwIfCancellationRequested(config2) {
45439
45433
  function dispatchRequest(config2) {
45440
45434
  throwIfCancellationRequested(config2);
45441
45435
  config2.headers = AxiosHeaders_default.from(config2.headers);
45442
- config2.data = transformData.call(config2, config2.transformRequest);
45436
+ config2.data = transformData.call(
45437
+ config2,
45438
+ config2.transformRequest
45439
+ );
45443
45440
  if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
45444
45441
  config2.headers.setContentType("application/x-www-form-urlencoded", false);
45445
45442
  }
45446
45443
  const adapter2 = adapters_default.getAdapter(config2.adapter || defaults_default.adapter, config2);
45447
- return adapter2(config2).then(
45448
- function onAdapterResolution(response) {
45444
+ return adapter2(config2).then(function onAdapterResolution(response) {
45445
+ throwIfCancellationRequested(config2);
45446
+ response.data = transformData.call(
45447
+ config2,
45448
+ config2.transformResponse,
45449
+ response
45450
+ );
45451
+ response.headers = AxiosHeaders_default.from(response.headers);
45452
+ return response;
45453
+ }, function onAdapterRejection(reason) {
45454
+ if (!isCancel(reason)) {
45449
45455
  throwIfCancellationRequested(config2);
45450
- response.data = transformData.call(config2, config2.transformResponse, response);
45451
- response.headers = AxiosHeaders_default.from(response.headers);
45452
- return response;
45453
- },
45454
- function onAdapterRejection(reason) {
45455
- if (!isCancel(reason)) {
45456
- throwIfCancellationRequested(config2);
45457
- if (reason && reason.response) {
45458
- reason.response.data = transformData.call(
45459
- config2,
45460
- config2.transformResponse,
45461
- reason.response
45462
- );
45463
- reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
45464
- }
45456
+ if (reason && reason.response) {
45457
+ reason.response.data = transformData.call(
45458
+ config2,
45459
+ config2.transformResponse,
45460
+ reason.response
45461
+ );
45462
+ reason.response.headers = AxiosHeaders_default.from(reason.response.headers);
45465
45463
  }
45466
- return Promise.reject(reason);
45467
45464
  }
45468
- );
45465
+ return Promise.reject(reason);
45466
+ });
45469
45467
  }
45470
45468
 
45471
45469
  // ../node_modules/axios/lib/helpers/validator.js
@@ -45518,10 +45516,7 @@ function assertOptions(options, schema, allowUnknown) {
45518
45516
  const value = options[opt];
45519
45517
  const result = value === void 0 || validator(value, opt, options);
45520
45518
  if (result !== true) {
45521
- throw new AxiosError_default(
45522
- "option " + opt + " must be " + result,
45523
- AxiosError_default.ERR_BAD_OPTION_VALUE
45524
- );
45519
+ throw new AxiosError_default("option " + opt + " must be " + result, AxiosError_default.ERR_BAD_OPTION_VALUE);
45525
45520
  }
45526
45521
  continue;
45527
45522
  }
@@ -45583,16 +45578,12 @@ var Axios = class {
45583
45578
  config2 = mergeConfig(this.defaults, config2);
45584
45579
  const { transitional: transitional2, paramsSerializer, headers } = config2;
45585
45580
  if (transitional2 !== void 0) {
45586
- validator_default.assertOptions(
45587
- transitional2,
45588
- {
45589
- silentJSONParsing: validators2.transitional(validators2.boolean),
45590
- forcedJSONParsing: validators2.transitional(validators2.boolean),
45591
- clarifyTimeoutError: validators2.transitional(validators2.boolean),
45592
- legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
45593
- },
45594
- false
45595
- );
45581
+ validator_default.assertOptions(transitional2, {
45582
+ silentJSONParsing: validators2.transitional(validators2.boolean),
45583
+ forcedJSONParsing: validators2.transitional(validators2.boolean),
45584
+ clarifyTimeoutError: validators2.transitional(validators2.boolean),
45585
+ legacyInterceptorReqResOrdering: validators2.transitional(validators2.boolean)
45586
+ }, false);
45596
45587
  }
45597
45588
  if (paramsSerializer != null) {
45598
45589
  if (utils_default.isFunction(paramsSerializer)) {
@@ -45600,14 +45591,10 @@ var Axios = class {
45600
45591
  serialize: paramsSerializer
45601
45592
  };
45602
45593
  } else {
45603
- validator_default.assertOptions(
45604
- paramsSerializer,
45605
- {
45606
- encode: validators2.function,
45607
- serialize: validators2.function
45608
- },
45609
- true
45610
- );
45594
+ validator_default.assertOptions(paramsSerializer, {
45595
+ encode: validators2.function,
45596
+ serialize: validators2.function
45597
+ }, true);
45611
45598
  }
45612
45599
  }
45613
45600
  if (config2.allowAbsoluteUrls !== void 0) {
@@ -45616,19 +45603,21 @@ var Axios = class {
45616
45603
  } else {
45617
45604
  config2.allowAbsoluteUrls = true;
45618
45605
  }
45619
- validator_default.assertOptions(
45620
- config2,
45621
- {
45622
- baseUrl: validators2.spelling("baseURL"),
45623
- withXsrfToken: validators2.spelling("withXSRFToken")
45624
- },
45625
- true
45626
- );
45606
+ validator_default.assertOptions(config2, {
45607
+ baseUrl: validators2.spelling("baseURL"),
45608
+ withXsrfToken: validators2.spelling("withXSRFToken")
45609
+ }, true);
45627
45610
  config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
45628
- let contextHeaders = headers && utils_default.merge(headers.common, headers[config2.method]);
45629
- headers && utils_default.forEach(["delete", "get", "head", "post", "put", "patch", "common"], (method) => {
45630
- delete headers[method];
45631
- });
45611
+ let contextHeaders = headers && utils_default.merge(
45612
+ headers.common,
45613
+ headers[config2.method]
45614
+ );
45615
+ headers && utils_default.forEach(
45616
+ ["delete", "get", "head", "post", "put", "patch", "common"],
45617
+ (method) => {
45618
+ delete headers[method];
45619
+ }
45620
+ );
45632
45621
  config2.headers = AxiosHeaders_default.concat(contextHeaders, headers);
45633
45622
  const requestInterceptorChain = [];
45634
45623
  let synchronousRequestInterceptors = true;
@@ -45695,28 +45684,24 @@ var Axios = class {
45695
45684
  };
45696
45685
  utils_default.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
45697
45686
  Axios.prototype[method] = function(url3, config2) {
45698
- return this.request(
45699
- mergeConfig(config2 || {}, {
45700
- method,
45701
- url: url3,
45702
- data: (config2 || {}).data
45703
- })
45704
- );
45687
+ return this.request(mergeConfig(config2 || {}, {
45688
+ method,
45689
+ url: url3,
45690
+ data: (config2 || {}).data
45691
+ }));
45705
45692
  };
45706
45693
  });
45707
45694
  utils_default.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
45708
45695
  function generateHTTPMethod(isForm) {
45709
45696
  return function httpMethod(url3, data, config2) {
45710
- return this.request(
45711
- mergeConfig(config2 || {}, {
45712
- method,
45713
- headers: isForm ? {
45714
- "Content-Type": "multipart/form-data"
45715
- } : {},
45716
- url: url3,
45717
- data
45718
- })
45719
- );
45697
+ return this.request(mergeConfig(config2 || {}, {
45698
+ method,
45699
+ headers: isForm ? {
45700
+ "Content-Type": "multipart/form-data"
45701
+ } : {},
45702
+ url: url3,
45703
+ data
45704
+ }));
45720
45705
  };
45721
45706
  }
45722
45707
  Axios.prototype[method] = generateHTTPMethod();