@bigbinary/neeto-audit-frontend 2.1.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2017 -957
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import stream, { Readable } from 'stream';
16
16
  import require$$3$1 from 'http';
17
17
  import require$$4$1 from 'https';
18
18
  import require$$0$5 from 'url';
19
- import crypto from 'crypto';
19
+ import require$$8 from 'crypto';
20
20
  import zlib from 'zlib';
21
21
 
22
22
  const ANSI_BACKGROUND_OFFSET = 10;
@@ -644,8 +644,6 @@ Object.defineProperties(createChalk.prototype, styles);
644
644
  const chalk = createChalk();
645
645
  createChalk({level: stderrColor ? stderrColor.level : 0});
646
646
 
647
- var chalk$1 = chalk;
648
-
649
647
  function _isPlaceholder(a) {
650
648
  return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;
651
649
  }
@@ -894,8 +892,6 @@ _curry2(function curryN(length, fn) {
894
892
  return _arity(length, _curryN(length, [], fn));
895
893
  });
896
894
 
897
- var curryN$1 = curryN;
898
-
899
895
  /**
900
896
  * Optimized internal three-arity curry function.
901
897
  *
@@ -1193,7 +1189,7 @@ _curry1(function keys(obj) {
1193
1189
  * R.type(undefined); //=> "Undefined"
1194
1190
  */
1195
1191
 
1196
- var type =
1192
+ var type$1 =
1197
1193
  /*#__PURE__*/
1198
1194
  _curry1(function type(val) {
1199
1195
  return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);
@@ -1230,9 +1226,9 @@ function _equals(a, b, stackA, stackB) {
1230
1226
  return true;
1231
1227
  }
1232
1228
 
1233
- var typeA = type(a);
1229
+ var typeA = type$1(a);
1234
1230
 
1235
- if (typeA !== type(b)) {
1231
+ if (typeA !== type$1(b)) {
1236
1232
  return false;
1237
1233
  }
1238
1234
 
@@ -1627,8 +1623,6 @@ _curry2(function reject(pred, filterable) {
1627
1623
  return filter(_complement(pred), filterable);
1628
1624
  });
1629
1625
 
1630
- var reject$1 = reject;
1631
-
1632
1626
  function _toString(x, seen) {
1633
1627
  var recur = function recur(y) {
1634
1628
  var xs = seen.concat([x]);
@@ -1647,7 +1641,7 @@ function _toString(x, seen) {
1647
1641
  return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';
1648
1642
 
1649
1643
  case '[object Array]':
1650
- return '[' + _map(recur, x).concat(mapPairs(x, reject$1(function (k) {
1644
+ return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {
1651
1645
  return /^\d+$/.test(k);
1652
1646
  }, keys(x)))).join(', ') + ']';
1653
1647
 
@@ -1755,8 +1749,6 @@ var _xmap = function _xmap(f) {
1755
1749
  };
1756
1750
  };
1757
1751
 
1758
- var _xmap$1 = _xmap;
1759
-
1760
1752
  /**
1761
1753
  * Takes a function and
1762
1754
  * a [functor](https://github.com/fantasyland/fantasy-land#functor),
@@ -1797,10 +1789,10 @@ var map =
1797
1789
  /*#__PURE__*/
1798
1790
  _curry2(
1799
1791
  /*#__PURE__*/
1800
- _dispatchable(['fantasy-land/map', 'map'], _xmap$1, function map(fn, functor) {
1792
+ _dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {
1801
1793
  switch (Object.prototype.toString.call(functor)) {
1802
1794
  case '[object Function]':
1803
- return curryN$1(functor.length, function () {
1795
+ return curryN(functor.length, function () {
1804
1796
  return fn.call(this, functor.apply(this, arguments));
1805
1797
  });
1806
1798
 
@@ -1989,8 +1981,6 @@ _curry2(function ap(applyF, applyX) {
1989
1981
  }, [], applyF);
1990
1982
  });
1991
1983
 
1992
- var ap$1 = ap;
1993
-
1994
1984
  /**
1995
1985
  * Checks if the input value is `null` or `undefined`.
1996
1986
  *
@@ -2041,9 +2031,9 @@ function _isFunction(x) {
2041
2031
  var liftN =
2042
2032
  /*#__PURE__*/
2043
2033
  _curry2(function liftN(arity, fn) {
2044
- var lifted = curryN$1(arity, fn);
2045
- return curryN$1(arity, function () {
2046
- return _arrayReduce(ap$1, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));
2034
+ var lifted = curryN(arity, fn);
2035
+ return curryN(arity, function () {
2036
+ return _arrayReduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1));
2047
2037
  });
2048
2038
  });
2049
2039
 
@@ -2102,8 +2092,6 @@ _curry1(function not(a) {
2102
2092
  return !a;
2103
2093
  });
2104
2094
 
2105
- var not$1 = not;
2106
-
2107
2095
  /**
2108
2096
  * Takes a function `f` and returns a function `g` such that if called with the same arguments
2109
2097
  * when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`.
@@ -2129,7 +2117,7 @@ var not$1 = not;
2129
2117
 
2130
2118
  var complement =
2131
2119
  /*#__PURE__*/
2132
- lift(not$1);
2120
+ lift(not);
2133
2121
 
2134
2122
  function _identity(x) {
2135
2123
  return x;
@@ -2159,8 +2147,6 @@ var identity =
2159
2147
  /*#__PURE__*/
2160
2148
  _curry1(_identity);
2161
2149
 
2162
- var identity$1 = identity;
2163
-
2164
2150
  /**
2165
2151
  * Returns a curried equivalent of the provided function. The curried function
2166
2152
  * has two unusual capabilities. First, its arguments needn't be provided one
@@ -2212,7 +2198,7 @@ var identity$1 = identity;
2212
2198
  var curry =
2213
2199
  /*#__PURE__*/
2214
2200
  _curry1(function curry(fn) {
2215
- return curryN$1(fn.length, fn);
2201
+ return curryN(fn.length, fn);
2216
2202
  });
2217
2203
 
2218
2204
  /**
@@ -2428,7 +2414,7 @@ _curry2(function objOf(key, val) {
2428
2414
  var invoker =
2429
2415
  /*#__PURE__*/
2430
2416
  _curry2(function invoker(arity, method) {
2431
- return curryN$1(arity + 1, function () {
2417
+ return curryN(arity + 1, function () {
2432
2418
  var target = arguments[arity];
2433
2419
 
2434
2420
  if (target != null && _isFunction(target[method])) {
@@ -2499,8 +2485,6 @@ _curry1(function isEmpty(x) {
2499
2485
  return x != null && equals(x, empty(x));
2500
2486
  });
2501
2487
 
2502
- var isEmpty$1 = isEmpty;
2503
-
2504
2488
  /**
2505
2489
  * An Object-specific version of [`map`](#map). The function is applied to three
2506
2490
  * arguments: *(value, key, obj)*. If only the value is significant, use
@@ -2835,10 +2819,7 @@ function _iterableToArrayLimit(r, l) {
2835
2819
  f = !0,
2836
2820
  o = !1;
2837
2821
  try {
2838
- if (i = (t = t.call(r)).next, 0 === l) {
2839
- if (Object(t) !== t) return;
2840
- f = !1;
2841
- } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
2822
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
2842
2823
  } catch (r) {
2843
2824
  o = !0, n = r;
2844
2825
  } finally {
@@ -2895,11 +2876,11 @@ function _toPrimitive(input, hint) {
2895
2876
  if (_typeof(input) !== "object" || input === null) return input;
2896
2877
  var prim = input[Symbol.toPrimitive];
2897
2878
  if (prim !== undefined) {
2898
- var res = prim.call(input, hint || "default");
2879
+ var res = prim.call(input, hint);
2899
2880
  if (_typeof(res) !== "object") return res;
2900
2881
  throw new TypeError("@@toPrimitive must return a primitive value.");
2901
2882
  }
2902
- return (hint === "string" ? String : Number)(input);
2883
+ return (String )(input);
2903
2884
  }
2904
2885
 
2905
2886
  function _toPropertyKey(arg) {
@@ -2918,7 +2899,6 @@ function _defineProperties(target, props) {
2918
2899
  }
2919
2900
  function _createClass(Constructor, protoProps, staticProps) {
2920
2901
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2921
- if (staticProps) _defineProperties(Constructor, staticProps);
2922
2902
  Object.defineProperty(Constructor, "prototype", {
2923
2903
  writable: false
2924
2904
  });
@@ -3621,14 +3601,14 @@ immer.finishDraft.bind(immer);
3621
3601
  var nullSafe = function nullSafe(func) {
3622
3602
  return (
3623
3603
  // @ts-ignore
3624
- curryN$1(func.length, function () {
3604
+ curryN(func.length, function () {
3625
3605
  var _ref;
3626
3606
  var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
3627
3607
  return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
3628
3608
  })
3629
3609
  );
3630
3610
  };
3631
- var isNotEmpty = /*#__PURE__*/complement(isEmpty$1);
3611
+ var isNotEmpty = /*#__PURE__*/complement(isEmpty);
3632
3612
 
3633
3613
  var matchesImpl = function matchesImpl(pattern, object) {
3634
3614
  var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
@@ -9117,17 +9097,17 @@ function isUnicodeSupported$1() {
9117
9097
  }
9118
9098
 
9119
9099
  const main = {
9120
- info: chalk$1.blue('ℹ'),
9121
- success: chalk$1.green('✔'),
9122
- warning: chalk$1.yellow('⚠'),
9123
- error: chalk$1.red('✖'),
9100
+ info: chalk.blue('ℹ'),
9101
+ success: chalk.green('✔'),
9102
+ warning: chalk.yellow('⚠'),
9103
+ error: chalk.red('✖'),
9124
9104
  };
9125
9105
 
9126
9106
  const fallback = {
9127
- info: chalk$1.blue('i'),
9128
- success: chalk$1.green('√'),
9129
- warning: chalk$1.yellow('‼'),
9130
- error: chalk$1.red('×'),
9107
+ info: chalk.blue('i'),
9108
+ success: chalk.green('√'),
9109
+ warning: chalk.yellow('‼'),
9110
+ error: chalk.red('×'),
9131
9111
  };
9132
9112
 
9133
9113
  const logSymbols = isUnicodeSupported$1() ? main : fallback;
@@ -9883,7 +9863,7 @@ class Ora {
9883
9863
  let frame = frames[this.#frameIndex];
9884
9864
 
9885
9865
  if (this.color) {
9886
- frame = chalk$1[this.color](frame);
9866
+ frame = chalk[this.color](frame);
9887
9867
  }
9888
9868
 
9889
9869
  this.#frameIndex = ++this.#frameIndex % frames.length;
@@ -10039,183 +10019,7 @@ var src$1 = {};
10039
10019
 
10040
10020
  var src = {exports: {}};
10041
10021
 
10042
- var node = {exports: {}};
10043
-
10044
- var hasFlag;
10045
- var hasRequiredHasFlag;
10046
-
10047
- function requireHasFlag () {
10048
- if (hasRequiredHasFlag) return hasFlag;
10049
- hasRequiredHasFlag = 1;
10050
-
10051
- hasFlag = (flag, argv = process.argv) => {
10052
- const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
10053
- const position = argv.indexOf(prefix + flag);
10054
- const terminatorPosition = argv.indexOf('--');
10055
- return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
10056
- };
10057
- return hasFlag;
10058
- }
10059
-
10060
- var supportsColor_1;
10061
- var hasRequiredSupportsColor;
10062
-
10063
- function requireSupportsColor () {
10064
- if (hasRequiredSupportsColor) return supportsColor_1;
10065
- hasRequiredSupportsColor = 1;
10066
- const os = require$$0$4;
10067
- const tty = require$$1$1;
10068
- const hasFlag = requireHasFlag();
10069
-
10070
- const {env} = process;
10071
-
10072
- let flagForceColor;
10073
- if (hasFlag('no-color') ||
10074
- hasFlag('no-colors') ||
10075
- hasFlag('color=false') ||
10076
- hasFlag('color=never')) {
10077
- flagForceColor = 0;
10078
- } else if (hasFlag('color') ||
10079
- hasFlag('colors') ||
10080
- hasFlag('color=true') ||
10081
- hasFlag('color=always')) {
10082
- flagForceColor = 1;
10083
- }
10084
-
10085
- function envForceColor() {
10086
- if ('FORCE_COLOR' in env) {
10087
- if (env.FORCE_COLOR === 'true') {
10088
- return 1;
10089
- }
10090
-
10091
- if (env.FORCE_COLOR === 'false') {
10092
- return 0;
10093
- }
10094
-
10095
- return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
10096
- }
10097
- }
10098
-
10099
- function translateLevel(level) {
10100
- if (level === 0) {
10101
- return false;
10102
- }
10103
-
10104
- return {
10105
- level,
10106
- hasBasic: true,
10107
- has256: level >= 2,
10108
- has16m: level >= 3
10109
- };
10110
- }
10111
-
10112
- function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
10113
- const noFlagForceColor = envForceColor();
10114
- if (noFlagForceColor !== undefined) {
10115
- flagForceColor = noFlagForceColor;
10116
- }
10117
-
10118
- const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
10119
-
10120
- if (forceColor === 0) {
10121
- return 0;
10122
- }
10123
-
10124
- if (sniffFlags) {
10125
- if (hasFlag('color=16m') ||
10126
- hasFlag('color=full') ||
10127
- hasFlag('color=truecolor')) {
10128
- return 3;
10129
- }
10130
-
10131
- if (hasFlag('color=256')) {
10132
- return 2;
10133
- }
10134
- }
10135
-
10136
- if (haveStream && !streamIsTTY && forceColor === undefined) {
10137
- return 0;
10138
- }
10139
-
10140
- const min = forceColor || 0;
10141
-
10142
- if (env.TERM === 'dumb') {
10143
- return min;
10144
- }
10145
-
10146
- if (process.platform === 'win32') {
10147
- // Windows 10 build 10586 is the first Windows release that supports 256 colors.
10148
- // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
10149
- const osRelease = os.release().split('.');
10150
- if (
10151
- Number(osRelease[0]) >= 10 &&
10152
- Number(osRelease[2]) >= 10586
10153
- ) {
10154
- return Number(osRelease[2]) >= 14931 ? 3 : 2;
10155
- }
10156
-
10157
- return 1;
10158
- }
10159
-
10160
- if ('CI' in env) {
10161
- if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
10162
- return 1;
10163
- }
10164
-
10165
- return min;
10166
- }
10167
-
10168
- if ('TEAMCITY_VERSION' in env) {
10169
- return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
10170
- }
10171
-
10172
- if (env.COLORTERM === 'truecolor') {
10173
- return 3;
10174
- }
10175
-
10176
- if ('TERM_PROGRAM' in env) {
10177
- const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
10178
-
10179
- switch (env.TERM_PROGRAM) {
10180
- case 'iTerm.app':
10181
- return version >= 3 ? 3 : 2;
10182
- case 'Apple_Terminal':
10183
- return 2;
10184
- // No default
10185
- }
10186
- }
10187
-
10188
- if (/-256(color)?$/i.test(env.TERM)) {
10189
- return 2;
10190
- }
10191
-
10192
- if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
10193
- return 1;
10194
- }
10195
-
10196
- if ('COLORTERM' in env) {
10197
- return 1;
10198
- }
10199
-
10200
- return min;
10201
- }
10202
-
10203
- function getSupportLevel(stream, options = {}) {
10204
- const level = supportsColor(stream, {
10205
- streamIsTTY: stream && stream.isTTY,
10206
- ...options
10207
- });
10208
-
10209
- return translateLevel(level);
10210
- }
10211
-
10212
- supportsColor_1 = {
10213
- supportsColor: getSupportLevel,
10214
- stdout: getSupportLevel({isTTY: tty.isatty(1)}),
10215
- stderr: getSupportLevel({isTTY: tty.isatty(2)})
10216
- };
10217
- return supportsColor_1;
10218
- }
10022
+ var browser = {exports: {}};
10219
10023
 
10220
10024
  /**
10221
10025
  * Helpers.
@@ -10670,6 +10474,463 @@ function requireCommon () {
10670
10474
  return common$1;
10671
10475
  }
10672
10476
 
10477
+ /* eslint-env browser */
10478
+
10479
+ var hasRequiredBrowser;
10480
+
10481
+ function requireBrowser () {
10482
+ if (hasRequiredBrowser) return browser.exports;
10483
+ hasRequiredBrowser = 1;
10484
+ (function (module, exports) {
10485
+ /**
10486
+ * This is the web browser implementation of `debug()`.
10487
+ */
10488
+
10489
+ exports.formatArgs = formatArgs;
10490
+ exports.save = save;
10491
+ exports.load = load;
10492
+ exports.useColors = useColors;
10493
+ exports.storage = localstorage();
10494
+ exports.destroy = (() => {
10495
+ let warned = false;
10496
+
10497
+ return () => {
10498
+ if (!warned) {
10499
+ warned = true;
10500
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
10501
+ }
10502
+ };
10503
+ })();
10504
+
10505
+ /**
10506
+ * Colors.
10507
+ */
10508
+
10509
+ exports.colors = [
10510
+ '#0000CC',
10511
+ '#0000FF',
10512
+ '#0033CC',
10513
+ '#0033FF',
10514
+ '#0066CC',
10515
+ '#0066FF',
10516
+ '#0099CC',
10517
+ '#0099FF',
10518
+ '#00CC00',
10519
+ '#00CC33',
10520
+ '#00CC66',
10521
+ '#00CC99',
10522
+ '#00CCCC',
10523
+ '#00CCFF',
10524
+ '#3300CC',
10525
+ '#3300FF',
10526
+ '#3333CC',
10527
+ '#3333FF',
10528
+ '#3366CC',
10529
+ '#3366FF',
10530
+ '#3399CC',
10531
+ '#3399FF',
10532
+ '#33CC00',
10533
+ '#33CC33',
10534
+ '#33CC66',
10535
+ '#33CC99',
10536
+ '#33CCCC',
10537
+ '#33CCFF',
10538
+ '#6600CC',
10539
+ '#6600FF',
10540
+ '#6633CC',
10541
+ '#6633FF',
10542
+ '#66CC00',
10543
+ '#66CC33',
10544
+ '#9900CC',
10545
+ '#9900FF',
10546
+ '#9933CC',
10547
+ '#9933FF',
10548
+ '#99CC00',
10549
+ '#99CC33',
10550
+ '#CC0000',
10551
+ '#CC0033',
10552
+ '#CC0066',
10553
+ '#CC0099',
10554
+ '#CC00CC',
10555
+ '#CC00FF',
10556
+ '#CC3300',
10557
+ '#CC3333',
10558
+ '#CC3366',
10559
+ '#CC3399',
10560
+ '#CC33CC',
10561
+ '#CC33FF',
10562
+ '#CC6600',
10563
+ '#CC6633',
10564
+ '#CC9900',
10565
+ '#CC9933',
10566
+ '#CCCC00',
10567
+ '#CCCC33',
10568
+ '#FF0000',
10569
+ '#FF0033',
10570
+ '#FF0066',
10571
+ '#FF0099',
10572
+ '#FF00CC',
10573
+ '#FF00FF',
10574
+ '#FF3300',
10575
+ '#FF3333',
10576
+ '#FF3366',
10577
+ '#FF3399',
10578
+ '#FF33CC',
10579
+ '#FF33FF',
10580
+ '#FF6600',
10581
+ '#FF6633',
10582
+ '#FF9900',
10583
+ '#FF9933',
10584
+ '#FFCC00',
10585
+ '#FFCC33'
10586
+ ];
10587
+
10588
+ /**
10589
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
10590
+ * and the Firebug extension (any Firefox version) are known
10591
+ * to support "%c" CSS customizations.
10592
+ *
10593
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
10594
+ */
10595
+
10596
+ // eslint-disable-next-line complexity
10597
+ function useColors() {
10598
+ // NB: In an Electron preload script, document will be defined but not fully
10599
+ // initialized. Since we know we're in Chrome, we'll just detect this case
10600
+ // explicitly
10601
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
10602
+ return true;
10603
+ }
10604
+
10605
+ // Internet Explorer and Edge do not support colors.
10606
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
10607
+ return false;
10608
+ }
10609
+
10610
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
10611
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
10612
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
10613
+ // Is firebug? http://stackoverflow.com/a/398120/376773
10614
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
10615
+ // Is firefox >= v31?
10616
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
10617
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
10618
+ // Double check webkit in userAgent just in case we are in a worker
10619
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
10620
+ }
10621
+
10622
+ /**
10623
+ * Colorize log arguments if enabled.
10624
+ *
10625
+ * @api public
10626
+ */
10627
+
10628
+ function formatArgs(args) {
10629
+ args[0] = (this.useColors ? '%c' : '') +
10630
+ this.namespace +
10631
+ (this.useColors ? ' %c' : ' ') +
10632
+ args[0] +
10633
+ (this.useColors ? '%c ' : ' ') +
10634
+ '+' + module.exports.humanize(this.diff);
10635
+
10636
+ if (!this.useColors) {
10637
+ return;
10638
+ }
10639
+
10640
+ const c = 'color: ' + this.color;
10641
+ args.splice(1, 0, c, 'color: inherit');
10642
+
10643
+ // The final "%c" is somewhat tricky, because there could be other
10644
+ // arguments passed either before or after the %c, so we need to
10645
+ // figure out the correct index to insert the CSS into
10646
+ let index = 0;
10647
+ let lastC = 0;
10648
+ args[0].replace(/%[a-zA-Z%]/g, match => {
10649
+ if (match === '%%') {
10650
+ return;
10651
+ }
10652
+ index++;
10653
+ if (match === '%c') {
10654
+ // We only are interested in the *last* %c
10655
+ // (the user may have provided their own)
10656
+ lastC = index;
10657
+ }
10658
+ });
10659
+
10660
+ args.splice(lastC, 0, c);
10661
+ }
10662
+
10663
+ /**
10664
+ * Invokes `console.debug()` when available.
10665
+ * No-op when `console.debug` is not a "function".
10666
+ * If `console.debug` is not available, falls back
10667
+ * to `console.log`.
10668
+ *
10669
+ * @api public
10670
+ */
10671
+ exports.log = console.debug || console.log || (() => {});
10672
+
10673
+ /**
10674
+ * Save `namespaces`.
10675
+ *
10676
+ * @param {String} namespaces
10677
+ * @api private
10678
+ */
10679
+ function save(namespaces) {
10680
+ try {
10681
+ if (namespaces) {
10682
+ exports.storage.setItem('debug', namespaces);
10683
+ } else {
10684
+ exports.storage.removeItem('debug');
10685
+ }
10686
+ } catch (error) {
10687
+ // Swallow
10688
+ // XXX (@Qix-) should we be logging these?
10689
+ }
10690
+ }
10691
+
10692
+ /**
10693
+ * Load `namespaces`.
10694
+ *
10695
+ * @return {String} returns the previously persisted debug modes
10696
+ * @api private
10697
+ */
10698
+ function load() {
10699
+ let r;
10700
+ try {
10701
+ r = exports.storage.getItem('debug');
10702
+ } catch (error) {
10703
+ // Swallow
10704
+ // XXX (@Qix-) should we be logging these?
10705
+ }
10706
+
10707
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
10708
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
10709
+ r = process.env.DEBUG;
10710
+ }
10711
+
10712
+ return r;
10713
+ }
10714
+
10715
+ /**
10716
+ * Localstorage attempts to return the localstorage.
10717
+ *
10718
+ * This is necessary because safari throws
10719
+ * when a user disables cookies/localstorage
10720
+ * and you attempt to access it.
10721
+ *
10722
+ * @return {LocalStorage}
10723
+ * @api private
10724
+ */
10725
+
10726
+ function localstorage() {
10727
+ try {
10728
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
10729
+ // The Browser also has localStorage in the global context.
10730
+ return localStorage;
10731
+ } catch (error) {
10732
+ // Swallow
10733
+ // XXX (@Qix-) should we be logging these?
10734
+ }
10735
+ }
10736
+
10737
+ module.exports = requireCommon()(exports);
10738
+
10739
+ const {formatters} = module.exports;
10740
+
10741
+ /**
10742
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
10743
+ */
10744
+
10745
+ formatters.j = function (v) {
10746
+ try {
10747
+ return JSON.stringify(v);
10748
+ } catch (error) {
10749
+ return '[UnexpectedJSONParseError]: ' + error.message;
10750
+ }
10751
+ };
10752
+ } (browser, browser.exports));
10753
+ return browser.exports;
10754
+ }
10755
+
10756
+ var node = {exports: {}};
10757
+
10758
+ var hasFlag;
10759
+ var hasRequiredHasFlag;
10760
+
10761
+ function requireHasFlag () {
10762
+ if (hasRequiredHasFlag) return hasFlag;
10763
+ hasRequiredHasFlag = 1;
10764
+
10765
+ hasFlag = (flag, argv = process.argv) => {
10766
+ const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
10767
+ const position = argv.indexOf(prefix + flag);
10768
+ const terminatorPosition = argv.indexOf('--');
10769
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
10770
+ };
10771
+ return hasFlag;
10772
+ }
10773
+
10774
+ var supportsColor_1;
10775
+ var hasRequiredSupportsColor;
10776
+
10777
+ function requireSupportsColor () {
10778
+ if (hasRequiredSupportsColor) return supportsColor_1;
10779
+ hasRequiredSupportsColor = 1;
10780
+ const os = require$$0$4;
10781
+ const tty = require$$1$1;
10782
+ const hasFlag = requireHasFlag();
10783
+
10784
+ const {env} = process;
10785
+
10786
+ let flagForceColor;
10787
+ if (hasFlag('no-color') ||
10788
+ hasFlag('no-colors') ||
10789
+ hasFlag('color=false') ||
10790
+ hasFlag('color=never')) {
10791
+ flagForceColor = 0;
10792
+ } else if (hasFlag('color') ||
10793
+ hasFlag('colors') ||
10794
+ hasFlag('color=true') ||
10795
+ hasFlag('color=always')) {
10796
+ flagForceColor = 1;
10797
+ }
10798
+
10799
+ function envForceColor() {
10800
+ if ('FORCE_COLOR' in env) {
10801
+ if (env.FORCE_COLOR === 'true') {
10802
+ return 1;
10803
+ }
10804
+
10805
+ if (env.FORCE_COLOR === 'false') {
10806
+ return 0;
10807
+ }
10808
+
10809
+ return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
10810
+ }
10811
+ }
10812
+
10813
+ function translateLevel(level) {
10814
+ if (level === 0) {
10815
+ return false;
10816
+ }
10817
+
10818
+ return {
10819
+ level,
10820
+ hasBasic: true,
10821
+ has256: level >= 2,
10822
+ has16m: level >= 3
10823
+ };
10824
+ }
10825
+
10826
+ function supportsColor(haveStream, {streamIsTTY, sniffFlags = true} = {}) {
10827
+ const noFlagForceColor = envForceColor();
10828
+ if (noFlagForceColor !== undefined) {
10829
+ flagForceColor = noFlagForceColor;
10830
+ }
10831
+
10832
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
10833
+
10834
+ if (forceColor === 0) {
10835
+ return 0;
10836
+ }
10837
+
10838
+ if (sniffFlags) {
10839
+ if (hasFlag('color=16m') ||
10840
+ hasFlag('color=full') ||
10841
+ hasFlag('color=truecolor')) {
10842
+ return 3;
10843
+ }
10844
+
10845
+ if (hasFlag('color=256')) {
10846
+ return 2;
10847
+ }
10848
+ }
10849
+
10850
+ if (haveStream && !streamIsTTY && forceColor === undefined) {
10851
+ return 0;
10852
+ }
10853
+
10854
+ const min = forceColor || 0;
10855
+
10856
+ if (env.TERM === 'dumb') {
10857
+ return min;
10858
+ }
10859
+
10860
+ if (process.platform === 'win32') {
10861
+ // Windows 10 build 10586 is the first Windows release that supports 256 colors.
10862
+ // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
10863
+ const osRelease = os.release().split('.');
10864
+ if (
10865
+ Number(osRelease[0]) >= 10 &&
10866
+ Number(osRelease[2]) >= 10586
10867
+ ) {
10868
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
10869
+ }
10870
+
10871
+ return 1;
10872
+ }
10873
+
10874
+ if ('CI' in env) {
10875
+ if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI', 'GITHUB_ACTIONS', 'BUILDKITE', 'DRONE'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
10876
+ return 1;
10877
+ }
10878
+
10879
+ return min;
10880
+ }
10881
+
10882
+ if ('TEAMCITY_VERSION' in env) {
10883
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
10884
+ }
10885
+
10886
+ if (env.COLORTERM === 'truecolor') {
10887
+ return 3;
10888
+ }
10889
+
10890
+ if ('TERM_PROGRAM' in env) {
10891
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
10892
+
10893
+ switch (env.TERM_PROGRAM) {
10894
+ case 'iTerm.app':
10895
+ return version >= 3 ? 3 : 2;
10896
+ case 'Apple_Terminal':
10897
+ return 2;
10898
+ // No default
10899
+ }
10900
+ }
10901
+
10902
+ if (/-256(color)?$/i.test(env.TERM)) {
10903
+ return 2;
10904
+ }
10905
+
10906
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
10907
+ return 1;
10908
+ }
10909
+
10910
+ if ('COLORTERM' in env) {
10911
+ return 1;
10912
+ }
10913
+
10914
+ return min;
10915
+ }
10916
+
10917
+ function getSupportLevel(stream, options = {}) {
10918
+ const level = supportsColor(stream, {
10919
+ streamIsTTY: stream && stream.isTTY,
10920
+ ...options
10921
+ });
10922
+
10923
+ return translateLevel(level);
10924
+ }
10925
+
10926
+ supportsColor_1 = {
10927
+ supportsColor: getSupportLevel,
10928
+ stdout: getSupportLevel({isTTY: tty.isatty(1)}),
10929
+ stderr: getSupportLevel({isTTY: tty.isatty(2)})
10930
+ };
10931
+ return supportsColor_1;
10932
+ }
10933
+
10673
10934
  /**
10674
10935
  * Module dependencies.
10675
10936
  */
@@ -10943,287 +11204,6 @@ function requireNode () {
10943
11204
  return node.exports;
10944
11205
  }
10945
11206
 
10946
- var browser = {exports: {}};
10947
-
10948
- /* eslint-env browser */
10949
-
10950
- var hasRequiredBrowser;
10951
-
10952
- function requireBrowser () {
10953
- if (hasRequiredBrowser) return browser.exports;
10954
- hasRequiredBrowser = 1;
10955
- (function (module, exports) {
10956
- /**
10957
- * This is the web browser implementation of `debug()`.
10958
- */
10959
-
10960
- exports.formatArgs = formatArgs;
10961
- exports.save = save;
10962
- exports.load = load;
10963
- exports.useColors = useColors;
10964
- exports.storage = localstorage();
10965
- exports.destroy = (() => {
10966
- let warned = false;
10967
-
10968
- return () => {
10969
- if (!warned) {
10970
- warned = true;
10971
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
10972
- }
10973
- };
10974
- })();
10975
-
10976
- /**
10977
- * Colors.
10978
- */
10979
-
10980
- exports.colors = [
10981
- '#0000CC',
10982
- '#0000FF',
10983
- '#0033CC',
10984
- '#0033FF',
10985
- '#0066CC',
10986
- '#0066FF',
10987
- '#0099CC',
10988
- '#0099FF',
10989
- '#00CC00',
10990
- '#00CC33',
10991
- '#00CC66',
10992
- '#00CC99',
10993
- '#00CCCC',
10994
- '#00CCFF',
10995
- '#3300CC',
10996
- '#3300FF',
10997
- '#3333CC',
10998
- '#3333FF',
10999
- '#3366CC',
11000
- '#3366FF',
11001
- '#3399CC',
11002
- '#3399FF',
11003
- '#33CC00',
11004
- '#33CC33',
11005
- '#33CC66',
11006
- '#33CC99',
11007
- '#33CCCC',
11008
- '#33CCFF',
11009
- '#6600CC',
11010
- '#6600FF',
11011
- '#6633CC',
11012
- '#6633FF',
11013
- '#66CC00',
11014
- '#66CC33',
11015
- '#9900CC',
11016
- '#9900FF',
11017
- '#9933CC',
11018
- '#9933FF',
11019
- '#99CC00',
11020
- '#99CC33',
11021
- '#CC0000',
11022
- '#CC0033',
11023
- '#CC0066',
11024
- '#CC0099',
11025
- '#CC00CC',
11026
- '#CC00FF',
11027
- '#CC3300',
11028
- '#CC3333',
11029
- '#CC3366',
11030
- '#CC3399',
11031
- '#CC33CC',
11032
- '#CC33FF',
11033
- '#CC6600',
11034
- '#CC6633',
11035
- '#CC9900',
11036
- '#CC9933',
11037
- '#CCCC00',
11038
- '#CCCC33',
11039
- '#FF0000',
11040
- '#FF0033',
11041
- '#FF0066',
11042
- '#FF0099',
11043
- '#FF00CC',
11044
- '#FF00FF',
11045
- '#FF3300',
11046
- '#FF3333',
11047
- '#FF3366',
11048
- '#FF3399',
11049
- '#FF33CC',
11050
- '#FF33FF',
11051
- '#FF6600',
11052
- '#FF6633',
11053
- '#FF9900',
11054
- '#FF9933',
11055
- '#FFCC00',
11056
- '#FFCC33'
11057
- ];
11058
-
11059
- /**
11060
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
11061
- * and the Firebug extension (any Firefox version) are known
11062
- * to support "%c" CSS customizations.
11063
- *
11064
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
11065
- */
11066
-
11067
- // eslint-disable-next-line complexity
11068
- function useColors() {
11069
- // NB: In an Electron preload script, document will be defined but not fully
11070
- // initialized. Since we know we're in Chrome, we'll just detect this case
11071
- // explicitly
11072
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
11073
- return true;
11074
- }
11075
-
11076
- // Internet Explorer and Edge do not support colors.
11077
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
11078
- return false;
11079
- }
11080
-
11081
- // Is webkit? http://stackoverflow.com/a/16459606/376773
11082
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
11083
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
11084
- // Is firebug? http://stackoverflow.com/a/398120/376773
11085
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
11086
- // Is firefox >= v31?
11087
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
11088
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
11089
- // Double check webkit in userAgent just in case we are in a worker
11090
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
11091
- }
11092
-
11093
- /**
11094
- * Colorize log arguments if enabled.
11095
- *
11096
- * @api public
11097
- */
11098
-
11099
- function formatArgs(args) {
11100
- args[0] = (this.useColors ? '%c' : '') +
11101
- this.namespace +
11102
- (this.useColors ? ' %c' : ' ') +
11103
- args[0] +
11104
- (this.useColors ? '%c ' : ' ') +
11105
- '+' + module.exports.humanize(this.diff);
11106
-
11107
- if (!this.useColors) {
11108
- return;
11109
- }
11110
-
11111
- const c = 'color: ' + this.color;
11112
- args.splice(1, 0, c, 'color: inherit');
11113
-
11114
- // The final "%c" is somewhat tricky, because there could be other
11115
- // arguments passed either before or after the %c, so we need to
11116
- // figure out the correct index to insert the CSS into
11117
- let index = 0;
11118
- let lastC = 0;
11119
- args[0].replace(/%[a-zA-Z%]/g, match => {
11120
- if (match === '%%') {
11121
- return;
11122
- }
11123
- index++;
11124
- if (match === '%c') {
11125
- // We only are interested in the *last* %c
11126
- // (the user may have provided their own)
11127
- lastC = index;
11128
- }
11129
- });
11130
-
11131
- args.splice(lastC, 0, c);
11132
- }
11133
-
11134
- /**
11135
- * Invokes `console.debug()` when available.
11136
- * No-op when `console.debug` is not a "function".
11137
- * If `console.debug` is not available, falls back
11138
- * to `console.log`.
11139
- *
11140
- * @api public
11141
- */
11142
- exports.log = console.debug || console.log || (() => {});
11143
-
11144
- /**
11145
- * Save `namespaces`.
11146
- *
11147
- * @param {String} namespaces
11148
- * @api private
11149
- */
11150
- function save(namespaces) {
11151
- try {
11152
- if (namespaces) {
11153
- exports.storage.setItem('debug', namespaces);
11154
- } else {
11155
- exports.storage.removeItem('debug');
11156
- }
11157
- } catch (error) {
11158
- // Swallow
11159
- // XXX (@Qix-) should we be logging these?
11160
- }
11161
- }
11162
-
11163
- /**
11164
- * Load `namespaces`.
11165
- *
11166
- * @return {String} returns the previously persisted debug modes
11167
- * @api private
11168
- */
11169
- function load() {
11170
- let r;
11171
- try {
11172
- r = exports.storage.getItem('debug');
11173
- } catch (error) {
11174
- // Swallow
11175
- // XXX (@Qix-) should we be logging these?
11176
- }
11177
-
11178
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
11179
- if (!r && typeof process !== 'undefined' && 'env' in process) {
11180
- r = process.env.DEBUG;
11181
- }
11182
-
11183
- return r;
11184
- }
11185
-
11186
- /**
11187
- * Localstorage attempts to return the localstorage.
11188
- *
11189
- * This is necessary because safari throws
11190
- * when a user disables cookies/localstorage
11191
- * and you attempt to access it.
11192
- *
11193
- * @return {LocalStorage}
11194
- * @api private
11195
- */
11196
-
11197
- function localstorage() {
11198
- try {
11199
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
11200
- // The Browser also has localStorage in the global context.
11201
- return localStorage;
11202
- } catch (error) {
11203
- // Swallow
11204
- // XXX (@Qix-) should we be logging these?
11205
- }
11206
- }
11207
-
11208
- module.exports = requireCommon()(exports);
11209
-
11210
- const {formatters} = module.exports;
11211
-
11212
- /**
11213
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
11214
- */
11215
-
11216
- formatters.j = function (v) {
11217
- try {
11218
- return JSON.stringify(v);
11219
- } catch (error) {
11220
- return '[UnexpectedJSONParseError]: ' + error.message;
11221
- }
11222
- };
11223
- } (browser, browser.exports));
11224
- return browser.exports;
11225
- }
11226
-
11227
11207
  /**
11228
11208
  * Detect Electron renderer / nwjs process, which is node, but we should
11229
11209
  * treat as a browser.
@@ -11399,7 +11379,7 @@ var __export = (target, all) => {
11399
11379
  var __reExport = (target, module, copyDefault, desc) => {
11400
11380
  if (module && typeof module === "object" || typeof module === "function") {
11401
11381
  for (let key of __getOwnPropNames(module))
11402
- if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
11382
+ if (!__hasOwnProp.call(target, key) && (copyDefault))
11403
11383
  __defProp(target, key, { get: () => module[key], enumerable: !(desc = __getOwnPropDesc(module, key)) || desc.enumerable });
11404
11384
  }
11405
11385
  return target;
@@ -15437,19 +15417,17 @@ const REMOTE_URL_PREFIXES = [
15437
15417
  const run$1 = require$$1$2.promisify(exec);
15438
15418
 
15439
15419
  const execute = async (command, debug) => {
15440
- const { stdout, stderr } = await run$1(command);
15441
- debug && console.log("stdout:", stdout);
15442
- debug && console.log("stderr:", stderr);
15420
+ await run$1(command);
15443
15421
  };
15444
15422
 
15445
15423
  const renderErrors = (errors = [], isAutoFixFlagPresent = false) => {
15446
- console.log(`\n${chalk$1.bgRed.black("ERRORS")}`);
15447
- console.log(chalk$1.red(` \u2022 ${errors.join("\n \u2022 ")}`));
15424
+ console.log(`\n${chalk.bgRed.black("ERRORS")}`);
15425
+ console.log(chalk.red(` \u2022 ${errors.join("\n \u2022 ")}`));
15448
15426
  if (!isAutoFixFlagPresent) {
15449
15427
  console.log(
15450
- chalk$1.yellowBright(
15428
+ chalk.yellowBright(
15451
15429
  "\nPlease run the following command to auto-fix the errors: "
15452
- ) + chalk$1.bgYellowBright.black(" yarn neeto-audit-frontend -a ")
15430
+ ) + chalk.bgYellowBright.black(" yarn neeto-audit-frontend -a ")
15453
15431
  );
15454
15432
  process.exitCode = 1;
15455
15433
  }
@@ -15488,7 +15466,7 @@ const runAutoFix = async ({ verifiers, autoFix, debug }) => {
15488
15466
 
15489
15467
  const allResults = await Promise.all(results);
15490
15468
 
15491
- return allResults.every(identity$1);
15469
+ return allResults.every(identity);
15492
15470
  };
15493
15471
 
15494
15472
  const getCliOptions = () => {
@@ -15583,7 +15561,7 @@ const identicalDirectoryFiles = async ({
15583
15561
 
15584
15562
  const results = await Promise.all(identicalFiles);
15585
15563
 
15586
- return results.every(identity$1);
15564
+ return results.every(identity);
15587
15565
  }
15588
15566
  });
15589
15567
 
@@ -15643,8 +15621,8 @@ const runVerifiers = async ({ verifiers, autoFix, debug }) => {
15643
15621
 
15644
15622
  results.map(({ name, isSuccess, status }) => {
15645
15623
  const resultText = isSuccess
15646
- ? chalk$1.bgGreen.black(status)
15647
- : chalk$1.bgRed.black(status);
15624
+ ? chalk.bgGreen.black(status)
15625
+ : chalk.bgRed.black(status);
15648
15626
  console.log(resultText, name);
15649
15627
  });
15650
15628
 
@@ -15654,11 +15632,11 @@ const runVerifiers = async ({ verifiers, autoFix, debug }) => {
15654
15632
  console.log("\nRunning auto-fix:");
15655
15633
  const result = await runAutoFix({ verifiers, autoFix, debug });
15656
15634
  if (result) {
15657
- console.log("\n" + chalk$1.green("All issues have been fixed!"));
15635
+ console.log("\n" + chalk.green("All issues have been fixed!"));
15658
15636
  } else {
15659
15637
  console.log(
15660
15638
  "\n" +
15661
- chalk$1.red(
15639
+ chalk.red(
15662
15640
  "We were not able to fix all issues. Please fix the issues manually."
15663
15641
  )
15664
15642
  );
@@ -15776,7 +15754,7 @@ const eslint = async (debug) => {
15776
15754
 
15777
15755
  const eslintFiles = await Promise.all(eslintDirectory);
15778
15756
 
15779
- const isSuccess = eslintFiles.every(identity$1);
15757
+ const isSuccess = eslintFiles.every(identity);
15780
15758
 
15781
15759
  if (!isSuccess) {
15782
15760
  return {
@@ -15845,7 +15823,7 @@ const husky = async (debug) => {
15845
15823
  ...huskyNanoDirectory,
15846
15824
  ]);
15847
15825
 
15848
- const isSuccess = huskyFiles.every(identity$1);
15826
+ const isSuccess = huskyFiles.every(identity);
15849
15827
 
15850
15828
  if (!isSuccess) {
15851
15829
  return {
@@ -15895,7 +15873,7 @@ const prettier = async (debug) => {
15895
15873
 
15896
15874
  const prettierFiles = await Promise.all(prettierDirectory);
15897
15875
 
15898
- const isSuccess = prettierFiles.every(identity$1);
15876
+ const isSuccess = prettierFiles.every(identity);
15899
15877
 
15900
15878
  if (!isSuccess) {
15901
15879
  return {
@@ -16198,7 +16176,7 @@ var widget = {
16198
16176
 
16199
16177
  var recommendedDependencies = { common, extension, frontend, nano, widget };
16200
16178
 
16201
- function bind(fn, thisArg) {
16179
+ function bind$2(fn, thisArg) {
16202
16180
  return function wrap() {
16203
16181
  return fn.apply(thisArg, arguments);
16204
16182
  };
@@ -16208,6 +16186,7 @@ function bind(fn, thisArg) {
16208
16186
 
16209
16187
  const {toString} = Object.prototype;
16210
16188
  const {getPrototypeOf} = Object;
16189
+ const {iterator, toStringTag: toStringTag$1} = Symbol;
16211
16190
 
16212
16191
  const kindOf = (cache => thing => {
16213
16192
  const str = toString.call(thing);
@@ -16248,7 +16227,7 @@ const isUndefined = typeOfTest('undefined');
16248
16227
  */
16249
16228
  function isBuffer$1(val) {
16250
16229
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
16251
- && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
16230
+ && isFunction$2(val.constructor.isBuffer) && val.constructor.isBuffer(val);
16252
16231
  }
16253
16232
 
16254
16233
  /**
@@ -16293,7 +16272,7 @@ const isString$1 = typeOfTest('string');
16293
16272
  * @param {*} val The value to test
16294
16273
  * @returns {boolean} True if value is a Function, otherwise false
16295
16274
  */
16296
- const isFunction$1 = typeOfTest('function');
16275
+ const isFunction$2 = typeOfTest('function');
16297
16276
 
16298
16277
  /**
16299
16278
  * Determine if a value is a Number
@@ -16334,7 +16313,28 @@ const isPlainObject = (val) => {
16334
16313
  }
16335
16314
 
16336
16315
  const prototype = getPrototypeOf(val);
16337
- return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
16316
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag$1 in val) && !(iterator in val);
16317
+ };
16318
+
16319
+ /**
16320
+ * Determine if a value is an empty object (safely handles Buffers)
16321
+ *
16322
+ * @param {*} val The value to test
16323
+ *
16324
+ * @returns {boolean} True if value is an empty object, otherwise false
16325
+ */
16326
+ const isEmptyObject = (val) => {
16327
+ // Early return for non-objects or Buffers to prevent RangeError
16328
+ if (!isObject(val) || isBuffer$1(val)) {
16329
+ return false;
16330
+ }
16331
+
16332
+ try {
16333
+ return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
16334
+ } catch (e) {
16335
+ // Fallback for any other objects that might cause RangeError with Object.keys()
16336
+ return false;
16337
+ }
16338
16338
  };
16339
16339
 
16340
16340
  /**
@@ -16380,7 +16380,7 @@ const isFileList = kindOfTest('FileList');
16380
16380
  *
16381
16381
  * @returns {boolean} True if value is a Stream, otherwise false
16382
16382
  */
16383
- const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
16383
+ const isStream = (val) => isObject(val) && isFunction$2(val.pipe);
16384
16384
 
16385
16385
  /**
16386
16386
  * Determine if a value is a FormData
@@ -16393,10 +16393,10 @@ const isFormData = (thing) => {
16393
16393
  let kind;
16394
16394
  return thing && (
16395
16395
  (typeof FormData === 'function' && thing instanceof FormData) || (
16396
- isFunction$1(thing.append) && (
16396
+ isFunction$2(thing.append) && (
16397
16397
  (kind = kindOf(thing)) === 'formdata' ||
16398
16398
  // detect form-data instance
16399
- (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
16399
+ (kind === 'object' && isFunction$2(thing.toString) && thing.toString() === '[object FormData]')
16400
16400
  )
16401
16401
  )
16402
16402
  )
@@ -16459,6 +16459,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
16459
16459
  fn.call(null, obj[i], i, obj);
16460
16460
  }
16461
16461
  } else {
16462
+ // Buffer check
16463
+ if (isBuffer$1(obj)) {
16464
+ return;
16465
+ }
16466
+
16462
16467
  // Iterate over object keys
16463
16468
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
16464
16469
  const len = keys.length;
@@ -16472,6 +16477,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
16472
16477
  }
16473
16478
 
16474
16479
  function findKey(obj, key) {
16480
+ if (isBuffer$1(obj)){
16481
+ return null;
16482
+ }
16483
+
16475
16484
  key = key.toLowerCase();
16476
16485
  const keys = Object.keys(obj);
16477
16486
  let i = keys.length;
@@ -16512,7 +16521,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
16512
16521
  * @returns {Object} Result of all merge properties
16513
16522
  */
16514
16523
  function merge(/* obj1, obj2, obj3, ... */) {
16515
- const {caseless} = isContextDefined(this) && this || {};
16524
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
16516
16525
  const result = {};
16517
16526
  const assignValue = (val, key) => {
16518
16527
  const targetKey = caseless && findKey(result, key) || key;
@@ -16523,7 +16532,9 @@ function merge(/* obj1, obj2, obj3, ... */) {
16523
16532
  } else if (isArray(val)) {
16524
16533
  result[targetKey] = val.slice();
16525
16534
  } else {
16526
- result[targetKey] = val;
16535
+ if (!skipUndefined || !isUndefined(val)) {
16536
+ result[targetKey] = val;
16537
+ }
16527
16538
  }
16528
16539
  };
16529
16540
 
@@ -16545,8 +16556,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
16545
16556
  */
16546
16557
  const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
16547
16558
  forEach(b, (val, key) => {
16548
- if (thisArg && isFunction$1(val)) {
16549
- a[key] = bind(val, thisArg);
16559
+ if (thisArg && isFunction$2(val)) {
16560
+ a[key] = bind$2(val, thisArg);
16550
16561
  } else {
16551
16562
  a[key] = val;
16552
16563
  }
@@ -16685,13 +16696,13 @@ const isTypedArray = (TypedArray => {
16685
16696
  * @returns {void}
16686
16697
  */
16687
16698
  const forEachEntry = (obj, fn) => {
16688
- const generator = obj && obj[Symbol.iterator];
16699
+ const generator = obj && obj[iterator];
16689
16700
 
16690
- const iterator = generator.call(obj);
16701
+ const _iterator = generator.call(obj);
16691
16702
 
16692
16703
  let result;
16693
16704
 
16694
- while ((result = iterator.next()) && !result.done) {
16705
+ while ((result = _iterator.next()) && !result.done) {
16695
16706
  const pair = result.value;
16696
16707
  fn.call(obj, pair[0], pair[1]);
16697
16708
  }
@@ -16761,13 +16772,13 @@ const reduceDescriptors = (obj, reducer) => {
16761
16772
  const freezeMethods = (obj) => {
16762
16773
  reduceDescriptors(obj, (descriptor, name) => {
16763
16774
  // skip restricted props in strict mode
16764
- if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
16775
+ if (isFunction$2(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
16765
16776
  return false;
16766
16777
  }
16767
16778
 
16768
16779
  const value = obj[name];
16769
16780
 
16770
- if (!isFunction$1(value)) return;
16781
+ if (!isFunction$2(value)) return;
16771
16782
 
16772
16783
  descriptor.enumerable = false;
16773
16784
 
@@ -16804,6 +16815,8 @@ const toFiniteNumber = (value, defaultValue) => {
16804
16815
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
16805
16816
  };
16806
16817
 
16818
+
16819
+
16807
16820
  /**
16808
16821
  * If the thing is a FormData object, return true, otherwise return false.
16809
16822
  *
@@ -16812,7 +16825,7 @@ const toFiniteNumber = (value, defaultValue) => {
16812
16825
  * @returns {boolean}
16813
16826
  */
16814
16827
  function isSpecCompliantForm(thing) {
16815
- return !!(thing && isFunction$1(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
16828
+ return !!(thing && isFunction$2(thing.append) && thing[toStringTag$1] === 'FormData' && thing[iterator]);
16816
16829
  }
16817
16830
 
16818
16831
  const toJSONObject = (obj) => {
@@ -16825,6 +16838,11 @@ const toJSONObject = (obj) => {
16825
16838
  return;
16826
16839
  }
16827
16840
 
16841
+ //Buffer check
16842
+ if (isBuffer$1(source)) {
16843
+ return source;
16844
+ }
16845
+
16828
16846
  if(!('toJSON' in source)) {
16829
16847
  stack[i] = source;
16830
16848
  const target = isArray(source) ? [] : {};
@@ -16849,7 +16867,7 @@ const toJSONObject = (obj) => {
16849
16867
  const isAsyncFn = kindOfTest('AsyncFunction');
16850
16868
 
16851
16869
  const isThenable = (thing) =>
16852
- thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
16870
+ thing && (isObject(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
16853
16871
 
16854
16872
  // original code
16855
16873
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -16873,7 +16891,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
16873
16891
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
16874
16892
  })(
16875
16893
  typeof setImmediate === 'function',
16876
- isFunction$1(_global.postMessage)
16894
+ isFunction$2(_global.postMessage)
16877
16895
  );
16878
16896
 
16879
16897
  const asap = typeof queueMicrotask !== 'undefined' ?
@@ -16881,6 +16899,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
16881
16899
 
16882
16900
  // *********************
16883
16901
 
16902
+
16903
+ const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
16904
+
16905
+
16884
16906
  var utils$1 = {
16885
16907
  isArray,
16886
16908
  isArrayBuffer,
@@ -16892,6 +16914,7 @@ var utils$1 = {
16892
16914
  isBoolean,
16893
16915
  isObject,
16894
16916
  isPlainObject,
16917
+ isEmptyObject,
16895
16918
  isReadableStream,
16896
16919
  isRequest,
16897
16920
  isResponse,
@@ -16901,7 +16924,7 @@ var utils$1 = {
16901
16924
  isFile,
16902
16925
  isBlob,
16903
16926
  isRegExp,
16904
- isFunction: isFunction$1,
16927
+ isFunction: isFunction$2,
16905
16928
  isStream,
16906
16929
  isURLSearchParams,
16907
16930
  isTypedArray,
@@ -16936,7 +16959,8 @@ var utils$1 = {
16936
16959
  isAsyncFn,
16937
16960
  isThenable,
16938
16961
  setImmediate: _setImmediate,
16939
- asap
16962
+ asap,
16963
+ isIterable
16940
16964
  };
16941
16965
 
16942
16966
  /**
@@ -17026,11 +17050,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
17026
17050
  return prop !== 'isAxiosError';
17027
17051
  });
17028
17052
 
17029
- AxiosError.call(axiosError, error.message, code, config, request, response);
17053
+ const msg = error && error.message ? error.message : 'Error';
17030
17054
 
17031
- axiosError.cause = error;
17055
+ // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
17056
+ const errCode = code == null && error ? error.code : code;
17057
+ AxiosError.call(axiosError, msg, errCode, config, request, response);
17058
+
17059
+ // Chain the original error on the standard field; non-enumerable to avoid JSON noise
17060
+ if (error && axiosError.cause == null) {
17061
+ Object.defineProperty(axiosError, 'cause', { value: error, configurable: true });
17062
+ }
17032
17063
 
17033
- axiosError.name = error.name;
17064
+ axiosError.name = (error && error.name) || 'Error';
17034
17065
 
17035
17066
  customProps && Object.assign(axiosError, customProps);
17036
17067
 
@@ -28647,12 +28678,878 @@ var asynckit$1 =
28647
28678
  serialOrdered : serialOrderedExports
28648
28679
  };
28649
28680
 
28650
- // populates missing values
28651
- var populate$1 = function(dst, src) {
28681
+ /** @type {import('.')} */
28682
+ var esObjectAtoms = Object;
28652
28683
 
28653
- Object.keys(src).forEach(function(prop)
28654
- {
28655
- dst[prop] = dst[prop] || src[prop];
28684
+ /** @type {import('.')} */
28685
+ var esErrors = Error;
28686
+
28687
+ /** @type {import('./eval')} */
28688
+ var _eval = EvalError;
28689
+
28690
+ /** @type {import('./range')} */
28691
+ var range = RangeError;
28692
+
28693
+ /** @type {import('./ref')} */
28694
+ var ref = ReferenceError;
28695
+
28696
+ /** @type {import('./syntax')} */
28697
+ var syntax = SyntaxError;
28698
+
28699
+ var type;
28700
+ var hasRequiredType;
28701
+
28702
+ function requireType () {
28703
+ if (hasRequiredType) return type;
28704
+ hasRequiredType = 1;
28705
+
28706
+ /** @type {import('./type')} */
28707
+ type = TypeError;
28708
+ return type;
28709
+ }
28710
+
28711
+ /** @type {import('./uri')} */
28712
+ var uri = URIError;
28713
+
28714
+ /** @type {import('./abs')} */
28715
+ var abs$1 = Math.abs;
28716
+
28717
+ /** @type {import('./floor')} */
28718
+ var floor$1 = Math.floor;
28719
+
28720
+ /** @type {import('./max')} */
28721
+ var max$2 = Math.max;
28722
+
28723
+ /** @type {import('./min')} */
28724
+ var min$1 = Math.min;
28725
+
28726
+ /** @type {import('./pow')} */
28727
+ var pow$1 = Math.pow;
28728
+
28729
+ /** @type {import('./round')} */
28730
+ var round$1 = Math.round;
28731
+
28732
+ /** @type {import('./isNaN')} */
28733
+ var _isNaN = Number.isNaN || function isNaN(a) {
28734
+ return a !== a;
28735
+ };
28736
+
28737
+ var $isNaN = _isNaN;
28738
+
28739
+ /** @type {import('./sign')} */
28740
+ var sign$1 = function sign(number) {
28741
+ if ($isNaN(number) || number === 0) {
28742
+ return number;
28743
+ }
28744
+ return number < 0 ? -1 : +1;
28745
+ };
28746
+
28747
+ /** @type {import('./gOPD')} */
28748
+ var gOPD = Object.getOwnPropertyDescriptor;
28749
+
28750
+ /** @type {import('.')} */
28751
+ var $gOPD$1 = gOPD;
28752
+
28753
+ if ($gOPD$1) {
28754
+ try {
28755
+ $gOPD$1([], 'length');
28756
+ } catch (e) {
28757
+ // IE 8 has a broken gOPD
28758
+ $gOPD$1 = null;
28759
+ }
28760
+ }
28761
+
28762
+ var gopd = $gOPD$1;
28763
+
28764
+ /** @type {import('.')} */
28765
+ var $defineProperty$2 = Object.defineProperty || false;
28766
+ if ($defineProperty$2) {
28767
+ try {
28768
+ $defineProperty$2({}, 'a', { value: 1 });
28769
+ } catch (e) {
28770
+ // IE 8 has a broken defineProperty
28771
+ $defineProperty$2 = false;
28772
+ }
28773
+ }
28774
+
28775
+ var esDefineProperty = $defineProperty$2;
28776
+
28777
+ var shams$1;
28778
+ var hasRequiredShams$1;
28779
+
28780
+ function requireShams$1 () {
28781
+ if (hasRequiredShams$1) return shams$1;
28782
+ hasRequiredShams$1 = 1;
28783
+
28784
+ /** @type {import('./shams')} */
28785
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
28786
+ shams$1 = function hasSymbols() {
28787
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
28788
+ if (typeof Symbol.iterator === 'symbol') { return true; }
28789
+
28790
+ /** @type {{ [k in symbol]?: unknown }} */
28791
+ var obj = {};
28792
+ var sym = Symbol('test');
28793
+ var symObj = Object(sym);
28794
+ if (typeof sym === 'string') { return false; }
28795
+
28796
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
28797
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
28798
+
28799
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
28800
+ // if (sym instanceof Symbol) { return false; }
28801
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
28802
+ // if (!(symObj instanceof Symbol)) { return false; }
28803
+
28804
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
28805
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
28806
+
28807
+ var symVal = 42;
28808
+ obj[sym] = symVal;
28809
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
28810
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
28811
+
28812
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
28813
+
28814
+ var syms = Object.getOwnPropertySymbols(obj);
28815
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
28816
+
28817
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
28818
+
28819
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
28820
+ // eslint-disable-next-line no-extra-parens
28821
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
28822
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
28823
+ }
28824
+
28825
+ return true;
28826
+ };
28827
+ return shams$1;
28828
+ }
28829
+
28830
+ var hasSymbols$1;
28831
+ var hasRequiredHasSymbols;
28832
+
28833
+ function requireHasSymbols () {
28834
+ if (hasRequiredHasSymbols) return hasSymbols$1;
28835
+ hasRequiredHasSymbols = 1;
28836
+
28837
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
28838
+ var hasSymbolSham = requireShams$1();
28839
+
28840
+ /** @type {import('.')} */
28841
+ hasSymbols$1 = function hasNativeSymbols() {
28842
+ if (typeof origSymbol !== 'function') { return false; }
28843
+ if (typeof Symbol !== 'function') { return false; }
28844
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
28845
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
28846
+
28847
+ return hasSymbolSham();
28848
+ };
28849
+ return hasSymbols$1;
28850
+ }
28851
+
28852
+ var Reflect_getPrototypeOf;
28853
+ var hasRequiredReflect_getPrototypeOf;
28854
+
28855
+ function requireReflect_getPrototypeOf () {
28856
+ if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
28857
+ hasRequiredReflect_getPrototypeOf = 1;
28858
+
28859
+ /** @type {import('./Reflect.getPrototypeOf')} */
28860
+ Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
28861
+ return Reflect_getPrototypeOf;
28862
+ }
28863
+
28864
+ var Object_getPrototypeOf;
28865
+ var hasRequiredObject_getPrototypeOf;
28866
+
28867
+ function requireObject_getPrototypeOf () {
28868
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
28869
+ hasRequiredObject_getPrototypeOf = 1;
28870
+
28871
+ var $Object = esObjectAtoms;
28872
+
28873
+ /** @type {import('./Object.getPrototypeOf')} */
28874
+ Object_getPrototypeOf = $Object.getPrototypeOf || null;
28875
+ return Object_getPrototypeOf;
28876
+ }
28877
+
28878
+ /* eslint no-invalid-this: 1 */
28879
+
28880
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
28881
+ var toStr = Object.prototype.toString;
28882
+ var max$1 = Math.max;
28883
+ var funcType = '[object Function]';
28884
+
28885
+ var concatty = function concatty(a, b) {
28886
+ var arr = [];
28887
+
28888
+ for (var i = 0; i < a.length; i += 1) {
28889
+ arr[i] = a[i];
28890
+ }
28891
+ for (var j = 0; j < b.length; j += 1) {
28892
+ arr[j + a.length] = b[j];
28893
+ }
28894
+
28895
+ return arr;
28896
+ };
28897
+
28898
+ var slicy = function slicy(arrLike, offset) {
28899
+ var arr = [];
28900
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
28901
+ arr[j] = arrLike[i];
28902
+ }
28903
+ return arr;
28904
+ };
28905
+
28906
+ var joiny = function (arr, joiner) {
28907
+ var str = '';
28908
+ for (var i = 0; i < arr.length; i += 1) {
28909
+ str += arr[i];
28910
+ if (i + 1 < arr.length) {
28911
+ str += joiner;
28912
+ }
28913
+ }
28914
+ return str;
28915
+ };
28916
+
28917
+ var implementation$1 = function bind(that) {
28918
+ var target = this;
28919
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
28920
+ throw new TypeError(ERROR_MESSAGE + target);
28921
+ }
28922
+ var args = slicy(arguments, 1);
28923
+
28924
+ var bound;
28925
+ var binder = function () {
28926
+ if (this instanceof bound) {
28927
+ var result = target.apply(
28928
+ this,
28929
+ concatty(args, arguments)
28930
+ );
28931
+ if (Object(result) === result) {
28932
+ return result;
28933
+ }
28934
+ return this;
28935
+ }
28936
+ return target.apply(
28937
+ that,
28938
+ concatty(args, arguments)
28939
+ );
28940
+
28941
+ };
28942
+
28943
+ var boundLength = max$1(0, target.length - args.length);
28944
+ var boundArgs = [];
28945
+ for (var i = 0; i < boundLength; i++) {
28946
+ boundArgs[i] = '$' + i;
28947
+ }
28948
+
28949
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
28950
+
28951
+ if (target.prototype) {
28952
+ var Empty = function Empty() {};
28953
+ Empty.prototype = target.prototype;
28954
+ bound.prototype = new Empty();
28955
+ Empty.prototype = null;
28956
+ }
28957
+
28958
+ return bound;
28959
+ };
28960
+
28961
+ var implementation = implementation$1;
28962
+
28963
+ var functionBind = Function.prototype.bind || implementation;
28964
+
28965
+ var functionCall;
28966
+ var hasRequiredFunctionCall;
28967
+
28968
+ function requireFunctionCall () {
28969
+ if (hasRequiredFunctionCall) return functionCall;
28970
+ hasRequiredFunctionCall = 1;
28971
+
28972
+ /** @type {import('./functionCall')} */
28973
+ functionCall = Function.prototype.call;
28974
+ return functionCall;
28975
+ }
28976
+
28977
+ var functionApply;
28978
+ var hasRequiredFunctionApply;
28979
+
28980
+ function requireFunctionApply () {
28981
+ if (hasRequiredFunctionApply) return functionApply;
28982
+ hasRequiredFunctionApply = 1;
28983
+
28984
+ /** @type {import('./functionApply')} */
28985
+ functionApply = Function.prototype.apply;
28986
+ return functionApply;
28987
+ }
28988
+
28989
+ var reflectApply;
28990
+ var hasRequiredReflectApply;
28991
+
28992
+ function requireReflectApply () {
28993
+ if (hasRequiredReflectApply) return reflectApply;
28994
+ hasRequiredReflectApply = 1;
28995
+
28996
+ /** @type {import('./reflectApply')} */
28997
+ reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
28998
+ return reflectApply;
28999
+ }
29000
+
29001
+ var actualApply;
29002
+ var hasRequiredActualApply;
29003
+
29004
+ function requireActualApply () {
29005
+ if (hasRequiredActualApply) return actualApply;
29006
+ hasRequiredActualApply = 1;
29007
+
29008
+ var bind = functionBind;
29009
+
29010
+ var $apply = requireFunctionApply();
29011
+ var $call = requireFunctionCall();
29012
+ var $reflectApply = requireReflectApply();
29013
+
29014
+ /** @type {import('./actualApply')} */
29015
+ actualApply = $reflectApply || bind.call($call, $apply);
29016
+ return actualApply;
29017
+ }
29018
+
29019
+ var callBindApplyHelpers;
29020
+ var hasRequiredCallBindApplyHelpers;
29021
+
29022
+ function requireCallBindApplyHelpers () {
29023
+ if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
29024
+ hasRequiredCallBindApplyHelpers = 1;
29025
+
29026
+ var bind = functionBind;
29027
+ var $TypeError = requireType();
29028
+
29029
+ var $call = requireFunctionCall();
29030
+ var $actualApply = requireActualApply();
29031
+
29032
+ /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
29033
+ callBindApplyHelpers = function callBindBasic(args) {
29034
+ if (args.length < 1 || typeof args[0] !== 'function') {
29035
+ throw new $TypeError('a function is required');
29036
+ }
29037
+ return $actualApply(bind, $call, args);
29038
+ };
29039
+ return callBindApplyHelpers;
29040
+ }
29041
+
29042
+ var get;
29043
+ var hasRequiredGet;
29044
+
29045
+ function requireGet () {
29046
+ if (hasRequiredGet) return get;
29047
+ hasRequiredGet = 1;
29048
+
29049
+ var callBind = requireCallBindApplyHelpers();
29050
+ var gOPD = gopd;
29051
+
29052
+ var hasProtoAccessor;
29053
+ try {
29054
+ // eslint-disable-next-line no-extra-parens, no-proto
29055
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
29056
+ } catch (e) {
29057
+ if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
29058
+ throw e;
29059
+ }
29060
+ }
29061
+
29062
+ // eslint-disable-next-line no-extra-parens
29063
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
29064
+
29065
+ var $Object = Object;
29066
+ var $getPrototypeOf = $Object.getPrototypeOf;
29067
+
29068
+ /** @type {import('./get')} */
29069
+ get = desc && typeof desc.get === 'function'
29070
+ ? callBind([desc.get])
29071
+ : typeof $getPrototypeOf === 'function'
29072
+ ? /** @type {import('./get')} */ function getDunder(value) {
29073
+ // eslint-disable-next-line eqeqeq
29074
+ return $getPrototypeOf(value == null ? value : $Object(value));
29075
+ }
29076
+ : false;
29077
+ return get;
29078
+ }
29079
+
29080
+ var getProto$1;
29081
+ var hasRequiredGetProto;
29082
+
29083
+ function requireGetProto () {
29084
+ if (hasRequiredGetProto) return getProto$1;
29085
+ hasRequiredGetProto = 1;
29086
+
29087
+ var reflectGetProto = requireReflect_getPrototypeOf();
29088
+ var originalGetProto = requireObject_getPrototypeOf();
29089
+
29090
+ var getDunderProto = requireGet();
29091
+
29092
+ /** @type {import('.')} */
29093
+ getProto$1 = reflectGetProto
29094
+ ? function getProto(O) {
29095
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
29096
+ return reflectGetProto(O);
29097
+ }
29098
+ : originalGetProto
29099
+ ? function getProto(O) {
29100
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
29101
+ throw new TypeError('getProto: not an object');
29102
+ }
29103
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
29104
+ return originalGetProto(O);
29105
+ }
29106
+ : getDunderProto
29107
+ ? function getProto(O) {
29108
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
29109
+ return getDunderProto(O);
29110
+ }
29111
+ : null;
29112
+ return getProto$1;
29113
+ }
29114
+
29115
+ var call = Function.prototype.call;
29116
+ var $hasOwn = Object.prototype.hasOwnProperty;
29117
+ var bind$1 = functionBind;
29118
+
29119
+ /** @type {import('.')} */
29120
+ var hasown = bind$1.call(call, $hasOwn);
29121
+
29122
+ var undefined$1;
29123
+
29124
+ var $Object = esObjectAtoms;
29125
+
29126
+ var $Error = esErrors;
29127
+ var $EvalError = _eval;
29128
+ var $RangeError = range;
29129
+ var $ReferenceError = ref;
29130
+ var $SyntaxError = syntax;
29131
+ var $TypeError$1 = requireType();
29132
+ var $URIError = uri;
29133
+
29134
+ var abs = abs$1;
29135
+ var floor = floor$1;
29136
+ var max = max$2;
29137
+ var min = min$1;
29138
+ var pow = pow$1;
29139
+ var round = round$1;
29140
+ var sign = sign$1;
29141
+
29142
+ var $Function = Function;
29143
+
29144
+ // eslint-disable-next-line consistent-return
29145
+ var getEvalledConstructor = function (expressionSyntax) {
29146
+ try {
29147
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
29148
+ } catch (e) {}
29149
+ };
29150
+
29151
+ var $gOPD = gopd;
29152
+ var $defineProperty$1 = esDefineProperty;
29153
+
29154
+ var throwTypeError = function () {
29155
+ throw new $TypeError$1();
29156
+ };
29157
+ var ThrowTypeError = $gOPD
29158
+ ? (function () {
29159
+ try {
29160
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
29161
+ arguments.callee; // IE 8 does not throw here
29162
+ return throwTypeError;
29163
+ } catch (calleeThrows) {
29164
+ try {
29165
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
29166
+ return $gOPD(arguments, 'callee').get;
29167
+ } catch (gOPDthrows) {
29168
+ return throwTypeError;
29169
+ }
29170
+ }
29171
+ }())
29172
+ : throwTypeError;
29173
+
29174
+ var hasSymbols = requireHasSymbols()();
29175
+
29176
+ var getProto = requireGetProto();
29177
+ var $ObjectGPO = requireObject_getPrototypeOf();
29178
+ var $ReflectGPO = requireReflect_getPrototypeOf();
29179
+
29180
+ var $apply = requireFunctionApply();
29181
+ var $call = requireFunctionCall();
29182
+
29183
+ var needsEval = {};
29184
+
29185
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
29186
+
29187
+ var INTRINSICS = {
29188
+ __proto__: null,
29189
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
29190
+ '%Array%': Array,
29191
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
29192
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
29193
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
29194
+ '%AsyncFunction%': needsEval,
29195
+ '%AsyncGenerator%': needsEval,
29196
+ '%AsyncGeneratorFunction%': needsEval,
29197
+ '%AsyncIteratorPrototype%': needsEval,
29198
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
29199
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
29200
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
29201
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
29202
+ '%Boolean%': Boolean,
29203
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
29204
+ '%Date%': Date,
29205
+ '%decodeURI%': decodeURI,
29206
+ '%decodeURIComponent%': decodeURIComponent,
29207
+ '%encodeURI%': encodeURI,
29208
+ '%encodeURIComponent%': encodeURIComponent,
29209
+ '%Error%': $Error,
29210
+ '%eval%': eval, // eslint-disable-line no-eval
29211
+ '%EvalError%': $EvalError,
29212
+ '%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
29213
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
29214
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
29215
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
29216
+ '%Function%': $Function,
29217
+ '%GeneratorFunction%': needsEval,
29218
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
29219
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
29220
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
29221
+ '%isFinite%': isFinite,
29222
+ '%isNaN%': isNaN,
29223
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
29224
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
29225
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
29226
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
29227
+ '%Math%': Math,
29228
+ '%Number%': Number,
29229
+ '%Object%': $Object,
29230
+ '%Object.getOwnPropertyDescriptor%': $gOPD,
29231
+ '%parseFloat%': parseFloat,
29232
+ '%parseInt%': parseInt,
29233
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
29234
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
29235
+ '%RangeError%': $RangeError,
29236
+ '%ReferenceError%': $ReferenceError,
29237
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
29238
+ '%RegExp%': RegExp,
29239
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
29240
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
29241
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
29242
+ '%String%': String,
29243
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
29244
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
29245
+ '%SyntaxError%': $SyntaxError,
29246
+ '%ThrowTypeError%': ThrowTypeError,
29247
+ '%TypedArray%': TypedArray,
29248
+ '%TypeError%': $TypeError$1,
29249
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
29250
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
29251
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
29252
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
29253
+ '%URIError%': $URIError,
29254
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
29255
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
29256
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
29257
+
29258
+ '%Function.prototype.call%': $call,
29259
+ '%Function.prototype.apply%': $apply,
29260
+ '%Object.defineProperty%': $defineProperty$1,
29261
+ '%Object.getPrototypeOf%': $ObjectGPO,
29262
+ '%Math.abs%': abs,
29263
+ '%Math.floor%': floor,
29264
+ '%Math.max%': max,
29265
+ '%Math.min%': min,
29266
+ '%Math.pow%': pow,
29267
+ '%Math.round%': round,
29268
+ '%Math.sign%': sign,
29269
+ '%Reflect.getPrototypeOf%': $ReflectGPO
29270
+ };
29271
+
29272
+ if (getProto) {
29273
+ try {
29274
+ null.error; // eslint-disable-line no-unused-expressions
29275
+ } catch (e) {
29276
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
29277
+ var errorProto = getProto(getProto(e));
29278
+ INTRINSICS['%Error.prototype%'] = errorProto;
29279
+ }
29280
+ }
29281
+
29282
+ var doEval = function doEval(name) {
29283
+ var value;
29284
+ if (name === '%AsyncFunction%') {
29285
+ value = getEvalledConstructor('async function () {}');
29286
+ } else if (name === '%GeneratorFunction%') {
29287
+ value = getEvalledConstructor('function* () {}');
29288
+ } else if (name === '%AsyncGeneratorFunction%') {
29289
+ value = getEvalledConstructor('async function* () {}');
29290
+ } else if (name === '%AsyncGenerator%') {
29291
+ var fn = doEval('%AsyncGeneratorFunction%');
29292
+ if (fn) {
29293
+ value = fn.prototype;
29294
+ }
29295
+ } else if (name === '%AsyncIteratorPrototype%') {
29296
+ var gen = doEval('%AsyncGenerator%');
29297
+ if (gen && getProto) {
29298
+ value = getProto(gen.prototype);
29299
+ }
29300
+ }
29301
+
29302
+ INTRINSICS[name] = value;
29303
+
29304
+ return value;
29305
+ };
29306
+
29307
+ var LEGACY_ALIASES = {
29308
+ __proto__: null,
29309
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
29310
+ '%ArrayPrototype%': ['Array', 'prototype'],
29311
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
29312
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
29313
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
29314
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
29315
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
29316
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
29317
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
29318
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
29319
+ '%DataViewPrototype%': ['DataView', 'prototype'],
29320
+ '%DatePrototype%': ['Date', 'prototype'],
29321
+ '%ErrorPrototype%': ['Error', 'prototype'],
29322
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
29323
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
29324
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
29325
+ '%FunctionPrototype%': ['Function', 'prototype'],
29326
+ '%Generator%': ['GeneratorFunction', 'prototype'],
29327
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
29328
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
29329
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
29330
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
29331
+ '%JSONParse%': ['JSON', 'parse'],
29332
+ '%JSONStringify%': ['JSON', 'stringify'],
29333
+ '%MapPrototype%': ['Map', 'prototype'],
29334
+ '%NumberPrototype%': ['Number', 'prototype'],
29335
+ '%ObjectPrototype%': ['Object', 'prototype'],
29336
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
29337
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
29338
+ '%PromisePrototype%': ['Promise', 'prototype'],
29339
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
29340
+ '%Promise_all%': ['Promise', 'all'],
29341
+ '%Promise_reject%': ['Promise', 'reject'],
29342
+ '%Promise_resolve%': ['Promise', 'resolve'],
29343
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
29344
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
29345
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
29346
+ '%SetPrototype%': ['Set', 'prototype'],
29347
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
29348
+ '%StringPrototype%': ['String', 'prototype'],
29349
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
29350
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
29351
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
29352
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
29353
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
29354
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
29355
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
29356
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
29357
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
29358
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
29359
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
29360
+ };
29361
+
29362
+ var bind = functionBind;
29363
+ var hasOwn$2 = hasown;
29364
+ var $concat = bind.call($call, Array.prototype.concat);
29365
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
29366
+ var $replace = bind.call($call, String.prototype.replace);
29367
+ var $strSlice = bind.call($call, String.prototype.slice);
29368
+ var $exec = bind.call($call, RegExp.prototype.exec);
29369
+
29370
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
29371
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
29372
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
29373
+ var stringToPath = function stringToPath(string) {
29374
+ var first = $strSlice(string, 0, 1);
29375
+ var last = $strSlice(string, -1);
29376
+ if (first === '%' && last !== '%') {
29377
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
29378
+ } else if (last === '%' && first !== '%') {
29379
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
29380
+ }
29381
+ var result = [];
29382
+ $replace(string, rePropName, function (match, number, quote, subString) {
29383
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
29384
+ });
29385
+ return result;
29386
+ };
29387
+ /* end adaptation */
29388
+
29389
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
29390
+ var intrinsicName = name;
29391
+ var alias;
29392
+ if (hasOwn$2(LEGACY_ALIASES, intrinsicName)) {
29393
+ alias = LEGACY_ALIASES[intrinsicName];
29394
+ intrinsicName = '%' + alias[0] + '%';
29395
+ }
29396
+
29397
+ if (hasOwn$2(INTRINSICS, intrinsicName)) {
29398
+ var value = INTRINSICS[intrinsicName];
29399
+ if (value === needsEval) {
29400
+ value = doEval(intrinsicName);
29401
+ }
29402
+ if (typeof value === 'undefined' && !allowMissing) {
29403
+ throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
29404
+ }
29405
+
29406
+ return {
29407
+ alias: alias,
29408
+ name: intrinsicName,
29409
+ value: value
29410
+ };
29411
+ }
29412
+
29413
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
29414
+ };
29415
+
29416
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
29417
+ if (typeof name !== 'string' || name.length === 0) {
29418
+ throw new $TypeError$1('intrinsic name must be a non-empty string');
29419
+ }
29420
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
29421
+ throw new $TypeError$1('"allowMissing" argument must be a boolean');
29422
+ }
29423
+
29424
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
29425
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
29426
+ }
29427
+ var parts = stringToPath(name);
29428
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
29429
+
29430
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
29431
+ var intrinsicRealName = intrinsic.name;
29432
+ var value = intrinsic.value;
29433
+ var skipFurtherCaching = false;
29434
+
29435
+ var alias = intrinsic.alias;
29436
+ if (alias) {
29437
+ intrinsicBaseName = alias[0];
29438
+ $spliceApply(parts, $concat([0, 1], alias));
29439
+ }
29440
+
29441
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
29442
+ var part = parts[i];
29443
+ var first = $strSlice(part, 0, 1);
29444
+ var last = $strSlice(part, -1);
29445
+ if (
29446
+ (
29447
+ (first === '"' || first === "'" || first === '`')
29448
+ || (last === '"' || last === "'" || last === '`')
29449
+ )
29450
+ && first !== last
29451
+ ) {
29452
+ throw new $SyntaxError('property names with quotes must have matching quotes');
29453
+ }
29454
+ if (part === 'constructor' || !isOwn) {
29455
+ skipFurtherCaching = true;
29456
+ }
29457
+
29458
+ intrinsicBaseName += '.' + part;
29459
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
29460
+
29461
+ if (hasOwn$2(INTRINSICS, intrinsicRealName)) {
29462
+ value = INTRINSICS[intrinsicRealName];
29463
+ } else if (value != null) {
29464
+ if (!(part in value)) {
29465
+ if (!allowMissing) {
29466
+ throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
29467
+ }
29468
+ return void undefined$1;
29469
+ }
29470
+ if ($gOPD && (i + 1) >= parts.length) {
29471
+ var desc = $gOPD(value, part);
29472
+ isOwn = !!desc;
29473
+
29474
+ // By convention, when a data property is converted to an accessor
29475
+ // property to emulate a data property that does not suffer from
29476
+ // the override mistake, that accessor's getter is marked with
29477
+ // an `originalValue` property. Here, when we detect this, we
29478
+ // uphold the illusion by pretending to see that original data
29479
+ // property, i.e., returning the value rather than the getter
29480
+ // itself.
29481
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
29482
+ value = desc.get;
29483
+ } else {
29484
+ value = value[part];
29485
+ }
29486
+ } else {
29487
+ isOwn = hasOwn$2(value, part);
29488
+ value = value[part];
29489
+ }
29490
+
29491
+ if (isOwn && !skipFurtherCaching) {
29492
+ INTRINSICS[intrinsicRealName] = value;
29493
+ }
29494
+ }
29495
+ }
29496
+ return value;
29497
+ };
29498
+
29499
+ var shams;
29500
+ var hasRequiredShams;
29501
+
29502
+ function requireShams () {
29503
+ if (hasRequiredShams) return shams;
29504
+ hasRequiredShams = 1;
29505
+
29506
+ var hasSymbols = requireShams$1();
29507
+
29508
+ /** @type {import('.')} */
29509
+ shams = function hasToStringTagShams() {
29510
+ return hasSymbols() && !!Symbol.toStringTag;
29511
+ };
29512
+ return shams;
29513
+ }
29514
+
29515
+ var GetIntrinsic = getIntrinsic;
29516
+
29517
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
29518
+
29519
+ var hasToStringTag = requireShams()();
29520
+ var hasOwn$1 = hasown;
29521
+ var $TypeError = requireType();
29522
+
29523
+ var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
29524
+
29525
+ /** @type {import('.')} */
29526
+ var esSetTostringtag = function setToStringTag(object, value) {
29527
+ var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
29528
+ var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
29529
+ if (
29530
+ (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
29531
+ || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
29532
+ ) {
29533
+ throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
29534
+ }
29535
+ if (toStringTag && (overrideIfSet || !hasOwn$1(object, toStringTag))) {
29536
+ if ($defineProperty) {
29537
+ $defineProperty(object, toStringTag, {
29538
+ configurable: !nonConfigurable,
29539
+ enumerable: false,
29540
+ value: value,
29541
+ writable: false
29542
+ });
29543
+ } else {
29544
+ object[toStringTag] = value; // eslint-disable-line no-param-reassign
29545
+ }
29546
+ }
29547
+ };
29548
+
29549
+ // populates missing values
29550
+ var populate$1 = function (dst, src) {
29551
+ Object.keys(src).forEach(function (prop) {
29552
+ dst[prop] = dst[prop] || src[prop]; // eslint-disable-line no-param-reassign
28656
29553
  });
28657
29554
 
28658
29555
  return dst;
@@ -28666,23 +29563,20 @@ var https$1 = require$$4$1;
28666
29563
  var parseUrl$2 = require$$0$5.parse;
28667
29564
  var fs = require$$3;
28668
29565
  var Stream = stream.Stream;
29566
+ var crypto = require$$8;
28669
29567
  var mime = mimeTypes;
28670
29568
  var asynckit = asynckit$1;
29569
+ var setToStringTag = esSetTostringtag;
29570
+ var hasOwn = hasown;
28671
29571
  var populate = populate$1;
28672
29572
 
28673
- // Public API
28674
- var form_data = FormData$1;
28675
-
28676
- // make it a Stream
28677
- util.inherits(FormData$1, CombinedStream);
28678
-
28679
29573
  /**
28680
29574
  * Create readable "multipart/form-data" streams.
28681
29575
  * Can be used to submit forms
28682
29576
  * and file uploads to other web applications.
28683
29577
  *
28684
29578
  * @constructor
28685
- * @param {Object} options - Properties to be added/overriden for FormData and CombinedStream
29579
+ * @param {object} options - Properties to be added/overriden for FormData and CombinedStream
28686
29580
  */
28687
29581
  function FormData$1(options) {
28688
29582
  if (!(this instanceof FormData$1)) {
@@ -28695,35 +29589,39 @@ function FormData$1(options) {
28695
29589
 
28696
29590
  CombinedStream.call(this);
28697
29591
 
28698
- options = options || {};
28699
- for (var option in options) {
29592
+ options = options || {}; // eslint-disable-line no-param-reassign
29593
+ for (var option in options) { // eslint-disable-line no-restricted-syntax
28700
29594
  this[option] = options[option];
28701
29595
  }
28702
29596
  }
28703
29597
 
29598
+ // make it a Stream
29599
+ util.inherits(FormData$1, CombinedStream);
29600
+
28704
29601
  FormData$1.LINE_BREAK = '\r\n';
28705
29602
  FormData$1.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
28706
29603
 
28707
- FormData$1.prototype.append = function(field, value, options) {
28708
-
28709
- options = options || {};
29604
+ FormData$1.prototype.append = function (field, value, options) {
29605
+ options = options || {}; // eslint-disable-line no-param-reassign
28710
29606
 
28711
29607
  // allow filename as single option
28712
- if (typeof options == 'string') {
28713
- options = {filename: options};
29608
+ if (typeof options === 'string') {
29609
+ options = { filename: options }; // eslint-disable-line no-param-reassign
28714
29610
  }
28715
29611
 
28716
29612
  var append = CombinedStream.prototype.append.bind(this);
28717
29613
 
28718
29614
  // all that streamy business can't handle numbers
28719
- if (typeof value == 'number') {
28720
- value = '' + value;
29615
+ if (typeof value === 'number' || value == null) {
29616
+ value = String(value); // eslint-disable-line no-param-reassign
28721
29617
  }
28722
29618
 
28723
29619
  // https://github.com/felixge/node-form-data/issues/38
28724
- if (util.isArray(value)) {
28725
- // Please convert your array into string
28726
- // the way web server expects it
29620
+ if (Array.isArray(value)) {
29621
+ /*
29622
+ * Please convert your array into string
29623
+ * the way web server expects it
29624
+ */
28727
29625
  this._error(new Error('Arrays are not supported.'));
28728
29626
  return;
28729
29627
  }
@@ -28739,15 +29637,17 @@ FormData$1.prototype.append = function(field, value, options) {
28739
29637
  this._trackLength(header, value, options);
28740
29638
  };
28741
29639
 
28742
- FormData$1.prototype._trackLength = function(header, value, options) {
29640
+ FormData$1.prototype._trackLength = function (header, value, options) {
28743
29641
  var valueLength = 0;
28744
29642
 
28745
- // used w/ getLengthSync(), when length is known.
28746
- // e.g. for streaming directly from a remote server,
28747
- // w/ a known file a size, and not wanting to wait for
28748
- // incoming file to finish to get its size.
29643
+ /*
29644
+ * used w/ getLengthSync(), when length is known.
29645
+ * e.g. for streaming directly from a remote server,
29646
+ * w/ a known file a size, and not wanting to wait for
29647
+ * incoming file to finish to get its size.
29648
+ */
28749
29649
  if (options.knownLength != null) {
28750
- valueLength += +options.knownLength;
29650
+ valueLength += Number(options.knownLength);
28751
29651
  } else if (Buffer.isBuffer(value)) {
28752
29652
  valueLength = value.length;
28753
29653
  } else if (typeof value === 'string') {
@@ -28757,12 +29657,10 @@ FormData$1.prototype._trackLength = function(header, value, options) {
28757
29657
  this._valueLength += valueLength;
28758
29658
 
28759
29659
  // @check why add CRLF? does this account for custom/multiple CRLFs?
28760
- this._overheadLength +=
28761
- Buffer.byteLength(header) +
28762
- FormData$1.LINE_BREAK.length;
29660
+ this._overheadLength += Buffer.byteLength(header) + FormData$1.LINE_BREAK.length;
28763
29661
 
28764
29662
  // empty or either doesn't have path or not an http response or not a stream
28765
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {
29663
+ if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) {
28766
29664
  return;
28767
29665
  }
28768
29666
 
@@ -28772,10 +29670,8 @@ FormData$1.prototype._trackLength = function(header, value, options) {
28772
29670
  }
28773
29671
  };
28774
29672
 
28775
- FormData$1.prototype._lengthRetriever = function(value, callback) {
28776
-
28777
- if (value.hasOwnProperty('fd')) {
28778
-
29673
+ FormData$1.prototype._lengthRetriever = function (value, callback) {
29674
+ if (hasOwn(value, 'fd')) {
28779
29675
  // take read range into a account
28780
29676
  // `end` = Infinity –> read file till the end
28781
29677
  //
@@ -28784,54 +29680,52 @@ FormData$1.prototype._lengthRetriever = function(value, callback) {
28784
29680
  // Fix it when node fixes it.
28785
29681
  // https://github.com/joyent/node/issues/7819
28786
29682
  if (value.end != undefined && value.end != Infinity && value.start != undefined) {
28787
-
28788
29683
  // when end specified
28789
29684
  // no need to calculate range
28790
29685
  // inclusive, starts with 0
28791
- callback(null, value.end + 1 - (value.start ? value.start : 0));
29686
+ callback(null, value.end + 1 - (value.start ? value.start : 0)); // eslint-disable-line callback-return
28792
29687
 
28793
- // not that fast snoopy
29688
+ // not that fast snoopy
28794
29689
  } else {
28795
29690
  // still need to fetch file size from fs
28796
- fs.stat(value.path, function(err, stat) {
28797
-
28798
- var fileSize;
28799
-
29691
+ fs.stat(value.path, function (err, stat) {
28800
29692
  if (err) {
28801
29693
  callback(err);
28802
29694
  return;
28803
29695
  }
28804
29696
 
28805
29697
  // update final size based on the range options
28806
- fileSize = stat.size - (value.start ? value.start : 0);
29698
+ var fileSize = stat.size - (value.start ? value.start : 0);
28807
29699
  callback(null, fileSize);
28808
29700
  });
28809
29701
  }
28810
29702
 
28811
- // or http response
28812
- } else if (value.hasOwnProperty('httpVersion')) {
28813
- callback(null, +value.headers['content-length']);
29703
+ // or http response
29704
+ } else if (hasOwn(value, 'httpVersion')) {
29705
+ callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return
28814
29706
 
28815
- // or request stream http://github.com/mikeal/request
28816
- } else if (value.hasOwnProperty('httpModule')) {
29707
+ // or request stream http://github.com/mikeal/request
29708
+ } else if (hasOwn(value, 'httpModule')) {
28817
29709
  // wait till response come back
28818
- value.on('response', function(response) {
29710
+ value.on('response', function (response) {
28819
29711
  value.pause();
28820
- callback(null, +response.headers['content-length']);
29712
+ callback(null, Number(response.headers['content-length']));
28821
29713
  });
28822
29714
  value.resume();
28823
29715
 
28824
- // something else
29716
+ // something else
28825
29717
  } else {
28826
- callback('Unknown stream');
29718
+ callback('Unknown stream'); // eslint-disable-line callback-return
28827
29719
  }
28828
29720
  };
28829
29721
 
28830
- FormData$1.prototype._multiPartHeader = function(field, value, options) {
28831
- // custom header specified (as string)?
28832
- // it becomes responsible for boundary
28833
- // (e.g. to handle extra CRLFs on .NET servers)
28834
- if (typeof options.header == 'string') {
29722
+ FormData$1.prototype._multiPartHeader = function (field, value, options) {
29723
+ /*
29724
+ * custom header specified (as string)?
29725
+ * it becomes responsible for boundary
29726
+ * (e.g. to handle extra CRLFs on .NET servers)
29727
+ */
29728
+ if (typeof options.header === 'string') {
28835
29729
  return options.header;
28836
29730
  }
28837
29731
 
@@ -28839,7 +29733,7 @@ FormData$1.prototype._multiPartHeader = function(field, value, options) {
28839
29733
  var contentType = this._getContentType(value, options);
28840
29734
 
28841
29735
  var contents = '';
28842
- var headers = {
29736
+ var headers = {
28843
29737
  // add custom disposition as third element or keep it two elements if not
28844
29738
  'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
28845
29739
  // if no content type. allow it to be empty array
@@ -28847,77 +29741,74 @@ FormData$1.prototype._multiPartHeader = function(field, value, options) {
28847
29741
  };
28848
29742
 
28849
29743
  // allow custom headers.
28850
- if (typeof options.header == 'object') {
29744
+ if (typeof options.header === 'object') {
28851
29745
  populate(headers, options.header);
28852
29746
  }
28853
29747
 
28854
29748
  var header;
28855
- for (var prop in headers) {
28856
- if (!headers.hasOwnProperty(prop)) continue;
28857
- header = headers[prop];
29749
+ for (var prop in headers) { // eslint-disable-line no-restricted-syntax
29750
+ if (hasOwn(headers, prop)) {
29751
+ header = headers[prop];
28858
29752
 
28859
- // skip nullish headers.
28860
- if (header == null) {
28861
- continue;
28862
- }
29753
+ // skip nullish headers.
29754
+ if (header == null) {
29755
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
29756
+ }
28863
29757
 
28864
- // convert all headers to arrays.
28865
- if (!Array.isArray(header)) {
28866
- header = [header];
28867
- }
29758
+ // convert all headers to arrays.
29759
+ if (!Array.isArray(header)) {
29760
+ header = [header];
29761
+ }
28868
29762
 
28869
- // add non-empty headers.
28870
- if (header.length) {
28871
- contents += prop + ': ' + header.join('; ') + FormData$1.LINE_BREAK;
29763
+ // add non-empty headers.
29764
+ if (header.length) {
29765
+ contents += prop + ': ' + header.join('; ') + FormData$1.LINE_BREAK;
29766
+ }
28872
29767
  }
28873
29768
  }
28874
29769
 
28875
29770
  return '--' + this.getBoundary() + FormData$1.LINE_BREAK + contents + FormData$1.LINE_BREAK;
28876
29771
  };
28877
29772
 
28878
- FormData$1.prototype._getContentDisposition = function(value, options) {
28879
-
28880
- var filename
28881
- , contentDisposition
28882
- ;
29773
+ FormData$1.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return
29774
+ var filename;
28883
29775
 
28884
29776
  if (typeof options.filepath === 'string') {
28885
29777
  // custom filepath for relative paths
28886
29778
  filename = path.normalize(options.filepath).replace(/\\/g, '/');
28887
- } else if (options.filename || value.name || value.path) {
28888
- // custom filename take precedence
28889
- // formidable and the browser add a name property
28890
- // fs- and request- streams have path property
28891
- filename = path.basename(options.filename || value.name || value.path);
28892
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
29779
+ } else if (options.filename || (value && (value.name || value.path))) {
29780
+ /*
29781
+ * custom filename take precedence
29782
+ * formidable and the browser add a name property
29783
+ * fs- and request- streams have path property
29784
+ */
29785
+ filename = path.basename(options.filename || (value && (value.name || value.path)));
29786
+ } else if (value && value.readable && hasOwn(value, 'httpVersion')) {
28893
29787
  // or try http response
28894
29788
  filename = path.basename(value.client._httpMessage.path || '');
28895
29789
  }
28896
29790
 
28897
29791
  if (filename) {
28898
- contentDisposition = 'filename="' + filename + '"';
29792
+ return 'filename="' + filename + '"';
28899
29793
  }
28900
-
28901
- return contentDisposition;
28902
29794
  };
28903
29795
 
28904
- FormData$1.prototype._getContentType = function(value, options) {
28905
-
29796
+ FormData$1.prototype._getContentType = function (value, options) {
28906
29797
  // use custom content-type above all
28907
29798
  var contentType = options.contentType;
28908
29799
 
28909
29800
  // or try `name` from formidable, browser
28910
- if (!contentType && value.name) {
29801
+ if (!contentType && value && value.name) {
28911
29802
  contentType = mime.lookup(value.name);
28912
29803
  }
28913
29804
 
28914
29805
  // or try `path` from fs-, request- streams
28915
- if (!contentType && value.path) {
29806
+ if (!contentType && value && value.path) {
28916
29807
  contentType = mime.lookup(value.path);
28917
29808
  }
28918
29809
 
28919
29810
  // or if it's http-reponse
28920
- if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
29811
+ if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) {
28921
29812
  contentType = value.headers['content-type'];
28922
29813
  }
28923
29814
 
@@ -28927,18 +29818,18 @@ FormData$1.prototype._getContentType = function(value, options) {
28927
29818
  }
28928
29819
 
28929
29820
  // fallback to the default content type if `value` is not simple value
28930
- if (!contentType && typeof value == 'object') {
29821
+ if (!contentType && value && typeof value === 'object') {
28931
29822
  contentType = FormData$1.DEFAULT_CONTENT_TYPE;
28932
29823
  }
28933
29824
 
28934
29825
  return contentType;
28935
29826
  };
28936
29827
 
28937
- FormData$1.prototype._multiPartFooter = function() {
28938
- return function(next) {
29828
+ FormData$1.prototype._multiPartFooter = function () {
29829
+ return function (next) {
28939
29830
  var footer = FormData$1.LINE_BREAK;
28940
29831
 
28941
- var lastPart = (this._streams.length === 0);
29832
+ var lastPart = this._streams.length === 0;
28942
29833
  if (lastPart) {
28943
29834
  footer += this._lastBoundary();
28944
29835
  }
@@ -28947,18 +29838,18 @@ FormData$1.prototype._multiPartFooter = function() {
28947
29838
  }.bind(this);
28948
29839
  };
28949
29840
 
28950
- FormData$1.prototype._lastBoundary = function() {
29841
+ FormData$1.prototype._lastBoundary = function () {
28951
29842
  return '--' + this.getBoundary() + '--' + FormData$1.LINE_BREAK;
28952
29843
  };
28953
29844
 
28954
- FormData$1.prototype.getHeaders = function(userHeaders) {
29845
+ FormData$1.prototype.getHeaders = function (userHeaders) {
28955
29846
  var header;
28956
29847
  var formHeaders = {
28957
29848
  'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
28958
29849
  };
28959
29850
 
28960
- for (header in userHeaders) {
28961
- if (userHeaders.hasOwnProperty(header)) {
29851
+ for (header in userHeaders) { // eslint-disable-line no-restricted-syntax
29852
+ if (hasOwn(userHeaders, header)) {
28962
29853
  formHeaders[header.toLowerCase()] = userHeaders[header];
28963
29854
  }
28964
29855
  }
@@ -28966,11 +29857,14 @@ FormData$1.prototype.getHeaders = function(userHeaders) {
28966
29857
  return formHeaders;
28967
29858
  };
28968
29859
 
28969
- FormData$1.prototype.setBoundary = function(boundary) {
29860
+ FormData$1.prototype.setBoundary = function (boundary) {
29861
+ if (typeof boundary !== 'string') {
29862
+ throw new TypeError('FormData boundary must be a string');
29863
+ }
28970
29864
  this._boundary = boundary;
28971
29865
  };
28972
29866
 
28973
- FormData$1.prototype.getBoundary = function() {
29867
+ FormData$1.prototype.getBoundary = function () {
28974
29868
  if (!this._boundary) {
28975
29869
  this._generateBoundary();
28976
29870
  }
@@ -28978,60 +29872,55 @@ FormData$1.prototype.getBoundary = function() {
28978
29872
  return this._boundary;
28979
29873
  };
28980
29874
 
28981
- FormData$1.prototype.getBuffer = function() {
28982
- var dataBuffer = new Buffer.alloc( 0 );
29875
+ FormData$1.prototype.getBuffer = function () {
29876
+ var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap
28983
29877
  var boundary = this.getBoundary();
28984
29878
 
28985
29879
  // Create the form content. Add Line breaks to the end of data.
28986
29880
  for (var i = 0, len = this._streams.length; i < len; i++) {
28987
29881
  if (typeof this._streams[i] !== 'function') {
28988
-
28989
29882
  // Add content to the buffer.
28990
- if(Buffer.isBuffer(this._streams[i])) {
28991
- dataBuffer = Buffer.concat( [dataBuffer, this._streams[i]]);
28992
- }else {
28993
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(this._streams[i])]);
29883
+ if (Buffer.isBuffer(this._streams[i])) {
29884
+ dataBuffer = Buffer.concat([dataBuffer, this._streams[i]]);
29885
+ } else {
29886
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(this._streams[i])]);
28994
29887
  }
28995
29888
 
28996
29889
  // Add break after content.
28997
- if (typeof this._streams[i] !== 'string' || this._streams[i].substring( 2, boundary.length + 2 ) !== boundary) {
28998
- dataBuffer = Buffer.concat( [dataBuffer, Buffer.from(FormData$1.LINE_BREAK)] );
29890
+ if (typeof this._streams[i] !== 'string' || this._streams[i].substring(2, boundary.length + 2) !== boundary) {
29891
+ dataBuffer = Buffer.concat([dataBuffer, Buffer.from(FormData$1.LINE_BREAK)]);
28999
29892
  }
29000
29893
  }
29001
29894
  }
29002
29895
 
29003
29896
  // Add the footer and return the Buffer object.
29004
- return Buffer.concat( [dataBuffer, Buffer.from(this._lastBoundary())] );
29897
+ return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
29005
29898
  };
29006
29899
 
29007
- FormData$1.prototype._generateBoundary = function() {
29900
+ FormData$1.prototype._generateBoundary = function () {
29008
29901
  // This generates a 50 character boundary similar to those used by Firefox.
29009
- // They are optimized for boyer-moore parsing.
29010
- var boundary = '--------------------------';
29011
- for (var i = 0; i < 24; i++) {
29012
- boundary += Math.floor(Math.random() * 10).toString(16);
29013
- }
29014
29902
 
29015
- this._boundary = boundary;
29903
+ // They are optimized for boyer-moore parsing.
29904
+ this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex');
29016
29905
  };
29017
29906
 
29018
29907
  // Note: getLengthSync DOESN'T calculate streams length
29019
- // As workaround one can calculate file size manually
29020
- // and add it as knownLength option
29021
- FormData$1.prototype.getLengthSync = function() {
29908
+ // As workaround one can calculate file size manually and add it as knownLength option
29909
+ FormData$1.prototype.getLengthSync = function () {
29022
29910
  var knownLength = this._overheadLength + this._valueLength;
29023
29911
 
29024
- // Don't get confused, there are 3 "internal" streams for each keyval pair
29025
- // so it basically checks if there is any value added to the form
29912
+ // Don't get confused, there are 3 "internal" streams for each keyval pair so it basically checks if there is any value added to the form
29026
29913
  if (this._streams.length) {
29027
29914
  knownLength += this._lastBoundary().length;
29028
29915
  }
29029
29916
 
29030
29917
  // https://github.com/form-data/form-data/issues/40
29031
29918
  if (!this.hasKnownLength()) {
29032
- // Some async length retrievers are present
29033
- // therefore synchronous length calculation is false.
29034
- // Please use getLength(callback) to get proper length
29919
+ /*
29920
+ * Some async length retrievers are present
29921
+ * therefore synchronous length calculation is false.
29922
+ * Please use getLength(callback) to get proper length
29923
+ */
29035
29924
  this._error(new Error('Cannot calculate proper length in synchronous way.'));
29036
29925
  }
29037
29926
 
@@ -29041,7 +29930,7 @@ FormData$1.prototype.getLengthSync = function() {
29041
29930
  // Public API to check if length of added values is known
29042
29931
  // https://github.com/form-data/form-data/issues/196
29043
29932
  // https://github.com/form-data/form-data/issues/262
29044
- FormData$1.prototype.hasKnownLength = function() {
29933
+ FormData$1.prototype.hasKnownLength = function () {
29045
29934
  var hasKnownLength = true;
29046
29935
 
29047
29936
  if (this._valuesToMeasure.length) {
@@ -29051,7 +29940,7 @@ FormData$1.prototype.hasKnownLength = function() {
29051
29940
  return hasKnownLength;
29052
29941
  };
29053
29942
 
29054
- FormData$1.prototype.getLength = function(cb) {
29943
+ FormData$1.prototype.getLength = function (cb) {
29055
29944
  var knownLength = this._overheadLength + this._valueLength;
29056
29945
 
29057
29946
  if (this._streams.length) {
@@ -29063,13 +29952,13 @@ FormData$1.prototype.getLength = function(cb) {
29063
29952
  return;
29064
29953
  }
29065
29954
 
29066
- asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
29955
+ asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) {
29067
29956
  if (err) {
29068
29957
  cb(err);
29069
29958
  return;
29070
29959
  }
29071
29960
 
29072
- values.forEach(function(length) {
29961
+ values.forEach(function (length) {
29073
29962
  knownLength += length;
29074
29963
  });
29075
29964
 
@@ -29077,31 +29966,26 @@ FormData$1.prototype.getLength = function(cb) {
29077
29966
  });
29078
29967
  };
29079
29968
 
29080
- FormData$1.prototype.submit = function(params, cb) {
29081
- var request
29082
- , options
29083
- , defaults = {method: 'post'}
29084
- ;
29085
-
29086
- // parse provided url if it's string
29087
- // or treat it as options object
29088
- if (typeof params == 'string') {
29969
+ FormData$1.prototype.submit = function (params, cb) {
29970
+ var request;
29971
+ var options;
29972
+ var defaults = { method: 'post' };
29089
29973
 
29090
- params = parseUrl$2(params);
29974
+ // parse provided url if it's string or treat it as options object
29975
+ if (typeof params === 'string') {
29976
+ params = parseUrl$2(params); // eslint-disable-line no-param-reassign
29977
+ /* eslint sort-keys: 0 */
29091
29978
  options = populate({
29092
29979
  port: params.port,
29093
29980
  path: params.pathname,
29094
29981
  host: params.hostname,
29095
29982
  protocol: params.protocol
29096
29983
  }, defaults);
29097
-
29098
- // use custom params
29099
- } else {
29100
-
29984
+ } else { // use custom params
29101
29985
  options = populate(params, defaults);
29102
29986
  // if no port provided use default one
29103
29987
  if (!options.port) {
29104
- options.port = options.protocol == 'https:' ? 443 : 80;
29988
+ options.port = options.protocol === 'https:' ? 443 : 80;
29105
29989
  }
29106
29990
  }
29107
29991
 
@@ -29109,14 +29993,14 @@ FormData$1.prototype.submit = function(params, cb) {
29109
29993
  options.headers = this.getHeaders(params.headers);
29110
29994
 
29111
29995
  // https if specified, fallback to http in any other case
29112
- if (options.protocol == 'https:') {
29996
+ if (options.protocol === 'https:') {
29113
29997
  request = https$1.request(options);
29114
29998
  } else {
29115
29999
  request = http$1.request(options);
29116
30000
  }
29117
30001
 
29118
30002
  // get content length and fire away
29119
- this.getLength(function(err, length) {
30003
+ this.getLength(function (err, length) {
29120
30004
  if (err && err !== 'Unknown stream') {
29121
30005
  this._error(err);
29122
30006
  return;
@@ -29135,7 +30019,7 @@ FormData$1.prototype.submit = function(params, cb) {
29135
30019
  request.removeListener('error', callback);
29136
30020
  request.removeListener('response', onResponse);
29137
30021
 
29138
- return cb.call(this, error, responce);
30022
+ return cb.call(this, error, responce); // eslint-disable-line no-invalid-this
29139
30023
  };
29140
30024
 
29141
30025
  onResponse = callback.bind(this, null);
@@ -29148,7 +30032,7 @@ FormData$1.prototype.submit = function(params, cb) {
29148
30032
  return request;
29149
30033
  };
29150
30034
 
29151
- FormData$1.prototype._error = function(err) {
30035
+ FormData$1.prototype._error = function (err) {
29152
30036
  if (!this.error) {
29153
30037
  this.error = err;
29154
30038
  this.pause();
@@ -29159,6 +30043,10 @@ FormData$1.prototype._error = function(err) {
29159
30043
  FormData$1.prototype.toString = function () {
29160
30044
  return '[object FormData]';
29161
30045
  };
30046
+ setToStringTag(FormData$1, 'FormData');
30047
+
30048
+ // Public API
30049
+ var form_data = FormData$1;
29162
30050
 
29163
30051
  var FormData$2 = /*@__PURE__*/getDefaultExportFromCjs(form_data);
29164
30052
 
@@ -29277,6 +30165,10 @@ function toFormData(obj, formData, options) {
29277
30165
  return value.toISOString();
29278
30166
  }
29279
30167
 
30168
+ if (utils$1.isBoolean(value)) {
30169
+ return value.toString();
30170
+ }
30171
+
29280
30172
  if (!useBlob && utils$1.isBlob(value)) {
29281
30173
  throw new AxiosError('Blob is not supported. Use a Buffer instead.');
29282
30174
  }
@@ -29439,9 +30331,7 @@ function encode(val) {
29439
30331
  replace(/%3A/gi, ':').
29440
30332
  replace(/%24/g, '$').
29441
30333
  replace(/%2C/gi, ',').
29442
- replace(/%20/g, '+').
29443
- replace(/%5B/gi, '[').
29444
- replace(/%5D/gi, ']');
30334
+ replace(/%20/g, '+');
29445
30335
  }
29446
30336
 
29447
30337
  /**
@@ -29579,7 +30469,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
29579
30469
  let str = '';
29580
30470
  const {length} = alphabet;
29581
30471
  const randomValues = new Uint32Array(size);
29582
- crypto.randomFillSync(randomValues);
30472
+ require$$8.randomFillSync(randomValues);
29583
30473
  for (let i = 0; i < size; i++) {
29584
30474
  str += alphabet[randomValues[i] % length];
29585
30475
  }
@@ -29659,7 +30549,7 @@ var platform = {
29659
30549
  };
29660
30550
 
29661
30551
  function toURLEncodedForm(data, options) {
29662
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
30552
+ return toFormData(data, new platform.classes.URLSearchParams(), {
29663
30553
  visitor: function(value, key, path, helpers) {
29664
30554
  if (platform.isNode && utils$1.isBuffer(value)) {
29665
30555
  this.append(key, value.toString('base64'));
@@ -29667,8 +30557,9 @@ function toURLEncodedForm(data, options) {
29667
30557
  }
29668
30558
 
29669
30559
  return helpers.defaultVisitor.apply(this, arguments);
29670
- }
29671
- }, options));
30560
+ },
30561
+ ...options
30562
+ });
29672
30563
  }
29673
30564
 
29674
30565
  /**
@@ -29783,7 +30674,7 @@ function stringifySafely(rawValue, parser, encoder) {
29783
30674
  }
29784
30675
  }
29785
30676
 
29786
- return (encoder || JSON.stringify)(rawValue);
30677
+ return (0, JSON.stringify)(rawValue);
29787
30678
  }
29788
30679
 
29789
30680
  const defaults = {
@@ -29864,7 +30755,7 @@ const defaults = {
29864
30755
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
29865
30756
 
29866
30757
  try {
29867
- return JSON.parse(data);
30758
+ return JSON.parse(data, this.parseReviver);
29868
30759
  } catch (e) {
29869
30760
  if (strictJSONParsing) {
29870
30761
  if (e.name === 'SyntaxError') {
@@ -29911,8 +30802,6 @@ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
29911
30802
  defaults.headers[method] = {};
29912
30803
  });
29913
30804
 
29914
- var defaults$1 = defaults;
29915
-
29916
30805
  // RawAxiosHeaders whose duplicates are ignored by node
29917
30806
  // c.f. https://nodejs.org/api/http.html#http_message_headers
29918
30807
  const ignoreDuplicateOf = utils$1.toObjectSet([
@@ -30062,10 +30951,18 @@ class AxiosHeaders {
30062
30951
  setHeaders(header, valueOrRewrite);
30063
30952
  } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
30064
30953
  setHeaders(parseHeaders(header), valueOrRewrite);
30065
- } else if (utils$1.isHeaders(header)) {
30066
- for (const [key, value] of header.entries()) {
30067
- setHeader(value, key, rewrite);
30954
+ } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
30955
+ let obj = {}, dest, key;
30956
+ for (const entry of header) {
30957
+ if (!utils$1.isArray(entry)) {
30958
+ throw TypeError('Object iterator must return a key-value pair');
30959
+ }
30960
+
30961
+ obj[key = entry[0]] = (dest = obj[key]) ?
30962
+ (utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
30068
30963
  }
30964
+
30965
+ setHeaders(obj, valueOrRewrite);
30069
30966
  } else {
30070
30967
  header != null && setHeader(valueOrRewrite, header, rewrite);
30071
30968
  }
@@ -30207,6 +31104,10 @@ class AxiosHeaders {
30207
31104
  return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
30208
31105
  }
30209
31106
 
31107
+ getSetCookie() {
31108
+ return this.get("set-cookie") || [];
31109
+ }
31110
+
30210
31111
  get [Symbol.toStringTag]() {
30211
31112
  return 'AxiosHeaders';
30212
31113
  }
@@ -30261,8 +31162,6 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
30261
31162
 
30262
31163
  utils$1.freezeMethods(AxiosHeaders);
30263
31164
 
30264
- var AxiosHeaders$1 = AxiosHeaders;
30265
-
30266
31165
  /**
30267
31166
  * Transform the data for a request or a response
30268
31167
  *
@@ -30272,9 +31171,9 @@ var AxiosHeaders$1 = AxiosHeaders;
30272
31171
  * @returns {*} The resulting transformed data
30273
31172
  */
30274
31173
  function transformData(fns, response) {
30275
- const config = this || defaults$1;
31174
+ const config = this || defaults;
30276
31175
  const context = response || config;
30277
- const headers = AxiosHeaders$1.from(context.headers);
31176
+ const headers = AxiosHeaders.from(context.headers);
30278
31177
  let data = context.data;
30279
31178
 
30280
31179
  utils$1.forEach(fns, function transform(fn) {
@@ -30373,7 +31272,7 @@ function combineURLs(baseURL, relativeURL) {
30373
31272
  */
30374
31273
  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
30375
31274
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
30376
- if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
31275
+ if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
30377
31276
  return combineURLs(baseURL, requestedURL);
30378
31277
  }
30379
31278
  return requestedURL;
@@ -30514,10 +31413,21 @@ var Writable = stream.Writable;
30514
31413
  var assert = require$$0$3;
30515
31414
  var debug = debug_1;
30516
31415
 
31416
+ // Preventive platform detection
31417
+ // istanbul ignore next
31418
+ (function detectUnsupportedEnvironment() {
31419
+ var looksLikeNode = typeof process !== "undefined";
31420
+ var looksLikeBrowser = typeof window !== "undefined" && typeof document !== "undefined";
31421
+ var looksLikeV8 = isFunction$1(Error.captureStackTrace);
31422
+ if (!looksLikeNode && (looksLikeBrowser || !looksLikeV8)) {
31423
+ console.warn("The follow-redirects package should be excluded from browser builds.");
31424
+ }
31425
+ }());
31426
+
30517
31427
  // Whether to use the native URL object or the legacy url module
30518
31428
  var useNativeURL = false;
30519
31429
  try {
30520
- assert(new URL$1());
31430
+ assert(new URL$1(""));
30521
31431
  }
30522
31432
  catch (error) {
30523
31433
  useNativeURL = error.code === "ERR_INVALID_URL";
@@ -30632,7 +31542,7 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
30632
31542
  if (!isString(data) && !isBuffer(data)) {
30633
31543
  throw new TypeError("data should be a string, Buffer or Uint8Array");
30634
31544
  }
30635
- if (isFunction(encoding)) {
31545
+ if (isFunction$1(encoding)) {
30636
31546
  callback = encoding;
30637
31547
  encoding = null;
30638
31548
  }
@@ -30661,11 +31571,11 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
30661
31571
  // Ends the current native request
30662
31572
  RedirectableRequest.prototype.end = function (data, encoding, callback) {
30663
31573
  // Shift parameters if necessary
30664
- if (isFunction(data)) {
31574
+ if (isFunction$1(data)) {
30665
31575
  callback = data;
30666
31576
  data = encoding = null;
30667
31577
  }
30668
- else if (isFunction(encoding)) {
31578
+ else if (isFunction$1(encoding)) {
30669
31579
  callback = encoding;
30670
31580
  encoding = null;
30671
31581
  }
@@ -30854,17 +31764,17 @@ RedirectableRequest.prototype._performRequest = function () {
30854
31764
  var buffers = this._requestBodyBuffers;
30855
31765
  (function writeNext(error) {
30856
31766
  // Only write if this request has not been redirected yet
30857
- /* istanbul ignore else */
31767
+ // istanbul ignore else
30858
31768
  if (request === self._currentRequest) {
30859
31769
  // Report any write errors
30860
- /* istanbul ignore if */
31770
+ // istanbul ignore if
30861
31771
  if (error) {
30862
31772
  self.emit("error", error);
30863
31773
  }
30864
31774
  // Write the next buffer if there are still left
30865
31775
  else if (i < buffers.length) {
30866
31776
  var buffer = buffers[i++];
30867
- /* istanbul ignore else */
31777
+ // istanbul ignore else
30868
31778
  if (!request.finished) {
30869
31779
  request.write(buffer.data, buffer.encoding, writeNext);
30870
31780
  }
@@ -30973,7 +31883,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
30973
31883
  }
30974
31884
 
30975
31885
  // Evaluate the beforeRedirect callback
30976
- if (isFunction(beforeRedirect)) {
31886
+ if (isFunction$1(beforeRedirect)) {
30977
31887
  var responseDetails = {
30978
31888
  headers: response.headers,
30979
31889
  statusCode: statusCode,
@@ -31020,7 +31930,7 @@ function wrap(protocols) {
31020
31930
  options = validateUrl(input);
31021
31931
  input = { protocol: protocol };
31022
31932
  }
31023
- if (isFunction(options)) {
31933
+ if (isFunction$1(options)) {
31024
31934
  callback = options;
31025
31935
  options = null;
31026
31936
  }
@@ -31060,7 +31970,7 @@ function noop() { /* empty */ }
31060
31970
 
31061
31971
  function parseUrl(input) {
31062
31972
  var parsed;
31063
- /* istanbul ignore else */
31973
+ // istanbul ignore else
31064
31974
  if (useNativeURL) {
31065
31975
  parsed = new URL$1(input);
31066
31976
  }
@@ -31075,7 +31985,7 @@ function parseUrl(input) {
31075
31985
  }
31076
31986
 
31077
31987
  function resolveUrl(relative, base) {
31078
- /* istanbul ignore next */
31988
+ // istanbul ignore next
31079
31989
  return useNativeURL ? new URL$1(relative, base) : parseUrl(url.resolve(base, relative));
31080
31990
  }
31081
31991
 
@@ -31124,7 +32034,10 @@ function removeMatchingHeaders(regex, headers) {
31124
32034
  function createErrorType(code, message, baseClass) {
31125
32035
  // Create constructor
31126
32036
  function CustomError(properties) {
31127
- Error.captureStackTrace(this, this.constructor);
32037
+ // istanbul ignore else
32038
+ if (isFunction$1(Error.captureStackTrace)) {
32039
+ Error.captureStackTrace(this, this.constructor);
32040
+ }
31128
32041
  Object.assign(this, properties || {});
31129
32042
  this.code = code;
31130
32043
  this.message = this.cause ? message + ": " + this.cause.message : message;
@@ -31163,7 +32076,7 @@ function isString(value) {
31163
32076
  return typeof value === "string" || value instanceof String;
31164
32077
  }
31165
32078
 
31166
- function isFunction(value) {
32079
+ function isFunction$1(value) {
31167
32080
  return typeof value === "function";
31168
32081
  }
31169
32082
 
@@ -31182,7 +32095,7 @@ followRedirects$1.exports.wrap = wrap;
31182
32095
  var followRedirectsExports = followRedirects$1.exports;
31183
32096
  var followRedirects = /*@__PURE__*/getDefaultExportFromCjs(followRedirectsExports);
31184
32097
 
31185
- const VERSION = "1.8.2";
32098
+ const VERSION = "1.12.0";
31186
32099
 
31187
32100
  function parseProtocol(url) {
31188
32101
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -31374,8 +32287,6 @@ class AxiosTransformStream extends stream.Transform{
31374
32287
  }
31375
32288
  }
31376
32289
 
31377
- var AxiosTransformStream$1 = AxiosTransformStream;
31378
-
31379
32290
  const {asyncIterator} = Symbol;
31380
32291
 
31381
32292
  const readBlob = async function* (blob) {
@@ -31462,7 +32373,7 @@ const formDataToStream = (form, headersHandler, options) => {
31462
32373
  }
31463
32374
 
31464
32375
  const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
31465
- const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
32376
+ const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
31466
32377
  let contentLength = footerBytes.byteLength;
31467
32378
 
31468
32379
  const parts = Array.from(form.entries()).map(([name, value]) => {
@@ -31602,7 +32513,7 @@ function throttle(fn, freq) {
31602
32513
  clearTimeout(timer);
31603
32514
  timer = null;
31604
32515
  }
31605
- fn.apply(null, args);
32516
+ fn(...args);
31606
32517
  };
31607
32518
 
31608
32519
  const throttled = (...args) => {
@@ -31667,6 +32578,80 @@ const progressEventDecorator = (total, throttled) => {
31667
32578
 
31668
32579
  const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
31669
32580
 
32581
+ /**
32582
+ * Estimate decoded byte length of a data:// URL *without* allocating large buffers.
32583
+ * - For base64: compute exact decoded size using length and padding;
32584
+ * handle %XX at the character-count level (no string allocation).
32585
+ * - For non-base64: use UTF-8 byteLength of the encoded body as a safe upper bound.
32586
+ *
32587
+ * @param {string} url
32588
+ * @returns {number}
32589
+ */
32590
+ function estimateDataURLDecodedBytes(url) {
32591
+ if (!url || typeof url !== 'string') return 0;
32592
+ if (!url.startsWith('data:')) return 0;
32593
+
32594
+ const comma = url.indexOf(',');
32595
+ if (comma < 0) return 0;
32596
+
32597
+ const meta = url.slice(5, comma);
32598
+ const body = url.slice(comma + 1);
32599
+ const isBase64 = /;base64/i.test(meta);
32600
+
32601
+ if (isBase64) {
32602
+ let effectiveLen = body.length;
32603
+ const len = body.length; // cache length
32604
+
32605
+ for (let i = 0; i < len; i++) {
32606
+ if (body.charCodeAt(i) === 37 /* '%' */ && i + 2 < len) {
32607
+ const a = body.charCodeAt(i + 1);
32608
+ const b = body.charCodeAt(i + 2);
32609
+ const isHex =
32610
+ ((a >= 48 && a <= 57) || (a >= 65 && a <= 70) || (a >= 97 && a <= 102)) &&
32611
+ ((b >= 48 && b <= 57) || (b >= 65 && b <= 70) || (b >= 97 && b <= 102));
32612
+
32613
+ if (isHex) {
32614
+ effectiveLen -= 2;
32615
+ i += 2;
32616
+ }
32617
+ }
32618
+ }
32619
+
32620
+ let pad = 0;
32621
+ let idx = len - 1;
32622
+
32623
+ const tailIsPct3D = (j) =>
32624
+ j >= 2 &&
32625
+ body.charCodeAt(j - 2) === 37 && // '%'
32626
+ body.charCodeAt(j - 1) === 51 && // '3'
32627
+ (body.charCodeAt(j) === 68 || body.charCodeAt(j) === 100); // 'D' or 'd'
32628
+
32629
+ if (idx >= 0) {
32630
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
32631
+ pad++;
32632
+ idx--;
32633
+ } else if (tailIsPct3D(idx)) {
32634
+ pad++;
32635
+ idx -= 3;
32636
+ }
32637
+ }
32638
+
32639
+ if (pad === 1 && idx >= 0) {
32640
+ if (body.charCodeAt(idx) === 61 /* '=' */) {
32641
+ pad++;
32642
+ } else if (tailIsPct3D(idx)) {
32643
+ pad++;
32644
+ }
32645
+ }
32646
+
32647
+ const groups = Math.floor(effectiveLen / 4);
32648
+ const bytes = groups * 3 - (pad || 0);
32649
+ return bytes > 0 ? bytes : 0;
32650
+ }
32651
+
32652
+ return Buffer.byteLength(body, 'utf8');
32653
+ }
32654
+
31670
32655
  const zlibOptions = {
31671
32656
  flush: zlib.constants.Z_SYNC_FLUSH,
31672
32657
  finishFlush: zlib.constants.Z_SYNC_FLUSH
@@ -31687,6 +32672,7 @@ const supportedProtocols = platform.protocols.map(protocol => {
31687
32672
  return protocol + ':';
31688
32673
  });
31689
32674
 
32675
+
31690
32676
  const flushOnFinish = (stream, [throttled, flush]) => {
31691
32677
  stream
31692
32678
  .on('end', flush)
@@ -31695,6 +32681,7 @@ const flushOnFinish = (stream, [throttled, flush]) => {
31695
32681
  return throttled;
31696
32682
  };
31697
32683
 
32684
+
31698
32685
  /**
31699
32686
  * If the proxy or config beforeRedirects functions are defined, call them with the options
31700
32687
  * object.
@@ -31874,6 +32861,21 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
31874
32861
  const protocol = parsed.protocol || supportedProtocols[0];
31875
32862
 
31876
32863
  if (protocol === 'data:') {
32864
+ // Apply the same semantics as HTTP: only enforce if a finite, non-negative cap is set.
32865
+ if (config.maxContentLength > -1) {
32866
+ // Use the exact string passed to fromDataURI (config.url); fall back to fullPath if needed.
32867
+ const dataUrl = String(config.url || fullPath || '');
32868
+ const estimated = estimateDataURLDecodedBytes(dataUrl);
32869
+
32870
+ if (estimated > config.maxContentLength) {
32871
+ return reject(new AxiosError(
32872
+ 'maxContentLength size of ' + config.maxContentLength + ' exceeded',
32873
+ AxiosError.ERR_BAD_RESPONSE,
32874
+ config
32875
+ ));
32876
+ }
32877
+ }
32878
+
31877
32879
  let convertedData;
31878
32880
 
31879
32881
  if (method !== 'GET') {
@@ -31907,7 +32909,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
31907
32909
  data: convertedData,
31908
32910
  status: 200,
31909
32911
  statusText: 'OK',
31910
- headers: new AxiosHeaders$1(),
32912
+ headers: new AxiosHeaders(),
31911
32913
  config
31912
32914
  });
31913
32915
  }
@@ -31920,7 +32922,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
31920
32922
  ));
31921
32923
  }
31922
32924
 
31923
- const headers = AxiosHeaders$1.from(config.headers).normalize();
32925
+ const headers = AxiosHeaders.from(config.headers).normalize();
31924
32926
 
31925
32927
  // Set User-Agent (required by some servers)
31926
32928
  // See https://github.com/axios/axios/issues/69
@@ -31998,7 +33000,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
31998
33000
  data = stream.Readable.from(data, {objectMode: false});
31999
33001
  }
32000
33002
 
32001
- data = stream.pipeline([data, new AxiosTransformStream$1({
33003
+ data = stream.pipeline([data, new AxiosTransformStream({
32002
33004
  maxRate: utils$1.toFiniteNumber(maxUploadRate)
32003
33005
  })], utils$1.noop);
32004
33006
 
@@ -32108,7 +33110,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
32108
33110
  const responseLength = +res.headers['content-length'];
32109
33111
 
32110
33112
  if (onDownloadProgress || maxDownloadRate) {
32111
- const transformStream = new AxiosTransformStream$1({
33113
+ const transformStream = new AxiosTransformStream({
32112
33114
  maxRate: utils$1.toFiniteNumber(maxDownloadRate)
32113
33115
  });
32114
33116
 
@@ -32176,7 +33178,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
32176
33178
  const response = {
32177
33179
  status: res.statusCode,
32178
33180
  statusText: res.statusMessage,
32179
- headers: new AxiosHeaders$1(res.headers),
33181
+ headers: new AxiosHeaders(res.headers),
32180
33182
  config,
32181
33183
  request: lastRequest
32182
33184
  };
@@ -32383,7 +33385,7 @@ var cookies = platform.hasStandardBrowserEnv ?
32383
33385
  remove() {}
32384
33386
  };
32385
33387
 
32386
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
33388
+ const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
32387
33389
 
32388
33390
  /**
32389
33391
  * Config-specific merge-function which creates a new config-object
@@ -32476,7 +33478,7 @@ function mergeConfig(config1, config2) {
32476
33478
  headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
32477
33479
  };
32478
33480
 
32479
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
33481
+ utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
32480
33482
  const merge = mergeMap[prop] || mergeDeepProperties;
32481
33483
  const configValue = merge(config1[prop], config2[prop], prop);
32482
33484
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -32488,11 +33490,11 @@ function mergeConfig(config1, config2) {
32488
33490
  var resolveConfig = (config) => {
32489
33491
  const newConfig = mergeConfig({}, config);
32490
33492
 
32491
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
33493
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
32492
33494
 
32493
- newConfig.headers = headers = AxiosHeaders$1.from(headers);
33495
+ newConfig.headers = headers = AxiosHeaders.from(headers);
32494
33496
 
32495
- newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
33497
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
32496
33498
 
32497
33499
  // HTTP basic authentication
32498
33500
  if (auth) {
@@ -32501,17 +33503,21 @@ var resolveConfig = (config) => {
32501
33503
  );
32502
33504
  }
32503
33505
 
32504
- let contentType;
32505
-
32506
33506
  if (utils$1.isFormData(data)) {
32507
33507
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
32508
- headers.setContentType(undefined); // Let the browser set it
32509
- } else if ((contentType = headers.getContentType()) !== false) {
32510
- // fix semicolon duplication issue for ReactNative FormData implementation
32511
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
32512
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
33508
+ headers.setContentType(undefined); // browser handles it
33509
+ } else if (utils$1.isFunction(data.getHeaders)) {
33510
+ // Node.js FormData (like form-data package)
33511
+ const formHeaders = data.getHeaders();
33512
+ // Only set safe headers to avoid overwriting security headers
33513
+ const allowedHeaders = ['content-type', 'content-length'];
33514
+ Object.entries(formHeaders).forEach(([key, val]) => {
33515
+ if (allowedHeaders.includes(key.toLowerCase())) {
33516
+ headers.set(key, val);
33517
+ }
33518
+ });
32513
33519
  }
32514
- }
33520
+ }
32515
33521
 
32516
33522
  // Add xsrf header
32517
33523
  // This is only done if running in a standard browser environment.
@@ -32539,7 +33545,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
32539
33545
  return new Promise(function dispatchXhrRequest(resolve, reject) {
32540
33546
  const _config = resolveConfig(config);
32541
33547
  let requestData = _config.data;
32542
- const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
33548
+ const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
32543
33549
  let {responseType, onUploadProgress, onDownloadProgress} = _config;
32544
33550
  let onCanceled;
32545
33551
  let uploadThrottled, downloadThrottled;
@@ -32566,7 +33572,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
32566
33572
  return;
32567
33573
  }
32568
33574
  // Prepare the response
32569
- const responseHeaders = AxiosHeaders$1.from(
33575
+ const responseHeaders = AxiosHeaders.from(
32570
33576
  'getAllResponseHeaders' in request && request.getAllResponseHeaders()
32571
33577
  );
32572
33578
  const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
@@ -32628,15 +33634,18 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
32628
33634
  };
32629
33635
 
32630
33636
  // Handle low level network errors
32631
- request.onerror = function handleError() {
32632
- // Real errors are hidden from us by the browser
32633
- // onerror should only fire if it's a network error
32634
- reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
32635
-
32636
- // Clean up request
32637
- request = null;
33637
+ request.onerror = function handleError(event) {
33638
+ // Browsers deliver a ProgressEvent in XHR onerror
33639
+ // (message may be empty; when present, surface it)
33640
+ // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
33641
+ const msg = event && event.message ? event.message : 'Network Error';
33642
+ const err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
33643
+ // attach the underlying event for consumers who want details
33644
+ err.event = event || null;
33645
+ reject(err);
33646
+ request = null;
32638
33647
  };
32639
-
33648
+
32640
33649
  // Handle timeout
32641
33650
  request.ontimeout = function handleTimeout() {
32642
33651
  let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
@@ -32763,12 +33772,10 @@ const composeSignals = (signals, timeout) => {
32763
33772
  }
32764
33773
  };
32765
33774
 
32766
- var composeSignals$1 = composeSignals;
32767
-
32768
33775
  const streamChunk = function* (chunk, chunkSize) {
32769
33776
  let len = chunk.byteLength;
32770
33777
 
32771
- if (!chunkSize || len < chunkSize) {
33778
+ if (len < chunkSize) {
32772
33779
  yield chunk;
32773
33780
  return;
32774
33781
  }
@@ -32852,14 +33859,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
32852
33859
  })
32853
33860
  };
32854
33861
 
32855
- const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
32856
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
33862
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
33863
+
33864
+ const {isFunction} = utils$1;
33865
+
33866
+ const globalFetchAPI = (({fetch, Request, Response}) => ({
33867
+ fetch, Request, Response
33868
+ }))(utils$1.global);
33869
+
33870
+ const {
33871
+ ReadableStream: ReadableStream$1, TextEncoder: TextEncoder$1
33872
+ } = utils$1.global;
32857
33873
 
32858
- // used only inside the fetch adapter
32859
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
32860
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
32861
- async (str) => new Uint8Array(await new Response(str).arrayBuffer())
32862
- );
32863
33874
 
32864
33875
  const test = (fn, ...args) => {
32865
33876
  try {
@@ -32869,211 +33880,266 @@ const test = (fn, ...args) => {
32869
33880
  }
32870
33881
  };
32871
33882
 
32872
- const supportsRequestStream = isReadableStreamSupported && test(() => {
32873
- let duplexAccessed = false;
33883
+ const factory = (env) => {
33884
+ const {fetch, Request, Response} = Object.assign({}, globalFetchAPI, env);
33885
+ const isFetchSupported = isFunction(fetch);
33886
+ const isRequestSupported = isFunction(Request);
33887
+ const isResponseSupported = isFunction(Response);
32874
33888
 
32875
- const hasContentType = new Request(platform.origin, {
32876
- body: new ReadableStream(),
32877
- method: 'POST',
32878
- get duplex() {
32879
- duplexAccessed = true;
32880
- return 'half';
32881
- },
32882
- }).headers.has('Content-Type');
33889
+ if (!isFetchSupported) {
33890
+ return false;
33891
+ }
32883
33892
 
32884
- return duplexAccessed && !hasContentType;
32885
- });
33893
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
32886
33894
 
32887
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
33895
+ const encodeText = isFetchSupported && (typeof TextEncoder$1 === 'function' ?
33896
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder$1()) :
33897
+ async (str) => new Uint8Array(await new Request(str).arrayBuffer())
33898
+ );
32888
33899
 
32889
- const supportsResponseStream = isReadableStreamSupported &&
32890
- test(() => utils$1.isReadableStream(new Response('').body));
33900
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
33901
+ let duplexAccessed = false;
32891
33902
 
33903
+ const hasContentType = new Request(platform.origin, {
33904
+ body: new ReadableStream$1(),
33905
+ method: 'POST',
33906
+ get duplex() {
33907
+ duplexAccessed = true;
33908
+ return 'half';
33909
+ },
33910
+ }).headers.has('Content-Type');
32892
33911
 
32893
- const resolvers = {
32894
- stream: supportsResponseStream && ((res) => res.body)
32895
- };
33912
+ return duplexAccessed && !hasContentType;
33913
+ });
33914
+
33915
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
33916
+ test(() => utils$1.isReadableStream(new Response('').body));
33917
+
33918
+ const resolvers = {
33919
+ stream: supportsResponseStream && ((res) => res.body)
33920
+ };
33921
+
33922
+ isFetchSupported && ((() => {
33923
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
33924
+ !resolvers[type] && (resolvers[type] = (res, config) => {
33925
+ let method = res && res[type];
33926
+
33927
+ if (method) {
33928
+ return method.call(res);
33929
+ }
32896
33930
 
32897
- isFetchSupported && (((res) => {
32898
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
32899
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
32900
- (_, config) => {
32901
33931
  throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
32902
33932
  });
32903
- });
32904
- })(new Response));
33933
+ });
33934
+ })());
32905
33935
 
32906
- const getBodyLength = async (body) => {
32907
- if (body == null) {
32908
- return 0;
32909
- }
33936
+ const getBodyLength = async (body) => {
33937
+ if (body == null) {
33938
+ return 0;
33939
+ }
32910
33940
 
32911
- if(utils$1.isBlob(body)) {
32912
- return body.size;
32913
- }
33941
+ if (utils$1.isBlob(body)) {
33942
+ return body.size;
33943
+ }
32914
33944
 
32915
- if(utils$1.isSpecCompliantForm(body)) {
32916
- const _request = new Request(platform.origin, {
32917
- method: 'POST',
32918
- body,
32919
- });
32920
- return (await _request.arrayBuffer()).byteLength;
32921
- }
33945
+ if (utils$1.isSpecCompliantForm(body)) {
33946
+ const _request = new Request(platform.origin, {
33947
+ method: 'POST',
33948
+ body,
33949
+ });
33950
+ return (await _request.arrayBuffer()).byteLength;
33951
+ }
32922
33952
 
32923
- if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
32924
- return body.byteLength;
32925
- }
33953
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
33954
+ return body.byteLength;
33955
+ }
32926
33956
 
32927
- if(utils$1.isURLSearchParams(body)) {
32928
- body = body + '';
32929
- }
33957
+ if (utils$1.isURLSearchParams(body)) {
33958
+ body = body + '';
33959
+ }
32930
33960
 
32931
- if(utils$1.isString(body)) {
32932
- return (await encodeText(body)).byteLength;
32933
- }
32934
- };
33961
+ if (utils$1.isString(body)) {
33962
+ return (await encodeText(body)).byteLength;
33963
+ }
33964
+ };
32935
33965
 
32936
- const resolveBodyLength = async (headers, body) => {
32937
- const length = utils$1.toFiniteNumber(headers.getContentLength());
33966
+ const resolveBodyLength = async (headers, body) => {
33967
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
32938
33968
 
32939
- return length == null ? getBodyLength(body) : length;
32940
- };
33969
+ return length == null ? getBodyLength(body) : length;
33970
+ };
32941
33971
 
32942
- var fetchAdapter = isFetchSupported && (async (config) => {
32943
- let {
32944
- url,
32945
- method,
32946
- data,
32947
- signal,
32948
- cancelToken,
32949
- timeout,
32950
- onDownloadProgress,
32951
- onUploadProgress,
32952
- responseType,
32953
- headers,
32954
- withCredentials = 'same-origin',
32955
- fetchOptions
32956
- } = resolveConfig(config);
33972
+ return async (config) => {
33973
+ let {
33974
+ url,
33975
+ method,
33976
+ data,
33977
+ signal,
33978
+ cancelToken,
33979
+ timeout,
33980
+ onDownloadProgress,
33981
+ onUploadProgress,
33982
+ responseType,
33983
+ headers,
33984
+ withCredentials = 'same-origin',
33985
+ fetchOptions
33986
+ } = resolveConfig(config);
32957
33987
 
32958
- responseType = responseType ? (responseType + '').toLowerCase() : 'text';
33988
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
32959
33989
 
32960
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
33990
+ let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
32961
33991
 
32962
- let request;
33992
+ let request = null;
32963
33993
 
32964
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
33994
+ const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
32965
33995
  composedSignal.unsubscribe();
32966
- });
33996
+ });
32967
33997
 
32968
- let requestContentLength;
33998
+ let requestContentLength;
32969
33999
 
32970
- try {
32971
- if (
32972
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
32973
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
32974
- ) {
32975
- let _request = new Request(url, {
32976
- method: 'POST',
32977
- body: data,
32978
- duplex: "half"
32979
- });
34000
+ try {
34001
+ if (
34002
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
34003
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
34004
+ ) {
34005
+ let _request = new Request(url, {
34006
+ method: 'POST',
34007
+ body: data,
34008
+ duplex: "half"
34009
+ });
32980
34010
 
32981
- let contentTypeHeader;
34011
+ let contentTypeHeader;
32982
34012
 
32983
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
32984
- headers.setContentType(contentTypeHeader);
32985
- }
34013
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
34014
+ headers.setContentType(contentTypeHeader);
34015
+ }
32986
34016
 
32987
- if (_request.body) {
32988
- const [onProgress, flush] = progressEventDecorator(
32989
- requestContentLength,
32990
- progressEventReducer(asyncDecorator(onUploadProgress))
32991
- );
34017
+ if (_request.body) {
34018
+ const [onProgress, flush] = progressEventDecorator(
34019
+ requestContentLength,
34020
+ progressEventReducer(asyncDecorator(onUploadProgress))
34021
+ );
32992
34022
 
32993
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
34023
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
34024
+ }
32994
34025
  }
32995
- }
32996
34026
 
32997
- if (!utils$1.isString(withCredentials)) {
32998
- withCredentials = withCredentials ? 'include' : 'omit';
32999
- }
34027
+ if (!utils$1.isString(withCredentials)) {
34028
+ withCredentials = withCredentials ? 'include' : 'omit';
34029
+ }
33000
34030
 
33001
- // Cloudflare Workers throws when credentials are defined
33002
- // see https://github.com/cloudflare/workerd/issues/902
33003
- const isCredentialsSupported = "credentials" in Request.prototype;
33004
- request = new Request(url, {
33005
- ...fetchOptions,
33006
- signal: composedSignal,
33007
- method: method.toUpperCase(),
33008
- headers: headers.normalize().toJSON(),
33009
- body: data,
33010
- duplex: "half",
33011
- credentials: isCredentialsSupported ? withCredentials : undefined
33012
- });
34031
+ // Cloudflare Workers throws when credentials are defined
34032
+ // see https://github.com/cloudflare/workerd/issues/902
34033
+ const isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
33013
34034
 
33014
- let response = await fetch(request);
34035
+ const resolvedOptions = {
34036
+ ...fetchOptions,
34037
+ signal: composedSignal,
34038
+ method: method.toUpperCase(),
34039
+ headers: headers.normalize().toJSON(),
34040
+ body: data,
34041
+ duplex: "half",
34042
+ credentials: isCredentialsSupported ? withCredentials : undefined
34043
+ };
33015
34044
 
33016
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
34045
+ request = isRequestSupported && new Request(url, resolvedOptions);
33017
34046
 
33018
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
33019
- const options = {};
34047
+ let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
33020
34048
 
33021
- ['status', 'statusText', 'headers'].forEach(prop => {
33022
- options[prop] = response[prop];
33023
- });
34049
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
33024
34050
 
33025
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
34051
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
34052
+ const options = {};
33026
34053
 
33027
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
33028
- responseContentLength,
33029
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
33030
- ) || [];
34054
+ ['status', 'statusText', 'headers'].forEach(prop => {
34055
+ options[prop] = response[prop];
34056
+ });
33031
34057
 
33032
- response = new Response(
33033
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
33034
- flush && flush();
33035
- unsubscribe && unsubscribe();
33036
- }),
33037
- options
33038
- );
33039
- }
34058
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
33040
34059
 
33041
- responseType = responseType || 'text';
34060
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
34061
+ responseContentLength,
34062
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
34063
+ ) || [];
33042
34064
 
33043
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
34065
+ response = new Response(
34066
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
34067
+ flush && flush();
34068
+ unsubscribe && unsubscribe();
34069
+ }),
34070
+ options
34071
+ );
34072
+ }
33044
34073
 
33045
- !isStreamResponse && unsubscribe && unsubscribe();
34074
+ responseType = responseType || 'text';
33046
34075
 
33047
- return await new Promise((resolve, reject) => {
33048
- settle(resolve, reject, {
33049
- data: responseData,
33050
- headers: AxiosHeaders$1.from(response.headers),
33051
- status: response.status,
33052
- statusText: response.statusText,
33053
- config,
33054
- request
33055
- });
33056
- })
33057
- } catch (err) {
33058
- unsubscribe && unsubscribe();
33059
-
33060
- if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
33061
- throw Object.assign(
33062
- new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
33063
- {
33064
- cause: err.cause || err
33065
- }
33066
- )
34076
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
34077
+
34078
+ !isStreamResponse && unsubscribe && unsubscribe();
34079
+
34080
+ return await new Promise((resolve, reject) => {
34081
+ settle(resolve, reject, {
34082
+ data: responseData,
34083
+ headers: AxiosHeaders.from(response.headers),
34084
+ status: response.status,
34085
+ statusText: response.statusText,
34086
+ config,
34087
+ request
34088
+ });
34089
+ })
34090
+ } catch (err) {
34091
+ unsubscribe && unsubscribe();
34092
+
34093
+ if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
34094
+ throw Object.assign(
34095
+ new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
34096
+ {
34097
+ cause: err.cause || err
34098
+ }
34099
+ )
34100
+ }
34101
+
34102
+ throw AxiosError.from(err, err && err.code, config, request);
33067
34103
  }
34104
+ }
34105
+ };
34106
+
34107
+ const seedCache = new Map();
34108
+
34109
+ const getFetch = (config) => {
34110
+ let env = utils$1.merge.call({
34111
+ skipUndefined: true
34112
+ }, globalFetchAPI, config ? config.env : null);
34113
+
34114
+ const {fetch, Request, Response} = env;
33068
34115
 
33069
- throw AxiosError.from(err, err && err.code, config, request);
34116
+ const seeds = [
34117
+ Request, Response, fetch
34118
+ ];
34119
+
34120
+ let len = seeds.length, i = len,
34121
+ seed, target, map = seedCache;
34122
+
34123
+ while (i--) {
34124
+ seed = seeds[i];
34125
+ target = map.get(seed);
34126
+
34127
+ target === undefined && map.set(seed, target = (i ? new Map() : factory(env)));
34128
+
34129
+ map = target;
33070
34130
  }
33071
- });
34131
+
34132
+ return target;
34133
+ };
34134
+
34135
+ getFetch();
33072
34136
 
33073
34137
  const knownAdapters = {
33074
34138
  http: httpAdapter,
33075
34139
  xhr: xhrAdapter,
33076
- fetch: fetchAdapter
34140
+ fetch: {
34141
+ get: getFetch,
34142
+ }
33077
34143
  };
33078
34144
 
33079
34145
  utils$1.forEach(knownAdapters, (fn, value) => {
@@ -33092,7 +34158,7 @@ const renderReason = (reason) => `- ${reason}`;
33092
34158
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
33093
34159
 
33094
34160
  var adapters = {
33095
- getAdapter: (adapters) => {
34161
+ getAdapter: (adapters, config) => {
33096
34162
  adapters = utils$1.isArray(adapters) ? adapters : [adapters];
33097
34163
 
33098
34164
  const {length} = adapters;
@@ -33115,7 +34181,7 @@ var adapters = {
33115
34181
  }
33116
34182
  }
33117
34183
 
33118
- if (adapter) {
34184
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
33119
34185
  break;
33120
34186
  }
33121
34187
 
@@ -33171,7 +34237,7 @@ function throwIfCancellationRequested(config) {
33171
34237
  function dispatchRequest(config) {
33172
34238
  throwIfCancellationRequested(config);
33173
34239
 
33174
- config.headers = AxiosHeaders$1.from(config.headers);
34240
+ config.headers = AxiosHeaders.from(config.headers);
33175
34241
 
33176
34242
  // Transform request data
33177
34243
  config.data = transformData.call(
@@ -33183,7 +34249,7 @@ function dispatchRequest(config) {
33183
34249
  config.headers.setContentType('application/x-www-form-urlencoded', false);
33184
34250
  }
33185
34251
 
33186
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
34252
+ const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
33187
34253
 
33188
34254
  return adapter(config).then(function onAdapterResolution(response) {
33189
34255
  throwIfCancellationRequested(config);
@@ -33195,7 +34261,7 @@ function dispatchRequest(config) {
33195
34261
  response
33196
34262
  );
33197
34263
 
33198
- response.headers = AxiosHeaders$1.from(response.headers);
34264
+ response.headers = AxiosHeaders.from(response.headers);
33199
34265
 
33200
34266
  return response;
33201
34267
  }, function onAdapterRejection(reason) {
@@ -33209,7 +34275,7 @@ function dispatchRequest(config) {
33209
34275
  config.transformResponse,
33210
34276
  reason.response
33211
34277
  );
33212
- reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
34278
+ reason.response.headers = AxiosHeaders.from(reason.response.headers);
33213
34279
  }
33214
34280
  }
33215
34281
 
@@ -33323,7 +34389,7 @@ const validators = validator.validators;
33323
34389
  */
33324
34390
  class Axios {
33325
34391
  constructor(instanceConfig) {
33326
- this.defaults = instanceConfig;
34392
+ this.defaults = instanceConfig || {};
33327
34393
  this.interceptors = {
33328
34394
  request: new InterceptorManager(),
33329
34395
  response: new InterceptorManager()
@@ -33428,7 +34494,7 @@ class Axios {
33428
34494
  }
33429
34495
  );
33430
34496
 
33431
- config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
34497
+ config.headers = AxiosHeaders.concat(contextHeaders, headers);
33432
34498
 
33433
34499
  // filter out skipped interceptors
33434
34500
  const requestInterceptorChain = [];
@@ -33454,8 +34520,8 @@ class Axios {
33454
34520
 
33455
34521
  if (!synchronousRequestInterceptors) {
33456
34522
  const chain = [dispatchRequest.bind(this), undefined];
33457
- chain.unshift.apply(chain, requestInterceptorChain);
33458
- chain.push.apply(chain, responseInterceptorChain);
34523
+ chain.unshift(...requestInterceptorChain);
34524
+ chain.push(...responseInterceptorChain);
33459
34525
  len = chain.length;
33460
34526
 
33461
34527
  promise = Promise.resolve(config);
@@ -33540,8 +34606,6 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
33540
34606
  Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
33541
34607
  });
33542
34608
 
33543
- var Axios$1 = Axios;
33544
-
33545
34609
  /**
33546
34610
  * A `CancelToken` is an object that can be used to request cancellation of an operation.
33547
34611
  *
@@ -33672,8 +34736,6 @@ class CancelToken {
33672
34736
  }
33673
34737
  }
33674
34738
 
33675
- var CancelToken$1 = CancelToken;
33676
-
33677
34739
  /**
33678
34740
  * Syntactic sugar for invoking a function and expanding an array for arguments.
33679
34741
  *
@@ -33782,8 +34844,6 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
33782
34844
  HttpStatusCode[value] = key;
33783
34845
  });
33784
34846
 
33785
- var HttpStatusCode$1 = HttpStatusCode;
33786
-
33787
34847
  /**
33788
34848
  * Create an instance of Axios
33789
34849
  *
@@ -33792,11 +34852,11 @@ var HttpStatusCode$1 = HttpStatusCode;
33792
34852
  * @returns {Axios} A new instance of Axios
33793
34853
  */
33794
34854
  function createInstance(defaultConfig) {
33795
- const context = new Axios$1(defaultConfig);
33796
- const instance = bind(Axios$1.prototype.request, context);
34855
+ const context = new Axios(defaultConfig);
34856
+ const instance = bind$2(Axios.prototype.request, context);
33797
34857
 
33798
34858
  // Copy axios.prototype to instance
33799
- utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
34859
+ utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
33800
34860
 
33801
34861
  // Copy context to instance
33802
34862
  utils$1.extend(instance, context, null, {allOwnKeys: true});
@@ -33810,14 +34870,14 @@ function createInstance(defaultConfig) {
33810
34870
  }
33811
34871
 
33812
34872
  // Create the default instance to be exported
33813
- const axios = createInstance(defaults$1);
34873
+ const axios = createInstance(defaults);
33814
34874
 
33815
34875
  // Expose Axios class to allow class inheritance
33816
- axios.Axios = Axios$1;
34876
+ axios.Axios = Axios;
33817
34877
 
33818
34878
  // Expose Cancel & CancelToken
33819
34879
  axios.CanceledError = CanceledError;
33820
- axios.CancelToken = CancelToken$1;
34880
+ axios.CancelToken = CancelToken;
33821
34881
  axios.isCancel = isCancel;
33822
34882
  axios.VERSION = VERSION;
33823
34883
  axios.toFormData = toFormData;
@@ -33841,13 +34901,13 @@ axios.isAxiosError = isAxiosError;
33841
34901
  // Expose mergeConfig
33842
34902
  axios.mergeConfig = mergeConfig;
33843
34903
 
33844
- axios.AxiosHeaders = AxiosHeaders$1;
34904
+ axios.AxiosHeaders = AxiosHeaders;
33845
34905
 
33846
34906
  axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
33847
34907
 
33848
34908
  axios.getAdapter = adapters.getAdapter;
33849
34909
 
33850
- axios.HttpStatusCode = HttpStatusCode$1;
34910
+ axios.HttpStatusCode = HttpStatusCode;
33851
34911
 
33852
34912
  axios.default = axios;
33853
34913
 
@@ -33888,7 +34948,7 @@ const addBigbinaryPackagesToRecommendedList = async (recommendedList) => {
33888
34948
  await new Promise((resolve) => setTimeout(resolve, REQUEST_DELAY));
33889
34949
  if (retries === MAX_RETRIES) {
33890
34950
  console.log(
33891
- chalk$1.yellowBright(
34951
+ chalk.yellowBright(
33892
34952
  "\nCouldn't connect to nanos release tool. Please retry or verify the link is working correctly."
33893
34953
  )
33894
34954
  );
@@ -33937,7 +34997,7 @@ const getOutdatedPackages = (
33937
34997
  dependenciesToCheck
33938
34998
  );
33939
34999
 
33940
- const outdatedPackages = pickBy(not$1, packages);
35000
+ const outdatedPackages = pickBy(not, packages);
33941
35001
 
33942
35002
  return { type, outdatedPackages: Object.keys(outdatedPackages) };
33943
35003
  });
@@ -33958,7 +35018,7 @@ const getInstallationCommands = (recommendPackages, packagesToUpdate) =>
33958
35018
  Object.entries(recommendPackages).map(([type, packages]) => {
33959
35019
  const { outdatedPackages } = findBy({ type }, packagesToUpdate);
33960
35020
 
33961
- if (isEmpty$1(outdatedPackages) || type === "peerDependencies") {
35021
+ if (isEmpty(outdatedPackages) || type === "peerDependencies") {
33962
35022
  return;
33963
35023
  }
33964
35024
 
@@ -34055,5 +35115,5 @@ const run = async () => {
34055
35115
  };
34056
35116
 
34057
35117
  process.env.SKIP_AUDIT === "true"
34058
- ? console.log(chalk$1.green("Skipped frontend audit"))
35118
+ ? console.log(chalk.green("Skipped frontend audit"))
34059
35119
  : run();