radar-sdk-js 3.3.0-beta.1 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12,14 +12,13 @@ var check = function (it) {
12
12
 
13
13
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
14
14
  var global_1 =
15
- // eslint-disable-next-line es-x/no-global-this -- safe
15
+ // eslint-disable-next-line no-undef
16
16
  check(typeof globalThis == 'object' && globalThis) ||
17
17
  check(typeof window == 'object' && window) ||
18
- // eslint-disable-next-line no-restricted-globals -- safe
19
18
  check(typeof self == 'object' && self) ||
20
19
  check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
21
- // eslint-disable-next-line no-new-func -- fallback
22
- (function () { return this; })() || Function('return this')();
20
+ // eslint-disable-next-line no-new-func
21
+ Function('return this')();
23
22
 
24
23
  var fails = function (exec) {
25
24
  try {
@@ -29,38 +28,23 @@ var fails = function (exec) {
29
28
  }
30
29
  };
31
30
 
32
- // Detect IE8's incomplete defineProperty implementation
31
+ // Thank's IE8 for his funny defineProperty
33
32
  var descriptors = !fails(function () {
34
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
35
33
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
36
34
  });
37
35
 
38
- var functionBindNative = !fails(function () {
39
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
40
- var test = (function () { /* empty */ }).bind();
41
- // eslint-disable-next-line no-prototype-builtins -- safe
42
- return typeof test != 'function' || test.hasOwnProperty('prototype');
43
- });
44
-
45
- var call = Function.prototype.call;
46
-
47
- var functionCall = functionBindNative ? call.bind(call) : function () {
48
- return call.apply(call, arguments);
49
- };
50
-
51
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
52
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
36
+ var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
53
37
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
54
38
 
55
39
  // Nashorn ~ JDK8 bug
56
- var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
40
+ var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
57
41
 
58
42
  // `Object.prototype.propertyIsEnumerable` method implementation
59
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
43
+ // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
60
44
  var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
61
45
  var descriptor = getOwnPropertyDescriptor(this, V);
62
46
  return !!descriptor && descriptor.enumerable;
63
- } : $propertyIsEnumerable;
47
+ } : nativePropertyIsEnumerable;
64
48
 
65
49
  var objectPropertyIsEnumerable = {
66
50
  f: f
@@ -75,44 +59,27 @@ var createPropertyDescriptor = function (bitmap, value) {
75
59
  };
76
60
  };
77
61
 
78
- var FunctionPrototype = Function.prototype;
79
- var bind = FunctionPrototype.bind;
80
- var call$1 = FunctionPrototype.call;
81
- var uncurryThis = functionBindNative && bind.bind(call$1, call$1);
82
-
83
- var functionUncurryThis = functionBindNative ? function (fn) {
84
- return fn && uncurryThis(fn);
85
- } : function (fn) {
86
- return fn && function () {
87
- return call$1.apply(fn, arguments);
88
- };
89
- };
90
-
91
- var toString = functionUncurryThis({}.toString);
92
- var stringSlice = functionUncurryThis(''.slice);
62
+ var toString = {}.toString;
93
63
 
94
64
  var classofRaw = function (it) {
95
- return stringSlice(toString(it), 8, -1);
65
+ return toString.call(it).slice(8, -1);
96
66
  };
97
67
 
98
- var $Object = Object;
99
- var split = functionUncurryThis(''.split);
68
+ var split = ''.split;
100
69
 
101
70
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
102
71
  var indexedObject = fails(function () {
103
72
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
104
- // eslint-disable-next-line no-prototype-builtins -- safe
105
- return !$Object('z').propertyIsEnumerable(0);
73
+ // eslint-disable-next-line no-prototype-builtins
74
+ return !Object('z').propertyIsEnumerable(0);
106
75
  }) ? function (it) {
107
- return classofRaw(it) == 'String' ? split(it, '') : $Object(it);
108
- } : $Object;
109
-
110
- var $TypeError = TypeError;
76
+ return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
77
+ } : Object;
111
78
 
112
79
  // `RequireObjectCoercible` abstract operation
113
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
80
+ // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
114
81
  var requireObjectCoercible = function (it) {
115
- if (it == undefined) throw $TypeError("Can't call method on " + it);
82
+ if (it == undefined) throw TypeError("Can't call method on " + it);
116
83
  return it;
117
84
  };
118
85
 
@@ -124,215 +91,27 @@ var toIndexedObject = function (it) {
124
91
  return indexedObject(requireObjectCoercible(it));
125
92
  };
126
93
 
127
- // `IsCallable` abstract operation
128
- // https://tc39.es/ecma262/#sec-iscallable
129
- var isCallable = function (argument) {
130
- return typeof argument == 'function';
131
- };
132
-
133
94
  var isObject = function (it) {
134
- return typeof it == 'object' ? it !== null : isCallable(it);
135
- };
136
-
137
- var aFunction = function (argument) {
138
- return isCallable(argument) ? argument : undefined;
139
- };
140
-
141
- var getBuiltIn = function (namespace, method) {
142
- return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
143
- };
144
-
145
- var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
146
-
147
- var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
148
-
149
- var process = global_1.process;
150
- var Deno$1 = global_1.Deno;
151
- var versions = process && process.versions || Deno$1 && Deno$1.version;
152
- var v8 = versions && versions.v8;
153
- var match, version;
154
-
155
- if (v8) {
156
- match = v8.split('.');
157
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
158
- // but their correct versions are not interesting for us
159
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
160
- }
161
-
162
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
163
- // so check `userAgent` even if `.v8` exists, but 0
164
- if (!version && engineUserAgent) {
165
- match = engineUserAgent.match(/Edge\/(\d+)/);
166
- if (!match || match[1] >= 74) {
167
- match = engineUserAgent.match(/Chrome\/(\d+)/);
168
- if (match) version = +match[1];
169
- }
170
- }
171
-
172
- var engineV8Version = version;
173
-
174
- /* eslint-disable es-x/no-symbol -- required for testing */
175
-
176
-
177
-
178
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
179
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
180
- var symbol = Symbol();
181
- // Chrome 38 Symbol has incorrect toString conversion
182
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
183
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
184
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
185
- !Symbol.sham && engineV8Version && engineV8Version < 41;
186
- });
187
-
188
- /* eslint-disable es-x/no-symbol -- required for testing */
189
-
190
-
191
- var useSymbolAsUid = nativeSymbol
192
- && !Symbol.sham
193
- && typeof Symbol.iterator == 'symbol';
194
-
195
- var $Object$1 = Object;
196
-
197
- var isSymbol = useSymbolAsUid ? function (it) {
198
- return typeof it == 'symbol';
199
- } : function (it) {
200
- var $Symbol = getBuiltIn('Symbol');
201
- return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, $Object$1(it));
202
- };
203
-
204
- var $String = String;
205
-
206
- var tryToString = function (argument) {
207
- try {
208
- return $String(argument);
209
- } catch (error) {
210
- return 'Object';
211
- }
212
- };
213
-
214
- var $TypeError$1 = TypeError;
215
-
216
- // `Assert: IsCallable(argument) is true`
217
- var aCallable = function (argument) {
218
- if (isCallable(argument)) return argument;
219
- throw $TypeError$1(tryToString(argument) + ' is not a function');
95
+ return typeof it === 'object' ? it !== null : typeof it === 'function';
220
96
  };
221
97
 
222
- // `GetMethod` abstract operation
223
- // https://tc39.es/ecma262/#sec-getmethod
224
- var getMethod = function (V, P) {
225
- var func = V[P];
226
- return func == null ? undefined : aCallable(func);
227
- };
228
-
229
- var $TypeError$2 = TypeError;
230
-
231
- // `OrdinaryToPrimitive` abstract operation
232
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
233
- var ordinaryToPrimitive = function (input, pref) {
98
+ // `ToPrimitive` abstract operation
99
+ // https://tc39.github.io/ecma262/#sec-toprimitive
100
+ // instead of the ES6 spec version, we didn't implement @@toPrimitive case
101
+ // and the second argument - flag - preferred type is a string
102
+ var toPrimitive = function (input, PREFERRED_STRING) {
103
+ if (!isObject(input)) return input;
234
104
  var fn, val;
235
- if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
236
- if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
237
- if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
238
- throw $TypeError$2("Can't convert object to primitive value");
105
+ if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
106
+ if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
107
+ if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
108
+ throw TypeError("Can't convert object to primitive value");
239
109
  };
240
110
 
241
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
242
- var defineProperty = Object.defineProperty;
111
+ var hasOwnProperty = {}.hasOwnProperty;
243
112
 
244
- var defineGlobalProperty = function (key, value) {
245
- try {
246
- defineProperty(global_1, key, { value: value, configurable: true, writable: true });
247
- } catch (error) {
248
- global_1[key] = value;
249
- } return value;
250
- };
251
-
252
- var SHARED = '__core-js_shared__';
253
- var store = global_1[SHARED] || defineGlobalProperty(SHARED, {});
254
-
255
- var sharedStore = store;
256
-
257
- var shared = createCommonjsModule(function (module) {
258
- (module.exports = function (key, value) {
259
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
260
- })('versions', []).push({
261
- version: '3.23.3',
262
- mode: 'global',
263
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
264
- license: 'https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE',
265
- source: 'https://github.com/zloirock/core-js'
266
- });
267
- });
268
-
269
- var $Object$2 = Object;
270
-
271
- // `ToObject` abstract operation
272
- // https://tc39.es/ecma262/#sec-toobject
273
- var toObject = function (argument) {
274
- return $Object$2(requireObjectCoercible(argument));
275
- };
276
-
277
- var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
278
-
279
- // `HasOwnProperty` abstract operation
280
- // https://tc39.es/ecma262/#sec-hasownproperty
281
- // eslint-disable-next-line es-x/no-object-hasown -- safe
282
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
283
- return hasOwnProperty(toObject(it), key);
284
- };
285
-
286
- var id = 0;
287
- var postfix = Math.random();
288
- var toString$1 = functionUncurryThis(1.0.toString);
289
-
290
- var uid = function (key) {
291
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
292
- };
293
-
294
- var WellKnownSymbolsStore = shared('wks');
295
- var Symbol$1 = global_1.Symbol;
296
- var symbolFor = Symbol$1 && Symbol$1['for'];
297
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
298
-
299
- var wellKnownSymbol = function (name) {
300
- if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
301
- var description = 'Symbol.' + name;
302
- if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
303
- WellKnownSymbolsStore[name] = Symbol$1[name];
304
- } else if (useSymbolAsUid && symbolFor) {
305
- WellKnownSymbolsStore[name] = symbolFor(description);
306
- } else {
307
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
308
- }
309
- } return WellKnownSymbolsStore[name];
310
- };
311
-
312
- var $TypeError$3 = TypeError;
313
- var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
314
-
315
- // `ToPrimitive` abstract operation
316
- // https://tc39.es/ecma262/#sec-toprimitive
317
- var toPrimitive = function (input, pref) {
318
- if (!isObject(input) || isSymbol(input)) return input;
319
- var exoticToPrim = getMethod(input, TO_PRIMITIVE);
320
- var result;
321
- if (exoticToPrim) {
322
- if (pref === undefined) pref = 'default';
323
- result = functionCall(exoticToPrim, input, pref);
324
- if (!isObject(result) || isSymbol(result)) return result;
325
- throw $TypeError$3("Can't convert object to primitive value");
326
- }
327
- if (pref === undefined) pref = 'number';
328
- return ordinaryToPrimitive(input, pref);
329
- };
330
-
331
- // `ToPropertyKey` abstract operation
332
- // https://tc39.es/ecma262/#sec-topropertykey
333
- var toPropertyKey = function (argument) {
334
- var key = toPrimitive(argument, 'string');
335
- return isSymbol(key) ? key : key + '';
113
+ var has = function (it, key) {
114
+ return hasOwnProperty.call(it, key);
336
115
  };
337
116
 
338
117
  var document$1 = global_1.document;
@@ -343,85 +122,48 @@ var documentCreateElement = function (it) {
343
122
  return EXISTS ? document$1.createElement(it) : {};
344
123
  };
345
124
 
346
- // Thanks to IE8 for its funny defineProperty
125
+ // Thank's IE8 for his funny defineProperty
347
126
  var ie8DomDefine = !descriptors && !fails(function () {
348
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
349
127
  return Object.defineProperty(documentCreateElement('div'), 'a', {
350
128
  get: function () { return 7; }
351
129
  }).a != 7;
352
130
  });
353
131
 
354
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
355
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
132
+ var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
356
133
 
357
134
  // `Object.getOwnPropertyDescriptor` method
358
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
359
- var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
135
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
136
+ var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
360
137
  O = toIndexedObject(O);
361
- P = toPropertyKey(P);
138
+ P = toPrimitive(P, true);
362
139
  if (ie8DomDefine) try {
363
- return $getOwnPropertyDescriptor(O, P);
140
+ return nativeGetOwnPropertyDescriptor(O, P);
364
141
  } catch (error) { /* empty */ }
365
- if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
142
+ if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
366
143
  };
367
144
 
368
145
  var objectGetOwnPropertyDescriptor = {
369
146
  f: f$1
370
147
  };
371
148
 
372
- // V8 ~ Chrome 36-
373
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
374
- var v8PrototypeDefineBug = descriptors && fails(function () {
375
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
376
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
377
- value: 42,
378
- writable: false
379
- }).prototype != 42;
380
- });
381
-
382
- var $String$1 = String;
383
- var $TypeError$4 = TypeError;
384
-
385
- // `Assert: Type(argument) is Object`
386
- var anObject = function (argument) {
387
- if (isObject(argument)) return argument;
388
- throw $TypeError$4($String$1(argument) + ' is not an object');
149
+ var anObject = function (it) {
150
+ if (!isObject(it)) {
151
+ throw TypeError(String(it) + ' is not an object');
152
+ } return it;
389
153
  };
390
154
 
391
- var $TypeError$5 = TypeError;
392
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
393
- var $defineProperty = Object.defineProperty;
394
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
395
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
396
- var ENUMERABLE = 'enumerable';
397
- var CONFIGURABLE = 'configurable';
398
- var WRITABLE = 'writable';
155
+ var nativeDefineProperty = Object.defineProperty;
399
156
 
400
157
  // `Object.defineProperty` method
401
- // https://tc39.es/ecma262/#sec-object.defineproperty
402
- var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
403
- anObject(O);
404
- P = toPropertyKey(P);
405
- anObject(Attributes);
406
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
407
- var current = $getOwnPropertyDescriptor$1(O, P);
408
- if (current && current[WRITABLE]) {
409
- O[P] = Attributes.value;
410
- Attributes = {
411
- configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
412
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
413
- writable: false
414
- };
415
- }
416
- } return $defineProperty(O, P, Attributes);
417
- } : $defineProperty : function defineProperty(O, P, Attributes) {
158
+ // https://tc39.github.io/ecma262/#sec-object.defineproperty
159
+ var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
418
160
  anObject(O);
419
- P = toPropertyKey(P);
161
+ P = toPrimitive(P, true);
420
162
  anObject(Attributes);
421
163
  if (ie8DomDefine) try {
422
- return $defineProperty(O, P, Attributes);
164
+ return nativeDefineProperty(O, P, Attributes);
423
165
  } catch (error) { /* empty */ }
424
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$5('Accessors not supported');
166
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
425
167
  if ('value' in Attributes) O[P] = Attributes.value;
426
168
  return O;
427
169
  };
@@ -437,27 +179,25 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
437
179
  return object;
438
180
  };
439
181
 
440
- var FunctionPrototype$1 = Function.prototype;
441
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
442
- var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
182
+ var setGlobal = function (key, value) {
183
+ try {
184
+ createNonEnumerableProperty(global_1, key, value);
185
+ } catch (error) {
186
+ global_1[key] = value;
187
+ } return value;
188
+ };
443
189
 
444
- var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
445
- // additional protection from minified / mangled / dropped function names
446
- var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
447
- var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
190
+ var SHARED = '__core-js_shared__';
191
+ var store = global_1[SHARED] || setGlobal(SHARED, {});
448
192
 
449
- var functionName = {
450
- EXISTS: EXISTS$1,
451
- PROPER: PROPER,
452
- CONFIGURABLE: CONFIGURABLE$1
453
- };
193
+ var sharedStore = store;
454
194
 
455
- var functionToString = functionUncurryThis(Function.toString);
195
+ var functionToString = Function.toString;
456
196
 
457
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
458
- if (!isCallable(sharedStore.inspectSource)) {
197
+ // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
198
+ if (typeof sharedStore.inspectSource != 'function') {
459
199
  sharedStore.inspectSource = function (it) {
460
- return functionToString(it);
200
+ return functionToString.call(it);
461
201
  };
462
202
  }
463
203
 
@@ -465,7 +205,24 @@ var inspectSource = sharedStore.inspectSource;
465
205
 
466
206
  var WeakMap = global_1.WeakMap;
467
207
 
468
- var nativeWeakMap = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
208
+ var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
209
+
210
+ var shared = createCommonjsModule(function (module) {
211
+ (module.exports = function (key, value) {
212
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
213
+ })('versions', []).push({
214
+ version: '3.6.4',
215
+ mode: 'global',
216
+ copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
217
+ });
218
+ });
219
+
220
+ var id = 0;
221
+ var postfix = Math.random();
222
+
223
+ var uid = function (key) {
224
+ return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
225
+ };
469
226
 
470
227
  var keys = shared('keys');
471
228
 
@@ -475,193 +232,141 @@ var sharedKey = function (key) {
475
232
 
476
233
  var hiddenKeys = {};
477
234
 
478
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
479
- var TypeError$1 = global_1.TypeError;
480
235
  var WeakMap$1 = global_1.WeakMap;
481
- var set, get, has;
236
+ var set, get, has$1;
482
237
 
483
238
  var enforce = function (it) {
484
- return has(it) ? get(it) : set(it, {});
239
+ return has$1(it) ? get(it) : set(it, {});
485
240
  };
486
241
 
487
242
  var getterFor = function (TYPE) {
488
243
  return function (it) {
489
244
  var state;
490
245
  if (!isObject(it) || (state = get(it)).type !== TYPE) {
491
- throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
246
+ throw TypeError('Incompatible receiver, ' + TYPE + ' required');
492
247
  } return state;
493
248
  };
494
249
  };
495
250
 
496
- if (nativeWeakMap || sharedStore.state) {
497
- var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
498
- var wmget = functionUncurryThis(store$1.get);
499
- var wmhas = functionUncurryThis(store$1.has);
500
- var wmset = functionUncurryThis(store$1.set);
251
+ if (nativeWeakMap) {
252
+ var store$1 = new WeakMap$1();
253
+ var wmget = store$1.get;
254
+ var wmhas = store$1.has;
255
+ var wmset = store$1.set;
501
256
  set = function (it, metadata) {
502
- if (wmhas(store$1, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
503
- metadata.facade = it;
504
- wmset(store$1, it, metadata);
257
+ wmset.call(store$1, it, metadata);
505
258
  return metadata;
506
259
  };
507
260
  get = function (it) {
508
- return wmget(store$1, it) || {};
261
+ return wmget.call(store$1, it) || {};
509
262
  };
510
- has = function (it) {
511
- return wmhas(store$1, it);
263
+ has$1 = function (it) {
264
+ return wmhas.call(store$1, it);
512
265
  };
513
266
  } else {
514
267
  var STATE = sharedKey('state');
515
268
  hiddenKeys[STATE] = true;
516
269
  set = function (it, metadata) {
517
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
518
- metadata.facade = it;
519
270
  createNonEnumerableProperty(it, STATE, metadata);
520
271
  return metadata;
521
272
  };
522
273
  get = function (it) {
523
- return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
274
+ return has(it, STATE) ? it[STATE] : {};
524
275
  };
525
- has = function (it) {
526
- return hasOwnProperty_1(it, STATE);
276
+ has$1 = function (it) {
277
+ return has(it, STATE);
527
278
  };
528
279
  }
529
280
 
530
281
  var internalState = {
531
282
  set: set,
532
283
  get: get,
533
- has: has,
284
+ has: has$1,
534
285
  enforce: enforce,
535
286
  getterFor: getterFor
536
287
  };
537
288
 
538
- var makeBuiltIn_1 = createCommonjsModule(function (module) {
539
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
540
-
541
-
542
-
543
- var enforceInternalState = internalState.enforce;
289
+ var redefine = createCommonjsModule(function (module) {
544
290
  var getInternalState = internalState.get;
545
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
546
- var defineProperty = Object.defineProperty;
547
-
548
- var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
549
- return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
550
- });
551
-
291
+ var enforceInternalState = internalState.enforce;
552
292
  var TEMPLATE = String(String).split('String');
553
293
 
554
- var makeBuiltIn = module.exports = function (value, name, options) {
555
- if (String(name).slice(0, 7) === 'Symbol(') {
556
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
557
- }
558
- if (options && options.getter) name = 'get ' + name;
559
- if (options && options.setter) name = 'set ' + name;
560
- if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
561
- if (descriptors) defineProperty(value, 'name', { value: name, configurable: true });
562
- else value.name = name;
294
+ (module.exports = function (O, key, value, options) {
295
+ var unsafe = options ? !!options.unsafe : false;
296
+ var simple = options ? !!options.enumerable : false;
297
+ var noTargetGet = options ? !!options.noTargetGet : false;
298
+ if (typeof value == 'function') {
299
+ if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
300
+ enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
563
301
  }
564
- if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
565
- defineProperty(value, 'length', { value: options.arity });
302
+ if (O === global_1) {
303
+ if (simple) O[key] = value;
304
+ else setGlobal(key, value);
305
+ return;
306
+ } else if (!unsafe) {
307
+ delete O[key];
308
+ } else if (!noTargetGet && O[key]) {
309
+ simple = true;
566
310
  }
567
- try {
568
- if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
569
- if (descriptors) defineProperty(value, 'prototype', { writable: false });
570
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
571
- } else if (value.prototype) value.prototype = undefined;
572
- } catch (error) { /* empty */ }
573
- var state = enforceInternalState(value);
574
- if (!hasOwnProperty_1(state, 'source')) {
575
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
576
- } return value;
577
- };
578
-
311
+ if (simple) O[key] = value;
312
+ else createNonEnumerableProperty(O, key, value);
579
313
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
580
- // eslint-disable-next-line no-extend-native -- required
581
- Function.prototype.toString = makeBuiltIn(function toString() {
582
- return isCallable(this) && getInternalState(this).source || inspectSource(this);
583
- }, 'toString');
314
+ })(Function.prototype, 'toString', function toString() {
315
+ return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
316
+ });
584
317
  });
585
318
 
586
- var defineBuiltIn = function (O, key, value, options) {
587
- if (!options) options = {};
588
- var simple = options.enumerable;
589
- var name = options.name !== undefined ? options.name : key;
590
- if (isCallable(value)) makeBuiltIn_1(value, name, options);
591
- if (options.global) {
592
- if (simple) O[key] = value;
593
- else defineGlobalProperty(key, value);
594
- } else {
595
- try {
596
- if (!options.unsafe) delete O[key];
597
- else if (O[key]) simple = true;
598
- } catch (error) { /* empty */ }
599
- if (simple) O[key] = value;
600
- else objectDefineProperty.f(O, key, {
601
- value: value,
602
- enumerable: false,
603
- configurable: !options.nonConfigurable,
604
- writable: !options.nonWritable
605
- });
606
- } return O;
319
+ var path = global_1;
320
+
321
+ var aFunction = function (variable) {
322
+ return typeof variable == 'function' ? variable : undefined;
323
+ };
324
+
325
+ var getBuiltIn = function (namespace, method) {
326
+ return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace])
327
+ : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
607
328
  };
608
329
 
609
330
  var ceil = Math.ceil;
610
331
  var floor = Math.floor;
611
332
 
612
- // `Math.trunc` method
613
- // https://tc39.es/ecma262/#sec-math.trunc
614
- // eslint-disable-next-line es-x/no-math-trunc -- safe
615
- var mathTrunc = Math.trunc || function trunc(x) {
616
- var n = +x;
617
- return (n > 0 ? floor : ceil)(n);
333
+ // `ToInteger` abstract operation
334
+ // https://tc39.github.io/ecma262/#sec-tointeger
335
+ var toInteger = function (argument) {
336
+ return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
618
337
  };
619
338
 
620
- // `ToIntegerOrInfinity` abstract operation
621
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
622
- var toIntegerOrInfinity = function (argument) {
623
- var number = +argument;
624
- // eslint-disable-next-line no-self-compare -- NaN check
625
- return number !== number || number === 0 ? 0 : mathTrunc(number);
339
+ var min = Math.min;
340
+
341
+ // `ToLength` abstract operation
342
+ // https://tc39.github.io/ecma262/#sec-tolength
343
+ var toLength = function (argument) {
344
+ return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
626
345
  };
627
346
 
628
347
  var max = Math.max;
629
- var min = Math.min;
348
+ var min$1 = Math.min;
630
349
 
631
350
  // Helper for a popular repeating case of the spec:
632
351
  // Let integer be ? ToInteger(index).
633
352
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
634
353
  var toAbsoluteIndex = function (index, length) {
635
- var integer = toIntegerOrInfinity(index);
636
- return integer < 0 ? max(integer + length, 0) : min(integer, length);
637
- };
638
-
639
- var min$1 = Math.min;
640
-
641
- // `ToLength` abstract operation
642
- // https://tc39.es/ecma262/#sec-tolength
643
- var toLength = function (argument) {
644
- return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
645
- };
646
-
647
- // `LengthOfArrayLike` abstract operation
648
- // https://tc39.es/ecma262/#sec-lengthofarraylike
649
- var lengthOfArrayLike = function (obj) {
650
- return toLength(obj.length);
354
+ var integer = toInteger(index);
355
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
651
356
  };
652
357
 
653
358
  // `Array.prototype.{ indexOf, includes }` methods implementation
654
359
  var createMethod = function (IS_INCLUDES) {
655
360
  return function ($this, el, fromIndex) {
656
361
  var O = toIndexedObject($this);
657
- var length = lengthOfArrayLike(O);
362
+ var length = toLength(O.length);
658
363
  var index = toAbsoluteIndex(fromIndex, length);
659
364
  var value;
660
365
  // Array#includes uses SameValueZero equality algorithm
661
- // eslint-disable-next-line no-self-compare -- NaN check
366
+ // eslint-disable-next-line no-self-compare
662
367
  if (IS_INCLUDES && el != el) while (length > index) {
663
368
  value = O[index++];
664
- // eslint-disable-next-line no-self-compare -- NaN check
369
+ // eslint-disable-next-line no-self-compare
665
370
  if (value != value) return true;
666
371
  // Array#indexOf ignores holes, Array#includes - not
667
372
  } else for (;length > index; index++) {
@@ -672,27 +377,25 @@ var createMethod = function (IS_INCLUDES) {
672
377
 
673
378
  var arrayIncludes = {
674
379
  // `Array.prototype.includes` method
675
- // https://tc39.es/ecma262/#sec-array.prototype.includes
380
+ // https://tc39.github.io/ecma262/#sec-array.prototype.includes
676
381
  includes: createMethod(true),
677
382
  // `Array.prototype.indexOf` method
678
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
383
+ // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
679
384
  indexOf: createMethod(false)
680
385
  };
681
386
 
682
387
  var indexOf = arrayIncludes.indexOf;
683
388
 
684
389
 
685
- var push = functionUncurryThis([].push);
686
-
687
390
  var objectKeysInternal = function (object, names) {
688
391
  var O = toIndexedObject(object);
689
392
  var i = 0;
690
393
  var result = [];
691
394
  var key;
692
- for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
395
+ for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
693
396
  // Don't enum bug & hidden keys
694
- while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
695
- ~indexOf(result, key) || push(result, key);
397
+ while (names.length > i) if (has(O, key = names[i++])) {
398
+ ~indexOf(result, key) || result.push(key);
696
399
  }
697
400
  return result;
698
401
  };
@@ -711,8 +414,7 @@ var enumBugKeys = [
711
414
  var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
712
415
 
713
416
  // `Object.getOwnPropertyNames` method
714
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
715
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
417
+ // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
716
418
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
717
419
  return objectKeysInternal(O, hiddenKeys$1);
718
420
  };
@@ -721,31 +423,26 @@ var objectGetOwnPropertyNames = {
721
423
  f: f$3
722
424
  };
723
425
 
724
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
725
426
  var f$4 = Object.getOwnPropertySymbols;
726
427
 
727
428
  var objectGetOwnPropertySymbols = {
728
429
  f: f$4
729
430
  };
730
431
 
731
- var concat = functionUncurryThis([].concat);
732
-
733
432
  // all object keys, includes non-enumerable and symbols
734
433
  var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
735
434
  var keys = objectGetOwnPropertyNames.f(anObject(it));
736
435
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
737
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
436
+ return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
738
437
  };
739
438
 
740
- var copyConstructorProperties = function (target, source, exceptions) {
439
+ var copyConstructorProperties = function (target, source) {
741
440
  var keys = ownKeys(source);
742
441
  var defineProperty = objectDefineProperty.f;
743
442
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
744
443
  for (var i = 0; i < keys.length; i++) {
745
444
  var key = keys[i];
746
- if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
747
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
748
- }
445
+ if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
749
446
  }
750
447
  };
751
448
 
@@ -755,7 +452,7 @@ var isForced = function (feature, detection) {
755
452
  var value = data[normalize(feature)];
756
453
  return value == POLYFILL ? true
757
454
  : value == NATIVE ? false
758
- : isCallable(detection) ? fails(detection)
455
+ : typeof detection == 'function' ? fails(detection)
759
456
  : !!detection;
760
457
  };
761
458
 
@@ -777,19 +474,18 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
777
474
 
778
475
 
779
476
  /*
780
- options.target - name of the target object
781
- options.global - target is the global object
782
- options.stat - export as static methods of target
783
- options.proto - export as prototype methods of target
784
- options.real - real prototype method for the `pure` version
785
- options.forced - export even if the native feature is available
786
- options.bind - bind methods to the target, required for the `pure` version
787
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
788
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
789
- options.sham - add a flag to not completely full polyfills
790
- options.enumerable - export as enumerable property
791
- options.dontCallGetSet - prevent calling a getter on target
792
- options.name - the .name of the function if it does not match the key
477
+ options.target - name of the target object
478
+ options.global - target is the global object
479
+ options.stat - export as static methods of target
480
+ options.proto - export as prototype methods of target
481
+ options.real - real prototype method for the `pure` version
482
+ options.forced - export even if the native feature is available
483
+ options.bind - bind methods to the target, required for the `pure` version
484
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
485
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
486
+ options.sham - add a flag to not completely full polyfills
487
+ options.enumerable - export as enumerable property
488
+ options.noTargetGet - prevent calling a getter on target
793
489
  */
794
490
  var _export = function (options, source) {
795
491
  var TARGET = options.target;
@@ -799,33 +495,39 @@ var _export = function (options, source) {
799
495
  if (GLOBAL) {
800
496
  target = global_1;
801
497
  } else if (STATIC) {
802
- target = global_1[TARGET] || defineGlobalProperty(TARGET, {});
498
+ target = global_1[TARGET] || setGlobal(TARGET, {});
803
499
  } else {
804
500
  target = (global_1[TARGET] || {}).prototype;
805
501
  }
806
502
  if (target) for (key in source) {
807
503
  sourceProperty = source[key];
808
- if (options.dontCallGetSet) {
504
+ if (options.noTargetGet) {
809
505
  descriptor = getOwnPropertyDescriptor$1(target, key);
810
506
  targetProperty = descriptor && descriptor.value;
811
507
  } else targetProperty = target[key];
812
508
  FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
813
509
  // contained in target
814
510
  if (!FORCED && targetProperty !== undefined) {
815
- if (typeof sourceProperty == typeof targetProperty) continue;
511
+ if (typeof sourceProperty === typeof targetProperty) continue;
816
512
  copyConstructorProperties(sourceProperty, targetProperty);
817
513
  }
818
514
  // add a flag to not completely full polyfills
819
515
  if (options.sham || (targetProperty && targetProperty.sham)) {
820
516
  createNonEnumerableProperty(sourceProperty, 'sham', true);
821
517
  }
822
- defineBuiltIn(target, key, sourceProperty, options);
518
+ // extend global
519
+ redefine(target, key, sourceProperty, options);
823
520
  }
824
521
  };
825
522
 
523
+ // `ToObject` abstract operation
524
+ // https://tc39.github.io/ecma262/#sec-toobject
525
+ var toObject = function (argument) {
526
+ return Object(requireObjectCoercible(argument));
527
+ };
528
+
826
529
  // `Object.keys` method
827
- // https://tc39.es/ecma262/#sec-object.keys
828
- // eslint-disable-next-line es-x/no-object-keys -- safe
530
+ // https://tc39.github.io/ecma262/#sec-object.keys
829
531
  var objectKeys = Object.keys || function keys(O) {
830
532
  return objectKeysInternal(O, enumBugKeys);
831
533
  };
@@ -833,57 +535,17 @@ var objectKeys = Object.keys || function keys(O) {
833
535
  var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
834
536
 
835
537
  // `Object.keys` method
836
- // https://tc39.es/ecma262/#sec-object.keys
538
+ // https://tc39.github.io/ecma262/#sec-object.keys
837
539
  _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
838
540
  keys: function keys(it) {
839
541
  return objectKeys(toObject(it));
840
542
  }
841
543
  });
842
544
 
843
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
844
- var test = {};
845
-
846
- test[TO_STRING_TAG] = 'z';
847
-
848
- var toStringTagSupport = String(test) === '[object z]';
849
-
850
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
851
- var $Object$3 = Object;
852
-
853
- // ES3 wrong here
854
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
855
-
856
- // fallback for IE11 Script Access Denied error
857
- var tryGet = function (it, key) {
858
- try {
859
- return it[key];
860
- } catch (error) { /* empty */ }
861
- };
862
-
863
- // getting tag from ES6+ `Object.prototype.toString`
864
- var classof = toStringTagSupport ? classofRaw : function (it) {
865
- var O, tag, result;
866
- return it === undefined ? 'Undefined' : it === null ? 'Null'
867
- // @@toStringTag case
868
- : typeof (tag = tryGet(O = $Object$3(it), TO_STRING_TAG$1)) == 'string' ? tag
869
- // builtinTag case
870
- : CORRECT_ARGUMENTS ? classofRaw(O)
871
- // ES3 arguments fallback
872
- : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
873
- };
874
-
875
- var $String$2 = String;
876
-
877
- var toString_1 = function (argument) {
878
- if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
879
- return $String$2(argument);
880
- };
881
-
882
545
  // a string of all valid unicode whitespaces
883
- var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
884
- '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
546
+ // eslint-disable-next-line max-len
547
+ var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
885
548
 
886
- var replace = functionUncurryThis(''.replace);
887
549
  var whitespace = '[' + whitespaces + ']';
888
550
  var ltrim = RegExp('^' + whitespace + whitespace + '*');
889
551
  var rtrim = RegExp(whitespace + whitespace + '*$');
@@ -891,38 +553,32 @@ var rtrim = RegExp(whitespace + whitespace + '*$');
891
553
  // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
892
554
  var createMethod$1 = function (TYPE) {
893
555
  return function ($this) {
894
- var string = toString_1(requireObjectCoercible($this));
895
- if (TYPE & 1) string = replace(string, ltrim, '');
896
- if (TYPE & 2) string = replace(string, rtrim, '');
556
+ var string = String(requireObjectCoercible($this));
557
+ if (TYPE & 1) string = string.replace(ltrim, '');
558
+ if (TYPE & 2) string = string.replace(rtrim, '');
897
559
  return string;
898
560
  };
899
561
  };
900
562
 
901
563
  var stringTrim = {
902
564
  // `String.prototype.{ trimLeft, trimStart }` methods
903
- // https://tc39.es/ecma262/#sec-string.prototype.trimstart
565
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
904
566
  start: createMethod$1(1),
905
567
  // `String.prototype.{ trimRight, trimEnd }` methods
906
- // https://tc39.es/ecma262/#sec-string.prototype.trimend
568
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trimend
907
569
  end: createMethod$1(2),
908
570
  // `String.prototype.trim` method
909
- // https://tc39.es/ecma262/#sec-string.prototype.trim
571
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trim
910
572
  trim: createMethod$1(3)
911
573
  };
912
574
 
913
- var PROPER_FUNCTION_NAME = functionName.PROPER;
914
-
915
-
916
-
917
575
  var non = '\u200B\u0085\u180E';
918
576
 
919
577
  // check that a method works with the correct list
920
578
  // of whitespaces and has a correct name
921
579
  var stringTrimForced = function (METHOD_NAME) {
922
580
  return fails(function () {
923
- return !!whitespaces[METHOD_NAME]()
924
- || non[METHOD_NAME]() !== non
925
- || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
581
+ return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
926
582
  });
927
583
  };
928
584
 
@@ -930,7 +586,7 @@ var $trim = stringTrim.trim;
930
586
 
931
587
 
932
588
  // `String.prototype.trim` method
933
- // https://tc39.es/ecma262/#sec-string.prototype.trim
589
+ // https://tc39.github.io/ecma262/#sec-string.prototype.trim
934
590
  _export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
935
591
  trim: function trim() {
936
592
  return $trim(this);
@@ -1060,66 +716,87 @@ function _objectSpread2(target) {
1060
716
  return target;
1061
717
  }
1062
718
 
1063
- // `Object.prototype.toString` method implementation
1064
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1065
- var objectToString = toStringTagSupport ? {}.toString : function toString() {
1066
- return '[object ' + classof(this) + ']';
1067
- };
1068
-
1069
- // `Object.prototype.toString` method
1070
- // https://tc39.es/ecma262/#sec-object.prototype.tostring
1071
- if (!toStringTagSupport) {
1072
- defineBuiltIn(Object.prototype, 'toString', objectToString, { unsafe: true });
1073
- }
719
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
720
+ // Chrome 38 Symbol has incorrect toString conversion
721
+ // eslint-disable-next-line no-undef
722
+ return !String(Symbol());
723
+ });
1074
724
 
1075
- var engineIsNode = classofRaw(global_1.process) == 'process';
725
+ var useSymbolAsUid = nativeSymbol
726
+ // eslint-disable-next-line no-undef
727
+ && !Symbol.sham
728
+ // eslint-disable-next-line no-undef
729
+ && typeof Symbol.iterator == 'symbol';
1076
730
 
1077
- var $String$3 = String;
1078
- var $TypeError$6 = TypeError;
731
+ var WellKnownSymbolsStore = shared('wks');
732
+ var Symbol$1 = global_1.Symbol;
733
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
1079
734
 
1080
- var aPossiblePrototype = function (argument) {
1081
- if (typeof argument == 'object' || isCallable(argument)) return argument;
1082
- throw $TypeError$6("Can't set " + $String$3(argument) + ' as a prototype');
735
+ var wellKnownSymbol = function (name) {
736
+ if (!has(WellKnownSymbolsStore, name)) {
737
+ if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];
738
+ else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
739
+ } return WellKnownSymbolsStore[name];
1083
740
  };
1084
741
 
1085
- /* eslint-disable no-proto -- safe */
742
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
743
+ var test = {};
1086
744
 
745
+ test[TO_STRING_TAG] = 'z';
1087
746
 
747
+ var toStringTagSupport = String(test) === '[object z]';
1088
748
 
749
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
750
+ // ES3 wrong here
751
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
1089
752
 
1090
- // `Object.setPrototypeOf` method
1091
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1092
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1093
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1094
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1095
- var CORRECT_SETTER = false;
1096
- var test = {};
1097
- var setter;
753
+ // fallback for IE11 Script Access Denied error
754
+ var tryGet = function (it, key) {
1098
755
  try {
1099
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1100
- setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1101
- setter(test, []);
1102
- CORRECT_SETTER = test instanceof Array;
756
+ return it[key];
1103
757
  } catch (error) { /* empty */ }
1104
- return function setPrototypeOf(O, proto) {
1105
- anObject(O);
1106
- aPossiblePrototype(proto);
1107
- if (CORRECT_SETTER) setter(O, proto);
1108
- else O.__proto__ = proto;
1109
- return O;
1110
- };
1111
- }() : undefined);
758
+ };
1112
759
 
1113
- var defineProperty$1 = objectDefineProperty.f;
760
+ // getting tag from ES6+ `Object.prototype.toString`
761
+ var classof = toStringTagSupport ? classofRaw : function (it) {
762
+ var O, tag, result;
763
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
764
+ // @@toStringTag case
765
+ : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
766
+ // builtinTag case
767
+ : CORRECT_ARGUMENTS ? classofRaw(O)
768
+ // ES3 arguments fallback
769
+ : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
770
+ };
771
+
772
+ // `Object.prototype.toString` method implementation
773
+ // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
774
+ var objectToString = toStringTagSupport ? {}.toString : function toString() {
775
+ return '[object ' + classof(this) + ']';
776
+ };
777
+
778
+ // `Object.prototype.toString` method
779
+ // https://tc39.github.io/ecma262/#sec-object.prototype.tostring
780
+ if (!toStringTagSupport) {
781
+ redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
782
+ }
783
+
784
+ var nativePromiseConstructor = global_1.Promise;
785
+
786
+ var redefineAll = function (target, src, options) {
787
+ for (var key in src) redefine(target, key, src[key], options);
788
+ return target;
789
+ };
790
+
791
+ var defineProperty = objectDefineProperty.f;
1114
792
 
1115
793
 
1116
794
 
1117
795
  var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1118
796
 
1119
- var setToStringTag = function (target, TAG, STATIC) {
1120
- if (target && !STATIC) target = target.prototype;
1121
- if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
1122
- defineProperty$1(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
797
+ var setToStringTag = function (it, TAG, STATIC) {
798
+ if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG$2)) {
799
+ defineProperty(it, TO_STRING_TAG$2, { configurable: true, value: TAG });
1123
800
  }
1124
801
  };
1125
802
 
@@ -1137,128 +814,177 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
1137
814
  }
1138
815
  };
1139
816
 
1140
- var $TypeError$7 = TypeError;
817
+ var aFunction$1 = function (it) {
818
+ if (typeof it != 'function') {
819
+ throw TypeError(String(it) + ' is not a function');
820
+ } return it;
821
+ };
1141
822
 
1142
- var anInstance = function (it, Prototype) {
1143
- if (objectIsPrototypeOf(Prototype, it)) return it;
1144
- throw $TypeError$7('Incorrect invocation');
823
+ var anInstance = function (it, Constructor, name) {
824
+ if (!(it instanceof Constructor)) {
825
+ throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
826
+ } return it;
1145
827
  };
1146
828
 
1147
- var noop = function () { /* empty */ };
1148
- var empty = [];
1149
- var construct = getBuiltIn('Reflect', 'construct');
1150
- var constructorRegExp = /^\s*(?:class|function)\b/;
1151
- var exec = functionUncurryThis(constructorRegExp.exec);
1152
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
829
+ var iterators = {};
1153
830
 
1154
- var isConstructorModern = function isConstructor(argument) {
1155
- if (!isCallable(argument)) return false;
1156
- try {
1157
- construct(noop, empty, argument);
1158
- return true;
1159
- } catch (error) {
1160
- return false;
1161
- }
831
+ var ITERATOR = wellKnownSymbol('iterator');
832
+ var ArrayPrototype = Array.prototype;
833
+
834
+ // check on default Array iterator
835
+ var isArrayIteratorMethod = function (it) {
836
+ return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR] === it);
1162
837
  };
1163
838
 
1164
- var isConstructorLegacy = function isConstructor(argument) {
1165
- if (!isCallable(argument)) return false;
1166
- switch (classof(argument)) {
1167
- case 'AsyncFunction':
1168
- case 'GeneratorFunction':
1169
- case 'AsyncGeneratorFunction': return false;
839
+ // optional / simple context binding
840
+ var functionBindContext = function (fn, that, length) {
841
+ aFunction$1(fn);
842
+ if (that === undefined) return fn;
843
+ switch (length) {
844
+ case 0: return function () {
845
+ return fn.call(that);
846
+ };
847
+ case 1: return function (a) {
848
+ return fn.call(that, a);
849
+ };
850
+ case 2: return function (a, b) {
851
+ return fn.call(that, a, b);
852
+ };
853
+ case 3: return function (a, b, c) {
854
+ return fn.call(that, a, b, c);
855
+ };
1170
856
  }
857
+ return function (/* ...args */) {
858
+ return fn.apply(that, arguments);
859
+ };
860
+ };
861
+
862
+ var ITERATOR$1 = wellKnownSymbol('iterator');
863
+
864
+ var getIteratorMethod = function (it) {
865
+ if (it != undefined) return it[ITERATOR$1]
866
+ || it['@@iterator']
867
+ || iterators[classof(it)];
868
+ };
869
+
870
+ // call something on iterator step with safe closing on error
871
+ var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
1171
872
  try {
1172
- // we can't check .prototype since constructors produced by .bind haven't it
1173
- // `Function#toString` throws on some built-it function in some legacy engines
1174
- // (for example, `DOMQuad` and similar in FF41-)
1175
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
873
+ return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
874
+ // 7.4.6 IteratorClose(iterator, completion)
1176
875
  } catch (error) {
1177
- return true;
876
+ var returnMethod = iterator['return'];
877
+ if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
878
+ throw error;
1178
879
  }
1179
880
  };
1180
881
 
1181
- isConstructorLegacy.sham = true;
882
+ var iterate_1 = createCommonjsModule(function (module) {
883
+ var Result = function (stopped, result) {
884
+ this.stopped = stopped;
885
+ this.result = result;
886
+ };
1182
887
 
1183
- // `IsConstructor` abstract operation
1184
- // https://tc39.es/ecma262/#sec-isconstructor
1185
- var isConstructor = !construct || fails(function () {
1186
- var called;
1187
- return isConstructorModern(isConstructorModern.call)
1188
- || !isConstructorModern(Object)
1189
- || !isConstructorModern(function () { called = true; })
1190
- || called;
1191
- }) ? isConstructorLegacy : isConstructorModern;
888
+ var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
889
+ var boundFunction = functionBindContext(fn, that, AS_ENTRIES ? 2 : 1);
890
+ var iterator, iterFn, index, length, result, next, step;
1192
891
 
1193
- var $TypeError$8 = TypeError;
892
+ if (IS_ITERATOR) {
893
+ iterator = iterable;
894
+ } else {
895
+ iterFn = getIteratorMethod(iterable);
896
+ if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
897
+ // optimisation for array iterators
898
+ if (isArrayIteratorMethod(iterFn)) {
899
+ for (index = 0, length = toLength(iterable.length); length > index; index++) {
900
+ result = AS_ENTRIES
901
+ ? boundFunction(anObject(step = iterable[index])[0], step[1])
902
+ : boundFunction(iterable[index]);
903
+ if (result && result instanceof Result) return result;
904
+ } return new Result(false);
905
+ }
906
+ iterator = iterFn.call(iterable);
907
+ }
1194
908
 
1195
- // `Assert: IsConstructor(argument) is true`
1196
- var aConstructor = function (argument) {
1197
- if (isConstructor(argument)) return argument;
1198
- throw $TypeError$8(tryToString(argument) + ' is not a constructor');
909
+ next = iterator.next;
910
+ while (!(step = next.call(iterator)).done) {
911
+ result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
912
+ if (typeof result == 'object' && result && result instanceof Result) return result;
913
+ } return new Result(false);
1199
914
  };
1200
915
 
1201
- var SPECIES$1 = wellKnownSymbol('species');
1202
-
1203
- // `SpeciesConstructor` abstract operation
1204
- // https://tc39.es/ecma262/#sec-speciesconstructor
1205
- var speciesConstructor = function (O, defaultConstructor) {
1206
- var C = anObject(O).constructor;
1207
- var S;
1208
- return C === undefined || (S = anObject(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
916
+ iterate.stop = function (result) {
917
+ return new Result(true, result);
1209
918
  };
1210
-
1211
- var FunctionPrototype$2 = Function.prototype;
1212
- var apply = FunctionPrototype$2.apply;
1213
- var call$2 = FunctionPrototype$2.call;
1214
-
1215
- // eslint-disable-next-line es-x/no-reflect -- safe
1216
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call$2.bind(apply) : function () {
1217
- return call$2.apply(apply, arguments);
1218
919
  });
1219
920
 
1220
- var bind$1 = functionUncurryThis(functionUncurryThis.bind);
921
+ var ITERATOR$2 = wellKnownSymbol('iterator');
922
+ var SAFE_CLOSING = false;
1221
923
 
1222
- // optional / simple context binding
1223
- var functionBindContext = function (fn, that) {
1224
- aCallable(fn);
1225
- return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function (/* ...args */) {
1226
- return fn.apply(that, arguments);
924
+ try {
925
+ var called = 0;
926
+ var iteratorWithReturn = {
927
+ next: function () {
928
+ return { done: !!called++ };
929
+ },
930
+ 'return': function () {
931
+ SAFE_CLOSING = true;
932
+ }
933
+ };
934
+ iteratorWithReturn[ITERATOR$2] = function () {
935
+ return this;
1227
936
  };
937
+ // eslint-disable-next-line no-throw-literal
938
+ Array.from(iteratorWithReturn, function () { throw 2; });
939
+ } catch (error) { /* empty */ }
940
+
941
+ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
942
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
943
+ var ITERATION_SUPPORT = false;
944
+ try {
945
+ var object = {};
946
+ object[ITERATOR$2] = function () {
947
+ return {
948
+ next: function () {
949
+ return { done: ITERATION_SUPPORT = true };
950
+ }
951
+ };
952
+ };
953
+ exec(object);
954
+ } catch (error) { /* empty */ }
955
+ return ITERATION_SUPPORT;
1228
956
  };
1229
957
 
1230
- var html = getBuiltIn('document', 'documentElement');
958
+ var SPECIES$1 = wellKnownSymbol('species');
1231
959
 
1232
- var arraySlice = functionUncurryThis([].slice);
960
+ // `SpeciesConstructor` abstract operation
961
+ // https://tc39.github.io/ecma262/#sec-speciesconstructor
962
+ var speciesConstructor = function (O, defaultConstructor) {
963
+ var C = anObject(O).constructor;
964
+ var S;
965
+ return C === undefined || (S = anObject(C)[SPECIES$1]) == undefined ? defaultConstructor : aFunction$1(S);
966
+ };
1233
967
 
1234
- var $TypeError$9 = TypeError;
968
+ var html = getBuiltIn('document', 'documentElement');
1235
969
 
1236
- var validateArgumentsLength = function (passed, required) {
1237
- if (passed < required) throw $TypeError$9('Not enough arguments');
1238
- return passed;
1239
- };
970
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
1240
971
 
1241
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
972
+ var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
1242
973
 
974
+ var location = global_1.location;
1243
975
  var set$1 = global_1.setImmediate;
1244
976
  var clear = global_1.clearImmediate;
1245
- var process$1 = global_1.process;
1246
- var Dispatch = global_1.Dispatch;
1247
- var Function$1 = global_1.Function;
977
+ var process = global_1.process;
1248
978
  var MessageChannel = global_1.MessageChannel;
1249
- var String$1 = global_1.String;
979
+ var Dispatch = global_1.Dispatch;
1250
980
  var counter = 0;
1251
981
  var queue = {};
1252
982
  var ONREADYSTATECHANGE = 'onreadystatechange';
1253
- var location, defer, channel, port;
1254
-
1255
- try {
1256
- // Deno throws a ReferenceError on `location` access without `--location` flag
1257
- location = global_1.location;
1258
- } catch (error) { /* empty */ }
983
+ var defer, channel, port;
1259
984
 
1260
985
  var run = function (id) {
1261
- if (hasOwnProperty_1(queue, id)) {
986
+ // eslint-disable-next-line no-prototype-builtins
987
+ if (queue.hasOwnProperty(id)) {
1262
988
  var fn = queue[id];
1263
989
  delete queue[id];
1264
990
  fn();
@@ -1277,17 +1003,18 @@ var listener = function (event) {
1277
1003
 
1278
1004
  var post = function (id) {
1279
1005
  // old engines have not location.origin
1280
- global_1.postMessage(String$1(id), location.protocol + '//' + location.host);
1006
+ global_1.postMessage(id + '', location.protocol + '//' + location.host);
1281
1007
  };
1282
1008
 
1283
1009
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1284
1010
  if (!set$1 || !clear) {
1285
- set$1 = function setImmediate(handler) {
1286
- validateArgumentsLength(arguments.length, 1);
1287
- var fn = isCallable(handler) ? handler : Function$1(handler);
1288
- var args = arraySlice(arguments, 1);
1011
+ set$1 = function setImmediate(fn) {
1012
+ var args = [];
1013
+ var i = 1;
1014
+ while (arguments.length > i) args.push(arguments[i++]);
1289
1015
  queue[++counter] = function () {
1290
- functionApply(fn, undefined, args);
1016
+ // eslint-disable-next-line no-new-func
1017
+ (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
1291
1018
  };
1292
1019
  defer(counter);
1293
1020
  return counter;
@@ -1296,9 +1023,9 @@ if (!set$1 || !clear) {
1296
1023
  delete queue[id];
1297
1024
  };
1298
1025
  // Node.js 0.8-
1299
- if (engineIsNode) {
1026
+ if (classofRaw(process) == 'process') {
1300
1027
  defer = function (id) {
1301
- process$1.nextTick(runner(id));
1028
+ process.nextTick(runner(id));
1302
1029
  };
1303
1030
  // Sphere (JS game engine) Dispatch API
1304
1031
  } else if (Dispatch && Dispatch.now) {
@@ -1311,16 +1038,10 @@ if (!set$1 || !clear) {
1311
1038
  channel = new MessageChannel();
1312
1039
  port = channel.port2;
1313
1040
  channel.port1.onmessage = listener;
1314
- defer = functionBindContext(port.postMessage, port);
1041
+ defer = functionBindContext(port.postMessage, port, 1);
1315
1042
  // Browsers with postMessage, skip WebWorkers
1316
1043
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1317
- } else if (
1318
- global_1.addEventListener &&
1319
- isCallable(global_1.postMessage) &&
1320
- !global_1.importScripts &&
1321
- location && location.protocol !== 'file:' &&
1322
- !fails(post)
1323
- ) {
1044
+ } else if (global_1.addEventListener && typeof postMessage == 'function' && !global_1.importScripts && !fails(post)) {
1324
1045
  defer = post;
1325
1046
  global_1.addEventListener('message', listener, false);
1326
1047
  // IE8-
@@ -1344,21 +1065,15 @@ var task = {
1344
1065
  clear: clear
1345
1066
  };
1346
1067
 
1347
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;
1348
-
1349
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
1350
-
1351
1068
  var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
1352
- var macrotask = task.set;
1353
-
1354
-
1355
1069
 
1070
+ var macrotask = task.set;
1356
1071
 
1357
1072
 
1358
1073
  var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
1359
- var document$2 = global_1.document;
1360
- var process$2 = global_1.process;
1074
+ var process$1 = global_1.process;
1361
1075
  var Promise$1 = global_1.Promise;
1076
+ var IS_NODE = classofRaw(process$1) == 'process';
1362
1077
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1363
1078
  var queueMicrotaskDescriptor = getOwnPropertyDescriptor$2(global_1, 'queueMicrotask');
1364
1079
  var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
@@ -1369,7 +1084,7 @@ var flush, head, last, notify, toggle, node, promise, then;
1369
1084
  if (!queueMicrotask) {
1370
1085
  flush = function () {
1371
1086
  var parent, fn;
1372
- if (engineIsNode && (parent = process$2.domain)) parent.exit();
1087
+ if (IS_NODE && (parent = process$1.domain)) parent.exit();
1373
1088
  while (head) {
1374
1089
  fn = head.fn;
1375
1090
  head = head.next;
@@ -1384,41 +1099,37 @@ if (!queueMicrotask) {
1384
1099
  if (parent) parent.enter();
1385
1100
  };
1386
1101
 
1102
+ // Node.js
1103
+ if (IS_NODE) {
1104
+ notify = function () {
1105
+ process$1.nextTick(flush);
1106
+ };
1387
1107
  // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1388
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1389
- if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {
1108
+ } else if (MutationObserver && !engineIsIos) {
1390
1109
  toggle = true;
1391
- node = document$2.createTextNode('');
1110
+ node = document.createTextNode('');
1392
1111
  new MutationObserver(flush).observe(node, { characterData: true });
1393
1112
  notify = function () {
1394
1113
  node.data = toggle = !toggle;
1395
1114
  };
1396
1115
  // environments with maybe non-completely correct, but existent Promise
1397
- } else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {
1116
+ } else if (Promise$1 && Promise$1.resolve) {
1398
1117
  // Promise.resolve without an argument throws an error in LG WebOS 2
1399
1118
  promise = Promise$1.resolve(undefined);
1400
- // workaround of WebKit ~ iOS Safari 10.1 bug
1401
- promise.constructor = Promise$1;
1402
- then = functionBindContext(promise.then, promise);
1403
- notify = function () {
1404
- then(flush);
1405
- };
1406
- // Node.js without promises
1407
- } else if (engineIsNode) {
1119
+ then = promise.then;
1408
1120
  notify = function () {
1409
- process$2.nextTick(flush);
1121
+ then.call(promise, flush);
1410
1122
  };
1411
1123
  // for other environments - macrotask based on:
1412
1124
  // - setImmediate
1413
1125
  // - MessageChannel
1414
- // - window.postMessage
1126
+ // - window.postMessag
1415
1127
  // - onreadystatechange
1416
1128
  // - setTimeout
1417
1129
  } else {
1418
- // strange IE + webpack dev server bug - use .bind(global)
1419
- macrotask = functionBindContext(macrotask, global_1);
1420
1130
  notify = function () {
1421
- macrotask(flush);
1131
+ // strange IE + webpack dev server bug - use .call(global)
1132
+ macrotask.call(global_1, flush);
1422
1133
  };
1423
1134
  }
1424
1135
  }
@@ -1432,10 +1143,39 @@ var microtask = queueMicrotask || function (fn) {
1432
1143
  } last = task;
1433
1144
  };
1434
1145
 
1146
+ var PromiseCapability = function (C) {
1147
+ var resolve, reject;
1148
+ this.promise = new C(function ($$resolve, $$reject) {
1149
+ if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
1150
+ resolve = $$resolve;
1151
+ reject = $$reject;
1152
+ });
1153
+ this.resolve = aFunction$1(resolve);
1154
+ this.reject = aFunction$1(reject);
1155
+ };
1156
+
1157
+ // 25.4.1.5 NewPromiseCapability(C)
1158
+ var f$5 = function (C) {
1159
+ return new PromiseCapability(C);
1160
+ };
1161
+
1162
+ var newPromiseCapability = {
1163
+ f: f$5
1164
+ };
1165
+
1166
+ var promiseResolve = function (C, x) {
1167
+ anObject(C);
1168
+ if (isObject(x) && x.constructor === C) return x;
1169
+ var promiseCapability = newPromiseCapability.f(C);
1170
+ var resolve = promiseCapability.resolve;
1171
+ resolve(x);
1172
+ return promiseCapability.promise;
1173
+ };
1174
+
1435
1175
  var hostReportErrors = function (a, b) {
1436
1176
  var console = global_1.console;
1437
1177
  if (console && console.error) {
1438
- arguments.length == 1 ? console.error(a) : console.error(a, b);
1178
+ arguments.length === 1 ? console.error(a) : console.error(a, b);
1439
1179
  }
1440
1180
  };
1441
1181
 
@@ -1447,89 +1187,23 @@ var perform = function (exec) {
1447
1187
  }
1448
1188
  };
1449
1189
 
1450
- var Queue = function () {
1451
- this.head = null;
1452
- this.tail = null;
1453
- };
1190
+ var process$2 = global_1.process;
1191
+ var versions = process$2 && process$2.versions;
1192
+ var v8 = versions && versions.v8;
1193
+ var match, version;
1454
1194
 
1455
- Queue.prototype = {
1456
- add: function (item) {
1457
- var entry = { item: item, next: null };
1458
- if (this.head) this.tail.next = entry;
1459
- else this.head = entry;
1460
- this.tail = entry;
1461
- },
1462
- get: function () {
1463
- var entry = this.head;
1464
- if (entry) {
1465
- this.head = entry.next;
1466
- if (this.tail === entry) this.tail = null;
1467
- return entry.item;
1468
- }
1195
+ if (v8) {
1196
+ match = v8.split('.');
1197
+ version = match[0] + match[1];
1198
+ } else if (engineUserAgent) {
1199
+ match = engineUserAgent.match(/Edge\/(\d+)/);
1200
+ if (!match || match[1] >= 74) {
1201
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
1202
+ if (match) version = match[1];
1469
1203
  }
1470
- };
1471
-
1472
- var queue$1 = Queue;
1473
-
1474
- var promiseNativeConstructor = global_1.Promise;
1475
-
1476
- var engineIsBrowser = typeof window == 'object' && typeof Deno != 'object';
1477
-
1478
- var NativePromisePrototype = promiseNativeConstructor && promiseNativeConstructor.prototype;
1479
- var SPECIES$2 = wellKnownSymbol('species');
1480
- var SUBCLASSING = false;
1481
- var NATIVE_PROMISE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
1482
-
1483
- var FORCED_PROMISE_CONSTRUCTOR = isForced_1('Promise', function () {
1484
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(promiseNativeConstructor);
1485
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(promiseNativeConstructor);
1486
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1487
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1488
- // We can't detect it synchronously, so just check versions
1489
- if (!GLOBAL_CORE_JS_PROMISE && engineV8Version === 66) return true;
1490
- // We can't use @@species feature detection in V8 since it causes
1491
- // deoptimization and performance degradation
1492
- // https://github.com/zloirock/core-js/issues/679
1493
- if (engineV8Version >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
1494
- // Detect correctness of subclassing with @@species support
1495
- var promise = new promiseNativeConstructor(function (resolve) { resolve(1); });
1496
- var FakePromise = function (exec) {
1497
- exec(function () { /* empty */ }, function () { /* empty */ });
1498
- };
1499
- var constructor = promise.constructor = {};
1500
- constructor[SPECIES$2] = FakePromise;
1501
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1502
- if (!SUBCLASSING) return true;
1503
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1504
- return !GLOBAL_CORE_JS_PROMISE && engineIsBrowser && !NATIVE_PROMISE_REJECTION_EVENT;
1505
- });
1506
-
1507
- var promiseConstructorDetection = {
1508
- CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR,
1509
- REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT,
1510
- SUBCLASSING: SUBCLASSING
1511
- };
1512
-
1513
- var PromiseCapability = function (C) {
1514
- var resolve, reject;
1515
- this.promise = new C(function ($$resolve, $$reject) {
1516
- if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
1517
- resolve = $$resolve;
1518
- reject = $$reject;
1519
- });
1520
- this.resolve = aCallable(resolve);
1521
- this.reject = aCallable(reject);
1522
- };
1523
-
1524
- // `NewPromiseCapability` abstract operation
1525
- // https://tc39.es/ecma262/#sec-newpromisecapability
1526
- var f$5 = function (C) {
1527
- return new PromiseCapability(C);
1528
- };
1204
+ }
1529
1205
 
1530
- var newPromiseCapability = {
1531
- f: f$5
1532
- };
1206
+ var engineV8Version = version && +version;
1533
1207
 
1534
1208
  var task$1 = task.set;
1535
1209
 
@@ -1541,22 +1215,21 @@ var task$1 = task.set;
1541
1215
 
1542
1216
 
1543
1217
 
1218
+
1219
+ var SPECIES$2 = wellKnownSymbol('species');
1544
1220
  var PROMISE = 'Promise';
1545
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
1546
- var NATIVE_PROMISE_REJECTION_EVENT$1 = promiseConstructorDetection.REJECTION_EVENT;
1547
- var NATIVE_PROMISE_SUBCLASSING = promiseConstructorDetection.SUBCLASSING;
1548
- var getInternalPromiseState = internalState.getterFor(PROMISE);
1221
+ var getInternalState = internalState.get;
1549
1222
  var setInternalState = internalState.set;
1550
- var NativePromisePrototype$1 = promiseNativeConstructor && promiseNativeConstructor.prototype;
1551
- var PromiseConstructor = promiseNativeConstructor;
1552
- var PromisePrototype = NativePromisePrototype$1;
1553
- var TypeError$2 = global_1.TypeError;
1554
- var document$3 = global_1.document;
1223
+ var getInternalPromiseState = internalState.getterFor(PROMISE);
1224
+ var PromiseConstructor = nativePromiseConstructor;
1225
+ var TypeError$1 = global_1.TypeError;
1226
+ var document$2 = global_1.document;
1555
1227
  var process$3 = global_1.process;
1228
+ var $fetch = getBuiltIn('fetch');
1556
1229
  var newPromiseCapability$1 = newPromiseCapability.f;
1557
1230
  var newGenericPromiseCapability = newPromiseCapability$1;
1558
-
1559
- var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);
1231
+ var IS_NODE$1 = classofRaw(process$3) == 'process';
1232
+ var DISPATCH_EVENT = !!(document$2 && document$2.createEvent && global_1.dispatchEvent);
1560
1233
  var UNHANDLED_REJECTION = 'unhandledrejection';
1561
1234
  var REJECTION_HANDLED = 'rejectionhandled';
1562
1235
  var PENDING = 0;
@@ -1564,91 +1237,116 @@ var FULFILLED = 1;
1564
1237
  var REJECTED = 2;
1565
1238
  var HANDLED = 1;
1566
1239
  var UNHANDLED = 2;
1567
-
1568
1240
  var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1569
1241
 
1242
+ var FORCED = isForced_1(PROMISE, function () {
1243
+ var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
1244
+ if (!GLOBAL_CORE_JS_PROMISE) {
1245
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1246
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1247
+ // We can't detect it synchronously, so just check versions
1248
+ if (engineV8Version === 66) return true;
1249
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1250
+ if (!IS_NODE$1 && typeof PromiseRejectionEvent != 'function') return true;
1251
+ }
1252
+ // We can't use @@species feature detection in V8 since it causes
1253
+ // deoptimization and performance degradation
1254
+ // https://github.com/zloirock/core-js/issues/679
1255
+ if (engineV8Version >= 51 && /native code/.test(PromiseConstructor)) return false;
1256
+ // Detect correctness of subclassing with @@species support
1257
+ var promise = PromiseConstructor.resolve(1);
1258
+ var FakePromise = function (exec) {
1259
+ exec(function () { /* empty */ }, function () { /* empty */ });
1260
+ };
1261
+ var constructor = promise.constructor = {};
1262
+ constructor[SPECIES$2] = FakePromise;
1263
+ return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
1264
+ });
1265
+
1266
+ var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
1267
+ PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
1268
+ });
1269
+
1570
1270
  // helpers
1571
1271
  var isThenable = function (it) {
1572
1272
  var then;
1573
- return isObject(it) && isCallable(then = it.then) ? then : false;
1273
+ return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
1574
1274
  };
1575
1275
 
1576
- var callReaction = function (reaction, state) {
1577
- var value = state.value;
1578
- var ok = state.state == FULFILLED;
1579
- var handler = ok ? reaction.ok : reaction.fail;
1580
- var resolve = reaction.resolve;
1581
- var reject = reaction.reject;
1582
- var domain = reaction.domain;
1583
- var result, then, exited;
1584
- try {
1585
- if (handler) {
1586
- if (!ok) {
1587
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1588
- state.rejection = HANDLED;
1589
- }
1590
- if (handler === true) result = value;
1591
- else {
1592
- if (domain) domain.enter();
1593
- result = handler(value); // can throw
1594
- if (domain) {
1595
- domain.exit();
1596
- exited = true;
1597
- }
1598
- }
1599
- if (result === reaction.promise) {
1600
- reject(TypeError$2('Promise-chain cycle'));
1601
- } else if (then = isThenable(result)) {
1602
- functionCall(then, result, resolve, reject);
1603
- } else resolve(result);
1604
- } else reject(value);
1605
- } catch (error) {
1606
- if (domain && !exited) domain.exit();
1607
- reject(error);
1608
- }
1609
- };
1610
-
1611
- var notify$1 = function (state, isReject) {
1276
+ var notify$1 = function (promise, state, isReject) {
1612
1277
  if (state.notified) return;
1613
1278
  state.notified = true;
1279
+ var chain = state.reactions;
1614
1280
  microtask(function () {
1615
- var reactions = state.reactions;
1616
- var reaction;
1617
- while (reaction = reactions.get()) {
1618
- callReaction(reaction, state);
1281
+ var value = state.value;
1282
+ var ok = state.state == FULFILLED;
1283
+ var index = 0;
1284
+ // variable length - can't use forEach
1285
+ while (chain.length > index) {
1286
+ var reaction = chain[index++];
1287
+ var handler = ok ? reaction.ok : reaction.fail;
1288
+ var resolve = reaction.resolve;
1289
+ var reject = reaction.reject;
1290
+ var domain = reaction.domain;
1291
+ var result, then, exited;
1292
+ try {
1293
+ if (handler) {
1294
+ if (!ok) {
1295
+ if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
1296
+ state.rejection = HANDLED;
1297
+ }
1298
+ if (handler === true) result = value;
1299
+ else {
1300
+ if (domain) domain.enter();
1301
+ result = handler(value); // can throw
1302
+ if (domain) {
1303
+ domain.exit();
1304
+ exited = true;
1305
+ }
1306
+ }
1307
+ if (result === reaction.promise) {
1308
+ reject(TypeError$1('Promise-chain cycle'));
1309
+ } else if (then = isThenable(result)) {
1310
+ then.call(result, resolve, reject);
1311
+ } else resolve(result);
1312
+ } else reject(value);
1313
+ } catch (error) {
1314
+ if (domain && !exited) domain.exit();
1315
+ reject(error);
1316
+ }
1619
1317
  }
1318
+ state.reactions = [];
1620
1319
  state.notified = false;
1621
- if (isReject && !state.rejection) onUnhandled(state);
1320
+ if (isReject && !state.rejection) onUnhandled(promise, state);
1622
1321
  });
1623
1322
  };
1624
1323
 
1625
1324
  var dispatchEvent = function (name, promise, reason) {
1626
1325
  var event, handler;
1627
1326
  if (DISPATCH_EVENT) {
1628
- event = document$3.createEvent('Event');
1327
+ event = document$2.createEvent('Event');
1629
1328
  event.promise = promise;
1630
1329
  event.reason = reason;
1631
1330
  event.initEvent(name, false, true);
1632
1331
  global_1.dispatchEvent(event);
1633
1332
  } else event = { promise: promise, reason: reason };
1634
- if (!NATIVE_PROMISE_REJECTION_EVENT$1 && (handler = global_1['on' + name])) handler(event);
1333
+ if (handler = global_1['on' + name]) handler(event);
1635
1334
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1636
1335
  };
1637
1336
 
1638
- var onUnhandled = function (state) {
1639
- functionCall(task$1, global_1, function () {
1640
- var promise = state.facade;
1337
+ var onUnhandled = function (promise, state) {
1338
+ task$1.call(global_1, function () {
1641
1339
  var value = state.value;
1642
1340
  var IS_UNHANDLED = isUnhandled(state);
1643
1341
  var result;
1644
1342
  if (IS_UNHANDLED) {
1645
1343
  result = perform(function () {
1646
- if (engineIsNode) {
1344
+ if (IS_NODE$1) {
1647
1345
  process$3.emit('unhandledRejection', value, promise);
1648
1346
  } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1649
1347
  });
1650
1348
  // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1651
- state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
1349
+ state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;
1652
1350
  if (result.error) throw result.value;
1653
1351
  }
1654
1352
  });
@@ -1658,315 +1356,187 @@ var isUnhandled = function (state) {
1658
1356
  return state.rejection !== HANDLED && !state.parent;
1659
1357
  };
1660
1358
 
1661
- var onHandleUnhandled = function (state) {
1662
- functionCall(task$1, global_1, function () {
1663
- var promise = state.facade;
1664
- if (engineIsNode) {
1359
+ var onHandleUnhandled = function (promise, state) {
1360
+ task$1.call(global_1, function () {
1361
+ if (IS_NODE$1) {
1665
1362
  process$3.emit('rejectionHandled', promise);
1666
1363
  } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1667
1364
  });
1668
1365
  };
1669
1366
 
1670
- var bind$2 = function (fn, state, unwrap) {
1367
+ var bind = function (fn, promise, state, unwrap) {
1671
1368
  return function (value) {
1672
- fn(state, value, unwrap);
1369
+ fn(promise, state, value, unwrap);
1673
1370
  };
1674
1371
  };
1675
1372
 
1676
- var internalReject = function (state, value, unwrap) {
1373
+ var internalReject = function (promise, state, value, unwrap) {
1677
1374
  if (state.done) return;
1678
1375
  state.done = true;
1679
1376
  if (unwrap) state = unwrap;
1680
1377
  state.value = value;
1681
1378
  state.state = REJECTED;
1682
- notify$1(state, true);
1379
+ notify$1(promise, state, true);
1683
1380
  };
1684
1381
 
1685
- var internalResolve = function (state, value, unwrap) {
1382
+ var internalResolve = function (promise, state, value, unwrap) {
1686
1383
  if (state.done) return;
1687
1384
  state.done = true;
1688
1385
  if (unwrap) state = unwrap;
1689
1386
  try {
1690
- if (state.facade === value) throw TypeError$2("Promise can't be resolved itself");
1387
+ if (promise === value) throw TypeError$1("Promise can't be resolved itself");
1691
1388
  var then = isThenable(value);
1692
1389
  if (then) {
1693
1390
  microtask(function () {
1694
1391
  var wrapper = { done: false };
1695
1392
  try {
1696
- functionCall(then, value,
1697
- bind$2(internalResolve, wrapper, state),
1698
- bind$2(internalReject, wrapper, state)
1393
+ then.call(value,
1394
+ bind(internalResolve, promise, wrapper, state),
1395
+ bind(internalReject, promise, wrapper, state)
1699
1396
  );
1700
1397
  } catch (error) {
1701
- internalReject(wrapper, error, state);
1398
+ internalReject(promise, wrapper, error, state);
1702
1399
  }
1703
1400
  });
1704
1401
  } else {
1705
1402
  state.value = value;
1706
1403
  state.state = FULFILLED;
1707
- notify$1(state, false);
1404
+ notify$1(promise, state, false);
1708
1405
  }
1709
1406
  } catch (error) {
1710
- internalReject({ done: false }, error, state);
1407
+ internalReject(promise, { done: false }, error, state);
1711
1408
  }
1712
1409
  };
1713
1410
 
1714
1411
  // constructor polyfill
1715
- if (FORCED_PROMISE_CONSTRUCTOR$1) {
1412
+ if (FORCED) {
1716
1413
  // 25.4.3.1 Promise(executor)
1717
1414
  PromiseConstructor = function Promise(executor) {
1718
- anInstance(this, PromisePrototype);
1719
- aCallable(executor);
1720
- functionCall(Internal, this);
1721
- var state = getInternalPromiseState(this);
1415
+ anInstance(this, PromiseConstructor, PROMISE);
1416
+ aFunction$1(executor);
1417
+ Internal.call(this);
1418
+ var state = getInternalState(this);
1722
1419
  try {
1723
- executor(bind$2(internalResolve, state), bind$2(internalReject, state));
1420
+ executor(bind(internalResolve, this, state), bind(internalReject, this, state));
1724
1421
  } catch (error) {
1725
- internalReject(state, error);
1422
+ internalReject(this, state, error);
1726
1423
  }
1727
1424
  };
1728
-
1729
- PromisePrototype = PromiseConstructor.prototype;
1730
-
1731
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1425
+ // eslint-disable-next-line no-unused-vars
1732
1426
  Internal = function Promise(executor) {
1733
1427
  setInternalState(this, {
1734
1428
  type: PROMISE,
1735
1429
  done: false,
1736
1430
  notified: false,
1737
1431
  parent: false,
1738
- reactions: new queue$1(),
1432
+ reactions: [],
1739
1433
  rejection: false,
1740
1434
  state: PENDING,
1741
1435
  value: undefined
1742
1436
  });
1743
1437
  };
1744
-
1745
- // `Promise.prototype.then` method
1746
- // https://tc39.es/ecma262/#sec-promise.prototype.then
1747
- Internal.prototype = defineBuiltIn(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1748
- var state = getInternalPromiseState(this);
1749
- var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1750
- state.parent = true;
1751
- reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
1752
- reaction.fail = isCallable(onRejected) && onRejected;
1753
- reaction.domain = engineIsNode ? process$3.domain : undefined;
1754
- if (state.state == PENDING) state.reactions.add(reaction);
1755
- else microtask(function () {
1756
- callReaction(reaction, state);
1757
- });
1758
- return reaction.promise;
1438
+ Internal.prototype = redefineAll(PromiseConstructor.prototype, {
1439
+ // `Promise.prototype.then` method
1440
+ // https://tc39.github.io/ecma262/#sec-promise.prototype.then
1441
+ then: function then(onFulfilled, onRejected) {
1442
+ var state = getInternalPromiseState(this);
1443
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1444
+ reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
1445
+ reaction.fail = typeof onRejected == 'function' && onRejected;
1446
+ reaction.domain = IS_NODE$1 ? process$3.domain : undefined;
1447
+ state.parent = true;
1448
+ state.reactions.push(reaction);
1449
+ if (state.state != PENDING) notify$1(this, state, false);
1450
+ return reaction.promise;
1451
+ },
1452
+ // `Promise.prototype.catch` method
1453
+ // https://tc39.github.io/ecma262/#sec-promise.prototype.catch
1454
+ 'catch': function (onRejected) {
1455
+ return this.then(undefined, onRejected);
1456
+ }
1759
1457
  });
1760
-
1761
1458
  OwnPromiseCapability = function () {
1762
1459
  var promise = new Internal();
1763
- var state = getInternalPromiseState(promise);
1460
+ var state = getInternalState(promise);
1764
1461
  this.promise = promise;
1765
- this.resolve = bind$2(internalResolve, state);
1766
- this.reject = bind$2(internalReject, state);
1462
+ this.resolve = bind(internalResolve, promise, state);
1463
+ this.reject = bind(internalReject, promise, state);
1767
1464
  };
1768
-
1769
1465
  newPromiseCapability.f = newPromiseCapability$1 = function (C) {
1770
1466
  return C === PromiseConstructor || C === PromiseWrapper
1771
1467
  ? new OwnPromiseCapability(C)
1772
- : newGenericPromiseCapability(C);
1773
- };
1774
-
1775
- if ( isCallable(promiseNativeConstructor) && NativePromisePrototype$1 !== Object.prototype) {
1776
- nativeThen = NativePromisePrototype$1.then;
1777
-
1778
- if (!NATIVE_PROMISE_SUBCLASSING) {
1779
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1780
- defineBuiltIn(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1781
- var that = this;
1782
- return new PromiseConstructor(function (resolve, reject) {
1783
- functionCall(nativeThen, that, resolve, reject);
1784
- }).then(onFulfilled, onRejected);
1785
- // https://github.com/zloirock/core-js/issues/640
1786
- }, { unsafe: true });
1787
- }
1788
-
1789
- // make `.constructor === Promise` work for native promise-based APIs
1790
- try {
1791
- delete NativePromisePrototype$1.constructor;
1792
- } catch (error) { /* empty */ }
1793
-
1794
- // make `instanceof Promise` work for native promise-based APIs
1795
- if (objectSetPrototypeOf) {
1796
- objectSetPrototypeOf(NativePromisePrototype$1, PromisePrototype);
1797
- }
1798
- }
1799
- }
1800
-
1801
- _export({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
1802
- Promise: PromiseConstructor
1803
- });
1804
-
1805
- setToStringTag(PromiseConstructor, PROMISE, false);
1806
- setSpecies(PROMISE);
1807
-
1808
- var iterators = {};
1809
-
1810
- var ITERATOR = wellKnownSymbol('iterator');
1811
- var ArrayPrototype = Array.prototype;
1812
-
1813
- // check on default Array iterator
1814
- var isArrayIteratorMethod = function (it) {
1815
- return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR] === it);
1816
- };
1817
-
1818
- var ITERATOR$1 = wellKnownSymbol('iterator');
1819
-
1820
- var getIteratorMethod = function (it) {
1821
- if (it != undefined) return getMethod(it, ITERATOR$1)
1822
- || getMethod(it, '@@iterator')
1823
- || iterators[classof(it)];
1824
- };
1825
-
1826
- var $TypeError$a = TypeError;
1827
-
1828
- var getIterator = function (argument, usingIterator) {
1829
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1830
- if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1831
- throw $TypeError$a(tryToString(argument) + ' is not iterable');
1832
- };
1833
-
1834
- var iteratorClose = function (iterator, kind, value) {
1835
- var innerResult, innerError;
1836
- anObject(iterator);
1837
- try {
1838
- innerResult = getMethod(iterator, 'return');
1839
- if (!innerResult) {
1840
- if (kind === 'throw') throw value;
1841
- return value;
1842
- }
1843
- innerResult = functionCall(innerResult, iterator);
1844
- } catch (error) {
1845
- innerError = true;
1846
- innerResult = error;
1847
- }
1848
- if (kind === 'throw') throw value;
1849
- if (innerError) throw innerResult;
1850
- anObject(innerResult);
1851
- return value;
1852
- };
1853
-
1854
- var $TypeError$b = TypeError;
1855
-
1856
- var Result = function (stopped, result) {
1857
- this.stopped = stopped;
1858
- this.result = result;
1859
- };
1860
-
1861
- var ResultPrototype = Result.prototype;
1862
-
1863
- var iterate = function (iterable, unboundFunction, options) {
1864
- var that = options && options.that;
1865
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1866
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1867
- var INTERRUPTED = !!(options && options.INTERRUPTED);
1868
- var fn = functionBindContext(unboundFunction, that);
1869
- var iterator, iterFn, index, length, result, next, step;
1870
-
1871
- var stop = function (condition) {
1872
- if (iterator) iteratorClose(iterator, 'normal', condition);
1873
- return new Result(true, condition);
1874
- };
1875
-
1876
- var callFn = function (value) {
1877
- if (AS_ENTRIES) {
1878
- anObject(value);
1879
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1880
- } return INTERRUPTED ? fn(value, stop) : fn(value);
1881
- };
1882
-
1883
- if (IS_ITERATOR) {
1884
- iterator = iterable;
1885
- } else {
1886
- iterFn = getIteratorMethod(iterable);
1887
- if (!iterFn) throw $TypeError$b(tryToString(iterable) + ' is not iterable');
1888
- // optimisation for array iterators
1889
- if (isArrayIteratorMethod(iterFn)) {
1890
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1891
- result = callFn(iterable[index]);
1892
- if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1893
- } return new Result(false);
1894
- }
1895
- iterator = getIterator(iterable, iterFn);
1896
- }
1897
-
1898
- next = iterator.next;
1899
- while (!(step = functionCall(next, iterator)).done) {
1900
- try {
1901
- result = callFn(step.value);
1902
- } catch (error) {
1903
- iteratorClose(iterator, 'throw', error);
1904
- }
1905
- if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1906
- } return new Result(false);
1907
- };
1908
-
1909
- var ITERATOR$2 = wellKnownSymbol('iterator');
1910
- var SAFE_CLOSING = false;
1911
-
1912
- try {
1913
- var called = 0;
1914
- var iteratorWithReturn = {
1915
- next: function () {
1916
- return { done: !!called++ };
1917
- },
1918
- 'return': function () {
1919
- SAFE_CLOSING = true;
1920
- }
1921
- };
1922
- iteratorWithReturn[ITERATOR$2] = function () {
1923
- return this;
1468
+ : newGenericPromiseCapability(C);
1924
1469
  };
1925
- // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
1926
- Array.from(iteratorWithReturn, function () { throw 2; });
1927
- } catch (error) { /* empty */ }
1928
1470
 
1929
- var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1930
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
1931
- var ITERATION_SUPPORT = false;
1932
- try {
1933
- var object = {};
1934
- object[ITERATOR$2] = function () {
1935
- return {
1936
- next: function () {
1937
- return { done: ITERATION_SUPPORT = true };
1938
- }
1939
- };
1940
- };
1941
- exec(object);
1942
- } catch (error) { /* empty */ }
1943
- return ITERATION_SUPPORT;
1944
- };
1471
+ if ( typeof nativePromiseConstructor == 'function') {
1472
+ nativeThen = nativePromiseConstructor.prototype.then;
1473
+
1474
+ // wrap native Promise#then for native async functions
1475
+ redefine(nativePromiseConstructor.prototype, 'then', function then(onFulfilled, onRejected) {
1476
+ var that = this;
1477
+ return new PromiseConstructor(function (resolve, reject) {
1478
+ nativeThen.call(that, resolve, reject);
1479
+ }).then(onFulfilled, onRejected);
1480
+ // https://github.com/zloirock/core-js/issues/640
1481
+ }, { unsafe: true });
1482
+
1483
+ // wrap fetch result
1484
+ if (typeof $fetch == 'function') _export({ global: true, enumerable: true, forced: true }, {
1485
+ // eslint-disable-next-line no-unused-vars
1486
+ fetch: function fetch(input /* , init */) {
1487
+ return promiseResolve(PromiseConstructor, $fetch.apply(global_1, arguments));
1488
+ }
1489
+ });
1490
+ }
1491
+ }
1492
+
1493
+ _export({ global: true, wrap: true, forced: FORCED }, {
1494
+ Promise: PromiseConstructor
1495
+ });
1496
+
1497
+ setToStringTag(PromiseConstructor, PROMISE, false);
1498
+ setSpecies(PROMISE);
1499
+
1500
+ PromiseWrapper = getBuiltIn(PROMISE);
1945
1501
 
1946
- var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
1502
+ // statics
1503
+ _export({ target: PROMISE, stat: true, forced: FORCED }, {
1504
+ // `Promise.reject` method
1505
+ // https://tc39.github.io/ecma262/#sec-promise.reject
1506
+ reject: function reject(r) {
1507
+ var capability = newPromiseCapability$1(this);
1508
+ capability.reject.call(undefined, r);
1509
+ return capability.promise;
1510
+ }
1511
+ });
1947
1512
 
1948
- var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$2 || !checkCorrectnessOfIteration(function (iterable) {
1949
- promiseNativeConstructor.all(iterable).then(undefined, function () { /* empty */ });
1513
+ _export({ target: PROMISE, stat: true, forced: FORCED }, {
1514
+ // `Promise.resolve` method
1515
+ // https://tc39.github.io/ecma262/#sec-promise.resolve
1516
+ resolve: function resolve(x) {
1517
+ return promiseResolve( this, x);
1518
+ }
1950
1519
  });
1951
1520
 
1952
- // `Promise.all` method
1953
- // https://tc39.es/ecma262/#sec-promise.all
1954
- _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {
1521
+ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1522
+ // `Promise.all` method
1523
+ // https://tc39.github.io/ecma262/#sec-promise.all
1955
1524
  all: function all(iterable) {
1956
1525
  var C = this;
1957
- var capability = newPromiseCapability.f(C);
1526
+ var capability = newPromiseCapability$1(C);
1958
1527
  var resolve = capability.resolve;
1959
1528
  var reject = capability.reject;
1960
1529
  var result = perform(function () {
1961
- var $promiseResolve = aCallable(C.resolve);
1530
+ var $promiseResolve = aFunction$1(C.resolve);
1962
1531
  var values = [];
1963
1532
  var counter = 0;
1964
1533
  var remaining = 1;
1965
- iterate(iterable, function (promise) {
1534
+ iterate_1(iterable, function (promise) {
1966
1535
  var index = counter++;
1967
1536
  var alreadyCalled = false;
1537
+ values.push(undefined);
1968
1538
  remaining++;
1969
- functionCall($promiseResolve, C, promise).then(function (value) {
1539
+ $promiseResolve.call(C, promise).then(function (value) {
1970
1540
  if (alreadyCalled) return;
1971
1541
  alreadyCalled = true;
1972
1542
  values[index] = value;
@@ -1977,44 +1547,17 @@ _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteratio
1977
1547
  });
1978
1548
  if (result.error) reject(result.value);
1979
1549
  return capability.promise;
1980
- }
1981
- });
1982
-
1983
- var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
1984
-
1985
-
1986
-
1987
-
1988
-
1989
- var NativePromisePrototype$2 = promiseNativeConstructor && promiseNativeConstructor.prototype;
1990
-
1991
- // `Promise.prototype.catch` method
1992
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
1993
- _export({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$3, real: true }, {
1994
- 'catch': function (onRejected) {
1995
- return this.then(undefined, onRejected);
1996
- }
1997
- });
1998
-
1999
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2000
- if ( isCallable(promiseNativeConstructor)) {
2001
- var method = getBuiltIn('Promise').prototype['catch'];
2002
- if (NativePromisePrototype$2['catch'] !== method) {
2003
- defineBuiltIn(NativePromisePrototype$2, 'catch', method, { unsafe: true });
2004
- }
2005
- }
2006
-
2007
- // `Promise.race` method
2008
- // https://tc39.es/ecma262/#sec-promise.race
2009
- _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteration }, {
1550
+ },
1551
+ // `Promise.race` method
1552
+ // https://tc39.github.io/ecma262/#sec-promise.race
2010
1553
  race: function race(iterable) {
2011
1554
  var C = this;
2012
- var capability = newPromiseCapability.f(C);
1555
+ var capability = newPromiseCapability$1(C);
2013
1556
  var reject = capability.reject;
2014
1557
  var result = perform(function () {
2015
- var $promiseResolve = aCallable(C.resolve);
2016
- iterate(iterable, function (promise) {
2017
- functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
1558
+ var $promiseResolve = aFunction$1(C.resolve);
1559
+ iterate_1(iterable, function (promise) {
1560
+ $promiseResolve.call(C, promise).then(capability.resolve, reject);
2018
1561
  });
2019
1562
  });
2020
1563
  if (result.error) reject(result.value);
@@ -2022,40 +1565,6 @@ _export({ target: 'Promise', stat: true, forced: promiseStaticsIncorrectIteratio
2022
1565
  }
2023
1566
  });
2024
1567
 
2025
- var FORCED_PROMISE_CONSTRUCTOR$4 = promiseConstructorDetection.CONSTRUCTOR;
2026
-
2027
- // `Promise.reject` method
2028
- // https://tc39.es/ecma262/#sec-promise.reject
2029
- _export({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2030
- reject: function reject(r) {
2031
- var capability = newPromiseCapability.f(this);
2032
- functionCall(capability.reject, undefined, r);
2033
- return capability.promise;
2034
- }
2035
- });
2036
-
2037
- var promiseResolve = function (C, x) {
2038
- anObject(C);
2039
- if (isObject(x) && x.constructor === C) return x;
2040
- var promiseCapability = newPromiseCapability.f(C);
2041
- var resolve = promiseCapability.resolve;
2042
- resolve(x);
2043
- return promiseCapability.promise;
2044
- };
2045
-
2046
- var FORCED_PROMISE_CONSTRUCTOR$5 = promiseConstructorDetection.CONSTRUCTOR;
2047
-
2048
-
2049
- var PromiseConstructorWrapper = getBuiltIn('Promise');
2050
-
2051
- // `Promise.resolve` method
2052
- // https://tc39.es/ecma262/#sec-promise.resolve
2053
- _export({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$5 }, {
2054
- resolve: function resolve(x) {
2055
- return promiseResolve( this, x);
2056
- }
2057
- });
2058
-
2059
1568
  var STATUS = {
2060
1569
  SUCCESS: 'SUCCESS',
2061
1570
  ERROR_PUBLISHABLE_KEY: 'ERROR_PUBLISHABLE_KEY',
@@ -2116,48 +1625,32 @@ var Navigator = /*#__PURE__*/function () {
2116
1625
  }();
2117
1626
 
2118
1627
  // `IsArray` abstract operation
2119
- // https://tc39.es/ecma262/#sec-isarray
2120
- // eslint-disable-next-line es-x/no-array-isarray -- safe
2121
- var isArray = Array.isArray || function isArray(argument) {
2122
- return classofRaw(argument) == 'Array';
2123
- };
2124
-
2125
- var $TypeError$c = TypeError;
2126
- var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2127
-
2128
- var doesNotExceedSafeInteger = function (it) {
2129
- if (it > MAX_SAFE_INTEGER) throw $TypeError$c('Maximum allowed index exceeded');
2130
- return it;
1628
+ // https://tc39.github.io/ecma262/#sec-isarray
1629
+ var isArray = Array.isArray || function isArray(arg) {
1630
+ return classofRaw(arg) == 'Array';
2131
1631
  };
2132
1632
 
2133
1633
  var createProperty = function (object, key, value) {
2134
- var propertyKey = toPropertyKey(key);
1634
+ var propertyKey = toPrimitive(key);
2135
1635
  if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
2136
1636
  else object[propertyKey] = value;
2137
1637
  };
2138
1638
 
2139
1639
  var SPECIES$3 = wellKnownSymbol('species');
2140
- var $Array = Array;
2141
1640
 
2142
- // a part of `ArraySpeciesCreate` abstract operation
2143
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2144
- var arraySpeciesConstructor = function (originalArray) {
1641
+ // `ArraySpeciesCreate` abstract operation
1642
+ // https://tc39.github.io/ecma262/#sec-arrayspeciescreate
1643
+ var arraySpeciesCreate = function (originalArray, length) {
2145
1644
  var C;
2146
1645
  if (isArray(originalArray)) {
2147
1646
  C = originalArray.constructor;
2148
1647
  // cross-realm fallback
2149
- if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
1648
+ if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
2150
1649
  else if (isObject(C)) {
2151
1650
  C = C[SPECIES$3];
2152
1651
  if (C === null) C = undefined;
2153
1652
  }
2154
- } return C === undefined ? $Array : C;
2155
- };
2156
-
2157
- // `ArraySpeciesCreate` abstract operation
2158
- // https://tc39.es/ecma262/#sec-arrayspeciescreate
2159
- var arraySpeciesCreate = function (originalArray, length) {
2160
- return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1653
+ } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
2161
1654
  };
2162
1655
 
2163
1656
  var SPECIES$4 = wellKnownSymbol('species');
@@ -2177,6 +1670,8 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
2177
1670
  };
2178
1671
 
2179
1672
  var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1673
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1674
+ var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
2180
1675
 
2181
1676
  // We can't use this feature detection in V8 since it causes
2182
1677
  // deoptimization and serious performance degradation
@@ -2195,14 +1690,13 @@ var isConcatSpreadable = function (O) {
2195
1690
  return spreadable !== undefined ? !!spreadable : isArray(O);
2196
1691
  };
2197
1692
 
2198
- var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
1693
+ var FORCED$1 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
2199
1694
 
2200
1695
  // `Array.prototype.concat` method
2201
- // https://tc39.es/ecma262/#sec-array.prototype.concat
1696
+ // https://tc39.github.io/ecma262/#sec-array.prototype.concat
2202
1697
  // with adding support of @@isConcatSpreadable and @@species
2203
- _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2204
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2205
- concat: function concat(arg) {
1698
+ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
1699
+ concat: function concat(arg) { // eslint-disable-line no-unused-vars
2206
1700
  var O = toObject(this);
2207
1701
  var A = arraySpeciesCreate(O, 0);
2208
1702
  var n = 0;
@@ -2210,11 +1704,11 @@ _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
2210
1704
  for (i = -1, length = arguments.length; i < length; i++) {
2211
1705
  E = i === -1 ? O : arguments[i];
2212
1706
  if (isConcatSpreadable(E)) {
2213
- len = lengthOfArrayLike(E);
2214
- doesNotExceedSafeInteger(n + len);
1707
+ len = toLength(E.length);
1708
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
2215
1709
  for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
2216
1710
  } else {
2217
- doesNotExceedSafeInteger(n + 1);
1711
+ if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
2218
1712
  createProperty(A, n++, E);
2219
1713
  }
2220
1714
  }
@@ -2954,25 +2448,24 @@ try {
2954
2448
  }
2955
2449
  });
2956
2450
 
2957
- var push$1 = functionUncurryThis([].push);
2451
+ var push = [].push;
2958
2452
 
2959
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2453
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
2960
2454
  var createMethod$2 = function (TYPE) {
2961
2455
  var IS_MAP = TYPE == 1;
2962
2456
  var IS_FILTER = TYPE == 2;
2963
2457
  var IS_SOME = TYPE == 3;
2964
2458
  var IS_EVERY = TYPE == 4;
2965
2459
  var IS_FIND_INDEX = TYPE == 6;
2966
- var IS_FILTER_REJECT = TYPE == 7;
2967
2460
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
2968
2461
  return function ($this, callbackfn, that, specificCreate) {
2969
2462
  var O = toObject($this);
2970
2463
  var self = indexedObject(O);
2971
- var boundFunction = functionBindContext(callbackfn, that);
2972
- var length = lengthOfArrayLike(self);
2464
+ var boundFunction = functionBindContext(callbackfn, that, 3);
2465
+ var length = toLength(self.length);
2973
2466
  var index = 0;
2974
2467
  var create = specificCreate || arraySpeciesCreate;
2975
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
2468
+ var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
2976
2469
  var value, result;
2977
2470
  for (;length > index; index++) if (NO_HOLES || index in self) {
2978
2471
  value = self[index];
@@ -2983,11 +2476,8 @@ var createMethod$2 = function (TYPE) {
2983
2476
  case 3: return true; // some
2984
2477
  case 5: return value; // find
2985
2478
  case 6: return index; // findIndex
2986
- case 2: push$1(target, value); // filter
2987
- } else switch (TYPE) {
2988
- case 4: return false; // every
2989
- case 7: push$1(target, value); // filterReject
2990
- }
2479
+ case 2: push.call(target, value); // filter
2480
+ } else if (IS_EVERY) return false; // every
2991
2481
  }
2992
2482
  }
2993
2483
  return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
@@ -2996,80 +2486,104 @@ var createMethod$2 = function (TYPE) {
2996
2486
 
2997
2487
  var arrayIteration = {
2998
2488
  // `Array.prototype.forEach` method
2999
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
2489
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
3000
2490
  forEach: createMethod$2(0),
3001
2491
  // `Array.prototype.map` method
3002
- // https://tc39.es/ecma262/#sec-array.prototype.map
2492
+ // https://tc39.github.io/ecma262/#sec-array.prototype.map
3003
2493
  map: createMethod$2(1),
3004
2494
  // `Array.prototype.filter` method
3005
- // https://tc39.es/ecma262/#sec-array.prototype.filter
2495
+ // https://tc39.github.io/ecma262/#sec-array.prototype.filter
3006
2496
  filter: createMethod$2(2),
3007
2497
  // `Array.prototype.some` method
3008
- // https://tc39.es/ecma262/#sec-array.prototype.some
2498
+ // https://tc39.github.io/ecma262/#sec-array.prototype.some
3009
2499
  some: createMethod$2(3),
3010
2500
  // `Array.prototype.every` method
3011
- // https://tc39.es/ecma262/#sec-array.prototype.every
2501
+ // https://tc39.github.io/ecma262/#sec-array.prototype.every
3012
2502
  every: createMethod$2(4),
3013
2503
  // `Array.prototype.find` method
3014
- // https://tc39.es/ecma262/#sec-array.prototype.find
2504
+ // https://tc39.github.io/ecma262/#sec-array.prototype.find
3015
2505
  find: createMethod$2(5),
3016
2506
  // `Array.prototype.findIndex` method
3017
- // https://tc39.es/ecma262/#sec-array.prototype.findIndex
3018
- findIndex: createMethod$2(6),
3019
- // `Array.prototype.filterReject` method
3020
- // https://github.com/tc39/proposal-array-filtering
3021
- filterReject: createMethod$2(7)
2507
+ // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
2508
+ findIndex: createMethod$2(6)
3022
2509
  };
3023
2510
 
3024
2511
  var arrayMethodIsStrict = function (METHOD_NAME, argument) {
3025
2512
  var method = [][METHOD_NAME];
3026
2513
  return !!method && fails(function () {
3027
- // eslint-disable-next-line no-useless-call -- required for testing
3028
- method.call(null, argument || function () { return 1; }, 1);
2514
+ // eslint-disable-next-line no-useless-call,no-throw-literal
2515
+ method.call(null, argument || function () { throw 1; }, 1);
2516
+ });
2517
+ };
2518
+
2519
+ var defineProperty$1 = Object.defineProperty;
2520
+ var cache = {};
2521
+
2522
+ var thrower = function (it) { throw it; };
2523
+
2524
+ var arrayMethodUsesToLength = function (METHOD_NAME, options) {
2525
+ if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
2526
+ if (!options) options = {};
2527
+ var method = [][METHOD_NAME];
2528
+ var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
2529
+ var argument0 = has(options, 0) ? options[0] : thrower;
2530
+ var argument1 = has(options, 1) ? options[1] : undefined;
2531
+
2532
+ return cache[METHOD_NAME] = !!method && !fails(function () {
2533
+ if (ACCESSORS && !descriptors) return true;
2534
+ var O = { length: -1 };
2535
+
2536
+ if (ACCESSORS) defineProperty$1(O, 1, { enumerable: true, get: thrower });
2537
+ else O[1] = 1;
2538
+
2539
+ method.call(O, argument0, argument1);
3029
2540
  });
3030
2541
  };
3031
2542
 
3032
2543
  var $forEach = arrayIteration.forEach;
3033
2544
 
3034
2545
 
2546
+
3035
2547
  var STRICT_METHOD = arrayMethodIsStrict('forEach');
2548
+ var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
3036
2549
 
3037
2550
  // `Array.prototype.forEach` method implementation
3038
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
3039
- var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
2551
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
2552
+ var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
3040
2553
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3041
- // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
3042
2554
  } : [].forEach;
3043
2555
 
3044
2556
  // `Array.prototype.forEach` method
3045
- // https://tc39.es/ecma262/#sec-array.prototype.foreach
3046
- // eslint-disable-next-line es-x/no-array-prototype-foreach -- safe
2557
+ // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
3047
2558
  _export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
3048
2559
  forEach: arrayForEach
3049
2560
  });
3050
2561
 
3051
- var un$Join = functionUncurryThis([].join);
2562
+ var nativeJoin = [].join;
3052
2563
 
3053
2564
  var ES3_STRINGS = indexedObject != Object;
3054
2565
  var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
3055
2566
 
3056
2567
  // `Array.prototype.join` method
3057
- // https://tc39.es/ecma262/#sec-array.prototype.join
2568
+ // https://tc39.github.io/ecma262/#sec-array.prototype.join
3058
2569
  _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
3059
2570
  join: function join(separator) {
3060
- return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
2571
+ return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
3061
2572
  }
3062
2573
  });
3063
2574
 
3064
2575
  var $map = arrayIteration.map;
3065
2576
 
3066
2577
 
2578
+
3067
2579
  var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
2580
+ // FF49- issue
2581
+ var USES_TO_LENGTH$1 = arrayMethodUsesToLength('map');
3068
2582
 
3069
2583
  // `Array.prototype.map` method
3070
- // https://tc39.es/ecma262/#sec-array.prototype.map
2584
+ // https://tc39.github.io/ecma262/#sec-array.prototype.map
3071
2585
  // with adding support of @@species
3072
- _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
2586
+ _export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH$1 }, {
3073
2587
  map: function map(callbackfn /* , thisArg */) {
3074
2588
  return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
3075
2589
  }
@@ -3111,31 +2625,17 @@ var domIterables = {
3111
2625
  TouchList: 0
3112
2626
  };
3113
2627
 
3114
- // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
3115
-
3116
-
3117
- var classList = documentCreateElement('span').classList;
3118
- var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
3119
-
3120
- var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
3121
-
3122
- var handlePrototype = function (CollectionPrototype) {
2628
+ for (var COLLECTION_NAME in domIterables) {
2629
+ var Collection = global_1[COLLECTION_NAME];
2630
+ var CollectionPrototype = Collection && Collection.prototype;
3123
2631
  // some Chrome versions have non-configurable methods on DOMTokenList
3124
2632
  if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
3125
2633
  createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
3126
2634
  } catch (error) {
3127
2635
  CollectionPrototype.forEach = arrayForEach;
3128
2636
  }
3129
- };
3130
-
3131
- for (var COLLECTION_NAME in domIterables) {
3132
- if (domIterables[COLLECTION_NAME]) {
3133
- handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
3134
- }
3135
2637
  }
3136
2638
 
3137
- handlePrototype(domTokenListPrototype);
3138
-
3139
2639
  var Storage = /*#__PURE__*/function () {
3140
2640
  function Storage() {
3141
2641
  _classCallCheck(this, Storage);
@@ -3274,7 +2774,7 @@ var API_HOST = /*#__PURE__*/function () {
3274
2774
  return API_HOST;
3275
2775
  }();
3276
2776
 
3277
- var SDK_VERSION = '3.3.0-beta.1';
2777
+ var SDK_VERSION = '3.3.0';
3278
2778
 
3279
2779
  var Http = /*#__PURE__*/function () {
3280
2780
  function Http() {
@@ -3967,235 +3467,86 @@ var Search = /*#__PURE__*/function () {
3967
3467
  }();
3968
3468
 
3969
3469
  // `RegExp.prototype.flags` getter implementation
3970
- // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
3470
+ // https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
3971
3471
  var regexpFlags = function () {
3972
3472
  var that = anObject(this);
3973
3473
  var result = '';
3974
- if (that.hasIndices) result += 'd';
3975
3474
  if (that.global) result += 'g';
3976
3475
  if (that.ignoreCase) result += 'i';
3977
3476
  if (that.multiline) result += 'm';
3978
3477
  if (that.dotAll) result += 's';
3979
3478
  if (that.unicode) result += 'u';
3980
- if (that.unicodeSets) result += 'v';
3981
3479
  if (that.sticky) result += 'y';
3982
3480
  return result;
3983
3481
  };
3984
3482
 
3985
- // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
3986
- var $RegExp = global_1.RegExp;
3483
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
3484
+ // so we use an intermediate function.
3485
+ function RE(s, f) {
3486
+ return RegExp(s, f);
3487
+ }
3987
3488
 
3988
3489
  var UNSUPPORTED_Y = fails(function () {
3989
- var re = $RegExp('a', 'y');
3490
+ // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
3491
+ var re = RE('a', 'y');
3990
3492
  re.lastIndex = 2;
3991
3493
  return re.exec('abcd') != null;
3992
3494
  });
3993
3495
 
3994
- // UC Browser bug
3995
- // https://github.com/zloirock/core-js/issues/1008
3996
- var MISSED_STICKY = UNSUPPORTED_Y || fails(function () {
3997
- return !$RegExp('a', 'y').sticky;
3998
- });
3999
-
4000
- var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
3496
+ var BROKEN_CARET = fails(function () {
4001
3497
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
4002
- var re = $RegExp('^r', 'gy');
3498
+ var re = RE('^r', 'gy');
4003
3499
  re.lastIndex = 2;
4004
3500
  return re.exec('str') != null;
4005
3501
  });
4006
3502
 
4007
3503
  var regexpStickyHelpers = {
4008
- BROKEN_CARET: BROKEN_CARET,
4009
- MISSED_STICKY: MISSED_STICKY,
4010
- UNSUPPORTED_Y: UNSUPPORTED_Y
4011
- };
4012
-
4013
- // `Object.defineProperties` method
4014
- // https://tc39.es/ecma262/#sec-object.defineproperties
4015
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
4016
- var f$6 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
4017
- anObject(O);
4018
- var props = toIndexedObject(Properties);
4019
- var keys = objectKeys(Properties);
4020
- var length = keys.length;
4021
- var index = 0;
4022
- var key;
4023
- while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
4024
- return O;
4025
- };
4026
-
4027
- var objectDefineProperties = {
4028
- f: f$6
4029
- };
4030
-
4031
- /* global ActiveXObject -- old IE, WSH */
4032
-
4033
-
4034
-
4035
-
4036
-
4037
-
4038
-
4039
-
4040
- var GT = '>';
4041
- var LT = '<';
4042
- var PROTOTYPE = 'prototype';
4043
- var SCRIPT = 'script';
4044
- var IE_PROTO = sharedKey('IE_PROTO');
4045
-
4046
- var EmptyConstructor = function () { /* empty */ };
4047
-
4048
- var scriptTag = function (content) {
4049
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
4050
- };
4051
-
4052
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
4053
- var NullProtoObjectViaActiveX = function (activeXDocument) {
4054
- activeXDocument.write(scriptTag(''));
4055
- activeXDocument.close();
4056
- var temp = activeXDocument.parentWindow.Object;
4057
- activeXDocument = null; // avoid memory leak
4058
- return temp;
4059
- };
4060
-
4061
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
4062
- var NullProtoObjectViaIFrame = function () {
4063
- // Thrash, waste and sodomy: IE GC bug
4064
- var iframe = documentCreateElement('iframe');
4065
- var JS = 'java' + SCRIPT + ':';
4066
- var iframeDocument;
4067
- iframe.style.display = 'none';
4068
- html.appendChild(iframe);
4069
- // https://github.com/zloirock/core-js/issues/475
4070
- iframe.src = String(JS);
4071
- iframeDocument = iframe.contentWindow.document;
4072
- iframeDocument.open();
4073
- iframeDocument.write(scriptTag('document.F=Object'));
4074
- iframeDocument.close();
4075
- return iframeDocument.F;
4076
- };
4077
-
4078
- // Check for document.domain and active x support
4079
- // No need to use active x approach when document.domain is not set
4080
- // see https://github.com/es-shims/es5-shim/issues/150
4081
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
4082
- // avoid IE GC bug
4083
- var activeXDocument;
4084
- var NullProtoObject = function () {
4085
- try {
4086
- activeXDocument = new ActiveXObject('htmlfile');
4087
- } catch (error) { /* ignore */ }
4088
- NullProtoObject = typeof document != 'undefined'
4089
- ? document.domain && activeXDocument
4090
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
4091
- : NullProtoObjectViaIFrame()
4092
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
4093
- var length = enumBugKeys.length;
4094
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
4095
- return NullProtoObject();
4096
- };
4097
-
4098
- hiddenKeys[IE_PROTO] = true;
4099
-
4100
- // `Object.create` method
4101
- // https://tc39.es/ecma262/#sec-object.create
4102
- // eslint-disable-next-line es-x/no-object-create -- safe
4103
- var objectCreate = Object.create || function create(O, Properties) {
4104
- var result;
4105
- if (O !== null) {
4106
- EmptyConstructor[PROTOTYPE] = anObject(O);
4107
- result = new EmptyConstructor();
4108
- EmptyConstructor[PROTOTYPE] = null;
4109
- // add "__proto__" for Object.getPrototypeOf polyfill
4110
- result[IE_PROTO] = O;
4111
- } else result = NullProtoObject();
4112
- return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
3504
+ UNSUPPORTED_Y: UNSUPPORTED_Y,
3505
+ BROKEN_CARET: BROKEN_CARET
4113
3506
  };
4114
3507
 
4115
- // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
4116
- var $RegExp$1 = global_1.RegExp;
4117
-
4118
- var regexpUnsupportedDotAll = fails(function () {
4119
- var re = $RegExp$1('.', 's');
4120
- return !(re.dotAll && re.exec('\n') && re.flags === 's');
4121
- });
4122
-
4123
- // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
4124
- var $RegExp$2 = global_1.RegExp;
4125
-
4126
- var regexpUnsupportedNcg = fails(function () {
4127
- var re = $RegExp$2('(?<a>b)', 'g');
4128
- return re.exec('b').groups.a !== 'b' ||
4129
- 'b'.replace(re, '$<a>c') !== 'bc';
4130
- });
4131
-
4132
- /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
4133
- /* eslint-disable regexp/no-useless-quantifier -- testing */
4134
-
4135
-
4136
-
4137
-
4138
-
4139
-
4140
-
4141
- var getInternalState = internalState.get;
4142
-
4143
-
4144
-
4145
- var nativeReplace = shared('native-string-replace', String.prototype.replace);
4146
3508
  var nativeExec = RegExp.prototype.exec;
3509
+ // This always refers to the native implementation, because the
3510
+ // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
3511
+ // which loads this file before patching the method.
3512
+ var nativeReplace = String.prototype.replace;
3513
+
4147
3514
  var patchedExec = nativeExec;
4148
- var charAt = functionUncurryThis(''.charAt);
4149
- var indexOf$1 = functionUncurryThis(''.indexOf);
4150
- var replace$1 = functionUncurryThis(''.replace);
4151
- var stringSlice$1 = functionUncurryThis(''.slice);
4152
3515
 
4153
3516
  var UPDATES_LAST_INDEX_WRONG = (function () {
4154
3517
  var re1 = /a/;
4155
3518
  var re2 = /b*/g;
4156
- functionCall(nativeExec, re1, 'a');
4157
- functionCall(nativeExec, re2, 'a');
3519
+ nativeExec.call(re1, 'a');
3520
+ nativeExec.call(re2, 'a');
4158
3521
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
4159
3522
  })();
4160
3523
 
4161
- var UNSUPPORTED_Y$1 = regexpStickyHelpers.BROKEN_CARET;
3524
+ var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
4162
3525
 
4163
3526
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
4164
3527
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
4165
3528
 
4166
- var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
3529
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1;
4167
3530
 
4168
3531
  if (PATCH) {
4169
- patchedExec = function exec(string) {
3532
+ patchedExec = function exec(str) {
4170
3533
  var re = this;
4171
- var state = getInternalState(re);
4172
- var str = toString_1(string);
4173
- var raw = state.raw;
4174
- var result, reCopy, lastIndex, match, i, object, group;
4175
-
4176
- if (raw) {
4177
- raw.lastIndex = re.lastIndex;
4178
- result = functionCall(patchedExec, raw, str);
4179
- re.lastIndex = raw.lastIndex;
4180
- return result;
4181
- }
4182
-
4183
- var groups = state.groups;
3534
+ var lastIndex, reCopy, match, i;
4184
3535
  var sticky = UNSUPPORTED_Y$1 && re.sticky;
4185
- var flags = functionCall(regexpFlags, re);
3536
+ var flags = regexpFlags.call(re);
4186
3537
  var source = re.source;
4187
3538
  var charsAdded = 0;
4188
3539
  var strCopy = str;
4189
3540
 
4190
3541
  if (sticky) {
4191
- flags = replace$1(flags, 'y', '');
4192
- if (indexOf$1(flags, 'g') === -1) {
3542
+ flags = flags.replace('y', '');
3543
+ if (flags.indexOf('g') === -1) {
4193
3544
  flags += 'g';
4194
3545
  }
4195
3546
 
4196
- strCopy = stringSlice$1(str, re.lastIndex);
3547
+ strCopy = String(str).slice(re.lastIndex);
4197
3548
  // Support anchored sticky behavior.
4198
- if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
3549
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
4199
3550
  source = '(?: ' + source + ')';
4200
3551
  strCopy = ' ' + strCopy;
4201
3552
  charsAdded++;
@@ -4210,12 +3561,12 @@ if (PATCH) {
4210
3561
  }
4211
3562
  if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
4212
3563
 
4213
- match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
3564
+ match = nativeExec.call(sticky ? reCopy : re, strCopy);
4214
3565
 
4215
3566
  if (sticky) {
4216
3567
  if (match) {
4217
- match.input = stringSlice$1(match.input, charsAdded);
4218
- match[0] = stringSlice$1(match[0], charsAdded);
3568
+ match.input = match.input.slice(charsAdded);
3569
+ match[0] = match[0].slice(charsAdded);
4219
3570
  match.index = re.lastIndex;
4220
3571
  re.lastIndex += match[0].length;
4221
3572
  } else re.lastIndex = 0;
@@ -4225,64 +3576,40 @@ if (PATCH) {
4225
3576
  if (NPCG_INCLUDED && match && match.length > 1) {
4226
3577
  // Fix browsers whose `exec` methods don't consistently return `undefined`
4227
3578
  // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
4228
- functionCall(nativeReplace, match[0], reCopy, function () {
3579
+ nativeReplace.call(match[0], reCopy, function () {
4229
3580
  for (i = 1; i < arguments.length - 2; i++) {
4230
3581
  if (arguments[i] === undefined) match[i] = undefined;
4231
3582
  }
4232
3583
  });
4233
3584
  }
4234
3585
 
4235
- if (match && groups) {
4236
- match.groups = object = objectCreate(null);
4237
- for (i = 0; i < groups.length; i++) {
4238
- group = groups[i];
4239
- object[group[0]] = match[group[1]];
4240
- }
4241
- }
4242
-
4243
3586
  return match;
4244
3587
  };
4245
3588
  }
4246
3589
 
4247
3590
  var regexpExec = patchedExec;
4248
3591
 
4249
- // `RegExp.prototype.exec` method
4250
- // https://tc39.es/ecma262/#sec-regexp.prototype.exec
4251
3592
  _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
4252
3593
  exec: regexpExec
4253
3594
  });
4254
3595
 
4255
- var RegExpPrototype = RegExp.prototype;
4256
-
4257
- var regexpGetFlags = function (R) {
4258
- var flags = R.flags;
4259
- return flags === undefined && !('flags' in RegExpPrototype) && !hasOwnProperty_1(R, 'flags') && objectIsPrototypeOf(RegExpPrototype, R)
4260
- ? functionCall(regexpFlags, R) : flags;
4261
- };
4262
-
4263
- var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
4264
-
4265
-
4266
-
4267
-
4268
-
4269
-
4270
3596
  var TO_STRING = 'toString';
4271
- var RegExpPrototype$1 = RegExp.prototype;
4272
- var n$ToString = RegExpPrototype$1[TO_STRING];
3597
+ var RegExpPrototype = RegExp.prototype;
3598
+ var nativeToString = RegExpPrototype[TO_STRING];
4273
3599
 
4274
- var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
3600
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
4275
3601
  // FF44- RegExp#toString has a wrong name
4276
- var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && n$ToString.name != TO_STRING;
3602
+ var INCORRECT_NAME = nativeToString.name != TO_STRING;
4277
3603
 
4278
3604
  // `RegExp.prototype.toString` method
4279
- // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
3605
+ // https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
4280
3606
  if (NOT_GENERIC || INCORRECT_NAME) {
4281
- defineBuiltIn(RegExp.prototype, TO_STRING, function toString() {
3607
+ redefine(RegExp.prototype, TO_STRING, function toString() {
4282
3608
  var R = anObject(this);
4283
- var pattern = toString_1(R.source);
4284
- var flags = toString_1(regexpGetFlags(R));
4285
- return '/' + pattern + '/' + flags;
3609
+ var p = String(R.source);
3610
+ var rf = R.flags;
3611
+ var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? regexpFlags.call(R) : rf);
3612
+ return '/' + p + '/' + f;
4286
3613
  }, { unsafe: true });
4287
3614
  }
4288
3615
 
@@ -4294,11 +3621,47 @@ if (NOT_GENERIC || INCORRECT_NAME) {
4294
3621
 
4295
3622
 
4296
3623
 
4297
-
4298
3624
  var SPECIES$5 = wellKnownSymbol('species');
4299
- var RegExpPrototype$2 = RegExp.prototype;
4300
3625
 
4301
- var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
3626
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
3627
+ // #replace needs built-in support for named groups.
3628
+ // #match works fine because it just return the exec results, even if it has
3629
+ // a "grops" property.
3630
+ var re = /./;
3631
+ re.exec = function () {
3632
+ var result = [];
3633
+ result.groups = { a: '7' };
3634
+ return result;
3635
+ };
3636
+ return ''.replace(re, '$<a>') !== '7';
3637
+ });
3638
+
3639
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
3640
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
3641
+ var REPLACE_KEEPS_$0 = (function () {
3642
+ return 'a'.replace(/./, '$0') === '$0';
3643
+ })();
3644
+
3645
+ var REPLACE = wellKnownSymbol('replace');
3646
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
3647
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
3648
+ if (/./[REPLACE]) {
3649
+ return /./[REPLACE]('a', '$0') === '';
3650
+ }
3651
+ return false;
3652
+ })();
3653
+
3654
+ // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
3655
+ // Weex JS has frozen built-in prototypes, so use try / catch wrapper
3656
+ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
3657
+ var re = /(?:)/;
3658
+ var originalExec = re.exec;
3659
+ re.exec = function () { return originalExec.apply(this, arguments); };
3660
+ var result = 'ab'.split(re);
3661
+ return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
3662
+ });
3663
+
3664
+ var fixRegexpWellKnownSymbolLogic = function (KEY, length, exec, sham) {
4302
3665
  var SYMBOL = wellKnownSymbol(KEY);
4303
3666
 
4304
3667
  var DELEGATES_TO_SYMBOL = !fails(function () {
@@ -4335,197 +3698,140 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
4335
3698
  if (
4336
3699
  !DELEGATES_TO_SYMBOL ||
4337
3700
  !DELEGATES_TO_EXEC ||
4338
- FORCED
3701
+ (KEY === 'replace' && !(
3702
+ REPLACE_SUPPORTS_NAMED_GROUPS &&
3703
+ REPLACE_KEEPS_$0 &&
3704
+ !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
3705
+ )) ||
3706
+ (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
4339
3707
  ) {
4340
- var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
3708
+ var nativeRegExpMethod = /./[SYMBOL];
4341
3709
  var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
4342
- var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
4343
- var $exec = regexp.exec;
4344
- if ($exec === regexpExec || $exec === RegExpPrototype$2.exec) {
3710
+ if (regexp.exec === regexpExec) {
4345
3711
  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
4346
3712
  // The native String method already delegates to @@method (this
4347
3713
  // polyfilled function), leasing to infinite recursion.
4348
3714
  // We avoid it by directly calling the native @@method method.
4349
- return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
3715
+ return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
4350
3716
  }
4351
- return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
3717
+ return { done: true, value: nativeMethod.call(str, regexp, arg2) };
4352
3718
  }
4353
3719
  return { done: false };
3720
+ }, {
3721
+ REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
3722
+ REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
4354
3723
  });
4355
-
4356
- defineBuiltIn(String.prototype, KEY, methods[0]);
4357
- defineBuiltIn(RegExpPrototype$2, SYMBOL, methods[1]);
3724
+ var stringMethod = methods[0];
3725
+ var regexMethod = methods[1];
3726
+
3727
+ redefine(String.prototype, KEY, stringMethod);
3728
+ redefine(RegExp.prototype, SYMBOL, length == 2
3729
+ // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
3730
+ // 21.2.5.11 RegExp.prototype[@@split](string, limit)
3731
+ ? function (string, arg) { return regexMethod.call(string, this, arg); }
3732
+ // 21.2.5.6 RegExp.prototype[@@match](string)
3733
+ // 21.2.5.9 RegExp.prototype[@@search](string)
3734
+ : function (string) { return regexMethod.call(string, this); }
3735
+ );
4358
3736
  }
4359
3737
 
4360
- if (SHAM) createNonEnumerableProperty(RegExpPrototype$2[SYMBOL], 'sham', true);
3738
+ if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
4361
3739
  };
4362
3740
 
4363
- var charAt$1 = functionUncurryThis(''.charAt);
4364
- var charCodeAt = functionUncurryThis(''.charCodeAt);
4365
- var stringSlice$2 = functionUncurryThis(''.slice);
4366
-
3741
+ // `String.prototype.{ codePointAt, at }` methods implementation
4367
3742
  var createMethod$3 = function (CONVERT_TO_STRING) {
4368
3743
  return function ($this, pos) {
4369
- var S = toString_1(requireObjectCoercible($this));
4370
- var position = toIntegerOrInfinity(pos);
3744
+ var S = String(requireObjectCoercible($this));
3745
+ var position = toInteger(pos);
4371
3746
  var size = S.length;
4372
3747
  var first, second;
4373
3748
  if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
4374
- first = charCodeAt(S, position);
3749
+ first = S.charCodeAt(position);
4375
3750
  return first < 0xD800 || first > 0xDBFF || position + 1 === size
4376
- || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
4377
- ? CONVERT_TO_STRING
4378
- ? charAt$1(S, position)
4379
- : first
4380
- : CONVERT_TO_STRING
4381
- ? stringSlice$2(S, position, position + 2)
4382
- : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
3751
+ || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
3752
+ ? CONVERT_TO_STRING ? S.charAt(position) : first
3753
+ : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
4383
3754
  };
4384
3755
  };
4385
3756
 
4386
3757
  var stringMultibyte = {
4387
3758
  // `String.prototype.codePointAt` method
4388
- // https://tc39.es/ecma262/#sec-string.prototype.codepointat
3759
+ // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
4389
3760
  codeAt: createMethod$3(false),
4390
3761
  // `String.prototype.at` method
4391
3762
  // https://github.com/mathiasbynens/String.prototype.at
4392
3763
  charAt: createMethod$3(true)
4393
3764
  };
4394
3765
 
4395
- var charAt$2 = stringMultibyte.charAt;
3766
+ var charAt = stringMultibyte.charAt;
4396
3767
 
4397
3768
  // `AdvanceStringIndex` abstract operation
4398
- // https://tc39.es/ecma262/#sec-advancestringindex
3769
+ // https://tc39.github.io/ecma262/#sec-advancestringindex
4399
3770
  var advanceStringIndex = function (S, index, unicode) {
4400
- return index + (unicode ? charAt$2(S, index).length : 1);
4401
- };
4402
-
4403
- var floor$1 = Math.floor;
4404
- var charAt$3 = functionUncurryThis(''.charAt);
4405
- var replace$2 = functionUncurryThis(''.replace);
4406
- var stringSlice$3 = functionUncurryThis(''.slice);
4407
- var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
4408
- var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
4409
-
4410
- // `GetSubstitution` abstract operation
4411
- // https://tc39.es/ecma262/#sec-getsubstitution
4412
- var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
4413
- var tailPos = position + matched.length;
4414
- var m = captures.length;
4415
- var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
4416
- if (namedCaptures !== undefined) {
4417
- namedCaptures = toObject(namedCaptures);
4418
- symbols = SUBSTITUTION_SYMBOLS;
4419
- }
4420
- return replace$2(replacement, symbols, function (match, ch) {
4421
- var capture;
4422
- switch (charAt$3(ch, 0)) {
4423
- case '$': return '$';
4424
- case '&': return matched;
4425
- case '`': return stringSlice$3(str, 0, position);
4426
- case "'": return stringSlice$3(str, tailPos);
4427
- case '<':
4428
- capture = namedCaptures[stringSlice$3(ch, 1, -1)];
4429
- break;
4430
- default: // \d\d?
4431
- var n = +ch;
4432
- if (n === 0) return match;
4433
- if (n > m) {
4434
- var f = floor$1(n / 10);
4435
- if (f === 0) return match;
4436
- if (f <= m) return captures[f - 1] === undefined ? charAt$3(ch, 1) : captures[f - 1] + charAt$3(ch, 1);
4437
- return match;
4438
- }
4439
- capture = captures[n - 1];
4440
- }
4441
- return capture === undefined ? '' : capture;
4442
- });
3771
+ return index + (unicode ? charAt(S, index).length : 1);
4443
3772
  };
4444
3773
 
4445
- var $TypeError$d = TypeError;
4446
-
4447
3774
  // `RegExpExec` abstract operation
4448
- // https://tc39.es/ecma262/#sec-regexpexec
3775
+ // https://tc39.github.io/ecma262/#sec-regexpexec
4449
3776
  var regexpExecAbstract = function (R, S) {
4450
3777
  var exec = R.exec;
4451
- if (isCallable(exec)) {
4452
- var result = functionCall(exec, R, S);
4453
- if (result !== null) anObject(result);
3778
+ if (typeof exec === 'function') {
3779
+ var result = exec.call(R, S);
3780
+ if (typeof result !== 'object') {
3781
+ throw TypeError('RegExp exec method returned something other than an Object or null');
3782
+ }
4454
3783
  return result;
4455
3784
  }
4456
- if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
4457
- throw $TypeError$d('RegExp#exec called on incompatible receiver');
3785
+
3786
+ if (classofRaw(R) !== 'RegExp') {
3787
+ throw TypeError('RegExp#exec called on incompatible receiver');
3788
+ }
3789
+
3790
+ return regexpExec.call(R, S);
4458
3791
  };
4459
3792
 
4460
- var REPLACE = wellKnownSymbol('replace');
4461
3793
  var max$1 = Math.max;
4462
3794
  var min$2 = Math.min;
4463
- var concat$1 = functionUncurryThis([].concat);
4464
- var push$2 = functionUncurryThis([].push);
4465
- var stringIndexOf = functionUncurryThis(''.indexOf);
4466
- var stringSlice$4 = functionUncurryThis(''.slice);
3795
+ var floor$1 = Math.floor;
3796
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
3797
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
4467
3798
 
4468
3799
  var maybeToString = function (it) {
4469
3800
  return it === undefined ? it : String(it);
4470
3801
  };
4471
3802
 
4472
- // IE <= 11 replaces $0 with the whole match, as if it was $&
4473
- // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
4474
- var REPLACE_KEEPS_$0 = (function () {
4475
- // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
4476
- return 'a'.replace(/./, '$0') === '$0';
4477
- })();
4478
-
4479
- // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
4480
- var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
4481
- if (/./[REPLACE]) {
4482
- return /./[REPLACE]('a', '$0') === '';
4483
- }
4484
- return false;
4485
- })();
4486
-
4487
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
4488
- var re = /./;
4489
- re.exec = function () {
4490
- var result = [];
4491
- result.groups = { a: '7' };
4492
- return result;
4493
- };
4494
- // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
4495
- return ''.replace(re, '$<a>') !== '7';
4496
- });
4497
-
4498
3803
  // @@replace logic
4499
- fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
3804
+ fixRegexpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
3805
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
3806
+ var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
4500
3807
  var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
4501
3808
 
4502
3809
  return [
4503
3810
  // `String.prototype.replace` method
4504
- // https://tc39.es/ecma262/#sec-string.prototype.replace
3811
+ // https://tc39.github.io/ecma262/#sec-string.prototype.replace
4505
3812
  function replace(searchValue, replaceValue) {
4506
3813
  var O = requireObjectCoercible(this);
4507
- var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
4508
- return replacer
4509
- ? functionCall(replacer, searchValue, O, replaceValue)
4510
- : functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
3814
+ var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
3815
+ return replacer !== undefined
3816
+ ? replacer.call(searchValue, O, replaceValue)
3817
+ : nativeReplace.call(String(O), searchValue, replaceValue);
4511
3818
  },
4512
3819
  // `RegExp.prototype[@@replace]` method
4513
- // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
4514
- function (string, replaceValue) {
4515
- var rx = anObject(this);
4516
- var S = toString_1(string);
4517
-
3820
+ // https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
3821
+ function (regexp, replaceValue) {
4518
3822
  if (
4519
- typeof replaceValue == 'string' &&
4520
- stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
4521
- stringIndexOf(replaceValue, '$<') === -1
3823
+ (!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
3824
+ (typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
4522
3825
  ) {
4523
- var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
3826
+ var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
4524
3827
  if (res.done) return res.value;
4525
3828
  }
4526
3829
 
4527
- var functionalReplace = isCallable(replaceValue);
4528
- if (!functionalReplace) replaceValue = toString_1(replaceValue);
3830
+ var rx = anObject(regexp);
3831
+ var S = String(this);
3832
+
3833
+ var functionalReplace = typeof replaceValue === 'function';
3834
+ if (!functionalReplace) replaceValue = String(replaceValue);
4529
3835
 
4530
3836
  var global = rx.global;
4531
3837
  if (global) {
@@ -4537,10 +3843,10 @@ fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
4537
3843
  var result = regexpExecAbstract(rx, S);
4538
3844
  if (result === null) break;
4539
3845
 
4540
- push$2(results, result);
3846
+ results.push(result);
4541
3847
  if (!global) break;
4542
3848
 
4543
- var matchStr = toString_1(result[0]);
3849
+ var matchStr = String(result[0]);
4544
3850
  if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
4545
3851
  }
4546
3852
 
@@ -4549,32 +3855,66 @@ fixRegexpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
4549
3855
  for (var i = 0; i < results.length; i++) {
4550
3856
  result = results[i];
4551
3857
 
4552
- var matched = toString_1(result[0]);
4553
- var position = max$1(min$2(toIntegerOrInfinity(result.index), S.length), 0);
3858
+ var matched = String(result[0]);
3859
+ var position = max$1(min$2(toInteger(result.index), S.length), 0);
4554
3860
  var captures = [];
4555
3861
  // NOTE: This is equivalent to
4556
3862
  // captures = result.slice(1).map(maybeToString)
4557
3863
  // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
4558
3864
  // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
4559
3865
  // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
4560
- for (var j = 1; j < result.length; j++) push$2(captures, maybeToString(result[j]));
3866
+ for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
4561
3867
  var namedCaptures = result.groups;
4562
3868
  if (functionalReplace) {
4563
- var replacerArgs = concat$1([matched], captures, position, S);
4564
- if (namedCaptures !== undefined) push$2(replacerArgs, namedCaptures);
4565
- var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
3869
+ var replacerArgs = [matched].concat(captures, position, S);
3870
+ if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
3871
+ var replacement = String(replaceValue.apply(undefined, replacerArgs));
4566
3872
  } else {
4567
3873
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
4568
3874
  }
4569
3875
  if (position >= nextSourcePosition) {
4570
- accumulatedResult += stringSlice$4(S, nextSourcePosition, position) + replacement;
3876
+ accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
4571
3877
  nextSourcePosition = position + matched.length;
4572
3878
  }
4573
3879
  }
4574
- return accumulatedResult + stringSlice$4(S, nextSourcePosition);
3880
+ return accumulatedResult + S.slice(nextSourcePosition);
4575
3881
  }
4576
3882
  ];
4577
- }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
3883
+
3884
+ // https://tc39.github.io/ecma262/#sec-getsubstitution
3885
+ function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
3886
+ var tailPos = position + matched.length;
3887
+ var m = captures.length;
3888
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
3889
+ if (namedCaptures !== undefined) {
3890
+ namedCaptures = toObject(namedCaptures);
3891
+ symbols = SUBSTITUTION_SYMBOLS;
3892
+ }
3893
+ return nativeReplace.call(replacement, symbols, function (match, ch) {
3894
+ var capture;
3895
+ switch (ch.charAt(0)) {
3896
+ case '$': return '$';
3897
+ case '&': return matched;
3898
+ case '`': return str.slice(0, position);
3899
+ case "'": return str.slice(tailPos);
3900
+ case '<':
3901
+ capture = namedCaptures[ch.slice(1, -1)];
3902
+ break;
3903
+ default: // \d\d?
3904
+ var n = +ch;
3905
+ if (n === 0) return match;
3906
+ if (n > m) {
3907
+ var f = floor$1(n / 10);
3908
+ if (f === 0) return match;
3909
+ if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
3910
+ return match;
3911
+ }
3912
+ capture = captures[n - 1];
3913
+ }
3914
+ return capture === undefined ? '' : capture;
3915
+ });
3916
+ }
3917
+ });
4578
3918
 
4579
3919
  var generateUUID = function generateUUID() {
4580
3920
  var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (char) {
@@ -4739,6 +4079,7 @@ var Trips = /*#__PURE__*/function () {
4739
4079
  destinationGeofenceExternalId,
4740
4080
  mode,
4741
4081
  metadata,
4082
+ approachingThreshold,
4742
4083
  params,
4743
4084
  basePath,
4744
4085
  _args = arguments;
@@ -4748,14 +4089,15 @@ var Trips = /*#__PURE__*/function () {
4748
4089
  case 0:
4749
4090
  tripOptions = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
4750
4091
  status = _args.length > 1 ? _args[1] : undefined;
4751
- externalId = tripOptions.externalId, destinationGeofenceTag = tripOptions.destinationGeofenceTag, destinationGeofenceExternalId = tripOptions.destinationGeofenceExternalId, mode = tripOptions.mode, metadata = tripOptions.metadata;
4092
+ externalId = tripOptions.externalId, destinationGeofenceTag = tripOptions.destinationGeofenceTag, destinationGeofenceExternalId = tripOptions.destinationGeofenceExternalId, mode = tripOptions.mode, metadata = tripOptions.metadata, approachingThreshold = tripOptions.approachingThreshold;
4752
4093
  params = {
4753
4094
  externalId: externalId,
4754
4095
  status: status,
4755
4096
  destinationGeofenceTag: destinationGeofenceTag,
4756
4097
  destinationGeofenceExternalId: destinationGeofenceExternalId,
4757
4098
  mode: mode,
4758
- metadata: metadata
4099
+ metadata: metadata,
4100
+ approachingThreshold: approachingThreshold
4759
4101
  };
4760
4102
  basePath = Storage.getItem(Storage.BASE_API_PATH) || 'v1';
4761
4103
  return _context.abrupt("return", Http.request('PATCH', "".concat(basePath, "/trips/").concat(externalId), params));
@@ -4983,8 +4325,7 @@ var Radar = /*#__PURE__*/function () {
4983
4325
  var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultCallback;
4984
4326
  var tripOptions = Radar.getTripOptions();
4985
4327
  Trips.updateTrip(tripOptions, TRIP_STATUS.COMPLETED).then(function (response) {
4986
- // clear tripOptions
4987
- Storage.removeItem(Storage.TRIP_OPTIONS);
4328
+ Radar.clearTripOptions();
4988
4329
  callback(null, {
4989
4330
  trip: response.trip,
4990
4331
  events: response.events,
@@ -4998,8 +4339,7 @@ var Radar = /*#__PURE__*/function () {
4998
4339
  var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultCallback;
4999
4340
  var tripOptions = Radar.getTripOptions();
5000
4341
  Trips.updateTrip(tripOptions, TRIP_STATUS.CANCELED).then(function (response) {
5001
- // clear tripOptions
5002
- Storage.removeItem(Storage.TRIP_OPTIONS);
4342
+ Radar.clearTripOptions();
5003
4343
  callback(null, {
5004
4344
  trip: response.trip,
5005
4345
  events: response.events,
@@ -5011,11 +4351,17 @@ var Radar = /*#__PURE__*/function () {
5011
4351
  key: "setTripOptions",
5012
4352
  value: function setTripOptions(tripOptions) {
5013
4353
  if (!tripOptions) {
4354
+ Radar.clearTripOptions();
5014
4355
  return;
5015
4356
  }
5016
4357
 
5017
4358
  Storage.setItem(Storage.TRIP_OPTIONS, JSON.stringify(tripOptions));
5018
4359
  }
4360
+ }, {
4361
+ key: "clearTripOptions",
4362
+ value: function clearTripOptions() {
4363
+ Storage.removeItem(Storage.TRIP_OPTIONS);
4364
+ }
5019
4365
  }, {
5020
4366
  key: "getTripOptions",
5021
4367
  value: function getTripOptions() {