mocha 8.2.1 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/LICENSE +1 -1
- package/README.md +12 -3
- package/bin/mocha +0 -3
- package/lib/browser/growl.js +1 -1
- package/lib/cli/collect-files.js +25 -25
- package/lib/cli/config.js +1 -2
- package/lib/cli/options.js +2 -1
- package/lib/errors.js +90 -5
- package/lib/esm-utils.js +23 -1
- package/lib/runnable.js +7 -8
- package/lib/utils.js +3 -0
- package/mocha.js +768 -425
- package/mocha.js.map +1 -1
- package/package.json +14 -13
package/mocha.js
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
check(typeof self == 'object' && self) ||
|
|
37
37
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
38
38
|
// eslint-disable-next-line no-new-func
|
|
39
|
-
Function('return this')();
|
|
39
|
+
(function () { return this; })() || Function('return this')();
|
|
40
40
|
|
|
41
41
|
var fails = function (exec) {
|
|
42
42
|
try {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
50
50
|
var descriptors = !fails(function () {
|
|
51
51
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
52
52
|
});
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
59
59
|
|
|
60
60
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
61
|
-
// https://tc39.
|
|
61
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
62
62
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
63
63
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
64
64
|
return !!descriptor && descriptor.enumerable;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
} : Object;
|
|
96
96
|
|
|
97
97
|
// `RequireObjectCoercible` abstract operation
|
|
98
|
-
// https://tc39.
|
|
98
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
99
99
|
var requireObjectCoercible = function (it) {
|
|
100
100
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
101
101
|
return it;
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
};
|
|
115
115
|
|
|
116
116
|
// `ToPrimitive` abstract operation
|
|
117
|
-
// https://tc39.
|
|
117
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
118
118
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
119
119
|
// and the second argument - flag - preferred type is a string
|
|
120
120
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
151
151
|
|
|
152
152
|
// `Object.getOwnPropertyDescriptor` method
|
|
153
|
-
// https://tc39.
|
|
153
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
154
154
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
155
155
|
O = toIndexedObject(O);
|
|
156
156
|
P = toPrimitive(P, true);
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
var nativeDefineProperty = Object.defineProperty;
|
|
174
174
|
|
|
175
175
|
// `Object.defineProperty` method
|
|
176
|
-
// https://tc39.
|
|
176
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
177
177
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
178
178
|
anObject(O);
|
|
179
179
|
P = toPrimitive(P, true);
|
|
@@ -229,9 +229,9 @@
|
|
|
229
229
|
(module.exports = function (key, value) {
|
|
230
230
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
231
231
|
})('versions', []).push({
|
|
232
|
-
version: '3.
|
|
232
|
+
version: '3.8.3',
|
|
233
233
|
mode: 'global',
|
|
234
|
-
copyright: '©
|
|
234
|
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
235
235
|
});
|
|
236
236
|
});
|
|
237
237
|
|
|
@@ -267,11 +267,12 @@
|
|
|
267
267
|
};
|
|
268
268
|
|
|
269
269
|
if (nativeWeakMap) {
|
|
270
|
-
var store$1 = new WeakMap$1();
|
|
270
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
271
271
|
var wmget = store$1.get;
|
|
272
272
|
var wmhas = store$1.has;
|
|
273
273
|
var wmset = store$1.set;
|
|
274
274
|
set = function (it, metadata) {
|
|
275
|
+
metadata.facade = it;
|
|
275
276
|
wmset.call(store$1, it, metadata);
|
|
276
277
|
return metadata;
|
|
277
278
|
};
|
|
@@ -285,6 +286,7 @@
|
|
|
285
286
|
var STATE = sharedKey('state');
|
|
286
287
|
hiddenKeys[STATE] = true;
|
|
287
288
|
set = function (it, metadata) {
|
|
289
|
+
metadata.facade = it;
|
|
288
290
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
289
291
|
return metadata;
|
|
290
292
|
};
|
|
@@ -313,9 +315,15 @@
|
|
|
313
315
|
var unsafe = options ? !!options.unsafe : false;
|
|
314
316
|
var simple = options ? !!options.enumerable : false;
|
|
315
317
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
318
|
+
var state;
|
|
316
319
|
if (typeof value == 'function') {
|
|
317
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
|
318
|
-
|
|
320
|
+
if (typeof key == 'string' && !has(value, 'name')) {
|
|
321
|
+
createNonEnumerableProperty(value, 'name', key);
|
|
322
|
+
}
|
|
323
|
+
state = enforceInternalState(value);
|
|
324
|
+
if (!state.source) {
|
|
325
|
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
326
|
+
}
|
|
319
327
|
}
|
|
320
328
|
if (O === global_1) {
|
|
321
329
|
if (simple) O[key] = value;
|
|
@@ -349,7 +357,7 @@
|
|
|
349
357
|
var floor = Math.floor;
|
|
350
358
|
|
|
351
359
|
// `ToInteger` abstract operation
|
|
352
|
-
// https://tc39.
|
|
360
|
+
// https://tc39.es/ecma262/#sec-tointeger
|
|
353
361
|
var toInteger = function (argument) {
|
|
354
362
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
355
363
|
};
|
|
@@ -357,7 +365,7 @@
|
|
|
357
365
|
var min = Math.min;
|
|
358
366
|
|
|
359
367
|
// `ToLength` abstract operation
|
|
360
|
-
// https://tc39.
|
|
368
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
361
369
|
var toLength = function (argument) {
|
|
362
370
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
363
371
|
};
|
|
@@ -395,10 +403,10 @@
|
|
|
395
403
|
|
|
396
404
|
var arrayIncludes = {
|
|
397
405
|
// `Array.prototype.includes` method
|
|
398
|
-
// https://tc39.
|
|
406
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
399
407
|
includes: createMethod(true),
|
|
400
408
|
// `Array.prototype.indexOf` method
|
|
401
|
-
// https://tc39.
|
|
409
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
402
410
|
indexOf: createMethod(false)
|
|
403
411
|
};
|
|
404
412
|
|
|
@@ -432,7 +440,7 @@
|
|
|
432
440
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
433
441
|
|
|
434
442
|
// `Object.getOwnPropertyNames` method
|
|
435
|
-
// https://tc39.
|
|
443
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
436
444
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
437
445
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
438
446
|
};
|
|
@@ -568,13 +576,13 @@
|
|
|
568
576
|
};
|
|
569
577
|
|
|
570
578
|
// `ToObject` abstract operation
|
|
571
|
-
// https://tc39.
|
|
579
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
572
580
|
var toObject = function (argument) {
|
|
573
581
|
return Object(requireObjectCoercible(argument));
|
|
574
582
|
};
|
|
575
583
|
|
|
576
584
|
// `IsArray` abstract operation
|
|
577
|
-
// https://tc39.
|
|
585
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
578
586
|
var isArray = Array.isArray || function isArray(arg) {
|
|
579
587
|
return classofRaw(arg) == 'Array';
|
|
580
588
|
};
|
|
@@ -605,7 +613,7 @@
|
|
|
605
613
|
var SPECIES = wellKnownSymbol('species');
|
|
606
614
|
|
|
607
615
|
// `ArraySpeciesCreate` abstract operation
|
|
608
|
-
// https://tc39.
|
|
616
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
609
617
|
var arraySpeciesCreate = function (originalArray, length) {
|
|
610
618
|
var C;
|
|
611
619
|
if (isArray(originalArray)) {
|
|
@@ -621,13 +629,14 @@
|
|
|
621
629
|
|
|
622
630
|
var push = [].push;
|
|
623
631
|
|
|
624
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
632
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
|
625
633
|
var createMethod$1 = function (TYPE) {
|
|
626
634
|
var IS_MAP = TYPE == 1;
|
|
627
635
|
var IS_FILTER = TYPE == 2;
|
|
628
636
|
var IS_SOME = TYPE == 3;
|
|
629
637
|
var IS_EVERY = TYPE == 4;
|
|
630
638
|
var IS_FIND_INDEX = TYPE == 6;
|
|
639
|
+
var IS_FILTER_OUT = TYPE == 7;
|
|
631
640
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
632
641
|
return function ($this, callbackfn, that, specificCreate) {
|
|
633
642
|
var O = toObject($this);
|
|
@@ -636,7 +645,7 @@
|
|
|
636
645
|
var length = toLength(self.length);
|
|
637
646
|
var index = 0;
|
|
638
647
|
var create = specificCreate || arraySpeciesCreate;
|
|
639
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
648
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
|
640
649
|
var value, result;
|
|
641
650
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
642
651
|
value = self[index];
|
|
@@ -648,7 +657,10 @@
|
|
|
648
657
|
case 5: return value; // find
|
|
649
658
|
case 6: return index; // findIndex
|
|
650
659
|
case 2: push.call(target, value); // filter
|
|
651
|
-
} else
|
|
660
|
+
} else switch (TYPE) {
|
|
661
|
+
case 4: return false; // every
|
|
662
|
+
case 7: push.call(target, value); // filterOut
|
|
663
|
+
}
|
|
652
664
|
}
|
|
653
665
|
}
|
|
654
666
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
@@ -657,26 +669,29 @@
|
|
|
657
669
|
|
|
658
670
|
var arrayIteration = {
|
|
659
671
|
// `Array.prototype.forEach` method
|
|
660
|
-
// https://tc39.
|
|
672
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
661
673
|
forEach: createMethod$1(0),
|
|
662
674
|
// `Array.prototype.map` method
|
|
663
|
-
// https://tc39.
|
|
675
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
664
676
|
map: createMethod$1(1),
|
|
665
677
|
// `Array.prototype.filter` method
|
|
666
|
-
// https://tc39.
|
|
678
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
667
679
|
filter: createMethod$1(2),
|
|
668
680
|
// `Array.prototype.some` method
|
|
669
|
-
// https://tc39.
|
|
681
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
670
682
|
some: createMethod$1(3),
|
|
671
683
|
// `Array.prototype.every` method
|
|
672
|
-
// https://tc39.
|
|
684
|
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
|
673
685
|
every: createMethod$1(4),
|
|
674
686
|
// `Array.prototype.find` method
|
|
675
|
-
// https://tc39.
|
|
687
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
676
688
|
find: createMethod$1(5),
|
|
677
689
|
// `Array.prototype.findIndex` method
|
|
678
|
-
// https://tc39.
|
|
679
|
-
findIndex: createMethod$1(6)
|
|
690
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
|
691
|
+
findIndex: createMethod$1(6),
|
|
692
|
+
// `Array.prototype.filterOut` method
|
|
693
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
694
|
+
filterOut: createMethod$1(7)
|
|
680
695
|
};
|
|
681
696
|
|
|
682
697
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
@@ -748,7 +763,7 @@
|
|
|
748
763
|
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
|
749
764
|
|
|
750
765
|
// `Array.prototype.filter` method
|
|
751
|
-
// https://tc39.
|
|
766
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
752
767
|
// with adding support of @@species
|
|
753
768
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
754
769
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
@@ -772,13 +787,13 @@
|
|
|
772
787
|
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('forEach');
|
|
773
788
|
|
|
774
789
|
// `Array.prototype.forEach` method implementation
|
|
775
|
-
// https://tc39.
|
|
790
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
776
791
|
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$1) ? function forEach(callbackfn /* , thisArg */) {
|
|
777
792
|
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
778
793
|
} : [].forEach;
|
|
779
794
|
|
|
780
795
|
// `Array.prototype.forEach` method
|
|
781
|
-
// https://tc39.
|
|
796
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
782
797
|
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
|
|
783
798
|
forEach: arrayForEach
|
|
784
799
|
});
|
|
@@ -794,7 +809,7 @@
|
|
|
794
809
|
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
795
810
|
|
|
796
811
|
// `Array.prototype.indexOf` method
|
|
797
|
-
// https://tc39.
|
|
812
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
798
813
|
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$2 }, {
|
|
799
814
|
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
800
815
|
return NEGATIVE_ZERO
|
|
@@ -819,7 +834,7 @@
|
|
|
819
834
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
820
835
|
|
|
821
836
|
// `Array.prototype.splice` method
|
|
822
|
-
// https://tc39.
|
|
837
|
+
// https://tc39.es/ecma262/#sec-array.prototype.splice
|
|
823
838
|
// with adding support of @@species
|
|
824
839
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$3 }, {
|
|
825
840
|
splice: function splice(start, deleteCount /* , ...items */) {
|
|
@@ -871,7 +886,7 @@
|
|
|
871
886
|
});
|
|
872
887
|
|
|
873
888
|
// `Object.keys` method
|
|
874
|
-
// https://tc39.
|
|
889
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
875
890
|
var objectKeys = Object.keys || function keys(O) {
|
|
876
891
|
return objectKeysInternal(O, enumBugKeys);
|
|
877
892
|
};
|
|
@@ -880,7 +895,7 @@
|
|
|
880
895
|
var defineProperty$1 = Object.defineProperty;
|
|
881
896
|
|
|
882
897
|
// `Object.assign` method
|
|
883
|
-
// https://tc39.
|
|
898
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
884
899
|
var objectAssign = !nativeAssign || fails(function () {
|
|
885
900
|
// should have correct order of operations (Edge bug)
|
|
886
901
|
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
|
|
@@ -921,7 +936,7 @@
|
|
|
921
936
|
} : nativeAssign;
|
|
922
937
|
|
|
923
938
|
// `Object.assign` method
|
|
924
|
-
// https://tc39.
|
|
939
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
925
940
|
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
|
926
941
|
assign: objectAssign
|
|
927
942
|
});
|
|
@@ -929,7 +944,7 @@
|
|
|
929
944
|
var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
|
|
930
945
|
|
|
931
946
|
// `Object.keys` method
|
|
932
|
-
// https://tc39.
|
|
947
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
933
948
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
934
949
|
keys: function keys(it) {
|
|
935
950
|
return objectKeys(toObject(it));
|
|
@@ -937,7 +952,7 @@
|
|
|
937
952
|
});
|
|
938
953
|
|
|
939
954
|
// `RegExp.prototype.flags` getter implementation
|
|
940
|
-
// https://tc39.
|
|
955
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
941
956
|
var regexpFlags = function () {
|
|
942
957
|
var that = anObject(this);
|
|
943
958
|
var result = '';
|
|
@@ -1059,6 +1074,8 @@
|
|
|
1059
1074
|
|
|
1060
1075
|
var regexpExec = patchedExec;
|
|
1061
1076
|
|
|
1077
|
+
// `RegExp.prototype.exec` method
|
|
1078
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1062
1079
|
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
1063
1080
|
exec: regexpExec
|
|
1064
1081
|
});
|
|
@@ -1189,14 +1206,14 @@
|
|
|
1189
1206
|
};
|
|
1190
1207
|
|
|
1191
1208
|
// `SameValue` abstract operation
|
|
1192
|
-
// https://tc39.
|
|
1209
|
+
// https://tc39.es/ecma262/#sec-samevalue
|
|
1193
1210
|
var sameValue = Object.is || function is(x, y) {
|
|
1194
1211
|
// eslint-disable-next-line no-self-compare
|
|
1195
1212
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
1196
1213
|
};
|
|
1197
1214
|
|
|
1198
1215
|
// `RegExpExec` abstract operation
|
|
1199
|
-
// https://tc39.
|
|
1216
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
1200
1217
|
var regexpExecAbstract = function (R, S) {
|
|
1201
1218
|
var exec = R.exec;
|
|
1202
1219
|
if (typeof exec === 'function') {
|
|
@@ -1218,14 +1235,14 @@
|
|
|
1218
1235
|
fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
|
1219
1236
|
return [
|
|
1220
1237
|
// `String.prototype.search` method
|
|
1221
|
-
// https://tc39.
|
|
1238
|
+
// https://tc39.es/ecma262/#sec-string.prototype.search
|
|
1222
1239
|
function search(regexp) {
|
|
1223
1240
|
var O = requireObjectCoercible(this);
|
|
1224
1241
|
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
1225
1242
|
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
1226
1243
|
},
|
|
1227
1244
|
// `RegExp.prototype[@@search]` method
|
|
1228
|
-
// https://tc39.
|
|
1245
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
1229
1246
|
function (regexp) {
|
|
1230
1247
|
var res = maybeCallNative(nativeSearch, regexp, this);
|
|
1231
1248
|
if (res.done) return res.value;
|
|
@@ -1313,7 +1330,7 @@
|
|
|
1313
1330
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
1314
1331
|
|
|
1315
1332
|
// `Array.prototype.concat` method
|
|
1316
|
-
// https://tc39.
|
|
1333
|
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
|
1317
1334
|
// with adding support of @@isConcatSpreadable and @@species
|
|
1318
1335
|
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1319
1336
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
@@ -1612,13 +1629,13 @@
|
|
|
1612
1629
|
};
|
|
1613
1630
|
|
|
1614
1631
|
// `Object.prototype.toString` method implementation
|
|
1615
|
-
// https://tc39.
|
|
1632
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1616
1633
|
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
1617
1634
|
return '[object ' + classof(this) + ']';
|
|
1618
1635
|
};
|
|
1619
1636
|
|
|
1620
1637
|
// `Object.prototype.toString` method
|
|
1621
|
-
// https://tc39.
|
|
1638
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1622
1639
|
if (!toStringTagSupport) {
|
|
1623
1640
|
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
1624
1641
|
}
|
|
@@ -1632,7 +1649,7 @@
|
|
|
1632
1649
|
var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
|
1633
1650
|
|
|
1634
1651
|
// `RegExp.prototype.toString` method
|
|
1635
|
-
// https://tc39.
|
|
1652
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
1636
1653
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
1637
1654
|
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
1638
1655
|
var R = anObject(this);
|
|
@@ -1651,7 +1668,7 @@
|
|
|
1651
1668
|
var NAME = 'name';
|
|
1652
1669
|
|
|
1653
1670
|
// Function instances `.name` property
|
|
1654
|
-
// https://tc39.
|
|
1671
|
+
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
1655
1672
|
if (descriptors && !(NAME in FunctionPrototype)) {
|
|
1656
1673
|
defineProperty$2(FunctionPrototype, NAME, {
|
|
1657
1674
|
configurable: true,
|
|
@@ -1675,7 +1692,7 @@
|
|
|
1675
1692
|
var ObjectPrototype = Object.prototype;
|
|
1676
1693
|
|
|
1677
1694
|
// `Object.getPrototypeOf` method
|
|
1678
|
-
// https://tc39.
|
|
1695
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1679
1696
|
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1680
1697
|
O = toObject(O);
|
|
1681
1698
|
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
@@ -1687,7 +1704,7 @@
|
|
|
1687
1704
|
var FAILS_ON_PRIMITIVES$1 = fails(function () { objectGetPrototypeOf(1); });
|
|
1688
1705
|
|
|
1689
1706
|
// `Object.getPrototypeOf` method
|
|
1690
|
-
// https://tc39.
|
|
1707
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1691
1708
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$1, sham: !correctPrototypeGetter }, {
|
|
1692
1709
|
getPrototypeOf: function getPrototypeOf(it) {
|
|
1693
1710
|
return objectGetPrototypeOf(toObject(it));
|
|
@@ -1695,7 +1712,7 @@
|
|
|
1695
1712
|
});
|
|
1696
1713
|
|
|
1697
1714
|
// `Reflect.ownKeys` method
|
|
1698
|
-
// https://tc39.
|
|
1715
|
+
// https://tc39.es/ecma262/#sec-reflect.ownkeys
|
|
1699
1716
|
_export({ target: 'Reflect', stat: true }, {
|
|
1700
1717
|
ownKeys: ownKeys
|
|
1701
1718
|
});
|
|
@@ -2148,7 +2165,7 @@
|
|
|
2148
2165
|
var STRICT_METHOD$2 = arrayMethodIsStrict('join', ',');
|
|
2149
2166
|
|
|
2150
2167
|
// `Array.prototype.join` method
|
|
2151
|
-
// https://tc39.
|
|
2168
|
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
2152
2169
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, {
|
|
2153
2170
|
join: function join(separator) {
|
|
2154
2171
|
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
@@ -2164,7 +2181,7 @@
|
|
|
2164
2181
|
var USES_TO_LENGTH$4 = arrayMethodUsesToLength('map');
|
|
2165
2182
|
|
|
2166
2183
|
// `Array.prototype.map` method
|
|
2167
|
-
// https://tc39.
|
|
2184
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
2168
2185
|
// with adding support of @@species
|
|
2169
2186
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$4 }, {
|
|
2170
2187
|
map: function map(callbackfn /* , thisArg */) {
|
|
@@ -2201,23 +2218,30 @@
|
|
|
2201
2218
|
|
|
2202
2219
|
var arrayReduce = {
|
|
2203
2220
|
// `Array.prototype.reduce` method
|
|
2204
|
-
// https://tc39.
|
|
2221
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
2205
2222
|
left: createMethod$2(false),
|
|
2206
2223
|
// `Array.prototype.reduceRight` method
|
|
2207
|
-
// https://tc39.
|
|
2224
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
2208
2225
|
right: createMethod$2(true)
|
|
2209
2226
|
};
|
|
2210
2227
|
|
|
2228
|
+
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
2229
|
+
|
|
2211
2230
|
var $reduce = arrayReduce.left;
|
|
2212
2231
|
|
|
2213
2232
|
|
|
2214
2233
|
|
|
2234
|
+
|
|
2235
|
+
|
|
2215
2236
|
var STRICT_METHOD$3 = arrayMethodIsStrict('reduce');
|
|
2216
2237
|
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('reduce', { 1: 0 });
|
|
2238
|
+
// Chrome 80-82 has a critical bug
|
|
2239
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
|
|
2240
|
+
var CHROME_BUG = !engineIsNode && engineV8Version > 79 && engineV8Version < 83;
|
|
2217
2241
|
|
|
2218
2242
|
// `Array.prototype.reduce` method
|
|
2219
|
-
// https://tc39.
|
|
2220
|
-
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 || !USES_TO_LENGTH$5 }, {
|
|
2243
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
2244
|
+
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 || !USES_TO_LENGTH$5 || CHROME_BUG }, {
|
|
2221
2245
|
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
2222
2246
|
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
2223
2247
|
}
|
|
@@ -2230,7 +2254,7 @@
|
|
|
2230
2254
|
};
|
|
2231
2255
|
|
|
2232
2256
|
// `Object.setPrototypeOf` method
|
|
2233
|
-
// https://tc39.
|
|
2257
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
2234
2258
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
2235
2259
|
/* eslint-disable no-proto */
|
|
2236
2260
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
@@ -2267,7 +2291,7 @@
|
|
|
2267
2291
|
};
|
|
2268
2292
|
|
|
2269
2293
|
// `Object.defineProperties` method
|
|
2270
|
-
// https://tc39.
|
|
2294
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2271
2295
|
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2272
2296
|
anObject(O);
|
|
2273
2297
|
var keys = objectKeys(Properties);
|
|
@@ -2338,7 +2362,7 @@
|
|
|
2338
2362
|
hiddenKeys[IE_PROTO$1] = true;
|
|
2339
2363
|
|
|
2340
2364
|
// `Object.create` method
|
|
2341
|
-
// https://tc39.
|
|
2365
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2342
2366
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
2343
2367
|
var result;
|
|
2344
2368
|
if (O !== null) {
|
|
@@ -2371,13 +2395,13 @@
|
|
|
2371
2395
|
|
|
2372
2396
|
var stringTrim = {
|
|
2373
2397
|
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
2374
|
-
// https://tc39.
|
|
2398
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
2375
2399
|
start: createMethod$3(1),
|
|
2376
2400
|
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
2377
|
-
// https://tc39.
|
|
2401
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
2378
2402
|
end: createMethod$3(2),
|
|
2379
2403
|
// `String.prototype.trim` method
|
|
2380
|
-
// https://tc39.
|
|
2404
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2381
2405
|
trim: createMethod$3(3)
|
|
2382
2406
|
};
|
|
2383
2407
|
|
|
@@ -2394,7 +2418,7 @@
|
|
|
2394
2418
|
var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
|
|
2395
2419
|
|
|
2396
2420
|
// `ToNumber` abstract operation
|
|
2397
|
-
// https://tc39.
|
|
2421
|
+
// https://tc39.es/ecma262/#sec-tonumber
|
|
2398
2422
|
var toNumber = function (argument) {
|
|
2399
2423
|
var it = toPrimitive(argument, false);
|
|
2400
2424
|
var first, third, radix, maxCode, digits, length, index, code;
|
|
@@ -2423,7 +2447,7 @@
|
|
|
2423
2447
|
};
|
|
2424
2448
|
|
|
2425
2449
|
// `Number` constructor
|
|
2426
|
-
// https://tc39.
|
|
2450
|
+
// https://tc39.es/ecma262/#sec-number-constructor
|
|
2427
2451
|
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
|
2428
2452
|
var NumberWrapper = function Number(value) {
|
|
2429
2453
|
var it = arguments.length < 1 ? 0 : value;
|
|
@@ -2438,7 +2462,9 @@
|
|
|
2438
2462
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
|
2439
2463
|
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
|
2440
2464
|
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
|
2441
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
|
2465
|
+
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
|
2466
|
+
// ESNext
|
|
2467
|
+
'fromString,range'
|
|
2442
2468
|
).split(','), j = 0, key; keys$1.length > j; j++) {
|
|
2443
2469
|
if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
|
|
2444
2470
|
defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
|
|
@@ -2456,7 +2482,7 @@
|
|
|
2456
2482
|
var FORCED$1 = !descriptors || FAILS_ON_PRIMITIVES$2;
|
|
2457
2483
|
|
|
2458
2484
|
// `Object.getOwnPropertyDescriptor` method
|
|
2459
|
-
// https://tc39.
|
|
2485
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
2460
2486
|
_export({ target: 'Object', stat: true, forced: FORCED$1, sham: !descriptors }, {
|
|
2461
2487
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
2462
2488
|
return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
|
|
@@ -2494,7 +2520,7 @@
|
|
|
2494
2520
|
var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
|
|
2495
2521
|
|
|
2496
2522
|
// `Object.getOwnPropertyNames` method
|
|
2497
|
-
// https://tc39.
|
|
2523
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
2498
2524
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
|
|
2499
2525
|
getOwnPropertyNames: nativeGetOwnPropertyNames$1
|
|
2500
2526
|
});
|
|
@@ -2502,7 +2528,7 @@
|
|
|
2502
2528
|
var MATCH = wellKnownSymbol('match');
|
|
2503
2529
|
|
|
2504
2530
|
// `IsRegExp` abstract operation
|
|
2505
|
-
// https://tc39.
|
|
2531
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
2506
2532
|
var isRegexp = function (it) {
|
|
2507
2533
|
var isRegExp;
|
|
2508
2534
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
@@ -2551,7 +2577,7 @@
|
|
|
2551
2577
|
})));
|
|
2552
2578
|
|
|
2553
2579
|
// `RegExp` constructor
|
|
2554
|
-
// https://tc39.
|
|
2580
|
+
// https://tc39.es/ecma262/#sec-regexp-constructor
|
|
2555
2581
|
if (FORCED$2) {
|
|
2556
2582
|
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
2557
2583
|
var thisIsRegExp = this instanceof RegExpWrapper;
|
|
@@ -2600,7 +2626,7 @@
|
|
|
2600
2626
|
redefine(global_1, 'RegExp', RegExpWrapper);
|
|
2601
2627
|
}
|
|
2602
2628
|
|
|
2603
|
-
// https://tc39.
|
|
2629
|
+
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
2604
2630
|
setSpecies('RegExp');
|
|
2605
2631
|
|
|
2606
2632
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
@@ -2621,7 +2647,7 @@
|
|
|
2621
2647
|
|
|
2622
2648
|
var stringMultibyte = {
|
|
2623
2649
|
// `String.prototype.codePointAt` method
|
|
2624
|
-
// https://tc39.
|
|
2650
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2625
2651
|
codeAt: createMethod$4(false),
|
|
2626
2652
|
// `String.prototype.at` method
|
|
2627
2653
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
@@ -2631,7 +2657,7 @@
|
|
|
2631
2657
|
var charAt = stringMultibyte.charAt;
|
|
2632
2658
|
|
|
2633
2659
|
// `AdvanceStringIndex` abstract operation
|
|
2634
|
-
// https://tc39.
|
|
2660
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2635
2661
|
var advanceStringIndex = function (S, index, unicode) {
|
|
2636
2662
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
2637
2663
|
};
|
|
@@ -2640,14 +2666,14 @@
|
|
|
2640
2666
|
fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
|
2641
2667
|
return [
|
|
2642
2668
|
// `String.prototype.match` method
|
|
2643
|
-
// https://tc39.
|
|
2669
|
+
// https://tc39.es/ecma262/#sec-string.prototype.match
|
|
2644
2670
|
function match(regexp) {
|
|
2645
2671
|
var O = requireObjectCoercible(this);
|
|
2646
2672
|
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
|
2647
2673
|
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
2648
2674
|
},
|
|
2649
2675
|
// `RegExp.prototype[@@match]` method
|
|
2650
|
-
// https://tc39.
|
|
2676
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
|
2651
2677
|
function (regexp) {
|
|
2652
2678
|
var res = maybeCallNative(nativeMatch, regexp, this);
|
|
2653
2679
|
if (res.done) return res.value;
|
|
@@ -2673,12 +2699,48 @@
|
|
|
2673
2699
|
];
|
|
2674
2700
|
});
|
|
2675
2701
|
|
|
2676
|
-
var max$2 = Math.max;
|
|
2677
|
-
var min$3 = Math.min;
|
|
2678
2702
|
var floor$1 = Math.floor;
|
|
2703
|
+
var replace = ''.replace;
|
|
2679
2704
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
|
2680
2705
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
|
2681
2706
|
|
|
2707
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
2708
|
+
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
2709
|
+
var tailPos = position + matched.length;
|
|
2710
|
+
var m = captures.length;
|
|
2711
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2712
|
+
if (namedCaptures !== undefined) {
|
|
2713
|
+
namedCaptures = toObject(namedCaptures);
|
|
2714
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
2715
|
+
}
|
|
2716
|
+
return replace.call(replacement, symbols, function (match, ch) {
|
|
2717
|
+
var capture;
|
|
2718
|
+
switch (ch.charAt(0)) {
|
|
2719
|
+
case '$': return '$';
|
|
2720
|
+
case '&': return matched;
|
|
2721
|
+
case '`': return str.slice(0, position);
|
|
2722
|
+
case "'": return str.slice(tailPos);
|
|
2723
|
+
case '<':
|
|
2724
|
+
capture = namedCaptures[ch.slice(1, -1)];
|
|
2725
|
+
break;
|
|
2726
|
+
default: // \d\d?
|
|
2727
|
+
var n = +ch;
|
|
2728
|
+
if (n === 0) return match;
|
|
2729
|
+
if (n > m) {
|
|
2730
|
+
var f = floor$1(n / 10);
|
|
2731
|
+
if (f === 0) return match;
|
|
2732
|
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2733
|
+
return match;
|
|
2734
|
+
}
|
|
2735
|
+
capture = captures[n - 1];
|
|
2736
|
+
}
|
|
2737
|
+
return capture === undefined ? '' : capture;
|
|
2738
|
+
});
|
|
2739
|
+
};
|
|
2740
|
+
|
|
2741
|
+
var max$2 = Math.max;
|
|
2742
|
+
var min$3 = Math.min;
|
|
2743
|
+
|
|
2682
2744
|
var maybeToString = function (it) {
|
|
2683
2745
|
return it === undefined ? it : String(it);
|
|
2684
2746
|
};
|
|
@@ -2691,7 +2753,7 @@
|
|
|
2691
2753
|
|
|
2692
2754
|
return [
|
|
2693
2755
|
// `String.prototype.replace` method
|
|
2694
|
-
// https://tc39.
|
|
2756
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2695
2757
|
function replace(searchValue, replaceValue) {
|
|
2696
2758
|
var O = requireObjectCoercible(this);
|
|
2697
2759
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
@@ -2700,7 +2762,7 @@
|
|
|
2700
2762
|
: nativeReplace.call(String(O), searchValue, replaceValue);
|
|
2701
2763
|
},
|
|
2702
2764
|
// `RegExp.prototype[@@replace]` method
|
|
2703
|
-
// https://tc39.
|
|
2765
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2704
2766
|
function (regexp, replaceValue) {
|
|
2705
2767
|
if (
|
|
2706
2768
|
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
|
@@ -2763,46 +2825,12 @@
|
|
|
2763
2825
|
return accumulatedResult + S.slice(nextSourcePosition);
|
|
2764
2826
|
}
|
|
2765
2827
|
];
|
|
2766
|
-
|
|
2767
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
2768
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
2769
|
-
var tailPos = position + matched.length;
|
|
2770
|
-
var m = captures.length;
|
|
2771
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2772
|
-
if (namedCaptures !== undefined) {
|
|
2773
|
-
namedCaptures = toObject(namedCaptures);
|
|
2774
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
2775
|
-
}
|
|
2776
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
|
2777
|
-
var capture;
|
|
2778
|
-
switch (ch.charAt(0)) {
|
|
2779
|
-
case '$': return '$';
|
|
2780
|
-
case '&': return matched;
|
|
2781
|
-
case '`': return str.slice(0, position);
|
|
2782
|
-
case "'": return str.slice(tailPos);
|
|
2783
|
-
case '<':
|
|
2784
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
|
2785
|
-
break;
|
|
2786
|
-
default: // \d\d?
|
|
2787
|
-
var n = +ch;
|
|
2788
|
-
if (n === 0) return match;
|
|
2789
|
-
if (n > m) {
|
|
2790
|
-
var f = floor$1(n / 10);
|
|
2791
|
-
if (f === 0) return match;
|
|
2792
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2793
|
-
return match;
|
|
2794
|
-
}
|
|
2795
|
-
capture = captures[n - 1];
|
|
2796
|
-
}
|
|
2797
|
-
return capture === undefined ? '' : capture;
|
|
2798
|
-
});
|
|
2799
|
-
}
|
|
2800
2828
|
});
|
|
2801
2829
|
|
|
2802
2830
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
2803
2831
|
|
|
2804
2832
|
// `SpeciesConstructor` abstract operation
|
|
2805
|
-
// https://tc39.
|
|
2833
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2806
2834
|
var speciesConstructor = function (O, defaultConstructor) {
|
|
2807
2835
|
var C = anObject(O).constructor;
|
|
2808
2836
|
var S;
|
|
@@ -2871,7 +2899,7 @@
|
|
|
2871
2899
|
|
|
2872
2900
|
return [
|
|
2873
2901
|
// `String.prototype.split` method
|
|
2874
|
-
// https://tc39.
|
|
2902
|
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
2875
2903
|
function split(separator, limit) {
|
|
2876
2904
|
var O = requireObjectCoercible(this);
|
|
2877
2905
|
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
|
@@ -2880,7 +2908,7 @@
|
|
|
2880
2908
|
: internalSplit.call(String(O), separator, limit);
|
|
2881
2909
|
},
|
|
2882
2910
|
// `RegExp.prototype[@@split]` method
|
|
2883
|
-
// https://tc39.
|
|
2911
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
2884
2912
|
//
|
|
2885
2913
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
2886
2914
|
// the 'y' flag.
|
|
@@ -3321,7 +3349,7 @@
|
|
|
3321
3349
|
};
|
|
3322
3350
|
|
|
3323
3351
|
// `Symbol` constructor
|
|
3324
|
-
// https://tc39.
|
|
3352
|
+
// https://tc39.es/ecma262/#sec-symbol-constructor
|
|
3325
3353
|
if (!nativeSymbol) {
|
|
3326
3354
|
$Symbol = function Symbol() {
|
|
3327
3355
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
@@ -3378,7 +3406,7 @@
|
|
|
3378
3406
|
|
|
3379
3407
|
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
|
3380
3408
|
// `Symbol.for` method
|
|
3381
|
-
// https://tc39.
|
|
3409
|
+
// https://tc39.es/ecma262/#sec-symbol.for
|
|
3382
3410
|
'for': function (key) {
|
|
3383
3411
|
var string = String(key);
|
|
3384
3412
|
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
@@ -3388,7 +3416,7 @@
|
|
|
3388
3416
|
return symbol;
|
|
3389
3417
|
},
|
|
3390
3418
|
// `Symbol.keyFor` method
|
|
3391
|
-
// https://tc39.
|
|
3419
|
+
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
|
3392
3420
|
keyFor: function keyFor(sym) {
|
|
3393
3421
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
3394
3422
|
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
@@ -3399,25 +3427,25 @@
|
|
|
3399
3427
|
|
|
3400
3428
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
3401
3429
|
// `Object.create` method
|
|
3402
|
-
// https://tc39.
|
|
3430
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
3403
3431
|
create: $create,
|
|
3404
3432
|
// `Object.defineProperty` method
|
|
3405
|
-
// https://tc39.
|
|
3433
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
3406
3434
|
defineProperty: $defineProperty,
|
|
3407
3435
|
// `Object.defineProperties` method
|
|
3408
|
-
// https://tc39.
|
|
3436
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
3409
3437
|
defineProperties: $defineProperties,
|
|
3410
3438
|
// `Object.getOwnPropertyDescriptor` method
|
|
3411
|
-
// https://tc39.
|
|
3439
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
|
3412
3440
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
3413
3441
|
});
|
|
3414
3442
|
|
|
3415
3443
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
3416
3444
|
// `Object.getOwnPropertyNames` method
|
|
3417
|
-
// https://tc39.
|
|
3445
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
3418
3446
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
3419
3447
|
// `Object.getOwnPropertySymbols` method
|
|
3420
|
-
// https://tc39.
|
|
3448
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
|
|
3421
3449
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
3422
3450
|
});
|
|
3423
3451
|
|
|
@@ -3430,7 +3458,7 @@
|
|
|
3430
3458
|
});
|
|
3431
3459
|
|
|
3432
3460
|
// `JSON.stringify` method behavior with symbols
|
|
3433
|
-
// https://tc39.
|
|
3461
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3434
3462
|
if ($stringify) {
|
|
3435
3463
|
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
|
3436
3464
|
var symbol = $Symbol();
|
|
@@ -3462,12 +3490,12 @@
|
|
|
3462
3490
|
}
|
|
3463
3491
|
|
|
3464
3492
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
3465
|
-
// https://tc39.
|
|
3493
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
3466
3494
|
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
|
3467
3495
|
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
|
3468
3496
|
}
|
|
3469
3497
|
// `Symbol.prototype[@@toStringTag]` property
|
|
3470
|
-
// https://tc39.
|
|
3498
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
3471
3499
|
setToStringTag($Symbol, SYMBOL);
|
|
3472
3500
|
|
|
3473
3501
|
hiddenKeys[HIDDEN] = true;
|
|
@@ -3516,11 +3544,11 @@
|
|
|
3516
3544
|
}
|
|
3517
3545
|
|
|
3518
3546
|
// `Symbol.species` well-known symbol
|
|
3519
|
-
// https://tc39.
|
|
3547
|
+
// https://tc39.es/ecma262/#sec-symbol.species
|
|
3520
3548
|
defineWellKnownSymbol('species');
|
|
3521
3549
|
|
|
3522
3550
|
// `Array.prototype.fill` method implementation
|
|
3523
|
-
// https://tc39.
|
|
3551
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3524
3552
|
var arrayFill = function fill(value /* , start = 0, end = @length */) {
|
|
3525
3553
|
var O = toObject(this);
|
|
3526
3554
|
var length = toLength(O.length);
|
|
@@ -3536,7 +3564,7 @@
|
|
|
3536
3564
|
var ArrayPrototype = Array.prototype;
|
|
3537
3565
|
|
|
3538
3566
|
// Array.prototype[@@unscopables]
|
|
3539
|
-
// https://tc39.
|
|
3567
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3540
3568
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
3541
3569
|
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
3542
3570
|
configurable: true,
|
|
@@ -3550,12 +3578,12 @@
|
|
|
3550
3578
|
};
|
|
3551
3579
|
|
|
3552
3580
|
// `Array.prototype.fill` method
|
|
3553
|
-
// https://tc39.
|
|
3581
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3554
3582
|
_export({ target: 'Array', proto: true }, {
|
|
3555
3583
|
fill: arrayFill
|
|
3556
3584
|
});
|
|
3557
3585
|
|
|
3558
|
-
// https://tc39.
|
|
3586
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3559
3587
|
addToUnscopables('fill');
|
|
3560
3588
|
|
|
3561
3589
|
var $includes = arrayIncludes.includes;
|
|
@@ -3565,14 +3593,14 @@
|
|
|
3565
3593
|
var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
3566
3594
|
|
|
3567
3595
|
// `Array.prototype.includes` method
|
|
3568
|
-
// https://tc39.
|
|
3596
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
3569
3597
|
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$6 }, {
|
|
3570
3598
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
3571
3599
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
3572
3600
|
}
|
|
3573
3601
|
});
|
|
3574
3602
|
|
|
3575
|
-
// https://tc39.
|
|
3603
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3576
3604
|
addToUnscopables('includes');
|
|
3577
3605
|
|
|
3578
3606
|
var iterators = {};
|
|
@@ -3583,7 +3611,7 @@
|
|
|
3583
3611
|
var returnThis = function () { return this; };
|
|
3584
3612
|
|
|
3585
3613
|
// `%IteratorPrototype%` object
|
|
3586
|
-
// https://tc39.
|
|
3614
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
3587
3615
|
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
3588
3616
|
|
|
3589
3617
|
if ([].keys) {
|
|
@@ -3596,7 +3624,13 @@
|
|
|
3596
3624
|
}
|
|
3597
3625
|
}
|
|
3598
3626
|
|
|
3599
|
-
|
|
3627
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
|
3628
|
+
var test = {};
|
|
3629
|
+
// FF44- legacy iterators case
|
|
3630
|
+
return IteratorPrototype[ITERATOR].call(test) !== test;
|
|
3631
|
+
});
|
|
3632
|
+
|
|
3633
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
|
|
3600
3634
|
|
|
3601
3635
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
3602
3636
|
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
@@ -3706,15 +3740,15 @@
|
|
|
3706
3740
|
var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
|
|
3707
3741
|
|
|
3708
3742
|
// `Array.prototype.entries` method
|
|
3709
|
-
// https://tc39.
|
|
3743
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
3710
3744
|
// `Array.prototype.keys` method
|
|
3711
|
-
// https://tc39.
|
|
3745
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
3712
3746
|
// `Array.prototype.values` method
|
|
3713
|
-
// https://tc39.
|
|
3747
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
3714
3748
|
// `Array.prototype[@@iterator]` method
|
|
3715
|
-
// https://tc39.
|
|
3749
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
3716
3750
|
// `CreateArrayIterator` internal method
|
|
3717
|
-
// https://tc39.
|
|
3751
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
3718
3752
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
3719
3753
|
setInternalState$2(this, {
|
|
3720
3754
|
type: ARRAY_ITERATOR,
|
|
@@ -3723,7 +3757,7 @@
|
|
|
3723
3757
|
kind: kind // kind
|
|
3724
3758
|
});
|
|
3725
3759
|
// `%ArrayIteratorPrototype%.next` method
|
|
3726
|
-
// https://tc39.
|
|
3760
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
3727
3761
|
}, function () {
|
|
3728
3762
|
var state = getInternalState$1(this);
|
|
3729
3763
|
var target = state.target;
|
|
@@ -3739,11 +3773,11 @@
|
|
|
3739
3773
|
}, 'values');
|
|
3740
3774
|
|
|
3741
3775
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
3742
|
-
// https://tc39.
|
|
3743
|
-
// https://tc39.
|
|
3776
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
3777
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
3744
3778
|
iterators.Arguments = iterators.Array;
|
|
3745
3779
|
|
|
3746
|
-
// https://tc39.
|
|
3780
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3747
3781
|
addToUnscopables('keys');
|
|
3748
3782
|
addToUnscopables('values');
|
|
3749
3783
|
addToUnscopables('entries');
|
|
@@ -3757,7 +3791,7 @@
|
|
|
3757
3791
|
var FORCED$3 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
|
|
3758
3792
|
|
|
3759
3793
|
// `Array.prototype.lastIndexOf` method implementation
|
|
3760
|
-
// https://tc39.
|
|
3794
|
+
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
|
3761
3795
|
var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
3762
3796
|
// convert -0 to +0
|
|
3763
3797
|
if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
|
|
@@ -3771,7 +3805,7 @@
|
|
|
3771
3805
|
} : nativeLastIndexOf;
|
|
3772
3806
|
|
|
3773
3807
|
// `Array.prototype.lastIndexOf` method
|
|
3774
|
-
// https://tc39.
|
|
3808
|
+
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
|
3775
3809
|
_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
|
|
3776
3810
|
lastIndexOf: arrayLastIndexOf
|
|
3777
3811
|
});
|
|
@@ -3784,7 +3818,7 @@
|
|
|
3784
3818
|
var max$3 = Math.max;
|
|
3785
3819
|
|
|
3786
3820
|
// `Array.prototype.slice` method
|
|
3787
|
-
// https://tc39.
|
|
3821
|
+
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
|
3788
3822
|
// fallback for not array-like ES3 strings and DOM objects
|
|
3789
3823
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$8 }, {
|
|
3790
3824
|
slice: function slice(start, end) {
|
|
@@ -3815,7 +3849,7 @@
|
|
|
3815
3849
|
});
|
|
3816
3850
|
|
|
3817
3851
|
// `Array[@@species]` getter
|
|
3818
|
-
// https://tc39.
|
|
3852
|
+
// https://tc39.es/ecma262/#sec-get-array-@@species
|
|
3819
3853
|
setSpecies('Array');
|
|
3820
3854
|
|
|
3821
3855
|
var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
|
|
@@ -3832,7 +3866,7 @@
|
|
|
3832
3866
|
};
|
|
3833
3867
|
|
|
3834
3868
|
// `ToIndex` abstract operation
|
|
3835
|
-
// https://tc39.
|
|
3869
|
+
// https://tc39.es/ecma262/#sec-toindex
|
|
3836
3870
|
var toIndex = function (it) {
|
|
3837
3871
|
if (it === undefined) return 0;
|
|
3838
3872
|
var number = toInteger(it);
|
|
@@ -4148,7 +4182,7 @@
|
|
|
4148
4182
|
var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
|
|
4149
4183
|
|
|
4150
4184
|
// `ArrayBuffer` constructor
|
|
4151
|
-
// https://tc39.
|
|
4185
|
+
// https://tc39.es/ecma262/#sec-arraybuffer-constructor
|
|
4152
4186
|
_export({ global: true, forced: NativeArrayBuffer$1 !== ArrayBuffer$1 }, {
|
|
4153
4187
|
ArrayBuffer: ArrayBuffer$1
|
|
4154
4188
|
});
|
|
@@ -4167,16 +4201,16 @@
|
|
|
4167
4201
|
var regexp = /./;
|
|
4168
4202
|
try {
|
|
4169
4203
|
'/./'[METHOD_NAME](regexp);
|
|
4170
|
-
} catch (
|
|
4204
|
+
} catch (error1) {
|
|
4171
4205
|
try {
|
|
4172
4206
|
regexp[MATCH$2] = false;
|
|
4173
4207
|
return '/./'[METHOD_NAME](regexp);
|
|
4174
|
-
} catch (
|
|
4208
|
+
} catch (error2) { /* empty */ }
|
|
4175
4209
|
} return false;
|
|
4176
4210
|
};
|
|
4177
4211
|
|
|
4178
4212
|
// `String.prototype.includes` method
|
|
4179
|
-
// https://tc39.
|
|
4213
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
4180
4214
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
4181
4215
|
includes: function includes(searchString /* , position = 0 */) {
|
|
4182
4216
|
return !!~String(requireObjectCoercible(this))
|
|
@@ -4198,7 +4232,7 @@
|
|
|
4198
4232
|
|
|
4199
4233
|
|
|
4200
4234
|
// `String.prototype.trim` method
|
|
4201
|
-
// https://tc39.
|
|
4235
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
4202
4236
|
_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
|
|
4203
4237
|
trim: function trim() {
|
|
4204
4238
|
return $trim(this);
|
|
@@ -4276,13 +4310,24 @@
|
|
|
4276
4310
|
Float64Array: 8
|
|
4277
4311
|
};
|
|
4278
4312
|
|
|
4313
|
+
var BigIntArrayConstructorsList = {
|
|
4314
|
+
BigInt64Array: 8,
|
|
4315
|
+
BigUint64Array: 8
|
|
4316
|
+
};
|
|
4317
|
+
|
|
4279
4318
|
var isView = function isView(it) {
|
|
4319
|
+
if (!isObject(it)) return false;
|
|
4280
4320
|
var klass = classof(it);
|
|
4281
|
-
return klass === 'DataView'
|
|
4321
|
+
return klass === 'DataView'
|
|
4322
|
+
|| has(TypedArrayConstructorsList, klass)
|
|
4323
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4282
4324
|
};
|
|
4283
4325
|
|
|
4284
4326
|
var isTypedArray = function (it) {
|
|
4285
|
-
|
|
4327
|
+
if (!isObject(it)) return false;
|
|
4328
|
+
var klass = classof(it);
|
|
4329
|
+
return has(TypedArrayConstructorsList, klass)
|
|
4330
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4286
4331
|
};
|
|
4287
4332
|
|
|
4288
4333
|
var aTypedArray = function (it) {
|
|
@@ -4702,7 +4747,7 @@
|
|
|
4702
4747
|
});
|
|
4703
4748
|
|
|
4704
4749
|
// `Uint8Array` constructor
|
|
4705
|
-
// https://tc39.
|
|
4750
|
+
// https://tc39.es/ecma262/#sec-typedarray-objects
|
|
4706
4751
|
typedArrayConstructor('Uint8', function (init) {
|
|
4707
4752
|
return function Uint8Array(data, byteOffset, length) {
|
|
4708
4753
|
return init(this, data, byteOffset, length);
|
|
@@ -4712,7 +4757,7 @@
|
|
|
4712
4757
|
var min$6 = Math.min;
|
|
4713
4758
|
|
|
4714
4759
|
// `Array.prototype.copyWithin` method implementation
|
|
4715
|
-
// https://tc39.
|
|
4760
|
+
// https://tc39.es/ecma262/#sec-array.prototype.copywithin
|
|
4716
4761
|
var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
|
4717
4762
|
var O = toObject(this);
|
|
4718
4763
|
var len = toLength(O.length);
|
|
@@ -4738,7 +4783,7 @@
|
|
|
4738
4783
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4739
4784
|
|
|
4740
4785
|
// `%TypedArray%.prototype.copyWithin` method
|
|
4741
|
-
// https://tc39.
|
|
4786
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
|
|
4742
4787
|
exportTypedArrayMethod$1('copyWithin', function copyWithin(target, start /* , end */) {
|
|
4743
4788
|
return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
|
|
4744
4789
|
});
|
|
@@ -4749,7 +4794,7 @@
|
|
|
4749
4794
|
var exportTypedArrayMethod$2 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4750
4795
|
|
|
4751
4796
|
// `%TypedArray%.prototype.every` method
|
|
4752
|
-
// https://tc39.
|
|
4797
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
|
|
4753
4798
|
exportTypedArrayMethod$2('every', function every(callbackfn /* , thisArg */) {
|
|
4754
4799
|
return $every(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4755
4800
|
});
|
|
@@ -4758,7 +4803,7 @@
|
|
|
4758
4803
|
var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4759
4804
|
|
|
4760
4805
|
// `%TypedArray%.prototype.fill` method
|
|
4761
|
-
// https://tc39.
|
|
4806
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
|
|
4762
4807
|
// eslint-disable-next-line no-unused-vars
|
|
4763
4808
|
exportTypedArrayMethod$3('fill', function fill(value /* , start, end */) {
|
|
4764
4809
|
return arrayFill.apply(aTypedArray$3(this), arguments);
|
|
@@ -4772,7 +4817,7 @@
|
|
|
4772
4817
|
var exportTypedArrayMethod$4 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4773
4818
|
|
|
4774
4819
|
// `%TypedArray%.prototype.filter` method
|
|
4775
|
-
// https://tc39.
|
|
4820
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
|
|
4776
4821
|
exportTypedArrayMethod$4('filter', function filter(callbackfn /* , thisArg */) {
|
|
4777
4822
|
var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4778
4823
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4789,7 +4834,7 @@
|
|
|
4789
4834
|
var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4790
4835
|
|
|
4791
4836
|
// `%TypedArray%.prototype.find` method
|
|
4792
|
-
// https://tc39.
|
|
4837
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
|
|
4793
4838
|
exportTypedArrayMethod$5('find', function find(predicate /* , thisArg */) {
|
|
4794
4839
|
return $find(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4795
4840
|
});
|
|
@@ -4800,7 +4845,7 @@
|
|
|
4800
4845
|
var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4801
4846
|
|
|
4802
4847
|
// `%TypedArray%.prototype.findIndex` method
|
|
4803
|
-
// https://tc39.
|
|
4848
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
|
|
4804
4849
|
exportTypedArrayMethod$6('findIndex', function findIndex(predicate /* , thisArg */) {
|
|
4805
4850
|
return $findIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4806
4851
|
});
|
|
@@ -4811,7 +4856,7 @@
|
|
|
4811
4856
|
var exportTypedArrayMethod$7 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4812
4857
|
|
|
4813
4858
|
// `%TypedArray%.prototype.forEach` method
|
|
4814
|
-
// https://tc39.
|
|
4859
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
|
|
4815
4860
|
exportTypedArrayMethod$7('forEach', function forEach(callbackfn /* , thisArg */) {
|
|
4816
4861
|
$forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4817
4862
|
});
|
|
@@ -4822,7 +4867,7 @@
|
|
|
4822
4867
|
var exportTypedArrayMethod$8 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4823
4868
|
|
|
4824
4869
|
// `%TypedArray%.prototype.includes` method
|
|
4825
|
-
// https://tc39.
|
|
4870
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
|
|
4826
4871
|
exportTypedArrayMethod$8('includes', function includes(searchElement /* , fromIndex */) {
|
|
4827
4872
|
return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4828
4873
|
});
|
|
@@ -4833,7 +4878,7 @@
|
|
|
4833
4878
|
var exportTypedArrayMethod$9 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4834
4879
|
|
|
4835
4880
|
// `%TypedArray%.prototype.indexOf` method
|
|
4836
|
-
// https://tc39.
|
|
4881
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
|
|
4837
4882
|
exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromIndex */) {
|
|
4838
4883
|
return $indexOf$1(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4839
4884
|
});
|
|
@@ -4855,20 +4900,20 @@
|
|
|
4855
4900
|
};
|
|
4856
4901
|
|
|
4857
4902
|
// `%TypedArray%.prototype.entries` method
|
|
4858
|
-
// https://tc39.
|
|
4903
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
|
|
4859
4904
|
exportTypedArrayMethod$a('entries', function entries() {
|
|
4860
4905
|
return arrayEntries.call(aTypedArray$a(this));
|
|
4861
4906
|
});
|
|
4862
4907
|
// `%TypedArray%.prototype.keys` method
|
|
4863
|
-
// https://tc39.
|
|
4908
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
|
|
4864
4909
|
exportTypedArrayMethod$a('keys', function keys() {
|
|
4865
4910
|
return arrayKeys.call(aTypedArray$a(this));
|
|
4866
4911
|
});
|
|
4867
4912
|
// `%TypedArray%.prototype.values` method
|
|
4868
|
-
// https://tc39.
|
|
4913
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
|
|
4869
4914
|
exportTypedArrayMethod$a('values', typedArrayValues, !CORRECT_ITER_NAME);
|
|
4870
4915
|
// `%TypedArray%.prototype[@@iterator]` method
|
|
4871
|
-
// https://tc39.
|
|
4916
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
|
|
4872
4917
|
exportTypedArrayMethod$a(ITERATOR$5, typedArrayValues, !CORRECT_ITER_NAME);
|
|
4873
4918
|
|
|
4874
4919
|
var aTypedArray$b = arrayBufferViewCore.aTypedArray;
|
|
@@ -4876,7 +4921,7 @@
|
|
|
4876
4921
|
var $join = [].join;
|
|
4877
4922
|
|
|
4878
4923
|
// `%TypedArray%.prototype.join` method
|
|
4879
|
-
// https://tc39.
|
|
4924
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
|
|
4880
4925
|
// eslint-disable-next-line no-unused-vars
|
|
4881
4926
|
exportTypedArrayMethod$b('join', function join(separator) {
|
|
4882
4927
|
return $join.apply(aTypedArray$b(this), arguments);
|
|
@@ -4886,7 +4931,7 @@
|
|
|
4886
4931
|
var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4887
4932
|
|
|
4888
4933
|
// `%TypedArray%.prototype.lastIndexOf` method
|
|
4889
|
-
// https://tc39.
|
|
4934
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
|
|
4890
4935
|
// eslint-disable-next-line no-unused-vars
|
|
4891
4936
|
exportTypedArrayMethod$c('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
|
|
4892
4937
|
return arrayLastIndexOf.apply(aTypedArray$c(this), arguments);
|
|
@@ -4900,7 +4945,7 @@
|
|
|
4900
4945
|
var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4901
4946
|
|
|
4902
4947
|
// `%TypedArray%.prototype.map` method
|
|
4903
|
-
// https://tc39.
|
|
4948
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
|
|
4904
4949
|
exportTypedArrayMethod$d('map', function map(mapfn /* , thisArg */) {
|
|
4905
4950
|
return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
|
|
4906
4951
|
return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length);
|
|
@@ -4913,7 +4958,7 @@
|
|
|
4913
4958
|
var exportTypedArrayMethod$e = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4914
4959
|
|
|
4915
4960
|
// `%TypedArray%.prototype.reduce` method
|
|
4916
|
-
// https://tc39.
|
|
4961
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
|
|
4917
4962
|
exportTypedArrayMethod$e('reduce', function reduce(callbackfn /* , initialValue */) {
|
|
4918
4963
|
return $reduce$1(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4919
4964
|
});
|
|
@@ -4924,7 +4969,7 @@
|
|
|
4924
4969
|
var exportTypedArrayMethod$f = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4925
4970
|
|
|
4926
4971
|
// `%TypedArray%.prototype.reduceRicht` method
|
|
4927
|
-
// https://tc39.
|
|
4972
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
|
|
4928
4973
|
exportTypedArrayMethod$f('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
|
|
4929
4974
|
return $reduceRight(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4930
4975
|
});
|
|
@@ -4934,7 +4979,7 @@
|
|
|
4934
4979
|
var floor$3 = Math.floor;
|
|
4935
4980
|
|
|
4936
4981
|
// `%TypedArray%.prototype.reverse` method
|
|
4937
|
-
// https://tc39.
|
|
4982
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
|
|
4938
4983
|
exportTypedArrayMethod$g('reverse', function reverse() {
|
|
4939
4984
|
var that = this;
|
|
4940
4985
|
var length = aTypedArray$g(that).length;
|
|
@@ -4957,7 +5002,7 @@
|
|
|
4957
5002
|
});
|
|
4958
5003
|
|
|
4959
5004
|
// `%TypedArray%.prototype.set` method
|
|
4960
|
-
// https://tc39.
|
|
5005
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
|
|
4961
5006
|
exportTypedArrayMethod$h('set', function set(arrayLike /* , offset */) {
|
|
4962
5007
|
aTypedArray$h(this);
|
|
4963
5008
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
@@ -4980,7 +5025,7 @@
|
|
|
4980
5025
|
});
|
|
4981
5026
|
|
|
4982
5027
|
// `%TypedArray%.prototype.slice` method
|
|
4983
|
-
// https://tc39.
|
|
5028
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
|
|
4984
5029
|
exportTypedArrayMethod$i('slice', function slice(start, end) {
|
|
4985
5030
|
var list = $slice.call(aTypedArray$i(this), start, end);
|
|
4986
5031
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4997,7 +5042,7 @@
|
|
|
4997
5042
|
var exportTypedArrayMethod$j = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4998
5043
|
|
|
4999
5044
|
// `%TypedArray%.prototype.some` method
|
|
5000
|
-
// https://tc39.
|
|
5045
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
|
|
5001
5046
|
exportTypedArrayMethod$j('some', function some(callbackfn /* , thisArg */) {
|
|
5002
5047
|
return $some(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
5003
5048
|
});
|
|
@@ -5007,7 +5052,7 @@
|
|
|
5007
5052
|
var $sort = [].sort;
|
|
5008
5053
|
|
|
5009
5054
|
// `%TypedArray%.prototype.sort` method
|
|
5010
|
-
// https://tc39.
|
|
5055
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
|
|
5011
5056
|
exportTypedArrayMethod$k('sort', function sort(comparefn) {
|
|
5012
5057
|
return $sort.call(aTypedArray$k(this), comparefn);
|
|
5013
5058
|
});
|
|
@@ -5016,7 +5061,7 @@
|
|
|
5016
5061
|
var exportTypedArrayMethod$l = arrayBufferViewCore.exportTypedArrayMethod;
|
|
5017
5062
|
|
|
5018
5063
|
// `%TypedArray%.prototype.subarray` method
|
|
5019
|
-
// https://tc39.
|
|
5064
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
|
|
5020
5065
|
exportTypedArrayMethod$l('subarray', function subarray(begin, end) {
|
|
5021
5066
|
var O = aTypedArray$l(this);
|
|
5022
5067
|
var length = O.length;
|
|
@@ -5046,7 +5091,7 @@
|
|
|
5046
5091
|
});
|
|
5047
5092
|
|
|
5048
5093
|
// `%TypedArray%.prototype.toLocaleString` method
|
|
5049
|
-
// https://tc39.
|
|
5094
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
|
|
5050
5095
|
exportTypedArrayMethod$m('toLocaleString', function toLocaleString() {
|
|
5051
5096
|
return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments);
|
|
5052
5097
|
}, FORCED$6);
|
|
@@ -5069,7 +5114,7 @@
|
|
|
5069
5114
|
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
|
|
5070
5115
|
|
|
5071
5116
|
// `%TypedArray%.prototype.toString` method
|
|
5072
|
-
// https://tc39.
|
|
5117
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
|
|
5073
5118
|
exportTypedArrayMethod$n('toString', arrayToString, IS_NOT_ARRAY_METHOD);
|
|
5074
5119
|
|
|
5075
5120
|
// `URL.prototype.toJSON` method
|
|
@@ -7253,7 +7298,7 @@
|
|
|
7253
7298
|
|
|
7254
7299
|
var performance$1 = global$2.performance || {};
|
|
7255
7300
|
|
|
7256
|
-
|
|
7301
|
+
performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function () {
|
|
7257
7302
|
return new Date().getTime();
|
|
7258
7303
|
}; // generate timestamp or delta
|
|
7259
7304
|
|
|
@@ -11741,28 +11786,38 @@
|
|
|
11741
11786
|
|
|
11742
11787
|
var nativePromiseConstructor = global_1.Promise;
|
|
11743
11788
|
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
return
|
|
11748
|
-
// 7.4.6 IteratorClose(iterator, completion)
|
|
11749
|
-
} catch (error) {
|
|
11750
|
-
var returnMethod = iterator['return'];
|
|
11751
|
-
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
11752
|
-
throw error;
|
|
11789
|
+
var iteratorClose = function (iterator) {
|
|
11790
|
+
var returnMethod = iterator['return'];
|
|
11791
|
+
if (returnMethod !== undefined) {
|
|
11792
|
+
return anObject(returnMethod.call(iterator)).value;
|
|
11753
11793
|
}
|
|
11754
11794
|
};
|
|
11755
11795
|
|
|
11756
|
-
var iterate_1 = createCommonjsModule(function (module) {
|
|
11757
11796
|
var Result = function (stopped, result) {
|
|
11758
11797
|
this.stopped = stopped;
|
|
11759
11798
|
this.result = result;
|
|
11760
11799
|
};
|
|
11761
11800
|
|
|
11762
|
-
var iterate =
|
|
11763
|
-
var
|
|
11801
|
+
var iterate = function (iterable, unboundFunction, options) {
|
|
11802
|
+
var that = options && options.that;
|
|
11803
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
11804
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
11805
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
11806
|
+
var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
|
|
11764
11807
|
var iterator, iterFn, index, length, result, next, step;
|
|
11765
11808
|
|
|
11809
|
+
var stop = function (condition) {
|
|
11810
|
+
if (iterator) iteratorClose(iterator);
|
|
11811
|
+
return new Result(true, condition);
|
|
11812
|
+
};
|
|
11813
|
+
|
|
11814
|
+
var callFn = function (value) {
|
|
11815
|
+
if (AS_ENTRIES) {
|
|
11816
|
+
anObject(value);
|
|
11817
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
11818
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
11819
|
+
};
|
|
11820
|
+
|
|
11766
11821
|
if (IS_ITERATOR) {
|
|
11767
11822
|
iterator = iterable;
|
|
11768
11823
|
} else {
|
|
@@ -11771,9 +11826,7 @@
|
|
|
11771
11826
|
// optimisation for array iterators
|
|
11772
11827
|
if (isArrayIteratorMethod(iterFn)) {
|
|
11773
11828
|
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
11774
|
-
result =
|
|
11775
|
-
? boundFunction(anObject(step = iterable[index])[0], step[1])
|
|
11776
|
-
: boundFunction(iterable[index]);
|
|
11829
|
+
result = callFn(iterable[index]);
|
|
11777
11830
|
if (result && result instanceof Result) return result;
|
|
11778
11831
|
} return new Result(false);
|
|
11779
11832
|
}
|
|
@@ -11782,16 +11835,16 @@
|
|
|
11782
11835
|
|
|
11783
11836
|
next = iterator.next;
|
|
11784
11837
|
while (!(step = next.call(iterator)).done) {
|
|
11785
|
-
|
|
11838
|
+
try {
|
|
11839
|
+
result = callFn(step.value);
|
|
11840
|
+
} catch (error) {
|
|
11841
|
+
iteratorClose(iterator);
|
|
11842
|
+
throw error;
|
|
11843
|
+
}
|
|
11786
11844
|
if (typeof result == 'object' && result && result instanceof Result) return result;
|
|
11787
11845
|
} return new Result(false);
|
|
11788
11846
|
};
|
|
11789
11847
|
|
|
11790
|
-
iterate.stop = function (result) {
|
|
11791
|
-
return new Result(true, result);
|
|
11792
|
-
};
|
|
11793
|
-
});
|
|
11794
|
-
|
|
11795
11848
|
var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
|
|
11796
11849
|
|
|
11797
11850
|
var location$1 = global_1.location;
|
|
@@ -11846,7 +11899,7 @@
|
|
|
11846
11899
|
delete queue$2[id];
|
|
11847
11900
|
};
|
|
11848
11901
|
// Node.js 0.8-
|
|
11849
|
-
if (
|
|
11902
|
+
if (engineIsNode) {
|
|
11850
11903
|
defer = function (id) {
|
|
11851
11904
|
process$2.nextTick(runner(id));
|
|
11852
11905
|
};
|
|
@@ -11868,8 +11921,8 @@
|
|
|
11868
11921
|
global_1.addEventListener &&
|
|
11869
11922
|
typeof postMessage == 'function' &&
|
|
11870
11923
|
!global_1.importScripts &&
|
|
11871
|
-
|
|
11872
|
-
|
|
11924
|
+
location$1 && location$1.protocol !== 'file:' &&
|
|
11925
|
+
!fails(post)
|
|
11873
11926
|
) {
|
|
11874
11927
|
defer = post;
|
|
11875
11928
|
global_1.addEventListener('message', listener, false);
|
|
@@ -11894,15 +11947,18 @@
|
|
|
11894
11947
|
clear: clear
|
|
11895
11948
|
};
|
|
11896
11949
|
|
|
11897
|
-
var
|
|
11950
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
|
|
11898
11951
|
|
|
11952
|
+
var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
|
11899
11953
|
var macrotask = task.set;
|
|
11900
11954
|
|
|
11901
11955
|
|
|
11956
|
+
|
|
11957
|
+
|
|
11902
11958
|
var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
|
|
11959
|
+
var document$2 = global_1.document;
|
|
11903
11960
|
var process$3 = global_1.process;
|
|
11904
11961
|
var Promise$1 = global_1.Promise;
|
|
11905
|
-
var IS_NODE = classofRaw(process$3) == 'process';
|
|
11906
11962
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
11907
11963
|
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');
|
|
11908
11964
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
@@ -11913,7 +11969,7 @@
|
|
|
11913
11969
|
if (!queueMicrotask) {
|
|
11914
11970
|
flush = function () {
|
|
11915
11971
|
var parent, fn;
|
|
11916
|
-
if (
|
|
11972
|
+
if (engineIsNode && (parent = process$3.domain)) parent.exit();
|
|
11917
11973
|
while (head) {
|
|
11918
11974
|
fn = head.fn;
|
|
11919
11975
|
head = head.next;
|
|
@@ -11928,15 +11984,11 @@
|
|
|
11928
11984
|
if (parent) parent.enter();
|
|
11929
11985
|
};
|
|
11930
11986
|
|
|
11931
|
-
// Node.js
|
|
11932
|
-
if (IS_NODE) {
|
|
11933
|
-
notify = function () {
|
|
11934
|
-
process$3.nextTick(flush);
|
|
11935
|
-
};
|
|
11936
11987
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
11937
|
-
|
|
11988
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
11989
|
+
if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {
|
|
11938
11990
|
toggle = true;
|
|
11939
|
-
node = document.createTextNode('');
|
|
11991
|
+
node = document$2.createTextNode('');
|
|
11940
11992
|
new MutationObserver(flush).observe(node, { characterData: true });
|
|
11941
11993
|
notify = function () {
|
|
11942
11994
|
node.data = toggle = !toggle;
|
|
@@ -11949,6 +12001,11 @@
|
|
|
11949
12001
|
notify = function () {
|
|
11950
12002
|
then.call(promise, flush);
|
|
11951
12003
|
};
|
|
12004
|
+
// Node.js without promises
|
|
12005
|
+
} else if (engineIsNode) {
|
|
12006
|
+
notify = function () {
|
|
12007
|
+
process$3.nextTick(flush);
|
|
12008
|
+
};
|
|
11952
12009
|
// for other environments - macrotask based on:
|
|
11953
12010
|
// - setImmediate
|
|
11954
12011
|
// - MessageChannel
|
|
@@ -12027,6 +12084,7 @@
|
|
|
12027
12084
|
|
|
12028
12085
|
|
|
12029
12086
|
|
|
12087
|
+
|
|
12030
12088
|
var SPECIES$6 = wellKnownSymbol('species');
|
|
12031
12089
|
var PROMISE = 'Promise';
|
|
12032
12090
|
var getInternalState$3 = internalState.get;
|
|
@@ -12034,13 +12092,13 @@
|
|
|
12034
12092
|
var getInternalPromiseState = internalState.getterFor(PROMISE);
|
|
12035
12093
|
var PromiseConstructor = nativePromiseConstructor;
|
|
12036
12094
|
var TypeError$1 = global_1.TypeError;
|
|
12037
|
-
var document$
|
|
12095
|
+
var document$3 = global_1.document;
|
|
12038
12096
|
var process$4 = global_1.process;
|
|
12039
12097
|
var $fetch = getBuiltIn('fetch');
|
|
12040
12098
|
var newPromiseCapability$1 = newPromiseCapability.f;
|
|
12041
12099
|
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
12042
|
-
var
|
|
12043
|
-
var
|
|
12100
|
+
var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);
|
|
12101
|
+
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
|
12044
12102
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
12045
12103
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
12046
12104
|
var PENDING = 0;
|
|
@@ -12058,7 +12116,7 @@
|
|
|
12058
12116
|
// We can't detect it synchronously, so just check versions
|
|
12059
12117
|
if (engineV8Version === 66) return true;
|
|
12060
12118
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
12061
|
-
if (!
|
|
12119
|
+
if (!engineIsNode && !NATIVE_REJECTION_EVENT) return true;
|
|
12062
12120
|
}
|
|
12063
12121
|
// We can't use @@species feature detection in V8 since it causes
|
|
12064
12122
|
// deoptimization and performance degradation
|
|
@@ -12084,7 +12142,7 @@
|
|
|
12084
12142
|
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
12085
12143
|
};
|
|
12086
12144
|
|
|
12087
|
-
var notify$1 = function (
|
|
12145
|
+
var notify$1 = function (state, isReject) {
|
|
12088
12146
|
if (state.notified) return;
|
|
12089
12147
|
state.notified = true;
|
|
12090
12148
|
var chain = state.reactions;
|
|
@@ -12103,7 +12161,7 @@
|
|
|
12103
12161
|
try {
|
|
12104
12162
|
if (handler) {
|
|
12105
12163
|
if (!ok) {
|
|
12106
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(
|
|
12164
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
12107
12165
|
state.rejection = HANDLED;
|
|
12108
12166
|
}
|
|
12109
12167
|
if (handler === true) result = value;
|
|
@@ -12128,36 +12186,37 @@
|
|
|
12128
12186
|
}
|
|
12129
12187
|
state.reactions = [];
|
|
12130
12188
|
state.notified = false;
|
|
12131
|
-
if (isReject && !state.rejection) onUnhandled(
|
|
12189
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
12132
12190
|
});
|
|
12133
12191
|
};
|
|
12134
12192
|
|
|
12135
12193
|
var dispatchEvent = function (name, promise, reason) {
|
|
12136
12194
|
var event, handler;
|
|
12137
12195
|
if (DISPATCH_EVENT) {
|
|
12138
|
-
event = document$
|
|
12196
|
+
event = document$3.createEvent('Event');
|
|
12139
12197
|
event.promise = promise;
|
|
12140
12198
|
event.reason = reason;
|
|
12141
12199
|
event.initEvent(name, false, true);
|
|
12142
12200
|
global_1.dispatchEvent(event);
|
|
12143
12201
|
} else event = { promise: promise, reason: reason };
|
|
12144
|
-
if (handler = global_1['on' + name]) handler(event);
|
|
12202
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
|
|
12145
12203
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
12146
12204
|
};
|
|
12147
12205
|
|
|
12148
|
-
var onUnhandled = function (
|
|
12206
|
+
var onUnhandled = function (state) {
|
|
12149
12207
|
task$1.call(global_1, function () {
|
|
12208
|
+
var promise = state.facade;
|
|
12150
12209
|
var value = state.value;
|
|
12151
12210
|
var IS_UNHANDLED = isUnhandled(state);
|
|
12152
12211
|
var result;
|
|
12153
12212
|
if (IS_UNHANDLED) {
|
|
12154
12213
|
result = perform(function () {
|
|
12155
|
-
if (
|
|
12214
|
+
if (engineIsNode) {
|
|
12156
12215
|
process$4.emit('unhandledRejection', value, promise);
|
|
12157
12216
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
12158
12217
|
});
|
|
12159
12218
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
12160
|
-
state.rejection =
|
|
12219
|
+
state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
12161
12220
|
if (result.error) throw result.value;
|
|
12162
12221
|
}
|
|
12163
12222
|
});
|
|
@@ -12167,55 +12226,56 @@
|
|
|
12167
12226
|
return state.rejection !== HANDLED && !state.parent;
|
|
12168
12227
|
};
|
|
12169
12228
|
|
|
12170
|
-
var onHandleUnhandled = function (
|
|
12229
|
+
var onHandleUnhandled = function (state) {
|
|
12171
12230
|
task$1.call(global_1, function () {
|
|
12172
|
-
|
|
12231
|
+
var promise = state.facade;
|
|
12232
|
+
if (engineIsNode) {
|
|
12173
12233
|
process$4.emit('rejectionHandled', promise);
|
|
12174
12234
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
12175
12235
|
});
|
|
12176
12236
|
};
|
|
12177
12237
|
|
|
12178
|
-
var bind = function (fn,
|
|
12238
|
+
var bind = function (fn, state, unwrap) {
|
|
12179
12239
|
return function (value) {
|
|
12180
|
-
fn(
|
|
12240
|
+
fn(state, value, unwrap);
|
|
12181
12241
|
};
|
|
12182
12242
|
};
|
|
12183
12243
|
|
|
12184
|
-
var internalReject = function (
|
|
12244
|
+
var internalReject = function (state, value, unwrap) {
|
|
12185
12245
|
if (state.done) return;
|
|
12186
12246
|
state.done = true;
|
|
12187
12247
|
if (unwrap) state = unwrap;
|
|
12188
12248
|
state.value = value;
|
|
12189
12249
|
state.state = REJECTED;
|
|
12190
|
-
notify$1(
|
|
12250
|
+
notify$1(state, true);
|
|
12191
12251
|
};
|
|
12192
12252
|
|
|
12193
|
-
var internalResolve = function (
|
|
12253
|
+
var internalResolve = function (state, value, unwrap) {
|
|
12194
12254
|
if (state.done) return;
|
|
12195
12255
|
state.done = true;
|
|
12196
12256
|
if (unwrap) state = unwrap;
|
|
12197
12257
|
try {
|
|
12198
|
-
if (
|
|
12258
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
12199
12259
|
var then = isThenable(value);
|
|
12200
12260
|
if (then) {
|
|
12201
12261
|
microtask(function () {
|
|
12202
12262
|
var wrapper = { done: false };
|
|
12203
12263
|
try {
|
|
12204
12264
|
then.call(value,
|
|
12205
|
-
bind(internalResolve,
|
|
12206
|
-
bind(internalReject,
|
|
12265
|
+
bind(internalResolve, wrapper, state),
|
|
12266
|
+
bind(internalReject, wrapper, state)
|
|
12207
12267
|
);
|
|
12208
12268
|
} catch (error) {
|
|
12209
|
-
internalReject(
|
|
12269
|
+
internalReject(wrapper, error, state);
|
|
12210
12270
|
}
|
|
12211
12271
|
});
|
|
12212
12272
|
} else {
|
|
12213
12273
|
state.value = value;
|
|
12214
12274
|
state.state = FULFILLED;
|
|
12215
|
-
notify$1(
|
|
12275
|
+
notify$1(state, false);
|
|
12216
12276
|
}
|
|
12217
12277
|
} catch (error) {
|
|
12218
|
-
internalReject(
|
|
12278
|
+
internalReject({ done: false }, error, state);
|
|
12219
12279
|
}
|
|
12220
12280
|
};
|
|
12221
12281
|
|
|
@@ -12228,9 +12288,9 @@
|
|
|
12228
12288
|
Internal.call(this);
|
|
12229
12289
|
var state = getInternalState$3(this);
|
|
12230
12290
|
try {
|
|
12231
|
-
executor(bind(internalResolve,
|
|
12291
|
+
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
12232
12292
|
} catch (error) {
|
|
12233
|
-
internalReject(
|
|
12293
|
+
internalReject(state, error);
|
|
12234
12294
|
}
|
|
12235
12295
|
};
|
|
12236
12296
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -12248,20 +12308,20 @@
|
|
|
12248
12308
|
};
|
|
12249
12309
|
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
|
|
12250
12310
|
// `Promise.prototype.then` method
|
|
12251
|
-
// https://tc39.
|
|
12311
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
12252
12312
|
then: function then(onFulfilled, onRejected) {
|
|
12253
12313
|
var state = getInternalPromiseState(this);
|
|
12254
12314
|
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
12255
12315
|
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
12256
12316
|
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
12257
|
-
reaction.domain =
|
|
12317
|
+
reaction.domain = engineIsNode ? process$4.domain : undefined;
|
|
12258
12318
|
state.parent = true;
|
|
12259
12319
|
state.reactions.push(reaction);
|
|
12260
|
-
if (state.state != PENDING) notify$1(
|
|
12320
|
+
if (state.state != PENDING) notify$1(state, false);
|
|
12261
12321
|
return reaction.promise;
|
|
12262
12322
|
},
|
|
12263
12323
|
// `Promise.prototype.catch` method
|
|
12264
|
-
// https://tc39.
|
|
12324
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
12265
12325
|
'catch': function (onRejected) {
|
|
12266
12326
|
return this.then(undefined, onRejected);
|
|
12267
12327
|
}
|
|
@@ -12270,8 +12330,8 @@
|
|
|
12270
12330
|
var promise = new Internal();
|
|
12271
12331
|
var state = getInternalState$3(promise);
|
|
12272
12332
|
this.promise = promise;
|
|
12273
|
-
this.resolve = bind(internalResolve,
|
|
12274
|
-
this.reject = bind(internalReject,
|
|
12333
|
+
this.resolve = bind(internalResolve, state);
|
|
12334
|
+
this.reject = bind(internalReject, state);
|
|
12275
12335
|
};
|
|
12276
12336
|
newPromiseCapability.f = newPromiseCapability$1 = function (C) {
|
|
12277
12337
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
@@ -12313,7 +12373,7 @@
|
|
|
12313
12373
|
// statics
|
|
12314
12374
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12315
12375
|
// `Promise.reject` method
|
|
12316
|
-
// https://tc39.
|
|
12376
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
12317
12377
|
reject: function reject(r) {
|
|
12318
12378
|
var capability = newPromiseCapability$1(this);
|
|
12319
12379
|
capability.reject.call(undefined, r);
|
|
@@ -12323,7 +12383,7 @@
|
|
|
12323
12383
|
|
|
12324
12384
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12325
12385
|
// `Promise.resolve` method
|
|
12326
|
-
// https://tc39.
|
|
12386
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
12327
12387
|
resolve: function resolve(x) {
|
|
12328
12388
|
return promiseResolve( this, x);
|
|
12329
12389
|
}
|
|
@@ -12331,7 +12391,7 @@
|
|
|
12331
12391
|
|
|
12332
12392
|
_export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
12333
12393
|
// `Promise.all` method
|
|
12334
|
-
// https://tc39.
|
|
12394
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
12335
12395
|
all: function all(iterable) {
|
|
12336
12396
|
var C = this;
|
|
12337
12397
|
var capability = newPromiseCapability$1(C);
|
|
@@ -12342,7 +12402,7 @@
|
|
|
12342
12402
|
var values = [];
|
|
12343
12403
|
var counter = 0;
|
|
12344
12404
|
var remaining = 1;
|
|
12345
|
-
|
|
12405
|
+
iterate(iterable, function (promise) {
|
|
12346
12406
|
var index = counter++;
|
|
12347
12407
|
var alreadyCalled = false;
|
|
12348
12408
|
values.push(undefined);
|
|
@@ -12360,14 +12420,14 @@
|
|
|
12360
12420
|
return capability.promise;
|
|
12361
12421
|
},
|
|
12362
12422
|
// `Promise.race` method
|
|
12363
|
-
// https://tc39.
|
|
12423
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
12364
12424
|
race: function race(iterable) {
|
|
12365
12425
|
var C = this;
|
|
12366
12426
|
var capability = newPromiseCapability$1(C);
|
|
12367
12427
|
var reject = capability.reject;
|
|
12368
12428
|
var result = perform(function () {
|
|
12369
12429
|
var $promiseResolve = aFunction$1(C.resolve);
|
|
12370
|
-
|
|
12430
|
+
iterate(iterable, function (promise) {
|
|
12371
12431
|
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
|
12372
12432
|
});
|
|
12373
12433
|
});
|
|
@@ -12377,23 +12437,23 @@
|
|
|
12377
12437
|
});
|
|
12378
12438
|
|
|
12379
12439
|
// `Symbol.asyncIterator` well-known symbol
|
|
12380
|
-
// https://tc39.
|
|
12440
|
+
// https://tc39.es/ecma262/#sec-symbol.asynciterator
|
|
12381
12441
|
defineWellKnownSymbol('asyncIterator');
|
|
12382
12442
|
|
|
12383
12443
|
// `Symbol.iterator` well-known symbol
|
|
12384
|
-
// https://tc39.
|
|
12444
|
+
// https://tc39.es/ecma262/#sec-symbol.iterator
|
|
12385
12445
|
defineWellKnownSymbol('iterator');
|
|
12386
12446
|
|
|
12387
12447
|
// `Symbol.toStringTag` well-known symbol
|
|
12388
|
-
// https://tc39.
|
|
12448
|
+
// https://tc39.es/ecma262/#sec-symbol.tostringtag
|
|
12389
12449
|
defineWellKnownSymbol('toStringTag');
|
|
12390
12450
|
|
|
12391
12451
|
// JSON[@@toStringTag] property
|
|
12392
|
-
// https://tc39.
|
|
12452
|
+
// https://tc39.es/ecma262/#sec-json-@@tostringtag
|
|
12393
12453
|
setToStringTag(global_1.JSON, 'JSON', true);
|
|
12394
12454
|
|
|
12395
12455
|
// Math[@@toStringTag] property
|
|
12396
|
-
// https://tc39.
|
|
12456
|
+
// https://tc39.es/ecma262/#sec-math-@@tostringtag
|
|
12397
12457
|
setToStringTag(Math, 'Math', true);
|
|
12398
12458
|
|
|
12399
12459
|
var charAt$1 = stringMultibyte.charAt;
|
|
@@ -12405,7 +12465,7 @@
|
|
|
12405
12465
|
var getInternalState$4 = internalState.getterFor(STRING_ITERATOR);
|
|
12406
12466
|
|
|
12407
12467
|
// `String.prototype[@@iterator]` method
|
|
12408
|
-
// https://tc39.
|
|
12468
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
12409
12469
|
defineIterator(String, 'String', function (iterated) {
|
|
12410
12470
|
setInternalState$5(this, {
|
|
12411
12471
|
type: STRING_ITERATOR,
|
|
@@ -12413,7 +12473,7 @@
|
|
|
12413
12473
|
index: 0
|
|
12414
12474
|
});
|
|
12415
12475
|
// `%StringIteratorPrototype%.next` method
|
|
12416
|
-
// https://tc39.
|
|
12476
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
12417
12477
|
}, function next() {
|
|
12418
12478
|
var state = getInternalState$4(this);
|
|
12419
12479
|
var string = state.string;
|
|
@@ -12453,7 +12513,7 @@
|
|
|
12453
12513
|
}
|
|
12454
12514
|
}
|
|
12455
12515
|
|
|
12456
|
-
|
|
12516
|
+
createCommonjsModule(function (module) {
|
|
12457
12517
|
/**
|
|
12458
12518
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
12459
12519
|
*
|
|
@@ -13404,8 +13464,19 @@
|
|
|
13404
13464
|
return str.substr(start, len);
|
|
13405
13465
|
};
|
|
13406
13466
|
|
|
13467
|
+
// call something on iterator step with safe closing on error
|
|
13468
|
+
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
|
13469
|
+
try {
|
|
13470
|
+
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
13471
|
+
// 7.4.6 IteratorClose(iterator, completion)
|
|
13472
|
+
} catch (error) {
|
|
13473
|
+
iteratorClose(iterator);
|
|
13474
|
+
throw error;
|
|
13475
|
+
}
|
|
13476
|
+
};
|
|
13477
|
+
|
|
13407
13478
|
// `Array.from` method implementation
|
|
13408
|
-
// https://tc39.
|
|
13479
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13409
13480
|
var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
13410
13481
|
var O = toObject(arrayLike);
|
|
13411
13482
|
var C = typeof this == 'function' ? this : Array;
|
|
@@ -13442,49 +13513,12 @@
|
|
|
13442
13513
|
});
|
|
13443
13514
|
|
|
13444
13515
|
// `Array.from` method
|
|
13445
|
-
// https://tc39.
|
|
13516
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13446
13517
|
_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
|
|
13447
13518
|
from: arrayFrom
|
|
13448
13519
|
});
|
|
13449
13520
|
|
|
13450
13521
|
var diff = createCommonjsModule(function (module, exports) {
|
|
13451
|
-
/*!
|
|
13452
|
-
|
|
13453
|
-
diff v4.0.1
|
|
13454
|
-
|
|
13455
|
-
Software License Agreement (BSD License)
|
|
13456
|
-
|
|
13457
|
-
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
|
|
13458
|
-
|
|
13459
|
-
All rights reserved.
|
|
13460
|
-
|
|
13461
|
-
Redistribution and use of this software in source and binary forms, with or without modification,
|
|
13462
|
-
are permitted provided that the following conditions are met:
|
|
13463
|
-
|
|
13464
|
-
* Redistributions of source code must retain the above
|
|
13465
|
-
copyright notice, this list of conditions and the
|
|
13466
|
-
following disclaimer.
|
|
13467
|
-
|
|
13468
|
-
* Redistributions in binary form must reproduce the above
|
|
13469
|
-
copyright notice, this list of conditions and the
|
|
13470
|
-
following disclaimer in the documentation and/or other
|
|
13471
|
-
materials provided with the distribution.
|
|
13472
|
-
|
|
13473
|
-
* Neither the name of Kevin Decker nor the names of its
|
|
13474
|
-
contributors may be used to endorse or promote products
|
|
13475
|
-
derived from this software without specific prior
|
|
13476
|
-
written permission.
|
|
13477
|
-
|
|
13478
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
13479
|
-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
13480
|
-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
13481
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
13482
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
13483
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
13484
|
-
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
13485
|
-
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
13486
|
-
@license
|
|
13487
|
-
*/
|
|
13488
13522
|
(function (global, factory) {
|
|
13489
13523
|
factory(exports) ;
|
|
13490
13524
|
})(commonjsGlobal, function (exports) {
|
|
@@ -13798,7 +13832,8 @@
|
|
|
13798
13832
|
};
|
|
13799
13833
|
|
|
13800
13834
|
wordDiff.tokenize = function (value) {
|
|
13801
|
-
|
|
13835
|
+
// All whitespace symbols except newline group into one token, each newline - in separate token
|
|
13836
|
+
var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
|
|
13802
13837
|
|
|
13803
13838
|
for (var i = 0; i < tokens.length - 1; i++) {
|
|
13804
13839
|
// If we have an empty string in the next field and we have only word chars before and after, merge
|
|
@@ -13882,40 +13917,55 @@
|
|
|
13882
13917
|
return cssDiff.diff(oldStr, newStr, callback);
|
|
13883
13918
|
}
|
|
13884
13919
|
|
|
13885
|
-
function _typeof
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13920
|
+
function _typeof(obj) {
|
|
13921
|
+
"@babel/helpers - typeof";
|
|
13922
|
+
|
|
13923
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
13924
|
+
_typeof = function _typeof(obj) {
|
|
13925
|
+
return typeof obj;
|
|
13889
13926
|
};
|
|
13890
13927
|
} else {
|
|
13891
|
-
_typeof
|
|
13892
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :
|
|
13928
|
+
_typeof = function _typeof(obj) {
|
|
13929
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13893
13930
|
};
|
|
13894
13931
|
}
|
|
13895
13932
|
|
|
13896
|
-
return _typeof
|
|
13933
|
+
return _typeof(obj);
|
|
13897
13934
|
}
|
|
13898
13935
|
|
|
13899
13936
|
function _toConsumableArray(arr) {
|
|
13900
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
13937
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
13901
13938
|
}
|
|
13902
13939
|
|
|
13903
13940
|
function _arrayWithoutHoles(arr) {
|
|
13904
|
-
if (Array.isArray(arr))
|
|
13905
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
13906
|
-
arr2[i] = arr[i];
|
|
13907
|
-
}
|
|
13908
|
-
|
|
13909
|
-
return arr2;
|
|
13910
|
-
}
|
|
13941
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
13911
13942
|
}
|
|
13912
13943
|
|
|
13913
13944
|
function _iterableToArray(iter) {
|
|
13914
|
-
if (Symbol.iterator in Object(iter)
|
|
13945
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
13946
|
+
}
|
|
13947
|
+
|
|
13948
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
13949
|
+
if (!o) return;
|
|
13950
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
13951
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13952
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13953
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13954
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
13955
|
+
}
|
|
13956
|
+
|
|
13957
|
+
function _arrayLikeToArray(arr, len) {
|
|
13958
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
13959
|
+
|
|
13960
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
13961
|
+
arr2[i] = arr[i];
|
|
13962
|
+
}
|
|
13963
|
+
|
|
13964
|
+
return arr2;
|
|
13915
13965
|
}
|
|
13916
13966
|
|
|
13917
13967
|
function _nonIterableSpread() {
|
|
13918
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
13968
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13919
13969
|
}
|
|
13920
13970
|
|
|
13921
13971
|
var objectPrototypeToString = Object.prototype.toString;
|
|
@@ -13981,7 +14031,7 @@
|
|
|
13981
14031
|
obj = obj.toJSON();
|
|
13982
14032
|
}
|
|
13983
14033
|
|
|
13984
|
-
if (_typeof
|
|
14034
|
+
if (_typeof(obj) === 'object' && obj !== null) {
|
|
13985
14035
|
stack.push(obj);
|
|
13986
14036
|
canonicalizedObj = {};
|
|
13987
14037
|
replacementStack.push(canonicalizedObj);
|
|
@@ -14105,12 +14155,23 @@
|
|
|
14105
14155
|
chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
|
14106
14156
|
var hunk = {
|
|
14107
14157
|
oldStart: +chunkHeader[1],
|
|
14108
|
-
oldLines:
|
|
14158
|
+
oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
|
|
14109
14159
|
newStart: +chunkHeader[3],
|
|
14110
|
-
newLines:
|
|
14160
|
+
newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
|
|
14111
14161
|
lines: [],
|
|
14112
14162
|
linedelimiters: []
|
|
14113
|
-
};
|
|
14163
|
+
}; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14164
|
+
// the first number is one lower than one would expect.
|
|
14165
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14166
|
+
|
|
14167
|
+
if (hunk.oldLines === 0) {
|
|
14168
|
+
hunk.oldStart += 1;
|
|
14169
|
+
}
|
|
14170
|
+
|
|
14171
|
+
if (hunk.newLines === 0) {
|
|
14172
|
+
hunk.newStart += 1;
|
|
14173
|
+
}
|
|
14174
|
+
|
|
14114
14175
|
var addCount = 0,
|
|
14115
14176
|
removeCount = 0;
|
|
14116
14177
|
|
|
@@ -14303,11 +14364,6 @@
|
|
|
14303
14364
|
|
|
14304
14365
|
diffOffset += _hunk.newLines - _hunk.oldLines;
|
|
14305
14366
|
|
|
14306
|
-
if (_toPos < 0) {
|
|
14307
|
-
// Creating a new file
|
|
14308
|
-
_toPos = 0;
|
|
14309
|
-
}
|
|
14310
|
-
|
|
14311
14367
|
for (var j = 0; j < _hunk.lines.length; j++) {
|
|
14312
14368
|
var line = _hunk.lines[j],
|
|
14313
14369
|
operation = line.length > 0 ? line[0] : ' ',
|
|
@@ -14479,8 +14535,9 @@
|
|
|
14479
14535
|
var newEOFNewline = /\n$/.test(newStr);
|
|
14480
14536
|
var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
|
|
14481
14537
|
|
|
14482
|
-
if (!oldEOFNewline && noNlBeforeAdds) {
|
|
14538
|
+
if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
|
|
14483
14539
|
// special case: old has no eol and no trailing context; no-nl can end up before adds
|
|
14540
|
+
// however, if the old file is empty, do not output the no-nl line
|
|
14484
14541
|
curRange.splice(hunk.oldLines, 0, '\');
|
|
14485
14542
|
}
|
|
14486
14543
|
|
|
@@ -14514,12 +14571,11 @@
|
|
|
14514
14571
|
};
|
|
14515
14572
|
}
|
|
14516
14573
|
|
|
14517
|
-
function
|
|
14518
|
-
var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14574
|
+
function formatPatch(diff) {
|
|
14519
14575
|
var ret = [];
|
|
14520
14576
|
|
|
14521
|
-
if (oldFileName == newFileName) {
|
|
14522
|
-
ret.push('Index: ' + oldFileName);
|
|
14577
|
+
if (diff.oldFileName == diff.newFileName) {
|
|
14578
|
+
ret.push('Index: ' + diff.oldFileName);
|
|
14523
14579
|
}
|
|
14524
14580
|
|
|
14525
14581
|
ret.push('===================================================================');
|
|
@@ -14527,7 +14583,18 @@
|
|
|
14527
14583
|
ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
|
|
14528
14584
|
|
|
14529
14585
|
for (var i = 0; i < diff.hunks.length; i++) {
|
|
14530
|
-
var hunk = diff.hunks[i];
|
|
14586
|
+
var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14587
|
+
// the first number is one lower than one would expect.
|
|
14588
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14589
|
+
|
|
14590
|
+
if (hunk.oldLines === 0) {
|
|
14591
|
+
hunk.oldStart -= 1;
|
|
14592
|
+
}
|
|
14593
|
+
|
|
14594
|
+
if (hunk.newLines === 0) {
|
|
14595
|
+
hunk.newStart -= 1;
|
|
14596
|
+
}
|
|
14597
|
+
|
|
14531
14598
|
ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
|
|
14532
14599
|
ret.push.apply(ret, hunk.lines);
|
|
14533
14600
|
}
|
|
@@ -14535,6 +14602,10 @@
|
|
|
14535
14602
|
return ret.join('\n') + '\n';
|
|
14536
14603
|
}
|
|
14537
14604
|
|
|
14605
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14606
|
+
return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
|
|
14607
|
+
}
|
|
14608
|
+
|
|
14538
14609
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14539
14610
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14540
14611
|
}
|
|
@@ -15015,29 +15086,27 @@
|
|
|
15015
15086
|
n = n.replace(/"/g, '"');
|
|
15016
15087
|
return n;
|
|
15017
15088
|
}
|
|
15018
|
-
/* See LICENSE file for terms of use */
|
|
15019
|
-
|
|
15020
15089
|
|
|
15021
15090
|
exports.Diff = Diff;
|
|
15022
|
-
exports.diffChars = diffChars;
|
|
15023
|
-
exports.diffWords = diffWords;
|
|
15024
|
-
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15025
|
-
exports.diffLines = diffLines;
|
|
15026
|
-
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15027
|
-
exports.diffSentences = diffSentences;
|
|
15028
|
-
exports.diffCss = diffCss;
|
|
15029
|
-
exports.diffJson = diffJson;
|
|
15030
|
-
exports.diffArrays = diffArrays;
|
|
15031
|
-
exports.structuredPatch = structuredPatch;
|
|
15032
|
-
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15033
|
-
exports.createPatch = createPatch;
|
|
15034
15091
|
exports.applyPatch = applyPatch;
|
|
15035
15092
|
exports.applyPatches = applyPatches;
|
|
15036
|
-
exports.
|
|
15037
|
-
exports.merge = merge;
|
|
15093
|
+
exports.canonicalize = canonicalize;
|
|
15038
15094
|
exports.convertChangesToDMP = convertChangesToDMP;
|
|
15039
15095
|
exports.convertChangesToXML = convertChangesToXML;
|
|
15040
|
-
exports.
|
|
15096
|
+
exports.createPatch = createPatch;
|
|
15097
|
+
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15098
|
+
exports.diffArrays = diffArrays;
|
|
15099
|
+
exports.diffChars = diffChars;
|
|
15100
|
+
exports.diffCss = diffCss;
|
|
15101
|
+
exports.diffJson = diffJson;
|
|
15102
|
+
exports.diffLines = diffLines;
|
|
15103
|
+
exports.diffSentences = diffSentences;
|
|
15104
|
+
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15105
|
+
exports.diffWords = diffWords;
|
|
15106
|
+
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15107
|
+
exports.merge = merge;
|
|
15108
|
+
exports.parsePatch = parsePatch;
|
|
15109
|
+
exports.structuredPatch = structuredPatch;
|
|
15041
15110
|
Object.defineProperty(exports, '__esModule', {
|
|
15042
15111
|
value: true
|
|
15043
15112
|
});
|
|
@@ -15296,7 +15365,7 @@
|
|
|
15296
15365
|
var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeFreeze(1); });
|
|
15297
15366
|
|
|
15298
15367
|
// `Object.freeze` method
|
|
15299
|
-
// https://tc39.
|
|
15368
|
+
// https://tc39.es/ecma262/#sec-object.freeze
|
|
15300
15369
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !freezing }, {
|
|
15301
15370
|
freeze: function freeze(it) {
|
|
15302
15371
|
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
|
|
@@ -15360,7 +15429,7 @@
|
|
|
15360
15429
|
Constructor = wrapper(function (dummy, iterable) {
|
|
15361
15430
|
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
|
|
15362
15431
|
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
|
15363
|
-
if (iterable != undefined)
|
|
15432
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15364
15433
|
return that;
|
|
15365
15434
|
});
|
|
15366
15435
|
Constructor.prototype = NativePrototype;
|
|
@@ -15416,7 +15485,7 @@
|
|
|
15416
15485
|
size: 0
|
|
15417
15486
|
});
|
|
15418
15487
|
if (!descriptors) that.size = 0;
|
|
15419
|
-
if (iterable != undefined)
|
|
15488
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15420
15489
|
});
|
|
15421
15490
|
|
|
15422
15491
|
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
@@ -15576,8 +15645,8 @@
|
|
|
15576
15645
|
};
|
|
15577
15646
|
|
|
15578
15647
|
// `Set` constructor
|
|
15579
|
-
// https://tc39.
|
|
15580
|
-
|
|
15648
|
+
// https://tc39.es/ecma262/#sec-set-objects
|
|
15649
|
+
collection('Set', function (init) {
|
|
15581
15650
|
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
15582
15651
|
}, collectionStrong);
|
|
15583
15652
|
|
|
@@ -19772,17 +19841,17 @@
|
|
|
19772
19841
|
|
|
19773
19842
|
var objectToArray = {
|
|
19774
19843
|
// `Object.entries` method
|
|
19775
|
-
// https://tc39.
|
|
19844
|
+
// https://tc39.es/ecma262/#sec-object.entries
|
|
19776
19845
|
entries: createMethod$5(true),
|
|
19777
19846
|
// `Object.values` method
|
|
19778
|
-
// https://tc39.
|
|
19847
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19779
19848
|
values: createMethod$5(false)
|
|
19780
19849
|
};
|
|
19781
19850
|
|
|
19782
19851
|
var $values = objectToArray.values;
|
|
19783
19852
|
|
|
19784
19853
|
// `Object.values` method
|
|
19785
|
-
// https://tc39.
|
|
19854
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19786
19855
|
_export({ target: 'Object', stat: true }, {
|
|
19787
19856
|
values: function values(O) {
|
|
19788
19857
|
return $values(O);
|
|
@@ -19806,6 +19875,7 @@
|
|
|
19806
19875
|
if (process$1.emitWarning) {
|
|
19807
19876
|
process$1.emitWarning(msg, type);
|
|
19808
19877
|
} else {
|
|
19878
|
+
/* istanbul ignore next */
|
|
19809
19879
|
nextTick(function () {
|
|
19810
19880
|
console.warn(type + ': ' + msg);
|
|
19811
19881
|
});
|
|
@@ -19844,88 +19914,130 @@
|
|
|
19844
19914
|
}
|
|
19845
19915
|
};
|
|
19846
19916
|
/**
|
|
19847
|
-
* When Mocha
|
|
19848
|
-
*
|
|
19849
|
-
*
|
|
19917
|
+
* When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`.
|
|
19918
|
+
* @public
|
|
19919
|
+
* @namespace
|
|
19920
|
+
* @memberof module:lib/errors
|
|
19850
19921
|
*/
|
|
19851
19922
|
|
|
19852
19923
|
|
|
19853
19924
|
var constants = {
|
|
19854
19925
|
/**
|
|
19855
19926
|
* An unrecoverable error.
|
|
19927
|
+
* @constant
|
|
19928
|
+
* @default
|
|
19856
19929
|
*/
|
|
19857
19930
|
FATAL: 'ERR_MOCHA_FATAL',
|
|
19858
19931
|
|
|
19859
19932
|
/**
|
|
19860
19933
|
* The type of an argument to a function call is invalid
|
|
19934
|
+
* @constant
|
|
19935
|
+
* @default
|
|
19861
19936
|
*/
|
|
19862
19937
|
INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',
|
|
19863
19938
|
|
|
19864
19939
|
/**
|
|
19865
19940
|
* The value of an argument to a function call is invalid
|
|
19941
|
+
* @constant
|
|
19942
|
+
* @default
|
|
19866
19943
|
*/
|
|
19867
19944
|
INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',
|
|
19868
19945
|
|
|
19869
19946
|
/**
|
|
19870
19947
|
* Something was thrown, but it wasn't an `Error`
|
|
19948
|
+
* @constant
|
|
19949
|
+
* @default
|
|
19871
19950
|
*/
|
|
19872
19951
|
INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',
|
|
19873
19952
|
|
|
19874
19953
|
/**
|
|
19875
19954
|
* An interface (e.g., `Mocha.interfaces`) is unknown or invalid
|
|
19955
|
+
* @constant
|
|
19956
|
+
* @default
|
|
19876
19957
|
*/
|
|
19877
19958
|
INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',
|
|
19878
19959
|
|
|
19879
19960
|
/**
|
|
19880
19961
|
* A reporter (.e.g, `Mocha.reporters`) is unknown or invalid
|
|
19962
|
+
* @constant
|
|
19963
|
+
* @default
|
|
19881
19964
|
*/
|
|
19882
19965
|
INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',
|
|
19883
19966
|
|
|
19884
19967
|
/**
|
|
19885
19968
|
* `done()` was called twice in a `Test` or `Hook` callback
|
|
19969
|
+
* @constant
|
|
19970
|
+
* @default
|
|
19886
19971
|
*/
|
|
19887
19972
|
MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',
|
|
19888
19973
|
|
|
19889
19974
|
/**
|
|
19890
19975
|
* No files matched the pattern provided by the user
|
|
19976
|
+
* @constant
|
|
19977
|
+
* @default
|
|
19891
19978
|
*/
|
|
19892
19979
|
NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',
|
|
19893
19980
|
|
|
19894
19981
|
/**
|
|
19895
19982
|
* Known, but unsupported behavior of some kind
|
|
19983
|
+
* @constant
|
|
19984
|
+
* @default
|
|
19896
19985
|
*/
|
|
19897
19986
|
UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',
|
|
19898
19987
|
|
|
19899
19988
|
/**
|
|
19900
19989
|
* Invalid state transition occurring in `Mocha` instance
|
|
19990
|
+
* @constant
|
|
19991
|
+
* @default
|
|
19901
19992
|
*/
|
|
19902
19993
|
INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',
|
|
19903
19994
|
|
|
19904
19995
|
/**
|
|
19905
19996
|
* Invalid state transition occurring in `Mocha` instance
|
|
19997
|
+
* @constant
|
|
19998
|
+
* @default
|
|
19906
19999
|
*/
|
|
19907
20000
|
INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',
|
|
19908
20001
|
|
|
19909
20002
|
/**
|
|
19910
20003
|
* Use of `only()` w/ `--forbid-only` results in this error.
|
|
20004
|
+
* @constant
|
|
20005
|
+
* @default
|
|
19911
20006
|
*/
|
|
19912
20007
|
FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY',
|
|
19913
20008
|
|
|
19914
20009
|
/**
|
|
19915
20010
|
* To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid
|
|
20011
|
+
* @constant
|
|
20012
|
+
* @default
|
|
19916
20013
|
*/
|
|
19917
20014
|
INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION',
|
|
19918
20015
|
|
|
19919
20016
|
/**
|
|
19920
20017
|
* To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid
|
|
20018
|
+
* @constant
|
|
20019
|
+
* @default
|
|
20020
|
+
*/
|
|
20021
|
+
INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION',
|
|
20022
|
+
|
|
20023
|
+
/**
|
|
20024
|
+
* When a runnable exceeds its allowed run time.
|
|
20025
|
+
* @constant
|
|
20026
|
+
* @default
|
|
19921
20027
|
*/
|
|
19922
|
-
|
|
20028
|
+
TIMEOUT: 'ERR_MOCHA_TIMEOUT'
|
|
19923
20029
|
};
|
|
20030
|
+
/**
|
|
20031
|
+
* A set containing all string values of all Mocha error constants, for use by {@link isMochaError}.
|
|
20032
|
+
* @private
|
|
20033
|
+
*/
|
|
20034
|
+
|
|
19924
20035
|
var MOCHA_ERRORS = new Set(Object.values(constants));
|
|
19925
20036
|
/**
|
|
19926
20037
|
* Creates an error object to be thrown when no files to be tested could be found using specified pattern.
|
|
19927
20038
|
*
|
|
19928
20039
|
* @public
|
|
20040
|
+
* @static
|
|
19929
20041
|
* @param {string} message - Error message to be displayed.
|
|
19930
20042
|
* @param {string} pattern - User-specified argument value.
|
|
19931
20043
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19957,6 +20069,7 @@
|
|
|
19957
20069
|
* Creates an error object to be thrown when the interface specified in the options was not found.
|
|
19958
20070
|
*
|
|
19959
20071
|
* @public
|
|
20072
|
+
* @static
|
|
19960
20073
|
* @param {string} message - Error message to be displayed.
|
|
19961
20074
|
* @param {string} ui - User-specified interface value.
|
|
19962
20075
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19973,6 +20086,7 @@
|
|
|
19973
20086
|
* Creates an error object to be thrown when a behavior, option, or parameter is unsupported.
|
|
19974
20087
|
*
|
|
19975
20088
|
* @public
|
|
20089
|
+
* @static
|
|
19976
20090
|
* @param {string} message - Error message to be displayed.
|
|
19977
20091
|
* @returns {Error} instance detailing the error condition
|
|
19978
20092
|
*/
|
|
@@ -19987,6 +20101,7 @@
|
|
|
19987
20101
|
* Creates an error object to be thrown when an argument is missing.
|
|
19988
20102
|
*
|
|
19989
20103
|
* @public
|
|
20104
|
+
* @static
|
|
19990
20105
|
* @param {string} message - Error message to be displayed.
|
|
19991
20106
|
* @param {string} argument - Argument name.
|
|
19992
20107
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -20001,6 +20116,7 @@
|
|
|
20001
20116
|
* Creates an error object to be thrown when an argument did not use the supported type
|
|
20002
20117
|
*
|
|
20003
20118
|
* @public
|
|
20119
|
+
* @static
|
|
20004
20120
|
* @param {string} message - Error message to be displayed.
|
|
20005
20121
|
* @param {string} argument - Argument name.
|
|
20006
20122
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -20020,6 +20136,7 @@
|
|
|
20020
20136
|
* Creates an error object to be thrown when an argument did not use the supported value
|
|
20021
20137
|
*
|
|
20022
20138
|
* @public
|
|
20139
|
+
* @static
|
|
20023
20140
|
* @param {string} message - Error message to be displayed.
|
|
20024
20141
|
* @param {string} argument - Argument name.
|
|
20025
20142
|
* @param {string} value - Argument value.
|
|
@@ -20040,6 +20157,7 @@
|
|
|
20040
20157
|
* Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.
|
|
20041
20158
|
*
|
|
20042
20159
|
* @public
|
|
20160
|
+
* @static
|
|
20043
20161
|
* @param {string} message - Error message to be displayed.
|
|
20044
20162
|
* @returns {Error} instance detailing the error condition
|
|
20045
20163
|
*/
|
|
@@ -20056,6 +20174,7 @@
|
|
|
20056
20174
|
* Creates an error object to be thrown when an unrecoverable error occurs.
|
|
20057
20175
|
*
|
|
20058
20176
|
* @public
|
|
20177
|
+
* @static
|
|
20059
20178
|
* @param {string} message - Error message to be displayed.
|
|
20060
20179
|
* @returns {Error} instance detailing the error condition
|
|
20061
20180
|
*/
|
|
@@ -20075,6 +20194,7 @@
|
|
|
20075
20194
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20076
20195
|
* @throws When `pluginType` is not known
|
|
20077
20196
|
* @public
|
|
20197
|
+
* @static
|
|
20078
20198
|
* @returns {Error}
|
|
20079
20199
|
*/
|
|
20080
20200
|
|
|
@@ -20099,6 +20219,7 @@
|
|
|
20099
20219
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20100
20220
|
* @throws When `pluginType` is not known
|
|
20101
20221
|
* @public
|
|
20222
|
+
* @static
|
|
20102
20223
|
* @returns {Error}
|
|
20103
20224
|
*/
|
|
20104
20225
|
|
|
@@ -20112,6 +20233,7 @@
|
|
|
20112
20233
|
* @param {string} message The error message to be displayed.
|
|
20113
20234
|
* @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`
|
|
20114
20235
|
* @param {Mocha} instance the mocha instance that throw this error
|
|
20236
|
+
* @static
|
|
20115
20237
|
*/
|
|
20116
20238
|
|
|
20117
20239
|
|
|
@@ -20125,6 +20247,8 @@
|
|
|
20125
20247
|
/**
|
|
20126
20248
|
* Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.
|
|
20127
20249
|
* @param {string} message The error message to be displayed.
|
|
20250
|
+
* @static
|
|
20251
|
+
* @public
|
|
20128
20252
|
*/
|
|
20129
20253
|
|
|
20130
20254
|
|
|
@@ -20134,13 +20258,14 @@
|
|
|
20134
20258
|
err.instance = instance;
|
|
20135
20259
|
return err;
|
|
20136
20260
|
}
|
|
20137
|
-
|
|
20261
|
+
/**
|
|
20138
20262
|
* Creates an error object to be thrown when done() is called multiple times in a test
|
|
20139
20263
|
*
|
|
20140
20264
|
* @public
|
|
20141
20265
|
* @param {Runnable} runnable - Original runnable
|
|
20142
20266
|
* @param {Error} [originalErr] - Original error, if any
|
|
20143
20267
|
* @returns {Error} instance detailing the error condition
|
|
20268
|
+
* @static
|
|
20144
20269
|
*/
|
|
20145
20270
|
|
|
20146
20271
|
|
|
@@ -20176,6 +20301,7 @@
|
|
|
20176
20301
|
/**
|
|
20177
20302
|
* Creates an error object to be thrown when `.only()` is used with
|
|
20178
20303
|
* `--forbid-only`.
|
|
20304
|
+
* @static
|
|
20179
20305
|
* @public
|
|
20180
20306
|
* @param {Mocha} mocha - Mocha instance
|
|
20181
20307
|
* @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}
|
|
@@ -20189,6 +20315,7 @@
|
|
|
20189
20315
|
}
|
|
20190
20316
|
/**
|
|
20191
20317
|
* Creates an error object to be thrown when a plugin definition is invalid
|
|
20318
|
+
* @static
|
|
20192
20319
|
* @param {string} msg - Error message
|
|
20193
20320
|
* @param {PluginDefinition} [pluginDef] - Problematic plugin definition
|
|
20194
20321
|
* @public
|
|
@@ -20204,6 +20331,7 @@
|
|
|
20204
20331
|
}
|
|
20205
20332
|
/**
|
|
20206
20333
|
* Creates an error object to be thrown when a plugin implementation (user code) is invalid
|
|
20334
|
+
* @static
|
|
20207
20335
|
* @param {string} msg - Error message
|
|
20208
20336
|
* @param {Object} [opts] - Plugin definition and user-supplied implementation
|
|
20209
20337
|
* @param {PluginDefinition} [opts.pluginDef] - Plugin Definition
|
|
@@ -20224,9 +20352,27 @@
|
|
|
20224
20352
|
err.pluginImpl = pluginImpl;
|
|
20225
20353
|
return err;
|
|
20226
20354
|
}
|
|
20355
|
+
/**
|
|
20356
|
+
* Creates an error object to be thrown when a runnable exceeds its allowed run time.
|
|
20357
|
+
* @static
|
|
20358
|
+
* @param {string} msg - Error message
|
|
20359
|
+
* @param {number} [timeout] - Timeout in ms
|
|
20360
|
+
* @param {string} [file] - File, if given
|
|
20361
|
+
* @returns {MochaTimeoutError}
|
|
20362
|
+
*/
|
|
20363
|
+
|
|
20364
|
+
|
|
20365
|
+
function createTimeoutError(msg, timeout, file) {
|
|
20366
|
+
var err = new Error(msg);
|
|
20367
|
+
err.code = constants.TIMEOUT;
|
|
20368
|
+
err.timeout = timeout;
|
|
20369
|
+
err.file = file;
|
|
20370
|
+
return err;
|
|
20371
|
+
}
|
|
20227
20372
|
/**
|
|
20228
20373
|
* Returns `true` if an error came out of Mocha.
|
|
20229
20374
|
* _Can suffer from false negatives, but not false positives._
|
|
20375
|
+
* @static
|
|
20230
20376
|
* @public
|
|
20231
20377
|
* @param {*} err - Error, or anything
|
|
20232
20378
|
* @returns {boolean}
|
|
@@ -20255,6 +20401,7 @@
|
|
|
20255
20401
|
createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError,
|
|
20256
20402
|
createMultipleDoneError: createMultipleDoneError,
|
|
20257
20403
|
createNoFilesMatchPatternError: createNoFilesMatchPatternError,
|
|
20404
|
+
createTimeoutError: createTimeoutError,
|
|
20258
20405
|
createUnsupportedError: createUnsupportedError,
|
|
20259
20406
|
deprecate: deprecate$1,
|
|
20260
20407
|
isMochaError: isMochaError,
|
|
@@ -20545,6 +20692,10 @@
|
|
|
20545
20692
|
? '-0' : val.toString();
|
|
20546
20693
|
break;
|
|
20547
20694
|
|
|
20695
|
+
case 'bigint':
|
|
20696
|
+
val = val.toString() + 'n';
|
|
20697
|
+
break;
|
|
20698
|
+
|
|
20548
20699
|
case 'date':
|
|
20549
20700
|
var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();
|
|
20550
20701
|
val = '[Date: ' + sDate + ']';
|
|
@@ -20983,8 +21134,8 @@
|
|
|
20983
21134
|
});
|
|
20984
21135
|
|
|
20985
21136
|
// `Map` constructor
|
|
20986
|
-
// https://tc39.
|
|
20987
|
-
|
|
21137
|
+
// https://tc39.es/ecma262/#sec-map-objects
|
|
21138
|
+
collection('Map', function (init) {
|
|
20988
21139
|
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
20989
21140
|
}, collectionStrong);
|
|
20990
21141
|
|
|
@@ -21003,6 +21154,187 @@
|
|
|
21003
21154
|
this.message = message;
|
|
21004
21155
|
}
|
|
21005
21156
|
|
|
21157
|
+
/**
|
|
21158
|
+
* Helpers.
|
|
21159
|
+
*/
|
|
21160
|
+
var s$1 = 1000;
|
|
21161
|
+
var m$1 = s$1 * 60;
|
|
21162
|
+
var h$1 = m$1 * 60;
|
|
21163
|
+
var d$1 = h$1 * 24;
|
|
21164
|
+
var w$1 = d$1 * 7;
|
|
21165
|
+
var y$1 = d$1 * 365.25;
|
|
21166
|
+
/**
|
|
21167
|
+
* Parse or format the given `val`.
|
|
21168
|
+
*
|
|
21169
|
+
* Options:
|
|
21170
|
+
*
|
|
21171
|
+
* - `long` verbose formatting [false]
|
|
21172
|
+
*
|
|
21173
|
+
* @param {String|Number} val
|
|
21174
|
+
* @param {Object} [options]
|
|
21175
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
21176
|
+
* @return {String|Number}
|
|
21177
|
+
* @api public
|
|
21178
|
+
*/
|
|
21179
|
+
|
|
21180
|
+
var ms$1 = function ms(val, options) {
|
|
21181
|
+
options = options || {};
|
|
21182
|
+
|
|
21183
|
+
var type = _typeof(val);
|
|
21184
|
+
|
|
21185
|
+
if (type === 'string' && val.length > 0) {
|
|
21186
|
+
return parse$1(val);
|
|
21187
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
21188
|
+
return options["long"] ? fmtLong$1(val) : fmtShort$1(val);
|
|
21189
|
+
}
|
|
21190
|
+
|
|
21191
|
+
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
21192
|
+
};
|
|
21193
|
+
/**
|
|
21194
|
+
* Parse the given `str` and return milliseconds.
|
|
21195
|
+
*
|
|
21196
|
+
* @param {String} str
|
|
21197
|
+
* @return {Number}
|
|
21198
|
+
* @api private
|
|
21199
|
+
*/
|
|
21200
|
+
|
|
21201
|
+
|
|
21202
|
+
function parse$1(str) {
|
|
21203
|
+
str = String(str);
|
|
21204
|
+
|
|
21205
|
+
if (str.length > 100) {
|
|
21206
|
+
return;
|
|
21207
|
+
}
|
|
21208
|
+
|
|
21209
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
21210
|
+
|
|
21211
|
+
if (!match) {
|
|
21212
|
+
return;
|
|
21213
|
+
}
|
|
21214
|
+
|
|
21215
|
+
var n = parseFloat(match[1]);
|
|
21216
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
21217
|
+
|
|
21218
|
+
switch (type) {
|
|
21219
|
+
case 'years':
|
|
21220
|
+
case 'year':
|
|
21221
|
+
case 'yrs':
|
|
21222
|
+
case 'yr':
|
|
21223
|
+
case 'y':
|
|
21224
|
+
return n * y$1;
|
|
21225
|
+
|
|
21226
|
+
case 'weeks':
|
|
21227
|
+
case 'week':
|
|
21228
|
+
case 'w':
|
|
21229
|
+
return n * w$1;
|
|
21230
|
+
|
|
21231
|
+
case 'days':
|
|
21232
|
+
case 'day':
|
|
21233
|
+
case 'd':
|
|
21234
|
+
return n * d$1;
|
|
21235
|
+
|
|
21236
|
+
case 'hours':
|
|
21237
|
+
case 'hour':
|
|
21238
|
+
case 'hrs':
|
|
21239
|
+
case 'hr':
|
|
21240
|
+
case 'h':
|
|
21241
|
+
return n * h$1;
|
|
21242
|
+
|
|
21243
|
+
case 'minutes':
|
|
21244
|
+
case 'minute':
|
|
21245
|
+
case 'mins':
|
|
21246
|
+
case 'min':
|
|
21247
|
+
case 'm':
|
|
21248
|
+
return n * m$1;
|
|
21249
|
+
|
|
21250
|
+
case 'seconds':
|
|
21251
|
+
case 'second':
|
|
21252
|
+
case 'secs':
|
|
21253
|
+
case 'sec':
|
|
21254
|
+
case 's':
|
|
21255
|
+
return n * s$1;
|
|
21256
|
+
|
|
21257
|
+
case 'milliseconds':
|
|
21258
|
+
case 'millisecond':
|
|
21259
|
+
case 'msecs':
|
|
21260
|
+
case 'msec':
|
|
21261
|
+
case 'ms':
|
|
21262
|
+
return n;
|
|
21263
|
+
|
|
21264
|
+
default:
|
|
21265
|
+
return undefined;
|
|
21266
|
+
}
|
|
21267
|
+
}
|
|
21268
|
+
/**
|
|
21269
|
+
* Short format for `ms`.
|
|
21270
|
+
*
|
|
21271
|
+
* @param {Number} ms
|
|
21272
|
+
* @return {String}
|
|
21273
|
+
* @api private
|
|
21274
|
+
*/
|
|
21275
|
+
|
|
21276
|
+
|
|
21277
|
+
function fmtShort$1(ms) {
|
|
21278
|
+
var msAbs = Math.abs(ms);
|
|
21279
|
+
|
|
21280
|
+
if (msAbs >= d$1) {
|
|
21281
|
+
return Math.round(ms / d$1) + 'd';
|
|
21282
|
+
}
|
|
21283
|
+
|
|
21284
|
+
if (msAbs >= h$1) {
|
|
21285
|
+
return Math.round(ms / h$1) + 'h';
|
|
21286
|
+
}
|
|
21287
|
+
|
|
21288
|
+
if (msAbs >= m$1) {
|
|
21289
|
+
return Math.round(ms / m$1) + 'm';
|
|
21290
|
+
}
|
|
21291
|
+
|
|
21292
|
+
if (msAbs >= s$1) {
|
|
21293
|
+
return Math.round(ms / s$1) + 's';
|
|
21294
|
+
}
|
|
21295
|
+
|
|
21296
|
+
return ms + 'ms';
|
|
21297
|
+
}
|
|
21298
|
+
/**
|
|
21299
|
+
* Long format for `ms`.
|
|
21300
|
+
*
|
|
21301
|
+
* @param {Number} ms
|
|
21302
|
+
* @return {String}
|
|
21303
|
+
* @api private
|
|
21304
|
+
*/
|
|
21305
|
+
|
|
21306
|
+
|
|
21307
|
+
function fmtLong$1(ms) {
|
|
21308
|
+
var msAbs = Math.abs(ms);
|
|
21309
|
+
|
|
21310
|
+
if (msAbs >= d$1) {
|
|
21311
|
+
return plural$1(ms, msAbs, d$1, 'day');
|
|
21312
|
+
}
|
|
21313
|
+
|
|
21314
|
+
if (msAbs >= h$1) {
|
|
21315
|
+
return plural$1(ms, msAbs, h$1, 'hour');
|
|
21316
|
+
}
|
|
21317
|
+
|
|
21318
|
+
if (msAbs >= m$1) {
|
|
21319
|
+
return plural$1(ms, msAbs, m$1, 'minute');
|
|
21320
|
+
}
|
|
21321
|
+
|
|
21322
|
+
if (msAbs >= s$1) {
|
|
21323
|
+
return plural$1(ms, msAbs, s$1, 'second');
|
|
21324
|
+
}
|
|
21325
|
+
|
|
21326
|
+
return ms + ' ms';
|
|
21327
|
+
}
|
|
21328
|
+
/**
|
|
21329
|
+
* Pluralization helper.
|
|
21330
|
+
*/
|
|
21331
|
+
|
|
21332
|
+
|
|
21333
|
+
function plural$1(ms, msAbs, n, name) {
|
|
21334
|
+
var isPlural = msAbs >= n * 1.5;
|
|
21335
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
21336
|
+
}
|
|
21337
|
+
|
|
21006
21338
|
/**
|
|
21007
21339
|
* This is the common logic for both the Node.js and web browser
|
|
21008
21340
|
* implementations of `debug()`.
|
|
@@ -21015,16 +21347,12 @@
|
|
|
21015
21347
|
createDebug.disable = disable;
|
|
21016
21348
|
createDebug.enable = enable;
|
|
21017
21349
|
createDebug.enabled = enabled;
|
|
21018
|
-
createDebug.humanize = ms;
|
|
21350
|
+
createDebug.humanize = ms$1;
|
|
21351
|
+
createDebug.destroy = destroy;
|
|
21019
21352
|
Object.keys(env).forEach(function (key) {
|
|
21020
21353
|
createDebug[key] = env[key];
|
|
21021
21354
|
});
|
|
21022
21355
|
/**
|
|
21023
|
-
* Active `debug` instances.
|
|
21024
|
-
*/
|
|
21025
|
-
|
|
21026
|
-
createDebug.instances = [];
|
|
21027
|
-
/**
|
|
21028
21356
|
* The currently active debug mode names, and names to skip.
|
|
21029
21357
|
*/
|
|
21030
21358
|
|
|
@@ -21066,6 +21394,7 @@
|
|
|
21066
21394
|
|
|
21067
21395
|
function createDebug(namespace) {
|
|
21068
21396
|
var prevTime;
|
|
21397
|
+
var enableOverride = null;
|
|
21069
21398
|
|
|
21070
21399
|
function debug() {
|
|
21071
21400
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -21097,7 +21426,7 @@
|
|
|
21097
21426
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
|
21098
21427
|
// If we encounter an escaped % then don't increase the array index
|
|
21099
21428
|
if (match === '%%') {
|
|
21100
|
-
return
|
|
21429
|
+
return '%';
|
|
21101
21430
|
}
|
|
21102
21431
|
|
|
21103
21432
|
index++;
|
|
@@ -21120,31 +21449,29 @@
|
|
|
21120
21449
|
}
|
|
21121
21450
|
|
|
21122
21451
|
debug.namespace = namespace;
|
|
21123
|
-
debug.enabled = createDebug.enabled(namespace);
|
|
21124
21452
|
debug.useColors = createDebug.useColors();
|
|
21125
21453
|
debug.color = createDebug.selectColor(namespace);
|
|
21126
|
-
debug.
|
|
21127
|
-
debug.
|
|
21454
|
+
debug.extend = extend;
|
|
21455
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
21456
|
+
|
|
21457
|
+
Object.defineProperty(debug, 'enabled', {
|
|
21458
|
+
enumerable: true,
|
|
21459
|
+
configurable: false,
|
|
21460
|
+
get: function get() {
|
|
21461
|
+
return enableOverride === null ? createDebug.enabled(namespace) : enableOverride;
|
|
21462
|
+
},
|
|
21463
|
+
set: function set(v) {
|
|
21464
|
+
enableOverride = v;
|
|
21465
|
+
}
|
|
21466
|
+
}); // Env-specific initialization logic for debug instances
|
|
21128
21467
|
|
|
21129
21468
|
if (typeof createDebug.init === 'function') {
|
|
21130
21469
|
createDebug.init(debug);
|
|
21131
21470
|
}
|
|
21132
21471
|
|
|
21133
|
-
createDebug.instances.push(debug);
|
|
21134
21472
|
return debug;
|
|
21135
21473
|
}
|
|
21136
21474
|
|
|
21137
|
-
function destroy() {
|
|
21138
|
-
var index = createDebug.instances.indexOf(this);
|
|
21139
|
-
|
|
21140
|
-
if (index !== -1) {
|
|
21141
|
-
createDebug.instances.splice(index, 1);
|
|
21142
|
-
return true;
|
|
21143
|
-
}
|
|
21144
|
-
|
|
21145
|
-
return false;
|
|
21146
|
-
}
|
|
21147
|
-
|
|
21148
21475
|
function extend(namespace, delimiter) {
|
|
21149
21476
|
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
21150
21477
|
newDebug.log = this.log;
|
|
@@ -21181,11 +21508,6 @@
|
|
|
21181
21508
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
21182
21509
|
}
|
|
21183
21510
|
}
|
|
21184
|
-
|
|
21185
|
-
for (i = 0; i < createDebug.instances.length; i++) {
|
|
21186
|
-
var instance = createDebug.instances[i];
|
|
21187
|
-
instance.enabled = createDebug.enabled(instance.namespace);
|
|
21188
|
-
}
|
|
21189
21511
|
}
|
|
21190
21512
|
/**
|
|
21191
21513
|
* Disable debug output.
|
|
@@ -21261,6 +21583,15 @@
|
|
|
21261
21583
|
|
|
21262
21584
|
return val;
|
|
21263
21585
|
}
|
|
21586
|
+
/**
|
|
21587
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
21588
|
+
* XXX It WILL be removed in the next major release.
|
|
21589
|
+
*/
|
|
21590
|
+
|
|
21591
|
+
|
|
21592
|
+
function destroy() {
|
|
21593
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21594
|
+
}
|
|
21264
21595
|
|
|
21265
21596
|
createDebug.enable(createDebug.load());
|
|
21266
21597
|
return createDebug;
|
|
@@ -21279,10 +21610,21 @@
|
|
|
21279
21610
|
exports.load = load;
|
|
21280
21611
|
exports.useColors = useColors;
|
|
21281
21612
|
exports.storage = localstorage();
|
|
21613
|
+
|
|
21614
|
+
exports.destroy = function () {
|
|
21615
|
+
var warned = false;
|
|
21616
|
+
return function () {
|
|
21617
|
+
if (!warned) {
|
|
21618
|
+
warned = true;
|
|
21619
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21620
|
+
}
|
|
21621
|
+
};
|
|
21622
|
+
}();
|
|
21282
21623
|
/**
|
|
21283
21624
|
* Colors.
|
|
21284
21625
|
*/
|
|
21285
21626
|
|
|
21627
|
+
|
|
21286
21628
|
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
21287
21629
|
/**
|
|
21288
21630
|
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
@@ -21443,8 +21785,9 @@
|
|
|
21443
21785
|
|
|
21444
21786
|
var EventEmitter$1 = EventEmitter.EventEmitter;
|
|
21445
21787
|
var debug$1 = browser$2('mocha:runnable');
|
|
21446
|
-
var createInvalidExceptionError$1 = errors.createInvalidExceptionError
|
|
21447
|
-
|
|
21788
|
+
var createInvalidExceptionError$1 = errors.createInvalidExceptionError,
|
|
21789
|
+
createMultipleDoneError$1 = errors.createMultipleDoneError,
|
|
21790
|
+
createTimeoutError$1 = errors.createTimeoutError;
|
|
21448
21791
|
/**
|
|
21449
21792
|
* Save timer references to avoid Sinon interfering (see GH-237).
|
|
21450
21793
|
* @private
|
|
@@ -21877,13 +22220,13 @@
|
|
|
21877
22220
|
|
|
21878
22221
|
|
|
21879
22222
|
Runnable.prototype._timeoutError = function (ms) {
|
|
21880
|
-
var msg =
|
|
22223
|
+
var msg = "Timeout of ".concat(ms, "ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.");
|
|
21881
22224
|
|
|
21882
22225
|
if (this.file) {
|
|
21883
22226
|
msg += ' (' + this.file + ')';
|
|
21884
22227
|
}
|
|
21885
22228
|
|
|
21886
|
-
return
|
|
22229
|
+
return createTimeoutError$1(msg, ms, this.file);
|
|
21887
22230
|
};
|
|
21888
22231
|
|
|
21889
22232
|
var constants$1 = utils.defineConstants(
|
|
@@ -21933,7 +22276,7 @@
|
|
|
21933
22276
|
var USES_TO_LENGTH$9 = arrayMethodUsesToLength('some');
|
|
21934
22277
|
|
|
21935
22278
|
// `Array.prototype.some` method
|
|
21936
|
-
// https://tc39.
|
|
22279
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
21937
22280
|
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, {
|
|
21938
22281
|
some: function some(callbackfn /* , thisArg */) {
|
|
21939
22282
|
return $some$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
@@ -22038,7 +22381,7 @@
|
|
|
22038
22381
|
* Expose `Suite`.
|
|
22039
22382
|
*/
|
|
22040
22383
|
|
|
22041
|
-
|
|
22384
|
+
module.exports = Suite;
|
|
22042
22385
|
/**
|
|
22043
22386
|
* Create a new `Suite` with the given `title` and parent `Suite`.
|
|
22044
22387
|
*
|
|
@@ -24614,7 +24957,7 @@
|
|
|
24614
24957
|
* Expose `Dot`.
|
|
24615
24958
|
*/
|
|
24616
24959
|
|
|
24617
|
-
|
|
24960
|
+
module.exports = Dot;
|
|
24618
24961
|
/**
|
|
24619
24962
|
* Constructs a new `Dot` reporter instance.
|
|
24620
24963
|
*
|
|
@@ -24691,7 +25034,7 @@
|
|
|
24691
25034
|
* Expose `Doc`.
|
|
24692
25035
|
*/
|
|
24693
25036
|
|
|
24694
|
-
|
|
25037
|
+
module.exports = Doc;
|
|
24695
25038
|
/**
|
|
24696
25039
|
* Constructs a new `Doc` reporter instance.
|
|
24697
25040
|
*
|
|
@@ -24772,7 +25115,7 @@
|
|
|
24772
25115
|
* Expose `TAP`.
|
|
24773
25116
|
*/
|
|
24774
25117
|
|
|
24775
|
-
|
|
25118
|
+
module.exports = TAP;
|
|
24776
25119
|
/**
|
|
24777
25120
|
* Constructs a new `TAP` reporter instance.
|
|
24778
25121
|
*
|
|
@@ -25072,7 +25415,7 @@
|
|
|
25072
25415
|
* Expose `JSON`.
|
|
25073
25416
|
*/
|
|
25074
25417
|
|
|
25075
|
-
|
|
25418
|
+
module.exports = JSONReporter;
|
|
25076
25419
|
/**
|
|
25077
25420
|
* Constructs a new `JSON` reporter instance.
|
|
25078
25421
|
*
|
|
@@ -25187,7 +25530,7 @@
|
|
|
25187
25530
|
});
|
|
25188
25531
|
|
|
25189
25532
|
// `thisNumberValue` abstract operation
|
|
25190
|
-
// https://tc39.
|
|
25533
|
+
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
25191
25534
|
var thisNumberValue = function (value) {
|
|
25192
25535
|
if (typeof value != 'number' && classofRaw(value) != 'Number') {
|
|
25193
25536
|
throw TypeError('Incorrect invocation');
|
|
@@ -25196,7 +25539,7 @@
|
|
|
25196
25539
|
};
|
|
25197
25540
|
|
|
25198
25541
|
// `String.prototype.repeat` method implementation
|
|
25199
|
-
// https://tc39.
|
|
25542
|
+
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
25200
25543
|
var stringRepeat = ''.repeat || function repeat(count) {
|
|
25201
25544
|
var str = String(requireObjectCoercible(this));
|
|
25202
25545
|
var result = '';
|
|
@@ -25237,7 +25580,7 @@
|
|
|
25237
25580
|
});
|
|
25238
25581
|
|
|
25239
25582
|
// `Number.prototype.toFixed` method
|
|
25240
|
-
// https://tc39.
|
|
25583
|
+
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
|
|
25241
25584
|
_export({ target: 'Number', proto: true, forced: FORCED$8 }, {
|
|
25242
25585
|
// eslint-disable-next-line max-statements
|
|
25243
25586
|
toFixed: function toFixed(fractionDigits) {
|
|
@@ -25475,7 +25818,7 @@
|
|
|
25475
25818
|
* Expose `HTML`.
|
|
25476
25819
|
*/
|
|
25477
25820
|
|
|
25478
|
-
|
|
25821
|
+
module.exports = HTML;
|
|
25479
25822
|
/**
|
|
25480
25823
|
* Stats template.
|
|
25481
25824
|
*/
|
|
@@ -25822,7 +26165,7 @@
|
|
|
25822
26165
|
* Expose `List`.
|
|
25823
26166
|
*/
|
|
25824
26167
|
|
|
25825
|
-
|
|
26168
|
+
module.exports = List;
|
|
25826
26169
|
/**
|
|
25827
26170
|
* Constructs a new `List` reporter instance.
|
|
25828
26171
|
*
|
|
@@ -25885,7 +26228,7 @@
|
|
|
25885
26228
|
* Expose `Min`.
|
|
25886
26229
|
*/
|
|
25887
26230
|
|
|
25888
|
-
|
|
26231
|
+
module.exports = Min;
|
|
25889
26232
|
/**
|
|
25890
26233
|
* Constructs a new `Min` reporter instance.
|
|
25891
26234
|
*
|
|
@@ -25942,7 +26285,7 @@
|
|
|
25942
26285
|
* Expose `Spec`.
|
|
25943
26286
|
*/
|
|
25944
26287
|
|
|
25945
|
-
|
|
26288
|
+
module.exports = Spec;
|
|
25946
26289
|
/**
|
|
25947
26290
|
* Constructs a new `Spec` reporter instance.
|
|
25948
26291
|
*
|
|
@@ -26027,7 +26370,7 @@
|
|
|
26027
26370
|
* Expose `Dot`.
|
|
26028
26371
|
*/
|
|
26029
26372
|
|
|
26030
|
-
|
|
26373
|
+
module.exports = NyanCat;
|
|
26031
26374
|
/**
|
|
26032
26375
|
* Constructs a new `Nyan` reporter instance.
|
|
26033
26376
|
*
|
|
@@ -26309,7 +26652,7 @@
|
|
|
26309
26652
|
* Expose `XUnit`.
|
|
26310
26653
|
*/
|
|
26311
26654
|
|
|
26312
|
-
|
|
26655
|
+
module.exports = XUnit;
|
|
26313
26656
|
/**
|
|
26314
26657
|
* Constructs a new `XUnit` reporter instance.
|
|
26315
26658
|
*
|
|
@@ -26494,7 +26837,7 @@
|
|
|
26494
26837
|
* Expose `Markdown`.
|
|
26495
26838
|
*/
|
|
26496
26839
|
|
|
26497
|
-
|
|
26840
|
+
module.exports = Markdown;
|
|
26498
26841
|
/**
|
|
26499
26842
|
* Constructs a new `Markdown` reporter instance.
|
|
26500
26843
|
*
|
|
@@ -26601,7 +26944,7 @@
|
|
|
26601
26944
|
* Expose `Progress`.
|
|
26602
26945
|
*/
|
|
26603
26946
|
|
|
26604
|
-
|
|
26947
|
+
module.exports = Progress;
|
|
26605
26948
|
/**
|
|
26606
26949
|
* General progress bar color.
|
|
26607
26950
|
*/
|
|
@@ -26700,7 +27043,7 @@
|
|
|
26700
27043
|
* Expose `Landing`.
|
|
26701
27044
|
*/
|
|
26702
27045
|
|
|
26703
|
-
|
|
27046
|
+
module.exports = Landing;
|
|
26704
27047
|
/**
|
|
26705
27048
|
* Airplane color.
|
|
26706
27049
|
*/
|
|
@@ -26805,7 +27148,7 @@
|
|
|
26805
27148
|
* Expose `JSONStream`.
|
|
26806
27149
|
*/
|
|
26807
27150
|
|
|
26808
|
-
|
|
27151
|
+
module.exports = JSONStream;
|
|
26809
27152
|
/**
|
|
26810
27153
|
* Constructs a new `JSONStream` reporter instance.
|
|
26811
27154
|
*
|
|
@@ -26900,7 +27243,7 @@
|
|
|
26900
27243
|
});
|
|
26901
27244
|
|
|
26902
27245
|
var name = "mocha";
|
|
26903
|
-
var version$2 = "8.
|
|
27246
|
+
var version$2 = "8.3.0";
|
|
26904
27247
|
var homepage = "https://mochajs.org/";
|
|
26905
27248
|
var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
|
|
26906
27249
|
var _package = {
|