@ninetailed/experience.js 3.0.1-beta.4 → 3.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +4343 -0
- package/{index.esm.js → index.js} +1605 -1564
- package/lib/Ninetailed.d.ts +14 -60
- package/lib/analytics/constants.d.ts +2 -0
- package/lib/analytics/get-analytics-plugin.d.ts +8 -12
- package/lib/analytics/index.d.ts +1 -0
- package/lib/experience/isExperienceMatch.d.ts +3 -3
- package/lib/experience/selectActiveExperiments.d.ts +2 -2
- package/lib/experience/selectBaselineWithVariants.d.ts +2 -2
- package/lib/experience/selectDistribution.d.ts +4 -4
- package/lib/experience/selectEligibleExperiences.d.ts +5 -5
- package/lib/experience/selectExperience.d.ts +5 -5
- package/lib/experience/selectHasVariants.d.ts +2 -2
- package/lib/experience/selectVariant.d.ts +4 -4
- package/lib/experience/selectVariants.d.ts +2 -2
- package/lib/experience/types/Baseline.d.ts +2 -3
- package/lib/experience/types/BaselineWithVariants.d.ts +5 -4
- package/lib/experience/types/ExperienceConfiguration.d.ts +3 -2
- package/lib/experience/types/Reference.d.ts +3 -0
- package/lib/experience/types/VariantRef.d.ts +4 -0
- package/lib/experience/types/index.d.ts +2 -1
- package/lib/experience/utils.d.ts +2 -2
- package/lib/types.d.ts +37 -1
- package/package.json +10 -13
- package/index.umd.js +0 -4253
- package/lib/experience/types/Variant.d.ts +0 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import unionBy from 'lodash/unionBy';
|
|
2
|
-
import {
|
|
2
|
+
import { logger, ConsoleLogSink, buildPageEvent, buildTrackEvent, buildIdentifyEvent, NinetailedApiClient, OnLogLogSink, OnErrorLogSink, PageviewProperties, Properties, Traits } from '@ninetailed/experience.js-shared';
|
|
3
3
|
import Analytics from 'analytics';
|
|
4
|
+
import { HAS_SEEN_EXPERIENCE, HAS_SEEN_COMPONENT } from '@ninetailed/experience.js-plugin-analytics';
|
|
4
5
|
import flatten from 'lodash/flatten';
|
|
5
6
|
import find from 'lodash/find';
|
|
6
7
|
import includes from 'lodash/includes';
|
|
@@ -14,7 +15,7 @@ var check = function (it) {
|
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
17
|
-
var global$
|
|
18
|
+
var global$n =
|
|
18
19
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
19
20
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
20
21
|
check(typeof window == 'object' && window) ||
|
|
@@ -26,7 +27,7 @@ var global$K =
|
|
|
26
27
|
|
|
27
28
|
var objectGetOwnPropertyDescriptor = {};
|
|
28
29
|
|
|
29
|
-
var fails$
|
|
30
|
+
var fails$m = function (exec) {
|
|
30
31
|
try {
|
|
31
32
|
return !!exec();
|
|
32
33
|
} catch (error) {
|
|
@@ -34,17 +35,18 @@ var fails$k = function (exec) {
|
|
|
34
35
|
}
|
|
35
36
|
};
|
|
36
37
|
|
|
37
|
-
var fails$
|
|
38
|
+
var fails$l = fails$m;
|
|
38
39
|
|
|
39
40
|
// Detect IE8's incomplete defineProperty implementation
|
|
40
|
-
var descriptors = !fails$
|
|
41
|
+
var descriptors = !fails$l(function () {
|
|
41
42
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
42
43
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
43
44
|
});
|
|
44
45
|
|
|
45
|
-
var fails$
|
|
46
|
+
var fails$k = fails$m;
|
|
46
47
|
|
|
47
|
-
var functionBindNative = !fails$
|
|
48
|
+
var functionBindNative = !fails$k(function () {
|
|
49
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
48
50
|
var test = (function () { /* empty */ }).bind();
|
|
49
51
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
50
52
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -52,10 +54,10 @@ var functionBindNative = !fails$i(function () {
|
|
|
52
54
|
|
|
53
55
|
var NATIVE_BIND$3 = functionBindNative;
|
|
54
56
|
|
|
55
|
-
var call$
|
|
57
|
+
var call$i = Function.prototype.call;
|
|
56
58
|
|
|
57
|
-
var functionCall = NATIVE_BIND$3 ? call$
|
|
58
|
-
return call$
|
|
59
|
+
var functionCall = NATIVE_BIND$3 ? call$i.bind(call$i) : function () {
|
|
60
|
+
return call$i.apply(call$i, arguments);
|
|
59
61
|
};
|
|
60
62
|
|
|
61
63
|
var objectPropertyIsEnumerable = {};
|
|
@@ -74,7 +76,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
|
74
76
|
return !!descriptor && descriptor.enumerable;
|
|
75
77
|
} : $propertyIsEnumerable;
|
|
76
78
|
|
|
77
|
-
var createPropertyDescriptor$
|
|
79
|
+
var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
78
80
|
return {
|
|
79
81
|
enumerable: !(bitmap & 1),
|
|
80
82
|
configurable: !(bitmap & 2),
|
|
@@ -86,100 +88,123 @@ var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
|
86
88
|
var NATIVE_BIND$2 = functionBindNative;
|
|
87
89
|
|
|
88
90
|
var FunctionPrototype$2 = Function.prototype;
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
} : function (fn) {
|
|
96
|
-
return fn && function () {
|
|
97
|
-
return call$e.apply(fn, arguments);
|
|
91
|
+
var call$h = FunctionPrototype$2.call;
|
|
92
|
+
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$h, call$h);
|
|
93
|
+
|
|
94
|
+
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
95
|
+
return function () {
|
|
96
|
+
return call$h.apply(fn, arguments);
|
|
98
97
|
};
|
|
99
98
|
};
|
|
100
99
|
|
|
101
|
-
var uncurryThis$
|
|
100
|
+
var uncurryThis$m = functionUncurryThis;
|
|
102
101
|
|
|
103
|
-
var toString$
|
|
104
|
-
var stringSlice$
|
|
102
|
+
var toString$9 = uncurryThis$m({}.toString);
|
|
103
|
+
var stringSlice$5 = uncurryThis$m(''.slice);
|
|
105
104
|
|
|
106
|
-
var classofRaw$
|
|
107
|
-
return stringSlice$
|
|
105
|
+
var classofRaw$2 = function (it) {
|
|
106
|
+
return stringSlice$5(toString$9(it), 8, -1);
|
|
108
107
|
};
|
|
109
108
|
|
|
110
|
-
var
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
var classof$7 = classofRaw$1;
|
|
109
|
+
var uncurryThis$l = functionUncurryThis;
|
|
110
|
+
var fails$j = fails$m;
|
|
111
|
+
var classof$7 = classofRaw$2;
|
|
114
112
|
|
|
115
|
-
var Object$
|
|
116
|
-
var split = uncurryThis$
|
|
113
|
+
var $Object$4 = Object;
|
|
114
|
+
var split = uncurryThis$l(''.split);
|
|
117
115
|
|
|
118
116
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
119
|
-
var indexedObject = fails$
|
|
117
|
+
var indexedObject = fails$j(function () {
|
|
120
118
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
121
119
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
122
|
-
return
|
|
120
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
123
121
|
}) ? function (it) {
|
|
124
|
-
return classof$7(it) == 'String' ? split(it, '') : Object$
|
|
125
|
-
} : Object$
|
|
122
|
+
return classof$7(it) == 'String' ? split(it, '') : $Object$4(it);
|
|
123
|
+
} : $Object$4;
|
|
124
|
+
|
|
125
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
126
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
127
|
+
var isNullOrUndefined$5 = function (it) {
|
|
128
|
+
return it === null || it === undefined;
|
|
129
|
+
};
|
|
126
130
|
|
|
127
|
-
var
|
|
131
|
+
var isNullOrUndefined$4 = isNullOrUndefined$5;
|
|
128
132
|
|
|
129
|
-
var TypeError$
|
|
133
|
+
var $TypeError$f = TypeError;
|
|
130
134
|
|
|
131
135
|
// `RequireObjectCoercible` abstract operation
|
|
132
136
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
133
|
-
var requireObjectCoercible$
|
|
134
|
-
if (it
|
|
137
|
+
var requireObjectCoercible$7 = function (it) {
|
|
138
|
+
if (isNullOrUndefined$4(it)) throw $TypeError$f("Can't call method on " + it);
|
|
135
139
|
return it;
|
|
136
140
|
};
|
|
137
141
|
|
|
138
142
|
// toObject with fallback for non-array-like ES3 strings
|
|
139
143
|
var IndexedObject$2 = indexedObject;
|
|
140
|
-
var requireObjectCoercible$
|
|
144
|
+
var requireObjectCoercible$6 = requireObjectCoercible$7;
|
|
141
145
|
|
|
142
146
|
var toIndexedObject$5 = function (it) {
|
|
143
|
-
return IndexedObject$2(requireObjectCoercible$
|
|
147
|
+
return IndexedObject$2(requireObjectCoercible$6(it));
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
var documentAll$2 = typeof document == 'object' && document.all;
|
|
151
|
+
|
|
152
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
153
|
+
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
154
|
+
|
|
155
|
+
var documentAll_1 = {
|
|
156
|
+
all: documentAll$2,
|
|
157
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
144
158
|
};
|
|
145
159
|
|
|
160
|
+
var $documentAll$1 = documentAll_1;
|
|
161
|
+
|
|
162
|
+
var documentAll$1 = $documentAll$1.all;
|
|
163
|
+
|
|
146
164
|
// `IsCallable` abstract operation
|
|
147
165
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
148
|
-
var isCallable$
|
|
166
|
+
var isCallable$m = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
167
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
168
|
+
} : function (argument) {
|
|
149
169
|
return typeof argument == 'function';
|
|
150
170
|
};
|
|
151
171
|
|
|
152
|
-
var isCallable$
|
|
172
|
+
var isCallable$l = isCallable$m;
|
|
173
|
+
var $documentAll = documentAll_1;
|
|
174
|
+
|
|
175
|
+
var documentAll = $documentAll.all;
|
|
153
176
|
|
|
154
|
-
var isObject$
|
|
155
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
177
|
+
var isObject$9 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
178
|
+
return typeof it == 'object' ? it !== null : isCallable$l(it) || it === documentAll;
|
|
179
|
+
} : function (it) {
|
|
180
|
+
return typeof it == 'object' ? it !== null : isCallable$l(it);
|
|
156
181
|
};
|
|
157
182
|
|
|
158
|
-
var global$
|
|
159
|
-
var isCallable$
|
|
183
|
+
var global$m = global$n;
|
|
184
|
+
var isCallable$k = isCallable$m;
|
|
160
185
|
|
|
161
186
|
var aFunction = function (argument) {
|
|
162
|
-
return isCallable$
|
|
187
|
+
return isCallable$k(argument) ? argument : undefined;
|
|
163
188
|
};
|
|
164
189
|
|
|
165
|
-
var getBuiltIn$
|
|
166
|
-
return arguments.length < 2 ? aFunction(global$
|
|
190
|
+
var getBuiltIn$8 = function (namespace, method) {
|
|
191
|
+
return arguments.length < 2 ? aFunction(global$m[namespace]) : global$m[namespace] && global$m[namespace][method];
|
|
167
192
|
};
|
|
168
193
|
|
|
169
|
-
var uncurryThis$
|
|
194
|
+
var uncurryThis$k = functionUncurryThis;
|
|
170
195
|
|
|
171
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
196
|
+
var objectIsPrototypeOf = uncurryThis$k({}.isPrototypeOf);
|
|
172
197
|
|
|
173
|
-
var getBuiltIn$
|
|
198
|
+
var getBuiltIn$7 = getBuiltIn$8;
|
|
174
199
|
|
|
175
|
-
var engineUserAgent = getBuiltIn$
|
|
200
|
+
var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
|
|
176
201
|
|
|
177
|
-
var global$
|
|
202
|
+
var global$l = global$n;
|
|
178
203
|
var userAgent$3 = engineUserAgent;
|
|
179
204
|
|
|
180
|
-
var process$3 = global$
|
|
181
|
-
var Deno = global$
|
|
182
|
-
var versions = process$3 && process$3.versions || Deno && Deno.version;
|
|
205
|
+
var process$3 = global$l.process;
|
|
206
|
+
var Deno$1 = global$l.Deno;
|
|
207
|
+
var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
|
|
183
208
|
var v8 = versions && versions.v8;
|
|
184
209
|
var match, version;
|
|
185
210
|
|
|
@@ -205,10 +230,10 @@ var engineV8Version = version;
|
|
|
205
230
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
206
231
|
|
|
207
232
|
var V8_VERSION$1 = engineV8Version;
|
|
208
|
-
var fails$
|
|
233
|
+
var fails$i = fails$m;
|
|
209
234
|
|
|
210
235
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
211
|
-
var
|
|
236
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$i(function () {
|
|
212
237
|
var symbol = Symbol();
|
|
213
238
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
214
239
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -219,97 +244,93 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$g(function () {
|
|
|
219
244
|
|
|
220
245
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
221
246
|
|
|
222
|
-
var NATIVE_SYMBOL$1 =
|
|
247
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
223
248
|
|
|
224
249
|
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
225
250
|
&& !Symbol.sham
|
|
226
251
|
&& typeof Symbol.iterator == 'symbol';
|
|
227
252
|
|
|
228
|
-
var
|
|
229
|
-
var
|
|
230
|
-
var
|
|
231
|
-
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
253
|
+
var getBuiltIn$6 = getBuiltIn$8;
|
|
254
|
+
var isCallable$j = isCallable$m;
|
|
255
|
+
var isPrototypeOf$3 = objectIsPrototypeOf;
|
|
232
256
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
233
257
|
|
|
234
|
-
var Object$
|
|
258
|
+
var $Object$3 = Object;
|
|
235
259
|
|
|
236
260
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
237
261
|
return typeof it == 'symbol';
|
|
238
262
|
} : function (it) {
|
|
239
|
-
var $Symbol = getBuiltIn$
|
|
240
|
-
return isCallable$
|
|
263
|
+
var $Symbol = getBuiltIn$6('Symbol');
|
|
264
|
+
return isCallable$j($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
|
|
241
265
|
};
|
|
242
266
|
|
|
243
|
-
var
|
|
244
|
-
|
|
245
|
-
var String$5 = global$E.String;
|
|
267
|
+
var $String$3 = String;
|
|
246
268
|
|
|
247
269
|
var tryToString$4 = function (argument) {
|
|
248
270
|
try {
|
|
249
|
-
return String$
|
|
271
|
+
return $String$3(argument);
|
|
250
272
|
} catch (error) {
|
|
251
273
|
return 'Object';
|
|
252
274
|
}
|
|
253
275
|
};
|
|
254
276
|
|
|
255
|
-
var
|
|
256
|
-
var isCallable$f = isCallable$j;
|
|
277
|
+
var isCallable$i = isCallable$m;
|
|
257
278
|
var tryToString$3 = tryToString$4;
|
|
258
279
|
|
|
259
|
-
var TypeError$
|
|
280
|
+
var $TypeError$e = TypeError;
|
|
260
281
|
|
|
261
282
|
// `Assert: IsCallable(argument) is true`
|
|
262
|
-
var aCallable$
|
|
263
|
-
if (isCallable$
|
|
264
|
-
throw TypeError$
|
|
283
|
+
var aCallable$8 = function (argument) {
|
|
284
|
+
if (isCallable$i(argument)) return argument;
|
|
285
|
+
throw $TypeError$e(tryToString$3(argument) + ' is not a function');
|
|
265
286
|
};
|
|
266
287
|
|
|
267
|
-
var aCallable$
|
|
288
|
+
var aCallable$7 = aCallable$8;
|
|
289
|
+
var isNullOrUndefined$3 = isNullOrUndefined$5;
|
|
268
290
|
|
|
269
291
|
// `GetMethod` abstract operation
|
|
270
292
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
271
|
-
var getMethod$
|
|
293
|
+
var getMethod$4 = function (V, P) {
|
|
272
294
|
var func = V[P];
|
|
273
|
-
return func
|
|
295
|
+
return isNullOrUndefined$3(func) ? undefined : aCallable$7(func);
|
|
274
296
|
};
|
|
275
297
|
|
|
276
|
-
var
|
|
277
|
-
var
|
|
278
|
-
var
|
|
279
|
-
var isObject$7 = isObject$8;
|
|
298
|
+
var call$g = functionCall;
|
|
299
|
+
var isCallable$h = isCallable$m;
|
|
300
|
+
var isObject$8 = isObject$9;
|
|
280
301
|
|
|
281
|
-
var TypeError$
|
|
302
|
+
var $TypeError$d = TypeError;
|
|
282
303
|
|
|
283
304
|
// `OrdinaryToPrimitive` abstract operation
|
|
284
305
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
285
306
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
286
307
|
var fn, val;
|
|
287
|
-
if (pref === 'string' && isCallable$
|
|
288
|
-
if (isCallable$
|
|
289
|
-
if (pref !== 'string' && isCallable$
|
|
290
|
-
throw TypeError$
|
|
308
|
+
if (pref === 'string' && isCallable$h(fn = input.toString) && !isObject$8(val = call$g(fn, input))) return val;
|
|
309
|
+
if (isCallable$h(fn = input.valueOf) && !isObject$8(val = call$g(fn, input))) return val;
|
|
310
|
+
if (pref !== 'string' && isCallable$h(fn = input.toString) && !isObject$8(val = call$g(fn, input))) return val;
|
|
311
|
+
throw $TypeError$d("Can't convert object to primitive value");
|
|
291
312
|
};
|
|
292
313
|
|
|
293
314
|
var shared$4 = {exports: {}};
|
|
294
315
|
|
|
295
|
-
var global$
|
|
316
|
+
var global$k = global$n;
|
|
296
317
|
|
|
297
318
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
298
|
-
var defineProperty$
|
|
319
|
+
var defineProperty$5 = Object.defineProperty;
|
|
299
320
|
|
|
300
|
-
var
|
|
321
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
301
322
|
try {
|
|
302
|
-
defineProperty$
|
|
323
|
+
defineProperty$5(global$k, key, { value: value, configurable: true, writable: true });
|
|
303
324
|
} catch (error) {
|
|
304
|
-
global$
|
|
325
|
+
global$k[key] = value;
|
|
305
326
|
} return value;
|
|
306
327
|
};
|
|
307
328
|
|
|
308
|
-
var global$
|
|
309
|
-
var
|
|
329
|
+
var global$j = global$n;
|
|
330
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
310
331
|
|
|
311
332
|
var SHARED = '__core-js_shared__';
|
|
312
|
-
var store$3 = global$
|
|
333
|
+
var store$3 = global$j[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
313
334
|
|
|
314
335
|
var sharedStore = store$3;
|
|
315
336
|
|
|
@@ -318,61 +339,61 @@ var store$2 = sharedStore;
|
|
|
318
339
|
(shared$4.exports = function (key, value) {
|
|
319
340
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
320
341
|
})('versions', []).push({
|
|
321
|
-
version: '3.
|
|
342
|
+
version: '3.26.1',
|
|
322
343
|
mode: 'global',
|
|
323
344
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
324
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
345
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
|
|
325
346
|
source: 'https://github.com/zloirock/core-js'
|
|
326
347
|
});
|
|
327
348
|
|
|
328
|
-
var
|
|
329
|
-
var requireObjectCoercible$6 = requireObjectCoercible$8;
|
|
349
|
+
var requireObjectCoercible$5 = requireObjectCoercible$7;
|
|
330
350
|
|
|
331
|
-
var Object$
|
|
351
|
+
var $Object$2 = Object;
|
|
332
352
|
|
|
333
353
|
// `ToObject` abstract operation
|
|
334
354
|
// https://tc39.es/ecma262/#sec-toobject
|
|
335
355
|
var toObject$5 = function (argument) {
|
|
336
|
-
return Object$
|
|
356
|
+
return $Object$2(requireObjectCoercible$5(argument));
|
|
337
357
|
};
|
|
338
358
|
|
|
339
|
-
var uncurryThis$
|
|
359
|
+
var uncurryThis$j = functionUncurryThis;
|
|
340
360
|
var toObject$4 = toObject$5;
|
|
341
361
|
|
|
342
|
-
var hasOwnProperty = uncurryThis$
|
|
362
|
+
var hasOwnProperty = uncurryThis$j({}.hasOwnProperty);
|
|
343
363
|
|
|
344
364
|
// `HasOwnProperty` abstract operation
|
|
345
365
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
366
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
346
367
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
347
368
|
return hasOwnProperty(toObject$4(it), key);
|
|
348
369
|
};
|
|
349
370
|
|
|
350
|
-
var uncurryThis$
|
|
371
|
+
var uncurryThis$i = functionUncurryThis;
|
|
351
372
|
|
|
352
373
|
var id = 0;
|
|
353
374
|
var postfix = Math.random();
|
|
354
|
-
var toString$
|
|
375
|
+
var toString$8 = uncurryThis$i(1.0.toString);
|
|
355
376
|
|
|
356
377
|
var uid$2 = function (key) {
|
|
357
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
378
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$8(++id + postfix, 36);
|
|
358
379
|
};
|
|
359
380
|
|
|
360
|
-
var global$
|
|
381
|
+
var global$i = global$n;
|
|
361
382
|
var shared$3 = shared$4.exports;
|
|
362
|
-
var hasOwn$
|
|
383
|
+
var hasOwn$a = hasOwnProperty_1;
|
|
363
384
|
var uid$1 = uid$2;
|
|
364
|
-
var NATIVE_SYMBOL =
|
|
385
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
365
386
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
366
387
|
|
|
367
388
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
368
|
-
var Symbol$2 = global$
|
|
389
|
+
var Symbol$2 = global$i.Symbol;
|
|
369
390
|
var symbolFor = Symbol$2 && Symbol$2['for'];
|
|
370
391
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
|
|
371
392
|
|
|
372
393
|
var wellKnownSymbol$i = function (name) {
|
|
373
|
-
if (!hasOwn$
|
|
394
|
+
if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
374
395
|
var description = 'Symbol.' + name;
|
|
375
|
-
if (NATIVE_SYMBOL && hasOwn$
|
|
396
|
+
if (NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)) {
|
|
376
397
|
WellKnownSymbolsStore[name] = Symbol$2[name];
|
|
377
398
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
378
399
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -382,28 +403,27 @@ var wellKnownSymbol$i = function (name) {
|
|
|
382
403
|
} return WellKnownSymbolsStore[name];
|
|
383
404
|
};
|
|
384
405
|
|
|
385
|
-
var
|
|
386
|
-
var
|
|
387
|
-
var isObject$6 = isObject$8;
|
|
406
|
+
var call$f = functionCall;
|
|
407
|
+
var isObject$7 = isObject$9;
|
|
388
408
|
var isSymbol$1 = isSymbol$2;
|
|
389
|
-
var getMethod$
|
|
409
|
+
var getMethod$3 = getMethod$4;
|
|
390
410
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
391
411
|
var wellKnownSymbol$h = wellKnownSymbol$i;
|
|
392
412
|
|
|
393
|
-
var TypeError$
|
|
413
|
+
var $TypeError$c = TypeError;
|
|
394
414
|
var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
|
|
395
415
|
|
|
396
416
|
// `ToPrimitive` abstract operation
|
|
397
417
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
398
418
|
var toPrimitive$1 = function (input, pref) {
|
|
399
|
-
if (!isObject$
|
|
400
|
-
var exoticToPrim = getMethod$
|
|
419
|
+
if (!isObject$7(input) || isSymbol$1(input)) return input;
|
|
420
|
+
var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
|
|
401
421
|
var result;
|
|
402
422
|
if (exoticToPrim) {
|
|
403
423
|
if (pref === undefined) pref = 'default';
|
|
404
|
-
result = call$
|
|
405
|
-
if (!isObject$
|
|
406
|
-
throw TypeError$
|
|
424
|
+
result = call$f(exoticToPrim, input, pref);
|
|
425
|
+
if (!isObject$7(result) || isSymbol$1(result)) return result;
|
|
426
|
+
throw $TypeError$c("Can't convert object to primitive value");
|
|
407
427
|
}
|
|
408
428
|
if (pref === undefined) pref = 'number';
|
|
409
429
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -414,41 +434,41 @@ var isSymbol = isSymbol$2;
|
|
|
414
434
|
|
|
415
435
|
// `ToPropertyKey` abstract operation
|
|
416
436
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
417
|
-
var toPropertyKey$
|
|
437
|
+
var toPropertyKey$2 = function (argument) {
|
|
418
438
|
var key = toPrimitive(argument, 'string');
|
|
419
439
|
return isSymbol(key) ? key : key + '';
|
|
420
440
|
};
|
|
421
441
|
|
|
422
|
-
var global$
|
|
423
|
-
var isObject$
|
|
442
|
+
var global$h = global$n;
|
|
443
|
+
var isObject$6 = isObject$9;
|
|
424
444
|
|
|
425
|
-
var document$3 = global$
|
|
445
|
+
var document$3 = global$h.document;
|
|
426
446
|
// typeof document.createElement is 'object' in old IE
|
|
427
|
-
var EXISTS$1 = isObject$
|
|
447
|
+
var EXISTS$1 = isObject$6(document$3) && isObject$6(document$3.createElement);
|
|
428
448
|
|
|
429
449
|
var documentCreateElement$2 = function (it) {
|
|
430
450
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
431
451
|
};
|
|
432
452
|
|
|
433
|
-
var DESCRIPTORS$
|
|
434
|
-
var fails$
|
|
453
|
+
var DESCRIPTORS$a = descriptors;
|
|
454
|
+
var fails$h = fails$m;
|
|
435
455
|
var createElement$1 = documentCreateElement$2;
|
|
436
456
|
|
|
437
457
|
// Thanks to IE8 for its funny defineProperty
|
|
438
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
458
|
+
var ie8DomDefine = !DESCRIPTORS$a && !fails$h(function () {
|
|
439
459
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
440
460
|
return Object.defineProperty(createElement$1('div'), 'a', {
|
|
441
461
|
get: function () { return 7; }
|
|
442
462
|
}).a != 7;
|
|
443
463
|
});
|
|
444
464
|
|
|
445
|
-
var DESCRIPTORS$
|
|
446
|
-
var call$
|
|
465
|
+
var DESCRIPTORS$9 = descriptors;
|
|
466
|
+
var call$e = functionCall;
|
|
447
467
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
448
|
-
var createPropertyDescriptor$
|
|
468
|
+
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
449
469
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
450
|
-
var toPropertyKey$
|
|
451
|
-
var hasOwn$
|
|
470
|
+
var toPropertyKey$1 = toPropertyKey$2;
|
|
471
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
452
472
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
453
473
|
|
|
454
474
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -456,23 +476,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
456
476
|
|
|
457
477
|
// `Object.getOwnPropertyDescriptor` method
|
|
458
478
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
459
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
479
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
460
480
|
O = toIndexedObject$4(O);
|
|
461
|
-
P = toPropertyKey$
|
|
481
|
+
P = toPropertyKey$1(P);
|
|
462
482
|
if (IE8_DOM_DEFINE$1) try {
|
|
463
483
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
464
484
|
} catch (error) { /* empty */ }
|
|
465
|
-
if (hasOwn$
|
|
485
|
+
if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$e(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
466
486
|
};
|
|
467
487
|
|
|
468
488
|
var objectDefineProperty = {};
|
|
469
489
|
|
|
470
|
-
var DESCRIPTORS$
|
|
471
|
-
var fails$
|
|
490
|
+
var DESCRIPTORS$8 = descriptors;
|
|
491
|
+
var fails$g = fails$m;
|
|
472
492
|
|
|
473
493
|
// V8 ~ Chrome 36-
|
|
474
494
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
475
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
495
|
+
var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$g(function () {
|
|
476
496
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
477
497
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
478
498
|
value: 42,
|
|
@@ -480,26 +500,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$e(function () {
|
|
|
480
500
|
}).prototype != 42;
|
|
481
501
|
});
|
|
482
502
|
|
|
483
|
-
var
|
|
484
|
-
var isObject$4 = isObject$8;
|
|
503
|
+
var isObject$5 = isObject$9;
|
|
485
504
|
|
|
486
|
-
var String$
|
|
487
|
-
var TypeError$
|
|
505
|
+
var $String$2 = String;
|
|
506
|
+
var $TypeError$b = TypeError;
|
|
488
507
|
|
|
489
508
|
// `Assert: Type(argument) is Object`
|
|
490
509
|
var anObject$e = function (argument) {
|
|
491
|
-
if (isObject$
|
|
492
|
-
throw TypeError$
|
|
510
|
+
if (isObject$5(argument)) return argument;
|
|
511
|
+
throw $TypeError$b($String$2(argument) + ' is not an object');
|
|
493
512
|
};
|
|
494
513
|
|
|
495
|
-
var
|
|
496
|
-
var DESCRIPTORS$6 = descriptors;
|
|
514
|
+
var DESCRIPTORS$7 = descriptors;
|
|
497
515
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
498
516
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
499
517
|
var anObject$d = anObject$e;
|
|
500
|
-
var toPropertyKey
|
|
518
|
+
var toPropertyKey = toPropertyKey$2;
|
|
501
519
|
|
|
502
|
-
var TypeError$
|
|
520
|
+
var $TypeError$a = TypeError;
|
|
503
521
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
504
522
|
var $defineProperty = Object.defineProperty;
|
|
505
523
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -510,9 +528,9 @@ var WRITABLE = 'writable';
|
|
|
510
528
|
|
|
511
529
|
// `Object.defineProperty` method
|
|
512
530
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
513
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
531
|
+
objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
514
532
|
anObject$d(O);
|
|
515
|
-
P = toPropertyKey
|
|
533
|
+
P = toPropertyKey(P);
|
|
516
534
|
anObject$d(Attributes);
|
|
517
535
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
518
536
|
var current = $getOwnPropertyDescriptor(O, P);
|
|
@@ -527,51 +545,68 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
527
545
|
} return $defineProperty(O, P, Attributes);
|
|
528
546
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
529
547
|
anObject$d(O);
|
|
530
|
-
P = toPropertyKey
|
|
548
|
+
P = toPropertyKey(P);
|
|
531
549
|
anObject$d(Attributes);
|
|
532
550
|
if (IE8_DOM_DEFINE) try {
|
|
533
551
|
return $defineProperty(O, P, Attributes);
|
|
534
552
|
} catch (error) { /* empty */ }
|
|
535
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
553
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$a('Accessors not supported');
|
|
536
554
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
537
555
|
return O;
|
|
538
556
|
};
|
|
539
557
|
|
|
540
|
-
var DESCRIPTORS$
|
|
541
|
-
var definePropertyModule$
|
|
542
|
-
var createPropertyDescriptor$
|
|
558
|
+
var DESCRIPTORS$6 = descriptors;
|
|
559
|
+
var definePropertyModule$4 = objectDefineProperty;
|
|
560
|
+
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
543
561
|
|
|
544
|
-
var createNonEnumerableProperty$
|
|
545
|
-
return definePropertyModule$
|
|
562
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$6 ? function (object, key, value) {
|
|
563
|
+
return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
|
|
546
564
|
} : function (object, key, value) {
|
|
547
565
|
object[key] = value;
|
|
548
566
|
return object;
|
|
549
567
|
};
|
|
550
568
|
|
|
551
|
-
var
|
|
569
|
+
var makeBuiltIn$2 = {exports: {}};
|
|
552
570
|
|
|
553
|
-
var
|
|
554
|
-
var
|
|
571
|
+
var DESCRIPTORS$5 = descriptors;
|
|
572
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
573
|
+
|
|
574
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
575
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
576
|
+
var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
577
|
+
|
|
578
|
+
var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
|
|
579
|
+
// additional protection from minified / mangled / dropped function names
|
|
580
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
581
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
582
|
+
|
|
583
|
+
var functionName = {
|
|
584
|
+
EXISTS: EXISTS,
|
|
585
|
+
PROPER: PROPER,
|
|
586
|
+
CONFIGURABLE: CONFIGURABLE
|
|
587
|
+
};
|
|
588
|
+
|
|
589
|
+
var uncurryThis$h = functionUncurryThis;
|
|
590
|
+
var isCallable$g = isCallable$m;
|
|
555
591
|
var store$1 = sharedStore;
|
|
556
592
|
|
|
557
|
-
var functionToString = uncurryThis$
|
|
593
|
+
var functionToString = uncurryThis$h(Function.toString);
|
|
558
594
|
|
|
559
595
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
560
|
-
if (!isCallable$
|
|
596
|
+
if (!isCallable$g(store$1.inspectSource)) {
|
|
561
597
|
store$1.inspectSource = function (it) {
|
|
562
598
|
return functionToString(it);
|
|
563
599
|
};
|
|
564
600
|
}
|
|
565
601
|
|
|
566
|
-
var inspectSource$
|
|
602
|
+
var inspectSource$3 = store$1.inspectSource;
|
|
567
603
|
|
|
568
|
-
var global$
|
|
569
|
-
var isCallable$
|
|
570
|
-
var inspectSource$3 = inspectSource$4;
|
|
604
|
+
var global$g = global$n;
|
|
605
|
+
var isCallable$f = isCallable$m;
|
|
571
606
|
|
|
572
|
-
var WeakMap$1 = global$
|
|
607
|
+
var WeakMap$1 = global$g.WeakMap;
|
|
573
608
|
|
|
574
|
-
var
|
|
609
|
+
var weakMapBasicDetection = isCallable$f(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
575
610
|
|
|
576
611
|
var shared$2 = shared$4.exports;
|
|
577
612
|
var uid = uid$2;
|
|
@@ -584,19 +619,18 @@ var sharedKey$3 = function (key) {
|
|
|
584
619
|
|
|
585
620
|
var hiddenKeys$4 = {};
|
|
586
621
|
|
|
587
|
-
var NATIVE_WEAK_MAP =
|
|
588
|
-
var global$
|
|
589
|
-
var
|
|
590
|
-
var
|
|
591
|
-
var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
|
|
622
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
623
|
+
var global$f = global$n;
|
|
624
|
+
var isObject$4 = isObject$9;
|
|
625
|
+
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
592
626
|
var hasOwn$7 = hasOwnProperty_1;
|
|
593
627
|
var shared$1 = sharedStore;
|
|
594
628
|
var sharedKey$2 = sharedKey$3;
|
|
595
629
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
596
630
|
|
|
597
631
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
598
|
-
var TypeError$
|
|
599
|
-
var WeakMap = global$
|
|
632
|
+
var TypeError$2 = global$f.TypeError;
|
|
633
|
+
var WeakMap = global$f.WeakMap;
|
|
600
634
|
var set$1, get, has;
|
|
601
635
|
|
|
602
636
|
var enforce = function (it) {
|
|
@@ -606,36 +640,38 @@ var enforce = function (it) {
|
|
|
606
640
|
var getterFor = function (TYPE) {
|
|
607
641
|
return function (it) {
|
|
608
642
|
var state;
|
|
609
|
-
if (!isObject$
|
|
610
|
-
throw TypeError$
|
|
643
|
+
if (!isObject$4(it) || (state = get(it)).type !== TYPE) {
|
|
644
|
+
throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
|
|
611
645
|
} return state;
|
|
612
646
|
};
|
|
613
647
|
};
|
|
614
648
|
|
|
615
649
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
616
650
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
651
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
652
|
+
store.get = store.get;
|
|
653
|
+
store.has = store.has;
|
|
654
|
+
store.set = store.set;
|
|
655
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
620
656
|
set$1 = function (it, metadata) {
|
|
621
|
-
if (
|
|
657
|
+
if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
622
658
|
metadata.facade = it;
|
|
623
|
-
|
|
659
|
+
store.set(it, metadata);
|
|
624
660
|
return metadata;
|
|
625
661
|
};
|
|
626
662
|
get = function (it) {
|
|
627
|
-
return
|
|
663
|
+
return store.get(it) || {};
|
|
628
664
|
};
|
|
629
665
|
has = function (it) {
|
|
630
|
-
return
|
|
666
|
+
return store.has(it);
|
|
631
667
|
};
|
|
632
668
|
} else {
|
|
633
669
|
var STATE = sharedKey$2('state');
|
|
634
670
|
hiddenKeys$3[STATE] = true;
|
|
635
671
|
set$1 = function (it, metadata) {
|
|
636
|
-
if (hasOwn$7(it, STATE)) throw
|
|
672
|
+
if (hasOwn$7(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
637
673
|
metadata.facade = it;
|
|
638
|
-
createNonEnumerableProperty$
|
|
674
|
+
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
639
675
|
return metadata;
|
|
640
676
|
};
|
|
641
677
|
get = function (it) {
|
|
@@ -654,125 +690,148 @@ var internalState = {
|
|
|
654
690
|
getterFor: getterFor
|
|
655
691
|
};
|
|
656
692
|
|
|
657
|
-
var
|
|
693
|
+
var fails$f = fails$m;
|
|
694
|
+
var isCallable$e = isCallable$m;
|
|
658
695
|
var hasOwn$6 = hasOwnProperty_1;
|
|
659
|
-
|
|
660
|
-
var FunctionPrototype$1 = Function.prototype;
|
|
661
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
662
|
-
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
663
|
-
|
|
664
|
-
var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
|
|
665
|
-
// additional protection from minified / mangled / dropped function names
|
|
666
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
667
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
668
|
-
|
|
669
|
-
var functionName = {
|
|
670
|
-
EXISTS: EXISTS,
|
|
671
|
-
PROPER: PROPER,
|
|
672
|
-
CONFIGURABLE: CONFIGURABLE
|
|
673
|
-
};
|
|
674
|
-
|
|
675
|
-
var global$r = global$K;
|
|
676
|
-
var isCallable$b = isCallable$j;
|
|
677
|
-
var hasOwn$5 = hasOwnProperty_1;
|
|
678
|
-
var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
|
|
679
|
-
var setGlobal$1 = setGlobal$3;
|
|
680
|
-
var inspectSource$2 = inspectSource$4;
|
|
681
|
-
var InternalStateModule$2 = internalState;
|
|
696
|
+
var DESCRIPTORS$4 = descriptors;
|
|
682
697
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
698
|
+
var inspectSource$2 = inspectSource$3;
|
|
699
|
+
var InternalStateModule$2 = internalState;
|
|
683
700
|
|
|
684
|
-
var getInternalState$3 = InternalStateModule$2.get;
|
|
685
701
|
var enforceInternalState = InternalStateModule$2.enforce;
|
|
702
|
+
var getInternalState$2 = InternalStateModule$2.get;
|
|
703
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
704
|
+
var defineProperty$4 = Object.defineProperty;
|
|
705
|
+
|
|
706
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$f(function () {
|
|
707
|
+
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
708
|
+
});
|
|
709
|
+
|
|
686
710
|
var TEMPLATE = String(String).split('String');
|
|
687
711
|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
692
|
-
var name = options && options.name !== undefined ? options.name : key;
|
|
693
|
-
var state;
|
|
694
|
-
if (isCallable$b(value)) {
|
|
695
|
-
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
696
|
-
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
697
|
-
}
|
|
698
|
-
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
699
|
-
createNonEnumerableProperty$4(value, 'name', name);
|
|
700
|
-
}
|
|
701
|
-
state = enforceInternalState(value);
|
|
702
|
-
if (!state.source) {
|
|
703
|
-
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
704
|
-
}
|
|
712
|
+
var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
713
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
714
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
705
715
|
}
|
|
706
|
-
if (
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
716
|
+
if (options && options.getter) name = 'get ' + name;
|
|
717
|
+
if (options && options.setter) name = 'set ' + name;
|
|
718
|
+
if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
719
|
+
if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
720
|
+
else value.name = name;
|
|
721
|
+
}
|
|
722
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
|
|
723
|
+
defineProperty$4(value, 'length', { value: options.arity });
|
|
714
724
|
}
|
|
715
|
-
|
|
716
|
-
|
|
725
|
+
try {
|
|
726
|
+
if (options && hasOwn$6(options, 'constructor') && options.constructor) {
|
|
727
|
+
if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
|
|
728
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
729
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
730
|
+
} catch (error) { /* empty */ }
|
|
731
|
+
var state = enforceInternalState(value);
|
|
732
|
+
if (!hasOwn$6(state, 'source')) {
|
|
733
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
734
|
+
} return value;
|
|
735
|
+
};
|
|
736
|
+
|
|
717
737
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
738
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
739
|
+
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
740
|
+
return isCallable$e(this) && getInternalState$2(this).source || inspectSource$2(this);
|
|
741
|
+
}, 'toString');
|
|
742
|
+
|
|
743
|
+
var isCallable$d = isCallable$m;
|
|
744
|
+
var definePropertyModule$3 = objectDefineProperty;
|
|
745
|
+
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
746
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
747
|
+
|
|
748
|
+
var defineBuiltIn$7 = function (O, key, value, options) {
|
|
749
|
+
if (!options) options = {};
|
|
750
|
+
var simple = options.enumerable;
|
|
751
|
+
var name = options.name !== undefined ? options.name : key;
|
|
752
|
+
if (isCallable$d(value)) makeBuiltIn(value, name, options);
|
|
753
|
+
if (options.global) {
|
|
754
|
+
if (simple) O[key] = value;
|
|
755
|
+
else defineGlobalProperty$1(key, value);
|
|
756
|
+
} else {
|
|
757
|
+
try {
|
|
758
|
+
if (!options.unsafe) delete O[key];
|
|
759
|
+
else if (O[key]) simple = true;
|
|
760
|
+
} catch (error) { /* empty */ }
|
|
761
|
+
if (simple) O[key] = value;
|
|
762
|
+
else definePropertyModule$3.f(O, key, {
|
|
763
|
+
value: value,
|
|
764
|
+
enumerable: false,
|
|
765
|
+
configurable: !options.nonConfigurable,
|
|
766
|
+
writable: !options.nonWritable
|
|
767
|
+
});
|
|
768
|
+
} return O;
|
|
769
|
+
};
|
|
721
770
|
|
|
722
771
|
var objectGetOwnPropertyNames = {};
|
|
723
772
|
|
|
724
773
|
var ceil = Math.ceil;
|
|
725
774
|
var floor$1 = Math.floor;
|
|
726
775
|
|
|
776
|
+
// `Math.trunc` method
|
|
777
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
778
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
779
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
780
|
+
var n = +x;
|
|
781
|
+
return (n > 0 ? floor$1 : ceil)(n);
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
var trunc = mathTrunc;
|
|
785
|
+
|
|
727
786
|
// `ToIntegerOrInfinity` abstract operation
|
|
728
787
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
729
788
|
var toIntegerOrInfinity$4 = function (argument) {
|
|
730
789
|
var number = +argument;
|
|
731
|
-
// eslint-disable-next-line no-self-compare --
|
|
732
|
-
return number !== number || number === 0 ? 0 : (number
|
|
790
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
791
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
733
792
|
};
|
|
734
793
|
|
|
735
794
|
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
736
795
|
|
|
737
|
-
var max$
|
|
738
|
-
var min$
|
|
796
|
+
var max$1 = Math.max;
|
|
797
|
+
var min$3 = Math.min;
|
|
739
798
|
|
|
740
799
|
// Helper for a popular repeating case of the spec:
|
|
741
800
|
// Let integer be ? ToInteger(index).
|
|
742
801
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
743
|
-
var toAbsoluteIndex$
|
|
802
|
+
var toAbsoluteIndex$1 = function (index, length) {
|
|
744
803
|
var integer = toIntegerOrInfinity$3(index);
|
|
745
|
-
return integer < 0 ? max$
|
|
804
|
+
return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
|
|
746
805
|
};
|
|
747
806
|
|
|
748
807
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
|
|
749
808
|
|
|
750
|
-
var min$
|
|
809
|
+
var min$2 = Math.min;
|
|
751
810
|
|
|
752
811
|
// `ToLength` abstract operation
|
|
753
812
|
// https://tc39.es/ecma262/#sec-tolength
|
|
754
|
-
var toLength$
|
|
755
|
-
return argument > 0 ? min$
|
|
813
|
+
var toLength$3 = function (argument) {
|
|
814
|
+
return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
756
815
|
};
|
|
757
816
|
|
|
758
|
-
var toLength$
|
|
817
|
+
var toLength$2 = toLength$3;
|
|
759
818
|
|
|
760
819
|
// `LengthOfArrayLike` abstract operation
|
|
761
820
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
762
|
-
var lengthOfArrayLike$
|
|
763
|
-
return toLength$
|
|
821
|
+
var lengthOfArrayLike$3 = function (obj) {
|
|
822
|
+
return toLength$2(obj.length);
|
|
764
823
|
};
|
|
765
824
|
|
|
766
825
|
var toIndexedObject$3 = toIndexedObject$5;
|
|
767
|
-
var toAbsoluteIndex
|
|
768
|
-
var lengthOfArrayLike$
|
|
826
|
+
var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
827
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$3;
|
|
769
828
|
|
|
770
829
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
771
830
|
var createMethod$3 = function (IS_INCLUDES) {
|
|
772
831
|
return function ($this, el, fromIndex) {
|
|
773
832
|
var O = toIndexedObject$3($this);
|
|
774
|
-
var length = lengthOfArrayLike$
|
|
775
|
-
var index = toAbsoluteIndex
|
|
833
|
+
var length = lengthOfArrayLike$2(O);
|
|
834
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
776
835
|
var value;
|
|
777
836
|
// Array#includes uses SameValueZero equality algorithm
|
|
778
837
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
@@ -797,22 +856,22 @@ var arrayIncludes = {
|
|
|
797
856
|
};
|
|
798
857
|
|
|
799
858
|
var uncurryThis$g = functionUncurryThis;
|
|
800
|
-
var hasOwn$
|
|
859
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
801
860
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
802
861
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
803
862
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
804
863
|
|
|
805
|
-
var push$
|
|
864
|
+
var push$1 = uncurryThis$g([].push);
|
|
806
865
|
|
|
807
866
|
var objectKeysInternal = function (object, names) {
|
|
808
867
|
var O = toIndexedObject$2(object);
|
|
809
868
|
var i = 0;
|
|
810
869
|
var result = [];
|
|
811
870
|
var key;
|
|
812
|
-
for (key in O) !hasOwn$
|
|
871
|
+
for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push$1(result, key);
|
|
813
872
|
// Don't enum bug & hidden keys
|
|
814
|
-
while (names.length > i) if (hasOwn$
|
|
815
|
-
~indexOf$1(result, key) || push$
|
|
873
|
+
while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
|
|
874
|
+
~indexOf$1(result, key) || push$1(result, key);
|
|
816
875
|
}
|
|
817
876
|
return result;
|
|
818
877
|
};
|
|
@@ -845,7 +904,7 @@ var objectGetOwnPropertySymbols = {};
|
|
|
845
904
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
846
905
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
847
906
|
|
|
848
|
-
var getBuiltIn$
|
|
907
|
+
var getBuiltIn$5 = getBuiltIn$8;
|
|
849
908
|
var uncurryThis$f = functionUncurryThis;
|
|
850
909
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
851
910
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
@@ -854,31 +913,31 @@ var anObject$c = anObject$e;
|
|
|
854
913
|
var concat$2 = uncurryThis$f([].concat);
|
|
855
914
|
|
|
856
915
|
// all object keys, includes non-enumerable and symbols
|
|
857
|
-
var ownKeys$1 = getBuiltIn$
|
|
916
|
+
var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
858
917
|
var keys = getOwnPropertyNamesModule.f(anObject$c(it));
|
|
859
918
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
860
919
|
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
861
920
|
};
|
|
862
921
|
|
|
863
|
-
var hasOwn$
|
|
922
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
864
923
|
var ownKeys = ownKeys$1;
|
|
865
924
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
866
|
-
var definePropertyModule$
|
|
925
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
867
926
|
|
|
868
927
|
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
869
928
|
var keys = ownKeys(source);
|
|
870
|
-
var defineProperty = definePropertyModule$
|
|
929
|
+
var defineProperty = definePropertyModule$2.f;
|
|
871
930
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
872
931
|
for (var i = 0; i < keys.length; i++) {
|
|
873
932
|
var key = keys[i];
|
|
874
|
-
if (!hasOwn$
|
|
933
|
+
if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
|
|
875
934
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
876
935
|
}
|
|
877
936
|
}
|
|
878
937
|
};
|
|
879
938
|
|
|
880
|
-
var fails$
|
|
881
|
-
var isCallable$
|
|
939
|
+
var fails$e = fails$m;
|
|
940
|
+
var isCallable$c = isCallable$m;
|
|
882
941
|
|
|
883
942
|
var replacement = /#|\.prototype\./;
|
|
884
943
|
|
|
@@ -886,7 +945,7 @@ var isForced$2 = function (feature, detection) {
|
|
|
886
945
|
var value = data[normalize$1(feature)];
|
|
887
946
|
return value == POLYFILL ? true
|
|
888
947
|
: value == NATIVE ? false
|
|
889
|
-
: isCallable$
|
|
948
|
+
: isCallable$c(detection) ? fails$e(detection)
|
|
890
949
|
: !!detection;
|
|
891
950
|
};
|
|
892
951
|
|
|
@@ -900,28 +959,28 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
|
|
|
900
959
|
|
|
901
960
|
var isForced_1 = isForced$2;
|
|
902
961
|
|
|
903
|
-
var global$
|
|
962
|
+
var global$e = global$n;
|
|
904
963
|
var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
|
|
905
|
-
var createNonEnumerableProperty$3 = createNonEnumerableProperty$
|
|
906
|
-
var
|
|
907
|
-
var
|
|
964
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
965
|
+
var defineBuiltIn$6 = defineBuiltIn$7;
|
|
966
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
908
967
|
var copyConstructorProperties = copyConstructorProperties$1;
|
|
909
968
|
var isForced$1 = isForced_1;
|
|
910
969
|
|
|
911
970
|
/*
|
|
912
|
-
options.target
|
|
913
|
-
options.global
|
|
914
|
-
options.stat
|
|
915
|
-
options.proto
|
|
916
|
-
options.real
|
|
917
|
-
options.forced
|
|
918
|
-
options.bind
|
|
919
|
-
options.wrap
|
|
920
|
-
options.unsafe
|
|
921
|
-
options.sham
|
|
922
|
-
options.enumerable
|
|
923
|
-
options.
|
|
924
|
-
options.name
|
|
971
|
+
options.target - name of the target object
|
|
972
|
+
options.global - target is the global object
|
|
973
|
+
options.stat - export as static methods of target
|
|
974
|
+
options.proto - export as prototype methods of target
|
|
975
|
+
options.real - real prototype method for the `pure` version
|
|
976
|
+
options.forced - export even if the native feature is available
|
|
977
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
978
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
979
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
980
|
+
options.sham - add a flag to not completely full polyfills
|
|
981
|
+
options.enumerable - export as enumerable property
|
|
982
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
983
|
+
options.name - the .name of the function if it does not match the key
|
|
925
984
|
*/
|
|
926
985
|
var _export = function (options, source) {
|
|
927
986
|
var TARGET = options.target;
|
|
@@ -929,15 +988,15 @@ var _export = function (options, source) {
|
|
|
929
988
|
var STATIC = options.stat;
|
|
930
989
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
931
990
|
if (GLOBAL) {
|
|
932
|
-
target = global$
|
|
991
|
+
target = global$e;
|
|
933
992
|
} else if (STATIC) {
|
|
934
|
-
target = global$
|
|
993
|
+
target = global$e[TARGET] || defineGlobalProperty(TARGET, {});
|
|
935
994
|
} else {
|
|
936
|
-
target = (global$
|
|
995
|
+
target = (global$e[TARGET] || {}).prototype;
|
|
937
996
|
}
|
|
938
997
|
if (target) for (key in source) {
|
|
939
998
|
sourceProperty = source[key];
|
|
940
|
-
if (options.
|
|
999
|
+
if (options.dontCallGetSet) {
|
|
941
1000
|
descriptor = getOwnPropertyDescriptor$2(target, key);
|
|
942
1001
|
targetProperty = descriptor && descriptor.value;
|
|
943
1002
|
} else targetProperty = target[key];
|
|
@@ -951,31 +1010,23 @@ var _export = function (options, source) {
|
|
|
951
1010
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
952
1011
|
createNonEnumerableProperty$3(sourceProperty, 'sham', true);
|
|
953
1012
|
}
|
|
954
|
-
|
|
955
|
-
redefine$5(target, key, sourceProperty, options);
|
|
1013
|
+
defineBuiltIn$6(target, key, sourceProperty, options);
|
|
956
1014
|
}
|
|
957
1015
|
};
|
|
958
1016
|
|
|
959
|
-
var
|
|
960
|
-
|
|
961
|
-
var nativePromiseConstructor = global$p.Promise;
|
|
962
|
-
|
|
963
|
-
var redefine$4 = redefine$6.exports;
|
|
1017
|
+
var classof$6 = classofRaw$2;
|
|
1018
|
+
var global$d = global$n;
|
|
964
1019
|
|
|
965
|
-
var
|
|
966
|
-
for (var key in src) redefine$4(target, key, src[key], options);
|
|
967
|
-
return target;
|
|
968
|
-
};
|
|
1020
|
+
var engineIsNode = classof$6(global$d.process) == 'process';
|
|
969
1021
|
|
|
970
|
-
var
|
|
971
|
-
var isCallable$9 = isCallable$j;
|
|
1022
|
+
var isCallable$b = isCallable$m;
|
|
972
1023
|
|
|
973
|
-
var String$
|
|
974
|
-
var TypeError$
|
|
1024
|
+
var $String$1 = String;
|
|
1025
|
+
var $TypeError$9 = TypeError;
|
|
975
1026
|
|
|
976
1027
|
var aPossiblePrototype$1 = function (argument) {
|
|
977
|
-
if (typeof argument == 'object' || isCallable$
|
|
978
|
-
throw TypeError$
|
|
1028
|
+
if (typeof argument == 'object' || isCallable$b(argument)) return argument;
|
|
1029
|
+
throw $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
|
|
979
1030
|
};
|
|
980
1031
|
|
|
981
1032
|
/* eslint-disable no-proto -- safe */
|
|
@@ -1007,29 +1058,29 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1007
1058
|
};
|
|
1008
1059
|
}() : undefined);
|
|
1009
1060
|
|
|
1010
|
-
var defineProperty$
|
|
1011
|
-
var hasOwn$
|
|
1061
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1062
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
1012
1063
|
var wellKnownSymbol$g = wellKnownSymbol$i;
|
|
1013
1064
|
|
|
1014
1065
|
var TO_STRING_TAG$3 = wellKnownSymbol$g('toStringTag');
|
|
1015
1066
|
|
|
1016
1067
|
var setToStringTag$3 = function (target, TAG, STATIC) {
|
|
1017
1068
|
if (target && !STATIC) target = target.prototype;
|
|
1018
|
-
if (target && !hasOwn$
|
|
1019
|
-
defineProperty$
|
|
1069
|
+
if (target && !hasOwn$3(target, TO_STRING_TAG$3)) {
|
|
1070
|
+
defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1020
1071
|
}
|
|
1021
1072
|
};
|
|
1022
1073
|
|
|
1023
|
-
var getBuiltIn$
|
|
1024
|
-
var definePropertyModule$
|
|
1074
|
+
var getBuiltIn$4 = getBuiltIn$8;
|
|
1075
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
1025
1076
|
var wellKnownSymbol$f = wellKnownSymbol$i;
|
|
1026
1077
|
var DESCRIPTORS$3 = descriptors;
|
|
1027
1078
|
|
|
1028
1079
|
var SPECIES$3 = wellKnownSymbol$f('species');
|
|
1029
1080
|
|
|
1030
1081
|
var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
1031
|
-
var Constructor = getBuiltIn$
|
|
1032
|
-
var defineProperty = definePropertyModule$
|
|
1082
|
+
var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
|
|
1083
|
+
var defineProperty = definePropertyModule$1.f;
|
|
1033
1084
|
|
|
1034
1085
|
if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
|
|
1035
1086
|
defineProperty(Constructor, SPECIES$3, {
|
|
@@ -1039,63 +1090,34 @@ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
|
|
|
1039
1090
|
}
|
|
1040
1091
|
};
|
|
1041
1092
|
|
|
1042
|
-
var
|
|
1043
|
-
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1093
|
+
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
1044
1094
|
|
|
1045
|
-
var TypeError$
|
|
1095
|
+
var $TypeError$8 = TypeError;
|
|
1046
1096
|
|
|
1047
1097
|
var anInstance$1 = function (it, Prototype) {
|
|
1048
|
-
if (isPrototypeOf$
|
|
1049
|
-
throw TypeError$
|
|
1050
|
-
};
|
|
1051
|
-
|
|
1052
|
-
var uncurryThis$d = functionUncurryThis;
|
|
1053
|
-
var aCallable$4 = aCallable$6;
|
|
1054
|
-
var NATIVE_BIND$1 = functionBindNative;
|
|
1055
|
-
|
|
1056
|
-
var bind$4 = uncurryThis$d(uncurryThis$d.bind);
|
|
1057
|
-
|
|
1058
|
-
// optional / simple context binding
|
|
1059
|
-
var functionBindContext = function (fn, that) {
|
|
1060
|
-
aCallable$4(fn);
|
|
1061
|
-
return that === undefined ? fn : NATIVE_BIND$1 ? bind$4(fn, that) : function (/* ...args */) {
|
|
1062
|
-
return fn.apply(that, arguments);
|
|
1063
|
-
};
|
|
1098
|
+
if (isPrototypeOf$2(Prototype, it)) return it;
|
|
1099
|
+
throw $TypeError$8('Incorrect invocation');
|
|
1064
1100
|
};
|
|
1065
1101
|
|
|
1066
|
-
var iterators = {};
|
|
1067
|
-
|
|
1068
1102
|
var wellKnownSymbol$e = wellKnownSymbol$i;
|
|
1069
|
-
var Iterators$4 = iterators;
|
|
1070
|
-
|
|
1071
|
-
var ITERATOR$6 = wellKnownSymbol$e('iterator');
|
|
1072
|
-
var ArrayPrototype$1 = Array.prototype;
|
|
1073
|
-
|
|
1074
|
-
// check on default Array iterator
|
|
1075
|
-
var isArrayIteratorMethod$1 = function (it) {
|
|
1076
|
-
return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$6] === it);
|
|
1077
|
-
};
|
|
1078
|
-
|
|
1079
|
-
var wellKnownSymbol$d = wellKnownSymbol$i;
|
|
1080
1103
|
|
|
1081
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1104
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$e('toStringTag');
|
|
1082
1105
|
var test = {};
|
|
1083
1106
|
|
|
1084
1107
|
test[TO_STRING_TAG$2] = 'z';
|
|
1085
1108
|
|
|
1086
1109
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1087
1110
|
|
|
1088
|
-
var global$m = global$K;
|
|
1089
1111
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1090
|
-
var isCallable$
|
|
1091
|
-
var classofRaw = classofRaw$
|
|
1092
|
-
var wellKnownSymbol$
|
|
1112
|
+
var isCallable$a = isCallable$m;
|
|
1113
|
+
var classofRaw$1 = classofRaw$2;
|
|
1114
|
+
var wellKnownSymbol$d = wellKnownSymbol$i;
|
|
1093
1115
|
|
|
1094
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1095
|
-
var Object$
|
|
1116
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$d('toStringTag');
|
|
1117
|
+
var $Object$1 = Object;
|
|
1096
1118
|
|
|
1097
1119
|
// ES3 wrong here
|
|
1098
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1120
|
+
var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
|
|
1099
1121
|
|
|
1100
1122
|
// fallback for IE11 Script Access Denied error
|
|
1101
1123
|
var tryGet = function (it, key) {
|
|
@@ -1105,279 +1127,143 @@ var tryGet = function (it, key) {
|
|
|
1105
1127
|
};
|
|
1106
1128
|
|
|
1107
1129
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1108
|
-
var classof$
|
|
1130
|
+
var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
|
|
1109
1131
|
var O, tag, result;
|
|
1110
1132
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1111
1133
|
// @@toStringTag case
|
|
1112
|
-
: typeof (tag = tryGet(O = Object$
|
|
1134
|
+
: typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
1113
1135
|
// builtinTag case
|
|
1114
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1136
|
+
: CORRECT_ARGUMENTS ? classofRaw$1(O)
|
|
1115
1137
|
// ES3 arguments fallback
|
|
1116
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$
|
|
1138
|
+
: (result = classofRaw$1(O)) == 'Object' && isCallable$a(O.callee) ? 'Arguments' : result;
|
|
1117
1139
|
};
|
|
1118
1140
|
|
|
1119
|
-
var
|
|
1120
|
-
var
|
|
1121
|
-
var
|
|
1122
|
-
var
|
|
1141
|
+
var uncurryThis$d = functionUncurryThis;
|
|
1142
|
+
var fails$d = fails$m;
|
|
1143
|
+
var isCallable$9 = isCallable$m;
|
|
1144
|
+
var classof$4 = classof$5;
|
|
1145
|
+
var getBuiltIn$3 = getBuiltIn$8;
|
|
1146
|
+
var inspectSource$1 = inspectSource$3;
|
|
1123
1147
|
|
|
1124
|
-
var
|
|
1148
|
+
var noop = function () { /* empty */ };
|
|
1149
|
+
var empty = [];
|
|
1150
|
+
var construct = getBuiltIn$3('Reflect', 'construct');
|
|
1151
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1152
|
+
var exec$2 = uncurryThis$d(constructorRegExp.exec);
|
|
1153
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1125
1154
|
|
|
1126
|
-
var
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1129
|
-
|
|
1155
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1156
|
+
if (!isCallable$9(argument)) return false;
|
|
1157
|
+
try {
|
|
1158
|
+
construct(noop, empty, argument);
|
|
1159
|
+
return true;
|
|
1160
|
+
} catch (error) {
|
|
1161
|
+
return false;
|
|
1162
|
+
}
|
|
1130
1163
|
};
|
|
1131
1164
|
|
|
1132
|
-
var
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1165
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1166
|
+
if (!isCallable$9(argument)) return false;
|
|
1167
|
+
switch (classof$4(argument)) {
|
|
1168
|
+
case 'AsyncFunction':
|
|
1169
|
+
case 'GeneratorFunction':
|
|
1170
|
+
case 'AsyncGeneratorFunction': return false;
|
|
1171
|
+
}
|
|
1172
|
+
try {
|
|
1173
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1174
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1175
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1176
|
+
return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource$1(argument));
|
|
1177
|
+
} catch (error) {
|
|
1178
|
+
return true;
|
|
1179
|
+
}
|
|
1180
|
+
};
|
|
1181
|
+
|
|
1182
|
+
isConstructorLegacy.sham = true;
|
|
1183
|
+
|
|
1184
|
+
// `IsConstructor` abstract operation
|
|
1185
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1186
|
+
var isConstructor$1 = !construct || fails$d(function () {
|
|
1187
|
+
var called;
|
|
1188
|
+
return isConstructorModern(isConstructorModern.call)
|
|
1189
|
+
|| !isConstructorModern(Object)
|
|
1190
|
+
|| !isConstructorModern(function () { called = true; })
|
|
1191
|
+
|| called;
|
|
1192
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1193
|
+
|
|
1194
|
+
var isConstructor = isConstructor$1;
|
|
1136
1195
|
var tryToString$2 = tryToString$4;
|
|
1137
|
-
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1138
1196
|
|
|
1139
|
-
var TypeError$
|
|
1197
|
+
var $TypeError$7 = TypeError;
|
|
1140
1198
|
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
if (
|
|
1144
|
-
throw TypeError$
|
|
1199
|
+
// `Assert: IsConstructor(argument) is true`
|
|
1200
|
+
var aConstructor$1 = function (argument) {
|
|
1201
|
+
if (isConstructor(argument)) return argument;
|
|
1202
|
+
throw $TypeError$7(tryToString$2(argument) + ' is not a constructor');
|
|
1145
1203
|
};
|
|
1146
1204
|
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1149
|
-
var
|
|
1205
|
+
var anObject$a = anObject$e;
|
|
1206
|
+
var aConstructor = aConstructor$1;
|
|
1207
|
+
var isNullOrUndefined$2 = isNullOrUndefined$5;
|
|
1208
|
+
var wellKnownSymbol$c = wellKnownSymbol$i;
|
|
1150
1209
|
|
|
1151
|
-
var
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
}
|
|
1160
|
-
innerResult = call$9(innerResult, iterator);
|
|
1161
|
-
} catch (error) {
|
|
1162
|
-
innerError = true;
|
|
1163
|
-
innerResult = error;
|
|
1164
|
-
}
|
|
1165
|
-
if (kind === 'throw') throw value;
|
|
1166
|
-
if (innerError) throw innerResult;
|
|
1167
|
-
anObject$9(innerResult);
|
|
1168
|
-
return value;
|
|
1210
|
+
var SPECIES$2 = wellKnownSymbol$c('species');
|
|
1211
|
+
|
|
1212
|
+
// `SpeciesConstructor` abstract operation
|
|
1213
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1214
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
1215
|
+
var C = anObject$a(O).constructor;
|
|
1216
|
+
var S;
|
|
1217
|
+
return C === undefined || isNullOrUndefined$2(S = anObject$a(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
|
|
1169
1218
|
};
|
|
1170
1219
|
|
|
1171
|
-
var
|
|
1172
|
-
var bind$3 = functionBindContext;
|
|
1173
|
-
var call$8 = functionCall;
|
|
1174
|
-
var anObject$8 = anObject$e;
|
|
1175
|
-
var tryToString$1 = tryToString$4;
|
|
1176
|
-
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1177
|
-
var lengthOfArrayLike$2 = lengthOfArrayLike$4;
|
|
1178
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1179
|
-
var getIterator = getIterator$1;
|
|
1180
|
-
var getIteratorMethod = getIteratorMethod$2;
|
|
1181
|
-
var iteratorClose = iteratorClose$1;
|
|
1220
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
1182
1221
|
|
|
1183
|
-
var
|
|
1222
|
+
var FunctionPrototype = Function.prototype;
|
|
1223
|
+
var apply$2 = FunctionPrototype.apply;
|
|
1224
|
+
var call$d = FunctionPrototype.call;
|
|
1184
1225
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1226
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
1227
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$d.bind(apply$2) : function () {
|
|
1228
|
+
return call$d.apply(apply$2, arguments);
|
|
1229
|
+
});
|
|
1230
|
+
|
|
1231
|
+
var classofRaw = classofRaw$2;
|
|
1232
|
+
var uncurryThis$c = functionUncurryThis;
|
|
1233
|
+
|
|
1234
|
+
var functionUncurryThisClause = function (fn) {
|
|
1235
|
+
// Nashorn bug:
|
|
1236
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
1237
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
1238
|
+
if (classofRaw(fn) === 'Function') return uncurryThis$c(fn);
|
|
1188
1239
|
};
|
|
1189
1240
|
|
|
1190
|
-
var
|
|
1241
|
+
var uncurryThis$b = functionUncurryThisClause;
|
|
1242
|
+
var aCallable$6 = aCallable$8;
|
|
1243
|
+
var NATIVE_BIND = functionBindNative;
|
|
1191
1244
|
|
|
1192
|
-
var
|
|
1193
|
-
var that = options && options.that;
|
|
1194
|
-
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1195
|
-
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1196
|
-
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1197
|
-
var fn = bind$3(unboundFunction, that);
|
|
1198
|
-
var iterator, iterFn, index, length, result, next, step;
|
|
1245
|
+
var bind$4 = uncurryThis$b(uncurryThis$b.bind);
|
|
1199
1246
|
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1247
|
+
// optional / simple context binding
|
|
1248
|
+
var functionBindContext = function (fn, that) {
|
|
1249
|
+
aCallable$6(fn);
|
|
1250
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
|
|
1251
|
+
return fn.apply(that, arguments);
|
|
1203
1252
|
};
|
|
1253
|
+
};
|
|
1204
1254
|
|
|
1205
|
-
|
|
1206
|
-
if (AS_ENTRIES) {
|
|
1207
|
-
anObject$8(value);
|
|
1208
|
-
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
1209
|
-
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
1210
|
-
};
|
|
1211
|
-
|
|
1212
|
-
if (IS_ITERATOR) {
|
|
1213
|
-
iterator = iterable;
|
|
1214
|
-
} else {
|
|
1215
|
-
iterFn = getIteratorMethod(iterable);
|
|
1216
|
-
if (!iterFn) throw TypeError$7(tryToString$1(iterable) + ' is not iterable');
|
|
1217
|
-
// optimisation for array iterators
|
|
1218
|
-
if (isArrayIteratorMethod(iterFn)) {
|
|
1219
|
-
for (index = 0, length = lengthOfArrayLike$2(iterable); length > index; index++) {
|
|
1220
|
-
result = callFn(iterable[index]);
|
|
1221
|
-
if (result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1222
|
-
} return new Result(false);
|
|
1223
|
-
}
|
|
1224
|
-
iterator = getIterator(iterable, iterFn);
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
next = iterator.next;
|
|
1228
|
-
while (!(step = call$8(next, iterator)).done) {
|
|
1229
|
-
try {
|
|
1230
|
-
result = callFn(step.value);
|
|
1231
|
-
} catch (error) {
|
|
1232
|
-
iteratorClose(iterator, 'throw', error);
|
|
1233
|
-
}
|
|
1234
|
-
if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
|
|
1235
|
-
} return new Result(false);
|
|
1236
|
-
};
|
|
1237
|
-
|
|
1238
|
-
var wellKnownSymbol$a = wellKnownSymbol$i;
|
|
1239
|
-
|
|
1240
|
-
var ITERATOR$4 = wellKnownSymbol$a('iterator');
|
|
1241
|
-
var SAFE_CLOSING = false;
|
|
1242
|
-
|
|
1243
|
-
try {
|
|
1244
|
-
var called = 0;
|
|
1245
|
-
var iteratorWithReturn = {
|
|
1246
|
-
next: function () {
|
|
1247
|
-
return { done: !!called++ };
|
|
1248
|
-
},
|
|
1249
|
-
'return': function () {
|
|
1250
|
-
SAFE_CLOSING = true;
|
|
1251
|
-
}
|
|
1252
|
-
};
|
|
1253
|
-
iteratorWithReturn[ITERATOR$4] = function () {
|
|
1254
|
-
return this;
|
|
1255
|
-
};
|
|
1256
|
-
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
1257
|
-
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
1258
|
-
} catch (error) { /* empty */ }
|
|
1259
|
-
|
|
1260
|
-
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
1261
|
-
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
1262
|
-
var ITERATION_SUPPORT = false;
|
|
1263
|
-
try {
|
|
1264
|
-
var object = {};
|
|
1265
|
-
object[ITERATOR$4] = function () {
|
|
1266
|
-
return {
|
|
1267
|
-
next: function () {
|
|
1268
|
-
return { done: ITERATION_SUPPORT = true };
|
|
1269
|
-
}
|
|
1270
|
-
};
|
|
1271
|
-
};
|
|
1272
|
-
exec(object);
|
|
1273
|
-
} catch (error) { /* empty */ }
|
|
1274
|
-
return ITERATION_SUPPORT;
|
|
1275
|
-
};
|
|
1276
|
-
|
|
1277
|
-
var uncurryThis$c = functionUncurryThis;
|
|
1278
|
-
var fails$c = fails$k;
|
|
1279
|
-
var isCallable$7 = isCallable$j;
|
|
1280
|
-
var classof$4 = classof$6;
|
|
1281
|
-
var getBuiltIn$2 = getBuiltIn$7;
|
|
1282
|
-
var inspectSource$1 = inspectSource$4;
|
|
1283
|
-
|
|
1284
|
-
var noop = function () { /* empty */ };
|
|
1285
|
-
var empty = [];
|
|
1286
|
-
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
1287
|
-
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1288
|
-
var exec$3 = uncurryThis$c(constructorRegExp.exec);
|
|
1289
|
-
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1290
|
-
|
|
1291
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
1292
|
-
if (!isCallable$7(argument)) return false;
|
|
1293
|
-
try {
|
|
1294
|
-
construct(noop, empty, argument);
|
|
1295
|
-
return true;
|
|
1296
|
-
} catch (error) {
|
|
1297
|
-
return false;
|
|
1298
|
-
}
|
|
1299
|
-
};
|
|
1300
|
-
|
|
1301
|
-
var isConstructorLegacy = function isConstructor(argument) {
|
|
1302
|
-
if (!isCallable$7(argument)) return false;
|
|
1303
|
-
switch (classof$4(argument)) {
|
|
1304
|
-
case 'AsyncFunction':
|
|
1305
|
-
case 'GeneratorFunction':
|
|
1306
|
-
case 'AsyncGeneratorFunction': return false;
|
|
1307
|
-
}
|
|
1308
|
-
try {
|
|
1309
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1310
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1311
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
1312
|
-
return INCORRECT_TO_STRING || !!exec$3(constructorRegExp, inspectSource$1(argument));
|
|
1313
|
-
} catch (error) {
|
|
1314
|
-
return true;
|
|
1315
|
-
}
|
|
1316
|
-
};
|
|
1317
|
-
|
|
1318
|
-
isConstructorLegacy.sham = true;
|
|
1319
|
-
|
|
1320
|
-
// `IsConstructor` abstract operation
|
|
1321
|
-
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1322
|
-
var isConstructor$1 = !construct || fails$c(function () {
|
|
1323
|
-
var called;
|
|
1324
|
-
return isConstructorModern(isConstructorModern.call)
|
|
1325
|
-
|| !isConstructorModern(Object)
|
|
1326
|
-
|| !isConstructorModern(function () { called = true; })
|
|
1327
|
-
|| called;
|
|
1328
|
-
}) ? isConstructorLegacy : isConstructorModern;
|
|
1329
|
-
|
|
1330
|
-
var global$j = global$K;
|
|
1331
|
-
var isConstructor = isConstructor$1;
|
|
1332
|
-
var tryToString = tryToString$4;
|
|
1333
|
-
|
|
1334
|
-
var TypeError$6 = global$j.TypeError;
|
|
1335
|
-
|
|
1336
|
-
// `Assert: IsConstructor(argument) is true`
|
|
1337
|
-
var aConstructor$1 = function (argument) {
|
|
1338
|
-
if (isConstructor(argument)) return argument;
|
|
1339
|
-
throw TypeError$6(tryToString(argument) + ' is not a constructor');
|
|
1340
|
-
};
|
|
1341
|
-
|
|
1342
|
-
var anObject$7 = anObject$e;
|
|
1343
|
-
var aConstructor = aConstructor$1;
|
|
1344
|
-
var wellKnownSymbol$9 = wellKnownSymbol$i;
|
|
1345
|
-
|
|
1346
|
-
var SPECIES$2 = wellKnownSymbol$9('species');
|
|
1347
|
-
|
|
1348
|
-
// `SpeciesConstructor` abstract operation
|
|
1349
|
-
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
1350
|
-
var speciesConstructor$2 = function (O, defaultConstructor) {
|
|
1351
|
-
var C = anObject$7(O).constructor;
|
|
1352
|
-
var S;
|
|
1353
|
-
return C === undefined || (S = anObject$7(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
|
|
1354
|
-
};
|
|
1355
|
-
|
|
1356
|
-
var NATIVE_BIND = functionBindNative;
|
|
1357
|
-
|
|
1358
|
-
var FunctionPrototype = Function.prototype;
|
|
1359
|
-
var apply$3 = FunctionPrototype.apply;
|
|
1360
|
-
var call$7 = FunctionPrototype.call;
|
|
1361
|
-
|
|
1362
|
-
// eslint-disable-next-line es/no-reflect -- safe
|
|
1363
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$7.bind(apply$3) : function () {
|
|
1364
|
-
return call$7.apply(apply$3, arguments);
|
|
1365
|
-
});
|
|
1366
|
-
|
|
1367
|
-
var getBuiltIn$1 = getBuiltIn$7;
|
|
1255
|
+
var getBuiltIn$2 = getBuiltIn$8;
|
|
1368
1256
|
|
|
1369
|
-
var html$2 = getBuiltIn$
|
|
1257
|
+
var html$2 = getBuiltIn$2('document', 'documentElement');
|
|
1370
1258
|
|
|
1371
|
-
var uncurryThis$
|
|
1372
|
-
|
|
1373
|
-
var arraySlice$2 = uncurryThis$b([].slice);
|
|
1259
|
+
var uncurryThis$a = functionUncurryThis;
|
|
1374
1260
|
|
|
1375
|
-
var
|
|
1261
|
+
var arraySlice$1 = uncurryThis$a([].slice);
|
|
1376
1262
|
|
|
1377
|
-
var TypeError$
|
|
1263
|
+
var $TypeError$6 = TypeError;
|
|
1378
1264
|
|
|
1379
1265
|
var validateArgumentsLength$1 = function (passed, required) {
|
|
1380
|
-
if (passed < required) throw TypeError$
|
|
1266
|
+
if (passed < required) throw $TypeError$6('Not enough arguments');
|
|
1381
1267
|
return passed;
|
|
1382
1268
|
};
|
|
1383
1269
|
|
|
@@ -1385,43 +1271,38 @@ var userAgent$2 = engineUserAgent;
|
|
|
1385
1271
|
|
|
1386
1272
|
var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
|
|
1387
1273
|
|
|
1388
|
-
var
|
|
1389
|
-
var
|
|
1390
|
-
|
|
1391
|
-
var
|
|
1392
|
-
|
|
1393
|
-
var
|
|
1394
|
-
var apply$2 = functionApply;
|
|
1395
|
-
var bind$2 = functionBindContext;
|
|
1396
|
-
var isCallable$6 = isCallable$j;
|
|
1397
|
-
var hasOwn$1 = hasOwnProperty_1;
|
|
1398
|
-
var fails$b = fails$k;
|
|
1274
|
+
var global$c = global$n;
|
|
1275
|
+
var apply$1 = functionApply;
|
|
1276
|
+
var bind$3 = functionBindContext;
|
|
1277
|
+
var isCallable$8 = isCallable$m;
|
|
1278
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1279
|
+
var fails$c = fails$m;
|
|
1399
1280
|
var html$1 = html$2;
|
|
1400
|
-
var arraySlice
|
|
1281
|
+
var arraySlice = arraySlice$1;
|
|
1401
1282
|
var createElement = documentCreateElement$2;
|
|
1402
1283
|
var validateArgumentsLength = validateArgumentsLength$1;
|
|
1403
1284
|
var IS_IOS$1 = engineIsIos;
|
|
1404
|
-
var IS_NODE$
|
|
1405
|
-
|
|
1406
|
-
var set = global$
|
|
1407
|
-
var clear = global$
|
|
1408
|
-
var process$2 = global$
|
|
1409
|
-
var Dispatch = global$
|
|
1410
|
-
var Function$1 = global$
|
|
1411
|
-
var MessageChannel = global$
|
|
1412
|
-
var String$
|
|
1285
|
+
var IS_NODE$4 = engineIsNode;
|
|
1286
|
+
|
|
1287
|
+
var set = global$c.setImmediate;
|
|
1288
|
+
var clear = global$c.clearImmediate;
|
|
1289
|
+
var process$2 = global$c.process;
|
|
1290
|
+
var Dispatch = global$c.Dispatch;
|
|
1291
|
+
var Function$1 = global$c.Function;
|
|
1292
|
+
var MessageChannel = global$c.MessageChannel;
|
|
1293
|
+
var String$1 = global$c.String;
|
|
1413
1294
|
var counter = 0;
|
|
1414
1295
|
var queue$1 = {};
|
|
1415
1296
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
1416
|
-
var location, defer, channel, port;
|
|
1297
|
+
var $location, defer, channel, port;
|
|
1417
1298
|
|
|
1418
1299
|
try {
|
|
1419
1300
|
// Deno throws a ReferenceError on `location` access without `--location` flag
|
|
1420
|
-
location = global$
|
|
1301
|
+
$location = global$c.location;
|
|
1421
1302
|
} catch (error) { /* empty */ }
|
|
1422
1303
|
|
|
1423
1304
|
var run = function (id) {
|
|
1424
|
-
if (hasOwn$
|
|
1305
|
+
if (hasOwn$2(queue$1, id)) {
|
|
1425
1306
|
var fn = queue$1[id];
|
|
1426
1307
|
delete queue$1[id];
|
|
1427
1308
|
fn();
|
|
@@ -1440,17 +1321,17 @@ var listener = function (event) {
|
|
|
1440
1321
|
|
|
1441
1322
|
var post = function (id) {
|
|
1442
1323
|
// old engines have not location.origin
|
|
1443
|
-
global$
|
|
1324
|
+
global$c.postMessage(String$1(id), $location.protocol + '//' + $location.host);
|
|
1444
1325
|
};
|
|
1445
1326
|
|
|
1446
1327
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
1447
1328
|
if (!set || !clear) {
|
|
1448
1329
|
set = function setImmediate(handler) {
|
|
1449
1330
|
validateArgumentsLength(arguments.length, 1);
|
|
1450
|
-
var fn = isCallable$
|
|
1451
|
-
var args = arraySlice
|
|
1331
|
+
var fn = isCallable$8(handler) ? handler : Function$1(handler);
|
|
1332
|
+
var args = arraySlice(arguments, 1);
|
|
1452
1333
|
queue$1[++counter] = function () {
|
|
1453
|
-
apply$
|
|
1334
|
+
apply$1(fn, undefined, args);
|
|
1454
1335
|
};
|
|
1455
1336
|
defer(counter);
|
|
1456
1337
|
return counter;
|
|
@@ -1459,7 +1340,7 @@ if (!set || !clear) {
|
|
|
1459
1340
|
delete queue$1[id];
|
|
1460
1341
|
};
|
|
1461
1342
|
// Node.js 0.8-
|
|
1462
|
-
if (IS_NODE$
|
|
1343
|
+
if (IS_NODE$4) {
|
|
1463
1344
|
defer = function (id) {
|
|
1464
1345
|
process$2.nextTick(runner(id));
|
|
1465
1346
|
};
|
|
@@ -1474,18 +1355,18 @@ if (!set || !clear) {
|
|
|
1474
1355
|
channel = new MessageChannel();
|
|
1475
1356
|
port = channel.port2;
|
|
1476
1357
|
channel.port1.onmessage = listener;
|
|
1477
|
-
defer = bind$
|
|
1358
|
+
defer = bind$3(port.postMessage, port);
|
|
1478
1359
|
// Browsers with postMessage, skip WebWorkers
|
|
1479
1360
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1480
1361
|
} else if (
|
|
1481
|
-
global$
|
|
1482
|
-
isCallable$
|
|
1483
|
-
!global$
|
|
1484
|
-
location && location.protocol !== 'file:' &&
|
|
1485
|
-
!fails$
|
|
1362
|
+
global$c.addEventListener &&
|
|
1363
|
+
isCallable$8(global$c.postMessage) &&
|
|
1364
|
+
!global$c.importScripts &&
|
|
1365
|
+
$location && $location.protocol !== 'file:' &&
|
|
1366
|
+
!fails$c(post)
|
|
1486
1367
|
) {
|
|
1487
1368
|
defer = post;
|
|
1488
|
-
global$
|
|
1369
|
+
global$c.addEventListener('message', listener, false);
|
|
1489
1370
|
// IE8-
|
|
1490
1371
|
} else if (ONREADYSTATECHANGE in createElement('script')) {
|
|
1491
1372
|
defer = function (id) {
|
|
@@ -1508,29 +1389,29 @@ var task$1 = {
|
|
|
1508
1389
|
};
|
|
1509
1390
|
|
|
1510
1391
|
var userAgent$1 = engineUserAgent;
|
|
1511
|
-
var global$
|
|
1392
|
+
var global$b = global$n;
|
|
1512
1393
|
|
|
1513
|
-
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$
|
|
1394
|
+
var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$b.Pebble !== undefined;
|
|
1514
1395
|
|
|
1515
1396
|
var userAgent = engineUserAgent;
|
|
1516
1397
|
|
|
1517
1398
|
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
|
|
1518
1399
|
|
|
1519
|
-
var global$
|
|
1520
|
-
var bind$
|
|
1400
|
+
var global$a = global$n;
|
|
1401
|
+
var bind$2 = functionBindContext;
|
|
1521
1402
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
1522
1403
|
var macrotask = task$1.set;
|
|
1523
1404
|
var IS_IOS = engineIsIos;
|
|
1524
1405
|
var IS_IOS_PEBBLE = engineIsIosPebble;
|
|
1525
1406
|
var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
|
|
1526
|
-
var IS_NODE$
|
|
1407
|
+
var IS_NODE$3 = engineIsNode;
|
|
1527
1408
|
|
|
1528
|
-
var MutationObserver = global$
|
|
1529
|
-
var document$2 = global$
|
|
1530
|
-
var process$1 = global$
|
|
1531
|
-
var Promise$1 = global$
|
|
1409
|
+
var MutationObserver = global$a.MutationObserver || global$a.WebKitMutationObserver;
|
|
1410
|
+
var document$2 = global$a.document;
|
|
1411
|
+
var process$1 = global$a.process;
|
|
1412
|
+
var Promise$1 = global$a.Promise;
|
|
1532
1413
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
1533
|
-
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$
|
|
1414
|
+
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$a, 'queueMicrotask');
|
|
1534
1415
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
1535
1416
|
|
|
1536
1417
|
var flush, head, last, notify$1, toggle, node, promise, then;
|
|
@@ -1539,7 +1420,7 @@ var flush, head, last, notify$1, toggle, node, promise, then;
|
|
|
1539
1420
|
if (!queueMicrotask) {
|
|
1540
1421
|
flush = function () {
|
|
1541
1422
|
var parent, fn;
|
|
1542
|
-
if (IS_NODE$
|
|
1423
|
+
if (IS_NODE$3 && (parent = process$1.domain)) parent.exit();
|
|
1543
1424
|
while (head) {
|
|
1544
1425
|
fn = head.fn;
|
|
1545
1426
|
head = head.next;
|
|
@@ -1556,7 +1437,7 @@ if (!queueMicrotask) {
|
|
|
1556
1437
|
|
|
1557
1438
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
1558
1439
|
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
1559
|
-
if (!IS_IOS && !IS_NODE$
|
|
1440
|
+
if (!IS_IOS && !IS_NODE$3 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
|
|
1560
1441
|
toggle = true;
|
|
1561
1442
|
node = document$2.createTextNode('');
|
|
1562
1443
|
new MutationObserver(flush).observe(node, { characterData: true });
|
|
@@ -1569,24 +1450,24 @@ if (!queueMicrotask) {
|
|
|
1569
1450
|
promise = Promise$1.resolve(undefined);
|
|
1570
1451
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
1571
1452
|
promise.constructor = Promise$1;
|
|
1572
|
-
then = bind$
|
|
1453
|
+
then = bind$2(promise.then, promise);
|
|
1573
1454
|
notify$1 = function () {
|
|
1574
1455
|
then(flush);
|
|
1575
1456
|
};
|
|
1576
1457
|
// Node.js without promises
|
|
1577
|
-
} else if (IS_NODE$
|
|
1458
|
+
} else if (IS_NODE$3) {
|
|
1578
1459
|
notify$1 = function () {
|
|
1579
1460
|
process$1.nextTick(flush);
|
|
1580
1461
|
};
|
|
1581
1462
|
// for other environments - macrotask based on:
|
|
1582
1463
|
// - setImmediate
|
|
1583
1464
|
// - MessageChannel
|
|
1584
|
-
// - window.
|
|
1465
|
+
// - window.postMessage
|
|
1585
1466
|
// - onreadystatechange
|
|
1586
1467
|
// - setTimeout
|
|
1587
1468
|
} else {
|
|
1588
1469
|
// strange IE + webpack dev server bug - use .bind(global)
|
|
1589
|
-
macrotask = bind$
|
|
1470
|
+
macrotask = bind$2(macrotask, global$a);
|
|
1590
1471
|
notify$1 = function () {
|
|
1591
1472
|
macrotask(flush);
|
|
1592
1473
|
};
|
|
@@ -1602,50 +1483,16 @@ var microtask$1 = queueMicrotask || function (fn) {
|
|
|
1602
1483
|
} last = task;
|
|
1603
1484
|
};
|
|
1604
1485
|
|
|
1605
|
-
var
|
|
1606
|
-
|
|
1607
|
-
var aCallable$2 = aCallable$6;
|
|
1608
|
-
|
|
1609
|
-
var PromiseCapability = function (C) {
|
|
1610
|
-
var resolve, reject;
|
|
1611
|
-
this.promise = new C(function ($$resolve, $$reject) {
|
|
1612
|
-
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
|
|
1613
|
-
resolve = $$resolve;
|
|
1614
|
-
reject = $$reject;
|
|
1615
|
-
});
|
|
1616
|
-
this.resolve = aCallable$2(resolve);
|
|
1617
|
-
this.reject = aCallable$2(reject);
|
|
1618
|
-
};
|
|
1619
|
-
|
|
1620
|
-
// `NewPromiseCapability` abstract operation
|
|
1621
|
-
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
1622
|
-
newPromiseCapability$2.f = function (C) {
|
|
1623
|
-
return new PromiseCapability(C);
|
|
1624
|
-
};
|
|
1625
|
-
|
|
1626
|
-
var anObject$6 = anObject$e;
|
|
1627
|
-
var isObject$2 = isObject$8;
|
|
1628
|
-
var newPromiseCapability$1 = newPromiseCapability$2;
|
|
1629
|
-
|
|
1630
|
-
var promiseResolve$1 = function (C, x) {
|
|
1631
|
-
anObject$6(C);
|
|
1632
|
-
if (isObject$2(x) && x.constructor === C) return x;
|
|
1633
|
-
var promiseCapability = newPromiseCapability$1.f(C);
|
|
1634
|
-
var resolve = promiseCapability.resolve;
|
|
1635
|
-
resolve(x);
|
|
1636
|
-
return promiseCapability.promise;
|
|
1637
|
-
};
|
|
1638
|
-
|
|
1639
|
-
var global$d = global$K;
|
|
1486
|
+
var global$9 = global$n;
|
|
1640
1487
|
|
|
1641
1488
|
var hostReportErrors$1 = function (a, b) {
|
|
1642
|
-
var console = global$
|
|
1489
|
+
var console = global$9.console;
|
|
1643
1490
|
if (console && console.error) {
|
|
1644
1491
|
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
1645
1492
|
}
|
|
1646
1493
|
};
|
|
1647
1494
|
|
|
1648
|
-
var perform$
|
|
1495
|
+
var perform$3 = function (exec) {
|
|
1649
1496
|
try {
|
|
1650
1497
|
return { error: false, value: exec() };
|
|
1651
1498
|
} catch (error) {
|
|
@@ -1677,57 +1524,128 @@ Queue$1.prototype = {
|
|
|
1677
1524
|
|
|
1678
1525
|
var queue = Queue$1;
|
|
1679
1526
|
|
|
1680
|
-
var
|
|
1527
|
+
var global$8 = global$n;
|
|
1681
1528
|
|
|
1682
|
-
var
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
var
|
|
1687
|
-
|
|
1688
|
-
var
|
|
1529
|
+
var promiseNativeConstructor = global$8.Promise;
|
|
1530
|
+
|
|
1531
|
+
/* global Deno -- Deno case */
|
|
1532
|
+
|
|
1533
|
+
var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
|
|
1534
|
+
|
|
1535
|
+
var IS_DENO$1 = engineIsDeno;
|
|
1536
|
+
var IS_NODE$2 = engineIsNode;
|
|
1537
|
+
|
|
1538
|
+
var engineIsBrowser = !IS_DENO$1 && !IS_NODE$2
|
|
1539
|
+
&& typeof window == 'object'
|
|
1540
|
+
&& typeof document == 'object';
|
|
1541
|
+
|
|
1542
|
+
var global$7 = global$n;
|
|
1543
|
+
var NativePromiseConstructor$3 = promiseNativeConstructor;
|
|
1544
|
+
var isCallable$7 = isCallable$m;
|
|
1545
|
+
var isForced = isForced_1;
|
|
1546
|
+
var inspectSource = inspectSource$3;
|
|
1547
|
+
var wellKnownSymbol$b = wellKnownSymbol$i;
|
|
1548
|
+
var IS_BROWSER = engineIsBrowser;
|
|
1549
|
+
var IS_DENO = engineIsDeno;
|
|
1550
|
+
var V8_VERSION = engineV8Version;
|
|
1551
|
+
|
|
1552
|
+
NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
|
|
1553
|
+
var SPECIES$1 = wellKnownSymbol$b('species');
|
|
1554
|
+
var SUBCLASSING = false;
|
|
1555
|
+
var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$7(global$7.PromiseRejectionEvent);
|
|
1556
|
+
|
|
1557
|
+
var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
|
|
1558
|
+
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
|
|
1559
|
+
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
|
|
1560
|
+
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
1561
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
1562
|
+
// We can't detect it synchronously, so just check versions
|
|
1563
|
+
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
1564
|
+
// We can't use @@species feature detection in V8 since it causes
|
|
1565
|
+
// deoptimization and performance degradation
|
|
1566
|
+
// https://github.com/zloirock/core-js/issues/679
|
|
1567
|
+
if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
|
|
1568
|
+
// Detect correctness of subclassing with @@species support
|
|
1569
|
+
var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
|
|
1570
|
+
var FakePromise = function (exec) {
|
|
1571
|
+
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1572
|
+
};
|
|
1573
|
+
var constructor = promise.constructor = {};
|
|
1574
|
+
constructor[SPECIES$1] = FakePromise;
|
|
1575
|
+
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1576
|
+
if (!SUBCLASSING) return true;
|
|
1577
|
+
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
1578
|
+
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
|
|
1579
|
+
});
|
|
1580
|
+
|
|
1581
|
+
var promiseConstructorDetection = {
|
|
1582
|
+
CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
|
|
1583
|
+
REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
|
|
1584
|
+
SUBCLASSING: SUBCLASSING
|
|
1585
|
+
};
|
|
1586
|
+
|
|
1587
|
+
var newPromiseCapability$2 = {};
|
|
1588
|
+
|
|
1589
|
+
var aCallable$5 = aCallable$8;
|
|
1590
|
+
|
|
1591
|
+
var $TypeError$5 = TypeError;
|
|
1592
|
+
|
|
1593
|
+
var PromiseCapability = function (C) {
|
|
1594
|
+
var resolve, reject;
|
|
1595
|
+
this.promise = new C(function ($$resolve, $$reject) {
|
|
1596
|
+
if (resolve !== undefined || reject !== undefined) throw $TypeError$5('Bad Promise constructor');
|
|
1597
|
+
resolve = $$resolve;
|
|
1598
|
+
reject = $$reject;
|
|
1599
|
+
});
|
|
1600
|
+
this.resolve = aCallable$5(resolve);
|
|
1601
|
+
this.reject = aCallable$5(reject);
|
|
1602
|
+
};
|
|
1603
|
+
|
|
1604
|
+
// `NewPromiseCapability` abstract operation
|
|
1605
|
+
// https://tc39.es/ecma262/#sec-newpromisecapability
|
|
1606
|
+
newPromiseCapability$2.f = function (C) {
|
|
1607
|
+
return new PromiseCapability(C);
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
var $$d = _export;
|
|
1611
|
+
var IS_NODE$1 = engineIsNode;
|
|
1612
|
+
var global$6 = global$n;
|
|
1613
|
+
var call$c = functionCall;
|
|
1614
|
+
var defineBuiltIn$5 = defineBuiltIn$7;
|
|
1689
1615
|
var setPrototypeOf$1 = objectSetPrototypeOf;
|
|
1690
1616
|
var setToStringTag$2 = setToStringTag$3;
|
|
1691
1617
|
var setSpecies = setSpecies$1;
|
|
1692
|
-
var aCallable$
|
|
1693
|
-
var isCallable$
|
|
1694
|
-
var isObject$
|
|
1618
|
+
var aCallable$4 = aCallable$8;
|
|
1619
|
+
var isCallable$6 = isCallable$m;
|
|
1620
|
+
var isObject$3 = isObject$9;
|
|
1695
1621
|
var anInstance = anInstance$1;
|
|
1696
|
-
var
|
|
1697
|
-
var iterate = iterate$1;
|
|
1698
|
-
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
1699
|
-
var speciesConstructor$1 = speciesConstructor$2;
|
|
1622
|
+
var speciesConstructor = speciesConstructor$1;
|
|
1700
1623
|
var task = task$1.set;
|
|
1701
1624
|
var microtask = microtask$1;
|
|
1702
|
-
var promiseResolve = promiseResolve$1;
|
|
1703
1625
|
var hostReportErrors = hostReportErrors$1;
|
|
1704
|
-
var
|
|
1705
|
-
var perform = perform$1;
|
|
1626
|
+
var perform$2 = perform$3;
|
|
1706
1627
|
var Queue = queue;
|
|
1707
1628
|
var InternalStateModule$1 = internalState;
|
|
1708
|
-
var
|
|
1709
|
-
var
|
|
1710
|
-
var
|
|
1711
|
-
var IS_NODE$1 = engineIsNode;
|
|
1712
|
-
var V8_VERSION = engineV8Version;
|
|
1629
|
+
var NativePromiseConstructor$2 = promiseNativeConstructor;
|
|
1630
|
+
var PromiseConstructorDetection = promiseConstructorDetection;
|
|
1631
|
+
var newPromiseCapabilityModule$3 = newPromiseCapability$2;
|
|
1713
1632
|
|
|
1714
|
-
var SPECIES$1 = wellKnownSymbol$8('species');
|
|
1715
1633
|
var PROMISE = 'Promise';
|
|
1716
|
-
|
|
1717
|
-
var
|
|
1718
|
-
var
|
|
1634
|
+
var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
|
|
1635
|
+
var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
|
|
1636
|
+
var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
|
|
1719
1637
|
var getInternalPromiseState = InternalStateModule$1.getterFor(PROMISE);
|
|
1720
|
-
var
|
|
1721
|
-
var
|
|
1722
|
-
var
|
|
1723
|
-
var
|
|
1724
|
-
var
|
|
1725
|
-
var
|
|
1726
|
-
var
|
|
1727
|
-
var
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
var
|
|
1638
|
+
var setInternalState$1 = InternalStateModule$1.set;
|
|
1639
|
+
var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
|
|
1640
|
+
var PromiseConstructor = NativePromiseConstructor$2;
|
|
1641
|
+
var PromisePrototype = NativePromisePrototype$1;
|
|
1642
|
+
var TypeError$1 = global$6.TypeError;
|
|
1643
|
+
var document$1 = global$6.document;
|
|
1644
|
+
var process = global$6.process;
|
|
1645
|
+
var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
|
|
1646
|
+
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
1647
|
+
|
|
1648
|
+
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$6.dispatchEvent);
|
|
1731
1649
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
1732
1650
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
1733
1651
|
var PENDING = 0;
|
|
@@ -1735,42 +1653,13 @@ var FULFILLED = 1;
|
|
|
1735
1653
|
var REJECTED = 2;
|
|
1736
1654
|
var HANDLED = 1;
|
|
1737
1655
|
var UNHANDLED = 2;
|
|
1738
|
-
var SUBCLASSING = false;
|
|
1739
1656
|
|
|
1740
1657
|
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
1741
1658
|
|
|
1742
|
-
var FORCED$1 = isForced(PROMISE, function () {
|
|
1743
|
-
var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
|
|
1744
|
-
var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
|
|
1745
|
-
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
1746
|
-
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
1747
|
-
// We can't detect it synchronously, so just check versions
|
|
1748
|
-
if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
|
|
1749
|
-
// We can't use @@species feature detection in V8 since it causes
|
|
1750
|
-
// deoptimization and performance degradation
|
|
1751
|
-
// https://github.com/zloirock/core-js/issues/679
|
|
1752
|
-
if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
|
|
1753
|
-
// Detect correctness of subclassing with @@species support
|
|
1754
|
-
var promise = new PromiseConstructor(function (resolve) { resolve(1); });
|
|
1755
|
-
var FakePromise = function (exec) {
|
|
1756
|
-
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1757
|
-
};
|
|
1758
|
-
var constructor = promise.constructor = {};
|
|
1759
|
-
constructor[SPECIES$1] = FakePromise;
|
|
1760
|
-
SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
|
|
1761
|
-
if (!SUBCLASSING) return true;
|
|
1762
|
-
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
1763
|
-
return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
|
|
1764
|
-
});
|
|
1765
|
-
|
|
1766
|
-
var INCORRECT_ITERATION = FORCED$1 || !checkCorrectnessOfIteration(function (iterable) {
|
|
1767
|
-
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
|
|
1768
|
-
});
|
|
1769
|
-
|
|
1770
1659
|
// helpers
|
|
1771
1660
|
var isThenable = function (it) {
|
|
1772
1661
|
var then;
|
|
1773
|
-
return isObject$
|
|
1662
|
+
return isObject$3(it) && isCallable$6(then = it.then) ? then : false;
|
|
1774
1663
|
};
|
|
1775
1664
|
|
|
1776
1665
|
var callReaction = function (reaction, state) {
|
|
@@ -1797,9 +1686,9 @@ var callReaction = function (reaction, state) {
|
|
|
1797
1686
|
}
|
|
1798
1687
|
}
|
|
1799
1688
|
if (result === reaction.promise) {
|
|
1800
|
-
reject(TypeError$
|
|
1689
|
+
reject(TypeError$1('Promise-chain cycle'));
|
|
1801
1690
|
} else if (then = isThenable(result)) {
|
|
1802
|
-
call$
|
|
1691
|
+
call$c(then, result, resolve, reject);
|
|
1803
1692
|
} else resolve(result);
|
|
1804
1693
|
} else reject(value);
|
|
1805
1694
|
} catch (error) {
|
|
@@ -1829,20 +1718,20 @@ var dispatchEvent = function (name, promise, reason) {
|
|
|
1829
1718
|
event.promise = promise;
|
|
1830
1719
|
event.reason = reason;
|
|
1831
1720
|
event.initEvent(name, false, true);
|
|
1832
|
-
global$
|
|
1721
|
+
global$6.dispatchEvent(event);
|
|
1833
1722
|
} else event = { promise: promise, reason: reason };
|
|
1834
|
-
if (!
|
|
1723
|
+
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$6['on' + name])) handler(event);
|
|
1835
1724
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
1836
1725
|
};
|
|
1837
1726
|
|
|
1838
1727
|
var onUnhandled = function (state) {
|
|
1839
|
-
call$
|
|
1728
|
+
call$c(task, global$6, function () {
|
|
1840
1729
|
var promise = state.facade;
|
|
1841
1730
|
var value = state.value;
|
|
1842
1731
|
var IS_UNHANDLED = isUnhandled(state);
|
|
1843
1732
|
var result;
|
|
1844
1733
|
if (IS_UNHANDLED) {
|
|
1845
|
-
result = perform(function () {
|
|
1734
|
+
result = perform$2(function () {
|
|
1846
1735
|
if (IS_NODE$1) {
|
|
1847
1736
|
process.emit('unhandledRejection', value, promise);
|
|
1848
1737
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
@@ -1859,7 +1748,7 @@ var isUnhandled = function (state) {
|
|
|
1859
1748
|
};
|
|
1860
1749
|
|
|
1861
1750
|
var onHandleUnhandled = function (state) {
|
|
1862
|
-
call$
|
|
1751
|
+
call$c(task, global$6, function () {
|
|
1863
1752
|
var promise = state.facade;
|
|
1864
1753
|
if (IS_NODE$1) {
|
|
1865
1754
|
process.emit('rejectionHandled', promise);
|
|
@@ -1867,7 +1756,7 @@ var onHandleUnhandled = function (state) {
|
|
|
1867
1756
|
});
|
|
1868
1757
|
};
|
|
1869
1758
|
|
|
1870
|
-
var bind = function (fn, state, unwrap) {
|
|
1759
|
+
var bind$1 = function (fn, state, unwrap) {
|
|
1871
1760
|
return function (value) {
|
|
1872
1761
|
fn(state, value, unwrap);
|
|
1873
1762
|
};
|
|
@@ -1887,15 +1776,15 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1887
1776
|
state.done = true;
|
|
1888
1777
|
if (unwrap) state = unwrap;
|
|
1889
1778
|
try {
|
|
1890
|
-
if (state.facade === value) throw TypeError$
|
|
1779
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
1891
1780
|
var then = isThenable(value);
|
|
1892
1781
|
if (then) {
|
|
1893
1782
|
microtask(function () {
|
|
1894
1783
|
var wrapper = { done: false };
|
|
1895
1784
|
try {
|
|
1896
|
-
call$
|
|
1897
|
-
bind(internalResolve, wrapper, state),
|
|
1898
|
-
bind(internalReject, wrapper, state)
|
|
1785
|
+
call$c(then, value,
|
|
1786
|
+
bind$1(internalResolve, wrapper, state),
|
|
1787
|
+
bind$1(internalReject, wrapper, state)
|
|
1899
1788
|
);
|
|
1900
1789
|
} catch (error) {
|
|
1901
1790
|
internalReject(wrapper, error, state);
|
|
@@ -1912,20 +1801,22 @@ var internalResolve = function (state, value, unwrap) {
|
|
|
1912
1801
|
};
|
|
1913
1802
|
|
|
1914
1803
|
// constructor polyfill
|
|
1915
|
-
if (
|
|
1804
|
+
if (FORCED_PROMISE_CONSTRUCTOR$4) {
|
|
1916
1805
|
// 25.4.3.1 Promise(executor)
|
|
1917
1806
|
PromiseConstructor = function Promise(executor) {
|
|
1918
1807
|
anInstance(this, PromisePrototype);
|
|
1919
|
-
aCallable$
|
|
1920
|
-
call$
|
|
1921
|
-
var state =
|
|
1808
|
+
aCallable$4(executor);
|
|
1809
|
+
call$c(Internal, this);
|
|
1810
|
+
var state = getInternalPromiseState(this);
|
|
1922
1811
|
try {
|
|
1923
|
-
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
1812
|
+
executor(bind$1(internalResolve, state), bind$1(internalReject, state));
|
|
1924
1813
|
} catch (error) {
|
|
1925
1814
|
internalReject(state, error);
|
|
1926
1815
|
}
|
|
1927
1816
|
};
|
|
1817
|
+
|
|
1928
1818
|
PromisePrototype = PromiseConstructor.prototype;
|
|
1819
|
+
|
|
1929
1820
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1930
1821
|
Internal = function Promise(executor) {
|
|
1931
1822
|
setInternalState$1(this, {
|
|
@@ -1939,117 +1830,277 @@ if (FORCED$1) {
|
|
|
1939
1830
|
value: undefined
|
|
1940
1831
|
});
|
|
1941
1832
|
};
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
return reaction.promise;
|
|
1958
|
-
},
|
|
1959
|
-
// `Promise.prototype.catch` method
|
|
1960
|
-
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
1961
|
-
'catch': function (onRejected) {
|
|
1962
|
-
return this.then(undefined, onRejected);
|
|
1963
|
-
}
|
|
1833
|
+
|
|
1834
|
+
// `Promise.prototype.then` method
|
|
1835
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
1836
|
+
Internal.prototype = defineBuiltIn$5(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
1837
|
+
var state = getInternalPromiseState(this);
|
|
1838
|
+
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
1839
|
+
state.parent = true;
|
|
1840
|
+
reaction.ok = isCallable$6(onFulfilled) ? onFulfilled : true;
|
|
1841
|
+
reaction.fail = isCallable$6(onRejected) && onRejected;
|
|
1842
|
+
reaction.domain = IS_NODE$1 ? process.domain : undefined;
|
|
1843
|
+
if (state.state == PENDING) state.reactions.add(reaction);
|
|
1844
|
+
else microtask(function () {
|
|
1845
|
+
callReaction(reaction, state);
|
|
1846
|
+
});
|
|
1847
|
+
return reaction.promise;
|
|
1964
1848
|
});
|
|
1849
|
+
|
|
1965
1850
|
OwnPromiseCapability = function () {
|
|
1966
1851
|
var promise = new Internal();
|
|
1967
|
-
var state =
|
|
1852
|
+
var state = getInternalPromiseState(promise);
|
|
1968
1853
|
this.promise = promise;
|
|
1969
|
-
this.resolve = bind(internalResolve, state);
|
|
1970
|
-
this.reject = bind(internalReject, state);
|
|
1854
|
+
this.resolve = bind$1(internalResolve, state);
|
|
1855
|
+
this.reject = bind$1(internalReject, state);
|
|
1971
1856
|
};
|
|
1972
|
-
|
|
1857
|
+
|
|
1858
|
+
newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
|
|
1973
1859
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
1974
1860
|
? new OwnPromiseCapability(C)
|
|
1975
1861
|
: newGenericPromiseCapability(C);
|
|
1976
1862
|
};
|
|
1977
1863
|
|
|
1978
|
-
if (isCallable$
|
|
1979
|
-
nativeThen = NativePromisePrototype.then;
|
|
1864
|
+
if (isCallable$6(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
|
|
1865
|
+
nativeThen = NativePromisePrototype$1.then;
|
|
1980
1866
|
|
|
1981
|
-
if (!
|
|
1867
|
+
if (!NATIVE_PROMISE_SUBCLASSING) {
|
|
1982
1868
|
// make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
|
|
1983
|
-
|
|
1869
|
+
defineBuiltIn$5(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
|
|
1984
1870
|
var that = this;
|
|
1985
1871
|
return new PromiseConstructor(function (resolve, reject) {
|
|
1986
|
-
call$
|
|
1872
|
+
call$c(nativeThen, that, resolve, reject);
|
|
1987
1873
|
}).then(onFulfilled, onRejected);
|
|
1988
1874
|
// https://github.com/zloirock/core-js/issues/640
|
|
1989
1875
|
}, { unsafe: true });
|
|
1990
|
-
|
|
1991
|
-
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
1992
|
-
redefine$3(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
1993
1876
|
}
|
|
1994
1877
|
|
|
1995
1878
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
1996
1879
|
try {
|
|
1997
|
-
delete NativePromisePrototype.constructor;
|
|
1880
|
+
delete NativePromisePrototype$1.constructor;
|
|
1998
1881
|
} catch (error) { /* empty */ }
|
|
1999
1882
|
|
|
2000
1883
|
// make `instanceof Promise` work for native promise-based APIs
|
|
2001
1884
|
if (setPrototypeOf$1) {
|
|
2002
|
-
setPrototypeOf$1(NativePromisePrototype, PromisePrototype);
|
|
1885
|
+
setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
|
|
2003
1886
|
}
|
|
2004
1887
|
}
|
|
2005
1888
|
}
|
|
2006
1889
|
|
|
2007
|
-
$$
|
|
1890
|
+
$$d({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
|
|
2008
1891
|
Promise: PromiseConstructor
|
|
2009
1892
|
});
|
|
2010
1893
|
|
|
2011
1894
|
setToStringTag$2(PromiseConstructor, PROMISE, false);
|
|
2012
1895
|
setSpecies(PROMISE);
|
|
2013
1896
|
|
|
2014
|
-
|
|
1897
|
+
var iterators = {};
|
|
2015
1898
|
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
1899
|
+
var wellKnownSymbol$a = wellKnownSymbol$i;
|
|
1900
|
+
var Iterators$4 = iterators;
|
|
1901
|
+
|
|
1902
|
+
var ITERATOR$6 = wellKnownSymbol$a('iterator');
|
|
1903
|
+
var ArrayPrototype$1 = Array.prototype;
|
|
1904
|
+
|
|
1905
|
+
// check on default Array iterator
|
|
1906
|
+
var isArrayIteratorMethod$1 = function (it) {
|
|
1907
|
+
return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$6] === it);
|
|
1908
|
+
};
|
|
1909
|
+
|
|
1910
|
+
var classof$3 = classof$5;
|
|
1911
|
+
var getMethod$2 = getMethod$4;
|
|
1912
|
+
var isNullOrUndefined$1 = isNullOrUndefined$5;
|
|
1913
|
+
var Iterators$3 = iterators;
|
|
1914
|
+
var wellKnownSymbol$9 = wellKnownSymbol$i;
|
|
1915
|
+
|
|
1916
|
+
var ITERATOR$5 = wellKnownSymbol$9('iterator');
|
|
1917
|
+
|
|
1918
|
+
var getIteratorMethod$2 = function (it) {
|
|
1919
|
+
if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$5)
|
|
1920
|
+
|| getMethod$2(it, '@@iterator')
|
|
1921
|
+
|| Iterators$3[classof$3(it)];
|
|
1922
|
+
};
|
|
1923
|
+
|
|
1924
|
+
var call$b = functionCall;
|
|
1925
|
+
var aCallable$3 = aCallable$8;
|
|
1926
|
+
var anObject$9 = anObject$e;
|
|
1927
|
+
var tryToString$1 = tryToString$4;
|
|
1928
|
+
var getIteratorMethod$1 = getIteratorMethod$2;
|
|
1929
|
+
|
|
1930
|
+
var $TypeError$4 = TypeError;
|
|
1931
|
+
|
|
1932
|
+
var getIterator$1 = function (argument, usingIterator) {
|
|
1933
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
|
|
1934
|
+
if (aCallable$3(iteratorMethod)) return anObject$9(call$b(iteratorMethod, argument));
|
|
1935
|
+
throw $TypeError$4(tryToString$1(argument) + ' is not iterable');
|
|
1936
|
+
};
|
|
1937
|
+
|
|
1938
|
+
var call$a = functionCall;
|
|
1939
|
+
var anObject$8 = anObject$e;
|
|
1940
|
+
var getMethod$1 = getMethod$4;
|
|
1941
|
+
|
|
1942
|
+
var iteratorClose$1 = function (iterator, kind, value) {
|
|
1943
|
+
var innerResult, innerError;
|
|
1944
|
+
anObject$8(iterator);
|
|
1945
|
+
try {
|
|
1946
|
+
innerResult = getMethod$1(iterator, 'return');
|
|
1947
|
+
if (!innerResult) {
|
|
1948
|
+
if (kind === 'throw') throw value;
|
|
1949
|
+
return value;
|
|
1950
|
+
}
|
|
1951
|
+
innerResult = call$a(innerResult, iterator);
|
|
1952
|
+
} catch (error) {
|
|
1953
|
+
innerError = true;
|
|
1954
|
+
innerResult = error;
|
|
2024
1955
|
}
|
|
2025
|
-
|
|
1956
|
+
if (kind === 'throw') throw value;
|
|
1957
|
+
if (innerError) throw innerResult;
|
|
1958
|
+
anObject$8(innerResult);
|
|
1959
|
+
return value;
|
|
1960
|
+
};
|
|
2026
1961
|
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
1962
|
+
var bind = functionBindContext;
|
|
1963
|
+
var call$9 = functionCall;
|
|
1964
|
+
var anObject$7 = anObject$e;
|
|
1965
|
+
var tryToString = tryToString$4;
|
|
1966
|
+
var isArrayIteratorMethod = isArrayIteratorMethod$1;
|
|
1967
|
+
var lengthOfArrayLike$1 = lengthOfArrayLike$3;
|
|
1968
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1969
|
+
var getIterator = getIterator$1;
|
|
1970
|
+
var getIteratorMethod = getIteratorMethod$2;
|
|
1971
|
+
var iteratorClose = iteratorClose$1;
|
|
1972
|
+
|
|
1973
|
+
var $TypeError$3 = TypeError;
|
|
1974
|
+
|
|
1975
|
+
var Result = function (stopped, result) {
|
|
1976
|
+
this.stopped = stopped;
|
|
1977
|
+
this.result = result;
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
var ResultPrototype = Result.prototype;
|
|
1981
|
+
|
|
1982
|
+
var iterate$2 = function (iterable, unboundFunction, options) {
|
|
1983
|
+
var that = options && options.that;
|
|
1984
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
1985
|
+
var IS_RECORD = !!(options && options.IS_RECORD);
|
|
1986
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
1987
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
1988
|
+
var fn = bind(unboundFunction, that);
|
|
1989
|
+
var iterator, iterFn, index, length, result, next, step;
|
|
1990
|
+
|
|
1991
|
+
var stop = function (condition) {
|
|
1992
|
+
if (iterator) iteratorClose(iterator, 'normal', condition);
|
|
1993
|
+
return new Result(true, condition);
|
|
1994
|
+
};
|
|
1995
|
+
|
|
1996
|
+
var callFn = function (value) {
|
|
1997
|
+
if (AS_ENTRIES) {
|
|
1998
|
+
anObject$7(value);
|
|
1999
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
2000
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
2001
|
+
};
|
|
2002
|
+
|
|
2003
|
+
if (IS_RECORD) {
|
|
2004
|
+
iterator = iterable.iterator;
|
|
2005
|
+
} else if (IS_ITERATOR) {
|
|
2006
|
+
iterator = iterable;
|
|
2007
|
+
} else {
|
|
2008
|
+
iterFn = getIteratorMethod(iterable);
|
|
2009
|
+
if (!iterFn) throw $TypeError$3(tryToString(iterable) + ' is not iterable');
|
|
2010
|
+
// optimisation for array iterators
|
|
2011
|
+
if (isArrayIteratorMethod(iterFn)) {
|
|
2012
|
+
for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
|
|
2013
|
+
result = callFn(iterable[index]);
|
|
2014
|
+
if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
|
|
2015
|
+
} return new Result(false);
|
|
2016
|
+
}
|
|
2017
|
+
iterator = getIterator(iterable, iterFn);
|
|
2032
2018
|
}
|
|
2019
|
+
|
|
2020
|
+
next = IS_RECORD ? iterable.next : iterator.next;
|
|
2021
|
+
while (!(step = call$9(next, iterator)).done) {
|
|
2022
|
+
try {
|
|
2023
|
+
result = callFn(step.value);
|
|
2024
|
+
} catch (error) {
|
|
2025
|
+
iteratorClose(iterator, 'throw', error);
|
|
2026
|
+
}
|
|
2027
|
+
if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
|
|
2028
|
+
} return new Result(false);
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
var wellKnownSymbol$8 = wellKnownSymbol$i;
|
|
2032
|
+
|
|
2033
|
+
var ITERATOR$4 = wellKnownSymbol$8('iterator');
|
|
2034
|
+
var SAFE_CLOSING = false;
|
|
2035
|
+
|
|
2036
|
+
try {
|
|
2037
|
+
var called = 0;
|
|
2038
|
+
var iteratorWithReturn = {
|
|
2039
|
+
next: function () {
|
|
2040
|
+
return { done: !!called++ };
|
|
2041
|
+
},
|
|
2042
|
+
'return': function () {
|
|
2043
|
+
SAFE_CLOSING = true;
|
|
2044
|
+
}
|
|
2045
|
+
};
|
|
2046
|
+
iteratorWithReturn[ITERATOR$4] = function () {
|
|
2047
|
+
return this;
|
|
2048
|
+
};
|
|
2049
|
+
// eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
|
|
2050
|
+
Array.from(iteratorWithReturn, function () { throw 2; });
|
|
2051
|
+
} catch (error) { /* empty */ }
|
|
2052
|
+
|
|
2053
|
+
var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
|
|
2054
|
+
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
|
|
2055
|
+
var ITERATION_SUPPORT = false;
|
|
2056
|
+
try {
|
|
2057
|
+
var object = {};
|
|
2058
|
+
object[ITERATOR$4] = function () {
|
|
2059
|
+
return {
|
|
2060
|
+
next: function () {
|
|
2061
|
+
return { done: ITERATION_SUPPORT = true };
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
};
|
|
2065
|
+
exec(object);
|
|
2066
|
+
} catch (error) { /* empty */ }
|
|
2067
|
+
return ITERATION_SUPPORT;
|
|
2068
|
+
};
|
|
2069
|
+
|
|
2070
|
+
var NativePromiseConstructor$1 = promiseNativeConstructor;
|
|
2071
|
+
var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
|
|
2072
|
+
var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2073
|
+
|
|
2074
|
+
var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
|
|
2075
|
+
NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
|
|
2033
2076
|
});
|
|
2034
2077
|
|
|
2035
|
-
$$
|
|
2036
|
-
|
|
2037
|
-
|
|
2078
|
+
var $$c = _export;
|
|
2079
|
+
var call$8 = functionCall;
|
|
2080
|
+
var aCallable$2 = aCallable$8;
|
|
2081
|
+
var newPromiseCapabilityModule$2 = newPromiseCapability$2;
|
|
2082
|
+
var perform$1 = perform$3;
|
|
2083
|
+
var iterate$1 = iterate$2;
|
|
2084
|
+
var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
|
|
2085
|
+
|
|
2086
|
+
// `Promise.all` method
|
|
2087
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
2088
|
+
$$c({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
|
|
2038
2089
|
all: function all(iterable) {
|
|
2039
2090
|
var C = this;
|
|
2040
|
-
var capability =
|
|
2091
|
+
var capability = newPromiseCapabilityModule$2.f(C);
|
|
2041
2092
|
var resolve = capability.resolve;
|
|
2042
2093
|
var reject = capability.reject;
|
|
2043
|
-
var result = perform(function () {
|
|
2044
|
-
var $promiseResolve = aCallable$
|
|
2094
|
+
var result = perform$1(function () {
|
|
2095
|
+
var $promiseResolve = aCallable$2(C.resolve);
|
|
2045
2096
|
var values = [];
|
|
2046
2097
|
var counter = 0;
|
|
2047
2098
|
var remaining = 1;
|
|
2048
|
-
iterate(iterable, function (promise) {
|
|
2099
|
+
iterate$1(iterable, function (promise) {
|
|
2049
2100
|
var index = counter++;
|
|
2050
2101
|
var alreadyCalled = false;
|
|
2051
2102
|
remaining++;
|
|
2052
|
-
call$
|
|
2103
|
+
call$8($promiseResolve, C, promise).then(function (value) {
|
|
2053
2104
|
if (alreadyCalled) return;
|
|
2054
2105
|
alreadyCalled = true;
|
|
2055
2106
|
values[index] = value;
|
|
@@ -2060,17 +2111,53 @@ $$7({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
2060
2111
|
});
|
|
2061
2112
|
if (result.error) reject(result.value);
|
|
2062
2113
|
return capability.promise;
|
|
2063
|
-
}
|
|
2064
|
-
|
|
2065
|
-
|
|
2114
|
+
}
|
|
2115
|
+
});
|
|
2116
|
+
|
|
2117
|
+
var $$b = _export;
|
|
2118
|
+
var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2119
|
+
var NativePromiseConstructor = promiseNativeConstructor;
|
|
2120
|
+
var getBuiltIn$1 = getBuiltIn$8;
|
|
2121
|
+
var isCallable$5 = isCallable$m;
|
|
2122
|
+
var defineBuiltIn$4 = defineBuiltIn$7;
|
|
2123
|
+
|
|
2124
|
+
var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
|
|
2125
|
+
|
|
2126
|
+
// `Promise.prototype.catch` method
|
|
2127
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
2128
|
+
$$b({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
|
|
2129
|
+
'catch': function (onRejected) {
|
|
2130
|
+
return this.then(undefined, onRejected);
|
|
2131
|
+
}
|
|
2132
|
+
});
|
|
2133
|
+
|
|
2134
|
+
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
2135
|
+
if (isCallable$5(NativePromiseConstructor)) {
|
|
2136
|
+
var method = getBuiltIn$1('Promise').prototype['catch'];
|
|
2137
|
+
if (NativePromisePrototype['catch'] !== method) {
|
|
2138
|
+
defineBuiltIn$4(NativePromisePrototype, 'catch', method, { unsafe: true });
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
var $$a = _export;
|
|
2143
|
+
var call$7 = functionCall;
|
|
2144
|
+
var aCallable$1 = aCallable$8;
|
|
2145
|
+
var newPromiseCapabilityModule$1 = newPromiseCapability$2;
|
|
2146
|
+
var perform = perform$3;
|
|
2147
|
+
var iterate = iterate$2;
|
|
2148
|
+
var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
|
|
2149
|
+
|
|
2150
|
+
// `Promise.race` method
|
|
2151
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
2152
|
+
$$a({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
|
|
2066
2153
|
race: function race(iterable) {
|
|
2067
2154
|
var C = this;
|
|
2068
|
-
var capability =
|
|
2155
|
+
var capability = newPromiseCapabilityModule$1.f(C);
|
|
2069
2156
|
var reject = capability.reject;
|
|
2070
2157
|
var result = perform(function () {
|
|
2071
2158
|
var $promiseResolve = aCallable$1(C.resolve);
|
|
2072
2159
|
iterate(iterable, function (promise) {
|
|
2073
|
-
call$
|
|
2160
|
+
call$7($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
2074
2161
|
});
|
|
2075
2162
|
});
|
|
2076
2163
|
if (result.error) reject(result.value);
|
|
@@ -2078,6 +2165,49 @@ $$7({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
|
2078
2165
|
}
|
|
2079
2166
|
});
|
|
2080
2167
|
|
|
2168
|
+
var $$9 = _export;
|
|
2169
|
+
var call$6 = functionCall;
|
|
2170
|
+
var newPromiseCapabilityModule = newPromiseCapability$2;
|
|
2171
|
+
var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
|
|
2172
|
+
|
|
2173
|
+
// `Promise.reject` method
|
|
2174
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
2175
|
+
$$9({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
|
|
2176
|
+
reject: function reject(r) {
|
|
2177
|
+
var capability = newPromiseCapabilityModule.f(this);
|
|
2178
|
+
call$6(capability.reject, undefined, r);
|
|
2179
|
+
return capability.promise;
|
|
2180
|
+
}
|
|
2181
|
+
});
|
|
2182
|
+
|
|
2183
|
+
var anObject$6 = anObject$e;
|
|
2184
|
+
var isObject$2 = isObject$9;
|
|
2185
|
+
var newPromiseCapability = newPromiseCapability$2;
|
|
2186
|
+
|
|
2187
|
+
var promiseResolve$1 = function (C, x) {
|
|
2188
|
+
anObject$6(C);
|
|
2189
|
+
if (isObject$2(x) && x.constructor === C) return x;
|
|
2190
|
+
var promiseCapability = newPromiseCapability.f(C);
|
|
2191
|
+
var resolve = promiseCapability.resolve;
|
|
2192
|
+
resolve(x);
|
|
2193
|
+
return promiseCapability.promise;
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
var $$8 = _export;
|
|
2197
|
+
var getBuiltIn = getBuiltIn$8;
|
|
2198
|
+
var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
|
|
2199
|
+
var promiseResolve = promiseResolve$1;
|
|
2200
|
+
|
|
2201
|
+
getBuiltIn('Promise');
|
|
2202
|
+
|
|
2203
|
+
// `Promise.resolve` method
|
|
2204
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
2205
|
+
$$8({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
|
|
2206
|
+
resolve: function resolve(x) {
|
|
2207
|
+
return promiseResolve(this, x);
|
|
2208
|
+
}
|
|
2209
|
+
});
|
|
2210
|
+
|
|
2081
2211
|
var internalObjectKeys = objectKeysInternal;
|
|
2082
2212
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
2083
2213
|
|
|
@@ -2089,9 +2219,9 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
2089
2219
|
};
|
|
2090
2220
|
|
|
2091
2221
|
var DESCRIPTORS$2 = descriptors;
|
|
2092
|
-
var uncurryThis$
|
|
2222
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
2093
2223
|
var call$5 = functionCall;
|
|
2094
|
-
var fails$
|
|
2224
|
+
var fails$b = fails$m;
|
|
2095
2225
|
var objectKeys$1 = objectKeys$2;
|
|
2096
2226
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
2097
2227
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
@@ -2101,17 +2231,17 @@ var IndexedObject$1 = indexedObject;
|
|
|
2101
2231
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
2102
2232
|
var $assign = Object.assign;
|
|
2103
2233
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
2104
|
-
var defineProperty$
|
|
2105
|
-
var concat$1 = uncurryThis$
|
|
2234
|
+
var defineProperty$2 = Object.defineProperty;
|
|
2235
|
+
var concat$1 = uncurryThis$9([].concat);
|
|
2106
2236
|
|
|
2107
2237
|
// `Object.assign` method
|
|
2108
2238
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2109
|
-
var objectAssign = !$assign || fails$
|
|
2239
|
+
var objectAssign = !$assign || fails$b(function () {
|
|
2110
2240
|
// should have correct order of operations (Edge bug)
|
|
2111
|
-
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$
|
|
2241
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
|
|
2112
2242
|
enumerable: true,
|
|
2113
2243
|
get: function () {
|
|
2114
|
-
defineProperty$
|
|
2244
|
+
defineProperty$2(this, 'b', {
|
|
2115
2245
|
value: 3,
|
|
2116
2246
|
enumerable: false
|
|
2117
2247
|
});
|
|
@@ -2145,53 +2275,201 @@ var objectAssign = !$assign || fails$a(function () {
|
|
|
2145
2275
|
} return T;
|
|
2146
2276
|
} : $assign;
|
|
2147
2277
|
|
|
2148
|
-
var $$
|
|
2278
|
+
var $$7 = _export;
|
|
2149
2279
|
var assign = objectAssign;
|
|
2150
2280
|
|
|
2151
2281
|
// `Object.assign` method
|
|
2152
2282
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
2153
2283
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
2154
|
-
$$
|
|
2284
|
+
$$7({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
2155
2285
|
assign: assign
|
|
2156
2286
|
});
|
|
2157
2287
|
|
|
2158
|
-
var
|
|
2159
|
-
|
|
2288
|
+
var objectDefineProperties = {};
|
|
2289
|
+
|
|
2290
|
+
var DESCRIPTORS$1 = descriptors;
|
|
2291
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
2292
|
+
var definePropertyModule = objectDefineProperty;
|
|
2293
|
+
var anObject$5 = anObject$e;
|
|
2294
|
+
var toIndexedObject$1 = toIndexedObject$5;
|
|
2295
|
+
var objectKeys = objectKeys$2;
|
|
2296
|
+
|
|
2297
|
+
// `Object.defineProperties` method
|
|
2298
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2299
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
2300
|
+
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2301
|
+
anObject$5(O);
|
|
2302
|
+
var props = toIndexedObject$1(Properties);
|
|
2303
|
+
var keys = objectKeys(Properties);
|
|
2304
|
+
var length = keys.length;
|
|
2305
|
+
var index = 0;
|
|
2306
|
+
var key;
|
|
2307
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
2308
|
+
return O;
|
|
2309
|
+
};
|
|
2310
|
+
|
|
2311
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
2312
|
+
|
|
2313
|
+
var anObject$4 = anObject$e;
|
|
2314
|
+
var definePropertiesModule = objectDefineProperties;
|
|
2315
|
+
var enumBugKeys = enumBugKeys$3;
|
|
2316
|
+
var hiddenKeys = hiddenKeys$4;
|
|
2317
|
+
var html = html$2;
|
|
2318
|
+
var documentCreateElement$1 = documentCreateElement$2;
|
|
2319
|
+
var sharedKey$1 = sharedKey$3;
|
|
2320
|
+
|
|
2321
|
+
var GT = '>';
|
|
2322
|
+
var LT = '<';
|
|
2323
|
+
var PROTOTYPE = 'prototype';
|
|
2324
|
+
var SCRIPT = 'script';
|
|
2325
|
+
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
2326
|
+
|
|
2327
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
2328
|
+
|
|
2329
|
+
var scriptTag = function (content) {
|
|
2330
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
2334
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
2335
|
+
activeXDocument.write(scriptTag(''));
|
|
2336
|
+
activeXDocument.close();
|
|
2337
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
2338
|
+
activeXDocument = null; // avoid memory leak
|
|
2339
|
+
return temp;
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
2343
|
+
var NullProtoObjectViaIFrame = function () {
|
|
2344
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
2345
|
+
var iframe = documentCreateElement$1('iframe');
|
|
2346
|
+
var JS = 'java' + SCRIPT + ':';
|
|
2347
|
+
var iframeDocument;
|
|
2348
|
+
iframe.style.display = 'none';
|
|
2349
|
+
html.appendChild(iframe);
|
|
2350
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
2351
|
+
iframe.src = String(JS);
|
|
2352
|
+
iframeDocument = iframe.contentWindow.document;
|
|
2353
|
+
iframeDocument.open();
|
|
2354
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
2355
|
+
iframeDocument.close();
|
|
2356
|
+
return iframeDocument.F;
|
|
2357
|
+
};
|
|
2358
|
+
|
|
2359
|
+
// Check for document.domain and active x support
|
|
2360
|
+
// No need to use active x approach when document.domain is not set
|
|
2361
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
2362
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
2363
|
+
// avoid IE GC bug
|
|
2364
|
+
var activeXDocument;
|
|
2365
|
+
var NullProtoObject = function () {
|
|
2366
|
+
try {
|
|
2367
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
2368
|
+
} catch (error) { /* ignore */ }
|
|
2369
|
+
NullProtoObject = typeof document != 'undefined'
|
|
2370
|
+
? document.domain && activeXDocument
|
|
2371
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
2372
|
+
: NullProtoObjectViaIFrame()
|
|
2373
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
2374
|
+
var length = enumBugKeys.length;
|
|
2375
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
2376
|
+
return NullProtoObject();
|
|
2377
|
+
};
|
|
2378
|
+
|
|
2379
|
+
hiddenKeys[IE_PROTO$1] = true;
|
|
2380
|
+
|
|
2381
|
+
// `Object.create` method
|
|
2382
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2383
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
2384
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
2385
|
+
var result;
|
|
2386
|
+
if (O !== null) {
|
|
2387
|
+
EmptyConstructor[PROTOTYPE] = anObject$4(O);
|
|
2388
|
+
result = new EmptyConstructor();
|
|
2389
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
2390
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
2391
|
+
result[IE_PROTO$1] = O;
|
|
2392
|
+
} else result = NullProtoObject();
|
|
2393
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
2394
|
+
};
|
|
2395
|
+
|
|
2160
2396
|
var wellKnownSymbol$7 = wellKnownSymbol$i;
|
|
2397
|
+
var create$2 = objectCreate;
|
|
2398
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
2399
|
+
|
|
2400
|
+
var UNSCOPABLES = wellKnownSymbol$7('unscopables');
|
|
2401
|
+
var ArrayPrototype = Array.prototype;
|
|
2161
2402
|
|
|
2162
|
-
|
|
2403
|
+
// Array.prototype[@@unscopables]
|
|
2404
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2405
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
2406
|
+
defineProperty$1(ArrayPrototype, UNSCOPABLES, {
|
|
2407
|
+
configurable: true,
|
|
2408
|
+
value: create$2(null)
|
|
2409
|
+
});
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
// add a key to Array.prototype[@@unscopables]
|
|
2413
|
+
var addToUnscopables$2 = function (key) {
|
|
2414
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
2415
|
+
};
|
|
2416
|
+
|
|
2417
|
+
var $$6 = _export;
|
|
2418
|
+
var $includes = arrayIncludes.includes;
|
|
2419
|
+
var fails$a = fails$m;
|
|
2420
|
+
var addToUnscopables$1 = addToUnscopables$2;
|
|
2421
|
+
|
|
2422
|
+
// FF99+ bug
|
|
2423
|
+
var BROKEN_ON_SPARSE = fails$a(function () {
|
|
2424
|
+
return !Array(1).includes();
|
|
2425
|
+
});
|
|
2426
|
+
|
|
2427
|
+
// `Array.prototype.includes` method
|
|
2428
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
2429
|
+
$$6({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
|
|
2430
|
+
includes: function includes(el /* , fromIndex = 0 */) {
|
|
2431
|
+
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
2432
|
+
}
|
|
2433
|
+
});
|
|
2434
|
+
|
|
2435
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2436
|
+
addToUnscopables$1('includes');
|
|
2437
|
+
|
|
2438
|
+
var isObject$1 = isObject$9;
|
|
2439
|
+
var classof$2 = classofRaw$2;
|
|
2440
|
+
var wellKnownSymbol$6 = wellKnownSymbol$i;
|
|
2441
|
+
|
|
2442
|
+
var MATCH$1 = wellKnownSymbol$6('match');
|
|
2163
2443
|
|
|
2164
2444
|
// `IsRegExp` abstract operation
|
|
2165
2445
|
// https://tc39.es/ecma262/#sec-isregexp
|
|
2166
2446
|
var isRegexp = function (it) {
|
|
2167
2447
|
var isRegExp;
|
|
2168
|
-
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
|
|
2448
|
+
return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
|
|
2169
2449
|
};
|
|
2170
2450
|
|
|
2171
|
-
var
|
|
2172
|
-
var isRegExp$1 = isRegexp;
|
|
2451
|
+
var isRegExp = isRegexp;
|
|
2173
2452
|
|
|
2174
|
-
var TypeError$
|
|
2453
|
+
var $TypeError$2 = TypeError;
|
|
2175
2454
|
|
|
2176
2455
|
var notARegexp = function (it) {
|
|
2177
|
-
if (isRegExp
|
|
2178
|
-
throw TypeError$
|
|
2456
|
+
if (isRegExp(it)) {
|
|
2457
|
+
throw $TypeError$2("The method doesn't accept regular expressions");
|
|
2179
2458
|
} return it;
|
|
2180
2459
|
};
|
|
2181
2460
|
|
|
2182
|
-
var
|
|
2183
|
-
var classof$1 = classof$6;
|
|
2461
|
+
var classof$1 = classof$5;
|
|
2184
2462
|
|
|
2185
|
-
var String
|
|
2463
|
+
var $String = String;
|
|
2186
2464
|
|
|
2187
|
-
var toString$
|
|
2465
|
+
var toString$7 = function (argument) {
|
|
2188
2466
|
if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
2189
|
-
return String
|
|
2467
|
+
return $String(argument);
|
|
2190
2468
|
};
|
|
2191
2469
|
|
|
2192
|
-
var wellKnownSymbol$
|
|
2470
|
+
var wellKnownSymbol$5 = wellKnownSymbol$i;
|
|
2193
2471
|
|
|
2194
|
-
var MATCH = wellKnownSymbol$
|
|
2472
|
+
var MATCH = wellKnownSymbol$5('match');
|
|
2195
2473
|
|
|
2196
2474
|
var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
2197
2475
|
var regexp = /./;
|
|
@@ -2206,27 +2484,27 @@ var correctIsRegexpLogic = function (METHOD_NAME) {
|
|
|
2206
2484
|
};
|
|
2207
2485
|
|
|
2208
2486
|
var $$5 = _export;
|
|
2209
|
-
var uncurryThis$
|
|
2487
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
2210
2488
|
var notARegExp$1 = notARegexp;
|
|
2211
|
-
var requireObjectCoercible$
|
|
2212
|
-
var toString$
|
|
2489
|
+
var requireObjectCoercible$4 = requireObjectCoercible$7;
|
|
2490
|
+
var toString$6 = toString$7;
|
|
2213
2491
|
var correctIsRegExpLogic$1 = correctIsRegexpLogic;
|
|
2214
2492
|
|
|
2215
|
-
var stringIndexOf$1 = uncurryThis$
|
|
2493
|
+
var stringIndexOf$1 = uncurryThis$8(''.indexOf);
|
|
2216
2494
|
|
|
2217
2495
|
// `String.prototype.includes` method
|
|
2218
2496
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
2219
2497
|
$$5({ target: 'String', proto: true, forced: !correctIsRegExpLogic$1('includes') }, {
|
|
2220
2498
|
includes: function includes(searchString /* , position = 0 */) {
|
|
2221
2499
|
return !!~stringIndexOf$1(
|
|
2222
|
-
toString$
|
|
2223
|
-
toString$
|
|
2500
|
+
toString$6(requireObjectCoercible$4(this)),
|
|
2501
|
+
toString$6(notARegExp$1(searchString)),
|
|
2224
2502
|
arguments.length > 1 ? arguments[1] : undefined
|
|
2225
2503
|
);
|
|
2226
2504
|
}
|
|
2227
2505
|
});
|
|
2228
2506
|
|
|
2229
|
-
|
|
2507
|
+
/******************************************************************************
|
|
2230
2508
|
Copyright (c) Microsoft Corporation.
|
|
2231
2509
|
|
|
2232
2510
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -2268,7 +2546,6 @@ const buildClientNinetailedRequestContext = () => ({
|
|
|
2268
2546
|
* wait time because you can simply await `Promise.timeout` inside `fn`
|
|
2269
2547
|
* to wait some time before the next call.
|
|
2270
2548
|
*/
|
|
2271
|
-
|
|
2272
2549
|
function asyncThrottle(fn) {
|
|
2273
2550
|
let runningPromise;
|
|
2274
2551
|
let queuedPromise;
|
|
@@ -2276,7 +2553,6 @@ function asyncThrottle(fn) {
|
|
|
2276
2553
|
return args => __awaiter(this, void 0, void 0, function* () {
|
|
2277
2554
|
if (runningPromise) {
|
|
2278
2555
|
nextArgs = args;
|
|
2279
|
-
|
|
2280
2556
|
if (queuedPromise) {
|
|
2281
2557
|
return queuedPromise;
|
|
2282
2558
|
} else {
|
|
@@ -2298,145 +2574,160 @@ const LEGACY_ANONYMOUS_ID = '__anon_id';
|
|
|
2298
2574
|
const ANONYMOUS_ID = '__nt_anonymous_id__';
|
|
2299
2575
|
const DEBUG_FLAG = '__nt_debug__';
|
|
2300
2576
|
const PROFILE_FALLBACK_CACHE = '__nt_profile__';
|
|
2577
|
+
const PROFILE_CHANGE = 'profile-change';
|
|
2578
|
+
const PROFILE_RESET = 'profile-reset';
|
|
2301
2579
|
|
|
2302
|
-
const NINETAILED_TRACKER_EVENTS = {
|
|
2303
|
-
/**
|
|
2304
|
-
* `profile` - Fires when the profile is returned by the cdp API.
|
|
2305
|
-
*/
|
|
2306
|
-
profile: 'profile'
|
|
2307
|
-
};
|
|
2308
2580
|
const PLUGIN_NAME = 'ninetailed';
|
|
2309
|
-
|
|
2310
2581
|
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
2311
|
-
|
|
2312
|
-
const emptyProfile = {
|
|
2313
|
-
id: '',
|
|
2314
|
-
random: 0,
|
|
2315
|
-
audiences: [],
|
|
2316
|
-
traits: {},
|
|
2317
|
-
location: {}
|
|
2318
|
-
};
|
|
2319
2582
|
const ninetailedPlugin = ({
|
|
2320
|
-
|
|
2321
|
-
environment,
|
|
2322
|
-
preview: _preview = false,
|
|
2323
|
-
url,
|
|
2583
|
+
apiClient,
|
|
2324
2584
|
profile,
|
|
2325
|
-
locale
|
|
2585
|
+
locale,
|
|
2586
|
+
ninetailed
|
|
2326
2587
|
}) => {
|
|
2327
|
-
|
|
2328
|
-
clientId,
|
|
2329
|
-
environment,
|
|
2330
|
-
url
|
|
2331
|
-
});
|
|
2588
|
+
let _instance;
|
|
2332
2589
|
let queue = [];
|
|
2333
|
-
|
|
2334
|
-
const flush = instance => __awaiter(void 0, void 0, void 0, function* () {
|
|
2590
|
+
const flush = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
2335
2591
|
const events = Object.assign([], queue);
|
|
2336
2592
|
logger.info('Start flushing events.');
|
|
2337
2593
|
queue = [];
|
|
2338
|
-
|
|
2339
2594
|
if (!events.length) {
|
|
2340
|
-
return
|
|
2595
|
+
return {
|
|
2596
|
+
success: true
|
|
2597
|
+
};
|
|
2341
2598
|
}
|
|
2342
|
-
|
|
2343
2599
|
try {
|
|
2344
|
-
const anonymousId =
|
|
2345
|
-
const profile = yield apiClient.upsertProfile(
|
|
2346
|
-
|
|
2347
|
-
|
|
2600
|
+
const anonymousId = _instance.storage.getItem(ANONYMOUS_ID);
|
|
2601
|
+
const profile = yield apiClient.upsertProfile({
|
|
2602
|
+
profileId: anonymousId,
|
|
2603
|
+
events
|
|
2604
|
+
}, {
|
|
2605
|
+
locale
|
|
2606
|
+
});
|
|
2607
|
+
_instance.storage.setItem(ANONYMOUS_ID, profile.id);
|
|
2608
|
+
_instance.storage.setItem(PROFILE_FALLBACK_CACHE, profile);
|
|
2348
2609
|
logger.debug('Profile from api: ', profile);
|
|
2349
|
-
|
|
2350
|
-
type:
|
|
2610
|
+
_instance.dispatch({
|
|
2611
|
+
type: PROFILE_CHANGE,
|
|
2351
2612
|
profile
|
|
2352
2613
|
});
|
|
2614
|
+
yield delay(20);
|
|
2615
|
+
return {
|
|
2616
|
+
success: true
|
|
2617
|
+
};
|
|
2353
2618
|
} catch (error) {
|
|
2354
2619
|
logger.debug('An error occurred during flushing the events: ', error);
|
|
2355
|
-
const fallbackProfile =
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2620
|
+
const fallbackProfile = _instance.storage.getItem(PROFILE_FALLBACK_CACHE);
|
|
2621
|
+
if (fallbackProfile) {
|
|
2622
|
+
logger.debug('Found a fallback profile - will use this.');
|
|
2623
|
+
_instance.dispatch({
|
|
2624
|
+
type: PROFILE_CHANGE,
|
|
2625
|
+
profile: fallbackProfile
|
|
2626
|
+
});
|
|
2627
|
+
return {
|
|
2628
|
+
success: false
|
|
2629
|
+
};
|
|
2630
|
+
} else {
|
|
2631
|
+
logger.debug('No fallback profile found - setting profile to null.');
|
|
2632
|
+
_instance.dispatch({
|
|
2633
|
+
type: PROFILE_CHANGE,
|
|
2634
|
+
// TODO is it a good idea to set the profile to null?
|
|
2635
|
+
profile: null,
|
|
2636
|
+
error
|
|
2637
|
+
});
|
|
2638
|
+
return {
|
|
2639
|
+
success: false
|
|
2640
|
+
};
|
|
2641
|
+
}
|
|
2642
|
+
}
|
|
2364
2643
|
});
|
|
2365
|
-
|
|
2366
|
-
const throttledFlush = asyncThrottle(flush);
|
|
2367
|
-
|
|
2368
|
-
const enqueueEvent = (event, instance) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2644
|
+
const enqueueEvent = event => __awaiter(void 0, void 0, void 0, function* () {
|
|
2369
2645
|
queue = unionBy([event], queue, 'messageId');
|
|
2370
|
-
throttledFlush(instance);
|
|
2371
2646
|
});
|
|
2372
|
-
|
|
2647
|
+
const abortNonClientEvents = ({
|
|
2648
|
+
abort,
|
|
2649
|
+
payload
|
|
2650
|
+
}) => {
|
|
2651
|
+
if (typeof window !== 'object') {
|
|
2652
|
+
return abort();
|
|
2653
|
+
}
|
|
2654
|
+
return payload;
|
|
2655
|
+
};
|
|
2373
2656
|
return {
|
|
2374
2657
|
name: 'ninetailed',
|
|
2375
2658
|
config: {},
|
|
2376
2659
|
initialize: ({
|
|
2377
2660
|
instance
|
|
2378
2661
|
}) => {
|
|
2662
|
+
_instance = instance;
|
|
2379
2663
|
if (instance.storage.getItem(DEBUG_FLAG)) {
|
|
2380
2664
|
logger.addSink(new ConsoleLogSink());
|
|
2381
2665
|
logger.info('Ninetailed Debug Mode is enabled.');
|
|
2382
|
-
}
|
|
2383
|
-
|
|
2384
|
-
|
|
2666
|
+
}
|
|
2667
|
+
// legacy support for the old anonymousId
|
|
2385
2668
|
const legacyAnonymousId = instance.storage.getItem(LEGACY_ANONYMOUS_ID);
|
|
2386
|
-
|
|
2387
2669
|
if (legacyAnonymousId) {
|
|
2388
2670
|
logger.debug('Found legacy anonymousId, migrating to new one.', legacyAnonymousId);
|
|
2389
2671
|
instance.storage.setItem(ANONYMOUS_ID, legacyAnonymousId);
|
|
2390
2672
|
instance.storage.removeItem(LEGACY_ANONYMOUS_ID);
|
|
2391
2673
|
}
|
|
2392
|
-
|
|
2393
2674
|
if (profile) {
|
|
2394
2675
|
instance.storage.setItem(ANONYMOUS_ID, profile.id);
|
|
2395
2676
|
}
|
|
2396
|
-
|
|
2397
2677
|
logger.debug('Ninetailed Core plugin initialized.');
|
|
2398
2678
|
},
|
|
2679
|
+
flush: asyncThrottle(flush),
|
|
2680
|
+
pageStart: params => {
|
|
2681
|
+
return abortNonClientEvents(params);
|
|
2682
|
+
},
|
|
2399
2683
|
page: ({
|
|
2400
|
-
payload
|
|
2401
|
-
instance
|
|
2684
|
+
payload
|
|
2402
2685
|
}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2403
2686
|
logger.info('Sending Page event.');
|
|
2404
2687
|
const ctx = buildClientNinetailedRequestContext();
|
|
2405
|
-
|
|
2688
|
+
return enqueueEvent(buildPageEvent({
|
|
2406
2689
|
messageId: payload.meta.rid,
|
|
2407
2690
|
timestamp: payload.meta.ts,
|
|
2408
2691
|
properties: payload.properties,
|
|
2409
2692
|
ctx
|
|
2410
|
-
})
|
|
2693
|
+
}));
|
|
2411
2694
|
}),
|
|
2695
|
+
trackStart: params => {
|
|
2696
|
+
return abortNonClientEvents(params);
|
|
2697
|
+
},
|
|
2412
2698
|
track: ({
|
|
2413
|
-
payload
|
|
2414
|
-
instance
|
|
2699
|
+
payload
|
|
2415
2700
|
}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2416
2701
|
logger.info('Sending Track event.');
|
|
2417
2702
|
const ctx = buildClientNinetailedRequestContext();
|
|
2418
|
-
|
|
2703
|
+
return enqueueEvent(buildTrackEvent({
|
|
2419
2704
|
messageId: payload.meta.rid,
|
|
2420
2705
|
timestamp: payload.meta.ts,
|
|
2421
2706
|
event: payload.event,
|
|
2422
2707
|
properties: payload.properties,
|
|
2423
2708
|
ctx
|
|
2424
|
-
})
|
|
2709
|
+
}));
|
|
2425
2710
|
}),
|
|
2711
|
+
identifyStart: params => {
|
|
2712
|
+
return abortNonClientEvents(params);
|
|
2713
|
+
},
|
|
2426
2714
|
identify: ({
|
|
2427
|
-
payload
|
|
2428
|
-
instance
|
|
2715
|
+
payload
|
|
2429
2716
|
}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2430
2717
|
logger.info('Sending Identify event.');
|
|
2431
2718
|
const ctx = buildClientNinetailedRequestContext();
|
|
2432
|
-
|
|
2719
|
+
if (payload.userId === '' && (!payload.traits || typeof payload.traits === 'object' && Object.keys(payload.traits).length === 0)) {
|
|
2720
|
+
logger.info('Skipping Identify event as no userId and no traits are set.');
|
|
2721
|
+
return;
|
|
2722
|
+
}
|
|
2723
|
+
return enqueueEvent(buildIdentifyEvent({
|
|
2433
2724
|
// doing this here as the anonymous id is set to late from init
|
|
2434
2725
|
messageId: payload.meta.rid,
|
|
2435
2726
|
timestamp: payload.meta.ts,
|
|
2436
2727
|
traits: payload.traits,
|
|
2437
2728
|
userId: payload.userId,
|
|
2438
2729
|
ctx
|
|
2439
|
-
})
|
|
2730
|
+
}));
|
|
2440
2731
|
}),
|
|
2441
2732
|
setItemStart: ({
|
|
2442
2733
|
abort,
|
|
@@ -2445,201 +2736,134 @@ const ninetailedPlugin = ({
|
|
|
2445
2736
|
if (![ANONYMOUS_ID, DEBUG_FLAG, PROFILE_FALLBACK_CACHE].includes(payload.key)) {
|
|
2446
2737
|
return abort();
|
|
2447
2738
|
}
|
|
2448
|
-
|
|
2449
2739
|
return payload;
|
|
2450
2740
|
},
|
|
2451
2741
|
methods: {
|
|
2452
2742
|
reset: (...args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2743
|
+
// TODO it seems reset gets called during Next.js SSR builds. Need to verify that.
|
|
2744
|
+
logger.debug('Resetting profile.');
|
|
2453
2745
|
const instance = args[args.length - 1];
|
|
2454
|
-
yield instance.storage.removeItem(ANONYMOUS_ID);
|
|
2455
2746
|
instance.dispatch({
|
|
2456
|
-
type:
|
|
2457
|
-
profile: emptyProfile
|
|
2747
|
+
type: PROFILE_RESET
|
|
2458
2748
|
});
|
|
2749
|
+
instance.storage.removeItem(ANONYMOUS_ID);
|
|
2750
|
+
instance.storage.removeItem(PROFILE_FALLBACK_CACHE);
|
|
2751
|
+
logger.debug('Removed old profile data from localstorage.');
|
|
2752
|
+
yield ninetailed.track('nt_reset');
|
|
2753
|
+
logger.info('Profile reset successful.');
|
|
2459
2754
|
yield delay(10);
|
|
2460
2755
|
}),
|
|
2461
2756
|
debug: (...args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2462
2757
|
const enabled = args[0];
|
|
2463
2758
|
const instance = args[args.length - 1];
|
|
2464
2759
|
const consoleLogSink = new ConsoleLogSink();
|
|
2465
|
-
|
|
2466
2760
|
if (enabled) {
|
|
2467
|
-
|
|
2761
|
+
instance.storage.setItem(DEBUG_FLAG, true);
|
|
2468
2762
|
logger.addSink(consoleLogSink);
|
|
2469
2763
|
logger.info('Debug mode enabled.');
|
|
2470
2764
|
} else {
|
|
2471
|
-
|
|
2765
|
+
instance.storage.removeItem(DEBUG_FLAG);
|
|
2472
2766
|
logger.info('Debug mode disabled.');
|
|
2473
2767
|
logger.removeSink(consoleLogSink.name);
|
|
2474
|
-
}
|
|
2475
|
-
})
|
|
2476
|
-
}
|
|
2477
|
-
};
|
|
2478
|
-
};
|
|
2479
|
-
|
|
2480
|
-
var objectDefineProperties = {};
|
|
2481
|
-
|
|
2482
|
-
var DESCRIPTORS$1 = descriptors;
|
|
2483
|
-
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
2484
|
-
var definePropertyModule$2 = objectDefineProperty;
|
|
2485
|
-
var anObject$5 = anObject$e;
|
|
2486
|
-
var toIndexedObject$1 = toIndexedObject$5;
|
|
2487
|
-
var objectKeys = objectKeys$2;
|
|
2488
|
-
|
|
2489
|
-
// `Object.defineProperties` method
|
|
2490
|
-
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2491
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
2492
|
-
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2493
|
-
anObject$5(O);
|
|
2494
|
-
var props = toIndexedObject$1(Properties);
|
|
2495
|
-
var keys = objectKeys(Properties);
|
|
2496
|
-
var length = keys.length;
|
|
2497
|
-
var index = 0;
|
|
2498
|
-
var key;
|
|
2499
|
-
while (length > index) definePropertyModule$2.f(O, key = keys[index++], props[key]);
|
|
2500
|
-
return O;
|
|
2501
|
-
};
|
|
2502
|
-
|
|
2503
|
-
/* global ActiveXObject -- old IE, WSH */
|
|
2504
|
-
|
|
2505
|
-
var anObject$4 = anObject$e;
|
|
2506
|
-
var definePropertiesModule = objectDefineProperties;
|
|
2507
|
-
var enumBugKeys = enumBugKeys$3;
|
|
2508
|
-
var hiddenKeys = hiddenKeys$4;
|
|
2509
|
-
var html = html$2;
|
|
2510
|
-
var documentCreateElement$1 = documentCreateElement$2;
|
|
2511
|
-
var sharedKey$1 = sharedKey$3;
|
|
2512
|
-
|
|
2513
|
-
var GT = '>';
|
|
2514
|
-
var LT = '<';
|
|
2515
|
-
var PROTOTYPE = 'prototype';
|
|
2516
|
-
var SCRIPT = 'script';
|
|
2517
|
-
var IE_PROTO$1 = sharedKey$1('IE_PROTO');
|
|
2518
|
-
|
|
2519
|
-
var EmptyConstructor = function () { /* empty */ };
|
|
2520
|
-
|
|
2521
|
-
var scriptTag = function (content) {
|
|
2522
|
-
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
2523
|
-
};
|
|
2524
|
-
|
|
2525
|
-
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
2526
|
-
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
2527
|
-
activeXDocument.write(scriptTag(''));
|
|
2528
|
-
activeXDocument.close();
|
|
2529
|
-
var temp = activeXDocument.parentWindow.Object;
|
|
2530
|
-
activeXDocument = null; // avoid memory leak
|
|
2531
|
-
return temp;
|
|
2532
|
-
};
|
|
2533
|
-
|
|
2534
|
-
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
2535
|
-
var NullProtoObjectViaIFrame = function () {
|
|
2536
|
-
// Thrash, waste and sodomy: IE GC bug
|
|
2537
|
-
var iframe = documentCreateElement$1('iframe');
|
|
2538
|
-
var JS = 'java' + SCRIPT + ':';
|
|
2539
|
-
var iframeDocument;
|
|
2540
|
-
iframe.style.display = 'none';
|
|
2541
|
-
html.appendChild(iframe);
|
|
2542
|
-
// https://github.com/zloirock/core-js/issues/475
|
|
2543
|
-
iframe.src = String(JS);
|
|
2544
|
-
iframeDocument = iframe.contentWindow.document;
|
|
2545
|
-
iframeDocument.open();
|
|
2546
|
-
iframeDocument.write(scriptTag('document.F=Object'));
|
|
2547
|
-
iframeDocument.close();
|
|
2548
|
-
return iframeDocument.F;
|
|
2549
|
-
};
|
|
2550
|
-
|
|
2551
|
-
// Check for document.domain and active x support
|
|
2552
|
-
// No need to use active x approach when document.domain is not set
|
|
2553
|
-
// see https://github.com/es-shims/es5-shim/issues/150
|
|
2554
|
-
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
2555
|
-
// avoid IE GC bug
|
|
2556
|
-
var activeXDocument;
|
|
2557
|
-
var NullProtoObject = function () {
|
|
2558
|
-
try {
|
|
2559
|
-
activeXDocument = new ActiveXObject('htmlfile');
|
|
2560
|
-
} catch (error) { /* ignore */ }
|
|
2561
|
-
NullProtoObject = typeof document != 'undefined'
|
|
2562
|
-
? document.domain && activeXDocument
|
|
2563
|
-
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
2564
|
-
: NullProtoObjectViaIFrame()
|
|
2565
|
-
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
2566
|
-
var length = enumBugKeys.length;
|
|
2567
|
-
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
2568
|
-
return NullProtoObject();
|
|
2768
|
+
}
|
|
2769
|
+
})
|
|
2770
|
+
}
|
|
2771
|
+
};
|
|
2569
2772
|
};
|
|
2570
2773
|
|
|
2571
|
-
|
|
2774
|
+
var anObject$3 = anObject$e;
|
|
2572
2775
|
|
|
2573
|
-
// `
|
|
2574
|
-
// https://tc39.es/ecma262/#sec-
|
|
2575
|
-
var
|
|
2576
|
-
var
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2776
|
+
// `RegExp.prototype.flags` getter implementation
|
|
2777
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
2778
|
+
var regexpFlags$1 = function () {
|
|
2779
|
+
var that = anObject$3(this);
|
|
2780
|
+
var result = '';
|
|
2781
|
+
if (that.hasIndices) result += 'd';
|
|
2782
|
+
if (that.global) result += 'g';
|
|
2783
|
+
if (that.ignoreCase) result += 'i';
|
|
2784
|
+
if (that.multiline) result += 'm';
|
|
2785
|
+
if (that.dotAll) result += 's';
|
|
2786
|
+
if (that.unicode) result += 'u';
|
|
2787
|
+
if (that.unicodeSets) result += 'v';
|
|
2788
|
+
if (that.sticky) result += 'y';
|
|
2789
|
+
return result;
|
|
2585
2790
|
};
|
|
2586
2791
|
|
|
2587
|
-
var
|
|
2588
|
-
var
|
|
2589
|
-
var
|
|
2590
|
-
|
|
2591
|
-
var UNSCOPABLES = wellKnownSymbol$5('unscopables');
|
|
2592
|
-
var ArrayPrototype = Array.prototype;
|
|
2792
|
+
var call$4 = functionCall;
|
|
2793
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
2794
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
2795
|
+
var regExpFlags = regexpFlags$1;
|
|
2593
2796
|
|
|
2594
|
-
|
|
2595
|
-
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2596
|
-
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
2597
|
-
definePropertyModule$1.f(ArrayPrototype, UNSCOPABLES, {
|
|
2598
|
-
configurable: true,
|
|
2599
|
-
value: create$2(null)
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2797
|
+
var RegExpPrototype$2 = RegExp.prototype;
|
|
2602
2798
|
|
|
2603
|
-
|
|
2604
|
-
var
|
|
2605
|
-
|
|
2799
|
+
var regexpGetFlags = function (R) {
|
|
2800
|
+
var flags = R.flags;
|
|
2801
|
+
return flags === undefined && !('flags' in RegExpPrototype$2) && !hasOwn$1(R, 'flags') && isPrototypeOf(RegExpPrototype$2, R)
|
|
2802
|
+
? call$4(regExpFlags, R) : flags;
|
|
2606
2803
|
};
|
|
2607
2804
|
|
|
2608
|
-
var
|
|
2805
|
+
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
2806
|
+
var defineBuiltIn$3 = defineBuiltIn$7;
|
|
2807
|
+
var anObject$2 = anObject$e;
|
|
2808
|
+
var $toString = toString$7;
|
|
2809
|
+
var fails$9 = fails$m;
|
|
2810
|
+
var getRegExpFlags = regexpGetFlags;
|
|
2811
|
+
|
|
2812
|
+
var TO_STRING = 'toString';
|
|
2813
|
+
var RegExpPrototype$1 = RegExp.prototype;
|
|
2814
|
+
var nativeToString = RegExpPrototype$1[TO_STRING];
|
|
2815
|
+
|
|
2816
|
+
var NOT_GENERIC = fails$9(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
2817
|
+
// FF44- RegExp#toString has a wrong name
|
|
2818
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name != TO_STRING;
|
|
2819
|
+
|
|
2820
|
+
// `RegExp.prototype.toString` method
|
|
2821
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
2822
|
+
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
2823
|
+
defineBuiltIn$3(RegExp.prototype, TO_STRING, function toString() {
|
|
2824
|
+
var R = anObject$2(this);
|
|
2825
|
+
var pattern = $toString(R.source);
|
|
2826
|
+
var flags = $toString(getRegExpFlags(R));
|
|
2827
|
+
return '/' + pattern + '/' + flags;
|
|
2828
|
+
}, { unsafe: true });
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
var fails$8 = fails$m;
|
|
2609
2832
|
|
|
2610
|
-
var correctPrototypeGetter = !fails$
|
|
2833
|
+
var correctPrototypeGetter = !fails$8(function () {
|
|
2611
2834
|
function F() { /* empty */ }
|
|
2612
2835
|
F.prototype.constructor = null;
|
|
2613
2836
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
2614
2837
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
2615
2838
|
});
|
|
2616
2839
|
|
|
2617
|
-
var global$9 = global$K;
|
|
2618
2840
|
var hasOwn = hasOwnProperty_1;
|
|
2619
|
-
var isCallable$4 = isCallable$
|
|
2841
|
+
var isCallable$4 = isCallable$m;
|
|
2620
2842
|
var toObject$2 = toObject$5;
|
|
2621
2843
|
var sharedKey = sharedKey$3;
|
|
2622
2844
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
2623
2845
|
|
|
2624
2846
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
2625
|
-
var Object
|
|
2626
|
-
var ObjectPrototype = Object
|
|
2847
|
+
var $Object = Object;
|
|
2848
|
+
var ObjectPrototype = $Object.prototype;
|
|
2627
2849
|
|
|
2628
2850
|
// `Object.getPrototypeOf` method
|
|
2629
2851
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
2630
|
-
|
|
2852
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
2853
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
2631
2854
|
var object = toObject$2(O);
|
|
2632
2855
|
if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
|
|
2633
2856
|
var constructor = object.constructor;
|
|
2634
2857
|
if (isCallable$4(constructor) && object instanceof constructor) {
|
|
2635
2858
|
return constructor.prototype;
|
|
2636
|
-
} return object instanceof Object
|
|
2859
|
+
} return object instanceof $Object ? ObjectPrototype : null;
|
|
2637
2860
|
};
|
|
2638
2861
|
|
|
2639
|
-
var fails$
|
|
2640
|
-
var isCallable$3 = isCallable$
|
|
2862
|
+
var fails$7 = fails$m;
|
|
2863
|
+
var isCallable$3 = isCallable$m;
|
|
2864
|
+
var isObject = isObject$9;
|
|
2641
2865
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
2642
|
-
var
|
|
2866
|
+
var defineBuiltIn$2 = defineBuiltIn$7;
|
|
2643
2867
|
var wellKnownSymbol$4 = wellKnownSymbol$i;
|
|
2644
2868
|
|
|
2645
2869
|
var ITERATOR$3 = wellKnownSymbol$4('iterator');
|
|
@@ -2660,7 +2884,7 @@ if ([].keys) {
|
|
|
2660
2884
|
}
|
|
2661
2885
|
}
|
|
2662
2886
|
|
|
2663
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2
|
|
2887
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$7(function () {
|
|
2664
2888
|
var test = {};
|
|
2665
2889
|
// FF44- legacy iterators case
|
|
2666
2890
|
return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
|
|
@@ -2671,7 +2895,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
|
2671
2895
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
2672
2896
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
2673
2897
|
if (!isCallable$3(IteratorPrototype$2[ITERATOR$3])) {
|
|
2674
|
-
|
|
2898
|
+
defineBuiltIn$2(IteratorPrototype$2, ITERATOR$3, function () {
|
|
2675
2899
|
return this;
|
|
2676
2900
|
});
|
|
2677
2901
|
}
|
|
@@ -2683,30 +2907,30 @@ var iteratorsCore = {
|
|
|
2683
2907
|
|
|
2684
2908
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
2685
2909
|
var create$1 = objectCreate;
|
|
2686
|
-
var createPropertyDescriptor
|
|
2910
|
+
var createPropertyDescriptor = createPropertyDescriptor$3;
|
|
2687
2911
|
var setToStringTag$1 = setToStringTag$3;
|
|
2688
2912
|
var Iterators$2 = iterators;
|
|
2689
2913
|
|
|
2690
2914
|
var returnThis$1 = function () { return this; };
|
|
2691
2915
|
|
|
2692
|
-
var
|
|
2916
|
+
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
2693
2917
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
2694
|
-
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor
|
|
2918
|
+
IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
2695
2919
|
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
|
|
2696
2920
|
Iterators$2[TO_STRING_TAG] = returnThis$1;
|
|
2697
2921
|
return IteratorConstructor;
|
|
2698
2922
|
};
|
|
2699
2923
|
|
|
2700
2924
|
var $$4 = _export;
|
|
2701
|
-
var call$
|
|
2925
|
+
var call$3 = functionCall;
|
|
2702
2926
|
var FunctionName = functionName;
|
|
2703
|
-
var isCallable$2 = isCallable$
|
|
2704
|
-
var createIteratorConstructor =
|
|
2927
|
+
var isCallable$2 = isCallable$m;
|
|
2928
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
2705
2929
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
2706
2930
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
2707
2931
|
var setToStringTag = setToStringTag$3;
|
|
2708
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$
|
|
2709
|
-
var
|
|
2932
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
2933
|
+
var defineBuiltIn$1 = defineBuiltIn$7;
|
|
2710
2934
|
var wellKnownSymbol$3 = wellKnownSymbol$i;
|
|
2711
2935
|
var Iterators$1 = iterators;
|
|
2712
2936
|
var IteratorsCore = iteratorsCore;
|
|
@@ -2722,7 +2946,7 @@ var ENTRIES = 'entries';
|
|
|
2722
2946
|
|
|
2723
2947
|
var returnThis = function () { return this; };
|
|
2724
2948
|
|
|
2725
|
-
var
|
|
2949
|
+
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
2726
2950
|
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
2727
2951
|
|
|
2728
2952
|
var getIterationMethod = function (KIND) {
|
|
@@ -2753,7 +2977,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
2753
2977
|
if (setPrototypeOf) {
|
|
2754
2978
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
2755
2979
|
} else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$2])) {
|
|
2756
|
-
|
|
2980
|
+
defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$2, returnThis);
|
|
2757
2981
|
}
|
|
2758
2982
|
}
|
|
2759
2983
|
// Set @@toStringTag to native iterators
|
|
@@ -2767,7 +2991,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
2767
2991
|
createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
|
|
2768
2992
|
} else {
|
|
2769
2993
|
INCORRECT_VALUES_NAME = true;
|
|
2770
|
-
defaultIterator = function values() { return call$
|
|
2994
|
+
defaultIterator = function values() { return call$3(nativeIterator, this); };
|
|
2771
2995
|
}
|
|
2772
2996
|
}
|
|
2773
2997
|
|
|
@@ -2780,26 +3004,33 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
2780
3004
|
};
|
|
2781
3005
|
if (FORCED) for (KEY in methods) {
|
|
2782
3006
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
2783
|
-
|
|
3007
|
+
defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
|
|
2784
3008
|
}
|
|
2785
3009
|
} else $$4({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
2786
3010
|
}
|
|
2787
3011
|
|
|
2788
3012
|
// define iterator
|
|
2789
3013
|
if (IterablePrototype[ITERATOR$2] !== defaultIterator) {
|
|
2790
|
-
|
|
3014
|
+
defineBuiltIn$1(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
|
|
2791
3015
|
}
|
|
2792
3016
|
Iterators$1[NAME] = defaultIterator;
|
|
2793
3017
|
|
|
2794
3018
|
return methods;
|
|
2795
3019
|
};
|
|
2796
3020
|
|
|
3021
|
+
// `CreateIterResultObject` abstract operation
|
|
3022
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
3023
|
+
var createIterResultObject$1 = function (value, done) {
|
|
3024
|
+
return { value: value, done: done };
|
|
3025
|
+
};
|
|
3026
|
+
|
|
2797
3027
|
var toIndexedObject = toIndexedObject$5;
|
|
2798
|
-
var addToUnscopables = addToUnscopables$
|
|
3028
|
+
var addToUnscopables = addToUnscopables$2;
|
|
2799
3029
|
var Iterators = iterators;
|
|
2800
3030
|
var InternalStateModule = internalState;
|
|
2801
3031
|
var defineProperty = objectDefineProperty.f;
|
|
2802
|
-
var defineIterator =
|
|
3032
|
+
var defineIterator = iteratorDefine;
|
|
3033
|
+
var createIterResultObject = createIterResultObject$1;
|
|
2803
3034
|
var DESCRIPTORS = descriptors;
|
|
2804
3035
|
|
|
2805
3036
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
@@ -2832,11 +3063,11 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
2832
3063
|
var index = state.index++;
|
|
2833
3064
|
if (!target || index >= target.length) {
|
|
2834
3065
|
state.target = undefined;
|
|
2835
|
-
return
|
|
3066
|
+
return createIterResultObject(undefined, true);
|
|
2836
3067
|
}
|
|
2837
|
-
if (kind == 'keys') return
|
|
2838
|
-
if (kind == 'values') return
|
|
2839
|
-
return
|
|
3068
|
+
if (kind == 'keys') return createIterResultObject(index, false);
|
|
3069
|
+
if (kind == 'values') return createIterResultObject(target[index], false);
|
|
3070
|
+
return createIterResultObject([index, target[index]], false);
|
|
2840
3071
|
}, 'values');
|
|
2841
3072
|
|
|
2842
3073
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
@@ -2898,11 +3129,11 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
2898
3129
|
|
|
2899
3130
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
2900
3131
|
|
|
2901
|
-
var global$
|
|
3132
|
+
var global$5 = global$n;
|
|
2902
3133
|
var DOMIterables = domIterables;
|
|
2903
3134
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
2904
3135
|
var ArrayIteratorMethods = es_array_iterator;
|
|
2905
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$
|
|
3136
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
|
|
2906
3137
|
var wellKnownSymbol$2 = wellKnownSymbol$i;
|
|
2907
3138
|
|
|
2908
3139
|
var ITERATOR$1 = wellKnownSymbol$2('iterator');
|
|
@@ -2932,17 +3163,13 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
2932
3163
|
};
|
|
2933
3164
|
|
|
2934
3165
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
2935
|
-
handlePrototype(global$
|
|
3166
|
+
handlePrototype(global$5[COLLECTION_NAME] && global$5[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
2936
3167
|
}
|
|
2937
3168
|
|
|
2938
3169
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
2939
3170
|
|
|
2940
3171
|
class Ninetailed {
|
|
2941
|
-
constructor({
|
|
2942
|
-
clientId,
|
|
2943
|
-
environment,
|
|
2944
|
-
preview
|
|
2945
|
-
}, {
|
|
3172
|
+
constructor(ninetailedApiClientInstanceOrOptions, {
|
|
2946
3173
|
plugins,
|
|
2947
3174
|
url,
|
|
2948
3175
|
profile,
|
|
@@ -2952,92 +3179,133 @@ class Ninetailed {
|
|
|
2952
3179
|
onError
|
|
2953
3180
|
} = {}) {
|
|
2954
3181
|
this.isInitialized = false;
|
|
2955
|
-
|
|
2956
3182
|
this.page = (data, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
this.track = (event, payload, options) => __awaiter(this, void 0, void 0, function* () {
|
|
2962
|
-
yield this.waitUntilInitialized();
|
|
2963
|
-
return this.instance.track(event, payload, this.buildOptions(options));
|
|
2964
|
-
});
|
|
2965
|
-
|
|
2966
|
-
this.trackHasSeenComponent = payload => __awaiter(this, void 0, void 0, function* () {
|
|
2967
|
-
return this.track('hasSeenComponent', payload, {
|
|
2968
|
-
plugins: {
|
|
2969
|
-
all: true,
|
|
2970
|
-
ninetailed: false
|
|
3183
|
+
try {
|
|
3184
|
+
const result = PageviewProperties.partial().default({}).safeParse(data);
|
|
3185
|
+
if (!result.success) {
|
|
3186
|
+
throw new Error(`[Validation Error] "page" was called with invalid params. Page data is not valid: ${result.error.format()}`);
|
|
2971
3187
|
}
|
|
2972
|
-
|
|
3188
|
+
yield this.waitUntilInitialized();
|
|
3189
|
+
yield this.instance.page(data, this.buildOptions(options));
|
|
3190
|
+
return this.eventQueue.flush();
|
|
3191
|
+
} catch (error) {
|
|
3192
|
+
logger.error(error);
|
|
3193
|
+
if (error instanceof RangeError) {
|
|
3194
|
+
throw new Error(`[Validation Error] "page" was called with invalid params. Could not validate due to "RangeError: Maximum call stack size exceeded". This can be caused by passing a cyclic data structure as a parameter. Refrain from passing a cyclic data structure or sanitize it beforehand.`);
|
|
3195
|
+
}
|
|
3196
|
+
throw error;
|
|
3197
|
+
}
|
|
2973
3198
|
});
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
ninetailed: false
|
|
3199
|
+
this.track = (event, properties, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3200
|
+
try {
|
|
3201
|
+
const result = Properties.default({}).safeParse(properties);
|
|
3202
|
+
if (!result.success) {
|
|
3203
|
+
throw new Error(`[Validation Error] "track" was called with invalid params. Properties are no valid json object: ${result.error.format()}`);
|
|
2980
3204
|
}
|
|
2981
|
-
|
|
3205
|
+
yield this.waitUntilInitialized();
|
|
3206
|
+
yield this.instance.track(event.toString(), result.data, this.buildOptions(options));
|
|
3207
|
+
return this.eventQueue.flush();
|
|
3208
|
+
} catch (error) {
|
|
3209
|
+
logger.error(error);
|
|
3210
|
+
if (error instanceof RangeError) {
|
|
3211
|
+
throw new Error(`[Validation Error] "track" was called with invalid params. Could not validate due to "RangeError: Maximum call stack size exceeded". This can be caused by passing a cyclic data structure as a parameter. Refrain from passing a cyclic data structure or sanitize it beforehand.`);
|
|
3212
|
+
}
|
|
3213
|
+
throw error;
|
|
3214
|
+
}
|
|
3215
|
+
});
|
|
3216
|
+
this.trackHasSeenComponent = properties => __awaiter(this, void 0, void 0, function* () {
|
|
3217
|
+
return this.instance.dispatch(Object.assign(Object.assign({}, properties), {
|
|
3218
|
+
type: HAS_SEEN_COMPONENT
|
|
3219
|
+
}));
|
|
3220
|
+
});
|
|
3221
|
+
this.trackHasSeenExperience = properties => {
|
|
3222
|
+
return this.instance.dispatch(Object.assign(Object.assign({}, properties), {
|
|
3223
|
+
type: HAS_SEEN_EXPERIENCE
|
|
3224
|
+
}));
|
|
2982
3225
|
};
|
|
2983
|
-
|
|
2984
3226
|
this.identify = (uid, traits, options) => __awaiter(this, void 0, void 0, function* () {
|
|
3227
|
+
try {
|
|
3228
|
+
const result = Traits.default({}).safeParse(traits);
|
|
3229
|
+
if (!result.success) {
|
|
3230
|
+
throw new Error(`[Validation Error] "identify" was called with invalid params. Traits are no valid json: ${result.error.format()}`);
|
|
3231
|
+
}
|
|
3232
|
+
yield this.waitUntilInitialized();
|
|
3233
|
+
yield this.instance.identify(uid.toString(), result.data, this.buildOptions(options));
|
|
3234
|
+
return this.eventQueue.flush();
|
|
3235
|
+
} catch (error) {
|
|
3236
|
+
logger.error(error);
|
|
3237
|
+
if (error instanceof RangeError) {
|
|
3238
|
+
throw new Error(`[Validation Error] "identify" was called with invalid params. Could not validate due to "RangeError: Maximum call stack size exceeded". This can be caused by passing a cyclic data structure as a parameter. Refrain from passing a cyclic data structure or sanitize it beforehand.`);
|
|
3239
|
+
}
|
|
3240
|
+
throw error;
|
|
3241
|
+
}
|
|
3242
|
+
});
|
|
3243
|
+
this.reset = () => __awaiter(this, void 0, void 0, function* () {
|
|
2985
3244
|
yield this.waitUntilInitialized();
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
3245
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3246
|
+
// @ts-ignore
|
|
3247
|
+
this.instance.plugins[PLUGIN_NAME].reset();
|
|
3248
|
+
});
|
|
3249
|
+
this.debug = enabled => __awaiter(this, void 0, void 0, function* () {
|
|
3250
|
+
yield this.waitUntilInitialized();
|
|
3251
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3252
|
+
// @ts-ignore
|
|
3253
|
+
this.instance.plugins[PLUGIN_NAME].debug(enabled);
|
|
2989
3254
|
});
|
|
2990
|
-
|
|
2991
|
-
this.reset = () => {
|
|
2992
|
-
this.onIsInitialized(() => {
|
|
2993
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2994
|
-
// @ts-ignore
|
|
2995
|
-
this.instance.plugins[PLUGIN_NAME].reset();
|
|
2996
|
-
});
|
|
2997
|
-
};
|
|
2998
|
-
|
|
2999
|
-
this.debug = enabled => {
|
|
3000
|
-
this.onIsInitialized(() => {
|
|
3001
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3002
|
-
// @ts-ignore
|
|
3003
|
-
this.instance.plugins[PLUGIN_NAME].debug(enabled);
|
|
3004
|
-
});
|
|
3005
|
-
};
|
|
3006
|
-
|
|
3007
3255
|
this.onProfileChange = cb => {
|
|
3008
3256
|
cb(this.profileState);
|
|
3009
|
-
return this.instance.on(
|
|
3257
|
+
return this.instance.on(PROFILE_CHANGE, ({
|
|
3010
3258
|
payload
|
|
3011
3259
|
}) => {
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3260
|
+
if (payload.error) {
|
|
3261
|
+
cb(Object.assign(Object.assign({}, this._profileState), {
|
|
3262
|
+
status: 'error',
|
|
3263
|
+
profile: payload.profile,
|
|
3264
|
+
error: payload.error
|
|
3265
|
+
}));
|
|
3266
|
+
} else {
|
|
3267
|
+
cb(Object.assign(Object.assign({}, this._profileState), {
|
|
3268
|
+
status: 'success',
|
|
3269
|
+
profile: payload.profile,
|
|
3270
|
+
error: null
|
|
3271
|
+
}));
|
|
3272
|
+
}
|
|
3017
3273
|
});
|
|
3018
3274
|
};
|
|
3019
|
-
|
|
3020
3275
|
this.onIsInitialized = onIsInitialized => {
|
|
3021
3276
|
if (typeof onIsInitialized === 'function') {
|
|
3022
3277
|
if (this.isInitialized) {
|
|
3023
3278
|
onIsInitialized();
|
|
3024
3279
|
} else {
|
|
3025
3280
|
const detachOnReadyListener = this.instance.on('ready', () => {
|
|
3281
|
+
this.isInitialized = true;
|
|
3026
3282
|
onIsInitialized();
|
|
3027
3283
|
detachOnReadyListener();
|
|
3028
3284
|
});
|
|
3029
3285
|
}
|
|
3030
3286
|
}
|
|
3031
3287
|
};
|
|
3032
|
-
|
|
3033
3288
|
this.waitUntilInitialized = () => {
|
|
3034
3289
|
return new Promise(resolve => {
|
|
3035
3290
|
this.onIsInitialized(resolve);
|
|
3036
3291
|
});
|
|
3037
3292
|
};
|
|
3038
|
-
|
|
3293
|
+
if (ninetailedApiClientInstanceOrOptions instanceof NinetailedApiClient) {
|
|
3294
|
+
this.apiClient = ninetailedApiClientInstanceOrOptions;
|
|
3295
|
+
} else {
|
|
3296
|
+
const {
|
|
3297
|
+
clientId,
|
|
3298
|
+
environment,
|
|
3299
|
+
preview
|
|
3300
|
+
} = ninetailedApiClientInstanceOrOptions;
|
|
3301
|
+
this.apiClient = new NinetailedApiClient({
|
|
3302
|
+
clientId,
|
|
3303
|
+
environment,
|
|
3304
|
+
url,
|
|
3305
|
+
preview
|
|
3306
|
+
});
|
|
3307
|
+
}
|
|
3039
3308
|
this.plugins = flatten(plugins || []);
|
|
3040
|
-
|
|
3041
3309
|
if (profile) {
|
|
3042
3310
|
this._profileState = {
|
|
3043
3311
|
status: 'success',
|
|
@@ -3053,61 +3321,60 @@ class Ninetailed {
|
|
|
3053
3321
|
from: 'api'
|
|
3054
3322
|
};
|
|
3055
3323
|
}
|
|
3056
|
-
|
|
3057
3324
|
if (typeof onLog === 'function') {
|
|
3058
3325
|
logger.addSink(new OnLogLogSink(onLog));
|
|
3059
3326
|
}
|
|
3060
|
-
|
|
3061
3327
|
if (typeof onError === 'function') {
|
|
3062
3328
|
logger.addSink(new OnErrorLogSink(onError));
|
|
3063
3329
|
}
|
|
3064
|
-
|
|
3065
3330
|
this.logger = logger;
|
|
3331
|
+
this.eventQueue = ninetailedPlugin({
|
|
3332
|
+
apiClient: this.apiClient,
|
|
3333
|
+
profile,
|
|
3334
|
+
locale,
|
|
3335
|
+
requestTimeout,
|
|
3336
|
+
ninetailed: this
|
|
3337
|
+
});
|
|
3066
3338
|
this.instance = Analytics({
|
|
3067
3339
|
app: 'ninetailed',
|
|
3068
|
-
plugins: [...this.plugins,
|
|
3069
|
-
clientId,
|
|
3070
|
-
environment,
|
|
3071
|
-
url,
|
|
3072
|
-
profile,
|
|
3073
|
-
locale,
|
|
3074
|
-
requestTimeout,
|
|
3075
|
-
preview
|
|
3076
|
-
})]
|
|
3340
|
+
plugins: [...this.plugins, this.eventQueue]
|
|
3077
3341
|
});
|
|
3078
3342
|
const detachOnReadyListener = this.instance.on('ready', () => {
|
|
3079
3343
|
this.isInitialized = true;
|
|
3080
3344
|
logger.info('Ninetailed Experience.js SDK is completely initialized.');
|
|
3081
3345
|
detachOnReadyListener();
|
|
3082
|
-
});
|
|
3083
|
-
|
|
3346
|
+
});
|
|
3347
|
+
// put in private method
|
|
3084
3348
|
this.onProfileChange(profileState => {
|
|
3085
3349
|
this._profileState = profileState;
|
|
3350
|
+
if (typeof window !== 'undefined') {
|
|
3351
|
+
window.ninetailed = Object.assign({}, window.ninetailed, {
|
|
3352
|
+
profile: this.profileState.profile
|
|
3353
|
+
});
|
|
3354
|
+
}
|
|
3086
3355
|
});
|
|
3087
3356
|
this.registerWindowHandlers();
|
|
3088
3357
|
}
|
|
3089
|
-
|
|
3090
3358
|
get profileState() {
|
|
3091
3359
|
return this._profileState;
|
|
3092
3360
|
}
|
|
3093
|
-
|
|
3094
3361
|
buildOptions(options = {}) {
|
|
3095
3362
|
return Object.assign({}, options);
|
|
3096
3363
|
}
|
|
3097
|
-
|
|
3098
3364
|
registerWindowHandlers() {
|
|
3099
3365
|
if (typeof window !== 'undefined') {
|
|
3100
3366
|
window.ninetailed = Object.assign({}, window.ninetailed, {
|
|
3101
3367
|
page: this.page.bind(this),
|
|
3102
3368
|
track: this.track.bind(this),
|
|
3103
3369
|
trackHasSeenComponent: this.trackHasSeenComponent.bind(this),
|
|
3370
|
+
trackHasSeenExperience: this.trackHasSeenExperience.bind(this),
|
|
3104
3371
|
identify: this.identify.bind(this),
|
|
3105
3372
|
reset: this.reset.bind(this),
|
|
3106
|
-
debug: this.debug.bind(this)
|
|
3373
|
+
debug: this.debug.bind(this),
|
|
3374
|
+
profile: this.profileState.profile
|
|
3107
3375
|
});
|
|
3108
3376
|
}
|
|
3109
3377
|
}
|
|
3110
|
-
|
|
3111
3378
|
}
|
|
3112
3379
|
|
|
3113
3380
|
const selectVariant$1 = (baseline, variants, {
|
|
@@ -3133,7 +3400,6 @@ const selectVariant$1 = (baseline, variants, {
|
|
|
3133
3400
|
error: null
|
|
3134
3401
|
};
|
|
3135
3402
|
}
|
|
3136
|
-
|
|
3137
3403
|
if (status === 'error') {
|
|
3138
3404
|
return {
|
|
3139
3405
|
loading: false,
|
|
@@ -3150,15 +3416,11 @@ const selectVariant$1 = (baseline, variants, {
|
|
|
3150
3416
|
error: error
|
|
3151
3417
|
};
|
|
3152
3418
|
}
|
|
3153
|
-
|
|
3154
3419
|
const variant = find(variants, variant => {
|
|
3155
3420
|
var _a;
|
|
3156
|
-
|
|
3157
3421
|
return includes(profile === null || profile === void 0 ? void 0 : profile.audiences, (_a = variant.audience) === null || _a === void 0 ? void 0 : _a.id);
|
|
3158
3422
|
});
|
|
3159
|
-
|
|
3160
3423
|
if (variant) {
|
|
3161
|
-
// @ts-ignore
|
|
3162
3424
|
if ((options === null || options === void 0 ? void 0 : options.holdout) || -1 > (profile === null || profile === void 0 ? void 0 : profile.random)) {
|
|
3163
3425
|
return {
|
|
3164
3426
|
loading: false,
|
|
@@ -3174,7 +3436,6 @@ const selectVariant$1 = (baseline, variants, {
|
|
|
3174
3436
|
error: null
|
|
3175
3437
|
};
|
|
3176
3438
|
}
|
|
3177
|
-
|
|
3178
3439
|
return {
|
|
3179
3440
|
loading: false,
|
|
3180
3441
|
variant,
|
|
@@ -3188,8 +3449,6 @@ const selectVariant$1 = (baseline, variants, {
|
|
|
3188
3449
|
/**
|
|
3189
3450
|
* There was no matching audience found.
|
|
3190
3451
|
*/
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
3452
|
return {
|
|
3194
3453
|
loading: false,
|
|
3195
3454
|
variant: Object.assign(Object.assign({}, baseline), {
|
|
@@ -3210,17 +3469,14 @@ const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
|
|
|
3210
3469
|
|
|
3211
3470
|
const selectBaselineWithVariants = (experience, baseline) => {
|
|
3212
3471
|
var _a;
|
|
3213
|
-
|
|
3214
3472
|
return (_a = experience.components.find(baselineWithVariants => baselineWithVariants.baseline.id === baseline.id)) !== null && _a !== void 0 ? _a : null;
|
|
3215
3473
|
};
|
|
3216
3474
|
|
|
3217
3475
|
const selectVariants = (experience, baseline) => {
|
|
3218
3476
|
const baselineWithVariants = selectBaselineWithVariants(experience, baseline);
|
|
3219
|
-
|
|
3220
3477
|
if (!baselineWithVariants) {
|
|
3221
3478
|
return [];
|
|
3222
3479
|
}
|
|
3223
|
-
|
|
3224
3480
|
return baselineWithVariants.variants;
|
|
3225
3481
|
};
|
|
3226
3482
|
|
|
@@ -3230,18 +3486,18 @@ const selectHasVariants = (experience, baseline) => {
|
|
|
3230
3486
|
};
|
|
3231
3487
|
|
|
3232
3488
|
var $$3 = _export;
|
|
3233
|
-
var uncurryThis$
|
|
3489
|
+
var uncurryThis$7 = functionUncurryThisClause;
|
|
3234
3490
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
3235
|
-
var toLength$
|
|
3236
|
-
var toString$
|
|
3491
|
+
var toLength$1 = toLength$3;
|
|
3492
|
+
var toString$5 = toString$7;
|
|
3237
3493
|
var notARegExp = notARegexp;
|
|
3238
|
-
var requireObjectCoercible$
|
|
3494
|
+
var requireObjectCoercible$3 = requireObjectCoercible$7;
|
|
3239
3495
|
var correctIsRegExpLogic = correctIsRegexpLogic;
|
|
3240
3496
|
|
|
3241
3497
|
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
3242
|
-
var
|
|
3243
|
-
var stringSlice$
|
|
3244
|
-
var min$
|
|
3498
|
+
var nativeStartsWith = uncurryThis$7(''.startsWith);
|
|
3499
|
+
var stringSlice$4 = uncurryThis$7(''.slice);
|
|
3500
|
+
var min$1 = Math.min;
|
|
3245
3501
|
|
|
3246
3502
|
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
|
|
3247
3503
|
// https://github.com/zloirock/core-js/pull/702
|
|
@@ -3254,39 +3510,23 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
|
|
|
3254
3510
|
// https://tc39.es/ecma262/#sec-string.prototype.startswith
|
|
3255
3511
|
$$3({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
|
|
3256
3512
|
startsWith: function startsWith(searchString /* , position = 0 */) {
|
|
3257
|
-
var that = toString$
|
|
3513
|
+
var that = toString$5(requireObjectCoercible$3(this));
|
|
3258
3514
|
notARegExp(searchString);
|
|
3259
|
-
var index = toLength$
|
|
3260
|
-
var search = toString$
|
|
3261
|
-
return
|
|
3262
|
-
?
|
|
3263
|
-
: stringSlice$
|
|
3515
|
+
var index = toLength$1(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
3516
|
+
var search = toString$5(searchString);
|
|
3517
|
+
return nativeStartsWith
|
|
3518
|
+
? nativeStartsWith(that, search, index)
|
|
3519
|
+
: stringSlice$4(that, index, index + search.length) === search;
|
|
3264
3520
|
}
|
|
3265
3521
|
});
|
|
3266
3522
|
|
|
3267
|
-
var
|
|
3268
|
-
|
|
3269
|
-
// `RegExp.prototype.flags` getter implementation
|
|
3270
|
-
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
3271
|
-
var regexpFlags$1 = function () {
|
|
3272
|
-
var that = anObject$3(this);
|
|
3273
|
-
var result = '';
|
|
3274
|
-
if (that.global) result += 'g';
|
|
3275
|
-
if (that.ignoreCase) result += 'i';
|
|
3276
|
-
if (that.multiline) result += 'm';
|
|
3277
|
-
if (that.dotAll) result += 's';
|
|
3278
|
-
if (that.unicode) result += 'u';
|
|
3279
|
-
if (that.sticky) result += 'y';
|
|
3280
|
-
return result;
|
|
3281
|
-
};
|
|
3282
|
-
|
|
3283
|
-
var fails$7 = fails$k;
|
|
3284
|
-
var global$7 = global$K;
|
|
3523
|
+
var fails$6 = fails$m;
|
|
3524
|
+
var global$4 = global$n;
|
|
3285
3525
|
|
|
3286
3526
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
3287
|
-
var $RegExp$2 = global$
|
|
3527
|
+
var $RegExp$2 = global$4.RegExp;
|
|
3288
3528
|
|
|
3289
|
-
var UNSUPPORTED_Y$
|
|
3529
|
+
var UNSUPPORTED_Y$1 = fails$6(function () {
|
|
3290
3530
|
var re = $RegExp$2('a', 'y');
|
|
3291
3531
|
re.lastIndex = 2;
|
|
3292
3532
|
return re.exec('abcd') != null;
|
|
@@ -3294,11 +3534,11 @@ var UNSUPPORTED_Y$2 = fails$7(function () {
|
|
|
3294
3534
|
|
|
3295
3535
|
// UC Browser bug
|
|
3296
3536
|
// https://github.com/zloirock/core-js/issues/1008
|
|
3297
|
-
var MISSED_STICKY = UNSUPPORTED_Y$
|
|
3537
|
+
var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$6(function () {
|
|
3298
3538
|
return !$RegExp$2('a', 'y').sticky;
|
|
3299
3539
|
});
|
|
3300
3540
|
|
|
3301
|
-
var BROKEN_CARET = UNSUPPORTED_Y$
|
|
3541
|
+
var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$6(function () {
|
|
3302
3542
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
3303
3543
|
var re = $RegExp$2('^r', 'gy');
|
|
3304
3544
|
re.lastIndex = 2;
|
|
@@ -3308,27 +3548,27 @@ var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$7(function () {
|
|
|
3308
3548
|
var regexpStickyHelpers = {
|
|
3309
3549
|
BROKEN_CARET: BROKEN_CARET,
|
|
3310
3550
|
MISSED_STICKY: MISSED_STICKY,
|
|
3311
|
-
UNSUPPORTED_Y: UNSUPPORTED_Y$
|
|
3551
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$1
|
|
3312
3552
|
};
|
|
3313
3553
|
|
|
3314
|
-
var fails$
|
|
3315
|
-
var global$
|
|
3554
|
+
var fails$5 = fails$m;
|
|
3555
|
+
var global$3 = global$n;
|
|
3316
3556
|
|
|
3317
3557
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
3318
|
-
var $RegExp$1 = global$
|
|
3558
|
+
var $RegExp$1 = global$3.RegExp;
|
|
3319
3559
|
|
|
3320
|
-
var regexpUnsupportedDotAll = fails$
|
|
3560
|
+
var regexpUnsupportedDotAll = fails$5(function () {
|
|
3321
3561
|
var re = $RegExp$1('.', 's');
|
|
3322
3562
|
return !(re.dotAll && re.exec('\n') && re.flags === 's');
|
|
3323
3563
|
});
|
|
3324
3564
|
|
|
3325
|
-
var fails$
|
|
3326
|
-
var global$
|
|
3565
|
+
var fails$4 = fails$m;
|
|
3566
|
+
var global$2 = global$n;
|
|
3327
3567
|
|
|
3328
3568
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
3329
|
-
var $RegExp = global$
|
|
3569
|
+
var $RegExp = global$2.RegExp;
|
|
3330
3570
|
|
|
3331
|
-
var regexpUnsupportedNcg = fails$
|
|
3571
|
+
var regexpUnsupportedNcg = fails$4(function () {
|
|
3332
3572
|
var re = $RegExp('(?<a>b)', 'g');
|
|
3333
3573
|
return re.exec('b').groups.a !== 'b' ||
|
|
3334
3574
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -3336,11 +3576,11 @@ var regexpUnsupportedNcg = fails$5(function () {
|
|
|
3336
3576
|
|
|
3337
3577
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
3338
3578
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
3339
|
-
var call$
|
|
3340
|
-
var uncurryThis$
|
|
3341
|
-
var toString$
|
|
3579
|
+
var call$2 = functionCall;
|
|
3580
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
3581
|
+
var toString$4 = toString$7;
|
|
3342
3582
|
var regexpFlags = regexpFlags$1;
|
|
3343
|
-
var stickyHelpers
|
|
3583
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
3344
3584
|
var shared = shared$4.exports;
|
|
3345
3585
|
var create = objectCreate;
|
|
3346
3586
|
var getInternalState = internalState.get;
|
|
@@ -3350,44 +3590,44 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
3350
3590
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
3351
3591
|
var nativeExec = RegExp.prototype.exec;
|
|
3352
3592
|
var patchedExec = nativeExec;
|
|
3353
|
-
var charAt$3 = uncurryThis$
|
|
3354
|
-
var indexOf = uncurryThis$
|
|
3355
|
-
var replace$2 = uncurryThis$
|
|
3356
|
-
var stringSlice$
|
|
3593
|
+
var charAt$3 = uncurryThis$6(''.charAt);
|
|
3594
|
+
var indexOf = uncurryThis$6(''.indexOf);
|
|
3595
|
+
var replace$2 = uncurryThis$6(''.replace);
|
|
3596
|
+
var stringSlice$3 = uncurryThis$6(''.slice);
|
|
3357
3597
|
|
|
3358
3598
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
3359
3599
|
var re1 = /a/;
|
|
3360
3600
|
var re2 = /b*/g;
|
|
3361
|
-
call$
|
|
3362
|
-
call$
|
|
3601
|
+
call$2(nativeExec, re1, 'a');
|
|
3602
|
+
call$2(nativeExec, re2, 'a');
|
|
3363
3603
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
3364
3604
|
})();
|
|
3365
3605
|
|
|
3366
|
-
var UNSUPPORTED_Y
|
|
3606
|
+
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
3367
3607
|
|
|
3368
3608
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
3369
3609
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
3370
3610
|
|
|
3371
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y
|
|
3611
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
3372
3612
|
|
|
3373
3613
|
if (PATCH) {
|
|
3374
3614
|
patchedExec = function exec(string) {
|
|
3375
3615
|
var re = this;
|
|
3376
3616
|
var state = getInternalState(re);
|
|
3377
|
-
var str = toString$
|
|
3617
|
+
var str = toString$4(string);
|
|
3378
3618
|
var raw = state.raw;
|
|
3379
3619
|
var result, reCopy, lastIndex, match, i, object, group;
|
|
3380
3620
|
|
|
3381
3621
|
if (raw) {
|
|
3382
3622
|
raw.lastIndex = re.lastIndex;
|
|
3383
|
-
result = call$
|
|
3623
|
+
result = call$2(patchedExec, raw, str);
|
|
3384
3624
|
re.lastIndex = raw.lastIndex;
|
|
3385
3625
|
return result;
|
|
3386
3626
|
}
|
|
3387
3627
|
|
|
3388
3628
|
var groups = state.groups;
|
|
3389
|
-
var sticky = UNSUPPORTED_Y
|
|
3390
|
-
var flags = call$
|
|
3629
|
+
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
3630
|
+
var flags = call$2(regexpFlags, re);
|
|
3391
3631
|
var source = re.source;
|
|
3392
3632
|
var charsAdded = 0;
|
|
3393
3633
|
var strCopy = str;
|
|
@@ -3398,7 +3638,7 @@ if (PATCH) {
|
|
|
3398
3638
|
flags += 'g';
|
|
3399
3639
|
}
|
|
3400
3640
|
|
|
3401
|
-
strCopy = stringSlice$
|
|
3641
|
+
strCopy = stringSlice$3(str, re.lastIndex);
|
|
3402
3642
|
// Support anchored sticky behavior.
|
|
3403
3643
|
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
|
|
3404
3644
|
source = '(?: ' + source + ')';
|
|
@@ -3415,12 +3655,12 @@ if (PATCH) {
|
|
|
3415
3655
|
}
|
|
3416
3656
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
3417
3657
|
|
|
3418
|
-
match = call$
|
|
3658
|
+
match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
|
|
3419
3659
|
|
|
3420
3660
|
if (sticky) {
|
|
3421
3661
|
if (match) {
|
|
3422
|
-
match.input = stringSlice$
|
|
3423
|
-
match[0] = stringSlice$
|
|
3662
|
+
match.input = stringSlice$3(match.input, charsAdded);
|
|
3663
|
+
match[0] = stringSlice$3(match[0], charsAdded);
|
|
3424
3664
|
match.index = re.lastIndex;
|
|
3425
3665
|
re.lastIndex += match[0].length;
|
|
3426
3666
|
} else re.lastIndex = 0;
|
|
@@ -3429,8 +3669,8 @@ if (PATCH) {
|
|
|
3429
3669
|
}
|
|
3430
3670
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
3431
3671
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
3432
|
-
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
3433
|
-
call$
|
|
3672
|
+
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
3673
|
+
call$2(nativeReplace, match[0], reCopy, function () {
|
|
3434
3674
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
3435
3675
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
3436
3676
|
}
|
|
@@ -3449,25 +3689,25 @@ if (PATCH) {
|
|
|
3449
3689
|
};
|
|
3450
3690
|
}
|
|
3451
3691
|
|
|
3452
|
-
var regexpExec$
|
|
3692
|
+
var regexpExec$2 = patchedExec;
|
|
3453
3693
|
|
|
3454
3694
|
var $$2 = _export;
|
|
3455
|
-
var exec$
|
|
3695
|
+
var exec$1 = regexpExec$2;
|
|
3456
3696
|
|
|
3457
3697
|
// `RegExp.prototype.exec` method
|
|
3458
3698
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
3459
|
-
$$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec$
|
|
3460
|
-
exec: exec$
|
|
3699
|
+
$$2({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
3700
|
+
exec: exec$1
|
|
3461
3701
|
});
|
|
3462
3702
|
|
|
3463
3703
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
3464
3704
|
|
|
3465
|
-
var uncurryThis$
|
|
3466
|
-
var
|
|
3467
|
-
var regexpExec$
|
|
3468
|
-
var fails$
|
|
3705
|
+
var uncurryThis$5 = functionUncurryThisClause;
|
|
3706
|
+
var defineBuiltIn = defineBuiltIn$7;
|
|
3707
|
+
var regexpExec$1 = regexpExec$2;
|
|
3708
|
+
var fails$3 = fails$m;
|
|
3469
3709
|
var wellKnownSymbol$1 = wellKnownSymbol$i;
|
|
3470
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
3710
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
3471
3711
|
|
|
3472
3712
|
var SPECIES = wellKnownSymbol$1('species');
|
|
3473
3713
|
var RegExpPrototype = RegExp.prototype;
|
|
@@ -3475,14 +3715,14 @@ var RegExpPrototype = RegExp.prototype;
|
|
|
3475
3715
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
3476
3716
|
var SYMBOL = wellKnownSymbol$1(KEY);
|
|
3477
3717
|
|
|
3478
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
3718
|
+
var DELEGATES_TO_SYMBOL = !fails$3(function () {
|
|
3479
3719
|
// String methods call symbol-named RegEp methods
|
|
3480
3720
|
var O = {};
|
|
3481
3721
|
O[SYMBOL] = function () { return 7; };
|
|
3482
3722
|
return ''[KEY](O) != 7;
|
|
3483
3723
|
});
|
|
3484
3724
|
|
|
3485
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
3725
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$3(function () {
|
|
3486
3726
|
// Symbol-named RegExp methods call .exec
|
|
3487
3727
|
var execCalled = false;
|
|
3488
3728
|
var re = /a/;
|
|
@@ -3511,11 +3751,11 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
3511
3751
|
!DELEGATES_TO_EXEC ||
|
|
3512
3752
|
FORCED
|
|
3513
3753
|
) {
|
|
3514
|
-
var uncurriedNativeRegExpMethod = uncurryThis$
|
|
3754
|
+
var uncurriedNativeRegExpMethod = uncurryThis$5(/./[SYMBOL]);
|
|
3515
3755
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
3516
|
-
var uncurriedNativeMethod = uncurryThis$
|
|
3756
|
+
var uncurriedNativeMethod = uncurryThis$5(nativeMethod);
|
|
3517
3757
|
var $exec = regexp.exec;
|
|
3518
|
-
if ($exec === regexpExec$
|
|
3758
|
+
if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
|
|
3519
3759
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
3520
3760
|
// The native String method already delegates to @@method (this
|
|
3521
3761
|
// polyfilled function), leasing to infinite recursion.
|
|
@@ -3527,25 +3767,25 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
3527
3767
|
return { done: false };
|
|
3528
3768
|
});
|
|
3529
3769
|
|
|
3530
|
-
|
|
3531
|
-
|
|
3770
|
+
defineBuiltIn(String.prototype, KEY, methods[0]);
|
|
3771
|
+
defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
|
|
3532
3772
|
}
|
|
3533
3773
|
|
|
3534
3774
|
if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
|
|
3535
3775
|
};
|
|
3536
3776
|
|
|
3537
|
-
var uncurryThis$
|
|
3777
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
3538
3778
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
3539
|
-
var toString$
|
|
3540
|
-
var requireObjectCoercible$
|
|
3779
|
+
var toString$3 = toString$7;
|
|
3780
|
+
var requireObjectCoercible$2 = requireObjectCoercible$7;
|
|
3541
3781
|
|
|
3542
|
-
var charAt$2 = uncurryThis$
|
|
3543
|
-
var charCodeAt = uncurryThis$
|
|
3544
|
-
var stringSlice$
|
|
3782
|
+
var charAt$2 = uncurryThis$4(''.charAt);
|
|
3783
|
+
var charCodeAt = uncurryThis$4(''.charCodeAt);
|
|
3784
|
+
var stringSlice$2 = uncurryThis$4(''.slice);
|
|
3545
3785
|
|
|
3546
3786
|
var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
3547
3787
|
return function ($this, pos) {
|
|
3548
|
-
var S = toString$
|
|
3788
|
+
var S = toString$3(requireObjectCoercible$2($this));
|
|
3549
3789
|
var position = toIntegerOrInfinity$1(pos);
|
|
3550
3790
|
var size = S.length;
|
|
3551
3791
|
var first, second;
|
|
@@ -3557,7 +3797,7 @@ var createMethod$2 = function (CONVERT_TO_STRING) {
|
|
|
3557
3797
|
? charAt$2(S, position)
|
|
3558
3798
|
: first
|
|
3559
3799
|
: CONVERT_TO_STRING
|
|
3560
|
-
? stringSlice$
|
|
3800
|
+
? stringSlice$2(S, position, position + 2)
|
|
3561
3801
|
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
3562
3802
|
};
|
|
3563
3803
|
};
|
|
@@ -3575,17 +3815,17 @@ var charAt$1 = stringMultibyte.charAt;
|
|
|
3575
3815
|
|
|
3576
3816
|
// `AdvanceStringIndex` abstract operation
|
|
3577
3817
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
3578
|
-
var advanceStringIndex$
|
|
3818
|
+
var advanceStringIndex$1 = function (S, index, unicode) {
|
|
3579
3819
|
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
3580
3820
|
};
|
|
3581
3821
|
|
|
3582
|
-
var uncurryThis$
|
|
3822
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
3583
3823
|
var toObject$1 = toObject$5;
|
|
3584
3824
|
|
|
3585
3825
|
var floor = Math.floor;
|
|
3586
|
-
var charAt = uncurryThis$
|
|
3587
|
-
var replace$1 = uncurryThis$
|
|
3588
|
-
var stringSlice$
|
|
3826
|
+
var charAt = uncurryThis$3(''.charAt);
|
|
3827
|
+
var replace$1 = uncurryThis$3(''.replace);
|
|
3828
|
+
var stringSlice$1 = uncurryThis$3(''.slice);
|
|
3589
3829
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
3590
3830
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
3591
3831
|
|
|
@@ -3604,10 +3844,10 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
3604
3844
|
switch (charAt(ch, 0)) {
|
|
3605
3845
|
case '$': return '$';
|
|
3606
3846
|
case '&': return matched;
|
|
3607
|
-
case '`': return stringSlice$
|
|
3608
|
-
case "'": return stringSlice$
|
|
3847
|
+
case '`': return stringSlice$1(str, 0, position);
|
|
3848
|
+
case "'": return stringSlice$1(str, tailPos);
|
|
3609
3849
|
case '<':
|
|
3610
|
-
capture = namedCaptures[stringSlice$
|
|
3850
|
+
capture = namedCaptures[stringSlice$1(ch, 1, -1)];
|
|
3611
3851
|
break;
|
|
3612
3852
|
default: // \d\d?
|
|
3613
3853
|
var n = +ch;
|
|
@@ -3624,52 +3864,52 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
3624
3864
|
});
|
|
3625
3865
|
};
|
|
3626
3866
|
|
|
3627
|
-
var
|
|
3628
|
-
var
|
|
3629
|
-
var
|
|
3630
|
-
var
|
|
3631
|
-
var
|
|
3632
|
-
var regexpExec$1 = regexpExec$3;
|
|
3867
|
+
var call$1 = functionCall;
|
|
3868
|
+
var anObject$1 = anObject$e;
|
|
3869
|
+
var isCallable$1 = isCallable$m;
|
|
3870
|
+
var classof = classofRaw$2;
|
|
3871
|
+
var regexpExec = regexpExec$2;
|
|
3633
3872
|
|
|
3634
|
-
var TypeError$
|
|
3873
|
+
var $TypeError$1 = TypeError;
|
|
3635
3874
|
|
|
3636
3875
|
// `RegExpExec` abstract operation
|
|
3637
3876
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
3638
3877
|
var regexpExecAbstract = function (R, S) {
|
|
3639
3878
|
var exec = R.exec;
|
|
3640
3879
|
if (isCallable$1(exec)) {
|
|
3641
|
-
var result = call$
|
|
3642
|
-
if (result !== null) anObject$
|
|
3880
|
+
var result = call$1(exec, R, S);
|
|
3881
|
+
if (result !== null) anObject$1(result);
|
|
3643
3882
|
return result;
|
|
3644
3883
|
}
|
|
3645
|
-
if (classof(R) === 'RegExp') return call$
|
|
3646
|
-
throw TypeError$
|
|
3884
|
+
if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
|
|
3885
|
+
throw $TypeError$1('RegExp#exec called on incompatible receiver');
|
|
3647
3886
|
};
|
|
3648
3887
|
|
|
3649
|
-
var apply
|
|
3650
|
-
var call
|
|
3651
|
-
var uncurryThis$
|
|
3652
|
-
var fixRegExpWellKnownSymbolLogic
|
|
3653
|
-
var fails$
|
|
3654
|
-
var anObject
|
|
3655
|
-
var isCallable = isCallable$
|
|
3888
|
+
var apply = functionApply;
|
|
3889
|
+
var call = functionCall;
|
|
3890
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
3891
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
3892
|
+
var fails$2 = fails$m;
|
|
3893
|
+
var anObject = anObject$e;
|
|
3894
|
+
var isCallable = isCallable$m;
|
|
3895
|
+
var isNullOrUndefined = isNullOrUndefined$5;
|
|
3656
3896
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
3657
|
-
var toLength
|
|
3658
|
-
var toString$
|
|
3659
|
-
var requireObjectCoercible$
|
|
3660
|
-
var advanceStringIndex
|
|
3661
|
-
var getMethod
|
|
3897
|
+
var toLength = toLength$3;
|
|
3898
|
+
var toString$2 = toString$7;
|
|
3899
|
+
var requireObjectCoercible$1 = requireObjectCoercible$7;
|
|
3900
|
+
var advanceStringIndex = advanceStringIndex$1;
|
|
3901
|
+
var getMethod = getMethod$4;
|
|
3662
3902
|
var getSubstitution = getSubstitution$1;
|
|
3663
3903
|
var regExpExec = regexpExecAbstract;
|
|
3664
3904
|
var wellKnownSymbol = wellKnownSymbol$i;
|
|
3665
3905
|
|
|
3666
3906
|
var REPLACE = wellKnownSymbol('replace');
|
|
3667
|
-
var max
|
|
3668
|
-
var min
|
|
3669
|
-
var concat = uncurryThis$
|
|
3670
|
-
var push
|
|
3671
|
-
var stringIndexOf = uncurryThis$
|
|
3672
|
-
var stringSlice
|
|
3907
|
+
var max = Math.max;
|
|
3908
|
+
var min = Math.min;
|
|
3909
|
+
var concat = uncurryThis$2([].concat);
|
|
3910
|
+
var push = uncurryThis$2([].push);
|
|
3911
|
+
var stringIndexOf = uncurryThis$2(''.indexOf);
|
|
3912
|
+
var stringSlice = uncurryThis$2(''.slice);
|
|
3673
3913
|
|
|
3674
3914
|
var maybeToString = function (it) {
|
|
3675
3915
|
return it === undefined ? it : String(it);
|
|
@@ -3690,7 +3930,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
|
3690
3930
|
return false;
|
|
3691
3931
|
})();
|
|
3692
3932
|
|
|
3693
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$
|
|
3933
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
|
|
3694
3934
|
var re = /./;
|
|
3695
3935
|
re.exec = function () {
|
|
3696
3936
|
var result = [];
|
|
@@ -3702,24 +3942,24 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$3(function () {
|
|
|
3702
3942
|
});
|
|
3703
3943
|
|
|
3704
3944
|
// @@replace logic
|
|
3705
|
-
fixRegExpWellKnownSymbolLogic
|
|
3945
|
+
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
3706
3946
|
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
3707
3947
|
|
|
3708
3948
|
return [
|
|
3709
3949
|
// `String.prototype.replace` method
|
|
3710
3950
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
3711
3951
|
function replace(searchValue, replaceValue) {
|
|
3712
|
-
var O = requireObjectCoercible$
|
|
3713
|
-
var replacer = searchValue
|
|
3952
|
+
var O = requireObjectCoercible$1(this);
|
|
3953
|
+
var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
|
|
3714
3954
|
return replacer
|
|
3715
|
-
? call
|
|
3716
|
-
: call
|
|
3955
|
+
? call(replacer, searchValue, O, replaceValue)
|
|
3956
|
+
: call(nativeReplace, toString$2(O), searchValue, replaceValue);
|
|
3717
3957
|
},
|
|
3718
3958
|
// `RegExp.prototype[@@replace]` method
|
|
3719
3959
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
3720
3960
|
function (string, replaceValue) {
|
|
3721
|
-
var rx = anObject
|
|
3722
|
-
var S = toString$
|
|
3961
|
+
var rx = anObject(this);
|
|
3962
|
+
var S = toString$2(string);
|
|
3723
3963
|
|
|
3724
3964
|
if (
|
|
3725
3965
|
typeof replaceValue == 'string' &&
|
|
@@ -3731,7 +3971,7 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
|
|
|
3731
3971
|
}
|
|
3732
3972
|
|
|
3733
3973
|
var functionalReplace = isCallable(replaceValue);
|
|
3734
|
-
if (!functionalReplace) replaceValue = toString$
|
|
3974
|
+
if (!functionalReplace) replaceValue = toString$2(replaceValue);
|
|
3735
3975
|
|
|
3736
3976
|
var global = rx.global;
|
|
3737
3977
|
if (global) {
|
|
@@ -3743,11 +3983,11 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
|
|
|
3743
3983
|
var result = regExpExec(rx, S);
|
|
3744
3984
|
if (result === null) break;
|
|
3745
3985
|
|
|
3746
|
-
push
|
|
3986
|
+
push(results, result);
|
|
3747
3987
|
if (!global) break;
|
|
3748
3988
|
|
|
3749
|
-
var matchStr = toString$
|
|
3750
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex
|
|
3989
|
+
var matchStr = toString$2(result[0]);
|
|
3990
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
3751
3991
|
}
|
|
3752
3992
|
|
|
3753
3993
|
var accumulatedResult = '';
|
|
@@ -3755,37 +3995,37 @@ fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCall
|
|
|
3755
3995
|
for (var i = 0; i < results.length; i++) {
|
|
3756
3996
|
result = results[i];
|
|
3757
3997
|
|
|
3758
|
-
var matched = toString$
|
|
3759
|
-
var position = max
|
|
3998
|
+
var matched = toString$2(result[0]);
|
|
3999
|
+
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
3760
4000
|
var captures = [];
|
|
3761
4001
|
// NOTE: This is equivalent to
|
|
3762
4002
|
// captures = result.slice(1).map(maybeToString)
|
|
3763
4003
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
3764
4004
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
3765
4005
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
3766
|
-
for (var j = 1; j < result.length; j++) push
|
|
4006
|
+
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
3767
4007
|
var namedCaptures = result.groups;
|
|
3768
4008
|
if (functionalReplace) {
|
|
3769
4009
|
var replacerArgs = concat([matched], captures, position, S);
|
|
3770
|
-
if (namedCaptures !== undefined) push
|
|
3771
|
-
var replacement = toString$
|
|
4010
|
+
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
4011
|
+
var replacement = toString$2(apply(replaceValue, undefined, replacerArgs));
|
|
3772
4012
|
} else {
|
|
3773
4013
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
3774
4014
|
}
|
|
3775
4015
|
if (position >= nextSourcePosition) {
|
|
3776
|
-
accumulatedResult += stringSlice
|
|
4016
|
+
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
3777
4017
|
nextSourcePosition = position + matched.length;
|
|
3778
4018
|
}
|
|
3779
4019
|
}
|
|
3780
|
-
return accumulatedResult + stringSlice
|
|
4020
|
+
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
3781
4021
|
}
|
|
3782
4022
|
];
|
|
3783
4023
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
3784
4024
|
|
|
3785
4025
|
const selectActiveExperiments = (experiments, profile) => {
|
|
3786
4026
|
const experimentTraits = pickBy(profile.traits, (value, key) => key.startsWith(EXPERIENCE_TRAIT_PREFIX) && value === true);
|
|
3787
|
-
const experimentTraitsIds = Object.keys(experimentTraits).map(id => id.replace(EXPERIENCE_TRAIT_PREFIX, ''));
|
|
3788
|
-
|
|
4027
|
+
const experimentTraitsIds = Object.keys(experimentTraits).map(id => id.replace(EXPERIENCE_TRAIT_PREFIX, ''));
|
|
4028
|
+
// a experiment is active when the use has it set as a true value on the traits and the experiment config is still active
|
|
3789
4029
|
const activeExperiments = experiments.filter(experiment => includes(experimentTraitsIds, experiment.id));
|
|
3790
4030
|
return activeExperiments;
|
|
3791
4031
|
};
|
|
@@ -3795,7 +4035,6 @@ const selectActiveExperiments = (experiments, profile) => {
|
|
|
3795
4035
|
* When going for an experiment we can only select a active experiment when 1 or more experiments are active
|
|
3796
4036
|
* If the profile is not in any active experiments, we can select any expermiment
|
|
3797
4037
|
*/
|
|
3798
|
-
|
|
3799
4038
|
const selectEligibleExperiences = ({
|
|
3800
4039
|
experiences,
|
|
3801
4040
|
activeExperiments
|
|
@@ -3807,15 +4046,12 @@ const selectEligibleExperiences = ({
|
|
|
3807
4046
|
|
|
3808
4047
|
const LOWER_BOUND = 0;
|
|
3809
4048
|
const UPPER_BOUND = 4294967295;
|
|
3810
|
-
|
|
3811
4049
|
const normalize = (val, min, max) => (val - min) / (max - min);
|
|
3812
|
-
|
|
3813
4050
|
const getRandom = text => {
|
|
3814
4051
|
const hash = murmur3(text, 0);
|
|
3815
4052
|
const random = normalize(hash, LOWER_BOUND, UPPER_BOUND);
|
|
3816
4053
|
return random;
|
|
3817
4054
|
};
|
|
3818
|
-
|
|
3819
4055
|
const getTrafficRandom = (profile, experience) => getRandom(`traffic-${experience.id}-${profile.id}`);
|
|
3820
4056
|
const getDistributionRandom = (profile, experience) => getRandom(`distribution-${experience.id}-${profile.id}`);
|
|
3821
4057
|
|
|
@@ -3825,6 +4061,7 @@ const isExperienceMatch = ({
|
|
|
3825
4061
|
profile
|
|
3826
4062
|
}) => {
|
|
3827
4063
|
const trafficRandom = getTrafficRandom(profile, experience);
|
|
4064
|
+
/*console.log('has no audience', experience.id, !experience.audience);*/
|
|
3828
4065
|
logger.info(`The traffic random factor for experience ${experience.id} is ${trafficRandom}. It's traffic allocation is set to ${experience.trafficAllocation}.`);
|
|
3829
4066
|
const isInTrafficRange = experience.trafficAllocation > trafficRandom;
|
|
3830
4067
|
const matchesAudience = !experience.audience || includes(profile.audiences, experience.audience.id);
|
|
@@ -3834,7 +4071,8 @@ const isExperienceMatch = ({
|
|
|
3834
4071
|
logger.info(`Is the profile in traffic allocation range? ${isInTrafficRange ? 'yes' : 'no'}.\n
|
|
3835
4072
|
Does the profile match the audience of the experience? ${matchesAudience ? 'yes' : 'no'}.\n
|
|
3836
4073
|
Is there an active experiment for this profile? ${hasActiveExperiment ? 'yes' : 'no'}.`);
|
|
3837
|
-
return isInTrafficRange && (matchesAudience ||
|
|
4074
|
+
return isInTrafficRange && (matchesAudience ||
|
|
4075
|
+
// if the expriment is active already then it's selectible without further contraints to be fullfilled
|
|
3838
4076
|
hasActiveExperiment);
|
|
3839
4077
|
};
|
|
3840
4078
|
|
|
@@ -3875,7 +4113,6 @@ const selectDistribution = ({
|
|
|
3875
4113
|
end: 1
|
|
3876
4114
|
};
|
|
3877
4115
|
}
|
|
3878
|
-
|
|
3879
4116
|
return distribution;
|
|
3880
4117
|
};
|
|
3881
4118
|
|
|
@@ -3885,50 +4122,40 @@ const selectVariant = ({
|
|
|
3885
4122
|
profile
|
|
3886
4123
|
}) => {
|
|
3887
4124
|
const variants = selectVariants(experience, baseline);
|
|
3888
|
-
|
|
3889
4125
|
if (!variants.length) {
|
|
3890
4126
|
return null;
|
|
3891
4127
|
}
|
|
3892
|
-
|
|
3893
4128
|
const distribution = selectDistribution({
|
|
3894
4129
|
experience,
|
|
3895
4130
|
profile
|
|
3896
4131
|
});
|
|
3897
|
-
|
|
3898
4132
|
if (!distribution) {
|
|
3899
4133
|
return null;
|
|
3900
4134
|
}
|
|
3901
|
-
|
|
3902
4135
|
if (distribution.index === 0) {
|
|
3903
4136
|
return Object.assign(Object.assign({}, baseline), {
|
|
3904
4137
|
hidden: false
|
|
3905
4138
|
});
|
|
3906
4139
|
}
|
|
3907
|
-
|
|
3908
4140
|
const correctedVariantIndex = distribution.index - 1;
|
|
3909
|
-
|
|
3910
4141
|
if (variants.length <= correctedVariantIndex) {
|
|
3911
4142
|
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
3912
4143
|
return null;
|
|
3913
4144
|
}
|
|
3914
|
-
|
|
3915
4145
|
const variant = variants[correctedVariantIndex];
|
|
3916
|
-
|
|
3917
4146
|
if (!variant) {
|
|
3918
4147
|
console.warn("A distribution for a variant was selected but it's metadata could not be found.");
|
|
3919
4148
|
return null;
|
|
3920
4149
|
}
|
|
3921
|
-
|
|
3922
4150
|
return variant;
|
|
3923
4151
|
};
|
|
3924
4152
|
|
|
3925
|
-
var
|
|
3926
|
-
var aCallable = aCallable$6;
|
|
4153
|
+
var aCallable = aCallable$8;
|
|
3927
4154
|
var toObject = toObject$5;
|
|
3928
4155
|
var IndexedObject = indexedObject;
|
|
3929
|
-
var lengthOfArrayLike
|
|
4156
|
+
var lengthOfArrayLike = lengthOfArrayLike$3;
|
|
3930
4157
|
|
|
3931
|
-
var TypeError
|
|
4158
|
+
var $TypeError = TypeError;
|
|
3932
4159
|
|
|
3933
4160
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
3934
4161
|
var createMethod$1 = function (IS_RIGHT) {
|
|
@@ -3936,7 +4163,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
3936
4163
|
aCallable(callbackfn);
|
|
3937
4164
|
var O = toObject(that);
|
|
3938
4165
|
var self = IndexedObject(O);
|
|
3939
|
-
var length = lengthOfArrayLike
|
|
4166
|
+
var length = lengthOfArrayLike(O);
|
|
3940
4167
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
3941
4168
|
var i = IS_RIGHT ? -1 : 1;
|
|
3942
4169
|
if (argumentsLength < 2) while (true) {
|
|
@@ -3947,7 +4174,7 @@ var createMethod$1 = function (IS_RIGHT) {
|
|
|
3947
4174
|
}
|
|
3948
4175
|
index += i;
|
|
3949
4176
|
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
3950
|
-
throw TypeError
|
|
4177
|
+
throw $TypeError('Reduce of empty array with no initial value');
|
|
3951
4178
|
}
|
|
3952
4179
|
}
|
|
3953
4180
|
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -3966,11 +4193,11 @@ var arrayReduce = {
|
|
|
3966
4193
|
right: createMethod$1(true)
|
|
3967
4194
|
};
|
|
3968
4195
|
|
|
3969
|
-
var fails$
|
|
4196
|
+
var fails$1 = fails$m;
|
|
3970
4197
|
|
|
3971
4198
|
var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
3972
4199
|
var method = [][METHOD_NAME];
|
|
3973
|
-
return !!method && fails$
|
|
4200
|
+
return !!method && fails$1(function () {
|
|
3974
4201
|
// eslint-disable-next-line no-useless-call -- required for testing
|
|
3975
4202
|
method.call(null, argument || function () { return 1; }, 1);
|
|
3976
4203
|
});
|
|
@@ -3996,197 +4223,13 @@ $$1({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
|
|
|
3996
4223
|
}
|
|
3997
4224
|
});
|
|
3998
4225
|
|
|
3999
|
-
var toPropertyKey = toPropertyKey$3;
|
|
4000
|
-
var definePropertyModule = objectDefineProperty;
|
|
4001
|
-
var createPropertyDescriptor = createPropertyDescriptor$4;
|
|
4002
|
-
|
|
4003
|
-
var createProperty$1 = function (object, key, value) {
|
|
4004
|
-
var propertyKey = toPropertyKey(key);
|
|
4005
|
-
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
4006
|
-
else object[propertyKey] = value;
|
|
4007
|
-
};
|
|
4008
|
-
|
|
4009
|
-
var global$2 = global$K;
|
|
4010
|
-
var toAbsoluteIndex = toAbsoluteIndex$2;
|
|
4011
|
-
var lengthOfArrayLike = lengthOfArrayLike$4;
|
|
4012
|
-
var createProperty = createProperty$1;
|
|
4013
|
-
|
|
4014
|
-
var Array$1 = global$2.Array;
|
|
4015
|
-
var max = Math.max;
|
|
4016
|
-
|
|
4017
|
-
var arraySliceSimple = function (O, start, end) {
|
|
4018
|
-
var length = lengthOfArrayLike(O);
|
|
4019
|
-
var k = toAbsoluteIndex(start, length);
|
|
4020
|
-
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
4021
|
-
var result = Array$1(max(fin - k, 0));
|
|
4022
|
-
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
4023
|
-
result.length = n;
|
|
4024
|
-
return result;
|
|
4025
|
-
};
|
|
4026
|
-
|
|
4027
|
-
var apply = functionApply;
|
|
4028
|
-
var call = functionCall;
|
|
4029
|
-
var uncurryThis$2 = functionUncurryThis;
|
|
4030
|
-
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
4031
|
-
var isRegExp = isRegexp;
|
|
4032
|
-
var anObject = anObject$e;
|
|
4033
|
-
var requireObjectCoercible$1 = requireObjectCoercible$8;
|
|
4034
|
-
var speciesConstructor = speciesConstructor$2;
|
|
4035
|
-
var advanceStringIndex = advanceStringIndex$2;
|
|
4036
|
-
var toLength = toLength$4;
|
|
4037
|
-
var toString$2 = toString$8;
|
|
4038
|
-
var getMethod = getMethod$5;
|
|
4039
|
-
var arraySlice = arraySliceSimple;
|
|
4040
|
-
var callRegExpExec = regexpExecAbstract;
|
|
4041
|
-
var regexpExec = regexpExec$3;
|
|
4042
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
4043
|
-
var fails$1 = fails$k;
|
|
4044
|
-
|
|
4045
|
-
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
4046
|
-
var MAX_UINT32 = 0xFFFFFFFF;
|
|
4047
|
-
var min = Math.min;
|
|
4048
|
-
var $push = [].push;
|
|
4049
|
-
var exec$1 = uncurryThis$2(/./.exec);
|
|
4050
|
-
var push = uncurryThis$2($push);
|
|
4051
|
-
var stringSlice = uncurryThis$2(''.slice);
|
|
4052
|
-
|
|
4053
|
-
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
4054
|
-
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
4055
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails$1(function () {
|
|
4056
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
4057
|
-
var re = /(?:)/;
|
|
4058
|
-
var originalExec = re.exec;
|
|
4059
|
-
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
4060
|
-
var result = 'ab'.split(re);
|
|
4061
|
-
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
4062
|
-
});
|
|
4063
|
-
|
|
4064
|
-
// @@split logic
|
|
4065
|
-
fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
|
4066
|
-
var internalSplit;
|
|
4067
|
-
if (
|
|
4068
|
-
'abbc'.split(/(b)*/)[1] == 'c' ||
|
|
4069
|
-
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
4070
|
-
'test'.split(/(?:)/, -1).length != 4 ||
|
|
4071
|
-
'ab'.split(/(?:ab)*/).length != 2 ||
|
|
4072
|
-
'.'.split(/(.?)(.?)/).length != 4 ||
|
|
4073
|
-
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
|
4074
|
-
'.'.split(/()()/).length > 1 ||
|
|
4075
|
-
''.split(/.?/).length
|
|
4076
|
-
) {
|
|
4077
|
-
// based on es5-shim implementation, need to rework it
|
|
4078
|
-
internalSplit = function (separator, limit) {
|
|
4079
|
-
var string = toString$2(requireObjectCoercible$1(this));
|
|
4080
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
4081
|
-
if (lim === 0) return [];
|
|
4082
|
-
if (separator === undefined) return [string];
|
|
4083
|
-
// If `separator` is not a regex, use native split
|
|
4084
|
-
if (!isRegExp(separator)) {
|
|
4085
|
-
return call(nativeSplit, string, separator, lim);
|
|
4086
|
-
}
|
|
4087
|
-
var output = [];
|
|
4088
|
-
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
4089
|
-
(separator.multiline ? 'm' : '') +
|
|
4090
|
-
(separator.unicode ? 'u' : '') +
|
|
4091
|
-
(separator.sticky ? 'y' : '');
|
|
4092
|
-
var lastLastIndex = 0;
|
|
4093
|
-
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
4094
|
-
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
4095
|
-
var match, lastIndex, lastLength;
|
|
4096
|
-
while (match = call(regexpExec, separatorCopy, string)) {
|
|
4097
|
-
lastIndex = separatorCopy.lastIndex;
|
|
4098
|
-
if (lastIndex > lastLastIndex) {
|
|
4099
|
-
push(output, stringSlice(string, lastLastIndex, match.index));
|
|
4100
|
-
if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
|
|
4101
|
-
lastLength = match[0].length;
|
|
4102
|
-
lastLastIndex = lastIndex;
|
|
4103
|
-
if (output.length >= lim) break;
|
|
4104
|
-
}
|
|
4105
|
-
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
|
4106
|
-
}
|
|
4107
|
-
if (lastLastIndex === string.length) {
|
|
4108
|
-
if (lastLength || !exec$1(separatorCopy, '')) push(output, '');
|
|
4109
|
-
} else push(output, stringSlice(string, lastLastIndex));
|
|
4110
|
-
return output.length > lim ? arraySlice(output, 0, lim) : output;
|
|
4111
|
-
};
|
|
4112
|
-
// Chakra, V8
|
|
4113
|
-
} else if ('0'.split(undefined, 0).length) {
|
|
4114
|
-
internalSplit = function (separator, limit) {
|
|
4115
|
-
return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
|
|
4116
|
-
};
|
|
4117
|
-
} else internalSplit = nativeSplit;
|
|
4118
|
-
|
|
4119
|
-
return [
|
|
4120
|
-
// `String.prototype.split` method
|
|
4121
|
-
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
4122
|
-
function split(separator, limit) {
|
|
4123
|
-
var O = requireObjectCoercible$1(this);
|
|
4124
|
-
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
|
4125
|
-
return splitter
|
|
4126
|
-
? call(splitter, separator, O, limit)
|
|
4127
|
-
: call(internalSplit, toString$2(O), separator, limit);
|
|
4128
|
-
},
|
|
4129
|
-
// `RegExp.prototype[@@split]` method
|
|
4130
|
-
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
4131
|
-
//
|
|
4132
|
-
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
4133
|
-
// the 'y' flag.
|
|
4134
|
-
function (string, limit) {
|
|
4135
|
-
var rx = anObject(this);
|
|
4136
|
-
var S = toString$2(string);
|
|
4137
|
-
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
|
4138
|
-
|
|
4139
|
-
if (res.done) return res.value;
|
|
4140
|
-
|
|
4141
|
-
var C = speciesConstructor(rx, RegExp);
|
|
4142
|
-
|
|
4143
|
-
var unicodeMatching = rx.unicode;
|
|
4144
|
-
var flags = (rx.ignoreCase ? 'i' : '') +
|
|
4145
|
-
(rx.multiline ? 'm' : '') +
|
|
4146
|
-
(rx.unicode ? 'u' : '') +
|
|
4147
|
-
(UNSUPPORTED_Y ? 'g' : 'y');
|
|
4148
|
-
|
|
4149
|
-
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
4150
|
-
// simulate the 'y' flag.
|
|
4151
|
-
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
|
4152
|
-
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
4153
|
-
if (lim === 0) return [];
|
|
4154
|
-
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
|
|
4155
|
-
var p = 0;
|
|
4156
|
-
var q = 0;
|
|
4157
|
-
var A = [];
|
|
4158
|
-
while (q < S.length) {
|
|
4159
|
-
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
|
4160
|
-
var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
|
|
4161
|
-
var e;
|
|
4162
|
-
if (
|
|
4163
|
-
z === null ||
|
|
4164
|
-
(e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
|
4165
|
-
) {
|
|
4166
|
-
q = advanceStringIndex(S, q, unicodeMatching);
|
|
4167
|
-
} else {
|
|
4168
|
-
push(A, stringSlice(S, p, q));
|
|
4169
|
-
if (A.length === lim) return A;
|
|
4170
|
-
for (var i = 1; i <= z.length - 1; i++) {
|
|
4171
|
-
push(A, z[i]);
|
|
4172
|
-
if (A.length === lim) return A;
|
|
4173
|
-
}
|
|
4174
|
-
q = p = e;
|
|
4175
|
-
}
|
|
4176
|
-
}
|
|
4177
|
-
push(A, stringSlice(S, p));
|
|
4178
|
-
return A;
|
|
4179
|
-
}
|
|
4180
|
-
];
|
|
4181
|
-
}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
|
4182
|
-
|
|
4183
4226
|
// a string of all valid unicode whitespaces
|
|
4184
4227
|
var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
4185
4228
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
4186
4229
|
|
|
4187
4230
|
var uncurryThis$1 = functionUncurryThis;
|
|
4188
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
4189
|
-
var toString$1 = toString$
|
|
4231
|
+
var requireObjectCoercible = requireObjectCoercible$7;
|
|
4232
|
+
var toString$1 = toString$7;
|
|
4190
4233
|
var whitespaces$1 = whitespaces$2;
|
|
4191
4234
|
|
|
4192
4235
|
var replace = uncurryThis$1(''.replace);
|
|
@@ -4216,10 +4259,10 @@ var stringTrim = {
|
|
|
4216
4259
|
trim: createMethod(3)
|
|
4217
4260
|
};
|
|
4218
4261
|
|
|
4219
|
-
var global$1 = global$
|
|
4220
|
-
var fails = fails$
|
|
4262
|
+
var global$1 = global$n;
|
|
4263
|
+
var fails = fails$m;
|
|
4221
4264
|
var uncurryThis = functionUncurryThis;
|
|
4222
|
-
var toString = toString$
|
|
4265
|
+
var toString = toString$7;
|
|
4223
4266
|
var trim = stringTrim.trim;
|
|
4224
4267
|
var whitespaces = whitespaces$2;
|
|
4225
4268
|
|
|
@@ -4252,11 +4295,9 @@ const decodeExperienceVariantsMap = encodedExperienceVariantsMap => {
|
|
|
4252
4295
|
return encodedExperienceVariantsMap.split(',').map(experienceIdWithVariant => {
|
|
4253
4296
|
const [experienceId, _variantIndex] = experienceIdWithVariant.split('=');
|
|
4254
4297
|
const variantIndex = parseInt(_variantIndex);
|
|
4255
|
-
|
|
4256
4298
|
if (!experienceId || !variantIndex) {
|
|
4257
4299
|
return null;
|
|
4258
4300
|
}
|
|
4259
|
-
|
|
4260
4301
|
return {
|
|
4261
4302
|
experienceId,
|
|
4262
4303
|
variantIndex
|
|
@@ -4266,4 +4307,4 @@ const decodeExperienceVariantsMap = encodedExperienceVariantsMap => {
|
|
|
4266
4307
|
}), {});
|
|
4267
4308
|
};
|
|
4268
4309
|
|
|
4269
|
-
export { EXPERIENCE_TRAIT_PREFIX,
|
|
4310
|
+
export { ANONYMOUS_ID, DEBUG_FLAG, EXPERIENCE_TRAIT_PREFIX, LEGACY_ANONYMOUS_ID, Ninetailed, PLUGIN_NAME, PROFILE_CHANGE, PROFILE_FALLBACK_CACHE, PROFILE_RESET, decodeExperienceVariantsMap, isExperienceMatch, ninetailedPlugin, selectActiveExperiments, selectDistribution, selectEligibleExperiences, selectExperience, selectBaselineWithVariants as selectExperienceBaselineWithVariants, selectVariant as selectExperienceVariant, selectVariants as selectExperienceVariants, selectHasVariants as selectHasExperienceVariants, selectVariant$1 as selectVariant };
|