@intrig/react 1.0.2 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +162 -17
- package/index.esm.js +1815 -627
- package/package.json +3 -3
- package/src/extra/index.d.ts +4 -0
- package/src/extra/useAsNetworkState.d.ts +13 -0
- package/src/extra/useAsPromise.d.ts +59 -0
- package/src/extra/useResolvedCachedValue.d.ts +54 -0
- package/src/extra/useResolvedValue.d.ts +50 -0
- package/src/index.d.ts +2 -0
- package/src/intrig-context.d.ts +1 -1
- package/src/intrig-provider.d.ts +4 -4
- package/src/logger.d.ts +7 -0
- package/src/media-type-utils.d.ts +4 -0
- package/src/network-state.d.ts +39 -9
package/index.esm.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createContext, useReducer, useMemo,
|
|
2
|
+
import { createContext, useContext, useReducer, useMemo, useState, useCallback, useEffect, useRef, useId } from 'react';
|
|
3
3
|
import axios, { isAxiosError } from 'axios';
|
|
4
|
+
import { XMLParser } from 'fast-xml-parser';
|
|
4
5
|
|
|
5
6
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
7
|
|
|
8
|
+
function getDefaultExportFromCjs (x) {
|
|
9
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
|
+
}
|
|
11
|
+
|
|
7
12
|
var check = function (it) {
|
|
8
13
|
return it && it.Math === Math && it;
|
|
9
14
|
};
|
|
@@ -22,7 +27,7 @@ var globalThis_1 =
|
|
|
22
27
|
|
|
23
28
|
var objectGetOwnPropertyDescriptor = {};
|
|
24
29
|
|
|
25
|
-
var fails$
|
|
30
|
+
var fails$i = function (exec) {
|
|
26
31
|
try {
|
|
27
32
|
return !!exec();
|
|
28
33
|
} catch (error) {
|
|
@@ -30,17 +35,17 @@ var fails$f = function (exec) {
|
|
|
30
35
|
}
|
|
31
36
|
};
|
|
32
37
|
|
|
33
|
-
var fails$
|
|
38
|
+
var fails$h = fails$i;
|
|
34
39
|
|
|
35
40
|
// Detect IE8's incomplete defineProperty implementation
|
|
36
|
-
var descriptors = !fails$
|
|
41
|
+
var descriptors = !fails$h(function () {
|
|
37
42
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
38
43
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
39
44
|
});
|
|
40
45
|
|
|
41
|
-
var fails$
|
|
46
|
+
var fails$g = fails$i;
|
|
42
47
|
|
|
43
|
-
var functionBindNative = !fails$
|
|
48
|
+
var functionBindNative = !fails$g(function () {
|
|
44
49
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
45
50
|
var test = (function () { /* empty */ }).bind();
|
|
46
51
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
@@ -49,29 +54,29 @@ var functionBindNative = !fails$d(function () {
|
|
|
49
54
|
|
|
50
55
|
var NATIVE_BIND$3 = functionBindNative;
|
|
51
56
|
|
|
52
|
-
var call$
|
|
53
|
-
|
|
54
|
-
var functionCall = NATIVE_BIND$3 ? call$
|
|
55
|
-
return call$
|
|
57
|
+
var call$g = Function.prototype.call;
|
|
58
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
59
|
+
var functionCall = NATIVE_BIND$3 ? call$g.bind(call$g) : function () {
|
|
60
|
+
return call$g.apply(call$g, arguments);
|
|
56
61
|
};
|
|
57
62
|
|
|
58
63
|
var objectPropertyIsEnumerable = {};
|
|
59
64
|
|
|
60
65
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
61
66
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
62
|
-
var getOwnPropertyDescriptor$
|
|
67
|
+
var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
|
|
63
68
|
|
|
64
69
|
// Nashorn ~ JDK8 bug
|
|
65
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$
|
|
70
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
66
71
|
|
|
67
72
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
68
73
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
69
74
|
objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
70
|
-
var descriptor = getOwnPropertyDescriptor$
|
|
75
|
+
var descriptor = getOwnPropertyDescriptor$3(this, V);
|
|
71
76
|
return !!descriptor && descriptor.enumerable;
|
|
72
77
|
} : $propertyIsEnumerable;
|
|
73
78
|
|
|
74
|
-
var createPropertyDescriptor$
|
|
79
|
+
var createPropertyDescriptor$5 = function (bitmap, value) {
|
|
75
80
|
return {
|
|
76
81
|
enumerable: !(bitmap & 1),
|
|
77
82
|
configurable: !(bitmap & 2),
|
|
@@ -83,38 +88,39 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
|
83
88
|
var NATIVE_BIND$2 = functionBindNative;
|
|
84
89
|
|
|
85
90
|
var FunctionPrototype$2 = Function.prototype;
|
|
86
|
-
var call$
|
|
87
|
-
|
|
91
|
+
var call$f = FunctionPrototype$2.call;
|
|
92
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
93
|
+
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$f, call$f);
|
|
88
94
|
|
|
89
95
|
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
90
96
|
return function () {
|
|
91
|
-
return call$
|
|
97
|
+
return call$f.apply(fn, arguments);
|
|
92
98
|
};
|
|
93
99
|
};
|
|
94
100
|
|
|
95
|
-
var uncurryThis$
|
|
101
|
+
var uncurryThis$g = functionUncurryThis;
|
|
96
102
|
|
|
97
|
-
var toString$
|
|
98
|
-
var stringSlice$1 = uncurryThis$
|
|
103
|
+
var toString$4 = uncurryThis$g({}.toString);
|
|
104
|
+
var stringSlice$1 = uncurryThis$g(''.slice);
|
|
99
105
|
|
|
100
106
|
var classofRaw$2 = function (it) {
|
|
101
|
-
return stringSlice$1(toString$
|
|
107
|
+
return stringSlice$1(toString$4(it), 8, -1);
|
|
102
108
|
};
|
|
103
109
|
|
|
104
|
-
var uncurryThis$
|
|
105
|
-
var fails$
|
|
106
|
-
var classof$
|
|
110
|
+
var uncurryThis$f = functionUncurryThis;
|
|
111
|
+
var fails$f = fails$i;
|
|
112
|
+
var classof$7 = classofRaw$2;
|
|
107
113
|
|
|
108
114
|
var $Object$4 = Object;
|
|
109
|
-
var split = uncurryThis$
|
|
115
|
+
var split = uncurryThis$f(''.split);
|
|
110
116
|
|
|
111
117
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
112
|
-
var indexedObject = fails$
|
|
118
|
+
var indexedObject = fails$f(function () {
|
|
113
119
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
114
120
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
115
121
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
116
122
|
}) ? function (it) {
|
|
117
|
-
return classof$
|
|
123
|
+
return classof$7(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
118
124
|
} : $Object$4;
|
|
119
125
|
|
|
120
126
|
// we can't use just `it == null` since of `document.all` special case
|
|
@@ -125,12 +131,12 @@ var isNullOrUndefined$4 = function (it) {
|
|
|
125
131
|
|
|
126
132
|
var isNullOrUndefined$3 = isNullOrUndefined$4;
|
|
127
133
|
|
|
128
|
-
var $TypeError$
|
|
134
|
+
var $TypeError$i = TypeError;
|
|
129
135
|
|
|
130
136
|
// `RequireObjectCoercible` abstract operation
|
|
131
137
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
132
138
|
var requireObjectCoercible$4 = function (it) {
|
|
133
|
-
if (isNullOrUndefined$3(it)) throw new $TypeError$
|
|
139
|
+
if (isNullOrUndefined$3(it)) throw new $TypeError$i("Can't call method on " + it);
|
|
134
140
|
return it;
|
|
135
141
|
};
|
|
136
142
|
|
|
@@ -148,46 +154,46 @@ var documentAll = typeof document == 'object' && document.all;
|
|
|
148
154
|
// `IsCallable` abstract operation
|
|
149
155
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
150
156
|
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
151
|
-
var isCallable$
|
|
157
|
+
var isCallable$l = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
152
158
|
return typeof argument == 'function' || argument === documentAll;
|
|
153
159
|
} : function (argument) {
|
|
154
160
|
return typeof argument == 'function';
|
|
155
161
|
};
|
|
156
162
|
|
|
157
|
-
var isCallable$
|
|
163
|
+
var isCallable$k = isCallable$l;
|
|
158
164
|
|
|
159
|
-
var isObject$
|
|
160
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
165
|
+
var isObject$d = function (it) {
|
|
166
|
+
return typeof it == 'object' ? it !== null : isCallable$k(it);
|
|
161
167
|
};
|
|
162
168
|
|
|
163
|
-
var globalThis$
|
|
164
|
-
var isCallable$
|
|
169
|
+
var globalThis$l = globalThis_1;
|
|
170
|
+
var isCallable$j = isCallable$l;
|
|
165
171
|
|
|
166
172
|
var aFunction = function (argument) {
|
|
167
|
-
return isCallable$
|
|
173
|
+
return isCallable$j(argument) ? argument : undefined;
|
|
168
174
|
};
|
|
169
175
|
|
|
170
|
-
var getBuiltIn$
|
|
171
|
-
return arguments.length < 2 ? aFunction(globalThis$
|
|
176
|
+
var getBuiltIn$8 = function (namespace, method) {
|
|
177
|
+
return arguments.length < 2 ? aFunction(globalThis$l[namespace]) : globalThis$l[namespace] && globalThis$l[namespace][method];
|
|
172
178
|
};
|
|
173
179
|
|
|
174
|
-
var uncurryThis$
|
|
180
|
+
var uncurryThis$e = functionUncurryThis;
|
|
175
181
|
|
|
176
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
182
|
+
var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
|
|
177
183
|
|
|
178
|
-
var globalThis$
|
|
184
|
+
var globalThis$k = globalThis_1;
|
|
179
185
|
|
|
180
|
-
var navigator = globalThis$
|
|
186
|
+
var navigator = globalThis$k.navigator;
|
|
181
187
|
var userAgent$5 = navigator && navigator.userAgent;
|
|
182
188
|
|
|
183
189
|
var environmentUserAgent = userAgent$5 ? String(userAgent$5) : '';
|
|
184
190
|
|
|
185
|
-
var globalThis$
|
|
191
|
+
var globalThis$j = globalThis_1;
|
|
186
192
|
var userAgent$4 = environmentUserAgent;
|
|
187
193
|
|
|
188
|
-
var process$
|
|
189
|
-
var Deno$1 = globalThis$
|
|
190
|
-
var versions = process$
|
|
194
|
+
var process$4 = globalThis$j.process;
|
|
195
|
+
var Deno$1 = globalThis$j.Deno;
|
|
196
|
+
var versions = process$4 && process$4.versions || Deno$1 && Deno$1.version;
|
|
191
197
|
var v8 = versions && versions.v8;
|
|
192
198
|
var match, version;
|
|
193
199
|
|
|
@@ -212,13 +218,13 @@ var environmentV8Version = version;
|
|
|
212
218
|
|
|
213
219
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
214
220
|
var V8_VERSION$1 = environmentV8Version;
|
|
215
|
-
var fails$
|
|
216
|
-
var globalThis$
|
|
221
|
+
var fails$e = fails$i;
|
|
222
|
+
var globalThis$i = globalThis_1;
|
|
217
223
|
|
|
218
|
-
var $String$5 = globalThis$
|
|
224
|
+
var $String$5 = globalThis$i.String;
|
|
219
225
|
|
|
220
226
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
221
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
227
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$e(function () {
|
|
222
228
|
var symbol = Symbol('symbol detection');
|
|
223
229
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
224
230
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -232,13 +238,13 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$b(func
|
|
|
232
238
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
233
239
|
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
234
240
|
|
|
235
|
-
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
236
|
-
|
|
237
|
-
|
|
241
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1 &&
|
|
242
|
+
!Symbol.sham &&
|
|
243
|
+
typeof Symbol.iterator == 'symbol';
|
|
238
244
|
|
|
239
|
-
var getBuiltIn$
|
|
240
|
-
var isCallable$
|
|
241
|
-
var isPrototypeOf$
|
|
245
|
+
var getBuiltIn$7 = getBuiltIn$8;
|
|
246
|
+
var isCallable$i = isCallable$l;
|
|
247
|
+
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
242
248
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
243
249
|
|
|
244
250
|
var $Object$3 = Object;
|
|
@@ -246,8 +252,8 @@ var $Object$3 = Object;
|
|
|
246
252
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
247
253
|
return typeof it == 'symbol';
|
|
248
254
|
} : function (it) {
|
|
249
|
-
var $Symbol = getBuiltIn$
|
|
250
|
-
return isCallable$
|
|
255
|
+
var $Symbol = getBuiltIn$7('Symbol');
|
|
256
|
+
return isCallable$i($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
|
|
251
257
|
};
|
|
252
258
|
|
|
253
259
|
var $String$4 = String;
|
|
@@ -260,69 +266,71 @@ var tryToString$4 = function (argument) {
|
|
|
260
266
|
}
|
|
261
267
|
};
|
|
262
268
|
|
|
263
|
-
var isCallable$
|
|
269
|
+
var isCallable$h = isCallable$l;
|
|
264
270
|
var tryToString$3 = tryToString$4;
|
|
265
271
|
|
|
266
|
-
var $TypeError$
|
|
272
|
+
var $TypeError$h = TypeError;
|
|
267
273
|
|
|
268
274
|
// `Assert: IsCallable(argument) is true`
|
|
269
|
-
var aCallable$
|
|
270
|
-
if (isCallable$
|
|
271
|
-
throw new $TypeError$
|
|
275
|
+
var aCallable$d = function (argument) {
|
|
276
|
+
if (isCallable$h(argument)) return argument;
|
|
277
|
+
throw new $TypeError$h(tryToString$3(argument) + ' is not a function');
|
|
272
278
|
};
|
|
273
279
|
|
|
274
|
-
var aCallable$
|
|
280
|
+
var aCallable$c = aCallable$d;
|
|
275
281
|
var isNullOrUndefined$2 = isNullOrUndefined$4;
|
|
276
282
|
|
|
277
283
|
// `GetMethod` abstract operation
|
|
278
284
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
279
|
-
var getMethod$
|
|
285
|
+
var getMethod$4 = function (V, P) {
|
|
280
286
|
var func = V[P];
|
|
281
|
-
return isNullOrUndefined$2(func) ? undefined : aCallable$
|
|
287
|
+
return isNullOrUndefined$2(func) ? undefined : aCallable$c(func);
|
|
282
288
|
};
|
|
283
289
|
|
|
284
|
-
var call$
|
|
285
|
-
var isCallable$
|
|
286
|
-
var isObject$
|
|
290
|
+
var call$e = functionCall;
|
|
291
|
+
var isCallable$g = isCallable$l;
|
|
292
|
+
var isObject$c = isObject$d;
|
|
287
293
|
|
|
288
|
-
var $TypeError$
|
|
294
|
+
var $TypeError$g = TypeError;
|
|
289
295
|
|
|
290
296
|
// `OrdinaryToPrimitive` abstract operation
|
|
291
297
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
292
298
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
293
299
|
var fn, val;
|
|
294
|
-
if (pref === 'string' && isCallable$
|
|
295
|
-
if (isCallable$
|
|
296
|
-
if (pref !== 'string' && isCallable$
|
|
297
|
-
throw new $TypeError$
|
|
300
|
+
if (pref === 'string' && isCallable$g(fn = input.toString) && !isObject$c(val = call$e(fn, input))) return val;
|
|
301
|
+
if (isCallable$g(fn = input.valueOf) && !isObject$c(val = call$e(fn, input))) return val;
|
|
302
|
+
if (pref !== 'string' && isCallable$g(fn = input.toString) && !isObject$c(val = call$e(fn, input))) return val;
|
|
303
|
+
throw new $TypeError$g("Can't convert object to primitive value");
|
|
298
304
|
};
|
|
299
305
|
|
|
300
306
|
var sharedStore = {exports: {}};
|
|
301
307
|
|
|
302
|
-
var
|
|
308
|
+
var isPure = false;
|
|
309
|
+
|
|
310
|
+
var globalThis$h = globalThis_1;
|
|
303
311
|
|
|
304
312
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
305
|
-
var defineProperty$
|
|
313
|
+
var defineProperty$7 = Object.defineProperty;
|
|
306
314
|
|
|
307
315
|
var defineGlobalProperty$3 = function (key, value) {
|
|
308
316
|
try {
|
|
309
|
-
defineProperty$
|
|
317
|
+
defineProperty$7(globalThis$h, key, { value: value, configurable: true, writable: true });
|
|
310
318
|
} catch (error) {
|
|
311
|
-
globalThis$
|
|
319
|
+
globalThis$h[key] = value;
|
|
312
320
|
} return value;
|
|
313
321
|
};
|
|
314
322
|
|
|
315
|
-
var globalThis$
|
|
323
|
+
var globalThis$g = globalThis_1;
|
|
316
324
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
317
325
|
|
|
318
326
|
var SHARED = '__core-js_shared__';
|
|
319
|
-
var store$3 = sharedStore.exports = globalThis$
|
|
327
|
+
var store$3 = sharedStore.exports = globalThis$g[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
320
328
|
|
|
321
329
|
(store$3.versions || (store$3.versions = [])).push({
|
|
322
|
-
version: '3.
|
|
330
|
+
version: '3.40.0',
|
|
323
331
|
mode: 'global',
|
|
324
|
-
copyright: '© 2014-
|
|
325
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
332
|
+
copyright: '© 2014-2025 Denis Pushkarev (zloirock.ru)',
|
|
333
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.40.0/LICENSE',
|
|
326
334
|
source: 'https://github.com/zloirock/core-js'
|
|
327
335
|
});
|
|
328
336
|
|
|
@@ -340,72 +348,72 @@ var $Object$2 = Object;
|
|
|
340
348
|
|
|
341
349
|
// `ToObject` abstract operation
|
|
342
350
|
// https://tc39.es/ecma262/#sec-toobject
|
|
343
|
-
var toObject$
|
|
351
|
+
var toObject$5 = function (argument) {
|
|
344
352
|
return $Object$2(requireObjectCoercible$2(argument));
|
|
345
353
|
};
|
|
346
354
|
|
|
347
|
-
var uncurryThis$
|
|
348
|
-
var toObject$
|
|
355
|
+
var uncurryThis$d = functionUncurryThis;
|
|
356
|
+
var toObject$4 = toObject$5;
|
|
349
357
|
|
|
350
|
-
var hasOwnProperty = uncurryThis$
|
|
358
|
+
var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
|
|
351
359
|
|
|
352
360
|
// `HasOwnProperty` abstract operation
|
|
353
361
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
354
362
|
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
355
363
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
356
|
-
return hasOwnProperty(toObject$
|
|
364
|
+
return hasOwnProperty(toObject$4(it), key);
|
|
357
365
|
};
|
|
358
366
|
|
|
359
|
-
var uncurryThis$
|
|
367
|
+
var uncurryThis$c = functionUncurryThis;
|
|
360
368
|
|
|
361
369
|
var id = 0;
|
|
362
370
|
var postfix = Math.random();
|
|
363
|
-
var toString$
|
|
371
|
+
var toString$3 = uncurryThis$c(1.0.toString);
|
|
364
372
|
|
|
365
373
|
var uid$2 = function (key) {
|
|
366
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
374
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
367
375
|
};
|
|
368
376
|
|
|
369
|
-
var globalThis$
|
|
377
|
+
var globalThis$f = globalThis_1;
|
|
370
378
|
var shared$2 = shared$3;
|
|
371
|
-
var hasOwn$
|
|
379
|
+
var hasOwn$b = hasOwnProperty_1;
|
|
372
380
|
var uid$1 = uid$2;
|
|
373
381
|
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
374
382
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
375
383
|
|
|
376
|
-
var Symbol$1 = globalThis$
|
|
384
|
+
var Symbol$1 = globalThis$f.Symbol;
|
|
377
385
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
378
386
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
379
387
|
|
|
380
|
-
var wellKnownSymbol$
|
|
381
|
-
if (!hasOwn$
|
|
382
|
-
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$
|
|
388
|
+
var wellKnownSymbol$i = function (name) {
|
|
389
|
+
if (!hasOwn$b(WellKnownSymbolsStore, name)) {
|
|
390
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$b(Symbol$1, name)
|
|
383
391
|
? Symbol$1[name]
|
|
384
392
|
: createWellKnownSymbol('Symbol.' + name);
|
|
385
393
|
} return WellKnownSymbolsStore[name];
|
|
386
394
|
};
|
|
387
395
|
|
|
388
|
-
var call$
|
|
389
|
-
var isObject$
|
|
396
|
+
var call$d = functionCall;
|
|
397
|
+
var isObject$b = isObject$d;
|
|
390
398
|
var isSymbol$1 = isSymbol$2;
|
|
391
|
-
var getMethod$
|
|
399
|
+
var getMethod$3 = getMethod$4;
|
|
392
400
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
393
|
-
var wellKnownSymbol$
|
|
401
|
+
var wellKnownSymbol$h = wellKnownSymbol$i;
|
|
394
402
|
|
|
395
|
-
var $TypeError$
|
|
396
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
403
|
+
var $TypeError$f = TypeError;
|
|
404
|
+
var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
|
|
397
405
|
|
|
398
406
|
// `ToPrimitive` abstract operation
|
|
399
407
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
400
408
|
var toPrimitive$1 = function (input, pref) {
|
|
401
|
-
if (!isObject$
|
|
402
|
-
var exoticToPrim = getMethod$
|
|
409
|
+
if (!isObject$b(input) || isSymbol$1(input)) return input;
|
|
410
|
+
var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
|
|
403
411
|
var result;
|
|
404
412
|
if (exoticToPrim) {
|
|
405
413
|
if (pref === undefined) pref = 'default';
|
|
406
|
-
result = call$
|
|
407
|
-
if (!isObject$
|
|
408
|
-
throw new $TypeError$
|
|
414
|
+
result = call$d(exoticToPrim, input, pref);
|
|
415
|
+
if (!isObject$b(result) || isSymbol$1(result)) return result;
|
|
416
|
+
throw new $TypeError$f("Can't convert object to primitive value");
|
|
409
417
|
}
|
|
410
418
|
if (pref === undefined) pref = 'number';
|
|
411
419
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -421,36 +429,36 @@ var toPropertyKey$2 = function (argument) {
|
|
|
421
429
|
return isSymbol(key) ? key : key + '';
|
|
422
430
|
};
|
|
423
431
|
|
|
424
|
-
var globalThis$
|
|
425
|
-
var isObject$
|
|
432
|
+
var globalThis$e = globalThis_1;
|
|
433
|
+
var isObject$a = isObject$d;
|
|
426
434
|
|
|
427
|
-
var document$3 = globalThis$
|
|
435
|
+
var document$3 = globalThis$e.document;
|
|
428
436
|
// typeof document.createElement is 'object' in old IE
|
|
429
|
-
var EXISTS$1 = isObject$
|
|
437
|
+
var EXISTS$1 = isObject$a(document$3) && isObject$a(document$3.createElement);
|
|
430
438
|
|
|
431
439
|
var documentCreateElement$2 = function (it) {
|
|
432
440
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
433
441
|
};
|
|
434
442
|
|
|
435
|
-
var DESCRIPTORS$
|
|
436
|
-
var fails$
|
|
443
|
+
var DESCRIPTORS$f = descriptors;
|
|
444
|
+
var fails$d = fails$i;
|
|
437
445
|
var createElement$1 = documentCreateElement$2;
|
|
438
446
|
|
|
439
447
|
// Thanks to IE8 for its funny defineProperty
|
|
440
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
448
|
+
var ie8DomDefine = !DESCRIPTORS$f && !fails$d(function () {
|
|
441
449
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
442
450
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
443
451
|
get: function () { return 7; }
|
|
444
452
|
}).a !== 7;
|
|
445
453
|
});
|
|
446
454
|
|
|
447
|
-
var DESCRIPTORS$
|
|
448
|
-
var call$
|
|
455
|
+
var DESCRIPTORS$e = descriptors;
|
|
456
|
+
var call$c = functionCall;
|
|
449
457
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
450
|
-
var createPropertyDescriptor$
|
|
458
|
+
var createPropertyDescriptor$4 = createPropertyDescriptor$5;
|
|
451
459
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
452
460
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
453
|
-
var hasOwn$
|
|
461
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
454
462
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
455
463
|
|
|
456
464
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -458,23 +466,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
458
466
|
|
|
459
467
|
// `Object.getOwnPropertyDescriptor` method
|
|
460
468
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
461
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
469
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$e ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
462
470
|
O = toIndexedObject$4(O);
|
|
463
471
|
P = toPropertyKey$1(P);
|
|
464
472
|
if (IE8_DOM_DEFINE$1) try {
|
|
465
473
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
466
474
|
} catch (error) { /* empty */ }
|
|
467
|
-
if (hasOwn$
|
|
475
|
+
if (hasOwn$a(O, P)) return createPropertyDescriptor$4(!call$c(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
468
476
|
};
|
|
469
477
|
|
|
470
478
|
var objectDefineProperty = {};
|
|
471
479
|
|
|
472
|
-
var DESCRIPTORS$
|
|
473
|
-
var fails$
|
|
480
|
+
var DESCRIPTORS$d = descriptors;
|
|
481
|
+
var fails$c = fails$i;
|
|
474
482
|
|
|
475
483
|
// V8 ~ Chrome 36-
|
|
476
484
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
477
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
485
|
+
var v8PrototypeDefineBug = DESCRIPTORS$d && fails$c(function () {
|
|
478
486
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
479
487
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
480
488
|
value: 42,
|
|
@@ -482,24 +490,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$a && fails$9(function () {
|
|
|
482
490
|
}).prototype !== 42;
|
|
483
491
|
});
|
|
484
492
|
|
|
485
|
-
var isObject$
|
|
493
|
+
var isObject$9 = isObject$d;
|
|
486
494
|
|
|
487
495
|
var $String$3 = String;
|
|
488
|
-
var $TypeError$
|
|
496
|
+
var $TypeError$e = TypeError;
|
|
489
497
|
|
|
490
498
|
// `Assert: Type(argument) is Object`
|
|
491
|
-
var anObject$
|
|
492
|
-
if (isObject$
|
|
493
|
-
throw new $TypeError$
|
|
499
|
+
var anObject$f = function (argument) {
|
|
500
|
+
if (isObject$9(argument)) return argument;
|
|
501
|
+
throw new $TypeError$e($String$3(argument) + ' is not an object');
|
|
494
502
|
};
|
|
495
503
|
|
|
496
|
-
var DESCRIPTORS$
|
|
504
|
+
var DESCRIPTORS$c = descriptors;
|
|
497
505
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
498
506
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
499
|
-
var anObject$
|
|
507
|
+
var anObject$e = anObject$f;
|
|
500
508
|
var toPropertyKey = toPropertyKey$2;
|
|
501
509
|
|
|
502
|
-
var $TypeError$
|
|
510
|
+
var $TypeError$d = TypeError;
|
|
503
511
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
504
512
|
var $defineProperty = Object.defineProperty;
|
|
505
513
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -510,10 +518,10 @@ var WRITABLE = 'writable';
|
|
|
510
518
|
|
|
511
519
|
// `Object.defineProperty` method
|
|
512
520
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
513
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
514
|
-
anObject$
|
|
521
|
+
objectDefineProperty.f = DESCRIPTORS$c ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
522
|
+
anObject$e(O);
|
|
515
523
|
P = toPropertyKey(P);
|
|
516
|
-
anObject$
|
|
524
|
+
anObject$e(Attributes);
|
|
517
525
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
518
526
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
519
527
|
if (current && current[WRITABLE]) {
|
|
@@ -526,23 +534,23 @@ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
526
534
|
}
|
|
527
535
|
} return $defineProperty(O, P, Attributes);
|
|
528
536
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
529
|
-
anObject$
|
|
537
|
+
anObject$e(O);
|
|
530
538
|
P = toPropertyKey(P);
|
|
531
|
-
anObject$
|
|
539
|
+
anObject$e(Attributes);
|
|
532
540
|
if (IE8_DOM_DEFINE) try {
|
|
533
541
|
return $defineProperty(O, P, Attributes);
|
|
534
542
|
} catch (error) { /* empty */ }
|
|
535
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$
|
|
543
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$d('Accessors not supported');
|
|
536
544
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
537
545
|
return O;
|
|
538
546
|
};
|
|
539
547
|
|
|
540
|
-
var DESCRIPTORS$
|
|
548
|
+
var DESCRIPTORS$b = descriptors;
|
|
541
549
|
var definePropertyModule$4 = objectDefineProperty;
|
|
542
|
-
var createPropertyDescriptor$
|
|
550
|
+
var createPropertyDescriptor$3 = createPropertyDescriptor$5;
|
|
543
551
|
|
|
544
|
-
var createNonEnumerableProperty$
|
|
545
|
-
return definePropertyModule$4.f(object, key, createPropertyDescriptor$
|
|
552
|
+
var createNonEnumerableProperty$8 = DESCRIPTORS$b ? function (object, key, value) {
|
|
553
|
+
return definePropertyModule$4.f(object, key, createPropertyDescriptor$3(1, value));
|
|
546
554
|
} : function (object, key, value) {
|
|
547
555
|
object[key] = value;
|
|
548
556
|
return object;
|
|
@@ -550,17 +558,17 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$8 ? function (object, key, value
|
|
|
550
558
|
|
|
551
559
|
var makeBuiltIn$3 = {exports: {}};
|
|
552
560
|
|
|
553
|
-
var DESCRIPTORS$
|
|
554
|
-
var hasOwn$
|
|
561
|
+
var DESCRIPTORS$a = descriptors;
|
|
562
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
555
563
|
|
|
556
564
|
var FunctionPrototype$1 = Function.prototype;
|
|
557
565
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
558
|
-
var getDescriptor = DESCRIPTORS$
|
|
566
|
+
var getDescriptor = DESCRIPTORS$a && Object.getOwnPropertyDescriptor;
|
|
559
567
|
|
|
560
|
-
var EXISTS = hasOwn$
|
|
568
|
+
var EXISTS = hasOwn$9(FunctionPrototype$1, 'name');
|
|
561
569
|
// additional protection from minified / mangled / dropped function names
|
|
562
570
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
563
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
571
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$a || (DESCRIPTORS$a && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
564
572
|
|
|
565
573
|
var functionName = {
|
|
566
574
|
EXISTS: EXISTS,
|
|
@@ -568,14 +576,14 @@ var functionName = {
|
|
|
568
576
|
CONFIGURABLE: CONFIGURABLE
|
|
569
577
|
};
|
|
570
578
|
|
|
571
|
-
var uncurryThis$
|
|
572
|
-
var isCallable$
|
|
579
|
+
var uncurryThis$b = functionUncurryThis;
|
|
580
|
+
var isCallable$f = isCallable$l;
|
|
573
581
|
var store$1 = sharedStoreExports;
|
|
574
582
|
|
|
575
|
-
var functionToString = uncurryThis$
|
|
583
|
+
var functionToString = uncurryThis$b(Function.toString);
|
|
576
584
|
|
|
577
585
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
578
|
-
if (!isCallable$
|
|
586
|
+
if (!isCallable$f(store$1.inspectSource)) {
|
|
579
587
|
store$1.inspectSource = function (it) {
|
|
580
588
|
return functionToString(it);
|
|
581
589
|
};
|
|
@@ -583,12 +591,12 @@ if (!isCallable$d(store$1.inspectSource)) {
|
|
|
583
591
|
|
|
584
592
|
var inspectSource$3 = store$1.inspectSource;
|
|
585
593
|
|
|
586
|
-
var globalThis$
|
|
587
|
-
var isCallable$
|
|
594
|
+
var globalThis$d = globalThis_1;
|
|
595
|
+
var isCallable$e = isCallable$l;
|
|
588
596
|
|
|
589
|
-
var WeakMap$1 = globalThis$
|
|
597
|
+
var WeakMap$1 = globalThis$d.WeakMap;
|
|
590
598
|
|
|
591
|
-
var weakMapBasicDetection = isCallable$
|
|
599
|
+
var weakMapBasicDetection = isCallable$e(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
592
600
|
|
|
593
601
|
var shared$1 = shared$3;
|
|
594
602
|
var uid = uid$2;
|
|
@@ -602,17 +610,17 @@ var sharedKey$3 = function (key) {
|
|
|
602
610
|
var hiddenKeys$4 = {};
|
|
603
611
|
|
|
604
612
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
605
|
-
var globalThis$
|
|
606
|
-
var isObject$
|
|
607
|
-
var createNonEnumerableProperty$
|
|
608
|
-
var hasOwn$
|
|
613
|
+
var globalThis$c = globalThis_1;
|
|
614
|
+
var isObject$8 = isObject$d;
|
|
615
|
+
var createNonEnumerableProperty$7 = createNonEnumerableProperty$8;
|
|
616
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
609
617
|
var shared = sharedStoreExports;
|
|
610
618
|
var sharedKey$2 = sharedKey$3;
|
|
611
619
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
612
620
|
|
|
613
621
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
614
|
-
var TypeError$2 = globalThis$
|
|
615
|
-
var WeakMap = globalThis$
|
|
622
|
+
var TypeError$2 = globalThis$c.TypeError;
|
|
623
|
+
var WeakMap = globalThis$c.WeakMap;
|
|
616
624
|
var set$1, get, has;
|
|
617
625
|
|
|
618
626
|
var enforce = function (it) {
|
|
@@ -622,7 +630,7 @@ var enforce = function (it) {
|
|
|
622
630
|
var getterFor = function (TYPE) {
|
|
623
631
|
return function (it) {
|
|
624
632
|
var state;
|
|
625
|
-
if (!isObject$
|
|
633
|
+
if (!isObject$8(it) || (state = get(it)).type !== TYPE) {
|
|
626
634
|
throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
627
635
|
} return state;
|
|
628
636
|
};
|
|
@@ -651,16 +659,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
651
659
|
var STATE = sharedKey$2('state');
|
|
652
660
|
hiddenKeys$3[STATE] = true;
|
|
653
661
|
set$1 = function (it, metadata) {
|
|
654
|
-
if (hasOwn$
|
|
662
|
+
if (hasOwn$8(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
655
663
|
metadata.facade = it;
|
|
656
|
-
createNonEnumerableProperty$
|
|
664
|
+
createNonEnumerableProperty$7(it, STATE, metadata);
|
|
657
665
|
return metadata;
|
|
658
666
|
};
|
|
659
667
|
get = function (it) {
|
|
660
|
-
return hasOwn$
|
|
668
|
+
return hasOwn$8(it, STATE) ? it[STATE] : {};
|
|
661
669
|
};
|
|
662
670
|
has = function (it) {
|
|
663
|
-
return hasOwn$
|
|
671
|
+
return hasOwn$8(it, STATE);
|
|
664
672
|
};
|
|
665
673
|
}
|
|
666
674
|
|
|
@@ -672,51 +680,51 @@ var internalState = {
|
|
|
672
680
|
getterFor: getterFor
|
|
673
681
|
};
|
|
674
682
|
|
|
675
|
-
var uncurryThis$
|
|
676
|
-
var fails$
|
|
677
|
-
var isCallable$
|
|
678
|
-
var hasOwn$
|
|
679
|
-
var DESCRIPTORS$
|
|
683
|
+
var uncurryThis$a = functionUncurryThis;
|
|
684
|
+
var fails$b = fails$i;
|
|
685
|
+
var isCallable$d = isCallable$l;
|
|
686
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
687
|
+
var DESCRIPTORS$9 = descriptors;
|
|
680
688
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
681
689
|
var inspectSource$2 = inspectSource$3;
|
|
682
|
-
var InternalStateModule$
|
|
690
|
+
var InternalStateModule$3 = internalState;
|
|
683
691
|
|
|
684
|
-
var enforceInternalState = InternalStateModule$
|
|
685
|
-
var getInternalState$1 = InternalStateModule$
|
|
692
|
+
var enforceInternalState = InternalStateModule$3.enforce;
|
|
693
|
+
var getInternalState$1 = InternalStateModule$3.get;
|
|
686
694
|
var $String$2 = String;
|
|
687
695
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
688
|
-
var defineProperty$
|
|
689
|
-
var stringSlice = uncurryThis$
|
|
690
|
-
var replace = uncurryThis$
|
|
691
|
-
var join = uncurryThis$
|
|
696
|
+
var defineProperty$6 = Object.defineProperty;
|
|
697
|
+
var stringSlice = uncurryThis$a(''.slice);
|
|
698
|
+
var replace$1 = uncurryThis$a(''.replace);
|
|
699
|
+
var join = uncurryThis$a([].join);
|
|
692
700
|
|
|
693
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$
|
|
694
|
-
return defineProperty$
|
|
701
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$9 && !fails$b(function () {
|
|
702
|
+
return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
695
703
|
});
|
|
696
704
|
|
|
697
705
|
var TEMPLATE = String(String).split('String');
|
|
698
706
|
|
|
699
707
|
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
700
708
|
if (stringSlice($String$2(name), 0, 7) === 'Symbol(') {
|
|
701
|
-
name = '[' + replace($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
709
|
+
name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
702
710
|
}
|
|
703
711
|
if (options && options.getter) name = 'get ' + name;
|
|
704
712
|
if (options && options.setter) name = 'set ' + name;
|
|
705
|
-
if (!hasOwn$
|
|
706
|
-
if (DESCRIPTORS$
|
|
713
|
+
if (!hasOwn$7(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
714
|
+
if (DESCRIPTORS$9) defineProperty$6(value, 'name', { value: name, configurable: true });
|
|
707
715
|
else value.name = name;
|
|
708
716
|
}
|
|
709
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
710
|
-
defineProperty$
|
|
717
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$7(options, 'arity') && value.length !== options.arity) {
|
|
718
|
+
defineProperty$6(value, 'length', { value: options.arity });
|
|
711
719
|
}
|
|
712
720
|
try {
|
|
713
|
-
if (options && hasOwn$
|
|
714
|
-
if (DESCRIPTORS$
|
|
721
|
+
if (options && hasOwn$7(options, 'constructor') && options.constructor) {
|
|
722
|
+
if (DESCRIPTORS$9) defineProperty$6(value, 'prototype', { writable: false });
|
|
715
723
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
716
724
|
} else if (value.prototype) value.prototype = undefined;
|
|
717
725
|
} catch (error) { /* empty */ }
|
|
718
726
|
var state = enforceInternalState(value);
|
|
719
|
-
if (!hasOwn$
|
|
727
|
+
if (!hasOwn$7(state, 'source')) {
|
|
720
728
|
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
721
729
|
} return value;
|
|
722
730
|
};
|
|
@@ -724,21 +732,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
|
724
732
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
725
733
|
// eslint-disable-next-line no-extend-native -- required
|
|
726
734
|
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
727
|
-
return isCallable$
|
|
735
|
+
return isCallable$d(this) && getInternalState$1(this).source || inspectSource$2(this);
|
|
728
736
|
}, 'toString');
|
|
729
737
|
|
|
730
738
|
var makeBuiltInExports = makeBuiltIn$3.exports;
|
|
731
739
|
|
|
732
|
-
var isCallable$
|
|
740
|
+
var isCallable$c = isCallable$l;
|
|
733
741
|
var definePropertyModule$3 = objectDefineProperty;
|
|
734
742
|
var makeBuiltIn$1 = makeBuiltInExports;
|
|
735
743
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
736
744
|
|
|
737
|
-
var defineBuiltIn$
|
|
745
|
+
var defineBuiltIn$6 = function (O, key, value, options) {
|
|
738
746
|
if (!options) options = {};
|
|
739
747
|
var simple = options.enumerable;
|
|
740
748
|
var name = options.name !== undefined ? options.name : key;
|
|
741
|
-
if (isCallable$
|
|
749
|
+
if (isCallable$c(value)) makeBuiltIn$1(value, name, options);
|
|
742
750
|
if (options.global) {
|
|
743
751
|
if (simple) O[key] = value;
|
|
744
752
|
else defineGlobalProperty$1(key, value);
|
|
@@ -808,19 +816,19 @@ var toLength = toLength$1;
|
|
|
808
816
|
|
|
809
817
|
// `LengthOfArrayLike` abstract operation
|
|
810
818
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
811
|
-
var lengthOfArrayLike$
|
|
819
|
+
var lengthOfArrayLike$4 = function (obj) {
|
|
812
820
|
return toLength(obj.length);
|
|
813
821
|
};
|
|
814
822
|
|
|
815
823
|
var toIndexedObject$3 = toIndexedObject$5;
|
|
816
824
|
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
817
|
-
var lengthOfArrayLike$
|
|
825
|
+
var lengthOfArrayLike$3 = lengthOfArrayLike$4;
|
|
818
826
|
|
|
819
827
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
820
828
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
821
829
|
return function ($this, el, fromIndex) {
|
|
822
830
|
var O = toIndexedObject$3($this);
|
|
823
|
-
var length = lengthOfArrayLike$
|
|
831
|
+
var length = lengthOfArrayLike$3(O);
|
|
824
832
|
if (length === 0) return !IS_INCLUDES && -1;
|
|
825
833
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
826
834
|
var value;
|
|
@@ -846,22 +854,22 @@ var arrayIncludes = {
|
|
|
846
854
|
indexOf: createMethod$1(false)
|
|
847
855
|
};
|
|
848
856
|
|
|
849
|
-
var uncurryThis$
|
|
850
|
-
var hasOwn$
|
|
857
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
858
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
851
859
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
852
860
|
var indexOf = arrayIncludes.indexOf;
|
|
853
861
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
854
862
|
|
|
855
|
-
var push = uncurryThis$
|
|
863
|
+
var push = uncurryThis$9([].push);
|
|
856
864
|
|
|
857
865
|
var objectKeysInternal = function (object, names) {
|
|
858
866
|
var O = toIndexedObject$2(object);
|
|
859
867
|
var i = 0;
|
|
860
868
|
var result = [];
|
|
861
869
|
var key;
|
|
862
|
-
for (key in O) !hasOwn$
|
|
870
|
+
for (key in O) !hasOwn$6(hiddenKeys$2, key) && hasOwn$6(O, key) && push(result, key);
|
|
863
871
|
// Don't enum bug & hidden keys
|
|
864
|
-
while (names.length > i) if (hasOwn$
|
|
872
|
+
while (names.length > i) if (hasOwn$6(O, key = names[i++])) {
|
|
865
873
|
~indexOf(result, key) || push(result, key);
|
|
866
874
|
}
|
|
867
875
|
return result;
|
|
@@ -895,40 +903,40 @@ var objectGetOwnPropertySymbols = {};
|
|
|
895
903
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
896
904
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
897
905
|
|
|
898
|
-
var getBuiltIn$
|
|
899
|
-
var uncurryThis$
|
|
906
|
+
var getBuiltIn$6 = getBuiltIn$8;
|
|
907
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
900
908
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
901
909
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
902
|
-
var anObject$
|
|
910
|
+
var anObject$d = anObject$f;
|
|
903
911
|
|
|
904
|
-
var concat$1 = uncurryThis$
|
|
912
|
+
var concat$1 = uncurryThis$8([].concat);
|
|
905
913
|
|
|
906
914
|
// all object keys, includes non-enumerable and symbols
|
|
907
|
-
var ownKeys$1 = getBuiltIn$
|
|
908
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
915
|
+
var ownKeys$1 = getBuiltIn$6('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
916
|
+
var keys = getOwnPropertyNamesModule.f(anObject$d(it));
|
|
909
917
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
910
918
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
911
919
|
};
|
|
912
920
|
|
|
913
|
-
var hasOwn$
|
|
921
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
914
922
|
var ownKeys = ownKeys$1;
|
|
915
923
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
916
924
|
var definePropertyModule$2 = objectDefineProperty;
|
|
917
925
|
|
|
918
|
-
var copyConstructorProperties$
|
|
926
|
+
var copyConstructorProperties$2 = function (target, source, exceptions) {
|
|
919
927
|
var keys = ownKeys(source);
|
|
920
928
|
var defineProperty = definePropertyModule$2.f;
|
|
921
929
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
922
930
|
for (var i = 0; i < keys.length; i++) {
|
|
923
931
|
var key = keys[i];
|
|
924
|
-
if (!hasOwn$
|
|
932
|
+
if (!hasOwn$5(target, key) && !(exceptions && hasOwn$5(exceptions, key))) {
|
|
925
933
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
926
934
|
}
|
|
927
935
|
}
|
|
928
936
|
};
|
|
929
937
|
|
|
930
|
-
var fails$
|
|
931
|
-
var isCallable$
|
|
938
|
+
var fails$a = fails$i;
|
|
939
|
+
var isCallable$b = isCallable$l;
|
|
932
940
|
|
|
933
941
|
var replacement = /#|\.prototype\./;
|
|
934
942
|
|
|
@@ -936,7 +944,7 @@ var isForced$2 = function (feature, detection) {
|
|
|
936
944
|
var value = data[normalize(feature)];
|
|
937
945
|
return value === POLYFILL ? true
|
|
938
946
|
: value === NATIVE ? false
|
|
939
|
-
: isCallable$
|
|
947
|
+
: isCallable$b(detection) ? fails$a(detection)
|
|
940
948
|
: !!detection;
|
|
941
949
|
};
|
|
942
950
|
|
|
@@ -950,12 +958,12 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
|
950
958
|
|
|
951
959
|
var isForced_1 = isForced$2;
|
|
952
960
|
|
|
953
|
-
var globalThis$
|
|
954
|
-
var getOwnPropertyDescriptor$
|
|
955
|
-
var createNonEnumerableProperty$
|
|
956
|
-
var defineBuiltIn$
|
|
961
|
+
var globalThis$b = globalThis_1;
|
|
962
|
+
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
963
|
+
var createNonEnumerableProperty$6 = createNonEnumerableProperty$8;
|
|
964
|
+
var defineBuiltIn$5 = defineBuiltIn$6;
|
|
957
965
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
958
|
-
var copyConstructorProperties = copyConstructorProperties$
|
|
966
|
+
var copyConstructorProperties$1 = copyConstructorProperties$2;
|
|
959
967
|
var isForced$1 = isForced_1;
|
|
960
968
|
|
|
961
969
|
/*
|
|
@@ -979,29 +987,29 @@ var _export = function (options, source) {
|
|
|
979
987
|
var STATIC = options.stat;
|
|
980
988
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
981
989
|
if (GLOBAL) {
|
|
982
|
-
target = globalThis$
|
|
990
|
+
target = globalThis$b;
|
|
983
991
|
} else if (STATIC) {
|
|
984
|
-
target = globalThis$
|
|
992
|
+
target = globalThis$b[TARGET] || defineGlobalProperty(TARGET, {});
|
|
985
993
|
} else {
|
|
986
|
-
target = globalThis$
|
|
994
|
+
target = globalThis$b[TARGET] && globalThis$b[TARGET].prototype;
|
|
987
995
|
}
|
|
988
996
|
if (target) for (key in source) {
|
|
989
997
|
sourceProperty = source[key];
|
|
990
998
|
if (options.dontCallGetSet) {
|
|
991
|
-
descriptor = getOwnPropertyDescriptor$
|
|
999
|
+
descriptor = getOwnPropertyDescriptor$2(target, key);
|
|
992
1000
|
targetProperty = descriptor && descriptor.value;
|
|
993
1001
|
} else targetProperty = target[key];
|
|
994
1002
|
FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
995
1003
|
// contained in target
|
|
996
1004
|
if (!FORCED && targetProperty !== undefined) {
|
|
997
1005
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
998
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1006
|
+
copyConstructorProperties$1(sourceProperty, targetProperty);
|
|
999
1007
|
}
|
|
1000
1008
|
// add a flag to not completely full polyfills
|
|
1001
1009
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
1002
|
-
createNonEnumerableProperty$
|
|
1010
|
+
createNonEnumerableProperty$6(sourceProperty, 'sham', true);
|
|
1003
1011
|
}
|
|
1004
|
-
defineBuiltIn$
|
|
1012
|
+
defineBuiltIn$5(target, key, sourceProperty, options);
|
|
1005
1013
|
}
|
|
1006
1014
|
};
|
|
1007
1015
|
|
|
@@ -1017,18 +1025,18 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1017
1025
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
1018
1026
|
};
|
|
1019
1027
|
|
|
1020
|
-
var DESCRIPTORS$
|
|
1028
|
+
var DESCRIPTORS$8 = descriptors;
|
|
1021
1029
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1022
1030
|
var definePropertyModule$1 = objectDefineProperty;
|
|
1023
|
-
var anObject$
|
|
1031
|
+
var anObject$c = anObject$f;
|
|
1024
1032
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
1025
1033
|
var objectKeys$1 = objectKeys$2;
|
|
1026
1034
|
|
|
1027
1035
|
// `Object.defineProperties` method
|
|
1028
1036
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1029
1037
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1030
|
-
objectDefineProperties.f = DESCRIPTORS$
|
|
1031
|
-
anObject$
|
|
1038
|
+
objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1039
|
+
anObject$c(O);
|
|
1032
1040
|
var props = toIndexedObject$1(Properties);
|
|
1033
1041
|
var keys = objectKeys$1(Properties);
|
|
1034
1042
|
var length = keys.length;
|
|
@@ -1038,12 +1046,12 @@ objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
|
|
|
1038
1046
|
return O;
|
|
1039
1047
|
};
|
|
1040
1048
|
|
|
1041
|
-
var getBuiltIn$
|
|
1049
|
+
var getBuiltIn$5 = getBuiltIn$8;
|
|
1042
1050
|
|
|
1043
|
-
var html$2 = getBuiltIn$
|
|
1051
|
+
var html$2 = getBuiltIn$5('document', 'documentElement');
|
|
1044
1052
|
|
|
1045
1053
|
/* global ActiveXObject -- old IE, WSH */
|
|
1046
|
-
var anObject$
|
|
1054
|
+
var anObject$b = anObject$f;
|
|
1047
1055
|
var definePropertiesModule = objectDefineProperties;
|
|
1048
1056
|
var enumBugKeys = enumBugKeys$3;
|
|
1049
1057
|
var hiddenKeys = hiddenKeys$4;
|
|
@@ -1118,7 +1126,7 @@ hiddenKeys[IE_PROTO$1] = true;
|
|
|
1118
1126
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1119
1127
|
var result;
|
|
1120
1128
|
if (O !== null) {
|
|
1121
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
1129
|
+
EmptyConstructor[PROTOTYPE] = anObject$b(O);
|
|
1122
1130
|
result = new EmptyConstructor();
|
|
1123
1131
|
EmptyConstructor[PROTOTYPE] = null;
|
|
1124
1132
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -1127,19 +1135,19 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1127
1135
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1128
1136
|
};
|
|
1129
1137
|
|
|
1130
|
-
var wellKnownSymbol$
|
|
1131
|
-
var create$
|
|
1132
|
-
var defineProperty$
|
|
1138
|
+
var wellKnownSymbol$g = wellKnownSymbol$i;
|
|
1139
|
+
var create$2 = objectCreate;
|
|
1140
|
+
var defineProperty$5 = objectDefineProperty.f;
|
|
1133
1141
|
|
|
1134
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
1142
|
+
var UNSCOPABLES = wellKnownSymbol$g('unscopables');
|
|
1135
1143
|
var ArrayPrototype$1 = Array.prototype;
|
|
1136
1144
|
|
|
1137
1145
|
// Array.prototype[@@unscopables]
|
|
1138
1146
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1139
1147
|
if (ArrayPrototype$1[UNSCOPABLES] === undefined) {
|
|
1140
|
-
defineProperty$
|
|
1148
|
+
defineProperty$5(ArrayPrototype$1, UNSCOPABLES, {
|
|
1141
1149
|
configurable: true,
|
|
1142
|
-
value: create$
|
|
1150
|
+
value: create$2(null)
|
|
1143
1151
|
});
|
|
1144
1152
|
}
|
|
1145
1153
|
|
|
@@ -1148,20 +1156,20 @@ var addToUnscopables$2 = function (key) {
|
|
|
1148
1156
|
ArrayPrototype$1[UNSCOPABLES][key] = true;
|
|
1149
1157
|
};
|
|
1150
1158
|
|
|
1151
|
-
var $$
|
|
1159
|
+
var $$i = _export;
|
|
1152
1160
|
var $includes = arrayIncludes.includes;
|
|
1153
|
-
var fails$
|
|
1161
|
+
var fails$9 = fails$i;
|
|
1154
1162
|
var addToUnscopables$1 = addToUnscopables$2;
|
|
1155
1163
|
|
|
1156
1164
|
// FF99+ bug
|
|
1157
|
-
var BROKEN_ON_SPARSE = fails$
|
|
1165
|
+
var BROKEN_ON_SPARSE = fails$9(function () {
|
|
1158
1166
|
// eslint-disable-next-line es/no-array-prototype-includes -- detection
|
|
1159
1167
|
return !Array(1).includes();
|
|
1160
1168
|
});
|
|
1161
1169
|
|
|
1162
1170
|
// `Array.prototype.includes` method
|
|
1163
1171
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
1164
|
-
$$
|
|
1172
|
+
$$i({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
1165
1173
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
1166
1174
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
1167
1175
|
}
|
|
@@ -1172,18 +1180,18 @@ addToUnscopables$1('includes');
|
|
|
1172
1180
|
|
|
1173
1181
|
var iterators = {};
|
|
1174
1182
|
|
|
1175
|
-
var fails$
|
|
1183
|
+
var fails$8 = fails$i;
|
|
1176
1184
|
|
|
1177
|
-
var correctPrototypeGetter = !fails$
|
|
1185
|
+
var correctPrototypeGetter = !fails$8(function () {
|
|
1178
1186
|
function F() { /* empty */ }
|
|
1179
1187
|
F.prototype.constructor = null;
|
|
1180
1188
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1181
1189
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1182
1190
|
});
|
|
1183
1191
|
|
|
1184
|
-
var hasOwn$
|
|
1185
|
-
var isCallable$
|
|
1186
|
-
var toObject$
|
|
1192
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
1193
|
+
var isCallable$a = isCallable$l;
|
|
1194
|
+
var toObject$3 = toObject$5;
|
|
1187
1195
|
var sharedKey = sharedKey$3;
|
|
1188
1196
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1189
1197
|
|
|
@@ -1195,27 +1203,27 @@ var ObjectPrototype = $Object$1.prototype;
|
|
|
1195
1203
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1196
1204
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1197
1205
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1198
|
-
var object = toObject$
|
|
1199
|
-
if (hasOwn$
|
|
1206
|
+
var object = toObject$3(O);
|
|
1207
|
+
if (hasOwn$4(object, IE_PROTO)) return object[IE_PROTO];
|
|
1200
1208
|
var constructor = object.constructor;
|
|
1201
|
-
if (isCallable$
|
|
1209
|
+
if (isCallable$a(constructor) && object instanceof constructor) {
|
|
1202
1210
|
return constructor.prototype;
|
|
1203
1211
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1204
1212
|
};
|
|
1205
1213
|
|
|
1206
|
-
var fails$
|
|
1207
|
-
var isCallable$
|
|
1208
|
-
var isObject$
|
|
1209
|
-
var getPrototypeOf$
|
|
1210
|
-
var defineBuiltIn$
|
|
1211
|
-
var wellKnownSymbol$
|
|
1214
|
+
var fails$7 = fails$i;
|
|
1215
|
+
var isCallable$9 = isCallable$l;
|
|
1216
|
+
var isObject$7 = isObject$d;
|
|
1217
|
+
var getPrototypeOf$2 = objectGetPrototypeOf;
|
|
1218
|
+
var defineBuiltIn$4 = defineBuiltIn$6;
|
|
1219
|
+
var wellKnownSymbol$f = wellKnownSymbol$i;
|
|
1212
1220
|
|
|
1213
|
-
var ITERATOR$
|
|
1221
|
+
var ITERATOR$6 = wellKnownSymbol$f('iterator');
|
|
1214
1222
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1215
1223
|
|
|
1216
1224
|
// `%IteratorPrototype%` object
|
|
1217
1225
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1218
|
-
var IteratorPrototype$
|
|
1226
|
+
var IteratorPrototype$4, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1219
1227
|
|
|
1220
1228
|
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1221
1229
|
if ([].keys) {
|
|
@@ -1223,48 +1231,48 @@ if ([].keys) {
|
|
|
1223
1231
|
// Safari 8 has buggy iterators w/o `next`
|
|
1224
1232
|
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
|
|
1225
1233
|
else {
|
|
1226
|
-
PrototypeOfArrayIteratorPrototype = getPrototypeOf$
|
|
1227
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$
|
|
1234
|
+
PrototypeOfArrayIteratorPrototype = getPrototypeOf$2(getPrototypeOf$2(arrayIterator));
|
|
1235
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$4 = PrototypeOfArrayIteratorPrototype;
|
|
1228
1236
|
}
|
|
1229
1237
|
}
|
|
1230
1238
|
|
|
1231
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$
|
|
1239
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$7(IteratorPrototype$4) || fails$7(function () {
|
|
1232
1240
|
var test = {};
|
|
1233
1241
|
// FF44- legacy iterators case
|
|
1234
|
-
return IteratorPrototype$
|
|
1242
|
+
return IteratorPrototype$4[ITERATOR$6].call(test) !== test;
|
|
1235
1243
|
});
|
|
1236
1244
|
|
|
1237
|
-
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$
|
|
1245
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
|
|
1238
1246
|
|
|
1239
1247
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1240
1248
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1241
|
-
if (!isCallable$
|
|
1242
|
-
defineBuiltIn$
|
|
1249
|
+
if (!isCallable$9(IteratorPrototype$4[ITERATOR$6])) {
|
|
1250
|
+
defineBuiltIn$4(IteratorPrototype$4, ITERATOR$6, function () {
|
|
1243
1251
|
return this;
|
|
1244
1252
|
});
|
|
1245
1253
|
}
|
|
1246
1254
|
|
|
1247
1255
|
var iteratorsCore = {
|
|
1248
|
-
IteratorPrototype: IteratorPrototype$
|
|
1256
|
+
IteratorPrototype: IteratorPrototype$4,
|
|
1249
1257
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1250
1258
|
};
|
|
1251
1259
|
|
|
1252
|
-
var defineProperty$
|
|
1253
|
-
var hasOwn$
|
|
1254
|
-
var wellKnownSymbol$
|
|
1260
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
1261
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1262
|
+
var wellKnownSymbol$e = wellKnownSymbol$i;
|
|
1255
1263
|
|
|
1256
|
-
var TO_STRING_TAG$
|
|
1264
|
+
var TO_STRING_TAG$4 = wellKnownSymbol$e('toStringTag');
|
|
1257
1265
|
|
|
1258
1266
|
var setToStringTag$4 = function (target, TAG, STATIC) {
|
|
1259
1267
|
if (target && !STATIC) target = target.prototype;
|
|
1260
|
-
if (target && !hasOwn$
|
|
1261
|
-
defineProperty$
|
|
1268
|
+
if (target && !hasOwn$3(target, TO_STRING_TAG$4)) {
|
|
1269
|
+
defineProperty$4(target, TO_STRING_TAG$4, { configurable: true, value: TAG });
|
|
1262
1270
|
}
|
|
1263
1271
|
};
|
|
1264
1272
|
|
|
1265
|
-
var IteratorPrototype$
|
|
1266
|
-
var create = objectCreate;
|
|
1267
|
-
var createPropertyDescriptor$
|
|
1273
|
+
var IteratorPrototype$3 = iteratorsCore.IteratorPrototype;
|
|
1274
|
+
var create$1 = objectCreate;
|
|
1275
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$5;
|
|
1268
1276
|
var setToStringTag$3 = setToStringTag$4;
|
|
1269
1277
|
var Iterators$4 = iterators;
|
|
1270
1278
|
|
|
@@ -1272,41 +1280,41 @@ var returnThis$1 = function () { return this; };
|
|
|
1272
1280
|
|
|
1273
1281
|
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1274
1282
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1275
|
-
IteratorConstructor.prototype = create(IteratorPrototype$
|
|
1283
|
+
IteratorConstructor.prototype = create$1(IteratorPrototype$3, { next: createPropertyDescriptor$2(+!ENUMERABLE_NEXT, next) });
|
|
1276
1284
|
setToStringTag$3(IteratorConstructor, TO_STRING_TAG, false);
|
|
1277
1285
|
Iterators$4[TO_STRING_TAG] = returnThis$1;
|
|
1278
1286
|
return IteratorConstructor;
|
|
1279
1287
|
};
|
|
1280
1288
|
|
|
1281
|
-
var uncurryThis$
|
|
1282
|
-
var aCallable$
|
|
1289
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1290
|
+
var aCallable$b = aCallable$d;
|
|
1283
1291
|
|
|
1284
1292
|
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1285
1293
|
try {
|
|
1286
1294
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1287
|
-
return uncurryThis$
|
|
1295
|
+
return uncurryThis$7(aCallable$b(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1288
1296
|
} catch (error) { /* empty */ }
|
|
1289
1297
|
};
|
|
1290
1298
|
|
|
1291
|
-
var isObject$
|
|
1299
|
+
var isObject$6 = isObject$d;
|
|
1292
1300
|
|
|
1293
1301
|
var isPossiblePrototype$1 = function (argument) {
|
|
1294
|
-
return isObject$
|
|
1302
|
+
return isObject$6(argument) || argument === null;
|
|
1295
1303
|
};
|
|
1296
1304
|
|
|
1297
1305
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1298
1306
|
|
|
1299
1307
|
var $String$1 = String;
|
|
1300
|
-
var $TypeError$
|
|
1308
|
+
var $TypeError$c = TypeError;
|
|
1301
1309
|
|
|
1302
1310
|
var aPossiblePrototype$1 = function (argument) {
|
|
1303
1311
|
if (isPossiblePrototype(argument)) return argument;
|
|
1304
|
-
throw new $TypeError$
|
|
1312
|
+
throw new $TypeError$c("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1305
1313
|
};
|
|
1306
1314
|
|
|
1307
1315
|
/* eslint-disable no-proto -- safe */
|
|
1308
1316
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1309
|
-
var isObject$
|
|
1317
|
+
var isObject$5 = isObject$d;
|
|
1310
1318
|
var requireObjectCoercible$1 = requireObjectCoercible$4;
|
|
1311
1319
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1312
1320
|
|
|
@@ -1326,32 +1334,32 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1326
1334
|
return function setPrototypeOf(O, proto) {
|
|
1327
1335
|
requireObjectCoercible$1(O);
|
|
1328
1336
|
aPossiblePrototype(proto);
|
|
1329
|
-
if (!isObject$
|
|
1337
|
+
if (!isObject$5(O)) return O;
|
|
1330
1338
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1331
1339
|
else O.__proto__ = proto;
|
|
1332
1340
|
return O;
|
|
1333
1341
|
};
|
|
1334
1342
|
}() : undefined);
|
|
1335
1343
|
|
|
1336
|
-
var $$
|
|
1337
|
-
var call$
|
|
1344
|
+
var $$h = _export;
|
|
1345
|
+
var call$b = functionCall;
|
|
1338
1346
|
var FunctionName = functionName;
|
|
1339
|
-
var isCallable$
|
|
1347
|
+
var isCallable$8 = isCallable$l;
|
|
1340
1348
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1341
|
-
var getPrototypeOf = objectGetPrototypeOf;
|
|
1342
|
-
var setPrototypeOf$
|
|
1349
|
+
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1350
|
+
var setPrototypeOf$3 = objectSetPrototypeOf;
|
|
1343
1351
|
var setToStringTag$2 = setToStringTag$4;
|
|
1344
|
-
var createNonEnumerableProperty$
|
|
1345
|
-
var defineBuiltIn$
|
|
1346
|
-
var wellKnownSymbol$
|
|
1352
|
+
var createNonEnumerableProperty$5 = createNonEnumerableProperty$8;
|
|
1353
|
+
var defineBuiltIn$3 = defineBuiltIn$6;
|
|
1354
|
+
var wellKnownSymbol$d = wellKnownSymbol$i;
|
|
1347
1355
|
var Iterators$3 = iterators;
|
|
1348
1356
|
var IteratorsCore = iteratorsCore;
|
|
1349
1357
|
|
|
1350
1358
|
var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
1351
1359
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1352
|
-
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1360
|
+
var IteratorPrototype$2 = IteratorsCore.IteratorPrototype;
|
|
1353
1361
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1354
|
-
var ITERATOR$
|
|
1362
|
+
var ITERATOR$5 = wellKnownSymbol$d('iterator');
|
|
1355
1363
|
var KEYS = 'keys';
|
|
1356
1364
|
var VALUES = 'values';
|
|
1357
1365
|
var ENTRIES = 'entries';
|
|
@@ -1377,7 +1385,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1377
1385
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1378
1386
|
var INCORRECT_VALUES_NAME = false;
|
|
1379
1387
|
var IterablePrototype = Iterable.prototype;
|
|
1380
|
-
var nativeIterator = IterablePrototype[ITERATOR$
|
|
1388
|
+
var nativeIterator = IterablePrototype[ITERATOR$5]
|
|
1381
1389
|
|| IterablePrototype['@@iterator']
|
|
1382
1390
|
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1383
1391
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
@@ -1386,13 +1394,13 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1386
1394
|
|
|
1387
1395
|
// fix native
|
|
1388
1396
|
if (anyNativeIterator) {
|
|
1389
|
-
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
1397
|
+
CurrentIteratorPrototype = getPrototypeOf$1(anyNativeIterator.call(new Iterable()));
|
|
1390
1398
|
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
1391
|
-
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1392
|
-
if (setPrototypeOf$
|
|
1393
|
-
setPrototypeOf$
|
|
1394
|
-
} else if (!isCallable$
|
|
1395
|
-
defineBuiltIn$
|
|
1399
|
+
if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
|
1400
|
+
if (setPrototypeOf$3) {
|
|
1401
|
+
setPrototypeOf$3(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
1402
|
+
} else if (!isCallable$8(CurrentIteratorPrototype[ITERATOR$5])) {
|
|
1403
|
+
defineBuiltIn$3(CurrentIteratorPrototype, ITERATOR$5, returnThis);
|
|
1396
1404
|
}
|
|
1397
1405
|
}
|
|
1398
1406
|
// Set @@toStringTag to native iterators
|
|
@@ -1403,10 +1411,10 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1403
1411
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
1404
1412
|
if (PROPER_FUNCTION_NAME && DEFAULT === VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1405
1413
|
if (CONFIGURABLE_FUNCTION_NAME) {
|
|
1406
|
-
createNonEnumerableProperty$
|
|
1414
|
+
createNonEnumerableProperty$5(IterablePrototype, 'name', VALUES);
|
|
1407
1415
|
} else {
|
|
1408
1416
|
INCORRECT_VALUES_NAME = true;
|
|
1409
|
-
defaultIterator = function values() { return call$
|
|
1417
|
+
defaultIterator = function values() { return call$b(nativeIterator, this); };
|
|
1410
1418
|
}
|
|
1411
1419
|
}
|
|
1412
1420
|
|
|
@@ -1419,14 +1427,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1419
1427
|
};
|
|
1420
1428
|
if (FORCED) for (KEY in methods) {
|
|
1421
1429
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1422
|
-
defineBuiltIn$
|
|
1430
|
+
defineBuiltIn$3(IterablePrototype, KEY, methods[KEY]);
|
|
1423
1431
|
}
|
|
1424
|
-
} else $$
|
|
1432
|
+
} else $$h({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1425
1433
|
}
|
|
1426
1434
|
|
|
1427
1435
|
// define iterator
|
|
1428
|
-
if (IterablePrototype[ITERATOR$
|
|
1429
|
-
defineBuiltIn$
|
|
1436
|
+
if (IterablePrototype[ITERATOR$5] !== defaultIterator) {
|
|
1437
|
+
defineBuiltIn$3(IterablePrototype, ITERATOR$5, defaultIterator, { name: DEFAULT });
|
|
1430
1438
|
}
|
|
1431
1439
|
Iterators$3[NAME] = defaultIterator;
|
|
1432
1440
|
|
|
@@ -1435,22 +1443,22 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1435
1443
|
|
|
1436
1444
|
// `CreateIterResultObject` abstract operation
|
|
1437
1445
|
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1438
|
-
var createIterResultObject$
|
|
1446
|
+
var createIterResultObject$2 = function (value, done) {
|
|
1439
1447
|
return { value: value, done: done };
|
|
1440
1448
|
};
|
|
1441
1449
|
|
|
1442
1450
|
var toIndexedObject = toIndexedObject$5;
|
|
1443
1451
|
var addToUnscopables = addToUnscopables$2;
|
|
1444
1452
|
var Iterators$2 = iterators;
|
|
1445
|
-
var InternalStateModule$
|
|
1446
|
-
var defineProperty$
|
|
1453
|
+
var InternalStateModule$2 = internalState;
|
|
1454
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1447
1455
|
var defineIterator = iteratorDefine;
|
|
1448
|
-
var createIterResultObject = createIterResultObject$
|
|
1449
|
-
var DESCRIPTORS$
|
|
1456
|
+
var createIterResultObject$1 = createIterResultObject$2;
|
|
1457
|
+
var DESCRIPTORS$7 = descriptors;
|
|
1450
1458
|
|
|
1451
1459
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1452
|
-
var setInternalState$
|
|
1453
|
-
var getInternalState = InternalStateModule$
|
|
1460
|
+
var setInternalState$2 = InternalStateModule$2.set;
|
|
1461
|
+
var getInternalState = InternalStateModule$2.getterFor(ARRAY_ITERATOR);
|
|
1454
1462
|
|
|
1455
1463
|
// `Array.prototype.entries` method
|
|
1456
1464
|
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
@@ -1463,7 +1471,7 @@ var getInternalState = InternalStateModule$1.getterFor(ARRAY_ITERATOR);
|
|
|
1463
1471
|
// `CreateArrayIterator` internal method
|
|
1464
1472
|
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
1465
1473
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
1466
|
-
setInternalState$
|
|
1474
|
+
setInternalState$2(this, {
|
|
1467
1475
|
type: ARRAY_ITERATOR,
|
|
1468
1476
|
target: toIndexedObject(iterated), // target
|
|
1469
1477
|
index: 0, // next index
|
|
@@ -1477,12 +1485,12 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
1477
1485
|
var index = state.index++;
|
|
1478
1486
|
if (!target || index >= target.length) {
|
|
1479
1487
|
state.target = null;
|
|
1480
|
-
return createIterResultObject(undefined, true);
|
|
1488
|
+
return createIterResultObject$1(undefined, true);
|
|
1481
1489
|
}
|
|
1482
1490
|
switch (state.kind) {
|
|
1483
|
-
case 'keys': return createIterResultObject(index, false);
|
|
1484
|
-
case 'values': return createIterResultObject(target[index], false);
|
|
1485
|
-
} return createIterResultObject([index, target[index]], false);
|
|
1491
|
+
case 'keys': return createIterResultObject$1(index, false);
|
|
1492
|
+
case 'values': return createIterResultObject$1(target[index], false);
|
|
1493
|
+
} return createIterResultObject$1([index, target[index]], false);
|
|
1486
1494
|
}, 'values');
|
|
1487
1495
|
|
|
1488
1496
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
@@ -1496,27 +1504,27 @@ addToUnscopables('values');
|
|
|
1496
1504
|
addToUnscopables('entries');
|
|
1497
1505
|
|
|
1498
1506
|
// V8 ~ Chrome 45- bug
|
|
1499
|
-
if (DESCRIPTORS$
|
|
1500
|
-
defineProperty$
|
|
1507
|
+
if (DESCRIPTORS$7 && values.name !== 'values') try {
|
|
1508
|
+
defineProperty$3(values, 'name', { value: 'values' });
|
|
1501
1509
|
} catch (error) { /* empty */ }
|
|
1502
1510
|
|
|
1503
|
-
var aCallable$
|
|
1504
|
-
var toObject$
|
|
1511
|
+
var aCallable$a = aCallable$d;
|
|
1512
|
+
var toObject$2 = toObject$5;
|
|
1505
1513
|
var IndexedObject$1 = indexedObject;
|
|
1506
|
-
var lengthOfArrayLike$
|
|
1514
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$4;
|
|
1507
1515
|
|
|
1508
|
-
var $TypeError$
|
|
1516
|
+
var $TypeError$b = TypeError;
|
|
1509
1517
|
|
|
1510
1518
|
var REDUCE_EMPTY = 'Reduce of empty array with no initial value';
|
|
1511
1519
|
|
|
1512
1520
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
1513
1521
|
var createMethod = function (IS_RIGHT) {
|
|
1514
1522
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
1515
|
-
var O = toObject$
|
|
1523
|
+
var O = toObject$2(that);
|
|
1516
1524
|
var self = IndexedObject$1(O);
|
|
1517
|
-
var length = lengthOfArrayLike$
|
|
1518
|
-
aCallable$
|
|
1519
|
-
if (length === 0 && argumentsLength < 2) throw new $TypeError$
|
|
1525
|
+
var length = lengthOfArrayLike$2(O);
|
|
1526
|
+
aCallable$a(callbackfn);
|
|
1527
|
+
if (length === 0 && argumentsLength < 2) throw new $TypeError$b(REDUCE_EMPTY);
|
|
1520
1528
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
1521
1529
|
var i = IS_RIGHT ? -1 : 1;
|
|
1522
1530
|
if (argumentsLength < 2) while (true) {
|
|
@@ -1527,7 +1535,7 @@ var createMethod = function (IS_RIGHT) {
|
|
|
1527
1535
|
}
|
|
1528
1536
|
index += i;
|
|
1529
1537
|
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
1530
|
-
throw new $TypeError$
|
|
1538
|
+
throw new $TypeError$b(REDUCE_EMPTY);
|
|
1531
1539
|
}
|
|
1532
1540
|
}
|
|
1533
1541
|
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -1546,20 +1554,20 @@ var arrayReduce = {
|
|
|
1546
1554
|
right: createMethod(true)
|
|
1547
1555
|
};
|
|
1548
1556
|
|
|
1549
|
-
var fails$
|
|
1557
|
+
var fails$6 = fails$i;
|
|
1550
1558
|
|
|
1551
1559
|
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
1552
1560
|
var method = [][METHOD_NAME];
|
|
1553
|
-
return !!method && fails$
|
|
1561
|
+
return !!method && fails$6(function () {
|
|
1554
1562
|
// eslint-disable-next-line no-useless-call -- required for testing
|
|
1555
1563
|
method.call(null, argument || function () { return 1; }, 1);
|
|
1556
1564
|
});
|
|
1557
1565
|
};
|
|
1558
1566
|
|
|
1559
1567
|
/* global Bun, Deno -- detection */
|
|
1560
|
-
var globalThis$
|
|
1568
|
+
var globalThis$a = globalThis_1;
|
|
1561
1569
|
var userAgent$3 = environmentUserAgent;
|
|
1562
|
-
var classof$
|
|
1570
|
+
var classof$6 = classofRaw$2;
|
|
1563
1571
|
|
|
1564
1572
|
var userAgentStartsWith = function (string) {
|
|
1565
1573
|
return userAgent$3.slice(0, string.length) === string;
|
|
@@ -1570,10 +1578,10 @@ var environment = (function () {
|
|
|
1570
1578
|
if (userAgentStartsWith('Cloudflare-Workers')) return 'CLOUDFLARE';
|
|
1571
1579
|
if (userAgentStartsWith('Deno/')) return 'DENO';
|
|
1572
1580
|
if (userAgentStartsWith('Node.js/')) return 'NODE';
|
|
1573
|
-
if (globalThis$
|
|
1574
|
-
if (globalThis$
|
|
1575
|
-
if (classof$
|
|
1576
|
-
if (globalThis$
|
|
1581
|
+
if (globalThis$a.Bun && typeof Bun.version == 'string') return 'BUN';
|
|
1582
|
+
if (globalThis$a.Deno && typeof Deno.version == 'object') return 'DENO';
|
|
1583
|
+
if (classof$6(globalThis$a.process) === 'process') return 'NODE';
|
|
1584
|
+
if (globalThis$a.window && globalThis$a.document) return 'BROWSER';
|
|
1577
1585
|
return 'REST';
|
|
1578
1586
|
})();
|
|
1579
1587
|
|
|
@@ -1581,7 +1589,7 @@ var ENVIRONMENT$1 = environment;
|
|
|
1581
1589
|
|
|
1582
1590
|
var environmentIsNode = ENVIRONMENT$1 === 'NODE';
|
|
1583
1591
|
|
|
1584
|
-
var $$
|
|
1592
|
+
var $$g = _export;
|
|
1585
1593
|
var $reduce = arrayReduce.left;
|
|
1586
1594
|
var arrayMethodIsStrict = arrayMethodIsStrict$1;
|
|
1587
1595
|
var CHROME_VERSION = environmentV8Version;
|
|
@@ -1590,41 +1598,41 @@ var IS_NODE$3 = environmentIsNode;
|
|
|
1590
1598
|
// Chrome 80-82 has a critical bug
|
|
1591
1599
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
1592
1600
|
var CHROME_BUG = !IS_NODE$3 && CHROME_VERSION > 79 && CHROME_VERSION < 83;
|
|
1593
|
-
var FORCED = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
|
1601
|
+
var FORCED$3 = CHROME_BUG || !arrayMethodIsStrict('reduce');
|
|
1594
1602
|
|
|
1595
1603
|
// `Array.prototype.reduce` method
|
|
1596
1604
|
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
1597
|
-
$$
|
|
1605
|
+
$$g({ target: 'Array', proto: true, forced: FORCED$3 }, {
|
|
1598
1606
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
1599
1607
|
var length = arguments.length;
|
|
1600
1608
|
return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
1601
1609
|
}
|
|
1602
1610
|
});
|
|
1603
1611
|
|
|
1604
|
-
var DESCRIPTORS$
|
|
1605
|
-
var uncurryThis$
|
|
1606
|
-
var call$
|
|
1607
|
-
var fails$
|
|
1612
|
+
var DESCRIPTORS$6 = descriptors;
|
|
1613
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1614
|
+
var call$a = functionCall;
|
|
1615
|
+
var fails$5 = fails$i;
|
|
1608
1616
|
var objectKeys = objectKeys$2;
|
|
1609
1617
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1610
1618
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
1611
|
-
var toObject = toObject$
|
|
1619
|
+
var toObject$1 = toObject$5;
|
|
1612
1620
|
var IndexedObject = indexedObject;
|
|
1613
1621
|
|
|
1614
1622
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1615
1623
|
var $assign = Object.assign;
|
|
1616
1624
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1617
|
-
var defineProperty$
|
|
1618
|
-
var concat = uncurryThis$
|
|
1625
|
+
var defineProperty$2 = Object.defineProperty;
|
|
1626
|
+
var concat = uncurryThis$6([].concat);
|
|
1619
1627
|
|
|
1620
1628
|
// `Object.assign` method
|
|
1621
1629
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1622
|
-
var objectAssign = !$assign || fails$
|
|
1630
|
+
var objectAssign = !$assign || fails$5(function () {
|
|
1623
1631
|
// should have correct order of operations (Edge bug)
|
|
1624
|
-
if (DESCRIPTORS$
|
|
1632
|
+
if (DESCRIPTORS$6 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
|
|
1625
1633
|
enumerable: true,
|
|
1626
1634
|
get: function () {
|
|
1627
|
-
defineProperty$
|
|
1635
|
+
defineProperty$2(this, 'b', {
|
|
1628
1636
|
value: 3,
|
|
1629
1637
|
enumerable: false
|
|
1630
1638
|
});
|
|
@@ -1637,10 +1645,11 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
1637
1645
|
var symbol = Symbol('assign detection');
|
|
1638
1646
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1639
1647
|
A[symbol] = 7;
|
|
1648
|
+
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
1640
1649
|
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
|
|
1641
1650
|
return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
|
|
1642
1651
|
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
|
|
1643
|
-
var T = toObject(target);
|
|
1652
|
+
var T = toObject$1(target);
|
|
1644
1653
|
var argumentsLength = arguments.length;
|
|
1645
1654
|
var index = 1;
|
|
1646
1655
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
|
|
@@ -1653,71 +1662,71 @@ var objectAssign = !$assign || fails$2(function () {
|
|
|
1653
1662
|
var key;
|
|
1654
1663
|
while (length > j) {
|
|
1655
1664
|
key = keys[j++];
|
|
1656
|
-
if (!DESCRIPTORS$
|
|
1665
|
+
if (!DESCRIPTORS$6 || call$a(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1657
1666
|
}
|
|
1658
1667
|
} return T;
|
|
1659
1668
|
} : $assign;
|
|
1660
1669
|
|
|
1661
|
-
var $$
|
|
1670
|
+
var $$f = _export;
|
|
1662
1671
|
var assign = objectAssign;
|
|
1663
1672
|
|
|
1664
1673
|
// `Object.assign` method
|
|
1665
1674
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1666
1675
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1667
|
-
$$
|
|
1676
|
+
$$f({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1668
1677
|
assign: assign
|
|
1669
1678
|
});
|
|
1670
1679
|
|
|
1671
1680
|
var classofRaw$1 = classofRaw$2;
|
|
1672
|
-
var uncurryThis$
|
|
1681
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
1673
1682
|
|
|
1674
1683
|
var functionUncurryThisClause = function (fn) {
|
|
1675
1684
|
// Nashorn bug:
|
|
1676
1685
|
// https://github.com/zloirock/core-js/issues/1128
|
|
1677
1686
|
// https://github.com/zloirock/core-js/issues/1130
|
|
1678
|
-
if (classofRaw$1(fn) === 'Function') return uncurryThis$
|
|
1687
|
+
if (classofRaw$1(fn) === 'Function') return uncurryThis$5(fn);
|
|
1679
1688
|
};
|
|
1680
1689
|
|
|
1681
|
-
var uncurryThis$
|
|
1682
|
-
var aCallable$
|
|
1690
|
+
var uncurryThis$4 = functionUncurryThisClause;
|
|
1691
|
+
var aCallable$9 = aCallable$d;
|
|
1683
1692
|
var NATIVE_BIND$1 = functionBindNative;
|
|
1684
1693
|
|
|
1685
|
-
var bind$4 = uncurryThis$
|
|
1694
|
+
var bind$4 = uncurryThis$4(uncurryThis$4.bind);
|
|
1686
1695
|
|
|
1687
1696
|
// optional / simple context binding
|
|
1688
1697
|
var functionBindContext = function (fn, that) {
|
|
1689
|
-
aCallable$
|
|
1698
|
+
aCallable$9(fn);
|
|
1690
1699
|
return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
|
|
1691
1700
|
return fn.apply(that, arguments);
|
|
1692
1701
|
};
|
|
1693
1702
|
};
|
|
1694
1703
|
|
|
1695
|
-
var wellKnownSymbol$
|
|
1704
|
+
var wellKnownSymbol$c = wellKnownSymbol$i;
|
|
1696
1705
|
var Iterators$1 = iterators;
|
|
1697
1706
|
|
|
1698
|
-
var ITERATOR$
|
|
1707
|
+
var ITERATOR$4 = wellKnownSymbol$c('iterator');
|
|
1699
1708
|
var ArrayPrototype = Array.prototype;
|
|
1700
1709
|
|
|
1701
1710
|
// check on default Array iterator
|
|
1702
1711
|
var isArrayIteratorMethod$1 = function (it) {
|
|
1703
|
-
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$
|
|
1712
|
+
return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$4] === it);
|
|
1704
1713
|
};
|
|
1705
1714
|
|
|
1706
|
-
var wellKnownSymbol$
|
|
1715
|
+
var wellKnownSymbol$b = wellKnownSymbol$i;
|
|
1707
1716
|
|
|
1708
|
-
var TO_STRING_TAG$
|
|
1717
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$b('toStringTag');
|
|
1709
1718
|
var test = {};
|
|
1710
1719
|
|
|
1711
|
-
test[TO_STRING_TAG$
|
|
1720
|
+
test[TO_STRING_TAG$3] = 'z';
|
|
1712
1721
|
|
|
1713
1722
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1714
1723
|
|
|
1715
1724
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1716
|
-
var isCallable$
|
|
1725
|
+
var isCallable$7 = isCallable$l;
|
|
1717
1726
|
var classofRaw = classofRaw$2;
|
|
1718
|
-
var wellKnownSymbol$
|
|
1727
|
+
var wellKnownSymbol$a = wellKnownSymbol$i;
|
|
1719
1728
|
|
|
1720
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1729
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$a('toStringTag');
|
|
1721
1730
|
var $Object = Object;
|
|
1722
1731
|
|
|
1723
1732
|
// ES3 wrong here
|
|
@@ -1731,81 +1740,81 @@ var tryGet = function (it, key) {
|
|
|
1731
1740
|
};
|
|
1732
1741
|
|
|
1733
1742
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1734
|
-
var classof$
|
|
1743
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1735
1744
|
var O, tag, result;
|
|
1736
1745
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1737
1746
|
// @@toStringTag case
|
|
1738
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1747
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
1739
1748
|
// builtinTag case
|
|
1740
1749
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1741
1750
|
// ES3 arguments fallback
|
|
1742
|
-
: (result = classofRaw(O)) === 'Object' && isCallable$
|
|
1751
|
+
: (result = classofRaw(O)) === 'Object' && isCallable$7(O.callee) ? 'Arguments' : result;
|
|
1743
1752
|
};
|
|
1744
1753
|
|
|
1745
|
-
var classof$
|
|
1746
|
-
var getMethod$
|
|
1754
|
+
var classof$4 = classof$5;
|
|
1755
|
+
var getMethod$2 = getMethod$4;
|
|
1747
1756
|
var isNullOrUndefined$1 = isNullOrUndefined$4;
|
|
1748
1757
|
var Iterators = iterators;
|
|
1749
|
-
var wellKnownSymbol$
|
|
1758
|
+
var wellKnownSymbol$9 = wellKnownSymbol$i;
|
|
1750
1759
|
|
|
1751
|
-
var ITERATOR$
|
|
1760
|
+
var ITERATOR$3 = wellKnownSymbol$9('iterator');
|
|
1752
1761
|
|
|
1753
1762
|
var getIteratorMethod$2 = function (it) {
|
|
1754
|
-
if (!isNullOrUndefined$1(it)) return getMethod$
|
|
1755
|
-
|| getMethod$
|
|
1756
|
-
|| Iterators[classof$
|
|
1763
|
+
if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$3)
|
|
1764
|
+
|| getMethod$2(it, '@@iterator')
|
|
1765
|
+
|| Iterators[classof$4(it)];
|
|
1757
1766
|
};
|
|
1758
1767
|
|
|
1759
|
-
var call$
|
|
1760
|
-
var aCallable$
|
|
1761
|
-
var anObject$
|
|
1768
|
+
var call$9 = functionCall;
|
|
1769
|
+
var aCallable$8 = aCallable$d;
|
|
1770
|
+
var anObject$a = anObject$f;
|
|
1762
1771
|
var tryToString$2 = tryToString$4;
|
|
1763
1772
|
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1764
1773
|
|
|
1765
|
-
var $TypeError$
|
|
1774
|
+
var $TypeError$a = TypeError;
|
|
1766
1775
|
|
|
1767
1776
|
var getIterator$1 = function (argument, usingIterator) {
|
|
1768
1777
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1769
|
-
if (aCallable$
|
|
1770
|
-
throw new $TypeError$
|
|
1778
|
+
if (aCallable$8(iteratorMethod)) return anObject$a(call$9(iteratorMethod, argument));
|
|
1779
|
+
throw new $TypeError$a(tryToString$2(argument) + ' is not iterable');
|
|
1771
1780
|
};
|
|
1772
1781
|
|
|
1773
|
-
var call$
|
|
1774
|
-
var anObject$
|
|
1775
|
-
var getMethod = getMethod$
|
|
1782
|
+
var call$8 = functionCall;
|
|
1783
|
+
var anObject$9 = anObject$f;
|
|
1784
|
+
var getMethod$1 = getMethod$4;
|
|
1776
1785
|
|
|
1777
|
-
var iteratorClose$
|
|
1786
|
+
var iteratorClose$3 = function (iterator, kind, value) {
|
|
1778
1787
|
var innerResult, innerError;
|
|
1779
|
-
anObject$
|
|
1788
|
+
anObject$9(iterator);
|
|
1780
1789
|
try {
|
|
1781
|
-
innerResult = getMethod(iterator, 'return');
|
|
1790
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1782
1791
|
if (!innerResult) {
|
|
1783
1792
|
if (kind === 'throw') throw value;
|
|
1784
1793
|
return value;
|
|
1785
1794
|
}
|
|
1786
|
-
innerResult = call$
|
|
1795
|
+
innerResult = call$8(innerResult, iterator);
|
|
1787
1796
|
} catch (error) {
|
|
1788
1797
|
innerError = true;
|
|
1789
1798
|
innerResult = error;
|
|
1790
1799
|
}
|
|
1791
1800
|
if (kind === 'throw') throw value;
|
|
1792
1801
|
if (innerError) throw innerResult;
|
|
1793
|
-
anObject$
|
|
1802
|
+
anObject$9(innerResult);
|
|
1794
1803
|
return value;
|
|
1795
1804
|
};
|
|
1796
1805
|
|
|
1797
1806
|
var bind$3 = functionBindContext;
|
|
1798
|
-
var call$
|
|
1799
|
-
var anObject$
|
|
1807
|
+
var call$7 = functionCall;
|
|
1808
|
+
var anObject$8 = anObject$f;
|
|
1800
1809
|
var tryToString$1 = tryToString$4;
|
|
1801
1810
|
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1802
|
-
var lengthOfArrayLike = lengthOfArrayLike$
|
|
1803
|
-
var isPrototypeOf$
|
|
1811
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$4;
|
|
1812
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
1804
1813
|
var getIterator = getIterator$1;
|
|
1805
1814
|
var getIteratorMethod = getIteratorMethod$2;
|
|
1806
|
-
var iteratorClose = iteratorClose$
|
|
1815
|
+
var iteratorClose$2 = iteratorClose$3;
|
|
1807
1816
|
|
|
1808
|
-
var $TypeError$
|
|
1817
|
+
var $TypeError$9 = TypeError;
|
|
1809
1818
|
|
|
1810
1819
|
var Result = function (stopped, result) {
|
|
1811
1820
|
this.stopped = stopped;
|
|
@@ -1814,7 +1823,7 @@ var Result = function (stopped, result) {
|
|
|
1814
1823
|
|
|
1815
1824
|
var ResultPrototype = Result.prototype;
|
|
1816
1825
|
|
|
1817
|
-
var iterate$
|
|
1826
|
+
var iterate$5 = function (iterable, unboundFunction, options) {
|
|
1818
1827
|
var that = options && options.that;
|
|
1819
1828
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1820
1829
|
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
@@ -1824,13 +1833,13 @@ var iterate$3 = function (iterable, unboundFunction, options) {
|
|
|
1824
1833
|
var iterator, iterFn, index, length, result, next, step;
|
|
1825
1834
|
|
|
1826
1835
|
var stop = function (condition) {
|
|
1827
|
-
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
1836
|
+
if (iterator) iteratorClose$2(iterator, 'normal', condition);
|
|
1828
1837
|
return new Result(true, condition);
|
|
1829
1838
|
};
|
|
1830
1839
|
|
|
1831
1840
|
var callFn = function (value) {
|
|
1832
1841
|
if (AS_ENTRIES) {
|
|
1833
|
-
anObject$
|
|
1842
|
+
anObject$8(value);
|
|
1834
1843
|
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1835
1844
|
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1836
1845
|
};
|
|
@@ -1841,104 +1850,104 @@ var iterate$3 = function (iterable, unboundFunction, options) {
|
|
|
1841
1850
|
iterator = iterable;
|
|
1842
1851
|
} else {
|
|
1843
1852
|
iterFn = getIteratorMethod(iterable);
|
|
1844
|
-
if (!iterFn) throw new $TypeError$
|
|
1853
|
+
if (!iterFn) throw new $TypeError$9(tryToString$1(iterable) + ' is not iterable');
|
|
1845
1854
|
// optimisation for array iterators
|
|
1846
1855
|
if (isArrayIteratorMethod(iterFn)) {
|
|
1847
|
-
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
1856
|
+
for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
|
|
1848
1857
|
result = callFn(iterable[index]);
|
|
1849
|
-
if (result && isPrototypeOf$
|
|
1858
|
+
if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
1850
1859
|
} return new Result(false);
|
|
1851
1860
|
}
|
|
1852
1861
|
iterator = getIterator(iterable, iterFn);
|
|
1853
1862
|
}
|
|
1854
1863
|
|
|
1855
1864
|
next = IS_RECORD ? iterable.next : iterator.next;
|
|
1856
|
-
while (!(step = call$
|
|
1865
|
+
while (!(step = call$7(next, iterator)).done) {
|
|
1857
1866
|
try {
|
|
1858
1867
|
result = callFn(step.value);
|
|
1859
1868
|
} catch (error) {
|
|
1860
|
-
iteratorClose(iterator, 'throw', error);
|
|
1869
|
+
iteratorClose$2(iterator, 'throw', error);
|
|
1861
1870
|
}
|
|
1862
|
-
if (typeof result == 'object' && result && isPrototypeOf$
|
|
1871
|
+
if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
|
|
1863
1872
|
} return new Result(false);
|
|
1864
1873
|
};
|
|
1865
1874
|
|
|
1866
|
-
var DESCRIPTORS$
|
|
1875
|
+
var DESCRIPTORS$5 = descriptors;
|
|
1867
1876
|
var definePropertyModule = objectDefineProperty;
|
|
1868
|
-
var createPropertyDescriptor = createPropertyDescriptor$
|
|
1877
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$5;
|
|
1869
1878
|
|
|
1870
|
-
var createProperty$
|
|
1871
|
-
if (DESCRIPTORS$
|
|
1879
|
+
var createProperty$2 = function (object, key, value) {
|
|
1880
|
+
if (DESCRIPTORS$5) definePropertyModule.f(object, key, createPropertyDescriptor$1(0, value));
|
|
1872
1881
|
else object[key] = value;
|
|
1873
1882
|
};
|
|
1874
1883
|
|
|
1875
|
-
var $$
|
|
1876
|
-
var iterate$
|
|
1877
|
-
var createProperty = createProperty$
|
|
1884
|
+
var $$e = _export;
|
|
1885
|
+
var iterate$4 = iterate$5;
|
|
1886
|
+
var createProperty$1 = createProperty$2;
|
|
1878
1887
|
|
|
1879
1888
|
// `Object.fromEntries` method
|
|
1880
|
-
// https://
|
|
1881
|
-
$$
|
|
1889
|
+
// https://tc39.es/ecma262/#sec-object.fromentries
|
|
1890
|
+
$$e({ target: 'Object', stat: true }, {
|
|
1882
1891
|
fromEntries: function fromEntries(iterable) {
|
|
1883
1892
|
var obj = {};
|
|
1884
|
-
iterate$
|
|
1885
|
-
createProperty(obj, k, v);
|
|
1893
|
+
iterate$4(iterable, function (k, v) {
|
|
1894
|
+
createProperty$1(obj, k, v);
|
|
1886
1895
|
}, { AS_ENTRIES: true });
|
|
1887
1896
|
return obj;
|
|
1888
1897
|
}
|
|
1889
1898
|
});
|
|
1890
1899
|
|
|
1891
1900
|
var makeBuiltIn = makeBuiltInExports;
|
|
1892
|
-
var defineProperty = objectDefineProperty;
|
|
1901
|
+
var defineProperty$1 = objectDefineProperty;
|
|
1893
1902
|
|
|
1894
|
-
var defineBuiltInAccessor$
|
|
1903
|
+
var defineBuiltInAccessor$2 = function (target, name, descriptor) {
|
|
1895
1904
|
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
1896
1905
|
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
1897
|
-
return defineProperty.f(target, name, descriptor);
|
|
1906
|
+
return defineProperty$1.f(target, name, descriptor);
|
|
1898
1907
|
};
|
|
1899
1908
|
|
|
1900
|
-
var getBuiltIn$
|
|
1901
|
-
var defineBuiltInAccessor = defineBuiltInAccessor$
|
|
1902
|
-
var wellKnownSymbol$
|
|
1903
|
-
var DESCRIPTORS$
|
|
1909
|
+
var getBuiltIn$4 = getBuiltIn$8;
|
|
1910
|
+
var defineBuiltInAccessor$1 = defineBuiltInAccessor$2;
|
|
1911
|
+
var wellKnownSymbol$8 = wellKnownSymbol$i;
|
|
1912
|
+
var DESCRIPTORS$4 = descriptors;
|
|
1904
1913
|
|
|
1905
|
-
var SPECIES$2 = wellKnownSymbol$
|
|
1914
|
+
var SPECIES$2 = wellKnownSymbol$8('species');
|
|
1906
1915
|
|
|
1907
1916
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1908
|
-
var Constructor = getBuiltIn$
|
|
1917
|
+
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
1909
1918
|
|
|
1910
|
-
if (DESCRIPTORS$
|
|
1911
|
-
defineBuiltInAccessor(Constructor, SPECIES$2, {
|
|
1919
|
+
if (DESCRIPTORS$4 && Constructor && !Constructor[SPECIES$2]) {
|
|
1920
|
+
defineBuiltInAccessor$1(Constructor, SPECIES$2, {
|
|
1912
1921
|
configurable: true,
|
|
1913
1922
|
get: function () { return this; }
|
|
1914
1923
|
});
|
|
1915
1924
|
}
|
|
1916
1925
|
};
|
|
1917
1926
|
|
|
1918
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1927
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1919
1928
|
|
|
1920
|
-
var $TypeError$
|
|
1929
|
+
var $TypeError$8 = TypeError;
|
|
1921
1930
|
|
|
1922
|
-
var anInstance$
|
|
1923
|
-
if (isPrototypeOf(Prototype, it)) return it;
|
|
1924
|
-
throw new $TypeError$
|
|
1931
|
+
var anInstance$2 = function (it, Prototype) {
|
|
1932
|
+
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1933
|
+
throw new $TypeError$8('Incorrect invocation');
|
|
1925
1934
|
};
|
|
1926
1935
|
|
|
1927
|
-
var uncurryThis$
|
|
1928
|
-
var fails$
|
|
1929
|
-
var isCallable$
|
|
1930
|
-
var classof$
|
|
1931
|
-
var getBuiltIn$
|
|
1936
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
1937
|
+
var fails$4 = fails$i;
|
|
1938
|
+
var isCallable$6 = isCallable$l;
|
|
1939
|
+
var classof$3 = classof$5;
|
|
1940
|
+
var getBuiltIn$3 = getBuiltIn$8;
|
|
1932
1941
|
var inspectSource$1 = inspectSource$3;
|
|
1933
1942
|
|
|
1934
1943
|
var noop = function () { /* empty */ };
|
|
1935
|
-
var construct = getBuiltIn$
|
|
1944
|
+
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
1936
1945
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1937
|
-
var exec = uncurryThis$
|
|
1946
|
+
var exec = uncurryThis$3(constructorRegExp.exec);
|
|
1938
1947
|
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
1939
1948
|
|
|
1940
1949
|
var isConstructorModern = function isConstructor(argument) {
|
|
1941
|
-
if (!isCallable$
|
|
1950
|
+
if (!isCallable$6(argument)) return false;
|
|
1942
1951
|
try {
|
|
1943
1952
|
construct(noop, [], argument);
|
|
1944
1953
|
return true;
|
|
@@ -1948,8 +1957,8 @@ var isConstructorModern = function isConstructor(argument) {
|
|
|
1948
1957
|
};
|
|
1949
1958
|
|
|
1950
1959
|
var isConstructorLegacy = function isConstructor(argument) {
|
|
1951
|
-
if (!isCallable$
|
|
1952
|
-
switch (classof$
|
|
1960
|
+
if (!isCallable$6(argument)) return false;
|
|
1961
|
+
switch (classof$3(argument)) {
|
|
1953
1962
|
case 'AsyncFunction':
|
|
1954
1963
|
case 'GeneratorFunction':
|
|
1955
1964
|
case 'AsyncGeneratorFunction': return false;
|
|
@@ -1968,7 +1977,7 @@ isConstructorLegacy.sham = true;
|
|
|
1968
1977
|
|
|
1969
1978
|
// `IsConstructor` abstract operation
|
|
1970
1979
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1971
|
-
var isConstructor$1 = !construct || fails$
|
|
1980
|
+
var isConstructor$1 = !construct || fails$4(function () {
|
|
1972
1981
|
var called;
|
|
1973
1982
|
return isConstructorModern(isConstructorModern.call)
|
|
1974
1983
|
|| !isConstructorModern(Object)
|
|
@@ -1979,48 +1988,48 @@ var isConstructor$1 = !construct || fails$1(function () {
|
|
|
1979
1988
|
var isConstructor = isConstructor$1;
|
|
1980
1989
|
var tryToString = tryToString$4;
|
|
1981
1990
|
|
|
1982
|
-
var $TypeError$
|
|
1991
|
+
var $TypeError$7 = TypeError;
|
|
1983
1992
|
|
|
1984
1993
|
// `Assert: IsConstructor(argument) is true`
|
|
1985
1994
|
var aConstructor$1 = function (argument) {
|
|
1986
1995
|
if (isConstructor(argument)) return argument;
|
|
1987
|
-
throw new $TypeError$
|
|
1996
|
+
throw new $TypeError$7(tryToString(argument) + ' is not a constructor');
|
|
1988
1997
|
};
|
|
1989
1998
|
|
|
1990
|
-
var anObject$
|
|
1999
|
+
var anObject$7 = anObject$f;
|
|
1991
2000
|
var aConstructor = aConstructor$1;
|
|
1992
2001
|
var isNullOrUndefined = isNullOrUndefined$4;
|
|
1993
|
-
var wellKnownSymbol$
|
|
2002
|
+
var wellKnownSymbol$7 = wellKnownSymbol$i;
|
|
1994
2003
|
|
|
1995
|
-
var SPECIES$1 = wellKnownSymbol$
|
|
2004
|
+
var SPECIES$1 = wellKnownSymbol$7('species');
|
|
1996
2005
|
|
|
1997
2006
|
// `SpeciesConstructor` abstract operation
|
|
1998
2007
|
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1999
2008
|
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
2000
|
-
var C = anObject$
|
|
2009
|
+
var C = anObject$7(O).constructor;
|
|
2001
2010
|
var S;
|
|
2002
|
-
return C === undefined || isNullOrUndefined(S = anObject$
|
|
2011
|
+
return C === undefined || isNullOrUndefined(S = anObject$7(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
|
|
2003
2012
|
};
|
|
2004
2013
|
|
|
2005
2014
|
var NATIVE_BIND = functionBindNative;
|
|
2006
2015
|
|
|
2007
2016
|
var FunctionPrototype = Function.prototype;
|
|
2008
|
-
var apply$
|
|
2009
|
-
var call$
|
|
2017
|
+
var apply$2 = FunctionPrototype.apply;
|
|
2018
|
+
var call$6 = FunctionPrototype.call;
|
|
2010
2019
|
|
|
2011
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
2012
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
2013
|
-
return call$
|
|
2020
|
+
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
|
|
2021
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$6.bind(apply$2) : function () {
|
|
2022
|
+
return call$6.apply(apply$2, arguments);
|
|
2014
2023
|
});
|
|
2015
2024
|
|
|
2016
|
-
var uncurryThis$
|
|
2025
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2017
2026
|
|
|
2018
|
-
var arraySlice$1 = uncurryThis$
|
|
2027
|
+
var arraySlice$1 = uncurryThis$2([].slice);
|
|
2019
2028
|
|
|
2020
|
-
var $TypeError$
|
|
2029
|
+
var $TypeError$6 = TypeError;
|
|
2021
2030
|
|
|
2022
2031
|
var validateArgumentsLength$1 = function (passed, required) {
|
|
2023
|
-
if (passed < required) throw new $TypeError$
|
|
2032
|
+
if (passed < required) throw new $TypeError$6('Not enough arguments');
|
|
2024
2033
|
return passed;
|
|
2025
2034
|
};
|
|
2026
2035
|
|
|
@@ -2029,12 +2038,12 @@ var userAgent$2 = environmentUserAgent;
|
|
|
2029
2038
|
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2030
2039
|
var environmentIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
2031
2040
|
|
|
2032
|
-
var globalThis$
|
|
2033
|
-
var apply = functionApply;
|
|
2041
|
+
var globalThis$9 = globalThis_1;
|
|
2042
|
+
var apply$1 = functionApply;
|
|
2034
2043
|
var bind$2 = functionBindContext;
|
|
2035
|
-
var isCallable$
|
|
2036
|
-
var hasOwn = hasOwnProperty_1;
|
|
2037
|
-
var fails = fails$
|
|
2044
|
+
var isCallable$5 = isCallable$l;
|
|
2045
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
2046
|
+
var fails$3 = fails$i;
|
|
2038
2047
|
var html = html$2;
|
|
2039
2048
|
var arraySlice = arraySlice$1;
|
|
2040
2049
|
var createElement = documentCreateElement$2;
|
|
@@ -2042,25 +2051,25 @@ var validateArgumentsLength = validateArgumentsLength$1;
|
|
|
2042
2051
|
var IS_IOS$1 = environmentIsIos;
|
|
2043
2052
|
var IS_NODE$2 = environmentIsNode;
|
|
2044
2053
|
|
|
2045
|
-
var set = globalThis$
|
|
2046
|
-
var clear = globalThis$
|
|
2047
|
-
var process$
|
|
2048
|
-
var Dispatch = globalThis$
|
|
2049
|
-
var Function$1 = globalThis$
|
|
2050
|
-
var MessageChannel = globalThis$
|
|
2051
|
-
var String$1 = globalThis$
|
|
2054
|
+
var set = globalThis$9.setImmediate;
|
|
2055
|
+
var clear = globalThis$9.clearImmediate;
|
|
2056
|
+
var process$3 = globalThis$9.process;
|
|
2057
|
+
var Dispatch = globalThis$9.Dispatch;
|
|
2058
|
+
var Function$1 = globalThis$9.Function;
|
|
2059
|
+
var MessageChannel = globalThis$9.MessageChannel;
|
|
2060
|
+
var String$1 = globalThis$9.String;
|
|
2052
2061
|
var counter = 0;
|
|
2053
2062
|
var queue$2 = {};
|
|
2054
2063
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
2055
2064
|
var $location, defer, channel, port;
|
|
2056
2065
|
|
|
2057
|
-
fails(function () {
|
|
2066
|
+
fails$3(function () {
|
|
2058
2067
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
2059
|
-
$location = globalThis$
|
|
2068
|
+
$location = globalThis$9.location;
|
|
2060
2069
|
});
|
|
2061
2070
|
|
|
2062
2071
|
var run = function (id) {
|
|
2063
|
-
if (hasOwn(queue$2, id)) {
|
|
2072
|
+
if (hasOwn$2(queue$2, id)) {
|
|
2064
2073
|
var fn = queue$2[id];
|
|
2065
2074
|
delete queue$2[id];
|
|
2066
2075
|
fn();
|
|
@@ -2079,17 +2088,17 @@ var eventListener = function (event) {
|
|
|
2079
2088
|
|
|
2080
2089
|
var globalPostMessageDefer = function (id) {
|
|
2081
2090
|
// old engines have not location.origin
|
|
2082
|
-
globalThis$
|
|
2091
|
+
globalThis$9.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
2083
2092
|
};
|
|
2084
2093
|
|
|
2085
2094
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
2086
2095
|
if (!set || !clear) {
|
|
2087
2096
|
set = function setImmediate(handler) {
|
|
2088
2097
|
validateArgumentsLength(arguments.length, 1);
|
|
2089
|
-
var fn = isCallable$
|
|
2098
|
+
var fn = isCallable$5(handler) ? handler : Function$1(handler);
|
|
2090
2099
|
var args = arraySlice(arguments, 1);
|
|
2091
2100
|
queue$2[++counter] = function () {
|
|
2092
|
-
apply(fn, undefined, args);
|
|
2101
|
+
apply$1(fn, undefined, args);
|
|
2093
2102
|
};
|
|
2094
2103
|
defer(counter);
|
|
2095
2104
|
return counter;
|
|
@@ -2100,7 +2109,7 @@ if (!set || !clear) {
|
|
|
2100
2109
|
// Node.js 0.8-
|
|
2101
2110
|
if (IS_NODE$2) {
|
|
2102
2111
|
defer = function (id) {
|
|
2103
|
-
process$
|
|
2112
|
+
process$3.nextTick(runner(id));
|
|
2104
2113
|
};
|
|
2105
2114
|
// Sphere (JS game engine) Dispatch API
|
|
2106
2115
|
} else if (Dispatch && Dispatch.now) {
|
|
@@ -2117,14 +2126,14 @@ if (!set || !clear) {
|
|
|
2117
2126
|
// Browsers with postMessage, skip WebWorkers
|
|
2118
2127
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
2119
2128
|
} else if (
|
|
2120
|
-
globalThis$
|
|
2121
|
-
isCallable$
|
|
2122
|
-
!globalThis$
|
|
2129
|
+
globalThis$9.addEventListener &&
|
|
2130
|
+
isCallable$5(globalThis$9.postMessage) &&
|
|
2131
|
+
!globalThis$9.importScripts &&
|
|
2123
2132
|
$location && $location.protocol !== 'file:' &&
|
|
2124
|
-
!fails(globalPostMessageDefer)
|
|
2133
|
+
!fails$3(globalPostMessageDefer)
|
|
2125
2134
|
) {
|
|
2126
2135
|
defer = globalPostMessageDefer;
|
|
2127
|
-
globalThis$
|
|
2136
|
+
globalThis$9.addEventListener('message', eventListener, false);
|
|
2128
2137
|
// IE8-
|
|
2129
2138
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
2130
2139
|
defer = function (id) {
|
|
@@ -2146,16 +2155,16 @@ var task$1 = {
|
|
|
2146
2155
|
clear: clear
|
|
2147
2156
|
};
|
|
2148
2157
|
|
|
2149
|
-
var globalThis$
|
|
2150
|
-
var DESCRIPTORS = descriptors;
|
|
2158
|
+
var globalThis$8 = globalThis_1;
|
|
2159
|
+
var DESCRIPTORS$3 = descriptors;
|
|
2151
2160
|
|
|
2152
2161
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2153
|
-
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
2162
|
+
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
2154
2163
|
|
|
2155
2164
|
// Avoid NodeJS experimental warning
|
|
2156
2165
|
var safeGetBuiltIn$1 = function (name) {
|
|
2157
|
-
if (!DESCRIPTORS) return globalThis$
|
|
2158
|
-
var descriptor = getOwnPropertyDescriptor(globalThis$
|
|
2166
|
+
if (!DESCRIPTORS$3) return globalThis$8[name];
|
|
2167
|
+
var descriptor = getOwnPropertyDescriptor$1(globalThis$8, name);
|
|
2159
2168
|
return descriptor && descriptor.value;
|
|
2160
2169
|
};
|
|
2161
2170
|
|
|
@@ -2192,7 +2201,7 @@ var userAgent = environmentUserAgent;
|
|
|
2192
2201
|
|
|
2193
2202
|
var environmentIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
2194
2203
|
|
|
2195
|
-
var globalThis$
|
|
2204
|
+
var globalThis$7 = globalThis_1;
|
|
2196
2205
|
var safeGetBuiltIn = safeGetBuiltIn$1;
|
|
2197
2206
|
var bind$1 = functionBindContext;
|
|
2198
2207
|
var macrotask = task$1.set;
|
|
@@ -2202,10 +2211,10 @@ var IS_IOS_PEBBLE = environmentIsIosPebble;
|
|
|
2202
2211
|
var IS_WEBOS_WEBKIT = environmentIsWebosWebkit;
|
|
2203
2212
|
var IS_NODE$1 = environmentIsNode;
|
|
2204
2213
|
|
|
2205
|
-
var MutationObserver = globalThis$
|
|
2206
|
-
var document$2 = globalThis$
|
|
2207
|
-
var process$
|
|
2208
|
-
var Promise$1 = globalThis$
|
|
2214
|
+
var MutationObserver = globalThis$7.MutationObserver || globalThis$7.WebKitMutationObserver;
|
|
2215
|
+
var document$2 = globalThis$7.document;
|
|
2216
|
+
var process$2 = globalThis$7.process;
|
|
2217
|
+
var Promise$1 = globalThis$7.Promise;
|
|
2209
2218
|
var microtask$1 = safeGetBuiltIn('queueMicrotask');
|
|
2210
2219
|
var notify$1, toggle, node, promise, then;
|
|
2211
2220
|
|
|
@@ -2215,7 +2224,7 @@ if (!microtask$1) {
|
|
|
2215
2224
|
|
|
2216
2225
|
var flush = function () {
|
|
2217
2226
|
var parent, fn;
|
|
2218
|
-
if (IS_NODE$1 && (parent = process$
|
|
2227
|
+
if (IS_NODE$1 && (parent = process$2.domain)) parent.exit();
|
|
2219
2228
|
while (fn = queue.get()) try {
|
|
2220
2229
|
fn();
|
|
2221
2230
|
} catch (error) {
|
|
@@ -2247,7 +2256,7 @@ if (!microtask$1) {
|
|
|
2247
2256
|
// Node.js without promises
|
|
2248
2257
|
} else if (IS_NODE$1) {
|
|
2249
2258
|
notify$1 = function () {
|
|
2250
|
-
process$
|
|
2259
|
+
process$2.nextTick(flush);
|
|
2251
2260
|
};
|
|
2252
2261
|
// for other environments - macrotask based on:
|
|
2253
2262
|
// - setImmediate
|
|
@@ -2257,7 +2266,7 @@ if (!microtask$1) {
|
|
|
2257
2266
|
// - setTimeout
|
|
2258
2267
|
} else {
|
|
2259
2268
|
// `webpack` dev server bug on IE global methods - use bind(fn, global)
|
|
2260
|
-
macrotask = bind$1(macrotask, globalThis$
|
|
2269
|
+
macrotask = bind$1(macrotask, globalThis$7);
|
|
2261
2270
|
notify$1 = function () {
|
|
2262
2271
|
macrotask(flush);
|
|
2263
2272
|
};
|
|
@@ -2286,23 +2295,23 @@ var perform$3 = function (exec) {
|
|
|
2286
2295
|
}
|
|
2287
2296
|
};
|
|
2288
2297
|
|
|
2289
|
-
var globalThis$
|
|
2298
|
+
var globalThis$6 = globalThis_1;
|
|
2290
2299
|
|
|
2291
|
-
var promiseNativeConstructor = globalThis$
|
|
2300
|
+
var promiseNativeConstructor = globalThis$6.Promise;
|
|
2292
2301
|
|
|
2293
|
-
var globalThis$
|
|
2302
|
+
var globalThis$5 = globalThis_1;
|
|
2294
2303
|
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
2295
|
-
var isCallable$
|
|
2304
|
+
var isCallable$4 = isCallable$l;
|
|
2296
2305
|
var isForced = isForced_1;
|
|
2297
2306
|
var inspectSource = inspectSource$3;
|
|
2298
|
-
var wellKnownSymbol$
|
|
2307
|
+
var wellKnownSymbol$6 = wellKnownSymbol$i;
|
|
2299
2308
|
var ENVIRONMENT = environment;
|
|
2300
2309
|
var V8_VERSION = environmentV8Version;
|
|
2301
2310
|
|
|
2302
2311
|
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
2303
|
-
var SPECIES = wellKnownSymbol$
|
|
2312
|
+
var SPECIES = wellKnownSymbol$6('species');
|
|
2304
2313
|
var SUBCLASSING = false;
|
|
2305
|
-
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$
|
|
2314
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$4(globalThis$5.PromiseRejectionEvent);
|
|
2306
2315
|
|
|
2307
2316
|
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
2308
2317
|
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
@@ -2336,19 +2345,19 @@ var promiseConstructorDetection = {
|
|
|
2336
2345
|
|
|
2337
2346
|
var newPromiseCapability$2 = {};
|
|
2338
2347
|
|
|
2339
|
-
var aCallable$
|
|
2348
|
+
var aCallable$7 = aCallable$d;
|
|
2340
2349
|
|
|
2341
|
-
var $TypeError$
|
|
2350
|
+
var $TypeError$5 = TypeError;
|
|
2342
2351
|
|
|
2343
2352
|
var PromiseCapability = function (C) {
|
|
2344
2353
|
var resolve, reject;
|
|
2345
2354
|
this.promise = new C(function ($$resolve, $$reject) {
|
|
2346
|
-
if (resolve !== undefined || reject !== undefined) throw new $TypeError$
|
|
2355
|
+
if (resolve !== undefined || reject !== undefined) throw new $TypeError$5('Bad Promise constructor');
|
|
2347
2356
|
resolve = $$resolve;
|
|
2348
2357
|
reject = $$reject;
|
|
2349
2358
|
});
|
|
2350
|
-
this.resolve = aCallable$
|
|
2351
|
-
this.reject = aCallable$
|
|
2359
|
+
this.resolve = aCallable$7(resolve);
|
|
2360
|
+
this.reject = aCallable$7(reject);
|
|
2352
2361
|
};
|
|
2353
2362
|
|
|
2354
2363
|
// `NewPromiseCapability` abstract operation
|
|
@@ -2357,25 +2366,25 @@ newPromiseCapability$2.f = function (C) {
|
|
|
2357
2366
|
return new PromiseCapability(C);
|
|
2358
2367
|
};
|
|
2359
2368
|
|
|
2360
|
-
var $$
|
|
2369
|
+
var $$d = _export;
|
|
2361
2370
|
var IS_NODE = environmentIsNode;
|
|
2362
|
-
var globalThis$
|
|
2363
|
-
var call$
|
|
2364
|
-
var defineBuiltIn$
|
|
2365
|
-
var setPrototypeOf = objectSetPrototypeOf;
|
|
2371
|
+
var globalThis$4 = globalThis_1;
|
|
2372
|
+
var call$5 = functionCall;
|
|
2373
|
+
var defineBuiltIn$2 = defineBuiltIn$6;
|
|
2374
|
+
var setPrototypeOf$2 = objectSetPrototypeOf;
|
|
2366
2375
|
var setToStringTag$1 = setToStringTag$4;
|
|
2367
2376
|
var setSpecies = setSpecies$1;
|
|
2368
|
-
var aCallable$
|
|
2369
|
-
var isCallable$
|
|
2370
|
-
var isObject$
|
|
2371
|
-
var anInstance = anInstance$
|
|
2377
|
+
var aCallable$6 = aCallable$d;
|
|
2378
|
+
var isCallable$3 = isCallable$l;
|
|
2379
|
+
var isObject$4 = isObject$d;
|
|
2380
|
+
var anInstance$1 = anInstance$2;
|
|
2372
2381
|
var speciesConstructor = speciesConstructor$1;
|
|
2373
2382
|
var task = task$1.set;
|
|
2374
2383
|
var microtask = microtask_1;
|
|
2375
2384
|
var hostReportErrors = hostReportErrors$1;
|
|
2376
2385
|
var perform$2 = perform$3;
|
|
2377
2386
|
var Queue = queue$1;
|
|
2378
|
-
var InternalStateModule = internalState;
|
|
2387
|
+
var InternalStateModule$1 = internalState;
|
|
2379
2388
|
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
2380
2389
|
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
2381
2390
|
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
@@ -2384,18 +2393,18 @@ var PROMISE = 'Promise';
|
|
|
2384
2393
|
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
2385
2394
|
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
2386
2395
|
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
2387
|
-
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
|
|
2388
|
-
var setInternalState = InternalStateModule.set;
|
|
2396
|
+
var getInternalPromiseState = InternalStateModule$1.getterFor(PROMISE);
|
|
2397
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
2389
2398
|
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
2390
2399
|
var PromiseConstructor = NativePromiseConstructor$2;
|
|
2391
2400
|
var PromisePrototype = NativePromisePrototype$1;
|
|
2392
|
-
var TypeError$1 = globalThis$
|
|
2393
|
-
var document$1 = globalThis$
|
|
2394
|
-
var process = globalThis$
|
|
2401
|
+
var TypeError$1 = globalThis$4.TypeError;
|
|
2402
|
+
var document$1 = globalThis$4.document;
|
|
2403
|
+
var process$1 = globalThis$4.process;
|
|
2395
2404
|
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
2396
2405
|
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
2397
2406
|
|
|
2398
|
-
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$
|
|
2407
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && globalThis$4.dispatchEvent);
|
|
2399
2408
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
2400
2409
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
2401
2410
|
var PENDING = 0;
|
|
@@ -2409,7 +2418,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
|
2409
2418
|
// helpers
|
|
2410
2419
|
var isThenable = function (it) {
|
|
2411
2420
|
var then;
|
|
2412
|
-
return isObject$
|
|
2421
|
+
return isObject$4(it) && isCallable$3(then = it.then) ? then : false;
|
|
2413
2422
|
};
|
|
2414
2423
|
|
|
2415
2424
|
var callReaction = function (reaction, state) {
|
|
@@ -2438,7 +2447,7 @@ var callReaction = function (reaction, state) {
|
|
|
2438
2447
|
if (result === reaction.promise) {
|
|
2439
2448
|
reject(new TypeError$1('Promise-chain cycle'));
|
|
2440
2449
|
} else if (then = isThenable(result)) {
|
|
2441
|
-
call$
|
|
2450
|
+
call$5(then, result, resolve, reject);
|
|
2442
2451
|
} else resolve(result);
|
|
2443
2452
|
} else reject(value);
|
|
2444
2453
|
} catch (error) {
|
|
@@ -2468,14 +2477,14 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
2468
2477
|
event.promise = promise;
|
|
2469
2478
|
event.reason = reason;
|
|
2470
2479
|
event.initEvent(name, false, true);
|
|
2471
|
-
globalThis$
|
|
2480
|
+
globalThis$4.dispatchEvent(event);
|
|
2472
2481
|
} else event = { promise: promise, reason: reason };
|
|
2473
|
-
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$
|
|
2482
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis$4['on' + name])) handler(event);
|
|
2474
2483
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
2475
2484
|
};
|
|
2476
2485
|
|
|
2477
2486
|
var onUnhandled = function (state) {
|
|
2478
|
-
call$
|
|
2487
|
+
call$5(task, globalThis$4, function () {
|
|
2479
2488
|
var promise = state.facade;
|
|
2480
2489
|
var value = state.value;
|
|
2481
2490
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -2483,7 +2492,7 @@ var onUnhandled = function (state) {
|
|
|
2483
2492
|
if (IS_UNHANDLED) {
|
|
2484
2493
|
result = perform$2(function () {
|
|
2485
2494
|
if (IS_NODE) {
|
|
2486
|
-
process.emit('unhandledRejection', value, promise);
|
|
2495
|
+
process$1.emit('unhandledRejection', value, promise);
|
|
2487
2496
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
2488
2497
|
});
|
|
2489
2498
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
@@ -2498,10 +2507,10 @@ var isUnhandled = function (state) {
|
|
|
2498
2507
|
};
|
|
2499
2508
|
|
|
2500
2509
|
var onHandleUnhandled = function (state) {
|
|
2501
|
-
call$
|
|
2510
|
+
call$5(task, globalThis$4, function () {
|
|
2502
2511
|
var promise = state.facade;
|
|
2503
2512
|
if (IS_NODE) {
|
|
2504
|
-
process.emit('rejectionHandled', promise);
|
|
2513
|
+
process$1.emit('rejectionHandled', promise);
|
|
2505
2514
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
2506
2515
|
});
|
|
2507
2516
|
};
|
|
@@ -2532,7 +2541,7 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2532
2541
|
microtask(function () {
|
|
2533
2542
|
var wrapper = { done: false };
|
|
2534
2543
|
try {
|
|
2535
|
-
call$
|
|
2544
|
+
call$5(then, value,
|
|
2536
2545
|
bind(internalResolve, wrapper, state),
|
|
2537
2546
|
bind(internalReject, wrapper, state)
|
|
2538
2547
|
);
|
|
@@ -2554,9 +2563,9 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
2554
2563
|
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
2555
2564
|
// 25.4.3.1 Promise(executor)
|
|
2556
2565
|
PromiseConstructor = function Promise(executor) {
|
|
2557
|
-
anInstance(this, PromisePrototype);
|
|
2558
|
-
aCallable$
|
|
2559
|
-
call$
|
|
2566
|
+
anInstance$1(this, PromisePrototype);
|
|
2567
|
+
aCallable$6(executor);
|
|
2568
|
+
call$5(Internal, this);
|
|
2560
2569
|
var state = getInternalPromiseState(this);
|
|
2561
2570
|
try {
|
|
2562
2571
|
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
@@ -2569,7 +2578,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2569
2578
|
|
|
2570
2579
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
2571
2580
|
Internal = function Promise(executor) {
|
|
2572
|
-
setInternalState(this, {
|
|
2581
|
+
setInternalState$1(this, {
|
|
2573
2582
|
type: PROMISE,
|
|
2574
2583
|
done: false,
|
|
2575
2584
|
notified: false,
|
|
@@ -2583,13 +2592,13 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2583
2592
|
|
|
2584
2593
|
// `Promise.prototype.then` method
|
|
2585
2594
|
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
2586
|
-
Internal.prototype = defineBuiltIn$
|
|
2595
|
+
Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
2587
2596
|
var state = getInternalPromiseState(this);
|
|
2588
2597
|
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
2589
2598
|
state.parent = true;
|
|
2590
|
-
reaction.ok = isCallable$
|
|
2591
|
-
reaction.fail = isCallable$
|
|
2592
|
-
reaction.domain = IS_NODE ? process.domain : undefined;
|
|
2599
|
+
reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
|
|
2600
|
+
reaction.fail = isCallable$3(onRejected) && onRejected;
|
|
2601
|
+
reaction.domain = IS_NODE ? process$1.domain : undefined;
|
|
2593
2602
|
if (state.state === PENDING) state.reactions.add(reaction);
|
|
2594
2603
|
else microtask(function () {
|
|
2595
2604
|
callReaction(reaction, state);
|
|
@@ -2611,15 +2620,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2611
2620
|
: newGenericPromiseCapability(C);
|
|
2612
2621
|
};
|
|
2613
2622
|
|
|
2614
|
-
if (isCallable$
|
|
2623
|
+
if (isCallable$3(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
2615
2624
|
nativeThen = NativePromisePrototype$1.then;
|
|
2616
2625
|
|
|
2617
2626
|
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
2618
2627
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
2619
|
-
defineBuiltIn$
|
|
2628
|
+
defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
2620
2629
|
var that = this;
|
|
2621
2630
|
return new PromiseConstructor(function (resolve, reject) {
|
|
2622
|
-
call$
|
|
2631
|
+
call$5(nativeThen, that, resolve, reject);
|
|
2623
2632
|
}).then(onFulfilled, onRejected);
|
|
2624
2633
|
// https://github.com/zloirock/core-js/issues/640
|
|
2625
2634
|
}, { unsafe: true });
|
|
@@ -2631,22 +2640,24 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
|
2631
2640
|
} catch (error) { /* empty */ }
|
|
2632
2641
|
|
|
2633
2642
|
// make `instanceof Promise` work for native promise-based APIs
|
|
2634
|
-
if (setPrototypeOf) {
|
|
2635
|
-
setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
|
|
2643
|
+
if (setPrototypeOf$2) {
|
|
2644
|
+
setPrototypeOf$2(NativePromisePrototype$1, PromisePrototype);
|
|
2636
2645
|
}
|
|
2637
2646
|
}
|
|
2638
2647
|
}
|
|
2639
2648
|
|
|
2640
|
-
|
|
2649
|
+
// `Promise` constructor
|
|
2650
|
+
// https://tc39.es/ecma262/#sec-promise-executor
|
|
2651
|
+
$$d({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2641
2652
|
Promise: PromiseConstructor
|
|
2642
2653
|
});
|
|
2643
2654
|
|
|
2644
2655
|
setToStringTag$1(PromiseConstructor, PROMISE, false);
|
|
2645
2656
|
setSpecies(PROMISE);
|
|
2646
2657
|
|
|
2647
|
-
var wellKnownSymbol$
|
|
2658
|
+
var wellKnownSymbol$5 = wellKnownSymbol$i;
|
|
2648
2659
|
|
|
2649
|
-
var ITERATOR$
|
|
2660
|
+
var ITERATOR$2 = wellKnownSymbol$5('iterator');
|
|
2650
2661
|
var SAFE_CLOSING = false;
|
|
2651
2662
|
|
|
2652
2663
|
try {
|
|
@@ -2659,7 +2670,7 @@ try {
|
|
|
2659
2670
|
SAFE_CLOSING = true;
|
|
2660
2671
|
}
|
|
2661
2672
|
};
|
|
2662
|
-
iteratorWithReturn[ITERATOR$
|
|
2673
|
+
iteratorWithReturn[ITERATOR$2] = function () {
|
|
2663
2674
|
return this;
|
|
2664
2675
|
};
|
|
2665
2676
|
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
@@ -2673,7 +2684,7 @@ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
|
2673
2684
|
var ITERATION_SUPPORT = false;
|
|
2674
2685
|
try {
|
|
2675
2686
|
var object = {};
|
|
2676
|
-
object[ITERATOR$
|
|
2687
|
+
object[ITERATOR$2] = function () {
|
|
2677
2688
|
return {
|
|
2678
2689
|
next: function () {
|
|
2679
2690
|
return { done: ITERATION_SUPPORT = true };
|
|
@@ -2693,32 +2704,32 @@ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCor
|
|
|
2693
2704
|
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
2694
2705
|
});
|
|
2695
2706
|
|
|
2696
|
-
var $$
|
|
2697
|
-
var call$
|
|
2698
|
-
var aCallable$
|
|
2707
|
+
var $$c = _export;
|
|
2708
|
+
var call$4 = functionCall;
|
|
2709
|
+
var aCallable$5 = aCallable$d;
|
|
2699
2710
|
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2700
2711
|
var perform$1 = perform$3;
|
|
2701
|
-
var iterate$
|
|
2712
|
+
var iterate$3 = iterate$5;
|
|
2702
2713
|
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
2703
2714
|
|
|
2704
2715
|
// `Promise.all` method
|
|
2705
2716
|
// https://tc39.es/ecma262/#sec-promise.all
|
|
2706
|
-
$$
|
|
2717
|
+
$$c({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
2707
2718
|
all: function all(iterable) {
|
|
2708
2719
|
var C = this;
|
|
2709
2720
|
var capability = newPromiseCapabilityModule$2.f(C);
|
|
2710
2721
|
var resolve = capability.resolve;
|
|
2711
2722
|
var reject = capability.reject;
|
|
2712
2723
|
var result = perform$1(function () {
|
|
2713
|
-
var $promiseResolve = aCallable$
|
|
2724
|
+
var $promiseResolve = aCallable$5(C.resolve);
|
|
2714
2725
|
var values = [];
|
|
2715
2726
|
var counter = 0;
|
|
2716
2727
|
var remaining = 1;
|
|
2717
|
-
iterate$
|
|
2728
|
+
iterate$3(iterable, function (promise) {
|
|
2718
2729
|
var index = counter++;
|
|
2719
2730
|
var alreadyCalled = false;
|
|
2720
2731
|
remaining++;
|
|
2721
|
-
call$
|
|
2732
|
+
call$4($promiseResolve, C, promise).then(function (value) {
|
|
2722
2733
|
if (alreadyCalled) return;
|
|
2723
2734
|
alreadyCalled = true;
|
|
2724
2735
|
values[index] = value;
|
|
@@ -2732,50 +2743,50 @@ $$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2732
2743
|
}
|
|
2733
2744
|
});
|
|
2734
2745
|
|
|
2735
|
-
var $$
|
|
2746
|
+
var $$b = _export;
|
|
2736
2747
|
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2737
2748
|
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2738
|
-
var getBuiltIn$
|
|
2739
|
-
var isCallable = isCallable$
|
|
2740
|
-
var defineBuiltIn = defineBuiltIn$
|
|
2749
|
+
var getBuiltIn$2 = getBuiltIn$8;
|
|
2750
|
+
var isCallable$2 = isCallable$l;
|
|
2751
|
+
var defineBuiltIn$1 = defineBuiltIn$6;
|
|
2741
2752
|
|
|
2742
2753
|
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
2743
2754
|
|
|
2744
2755
|
// `Promise.prototype.catch` method
|
|
2745
2756
|
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2746
|
-
$$
|
|
2757
|
+
$$b({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2747
2758
|
'catch': function (onRejected) {
|
|
2748
2759
|
return this.then(undefined, onRejected);
|
|
2749
2760
|
}
|
|
2750
2761
|
});
|
|
2751
2762
|
|
|
2752
2763
|
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
2753
|
-
if (isCallable(NativePromiseConstructor)) {
|
|
2754
|
-
var method = getBuiltIn$
|
|
2764
|
+
if (isCallable$2(NativePromiseConstructor)) {
|
|
2765
|
+
var method = getBuiltIn$2('Promise').prototype['catch'];
|
|
2755
2766
|
if (NativePromisePrototype['catch'] !== method) {
|
|
2756
|
-
defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2767
|
+
defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2757
2768
|
}
|
|
2758
2769
|
}
|
|
2759
2770
|
|
|
2760
|
-
var $$
|
|
2761
|
-
var call = functionCall;
|
|
2762
|
-
var aCallable = aCallable$
|
|
2771
|
+
var $$a = _export;
|
|
2772
|
+
var call$3 = functionCall;
|
|
2773
|
+
var aCallable$4 = aCallable$d;
|
|
2763
2774
|
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2764
2775
|
var perform = perform$3;
|
|
2765
|
-
var iterate = iterate$
|
|
2776
|
+
var iterate$2 = iterate$5;
|
|
2766
2777
|
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
2767
2778
|
|
|
2768
2779
|
// `Promise.race` method
|
|
2769
2780
|
// https://tc39.es/ecma262/#sec-promise.race
|
|
2770
|
-
$$
|
|
2781
|
+
$$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
2771
2782
|
race: function race(iterable) {
|
|
2772
2783
|
var C = this;
|
|
2773
2784
|
var capability = newPromiseCapabilityModule$1.f(C);
|
|
2774
2785
|
var reject = capability.reject;
|
|
2775
2786
|
var result = perform(function () {
|
|
2776
|
-
var $promiseResolve = aCallable(C.resolve);
|
|
2777
|
-
iterate(iterable, function (promise) {
|
|
2778
|
-
call($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2787
|
+
var $promiseResolve = aCallable$4(C.resolve);
|
|
2788
|
+
iterate$2(iterable, function (promise) {
|
|
2789
|
+
call$3($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2779
2790
|
});
|
|
2780
2791
|
});
|
|
2781
2792
|
if (result.error) reject(result.value);
|
|
@@ -2783,13 +2794,13 @@ $$3({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
|
|
|
2783
2794
|
}
|
|
2784
2795
|
});
|
|
2785
2796
|
|
|
2786
|
-
var $$
|
|
2797
|
+
var $$9 = _export;
|
|
2787
2798
|
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
2788
2799
|
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2789
2800
|
|
|
2790
2801
|
// `Promise.reject` method
|
|
2791
2802
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2792
|
-
$$
|
|
2803
|
+
$$9({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
2793
2804
|
reject: function reject(r) {
|
|
2794
2805
|
var capability = newPromiseCapabilityModule.f(this);
|
|
2795
2806
|
var capabilityReject = capability.reject;
|
|
@@ -2798,69 +2809,69 @@ $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
|
2798
2809
|
}
|
|
2799
2810
|
});
|
|
2800
2811
|
|
|
2801
|
-
var anObject = anObject$
|
|
2802
|
-
var isObject$
|
|
2812
|
+
var anObject$6 = anObject$f;
|
|
2813
|
+
var isObject$3 = isObject$d;
|
|
2803
2814
|
var newPromiseCapability = newPromiseCapability$2;
|
|
2804
2815
|
|
|
2805
2816
|
var promiseResolve$1 = function (C, x) {
|
|
2806
|
-
anObject(C);
|
|
2807
|
-
if (isObject$
|
|
2817
|
+
anObject$6(C);
|
|
2818
|
+
if (isObject$3(x) && x.constructor === C) return x;
|
|
2808
2819
|
var promiseCapability = newPromiseCapability.f(C);
|
|
2809
2820
|
var resolve = promiseCapability.resolve;
|
|
2810
2821
|
resolve(x);
|
|
2811
2822
|
return promiseCapability.promise;
|
|
2812
2823
|
};
|
|
2813
2824
|
|
|
2814
|
-
var $$
|
|
2815
|
-
var getBuiltIn = getBuiltIn$
|
|
2825
|
+
var $$8 = _export;
|
|
2826
|
+
var getBuiltIn$1 = getBuiltIn$8;
|
|
2816
2827
|
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
2817
2828
|
var promiseResolve = promiseResolve$1;
|
|
2818
2829
|
|
|
2819
|
-
getBuiltIn('Promise');
|
|
2830
|
+
getBuiltIn$1('Promise');
|
|
2820
2831
|
|
|
2821
2832
|
// `Promise.resolve` method
|
|
2822
2833
|
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2823
|
-
$$
|
|
2834
|
+
$$8({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2824
2835
|
resolve: function resolve(x) {
|
|
2825
2836
|
return promiseResolve(this, x);
|
|
2826
2837
|
}
|
|
2827
2838
|
});
|
|
2828
2839
|
|
|
2829
|
-
var isObject = isObject$
|
|
2830
|
-
var classof$
|
|
2831
|
-
var wellKnownSymbol$
|
|
2840
|
+
var isObject$2 = isObject$d;
|
|
2841
|
+
var classof$2 = classofRaw$2;
|
|
2842
|
+
var wellKnownSymbol$4 = wellKnownSymbol$i;
|
|
2832
2843
|
|
|
2833
|
-
var MATCH$1 = wellKnownSymbol$
|
|
2844
|
+
var MATCH$1 = wellKnownSymbol$4('match');
|
|
2834
2845
|
|
|
2835
2846
|
// `IsRegExp` abstract operation
|
|
2836
2847
|
// https://tc39.es/ecma262/#sec-isregexp
|
|
2837
2848
|
var isRegexp = function (it) {
|
|
2838
2849
|
var isRegExp;
|
|
2839
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$
|
|
2850
|
+
return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) === 'RegExp');
|
|
2840
2851
|
};
|
|
2841
2852
|
|
|
2842
2853
|
var isRegExp = isRegexp;
|
|
2843
2854
|
|
|
2844
|
-
var $TypeError = TypeError;
|
|
2855
|
+
var $TypeError$4 = TypeError;
|
|
2845
2856
|
|
|
2846
2857
|
var notARegexp = function (it) {
|
|
2847
2858
|
if (isRegExp(it)) {
|
|
2848
|
-
throw new $TypeError("The method doesn't accept regular expressions");
|
|
2859
|
+
throw new $TypeError$4("The method doesn't accept regular expressions");
|
|
2849
2860
|
} return it;
|
|
2850
2861
|
};
|
|
2851
2862
|
|
|
2852
|
-
var classof = classof$
|
|
2863
|
+
var classof$1 = classof$5;
|
|
2853
2864
|
|
|
2854
2865
|
var $String = String;
|
|
2855
2866
|
|
|
2856
|
-
var toString$
|
|
2857
|
-
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
2867
|
+
var toString$2 = function (argument) {
|
|
2868
|
+
if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
2858
2869
|
return $String(argument);
|
|
2859
2870
|
};
|
|
2860
2871
|
|
|
2861
|
-
var wellKnownSymbol$
|
|
2872
|
+
var wellKnownSymbol$3 = wellKnownSymbol$i;
|
|
2862
2873
|
|
|
2863
|
-
var MATCH = wellKnownSymbol$
|
|
2874
|
+
var MATCH = wellKnownSymbol$3('match');
|
|
2864
2875
|
|
|
2865
2876
|
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
2866
2877
|
var regexp = /./;
|
|
@@ -2874,27 +2885,298 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
2874
2885
|
} return false;
|
|
2875
2886
|
};
|
|
2876
2887
|
|
|
2877
|
-
var
|
|
2878
|
-
var uncurryThis = functionUncurryThis;
|
|
2888
|
+
var $$7 = _export;
|
|
2889
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
2879
2890
|
var notARegExp = notARegexp;
|
|
2880
2891
|
var requireObjectCoercible = requireObjectCoercible$4;
|
|
2881
|
-
var toString = toString$
|
|
2892
|
+
var toString$1 = toString$2;
|
|
2882
2893
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
2883
2894
|
|
|
2884
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
2895
|
+
var stringIndexOf = uncurryThis$1(''.indexOf);
|
|
2885
2896
|
|
|
2886
2897
|
// `String.prototype.includes` method
|
|
2887
2898
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
2888
|
-
|
|
2899
|
+
$$7({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
|
|
2889
2900
|
includes: function includes(searchString /* , position = 0 */) {
|
|
2890
2901
|
return !!~stringIndexOf(
|
|
2891
|
-
toString(requireObjectCoercible(this)),
|
|
2892
|
-
toString(notARegExp(searchString)),
|
|
2902
|
+
toString$1(requireObjectCoercible(this)),
|
|
2903
|
+
toString$1(notARegExp(searchString)),
|
|
2893
2904
|
arguments.length > 1 ? arguments[1] : undefined
|
|
2894
2905
|
);
|
|
2895
2906
|
}
|
|
2896
2907
|
});
|
|
2897
2908
|
|
|
2909
|
+
var $$6 = _export;
|
|
2910
|
+
var globalThis$3 = globalThis_1;
|
|
2911
|
+
var anInstance = anInstance$2;
|
|
2912
|
+
var anObject$5 = anObject$f;
|
|
2913
|
+
var isCallable$1 = isCallable$l;
|
|
2914
|
+
var getPrototypeOf = objectGetPrototypeOf;
|
|
2915
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$2;
|
|
2916
|
+
var createProperty = createProperty$2;
|
|
2917
|
+
var fails$2 = fails$i;
|
|
2918
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2919
|
+
var wellKnownSymbol$2 = wellKnownSymbol$i;
|
|
2920
|
+
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
2921
|
+
var DESCRIPTORS$2 = descriptors;
|
|
2922
|
+
|
|
2923
|
+
var CONSTRUCTOR = 'constructor';
|
|
2924
|
+
var ITERATOR$1 = 'Iterator';
|
|
2925
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
2926
|
+
|
|
2927
|
+
var $TypeError$3 = TypeError;
|
|
2928
|
+
var NativeIterator = globalThis$3[ITERATOR$1];
|
|
2929
|
+
|
|
2930
|
+
// FF56- have non-standard global helper `Iterator`
|
|
2931
|
+
var FORCED$2 = !isCallable$1(NativeIterator)
|
|
2932
|
+
|| NativeIterator.prototype !== IteratorPrototype$1
|
|
2933
|
+
// FF44- non-standard `Iterator` passes previous tests
|
|
2934
|
+
|| !fails$2(function () { NativeIterator({}); });
|
|
2935
|
+
|
|
2936
|
+
var IteratorConstructor = function Iterator() {
|
|
2937
|
+
anInstance(this, IteratorPrototype$1);
|
|
2938
|
+
if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$3('Abstract class Iterator not directly constructable');
|
|
2939
|
+
};
|
|
2940
|
+
|
|
2941
|
+
var defineIteratorPrototypeAccessor = function (key, value) {
|
|
2942
|
+
if (DESCRIPTORS$2) {
|
|
2943
|
+
defineBuiltInAccessor(IteratorPrototype$1, key, {
|
|
2944
|
+
configurable: true,
|
|
2945
|
+
get: function () {
|
|
2946
|
+
return value;
|
|
2947
|
+
},
|
|
2948
|
+
set: function (replacement) {
|
|
2949
|
+
anObject$5(this);
|
|
2950
|
+
if (this === IteratorPrototype$1) throw new $TypeError$3("You can't redefine this property");
|
|
2951
|
+
if (hasOwn$1(this, key)) this[key] = replacement;
|
|
2952
|
+
else createProperty(this, key, replacement);
|
|
2953
|
+
}
|
|
2954
|
+
});
|
|
2955
|
+
} else IteratorPrototype$1[key] = value;
|
|
2956
|
+
};
|
|
2957
|
+
|
|
2958
|
+
if (!hasOwn$1(IteratorPrototype$1, TO_STRING_TAG$1)) defineIteratorPrototypeAccessor(TO_STRING_TAG$1, ITERATOR$1);
|
|
2959
|
+
|
|
2960
|
+
if (FORCED$2 || !hasOwn$1(IteratorPrototype$1, CONSTRUCTOR) || IteratorPrototype$1[CONSTRUCTOR] === Object) {
|
|
2961
|
+
defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
IteratorConstructor.prototype = IteratorPrototype$1;
|
|
2965
|
+
|
|
2966
|
+
// `Iterator` constructor
|
|
2967
|
+
// https://tc39.es/ecma262/#sec-iterator
|
|
2968
|
+
$$6({ global: true, constructor: true, forced: FORCED$2 }, {
|
|
2969
|
+
Iterator: IteratorConstructor
|
|
2970
|
+
});
|
|
2971
|
+
|
|
2972
|
+
// `GetIteratorDirect(obj)` abstract operation
|
|
2973
|
+
// https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
|
|
2974
|
+
var getIteratorDirect$4 = function (obj) {
|
|
2975
|
+
return {
|
|
2976
|
+
iterator: obj,
|
|
2977
|
+
next: obj.next,
|
|
2978
|
+
done: false
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
|
|
2982
|
+
var defineBuiltIn = defineBuiltIn$6;
|
|
2983
|
+
|
|
2984
|
+
var defineBuiltIns$1 = function (target, src, options) {
|
|
2985
|
+
for (var key in src) defineBuiltIn(target, key, src[key], options);
|
|
2986
|
+
return target;
|
|
2987
|
+
};
|
|
2988
|
+
|
|
2989
|
+
var call$2 = functionCall;
|
|
2990
|
+
var create = objectCreate;
|
|
2991
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$8;
|
|
2992
|
+
var defineBuiltIns = defineBuiltIns$1;
|
|
2993
|
+
var wellKnownSymbol$1 = wellKnownSymbol$i;
|
|
2994
|
+
var InternalStateModule = internalState;
|
|
2995
|
+
var getMethod = getMethod$4;
|
|
2996
|
+
var IteratorPrototype = iteratorsCore.IteratorPrototype;
|
|
2997
|
+
var createIterResultObject = createIterResultObject$2;
|
|
2998
|
+
var iteratorClose$1 = iteratorClose$3;
|
|
2999
|
+
|
|
3000
|
+
var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
|
|
3001
|
+
var ITERATOR_HELPER = 'IteratorHelper';
|
|
3002
|
+
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
|
|
3003
|
+
var setInternalState = InternalStateModule.set;
|
|
3004
|
+
|
|
3005
|
+
var createIteratorProxyPrototype = function (IS_ITERATOR) {
|
|
3006
|
+
var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
|
|
3007
|
+
|
|
3008
|
+
return defineBuiltIns(create(IteratorPrototype), {
|
|
3009
|
+
next: function next() {
|
|
3010
|
+
var state = getInternalState(this);
|
|
3011
|
+
// for simplification:
|
|
3012
|
+
// for `%WrapForValidIteratorPrototype%.next` or with `state.returnHandlerResult` our `nextHandler` returns `IterResultObject`
|
|
3013
|
+
// for `%IteratorHelperPrototype%.next` - just a value
|
|
3014
|
+
if (IS_ITERATOR) return state.nextHandler();
|
|
3015
|
+
if (state.done) return createIterResultObject(undefined, true);
|
|
3016
|
+
try {
|
|
3017
|
+
var result = state.nextHandler();
|
|
3018
|
+
return state.returnHandlerResult ? result : createIterResultObject(result, state.done);
|
|
3019
|
+
} catch (error) {
|
|
3020
|
+
state.done = true;
|
|
3021
|
+
throw error;
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
'return': function () {
|
|
3025
|
+
var state = getInternalState(this);
|
|
3026
|
+
var iterator = state.iterator;
|
|
3027
|
+
state.done = true;
|
|
3028
|
+
if (IS_ITERATOR) {
|
|
3029
|
+
var returnMethod = getMethod(iterator, 'return');
|
|
3030
|
+
return returnMethod ? call$2(returnMethod, iterator) : createIterResultObject(undefined, true);
|
|
3031
|
+
}
|
|
3032
|
+
if (state.inner) try {
|
|
3033
|
+
iteratorClose$1(state.inner.iterator, 'normal');
|
|
3034
|
+
} catch (error) {
|
|
3035
|
+
return iteratorClose$1(iterator, 'throw', error);
|
|
3036
|
+
}
|
|
3037
|
+
if (iterator) iteratorClose$1(iterator, 'normal');
|
|
3038
|
+
return createIterResultObject(undefined, true);
|
|
3039
|
+
}
|
|
3040
|
+
});
|
|
3041
|
+
};
|
|
3042
|
+
|
|
3043
|
+
var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
|
|
3044
|
+
var IteratorHelperPrototype = createIteratorProxyPrototype(false);
|
|
3045
|
+
|
|
3046
|
+
createNonEnumerableProperty$4(IteratorHelperPrototype, TO_STRING_TAG, 'Iterator Helper');
|
|
3047
|
+
|
|
3048
|
+
var iteratorCreateProxy = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RESULT) {
|
|
3049
|
+
var IteratorProxy = function Iterator(record, state) {
|
|
3050
|
+
if (state) {
|
|
3051
|
+
state.iterator = record.iterator;
|
|
3052
|
+
state.next = record.next;
|
|
3053
|
+
} else state = record;
|
|
3054
|
+
state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
|
|
3055
|
+
state.returnHandlerResult = !!RETURN_HANDLER_RESULT;
|
|
3056
|
+
state.nextHandler = nextHandler;
|
|
3057
|
+
state.counter = 0;
|
|
3058
|
+
state.done = false;
|
|
3059
|
+
setInternalState(this, state);
|
|
3060
|
+
};
|
|
3061
|
+
|
|
3062
|
+
IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
|
|
3063
|
+
|
|
3064
|
+
return IteratorProxy;
|
|
3065
|
+
};
|
|
3066
|
+
|
|
3067
|
+
var anObject$4 = anObject$f;
|
|
3068
|
+
var iteratorClose = iteratorClose$3;
|
|
3069
|
+
|
|
3070
|
+
// call something on iterator step with safe closing on error
|
|
3071
|
+
var callWithSafeIterationClosing$2 = function (iterator, fn, value, ENTRIES) {
|
|
3072
|
+
try {
|
|
3073
|
+
return ENTRIES ? fn(anObject$4(value)[0], value[1]) : fn(value);
|
|
3074
|
+
} catch (error) {
|
|
3075
|
+
iteratorClose(iterator, 'throw', error);
|
|
3076
|
+
}
|
|
3077
|
+
};
|
|
3078
|
+
|
|
3079
|
+
var $$5 = _export;
|
|
3080
|
+
var call$1 = functionCall;
|
|
3081
|
+
var aCallable$3 = aCallable$d;
|
|
3082
|
+
var anObject$3 = anObject$f;
|
|
3083
|
+
var getIteratorDirect$3 = getIteratorDirect$4;
|
|
3084
|
+
var createIteratorProxy$1 = iteratorCreateProxy;
|
|
3085
|
+
var callWithSafeIterationClosing$1 = callWithSafeIterationClosing$2;
|
|
3086
|
+
var IS_PURE$1 = isPure;
|
|
3087
|
+
|
|
3088
|
+
var IteratorProxy$1 = createIteratorProxy$1(function () {
|
|
3089
|
+
var iterator = this.iterator;
|
|
3090
|
+
var predicate = this.predicate;
|
|
3091
|
+
var next = this.next;
|
|
3092
|
+
var result, done, value;
|
|
3093
|
+
while (true) {
|
|
3094
|
+
result = anObject$3(call$1(next, iterator));
|
|
3095
|
+
done = this.done = !!result.done;
|
|
3096
|
+
if (done) return;
|
|
3097
|
+
value = result.value;
|
|
3098
|
+
if (callWithSafeIterationClosing$1(iterator, predicate, [value, this.counter++], true)) return value;
|
|
3099
|
+
}
|
|
3100
|
+
});
|
|
3101
|
+
|
|
3102
|
+
// `Iterator.prototype.filter` method
|
|
3103
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.filter
|
|
3104
|
+
$$5({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
|
|
3105
|
+
filter: function filter(predicate) {
|
|
3106
|
+
anObject$3(this);
|
|
3107
|
+
aCallable$3(predicate);
|
|
3108
|
+
return new IteratorProxy$1(getIteratorDirect$3(this), {
|
|
3109
|
+
predicate: predicate
|
|
3110
|
+
});
|
|
3111
|
+
}
|
|
3112
|
+
});
|
|
3113
|
+
|
|
3114
|
+
var call = functionCall;
|
|
3115
|
+
var aCallable$2 = aCallable$d;
|
|
3116
|
+
var anObject$2 = anObject$f;
|
|
3117
|
+
var getIteratorDirect$2 = getIteratorDirect$4;
|
|
3118
|
+
var createIteratorProxy = iteratorCreateProxy;
|
|
3119
|
+
var callWithSafeIterationClosing = callWithSafeIterationClosing$2;
|
|
3120
|
+
|
|
3121
|
+
var IteratorProxy = createIteratorProxy(function () {
|
|
3122
|
+
var iterator = this.iterator;
|
|
3123
|
+
var result = anObject$2(call(this.next, iterator));
|
|
3124
|
+
var done = this.done = !!result.done;
|
|
3125
|
+
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
|
|
3126
|
+
});
|
|
3127
|
+
|
|
3128
|
+
// `Iterator.prototype.map` method
|
|
3129
|
+
// https://github.com/tc39/proposal-iterator-helpers
|
|
3130
|
+
var iteratorMap = function map(mapper) {
|
|
3131
|
+
anObject$2(this);
|
|
3132
|
+
aCallable$2(mapper);
|
|
3133
|
+
return new IteratorProxy(getIteratorDirect$2(this), {
|
|
3134
|
+
mapper: mapper
|
|
3135
|
+
});
|
|
3136
|
+
};
|
|
3137
|
+
|
|
3138
|
+
var $$4 = _export;
|
|
3139
|
+
var map = iteratorMap;
|
|
3140
|
+
var IS_PURE = isPure;
|
|
3141
|
+
|
|
3142
|
+
// `Iterator.prototype.map` method
|
|
3143
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
|
3144
|
+
$$4({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
|
|
3145
|
+
map: map
|
|
3146
|
+
});
|
|
3147
|
+
|
|
3148
|
+
var $$3 = _export;
|
|
3149
|
+
var iterate$1 = iterate$5;
|
|
3150
|
+
var aCallable$1 = aCallable$d;
|
|
3151
|
+
var anObject$1 = anObject$f;
|
|
3152
|
+
var getIteratorDirect$1 = getIteratorDirect$4;
|
|
3153
|
+
|
|
3154
|
+
var $TypeError$2 = TypeError;
|
|
3155
|
+
|
|
3156
|
+
// `Iterator.prototype.reduce` method
|
|
3157
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.reduce
|
|
3158
|
+
$$3({ target: 'Iterator', proto: true, real: true }, {
|
|
3159
|
+
reduce: function reduce(reducer /* , initialValue */) {
|
|
3160
|
+
anObject$1(this);
|
|
3161
|
+
aCallable$1(reducer);
|
|
3162
|
+
var record = getIteratorDirect$1(this);
|
|
3163
|
+
var noInitial = arguments.length < 2;
|
|
3164
|
+
var accumulator = noInitial ? undefined : arguments[1];
|
|
3165
|
+
var counter = 0;
|
|
3166
|
+
iterate$1(record, function (value) {
|
|
3167
|
+
if (noInitial) {
|
|
3168
|
+
noInitial = false;
|
|
3169
|
+
accumulator = value;
|
|
3170
|
+
} else {
|
|
3171
|
+
accumulator = reducer(accumulator, value, counter);
|
|
3172
|
+
}
|
|
3173
|
+
counter++;
|
|
3174
|
+
}, { IS_RECORD: true });
|
|
3175
|
+
if (noInitial) throw new $TypeError$2('Reduce of empty iterator with no initial value');
|
|
3176
|
+
return accumulator;
|
|
3177
|
+
}
|
|
3178
|
+
});
|
|
3179
|
+
|
|
2898
3180
|
// iterable DOM collections
|
|
2899
3181
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
2900
3182
|
var domIterables = {
|
|
@@ -2939,13 +3221,13 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
2939
3221
|
|
|
2940
3222
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
2941
3223
|
|
|
2942
|
-
var globalThis$
|
|
3224
|
+
var globalThis$2 = globalThis_1;
|
|
2943
3225
|
var DOMIterables = domIterables;
|
|
2944
3226
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
2945
3227
|
var ArrayIteratorMethods = es_array_iterator;
|
|
2946
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
3228
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$8;
|
|
2947
3229
|
var setToStringTag = setToStringTag$4;
|
|
2948
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
3230
|
+
var wellKnownSymbol = wellKnownSymbol$i;
|
|
2949
3231
|
|
|
2950
3232
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
2951
3233
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
@@ -2954,7 +3236,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
2954
3236
|
if (CollectionPrototype) {
|
|
2955
3237
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
2956
3238
|
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
2957
|
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
|
3239
|
+
createNonEnumerableProperty$3(CollectionPrototype, ITERATOR, ArrayValues);
|
|
2958
3240
|
} catch (error) {
|
|
2959
3241
|
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
2960
3242
|
}
|
|
@@ -2962,7 +3244,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
2962
3244
|
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
2963
3245
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
2964
3246
|
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
|
|
2965
|
-
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
3247
|
+
createNonEnumerableProperty$3(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
|
|
2966
3248
|
} catch (error) {
|
|
2967
3249
|
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
|
|
2968
3250
|
}
|
|
@@ -2971,7 +3253,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
2971
3253
|
};
|
|
2972
3254
|
|
|
2973
3255
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
2974
|
-
handlePrototype(globalThis$
|
|
3256
|
+
handlePrototype(globalThis$2[COLLECTION_NAME] && globalThis$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
2975
3257
|
}
|
|
2976
3258
|
|
|
2977
3259
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
@@ -3174,6 +3456,380 @@ let Context = /*#__PURE__*/createContext({
|
|
|
3174
3456
|
configs: {},
|
|
3175
3457
|
async execute() {}
|
|
3176
3458
|
});
|
|
3459
|
+
function useIntrigContext() {
|
|
3460
|
+
return useContext(Context);
|
|
3461
|
+
}
|
|
3462
|
+
|
|
3463
|
+
var loglevel = {exports: {}};
|
|
3464
|
+
|
|
3465
|
+
/*
|
|
3466
|
+
* loglevel - https://github.com/pimterry/loglevel
|
|
3467
|
+
*
|
|
3468
|
+
* Copyright (c) 2013 Tim Perry
|
|
3469
|
+
* Licensed under the MIT license.
|
|
3470
|
+
*/
|
|
3471
|
+
|
|
3472
|
+
(function (module) {
|
|
3473
|
+
(function (root, definition) {
|
|
3474
|
+
if (module.exports) {
|
|
3475
|
+
module.exports = definition();
|
|
3476
|
+
} else {
|
|
3477
|
+
root.log = definition();
|
|
3478
|
+
}
|
|
3479
|
+
}(commonjsGlobal, function () {
|
|
3480
|
+
|
|
3481
|
+
// Slightly dubious tricks to cut down minimized file size
|
|
3482
|
+
var noop = function() {};
|
|
3483
|
+
var undefinedType = "undefined";
|
|
3484
|
+
var isIE = (typeof window !== undefinedType) && (typeof window.navigator !== undefinedType) && (
|
|
3485
|
+
/Trident\/|MSIE /.test(window.navigator.userAgent)
|
|
3486
|
+
);
|
|
3487
|
+
|
|
3488
|
+
var logMethods = [
|
|
3489
|
+
"trace",
|
|
3490
|
+
"debug",
|
|
3491
|
+
"info",
|
|
3492
|
+
"warn",
|
|
3493
|
+
"error"
|
|
3494
|
+
];
|
|
3495
|
+
|
|
3496
|
+
var _loggersByName = {};
|
|
3497
|
+
var defaultLogger = null;
|
|
3498
|
+
|
|
3499
|
+
// Cross-browser bind equivalent that works at least back to IE6
|
|
3500
|
+
function bindMethod(obj, methodName) {
|
|
3501
|
+
var method = obj[methodName];
|
|
3502
|
+
if (typeof method.bind === 'function') {
|
|
3503
|
+
return method.bind(obj);
|
|
3504
|
+
} else {
|
|
3505
|
+
try {
|
|
3506
|
+
return Function.prototype.bind.call(method, obj);
|
|
3507
|
+
} catch (e) {
|
|
3508
|
+
// Missing bind shim or IE8 + Modernizr, fallback to wrapping
|
|
3509
|
+
return function() {
|
|
3510
|
+
return Function.prototype.apply.apply(method, [obj, arguments]);
|
|
3511
|
+
};
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
// Trace() doesn't print the message in IE, so for that case we need to wrap it
|
|
3517
|
+
function traceForIE() {
|
|
3518
|
+
if (console.log) {
|
|
3519
|
+
if (console.log.apply) {
|
|
3520
|
+
console.log.apply(console, arguments);
|
|
3521
|
+
} else {
|
|
3522
|
+
// In old IE, native console methods themselves don't have apply().
|
|
3523
|
+
Function.prototype.apply.apply(console.log, [console, arguments]);
|
|
3524
|
+
}
|
|
3525
|
+
}
|
|
3526
|
+
if (console.trace) console.trace();
|
|
3527
|
+
}
|
|
3528
|
+
|
|
3529
|
+
// Build the best logging method possible for this env
|
|
3530
|
+
// Wherever possible we want to bind, not wrap, to preserve stack traces
|
|
3531
|
+
function realMethod(methodName) {
|
|
3532
|
+
if (methodName === 'debug') {
|
|
3533
|
+
methodName = 'log';
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
if (typeof console === undefinedType) {
|
|
3537
|
+
return false; // No method possible, for now - fixed later by enableLoggingWhenConsoleArrives
|
|
3538
|
+
} else if (methodName === 'trace' && isIE) {
|
|
3539
|
+
return traceForIE;
|
|
3540
|
+
} else if (console[methodName] !== undefined) {
|
|
3541
|
+
return bindMethod(console, methodName);
|
|
3542
|
+
} else if (console.log !== undefined) {
|
|
3543
|
+
return bindMethod(console, 'log');
|
|
3544
|
+
} else {
|
|
3545
|
+
return noop;
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
// These private functions always need `this` to be set properly
|
|
3550
|
+
|
|
3551
|
+
function replaceLoggingMethods() {
|
|
3552
|
+
/*jshint validthis:true */
|
|
3553
|
+
var level = this.getLevel();
|
|
3554
|
+
|
|
3555
|
+
// Replace the actual methods.
|
|
3556
|
+
for (var i = 0; i < logMethods.length; i++) {
|
|
3557
|
+
var methodName = logMethods[i];
|
|
3558
|
+
this[methodName] = (i < level) ?
|
|
3559
|
+
noop :
|
|
3560
|
+
this.methodFactory(methodName, level, this.name);
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
// Define log.log as an alias for log.debug
|
|
3564
|
+
this.log = this.debug;
|
|
3565
|
+
|
|
3566
|
+
// Return any important warnings.
|
|
3567
|
+
if (typeof console === undefinedType && level < this.levels.SILENT) {
|
|
3568
|
+
return "No console available for logging";
|
|
3569
|
+
}
|
|
3570
|
+
}
|
|
3571
|
+
|
|
3572
|
+
// In old IE versions, the console isn't present until you first open it.
|
|
3573
|
+
// We build realMethod() replacements here that regenerate logging methods
|
|
3574
|
+
function enableLoggingWhenConsoleArrives(methodName) {
|
|
3575
|
+
return function () {
|
|
3576
|
+
if (typeof console !== undefinedType) {
|
|
3577
|
+
replaceLoggingMethods.call(this);
|
|
3578
|
+
this[methodName].apply(this, arguments);
|
|
3579
|
+
}
|
|
3580
|
+
};
|
|
3581
|
+
}
|
|
3582
|
+
|
|
3583
|
+
// By default, we use closely bound real methods wherever possible, and
|
|
3584
|
+
// otherwise we wait for a console to appear, and then try again.
|
|
3585
|
+
function defaultMethodFactory(methodName, _level, _loggerName) {
|
|
3586
|
+
/*jshint validthis:true */
|
|
3587
|
+
return realMethod(methodName) ||
|
|
3588
|
+
enableLoggingWhenConsoleArrives.apply(this, arguments);
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
function Logger(name, factory) {
|
|
3592
|
+
// Private instance variables.
|
|
3593
|
+
var self = this;
|
|
3594
|
+
/**
|
|
3595
|
+
* The level inherited from a parent logger (or a global default). We
|
|
3596
|
+
* cache this here rather than delegating to the parent so that it stays
|
|
3597
|
+
* in sync with the actual logging methods that we have installed (the
|
|
3598
|
+
* parent could change levels but we might not have rebuilt the loggers
|
|
3599
|
+
* in this child yet).
|
|
3600
|
+
* @type {number}
|
|
3601
|
+
*/
|
|
3602
|
+
var inheritedLevel;
|
|
3603
|
+
/**
|
|
3604
|
+
* The default level for this logger, if any. If set, this overrides
|
|
3605
|
+
* `inheritedLevel`.
|
|
3606
|
+
* @type {number|null}
|
|
3607
|
+
*/
|
|
3608
|
+
var defaultLevel;
|
|
3609
|
+
/**
|
|
3610
|
+
* A user-specific level for this logger. If set, this overrides
|
|
3611
|
+
* `defaultLevel`.
|
|
3612
|
+
* @type {number|null}
|
|
3613
|
+
*/
|
|
3614
|
+
var userLevel;
|
|
3615
|
+
|
|
3616
|
+
var storageKey = "loglevel";
|
|
3617
|
+
if (typeof name === "string") {
|
|
3618
|
+
storageKey += ":" + name;
|
|
3619
|
+
} else if (typeof name === "symbol") {
|
|
3620
|
+
storageKey = undefined;
|
|
3621
|
+
}
|
|
3622
|
+
|
|
3623
|
+
function persistLevelIfPossible(levelNum) {
|
|
3624
|
+
var levelName = (logMethods[levelNum] || 'silent').toUpperCase();
|
|
3625
|
+
|
|
3626
|
+
if (typeof window === undefinedType || !storageKey) return;
|
|
3627
|
+
|
|
3628
|
+
// Use localStorage if available
|
|
3629
|
+
try {
|
|
3630
|
+
window.localStorage[storageKey] = levelName;
|
|
3631
|
+
return;
|
|
3632
|
+
} catch (ignore) {}
|
|
3633
|
+
|
|
3634
|
+
// Use session cookie as fallback
|
|
3635
|
+
try {
|
|
3636
|
+
window.document.cookie =
|
|
3637
|
+
encodeURIComponent(storageKey) + "=" + levelName + ";";
|
|
3638
|
+
} catch (ignore) {}
|
|
3639
|
+
}
|
|
3640
|
+
|
|
3641
|
+
function getPersistedLevel() {
|
|
3642
|
+
var storedLevel;
|
|
3643
|
+
|
|
3644
|
+
if (typeof window === undefinedType || !storageKey) return;
|
|
3645
|
+
|
|
3646
|
+
try {
|
|
3647
|
+
storedLevel = window.localStorage[storageKey];
|
|
3648
|
+
} catch (ignore) {}
|
|
3649
|
+
|
|
3650
|
+
// Fallback to cookies if local storage gives us nothing
|
|
3651
|
+
if (typeof storedLevel === undefinedType) {
|
|
3652
|
+
try {
|
|
3653
|
+
var cookie = window.document.cookie;
|
|
3654
|
+
var cookieName = encodeURIComponent(storageKey);
|
|
3655
|
+
var location = cookie.indexOf(cookieName + "=");
|
|
3656
|
+
if (location !== -1) {
|
|
3657
|
+
storedLevel = /^([^;]+)/.exec(
|
|
3658
|
+
cookie.slice(location + cookieName.length + 1)
|
|
3659
|
+
)[1];
|
|
3660
|
+
}
|
|
3661
|
+
} catch (ignore) {}
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
// If the stored level is not valid, treat it as if nothing was stored.
|
|
3665
|
+
if (self.levels[storedLevel] === undefined) {
|
|
3666
|
+
storedLevel = undefined;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
return storedLevel;
|
|
3670
|
+
}
|
|
3671
|
+
|
|
3672
|
+
function clearPersistedLevel() {
|
|
3673
|
+
if (typeof window === undefinedType || !storageKey) return;
|
|
3674
|
+
|
|
3675
|
+
// Use localStorage if available
|
|
3676
|
+
try {
|
|
3677
|
+
window.localStorage.removeItem(storageKey);
|
|
3678
|
+
} catch (ignore) {}
|
|
3679
|
+
|
|
3680
|
+
// Use session cookie as fallback
|
|
3681
|
+
try {
|
|
3682
|
+
window.document.cookie =
|
|
3683
|
+
encodeURIComponent(storageKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
|
|
3684
|
+
} catch (ignore) {}
|
|
3685
|
+
}
|
|
3686
|
+
|
|
3687
|
+
function normalizeLevel(input) {
|
|
3688
|
+
var level = input;
|
|
3689
|
+
if (typeof level === "string" && self.levels[level.toUpperCase()] !== undefined) {
|
|
3690
|
+
level = self.levels[level.toUpperCase()];
|
|
3691
|
+
}
|
|
3692
|
+
if (typeof level === "number" && level >= 0 && level <= self.levels.SILENT) {
|
|
3693
|
+
return level;
|
|
3694
|
+
} else {
|
|
3695
|
+
throw new TypeError("log.setLevel() called with invalid level: " + input);
|
|
3696
|
+
}
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
/*
|
|
3700
|
+
*
|
|
3701
|
+
* Public logger API - see https://github.com/pimterry/loglevel for details
|
|
3702
|
+
*
|
|
3703
|
+
*/
|
|
3704
|
+
|
|
3705
|
+
self.name = name;
|
|
3706
|
+
|
|
3707
|
+
self.levels = { "TRACE": 0, "DEBUG": 1, "INFO": 2, "WARN": 3,
|
|
3708
|
+
"ERROR": 4, "SILENT": 5};
|
|
3709
|
+
|
|
3710
|
+
self.methodFactory = factory || defaultMethodFactory;
|
|
3711
|
+
|
|
3712
|
+
self.getLevel = function () {
|
|
3713
|
+
if (userLevel != null) {
|
|
3714
|
+
return userLevel;
|
|
3715
|
+
} else if (defaultLevel != null) {
|
|
3716
|
+
return defaultLevel;
|
|
3717
|
+
} else {
|
|
3718
|
+
return inheritedLevel;
|
|
3719
|
+
}
|
|
3720
|
+
};
|
|
3721
|
+
|
|
3722
|
+
self.setLevel = function (level, persist) {
|
|
3723
|
+
userLevel = normalizeLevel(level);
|
|
3724
|
+
if (persist !== false) { // defaults to true
|
|
3725
|
+
persistLevelIfPossible(userLevel);
|
|
3726
|
+
}
|
|
3727
|
+
|
|
3728
|
+
// NOTE: in v2, this should call rebuild(), which updates children.
|
|
3729
|
+
return replaceLoggingMethods.call(self);
|
|
3730
|
+
};
|
|
3731
|
+
|
|
3732
|
+
self.setDefaultLevel = function (level) {
|
|
3733
|
+
defaultLevel = normalizeLevel(level);
|
|
3734
|
+
if (!getPersistedLevel()) {
|
|
3735
|
+
self.setLevel(level, false);
|
|
3736
|
+
}
|
|
3737
|
+
};
|
|
3738
|
+
|
|
3739
|
+
self.resetLevel = function () {
|
|
3740
|
+
userLevel = null;
|
|
3741
|
+
clearPersistedLevel();
|
|
3742
|
+
replaceLoggingMethods.call(self);
|
|
3743
|
+
};
|
|
3744
|
+
|
|
3745
|
+
self.enableAll = function(persist) {
|
|
3746
|
+
self.setLevel(self.levels.TRACE, persist);
|
|
3747
|
+
};
|
|
3748
|
+
|
|
3749
|
+
self.disableAll = function(persist) {
|
|
3750
|
+
self.setLevel(self.levels.SILENT, persist);
|
|
3751
|
+
};
|
|
3752
|
+
|
|
3753
|
+
self.rebuild = function () {
|
|
3754
|
+
if (defaultLogger !== self) {
|
|
3755
|
+
inheritedLevel = normalizeLevel(defaultLogger.getLevel());
|
|
3756
|
+
}
|
|
3757
|
+
replaceLoggingMethods.call(self);
|
|
3758
|
+
|
|
3759
|
+
if (defaultLogger === self) {
|
|
3760
|
+
for (var childName in _loggersByName) {
|
|
3761
|
+
_loggersByName[childName].rebuild();
|
|
3762
|
+
}
|
|
3763
|
+
}
|
|
3764
|
+
};
|
|
3765
|
+
|
|
3766
|
+
// Initialize all the internal levels.
|
|
3767
|
+
inheritedLevel = normalizeLevel(
|
|
3768
|
+
defaultLogger ? defaultLogger.getLevel() : "WARN"
|
|
3769
|
+
);
|
|
3770
|
+
var initialLevel = getPersistedLevel();
|
|
3771
|
+
if (initialLevel != null) {
|
|
3772
|
+
userLevel = normalizeLevel(initialLevel);
|
|
3773
|
+
}
|
|
3774
|
+
replaceLoggingMethods.call(self);
|
|
3775
|
+
}
|
|
3776
|
+
|
|
3777
|
+
/*
|
|
3778
|
+
*
|
|
3779
|
+
* Top-level API
|
|
3780
|
+
*
|
|
3781
|
+
*/
|
|
3782
|
+
|
|
3783
|
+
defaultLogger = new Logger();
|
|
3784
|
+
|
|
3785
|
+
defaultLogger.getLogger = function getLogger(name) {
|
|
3786
|
+
if ((typeof name !== "symbol" && typeof name !== "string") || name === "") {
|
|
3787
|
+
throw new TypeError("You must supply a name when creating a logger.");
|
|
3788
|
+
}
|
|
3789
|
+
|
|
3790
|
+
var logger = _loggersByName[name];
|
|
3791
|
+
if (!logger) {
|
|
3792
|
+
logger = _loggersByName[name] = new Logger(
|
|
3793
|
+
name,
|
|
3794
|
+
defaultLogger.methodFactory
|
|
3795
|
+
);
|
|
3796
|
+
}
|
|
3797
|
+
return logger;
|
|
3798
|
+
};
|
|
3799
|
+
|
|
3800
|
+
// Grab the current global log variable in case of overwrite
|
|
3801
|
+
var _log = (typeof window !== undefinedType) ? window.log : undefined;
|
|
3802
|
+
defaultLogger.noConflict = function() {
|
|
3803
|
+
if (typeof window !== undefinedType &&
|
|
3804
|
+
window.log === defaultLogger) {
|
|
3805
|
+
window.log = _log;
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
return defaultLogger;
|
|
3809
|
+
};
|
|
3810
|
+
|
|
3811
|
+
defaultLogger.getLoggers = function getLoggers() {
|
|
3812
|
+
return _loggersByName;
|
|
3813
|
+
};
|
|
3814
|
+
|
|
3815
|
+
// ES6 default export, for compatibility
|
|
3816
|
+
defaultLogger['default'] = defaultLogger;
|
|
3817
|
+
|
|
3818
|
+
return defaultLogger;
|
|
3819
|
+
}));
|
|
3820
|
+
} (loglevel));
|
|
3821
|
+
|
|
3822
|
+
var loglevelExports = loglevel.exports;
|
|
3823
|
+
var log = /*@__PURE__*/getDefaultExportFromCjs(loglevelExports);
|
|
3824
|
+
|
|
3825
|
+
// Set the default logging level (can be overridden via environment variables)
|
|
3826
|
+
log.setLevel(process.env.LOG_LEVEL || 'info');
|
|
3827
|
+
const logWrapper = {
|
|
3828
|
+
info: (msg, meta) => meta ? log.info(msg, meta) : log.info(msg),
|
|
3829
|
+
warn: (msg, meta) => meta ? log.warn(msg, meta) : log.warn(msg),
|
|
3830
|
+
error: (msg, meta) => meta ? log.error(msg, meta) : log.error(msg),
|
|
3831
|
+
debug: (msg, meta) => meta ? log.debug(msg, meta) : log.debug(msg)
|
|
3832
|
+
};
|
|
3177
3833
|
|
|
3178
3834
|
/**
|
|
3179
3835
|
* Handles state updates for network requests based on the provided action.
|
|
@@ -3237,8 +3893,8 @@ function IntrigProvider({
|
|
|
3237
3893
|
let {
|
|
3238
3894
|
data,
|
|
3239
3895
|
error: validationError
|
|
3240
|
-
} = (_errorSchema$safePars2 = errorSchema == null ?
|
|
3241
|
-
dispatch(error(data != null ? data : (_e$response2 = e.response) == null ?
|
|
3896
|
+
} = (_errorSchema$safePars2 = errorSchema == null ? undefined : errorSchema.safeParse((_e$response$data = (_e$response = e.response) == null ? undefined : _e$response.data) != null ? _e$response$data : {})) != null ? _errorSchema$safePars2 : {};
|
|
3897
|
+
dispatch(error(data != null ? data : (_e$response2 = e.response) == null ? undefined : _e$response2.data, (_e$response3 = e.response) == null ? undefined : _e$response3.status, request));
|
|
3242
3898
|
} else {
|
|
3243
3899
|
dispatch(error(e));
|
|
3244
3900
|
}
|
|
@@ -3376,13 +4032,15 @@ function useNetworkState({
|
|
|
3376
4032
|
errorSchema,
|
|
3377
4033
|
debounceDelay: requestDebounceDelay
|
|
3378
4034
|
}) {
|
|
3379
|
-
var _context$
|
|
4035
|
+
var _context$state4;
|
|
3380
4036
|
const context = useContext(Context);
|
|
3381
4037
|
const [abortController, setAbortController] = useState();
|
|
3382
4038
|
const networkState = useMemo(() => {
|
|
3383
|
-
var _context$state, _context$state2;
|
|
3384
|
-
|
|
3385
|
-
|
|
4039
|
+
var _context$state, _context$state2, _context$state3;
|
|
4040
|
+
logWrapper.info(`Updating status ${key} ${operation} ${source}`);
|
|
4041
|
+
logWrapper.debug(`<=`, (_context$state = context.state) == null ? undefined : _context$state[`${source}:${operation}:${key}`]);
|
|
4042
|
+
return (_context$state2 = (_context$state3 = context.state) == null ? undefined : _context$state3[`${source}:${operation}:${key}`]) != null ? _context$state2 : init();
|
|
4043
|
+
}, [(_context$state4 = context.state) == null ? undefined : _context$state4[`${source}:${operation}:${key}`]]);
|
|
3386
4044
|
const dispatch = useCallback(state => {
|
|
3387
4045
|
context.dispatch({
|
|
3388
4046
|
key,
|
|
@@ -3393,9 +4051,11 @@ function useNetworkState({
|
|
|
3393
4051
|
}, [key, operation, source, context.dispatch]);
|
|
3394
4052
|
const debounceDelay = useMemo(() => {
|
|
3395
4053
|
var _ref2, _context$configs;
|
|
3396
|
-
return (_ref2 = requestDebounceDelay != null ? requestDebounceDelay : (_context$configs = context.configs) == null ?
|
|
4054
|
+
return (_ref2 = requestDebounceDelay != null ? requestDebounceDelay : (_context$configs = context.configs) == null ? undefined : _context$configs.debounceDelay) != null ? _ref2 : 0;
|
|
3397
4055
|
}, [context.configs, requestDebounceDelay]);
|
|
3398
4056
|
const execute = useCallback(async request => {
|
|
4057
|
+
logWrapper.info(`Executing request ${key} ${operation} ${source}`);
|
|
4058
|
+
logWrapper.debug(`=>`, request);
|
|
3399
4059
|
let abortController = new AbortController();
|
|
3400
4060
|
setAbortController(abortController);
|
|
3401
4061
|
let requestConfig = Object.assign({}, request, {
|
|
@@ -3421,8 +4081,10 @@ function useNetworkState({
|
|
|
3421
4081
|
}, [networkState, context.dispatch, axios]);
|
|
3422
4082
|
const deboundedExecute = useMemo(() => debounce(execute, debounceDelay != null ? debounceDelay : 0), [execute]);
|
|
3423
4083
|
const clear = useCallback(() => {
|
|
4084
|
+
logWrapper.info(`Clearing request ${key} ${operation} ${source}`);
|
|
3424
4085
|
dispatch(init());
|
|
3425
4086
|
setAbortController(abortController => {
|
|
4087
|
+
logWrapper.info(`Aborting request ${key} ${operation} ${source}`);
|
|
3426
4088
|
abortController == null || abortController.abort();
|
|
3427
4089
|
return undefined;
|
|
3428
4090
|
});
|
|
@@ -3445,7 +4107,7 @@ function debounce(func, delay) {
|
|
|
3445
4107
|
* It filters the state to retain error states and maps them to a structured error object with additional context information.
|
|
3446
4108
|
* @return {Object[]} An array of objects representing the error states with context information such as source, operation, and key.
|
|
3447
4109
|
*/
|
|
3448
|
-
function
|
|
4110
|
+
function useCentralError() {
|
|
3449
4111
|
const ctx = useContext(Context);
|
|
3450
4112
|
return useMemo(() => {
|
|
3451
4113
|
return Object.entries(ctx.filteredState).filter(([, state]) => isError(state)).map(([k, state]) => {
|
|
@@ -3464,7 +4126,7 @@ function useCentralErrorHandling() {
|
|
|
3464
4126
|
*
|
|
3465
4127
|
* @return {NetworkState} The aggregated network state based on the pending states and their progress.
|
|
3466
4128
|
*/
|
|
3467
|
-
function
|
|
4129
|
+
function useCentralPendingState() {
|
|
3468
4130
|
const ctx = useContext(Context);
|
|
3469
4131
|
const result = useMemo(() => {
|
|
3470
4132
|
let pendingStates = Object.values(ctx.filteredState).filter(isPending);
|
|
@@ -3474,8 +4136,8 @@ function useCentralPendingStateHandling() {
|
|
|
3474
4136
|
let progress = pendingStates.filter(a => a.progress).reduce((progress, current) => {
|
|
3475
4137
|
var _current$progress$tot, _current$progress, _current$progress$loa, _current$progress2;
|
|
3476
4138
|
return {
|
|
3477
|
-
total: progress.total + ((_current$progress$tot = (_current$progress = current.progress) == null ?
|
|
3478
|
-
loaded: progress.loaded + ((_current$progress$loa = (_current$progress2 = current.progress) == null ?
|
|
4139
|
+
total: progress.total + ((_current$progress$tot = (_current$progress = current.progress) == null ? undefined : _current$progress.total) != null ? _current$progress$tot : 0),
|
|
4140
|
+
loaded: progress.loaded + ((_current$progress$loa = (_current$progress2 = current.progress) == null ? undefined : _current$progress2.loaded) != null ? _current$progress$loa : 0)
|
|
3479
4141
|
};
|
|
3480
4142
|
}, {
|
|
3481
4143
|
total: 0,
|
|
@@ -3486,4 +4148,530 @@ function useCentralPendingStateHandling() {
|
|
|
3486
4148
|
return result;
|
|
3487
4149
|
}
|
|
3488
4150
|
|
|
3489
|
-
|
|
4151
|
+
// **Implementation**
|
|
4152
|
+
function useResolvedValue(hook, options) {
|
|
4153
|
+
const [value, setValue] = useState();
|
|
4154
|
+
let [state] = hook(options); // Ensure compatibility with different hook types
|
|
4155
|
+
useEffect(() => {
|
|
4156
|
+
if (isSuccess(state)) {
|
|
4157
|
+
setValue(state.data);
|
|
4158
|
+
} else {
|
|
4159
|
+
setValue(undefined);
|
|
4160
|
+
}
|
|
4161
|
+
}, [state]); // Add `state` to the dependency array to ensure updates
|
|
4162
|
+
return value;
|
|
4163
|
+
}
|
|
4164
|
+
|
|
4165
|
+
// **Implementation**
|
|
4166
|
+
function useResolvedCachedValue(hook, options) {
|
|
4167
|
+
const [cachedValue, setCachedValue] = useState();
|
|
4168
|
+
let [state] = hook(options); // Ensure compatibility with different hook types
|
|
4169
|
+
useEffect(() => {
|
|
4170
|
+
if (isSuccess(state)) {
|
|
4171
|
+
setCachedValue(state.data);
|
|
4172
|
+
}
|
|
4173
|
+
// Do not clear cached value if state is unsuccessful
|
|
4174
|
+
}, [state]);
|
|
4175
|
+
return cachedValue;
|
|
4176
|
+
}
|
|
4177
|
+
|
|
4178
|
+
// **Implementation**
|
|
4179
|
+
function useAsPromise(hook, options) {
|
|
4180
|
+
const resolveRef = useRef();
|
|
4181
|
+
const rejectRef = useRef();
|
|
4182
|
+
let [state, dispatch, clear] = hook(options); // Casting to `any` to match all overloads
|
|
4183
|
+
useEffect(() => {
|
|
4184
|
+
if (isSuccess(state)) {
|
|
4185
|
+
resolveRef.current == null || resolveRef.current(state.data);
|
|
4186
|
+
clear();
|
|
4187
|
+
} else if (isError(state)) {
|
|
4188
|
+
rejectRef.current == null || rejectRef.current(state.error);
|
|
4189
|
+
clear();
|
|
4190
|
+
}
|
|
4191
|
+
}, [state]);
|
|
4192
|
+
const promiseFn = useCallback((...args) => {
|
|
4193
|
+
return new Promise((resolve, reject) => {
|
|
4194
|
+
resolveRef.current = resolve;
|
|
4195
|
+
rejectRef.current = reject;
|
|
4196
|
+
let dispatchState = dispatch(...args);
|
|
4197
|
+
if (isValidationError(dispatchState)) {
|
|
4198
|
+
reject(dispatchState.error);
|
|
4199
|
+
}
|
|
4200
|
+
});
|
|
4201
|
+
}, [dispatch]);
|
|
4202
|
+
return [promiseFn, clear];
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
/**
|
|
4206
|
+
* A custom hook that integrates a promise-based operation with a network state management system.
|
|
4207
|
+
* Tracks the network state (e.g., pending, success, error) for a given asynchronous function.
|
|
4208
|
+
*
|
|
4209
|
+
* @param fn A promise-based function that performs an asynchronous operation.
|
|
4210
|
+
* @param key An optional string key to identify the network state uniquely. Defaults to 'default'.
|
|
4211
|
+
* @return A tuple containing:
|
|
4212
|
+
* 1. The current network state of the operation.
|
|
4213
|
+
* 2. A function to execute the provided asynchronous operation.
|
|
4214
|
+
* 3. A function to reset the network state back to the initial state.
|
|
4215
|
+
*/
|
|
4216
|
+
function useAsNetworkState(fn, key = 'default') {
|
|
4217
|
+
var _context$state3;
|
|
4218
|
+
let id = useId();
|
|
4219
|
+
let context = useIntrigContext();
|
|
4220
|
+
const networkState = useMemo(() => {
|
|
4221
|
+
var _context$state, _context$state2;
|
|
4222
|
+
return (_context$state = (_context$state2 = context.state) == null ? undefined : _context$state2[`promiseState:${id}:${key}}`]) != null ? _context$state : init();
|
|
4223
|
+
}, [(_context$state3 = context.state) == null ? undefined : _context$state3[`promiseState:${id}:${key}}`]]);
|
|
4224
|
+
const dispatch = useCallback(state => {
|
|
4225
|
+
context.dispatch({
|
|
4226
|
+
key,
|
|
4227
|
+
operation: id,
|
|
4228
|
+
source: 'promiseState',
|
|
4229
|
+
state
|
|
4230
|
+
});
|
|
4231
|
+
}, [key, context.dispatch]);
|
|
4232
|
+
const execute = useCallback((...args) => {
|
|
4233
|
+
dispatch(pending());
|
|
4234
|
+
return fn(...args).then(data => {
|
|
4235
|
+
dispatch(success(data));
|
|
4236
|
+
}, e => {
|
|
4237
|
+
dispatch(error(e));
|
|
4238
|
+
});
|
|
4239
|
+
}, []);
|
|
4240
|
+
const clear = useCallback(() => {
|
|
4241
|
+
dispatch(init());
|
|
4242
|
+
}, []);
|
|
4243
|
+
return [networkState, execute, clear];
|
|
4244
|
+
}
|
|
4245
|
+
|
|
4246
|
+
var defineProperty = objectDefineProperty.f;
|
|
4247
|
+
|
|
4248
|
+
var proxyAccessor$1 = function (Target, Source, key) {
|
|
4249
|
+
key in Target || defineProperty(Target, key, {
|
|
4250
|
+
configurable: true,
|
|
4251
|
+
get: function () { return Source[key]; },
|
|
4252
|
+
set: function (it) { Source[key] = it; }
|
|
4253
|
+
});
|
|
4254
|
+
};
|
|
4255
|
+
|
|
4256
|
+
var isCallable = isCallable$l;
|
|
4257
|
+
var isObject$1 = isObject$d;
|
|
4258
|
+
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
4259
|
+
|
|
4260
|
+
// makes subclassing work correct for wrapped built-ins
|
|
4261
|
+
var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
4262
|
+
var NewTarget, NewTargetPrototype;
|
|
4263
|
+
if (
|
|
4264
|
+
// it can work only with native `setPrototypeOf`
|
|
4265
|
+
setPrototypeOf$1 &&
|
|
4266
|
+
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
4267
|
+
isCallable(NewTarget = dummy.constructor) &&
|
|
4268
|
+
NewTarget !== Wrapper &&
|
|
4269
|
+
isObject$1(NewTargetPrototype = NewTarget.prototype) &&
|
|
4270
|
+
NewTargetPrototype !== Wrapper.prototype
|
|
4271
|
+
) setPrototypeOf$1($this, NewTargetPrototype);
|
|
4272
|
+
return $this;
|
|
4273
|
+
};
|
|
4274
|
+
|
|
4275
|
+
var toString = toString$2;
|
|
4276
|
+
|
|
4277
|
+
var normalizeStringArgument$1 = function (argument, $default) {
|
|
4278
|
+
return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
|
|
4279
|
+
};
|
|
4280
|
+
|
|
4281
|
+
var isObject = isObject$d;
|
|
4282
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$8;
|
|
4283
|
+
|
|
4284
|
+
// `InstallErrorCause` abstract operation
|
|
4285
|
+
// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
|
|
4286
|
+
var installErrorCause$1 = function (O, options) {
|
|
4287
|
+
if (isObject(options) && 'cause' in options) {
|
|
4288
|
+
createNonEnumerableProperty$2(O, 'cause', options.cause);
|
|
4289
|
+
}
|
|
4290
|
+
};
|
|
4291
|
+
|
|
4292
|
+
var uncurryThis = functionUncurryThis;
|
|
4293
|
+
|
|
4294
|
+
var $Error = Error;
|
|
4295
|
+
var replace = uncurryThis(''.replace);
|
|
4296
|
+
|
|
4297
|
+
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
|
|
4298
|
+
// eslint-disable-next-line redos/no-vulnerable, sonarjs/slow-regex -- safe
|
|
4299
|
+
var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
|
|
4300
|
+
var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
|
|
4301
|
+
|
|
4302
|
+
var errorStackClear = function (stack, dropEntries) {
|
|
4303
|
+
if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
|
|
4304
|
+
while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
|
|
4305
|
+
} return stack;
|
|
4306
|
+
};
|
|
4307
|
+
|
|
4308
|
+
var fails$1 = fails$i;
|
|
4309
|
+
var createPropertyDescriptor = createPropertyDescriptor$5;
|
|
4310
|
+
|
|
4311
|
+
var errorStackInstallable = !fails$1(function () {
|
|
4312
|
+
var error = new Error('a');
|
|
4313
|
+
if (!('stack' in error)) return true;
|
|
4314
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
4315
|
+
Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
|
|
4316
|
+
return error.stack !== 7;
|
|
4317
|
+
});
|
|
4318
|
+
|
|
4319
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$8;
|
|
4320
|
+
var clearErrorStack = errorStackClear;
|
|
4321
|
+
var ERROR_STACK_INSTALLABLE = errorStackInstallable;
|
|
4322
|
+
|
|
4323
|
+
// non-standard V8
|
|
4324
|
+
var captureStackTrace = Error.captureStackTrace;
|
|
4325
|
+
|
|
4326
|
+
var errorStackInstall = function (error, C, stack, dropEntries) {
|
|
4327
|
+
if (ERROR_STACK_INSTALLABLE) {
|
|
4328
|
+
if (captureStackTrace) captureStackTrace(error, C);
|
|
4329
|
+
else createNonEnumerableProperty$1(error, 'stack', clearErrorStack(stack, dropEntries));
|
|
4330
|
+
}
|
|
4331
|
+
};
|
|
4332
|
+
|
|
4333
|
+
var getBuiltIn = getBuiltIn$8;
|
|
4334
|
+
var hasOwn = hasOwnProperty_1;
|
|
4335
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$8;
|
|
4336
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
4337
|
+
var setPrototypeOf = objectSetPrototypeOf;
|
|
4338
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
4339
|
+
var proxyAccessor = proxyAccessor$1;
|
|
4340
|
+
var inheritIfRequired = inheritIfRequired$1;
|
|
4341
|
+
var normalizeStringArgument = normalizeStringArgument$1;
|
|
4342
|
+
var installErrorCause = installErrorCause$1;
|
|
4343
|
+
var installErrorStack = errorStackInstall;
|
|
4344
|
+
var DESCRIPTORS$1 = descriptors;
|
|
4345
|
+
|
|
4346
|
+
var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
|
|
4347
|
+
var STACK_TRACE_LIMIT = 'stackTraceLimit';
|
|
4348
|
+
var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
|
|
4349
|
+
var path = FULL_NAME.split('.');
|
|
4350
|
+
var ERROR_NAME = path[path.length - 1];
|
|
4351
|
+
var OriginalError = getBuiltIn.apply(null, path);
|
|
4352
|
+
|
|
4353
|
+
if (!OriginalError) return;
|
|
4354
|
+
|
|
4355
|
+
var OriginalErrorPrototype = OriginalError.prototype;
|
|
4356
|
+
|
|
4357
|
+
// V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
|
|
4358
|
+
if (hasOwn(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
|
|
4359
|
+
|
|
4360
|
+
if (!FORCED) return OriginalError;
|
|
4361
|
+
|
|
4362
|
+
var BaseError = getBuiltIn('Error');
|
|
4363
|
+
|
|
4364
|
+
var WrappedError = wrapper(function (a, b) {
|
|
4365
|
+
var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
|
|
4366
|
+
var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
|
|
4367
|
+
if (message !== undefined) createNonEnumerableProperty(result, 'message', message);
|
|
4368
|
+
installErrorStack(result, WrappedError, result.stack, 2);
|
|
4369
|
+
if (this && isPrototypeOf(OriginalErrorPrototype, this)) inheritIfRequired(result, this, WrappedError);
|
|
4370
|
+
if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
|
|
4371
|
+
return result;
|
|
4372
|
+
});
|
|
4373
|
+
|
|
4374
|
+
WrappedError.prototype = OriginalErrorPrototype;
|
|
4375
|
+
|
|
4376
|
+
if (ERROR_NAME !== 'Error') {
|
|
4377
|
+
if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
|
|
4378
|
+
else copyConstructorProperties(WrappedError, BaseError, { name: true });
|
|
4379
|
+
} else if (DESCRIPTORS$1 && STACK_TRACE_LIMIT in OriginalError) {
|
|
4380
|
+
proxyAccessor(WrappedError, OriginalError, STACK_TRACE_LIMIT);
|
|
4381
|
+
proxyAccessor(WrappedError, OriginalError, 'prepareStackTrace');
|
|
4382
|
+
}
|
|
4383
|
+
|
|
4384
|
+
copyConstructorProperties(WrappedError, OriginalError);
|
|
4385
|
+
|
|
4386
|
+
try {
|
|
4387
|
+
// Safari 13- bug: WebAssembly errors does not have a proper `.name`
|
|
4388
|
+
if (OriginalErrorPrototype.name !== ERROR_NAME) {
|
|
4389
|
+
createNonEnumerableProperty(OriginalErrorPrototype, 'name', ERROR_NAME);
|
|
4390
|
+
}
|
|
4391
|
+
OriginalErrorPrototype.constructor = WrappedError;
|
|
4392
|
+
} catch (error) { /* empty */ }
|
|
4393
|
+
|
|
4394
|
+
return WrappedError;
|
|
4395
|
+
};
|
|
4396
|
+
|
|
4397
|
+
/* eslint-disable no-unused-vars -- required for functions `.length` */
|
|
4398
|
+
var $$2 = _export;
|
|
4399
|
+
var globalThis$1 = globalThis_1;
|
|
4400
|
+
var apply = functionApply;
|
|
4401
|
+
var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
|
|
4402
|
+
|
|
4403
|
+
var WEB_ASSEMBLY = 'WebAssembly';
|
|
4404
|
+
var WebAssembly = globalThis$1[WEB_ASSEMBLY];
|
|
4405
|
+
|
|
4406
|
+
// eslint-disable-next-line es/no-error-cause -- feature detection
|
|
4407
|
+
var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
|
|
4408
|
+
|
|
4409
|
+
var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4410
|
+
var O = {};
|
|
4411
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
|
|
4412
|
+
$$2({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
|
|
4413
|
+
};
|
|
4414
|
+
|
|
4415
|
+
var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
|
|
4416
|
+
if (WebAssembly && WebAssembly[ERROR_NAME]) {
|
|
4417
|
+
var O = {};
|
|
4418
|
+
O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
|
|
4419
|
+
$$2({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
|
|
4420
|
+
}
|
|
4421
|
+
};
|
|
4422
|
+
|
|
4423
|
+
// https://tc39.es/ecma262/#sec-nativeerror
|
|
4424
|
+
exportGlobalErrorCauseWrapper('Error', function (init) {
|
|
4425
|
+
return function Error(message) { return apply(init, this, arguments); };
|
|
4426
|
+
});
|
|
4427
|
+
exportGlobalErrorCauseWrapper('EvalError', function (init) {
|
|
4428
|
+
return function EvalError(message) { return apply(init, this, arguments); };
|
|
4429
|
+
});
|
|
4430
|
+
exportGlobalErrorCauseWrapper('RangeError', function (init) {
|
|
4431
|
+
return function RangeError(message) { return apply(init, this, arguments); };
|
|
4432
|
+
});
|
|
4433
|
+
exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
|
|
4434
|
+
return function ReferenceError(message) { return apply(init, this, arguments); };
|
|
4435
|
+
});
|
|
4436
|
+
exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
|
|
4437
|
+
return function SyntaxError(message) { return apply(init, this, arguments); };
|
|
4438
|
+
});
|
|
4439
|
+
exportGlobalErrorCauseWrapper('TypeError', function (init) {
|
|
4440
|
+
return function TypeError(message) { return apply(init, this, arguments); };
|
|
4441
|
+
});
|
|
4442
|
+
exportGlobalErrorCauseWrapper('URIError', function (init) {
|
|
4443
|
+
return function URIError(message) { return apply(init, this, arguments); };
|
|
4444
|
+
});
|
|
4445
|
+
exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
|
|
4446
|
+
return function CompileError(message) { return apply(init, this, arguments); };
|
|
4447
|
+
});
|
|
4448
|
+
exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
|
|
4449
|
+
return function LinkError(message) { return apply(init, this, arguments); };
|
|
4450
|
+
});
|
|
4451
|
+
exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
|
|
4452
|
+
return function RuntimeError(message) { return apply(init, this, arguments); };
|
|
4453
|
+
});
|
|
4454
|
+
|
|
4455
|
+
var classof = classofRaw$2;
|
|
4456
|
+
|
|
4457
|
+
// `IsArray` abstract operation
|
|
4458
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
4459
|
+
// eslint-disable-next-line es/no-array-isarray -- safe
|
|
4460
|
+
var isArray$1 = Array.isArray || function isArray(argument) {
|
|
4461
|
+
return classof(argument) === 'Array';
|
|
4462
|
+
};
|
|
4463
|
+
|
|
4464
|
+
var DESCRIPTORS = descriptors;
|
|
4465
|
+
var isArray = isArray$1;
|
|
4466
|
+
|
|
4467
|
+
var $TypeError$1 = TypeError;
|
|
4468
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
4469
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
4470
|
+
|
|
4471
|
+
// Safari < 13 does not throw an error in this case
|
|
4472
|
+
var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
|
|
4473
|
+
// makes no sense without proper strict mode support
|
|
4474
|
+
if (this !== undefined) return true;
|
|
4475
|
+
try {
|
|
4476
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
4477
|
+
Object.defineProperty([], 'length', { writable: false }).length = 1;
|
|
4478
|
+
} catch (error) {
|
|
4479
|
+
return error instanceof TypeError;
|
|
4480
|
+
}
|
|
4481
|
+
}();
|
|
4482
|
+
|
|
4483
|
+
var arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
|
|
4484
|
+
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
|
|
4485
|
+
throw new $TypeError$1('Cannot set read only .length');
|
|
4486
|
+
} return O.length = length;
|
|
4487
|
+
} : function (O, length) {
|
|
4488
|
+
return O.length = length;
|
|
4489
|
+
};
|
|
4490
|
+
|
|
4491
|
+
var $TypeError = TypeError;
|
|
4492
|
+
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
|
|
4493
|
+
|
|
4494
|
+
var doesNotExceedSafeInteger$1 = function (it) {
|
|
4495
|
+
if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
|
|
4496
|
+
return it;
|
|
4497
|
+
};
|
|
4498
|
+
|
|
4499
|
+
var $$1 = _export;
|
|
4500
|
+
var toObject = toObject$5;
|
|
4501
|
+
var lengthOfArrayLike = lengthOfArrayLike$4;
|
|
4502
|
+
var setArrayLength = arraySetLength;
|
|
4503
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
|
|
4504
|
+
var fails = fails$i;
|
|
4505
|
+
|
|
4506
|
+
var INCORRECT_TO_LENGTH = fails(function () {
|
|
4507
|
+
return [].push.call({ length: 0x100000000 }, 1) !== 4294967297;
|
|
4508
|
+
});
|
|
4509
|
+
|
|
4510
|
+
// V8 <= 121 and Safari <= 15.4; FF < 23 throws InternalError
|
|
4511
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=12681
|
|
4512
|
+
var properErrorOnNonWritableLength = function () {
|
|
4513
|
+
try {
|
|
4514
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
4515
|
+
Object.defineProperty([], 'length', { writable: false }).push();
|
|
4516
|
+
} catch (error) {
|
|
4517
|
+
return error instanceof TypeError;
|
|
4518
|
+
}
|
|
4519
|
+
};
|
|
4520
|
+
|
|
4521
|
+
var FORCED = INCORRECT_TO_LENGTH || !properErrorOnNonWritableLength();
|
|
4522
|
+
|
|
4523
|
+
// `Array.prototype.push` method
|
|
4524
|
+
// https://tc39.es/ecma262/#sec-array.prototype.push
|
|
4525
|
+
$$1({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
|
|
4526
|
+
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4527
|
+
push: function push(item) {
|
|
4528
|
+
var O = toObject(this);
|
|
4529
|
+
var len = lengthOfArrayLike(O);
|
|
4530
|
+
var argCount = arguments.length;
|
|
4531
|
+
doesNotExceedSafeInteger(len + argCount);
|
|
4532
|
+
for (var i = 0; i < argCount; i++) {
|
|
4533
|
+
O[len] = arguments[i];
|
|
4534
|
+
len++;
|
|
4535
|
+
}
|
|
4536
|
+
setArrayLength(O, len);
|
|
4537
|
+
return len;
|
|
4538
|
+
}
|
|
4539
|
+
});
|
|
4540
|
+
|
|
4541
|
+
var $ = _export;
|
|
4542
|
+
var iterate = iterate$5;
|
|
4543
|
+
var aCallable = aCallable$d;
|
|
4544
|
+
var anObject = anObject$f;
|
|
4545
|
+
var getIteratorDirect = getIteratorDirect$4;
|
|
4546
|
+
|
|
4547
|
+
// `Iterator.prototype.forEach` method
|
|
4548
|
+
// https://tc39.es/ecma262/#sec-iterator.prototype.foreach
|
|
4549
|
+
$({ target: 'Iterator', proto: true, real: true }, {
|
|
4550
|
+
forEach: function forEach(fn) {
|
|
4551
|
+
anObject(this);
|
|
4552
|
+
aCallable(fn);
|
|
4553
|
+
var record = getIteratorDirect(this);
|
|
4554
|
+
var counter = 0;
|
|
4555
|
+
iterate(record, function (value) {
|
|
4556
|
+
fn(value, counter++);
|
|
4557
|
+
}, { IS_RECORD: true });
|
|
4558
|
+
}
|
|
4559
|
+
});
|
|
4560
|
+
|
|
4561
|
+
const encoders = {};
|
|
4562
|
+
function encode(request, mediaType, schema) {
|
|
4563
|
+
if (encoders[mediaType]) {
|
|
4564
|
+
return encoders[mediaType](request, mediaType, schema);
|
|
4565
|
+
}
|
|
4566
|
+
return request;
|
|
4567
|
+
}
|
|
4568
|
+
encoders['application/json'] = async (request, mediaType, schema) => {
|
|
4569
|
+
return request;
|
|
4570
|
+
};
|
|
4571
|
+
function appendFormData(formData, data, parentKey) {
|
|
4572
|
+
if (data instanceof Blob || typeof data === 'string') {
|
|
4573
|
+
formData.append(parentKey, data);
|
|
4574
|
+
} else if (data !== null && typeof data === 'object') {
|
|
4575
|
+
if (Array.isArray(data)) {
|
|
4576
|
+
data.forEach((item, index) => {
|
|
4577
|
+
const key = `${parentKey}`;
|
|
4578
|
+
appendFormData(formData, item, key);
|
|
4579
|
+
});
|
|
4580
|
+
} else {
|
|
4581
|
+
Object.keys(data).forEach(key => {
|
|
4582
|
+
const newKey = parentKey ? `${parentKey}[${key}]` : key;
|
|
4583
|
+
appendFormData(formData, data[key], newKey);
|
|
4584
|
+
});
|
|
4585
|
+
}
|
|
4586
|
+
} else {
|
|
4587
|
+
formData.append(parentKey, data == null ? '' : String(data));
|
|
4588
|
+
}
|
|
4589
|
+
}
|
|
4590
|
+
encoders['multipart/form-data'] = async (request, mediaType, schema) => {
|
|
4591
|
+
let _request = request;
|
|
4592
|
+
let formData = new FormData();
|
|
4593
|
+
Object.keys(_request).forEach(key => {
|
|
4594
|
+
appendFormData(formData, _request[key], key);
|
|
4595
|
+
});
|
|
4596
|
+
return formData;
|
|
4597
|
+
};
|
|
4598
|
+
encoders['application/octet-stream'] = async (request, mediaType, schema) => {
|
|
4599
|
+
return request;
|
|
4600
|
+
};
|
|
4601
|
+
encoders['application/x-www-form-urlencoded'] = async (request, mediaType, schema) => {
|
|
4602
|
+
let formData = new FormData();
|
|
4603
|
+
for (let key in request) {
|
|
4604
|
+
const value = request[key];
|
|
4605
|
+
formData.append(key, value instanceof Blob || typeof value === 'string' ? value : String(value));
|
|
4606
|
+
}
|
|
4607
|
+
return formData;
|
|
4608
|
+
};
|
|
4609
|
+
const transformers = {};
|
|
4610
|
+
function transform(request, mediaType, schema) {
|
|
4611
|
+
if (transformers[mediaType]) {
|
|
4612
|
+
return transformers[mediaType](request, mediaType, schema);
|
|
4613
|
+
}
|
|
4614
|
+
throw new Error(`Unsupported media type: ` + mediaType);
|
|
4615
|
+
}
|
|
4616
|
+
transformers['application/json'] = async (request, mediaType, schema) => {
|
|
4617
|
+
return schema.parse(await request.json());
|
|
4618
|
+
};
|
|
4619
|
+
transformers['multipart/form-data'] = async (request, mediaType, schema) => {
|
|
4620
|
+
let formData = await request.formData();
|
|
4621
|
+
let content = {};
|
|
4622
|
+
formData.forEach((value, key) => {
|
|
4623
|
+
if (content[key]) {
|
|
4624
|
+
if (!(content[key] instanceof Array)) {
|
|
4625
|
+
content[key] = [content[key]];
|
|
4626
|
+
}
|
|
4627
|
+
content[key].push(value);
|
|
4628
|
+
} else {
|
|
4629
|
+
content[key] = value;
|
|
4630
|
+
}
|
|
4631
|
+
});
|
|
4632
|
+
return schema.parse(content);
|
|
4633
|
+
};
|
|
4634
|
+
transformers['application/octet-stream'] = async (request, mediaType, schema) => {
|
|
4635
|
+
return schema.parse(new Blob([await request.arrayBuffer()], {
|
|
4636
|
+
type: 'application/octet-stream'
|
|
4637
|
+
}));
|
|
4638
|
+
};
|
|
4639
|
+
transformers['application/x-www-form-urlencoded'] = async (request, mediaType, schema) => {
|
|
4640
|
+
let formData = await request.formData();
|
|
4641
|
+
let content = {};
|
|
4642
|
+
formData.forEach((value, key) => content[key] = value);
|
|
4643
|
+
return schema.parse(content);
|
|
4644
|
+
};
|
|
4645
|
+
transformers['application/xml'] = async (request, mediaType, schema) => {
|
|
4646
|
+
let xmlParser = new XMLParser();
|
|
4647
|
+
let content = await xmlParser.parse(await request.text());
|
|
4648
|
+
return schema.parse(await content);
|
|
4649
|
+
};
|
|
4650
|
+
transformers['text/plain'] = async (request, mediaType, schema) => {
|
|
4651
|
+
return schema.parse(await request.text());
|
|
4652
|
+
};
|
|
4653
|
+
transformers['text/html'] = async (request, mediaType, schema) => {
|
|
4654
|
+
return schema.parse(await request.text());
|
|
4655
|
+
};
|
|
4656
|
+
transformers['text/css'] = async (request, mediaType, schema) => {
|
|
4657
|
+
return schema.parse(await request.text());
|
|
4658
|
+
};
|
|
4659
|
+
transformers['text/javascript'] = async (request, mediaType, schema) => {
|
|
4660
|
+
return schema.parse(await request.text());
|
|
4661
|
+
};
|
|
4662
|
+
const responseTransformers = {};
|
|
4663
|
+
responseTransformers['application/json'] = async (data, mediaType, schema) => {
|
|
4664
|
+
return schema.parse(data);
|
|
4665
|
+
};
|
|
4666
|
+
responseTransformers['application/xml'] = async (data, mediaType, schema) => {
|
|
4667
|
+
let parsed = new XMLParser().parse(data);
|
|
4668
|
+
return schema.parse(parsed);
|
|
4669
|
+
};
|
|
4670
|
+
async function transformResponse(data, mediaType, schema) {
|
|
4671
|
+
if (responseTransformers[mediaType]) {
|
|
4672
|
+
return await responseTransformers[mediaType](data, mediaType, schema);
|
|
4673
|
+
}
|
|
4674
|
+
return data;
|
|
4675
|
+
}
|
|
4676
|
+
|
|
4677
|
+
export { IntrigProvider, IntrigProviderStub, StatusTrap, encode, error, init, isError, isInit, isNetworkError, isPending, isRequestValidationError, isResponseValidationError, isSuccess, isSuccessfulDispatch, isValidationError, networkError, pending, requestValidationError, responseValidationError, success, successfulDispatch, transform, transformResponse, useAsNetworkState, useAsPromise, useCentralError, useCentralPendingState, useNetworkState, useResolvedCachedValue, useResolvedValue, validationError };
|