@bigbinary/neeto-audit-frontend 2.2.0 → 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.
- package/common/recommendedDependencies/common.js +1 -1
- package/common/recommendedDependencies/extension.js +3 -3
- package/common/recommendedDependencies/frontend.js +5 -5
- package/common/recommendedDependencies/nano.js +5 -5
- package/dist/index.js +2053 -988
- package/package.json +3 -3
- package/src/constants/index.js +7 -0
- package/src/utils/index.js +20 -18
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
2045
|
-
return curryN
|
|
2046
|
-
return _arrayReduce(ap
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
9121
|
-
success: chalk
|
|
9122
|
-
warning: chalk
|
|
9123
|
-
error: chalk
|
|
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
|
|
9128
|
-
success: chalk
|
|
9129
|
-
warning: chalk
|
|
9130
|
-
error: chalk
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
@@ -15427,22 +15407,27 @@ const NANO_TYPE_MAP = {
|
|
|
15427
15407
|
molecules: "frontend",
|
|
15428
15408
|
};
|
|
15429
15409
|
|
|
15410
|
+
const REMOTE_URL_PREFIXES = [
|
|
15411
|
+
"git@github.com:bigbinary/",
|
|
15412
|
+
"github.com/bigbinary/",
|
|
15413
|
+
"git@github.com:neetozone/",
|
|
15414
|
+
"github.com/neetozone/",
|
|
15415
|
+
];
|
|
15416
|
+
|
|
15430
15417
|
const run$1 = require$$1$2.promisify(exec);
|
|
15431
15418
|
|
|
15432
15419
|
const execute = async (command, debug) => {
|
|
15433
|
-
|
|
15434
|
-
debug && console.log("stdout:", stdout);
|
|
15435
|
-
debug && console.log("stderr:", stderr);
|
|
15420
|
+
await run$1(command);
|
|
15436
15421
|
};
|
|
15437
15422
|
|
|
15438
15423
|
const renderErrors = (errors = [], isAutoFixFlagPresent = false) => {
|
|
15439
|
-
console.log(`\n${chalk
|
|
15440
|
-
console.log(chalk
|
|
15424
|
+
console.log(`\n${chalk.bgRed.black("ERRORS")}`);
|
|
15425
|
+
console.log(chalk.red(` \u2022 ${errors.join("\n \u2022 ")}`));
|
|
15441
15426
|
if (!isAutoFixFlagPresent) {
|
|
15442
15427
|
console.log(
|
|
15443
|
-
chalk
|
|
15428
|
+
chalk.yellowBright(
|
|
15444
15429
|
"\nPlease run the following command to auto-fix the errors: "
|
|
15445
|
-
) + chalk
|
|
15430
|
+
) + chalk.bgYellowBright.black(" yarn neeto-audit-frontend -a ")
|
|
15446
15431
|
);
|
|
15447
15432
|
process.exitCode = 1;
|
|
15448
15433
|
}
|
|
@@ -15481,7 +15466,7 @@ const runAutoFix = async ({ verifiers, autoFix, debug }) => {
|
|
|
15481
15466
|
|
|
15482
15467
|
const allResults = await Promise.all(results);
|
|
15483
15468
|
|
|
15484
|
-
return allResults.every(identity
|
|
15469
|
+
return allResults.every(identity);
|
|
15485
15470
|
};
|
|
15486
15471
|
|
|
15487
15472
|
const getCliOptions = () => {
|
|
@@ -15496,7 +15481,7 @@ const getCliOptions = () => {
|
|
|
15496
15481
|
|
|
15497
15482
|
const getFileContent = async ({
|
|
15498
15483
|
relativeFilePath = "",
|
|
15499
|
-
debug = false
|
|
15484
|
+
debug = false,
|
|
15500
15485
|
}) => {
|
|
15501
15486
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
15502
15487
|
|
|
@@ -15512,7 +15497,7 @@ const createOrReplaceFile = async ({
|
|
|
15512
15497
|
relativeFilePath = "",
|
|
15513
15498
|
content = "",
|
|
15514
15499
|
debug = false,
|
|
15515
|
-
options = {}
|
|
15500
|
+
options = {},
|
|
15516
15501
|
}) => {
|
|
15517
15502
|
const resolvedFilePath = path$2.resolve(relativeFilePath);
|
|
15518
15503
|
|
|
@@ -15520,7 +15505,7 @@ const createOrReplaceFile = async ({
|
|
|
15520
15505
|
return await writeFile(resolvedFilePath, content, {
|
|
15521
15506
|
encoding: "utf8",
|
|
15522
15507
|
flag: "w",
|
|
15523
|
-
...options
|
|
15508
|
+
...options,
|
|
15524
15509
|
});
|
|
15525
15510
|
} catch (error) {
|
|
15526
15511
|
debug && console.error(error);
|
|
@@ -15531,7 +15516,7 @@ const createOrReplaceFile = async ({
|
|
|
15531
15516
|
const identicalFiles = async ({
|
|
15532
15517
|
sourceFile = "",
|
|
15533
15518
|
destinationFile = "",
|
|
15534
|
-
debug = false
|
|
15519
|
+
debug = false,
|
|
15535
15520
|
}) => {
|
|
15536
15521
|
try {
|
|
15537
15522
|
const sourceFileContent = await readFile(sourceFile);
|
|
@@ -15549,7 +15534,7 @@ const identicalFiles = async ({
|
|
|
15549
15534
|
const identicalDirectoryFiles = async ({
|
|
15550
15535
|
sourceDirectory,
|
|
15551
15536
|
destinationDirectory,
|
|
15552
|
-
debug
|
|
15537
|
+
debug,
|
|
15553
15538
|
}) => {
|
|
15554
15539
|
try {
|
|
15555
15540
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -15564,19 +15549,19 @@ const identicalDirectoryFiles = async ({
|
|
|
15564
15549
|
return await identicalFiles({
|
|
15565
15550
|
sourceFile,
|
|
15566
15551
|
destinationFile,
|
|
15567
|
-
debug
|
|
15552
|
+
debug,
|
|
15568
15553
|
});
|
|
15569
15554
|
} else {
|
|
15570
15555
|
await mkdir(destinationFile, { recursive: true });
|
|
15571
15556
|
const identicalFiles = await identicalDirectoryFiles({
|
|
15572
15557
|
sourceDirectory: sourceFile,
|
|
15573
15558
|
destinationDirectory: destinationFile,
|
|
15574
|
-
debug
|
|
15559
|
+
debug,
|
|
15575
15560
|
});
|
|
15576
15561
|
|
|
15577
15562
|
const results = await Promise.all(identicalFiles);
|
|
15578
15563
|
|
|
15579
|
-
return results.every(identity
|
|
15564
|
+
return results.every(identity);
|
|
15580
15565
|
}
|
|
15581
15566
|
});
|
|
15582
15567
|
|
|
@@ -15591,7 +15576,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15591
15576
|
sourceDirectory,
|
|
15592
15577
|
destinationDirectory,
|
|
15593
15578
|
debug,
|
|
15594
|
-
options
|
|
15579
|
+
options,
|
|
15595
15580
|
}) => {
|
|
15596
15581
|
try {
|
|
15597
15582
|
const files = await promises.readdir(sourceDirectory);
|
|
@@ -15605,14 +15590,14 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15605
15590
|
if (isFile) {
|
|
15606
15591
|
const content = await getFileContent({
|
|
15607
15592
|
relativeFilePath: sourcePath,
|
|
15608
|
-
debug
|
|
15593
|
+
debug,
|
|
15609
15594
|
});
|
|
15610
15595
|
|
|
15611
15596
|
await createOrReplaceFile({
|
|
15612
15597
|
relativeFilePath: destinationPath,
|
|
15613
15598
|
content,
|
|
15614
15599
|
debug,
|
|
15615
|
-
options
|
|
15600
|
+
options,
|
|
15616
15601
|
});
|
|
15617
15602
|
} else {
|
|
15618
15603
|
await mkdir(destinationPath, { recursive: true });
|
|
@@ -15620,7 +15605,7 @@ const createOrReplaceDirectoryFiles = async ({
|
|
|
15620
15605
|
sourceDirectory: sourcePath,
|
|
15621
15606
|
destinationDirectory: destinationPath,
|
|
15622
15607
|
debug,
|
|
15623
|
-
options
|
|
15608
|
+
options,
|
|
15624
15609
|
});
|
|
15625
15610
|
}
|
|
15626
15611
|
});
|
|
@@ -15636,8 +15621,8 @@ const runVerifiers = async ({ verifiers, autoFix, debug }) => {
|
|
|
15636
15621
|
|
|
15637
15622
|
results.map(({ name, isSuccess, status }) => {
|
|
15638
15623
|
const resultText = isSuccess
|
|
15639
|
-
? chalk
|
|
15640
|
-
: chalk
|
|
15624
|
+
? chalk.bgGreen.black(status)
|
|
15625
|
+
: chalk.bgRed.black(status);
|
|
15641
15626
|
console.log(resultText, name);
|
|
15642
15627
|
});
|
|
15643
15628
|
|
|
@@ -15647,11 +15632,11 @@ const runVerifiers = async ({ verifiers, autoFix, debug }) => {
|
|
|
15647
15632
|
console.log("\nRunning auto-fix:");
|
|
15648
15633
|
const result = await runAutoFix({ verifiers, autoFix, debug });
|
|
15649
15634
|
if (result) {
|
|
15650
|
-
console.log("\n" + chalk
|
|
15635
|
+
console.log("\n" + chalk.green("All issues have been fixed!"));
|
|
15651
15636
|
} else {
|
|
15652
15637
|
console.log(
|
|
15653
15638
|
"\n" +
|
|
15654
|
-
chalk
|
|
15639
|
+
chalk.red(
|
|
15655
15640
|
"We were not able to fix all issues. Please fix the issues manually."
|
|
15656
15641
|
)
|
|
15657
15642
|
);
|
|
@@ -15665,22 +15650,20 @@ const getNanoType = async () => {
|
|
|
15665
15650
|
const git = simpleGit();
|
|
15666
15651
|
const { value: remoteOriginUrl } = await git.getConfig("remote.origin.url");
|
|
15667
15652
|
|
|
15668
|
-
const
|
|
15669
|
-
|
|
15670
|
-
remoteOriginUrl.split("github.com/bigbinary/").at(1);
|
|
15671
|
-
|
|
15653
|
+
const prefix = REMOTE_URL_PREFIXES.find((p) => remoteOriginUrl.includes(p));
|
|
15654
|
+
const projectGitName = remoteOriginUrl.split(prefix).at(1);
|
|
15672
15655
|
const projectName = projectGitName.split(".git").at(0);
|
|
15673
15656
|
|
|
15674
15657
|
return {
|
|
15675
15658
|
type: NANO_TYPE_MAP[last$1(split("-", projectName))],
|
|
15676
|
-
repoName: projectName
|
|
15659
|
+
repoName: projectName,
|
|
15677
15660
|
};
|
|
15678
15661
|
};
|
|
15679
15662
|
|
|
15680
15663
|
const getPackageJson = async (debug) => {
|
|
15681
15664
|
const packageJsonContent = await getFileContent({
|
|
15682
15665
|
relativeFilePath: PACKAGE_JSON_PATH,
|
|
15683
|
-
debug
|
|
15666
|
+
debug,
|
|
15684
15667
|
});
|
|
15685
15668
|
|
|
15686
15669
|
return JSON.parse(packageJsonContent);
|
|
@@ -15771,7 +15754,7 @@ const eslint = async (debug) => {
|
|
|
15771
15754
|
|
|
15772
15755
|
const eslintFiles = await Promise.all(eslintDirectory);
|
|
15773
15756
|
|
|
15774
|
-
const isSuccess = eslintFiles.every(identity
|
|
15757
|
+
const isSuccess = eslintFiles.every(identity);
|
|
15775
15758
|
|
|
15776
15759
|
if (!isSuccess) {
|
|
15777
15760
|
return {
|
|
@@ -15840,7 +15823,7 @@ const husky = async (debug) => {
|
|
|
15840
15823
|
...huskyNanoDirectory,
|
|
15841
15824
|
]);
|
|
15842
15825
|
|
|
15843
|
-
const isSuccess = huskyFiles.every(identity
|
|
15826
|
+
const isSuccess = huskyFiles.every(identity);
|
|
15844
15827
|
|
|
15845
15828
|
if (!isSuccess) {
|
|
15846
15829
|
return {
|
|
@@ -15890,7 +15873,7 @@ const prettier = async (debug) => {
|
|
|
15890
15873
|
|
|
15891
15874
|
const prettierFiles = await Promise.all(prettierDirectory);
|
|
15892
15875
|
|
|
15893
|
-
const isSuccess = prettierFiles.every(identity
|
|
15876
|
+
const isSuccess = prettierFiles.every(identity);
|
|
15894
15877
|
|
|
15895
15878
|
if (!isSuccess) {
|
|
15896
15879
|
return {
|
|
@@ -15950,7 +15933,7 @@ const DEV_DEPENDENCIES$4 = {
|
|
|
15950
15933
|
"postcss-loader": "^7.0.1",
|
|
15951
15934
|
"postcss-preset-env": "7.8.2",
|
|
15952
15935
|
"prettier": "3",
|
|
15953
|
-
"prettier-plugin-tailwindcss": "0.
|
|
15936
|
+
"prettier-plugin-tailwindcss": "0.6.14",
|
|
15954
15937
|
};
|
|
15955
15938
|
|
|
15956
15939
|
const PEER_DEPENDENCIES$4 = {};
|
|
@@ -15969,12 +15952,12 @@ const DEPENDENCIES$3 = {
|
|
|
15969
15952
|
"i18next": "22.5.1",
|
|
15970
15953
|
"js-logger": "1.6.1",
|
|
15971
15954
|
ramda: "0.29.1",
|
|
15972
|
-
react: "18.
|
|
15973
|
-
"react-dom": "18.
|
|
15955
|
+
react: "18.3.1",
|
|
15956
|
+
"react-dom": "18.3.1",
|
|
15974
15957
|
"react-i18next": "12.3.1",
|
|
15975
15958
|
"react-router-dom": "5.3.3",
|
|
15976
15959
|
"react-toastify": "8.0.2",
|
|
15977
|
-
sass: "1.
|
|
15960
|
+
sass: "1.89.0",
|
|
15978
15961
|
yup: "0.32.11",
|
|
15979
15962
|
};
|
|
15980
15963
|
|
|
@@ -16027,9 +16010,9 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16027
16010
|
"path-browserify": "1.0.1",
|
|
16028
16011
|
"qs": "6.13.0",
|
|
16029
16012
|
"ramda": "0.29.1",
|
|
16030
|
-
"react": "18.
|
|
16013
|
+
"react": "18.3.1",
|
|
16031
16014
|
"react-colorful": "5.6.1",
|
|
16032
|
-
"react-dom": "18.
|
|
16015
|
+
"react-dom": "18.3.1",
|
|
16033
16016
|
"react-drag-listview": "2.0.0",
|
|
16034
16017
|
"react-helmet": "^6.1.0",
|
|
16035
16018
|
"react-i18next": "12.3.1",
|
|
@@ -16042,7 +16025,7 @@ const DEV_DEPENDENCIES$2 = {
|
|
|
16042
16025
|
"rollup-plugin-copy": "3.5.0",
|
|
16043
16026
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
16044
16027
|
"rollup-plugin-styles": "4.0.0",
|
|
16045
|
-
"sass": "1.
|
|
16028
|
+
"sass": "1.89.0",
|
|
16046
16029
|
"sass-loader": "^13.0.2",
|
|
16047
16030
|
"stream-browserify": "^3.0.0",
|
|
16048
16031
|
"stream-http": "3.2.0",
|
|
@@ -16085,9 +16068,9 @@ const PEER_DEPENDENCIES$2 = {
|
|
|
16085
16068
|
"path-browserify": "^1.0.1",
|
|
16086
16069
|
"qs": "6.13.0",
|
|
16087
16070
|
"ramda": "0.29.1",
|
|
16088
|
-
"react": "18.
|
|
16071
|
+
"react": "18.3.1",
|
|
16089
16072
|
"react-colorful": "5.6.1",
|
|
16090
|
-
"react-dom": "18.
|
|
16073
|
+
"react-dom": "18.3.1",
|
|
16091
16074
|
"react-drag-listview": "2.0.0",
|
|
16092
16075
|
"react-dropzone": "14.3.8",
|
|
16093
16076
|
"react-helmet": "^6.1.0",
|
|
@@ -16136,8 +16119,8 @@ const DEV_DEPENDENCIES$1 = {
|
|
|
16136
16119
|
"js-logger": "1.6.1",
|
|
16137
16120
|
qs: "6.13.0",
|
|
16138
16121
|
ramda: "0.29.0",
|
|
16139
|
-
react: "18.
|
|
16140
|
-
"react-dom": "18.
|
|
16122
|
+
react: "18.3.1",
|
|
16123
|
+
"react-dom": "18.3.1",
|
|
16141
16124
|
"react-helmet": "^6.1.0",
|
|
16142
16125
|
"react-i18next": "12.3.1",
|
|
16143
16126
|
"react-router-dom": "5.3.3",
|
|
@@ -16147,7 +16130,7 @@ const DEV_DEPENDENCIES$1 = {
|
|
|
16147
16130
|
"rollup-plugin-cleaner": "1.0.0",
|
|
16148
16131
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
16149
16132
|
"rollup-plugin-styles": "4.0.0",
|
|
16150
|
-
"sass": "1.
|
|
16133
|
+
"sass": "1.89.0",
|
|
16151
16134
|
tailwindcss: "3.4.14",
|
|
16152
16135
|
util: "^0.12.5",
|
|
16153
16136
|
yup: "0.32.11",
|
|
@@ -16164,8 +16147,8 @@ const PEER_DEPENDENCIES$1 = {
|
|
|
16164
16147
|
"i18next": "22.5.1",
|
|
16165
16148
|
"js-logger": "1.6.1",
|
|
16166
16149
|
ramda: "0.29.0",
|
|
16167
|
-
react: "18.
|
|
16168
|
-
"react-dom": "18.
|
|
16150
|
+
react: "18.3.1",
|
|
16151
|
+
"react-dom": "18.3.1",
|
|
16169
16152
|
"react-helmet": "^6.1.0",
|
|
16170
16153
|
"react-i18next": "12.3.1",
|
|
16171
16154
|
"react-router-dom": "5.3.3",
|
|
@@ -16193,7 +16176,7 @@ var widget = {
|
|
|
16193
16176
|
|
|
16194
16177
|
var recommendedDependencies = { common, extension, frontend, nano, widget };
|
|
16195
16178
|
|
|
16196
|
-
function bind(fn, thisArg) {
|
|
16179
|
+
function bind$2(fn, thisArg) {
|
|
16197
16180
|
return function wrap() {
|
|
16198
16181
|
return fn.apply(thisArg, arguments);
|
|
16199
16182
|
};
|
|
@@ -16203,6 +16186,7 @@ function bind(fn, thisArg) {
|
|
|
16203
16186
|
|
|
16204
16187
|
const {toString} = Object.prototype;
|
|
16205
16188
|
const {getPrototypeOf} = Object;
|
|
16189
|
+
const {iterator, toStringTag: toStringTag$1} = Symbol;
|
|
16206
16190
|
|
|
16207
16191
|
const kindOf = (cache => thing => {
|
|
16208
16192
|
const str = toString.call(thing);
|
|
@@ -16243,7 +16227,7 @@ const isUndefined = typeOfTest('undefined');
|
|
|
16243
16227
|
*/
|
|
16244
16228
|
function isBuffer$1(val) {
|
|
16245
16229
|
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
|
16246
|
-
&& isFunction$
|
|
16230
|
+
&& isFunction$2(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
16247
16231
|
}
|
|
16248
16232
|
|
|
16249
16233
|
/**
|
|
@@ -16288,7 +16272,7 @@ const isString$1 = typeOfTest('string');
|
|
|
16288
16272
|
* @param {*} val The value to test
|
|
16289
16273
|
* @returns {boolean} True if value is a Function, otherwise false
|
|
16290
16274
|
*/
|
|
16291
|
-
const isFunction$
|
|
16275
|
+
const isFunction$2 = typeOfTest('function');
|
|
16292
16276
|
|
|
16293
16277
|
/**
|
|
16294
16278
|
* Determine if a value is a Number
|
|
@@ -16329,7 +16313,28 @@ const isPlainObject = (val) => {
|
|
|
16329
16313
|
}
|
|
16330
16314
|
|
|
16331
16315
|
const prototype = getPrototypeOf(val);
|
|
16332
|
-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(
|
|
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
|
+
}
|
|
16333
16338
|
};
|
|
16334
16339
|
|
|
16335
16340
|
/**
|
|
@@ -16375,7 +16380,7 @@ const isFileList = kindOfTest('FileList');
|
|
|
16375
16380
|
*
|
|
16376
16381
|
* @returns {boolean} True if value is a Stream, otherwise false
|
|
16377
16382
|
*/
|
|
16378
|
-
const isStream = (val) => isObject(val) && isFunction$
|
|
16383
|
+
const isStream = (val) => isObject(val) && isFunction$2(val.pipe);
|
|
16379
16384
|
|
|
16380
16385
|
/**
|
|
16381
16386
|
* Determine if a value is a FormData
|
|
@@ -16388,10 +16393,10 @@ const isFormData = (thing) => {
|
|
|
16388
16393
|
let kind;
|
|
16389
16394
|
return thing && (
|
|
16390
16395
|
(typeof FormData === 'function' && thing instanceof FormData) || (
|
|
16391
|
-
isFunction$
|
|
16396
|
+
isFunction$2(thing.append) && (
|
|
16392
16397
|
(kind = kindOf(thing)) === 'formdata' ||
|
|
16393
16398
|
// detect form-data instance
|
|
16394
|
-
(kind === 'object' && isFunction$
|
|
16399
|
+
(kind === 'object' && isFunction$2(thing.toString) && thing.toString() === '[object FormData]')
|
|
16395
16400
|
)
|
|
16396
16401
|
)
|
|
16397
16402
|
)
|
|
@@ -16454,6 +16459,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
16454
16459
|
fn.call(null, obj[i], i, obj);
|
|
16455
16460
|
}
|
|
16456
16461
|
} else {
|
|
16462
|
+
// Buffer check
|
|
16463
|
+
if (isBuffer$1(obj)) {
|
|
16464
|
+
return;
|
|
16465
|
+
}
|
|
16466
|
+
|
|
16457
16467
|
// Iterate over object keys
|
|
16458
16468
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
16459
16469
|
const len = keys.length;
|
|
@@ -16467,6 +16477,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|
|
16467
16477
|
}
|
|
16468
16478
|
|
|
16469
16479
|
function findKey(obj, key) {
|
|
16480
|
+
if (isBuffer$1(obj)){
|
|
16481
|
+
return null;
|
|
16482
|
+
}
|
|
16483
|
+
|
|
16470
16484
|
key = key.toLowerCase();
|
|
16471
16485
|
const keys = Object.keys(obj);
|
|
16472
16486
|
let i = keys.length;
|
|
@@ -16507,7 +16521,7 @@ const isContextDefined = (context) => !isUndefined(context) && context !== _glob
|
|
|
16507
16521
|
* @returns {Object} Result of all merge properties
|
|
16508
16522
|
*/
|
|
16509
16523
|
function merge(/* obj1, obj2, obj3, ... */) {
|
|
16510
|
-
const {caseless} = isContextDefined(this) && this || {};
|
|
16524
|
+
const {caseless, skipUndefined} = isContextDefined(this) && this || {};
|
|
16511
16525
|
const result = {};
|
|
16512
16526
|
const assignValue = (val, key) => {
|
|
16513
16527
|
const targetKey = caseless && findKey(result, key) || key;
|
|
@@ -16518,7 +16532,9 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
16518
16532
|
} else if (isArray(val)) {
|
|
16519
16533
|
result[targetKey] = val.slice();
|
|
16520
16534
|
} else {
|
|
16521
|
-
|
|
16535
|
+
if (!skipUndefined || !isUndefined(val)) {
|
|
16536
|
+
result[targetKey] = val;
|
|
16537
|
+
}
|
|
16522
16538
|
}
|
|
16523
16539
|
};
|
|
16524
16540
|
|
|
@@ -16540,8 +16556,8 @@ function merge(/* obj1, obj2, obj3, ... */) {
|
|
|
16540
16556
|
*/
|
|
16541
16557
|
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
|
|
16542
16558
|
forEach(b, (val, key) => {
|
|
16543
|
-
if (thisArg && isFunction$
|
|
16544
|
-
a[key] = bind(val, thisArg);
|
|
16559
|
+
if (thisArg && isFunction$2(val)) {
|
|
16560
|
+
a[key] = bind$2(val, thisArg);
|
|
16545
16561
|
} else {
|
|
16546
16562
|
a[key] = val;
|
|
16547
16563
|
}
|
|
@@ -16680,13 +16696,13 @@ const isTypedArray = (TypedArray => {
|
|
|
16680
16696
|
* @returns {void}
|
|
16681
16697
|
*/
|
|
16682
16698
|
const forEachEntry = (obj, fn) => {
|
|
16683
|
-
const generator = obj && obj[
|
|
16699
|
+
const generator = obj && obj[iterator];
|
|
16684
16700
|
|
|
16685
|
-
const
|
|
16701
|
+
const _iterator = generator.call(obj);
|
|
16686
16702
|
|
|
16687
16703
|
let result;
|
|
16688
16704
|
|
|
16689
|
-
while ((result =
|
|
16705
|
+
while ((result = _iterator.next()) && !result.done) {
|
|
16690
16706
|
const pair = result.value;
|
|
16691
16707
|
fn.call(obj, pair[0], pair[1]);
|
|
16692
16708
|
}
|
|
@@ -16756,13 +16772,13 @@ const reduceDescriptors = (obj, reducer) => {
|
|
|
16756
16772
|
const freezeMethods = (obj) => {
|
|
16757
16773
|
reduceDescriptors(obj, (descriptor, name) => {
|
|
16758
16774
|
// skip restricted props in strict mode
|
|
16759
|
-
if (isFunction$
|
|
16775
|
+
if (isFunction$2(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
|
|
16760
16776
|
return false;
|
|
16761
16777
|
}
|
|
16762
16778
|
|
|
16763
16779
|
const value = obj[name];
|
|
16764
16780
|
|
|
16765
|
-
if (!isFunction$
|
|
16781
|
+
if (!isFunction$2(value)) return;
|
|
16766
16782
|
|
|
16767
16783
|
descriptor.enumerable = false;
|
|
16768
16784
|
|
|
@@ -16799,6 +16815,8 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
16799
16815
|
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
16800
16816
|
};
|
|
16801
16817
|
|
|
16818
|
+
|
|
16819
|
+
|
|
16802
16820
|
/**
|
|
16803
16821
|
* If the thing is a FormData object, return true, otherwise return false.
|
|
16804
16822
|
*
|
|
@@ -16807,7 +16825,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
16807
16825
|
* @returns {boolean}
|
|
16808
16826
|
*/
|
|
16809
16827
|
function isSpecCompliantForm(thing) {
|
|
16810
|
-
return !!(thing && isFunction$
|
|
16828
|
+
return !!(thing && isFunction$2(thing.append) && thing[toStringTag$1] === 'FormData' && thing[iterator]);
|
|
16811
16829
|
}
|
|
16812
16830
|
|
|
16813
16831
|
const toJSONObject = (obj) => {
|
|
@@ -16820,6 +16838,11 @@ const toJSONObject = (obj) => {
|
|
|
16820
16838
|
return;
|
|
16821
16839
|
}
|
|
16822
16840
|
|
|
16841
|
+
//Buffer check
|
|
16842
|
+
if (isBuffer$1(source)) {
|
|
16843
|
+
return source;
|
|
16844
|
+
}
|
|
16845
|
+
|
|
16823
16846
|
if(!('toJSON' in source)) {
|
|
16824
16847
|
stack[i] = source;
|
|
16825
16848
|
const target = isArray(source) ? [] : {};
|
|
@@ -16844,7 +16867,7 @@ const toJSONObject = (obj) => {
|
|
|
16844
16867
|
const isAsyncFn = kindOfTest('AsyncFunction');
|
|
16845
16868
|
|
|
16846
16869
|
const isThenable = (thing) =>
|
|
16847
|
-
thing && (isObject(thing) || isFunction$
|
|
16870
|
+
thing && (isObject(thing) || isFunction$2(thing)) && isFunction$2(thing.then) && isFunction$2(thing.catch);
|
|
16848
16871
|
|
|
16849
16872
|
// original code
|
|
16850
16873
|
// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
|
|
@@ -16868,7 +16891,7 @@ const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
|
16868
16891
|
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
16869
16892
|
})(
|
|
16870
16893
|
typeof setImmediate === 'function',
|
|
16871
|
-
isFunction$
|
|
16894
|
+
isFunction$2(_global.postMessage)
|
|
16872
16895
|
);
|
|
16873
16896
|
|
|
16874
16897
|
const asap = typeof queueMicrotask !== 'undefined' ?
|
|
@@ -16876,6 +16899,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|
|
16876
16899
|
|
|
16877
16900
|
// *********************
|
|
16878
16901
|
|
|
16902
|
+
|
|
16903
|
+
const isIterable = (thing) => thing != null && isFunction$2(thing[iterator]);
|
|
16904
|
+
|
|
16905
|
+
|
|
16879
16906
|
var utils$1 = {
|
|
16880
16907
|
isArray,
|
|
16881
16908
|
isArrayBuffer,
|
|
@@ -16887,6 +16914,7 @@ var utils$1 = {
|
|
|
16887
16914
|
isBoolean,
|
|
16888
16915
|
isObject,
|
|
16889
16916
|
isPlainObject,
|
|
16917
|
+
isEmptyObject,
|
|
16890
16918
|
isReadableStream,
|
|
16891
16919
|
isRequest,
|
|
16892
16920
|
isResponse,
|
|
@@ -16896,7 +16924,7 @@ var utils$1 = {
|
|
|
16896
16924
|
isFile,
|
|
16897
16925
|
isBlob,
|
|
16898
16926
|
isRegExp,
|
|
16899
|
-
isFunction: isFunction$
|
|
16927
|
+
isFunction: isFunction$2,
|
|
16900
16928
|
isStream,
|
|
16901
16929
|
isURLSearchParams,
|
|
16902
16930
|
isTypedArray,
|
|
@@ -16931,7 +16959,8 @@ var utils$1 = {
|
|
|
16931
16959
|
isAsyncFn,
|
|
16932
16960
|
isThenable,
|
|
16933
16961
|
setImmediate: _setImmediate,
|
|
16934
|
-
asap
|
|
16962
|
+
asap,
|
|
16963
|
+
isIterable
|
|
16935
16964
|
};
|
|
16936
16965
|
|
|
16937
16966
|
/**
|
|
@@ -17021,11 +17050,18 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
17021
17050
|
return prop !== 'isAxiosError';
|
|
17022
17051
|
});
|
|
17023
17052
|
|
|
17024
|
-
|
|
17053
|
+
const msg = error && error.message ? error.message : 'Error';
|
|
17025
17054
|
|
|
17026
|
-
|
|
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
|
+
}
|
|
17027
17063
|
|
|
17028
|
-
axiosError.name = error.name;
|
|
17064
|
+
axiosError.name = (error && error.name) || 'Error';
|
|
17029
17065
|
|
|
17030
17066
|
customProps && Object.assign(axiosError, customProps);
|
|
17031
17067
|
|
|
@@ -28642,12 +28678,878 @@ var asynckit$1 =
|
|
|
28642
28678
|
serialOrdered : serialOrderedExports
|
|
28643
28679
|
};
|
|
28644
28680
|
|
|
28645
|
-
|
|
28646
|
-
var
|
|
28681
|
+
/** @type {import('.')} */
|
|
28682
|
+
var esObjectAtoms = Object;
|
|
28647
28683
|
|
|
28648
|
-
|
|
28649
|
-
|
|
28650
|
-
|
|
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
|
|
28651
29553
|
});
|
|
28652
29554
|
|
|
28653
29555
|
return dst;
|
|
@@ -28661,23 +29563,20 @@ var https$1 = require$$4$1;
|
|
|
28661
29563
|
var parseUrl$2 = require$$0$5.parse;
|
|
28662
29564
|
var fs = require$$3;
|
|
28663
29565
|
var Stream = stream.Stream;
|
|
29566
|
+
var crypto = require$$8;
|
|
28664
29567
|
var mime = mimeTypes;
|
|
28665
29568
|
var asynckit = asynckit$1;
|
|
29569
|
+
var setToStringTag = esSetTostringtag;
|
|
29570
|
+
var hasOwn = hasown;
|
|
28666
29571
|
var populate = populate$1;
|
|
28667
29572
|
|
|
28668
|
-
// Public API
|
|
28669
|
-
var form_data = FormData$1;
|
|
28670
|
-
|
|
28671
|
-
// make it a Stream
|
|
28672
|
-
util.inherits(FormData$1, CombinedStream);
|
|
28673
|
-
|
|
28674
29573
|
/**
|
|
28675
29574
|
* Create readable "multipart/form-data" streams.
|
|
28676
29575
|
* Can be used to submit forms
|
|
28677
29576
|
* and file uploads to other web applications.
|
|
28678
29577
|
*
|
|
28679
29578
|
* @constructor
|
|
28680
|
-
* @param {
|
|
29579
|
+
* @param {object} options - Properties to be added/overriden for FormData and CombinedStream
|
|
28681
29580
|
*/
|
|
28682
29581
|
function FormData$1(options) {
|
|
28683
29582
|
if (!(this instanceof FormData$1)) {
|
|
@@ -28690,35 +29589,39 @@ function FormData$1(options) {
|
|
|
28690
29589
|
|
|
28691
29590
|
CombinedStream.call(this);
|
|
28692
29591
|
|
|
28693
|
-
options = options || {};
|
|
28694
|
-
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
|
|
28695
29594
|
this[option] = options[option];
|
|
28696
29595
|
}
|
|
28697
29596
|
}
|
|
28698
29597
|
|
|
29598
|
+
// make it a Stream
|
|
29599
|
+
util.inherits(FormData$1, CombinedStream);
|
|
29600
|
+
|
|
28699
29601
|
FormData$1.LINE_BREAK = '\r\n';
|
|
28700
29602
|
FormData$1.DEFAULT_CONTENT_TYPE = 'application/octet-stream';
|
|
28701
29603
|
|
|
28702
|
-
FormData$1.prototype.append = function(field, value, options) {
|
|
28703
|
-
|
|
28704
|
-
options = options || {};
|
|
29604
|
+
FormData$1.prototype.append = function (field, value, options) {
|
|
29605
|
+
options = options || {}; // eslint-disable-line no-param-reassign
|
|
28705
29606
|
|
|
28706
29607
|
// allow filename as single option
|
|
28707
|
-
if (typeof options
|
|
28708
|
-
options = {filename: options};
|
|
29608
|
+
if (typeof options === 'string') {
|
|
29609
|
+
options = { filename: options }; // eslint-disable-line no-param-reassign
|
|
28709
29610
|
}
|
|
28710
29611
|
|
|
28711
29612
|
var append = CombinedStream.prototype.append.bind(this);
|
|
28712
29613
|
|
|
28713
29614
|
// all that streamy business can't handle numbers
|
|
28714
|
-
if (typeof value
|
|
28715
|
-
value =
|
|
29615
|
+
if (typeof value === 'number' || value == null) {
|
|
29616
|
+
value = String(value); // eslint-disable-line no-param-reassign
|
|
28716
29617
|
}
|
|
28717
29618
|
|
|
28718
29619
|
// https://github.com/felixge/node-form-data/issues/38
|
|
28719
|
-
if (
|
|
28720
|
-
|
|
28721
|
-
|
|
29620
|
+
if (Array.isArray(value)) {
|
|
29621
|
+
/*
|
|
29622
|
+
* Please convert your array into string
|
|
29623
|
+
* the way web server expects it
|
|
29624
|
+
*/
|
|
28722
29625
|
this._error(new Error('Arrays are not supported.'));
|
|
28723
29626
|
return;
|
|
28724
29627
|
}
|
|
@@ -28734,15 +29637,17 @@ FormData$1.prototype.append = function(field, value, options) {
|
|
|
28734
29637
|
this._trackLength(header, value, options);
|
|
28735
29638
|
};
|
|
28736
29639
|
|
|
28737
|
-
FormData$1.prototype._trackLength = function(header, value, options) {
|
|
29640
|
+
FormData$1.prototype._trackLength = function (header, value, options) {
|
|
28738
29641
|
var valueLength = 0;
|
|
28739
29642
|
|
|
28740
|
-
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
|
|
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
|
+
*/
|
|
28744
29649
|
if (options.knownLength != null) {
|
|
28745
|
-
valueLength +=
|
|
29650
|
+
valueLength += Number(options.knownLength);
|
|
28746
29651
|
} else if (Buffer.isBuffer(value)) {
|
|
28747
29652
|
valueLength = value.length;
|
|
28748
29653
|
} else if (typeof value === 'string') {
|
|
@@ -28752,12 +29657,10 @@ FormData$1.prototype._trackLength = function(header, value, options) {
|
|
|
28752
29657
|
this._valueLength += valueLength;
|
|
28753
29658
|
|
|
28754
29659
|
// @check why add CRLF? does this account for custom/multiple CRLFs?
|
|
28755
|
-
this._overheadLength +=
|
|
28756
|
-
Buffer.byteLength(header) +
|
|
28757
|
-
FormData$1.LINE_BREAK.length;
|
|
29660
|
+
this._overheadLength += Buffer.byteLength(header) + FormData$1.LINE_BREAK.length;
|
|
28758
29661
|
|
|
28759
29662
|
// empty or either doesn't have path or not an http response or not a stream
|
|
28760
|
-
if (!value || (
|
|
29663
|
+
if (!value || (!value.path && !(value.readable && hasOwn(value, 'httpVersion')) && !(value instanceof Stream))) {
|
|
28761
29664
|
return;
|
|
28762
29665
|
}
|
|
28763
29666
|
|
|
@@ -28767,10 +29670,8 @@ FormData$1.prototype._trackLength = function(header, value, options) {
|
|
|
28767
29670
|
}
|
|
28768
29671
|
};
|
|
28769
29672
|
|
|
28770
|
-
FormData$1.prototype._lengthRetriever = function(value, callback) {
|
|
28771
|
-
|
|
28772
|
-
if (value.hasOwnProperty('fd')) {
|
|
28773
|
-
|
|
29673
|
+
FormData$1.prototype._lengthRetriever = function (value, callback) {
|
|
29674
|
+
if (hasOwn(value, 'fd')) {
|
|
28774
29675
|
// take read range into a account
|
|
28775
29676
|
// `end` = Infinity –> read file till the end
|
|
28776
29677
|
//
|
|
@@ -28779,54 +29680,52 @@ FormData$1.prototype._lengthRetriever = function(value, callback) {
|
|
|
28779
29680
|
// Fix it when node fixes it.
|
|
28780
29681
|
// https://github.com/joyent/node/issues/7819
|
|
28781
29682
|
if (value.end != undefined && value.end != Infinity && value.start != undefined) {
|
|
28782
|
-
|
|
28783
29683
|
// when end specified
|
|
28784
29684
|
// no need to calculate range
|
|
28785
29685
|
// inclusive, starts with 0
|
|
28786
|
-
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
|
|
28787
29687
|
|
|
28788
|
-
|
|
29688
|
+
// not that fast snoopy
|
|
28789
29689
|
} else {
|
|
28790
29690
|
// still need to fetch file size from fs
|
|
28791
|
-
fs.stat(value.path, function(err, stat) {
|
|
28792
|
-
|
|
28793
|
-
var fileSize;
|
|
28794
|
-
|
|
29691
|
+
fs.stat(value.path, function (err, stat) {
|
|
28795
29692
|
if (err) {
|
|
28796
29693
|
callback(err);
|
|
28797
29694
|
return;
|
|
28798
29695
|
}
|
|
28799
29696
|
|
|
28800
29697
|
// update final size based on the range options
|
|
28801
|
-
fileSize = stat.size - (value.start ? value.start : 0);
|
|
29698
|
+
var fileSize = stat.size - (value.start ? value.start : 0);
|
|
28802
29699
|
callback(null, fileSize);
|
|
28803
29700
|
});
|
|
28804
29701
|
}
|
|
28805
29702
|
|
|
28806
|
-
|
|
28807
|
-
} else if (value
|
|
28808
|
-
callback(null,
|
|
29703
|
+
// or http response
|
|
29704
|
+
} else if (hasOwn(value, 'httpVersion')) {
|
|
29705
|
+
callback(null, Number(value.headers['content-length'])); // eslint-disable-line callback-return
|
|
28809
29706
|
|
|
28810
|
-
|
|
28811
|
-
} else if (value
|
|
29707
|
+
// or request stream http://github.com/mikeal/request
|
|
29708
|
+
} else if (hasOwn(value, 'httpModule')) {
|
|
28812
29709
|
// wait till response come back
|
|
28813
|
-
value.on('response', function(response) {
|
|
29710
|
+
value.on('response', function (response) {
|
|
28814
29711
|
value.pause();
|
|
28815
|
-
callback(null,
|
|
29712
|
+
callback(null, Number(response.headers['content-length']));
|
|
28816
29713
|
});
|
|
28817
29714
|
value.resume();
|
|
28818
29715
|
|
|
28819
|
-
|
|
29716
|
+
// something else
|
|
28820
29717
|
} else {
|
|
28821
|
-
callback('Unknown stream');
|
|
29718
|
+
callback('Unknown stream'); // eslint-disable-line callback-return
|
|
28822
29719
|
}
|
|
28823
29720
|
};
|
|
28824
29721
|
|
|
28825
|
-
FormData$1.prototype._multiPartHeader = function(field, value, options) {
|
|
28826
|
-
|
|
28827
|
-
|
|
28828
|
-
|
|
28829
|
-
|
|
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') {
|
|
28830
29729
|
return options.header;
|
|
28831
29730
|
}
|
|
28832
29731
|
|
|
@@ -28834,7 +29733,7 @@ FormData$1.prototype._multiPartHeader = function(field, value, options) {
|
|
|
28834
29733
|
var contentType = this._getContentType(value, options);
|
|
28835
29734
|
|
|
28836
29735
|
var contents = '';
|
|
28837
|
-
var headers
|
|
29736
|
+
var headers = {
|
|
28838
29737
|
// add custom disposition as third element or keep it two elements if not
|
|
28839
29738
|
'Content-Disposition': ['form-data', 'name="' + field + '"'].concat(contentDisposition || []),
|
|
28840
29739
|
// if no content type. allow it to be empty array
|
|
@@ -28842,77 +29741,74 @@ FormData$1.prototype._multiPartHeader = function(field, value, options) {
|
|
|
28842
29741
|
};
|
|
28843
29742
|
|
|
28844
29743
|
// allow custom headers.
|
|
28845
|
-
if (typeof options.header
|
|
29744
|
+
if (typeof options.header === 'object') {
|
|
28846
29745
|
populate(headers, options.header);
|
|
28847
29746
|
}
|
|
28848
29747
|
|
|
28849
29748
|
var header;
|
|
28850
|
-
for (var prop in headers) {
|
|
28851
|
-
if (
|
|
28852
|
-
|
|
29749
|
+
for (var prop in headers) { // eslint-disable-line no-restricted-syntax
|
|
29750
|
+
if (hasOwn(headers, prop)) {
|
|
29751
|
+
header = headers[prop];
|
|
28853
29752
|
|
|
28854
|
-
|
|
28855
|
-
|
|
28856
|
-
|
|
28857
|
-
|
|
29753
|
+
// skip nullish headers.
|
|
29754
|
+
if (header == null) {
|
|
29755
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
29756
|
+
}
|
|
28858
29757
|
|
|
28859
|
-
|
|
28860
|
-
|
|
28861
|
-
|
|
28862
|
-
|
|
29758
|
+
// convert all headers to arrays.
|
|
29759
|
+
if (!Array.isArray(header)) {
|
|
29760
|
+
header = [header];
|
|
29761
|
+
}
|
|
28863
29762
|
|
|
28864
|
-
|
|
28865
|
-
|
|
28866
|
-
|
|
29763
|
+
// add non-empty headers.
|
|
29764
|
+
if (header.length) {
|
|
29765
|
+
contents += prop + ': ' + header.join('; ') + FormData$1.LINE_BREAK;
|
|
29766
|
+
}
|
|
28867
29767
|
}
|
|
28868
29768
|
}
|
|
28869
29769
|
|
|
28870
29770
|
return '--' + this.getBoundary() + FormData$1.LINE_BREAK + contents + FormData$1.LINE_BREAK;
|
|
28871
29771
|
};
|
|
28872
29772
|
|
|
28873
|
-
FormData$1.prototype._getContentDisposition = function(value, options) {
|
|
28874
|
-
|
|
28875
|
-
var filename
|
|
28876
|
-
, contentDisposition
|
|
28877
|
-
;
|
|
29773
|
+
FormData$1.prototype._getContentDisposition = function (value, options) { // eslint-disable-line consistent-return
|
|
29774
|
+
var filename;
|
|
28878
29775
|
|
|
28879
29776
|
if (typeof options.filepath === 'string') {
|
|
28880
29777
|
// custom filepath for relative paths
|
|
28881
29778
|
filename = path.normalize(options.filepath).replace(/\\/g, '/');
|
|
28882
|
-
} else if (options.filename || value.name || value.path) {
|
|
28883
|
-
|
|
28884
|
-
|
|
28885
|
-
|
|
28886
|
-
|
|
28887
|
-
|
|
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')) {
|
|
28888
29787
|
// or try http response
|
|
28889
29788
|
filename = path.basename(value.client._httpMessage.path || '');
|
|
28890
29789
|
}
|
|
28891
29790
|
|
|
28892
29791
|
if (filename) {
|
|
28893
|
-
|
|
29792
|
+
return 'filename="' + filename + '"';
|
|
28894
29793
|
}
|
|
28895
|
-
|
|
28896
|
-
return contentDisposition;
|
|
28897
29794
|
};
|
|
28898
29795
|
|
|
28899
|
-
FormData$1.prototype._getContentType = function(value, options) {
|
|
28900
|
-
|
|
29796
|
+
FormData$1.prototype._getContentType = function (value, options) {
|
|
28901
29797
|
// use custom content-type above all
|
|
28902
29798
|
var contentType = options.contentType;
|
|
28903
29799
|
|
|
28904
29800
|
// or try `name` from formidable, browser
|
|
28905
|
-
if (!contentType && value.name) {
|
|
29801
|
+
if (!contentType && value && value.name) {
|
|
28906
29802
|
contentType = mime.lookup(value.name);
|
|
28907
29803
|
}
|
|
28908
29804
|
|
|
28909
29805
|
// or try `path` from fs-, request- streams
|
|
28910
|
-
if (!contentType && value.path) {
|
|
29806
|
+
if (!contentType && value && value.path) {
|
|
28911
29807
|
contentType = mime.lookup(value.path);
|
|
28912
29808
|
}
|
|
28913
29809
|
|
|
28914
29810
|
// or if it's http-reponse
|
|
28915
|
-
if (!contentType && value.readable && value
|
|
29811
|
+
if (!contentType && value && value.readable && hasOwn(value, 'httpVersion')) {
|
|
28916
29812
|
contentType = value.headers['content-type'];
|
|
28917
29813
|
}
|
|
28918
29814
|
|
|
@@ -28922,18 +29818,18 @@ FormData$1.prototype._getContentType = function(value, options) {
|
|
|
28922
29818
|
}
|
|
28923
29819
|
|
|
28924
29820
|
// fallback to the default content type if `value` is not simple value
|
|
28925
|
-
if (!contentType && typeof value
|
|
29821
|
+
if (!contentType && value && typeof value === 'object') {
|
|
28926
29822
|
contentType = FormData$1.DEFAULT_CONTENT_TYPE;
|
|
28927
29823
|
}
|
|
28928
29824
|
|
|
28929
29825
|
return contentType;
|
|
28930
29826
|
};
|
|
28931
29827
|
|
|
28932
|
-
FormData$1.prototype._multiPartFooter = function() {
|
|
28933
|
-
return function(next) {
|
|
29828
|
+
FormData$1.prototype._multiPartFooter = function () {
|
|
29829
|
+
return function (next) {
|
|
28934
29830
|
var footer = FormData$1.LINE_BREAK;
|
|
28935
29831
|
|
|
28936
|
-
var lastPart =
|
|
29832
|
+
var lastPart = this._streams.length === 0;
|
|
28937
29833
|
if (lastPart) {
|
|
28938
29834
|
footer += this._lastBoundary();
|
|
28939
29835
|
}
|
|
@@ -28942,18 +29838,18 @@ FormData$1.prototype._multiPartFooter = function() {
|
|
|
28942
29838
|
}.bind(this);
|
|
28943
29839
|
};
|
|
28944
29840
|
|
|
28945
|
-
FormData$1.prototype._lastBoundary = function() {
|
|
29841
|
+
FormData$1.prototype._lastBoundary = function () {
|
|
28946
29842
|
return '--' + this.getBoundary() + '--' + FormData$1.LINE_BREAK;
|
|
28947
29843
|
};
|
|
28948
29844
|
|
|
28949
|
-
FormData$1.prototype.getHeaders = function(userHeaders) {
|
|
29845
|
+
FormData$1.prototype.getHeaders = function (userHeaders) {
|
|
28950
29846
|
var header;
|
|
28951
29847
|
var formHeaders = {
|
|
28952
29848
|
'content-type': 'multipart/form-data; boundary=' + this.getBoundary()
|
|
28953
29849
|
};
|
|
28954
29850
|
|
|
28955
|
-
for (header in userHeaders) {
|
|
28956
|
-
if (userHeaders
|
|
29851
|
+
for (header in userHeaders) { // eslint-disable-line no-restricted-syntax
|
|
29852
|
+
if (hasOwn(userHeaders, header)) {
|
|
28957
29853
|
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
28958
29854
|
}
|
|
28959
29855
|
}
|
|
@@ -28961,11 +29857,14 @@ FormData$1.prototype.getHeaders = function(userHeaders) {
|
|
|
28961
29857
|
return formHeaders;
|
|
28962
29858
|
};
|
|
28963
29859
|
|
|
28964
|
-
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
|
+
}
|
|
28965
29864
|
this._boundary = boundary;
|
|
28966
29865
|
};
|
|
28967
29866
|
|
|
28968
|
-
FormData$1.prototype.getBoundary = function() {
|
|
29867
|
+
FormData$1.prototype.getBoundary = function () {
|
|
28969
29868
|
if (!this._boundary) {
|
|
28970
29869
|
this._generateBoundary();
|
|
28971
29870
|
}
|
|
@@ -28973,60 +29872,55 @@ FormData$1.prototype.getBoundary = function() {
|
|
|
28973
29872
|
return this._boundary;
|
|
28974
29873
|
};
|
|
28975
29874
|
|
|
28976
|
-
FormData$1.prototype.getBuffer = function() {
|
|
28977
|
-
var dataBuffer = new Buffer.alloc(
|
|
29875
|
+
FormData$1.prototype.getBuffer = function () {
|
|
29876
|
+
var dataBuffer = new Buffer.alloc(0); // eslint-disable-line new-cap
|
|
28978
29877
|
var boundary = this.getBoundary();
|
|
28979
29878
|
|
|
28980
29879
|
// Create the form content. Add Line breaks to the end of data.
|
|
28981
29880
|
for (var i = 0, len = this._streams.length; i < len; i++) {
|
|
28982
29881
|
if (typeof this._streams[i] !== 'function') {
|
|
28983
|
-
|
|
28984
29882
|
// Add content to the buffer.
|
|
28985
|
-
if(Buffer.isBuffer(this._streams[i])) {
|
|
28986
|
-
dataBuffer = Buffer.concat(
|
|
28987
|
-
}else {
|
|
28988
|
-
dataBuffer = Buffer.concat(
|
|
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])]);
|
|
28989
29887
|
}
|
|
28990
29888
|
|
|
28991
29889
|
// Add break after content.
|
|
28992
|
-
if (typeof this._streams[i] !== 'string' || this._streams[i].substring(
|
|
28993
|
-
dataBuffer = Buffer.concat(
|
|
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)]);
|
|
28994
29892
|
}
|
|
28995
29893
|
}
|
|
28996
29894
|
}
|
|
28997
29895
|
|
|
28998
29896
|
// Add the footer and return the Buffer object.
|
|
28999
|
-
return Buffer.concat(
|
|
29897
|
+
return Buffer.concat([dataBuffer, Buffer.from(this._lastBoundary())]);
|
|
29000
29898
|
};
|
|
29001
29899
|
|
|
29002
|
-
FormData$1.prototype._generateBoundary = function() {
|
|
29900
|
+
FormData$1.prototype._generateBoundary = function () {
|
|
29003
29901
|
// This generates a 50 character boundary similar to those used by Firefox.
|
|
29004
|
-
// They are optimized for boyer-moore parsing.
|
|
29005
|
-
var boundary = '--------------------------';
|
|
29006
|
-
for (var i = 0; i < 24; i++) {
|
|
29007
|
-
boundary += Math.floor(Math.random() * 10).toString(16);
|
|
29008
|
-
}
|
|
29009
29902
|
|
|
29010
|
-
|
|
29903
|
+
// They are optimized for boyer-moore parsing.
|
|
29904
|
+
this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex');
|
|
29011
29905
|
};
|
|
29012
29906
|
|
|
29013
29907
|
// Note: getLengthSync DOESN'T calculate streams length
|
|
29014
|
-
// As workaround one can calculate file size manually
|
|
29015
|
-
|
|
29016
|
-
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 () {
|
|
29017
29910
|
var knownLength = this._overheadLength + this._valueLength;
|
|
29018
29911
|
|
|
29019
|
-
// Don't get confused, there are 3 "internal" streams for each keyval pair
|
|
29020
|
-
// 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
|
|
29021
29913
|
if (this._streams.length) {
|
|
29022
29914
|
knownLength += this._lastBoundary().length;
|
|
29023
29915
|
}
|
|
29024
29916
|
|
|
29025
29917
|
// https://github.com/form-data/form-data/issues/40
|
|
29026
29918
|
if (!this.hasKnownLength()) {
|
|
29027
|
-
|
|
29028
|
-
|
|
29029
|
-
|
|
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
|
+
*/
|
|
29030
29924
|
this._error(new Error('Cannot calculate proper length in synchronous way.'));
|
|
29031
29925
|
}
|
|
29032
29926
|
|
|
@@ -29036,7 +29930,7 @@ FormData$1.prototype.getLengthSync = function() {
|
|
|
29036
29930
|
// Public API to check if length of added values is known
|
|
29037
29931
|
// https://github.com/form-data/form-data/issues/196
|
|
29038
29932
|
// https://github.com/form-data/form-data/issues/262
|
|
29039
|
-
FormData$1.prototype.hasKnownLength = function() {
|
|
29933
|
+
FormData$1.prototype.hasKnownLength = function () {
|
|
29040
29934
|
var hasKnownLength = true;
|
|
29041
29935
|
|
|
29042
29936
|
if (this._valuesToMeasure.length) {
|
|
@@ -29046,7 +29940,7 @@ FormData$1.prototype.hasKnownLength = function() {
|
|
|
29046
29940
|
return hasKnownLength;
|
|
29047
29941
|
};
|
|
29048
29942
|
|
|
29049
|
-
FormData$1.prototype.getLength = function(cb) {
|
|
29943
|
+
FormData$1.prototype.getLength = function (cb) {
|
|
29050
29944
|
var knownLength = this._overheadLength + this._valueLength;
|
|
29051
29945
|
|
|
29052
29946
|
if (this._streams.length) {
|
|
@@ -29058,13 +29952,13 @@ FormData$1.prototype.getLength = function(cb) {
|
|
|
29058
29952
|
return;
|
|
29059
29953
|
}
|
|
29060
29954
|
|
|
29061
|
-
asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function(err, values) {
|
|
29955
|
+
asynckit.parallel(this._valuesToMeasure, this._lengthRetriever, function (err, values) {
|
|
29062
29956
|
if (err) {
|
|
29063
29957
|
cb(err);
|
|
29064
29958
|
return;
|
|
29065
29959
|
}
|
|
29066
29960
|
|
|
29067
|
-
values.forEach(function(length) {
|
|
29961
|
+
values.forEach(function (length) {
|
|
29068
29962
|
knownLength += length;
|
|
29069
29963
|
});
|
|
29070
29964
|
|
|
@@ -29072,31 +29966,26 @@ FormData$1.prototype.getLength = function(cb) {
|
|
|
29072
29966
|
});
|
|
29073
29967
|
};
|
|
29074
29968
|
|
|
29075
|
-
FormData$1.prototype.submit = function(params, cb) {
|
|
29076
|
-
var request
|
|
29077
|
-
|
|
29078
|
-
|
|
29079
|
-
;
|
|
29969
|
+
FormData$1.prototype.submit = function (params, cb) {
|
|
29970
|
+
var request;
|
|
29971
|
+
var options;
|
|
29972
|
+
var defaults = { method: 'post' };
|
|
29080
29973
|
|
|
29081
|
-
// parse provided url if it's string
|
|
29082
|
-
|
|
29083
|
-
|
|
29084
|
-
|
|
29085
|
-
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 */
|
|
29086
29978
|
options = populate({
|
|
29087
29979
|
port: params.port,
|
|
29088
29980
|
path: params.pathname,
|
|
29089
29981
|
host: params.hostname,
|
|
29090
29982
|
protocol: params.protocol
|
|
29091
29983
|
}, defaults);
|
|
29092
|
-
|
|
29093
|
-
// use custom params
|
|
29094
|
-
} else {
|
|
29095
|
-
|
|
29984
|
+
} else { // use custom params
|
|
29096
29985
|
options = populate(params, defaults);
|
|
29097
29986
|
// if no port provided use default one
|
|
29098
29987
|
if (!options.port) {
|
|
29099
|
-
options.port = options.protocol
|
|
29988
|
+
options.port = options.protocol === 'https:' ? 443 : 80;
|
|
29100
29989
|
}
|
|
29101
29990
|
}
|
|
29102
29991
|
|
|
@@ -29104,14 +29993,14 @@ FormData$1.prototype.submit = function(params, cb) {
|
|
|
29104
29993
|
options.headers = this.getHeaders(params.headers);
|
|
29105
29994
|
|
|
29106
29995
|
// https if specified, fallback to http in any other case
|
|
29107
|
-
if (options.protocol
|
|
29996
|
+
if (options.protocol === 'https:') {
|
|
29108
29997
|
request = https$1.request(options);
|
|
29109
29998
|
} else {
|
|
29110
29999
|
request = http$1.request(options);
|
|
29111
30000
|
}
|
|
29112
30001
|
|
|
29113
30002
|
// get content length and fire away
|
|
29114
|
-
this.getLength(function(err, length) {
|
|
30003
|
+
this.getLength(function (err, length) {
|
|
29115
30004
|
if (err && err !== 'Unknown stream') {
|
|
29116
30005
|
this._error(err);
|
|
29117
30006
|
return;
|
|
@@ -29130,7 +30019,7 @@ FormData$1.prototype.submit = function(params, cb) {
|
|
|
29130
30019
|
request.removeListener('error', callback);
|
|
29131
30020
|
request.removeListener('response', onResponse);
|
|
29132
30021
|
|
|
29133
|
-
return cb.call(this, error, responce);
|
|
30022
|
+
return cb.call(this, error, responce); // eslint-disable-line no-invalid-this
|
|
29134
30023
|
};
|
|
29135
30024
|
|
|
29136
30025
|
onResponse = callback.bind(this, null);
|
|
@@ -29143,7 +30032,7 @@ FormData$1.prototype.submit = function(params, cb) {
|
|
|
29143
30032
|
return request;
|
|
29144
30033
|
};
|
|
29145
30034
|
|
|
29146
|
-
FormData$1.prototype._error = function(err) {
|
|
30035
|
+
FormData$1.prototype._error = function (err) {
|
|
29147
30036
|
if (!this.error) {
|
|
29148
30037
|
this.error = err;
|
|
29149
30038
|
this.pause();
|
|
@@ -29154,6 +30043,10 @@ FormData$1.prototype._error = function(err) {
|
|
|
29154
30043
|
FormData$1.prototype.toString = function () {
|
|
29155
30044
|
return '[object FormData]';
|
|
29156
30045
|
};
|
|
30046
|
+
setToStringTag(FormData$1, 'FormData');
|
|
30047
|
+
|
|
30048
|
+
// Public API
|
|
30049
|
+
var form_data = FormData$1;
|
|
29157
30050
|
|
|
29158
30051
|
var FormData$2 = /*@__PURE__*/getDefaultExportFromCjs(form_data);
|
|
29159
30052
|
|
|
@@ -29272,6 +30165,10 @@ function toFormData(obj, formData, options) {
|
|
|
29272
30165
|
return value.toISOString();
|
|
29273
30166
|
}
|
|
29274
30167
|
|
|
30168
|
+
if (utils$1.isBoolean(value)) {
|
|
30169
|
+
return value.toString();
|
|
30170
|
+
}
|
|
30171
|
+
|
|
29275
30172
|
if (!useBlob && utils$1.isBlob(value)) {
|
|
29276
30173
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
29277
30174
|
}
|
|
@@ -29434,9 +30331,7 @@ function encode(val) {
|
|
|
29434
30331
|
replace(/%3A/gi, ':').
|
|
29435
30332
|
replace(/%24/g, '$').
|
|
29436
30333
|
replace(/%2C/gi, ',').
|
|
29437
|
-
replace(/%20/g, '+')
|
|
29438
|
-
replace(/%5B/gi, '[').
|
|
29439
|
-
replace(/%5D/gi, ']');
|
|
30334
|
+
replace(/%20/g, '+');
|
|
29440
30335
|
}
|
|
29441
30336
|
|
|
29442
30337
|
/**
|
|
@@ -29574,7 +30469,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
|
29574
30469
|
let str = '';
|
|
29575
30470
|
const {length} = alphabet;
|
|
29576
30471
|
const randomValues = new Uint32Array(size);
|
|
29577
|
-
|
|
30472
|
+
require$$8.randomFillSync(randomValues);
|
|
29578
30473
|
for (let i = 0; i < size; i++) {
|
|
29579
30474
|
str += alphabet[randomValues[i] % length];
|
|
29580
30475
|
}
|
|
@@ -29654,7 +30549,7 @@ var platform = {
|
|
|
29654
30549
|
};
|
|
29655
30550
|
|
|
29656
30551
|
function toURLEncodedForm(data, options) {
|
|
29657
|
-
return toFormData(data, new platform.classes.URLSearchParams(),
|
|
30552
|
+
return toFormData(data, new platform.classes.URLSearchParams(), {
|
|
29658
30553
|
visitor: function(value, key, path, helpers) {
|
|
29659
30554
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
29660
30555
|
this.append(key, value.toString('base64'));
|
|
@@ -29662,8 +30557,9 @@ function toURLEncodedForm(data, options) {
|
|
|
29662
30557
|
}
|
|
29663
30558
|
|
|
29664
30559
|
return helpers.defaultVisitor.apply(this, arguments);
|
|
29665
|
-
}
|
|
29666
|
-
|
|
30560
|
+
},
|
|
30561
|
+
...options
|
|
30562
|
+
});
|
|
29667
30563
|
}
|
|
29668
30564
|
|
|
29669
30565
|
/**
|
|
@@ -29778,7 +30674,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
29778
30674
|
}
|
|
29779
30675
|
}
|
|
29780
30676
|
|
|
29781
|
-
return (
|
|
30677
|
+
return (0, JSON.stringify)(rawValue);
|
|
29782
30678
|
}
|
|
29783
30679
|
|
|
29784
30680
|
const defaults = {
|
|
@@ -29859,7 +30755,7 @@ const defaults = {
|
|
|
29859
30755
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
29860
30756
|
|
|
29861
30757
|
try {
|
|
29862
|
-
return JSON.parse(data);
|
|
30758
|
+
return JSON.parse(data, this.parseReviver);
|
|
29863
30759
|
} catch (e) {
|
|
29864
30760
|
if (strictJSONParsing) {
|
|
29865
30761
|
if (e.name === 'SyntaxError') {
|
|
@@ -29906,8 +30802,6 @@ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
|
29906
30802
|
defaults.headers[method] = {};
|
|
29907
30803
|
});
|
|
29908
30804
|
|
|
29909
|
-
var defaults$1 = defaults;
|
|
29910
|
-
|
|
29911
30805
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
29912
30806
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
29913
30807
|
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
@@ -30057,10 +30951,18 @@ class AxiosHeaders {
|
|
|
30057
30951
|
setHeaders(header, valueOrRewrite);
|
|
30058
30952
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
30059
30953
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
30060
|
-
} else if (utils$1.
|
|
30061
|
-
|
|
30062
|
-
|
|
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];
|
|
30063
30963
|
}
|
|
30964
|
+
|
|
30965
|
+
setHeaders(obj, valueOrRewrite);
|
|
30064
30966
|
} else {
|
|
30065
30967
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
30066
30968
|
}
|
|
@@ -30202,6 +31104,10 @@ class AxiosHeaders {
|
|
|
30202
31104
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
|
30203
31105
|
}
|
|
30204
31106
|
|
|
31107
|
+
getSetCookie() {
|
|
31108
|
+
return this.get("set-cookie") || [];
|
|
31109
|
+
}
|
|
31110
|
+
|
|
30205
31111
|
get [Symbol.toStringTag]() {
|
|
30206
31112
|
return 'AxiosHeaders';
|
|
30207
31113
|
}
|
|
@@ -30256,8 +31162,6 @@ utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
|
30256
31162
|
|
|
30257
31163
|
utils$1.freezeMethods(AxiosHeaders);
|
|
30258
31164
|
|
|
30259
|
-
var AxiosHeaders$1 = AxiosHeaders;
|
|
30260
|
-
|
|
30261
31165
|
/**
|
|
30262
31166
|
* Transform the data for a request or a response
|
|
30263
31167
|
*
|
|
@@ -30267,9 +31171,9 @@ var AxiosHeaders$1 = AxiosHeaders;
|
|
|
30267
31171
|
* @returns {*} The resulting transformed data
|
|
30268
31172
|
*/
|
|
30269
31173
|
function transformData(fns, response) {
|
|
30270
|
-
const config = this || defaults
|
|
31174
|
+
const config = this || defaults;
|
|
30271
31175
|
const context = response || config;
|
|
30272
|
-
const headers = AxiosHeaders
|
|
31176
|
+
const headers = AxiosHeaders.from(context.headers);
|
|
30273
31177
|
let data = context.data;
|
|
30274
31178
|
|
|
30275
31179
|
utils$1.forEach(fns, function transform(fn) {
|
|
@@ -30368,7 +31272,7 @@ function combineURLs(baseURL, relativeURL) {
|
|
|
30368
31272
|
*/
|
|
30369
31273
|
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|
30370
31274
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
30371
|
-
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
|
|
31275
|
+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
|
|
30372
31276
|
return combineURLs(baseURL, requestedURL);
|
|
30373
31277
|
}
|
|
30374
31278
|
return requestedURL;
|
|
@@ -30509,10 +31413,21 @@ var Writable = stream.Writable;
|
|
|
30509
31413
|
var assert = require$$0$3;
|
|
30510
31414
|
var debug = debug_1;
|
|
30511
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
|
+
|
|
30512
31427
|
// Whether to use the native URL object or the legacy url module
|
|
30513
31428
|
var useNativeURL = false;
|
|
30514
31429
|
try {
|
|
30515
|
-
assert(new URL$1());
|
|
31430
|
+
assert(new URL$1(""));
|
|
30516
31431
|
}
|
|
30517
31432
|
catch (error) {
|
|
30518
31433
|
useNativeURL = error.code === "ERR_INVALID_URL";
|
|
@@ -30627,7 +31542,7 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
|
30627
31542
|
if (!isString(data) && !isBuffer(data)) {
|
|
30628
31543
|
throw new TypeError("data should be a string, Buffer or Uint8Array");
|
|
30629
31544
|
}
|
|
30630
|
-
if (isFunction(encoding)) {
|
|
31545
|
+
if (isFunction$1(encoding)) {
|
|
30631
31546
|
callback = encoding;
|
|
30632
31547
|
encoding = null;
|
|
30633
31548
|
}
|
|
@@ -30656,11 +31571,11 @@ RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
|
|
30656
31571
|
// Ends the current native request
|
|
30657
31572
|
RedirectableRequest.prototype.end = function (data, encoding, callback) {
|
|
30658
31573
|
// Shift parameters if necessary
|
|
30659
|
-
if (isFunction(data)) {
|
|
31574
|
+
if (isFunction$1(data)) {
|
|
30660
31575
|
callback = data;
|
|
30661
31576
|
data = encoding = null;
|
|
30662
31577
|
}
|
|
30663
|
-
else if (isFunction(encoding)) {
|
|
31578
|
+
else if (isFunction$1(encoding)) {
|
|
30664
31579
|
callback = encoding;
|
|
30665
31580
|
encoding = null;
|
|
30666
31581
|
}
|
|
@@ -30849,17 +31764,17 @@ RedirectableRequest.prototype._performRequest = function () {
|
|
|
30849
31764
|
var buffers = this._requestBodyBuffers;
|
|
30850
31765
|
(function writeNext(error) {
|
|
30851
31766
|
// Only write if this request has not been redirected yet
|
|
30852
|
-
|
|
31767
|
+
// istanbul ignore else
|
|
30853
31768
|
if (request === self._currentRequest) {
|
|
30854
31769
|
// Report any write errors
|
|
30855
|
-
|
|
31770
|
+
// istanbul ignore if
|
|
30856
31771
|
if (error) {
|
|
30857
31772
|
self.emit("error", error);
|
|
30858
31773
|
}
|
|
30859
31774
|
// Write the next buffer if there are still left
|
|
30860
31775
|
else if (i < buffers.length) {
|
|
30861
31776
|
var buffer = buffers[i++];
|
|
30862
|
-
|
|
31777
|
+
// istanbul ignore else
|
|
30863
31778
|
if (!request.finished) {
|
|
30864
31779
|
request.write(buffer.data, buffer.encoding, writeNext);
|
|
30865
31780
|
}
|
|
@@ -30968,7 +31883,7 @@ RedirectableRequest.prototype._processResponse = function (response) {
|
|
|
30968
31883
|
}
|
|
30969
31884
|
|
|
30970
31885
|
// Evaluate the beforeRedirect callback
|
|
30971
|
-
if (isFunction(beforeRedirect)) {
|
|
31886
|
+
if (isFunction$1(beforeRedirect)) {
|
|
30972
31887
|
var responseDetails = {
|
|
30973
31888
|
headers: response.headers,
|
|
30974
31889
|
statusCode: statusCode,
|
|
@@ -31015,7 +31930,7 @@ function wrap(protocols) {
|
|
|
31015
31930
|
options = validateUrl(input);
|
|
31016
31931
|
input = { protocol: protocol };
|
|
31017
31932
|
}
|
|
31018
|
-
if (isFunction(options)) {
|
|
31933
|
+
if (isFunction$1(options)) {
|
|
31019
31934
|
callback = options;
|
|
31020
31935
|
options = null;
|
|
31021
31936
|
}
|
|
@@ -31055,7 +31970,7 @@ function noop() { /* empty */ }
|
|
|
31055
31970
|
|
|
31056
31971
|
function parseUrl(input) {
|
|
31057
31972
|
var parsed;
|
|
31058
|
-
|
|
31973
|
+
// istanbul ignore else
|
|
31059
31974
|
if (useNativeURL) {
|
|
31060
31975
|
parsed = new URL$1(input);
|
|
31061
31976
|
}
|
|
@@ -31070,7 +31985,7 @@ function parseUrl(input) {
|
|
|
31070
31985
|
}
|
|
31071
31986
|
|
|
31072
31987
|
function resolveUrl(relative, base) {
|
|
31073
|
-
|
|
31988
|
+
// istanbul ignore next
|
|
31074
31989
|
return useNativeURL ? new URL$1(relative, base) : parseUrl(url.resolve(base, relative));
|
|
31075
31990
|
}
|
|
31076
31991
|
|
|
@@ -31119,7 +32034,10 @@ function removeMatchingHeaders(regex, headers) {
|
|
|
31119
32034
|
function createErrorType(code, message, baseClass) {
|
|
31120
32035
|
// Create constructor
|
|
31121
32036
|
function CustomError(properties) {
|
|
31122
|
-
|
|
32037
|
+
// istanbul ignore else
|
|
32038
|
+
if (isFunction$1(Error.captureStackTrace)) {
|
|
32039
|
+
Error.captureStackTrace(this, this.constructor);
|
|
32040
|
+
}
|
|
31123
32041
|
Object.assign(this, properties || {});
|
|
31124
32042
|
this.code = code;
|
|
31125
32043
|
this.message = this.cause ? message + ": " + this.cause.message : message;
|
|
@@ -31158,7 +32076,7 @@ function isString(value) {
|
|
|
31158
32076
|
return typeof value === "string" || value instanceof String;
|
|
31159
32077
|
}
|
|
31160
32078
|
|
|
31161
|
-
function isFunction(value) {
|
|
32079
|
+
function isFunction$1(value) {
|
|
31162
32080
|
return typeof value === "function";
|
|
31163
32081
|
}
|
|
31164
32082
|
|
|
@@ -31177,7 +32095,7 @@ followRedirects$1.exports.wrap = wrap;
|
|
|
31177
32095
|
var followRedirectsExports = followRedirects$1.exports;
|
|
31178
32096
|
var followRedirects = /*@__PURE__*/getDefaultExportFromCjs(followRedirectsExports);
|
|
31179
32097
|
|
|
31180
|
-
const VERSION = "1.
|
|
32098
|
+
const VERSION = "1.12.0";
|
|
31181
32099
|
|
|
31182
32100
|
function parseProtocol(url) {
|
|
31183
32101
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
@@ -31369,8 +32287,6 @@ class AxiosTransformStream extends stream.Transform{
|
|
|
31369
32287
|
}
|
|
31370
32288
|
}
|
|
31371
32289
|
|
|
31372
|
-
var AxiosTransformStream$1 = AxiosTransformStream;
|
|
31373
|
-
|
|
31374
32290
|
const {asyncIterator} = Symbol;
|
|
31375
32291
|
|
|
31376
32292
|
const readBlob = async function* (blob) {
|
|
@@ -31457,7 +32373,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|
|
31457
32373
|
}
|
|
31458
32374
|
|
|
31459
32375
|
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
|
|
31460
|
-
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF
|
|
32376
|
+
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
|
|
31461
32377
|
let contentLength = footerBytes.byteLength;
|
|
31462
32378
|
|
|
31463
32379
|
const parts = Array.from(form.entries()).map(([name, value]) => {
|
|
@@ -31597,7 +32513,7 @@ function throttle(fn, freq) {
|
|
|
31597
32513
|
clearTimeout(timer);
|
|
31598
32514
|
timer = null;
|
|
31599
32515
|
}
|
|
31600
|
-
fn
|
|
32516
|
+
fn(...args);
|
|
31601
32517
|
};
|
|
31602
32518
|
|
|
31603
32519
|
const throttled = (...args) => {
|
|
@@ -31662,6 +32578,80 @@ const progressEventDecorator = (total, throttled) => {
|
|
|
31662
32578
|
|
|
31663
32579
|
const asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
31664
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
|
+
|
|
31665
32655
|
const zlibOptions = {
|
|
31666
32656
|
flush: zlib.constants.Z_SYNC_FLUSH,
|
|
31667
32657
|
finishFlush: zlib.constants.Z_SYNC_FLUSH
|
|
@@ -31682,6 +32672,7 @@ const supportedProtocols = platform.protocols.map(protocol => {
|
|
|
31682
32672
|
return protocol + ':';
|
|
31683
32673
|
});
|
|
31684
32674
|
|
|
32675
|
+
|
|
31685
32676
|
const flushOnFinish = (stream, [throttled, flush]) => {
|
|
31686
32677
|
stream
|
|
31687
32678
|
.on('end', flush)
|
|
@@ -31690,6 +32681,7 @@ const flushOnFinish = (stream, [throttled, flush]) => {
|
|
|
31690
32681
|
return throttled;
|
|
31691
32682
|
};
|
|
31692
32683
|
|
|
32684
|
+
|
|
31693
32685
|
/**
|
|
31694
32686
|
* If the proxy or config beforeRedirects functions are defined, call them with the options
|
|
31695
32687
|
* object.
|
|
@@ -31869,6 +32861,21 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31869
32861
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
31870
32862
|
|
|
31871
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
|
+
|
|
31872
32879
|
let convertedData;
|
|
31873
32880
|
|
|
31874
32881
|
if (method !== 'GET') {
|
|
@@ -31902,7 +32909,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31902
32909
|
data: convertedData,
|
|
31903
32910
|
status: 200,
|
|
31904
32911
|
statusText: 'OK',
|
|
31905
|
-
headers: new AxiosHeaders
|
|
32912
|
+
headers: new AxiosHeaders(),
|
|
31906
32913
|
config
|
|
31907
32914
|
});
|
|
31908
32915
|
}
|
|
@@ -31915,7 +32922,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31915
32922
|
));
|
|
31916
32923
|
}
|
|
31917
32924
|
|
|
31918
|
-
const headers = AxiosHeaders
|
|
32925
|
+
const headers = AxiosHeaders.from(config.headers).normalize();
|
|
31919
32926
|
|
|
31920
32927
|
// Set User-Agent (required by some servers)
|
|
31921
32928
|
// See https://github.com/axios/axios/issues/69
|
|
@@ -31993,7 +33000,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
31993
33000
|
data = stream.Readable.from(data, {objectMode: false});
|
|
31994
33001
|
}
|
|
31995
33002
|
|
|
31996
|
-
data = stream.pipeline([data, new AxiosTransformStream
|
|
33003
|
+
data = stream.pipeline([data, new AxiosTransformStream({
|
|
31997
33004
|
maxRate: utils$1.toFiniteNumber(maxUploadRate)
|
|
31998
33005
|
})], utils$1.noop);
|
|
31999
33006
|
|
|
@@ -32103,7 +33110,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
32103
33110
|
const responseLength = +res.headers['content-length'];
|
|
32104
33111
|
|
|
32105
33112
|
if (onDownloadProgress || maxDownloadRate) {
|
|
32106
|
-
const transformStream = new AxiosTransformStream
|
|
33113
|
+
const transformStream = new AxiosTransformStream({
|
|
32107
33114
|
maxRate: utils$1.toFiniteNumber(maxDownloadRate)
|
|
32108
33115
|
});
|
|
32109
33116
|
|
|
@@ -32171,7 +33178,7 @@ var httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
|
|
|
32171
33178
|
const response = {
|
|
32172
33179
|
status: res.statusCode,
|
|
32173
33180
|
statusText: res.statusMessage,
|
|
32174
|
-
headers: new AxiosHeaders
|
|
33181
|
+
headers: new AxiosHeaders(res.headers),
|
|
32175
33182
|
config,
|
|
32176
33183
|
request: lastRequest
|
|
32177
33184
|
};
|
|
@@ -32378,7 +33385,7 @@ var cookies = platform.hasStandardBrowserEnv ?
|
|
|
32378
33385
|
remove() {}
|
|
32379
33386
|
};
|
|
32380
33387
|
|
|
32381
|
-
const headersToObject = (thing) => thing instanceof AxiosHeaders
|
|
33388
|
+
const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;
|
|
32382
33389
|
|
|
32383
33390
|
/**
|
|
32384
33391
|
* Config-specific merge-function which creates a new config-object
|
|
@@ -32471,7 +33478,7 @@ function mergeConfig(config1, config2) {
|
|
|
32471
33478
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
|
32472
33479
|
};
|
|
32473
33480
|
|
|
32474
|
-
utils$1.forEach(Object.keys(
|
|
33481
|
+
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
|
32475
33482
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
32476
33483
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
32477
33484
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
@@ -32483,11 +33490,11 @@ function mergeConfig(config1, config2) {
|
|
|
32483
33490
|
var resolveConfig = (config) => {
|
|
32484
33491
|
const newConfig = mergeConfig({}, config);
|
|
32485
33492
|
|
|
32486
|
-
let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
|
|
33493
|
+
let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
|
|
32487
33494
|
|
|
32488
|
-
newConfig.headers = headers = AxiosHeaders
|
|
33495
|
+
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
32489
33496
|
|
|
32490
|
-
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);
|
|
32491
33498
|
|
|
32492
33499
|
// HTTP basic authentication
|
|
32493
33500
|
if (auth) {
|
|
@@ -32496,17 +33503,21 @@ var resolveConfig = (config) => {
|
|
|
32496
33503
|
);
|
|
32497
33504
|
}
|
|
32498
33505
|
|
|
32499
|
-
let contentType;
|
|
32500
|
-
|
|
32501
33506
|
if (utils$1.isFormData(data)) {
|
|
32502
33507
|
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
32503
|
-
headers.setContentType(undefined); //
|
|
32504
|
-
} else if ((
|
|
32505
|
-
//
|
|
32506
|
-
const
|
|
32507
|
-
headers
|
|
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
|
+
});
|
|
32508
33519
|
}
|
|
32509
|
-
}
|
|
33520
|
+
}
|
|
32510
33521
|
|
|
32511
33522
|
// Add xsrf header
|
|
32512
33523
|
// This is only done if running in a standard browser environment.
|
|
@@ -32534,7 +33545,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
32534
33545
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
32535
33546
|
const _config = resolveConfig(config);
|
|
32536
33547
|
let requestData = _config.data;
|
|
32537
|
-
const requestHeaders = AxiosHeaders
|
|
33548
|
+
const requestHeaders = AxiosHeaders.from(_config.headers).normalize();
|
|
32538
33549
|
let {responseType, onUploadProgress, onDownloadProgress} = _config;
|
|
32539
33550
|
let onCanceled;
|
|
32540
33551
|
let uploadThrottled, downloadThrottled;
|
|
@@ -32561,7 +33572,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
32561
33572
|
return;
|
|
32562
33573
|
}
|
|
32563
33574
|
// Prepare the response
|
|
32564
|
-
const responseHeaders = AxiosHeaders
|
|
33575
|
+
const responseHeaders = AxiosHeaders.from(
|
|
32565
33576
|
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
|
|
32566
33577
|
);
|
|
32567
33578
|
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
|
|
@@ -32623,15 +33634,18 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
32623
33634
|
};
|
|
32624
33635
|
|
|
32625
33636
|
// Handle low level network errors
|
|
32626
|
-
|
|
32627
|
-
|
|
32628
|
-
|
|
32629
|
-
|
|
32630
|
-
|
|
32631
|
-
|
|
32632
|
-
|
|
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;
|
|
32633
33647
|
};
|
|
32634
|
-
|
|
33648
|
+
|
|
32635
33649
|
// Handle timeout
|
|
32636
33650
|
request.ontimeout = function handleTimeout() {
|
|
32637
33651
|
let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
@@ -32758,12 +33772,10 @@ const composeSignals = (signals, timeout) => {
|
|
|
32758
33772
|
}
|
|
32759
33773
|
};
|
|
32760
33774
|
|
|
32761
|
-
var composeSignals$1 = composeSignals;
|
|
32762
|
-
|
|
32763
33775
|
const streamChunk = function* (chunk, chunkSize) {
|
|
32764
33776
|
let len = chunk.byteLength;
|
|
32765
33777
|
|
|
32766
|
-
if (
|
|
33778
|
+
if (len < chunkSize) {
|
|
32767
33779
|
yield chunk;
|
|
32768
33780
|
return;
|
|
32769
33781
|
}
|
|
@@ -32847,14 +33859,18 @@ const trackStream = (stream, chunkSize, onProgress, onFinish) => {
|
|
|
32847
33859
|
})
|
|
32848
33860
|
};
|
|
32849
33861
|
|
|
32850
|
-
const
|
|
32851
|
-
|
|
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;
|
|
32852
33873
|
|
|
32853
|
-
// used only inside the fetch adapter
|
|
32854
|
-
const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
|
|
32855
|
-
((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
|
|
32856
|
-
async (str) => new Uint8Array(await new Response(str).arrayBuffer())
|
|
32857
|
-
);
|
|
32858
33874
|
|
|
32859
33875
|
const test = (fn, ...args) => {
|
|
32860
33876
|
try {
|
|
@@ -32864,211 +33880,266 @@ const test = (fn, ...args) => {
|
|
|
32864
33880
|
}
|
|
32865
33881
|
};
|
|
32866
33882
|
|
|
32867
|
-
const
|
|
32868
|
-
|
|
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);
|
|
32869
33888
|
|
|
32870
|
-
|
|
32871
|
-
|
|
32872
|
-
|
|
32873
|
-
get duplex() {
|
|
32874
|
-
duplexAccessed = true;
|
|
32875
|
-
return 'half';
|
|
32876
|
-
},
|
|
32877
|
-
}).headers.has('Content-Type');
|
|
33889
|
+
if (!isFetchSupported) {
|
|
33890
|
+
return false;
|
|
33891
|
+
}
|
|
32878
33892
|
|
|
32879
|
-
|
|
32880
|
-
});
|
|
33893
|
+
const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
|
|
32881
33894
|
|
|
32882
|
-
const
|
|
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
|
+
);
|
|
33899
|
+
|
|
33900
|
+
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
33901
|
+
let duplexAccessed = false;
|
|
32883
33902
|
|
|
32884
|
-
const
|
|
32885
|
-
|
|
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');
|
|
32886
33911
|
|
|
33912
|
+
return duplexAccessed && !hasContentType;
|
|
33913
|
+
});
|
|
32887
33914
|
|
|
32888
|
-
const
|
|
32889
|
-
|
|
32890
|
-
|
|
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
|
+
}
|
|
32891
33930
|
|
|
32892
|
-
isFetchSupported && (((res) => {
|
|
32893
|
-
['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
|
|
32894
|
-
!resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
|
|
32895
|
-
(_, config) => {
|
|
32896
33931
|
throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
|
|
32897
33932
|
});
|
|
32898
|
-
|
|
32899
|
-
})(
|
|
33933
|
+
});
|
|
33934
|
+
})());
|
|
32900
33935
|
|
|
32901
|
-
const getBodyLength = async (body) => {
|
|
32902
|
-
|
|
32903
|
-
|
|
32904
|
-
|
|
33936
|
+
const getBodyLength = async (body) => {
|
|
33937
|
+
if (body == null) {
|
|
33938
|
+
return 0;
|
|
33939
|
+
}
|
|
32905
33940
|
|
|
32906
|
-
|
|
32907
|
-
|
|
32908
|
-
|
|
33941
|
+
if (utils$1.isBlob(body)) {
|
|
33942
|
+
return body.size;
|
|
33943
|
+
}
|
|
32909
33944
|
|
|
32910
|
-
|
|
32911
|
-
|
|
32912
|
-
|
|
32913
|
-
|
|
32914
|
-
|
|
32915
|
-
|
|
32916
|
-
|
|
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
|
+
}
|
|
32917
33952
|
|
|
32918
|
-
|
|
32919
|
-
|
|
32920
|
-
|
|
33953
|
+
if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
|
|
33954
|
+
return body.byteLength;
|
|
33955
|
+
}
|
|
32921
33956
|
|
|
32922
|
-
|
|
32923
|
-
|
|
32924
|
-
|
|
33957
|
+
if (utils$1.isURLSearchParams(body)) {
|
|
33958
|
+
body = body + '';
|
|
33959
|
+
}
|
|
32925
33960
|
|
|
32926
|
-
|
|
32927
|
-
|
|
32928
|
-
|
|
32929
|
-
};
|
|
33961
|
+
if (utils$1.isString(body)) {
|
|
33962
|
+
return (await encodeText(body)).byteLength;
|
|
33963
|
+
}
|
|
33964
|
+
};
|
|
32930
33965
|
|
|
32931
|
-
const resolveBodyLength = async (headers, body) => {
|
|
32932
|
-
|
|
33966
|
+
const resolveBodyLength = async (headers, body) => {
|
|
33967
|
+
const length = utils$1.toFiniteNumber(headers.getContentLength());
|
|
32933
33968
|
|
|
32934
|
-
|
|
32935
|
-
};
|
|
33969
|
+
return length == null ? getBodyLength(body) : length;
|
|
33970
|
+
};
|
|
32936
33971
|
|
|
32937
|
-
|
|
32938
|
-
|
|
32939
|
-
|
|
32940
|
-
|
|
32941
|
-
|
|
32942
|
-
|
|
32943
|
-
|
|
32944
|
-
|
|
32945
|
-
|
|
32946
|
-
|
|
32947
|
-
|
|
32948
|
-
|
|
32949
|
-
|
|
32950
|
-
|
|
32951
|
-
|
|
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);
|
|
32952
33987
|
|
|
32953
|
-
|
|
33988
|
+
responseType = responseType ? (responseType + '').toLowerCase() : 'text';
|
|
32954
33989
|
|
|
32955
|
-
|
|
33990
|
+
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
32956
33991
|
|
|
32957
|
-
|
|
33992
|
+
let request = null;
|
|
32958
33993
|
|
|
32959
|
-
|
|
33994
|
+
const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
|
|
32960
33995
|
composedSignal.unsubscribe();
|
|
32961
|
-
|
|
33996
|
+
});
|
|
32962
33997
|
|
|
32963
|
-
|
|
33998
|
+
let requestContentLength;
|
|
32964
33999
|
|
|
32965
|
-
|
|
32966
|
-
|
|
32967
|
-
|
|
32968
|
-
|
|
32969
|
-
|
|
32970
|
-
|
|
32971
|
-
|
|
32972
|
-
|
|
32973
|
-
|
|
32974
|
-
|
|
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
|
+
});
|
|
32975
34010
|
|
|
32976
|
-
|
|
34011
|
+
let contentTypeHeader;
|
|
32977
34012
|
|
|
32978
|
-
|
|
32979
|
-
|
|
32980
|
-
|
|
34013
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
|
|
34014
|
+
headers.setContentType(contentTypeHeader);
|
|
34015
|
+
}
|
|
32981
34016
|
|
|
32982
|
-
|
|
32983
|
-
|
|
32984
|
-
|
|
32985
|
-
|
|
32986
|
-
|
|
34017
|
+
if (_request.body) {
|
|
34018
|
+
const [onProgress, flush] = progressEventDecorator(
|
|
34019
|
+
requestContentLength,
|
|
34020
|
+
progressEventReducer(asyncDecorator(onUploadProgress))
|
|
34021
|
+
);
|
|
32987
34022
|
|
|
32988
|
-
|
|
34023
|
+
data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
|
|
34024
|
+
}
|
|
32989
34025
|
}
|
|
32990
|
-
}
|
|
32991
34026
|
|
|
32992
|
-
|
|
32993
|
-
|
|
32994
|
-
|
|
34027
|
+
if (!utils$1.isString(withCredentials)) {
|
|
34028
|
+
withCredentials = withCredentials ? 'include' : 'omit';
|
|
34029
|
+
}
|
|
32995
34030
|
|
|
32996
|
-
|
|
32997
|
-
|
|
32998
|
-
|
|
32999
|
-
request = new Request(url, {
|
|
33000
|
-
...fetchOptions,
|
|
33001
|
-
signal: composedSignal,
|
|
33002
|
-
method: method.toUpperCase(),
|
|
33003
|
-
headers: headers.normalize().toJSON(),
|
|
33004
|
-
body: data,
|
|
33005
|
-
duplex: "half",
|
|
33006
|
-
credentials: isCredentialsSupported ? withCredentials : undefined
|
|
33007
|
-
});
|
|
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;
|
|
33008
34034
|
|
|
33009
|
-
|
|
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
|
+
};
|
|
33010
34044
|
|
|
33011
|
-
|
|
34045
|
+
request = isRequestSupported && new Request(url, resolvedOptions);
|
|
33012
34046
|
|
|
33013
|
-
|
|
33014
|
-
const options = {};
|
|
34047
|
+
let response = await (isRequestSupported ? fetch(request, fetchOptions) : fetch(url, resolvedOptions));
|
|
33015
34048
|
|
|
33016
|
-
|
|
33017
|
-
|
|
33018
|
-
|
|
34049
|
+
const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
|
|
34050
|
+
|
|
34051
|
+
if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
|
|
34052
|
+
const options = {};
|
|
33019
34053
|
|
|
33020
|
-
|
|
34054
|
+
['status', 'statusText', 'headers'].forEach(prop => {
|
|
34055
|
+
options[prop] = response[prop];
|
|
34056
|
+
});
|
|
33021
34057
|
|
|
33022
|
-
|
|
33023
|
-
responseContentLength,
|
|
33024
|
-
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
33025
|
-
) || [];
|
|
34058
|
+
const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
|
|
33026
34059
|
|
|
33027
|
-
|
|
33028
|
-
|
|
33029
|
-
|
|
33030
|
-
|
|
33031
|
-
}),
|
|
33032
|
-
options
|
|
33033
|
-
);
|
|
33034
|
-
}
|
|
34060
|
+
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
|
|
34061
|
+
responseContentLength,
|
|
34062
|
+
progressEventReducer(asyncDecorator(onDownloadProgress), true)
|
|
34063
|
+
) || [];
|
|
33035
34064
|
|
|
33036
|
-
|
|
34065
|
+
response = new Response(
|
|
34066
|
+
trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
|
|
34067
|
+
flush && flush();
|
|
34068
|
+
unsubscribe && unsubscribe();
|
|
34069
|
+
}),
|
|
34070
|
+
options
|
|
34071
|
+
);
|
|
34072
|
+
}
|
|
33037
34073
|
|
|
33038
|
-
|
|
34074
|
+
responseType = responseType || 'text';
|
|
33039
34075
|
|
|
33040
|
-
|
|
34076
|
+
let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
|
|
33041
34077
|
|
|
33042
|
-
|
|
33043
|
-
|
|
33044
|
-
|
|
33045
|
-
|
|
33046
|
-
|
|
33047
|
-
|
|
33048
|
-
|
|
33049
|
-
|
|
33050
|
-
|
|
33051
|
-
|
|
33052
|
-
|
|
33053
|
-
|
|
33054
|
-
|
|
33055
|
-
|
|
33056
|
-
|
|
33057
|
-
|
|
33058
|
-
|
|
33059
|
-
|
|
33060
|
-
|
|
33061
|
-
|
|
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);
|
|
33062
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;
|
|
33063
34115
|
|
|
33064
|
-
|
|
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;
|
|
33065
34130
|
}
|
|
33066
|
-
|
|
34131
|
+
|
|
34132
|
+
return target;
|
|
34133
|
+
};
|
|
34134
|
+
|
|
34135
|
+
getFetch();
|
|
33067
34136
|
|
|
33068
34137
|
const knownAdapters = {
|
|
33069
34138
|
http: httpAdapter,
|
|
33070
34139
|
xhr: xhrAdapter,
|
|
33071
|
-
fetch:
|
|
34140
|
+
fetch: {
|
|
34141
|
+
get: getFetch,
|
|
34142
|
+
}
|
|
33072
34143
|
};
|
|
33073
34144
|
|
|
33074
34145
|
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
@@ -33087,7 +34158,7 @@ const renderReason = (reason) => `- ${reason}`;
|
|
|
33087
34158
|
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
33088
34159
|
|
|
33089
34160
|
var adapters = {
|
|
33090
|
-
getAdapter: (adapters) => {
|
|
34161
|
+
getAdapter: (adapters, config) => {
|
|
33091
34162
|
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
33092
34163
|
|
|
33093
34164
|
const {length} = adapters;
|
|
@@ -33110,7 +34181,7 @@ var adapters = {
|
|
|
33110
34181
|
}
|
|
33111
34182
|
}
|
|
33112
34183
|
|
|
33113
|
-
if (adapter) {
|
|
34184
|
+
if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
|
|
33114
34185
|
break;
|
|
33115
34186
|
}
|
|
33116
34187
|
|
|
@@ -33166,7 +34237,7 @@ function throwIfCancellationRequested(config) {
|
|
|
33166
34237
|
function dispatchRequest(config) {
|
|
33167
34238
|
throwIfCancellationRequested(config);
|
|
33168
34239
|
|
|
33169
|
-
config.headers = AxiosHeaders
|
|
34240
|
+
config.headers = AxiosHeaders.from(config.headers);
|
|
33170
34241
|
|
|
33171
34242
|
// Transform request data
|
|
33172
34243
|
config.data = transformData.call(
|
|
@@ -33178,7 +34249,7 @@ function dispatchRequest(config) {
|
|
|
33178
34249
|
config.headers.setContentType('application/x-www-form-urlencoded', false);
|
|
33179
34250
|
}
|
|
33180
34251
|
|
|
33181
|
-
const adapter = adapters.getAdapter(config.adapter || defaults
|
|
34252
|
+
const adapter = adapters.getAdapter(config.adapter || defaults.adapter, config);
|
|
33182
34253
|
|
|
33183
34254
|
return adapter(config).then(function onAdapterResolution(response) {
|
|
33184
34255
|
throwIfCancellationRequested(config);
|
|
@@ -33190,7 +34261,7 @@ function dispatchRequest(config) {
|
|
|
33190
34261
|
response
|
|
33191
34262
|
);
|
|
33192
34263
|
|
|
33193
|
-
response.headers = AxiosHeaders
|
|
34264
|
+
response.headers = AxiosHeaders.from(response.headers);
|
|
33194
34265
|
|
|
33195
34266
|
return response;
|
|
33196
34267
|
}, function onAdapterRejection(reason) {
|
|
@@ -33204,7 +34275,7 @@ function dispatchRequest(config) {
|
|
|
33204
34275
|
config.transformResponse,
|
|
33205
34276
|
reason.response
|
|
33206
34277
|
);
|
|
33207
|
-
reason.response.headers = AxiosHeaders
|
|
34278
|
+
reason.response.headers = AxiosHeaders.from(reason.response.headers);
|
|
33208
34279
|
}
|
|
33209
34280
|
}
|
|
33210
34281
|
|
|
@@ -33318,7 +34389,7 @@ const validators = validator.validators;
|
|
|
33318
34389
|
*/
|
|
33319
34390
|
class Axios {
|
|
33320
34391
|
constructor(instanceConfig) {
|
|
33321
|
-
this.defaults = instanceConfig;
|
|
34392
|
+
this.defaults = instanceConfig || {};
|
|
33322
34393
|
this.interceptors = {
|
|
33323
34394
|
request: new InterceptorManager(),
|
|
33324
34395
|
response: new InterceptorManager()
|
|
@@ -33423,7 +34494,7 @@ class Axios {
|
|
|
33423
34494
|
}
|
|
33424
34495
|
);
|
|
33425
34496
|
|
|
33426
|
-
config.headers = AxiosHeaders
|
|
34497
|
+
config.headers = AxiosHeaders.concat(contextHeaders, headers);
|
|
33427
34498
|
|
|
33428
34499
|
// filter out skipped interceptors
|
|
33429
34500
|
const requestInterceptorChain = [];
|
|
@@ -33449,8 +34520,8 @@ class Axios {
|
|
|
33449
34520
|
|
|
33450
34521
|
if (!synchronousRequestInterceptors) {
|
|
33451
34522
|
const chain = [dispatchRequest.bind(this), undefined];
|
|
33452
|
-
chain.unshift
|
|
33453
|
-
chain.push
|
|
34523
|
+
chain.unshift(...requestInterceptorChain);
|
|
34524
|
+
chain.push(...responseInterceptorChain);
|
|
33454
34525
|
len = chain.length;
|
|
33455
34526
|
|
|
33456
34527
|
promise = Promise.resolve(config);
|
|
@@ -33535,8 +34606,6 @@ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method)
|
|
|
33535
34606
|
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
33536
34607
|
});
|
|
33537
34608
|
|
|
33538
|
-
var Axios$1 = Axios;
|
|
33539
|
-
|
|
33540
34609
|
/**
|
|
33541
34610
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
33542
34611
|
*
|
|
@@ -33667,8 +34736,6 @@ class CancelToken {
|
|
|
33667
34736
|
}
|
|
33668
34737
|
}
|
|
33669
34738
|
|
|
33670
|
-
var CancelToken$1 = CancelToken;
|
|
33671
|
-
|
|
33672
34739
|
/**
|
|
33673
34740
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
33674
34741
|
*
|
|
@@ -33777,8 +34844,6 @@ Object.entries(HttpStatusCode).forEach(([key, value]) => {
|
|
|
33777
34844
|
HttpStatusCode[value] = key;
|
|
33778
34845
|
});
|
|
33779
34846
|
|
|
33780
|
-
var HttpStatusCode$1 = HttpStatusCode;
|
|
33781
|
-
|
|
33782
34847
|
/**
|
|
33783
34848
|
* Create an instance of Axios
|
|
33784
34849
|
*
|
|
@@ -33787,11 +34852,11 @@ var HttpStatusCode$1 = HttpStatusCode;
|
|
|
33787
34852
|
* @returns {Axios} A new instance of Axios
|
|
33788
34853
|
*/
|
|
33789
34854
|
function createInstance(defaultConfig) {
|
|
33790
|
-
const context = new Axios
|
|
33791
|
-
const instance = bind(Axios
|
|
34855
|
+
const context = new Axios(defaultConfig);
|
|
34856
|
+
const instance = bind$2(Axios.prototype.request, context);
|
|
33792
34857
|
|
|
33793
34858
|
// Copy axios.prototype to instance
|
|
33794
|
-
utils$1.extend(instance, Axios
|
|
34859
|
+
utils$1.extend(instance, Axios.prototype, context, {allOwnKeys: true});
|
|
33795
34860
|
|
|
33796
34861
|
// Copy context to instance
|
|
33797
34862
|
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
@@ -33805,14 +34870,14 @@ function createInstance(defaultConfig) {
|
|
|
33805
34870
|
}
|
|
33806
34871
|
|
|
33807
34872
|
// Create the default instance to be exported
|
|
33808
|
-
const axios = createInstance(defaults
|
|
34873
|
+
const axios = createInstance(defaults);
|
|
33809
34874
|
|
|
33810
34875
|
// Expose Axios class to allow class inheritance
|
|
33811
|
-
axios.Axios = Axios
|
|
34876
|
+
axios.Axios = Axios;
|
|
33812
34877
|
|
|
33813
34878
|
// Expose Cancel & CancelToken
|
|
33814
34879
|
axios.CanceledError = CanceledError;
|
|
33815
|
-
axios.CancelToken = CancelToken
|
|
34880
|
+
axios.CancelToken = CancelToken;
|
|
33816
34881
|
axios.isCancel = isCancel;
|
|
33817
34882
|
axios.VERSION = VERSION;
|
|
33818
34883
|
axios.toFormData = toFormData;
|
|
@@ -33836,13 +34901,13 @@ axios.isAxiosError = isAxiosError;
|
|
|
33836
34901
|
// Expose mergeConfig
|
|
33837
34902
|
axios.mergeConfig = mergeConfig;
|
|
33838
34903
|
|
|
33839
|
-
axios.AxiosHeaders = AxiosHeaders
|
|
34904
|
+
axios.AxiosHeaders = AxiosHeaders;
|
|
33840
34905
|
|
|
33841
34906
|
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
33842
34907
|
|
|
33843
34908
|
axios.getAdapter = adapters.getAdapter;
|
|
33844
34909
|
|
|
33845
|
-
axios.HttpStatusCode = HttpStatusCode
|
|
34910
|
+
axios.HttpStatusCode = HttpStatusCode;
|
|
33846
34911
|
|
|
33847
34912
|
axios.default = axios;
|
|
33848
34913
|
|
|
@@ -33883,7 +34948,7 @@ const addBigbinaryPackagesToRecommendedList = async (recommendedList) => {
|
|
|
33883
34948
|
await new Promise((resolve) => setTimeout(resolve, REQUEST_DELAY));
|
|
33884
34949
|
if (retries === MAX_RETRIES) {
|
|
33885
34950
|
console.log(
|
|
33886
|
-
chalk
|
|
34951
|
+
chalk.yellowBright(
|
|
33887
34952
|
"\nCouldn't connect to nanos release tool. Please retry or verify the link is working correctly."
|
|
33888
34953
|
)
|
|
33889
34954
|
);
|
|
@@ -33932,7 +34997,7 @@ const getOutdatedPackages = (
|
|
|
33932
34997
|
dependenciesToCheck
|
|
33933
34998
|
);
|
|
33934
34999
|
|
|
33935
|
-
const outdatedPackages = pickBy(not
|
|
35000
|
+
const outdatedPackages = pickBy(not, packages);
|
|
33936
35001
|
|
|
33937
35002
|
return { type, outdatedPackages: Object.keys(outdatedPackages) };
|
|
33938
35003
|
});
|
|
@@ -33953,7 +35018,7 @@ const getInstallationCommands = (recommendPackages, packagesToUpdate) =>
|
|
|
33953
35018
|
Object.entries(recommendPackages).map(([type, packages]) => {
|
|
33954
35019
|
const { outdatedPackages } = findBy({ type }, packagesToUpdate);
|
|
33955
35020
|
|
|
33956
|
-
if (isEmpty
|
|
35021
|
+
if (isEmpty(outdatedPackages) || type === "peerDependencies") {
|
|
33957
35022
|
return;
|
|
33958
35023
|
}
|
|
33959
35024
|
|
|
@@ -34050,5 +35115,5 @@ const run = async () => {
|
|
|
34050
35115
|
};
|
|
34051
35116
|
|
|
34052
35117
|
process.env.SKIP_AUDIT === "true"
|
|
34053
|
-
? console.log(chalk
|
|
35118
|
+
? console.log(chalk.green("Skipped frontend audit"))
|
|
34054
35119
|
: run();
|