@tryghost/content-api 1.7.1 → 1.7.2

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,9 +48,15 @@ var descriptors = !fails(function () {
48
48
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
49
49
  });
50
50
 
51
+ var functionBindNative = !fails(function () {
52
+ var test = (function () { /* empty */ }).bind();
53
+ // eslint-disable-next-line no-prototype-builtins -- safe
54
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
55
+ });
56
+
51
57
  var call$2 = Function.prototype.call;
52
58
 
53
- var functionCall = call$2.bind ? call$2.bind(call$2) : function () {
59
+ var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
54
60
  return call$2.apply(call$2, arguments);
55
61
  };
56
62
 
@@ -63,13 +69,13 @@ var NASHORN_BUG = getOwnPropertyDescriptor$4 && !$propertyIsEnumerable.call({ 1:
63
69
 
64
70
  // `Object.prototype.propertyIsEnumerable` method implementation
65
71
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
66
- var f$5 = NASHORN_BUG ? function propertyIsEnumerable(V) {
72
+ var f$6 = NASHORN_BUG ? function propertyIsEnumerable(V) {
67
73
  var descriptor = getOwnPropertyDescriptor$4(this, V);
68
74
  return !!descriptor && descriptor.enumerable;
69
75
  } : $propertyIsEnumerable;
70
76
 
71
77
  var objectPropertyIsEnumerable = {
72
- f: f$5
78
+ f: f$6
73
79
  };
74
80
 
75
81
  var createPropertyDescriptor = function (bitmap, value) {
@@ -82,12 +88,12 @@ var createPropertyDescriptor = function (bitmap, value) {
82
88
  };
83
89
 
84
90
  var FunctionPrototype$3 = Function.prototype;
85
- var bind$4 = FunctionPrototype$3.bind;
91
+ var bind$3 = FunctionPrototype$3.bind;
86
92
  var call$1 = FunctionPrototype$3.call;
87
- var callBind = bind$4 && bind$4.bind(call$1);
93
+ var uncurryThis = functionBindNative && bind$3.bind(call$1, call$1);
88
94
 
89
- var functionUncurryThis = bind$4 ? function (fn) {
90
- return fn && callBind(call$1, fn);
95
+ var functionUncurryThis = functionBindNative ? function (fn) {
96
+ return fn && uncurryThis(fn);
91
97
  } : function (fn) {
92
98
  return fn && function () {
93
99
  return call$1.apply(fn, arguments);
@@ -113,12 +119,12 @@ var indexedObject = fails(function () {
113
119
  return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
114
120
  } : Object$4;
115
121
 
116
- var TypeError$f = global_1.TypeError;
122
+ var TypeError$g = global_1.TypeError;
117
123
 
118
124
  // `RequireObjectCoercible` abstract operation
119
125
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
120
126
  var requireObjectCoercible = function (it) {
121
- if (it == undefined) throw TypeError$f("Can't call method on " + it);
127
+ if (it == undefined) throw TypeError$g("Can't call method on " + it);
122
128
  return it;
123
129
  };
124
130
 
@@ -217,12 +223,12 @@ var tryToString = function (argument) {
217
223
  }
218
224
  };
219
225
 
220
- var TypeError$e = global_1.TypeError;
226
+ var TypeError$f = global_1.TypeError;
221
227
 
222
228
  // `Assert: IsCallable(argument) is true`
223
229
  var aCallable = function (argument) {
224
230
  if (isCallable(argument)) return argument;
225
- throw TypeError$e(tryToString(argument) + ' is not a function');
231
+ throw TypeError$f(tryToString(argument) + ' is not a function');
226
232
  };
227
233
 
228
234
  // `GetMethod` abstract operation
@@ -232,7 +238,7 @@ var getMethod = function (V, P) {
232
238
  return func == null ? undefined : aCallable(func);
233
239
  };
234
240
 
235
- var TypeError$d = global_1.TypeError;
241
+ var TypeError$e = global_1.TypeError;
236
242
 
237
243
  // `OrdinaryToPrimitive` abstract operation
238
244
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
@@ -241,7 +247,7 @@ var ordinaryToPrimitive = function (input, pref) {
241
247
  if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
242
248
  if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
243
249
  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");
250
+ throw TypeError$e("Can't convert object to primitive value");
245
251
  };
246
252
 
247
253
  // eslint-disable-next-line es/no-object-defineproperty -- safe
@@ -264,9 +270,11 @@ var shared = createCommonjsModule(function (module) {
264
270
  (module.exports = function (key, value) {
265
271
  return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
266
272
  })('versions', []).push({
267
- version: '3.19.1',
273
+ version: '3.21.1',
268
274
  mode: 'global',
269
- copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
275
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
276
+ license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
277
+ source: 'https://github.com/zloirock/core-js'
270
278
  });
271
279
  });
272
280
 
@@ -312,7 +320,7 @@ var wellKnownSymbol = function (name) {
312
320
  } return WellKnownSymbolsStore[name];
313
321
  };
314
322
 
315
- var TypeError$c = global_1.TypeError;
323
+ var TypeError$d = global_1.TypeError;
316
324
  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
317
325
 
318
326
  // `ToPrimitive` abstract operation
@@ -325,7 +333,7 @@ var toPrimitive = function (input, pref) {
325
333
  if (pref === undefined) pref = 'default';
326
334
  result = functionCall(exoticToPrim, input, pref);
327
335
  if (!isObject$1(result) || isSymbol(result)) return result;
328
- throw TypeError$c("Can't convert object to primitive value");
336
+ throw TypeError$d("Can't convert object to primitive value");
329
337
  }
330
338
  if (pref === undefined) pref = 'number';
331
339
  return ordinaryToPrimitive(input, pref);
@@ -346,61 +354,91 @@ var documentCreateElement = function (it) {
346
354
  return EXISTS$1 ? document$3.createElement(it) : {};
347
355
  };
348
356
 
349
- // Thank's IE8 for his funny defineProperty
357
+ // Thanks to IE8 for its funny defineProperty
350
358
  var ie8DomDefine = !descriptors && !fails(function () {
351
- // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
359
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
352
360
  return Object.defineProperty(documentCreateElement('div'), 'a', {
353
361
  get: function () { return 7; }
354
362
  }).a != 7;
355
363
  });
356
364
 
357
365
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
358
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
366
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
359
367
 
360
368
  // `Object.getOwnPropertyDescriptor` method
361
369
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
362
- var f$4 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
370
+ var f$5 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
363
371
  O = toIndexedObject(O);
364
372
  P = toPropertyKey(P);
365
373
  if (ie8DomDefine) try {
366
- return $getOwnPropertyDescriptor(O, P);
374
+ return $getOwnPropertyDescriptor$1(O, P);
367
375
  } catch (error) { /* empty */ }
368
376
  if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
369
377
  };
370
378
 
371
379
  var objectGetOwnPropertyDescriptor = {
372
- f: f$4
380
+ f: f$5
373
381
  };
374
382
 
383
+ // V8 ~ Chrome 36-
384
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
385
+ var v8PrototypeDefineBug = descriptors && fails(function () {
386
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
387
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
388
+ value: 42,
389
+ writable: false
390
+ }).prototype != 42;
391
+ });
392
+
375
393
  var String$4 = global_1.String;
376
- var TypeError$b = global_1.TypeError;
394
+ var TypeError$c = global_1.TypeError;
377
395
 
378
396
  // `Assert: Type(argument) is Object`
379
397
  var anObject = function (argument) {
380
398
  if (isObject$1(argument)) return argument;
381
- throw TypeError$b(String$4(argument) + ' is not an object');
399
+ throw TypeError$c(String$4(argument) + ' is not an object');
382
400
  };
383
401
 
384
- var TypeError$a = global_1.TypeError;
402
+ var TypeError$b = global_1.TypeError;
385
403
  // eslint-disable-next-line es/no-object-defineproperty -- safe
386
404
  var $defineProperty = Object.defineProperty;
405
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
406
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
407
+ var ENUMERABLE = 'enumerable';
408
+ var CONFIGURABLE$1 = 'configurable';
409
+ var WRITABLE = 'writable';
387
410
 
388
411
  // `Object.defineProperty` method
389
412
  // https://tc39.es/ecma262/#sec-object.defineproperty
390
- var f$3 = descriptors ? $defineProperty : function defineProperty(O, P, Attributes) {
413
+ var f$4 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
414
+ anObject(O);
415
+ P = toPropertyKey(P);
416
+ anObject(Attributes);
417
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
418
+ var current = $getOwnPropertyDescriptor(O, P);
419
+ if (current && current[WRITABLE]) {
420
+ O[P] = Attributes.value;
421
+ Attributes = {
422
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
423
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
424
+ writable: false
425
+ };
426
+ }
427
+ } return $defineProperty(O, P, Attributes);
428
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
391
429
  anObject(O);
392
430
  P = toPropertyKey(P);
393
431
  anObject(Attributes);
394
432
  if (ie8DomDefine) try {
395
433
  return $defineProperty(O, P, Attributes);
396
434
  } catch (error) { /* empty */ }
397
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$a('Accessors not supported');
435
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
398
436
  if ('value' in Attributes) O[P] = Attributes.value;
399
437
  return O;
400
438
  };
401
439
 
402
440
  var objectDefineProperty = {
403
- f: f$3
441
+ f: f$4
404
442
  };
405
443
 
406
444
  var createNonEnumerableProperty = descriptors ? function (object, key, value) {
@@ -434,7 +472,7 @@ var sharedKey = function (key) {
434
472
  var hiddenKeys$1 = {};
435
473
 
436
474
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
437
- var TypeError$9 = global_1.TypeError;
475
+ var TypeError$a = global_1.TypeError;
438
476
  var WeakMap = global_1.WeakMap;
439
477
  var set$1, get, has;
440
478
 
@@ -446,7 +484,7 @@ var getterFor = function (TYPE) {
446
484
  return function (it) {
447
485
  var state;
448
486
  if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
449
- throw TypeError$9('Incompatible receiver, ' + TYPE + ' required');
487
+ throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
450
488
  } return state;
451
489
  };
452
490
  };
@@ -457,7 +495,7 @@ if (nativeWeakMap || sharedStore.state) {
457
495
  var wmhas = functionUncurryThis(store.has);
458
496
  var wmset = functionUncurryThis(store.set);
459
497
  set$1 = function (it, metadata) {
460
- if (wmhas(store, it)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
498
+ if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
461
499
  metadata.facade = it;
462
500
  wmset(store, it, metadata);
463
501
  return metadata;
@@ -472,7 +510,7 @@ if (nativeWeakMap || sharedStore.state) {
472
510
  var STATE = sharedKey('state');
473
511
  hiddenKeys$1[STATE] = true;
474
512
  set$1 = function (it, metadata) {
475
- if (hasOwnProperty_1(it, STATE)) throw new TypeError$9(OBJECT_ALREADY_INITIALIZED);
513
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
476
514
  metadata.facade = it;
477
515
  createNonEnumerableProperty(it, STATE, metadata);
478
516
  return metadata;
@@ -649,19 +687,19 @@ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
649
687
  // `Object.getOwnPropertyNames` method
650
688
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
651
689
  // eslint-disable-next-line es/no-object-getownpropertynames -- safe
652
- var f$2 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
690
+ var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
653
691
  return objectKeysInternal(O, hiddenKeys);
654
692
  };
655
693
 
656
694
  var objectGetOwnPropertyNames = {
657
- f: f$2
695
+ f: f$3
658
696
  };
659
697
 
660
698
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
661
- var f$1 = Object.getOwnPropertySymbols;
699
+ var f$2 = Object.getOwnPropertySymbols;
662
700
 
663
701
  var objectGetOwnPropertySymbols = {
664
- f: f$1
702
+ f: f$2
665
703
  };
666
704
 
667
705
  var concat$1 = functionUncurryThis([].concat);
@@ -673,13 +711,15 @@ var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
673
711
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
674
712
  };
675
713
 
676
- var copyConstructorProperties = function (target, source) {
714
+ var copyConstructorProperties = function (target, source, exceptions) {
677
715
  var keys = ownKeys(source);
678
716
  var defineProperty = objectDefineProperty.f;
679
717
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
680
718
  for (var i = 0; i < keys.length; i++) {
681
719
  var key = keys[i];
682
- if (!hasOwnProperty_1(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
720
+ if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
721
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
722
+ }
683
723
  }
684
724
  };
685
725
 
@@ -761,8 +801,8 @@ var _export = function (options, source) {
761
801
  var arrayMethodIsStrict = function (METHOD_NAME, argument) {
762
802
  var method = [][METHOD_NAME];
763
803
  return !!method && fails(function () {
764
- // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
765
- method.call(null, argument || function () { throw 1; }, 1);
804
+ // eslint-disable-next-line no-useless-call -- required for testing
805
+ method.call(null, argument || function () { return 1; }, 1);
766
806
  });
767
807
  };
768
808
 
@@ -860,7 +900,7 @@ var constructorRegExp = /^\s*(?:class|function)\b/;
860
900
  var exec = functionUncurryThis(constructorRegExp.exec);
861
901
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
862
902
 
863
- var isConstructorModern = function (argument) {
903
+ var isConstructorModern = function isConstructor(argument) {
864
904
  if (!isCallable(argument)) return false;
865
905
  try {
866
906
  construct(noop, empty, argument);
@@ -870,16 +910,25 @@ var isConstructorModern = function (argument) {
870
910
  }
871
911
  };
872
912
 
873
- var isConstructorLegacy = function (argument) {
913
+ var isConstructorLegacy = function isConstructor(argument) {
874
914
  if (!isCallable(argument)) return false;
875
915
  switch (classof(argument)) {
876
916
  case 'AsyncFunction':
877
917
  case 'GeneratorFunction':
878
918
  case 'AsyncGeneratorFunction': return false;
919
+ }
920
+ try {
879
921
  // we can't check .prototype since constructors produced by .bind haven't it
880
- } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
922
+ // `Function#toString` throws on some built-it function in some legacy engines
923
+ // (for example, `DOMQuad` and similar in FF41-)
924
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
925
+ } catch (error) {
926
+ return true;
927
+ }
881
928
  };
882
929
 
930
+ isConstructorLegacy.sham = true;
931
+
883
932
  // `IsConstructor` abstract operation
884
933
  // https://tc39.es/ecma262/#sec-isconstructor
885
934
  var isConstructor = !construct || fails(function () {
@@ -933,7 +982,7 @@ var arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
933
982
  var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
934
983
  var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
935
984
  var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
936
- var TypeError$8 = global_1.TypeError;
985
+ var TypeError$9 = global_1.TypeError;
937
986
 
938
987
  // We can't use this feature detection in V8 since it causes
939
988
  // deoptimization and serious performance degradation
@@ -968,10 +1017,10 @@ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
968
1017
  E = i === -1 ? O : arguments[i];
969
1018
  if (isConcatSpreadable(E)) {
970
1019
  len = lengthOfArrayLike(E);
971
- if (n + len > MAX_SAFE_INTEGER) throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1020
+ if (n + len > MAX_SAFE_INTEGER) throw TypeError$9(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
972
1021
  for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
973
1022
  } else {
974
- if (n >= MAX_SAFE_INTEGER) throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
1023
+ if (n >= MAX_SAFE_INTEGER) throw TypeError$9(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
975
1024
  createProperty(A, n++, E);
976
1025
  }
977
1026
  }
@@ -983,7 +1032,7 @@ _export({ target: 'Array', proto: true, forced: FORCED$1 }, {
983
1032
  // `Object.defineProperties` method
984
1033
  // https://tc39.es/ecma262/#sec-object.defineproperties
985
1034
  // eslint-disable-next-line es/no-object-defineproperties -- safe
986
- var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
1035
+ var f$1 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
987
1036
  anObject(O);
988
1037
  var props = toIndexedObject(Properties);
989
1038
  var keys = objectKeys(Properties);
@@ -994,6 +1043,10 @@ var objectDefineProperties = descriptors ? Object.defineProperties : function de
994
1043
  return O;
995
1044
  };
996
1045
 
1046
+ var objectDefineProperties = {
1047
+ f: f$1
1048
+ };
1049
+
997
1050
  var html = getBuiltIn('document', 'documentElement');
998
1051
 
999
1052
  /* global ActiveXObject -- old IE, WSH */
@@ -1076,7 +1129,7 @@ var objectCreate = Object.create || function create(O, Properties) {
1076
1129
  // add "__proto__" for Object.getPrototypeOf polyfill
1077
1130
  result[IE_PROTO] = O;
1078
1131
  } else result = NullProtoObject();
1079
- return Properties === undefined ? result : objectDefineProperties(result, Properties);
1132
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
1080
1133
  };
1081
1134
 
1082
1135
  var UNSCOPABLES = wellKnownSymbol('unscopables');
@@ -1140,7 +1193,13 @@ var UNSUPPORTED_Y$1 = fails(function () {
1140
1193
  return re.exec('abcd') != null;
1141
1194
  });
1142
1195
 
1143
- var BROKEN_CARET = fails(function () {
1196
+ // UC Browser bug
1197
+ // https://github.com/zloirock/core-js/issues/1008
1198
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails(function () {
1199
+ return !$RegExp$2('a', 'y').sticky;
1200
+ });
1201
+
1202
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails(function () {
1144
1203
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1145
1204
  var re = $RegExp$2('^r', 'gy');
1146
1205
  re.lastIndex = 2;
@@ -1148,8 +1207,9 @@ var BROKEN_CARET = fails(function () {
1148
1207
  });
1149
1208
 
1150
1209
  var regexpStickyHelpers = {
1151
- UNSUPPORTED_Y: UNSUPPORTED_Y$1,
1152
- BROKEN_CARET: BROKEN_CARET
1210
+ BROKEN_CARET: BROKEN_CARET,
1211
+ MISSED_STICKY: MISSED_STICKY,
1212
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
1153
1213
  };
1154
1214
 
1155
1215
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -1198,7 +1258,7 @@ var UPDATES_LAST_INDEX_WRONG = (function () {
1198
1258
  return re1.lastIndex !== 0 || re2.lastIndex !== 0;
1199
1259
  })();
1200
1260
 
1201
- var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y || regexpStickyHelpers.BROKEN_CARET;
1261
+ var UNSUPPORTED_Y = regexpStickyHelpers.BROKEN_CARET;
1202
1262
 
1203
1263
  // nonparticipating capturing group, copied from es5-shim's String#split patch.
1204
1264
  var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
@@ -1206,7 +1266,6 @@ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
1206
1266
  var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || regexpUnsupportedDotAll || regexpUnsupportedNcg;
1207
1267
 
1208
1268
  if (PATCH) {
1209
- // eslint-disable-next-line max-statements -- TODO
1210
1269
  patchedExec = function exec(string) {
1211
1270
  var re = this;
1212
1271
  var state = getInternalState$1(re);
@@ -1302,11 +1361,11 @@ var isRegexp = function (it) {
1302
1361
  return isObject$1(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
1303
1362
  };
1304
1363
 
1305
- var TypeError$7 = global_1.TypeError;
1364
+ var TypeError$8 = global_1.TypeError;
1306
1365
 
1307
1366
  var notARegexp = function (it) {
1308
1367
  if (isRegexp(it)) {
1309
- throw TypeError$7("The method doesn't accept regular expressions");
1368
+ throw TypeError$8("The method doesn't accept regular expressions");
1310
1369
  } return it;
1311
1370
  };
1312
1371
 
@@ -1402,11 +1461,11 @@ var redefineAll = function (target, src, options) {
1402
1461
  };
1403
1462
 
1404
1463
  var String$2 = global_1.String;
1405
- var TypeError$6 = global_1.TypeError;
1464
+ var TypeError$7 = global_1.TypeError;
1406
1465
 
1407
1466
  var aPossiblePrototype = function (argument) {
1408
1467
  if (typeof argument == 'object' || isCallable(argument)) return argument;
1409
- throw TypeError$6("Can't set " + String$2(argument) + ' as a prototype');
1468
+ throw TypeError$7("Can't set " + String$2(argument) + ' as a prototype');
1410
1469
  };
1411
1470
 
1412
1471
  /* eslint-disable no-proto -- safe */
@@ -1443,9 +1502,10 @@ var defineProperty$2 = objectDefineProperty.f;
1443
1502
 
1444
1503
  var TO_STRING_TAG = wellKnownSymbol('toStringTag');
1445
1504
 
1446
- var setToStringTag = function (it, TAG, STATIC) {
1447
- if (it && !hasOwnProperty_1(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
1448
- defineProperty$2(it, TO_STRING_TAG, { configurable: true, value: TAG });
1505
+ var setToStringTag = function (target, TAG, STATIC) {
1506
+ if (target && !STATIC) target = target.prototype;
1507
+ if (target && !hasOwnProperty_1(target, TO_STRING_TAG)) {
1508
+ defineProperty$2(target, TO_STRING_TAG, { configurable: true, value: TAG });
1449
1509
  }
1450
1510
  };
1451
1511
 
@@ -1463,19 +1523,19 @@ var setSpecies = function (CONSTRUCTOR_NAME) {
1463
1523
  }
1464
1524
  };
1465
1525
 
1466
- var TypeError$5 = global_1.TypeError;
1526
+ var TypeError$6 = global_1.TypeError;
1467
1527
 
1468
1528
  var anInstance = function (it, Prototype) {
1469
1529
  if (objectIsPrototypeOf(Prototype, it)) return it;
1470
- throw TypeError$5('Incorrect invocation');
1530
+ throw TypeError$6('Incorrect invocation');
1471
1531
  };
1472
1532
 
1473
- var bind$3 = functionUncurryThis(functionUncurryThis.bind);
1533
+ var bind$2 = functionUncurryThis(functionUncurryThis.bind);
1474
1534
 
1475
1535
  // optional / simple context binding
1476
1536
  var functionBindContext = function (fn, that) {
1477
1537
  aCallable(fn);
1478
- return that === undefined ? fn : bind$3 ? bind$3(fn, that) : function (/* ...args */) {
1538
+ return that === undefined ? fn : functionBindNative ? bind$2(fn, that) : function (/* ...args */) {
1479
1539
  return fn.apply(that, arguments);
1480
1540
  };
1481
1541
  };
@@ -1498,12 +1558,12 @@ var getIteratorMethod = function (it) {
1498
1558
  || iterators[classof(it)];
1499
1559
  };
1500
1560
 
1501
- var TypeError$4 = global_1.TypeError;
1561
+ var TypeError$5 = global_1.TypeError;
1502
1562
 
1503
1563
  var getIterator = function (argument, usingIterator) {
1504
1564
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1505
1565
  if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1506
- throw TypeError$4(tryToString(argument) + ' is not iterable');
1566
+ throw TypeError$5(tryToString(argument) + ' is not iterable');
1507
1567
  };
1508
1568
 
1509
1569
  var iteratorClose = function (iterator, kind, value) {
@@ -1526,7 +1586,7 @@ var iteratorClose = function (iterator, kind, value) {
1526
1586
  return value;
1527
1587
  };
1528
1588
 
1529
- var TypeError$3 = global_1.TypeError;
1589
+ var TypeError$4 = global_1.TypeError;
1530
1590
 
1531
1591
  var Result = function (stopped, result) {
1532
1592
  this.stopped = stopped;
@@ -1559,7 +1619,7 @@ var iterate = function (iterable, unboundFunction, options) {
1559
1619
  iterator = iterable;
1560
1620
  } else {
1561
1621
  iterFn = getIteratorMethod(iterable);
1562
- if (!iterFn) throw TypeError$3(tryToString(iterable) + ' is not iterable');
1622
+ if (!iterFn) throw TypeError$4(tryToString(iterable) + ' is not iterable');
1563
1623
  // optimisation for array iterators
1564
1624
  if (isArrayIteratorMethod(iterFn)) {
1565
1625
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
@@ -1618,12 +1678,12 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1618
1678
  return ITERATION_SUPPORT;
1619
1679
  };
1620
1680
 
1621
- var TypeError$2 = global_1.TypeError;
1681
+ var TypeError$3 = global_1.TypeError;
1622
1682
 
1623
1683
  // `Assert: IsConstructor(argument) is true`
1624
1684
  var aConstructor = function (argument) {
1625
1685
  if (isConstructor(argument)) return argument;
1626
- throw TypeError$2(tryToString(argument) + ' is not a constructor');
1686
+ throw TypeError$3(tryToString(argument) + ' is not a constructor');
1627
1687
  };
1628
1688
 
1629
1689
  var SPECIES$1 = wellKnownSymbol('species');
@@ -1638,16 +1698,22 @@ var speciesConstructor = function (O, defaultConstructor) {
1638
1698
 
1639
1699
  var FunctionPrototype$1 = Function.prototype;
1640
1700
  var apply = FunctionPrototype$1.apply;
1641
- var bind$2 = FunctionPrototype$1.bind;
1642
1701
  var call = FunctionPrototype$1.call;
1643
1702
 
1644
1703
  // eslint-disable-next-line es/no-reflect -- safe
1645
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$2 ? call.bind(apply) : function () {
1704
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
1646
1705
  return call.apply(apply, arguments);
1647
1706
  });
1648
1707
 
1649
1708
  var arraySlice = functionUncurryThis([].slice);
1650
1709
 
1710
+ var TypeError$2 = global_1.TypeError;
1711
+
1712
+ var validateArgumentsLength = function (passed, required) {
1713
+ if (passed < required) throw TypeError$2('Not enough arguments');
1714
+ return passed;
1715
+ };
1716
+
1651
1717
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(engineUserAgent);
1652
1718
 
1653
1719
  var engineIsNode = classofRaw(global_1.process) == 'process';
@@ -1660,7 +1726,7 @@ var Function$1 = global_1.Function;
1660
1726
  var MessageChannel = global_1.MessageChannel;
1661
1727
  var String$1 = global_1.String;
1662
1728
  var counter = 0;
1663
- var queue = {};
1729
+ var queue$1 = {};
1664
1730
  var ONREADYSTATECHANGE = 'onreadystatechange';
1665
1731
  var location, defer, channel, port;
1666
1732
 
@@ -1670,9 +1736,9 @@ try {
1670
1736
  } catch (error) { /* empty */ }
1671
1737
 
1672
1738
  var run = function (id) {
1673
- if (hasOwnProperty_1(queue, id)) {
1674
- var fn = queue[id];
1675
- delete queue[id];
1739
+ if (hasOwnProperty_1(queue$1, id)) {
1740
+ var fn = queue$1[id];
1741
+ delete queue$1[id];
1676
1742
  fn();
1677
1743
  }
1678
1744
  };
@@ -1694,16 +1760,18 @@ var post = function (id) {
1694
1760
 
1695
1761
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1696
1762
  if (!set || !clear) {
1697
- set = function setImmediate(fn) {
1763
+ set = function setImmediate(handler) {
1764
+ validateArgumentsLength(arguments.length, 1);
1765
+ var fn = isCallable(handler) ? handler : Function$1(handler);
1698
1766
  var args = arraySlice(arguments, 1);
1699
- queue[++counter] = function () {
1700
- functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
1767
+ queue$1[++counter] = function () {
1768
+ functionApply(fn, undefined, args);
1701
1769
  };
1702
1770
  defer(counter);
1703
1771
  return counter;
1704
1772
  };
1705
1773
  clear = function clearImmediate(id) {
1706
- delete queue[id];
1774
+ delete queue$1[id];
1707
1775
  };
1708
1776
  // Node.js 0.8-
1709
1777
  if (engineIsNode) {
@@ -1887,6 +1955,30 @@ var perform = function (exec) {
1887
1955
  }
1888
1956
  };
1889
1957
 
1958
+ var Queue = function () {
1959
+ this.head = null;
1960
+ this.tail = null;
1961
+ };
1962
+
1963
+ Queue.prototype = {
1964
+ add: function (item) {
1965
+ var entry = { item: item, next: null };
1966
+ if (this.head) this.tail.next = entry;
1967
+ else this.head = entry;
1968
+ this.tail = entry;
1969
+ },
1970
+ get: function () {
1971
+ var entry = this.head;
1972
+ if (entry) {
1973
+ this.head = entry.next;
1974
+ if (this.tail === entry) this.tail = null;
1975
+ return entry.item;
1976
+ }
1977
+ }
1978
+ };
1979
+
1980
+ var queue = Queue;
1981
+
1890
1982
  var engineIsBrowser = typeof window == 'object';
1891
1983
 
1892
1984
  var task = task$1.set;
@@ -1902,10 +1994,11 @@ var task = task$1.set;
1902
1994
 
1903
1995
 
1904
1996
 
1997
+
1905
1998
  var SPECIES = wellKnownSymbol('species');
1906
1999
  var PROMISE = 'Promise';
1907
2000
 
1908
- var getInternalState = internalState.get;
2001
+ var getInternalState = internalState.getterFor(PROMISE);
1909
2002
  var setInternalState = internalState.set;
1910
2003
  var getInternalPromiseState = internalState.getterFor(PROMISE);
1911
2004
  var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
@@ -1964,49 +2057,50 @@ var isThenable = function (it) {
1964
2057
  return isObject$1(it) && isCallable(then = it.then) ? then : false;
1965
2058
  };
1966
2059
 
2060
+ var callReaction = function (reaction, state) {
2061
+ var value = state.value;
2062
+ var ok = state.state == FULFILLED;
2063
+ var handler = ok ? reaction.ok : reaction.fail;
2064
+ var resolve = reaction.resolve;
2065
+ var reject = reaction.reject;
2066
+ var domain = reaction.domain;
2067
+ var result, then, exited;
2068
+ try {
2069
+ if (handler) {
2070
+ if (!ok) {
2071
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
2072
+ state.rejection = HANDLED;
2073
+ }
2074
+ if (handler === true) result = value;
2075
+ else {
2076
+ if (domain) domain.enter();
2077
+ result = handler(value); // can throw
2078
+ if (domain) {
2079
+ domain.exit();
2080
+ exited = true;
2081
+ }
2082
+ }
2083
+ if (result === reaction.promise) {
2084
+ reject(TypeError$1('Promise-chain cycle'));
2085
+ } else if (then = isThenable(result)) {
2086
+ functionCall(then, result, resolve, reject);
2087
+ } else resolve(result);
2088
+ } else reject(value);
2089
+ } catch (error) {
2090
+ if (domain && !exited) domain.exit();
2091
+ reject(error);
2092
+ }
2093
+ };
2094
+
1967
2095
  var notify = function (state, isReject) {
1968
2096
  if (state.notified) return;
1969
2097
  state.notified = true;
1970
- var chain = state.reactions;
1971
2098
  microtask(function () {
1972
- var value = state.value;
1973
- var ok = state.state == FULFILLED;
1974
- var index = 0;
1975
- // variable length - can't use forEach
1976
- while (chain.length > index) {
1977
- var reaction = chain[index++];
1978
- var handler = ok ? reaction.ok : reaction.fail;
1979
- var resolve = reaction.resolve;
1980
- var reject = reaction.reject;
1981
- var domain = reaction.domain;
1982
- var result, then, exited;
1983
- try {
1984
- if (handler) {
1985
- if (!ok) {
1986
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1987
- state.rejection = HANDLED;
1988
- }
1989
- if (handler === true) result = value;
1990
- else {
1991
- if (domain) domain.enter();
1992
- result = handler(value); // can throw
1993
- if (domain) {
1994
- domain.exit();
1995
- exited = true;
1996
- }
1997
- }
1998
- if (result === reaction.promise) {
1999
- reject(TypeError$1('Promise-chain cycle'));
2000
- } else if (then = isThenable(result)) {
2001
- functionCall(then, result, resolve, reject);
2002
- } else resolve(result);
2003
- } else reject(value);
2004
- } catch (error) {
2005
- if (domain && !exited) domain.exit();
2006
- reject(error);
2007
- }
2099
+ var reactions = state.reactions;
2100
+ var reaction;
2101
+ while (reaction = reactions.get()) {
2102
+ callReaction(reaction, state);
2008
2103
  }
2009
- state.reactions = [];
2010
2104
  state.notified = false;
2011
2105
  if (isReject && !state.rejection) onUnhandled(state);
2012
2106
  });
@@ -2123,7 +2217,7 @@ if (FORCED) {
2123
2217
  done: false,
2124
2218
  notified: false,
2125
2219
  parent: false,
2126
- reactions: [],
2220
+ reactions: new queue(),
2127
2221
  rejection: false,
2128
2222
  state: PENDING,
2129
2223
  value: undefined
@@ -2132,16 +2226,18 @@ if (FORCED) {
2132
2226
  Internal.prototype = redefineAll(PromisePrototype, {
2133
2227
  // `Promise.prototype.then` method
2134
2228
  // https://tc39.es/ecma262/#sec-promise.prototype.then
2229
+ // eslint-disable-next-line unicorn/no-thenable -- safe
2135
2230
  then: function then(onFulfilled, onRejected) {
2136
2231
  var state = getInternalPromiseState(this);
2137
- var reactions = state.reactions;
2138
2232
  var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
2233
+ state.parent = true;
2139
2234
  reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
2140
2235
  reaction.fail = isCallable(onRejected) && onRejected;
2141
2236
  reaction.domain = engineIsNode ? process$1.domain : undefined;
2142
- state.parent = true;
2143
- reactions[reactions.length] = reaction;
2144
- if (state.state != PENDING) notify(state, false);
2237
+ if (state.state == PENDING) state.reactions.add(reaction);
2238
+ else microtask(function () {
2239
+ callReaction(reaction, state);
2240
+ });
2145
2241
  return reaction.promise;
2146
2242
  },
2147
2243
  // `Promise.prototype.catch` method
@@ -2326,7 +2422,7 @@ var defineProperty = objectDefineProperty.f;
2326
2422
 
2327
2423
  var FunctionPrototype = Function.prototype;
2328
2424
  var functionToString = functionUncurryThis(FunctionPrototype.toString);
2329
- var nameRE = /^\s*function ([^ (]*)/;
2425
+ var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
2330
2426
  var regExpExec = functionUncurryThis(nameRE.exec);
2331
2427
  var NAME = 'name';
2332
2428