@tryghost/content-api 1.5.10 → 1.5.14

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,41 +130,220 @@ 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
- // `ToPrimitive` abstract operation
115
- // https://tc39.es/ecma262/#sec-toprimitive
116
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
117
- // and the second argument - flag - preferred type is a string
118
- var toPrimitive = function (input, PREFERRED_STRING) {
119
- if (!isObject$1(input)) return input;
143
+ var aFunction = function (argument) {
144
+ return isCallable(argument) ? argument : undefined;
145
+ };
146
+
147
+ var getBuiltIn = function (namespace, method) {
148
+ return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
149
+ };
150
+
151
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
152
+
153
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
154
+
155
+ var process$4 = global_1.process;
156
+ var Deno = global_1.Deno;
157
+ var versions = process$4 && process$4.versions || Deno && Deno.version;
158
+ var v8 = versions && versions.v8;
159
+ var match, version;
160
+
161
+ if (v8) {
162
+ match = v8.split('.');
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) {
171
+ match = engineUserAgent.match(/Edge\/(\d+)/);
172
+ if (!match || match[1] >= 74) {
173
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
174
+ if (match) version = +match[1];
175
+ }
176
+ }
177
+
178
+ var engineV8Version = version;
179
+
180
+ /* eslint-disable es/no-symbol -- required for testing */
181
+
182
+
183
+
184
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
185
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
186
+ var symbol = Symbol();
187
+ // Chrome 38 Symbol has incorrect toString conversion
188
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
189
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
190
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
191
+ !Symbol.sham && engineV8Version && engineV8Version < 41;
192
+ });
193
+
194
+ /* eslint-disable es/no-symbol -- required for testing */
195
+
196
+
197
+ var useSymbolAsUid = nativeSymbol
198
+ && !Symbol.sham
199
+ && typeof Symbol.iterator == 'symbol';
200
+
201
+ var Object$3 = global_1.Object;
202
+
203
+ var isSymbol = useSymbolAsUid ? function (it) {
204
+ return typeof it == 'symbol';
205
+ } : function (it) {
206
+ var $Symbol = getBuiltIn('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');
226
+ };
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
+
237
+ // `OrdinaryToPrimitive` abstract operation
238
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
239
+ var ordinaryToPrimitive = function (input, pref) {
120
240
  var fn, val;
121
- if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$1(val = fn.call(input))) return val;
122
- if (typeof (fn = input.valueOf) == 'function' && !isObject$1(val = fn.call(input))) return val;
123
- if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$1(val = fn.call(input))) return val;
124
- 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");
125
245
  };
126
246
 
247
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
248
+ var defineProperty$3 = Object.defineProperty;
249
+
250
+ var setGlobal = function (key, value) {
251
+ try {
252
+ defineProperty$3(global_1, key, { value: value, configurable: true, writable: true });
253
+ } catch (error) {
254
+ global_1[key] = value;
255
+ } return value;
256
+ };
257
+
258
+ var SHARED = '__core-js_shared__';
259
+ var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
260
+
261
+ var sharedStore = store$1;
262
+
263
+ var shared = createCommonjsModule(function (module) {
264
+ (module.exports = function (key, value) {
265
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
266
+ })('versions', []).push({
267
+ version: '3.19.1',
268
+ mode: 'global',
269
+ copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
270
+ });
271
+ });
272
+
273
+ var Object$2 = global_1.Object;
274
+
127
275
  // `ToObject` abstract operation
128
276
  // https://tc39.es/ecma262/#sec-toobject
129
277
  var toObject = function (argument) {
130
- return Object(requireObjectCoercible(argument));
278
+ return Object$2(requireObjectCoercible(argument));
131
279
  };
132
280
 
133
- var hasOwnProperty = {}.hasOwnProperty;
281
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
134
282
 
135
- var has$1 = Object.hasOwn || function hasOwn(it, key) {
136
- 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);
287
+ };
288
+
289
+ var id = 0;
290
+ var postfix = Math.random();
291
+ var toString$1 = functionUncurryThis(1.0.toString);
292
+
293
+ var uid = function (key) {
294
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$1(++id + postfix, 36);
295
+ };
296
+
297
+ var WellKnownSymbolsStore = shared('wks');
298
+ var Symbol$1 = global_1.Symbol;
299
+ var symbolFor = Symbol$1 && Symbol$1['for'];
300
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
301
+
302
+ var wellKnownSymbol = function (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)) {
306
+ WellKnownSymbolsStore[name] = Symbol$1[name];
307
+ } else if (useSymbolAsUid && symbolFor) {
308
+ WellKnownSymbolsStore[name] = symbolFor(description);
309
+ } else {
310
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
311
+ }
312
+ } return WellKnownSymbolsStore[name];
313
+ };
314
+
315
+ var TypeError$c = global_1.TypeError;
316
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
317
+
318
+ // `ToPrimitive` abstract operation
319
+ // https://tc39.es/ecma262/#sec-toprimitive
320
+ var toPrimitive = function (input, pref) {
321
+ if (!isObject$1(input) || isSymbol(input)) return input;
322
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
323
+ var result;
324
+ if (exoticToPrim) {
325
+ if (pref === undefined) pref = 'default';
326
+ result = functionCall(exoticToPrim, input, pref);
327
+ if (!isObject$1(result) || isSymbol(result)) return result;
328
+ throw TypeError$c("Can't convert object to primitive value");
329
+ }
330
+ if (pref === undefined) pref = 'number';
331
+ return ordinaryToPrimitive(input, pref);
332
+ };
333
+
334
+ // `ToPropertyKey` abstract operation
335
+ // https://tc39.es/ecma262/#sec-topropertykey
336
+ var toPropertyKey = function (argument) {
337
+ var key = toPrimitive(argument, 'string');
338
+ return isSymbol(key) ? key : key + '';
137
339
  };
138
340
 
139
341
  var document$3 = global_1.document;
140
342
  // typeof document.createElement is 'object' in old IE
141
- var EXISTS = isObject$1(document$3) && isObject$1(document$3.createElement);
343
+ var EXISTS$1 = isObject$1(document$3) && isObject$1(document$3.createElement);
142
344
 
143
345
  var documentCreateElement = function (it) {
144
- return EXISTS ? document$3.createElement(it) : {};
346
+ return EXISTS$1 ? document$3.createElement(it) : {};
145
347
  };
146
348
 
147
349
  // Thank's IE8 for his funny defineProperty
@@ -159,23 +361,27 @@ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
159
361
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
160
362
  var f$4 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
161
363
  O = toIndexedObject(O);
162
- P = toPrimitive(P, true);
364
+ P = toPropertyKey(P);
163
365
  if (ie8DomDefine) try {
164
366
  return $getOwnPropertyDescriptor(O, P);
165
367
  } catch (error) { /* empty */ }
166
- 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]);
167
369
  };
168
370
 
169
371
  var objectGetOwnPropertyDescriptor = {
170
372
  f: f$4
171
373
  };
172
374
 
173
- var anObject = function (it) {
174
- if (!isObject$1(it)) {
175
- throw TypeError(String(it) + ' is not an object');
176
- } 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');
177
382
  };
178
383
 
384
+ var TypeError$a = global_1.TypeError;
179
385
  // eslint-disable-next-line es/no-object-defineproperty -- safe
180
386
  var $defineProperty = Object.defineProperty;
181
387
 
@@ -183,12 +389,12 @@ var $defineProperty = Object.defineProperty;
183
389
  // https://tc39.es/ecma262/#sec-object.defineproperty
184
390
  var f$3 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
185
391
  anObject(O);
186
- P = toPrimitive(P, true);
392
+ P = toPropertyKey(P);
187
393
  anObject(Attributes);
188
394
  if (ie8DomDefine) try {
189
395
  return $defineProperty(O, P, Attributes);
190
396
  } catch (error) { /* empty */ }
191
- 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');
192
398
  if ('value' in Attributes) O[P] = Attributes.value;
193
399
  return O;
194
400
  };
@@ -204,25 +410,12 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
204
410
  return object;
205
411
  };
206
412
 
207
- var setGlobal = function (key, value) {
208
- try {
209
- createNonEnumerableProperty(global_1, key, value);
210
- } catch (error) {
211
- global_1[key] = value;
212
- } return value;
213
- };
214
-
215
- var SHARED = '__core-js_shared__';
216
- var store$1 = global_1[SHARED] || setGlobal(SHARED, {});
217
-
218
- var sharedStore = store$1;
219
-
220
- var functionToString = Function.toString;
413
+ var functionToString$1 = functionUncurryThis(Function.toString);
221
414
 
222
415
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
223
- if (typeof sharedStore.inspectSource != 'function') {
416
+ if (!isCallable(sharedStore.inspectSource)) {
224
417
  sharedStore.inspectSource = function (it) {
225
- return functionToString.call(it);
418
+ return functionToString$1(it);
226
419
  };
227
420
  }
228
421
 
@@ -230,24 +423,7 @@ var inspectSource = sharedStore.inspectSource;
230
423
 
231
424
  var WeakMap$1 = global_1.WeakMap;
232
425
 
233
- var nativeWeakMap = typeof WeakMap$1 === 'function' && /native code/.test(inspectSource(WeakMap$1));
234
-
235
- var shared = createCommonjsModule(function (module) {
236
- (module.exports = function (key, value) {
237
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
238
- })('versions', []).push({
239
- version: '3.15.2',
240
- mode: 'global',
241
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
242
- });
243
- });
244
-
245
- var id = 0;
246
- var postfix = Math.random();
247
-
248
- var uid = function (key) {
249
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
250
- };
426
+ var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
251
427
 
252
428
  var keys = shared('keys');
253
429
 
@@ -258,6 +434,7 @@ var sharedKey = function (key) {
258
434
  var hiddenKeys$1 = {};
259
435
 
260
436
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
437
+ var TypeError$9 = global_1.TypeError;
261
438
  var WeakMap = global_1.WeakMap;
262
439
  var set$1, get, has;
263
440
 
@@ -269,42 +446,42 @@ var getterFor = function (TYPE) {
269
446
  return function (it) {
270
447
  var state;
271
448
  if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
272
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
449
+ throw TypeError$9('Incompatible receiver, ' + TYPE + ' required');
273
450
  } return state;
274
451
  };
275
452
  };
276
453
 
277
454
  if (nativeWeakMap || sharedStore.state) {
278
455
  var store = sharedStore.state || (sharedStore.state = new WeakMap());
279
- var wmget = store.get;
280
- var wmhas = store.has;
281
- var wmset = store.set;
456
+ var wmget = functionUncurryThis(store.get);
457
+ var wmhas = functionUncurryThis(store.has);
458
+ var wmset = functionUncurryThis(store.set);
282
459
  set$1 = function (it, metadata) {
283
- if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
460
+ if (wmhas(store, it)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
284
461
  metadata.facade = it;
285
- wmset.call(store, it, metadata);
462
+ wmset(store, it, metadata);
286
463
  return metadata;
287
464
  };
288
465
  get = function (it) {
289
- return wmget.call(store, it) || {};
466
+ return wmget(store, it) || {};
290
467
  };
291
468
  has = function (it) {
292
- return wmhas.call(store, it);
469
+ return wmhas(store, it);
293
470
  };
294
471
  } else {
295
472
  var STATE = sharedKey('state');
296
473
  hiddenKeys$1[STATE] = true;
297
474
  set$1 = function (it, metadata) {
298
- if (has$1(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
475
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
299
476
  metadata.facade = it;
300
477
  createNonEnumerableProperty(it, STATE, metadata);
301
478
  return metadata;
302
479
  };
303
480
  get = function (it) {
304
- return has$1(it, STATE) ? it[STATE] : {};
481
+ return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
305
482
  };
306
483
  has = function (it) {
307
- return has$1(it, STATE);
484
+ return hasOwnProperty_1(it, STATE);
308
485
  };
309
486
  }
310
487
 
@@ -316,7 +493,24 @@ var internalState = {
316
493
  getterFor: getterFor
317
494
  };
318
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
+
319
511
  var redefine = createCommonjsModule(function (module) {
512
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
513
+
320
514
  var getInternalState = internalState.get;
321
515
  var enforceInternalState = internalState.enforce;
322
516
  var TEMPLATE = String(String).split('String');
@@ -325,14 +519,18 @@ var TEMPLATE = String(String).split('String');
325
519
  var unsafe = options ? !!options.unsafe : false;
326
520
  var simple = options ? !!options.enumerable : false;
327
521
  var noTargetGet = options ? !!options.noTargetGet : false;
522
+ var name = options && options.name !== undefined ? options.name : key;
328
523
  var state;
329
- if (typeof value == 'function') {
330
- if (typeof key == 'string' && !has$1(value, 'name')) {
331
- 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);
332
530
  }
333
531
  state = enforceInternalState(value);
334
532
  if (!state.source) {
335
- state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
533
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
336
534
  }
337
535
  }
338
536
  if (O === global_1) {
@@ -348,54 +546,51 @@ var TEMPLATE = String(String).split('String');
348
546
  else createNonEnumerableProperty(O, key, value);
349
547
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
350
548
  })(Function.prototype, 'toString', function toString() {
351
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
549
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
352
550
  });
353
551
  });
354
552
 
355
- var path = global_1;
356
-
357
- var aFunction$1 = function (variable) {
358
- return typeof variable == 'function' ? variable : undefined;
359
- };
360
-
361
- var getBuiltIn = function (namespace, method) {
362
- return arguments.length < 2 ? aFunction$1(path[namespace]) || aFunction$1(global_1[namespace])
363
- : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
364
- };
365
-
366
553
  var ceil = Math.ceil;
367
554
  var floor = Math.floor;
368
555
 
369
- // `ToInteger` abstract operation
370
- // https://tc39.es/ecma262/#sec-tointeger
371
- var toInteger = function (argument) {
372
- 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);
373
562
  };
374
563
 
564
+ var max = Math.max;
375
565
  var min$3 = Math.min;
376
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
+
377
577
  // `ToLength` abstract operation
378
578
  // https://tc39.es/ecma262/#sec-tolength
379
579
  var toLength = function (argument) {
380
- 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
381
581
  };
382
582
 
383
- var max = Math.max;
384
- var min$2 = Math.min;
385
-
386
- // Helper for a popular repeating case of the spec:
387
- // Let integer be ? ToInteger(index).
388
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
389
- var toAbsoluteIndex = function (index, length) {
390
- var integer = toInteger(index);
391
- 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);
392
587
  };
393
588
 
394
589
  // `Array.prototype.{ indexOf, includes }` methods implementation
395
590
  var createMethod$1 = function (IS_INCLUDES) {
396
591
  return function ($this, el, fromIndex) {
397
592
  var O = toIndexedObject($this);
398
- var length = toLength(O.length);
593
+ var length = lengthOfArrayLike(O);
399
594
  var index = toAbsoluteIndex(fromIndex, length);
400
595
  var value;
401
596
  // Array#includes uses SameValueZero equality algorithm
@@ -420,18 +615,20 @@ var arrayIncludes = {
420
615
  indexOf: createMethod$1(false)
421
616
  };
422
617
 
423
- var indexOf = arrayIncludes.indexOf;
618
+ var indexOf$1 = arrayIncludes.indexOf;
619
+
424
620
 
621
+ var push$1 = functionUncurryThis([].push);
425
622
 
426
623
  var objectKeysInternal = function (object, names) {
427
624
  var O = toIndexedObject(object);
428
625
  var i = 0;
429
626
  var result = [];
430
627
  var key;
431
- 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);
432
629
  // Don't enum bug & hidden keys
433
- while (names.length > i) if (has$1(O, key = names[i++])) {
434
- ~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);
435
632
  }
436
633
  return result;
437
634
  };
@@ -467,11 +664,13 @@ var objectGetOwnPropertySymbols = {
467
664
  f: f$1
468
665
  };
469
666
 
667
+ var concat$1 = functionUncurryThis([].concat);
668
+
470
669
  // all object keys, includes non-enumerable and symbols
471
670
  var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
472
671
  var keys = objectGetOwnPropertyNames.f(anObject(it));
473
672
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
474
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
673
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
475
674
  };
476
675
 
477
676
  var copyConstructorProperties = function (target, source) {
@@ -480,7 +679,7 @@ var copyConstructorProperties = function (target, source) {
480
679
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
481
680
  for (var i = 0; i < keys.length; i++) {
482
681
  var key = keys[i];
483
- if (!has$1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
682
+ if (!hasOwnProperty_1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
484
683
  }
485
684
  };
486
685
 
@@ -490,7 +689,7 @@ var isForced = function (feature, detection) {
490
689
  var value = data[normalize(feature)];
491
690
  return value == POLYFILL ? true
492
691
  : value == NATIVE ? false
493
- : typeof detection == 'function' ? fails(detection)
692
+ : isCallable(detection) ? fails(detection)
494
693
  : !!detection;
495
694
  };
496
695
 
@@ -524,6 +723,7 @@ var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
524
723
  options.sham - add a flag to not completely full polyfills
525
724
  options.enumerable - export as enumerable property
526
725
  options.noTargetGet - prevent calling a getter on target
726
+ options.name - the .name of the function if it does not match the key
527
727
  */
528
728
  var _export = function (options, source) {
529
729
  var TARGET = options.target;
@@ -546,7 +746,7 @@ var _export = function (options, source) {
546
746
  FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
547
747
  // contained in target
548
748
  if (!FORCED && targetProperty !== undefined) {
549
- if (typeof sourceProperty === typeof targetProperty) continue;
749
+ if (typeof sourceProperty == typeof targetProperty) continue;
550
750
  copyConstructorProperties(sourceProperty, targetProperty);
551
751
  }
552
752
  // add a flag to not completely full polyfills
@@ -566,7 +766,7 @@ var arrayMethodIsStrict = function (METHOD_NAME, argument) {
566
766
  });
567
767
  };
568
768
 
569
- var nativeJoin = [].join;
769
+ var un$Join = functionUncurryThis([].join);
570
770
 
571
771
  var ES3_STRINGS = indexedObject != Object;
572
772
  var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
@@ -575,65 +775,10 @@ var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
575
775
  // https://tc39.es/ecma262/#sec-array.prototype.join
576
776
  _export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
577
777
  join: function join(separator) {
578
- return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
778
+ return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
579
779
  }
580
780
  });
581
781
 
582
- var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
583
-
584
- var process$4 = global_1.process;
585
- var versions = process$4 && process$4.versions;
586
- var v8 = versions && versions.v8;
587
- var match, version;
588
-
589
- if (v8) {
590
- match = v8.split('.');
591
- version = match[0] < 4 ? 1 : match[0] + match[1];
592
- } else if (engineUserAgent) {
593
- match = engineUserAgent.match(/Edge\/(\d+)/);
594
- if (!match || match[1] >= 74) {
595
- match = engineUserAgent.match(/Chrome\/(\d+)/);
596
- if (match) version = match[1];
597
- }
598
- }
599
-
600
- var engineV8Version = version && +version;
601
-
602
- /* eslint-disable es/no-symbol -- required for testing */
603
-
604
-
605
-
606
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
607
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
608
- var symbol = Symbol();
609
- // Chrome 38 Symbol has incorrect toString conversion
610
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
611
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
612
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
613
- !Symbol.sham && engineV8Version && engineV8Version < 41;
614
- });
615
-
616
- /* eslint-disable es/no-symbol -- required for testing */
617
-
618
-
619
- var useSymbolAsUid = nativeSymbol
620
- && !Symbol.sham
621
- && typeof Symbol.iterator == 'symbol';
622
-
623
- var WellKnownSymbolsStore = shared('wks');
624
- var Symbol$1 = global_1.Symbol;
625
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
626
-
627
- var wellKnownSymbol = function (name) {
628
- if (!has$1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
629
- if (nativeSymbol && has$1(Symbol$1, name)) {
630
- WellKnownSymbolsStore[name] = Symbol$1[name];
631
- } else {
632
- WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
633
- }
634
- } return WellKnownSymbolsStore[name];
635
- };
636
-
637
782
  // `Object.keys` method
638
783
  // https://tc39.es/ecma262/#sec-object.keys
639
784
  // eslint-disable-next-line es/no-object-keys -- safe
@@ -646,16 +791,26 @@ var objectKeys = Object.keys || function keys(O) {
646
791
  // eslint-disable-next-line es/no-object-defineproperties -- safe
647
792
  var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
648
793
  anObject(O);
794
+ var props = toIndexedObject(Properties);
649
795
  var keys = objectKeys(Properties);
650
796
  var length = keys.length;
651
797
  var index = 0;
652
798
  var key;
653
- while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
799
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
654
800
  return O;
655
801
  };
656
802
 
657
803
  var html = getBuiltIn('document', 'documentElement');
658
804
 
805
+ /* global ActiveXObject -- old IE, WSH */
806
+
807
+
808
+
809
+
810
+
811
+
812
+
813
+
659
814
  var GT = '>';
660
815
  var LT = '<';
661
816
  var PROTOTYPE = 'prototype';
@@ -702,10 +857,13 @@ var NullProtoObjectViaIFrame = function () {
702
857
  var activeXDocument;
703
858
  var NullProtoObject = function () {
704
859
  try {
705
- /* global ActiveXObject -- old IE */
706
- activeXDocument = document.domain && new ActiveXObject('htmlfile');
860
+ activeXDocument = new ActiveXObject('htmlfile');
707
861
  } catch (error) { /* ignore */ }
708
- NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
862
+ NullProtoObject = typeof document != 'undefined'
863
+ ? document.domain && activeXDocument
864
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
865
+ : NullProtoObjectViaIFrame()
866
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
709
867
  var length = enumBugKeys.length;
710
868
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
711
869
  return NullProtoObject();
@@ -758,6 +916,221 @@ _export({ target: 'Array', proto: true }, {
758
916
  // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
759
917
  addToUnscopables('includes');
760
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
+
953
+ var toString_1 = function (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;
970
+ };
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
+
761
1134
  var MATCH$1 = wellKnownSymbol('match');
762
1135
 
763
1136
  // `IsRegExp` abstract operation
@@ -767,9 +1140,11 @@ var isRegexp = function (it) {
767
1140
  return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
768
1141
  };
769
1142
 
1143
+ var TypeError$8 = global_1.TypeError;
1144
+
770
1145
  var notARegexp = function (it) {
771
1146
  if (isRegexp(it)) {
772
- throw TypeError("The method doesn't accept regular expressions");
1147
+ throw TypeError$8("The method doesn't accept regular expressions");
773
1148
  } return it;
774
1149
  };
775
1150
 
@@ -794,8 +1169,10 @@ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
794
1169
 
795
1170
 
796
1171
 
1172
+
797
1173
  // eslint-disable-next-line es/no-string-prototype-endswith -- safe
798
- var $endsWith = ''.endsWith;
1174
+ var un$EndsWith = functionUncurryThis(''.endsWith);
1175
+ var slice = functionUncurryThis(''.slice);
799
1176
  var min$1 = Math.min;
800
1177
 
801
1178
  var CORRECT_IS_REGEXP_LOGIC$1 = correctIsRegexpLogic('endsWith');
@@ -809,15 +1186,15 @@ var MDN_POLYFILL_BUG$1 = !CORRECT_IS_REGEXP_LOGIC$1 && !!function () {
809
1186
  // https://tc39.es/ecma262/#sec-string.prototype.endswith
810
1187
  _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG$1 && !CORRECT_IS_REGEXP_LOGIC$1 }, {
811
1188
  endsWith: function endsWith(searchString /* , endPosition = @length */) {
812
- var that = String(requireObjectCoercible(this));
1189
+ var that = toString_1(requireObjectCoercible(this));
813
1190
  notARegexp(searchString);
814
1191
  var endPosition = arguments.length > 1 ? arguments[1] : undefined;
815
- var len = toLength(that.length);
1192
+ var len = that.length;
816
1193
  var end = endPosition === undefined ? len : min$1(toLength(endPosition), len);
817
- var search = String(searchString);
818
- return $endsWith
819
- ? $endsWith.call(that, search, end)
820
- : that.slice(end - search.length, end) === search;
1194
+ var search = toString_1(searchString);
1195
+ return un$EndsWith
1196
+ ? un$EndsWith(that, search, end)
1197
+ : slice(that, end - search.length, end) === search;
821
1198
  }
822
1199
  });
823
1200
 
@@ -828,8 +1205,10 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
828
1205
 
829
1206
 
830
1207
 
1208
+
831
1209
  // eslint-disable-next-line es/no-string-prototype-startswith -- safe
832
- var $startsWith = ''.startsWith;
1210
+ var un$StartsWith = functionUncurryThis(''.startsWith);
1211
+ var stringSlice = functionUncurryThis(''.slice);
833
1212
  var min = Math.min;
834
1213
 
835
1214
  var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith');
@@ -843,46 +1222,16 @@ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
843
1222
  // https://tc39.es/ecma262/#sec-string.prototype.startswith
844
1223
  _export({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
845
1224
  startsWith: function startsWith(searchString /* , position = 0 */) {
846
- var that = String(requireObjectCoercible(this));
1225
+ var that = toString_1(requireObjectCoercible(this));
847
1226
  notARegexp(searchString);
848
1227
  var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
849
- var search = String(searchString);
850
- return $startsWith
851
- ? $startsWith.call(that, search, index)
852
- : that.slice(index, index + search.length) === search;
1228
+ var search = toString_1(searchString);
1229
+ return un$StartsWith
1230
+ ? un$StartsWith(that, search, index)
1231
+ : stringSlice(that, index, index + search.length) === search;
853
1232
  }
854
1233
  });
855
1234
 
856
- var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
857
- var test = {};
858
-
859
- test[TO_STRING_TAG$2] = 'z';
860
-
861
- var toStringTagSupport = String(test) === '[object z]';
862
-
863
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
864
- // ES3 wrong here
865
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
866
-
867
- // fallback for IE11 Script Access Denied error
868
- var tryGet = function (it, key) {
869
- try {
870
- return it[key];
871
- } catch (error) { /* empty */ }
872
- };
873
-
874
- // getting tag from ES6+ `Object.prototype.toString`
875
- var classof = toStringTagSupport ? classofRaw : function (it) {
876
- var O, tag, result;
877
- return it === undefined ? 'Undefined' : it === null ? 'Null'
878
- // @@toStringTag case
879
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$1)) == 'string' ? tag
880
- // builtinTag case
881
- : CORRECT_ARGUMENTS ? classofRaw(O)
882
- // ES3 arguments fallback
883
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
884
- };
885
-
886
1235
  // `Object.prototype.toString` method implementation
887
1236
  // https://tc39.es/ecma262/#sec-object.prototype.tostring
888
1237
  var objectToString = toStringTagSupport ? {}.toString : function toString() {
@@ -902,16 +1251,19 @@ var redefineAll = function (target, src, options) {
902
1251
  return target;
903
1252
  };
904
1253
 
905
- var aPossiblePrototype = function (it) {
906
- if (!isObject$1(it) && it !== null) {
907
- throw TypeError("Can't set " + String(it) + ' as a prototype');
908
- } 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');
909
1260
  };
910
1261
 
911
1262
  /* eslint-disable no-proto -- safe */
912
1263
 
913
1264
 
914
1265
 
1266
+
915
1267
  // `Object.setPrototypeOf` method
916
1268
  // https://tc39.es/ecma262/#sec-object.setprototypeof
917
1269
  // Works with __proto__ only. Old v8 can't work with null proto objects.
@@ -922,14 +1274,14 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
922
1274
  var setter;
923
1275
  try {
924
1276
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
925
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
926
- setter.call(test, []);
1277
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1278
+ setter(test, []);
927
1279
  CORRECT_SETTER = test instanceof Array;
928
1280
  } catch (error) { /* empty */ }
929
1281
  return function setPrototypeOf(O, proto) {
930
1282
  anObject(O);
931
1283
  aPossiblePrototype(proto);
932
- if (CORRECT_SETTER) setter.call(O, proto);
1284
+ if (CORRECT_SETTER) setter(O, proto);
933
1285
  else O.__proto__ = proto;
934
1286
  return O;
935
1287
  };
@@ -942,7 +1294,7 @@ var defineProperty$2 = objectDefineProperty.f;
942
1294
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
943
1295
 
944
1296
  var setToStringTag = function (it, TAG, STATIC) {
945
- 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)) {
946
1298
  defineProperty$2(it, TO_STRING_TAG, { configurable: true, value: TAG });
947
1299
  }
948
1300
  };
@@ -961,16 +1313,21 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
961
1313
  }
962
1314
  };
963
1315
 
964
- var aFunction = function (it) {
965
- if (typeof it != 'function') {
966
- throw TypeError(String(it) + ' is not a function');
967
- } 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');
968
1321
  };
969
1322
 
970
- var anInstance = function (it, Constructor, name) {
971
- if (!(it instanceof Constructor)) {
972
- throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
973
- } 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
+ };
974
1331
  };
975
1332
 
976
1333
  var iterators = {};
@@ -983,59 +1340,61 @@ var isArrayIteratorMethod = function (it) {
983
1340
  return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
984
1341
  };
985
1342
 
986
- // optional / simple context binding
987
- var functionBindContext = function (fn, that, length) {
988
- aFunction(fn);
989
- if (that === undefined) return fn;
990
- switch (length) {
991
- case 0: return function () {
992
- return fn.call(that);
993
- };
994
- case 1: return function (a) {
995
- return fn.call(that, a);
996
- };
997
- case 2: return function (a, b) {
998
- return fn.call(that, a, b);
999
- };
1000
- case 3: return function (a, b, c) {
1001
- return fn.call(that, a, b, c);
1002
- };
1003
- }
1004
- return function (/* ...args */) {
1005
- return fn.apply(that, arguments);
1006
- };
1007
- };
1008
-
1009
1343
  var ITERATOR$1 = wellKnownSymbol('iterator');
1010
1344
 
1011
1345
  var getIteratorMethod = function (it) {
1012
- if (it != undefined) return it[ITERATOR$1]
1013
- || it['@@iterator']
1346
+ if (it != undefined) return getMethod(it, ITERATOR$1)
1347
+ || getMethod(it, '@@iterator')
1014
1348
  || iterators[classof(it)];
1015
1349
  };
1016
1350
 
1017
- var iteratorClose = function (iterator) {
1018
- var returnMethod = iterator['return'];
1019
- if (returnMethod !== undefined) {
1020
- 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;
1021
1372
  }
1373
+ if (kind === 'throw') throw value;
1374
+ if (innerError) throw innerResult;
1375
+ anObject(innerResult);
1376
+ return value;
1022
1377
  };
1023
1378
 
1379
+ var TypeError$4 = global_1.TypeError;
1380
+
1024
1381
  var Result = function (stopped, result) {
1025
1382
  this.stopped = stopped;
1026
1383
  this.result = result;
1027
1384
  };
1028
1385
 
1386
+ var ResultPrototype = Result.prototype;
1387
+
1029
1388
  var iterate = function (iterable, unboundFunction, options) {
1030
1389
  var that = options && options.that;
1031
1390
  var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1032
1391
  var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1033
1392
  var INTERRUPTED = !!(options && options.INTERRUPTED);
1034
- var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
1393
+ var fn = functionBindContext(unboundFunction, that);
1035
1394
  var iterator, iterFn, index, length, result, next, step;
1036
1395
 
1037
1396
  var stop = function (condition) {
1038
- if (iterator) iteratorClose(iterator);
1397
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1039
1398
  return new Result(true, condition);
1040
1399
  };
1041
1400
 
@@ -1050,26 +1409,25 @@ var iterate = function (iterable, unboundFunction, options) {
1050
1409
  iterator = iterable;
1051
1410
  } else {
1052
1411
  iterFn = getIteratorMethod(iterable);
1053
- if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
1412
+ if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
1054
1413
  // optimisation for array iterators
1055
1414
  if (isArrayIteratorMethod(iterFn)) {
1056
- for (index = 0, length = toLength(iterable.length); length > index; index++) {
1415
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1057
1416
  result = callFn(iterable[index]);
1058
- if (result && result instanceof Result) return result;
1417
+ if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1059
1418
  } return new Result(false);
1060
1419
  }
1061
- iterator = iterFn.call(iterable);
1420
+ iterator = getIterator(iterable, iterFn);
1062
1421
  }
1063
1422
 
1064
1423
  next = iterator.next;
1065
- while (!(step = next.call(iterator)).done) {
1424
+ while (!(step = functionCall(next, iterator)).done) {
1066
1425
  try {
1067
1426
  result = callFn(step.value);
1068
1427
  } catch (error) {
1069
- iteratorClose(iterator);
1070
- throw error;
1428
+ iteratorClose(iterator, 'throw', error);
1071
1429
  }
1072
- if (typeof result == 'object' && result && result instanceof Result) return result;
1430
+ if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
1073
1431
  } return new Result(false);
1074
1432
  };
1075
1433
 
@@ -1110,6 +1468,51 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1110
1468
  return ITERATION_SUPPORT;
1111
1469
  };
1112
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
+
1113
1516
  var SPECIES$3 = wellKnownSymbol('species');
1114
1517
 
1115
1518
  // `SpeciesConstructor` abstract operation
@@ -1117,27 +1520,44 @@ var SPECIES$3 = wellKnownSymbol('species');
1117
1520
  var speciesConstructor = function (O, defaultConstructor) {
1118
1521
  var C = anObject(O).constructor;
1119
1522
  var S;
1120
- 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);
1121
1524
  };
1122
1525
 
1123
- 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);
1124
1539
 
1125
1540
  var engineIsNode = classofRaw(global_1.process) == 'process';
1126
1541
 
1127
- var location = global_1.location;
1128
1542
  var set = global_1.setImmediate;
1129
1543
  var clear = global_1.clearImmediate;
1130
1544
  var process$3 = global_1.process;
1131
- var MessageChannel = global_1.MessageChannel;
1132
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;
1133
1549
  var counter = 0;
1134
1550
  var queue = {};
1135
1551
  var ONREADYSTATECHANGE = 'onreadystatechange';
1136
- var defer, channel, port;
1552
+ var location, defer, channel, port;
1553
+
1554
+ try {
1555
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1556
+ location = global_1.location;
1557
+ } catch (error) { /* empty */ }
1137
1558
 
1138
1559
  var run = function (id) {
1139
- // eslint-disable-next-line no-prototype-builtins -- safe
1140
- if (queue.hasOwnProperty(id)) {
1560
+ if (hasOwnProperty_1(queue, id)) {
1141
1561
  var fn = queue[id];
1142
1562
  delete queue[id];
1143
1563
  fn();
@@ -1156,18 +1576,15 @@ var listener = function (event) {
1156
1576
 
1157
1577
  var post = function (id) {
1158
1578
  // old engines have not location.origin
1159
- global_1.postMessage(id + '', location.protocol + '//' + location.host);
1579
+ global_1.postMessage(String$1(id), location.protocol + '//' + location.host);
1160
1580
  };
1161
1581
 
1162
1582
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1163
1583
  if (!set || !clear) {
1164
1584
  set = function setImmediate(fn) {
1165
- var args = [];
1166
- var i = 1;
1167
- while (arguments.length > i) args.push(arguments[i++]);
1585
+ var args = arraySlice(arguments, 1);
1168
1586
  queue[++counter] = function () {
1169
- // eslint-disable-next-line no-new-func -- spec requirement
1170
- (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
1587
+ functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
1171
1588
  };
1172
1589
  defer(counter);
1173
1590
  return counter;
@@ -1191,12 +1608,12 @@ if (!set || !clear) {
1191
1608
  channel = new MessageChannel();
1192
1609
  port = channel.port2;
1193
1610
  channel.port1.onmessage = listener;
1194
- defer = functionBindContext(port.postMessage, port, 1);
1611
+ defer = functionBindContext(port.postMessage, port);
1195
1612
  // Browsers with postMessage, skip WebWorkers
1196
1613
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1197
1614
  } else if (
1198
1615
  global_1.addEventListener &&
1199
- typeof postMessage == 'function' &&
1616
+ isCallable(global_1.postMessage) &&
1200
1617
  !global_1.importScripts &&
1201
1618
  location && location.protocol !== 'file:' &&
1202
1619
  !fails(post)
@@ -1224,6 +1641,8 @@ var task$1 = {
1224
1641
  clear: clear
1225
1642
  };
1226
1643
 
1644
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(engineUserAgent) && global_1.Pebble !== undefined;
1645
+
1227
1646
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
1228
1647
 
1229
1648
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
@@ -1232,6 +1651,7 @@ var macrotask = task$1.set;
1232
1651
 
1233
1652
 
1234
1653
 
1654
+
1235
1655
  var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
1236
1656
  var document$2 = global_1.document;
1237
1657
  var process$2 = global_1.process;
@@ -1271,14 +1691,14 @@ if (!queueMicrotask) {
1271
1691
  node.data = toggle = !toggle;
1272
1692
  };
1273
1693
  // environments with maybe non-completely correct, but existent Promise
1274
- } else if (Promise$1 && Promise$1.resolve) {
1694
+ } else if (!engineIsIosPebble && Promise$1 && Promise$1.resolve) {
1275
1695
  // Promise.resolve without an argument throws an error in LG WebOS 2
1276
1696
  promise = Promise$1.resolve(undefined);
1277
1697
  // workaround of WebKit ~ iOS Safari 10.1 bug
1278
1698
  promise.constructor = Promise$1;
1279
- then = promise.then;
1699
+ then = functionBindContext(promise.then, promise);
1280
1700
  notify$1 = function () {
1281
- then.call(promise, flush);
1701
+ then(flush);
1282
1702
  };
1283
1703
  // Node.js without promises
1284
1704
  } else if (engineIsNode) {
@@ -1292,9 +1712,10 @@ if (!queueMicrotask) {
1292
1712
  // - onreadystatechange
1293
1713
  // - setTimeout
1294
1714
  } else {
1715
+ // strange IE + webpack dev server bug - use .bind(global)
1716
+ macrotask = functionBindContext(macrotask, global_1);
1295
1717
  notify$1 = function () {
1296
- // strange IE + webpack dev server bug - use .call(global)
1297
- macrotask.call(global_1, flush);
1718
+ macrotask(flush);
1298
1719
  };
1299
1720
  }
1300
1721
  }
@@ -1315,8 +1736,8 @@ var PromiseCapability = function (C) {
1315
1736
  resolve = $$resolve;
1316
1737
  reject = $$reject;
1317
1738
  });
1318
- this.resolve = aFunction(resolve);
1319
- this.reject = aFunction(reject);
1739
+ this.resolve = aCallable(resolve);
1740
+ this.reject = aCallable(reject);
1320
1741
  };
1321
1742
 
1322
1743
  // `NewPromiseCapability` abstract operation
@@ -1341,7 +1762,7 @@ var promiseResolve = function (C, x) {
1341
1762
  var hostReportErrors = function (a, b) {
1342
1763
  var console = global_1.console;
1343
1764
  if (console && console.error) {
1344
- arguments.length === 1 ? console.error(a) : console.error(a, b);
1765
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
1345
1766
  }
1346
1767
  };
1347
1768
 
@@ -1370,19 +1791,21 @@ var task = task$1.set;
1370
1791
 
1371
1792
  var SPECIES$2 = wellKnownSymbol('species');
1372
1793
  var PROMISE = 'Promise';
1794
+
1373
1795
  var getInternalState = internalState.get;
1374
1796
  var setInternalState = internalState.set;
1375
1797
  var getInternalPromiseState = internalState.getterFor(PROMISE);
1376
1798
  var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
1377
1799
  var PromiseConstructor = nativePromiseConstructor;
1378
- var PromiseConstructorPrototype = NativePromisePrototype;
1379
- var TypeError$1 = global_1.TypeError;
1800
+ var PromisePrototype = NativePromisePrototype;
1801
+ var TypeError$2 = global_1.TypeError;
1380
1802
  var document$1 = global_1.document;
1381
1803
  var process$1 = global_1.process;
1382
1804
  var newPromiseCapability = newPromiseCapability$1.f;
1383
1805
  var newGenericPromiseCapability = newPromiseCapability;
1806
+
1384
1807
  var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
1385
- var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
1808
+ var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
1386
1809
  var UNHANDLED_REJECTION = 'unhandledrejection';
1387
1810
  var REJECTION_HANDLED = 'rejectionhandled';
1388
1811
  var PENDING = 0;
@@ -1391,6 +1814,7 @@ var REJECTED = 2;
1391
1814
  var HANDLED = 1;
1392
1815
  var UNHANDLED = 2;
1393
1816
  var SUBCLASSING = false;
1817
+
1394
1818
  var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1395
1819
 
1396
1820
  var FORCED$1 = isForced_1(PROMISE, function () {
@@ -1424,7 +1848,7 @@ var INCORRECT_ITERATION = FORCED$1 || !checkCorrectnessOfIteration(function (ite
1424
1848
  // helpers
1425
1849
  var isThenable = function (it) {
1426
1850
  var then;
1427
- return isObject$1(it) && typeof (then = it.then) == 'function' ? then : false;
1851
+ return isObject$1(it) && isCallable(then = it.then) ? then : false;
1428
1852
  };
1429
1853
 
1430
1854
  var notify = function (state, isReject) {
@@ -1459,9 +1883,9 @@ var notify = function (state, isReject) {
1459
1883
  }
1460
1884
  }
1461
1885
  if (result === reaction.promise) {
1462
- reject(TypeError$1('Promise-chain cycle'));
1886
+ reject(TypeError$2('Promise-chain cycle'));
1463
1887
  } else if (then = isThenable(result)) {
1464
- then.call(result, resolve, reject);
1888
+ functionCall(then, result, resolve, reject);
1465
1889
  } else resolve(result);
1466
1890
  } else reject(value);
1467
1891
  } catch (error) {
@@ -1489,7 +1913,7 @@ var dispatchEvent = function (name, promise, reason) {
1489
1913
  };
1490
1914
 
1491
1915
  var onUnhandled = function (state) {
1492
- task.call(global_1, function () {
1916
+ functionCall(task, global_1, function () {
1493
1917
  var promise = state.facade;
1494
1918
  var value = state.value;
1495
1919
  var IS_UNHANDLED = isUnhandled(state);
@@ -1512,7 +1936,7 @@ var isUnhandled = function (state) {
1512
1936
  };
1513
1937
 
1514
1938
  var onHandleUnhandled = function (state) {
1515
- task.call(global_1, function () {
1939
+ functionCall(task, global_1, function () {
1516
1940
  var promise = state.facade;
1517
1941
  if (engineIsNode) {
1518
1942
  process$1.emit('rejectionHandled', promise);
@@ -1540,13 +1964,13 @@ var internalResolve = function (state, value, unwrap) {
1540
1964
  state.done = true;
1541
1965
  if (unwrap) state = unwrap;
1542
1966
  try {
1543
- 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");
1544
1968
  var then = isThenable(value);
1545
1969
  if (then) {
1546
1970
  microtask(function () {
1547
1971
  var wrapper = { done: false };
1548
1972
  try {
1549
- then.call(value,
1973
+ functionCall(then, value,
1550
1974
  bind$1(internalResolve, wrapper, state),
1551
1975
  bind$1(internalReject, wrapper, state)
1552
1976
  );
@@ -1568,9 +1992,9 @@ var internalResolve = function (state, value, unwrap) {
1568
1992
  if (FORCED$1) {
1569
1993
  // 25.4.3.1 Promise(executor)
1570
1994
  PromiseConstructor = function Promise(executor) {
1571
- anInstance(this, PromiseConstructor, PROMISE);
1572
- aFunction(executor);
1573
- Internal.call(this);
1995
+ anInstance(this, PromisePrototype);
1996
+ aCallable(executor);
1997
+ functionCall(Internal, this);
1574
1998
  var state = getInternalState(this);
1575
1999
  try {
1576
2000
  executor(bind$1(internalResolve, state), bind$1(internalReject, state));
@@ -1578,7 +2002,7 @@ if (FORCED$1) {
1578
2002
  internalReject(state, error);
1579
2003
  }
1580
2004
  };
1581
- PromiseConstructorPrototype = PromiseConstructor.prototype;
2005
+ PromisePrototype = PromiseConstructor.prototype;
1582
2006
  // eslint-disable-next-line no-unused-vars -- required for `.length`
1583
2007
  Internal = function Promise(executor) {
1584
2008
  setInternalState(this, {
@@ -1592,17 +2016,18 @@ if (FORCED$1) {
1592
2016
  value: undefined
1593
2017
  });
1594
2018
  };
1595
- Internal.prototype = redefineAll(PromiseConstructorPrototype, {
2019
+ Internal.prototype = redefineAll(PromisePrototype, {
1596
2020
  // `Promise.prototype.then` method
1597
2021
  // https://tc39.es/ecma262/#sec-promise.prototype.then
1598
2022
  then: function then(onFulfilled, onRejected) {
1599
2023
  var state = getInternalPromiseState(this);
2024
+ var reactions = state.reactions;
1600
2025
  var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
1601
- reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
1602
- reaction.fail = typeof onRejected == 'function' && onRejected;
2026
+ reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
2027
+ reaction.fail = isCallable(onRejected) && onRejected;
1603
2028
  reaction.domain = engineIsNode ? process$1.domain : undefined;
1604
2029
  state.parent = true;
1605
- state.reactions.push(reaction);
2030
+ reactions[reactions.length] = reaction;
1606
2031
  if (state.state != PENDING) notify(state, false);
1607
2032
  return reaction.promise;
1608
2033
  },
@@ -1625,7 +2050,7 @@ if (FORCED$1) {
1625
2050
  : newGenericPromiseCapability(C);
1626
2051
  };
1627
2052
 
1628
- if (typeof nativePromiseConstructor == 'function' && NativePromisePrototype !== Object.prototype) {
2053
+ if (isCallable(nativePromiseConstructor) && NativePromisePrototype !== Object.prototype) {
1629
2054
  nativeThen = NativePromisePrototype.then;
1630
2055
 
1631
2056
  if (!SUBCLASSING) {
@@ -1633,13 +2058,13 @@ if (FORCED$1) {
1633
2058
  redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
1634
2059
  var that = this;
1635
2060
  return new PromiseConstructor(function (resolve, reject) {
1636
- nativeThen.call(that, resolve, reject);
2061
+ functionCall(nativeThen, that, resolve, reject);
1637
2062
  }).then(onFulfilled, onRejected);
1638
2063
  // https://github.com/zloirock/core-js/issues/640
1639
2064
  }, { unsafe: true });
1640
2065
 
1641
2066
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
1642
- redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });
2067
+ redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
1643
2068
  }
1644
2069
 
1645
2070
  // make `.constructor === Promise` work for native promise-based APIs
@@ -1649,7 +2074,7 @@ if (FORCED$1) {
1649
2074
 
1650
2075
  // make `instanceof Promise` work for native promise-based APIs
1651
2076
  if (objectSetPrototypeOf) {
1652
- objectSetPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);
2077
+ objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
1653
2078
  }
1654
2079
  }
1655
2080
  }
@@ -1669,7 +2094,7 @@ _export({ target: PROMISE, stat: true, forced: FORCED$1 }, {
1669
2094
  // https://tc39.es/ecma262/#sec-promise.reject
1670
2095
  reject: function reject(r) {
1671
2096
  var capability = newPromiseCapability(this);
1672
- capability.reject.call(undefined, r);
2097
+ functionCall(capability.reject, undefined, r);
1673
2098
  return capability.promise;
1674
2099
  }
1675
2100
  });
@@ -1691,16 +2116,15 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1691
2116
  var resolve = capability.resolve;
1692
2117
  var reject = capability.reject;
1693
2118
  var result = perform(function () {
1694
- var $promiseResolve = aFunction(C.resolve);
2119
+ var $promiseResolve = aCallable(C.resolve);
1695
2120
  var values = [];
1696
2121
  var counter = 0;
1697
2122
  var remaining = 1;
1698
2123
  iterate(iterable, function (promise) {
1699
2124
  var index = counter++;
1700
2125
  var alreadyCalled = false;
1701
- values.push(undefined);
1702
2126
  remaining++;
1703
- $promiseResolve.call(C, promise).then(function (value) {
2127
+ functionCall($promiseResolve, C, promise).then(function (value) {
1704
2128
  if (alreadyCalled) return;
1705
2129
  alreadyCalled = true;
1706
2130
  values[index] = value;
@@ -1719,9 +2143,9 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1719
2143
  var capability = newPromiseCapability(C);
1720
2144
  var reject = capability.reject;
1721
2145
  var result = perform(function () {
1722
- var $promiseResolve = aFunction(C.resolve);
2146
+ var $promiseResolve = aCallable(C.resolve);
1723
2147
  iterate(iterable, function (promise) {
1724
- $promiseResolve.call(C, promise).then(capability.resolve, reject);
2148
+ functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
1725
2149
  });
1726
2150
  });
1727
2151
  if (result.error) reject(result.value);
@@ -1733,6 +2157,7 @@ _export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
1733
2157
  var $assign = Object.assign;
1734
2158
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1735
2159
  var defineProperty$1 = Object.defineProperty;
2160
+ var concat = functionUncurryThis([].concat);
1736
2161
 
1737
2162
  // `Object.assign` method
1738
2163
  // https://tc39.es/ecma262/#sec-object.assign
@@ -1764,13 +2189,13 @@ var objectAssign = !$assign || fails(function () {
1764
2189
  var propertyIsEnumerable = objectPropertyIsEnumerable.f;
1765
2190
  while (argumentsLength > index) {
1766
2191
  var S = indexedObject(arguments[index++]);
1767
- var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
2192
+ var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1768
2193
  var length = keys.length;
1769
2194
  var j = 0;
1770
2195
  var key;
1771
2196
  while (length > j) {
1772
2197
  key = keys[j++];
1773
- if (!descriptors || propertyIsEnumerable.call(S, key)) T[key] = S[key];
2198
+ if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
1774
2199
  }
1775
2200
  } return T;
1776
2201
  } : $assign;
@@ -1785,31 +2210,38 @@ _export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }
1785
2210
  // `IsArray` abstract operation
1786
2211
  // https://tc39.es/ecma262/#sec-isarray
1787
2212
  // eslint-disable-next-line es/no-array-isarray -- safe
1788
- var isArray$1 = Array.isArray || function isArray(arg) {
1789
- return classofRaw(arg) == 'Array';
2213
+ var isArray$1 = Array.isArray || function isArray(argument) {
2214
+ return classofRaw(argument) == 'Array';
1790
2215
  };
1791
2216
 
1792
2217
  var createProperty = function (object, key, value) {
1793
- var propertyKey = toPrimitive(key);
2218
+ var propertyKey = toPropertyKey(key);
1794
2219
  if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
1795
2220
  else object[propertyKey] = value;
1796
2221
  };
1797
2222
 
1798
2223
  var SPECIES$1 = wellKnownSymbol('species');
2224
+ var Array$1 = global_1.Array;
1799
2225
 
1800
- // `ArraySpeciesCreate` abstract operation
2226
+ // a part of `ArraySpeciesCreate` abstract operation
1801
2227
  // https://tc39.es/ecma262/#sec-arrayspeciescreate
1802
- var arraySpeciesCreate = function (originalArray, length) {
2228
+ var arraySpeciesConstructor = function (originalArray) {
1803
2229
  var C;
1804
2230
  if (isArray$1(originalArray)) {
1805
2231
  C = originalArray.constructor;
1806
2232
  // cross-realm fallback
1807
- 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;
1808
2234
  else if (isObject$1(C)) {
1809
2235
  C = C[SPECIES$1];
1810
2236
  if (C === null) C = undefined;
1811
2237
  }
1812
- } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
2238
+ } return C === undefined ? Array$1 : C;
2239
+ };
2240
+
2241
+ // `ArraySpeciesCreate` abstract operation
2242
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2243
+ var arraySpeciesCreate = function (originalArray, length) {
2244
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
1813
2245
  };
1814
2246
 
1815
2247
  var SPECIES = wellKnownSymbol('species');
@@ -1831,6 +2263,7 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
1831
2263
  var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
1832
2264
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
1833
2265
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
2266
+ var TypeError$1 = global_1.TypeError;
1834
2267
 
1835
2268
  // We can't use this feature detection in V8 since it causes
1836
2269
  // deoptimization and serious performance degradation
@@ -1864,11 +2297,11 @@ _export({ target: 'Array', proto: true, forced: FORCED }, {
1864
2297
  for (i = -1, length = arguments.length; i < length; i++) {
1865
2298
  E = i === -1 ? O : arguments[i];
1866
2299
  if (isConcatSpreadable(E)) {
1867
- len = toLength(E.length);
1868
- 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);
1869
2302
  for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
1870
2303
  } else {
1871
- if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
2304
+ if (n >= MAX_SAFE_INTEGER) throw TypeError$1(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1872
2305
  createProperty(A, n++, E);
1873
2306
  }
1874
2307
  }
@@ -1887,21 +2320,24 @@ _export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
1887
2320
  }
1888
2321
  });
1889
2322
 
2323
+ var FUNCTION_NAME_EXISTS = functionName.EXISTS;
2324
+
1890
2325
  var defineProperty = objectDefineProperty.f;
1891
2326
 
1892
2327
  var FunctionPrototype = Function.prototype;
1893
- var FunctionPrototypeToString = FunctionPrototype.toString;
2328
+ var functionToString = functionUncurryThis(FunctionPrototype.toString);
1894
2329
  var nameRE = /^\s*function ([^ (]*)/;
2330
+ var regExpExec = functionUncurryThis(nameRE.exec);
1895
2331
  var NAME = 'name';
1896
2332
 
1897
2333
  // Function instances `.name` property
1898
2334
  // https://tc39.es/ecma262/#sec-function-instances-name
1899
- if (descriptors && !(NAME in FunctionPrototype)) {
2335
+ if (descriptors && !FUNCTION_NAME_EXISTS) {
1900
2336
  defineProperty(FunctionPrototype, NAME, {
1901
2337
  configurable: true,
1902
2338
  get: function () {
1903
2339
  try {
1904
- return FunctionPrototypeToString.call(this).match(nameRE)[1];
2340
+ return regExpExec(nameRE, functionToString(this))[1];
1905
2341
  } catch (error) {
1906
2342
  return '';
1907
2343
  }
@@ -1945,25 +2381,33 @@ var domIterables = {
1945
2381
  TouchList: 0
1946
2382
  };
1947
2383
 
1948
- 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);
1949
2393
 
1950
- // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
2394
+ // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
1951
2395
  var createMethod = function (TYPE) {
1952
2396
  var IS_MAP = TYPE == 1;
1953
2397
  var IS_FILTER = TYPE == 2;
1954
2398
  var IS_SOME = TYPE == 3;
1955
2399
  var IS_EVERY = TYPE == 4;
1956
2400
  var IS_FIND_INDEX = TYPE == 6;
1957
- var IS_FILTER_OUT = TYPE == 7;
2401
+ var IS_FILTER_REJECT = TYPE == 7;
1958
2402
  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
1959
2403
  return function ($this, callbackfn, that, specificCreate) {
1960
2404
  var O = toObject($this);
1961
2405
  var self = indexedObject(O);
1962
- var boundFunction = functionBindContext(callbackfn, that, 3);
1963
- var length = toLength(self.length);
2406
+ var boundFunction = functionBindContext(callbackfn, that);
2407
+ var length = lengthOfArrayLike(self);
1964
2408
  var index = 0;
1965
2409
  var create = specificCreate || arraySpeciesCreate;
1966
- var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
2410
+ var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
1967
2411
  var value, result;
1968
2412
  for (;length > index; index++) if (NO_HOLES || index in self) {
1969
2413
  value = self[index];
@@ -1974,10 +2418,10 @@ var createMethod = function (TYPE) {
1974
2418
  case 3: return true; // some
1975
2419
  case 5: return value; // find
1976
2420
  case 6: return index; // findIndex
1977
- case 2: push.call(target, value); // filter
2421
+ case 2: push(target, value); // filter
1978
2422
  } else switch (TYPE) {
1979
2423
  case 4: return false; // every
1980
- case 7: push.call(target, value); // filterOut
2424
+ case 7: push(target, value); // filterReject
1981
2425
  }
1982
2426
  }
1983
2427
  }
@@ -2007,9 +2451,9 @@ var arrayIteration = {
2007
2451
  // `Array.prototype.findIndex` method
2008
2452
  // https://tc39.es/ecma262/#sec-array.prototype.findIndex
2009
2453
  findIndex: createMethod(6),
2010
- // `Array.prototype.filterOut` method
2454
+ // `Array.prototype.filterReject` method
2011
2455
  // https://github.com/tc39/proposal-array-filtering
2012
- filterOut: createMethod(7)
2456
+ filterReject: createMethod(7)
2013
2457
  };
2014
2458
 
2015
2459
  var $forEach = arrayIteration.forEach;
@@ -2024,17 +2468,23 @@ var arrayForEach = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */)
2024
2468
  // eslint-disable-next-line es/no-array-prototype-foreach -- safe
2025
2469
  } : [].forEach;
2026
2470
 
2027
- for (var COLLECTION_NAME in domIterables) {
2028
- var Collection = global_1[COLLECTION_NAME];
2029
- var CollectionPrototype = Collection && Collection.prototype;
2471
+ var handlePrototype = function (CollectionPrototype) {
2030
2472
  // some Chrome versions have non-configurable methods on DOMTokenList
2031
2473
  if (CollectionPrototype && CollectionPrototype.forEach !== arrayForEach) try {
2032
2474
  createNonEnumerableProperty(CollectionPrototype, 'forEach', arrayForEach);
2033
2475
  } catch (error) {
2034
2476
  CollectionPrototype.forEach = arrayForEach;
2035
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
+ }
2036
2484
  }
2037
2485
 
2486
+ handlePrototype(domTokenListPrototype);
2487
+
2038
2488
  var bind = function bind(fn, thisArg) {
2039
2489
  return function wrap() {
2040
2490
  var args = new Array(arguments.length);
@@ -3630,5 +4080,5 @@ function GhostContentAPI(_ref) {
3630
4080
  }
3631
4081
  }
3632
4082
 
3633
- export default GhostContentAPI;
4083
+ export { GhostContentAPI as default };
3634
4084
  //# sourceMappingURL=content-api.js.map