@tryghost/content-api 1.5.12 → 1.5.16

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/es/content-api.js CHANGED
@@ -48,6 +48,12 @@ var descriptors = !fails(function () {
48
48
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
49
49
  });
50
50
 
51
+ var call$2 = Function.prototype.call;
52
+
53
+ var functionCall = call$2.bind ? call$2.bind(call$2) : function () {
54
+ return call$2.apply(call$2, arguments);
55
+ };
56
+
51
57
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
52
58
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
53
59
  var getOwnPropertyDescriptor$4 = Object.getOwnPropertyDescriptor;
@@ -75,27 +81,44 @@ var createPropertyDescriptor = function (bitmap, value) {
75
81
  };
76
82
  };
77
83
 
78
- var toString$1 = {}.toString;
84
+ var FunctionPrototype$3 = Function.prototype;
85
+ var bind$4 = FunctionPrototype$3.bind;
86
+ var call$1 = FunctionPrototype$3.call;
87
+ var callBind = bind$4 && bind$4.bind(call$1);
88
+
89
+ var functionUncurryThis = bind$4 ? function (fn) {
90
+ return fn && callBind(call$1, fn);
91
+ } : function (fn) {
92
+ return fn && function () {
93
+ return call$1.apply(fn, arguments);
94
+ };
95
+ };
96
+
97
+ var toString$2 = functionUncurryThis({}.toString);
98
+ var stringSlice$2 = functionUncurryThis(''.slice);
79
99
 
80
100
  var classofRaw = function (it) {
81
- return toString$1.call(it).slice(8, -1);
101
+ return stringSlice$2(toString$2(it), 8, -1);
82
102
  };
83
103
 
84
- var split = ''.split;
104
+ var Object$4 = global_1.Object;
105
+ var split = functionUncurryThis(''.split);
85
106
 
86
107
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
87
108
  var indexedObject = fails(function () {
88
109
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
89
110
  // eslint-disable-next-line no-prototype-builtins -- safe
90
- return !Object('z').propertyIsEnumerable(0);
111
+ return !Object$4('z').propertyIsEnumerable(0);
91
112
  }) ? function (it) {
92
- return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
93
- } : Object;
113
+ return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
114
+ } : Object$4;
115
+
116
+ var TypeError$f = global_1.TypeError;
94
117
 
95
118
  // `RequireObjectCoercible` abstract operation
96
119
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
97
120
  var requireObjectCoercible = function (it) {
98
- if (it == undefined) throw TypeError("Can't call method on " + it);
121
+ if (it == undefined) throw TypeError$f("Can't call method on " + it);
99
122
  return it;
100
123
  };
101
124
 
@@ -107,18 +130,26 @@ var toIndexedObject = function (it) {
107
130
  return indexedObject(requireObjectCoercible(it));
108
131
  };
109
132
 
133
+ // `IsCallable` abstract operation
134
+ // https://tc39.es/ecma262/#sec-iscallable
135
+ var isCallable = function (argument) {
136
+ return typeof argument == 'function';
137
+ };
138
+
110
139
  var isObject$1 = function (it) {
111
- return typeof it === 'object' ? it !== null : typeof it === 'function';
140
+ return typeof it == 'object' ? it !== null : isCallable(it);
112
141
  };
113
142
 
114
- var aFunction$1 = function (variable) {
115
- return typeof variable == 'function' ? variable : undefined;
143
+ var aFunction = function (argument) {
144
+ return isCallable(argument) ? argument : undefined;
116
145
  };
117
146
 
118
147
  var getBuiltIn = function (namespace, method) {
119
- return arguments.length < 2 ? aFunction$1(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
148
+ return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
120
149
  };
121
150
 
151
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
152
+
122
153
  var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
123
154
 
124
155
  var process$4 = global_1.process;
@@ -129,16 +160,22 @@ var match, version;
129
160
 
130
161
  if (v8) {
131
162
  match = v8.split('.');
132
- version = match[0] < 4 ? 1 : match[0] + match[1];
133
- } else if (engineUserAgent) {
163
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
164
+ // but their correct versions are not interesting for us
165
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
166
+ }
167
+
168
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
169
+ // so check `userAgent` even if `.v8` exists, but 0
170
+ if (!version && engineUserAgent) {
134
171
  match = engineUserAgent.match(/Edge\/(\d+)/);
135
172
  if (!match || match[1] >= 74) {
136
173
  match = engineUserAgent.match(/Chrome\/(\d+)/);
137
- if (match) version = match[1];
174
+ if (match) version = +match[1];
138
175
  }
139
176
  }
140
177
 
141
- var engineV8Version = version && +version;
178
+ var engineV8Version = version;
142
179
 
143
180
  /* eslint-disable es/no-symbol -- required for testing */
144
181
 
@@ -161,27 +198,58 @@ var useSymbolAsUid = nativeSymbol
161
198
  && !Symbol.sham
162
199
  && typeof Symbol.iterator == 'symbol';
163
200
 
201
+ var Object$3 = global_1.Object;
202
+
164
203
  var isSymbol = useSymbolAsUid ? function (it) {
165
204
  return typeof it == 'symbol';
166
205
  } : function (it) {
167
206
  var $Symbol = getBuiltIn('Symbol');
168
- return typeof $Symbol == 'function' && Object(it) instanceof $Symbol;
207
+ return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
208
+ };
209
+
210
+ var String$5 = global_1.String;
211
+
212
+ var tryToString = function (argument) {
213
+ try {
214
+ return String$5(argument);
215
+ } catch (error) {
216
+ return 'Object';
217
+ }
218
+ };
219
+
220
+ var TypeError$e = global_1.TypeError;
221
+
222
+ // `Assert: IsCallable(argument) is true`
223
+ var aCallable = function (argument) {
224
+ if (isCallable(argument)) return argument;
225
+ throw TypeError$e(tryToString(argument) + ' is not a function');
169
226
  };
170
227
 
228
+ // `GetMethod` abstract operation
229
+ // https://tc39.es/ecma262/#sec-getmethod
230
+ var getMethod = function (V, P) {
231
+ var func = V[P];
232
+ return func == null ? undefined : aCallable(func);
233
+ };
234
+
235
+ var TypeError$d = global_1.TypeError;
236
+
171
237
  // `OrdinaryToPrimitive` abstract operation
172
238
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
173
239
  var ordinaryToPrimitive = function (input, pref) {
174
240
  var fn, val;
175
- if (pref === 'string' && typeof (fn = input.toString) == 'function' && !isObject$1(val = fn.call(input))) return val;
176
- if (typeof (fn = input.valueOf) == 'function' && !isObject$1(val = fn.call(input))) return val;
177
- if (pref !== 'string' && typeof (fn = input.toString) == 'function' && !isObject$1(val = fn.call(input))) return val;
178
- throw TypeError("Can't convert object to primitive value");
241
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
242
+ if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
243
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
244
+ throw TypeError$d("Can't convert object to primitive value");
179
245
  };
180
246
 
247
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
248
+ var defineProperty$3 = Object.defineProperty;
249
+
181
250
  var setGlobal = function (key, value) {
182
251
  try {
183
- // eslint-disable-next-line es/no-object-defineproperty -- safe
184
- Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
252
+ defineProperty$3(global_1, key, { value: value, configurable: true, writable: true });
185
253
  } catch (error) {
186
254
  global_1[key] = value;
187
255
  } return value;
@@ -196,58 +264,68 @@ var shared = createCommonjsModule(function (module) {
196
264
  (module.exports = function (key, value) {
197
265
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
198
266
  })('versions', []).push({
199
- version: '3.16.0',
267
+ version: '3.19.1',
200
268
  mode: 'global',
201
269
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
202
270
  });
203
271
  });
204
272
 
273
+ var Object$2 = global_1.Object;
274
+
205
275
  // `ToObject` abstract operation
206
276
  // https://tc39.es/ecma262/#sec-toobject
207
277
  var toObject = function (argument) {
208
- return Object(requireObjectCoercible(argument));
278
+ return Object$2(requireObjectCoercible(argument));
209
279
  };
210
280
 
211
- var hasOwnProperty = {}.hasOwnProperty;
281
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
212
282
 
213
- var has$1 = Object.hasOwn || function hasOwn(it, key) {
214
- return hasOwnProperty.call(toObject(it), key);
283
+ // `HasOwnProperty` abstract operation
284
+ // https://tc39.es/ecma262/#sec-hasownproperty
285
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
286
+ return hasOwnProperty(toObject(it), key);
215
287
  };
216
288
 
217
289
  var id = 0;
218
290
  var postfix = Math.random();
291
+ var toString$1 = functionUncurryThis(1.0.toString);
219
292
 
220
293
  var uid = function (key) {
221
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
294
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
222
295
  };
223
296
 
224
297
  var WellKnownSymbolsStore = shared('wks');
225
298
  var Symbol$1 = global_1.Symbol;
299
+ var symbolFor = Symbol$1 && Symbol$1['for'];
226
300
  var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
227
301
 
228
302
  var wellKnownSymbol = function (name) {
229
- if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
230
- if (nativeSymbol && has$1(Symbol$1, name)) {
303
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
304
+ var description = 'Symbol.' + name;
305
+ if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
231
306
  WellKnownSymbolsStore[name] = Symbol$1[name];
307
+ } else if (useSymbolAsUid && symbolFor) {
308
+ WellKnownSymbolsStore[name] = symbolFor(description);
232
309
  } else {
233
- WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
310
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
234
311
  }
235
312
  } return WellKnownSymbolsStore[name];
236
313
  };
237
314
 
315
+ var TypeError$c = global_1.TypeError;
238
316
  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
239
317
 
240
318
  // `ToPrimitive` abstract operation
241
319
  // https://tc39.es/ecma262/#sec-toprimitive
242
320
  var toPrimitive = function (input, pref) {
243
321
  if (!isObject$1(input) || isSymbol(input)) return input;
244
- var exoticToPrim = input[TO_PRIMITIVE];
322
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
245
323
  var result;
246
- if (exoticToPrim !== undefined) {
324
+ if (exoticToPrim) {
247
325
  if (pref === undefined) pref = 'default';
248
- result = exoticToPrim.call(input, pref);
326
+ result = functionCall(exoticToPrim, input, pref);
249
327
  if (!isObject$1(result) || isSymbol(result)) return result;
250
- throw TypeError("Can't convert object to primitive value");
328
+ throw TypeError$c("Can't convert object to primitive value");
251
329
  }
252
330
  if (pref === undefined) pref = 'number';
253
331
  return ordinaryToPrimitive(input, pref);
@@ -257,15 +335,15 @@ var toPrimitive = function (input, pref) {
257
335
  // https://tc39.es/ecma262/#sec-topropertykey
258
336
  var toPropertyKey = function (argument) {
259
337
  var key = toPrimitive(argument, 'string');
260
- return isSymbol(key) ? key : String(key);
338
+ return isSymbol(key) ? key : key + '';
261
339
  };
262
340
 
263
341
  var document$3 = global_1.document;
264
342
  // typeof document.createElement is 'object' in old IE
265
- var EXISTS = isObject$1(document$3) && isObject$1(document$3.createElement);
343
+ var EXISTS$1 = isObject$1(document$3) && isObject$1(document$3.createElement);
266
344
 
267
345
  var documentCreateElement = function (it) {
268
- return EXISTS ? document$3.createElement(it) : {};
346
+ return EXISTS$1 ? document$3.createElement(it) : {};
269
347
  };
270
348
 
271
349
  // Thank's IE8 for his funny defineProperty
@@ -287,19 +365,23 @@ var f$4 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescr
287
365
  if (ie8DomDefine) try {
288
366
  return $getOwnPropertyDescriptor(O, P);
289
367
  } catch (error) { /* empty */ }
290
- if (has$1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
368
+ if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
291
369
  };
292
370
 
293
371
  var objectGetOwnPropertyDescriptor = {
294
372
  f: f$4
295
373
  };
296
374
 
297
- var anObject = function (it) {
298
- if (!isObject$1(it)) {
299
- throw TypeError(String(it) + ' is not an object');
300
- } return it;
375
+ var String$4 = global_1.String;
376
+ var TypeError$b = global_1.TypeError;
377
+
378
+ // `Assert: Type(argument) is Object`
379
+ var anObject = function (argument) {
380
+ if (isObject$1(argument)) return argument;
381
+ throw TypeError$b(String$4(argument) + ' is not an object');
301
382
  };
302
383
 
384
+ var TypeError$a = global_1.TypeError;
303
385
  // eslint-disable-next-line es/no-object-defineproperty -- safe
304
386
  var $defineProperty = Object.defineProperty;
305
387
 
@@ -312,7 +394,7 @@ var f$3 = descriptors ? $defineProperty : function defineProperty(O, P, Attribut
312
394
  if (ie8DomDefine) try {
313
395
  return $defineProperty(O, P, Attributes);
314
396
  } catch (error) { /* empty */ }
315
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
397
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$a('Accessors not supported');
316
398
  if ('value' in Attributes) O[P] = Attributes.value;
317
399
  return O;
318
400
  };
@@ -328,12 +410,12 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
328
410
  return object;
329
411
  };
330
412
 
331
- var functionToString = Function.toString;
413
+ var functionToString$1 = functionUncurryThis(Function.toString);
332
414
 
333
415
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
334
- if (typeof sharedStore.inspectSource != 'function') {
416
+ if (!isCallable(sharedStore.inspectSource)) {
335
417
  sharedStore.inspectSource = function (it) {
336
- return functionToString.call(it);
418
+ return functionToString$1(it);
337
419
  };
338
420
  }
339
421
 
@@ -341,7 +423,7 @@ var inspectSource = sharedStore.inspectSource;
341
423
 
342
424
  var WeakMap$1 = global_1.WeakMap;
343
425
 
344
- var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
426
+ var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
345
427
 
346
428
  var keys = shared('keys');
347
429
 
@@ -352,6 +434,7 @@ var sharedKey = function (key) {
352
434
  var hiddenKeys$1 = {};
353
435
 
354
436
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
437
+ var TypeError$9 = global_1.TypeError;
355
438
  var WeakMap = global_1.WeakMap;
356
439
  var set$1, get, has;
357
440
 
@@ -363,42 +446,42 @@ var getterFor = function (TYPE) {
363
446
  return function (it) {
364
447
  var state;
365
448
  if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
366
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
449
+ throw TypeError$9('Incompatible receiver, ' + TYPE + ' required');
367
450
  } return state;
368
451
  };
369
452
  };
370
453
 
371
454
  if (nativeWeakMap || sharedStore.state) {
372
455
  var store = sharedStore.state || (sharedStore.state = new WeakMap());
373
- var wmget = store.get;
374
- var wmhas = store.has;
375
- var wmset = store.set;
456
+ var wmget = functionUncurryThis(store.get);
457
+ var wmhas = functionUncurryThis(store.has);
458
+ var wmset = functionUncurryThis(store.set);
376
459
  set$1 = function (it, metadata) {
377
- if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
460
+ if (wmhas(store, it)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
378
461
  metadata.facade = it;
379
- wmset.call(store, it, metadata);
462
+ wmset(store, it, metadata);
380
463
  return metadata;
381
464
  };
382
465
  get = function (it) {
383
- return wmget.call(store, it) || {};
466
+ return wmget(store, it) || {};
384
467
  };
385
468
  has = function (it) {
386
- return wmhas.call(store, it);
469
+ return wmhas(store, it);
387
470
  };
388
471
  } else {
389
472
  var STATE = sharedKey('state');
390
473
  hiddenKeys$1[STATE] = true;
391
474
  set$1 = function (it, metadata) {
392
- if (has$1(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
475
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
393
476
  metadata.facade = it;
394
477
  createNonEnumerableProperty(it, STATE, metadata);
395
478
  return metadata;
396
479
  };
397
480
  get = function (it) {
398
- return has$1(it, STATE) ? it[STATE] : {};
481
+ return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
399
482
  };
400
483
  has = function (it) {
401
- return has$1(it, STATE);
484
+ return hasOwnProperty_1(it, STATE);
402
485
  };
403
486
  }
404
487
 
@@ -410,7 +493,24 @@ var internalState = {
410
493
  getterFor: getterFor
411
494
  };
412
495
 
496
+ var FunctionPrototype$2 = Function.prototype;
497
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
498
+ var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
499
+
500
+ var EXISTS = hasOwnProperty_1(FunctionPrototype$2, 'name');
501
+ // additional protection from minified / mangled / dropped function names
502
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
503
+ var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$2, 'name').configurable));
504
+
505
+ var functionName = {
506
+ EXISTS: EXISTS,
507
+ PROPER: PROPER,
508
+ CONFIGURABLE: CONFIGURABLE
509
+ };
510
+
413
511
  var redefine = createCommonjsModule(function (module) {
512
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
513
+
414
514
  var getInternalState = internalState.get;
415
515
  var enforceInternalState = internalState.enforce;
416
516
  var TEMPLATE = String(String).split('String');
@@ -419,14 +519,18 @@ var TEMPLATE = String(String).split('String');
419
519
  var unsafe = options ? !!options.unsafe : false;
420
520
  var simple = options ? !!options.enumerable : false;
421
521
  var noTargetGet = options ? !!options.noTargetGet : false;
522
+ var name = options && options.name !== undefined ? options.name : key;
422
523
  var state;
423
- if (typeof value == 'function') {
424
- if (typeof key == 'string' && !has$1(value, 'name')) {
425
- createNonEnumerableProperty(value, 'name', key);
524
+ if (isCallable(value)) {
525
+ if (String(name).slice(0, 7) === 'Symbol(') {
526
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
527
+ }
528
+ if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
529
+ createNonEnumerableProperty(value, 'name', name);
426
530
  }
427
531
  state = enforceInternalState(value);
428
532
  if (!state.source) {
429
- state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
533
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
430
534
  }
431
535
  }
432
536
  if (O === global_1) {
@@ -442,43 +546,51 @@ var TEMPLATE = String(String).split('String');
442
546
  else createNonEnumerableProperty(O, key, value);
443
547
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
444
548
  })(Function.prototype, 'toString', function toString() {
445
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
549
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
446
550
  });
447
551
  });
448
552
 
449
553
  var ceil = Math.ceil;
450
554
  var floor = Math.floor;
451
555
 
452
- // `ToInteger` abstract operation
453
- // https://tc39.es/ecma262/#sec-tointeger
454
- var toInteger = function (argument) {
455
- return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
556
+ // `ToIntegerOrInfinity` abstract operation
557
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
558
+ var toIntegerOrInfinity = function (argument) {
559
+ var number = +argument;
560
+ // eslint-disable-next-line no-self-compare -- safe
561
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
456
562
  };
457
563
 
564
+ var max = Math.max;
458
565
  var min$3 = Math.min;
459
566
 
567
+ // Helper for a popular repeating case of the spec:
568
+ // Let integer be ? ToInteger(index).
569
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
570
+ var toAbsoluteIndex = function (index, length) {
571
+ var integer = toIntegerOrInfinity(index);
572
+ return integer < 0 ? max(integer + length, 0) : min$3(integer, length);
573
+ };
574
+
575
+ var min$2 = Math.min;
576
+
460
577
  // `ToLength` abstract operation
461
578
  // https://tc39.es/ecma262/#sec-tolength
462
579
  var toLength = function (argument) {
463
- return argument > 0 ? min$3(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
580
+ return argument > 0 ? min$2(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
464
581
  };
465
582
 
466
- var max = Math.max;
467
- var min$2 = Math.min;
468
-
469
- // Helper for a popular repeating case of the spec:
470
- // Let integer be ? ToInteger(index).
471
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
472
- var toAbsoluteIndex = function (index, length) {
473
- var integer = toInteger(index);
474
- return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
583
+ // `LengthOfArrayLike` abstract operation
584
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
585
+ var lengthOfArrayLike = function (obj) {
586
+ return toLength(obj.length);
475
587
  };
476
588
 
477
589
  // `Array.prototype.{ indexOf, includes }` methods implementation
478
590
  var createMethod$1 = function (IS_INCLUDES) {
479
591
  return function ($this, el, fromIndex) {
480
592
  var O = toIndexedObject($this);
481
- var length = toLength(O.length);
593
+ var length = lengthOfArrayLike(O);
482
594
  var index = toAbsoluteIndex(fromIndex, length);
483
595
  var value;
484
596
  // Array#includes uses SameValueZero equality algorithm
@@ -503,18 +615,20 @@ var arrayIncludes = {
503
615
  indexOf: createMethod$1(false)
504
616
  };
505
617
 
506
- var indexOf = arrayIncludes.indexOf;
618
+ var indexOf$1 = arrayIncludes.indexOf;
507
619
 
508
620
 
621
+ var push$1 = functionUncurryThis([].push);
622
+
509
623
  var objectKeysInternal = function (object, names) {
510
624
  var O = toIndexedObject(object);
511
625
  var i = 0;
512
626
  var result = [];
513
627
  var key;
514
- for (key in O) !has$1(hiddenKeys$1, key) && has$1(O, key) && result.push(key);
628
+ for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$1(result, key);
515
629
  // Don't enum bug & hidden keys
516
- while (names.length > i) if (has$1(O, key = names[i++])) {
517
- ~indexOf(result, key) || result.push(key);
630
+ while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
631
+ ~indexOf$1(result, key) || push$1(result, key);
518
632
  }
519
633
  return result;
520
634
  };
@@ -550,11 +664,13 @@ var objectGetOwnPropertySymbols = {
550
664
  f: f$1
551
665
  };
552
666
 
667
+ var concat$1 = functionUncurryThis([].concat);
668
+
553
669
  // all object keys, includes non-enumerable and symbols
554
670
  var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
555
671
  var keys = objectGetOwnPropertyNames.f(anObject(it));
556
672
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
557
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
673
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
558
674
  };
559
675
 
560
676
  var copyConstructorProperties = function (target, source) {
@@ -563,7 +679,7 @@ var copyConstructorProperties = function (target, source) {
563
679
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
564
680
  for (var i = 0; i < keys.length; i++) {
565
681
  var key = keys[i];
566
- if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
682
+ if (!hasOwnProperty_1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
567
683
  }
568
684
  };
569
685
 
@@ -573,7 +689,7 @@ var isForced = function (feature, detection) {
573
689
  var value = data[normalize(feature)];
574
690
  return value == POLYFILL ? true
575
691
  : value == NATIVE ? false
576
- : typeof detection == 'function' ? fails(detection)
692
+ : isCallable(detection) ? fails(detection)
577
693
  : !!detection;
578
694
  };
579
695
 
@@ -607,6 +723,7 @@ var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
607
723
  options.sham - add a flag to not completely full polyfills
608
724
  options.enumerable - export as enumerable property
609
725
  options.noTargetGet - prevent calling a getter on target
726
+ options.name - the .name of the function if it does not match the key
610
727
  */
611
728
  var _export = function (options, source) {
612
729
  var TARGET = options.target;
@@ -629,7 +746,7 @@ var _export = function (options, source) {
629
746
  FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
630
747
  // contained in target
631
748
  if (!FORCED && targetProperty !== undefined) {
632
- if (typeof sourceProperty === typeof targetProperty) continue;
749
+ if (typeof sourceProperty == typeof targetProperty) continue;
633
750
  copyConstructorProperties(sourceProperty, targetProperty);
634
751
  }
635
752
  // add a flag to not completely full polyfills
@@ -649,7 +766,7 @@ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
649
766
  });
650
767
  };
651
768
 
652
- var nativeJoin = [].join;
769
+ var un$Join = functionUncurryThis([].join);
653
770
 
654
771
  var ES3_STRINGS = indexedObject != Object;
655
772
  var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
@@ -658,7 +775,7 @@ var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
658
775
  // https://tc39.es/ecma262/#sec-array.prototype.join
659
776
  _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
660
777
  join: function join(separator) {
661
- return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
778
+ return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
662
779
  }
663
780
  });
664
781
 
@@ -674,11 +791,12 @@ var objectKeys = Object.keys || function keys(O) {
674
791
  // eslint-disable-next-line es/no-object-defineproperties -- safe
675
792
  var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
676
793
  anObject(O);
794
+ var props = toIndexedObject(Properties);
677
795
  var keys = objectKeys(Properties);
678
796
  var length = keys.length;
679
797
  var index = 0;
680
798
  var key;
681
- while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
799
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
682
800
  return O;
683
801
  };
684
802
 
@@ -720,17 +838,15 @@ var NullProtoObjectViaIFrame = function () {
720
838
  var iframe = documentCreateElement('iframe');
721
839
  var JS = 'java' + SCRIPT + ':';
722
840
  var iframeDocument;
723
- if (iframe.style) {
724
- iframe.style.display = 'none';
725
- html.appendChild(iframe);
726
- // https://github.com/zloirock/core-js/issues/475
727
- iframe.src = String(JS);
728
- iframeDocument = iframe.contentWindow.document;
729
- iframeDocument.open();
730
- iframeDocument.write(scriptTag('document.F=Object'));
731
- iframeDocument.close();
732
- return iframeDocument.F;
733
- }
841
+ iframe.style.display = 'none';
842
+ html.appendChild(iframe);
843
+ // https://github.com/zloirock/core-js/issues/475
844
+ iframe.src = String(JS);
845
+ iframeDocument = iframe.contentWindow.document;
846
+ iframeDocument.open();
847
+ iframeDocument.write(scriptTag('document.F=Object'));
848
+ iframeDocument.close();
849
+ return iframeDocument.F;
734
850
  };
735
851
 
736
852
  // Check for document.domain and active x support
@@ -743,10 +859,11 @@ var NullProtoObject = function () {
743
859
  try {
744
860
  activeXDocument = new ActiveXObject('htmlfile');
745
861
  } catch (error) { /* ignore */ }
746
- NullProtoObject = document.domain && activeXDocument ?
747
- NullProtoObjectViaActiveX(activeXDocument) : // old IE
748
- NullProtoObjectViaIFrame() ||
749
- NullProtoObjectViaActiveX(activeXDocument); // WSH
862
+ NullProtoObject = typeof document != 'undefined'
863
+ ? document.domain && activeXDocument
864
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
865
+ : NullProtoObjectViaIFrame()
866
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
750
867
  var length = enumBugKeys.length;
751
868
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
752
869
  return NullProtoObject();
@@ -799,11 +916,221 @@ _export({ target: 'Array', proto: true }, {
799
916
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
800
917
  addToUnscopables('includes');
801
918
 
919
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
920
+ var test = {};
921
+
922
+ test[TO_STRING_TAG$2] = 'z';
923
+
924
+ var toStringTagSupport = String(test) === '[object z]';
925
+
926
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
927
+ var Object$1 = global_1.Object;
928
+
929
+ // ES3 wrong here
930
+ var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
931
+
932
+ // fallback for IE11 Script Access Denied error
933
+ var tryGet = function (it, key) {
934
+ try {
935
+ return it[key];
936
+ } catch (error) { /* empty */ }
937
+ };
938
+
939
+ // getting tag from ES6+ `Object.prototype.toString`
940
+ var classof = toStringTagSupport ? classofRaw : function (it) {
941
+ var O, tag, result;
942
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
943
+ // @@toStringTag case
944
+ : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
945
+ // builtinTag case
946
+ : CORRECT_ARGUMENTS ? classofRaw(O)
947
+ // ES3 arguments fallback
948
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
949
+ };
950
+
951
+ var String$3 = global_1.String;
952
+
802
953
  var toString_1 = function (argument) {
803
- if (isSymbol(argument)) throw TypeError('Cannot convert a Symbol value to a string');
804
- return String(argument);
954
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
955
+ return String$3(argument);
956
+ };
957
+
958
+ // `RegExp.prototype.flags` getter implementation
959
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
960
+ var regexpFlags = function () {
961
+ var that = anObject(this);
962
+ var result = '';
963
+ if (that.global) result += 'g';
964
+ if (that.ignoreCase) result += 'i';
965
+ if (that.multiline) result += 'm';
966
+ if (that.dotAll) result += 's';
967
+ if (that.unicode) result += 'u';
968
+ if (that.sticky) result += 'y';
969
+ return result;
805
970
  };
806
971
 
972
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
973
+ var $RegExp$2 = global_1.RegExp;
974
+
975
+ var UNSUPPORTED_Y$1 = fails(function () {
976
+ var re = $RegExp$2('a', 'y');
977
+ re.lastIndex = 2;
978
+ return re.exec('abcd') != null;
979
+ });
980
+
981
+ var BROKEN_CARET = fails(function () {
982
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
983
+ var re = $RegExp$2('^r', 'gy');
984
+ re.lastIndex = 2;
985
+ return re.exec('str') != null;
986
+ });
987
+
988
+ var regexpStickyHelpers = {
989
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1,
990
+ BROKEN_CARET: BROKEN_CARET
991
+ };
992
+
993
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
994
+ var $RegExp$1 = global_1.RegExp;
995
+
996
+ var regexpUnsupportedDotAll = fails(function () {
997
+ var re = $RegExp$1('.', 's');
998
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
999
+ });
1000
+
1001
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1002
+ var $RegExp = global_1.RegExp;
1003
+
1004
+ var regexpUnsupportedNcg = fails(function () {
1005
+ var re = $RegExp('(?<a>b)', 'g');
1006
+ return re.exec('b').groups.a !== 'b' ||
1007
+ 'b'.replace(re, '$<a>c') !== 'bc';
1008
+ });
1009
+
1010
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1011
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
1012
+
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+
1019
+ var getInternalState$1 = internalState.get;
1020
+
1021
+
1022
+
1023
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
1024
+ var nativeExec = RegExp.prototype.exec;
1025
+ var patchedExec = nativeExec;
1026
+ var charAt = functionUncurryThis(''.charAt);
1027
+ var indexOf = functionUncurryThis(''.indexOf);
1028
+ var replace = functionUncurryThis(''.replace);
1029
+ var stringSlice$1 = functionUncurryThis(''.slice);
1030
+
1031
+ var UPDATES_LAST_INDEX_WRONG = (function () {
1032
+ var re1 = /a/;
1033
+ var re2 = /b*/g;
1034
+ functionCall(nativeExec, re1, 'a');
1035
+ functionCall(nativeExec, re2, 'a');
1036
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1037
+ })();
1038
+
1039
+ var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1040
+
1041
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
1042
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1043
+
1044
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexpUnsupportedDotAll || regexpUnsupportedNcg;
1045
+
1046
+ if (PATCH) {
1047
+ // eslint-disable-next-line max-statements -- TODO
1048
+ patchedExec = function exec(string) {
1049
+ var re = this;
1050
+ var state = getInternalState$1(re);
1051
+ var str = toString_1(string);
1052
+ var raw = state.raw;
1053
+ var result, reCopy, lastIndex, match, i, object, group;
1054
+
1055
+ if (raw) {
1056
+ raw.lastIndex = re.lastIndex;
1057
+ result = functionCall(patchedExec, raw, str);
1058
+ re.lastIndex = raw.lastIndex;
1059
+ return result;
1060
+ }
1061
+
1062
+ var groups = state.groups;
1063
+ var sticky = UNSUPPORTED_Y && re.sticky;
1064
+ var flags = functionCall(regexpFlags, re);
1065
+ var source = re.source;
1066
+ var charsAdded = 0;
1067
+ var strCopy = str;
1068
+
1069
+ if (sticky) {
1070
+ flags = replace(flags, 'y', '');
1071
+ if (indexOf(flags, 'g') === -1) {
1072
+ flags += 'g';
1073
+ }
1074
+
1075
+ strCopy = stringSlice$1(str, re.lastIndex);
1076
+ // Support anchored sticky behavior.
1077
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
1078
+ source = '(?: ' + source + ')';
1079
+ strCopy = ' ' + strCopy;
1080
+ charsAdded++;
1081
+ }
1082
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
1083
+ // simulate the 'y' flag.
1084
+ reCopy = new RegExp('^(?:' + source + ')', flags);
1085
+ }
1086
+
1087
+ if (NPCG_INCLUDED) {
1088
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
1089
+ }
1090
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
1091
+
1092
+ match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
1093
+
1094
+ if (sticky) {
1095
+ if (match) {
1096
+ match.input = stringSlice$1(match.input, charsAdded);
1097
+ match[0] = stringSlice$1(match[0], charsAdded);
1098
+ match.index = re.lastIndex;
1099
+ re.lastIndex += match[0].length;
1100
+ } else re.lastIndex = 0;
1101
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
1102
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
1103
+ }
1104
+ if (NPCG_INCLUDED && match && match.length > 1) {
1105
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
1106
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
1107
+ functionCall(nativeReplace, match[0], reCopy, function () {
1108
+ for (i = 1; i < arguments.length - 2; i++) {
1109
+ if (arguments[i] === undefined) match[i] = undefined;
1110
+ }
1111
+ });
1112
+ }
1113
+
1114
+ if (match && groups) {
1115
+ match.groups = object = objectCreate(null);
1116
+ for (i = 0; i < groups.length; i++) {
1117
+ group = groups[i];
1118
+ object[group[0]] = match[group[1]];
1119
+ }
1120
+ }
1121
+
1122
+ return match;
1123
+ };
1124
+ }
1125
+
1126
+ var regexpExec = patchedExec;
1127
+
1128
+ // `RegExp.prototype.exec` method
1129
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1130
+ _export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
1131
+ exec: regexpExec
1132
+ });
1133
+
807
1134
  var MATCH$1 = wellKnownSymbol('match');
808
1135
 
809
1136
  // `IsRegExp` abstract operation
@@ -813,9 +1140,11 @@ var isRegexp = function (it) {
813
1140
  return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
814
1141
  };
815
1142
 
1143
+ var TypeError$8 = global_1.TypeError;
1144
+
816
1145
  var notARegexp = function (it) {
817
1146
  if (isRegexp(it)) {
818
- throw TypeError("The method doesn't accept regular expressions");
1147
+ throw TypeError$8("The method doesn't accept regular expressions");
819
1148
  } return it;
820
1149
  };
821
1150
 
@@ -842,7 +1171,8 @@ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
842
1171
 
843
1172
 
844
1173
  // eslint-disable-next-line es/no-string-prototype-endswith -- safe
845
- var $endsWith = ''.endsWith;
1174
+ var un$EndsWith = functionUncurryThis(''.endsWith);
1175
+ var slice = functionUncurryThis(''.slice);
846
1176
  var min$1 = Math.min;
847
1177
 
848
1178
  var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('endsWith');
@@ -859,12 +1189,12 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT
859
1189
  var that = toString_1(requireObjectCoercible(this));
860
1190
  notARegexp(searchString);
861
1191
  var endPosition = arguments.length > 1 ? arguments[1] : undefined;
862
- var len = toLength(that.length);
1192
+ var len = that.length;
863
1193
  var end = endPosition === undefined ? len : min$1(toLength(endPosition), len);
864
1194
  var search = toString_1(searchString);
865
- return $endsWith
866
- ? $endsWith.call(that, search, end)
867
- : that.slice(end - search.length, end) === search;
1195
+ return un$EndsWith
1196
+ ? un$EndsWith(that, search, end)
1197
+ : slice(that, end - search.length, end) === search;
868
1198
  }
869
1199
  });
870
1200
 
@@ -877,7 +1207,8 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
877
1207
 
878
1208
 
879
1209
  // eslint-disable-next-line es/no-string-prototype-startswith -- safe
880
- var $startsWith = ''.startsWith;
1210
+ var un$StartsWith = functionUncurryThis(''.startsWith);
1211
+ var stringSlice = functionUncurryThis(''.slice);
881
1212
  var min = Math.min;
882
1213
 
883
1214
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith');
@@ -895,42 +1226,12 @@ _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_I
895
1226
  notARegexp(searchString);
896
1227
  var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
897
1228
  var search = toString_1(searchString);
898
- return $startsWith
899
- ? $startsWith.call(that, search, index)
900
- : that.slice(index, index + search.length) === search;
1229
+ return un$StartsWith
1230
+ ? un$StartsWith(that, search, index)
1231
+ : stringSlice(that, index, index + search.length) === search;
901
1232
  }
902
1233
  });
903
1234
 
904
- var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
905
- var test = {};
906
-
907
- test[TO_STRING_TAG$2] = 'z';
908
-
909
- var toStringTagSupport = String(test) === '[object z]';
910
-
911
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
912
- // ES3 wrong here
913
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
914
-
915
- // fallback for IE11 Script Access Denied error
916
- var tryGet = function (it, key) {
917
- try {
918
- return it[key];
919
- } catch (error) { /* empty */ }
920
- };
921
-
922
- // getting tag from ES6+ `Object.prototype.toString`
923
- var classof = toStringTagSupport ? classofRaw : function (it) {
924
- var O, tag, result;
925
- return it === undefined ? 'Undefined' : it === null ? 'Null'
926
- // @@toStringTag case
927
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
928
- // builtinTag case
929
- : CORRECT_ARGUMENTS ? classofRaw(O)
930
- // ES3 arguments fallback
931
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
932
- };
933
-
934
1235
  // `Object.prototype.toString` method implementation
935
1236
  // https://tc39.es/ecma262/#sec-object.prototype.tostring
936
1237
  var objectToString = toStringTagSupport ? {}.toString : function toString() {
@@ -950,16 +1251,19 @@ var redefineAll = function (target, src, options) {
950
1251
  return target;
951
1252
  };
952
1253
 
953
- var aPossiblePrototype = function (it) {
954
- if (!isObject$1(it) && it !== null) {
955
- throw TypeError("Can't set " + String(it) + ' as a prototype');
956
- } return it;
1254
+ var String$2 = global_1.String;
1255
+ var TypeError$7 = global_1.TypeError;
1256
+
1257
+ var aPossiblePrototype = function (argument) {
1258
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
1259
+ throw TypeError$7("Can't set " + String$2(argument) + ' as a prototype');
957
1260
  };
958
1261
 
959
1262
  /* eslint-disable no-proto -- safe */
960
1263
 
961
1264
 
962
1265
 
1266
+
963
1267
  // `Object.setPrototypeOf` method
964
1268
  // https://tc39.es/ecma262/#sec-object.setprototypeof
965
1269
  // Works with __proto__ only. Old v8 can't work with null proto objects.
@@ -970,14 +1274,14 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
970
1274
  var setter;
971
1275
  try {
972
1276
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
973
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
974
- setter.call(test, []);
1277
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1278
+ setter(test, []);
975
1279
  CORRECT_SETTER = test instanceof Array;
976
1280
  } catch (error) { /* empty */ }
977
1281
  return function setPrototypeOf(O, proto) {
978
1282
  anObject(O);
979
1283
  aPossiblePrototype(proto);
980
- if (CORRECT_SETTER) setter.call(O, proto);
1284
+ if (CORRECT_SETTER) setter(O, proto);
981
1285
  else O.__proto__ = proto;
982
1286
  return O;
983
1287
  };
@@ -990,7 +1294,7 @@ var defineProperty$2 = objectDefineProperty.f;
990
1294
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
991
1295
 
992
1296
  var setToStringTag = function (it, TAG, STATIC) {
993
- if (it && !has$1(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
1297
+ if (it && !hasOwnProperty_1(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
994
1298
  defineProperty$2(it, TO_STRING_TAG, { configurable: true, value: TAG });
995
1299
  }
996
1300
  };
@@ -1009,16 +1313,21 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
1009
1313
  }
1010
1314
  };
1011
1315
 
1012
- var aFunction = function (it) {
1013
- if (typeof it != 'function') {
1014
- throw TypeError(String(it) + ' is not a function');
1015
- } return it;
1316
+ var TypeError$6 = global_1.TypeError;
1317
+
1318
+ var anInstance = function (it, Prototype) {
1319
+ if (objectIsPrototypeOf(Prototype, it)) return it;
1320
+ throw TypeError$6('Incorrect invocation');
1016
1321
  };
1017
1322
 
1018
- var anInstance = function (it, Constructor, name) {
1019
- if (!(it instanceof Constructor)) {
1020
- throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
1021
- } return it;
1323
+ var bind$3 = functionUncurryThis(functionUncurryThis.bind);
1324
+
1325
+ // optional / simple context binding
1326
+ var functionBindContext = function (fn, that) {
1327
+ aCallable(fn);
1328
+ return that === undefined ? fn : bind$3 ? bind$3(fn, that) : function (/* ...args */) {
1329
+ return fn.apply(that, arguments);
1330
+ };
1022
1331
  };
1023
1332
 
1024
1333
  var iterators = {};
@@ -1031,59 +1340,61 @@ var isArrayIteratorMethod = function (it) {
1031
1340
  return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
1032
1341
  };
1033
1342
 
1034
- // optional / simple context binding
1035
- var functionBindContext = function (fn, that, length) {
1036
- aFunction(fn);
1037
- if (that === undefined) return fn;
1038
- switch (length) {
1039
- case 0: return function () {
1040
- return fn.call(that);
1041
- };
1042
- case 1: return function (a) {
1043
- return fn.call(that, a);
1044
- };
1045
- case 2: return function (a, b) {
1046
- return fn.call(that, a, b);
1047
- };
1048
- case 3: return function (a, b, c) {
1049
- return fn.call(that, a, b, c);
1050
- };
1051
- }
1052
- return function (/* ...args */) {
1053
- return fn.apply(that, arguments);
1054
- };
1055
- };
1056
-
1057
1343
  var ITERATOR$1 = wellKnownSymbol('iterator');
1058
1344
 
1059
1345
  var getIteratorMethod = function (it) {
1060
- if (it != undefined) return it[ITERATOR$1]
1061
- || it['@@iterator']
1346
+ if (it != undefined) return getMethod(it, ITERATOR$1)
1347
+ || getMethod(it, '@@iterator')
1062
1348
  || iterators[classof(it)];
1063
1349
  };
1064
1350
 
1065
- var iteratorClose = function (iterator) {
1066
- var returnMethod = iterator['return'];
1067
- if (returnMethod !== undefined) {
1068
- return anObject(returnMethod.call(iterator)).value;
1351
+ var TypeError$5 = global_1.TypeError;
1352
+
1353
+ var getIterator = function (argument, usingIterator) {
1354
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1355
+ if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1356
+ throw TypeError$5(tryToString(argument) + ' is not iterable');
1357
+ };
1358
+
1359
+ var iteratorClose = function (iterator, kind, value) {
1360
+ var innerResult, innerError;
1361
+ anObject(iterator);
1362
+ try {
1363
+ innerResult = getMethod(iterator, 'return');
1364
+ if (!innerResult) {
1365
+ if (kind === 'throw') throw value;
1366
+ return value;
1367
+ }
1368
+ innerResult = functionCall(innerResult, iterator);
1369
+ } catch (error) {
1370
+ innerError = true;
1371
+ innerResult = error;
1069
1372
  }
1373
+ if (kind === 'throw') throw value;
1374
+ if (innerError) throw innerResult;
1375
+ anObject(innerResult);
1376
+ return value;
1070
1377
  };
1071
1378
 
1379
+ var TypeError$4 = global_1.TypeError;
1380
+
1072
1381
  var Result = function (stopped, result) {
1073
1382
  this.stopped = stopped;
1074
1383
  this.result = result;
1075
1384
  };
1076
1385
 
1386
+ var ResultPrototype = Result.prototype;
1387
+
1077
1388
  var iterate = function (iterable, unboundFunction, options) {
1078
1389
  var that = options && options.that;
1079
1390
  var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1080
1391
  var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1081
1392
  var INTERRUPTED = !!(options && options.INTERRUPTED);
1082
- var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
1393
+ var fn = functionBindContext(unboundFunction, that);
1083
1394
  var iterator, iterFn, index, length, result, next, step;
1084
1395
 
1085
1396
  var stop = function (condition) {
1086
- if (iterator) iteratorClose(iterator);
1397
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1087
1398
  return new Result(true, condition);
1088
1399
  };
1089
1400
 
@@ -1098,26 +1409,25 @@ var iterate = function (iterable, unboundFunction, options) {
1098
1409
  iterator = iterable;
1099
1410
  } else {
1100
1411
  iterFn = getIteratorMethod(iterable);
1101
- if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
1412
+ if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
1102
1413
  // optimisation for array iterators
1103
1414
  if (isArrayIteratorMethod(iterFn)) {
1104
- for (index = 0, length = toLength(iterable.length); length > index; index++) {
1415
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1105
1416
  result = callFn(iterable[index]);
1106
- if (result && result instanceof Result) return result;
1417
+ if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1107
1418
  } return new Result(false);
1108
1419
  }
1109
- iterator = iterFn.call(iterable);
1420
+ iterator = getIterator(iterable, iterFn);
1110
1421
  }
1111
1422
 
1112
1423
  next = iterator.next;
1113
- while (!(step = next.call(iterator)).done) {
1424
+ while (!(step = functionCall(next, iterator)).done) {
1114
1425
  try {
1115
1426
  result = callFn(step.value);
1116
1427
  } catch (error) {
1117
- iteratorClose(iterator);
1118
- throw error;
1428
+ iteratorClose(iterator, 'throw', error);
1119
1429
  }
1120
- if (typeof result == 'object' && result && result instanceof Result) return result;
1430
+ if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1121
1431
  } return new Result(false);
1122
1432
  };
1123
1433
 
@@ -1158,6 +1468,51 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1158
1468
  return ITERATION_SUPPORT;
1159
1469
  };
1160
1470
 
1471
+ var noop = function () { /* empty */ };
1472
+ var empty = [];
1473
+ var construct = getBuiltIn('Reflect', 'construct');
1474
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1475
+ var exec = functionUncurryThis(constructorRegExp.exec);
1476
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1477
+
1478
+ var isConstructorModern = function (argument) {
1479
+ if (!isCallable(argument)) return false;
1480
+ try {
1481
+ construct(noop, empty, argument);
1482
+ return true;
1483
+ } catch (error) {
1484
+ return false;
1485
+ }
1486
+ };
1487
+
1488
+ var isConstructorLegacy = function (argument) {
1489
+ if (!isCallable(argument)) return false;
1490
+ switch (classof(argument)) {
1491
+ case 'AsyncFunction':
1492
+ case 'GeneratorFunction':
1493
+ case 'AsyncGeneratorFunction': return false;
1494
+ // we can't check .prototype since constructors produced by .bind haven't it
1495
+ } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
1496
+ };
1497
+
1498
+ // `IsConstructor` abstract operation
1499
+ // https://tc39.es/ecma262/#sec-isconstructor
1500
+ var isConstructor = !construct || fails(function () {
1501
+ var called;
1502
+ return isConstructorModern(isConstructorModern.call)
1503
+ || !isConstructorModern(Object)
1504
+ || !isConstructorModern(function () { called = true; })
1505
+ || called;
1506
+ }) ? isConstructorLegacy : isConstructorModern;
1507
+
1508
+ var TypeError$3 = global_1.TypeError;
1509
+
1510
+ // `Assert: IsConstructor(argument) is true`
1511
+ var aConstructor = function (argument) {
1512
+ if (isConstructor(argument)) return argument;
1513
+ throw TypeError$3(tryToString(argument) + ' is not a constructor');
1514
+ };
1515
+
1161
1516
  var SPECIES$3 = wellKnownSymbol('species');
1162
1517
 
1163
1518
  // `SpeciesConstructor` abstract operation
@@ -1165,18 +1520,32 @@ var SPECIES$3 = wellKnownSymbol('species');
1165
1520
  var speciesConstructor = function (O, defaultConstructor) {
1166
1521
  var C = anObject(O).constructor;
1167
1522
  var S;
1168
- return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aFunction(S);
1523
+ return C === undefined || (S = anObject(C)[SPECIES$3]) == undefined ? defaultConstructor : aConstructor(S);
1169
1524
  };
1170
1525
 
1171
- var engineIsIos = /(?:iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
1526
+ var FunctionPrototype$1 = Function.prototype;
1527
+ var apply = FunctionPrototype$1.apply;
1528
+ var bind$2 = FunctionPrototype$1.bind;
1529
+ var call = FunctionPrototype$1.call;
1530
+
1531
+ // eslint-disable-next-line es/no-reflect -- safe
1532
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$2 ? call.bind(apply) : function () {
1533
+ return call.apply(apply, arguments);
1534
+ });
1535
+
1536
+ var arraySlice = functionUncurryThis([].slice);
1537
+
1538
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
1172
1539
 
1173
1540
  var engineIsNode = classofRaw(global_1.process) == 'process';
1174
1541
 
1175
1542
  var set = global_1.setImmediate;
1176
1543
  var clear = global_1.clearImmediate;
1177
1544
  var process$3 = global_1.process;
1178
- var MessageChannel = global_1.MessageChannel;
1179
1545
  var Dispatch = global_1.Dispatch;
1546
+ var Function$1 = global_1.Function;
1547
+ var MessageChannel = global_1.MessageChannel;
1548
+ var String$1 = global_1.String;
1180
1549
  var counter = 0;
1181
1550
  var queue = {};
1182
1551
  var ONREADYSTATECHANGE = 'onreadystatechange';
@@ -1188,8 +1557,7 @@ try {
1188
1557
  } catch (error) { /* empty */ }
1189
1558
 
1190
1559
  var run = function (id) {
1191
- // eslint-disable-next-line no-prototype-builtins -- safe
1192
- if (queue.hasOwnProperty(id)) {
1560
+ if (hasOwnProperty_1(queue, id)) {
1193
1561
  var fn = queue[id];
1194
1562
  delete queue[id];
1195
1563
  fn();
@@ -1208,19 +1576,15 @@ var listener = function (event) {
1208
1576
 
1209
1577
  var post = function (id) {
1210
1578
  // old engines have not location.origin
1211
- global_1.postMessage(String(id), location.protocol + '//' + location.host);
1579
+ global_1.postMessage(String$1(id), location.protocol + '//' + location.host);
1212
1580
  };
1213
1581
 
1214
1582
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1215
1583
  if (!set || !clear) {
1216
1584
  set = function setImmediate(fn) {
1217
- var args = [];
1218
- var argumentsLength = arguments.length;
1219
- var i = 1;
1220
- while (argumentsLength > i) args.push(arguments[i++]);
1585
+ var args = arraySlice(arguments, 1);
1221
1586
  queue[++counter] = function () {
1222
- // eslint-disable-next-line no-new-func -- spec requirement
1223
- (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
1587
+ functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
1224
1588
  };
1225
1589
  defer(counter);
1226
1590
  return counter;
@@ -1244,12 +1608,12 @@ if (!set || !clear) {
1244
1608
  channel = new MessageChannel();
1245
1609
  port = channel.port2;
1246
1610
  channel.port1.onmessage = listener;
1247
- defer = functionBindContext(port.postMessage, port, 1);
1611
+ defer = functionBindContext(port.postMessage, port);
1248
1612
  // Browsers with postMessage, skip WebWorkers
1249
1613
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1250
1614
  } else if (
1251
1615
  global_1.addEventListener &&
1252
- typeof postMessage == 'function' &&
1616
+ isCallable(global_1.postMessage) &&
1253
1617
  !global_1.importScripts &&
1254
1618
  location && location.protocol !== 'file:' &&
1255
1619
  !fails(post)
@@ -1277,6 +1641,8 @@ var task$1 = {
1277
1641
  clear: clear
1278
1642
  };
1279
1643
 
1644
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;
1645
+
1280
1646
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
1281
1647
 
1282
1648
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
@@ -1285,6 +1651,7 @@ var macrotask = task$1.set;
1285
1651
 
1286
1652
 
1287
1653
 
1654
+
1288
1655
  var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
1289
1656
  var document$2 = global_1.document;
1290
1657
  var process$2 = global_1.process;
@@ -1324,14 +1691,14 @@ if (!queueMicrotask) {
1324
1691
  node.data = toggle = !toggle;
1325
1692
  };
1326
1693
  // environments with maybe non-completely correct, but existent Promise
1327
- } else if (Promise$1 && Promise$1.resolve) {
1694
+ } else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {
1328
1695
  // Promise.resolve without an argument throws an error in LG WebOS 2
1329
1696
  promise = Promise$1.resolve(undefined);
1330
1697
  // workaround of WebKit ~ iOS Safari 10.1 bug
1331
1698
  promise.constructor = Promise$1;
1332
- then = promise.then;
1699
+ then = functionBindContext(promise.then, promise);
1333
1700
  notify$1 = function () {
1334
- then.call(promise, flush);
1701
+ then(flush);
1335
1702
  };
1336
1703
  // Node.js without promises
1337
1704
  } else if (engineIsNode) {
@@ -1345,9 +1712,10 @@ if (!queueMicrotask) {
1345
1712
  // - onreadystatechange
1346
1713
  // - setTimeout
1347
1714
  } else {
1715
+ // strange IE + webpack dev server bug - use .bind(global)
1716
+ macrotask = functionBindContext(macrotask, global_1);
1348
1717
  notify$1 = function () {
1349
- // strange IE + webpack dev server bug - use .call(global)
1350
- macrotask.call(global_1, flush);
1718
+ macrotask(flush);
1351
1719
  };
1352
1720
  }
1353
1721
  }
@@ -1368,8 +1736,8 @@ var PromiseCapability = function (C) {
1368
1736
  resolve = $$resolve;
1369
1737
  reject = $$reject;
1370
1738
  });
1371
- this.resolve = aFunction(resolve);
1372
- this.reject = aFunction(reject);
1739
+ this.resolve = aCallable(resolve);
1740
+ this.reject = aCallable(reject);
1373
1741
  };
1374
1742
 
1375
1743
  // `NewPromiseCapability` abstract operation
@@ -1394,7 +1762,7 @@ var promiseResolve = function (C, x) {
1394
1762
  var hostReportErrors = function (a, b) {
1395
1763
  var console = global_1.console;
1396
1764
  if (console && console.error) {
1397
- arguments.length === 1 ? console.error(a) : console.error(a, b);
1765
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
1398
1766
  }
1399
1767
  };
1400
1768
 
@@ -1423,19 +1791,21 @@ var task = task$1.set;
1423
1791
 
1424
1792
  var SPECIES$2 = wellKnownSymbol('species');
1425
1793
  var PROMISE = 'Promise';
1794
+
1426
1795
  var getInternalState = internalState.get;
1427
1796
  var setInternalState = internalState.set;
1428
1797
  var getInternalPromiseState = internalState.getterFor(PROMISE);
1429
1798
  var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
1430
1799
  var PromiseConstructor = nativePromiseConstructor;
1431
- var PromiseConstructorPrototype = NativePromisePrototype;
1432
- var TypeError$1 = global_1.TypeError;
1800
+ var PromisePrototype = NativePromisePrototype;
1801
+ var TypeError$2 = global_1.TypeError;
1433
1802
  var document$1 = global_1.document;
1434
1803
  var process$1 = global_1.process;
1435
1804
  var newPromiseCapability = newPromiseCapability$1.f;
1436
1805
  var newGenericPromiseCapability = newPromiseCapability;
1806
+
1437
1807
  var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
1438
- var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
1808
+ var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
1439
1809
  var UNHANDLED_REJECTION = 'unhandledrejection';
1440
1810
  var REJECTION_HANDLED = 'rejectionhandled';
1441
1811
  var PENDING = 0;
@@ -1444,6 +1814,7 @@ var REJECTED = 2;
1444
1814
  var HANDLED = 1;
1445
1815
  var UNHANDLED = 2;
1446
1816
  var SUBCLASSING = false;
1817
+
1447
1818
  var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1448
1819
 
1449
1820
  var FORCED$1 = isForced_1(PROMISE, function () {
@@ -1477,7 +1848,7 @@ var INCORRECT_ITERATION = FORCED$1 || !checkCorrectnessOfIteration(function (ite
1477
1848
  // helpers
1478
1849
  var isThenable = function (it) {
1479
1850
  var then;
1480
- return isObject$1(it) && typeof (then = it.then) == 'function' ? then : false;
1851
+ return isObject$1(it) && isCallable(then = it.then) ? then : false;
1481
1852
  };
1482
1853
 
1483
1854
  var notify = function (state, isReject) {
@@ -1512,9 +1883,9 @@ var notify = function (state, isReject) {
1512
1883
  }
1513
1884
  }
1514
1885
  if (result === reaction.promise) {
1515
- reject(TypeError$1('Promise-chain cycle'));
1886
+ reject(TypeError$2('Promise-chain cycle'));
1516
1887
  } else if (then = isThenable(result)) {
1517
- then.call(result, resolve, reject);
1888
+ functionCall(then, result, resolve, reject);
1518
1889
  } else resolve(result);
1519
1890
  } else reject(value);
1520
1891
  } catch (error) {
@@ -1542,7 +1913,7 @@ var dispatchEvent = function (name, promise, reason) {
1542
1913
  };
1543
1914
 
1544
1915
  var onUnhandled = function (state) {
1545
- task.call(global_1, function () {
1916
+ functionCall(task, global_1, function () {
1546
1917
  var promise = state.facade;
1547
1918
  var value = state.value;
1548
1919
  var IS_UNHANDLED = isUnhandled(state);
@@ -1565,7 +1936,7 @@ var isUnhandled = function (state) {
1565
1936
  };
1566
1937
 
1567
1938
  var onHandleUnhandled = function (state) {
1568
- task.call(global_1, function () {
1939
+ functionCall(task, global_1, function () {
1569
1940
  var promise = state.facade;
1570
1941
  if (engineIsNode) {
1571
1942
  process$1.emit('rejectionHandled', promise);
@@ -1593,13 +1964,13 @@ var internalResolve = function (state, value, unwrap) {
1593
1964
  state.done = true;
1594
1965
  if (unwrap) state = unwrap;
1595
1966
  try {
1596
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1967
+ if (state.facade === value) throw TypeError$2("Promise can't be resolved itself");
1597
1968
  var then = isThenable(value);
1598
1969
  if (then) {
1599
1970
  microtask(function () {
1600
1971
  var wrapper = { done: false };
1601
1972
  try {
1602
- then.call(value,
1973
+ functionCall(then, value,
1603
1974
  bind$1(internalResolve, wrapper, state),
1604
1975
  bind$1(internalReject, wrapper, state)
1605
1976
  );
@@ -1621,9 +1992,9 @@ var internalResolve = function (state, value, unwrap) {
1621
1992
  if (FORCED$1) {
1622
1993
  // 25.4.3.1 Promise(executor)
1623
1994
  PromiseConstructor = function Promise(executor) {
1624
- anInstance(this, PromiseConstructor, PROMISE);
1625
- aFunction(executor);
1626
- Internal.call(this);
1995
+ anInstance(this, PromisePrototype);
1996
+ aCallable(executor);
1997
+ functionCall(Internal, this);
1627
1998
  var state = getInternalState(this);
1628
1999
  try {
1629
2000
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -1631,7 +2002,7 @@ if (FORCED$1) {
1631
2002
  internalReject(state, error);
1632
2003
  }
1633
2004
  };
1634
- PromiseConstructorPrototype = PromiseConstructor.prototype;
2005
+ PromisePrototype = PromiseConstructor.prototype;
1635
2006
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1636
2007
  Internal = function Promise(executor) {
1637
2008
  setInternalState(this, {
@@ -1645,17 +2016,18 @@ if (FORCED$1) {
1645
2016
  value: undefined
1646
2017
  });
1647
2018
  };
1648
- Internal.prototype = redefineAll(PromiseConstructorPrototype, {
2019
+ Internal.prototype = redefineAll(PromisePrototype, {
1649
2020
  // `Promise.prototype.then` method
1650
2021
  // https://tc39.es/ecma262/#sec-promise.prototype.then
1651
2022
  then: function then(onFulfilled, onRejected) {
1652
2023
  var state = getInternalPromiseState(this);
2024
+ var reactions = state.reactions;
1653
2025
  var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
1654
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
1655
- reaction.fail = typeof onRejected == 'function' && onRejected;
2026
+ reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
2027
+ reaction.fail = isCallable(onRejected) && onRejected;
1656
2028
  reaction.domain = engineIsNode ? process$1.domain : undefined;
1657
2029
  state.parent = true;
1658
- state.reactions.push(reaction);
2030
+ reactions[reactions.length] = reaction;
1659
2031
  if (state.state != PENDING) notify(state, false);
1660
2032
  return reaction.promise;
1661
2033
  },
@@ -1678,7 +2050,7 @@ if (FORCED$1) {
1678
2050
  : newGenericPromiseCapability(C);
1679
2051
  };
1680
2052
 
1681
- if (typeof nativePromiseConstructor == 'function' && NativePromisePrototype !== Object.prototype) {
2053
+ if (isCallable(nativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
1682
2054
  nativeThen = NativePromisePrototype.then;
1683
2055
 
1684
2056
  if (!SUBCLASSING) {
@@ -1686,13 +2058,13 @@ if (FORCED$1) {
1686
2058
  redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
1687
2059
  var that = this;
1688
2060
  return new PromiseConstructor(function (resolve, reject) {
1689
- nativeThen.call(that, resolve, reject);
2061
+ functionCall(nativeThen, that, resolve, reject);
1690
2062
  }).then(onFulfilled, onRejected);
1691
2063
  // https://github.com/zloirock/core-js/issues/640
1692
2064
  }, { unsafe: true });
1693
2065
 
1694
2066
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
1695
- redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
2067
+ redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
1696
2068
  }
1697
2069
 
1698
2070
  // make `.constructor === Promise` work for native promise-based APIs
@@ -1702,7 +2074,7 @@ if (FORCED$1) {
1702
2074
 
1703
2075
  // make `instanceof Promise` work for native promise-based APIs
1704
2076
  if (objectSetPrototypeOf) {
1705
- objectSetPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
2077
+ objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
1706
2078
  }
1707
2079
  }
1708
2080
  }
@@ -1722,7 +2094,7 @@ _export({ target: PROMISE, stat: true, forced: FORCED$1 }, {
1722
2094
  // https://tc39.es/ecma262/#sec-promise.reject
1723
2095
  reject: function reject(r) {
1724
2096
  var capability = newPromiseCapability(this);
1725
- capability.reject.call(undefined, r);
2097
+ functionCall(capability.reject, undefined, r);
1726
2098
  return capability.promise;
1727
2099
  }
1728
2100
  });
@@ -1744,16 +2116,15 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1744
2116
  var resolve = capability.resolve;
1745
2117
  var reject = capability.reject;
1746
2118
  var result = perform(function () {
1747
- var $promiseResolve = aFunction(C.resolve);
2119
+ var $promiseResolve = aCallable(C.resolve);
1748
2120
  var values = [];
1749
2121
  var counter = 0;
1750
2122
  var remaining = 1;
1751
2123
  iterate(iterable, function (promise) {
1752
2124
  var index = counter++;
1753
2125
  var alreadyCalled = false;
1754
- values.push(undefined);
1755
2126
  remaining++;
1756
- $promiseResolve.call(C, promise).then(function (value) {
2127
+ functionCall($promiseResolve, C, promise).then(function (value) {
1757
2128
  if (alreadyCalled) return;
1758
2129
  alreadyCalled = true;
1759
2130
  values[index] = value;
@@ -1772,9 +2143,9 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1772
2143
  var capability = newPromiseCapability(C);
1773
2144
  var reject = capability.reject;
1774
2145
  var result = perform(function () {
1775
- var $promiseResolve = aFunction(C.resolve);
2146
+ var $promiseResolve = aCallable(C.resolve);
1776
2147
  iterate(iterable, function (promise) {
1777
- $promiseResolve.call(C, promise).then(capability.resolve, reject);
2148
+ functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
1778
2149
  });
1779
2150
  });
1780
2151
  if (result.error) reject(result.value);
@@ -1786,6 +2157,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1786
2157
  var $assign = Object.assign;
1787
2158
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1788
2159
  var defineProperty$1 = Object.defineProperty;
2160
+ var concat = functionUncurryThis([].concat);
1789
2161
 
1790
2162
  // `Object.assign` method
1791
2163
  // https://tc39.es/ecma262/#sec-object.assign
@@ -1817,13 +2189,13 @@ var objectAssign = !$assign || fails(function () {
1817
2189
  var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1818
2190
  while (argumentsLength > index) {
1819
2191
  var S = indexedObject(arguments[index++]);
1820
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
2192
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1821
2193
  var length = keys.length;
1822
2194
  var j = 0;
1823
2195
  var key;
1824
2196
  while (length > j) {
1825
2197
  key = keys[j++];
1826
- if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
2198
+ if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
1827
2199
  }
1828
2200
  } return T;
1829
2201
  } : $assign;
@@ -1838,8 +2210,8 @@ _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }
1838
2210
  // `IsArray` abstract operation
1839
2211
  // https://tc39.es/ecma262/#sec-isarray
1840
2212
  // eslint-disable-next-line es/no-array-isarray -- safe
1841
- var isArray$1 = Array.isArray || function isArray(arg) {
1842
- return classofRaw(arg) == 'Array';
2213
+ var isArray$1 = Array.isArray || function isArray(argument) {
2214
+ return classofRaw(argument) == 'Array';
1843
2215
  };
1844
2216
 
1845
2217
  var createProperty = function (object, key, value) {
@@ -1849,6 +2221,7 @@ var createProperty = function (object, key, value) {
1849
2221
  };
1850
2222
 
1851
2223
  var SPECIES$1 = wellKnownSymbol('species');
2224
+ var Array$1 = global_1.Array;
1852
2225
 
1853
2226
  // a part of `ArraySpeciesCreate` abstract operation
1854
2227
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
@@ -1857,12 +2230,12 @@ var arraySpeciesConstructor = function (originalArray) {
1857
2230
  if (isArray$1(originalArray)) {
1858
2231
  C = originalArray.constructor;
1859
2232
  // cross-realm fallback
1860
- if (typeof C == 'function' && (C === Array || isArray$1(C.prototype))) C = undefined;
2233
+ if (isConstructor(C) && (C === Array$1 || isArray$1(C.prototype))) C = undefined;
1861
2234
  else if (isObject$1(C)) {
1862
2235
  C = C[SPECIES$1];
1863
2236
  if (C === null) C = undefined;
1864
2237
  }
1865
- } return C === undefined ? Array : C;
2238
+ } return C === undefined ? Array$1 : C;
1866
2239
  };
1867
2240
 
1868
2241
  // `ArraySpeciesCreate` abstract operation
@@ -1890,6 +2263,7 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1890
2263
  var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1891
2264
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1892
2265
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
2266
+ var TypeError$1 = global_1.TypeError;
1893
2267
 
1894
2268
  // We can't use this feature detection in V8 since it causes
1895
2269
  // deoptimization and serious performance degradation
@@ -1923,11 +2297,11 @@ _export({ target: 'Array', proto: true, forced: FORCED }, {
1923
2297
  for (i = -1, length = arguments.length; i < length; i++) {
1924
2298
  E = i === -1 ? O : arguments[i];
1925
2299
  if (isConcatSpreadable(E)) {
1926
- len = toLength(E.length);
1927
- if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
2300
+ len = lengthOfArrayLike(E);
2301
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1928
2302
  for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1929
2303
  } else {
1930
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
2304
+ if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1931
2305
  createProperty(A, n++, E);
1932
2306
  }
1933
2307
  }
@@ -1946,21 +2320,24 @@ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
1946
2320
  }
1947
2321
  });
1948
2322
 
2323
+ var FUNCTION_NAME_EXISTS = functionName.EXISTS;
2324
+
1949
2325
  var defineProperty = objectDefineProperty.f;
1950
2326
 
1951
2327
  var FunctionPrototype = Function.prototype;
1952
- var FunctionPrototypeToString = FunctionPrototype.toString;
2328
+ var functionToString = functionUncurryThis(FunctionPrototype.toString);
1953
2329
  var nameRE = /^\s*function ([^ (]*)/;
2330
+ var regExpExec = functionUncurryThis(nameRE.exec);
1954
2331
  var NAME = 'name';
1955
2332
 
1956
2333
  // Function instances `.name` property
1957
2334
  // https://tc39.es/ecma262/#sec-function-instances-name
1958
- if (descriptors && !(NAME in FunctionPrototype)) {
2335
+ if (descriptors && !FUNCTION_NAME_EXISTS) {
1959
2336
  defineProperty(FunctionPrototype, NAME, {
1960
2337
  configurable: true,
1961
2338
  get: function () {
1962
2339
  try {
1963
- return FunctionPrototypeToString.call(this).match(nameRE)[1];
2340
+ return regExpExec(nameRE, functionToString(this))[1];
1964
2341
  } catch (error) {
1965
2342
  return '';
1966
2343
  }
@@ -2004,7 +2381,15 @@ var domIterables = {
2004
2381
  TouchList: 0
2005
2382
  };
2006
2383
 
2007
- var push = [].push;
2384
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
2385
+
2386
+
2387
+ var classList = documentCreateElement('span').classList;
2388
+ var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
2389
+
2390
+ var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
2391
+
2392
+ var push = functionUncurryThis([].push);
2008
2393
 
2009
2394
  // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
2010
2395
  var createMethod = function (TYPE) {
@@ -2018,8 +2403,8 @@ var createMethod = function (TYPE) {
2018
2403
  return function ($this, callbackfn, that, specificCreate) {
2019
2404
  var O = toObject($this);
2020
2405
  var self = indexedObject(O);
2021
- var boundFunction = functionBindContext(callbackfn, that, 3);
2022
- var length = toLength(self.length);
2406
+ var boundFunction = functionBindContext(callbackfn, that);
2407
+ var length = lengthOfArrayLike(self);
2023
2408
  var index = 0;
2024
2409
  var create = specificCreate || arraySpeciesCreate;
2025
2410
  var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
@@ -2033,10 +2418,10 @@ var createMethod = function (TYPE) {
2033
2418
  case 3: return true; // some
2034
2419
  case 5: return value; // find
2035
2420
  case 6: return index; // findIndex
2036
- case 2: push.call(target, value); // filter
2421
+ case 2: push(target, value); // filter
2037
2422
  } else switch (TYPE) {
2038
2423
  case 4: return false; // every
2039
- case 7: push.call(target, value); // filterReject
2424
+ case 7: push(target, value); // filterReject
2040
2425
  }
2041
2426
  }
2042
2427
  }
@@ -2083,17 +2468,23 @@ var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */)
2083
2468
  // eslint-disable-next-line es/no-array-prototype-foreach -- safe
2084
2469
  } : [].forEach;
2085
2470
 
2086
- for (var COLLECTION_NAME in domIterables) {
2087
- var Collection = global_1[COLLECTION_NAME];
2088
- var CollectionPrototype = Collection && Collection.prototype;
2471
+ var handlePrototype = function (CollectionPrototype) {
2089
2472
  // some Chrome versions have non-configurable methods on DOMTokenList
2090
2473
  if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
2091
2474
  createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
2092
2475
  } catch (error) {
2093
2476
  CollectionPrototype.forEach = arrayForEach;
2094
2477
  }
2478
+ };
2479
+
2480
+ for (var COLLECTION_NAME in domIterables) {
2481
+ if (domIterables[COLLECTION_NAME]) {
2482
+ handlePrototype(global_1[COLLECTION_NAME] && global_1[COLLECTION_NAME].prototype);
2483
+ }
2095
2484
  }
2096
2485
 
2486
+ handlePrototype(domTokenListPrototype);
2487
+
2097
2488
  var bind = function bind(fn, thisArg) {
2098
2489
  return function wrap() {
2099
2490
  var args = new Array(arguments.length);