jscrewit 2.29.0 → 2.33.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/lib/jscrewit.js CHANGED
@@ -1,11 +1,10 @@
1
- // JScrewIt 2.29.0 – https://jscrew.it
1
+ // JScrewIt 2.33.0 – https://jscrew.it
2
2
 
3
3
  (function () {
4
4
  'use strict';
5
5
 
6
6
  var _Array = Array;
7
- var _Array_isArray = _Array.isArray;
8
- var _Array_prototype_every_call;
7
+ var _Array_isArray$1 = _Array.isArray;
9
8
  var _Array_prototype_forEach_call;
10
9
  var _Array_prototype_map_call;
11
10
  var _Array_prototype_push_apply;
@@ -13,12 +12,12 @@
13
12
 
14
13
  var _Date = Date;
15
14
 
16
- var _Error = Error;
15
+ var _Error$1 = Error;
17
16
 
18
17
  var _Function = Function;
19
18
 
20
19
  var _JSON_parse = JSON.parse;
21
- var _JSON_stringify = JSON.stringify;
20
+ var _JSON_stringify$1 = JSON.stringify;
22
21
 
23
22
  var _Math_abs = Math.abs;
24
23
  var _Math_max = Math.max;
@@ -26,53 +25,52 @@
26
25
  var _Math_pow = Math.pow;
27
26
 
28
27
  var _Object = Object;
29
- var _Object_create = _Object.create;
30
- var _Object_defineProperty = _Object.defineProperty;
31
- var _Object_freeze = _Object.freeze;
32
- var _Object_getOwnPropertyDescriptor = _Object.getOwnPropertyDescriptor;
33
- var _Object_keys = _Object.keys;
28
+ var _Object_create$1 = _Object.create;
29
+ var _Object_defineProperty$1 = _Object.defineProperty;
30
+ var _Object_getOwnPropertyDescriptor$1 = _Object.getOwnPropertyDescriptor;
31
+ var _Object_keys$1 = _Object.keys;
34
32
 
35
33
  var _RegExp = RegExp;
36
34
 
37
- var _String = String;
35
+ var _String$1 = String;
38
36
 
39
37
  var _SyntaxError = SyntaxError;
40
38
 
41
- var _TypeError = TypeError;
39
+ var _TypeError$1 = TypeError;
42
40
 
43
41
  var _parseInt = parseInt;
44
42
 
45
43
  var _setTimeout = setTimeout;
46
44
 
47
- function assignNoEnum(target, source)
45
+ function assignNoEnum$1(target, source)
48
46
  {
49
- var names = _Object_keys(source);
47
+ var names = _Object_keys$1(source);
50
48
  names.forEach
51
49
  (
52
50
  function (name)
53
51
  {
54
- var descriptor = _Object_getOwnPropertyDescriptor(source, name);
52
+ var descriptor = _Object_getOwnPropertyDescriptor$1(source, name);
55
53
  descriptor.enumerable = false;
56
- _Object_defineProperty(target, name, descriptor);
54
+ _Object_defineProperty$1(target, name, descriptor);
57
55
  }
58
56
  );
59
57
  return target;
60
58
  }
61
59
 
62
- var createEmpty = _Object_create.bind(null, null, undefined);
60
+ var createEmpty = _Object_create$1.bind(null, null, undefined);
63
61
 
64
- function esToString(arg)
62
+ function esToString$1(arg)
65
63
  {
66
64
  if (typeof arg === 'symbol')
67
- throw new _TypeError('Cannot convert a symbol to a string');
68
- var str = _String(arg);
65
+ throw new _TypeError$1('Cannot convert a symbol to a string');
66
+ var str = _String$1(arg);
69
67
  return str;
70
68
  }
71
69
 
72
70
  function noProto(obj)
73
71
  {
74
72
  var result = createEmpty();
75
- _Object_keys(obj).forEach
73
+ _Object_keys$1(obj).forEach
76
74
  (
77
75
  function (name)
78
76
  {
@@ -105,7 +103,7 @@
105
103
  var _Function_prototype_apply = _Function_prototype.apply;
106
104
  var _Function_prototype_call = _Function_prototype.call;
107
105
 
108
- _Array_prototype_every_call = _Function_prototype_call.bind(_Array_prototype.every);
106
+ _Function_prototype_call.bind(_Array_prototype.every);
109
107
  _Array_prototype_forEach_call = _Function_prototype_call.bind(_Array_prototype.forEach);
110
108
  _Array_prototype_map_call = _Function_prototype_call.bind(_Array_prototype.map);
111
109
  _Array_prototype_slice_call = _Function_prototype_call.bind(_Array_prototype.slice);
@@ -248,7 +246,18 @@
248
246
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
249
247
  }
250
248
 
251
- // quinquaginta-duo 3.1.1 https://github.com/fasttime/JScrewIt/tree/master/packages/quinquaginta-duo
249
+ var __assign = function() {
250
+ __assign = Object.assign || function __assign(t) {
251
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
252
+ s = arguments[i];
253
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
254
+ }
255
+ return t;
256
+ };
257
+ return __assign.apply(this, arguments);
258
+ };
259
+
260
+ // ~feature-hub – https://github.com/fasttime/JScrewIt/tree/master/packages/~feature-hub
252
261
 
253
262
  var BIN_POW_31 = 2147483648;
254
263
  var BIN_POW_32 = 4294967296;
@@ -370,60 +379,514 @@
370
379
  return MaskSet;
371
380
  }(MaskIndex));
372
381
 
373
- var ALL = createEmpty();
374
- var DESCRIPTION_MAP = createEmpty();
375
- var ELEMENTARY = [];
376
- var FEATURE_PROTOTYPE = Feature.prototype;
377
- var INCLUDES_MAP = createEmpty();
378
- var INCOMPATIBLE_MASK_LIST = [];
379
-
380
- function Feature()
381
- {
382
- var mask = validMaskFromArguments(arguments);
383
- var featureObj = this instanceof Feature ? this : _Object_create(FEATURE_PROTOTYPE);
384
- initMask(featureObj, mask);
385
- return featureObj;
386
- }
387
-
388
- function areCompatible()
389
- {
390
- var arg0;
391
- var features =
392
- arguments.length === 1 && _Array_isArray(arg0 = arguments[0]) ? arg0 : arguments;
393
- var compatible;
394
- if (features.length > 1)
395
- {
382
+ var _Array_isArray = Array.isArray;
383
+ var _Error = Error;
384
+ var _JSON_stringify = JSON.stringify;
385
+ var _Object_create = Object.create, _Object_defineProperty = Object.defineProperty, _Object_freeze = Object.freeze, _Object_getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor, _Object_keys = Object.keys;
386
+ var _String = String;
387
+ var _TypeError = TypeError;
388
+ function assignNoEnum(target, source) {
389
+ var names = _Object_keys(source);
390
+ for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
391
+ var name_1 = names_1[_i];
392
+ var descriptor = _Object_getOwnPropertyDescriptor(source, name_1);
393
+ descriptor.enumerable = false;
394
+ _Object_defineProperty(target, name_1, descriptor);
395
+ }
396
+ }
397
+ function createFeatureClass(featureInfos, formatEngineDescription) {
398
+ var ALL = createMap();
399
+ var DESCRIPTION_MAP = createMap();
400
+ var ELEMENTARY = [];
401
+ var ENGINE = [];
402
+ var FAMILIES = createMap();
403
+ var FEATURE_PROTOTYPE = Feature.prototype;
404
+ var INCOMPATIBLE_MASK_LIST = [];
405
+ var PRISTINE_ELEMENTARY;
406
+ function Feature() {
407
+ var features = [];
408
+ for (var _i = 0; _i < arguments.length; _i++) {
409
+ features[_i] = arguments[_i];
410
+ }
411
+ var mask = maskNew();
412
+ for (var _a = 0, features_1 = features; _a < features_1.length; _a++) {
413
+ var feature = features_1[_a];
414
+ var otherMask = validMaskFromArrayOrStringOrFeature(feature);
415
+ mask = maskUnion(mask, otherMask);
416
+ }
417
+ if (features.length > 1)
418
+ validateMask(mask);
419
+ var featureObj = this instanceof Feature ? this : _Object_create(FEATURE_PROTOTYPE);
420
+ initMask(featureObj, mask);
421
+ return featureObj;
422
+ }
423
+ function _fromMask(mask) {
424
+ if (isMaskCompatible(mask)) {
425
+ var includedMask = maskNew();
426
+ for (var _i = 0, ELEMENTARY_1 = ELEMENTARY; _i < ELEMENTARY_1.length; _i++) {
427
+ var featureMask = ELEMENTARY_1[_i].mask;
428
+ if (maskIncludes(mask, featureMask))
429
+ includedMask = maskUnion(includedMask, featureMask);
430
+ }
431
+ if (maskAreEqual(mask, includedMask)) {
432
+ var featureObj = featureFromMask(mask);
433
+ return featureObj;
434
+ }
435
+ }
436
+ return null;
437
+ }
438
+ function _getMask(feature) {
439
+ var mask = feature !== undefined ? validMaskFromArrayOrStringOrFeature(feature) : maskNew();
440
+ return mask;
441
+ }
442
+ function areCompatible() {
443
+ var arg0;
444
+ var features = arguments.length === 1 &&
445
+ _Array_isArray(arg0 = arguments[0]) ?
446
+ arg0 : arguments;
396
447
  var mask = featureArrayLikeToMask(features);
397
- compatible = isMaskCompatible(mask);
448
+ var compatible = isMaskCompatible(mask);
449
+ return compatible;
398
450
  }
399
- else
400
- compatible = true;
401
- return compatible;
402
- }
403
-
404
- function areEqual()
405
- {
406
- var mask;
407
- var equal =
408
- _Array_prototype_every_call
409
- (
410
- arguments,
411
- function (arg, index)
412
- {
451
+ function areEqual() {
452
+ var features = [];
453
+ for (var _i = 0; _i < arguments.length; _i++) {
454
+ features[_i] = arguments[_i];
455
+ }
456
+ var mask;
457
+ var equal = features.every(function (feature, index) {
413
458
  var returnValue;
414
- var otherMask = validMaskFromArrayOrStringOrFeature(arg);
459
+ var otherMask = validMaskFromArrayOrStringOrFeature(feature);
415
460
  if (index)
416
461
  returnValue = maskAreEqual(otherMask, mask);
417
- else
418
- {
462
+ else {
419
463
  mask = otherMask;
420
464
  returnValue = true;
421
465
  }
422
466
  return returnValue;
467
+ });
468
+ return equal;
469
+ }
470
+ function commonOf() {
471
+ var features = [];
472
+ for (var _i = 0; _i < arguments.length; _i++) {
473
+ features[_i] = arguments[_i];
423
474
  }
424
- );
425
- return equal;
475
+ var featureObj;
476
+ if (features.length) {
477
+ var mask = void 0;
478
+ for (var _a = 0, features_2 = features; _a < features_2.length; _a++) {
479
+ var feature = features_2[_a];
480
+ var otherMask = validMaskFromArrayOrStringOrFeature(feature);
481
+ if (mask != null)
482
+ mask = maskIntersection(mask, otherMask);
483
+ else
484
+ mask = otherMask;
485
+ }
486
+ featureObj = featureFromMask(mask);
487
+ }
488
+ else
489
+ featureObj = null;
490
+ return featureObj;
491
+ }
492
+ function createFeature(name, mask, check, attributes, elementary) {
493
+ _Object_freeze(attributes);
494
+ var descriptors = { attributes: { value: attributes }, check: { value: check }, name: { value: name } };
495
+ if (elementary)
496
+ descriptors.elementary = { value: true };
497
+ var featureObj = _Object_create(FEATURE_PROTOTYPE, descriptors);
498
+ initMask(featureObj, mask);
499
+ return featureObj;
500
+ }
501
+ function descriptionFor(name) {
502
+ name = esToString(name);
503
+ if (!(name in DESCRIPTION_MAP))
504
+ throwUnknownFeatureError(name);
505
+ var description = DESCRIPTION_MAP[name];
506
+ return description;
507
+ }
508
+ function featureArrayLikeToMask(features) {
509
+ var mask = maskNew();
510
+ var length = features.length;
511
+ for (var index = 0; index < length; ++index) {
512
+ var feature = features[index];
513
+ var otherMask = maskFromStringOrFeature(feature);
514
+ mask = maskUnion(mask, otherMask);
515
+ }
516
+ return mask;
517
+ }
518
+ function featureFromMask(mask) {
519
+ var featureObj = _Object_create(FEATURE_PROTOTYPE);
520
+ initMask(featureObj, mask);
521
+ return featureObj;
522
+ }
523
+ /**
524
+ * Node.js custom inspection function.
525
+ * Set on `Feature.prototype` with name `"inspect"` for Node.js ≤ 8.6.x and with symbol
526
+ * `Symbol.for("nodejs.util.inspect.custom")` for Node.js ≥ 6.6.x.
527
+ *
528
+ * @see
529
+ * {@link https://nodejs.org/api/util.html#util_custom_inspection_functions_on_objects} for
530
+ * further information.
531
+ */
532
+ // opts can be undefined in Node.js 0.10.0.
533
+ function inspect(depth, opts) {
534
+ var _a, _b;
535
+ var breakLength = (_a = opts === null || opts === void 0 ? void 0 : opts.breakLength) !== null && _a !== void 0 ? _a : 80;
536
+ var compact = (_b = opts === null || opts === void 0 ? void 0 : opts.compact) !== null && _b !== void 0 ? _b : true;
537
+ var name = this.name;
538
+ if (name === undefined)
539
+ name = joinParts(compact, '<', '', this.canonicalNames, ',', '>', breakLength - 3);
540
+ var parts = [name];
541
+ if (this.elementary)
542
+ parts.push('(elementary)');
543
+ if (this.check)
544
+ parts.push('(check)');
545
+ {
546
+ var attributes = this.attributes;
547
+ if (typeof attributes === 'object') {
548
+ var str_1 = utilInspect(__assign({}, attributes), opts);
549
+ parts.push(str_1);
550
+ }
551
+ }
552
+ var str = joinParts(compact, '[Feature', ' ', parts, '', ']', breakLength - 1);
553
+ return str;
554
+ }
555
+ function isMaskCompatible(mask) {
556
+ var compatible = INCOMPATIBLE_MASK_LIST.every(function (incompatibleMask) { return !maskIncludes(mask, incompatibleMask); });
557
+ return compatible;
558
+ }
559
+ function maskFromStringOrFeature(feature) {
560
+ var featureObj;
561
+ if (feature instanceof Feature)
562
+ featureObj = feature;
563
+ else {
564
+ var name_2 = esToString(feature);
565
+ if (!(name_2 in ALL))
566
+ throwUnknownFeatureError(name_2);
567
+ featureObj = ALL[name_2];
568
+ }
569
+ var mask = featureObj.mask;
570
+ return mask;
571
+ }
572
+ function validMaskFromArrayOrStringOrFeature(feature) {
573
+ var mask;
574
+ if (_Array_isArray(feature)) {
575
+ mask = featureArrayLikeToMask(feature);
576
+ if (feature.length > 1)
577
+ validateMask(mask);
578
+ }
579
+ else
580
+ mask = maskFromStringOrFeature(feature);
581
+ return mask;
582
+ }
583
+ function validateMask(mask) {
584
+ if (!isMaskCompatible(mask))
585
+ throw new _Error('Incompatible features');
586
+ }
587
+ var utilInspect;
588
+ try {
589
+ utilInspect = require('util').inspect;
590
+ }
591
+ catch (_a) { }
592
+ {
593
+ var protoSource = {
594
+ get canonicalNames() {
595
+ var mask = this.mask;
596
+ var names = [];
597
+ var includedMask = maskNew();
598
+ for (var index = PRISTINE_ELEMENTARY.length; index--;) {
599
+ var featureObj = PRISTINE_ELEMENTARY[index];
600
+ var featureMask = featureObj.mask;
601
+ if (maskIncludes(mask, featureMask) && !maskIncludes(includedMask, featureMask)) {
602
+ includedMask = maskUnion(includedMask, featureMask);
603
+ names.push(featureObj.name);
604
+ }
605
+ }
606
+ names.sort();
607
+ return names;
608
+ },
609
+ elementary: false,
610
+ get elementaryNames() {
611
+ var names = [];
612
+ var mask = this.mask;
613
+ for (var _i = 0, ELEMENTARY_2 = ELEMENTARY; _i < ELEMENTARY_2.length; _i++) {
614
+ var featureObj = ELEMENTARY_2[_i];
615
+ var included = maskIncludes(mask, featureObj.mask);
616
+ if (included)
617
+ names.push(featureObj.name);
618
+ }
619
+ return names;
620
+ },
621
+ includes: function () {
622
+ var features = [];
623
+ for (var _i = 0; _i < arguments.length; _i++) {
624
+ features[_i] = arguments[_i];
625
+ }
626
+ var mask = this.mask;
627
+ var included = features.every(function (feature) {
628
+ var otherMask = validMaskFromArrayOrStringOrFeature(feature);
629
+ var returnValue = maskIncludes(mask, otherMask);
630
+ return returnValue;
631
+ });
632
+ return included;
633
+ },
634
+ name: undefined,
635
+ toString: function () {
636
+ var _a;
637
+ var name = (_a = this.name) !== null && _a !== void 0 ? _a : "<" + this.canonicalNames.join(', ') + ">";
638
+ var str = "[Feature " + name + "]";
639
+ return str;
640
+ },
641
+ };
642
+ if (utilInspect)
643
+ protoSource.inspect = inspect;
644
+ assignNoEnum(FEATURE_PROTOTYPE, protoSource);
645
+ }
646
+ (function () {
647
+ var compareFeatureNames = function (feature1, feature2) {
648
+ return feature1.name < feature2.name ? -1 : 1;
649
+ };
650
+ function completeExclusions() {
651
+ var incompatibleMaskSet = new MaskSet();
652
+ for (var _i = 0, featureNames_1 = featureNames; _i < featureNames_1.length; _i++) {
653
+ var name_3 = featureNames_1[_i];
654
+ var excludes = featureInfos[name_3].excludes;
655
+ if (excludes) {
656
+ var mask = ALL[name_3].mask;
657
+ for (var _a = 0, excludes_1 = excludes; _a < excludes_1.length; _a++) {
658
+ var exclude = excludes_1[_a];
659
+ var excludeMask = completeFeature(exclude);
660
+ var incompatibleMask = maskUnion(mask, excludeMask);
661
+ if (!incompatibleMaskSet.has(incompatibleMask)) {
662
+ INCOMPATIBLE_MASK_LIST.push(incompatibleMask);
663
+ incompatibleMaskSet.add(incompatibleMask);
664
+ }
665
+ }
666
+ }
667
+ }
668
+ }
669
+ function completeFeature(name) {
670
+ var mask;
671
+ if (name in ALL)
672
+ (mask = ALL[name].mask);
673
+ else {
674
+ var info_1 = featureInfos[name];
675
+ var getInfoStringField = function (fieldName) {
676
+ return fieldName in info_1 ?
677
+ esToString(info_1[fieldName]) : undefined;
678
+ };
679
+ var description = getInfoStringField('description');
680
+ var featureObj = void 0;
681
+ if ('aliasFor' in info_1) {
682
+ var aliasFor = esToString(info_1.aliasFor);
683
+ mask = completeFeature(aliasFor);
684
+ featureObj = ALL[aliasFor];
685
+ if (description == null)
686
+ description = DESCRIPTION_MAP[aliasFor];
687
+ }
688
+ else {
689
+ var inherits = getInfoStringField('inherits');
690
+ if (inherits != null)
691
+ completeFeature(inherits);
692
+ var wrappedCheck = void 0;
693
+ var compatibilities = void 0;
694
+ var check = info_1.check;
695
+ if (check !== undefined) {
696
+ mask = maskNext(unionMask);
697
+ unionMask = maskUnion(unionMask, mask);
698
+ wrappedCheck = wrapCheck(check);
699
+ }
700
+ else {
701
+ mask = maskNew();
702
+ wrappedCheck = null;
703
+ }
704
+ {
705
+ var includes = info_1.includes;
706
+ var includeSet = includeSetMap[name] = createMap();
707
+ if (_Array_isArray(includes)) {
708
+ for (var _i = 0, includes_1 = includes; _i < includes_1.length; _i++) {
709
+ var include = includes_1[_i];
710
+ includeSet[include] = null;
711
+ }
712
+ }
713
+ else {
714
+ if (inherits != null) {
715
+ var inheritedIncludeSet = includeSetMap[inherits];
716
+ for (var include in inheritedIncludeSet)
717
+ includeSet[include] = null;
718
+ }
719
+ if (includes) {
720
+ var includeDiffNames = _Object_keys(includes);
721
+ for (var _a = 0, includeDiffNames_1 = includeDiffNames; _a < includeDiffNames_1.length; _a++) {
722
+ var include = includeDiffNames_1[_a];
723
+ if (includes[include])
724
+ includeSet[include] = null;
725
+ else
726
+ delete includeSet[include];
727
+ }
728
+ }
729
+ }
730
+ for (var include in includeSet) {
731
+ var includeMask = completeFeature(include);
732
+ mask = maskUnion(mask, includeMask);
733
+ }
734
+ }
735
+ if ('versions' in info_1) {
736
+ var families = info_1.families;
737
+ var versions_1 = info_1.versions;
738
+ if (inherits != null)
739
+ families !== null && families !== void 0 ? families : (families = familiesMap[inherits]);
740
+ familiesMap[name] = families;
741
+ var tag_1 = getInfoStringField('compatibilityTag');
742
+ var shortTag_1 = getInfoStringField('compatibilityShortTag');
743
+ compatibilities =
744
+ families.map(function (family, index) {
745
+ var _a;
746
+ family = esToString(family);
747
+ var versionInfo = versions_1[index];
748
+ var version;
749
+ if (_Array_isArray(versionInfo)) {
750
+ var length_1 = versionInfo.length;
751
+ var from = esToString(versionInfo[0]);
752
+ var to = length_1 < 2 ? undefined : esToString(versionInfo[length_1 - 1]);
753
+ var dense = versionInfo.length === 2;
754
+ version = _Object_freeze({ from: from, to: to, dense: dense });
755
+ }
756
+ else
757
+ version = esToString(versionInfo);
758
+ var compatibility = _Object_freeze({ family: family, featureName: name, version: version, tag: tag_1, shortTag: shortTag_1 });
759
+ var familyCompatibilities = (_a = FAMILIES[family]) !== null && _a !== void 0 ? _a : (FAMILIES[family] = []);
760
+ familyCompatibilities.push(compatibility);
761
+ return compatibility;
762
+ });
763
+ if (description == null)
764
+ description = formatEngineDescription === null || formatEngineDescription === void 0 ? void 0 : formatEngineDescription(compatibilities);
765
+ }
766
+ var attributes = createMap();
767
+ if (inherits != null) {
768
+ var inheritedAttributes = ALL[inherits].attributes;
769
+ for (var attributeName in inheritedAttributes)
770
+ attributes[attributeName] = inheritedAttributes[attributeName];
771
+ }
772
+ {
773
+ var infoAttributes = info_1.attributes;
774
+ if (infoAttributes !== undefined) {
775
+ var attributeNames = _Object_keys(infoAttributes);
776
+ for (var _b = 0, attributeNames_1 = attributeNames; _b < attributeNames_1.length; _b++) {
777
+ var attributeName = attributeNames_1[_b];
778
+ var attributeValue = infoAttributes[attributeName];
779
+ if (attributeValue !== undefined) {
780
+ attributes[attributeName] =
781
+ typeof attributeValue === 'string' ? attributeValue : null;
782
+ }
783
+ else
784
+ delete attributes[attributeName];
785
+ }
786
+ }
787
+ }
788
+ var elementary = wrappedCheck !== null && wrappedCheck !== void 0 ? wrappedCheck : info_1.excludes;
789
+ featureObj = createFeature(name, mask, wrappedCheck, attributes, elementary);
790
+ if (elementary)
791
+ ELEMENTARY.push(featureObj);
792
+ if (compatibilities)
793
+ ENGINE.push(featureObj);
794
+ }
795
+ ALL[name] = featureObj;
796
+ DESCRIPTION_MAP[name] = description;
797
+ }
798
+ return mask;
799
+ }
800
+ {
801
+ var constructorSource = {
802
+ ALL: ALL,
803
+ ELEMENTARY: ELEMENTARY,
804
+ ENGINE: ENGINE,
805
+ FAMILIES: FAMILIES,
806
+ _fromMask: _fromMask,
807
+ _getMask: _getMask,
808
+ areCompatible: areCompatible,
809
+ areEqual: areEqual,
810
+ commonOf: commonOf,
811
+ descriptionFor: descriptionFor,
812
+ };
813
+ assignNoEnum(Feature, constructorSource);
814
+ }
815
+ if (utilInspect) {
816
+ var inspectKey = utilInspect.custom;
817
+ if (inspectKey) {
818
+ _Object_defineProperty(FEATURE_PROTOTYPE, inspectKey, { configurable: true, value: inspect, writable: true });
819
+ }
820
+ }
821
+ var featureNames = _Object_keys(featureInfos);
822
+ var includeSetMap = createMap();
823
+ var familiesMap = createMap();
824
+ var unionMask = maskNew();
825
+ featureNames.forEach(completeFeature);
826
+ completeExclusions();
827
+ PRISTINE_ELEMENTARY = ELEMENTARY.slice();
828
+ ELEMENTARY.sort(compareFeatureNames);
829
+ _Object_freeze(ELEMENTARY);
830
+ ENGINE.sort(compareFeatureNames);
831
+ _Object_freeze(ENGINE);
832
+ _Object_freeze(ALL);
833
+ _Object_freeze(FAMILIES);
834
+ for (var family in FAMILIES)
835
+ _Object_freeze(FAMILIES[family]);
836
+ })();
837
+ return Feature;
838
+ }
839
+ var createMap = function () { return _Object_create(null); };
840
+ function esToString(name) {
841
+ if (typeof name === 'symbol')
842
+ throw new _TypeError('Cannot convert a symbol to a string');
843
+ var str = _String(name);
844
+ return str;
845
+ }
846
+ function featuresToMask(featureObjs) {
847
+ var mask = featureObjs.reduce(function (mask, featureObj) { return maskUnion(mask, featureObj.mask); }, maskNew());
848
+ return mask;
849
+ }
850
+ function indent(text) {
851
+ var returnValue = text.replace(/^/gm, ' ');
852
+ return returnValue;
853
+ }
854
+ function initMask(featureObj, mask) {
855
+ _Object_defineProperty(featureObj, 'mask', { value: mask });
856
+ }
857
+ function joinParts(compact, intro, preSeparator, parts, partSeparator, outro, maxLength) {
858
+ function isMultiline() {
859
+ var length = intro.length +
860
+ preSeparator.length +
861
+ (parts.length - 1) * (partSeparator.length + 1) +
862
+ outro.length;
863
+ for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {
864
+ var part = parts_1[_i];
865
+ if (~part.indexOf('\n'))
866
+ return true;
867
+ length += part.replace(/\x1b\[\d+m/g, '').length;
868
+ if (length > maxLength)
869
+ return true;
870
+ }
871
+ return false;
872
+ }
873
+ var str = parts.length && (!compact || isMultiline()) ?
874
+ intro + "\n" + indent(parts.join(partSeparator + "\n")) + "\n" + outro :
875
+ "" + intro + preSeparator + parts.join(partSeparator + " ") + outro;
876
+ return str;
877
+ }
878
+ function throwUnknownFeatureError(name) {
879
+ throw new _Error("Unknown feature " + _JSON_stringify(name));
426
880
  }
881
+ function wrapCheck(check) {
882
+ var wrappedCheck = function () { return !!check(); };
883
+ return wrappedCheck;
884
+ }
885
+
886
+ // End of module ~feature-hub
887
+
888
+ var ELEMENTARY;
889
+ var Feature;
427
890
 
428
891
  function checkLocaleNumeral(locale, number, regExp)
429
892
  {
@@ -447,2123 +910,1303 @@
447
910
  return available;
448
911
  }
449
912
 
450
- function commonOf()
451
- {
452
- var returnValue;
453
- if (arguments.length)
454
- {
455
- var mask;
456
- _Array_prototype_forEach_call
457
- (
458
- arguments,
459
- function (arg)
460
- {
461
- var otherMask = validMaskFromArrayOrStringOrFeature(arg);
462
- if (mask != null)
463
- mask = maskIntersection(mask, otherMask);
464
- else
465
- mask = otherMask;
466
- }
467
- );
468
- returnValue = featureFromMask(mask);
469
- }
470
- else
471
- returnValue = null;
472
- return returnValue;
473
- }
474
-
475
- function descriptionFor(name)
913
+ function describeEngine(engine)
476
914
  {
477
- name = esToString(name);
478
- var description = DESCRIPTION_MAP[name];
479
- if (description == null)
480
- throw new _Error('Unknown feature ' + _JSON_stringify(name));
915
+ var description = 'Features available in ' + engine + '.';
481
916
  return description;
482
917
  }
483
918
 
484
- function featureArrayLikeToMask(arrayLike)
485
- {
486
- var mask = maskNew();
487
- _Array_prototype_forEach_call
488
- (
489
- arrayLike,
490
- function (feature)
491
- {
492
- var otherMask = maskFromStringOrFeature(feature);
493
- mask = maskUnion(mask, otherMask);
494
- }
495
- );
496
- return mask;
497
- }
498
-
499
- function featureFromMask(mask)
500
- {
501
- var featureObj = _Object_create(FEATURE_PROTOTYPE);
502
- initMask(featureObj, mask);
503
- return featureObj;
504
- }
505
-
506
- function featuresToMask(featureObjs)
507
- {
508
- var mask = maskNew();
509
- featureObjs.forEach
510
- (
511
- function (featureObj)
512
- {
513
- mask = maskUnion(mask, featureObj.mask);
514
- }
515
- );
516
- return mask;
517
- }
518
-
519
- function initMask(featureObj, mask)
520
- {
521
- _Object_defineProperty(featureObj, 'mask', { value: mask });
522
- }
523
-
524
- /**
525
- * Node.js custom inspection function.
526
- * Set on `Feature.prototype` with name `"inspect"` for Node.js ≤ 8.6.x and with symbol
527
- * `Symbol.for("nodejs.util.inspect.custom")` for Node.js ≥ 6.6.x.
528
- *
529
- * @function inspect
530
- *
531
- * @see
532
- * {@link https://tiny.cc/j4wz9y|Custom inspection functions on Objects} for further information.
533
- */
534
- function inspect(depth, opts)
535
- {
536
- var returnValue;
537
- var str = this.toString();
538
- if (opts !== undefined) // opts can be undefined in Node.js 0.10.0.
539
- returnValue = opts.stylize(str, 'jscrewit-feature');
540
- else
541
- returnValue = str;
542
- return returnValue;
543
- }
544
-
545
- function isExcludingAttribute(attributeCache, attributeName, featureObjs)
919
+ function isExcludingAttribute(restrictionCache, restrictionName, featureObjs)
546
920
  {
547
- var returnValue = attributeCache[attributeName];
921
+ var returnValue = restrictionCache[restrictionName];
548
922
  if (returnValue === undefined)
549
923
  {
550
- attributeCache[attributeName] =
924
+ restrictionCache[restrictionName] =
551
925
  returnValue =
552
926
  featureObjs.some
553
927
  (
554
928
  function (featureObj)
555
929
  {
556
- return attributeName in featureObj.attributes;
930
+ var returnValue = restrictionName in featureObj.attributes;
931
+ return returnValue;
557
932
  }
558
933
  );
559
934
  }
560
935
  return returnValue;
561
936
  }
562
937
 
563
- function isMaskCompatible(mask)
938
+ function restrict(environment, engineFeatureObjs)
564
939
  {
565
- var compatible =
566
- INCOMPATIBLE_MASK_LIST.every
940
+ var restrictionCache = createEmpty();
941
+ var elementaryFeatureObjs =
942
+ ELEMENTARY.filter
567
943
  (
568
- function (incompatibleMask)
944
+ function (elementaryFeatureObj)
569
945
  {
570
- var returnValue = !maskIncludes(mask, incompatibleMask);
571
- return returnValue;
572
- }
946
+ var included = this.includes(elementaryFeatureObj);
947
+ if (included)
948
+ {
949
+ var attributes = elementaryFeatureObj.attributes;
950
+ included =
951
+ !(
952
+ environment in attributes &&
953
+ (
954
+ engineFeatureObjs === undefined ||
955
+ isExcludingAttribute
956
+ (restrictionCache, attributes[environment], engineFeatureObjs)
957
+ )
958
+ );
959
+ }
960
+ return included;
961
+ },
962
+ this
573
963
  );
574
- return compatible;
964
+ var restrictedFeatureObj = Feature(elementaryFeatureObjs);
965
+ return restrictedFeatureObj;
575
966
  }
576
967
 
577
- function maskFromStringOrFeature(arg)
968
+ var featureInfos =
578
969
  {
579
- var mask;
580
- if (arg instanceof Feature)
581
- mask = arg.mask;
582
- else
970
+ ANY_DOCUMENT:
583
971
  {
584
- var name = esToString(arg);
585
- var featureObj = ALL[name];
586
- if (!featureObj)
587
- throw new _Error('Unknown feature ' + _JSON_stringify(name));
588
- mask = featureObj.mask;
589
- }
590
- return mask;
591
- }
592
-
593
- function validateMask(mask)
594
- {
595
- if (!isMaskCompatible(mask))
596
- throw new _Error('Incompatible features');
597
- }
598
-
599
- function validMaskFromArguments(args)
600
- {
601
- var mask = maskNew();
602
- var validationNeeded = 0;
603
- _Array_prototype_forEach_call
604
- (
605
- args,
606
- function (arg)
972
+ description:
973
+ 'Existence of the global object document whose string representation starts with ' +
974
+ '"[object " and ends with "Document]".',
975
+ check:
976
+ function ()
607
977
  {
608
- var otherMask;
609
- if (_Array_isArray(arg))
978
+ var available =
979
+ typeof document === 'object' && /^\[object [\S\s]*Document]$/.test(document + '');
980
+ return available;
981
+ },
982
+ attributes: { 'web-worker': 'web-worker-restriction' },
983
+ },
984
+ ANY_WINDOW:
985
+ {
986
+ description:
987
+ 'Existence of the global object self whose string representation starts with "[object " ' +
988
+ 'and ends with "Window]".',
989
+ check:
990
+ checkSelfFeature.bind
991
+ (
992
+ function (str)
610
993
  {
611
- otherMask = featureArrayLikeToMask(arg);
612
- validationNeeded |= arg.length > 1;
994
+ var available = /^\[object [\S\s]*Window]$/.test(str);
995
+ return available;
613
996
  }
614
- else
615
- otherMask = maskFromStringOrFeature(arg);
616
- mask = maskUnion(mask, otherMask);
617
- }
618
- );
619
- validationNeeded |= args.length > 1;
620
- if (validationNeeded)
621
- validateMask(mask);
622
- return mask;
623
- }
624
-
625
- function validMaskFromArrayOrStringOrFeature(arg)
626
- {
627
- var mask;
628
- if (_Array_isArray(arg))
629
- {
630
- mask = featureArrayLikeToMask(arg);
631
- if (arg.length > 1)
632
- validateMask(mask);
633
- }
634
- else
635
- mask = maskFromStringOrFeature(arg);
636
- return mask;
637
- }
638
-
639
- function wrapCheck(check)
640
- {
641
- var returnValue =
642
- function ()
997
+ ),
998
+ includes: ['SELF_OBJ'],
999
+ attributes: { 'web-worker': 'web-worker-restriction' },
1000
+ },
1001
+ ARRAY_ITERATOR:
643
1002
  {
644
- var available = !!check();
645
- return available;
646
- };
647
- return returnValue;
648
- }
649
-
650
- assignNoEnum
651
- (
652
- FEATURE_PROTOTYPE,
1003
+ description:
1004
+ 'The property that the string representation of Array.prototype.entries() starts with ' +
1005
+ '"[object Array" and ends with "]" at index 21 or 22.',
1006
+ check:
1007
+ function ()
1008
+ {
1009
+ var available =
1010
+ Array.prototype.entries && /^\[object Array[\S\s]{8,9}]$/.test([].entries());
1011
+ return available;
1012
+ },
1013
+ },
1014
+ ARROW:
653
1015
  {
654
- get canonicalNames()
1016
+ description: 'Support for arrow functions.',
1017
+ check:
1018
+ function ()
655
1019
  {
656
- var mask = this.mask;
657
- var featureNameSet = createEmpty();
658
- var allIncludes = [];
659
- ELEMENTARY.forEach
660
- (
661
- function (featureObj)
662
- {
663
- var included = maskIncludes(mask, featureObj.mask);
664
- if (included)
665
- {
666
- var name = featureObj.name;
667
- featureNameSet[name] = null;
668
- var includes = INCLUDES_MAP[name];
669
- _Array_prototype_push_apply(allIncludes, includes);
670
- }
671
- }
672
- );
673
- allIncludes.forEach
674
- (
675
- function (name)
676
- {
677
- delete featureNameSet[name];
678
- }
679
- );
680
- var names = _Object_keys(featureNameSet).sort();
681
- return names;
682
- },
683
-
684
- elementary: false,
685
-
686
- get elementaryNames()
687
- {
688
- var names = [];
689
- var mask = this.mask;
690
- ELEMENTARY.forEach
691
- (
692
- function (featureObj)
693
- {
694
- var included = maskIncludes(mask, featureObj.mask);
695
- if (included)
696
- names.push(featureObj.name);
697
- }
698
- );
699
- return names;
1020
+ try
1021
+ {
1022
+ Function('()=>{}')();
1023
+ return true;
1024
+ }
1025
+ catch (error)
1026
+ { }
700
1027
  },
701
-
702
- includes:
1028
+ },
1029
+ AT:
1030
+ {
1031
+ description: 'Existence of the native function Array.prototype.at.',
1032
+ check:
703
1033
  function ()
704
1034
  {
705
- var mask = this.mask;
706
- var included =
707
- _Array_prototype_every_call
708
- (
709
- arguments,
710
- function (arg)
711
- {
712
- var otherMask = validMaskFromArrayOrStringOrFeature(arg);
713
- var returnValue = maskIncludes(mask, otherMask);
714
- return returnValue;
715
- }
716
- );
717
- return included;
1035
+ var available = Array.prototype.at;
1036
+ return available;
718
1037
  },
719
-
720
- inspect: inspect,
721
-
722
- name: undefined,
723
-
724
- restrict:
725
- function (environment, engineFeatureObjs)
726
- {
727
- var resultMask = maskNew();
728
- var thisMask = this.mask;
729
- var attributeCache = createEmpty();
730
- ELEMENTARY.forEach
731
- (
732
- function (featureObj)
733
- {
734
- var otherMask = featureObj.mask;
735
- var included = maskIncludes(thisMask, otherMask);
736
- if (included)
737
- {
738
- var attributeValue = featureObj.attributes[environment];
739
- if
740
- (
741
- attributeValue === undefined ||
742
- engineFeatureObjs !== undefined &&
743
- !isExcludingAttribute(attributeCache, attributeValue, engineFeatureObjs)
744
- )
745
- resultMask = maskUnion(resultMask, otherMask);
746
- }
747
- }
748
- );
749
- var returnValue = featureFromMask(resultMask);
750
- return returnValue;
751
- },
752
-
753
- toString:
1038
+ },
1039
+ ATOB:
1040
+ {
1041
+ description: 'Existence of the global functions atob and btoa.',
1042
+ check:
754
1043
  function ()
755
1044
  {
756
- var name = this.name;
757
- if (name === undefined)
758
- name = '{' + this.canonicalNames.join(', ') + '}';
759
- var str = '[Feature ' + name + ']';
760
- return str;
1045
+ var available = typeof atob === 'function' && typeof btoa === 'function';
1046
+ return available;
761
1047
  },
762
- }
763
- );
764
-
765
- (function (featureInfos)
766
- {
767
- function completeExclusions()
768
- {
769
- var incompatibleMaskSet = new MaskSet();
770
- featureNames.forEach
771
- (
772
- function (name)
773
- {
774
- var info = featureInfos[name];
775
- var excludes = info.excludes;
776
- if (excludes)
777
- {
778
- var featureObj = ALL[name];
779
- var mask = featureObj.mask;
780
- excludes.forEach
781
- (
782
- function (exclude)
783
- {
784
- var excludeMask = completeFeature(exclude);
785
- var incompatibleMask = maskUnion(mask, excludeMask);
786
- if (!incompatibleMaskSet.has(incompatibleMask))
787
- {
788
- INCOMPATIBLE_MASK_LIST.push(incompatibleMask);
789
- incompatibleMaskSet.add(incompatibleMask);
790
- }
791
- }
792
- );
793
- }
794
- }
795
- );
796
- }
797
-
798
- function completeFeature(name)
799
- {
800
- var mask;
801
- var featureObj = ALL[name];
802
- if (featureObj)
803
- mask = featureObj.mask;
804
- else
805
- {
806
- var description;
807
- var info = featureInfos[name];
808
- var engine = info.engine;
809
- if (engine == null)
810
- description = info.description;
811
- else
812
- description = createEngineFeatureDescription(engine);
813
- var aliasFor = info.aliasFor;
814
- if (aliasFor != null)
815
- {
816
- mask = completeFeature(aliasFor);
817
- featureObj = ALL[aliasFor];
818
- if (description == null)
819
- description = DESCRIPTION_MAP[aliasFor];
820
- }
821
- else
822
- {
823
- var check = info.check;
824
- if (check)
825
- {
826
- mask = maskNext(unionMask);
827
- unionMask = maskUnion(unionMask, mask);
828
- if (check())
829
- autoMask = maskUnion(autoMask, mask);
830
- check = wrapCheck(check);
831
- }
832
- else
833
- mask = maskNew();
834
- var includes = INCLUDES_MAP[name] = info.includes || [];
835
- includes.forEach
836
- (
837
- function (include)
838
- {
839
- var includeMask = completeFeature(include);
840
- mask = maskUnion(mask, includeMask);
841
- }
842
- );
843
- var elementary = check || info.excludes;
844
- featureObj = createFeature(name, mask, check, engine, info.attributes, elementary);
845
- if (elementary)
846
- ELEMENTARY.push(featureObj);
847
- }
848
- registerFeature(name, description, featureObj);
849
- }
850
- return mask;
851
- }
852
-
853
- function createEngineFeatureDescription(engine)
854
- {
855
- var description = 'Features available in ' + engine + '.';
856
- return description;
857
- }
858
-
859
- function createFeature(name, mask, check, engine, attributes, elementary)
860
- {
861
- attributes = _Object_freeze(attributes || { });
862
- var descriptors =
863
- {
864
- attributes: { value: attributes },
865
- check: { value: check },
866
- engine: { value: engine },
867
- name: { value: name },
868
- };
869
- if (elementary)
870
- descriptors.elementary = { value: true };
871
- var featureObj = _Object_create(FEATURE_PROTOTYPE, descriptors);
872
- initMask(featureObj, mask);
873
- return featureObj;
874
- }
875
-
876
- function registerFeature(name, description, featureObj)
877
- {
878
- var descriptor = { enumerable: true, value: featureObj };
879
- _Object_defineProperty(Feature, name, descriptor);
880
- ALL[name] = featureObj;
881
- DESCRIPTION_MAP[name] = description;
882
- }
883
-
884
- var constructorSource =
885
- {
886
- ALL: ALL,
887
- ELEMENTARY: ELEMENTARY,
888
- areCompatible: areCompatible,
889
- areEqual: areEqual,
890
- commonOf: commonOf,
891
- descriptionFor: descriptionFor,
892
- };
893
- assignNoEnum(Feature, constructorSource);
894
-
895
- try
896
- {
897
- var inspectKey = require('util').inspect.custom;
898
- }
899
- catch (error)
900
- { }
901
- if (inspectKey)
902
- {
903
- _Object_defineProperty
904
- (FEATURE_PROTOTYPE, inspectKey, { configurable: true, value: inspect, writable: true });
905
- }
906
-
907
- var autoMask = maskNew();
908
- var unionMask = maskNew();
909
-
910
- var featureNames = _Object_keys(featureInfos);
911
- featureNames.forEach(completeFeature);
912
- completeExclusions();
913
- ELEMENTARY.sort
914
- (
915
- function (feature1, feature2)
916
- {
917
- var returnValue = feature1.name < feature2.name ? -1 : 1;
918
- return returnValue;
919
- }
920
- );
921
- _Object_freeze(ELEMENTARY);
922
- var autoFeatureObj = createFeature('AUTO', autoMask);
923
- registerFeature('AUTO', 'All features available in the current engine.', autoFeatureObj);
924
- _Object_freeze(ALL);
925
- })
926
- (
1048
+ attributes: { 'web-worker': 'old-safari-restriction' },
1049
+ },
1050
+ BARPROP:
927
1051
  {
928
- ANY_DOCUMENT:
929
- {
930
- description:
931
- 'Existence of the global object document whose string representation starts with ' +
932
- '"[object " and ends with "Document]".',
933
- check:
934
- function ()
935
- {
936
- var available =
937
- typeof document === 'object' && /^\[object .*Document]$/.test(document + '');
938
- return available;
939
- },
940
- attributes: { 'web-worker': 'web-worker-restriction' },
941
- },
942
- ANY_WINDOW:
943
- {
944
- description:
945
- 'Existence of the global object self whose string representation starts with ' +
946
- '"[object " and ends with "Window]".',
947
- check:
948
- checkSelfFeature.bind
949
- (
950
- function (str)
951
- {
952
- var available = /^\[object .*Window]$/.test(str);
953
- return available;
954
- }
955
- ),
956
- includes: ['SELF_OBJ'],
957
- attributes: { 'web-worker': 'web-worker-restriction' },
958
- },
959
- ARRAY_ITERATOR:
960
- {
961
- description:
962
- 'The property that the string representation of Array.prototype.entries() starts ' +
963
- 'with "[object Array" and ends with "]" at index 21 or 22.',
964
- check:
965
- function ()
966
- {
967
- var available =
968
- Array.prototype.entries && /^\[object Array.{8,9}]$/.test([].entries());
969
- return available;
970
- },
971
- },
972
- ARROW:
973
- {
974
- description: 'Support for arrow functions.',
975
- check:
976
- function ()
977
- {
978
- try
979
- {
980
- Function('()=>{}')();
981
- return true;
982
- }
983
- catch (error)
984
- { }
985
- },
986
- },
987
- AT:
988
- {
989
- description: 'Existence of the native function Array.prototype.at.',
990
- check:
991
- function ()
992
- {
993
- var available = Array.prototype.at;
994
- return available;
995
- },
996
- },
997
- ATOB:
998
- {
999
- description: 'Existence of the global functions atob and btoa.',
1000
- check:
1001
- function ()
1002
- {
1003
- var available = typeof atob === 'function' && typeof btoa === 'function';
1004
- return available;
1005
- },
1006
- attributes: { 'web-worker': 'no-atob-in-web-worker' },
1007
- },
1008
- BARPROP:
1009
- {
1010
- description:
1011
- 'Existence of the global object statusbar having the string representation "[object ' +
1012
- 'BarProp]".',
1013
- check:
1014
- function ()
1015
- {
1016
- var available =
1017
- typeof statusbar === 'object' && statusbar + '' === '[object BarProp]';
1018
- return available;
1019
- },
1020
- attributes: { 'web-worker': 'web-worker-restriction' },
1021
- },
1022
- CAPITAL_HTML:
1023
- {
1024
- description:
1025
- 'The property that the various string methods returning HTML code such as ' +
1026
- 'String.prototype.big or String.prototype.link have both the tag name and attributes ' +
1027
- 'written in capital letters.',
1028
- check:
1029
- function ()
1030
- {
1031
- var available =
1032
- ''.big() === '<BIG></BIG>' &&
1033
- ''.fontcolor('') === '<FONT COLOR=""></FONT>' &&
1034
- ''.fontsize('') === '<FONT SIZE=""></FONT>' &&
1035
- ''.link('') === '<A HREF=""></A>' &&
1036
- ''.small() === '<SMALL></SMALL>' &&
1037
- ''.strike() === '<STRIKE></STRIKE>' &&
1038
- ''.sub() === '<SUB></SUB>' &&
1039
- ''.sup() === '<SUP></SUP>';
1040
- return available;
1041
- },
1042
- },
1043
- CONSOLE:
1044
- {
1045
- description:
1046
- 'Existence of the global object console having the string representation "[object ' +
1047
- 'Console]".\n' +
1048
- 'This feature may become unavailable when certain browser extensions are active.',
1049
- check:
1050
- function ()
1051
- {
1052
- var available = typeof console === 'object' && console + '' === '[object Console]';
1053
- return available;
1054
- },
1055
- attributes: { 'web-worker': 'no-console-in-web-worker' },
1056
- },
1057
- DOCUMENT:
1052
+ description:
1053
+ 'Existence of the global object statusbar having the string representation "[object ' +
1054
+ 'BarProp]".',
1055
+ check:
1056
+ function ()
1058
1057
  {
1059
- description:
1060
- 'Existence of the global object document having the string representation "[object ' +
1061
- 'Document]".',
1062
- check:
1063
- function ()
1064
- {
1065
- var available =
1066
- typeof document === 'object' && document + '' === '[object Document]';
1067
- return available;
1068
- },
1069
- includes: ['ANY_DOCUMENT'],
1070
- excludes: ['HTMLDOCUMENT'],
1071
- attributes: { 'web-worker': 'web-worker-restriction' },
1058
+ var available = typeof statusbar === 'object' && statusbar + '' === '[object BarProp]';
1059
+ return available;
1072
1060
  },
1073
- DOMWINDOW:
1061
+ attributes: { 'web-worker': 'web-worker-restriction' },
1062
+ },
1063
+ CAPITAL_HTML:
1064
+ {
1065
+ description:
1066
+ 'The property that the various string methods returning HTML code such as ' +
1067
+ 'String.prototype.big or String.prototype.link have both the tag name and attributes ' +
1068
+ 'written in capital letters.',
1069
+ check:
1070
+ function ()
1074
1071
  {
1075
- description:
1076
- 'Existence of the global object self having the string representation "[object ' +
1077
- 'DOMWindow]".',
1078
- check:
1079
- checkSelfFeature.bind
1080
- (
1081
- function (str)
1082
- {
1083
- var available = str === '[object DOMWindow]';
1084
- return available;
1085
- }
1086
- ),
1087
- includes: ['ANY_WINDOW'],
1088
- excludes: ['WINDOW'],
1089
- attributes: { 'web-worker': 'web-worker-restriction' },
1090
- },
1091
- ESC_HTML_ALL:
1092
- {
1093
- description:
1094
- 'The property that double quotation mark, less than and greater than characters in ' +
1095
- 'the argument of String.prototype.fontcolor are escaped into their respective HTML ' +
1096
- 'entities.',
1097
- check:
1098
- function ()
1099
- {
1100
- var available = ~''.fontcolor('"<>').indexOf('&quot;&lt;&gt;');
1101
- return available;
1102
- },
1103
- includes: ['ESC_HTML_QUOT'],
1104
- excludes: ['ESC_HTML_QUOT_ONLY'],
1072
+ var available =
1073
+ ''.big() === '<BIG></BIG>' &&
1074
+ ''.fontcolor('') === '<FONT COLOR=""></FONT>' &&
1075
+ ''.fontsize('') === '<FONT SIZE=""></FONT>' &&
1076
+ ''.link('') === '<A HREF=""></A>' &&
1077
+ ''.small() === '<SMALL></SMALL>' &&
1078
+ ''.strike() === '<STRIKE></STRIKE>' &&
1079
+ ''.sub() === '<SUB></SUB>' &&
1080
+ ''.sup() === '<SUP></SUP>';
1081
+ return available;
1105
1082
  },
1106
- ESC_HTML_QUOT:
1083
+ },
1084
+ CONSOLE:
1085
+ {
1086
+ description:
1087
+ 'Existence of the global object console having the string representation "[object ' +
1088
+ 'Console]".\n' +
1089
+ 'This feature may become unavailable when certain browser extensions are active.',
1090
+ check:
1091
+ function ()
1107
1092
  {
1108
- description:
1109
- 'The property that double quotation marks in the argument of ' +
1110
- 'String.prototype.fontcolor are escaped as "&quot;".',
1111
- check:
1112
- function ()
1113
- {
1114
- var available = ~''.fontcolor('"').indexOf('&quot;');
1115
- return available;
1116
- },
1093
+ var available = typeof console === 'object' && console + '' === '[object Console]';
1094
+ return available;
1117
1095
  },
1118
- ESC_HTML_QUOT_ONLY:
1096
+ attributes: { 'web-worker': 'no-console-in-web-worker' },
1097
+ },
1098
+ DOCUMENT:
1099
+ {
1100
+ description:
1101
+ 'Existence of the global object document having the string representation "[object ' +
1102
+ 'Document]".',
1103
+ check:
1104
+ function ()
1119
1105
  {
1120
- description:
1121
- 'The property that only double quotation marks and no other characters in the ' +
1122
- 'argument of String.prototype.fontcolor are escaped into HTML entities.',
1123
- check:
1124
- function ()
1125
- {
1126
- var available = ~''.fontcolor('"<>').indexOf('&quot;<>');
1127
- return available;
1128
- },
1129
- includes: ['ESC_HTML_QUOT'],
1130
- excludes: ['ESC_HTML_ALL'],
1106
+ var available = typeof document === 'object' && document + '' === '[object Document]';
1107
+ return available;
1131
1108
  },
1132
- ESC_REGEXP_LF:
1133
- {
1134
- description:
1135
- 'Having regular expressions created with the RegExp constructor use escape sequences ' +
1136
- 'starting with a backslash to format line feed characters ("\\n") in their string ' +
1137
- 'representation.',
1138
- check:
1139
- function ()
1109
+ includes: ['ANY_DOCUMENT'],
1110
+ excludes: ['HTMLDOCUMENT'],
1111
+ attributes: { 'web-worker': 'web-worker-restriction' },
1112
+ },
1113
+ DOMWINDOW:
1114
+ {
1115
+ description:
1116
+ 'Existence of the global object self having the string representation "[object ' +
1117
+ 'DOMWindow]".',
1118
+ check:
1119
+ checkSelfFeature.bind
1120
+ (
1121
+ function (str)
1140
1122
  {
1141
- var available = (RegExp('\n') + '')[1] === '\\';
1123
+ var available = str === '[object DOMWindow]';
1142
1124
  return available;
1143
- },
1144
- },
1145
- ESC_REGEXP_SLASH:
1125
+ }
1126
+ ),
1127
+ includes: ['ANY_WINDOW'],
1128
+ excludes: ['WINDOW'],
1129
+ attributes: { 'web-worker': 'web-worker-restriction' },
1130
+ },
1131
+ ESC_HTML_ALL:
1132
+ {
1133
+ description:
1134
+ 'The property that double quotation mark, less than and greater than characters in the ' +
1135
+ 'argument of String.prototype.fontcolor are escaped into their respective HTML entities.',
1136
+ check:
1137
+ function ()
1146
1138
  {
1147
- description:
1148
- 'Having regular expressions created with the RegExp constructor use escape sequences ' +
1149
- 'starting with a backslash to format slashes ("/") in their string representation.',
1150
- check:
1151
- function ()
1152
- {
1153
- var available = (RegExp('/') + '')[1] === '\\';
1154
- return available;
1155
- },
1139
+ var available = ~''.fontcolor('"<>').indexOf('&quot;&lt;&gt;');
1140
+ return available;
1156
1141
  },
1157
- EXTERNAL:
1142
+ includes: ['ESC_HTML_QUOT'],
1143
+ excludes: ['ESC_HTML_QUOT_ONLY'],
1144
+ },
1145
+ ESC_HTML_QUOT:
1146
+ {
1147
+ description:
1148
+ 'The property that double quotation marks in the argument of String.prototype.fontcolor ' +
1149
+ 'are escaped as "&quot;".',
1150
+ check:
1151
+ function ()
1158
1152
  {
1159
- description:
1160
- 'Existence of the global object sidebar having the string representation "[object ' +
1161
- 'External]".',
1162
- check:
1163
- function ()
1164
- {
1165
- var available = typeof sidebar === 'object' && sidebar + '' === '[object External]';
1166
- return available;
1167
- },
1168
- attributes: { 'web-worker': 'web-worker-restriction' },
1153
+ var available = ~''.fontcolor('"').indexOf('&quot;');
1154
+ return available;
1169
1155
  },
1170
- FF_SRC:
1171
- {
1172
- description:
1173
- 'A string representation of native functions typical for Firefox and Safari.\n' +
1174
- 'Remarkable traits are the lack of line feed characters at the beginning and at the ' +
1175
- 'end of the string and the presence of a line feed followed by four whitespaces ' +
1176
- '("\\n ") before the "[native code]" sequence.',
1177
- includes: ['NO_IE_SRC', 'NO_V8_SRC'],
1178
- excludes: ['NO_FF_SRC'],
1179
- },
1180
- FILL:
1181
- {
1182
- description: 'Existence of the native function Array.prototype.fill.',
1183
- check:
1184
- function ()
1185
- {
1186
- var available = Array.prototype.fill;
1187
- return available;
1188
- },
1189
- },
1190
- FLAT:
1156
+ },
1157
+ ESC_HTML_QUOT_ONLY:
1158
+ {
1159
+ description:
1160
+ 'The property that only double quotation marks and no other characters in the argument ' +
1161
+ 'of String.prototype.fontcolor are escaped into HTML entities.',
1162
+ check:
1163
+ function ()
1191
1164
  {
1192
- description: 'Existence of the native function Array.prototype.flat.',
1193
- check:
1194
- function ()
1195
- {
1196
- var available = Array.prototype.flat;
1197
- return available;
1198
- },
1165
+ var available = ~''.fontcolor('"<>').indexOf('&quot;<>');
1166
+ return available;
1199
1167
  },
1200
- FROM_CODE_POINT:
1168
+ includes: ['ESC_HTML_QUOT'],
1169
+ excludes: ['ESC_HTML_ALL'],
1170
+ },
1171
+ ESC_REGEXP_LF:
1172
+ {
1173
+ description:
1174
+ 'Having regular expressions created with the RegExp constructor use escape sequences ' +
1175
+ 'starting with a backslash to format line feed characters ("\\n") in their string ' +
1176
+ 'representation.',
1177
+ check:
1178
+ function ()
1201
1179
  {
1202
- description: 'Existence of the function String.fromCodePoint.',
1203
- check:
1204
- function ()
1205
- {
1206
- var available = String.fromCodePoint;
1207
- return available;
1208
- },
1180
+ var available = (RegExp('\n') + '')[1] === '\\';
1181
+ return available;
1209
1182
  },
1210
- FUNCTION_19_LF:
1183
+ },
1184
+ ESC_REGEXP_SLASH:
1185
+ {
1186
+ description:
1187
+ 'Having regular expressions created with the RegExp constructor use escape sequences ' +
1188
+ 'starting with a backslash to format slashes ("/") in their string representation.',
1189
+ check:
1190
+ function ()
1211
1191
  {
1212
- description:
1213
- 'A string representation of dynamically generated functions where the character at ' +
1214
- 'index 19 is a line feed ("\\n").',
1215
- check:
1216
- function ()
1217
- {
1218
- var available = (Function() + '')[19] === '\n';
1219
- return available;
1220
- },
1192
+ var available = (RegExp('/') + '')[1] === '\\';
1193
+ return available;
1221
1194
  },
1222
- FUNCTION_22_LF:
1195
+ },
1196
+ FF_SRC:
1197
+ {
1198
+ description:
1199
+ 'A string representation of native functions typical for Firefox and Safari.\n' +
1200
+ 'Remarkable traits are the lack of line feed characters at the beginning and at the end ' +
1201
+ 'of the string and the presence of a line feed followed by four whitespaces ("\\n ") ' +
1202
+ 'before the "[native code]" sequence.',
1203
+ includes: ['NO_IE_SRC', 'NO_V8_SRC'],
1204
+ excludes: ['NO_FF_SRC'],
1205
+ },
1206
+ FILL:
1207
+ {
1208
+ description: 'Existence of the native function Array.prototype.fill.',
1209
+ check:
1210
+ function ()
1223
1211
  {
1224
- description:
1225
- 'A string representation of dynamically generated functions where the character at ' +
1226
- 'index 22 is a line feed ("\\n").',
1227
- check:
1228
- function ()
1229
- {
1230
- var available = (Function() + '')[22] === '\n';
1231
- return available;
1232
- },
1212
+ var available = Array.prototype.fill;
1213
+ return available;
1233
1214
  },
1234
- GENERIC_ARRAY_TO_STRING:
1215
+ },
1216
+ FLAT:
1217
+ {
1218
+ description: 'Existence of the native function Array.prototype.flat.',
1219
+ check:
1220
+ function ()
1235
1221
  {
1236
- description: 'Ability to call Array.prototype.toString with a non-array binding.',
1237
- check:
1238
- function ()
1239
- {
1240
- try
1241
- {
1242
- Array.prototype.toString.call({ });
1243
- return true;
1244
- }
1245
- catch (error)
1246
- { }
1247
- },
1222
+ var available = Array.prototype.flat;
1223
+ return available;
1248
1224
  },
1249
- GLOBAL_UNDEFINED:
1225
+ },
1226
+ FROM_CODE_POINT:
1227
+ {
1228
+ description: 'Existence of the function String.fromCodePoint.',
1229
+ check:
1230
+ function ()
1250
1231
  {
1251
- description:
1252
- 'Having the global function toString return the string "[object Undefined]" when ' +
1253
- 'invoked without a binding.',
1254
- check:
1255
- function ()
1256
- {
1257
- var getToString = Function('return toString');
1258
- var available = getToString()() === '[object Undefined]';
1259
- return available;
1260
- },
1261
- includes: ['OBJECT_UNDEFINED'],
1262
- },
1263
- GMT:
1264
- {
1265
- description:
1266
- 'Presence of the text "GMT" after the first 25 characters in the string returned by ' +
1267
- 'Date().\n' +
1268
- 'The string representation of dates is implementation dependent, but most engines ' +
1269
- 'use a similar format, making this feature available in all supported engines except ' +
1270
- 'Internet Explorer 9 and 10.',
1271
- check:
1272
- function ()
1273
- {
1274
- var available = /^.{25}GMT/.test(Date());
1275
- return available;
1276
- },
1232
+ var available = String.fromCodePoint;
1233
+ return available;
1277
1234
  },
1278
- HISTORY:
1235
+ },
1236
+ FUNCTION_19_LF:
1237
+ {
1238
+ description:
1239
+ 'A string representation of dynamically generated functions where the character at index ' +
1240
+ '19 is a line feed ("\\n").',
1241
+ check:
1242
+ function ()
1279
1243
  {
1280
- description:
1281
- 'Existence of the global object history having the string representation "[object ' +
1282
- 'History]".',
1283
- check:
1284
- function ()
1285
- {
1286
- var available = typeof history === 'object' && history + '' === '[object History]';
1287
- return available;
1288
- },
1289
- attributes: { 'web-worker': 'web-worker-restriction' },
1244
+ var available = (Function() + '')[19] === '\n';
1245
+ return available;
1290
1246
  },
1291
- HTMLAUDIOELEMENT:
1247
+ },
1248
+ FUNCTION_22_LF:
1249
+ {
1250
+ description:
1251
+ 'A string representation of dynamically generated functions where the character at index ' +
1252
+ '22 is a line feed ("\\n").',
1253
+ check:
1254
+ function ()
1292
1255
  {
1293
- description:
1294
- 'Existence of the global object Audio whose string representation starts with ' +
1295
- '"function HTMLAudioElement".',
1296
- check:
1297
- function ()
1298
- {
1299
- var available =
1300
- typeof Audio !== 'undefined' && /^function HTMLAudioElement/.test(Audio);
1301
- return available;
1302
- },
1303
- includes: ['NO_IE_SRC'],
1304
- attributes: { 'web-worker': 'web-worker-restriction' },
1256
+ var available = (Function() + '')[22] === '\n';
1257
+ return available;
1305
1258
  },
1306
- HTMLDOCUMENT:
1259
+ },
1260
+ GENERIC_ARRAY_TO_STRING:
1261
+ {
1262
+ description: 'Ability to call Array.prototype.toString with a non-array binding.',
1263
+ check:
1264
+ function ()
1307
1265
  {
1308
- description:
1309
- 'Existence of the global object document having the string representation "[object ' +
1310
- 'HTMLDocument]".',
1311
- check:
1312
- function ()
1313
- {
1314
- var available =
1315
- typeof document === 'object' && document + '' === '[object HTMLDocument]';
1316
- return available;
1317
- },
1318
- includes: ['ANY_DOCUMENT'],
1319
- excludes: ['DOCUMENT'],
1320
- attributes: { 'web-worker': 'web-worker-restriction' },
1321
- },
1322
- IE_SRC:
1323
- {
1324
- description:
1325
- 'A string representation of native functions typical for Internet Explorer.\n' +
1326
- 'Remarkable traits are the presence of a line feed character ("\\n") at the ' +
1327
- 'beginning and at the end of the string and a line feed followed by four whitespaces ' +
1328
- '("\\n ") before the "[native code]" sequence.',
1329
- includes: ['NO_FF_SRC', 'NO_V8_SRC'],
1330
- excludes: ['NO_IE_SRC'],
1331
- },
1332
- INCR_CHAR:
1333
- {
1334
- description:
1335
- 'The ability to use unary increment operators with string characters, like in ( ' +
1336
- '++"some string"[0] ): this will result in a TypeError in strict mode in ECMAScript ' +
1337
- 'compliant engines.',
1338
- check:
1339
- function ()
1266
+ try
1340
1267
  {
1268
+ Array.prototype.toString.call({ });
1341
1269
  return true;
1342
- },
1343
- attributes: { 'forced-strict-mode': 'char-increment-restriction' },
1344
- },
1345
- INTL:
1346
- {
1347
- description: 'Existence of the global object Intl.',
1348
- check:
1349
- function ()
1350
- {
1351
- var available = typeof Intl === 'object';
1352
- return available;
1353
- },
1354
- },
1355
- LOCALE_INFINITY:
1356
- {
1357
- description: 'Language sensitive string representation of Infinity as "∞".',
1358
- check:
1359
- function ()
1360
- {
1361
- var available = Infinity.toLocaleString() === '∞';
1362
- return available;
1363
- },
1364
- },
1365
- LOCALE_NUMERALS:
1366
- {
1367
- description:
1368
- 'Features shared by all engines capable of localized number formatting, including ' +
1369
- 'output of Arabic digits, the Arabic decimal separator "٫", the letters in the first ' +
1370
- 'word of the Arabic string representation of NaN ("ليس"), Persian digits and the ' +
1371
- 'Persian digit group separator "٬".',
1372
- check:
1373
- function ()
1374
- {
1375
- var available =
1376
- Number.prototype.toLocaleString &&
1377
- checkLocaleNumeral('ar', NaN, /^ليس/) &&
1378
- checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
1379
- checkLocaleNumeral('fa', 1234567890, /^۱٬۲۳۴٬۵۶۷٬۸۹۰/);
1380
- return available;
1381
- },
1382
- },
1383
- LOCALE_NUMERALS_EXT:
1384
- {
1385
- description:
1386
- 'Extended localized number formatting.\n' +
1387
- 'This includes all features of LOCALE_NUMERALS plus the output of the first three ' +
1388
- 'letters in the second word of the Arabic string representation of NaN ("رقم"), ' +
1389
- 'Bengali digits, the letters in the Russian string representation of NaN ("не\xa0' +
1390
- 'число") and the letters in the Persian string representation of NaN ("ناعدد").',
1391
- check:
1392
- function ()
1393
- {
1394
- var available =
1395
- Number.prototype.toLocaleString &&
1396
- checkLocaleNumeral('ar', NaN, /^ليس.رقم/) &&
1397
- checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
1398
- checkLocaleNumeral('bn', 1234567890, /^১,২৩,৪৫,৬৭,৮৯০/) &&
1399
- checkLocaleNumeral('fa', 1234567890, /^۱٬۲۳۴٬۵۶۷٬۸۹۰/) &&
1400
- checkLocaleNumeral('fa', NaN, /^ناعد/) &&
1401
- checkLocaleNumeral('ru', NaN, /^не.число/);
1402
- return available;
1403
- },
1404
- includes: ['LOCALE_NUMERALS'],
1405
- },
1406
- LOCATION:
1407
- {
1408
- description:
1409
- 'Existence of the global object location with the property that ' +
1410
- 'Object.prototype.toString.call(location) evaluates to a string that starts with ' +
1411
- '"[object " and ends with "Location]".',
1412
- check:
1413
- function ()
1414
- {
1415
- var available =
1416
- typeof location === 'object' &&
1417
- /^\[object .*Location]$/.test(Object.prototype.toString.call(location));
1418
- return available;
1419
- },
1420
- },
1421
- NAME:
1422
- {
1423
- description: 'Existence of the name property for functions.',
1424
- check:
1425
- function ()
1426
- {
1427
- var available = 'name' in Function();
1428
- return available;
1429
- },
1430
- },
1431
- NODECONSTRUCTOR:
1432
- {
1433
- description:
1434
- 'Existence of the global object Node having the string representation "[object ' +
1435
- 'NodeConstructor]".',
1436
- check:
1437
- function ()
1438
- {
1439
- var available =
1440
- typeof Node !== 'undefined' && Node + '' === '[object NodeConstructor]';
1441
- return available;
1442
- },
1443
- attributes: { 'web-worker': 'web-worker-restriction' },
1444
- },
1445
- NO_FF_SRC:
1446
- {
1447
- description:
1448
- 'A string representation of native functions typical for V8 or for Internet Explorer ' +
1449
- 'but not for Firefox and Safari.',
1450
- check:
1451
- function ()
1452
- {
1453
- var available = /^(\n?)function Object\(\) \{\1 +\[native code]\s\}/.test(Object);
1454
- return available;
1455
- },
1456
- excludes: ['FF_SRC'],
1457
- },
1458
- NO_IE_SRC:
1459
- {
1460
- description:
1461
- 'A string representation of native functions typical for most engines with the ' +
1462
- 'notable exception of Internet Explorer.\n' +
1463
- 'A remarkable trait of this feature is the lack of line feed characters at the ' +
1464
- 'beginning and at the end of the string.',
1465
- check:
1466
- function ()
1467
- {
1468
- var available = /^function Object\(\) \{(\n )? \[native code]\s\}/.test(Object);
1469
- return available;
1470
- },
1471
- excludes: ['IE_SRC'],
1472
- },
1473
- NO_OLD_SAFARI_ARRAY_ITERATOR:
1474
- {
1475
- description:
1476
- 'The property that the string representation of Array.prototype.entries() evaluates ' +
1477
- 'to "[object Array Iterator]" and that Array.prototype.entries().constructor is the ' +
1478
- 'global function Object.',
1479
- check:
1480
- function ()
1481
- {
1482
- if (Array.prototype.entries)
1483
- {
1484
- var arrayIterator = [].entries();
1485
- var available =
1486
- arrayIterator + '' === '[object Array Iterator]' &&
1487
- arrayIterator.constructor === Object;
1488
- return available;
1489
- }
1490
- },
1491
- includes: ['ARRAY_ITERATOR'],
1492
- },
1493
- NO_V8_SRC:
1494
- {
1495
- description:
1496
- 'A string representation of native functions typical for Firefox, Internet Explorer ' +
1497
- 'and Safari.\n' +
1498
- 'A most remarkable trait of this feature is the presence of a line feed followed by ' +
1499
- 'four whitespaces ("\\n ") before the "[native code]" sequence.',
1500
- check:
1501
- function ()
1502
- {
1503
- var available = /^\n?function Object\(\) \{\n \[native code]\s\}/.test(Object);
1504
- return available;
1505
- },
1506
- excludes: ['V8_SRC'],
1507
- },
1508
- OBJECT_UNDEFINED:
1509
- {
1510
- description:
1511
- 'Having the function Object.prototype.toString return the string "[object ' +
1512
- 'Undefined]" when invoked without a binding.',
1513
- check:
1514
- function ()
1515
- {
1516
- var toString = Object.prototype.toString;
1517
- var available = toString() === '[object Undefined]';
1518
- return available;
1519
- },
1520
- includes: ['UNDEFINED'],
1521
- },
1522
- PLAIN_INTL:
1523
- {
1524
- description:
1525
- 'Existence of the global object Intl having the string representation "[object ' +
1526
- 'Object]"',
1527
- check:
1528
- function ()
1529
- {
1530
- var available = typeof Intl === 'object' && Intl + '' === '[object Object]';
1531
- return available;
1532
- },
1533
- includes: ['INTL'],
1534
- },
1535
- REGEXP_STRING_ITERATOR:
1536
- {
1537
- description:
1538
- 'The property that the string representation of String.prototype.matchAll() ' +
1539
- 'evaluates to "[object RegExp String Iterator]".',
1540
- check:
1541
- function ()
1542
- {
1543
- var available =
1544
- String.prototype.matchAll &&
1545
- ''.matchAll() + '' === '[object RegExp String Iterator]';
1546
- return available;
1547
- },
1548
- },
1549
- SELF: { aliasFor: 'ANY_WINDOW' },
1550
- SELF_OBJ:
1551
- {
1552
- description:
1553
- 'Existence of the global object self whose string representation starts with ' +
1554
- '"[object ".',
1555
- check:
1556
- checkSelfFeature.bind
1557
- (
1558
- function (str)
1559
- {
1560
- var available = /^\[object /.test(str);
1561
- return available;
1562
- }
1563
- ),
1564
- attributes: { 'web-worker': 'safari-bug-21820506' },
1565
- },
1566
- SHORT_LOCALES:
1567
- {
1568
- description:
1569
- 'Support for the two-letter locale name "ar" to format decimal numbers as Arabic ' +
1570
- 'numerals.',
1571
- check:
1572
- function ()
1573
- {
1574
- var NUMBER = 9876430.125;
1575
-
1576
- var localizedNumeral = NUMBER.toLocaleString('ar');
1577
- var available =
1578
- localizedNumeral === NUMBER.toLocaleString('ar-td') &&
1579
- localizedNumeral !== NUMBER.toLocaleString('en');
1580
- return available;
1581
- },
1582
- includes: ['LOCALE_NUMERALS'],
1583
- },
1584
- STATUS:
1585
- {
1586
- description: 'Existence of the global string status.',
1587
- check:
1588
- function ()
1589
- {
1590
- var available = typeof status === 'string';
1591
- return available;
1592
- },
1593
- attributes: { 'web-worker': 'web-worker-restriction' },
1594
- },
1595
- UNDEFINED:
1596
- {
1597
- description:
1598
- 'The property that Object.prototype.toString.call() evaluates to "[object ' +
1599
- 'Undefined]".\n' +
1600
- 'This behavior is specified by ECMAScript, and is enforced by all engines except ' +
1601
- 'Android Browser versions prior to 4.1.2, where this feature is not available.',
1602
- check:
1603
- function ()
1604
- {
1605
- var available = Object.prototype.toString.call() === '[object Undefined]';
1606
- return available;
1607
- },
1608
- },
1609
- V8_SRC:
1610
- {
1611
- description:
1612
- 'A string representation of native functions typical for the V8 engine.\n' +
1613
- 'Remarkable traits are the lack of line feed characters at the beginning and at the ' +
1614
- 'end of the string and the presence of a single whitespace before the "[native ' +
1615
- 'code]" sequence.',
1616
- includes: ['NO_FF_SRC', 'NO_IE_SRC'],
1617
- excludes: ['NO_V8_SRC'],
1618
- },
1619
- WINDOW:
1620
- {
1621
- description:
1622
- 'Existence of the global object self having the string representation "[object ' +
1623
- 'Window]".',
1624
- check:
1625
- checkSelfFeature.bind
1626
- (
1627
- function (str)
1628
- {
1629
- var available = str === '[object Window]';
1630
- return available;
1631
- }
1632
- ),
1633
- includes: ['ANY_WINDOW'],
1634
- excludes: ['DOMWINDOW'],
1635
- attributes: { 'web-worker': 'web-worker-restriction' },
1636
- },
1637
-
1638
- DEFAULT:
1639
- {
1640
- description:
1641
- 'Minimum feature level, compatible with all supported engines in all environments.',
1642
- },
1643
- BROWSER:
1644
- {
1645
- description:
1646
- 'Features available in all browsers.\n' +
1647
- 'No support for Node.js.',
1648
- includes: ['ANY_DOCUMENT', 'ANY_WINDOW', 'HISTORY', 'INCR_CHAR', 'STATUS'],
1649
- attributes:
1650
- {
1651
- 'char-increment-restriction': null,
1652
- 'safari-bug-21820506': null,
1653
- 'web-worker-restriction': null,
1654
- },
1655
- },
1656
- COMPACT:
1657
- {
1658
- description:
1659
- 'All new browsers\' features.\n' +
1660
- 'No support for Node.js and older browsers like Internet Explorer, Safari 9 or ' +
1661
- 'Android Browser.',
1662
- includes:
1663
- [
1664
- 'ARROW',
1665
- 'ATOB',
1666
- 'BARPROP',
1667
- 'ESC_HTML_QUOT_ONLY',
1668
- 'ESC_REGEXP_LF',
1669
- 'ESC_REGEXP_SLASH',
1670
- 'FILL',
1671
- 'FLAT',
1672
- 'FROM_CODE_POINT',
1673
- 'GENERIC_ARRAY_TO_STRING',
1674
- 'GLOBAL_UNDEFINED',
1675
- 'GMT',
1676
- 'HISTORY',
1677
- 'HTMLDOCUMENT',
1678
- 'INCR_CHAR',
1679
- 'INTL',
1680
- 'LOCALE_INFINITY',
1681
- 'LOCALE_NUMERALS_EXT',
1682
- 'LOCATION',
1683
- 'NAME',
1684
- 'NO_IE_SRC',
1685
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1686
- 'REGEXP_STRING_ITERATOR',
1687
- 'STATUS',
1688
- 'WINDOW',
1689
- ],
1690
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1691
- },
1692
- ANDRO_4_0:
1693
- {
1694
- engine: 'Android Browser 4.0',
1695
- includes:
1696
- [
1697
- 'ATOB',
1698
- 'CONSOLE',
1699
- 'DOMWINDOW',
1700
- 'ESC_HTML_ALL',
1701
- 'FUNCTION_22_LF',
1702
- 'GMT',
1703
- 'HISTORY',
1704
- 'HTMLDOCUMENT',
1705
- 'INCR_CHAR',
1706
- 'LOCATION',
1707
- 'NAME',
1708
- 'STATUS',
1709
- 'V8_SRC',
1710
- ],
1711
- },
1712
- ANDRO_4_1:
1713
- {
1714
- engine: 'Android Browser 4.1 to 4.3',
1715
- includes:
1716
- [
1717
- 'ATOB',
1718
- 'CONSOLE',
1719
- 'DOMWINDOW',
1720
- 'ESC_HTML_ALL',
1721
- 'FUNCTION_22_LF',
1722
- 'GENERIC_ARRAY_TO_STRING',
1723
- 'GMT',
1724
- 'HISTORY',
1725
- 'HTMLDOCUMENT',
1726
- 'INCR_CHAR',
1727
- 'LOCATION',
1728
- 'NAME',
1729
- 'OBJECT_UNDEFINED',
1730
- 'STATUS',
1731
- 'V8_SRC',
1732
- ],
1733
- },
1734
- ANDRO_4_4:
1735
- {
1736
- engine: 'Android Browser 4.4',
1737
- includes:
1738
- [
1739
- 'ATOB',
1740
- 'BARPROP',
1741
- 'CONSOLE',
1742
- 'ESC_HTML_ALL',
1743
- 'FUNCTION_22_LF',
1744
- 'GENERIC_ARRAY_TO_STRING',
1745
- 'GMT',
1746
- 'HISTORY',
1747
- 'HTMLAUDIOELEMENT',
1748
- 'HTMLDOCUMENT',
1749
- 'INCR_CHAR',
1750
- 'LOCALE_INFINITY',
1751
- 'LOCALE_NUMERALS_EXT',
1752
- 'LOCATION',
1753
- 'NAME',
1754
- 'OBJECT_UNDEFINED',
1755
- 'PLAIN_INTL',
1756
- 'SHORT_LOCALES',
1757
- 'STATUS',
1758
- 'V8_SRC',
1759
- 'WINDOW',
1760
- ],
1761
- attributes: { 'no-console-in-web-worker': null, 'web-worker-restriction': null },
1270
+ }
1271
+ catch (error)
1272
+ { }
1762
1273
  },
1763
- CHROME_PREV:
1274
+ },
1275
+ GLOBAL_UNDEFINED:
1276
+ {
1277
+ description:
1278
+ 'Having the global function toString return the string "[object Undefined]" when invoked ' +
1279
+ 'without a binding.',
1280
+ check:
1281
+ function ()
1764
1282
  {
1765
- engine: 'the previous to current versions of Chrome and Edge',
1766
- aliasFor: 'CHROME_86',
1283
+ var getToString = Function('return toString');
1284
+ var available = getToString()() === '[object Undefined]';
1285
+ return available;
1767
1286
  },
1768
- CHROME:
1287
+ includes: ['OBJECT_UNDEFINED'],
1288
+ },
1289
+ GMT:
1290
+ {
1291
+ description:
1292
+ 'Presence of the text "GMT" after the first 25 characters in the string returned by ' +
1293
+ 'Date().\n' +
1294
+ 'The string representation of dates is implementation dependent, but most engines use a ' +
1295
+ 'similar format, making this feature available in all supported engines except Internet ' +
1296
+ 'Explorer 9 and 10.',
1297
+ check:
1298
+ function ()
1769
1299
  {
1770
- engine: 'the current stable versions of Chrome, Edge and Opera',
1771
- aliasFor: 'CHROME_86',
1300
+ var available = /^.{25}GMT/.test(Date());
1301
+ return available;
1772
1302
  },
1773
- CHROME_86:
1303
+ },
1304
+ HISTORY:
1305
+ {
1306
+ description:
1307
+ 'Existence of the global object history having the string representation "[object ' +
1308
+ 'History]".',
1309
+ check:
1310
+ function ()
1774
1311
  {
1775
- engine: 'Chrome 86, Edge 86 and Opera 72 or later',
1776
- includes:
1777
- [
1778
- 'ARROW',
1779
- 'ATOB',
1780
- 'BARPROP',
1781
- 'ESC_HTML_QUOT_ONLY',
1782
- 'ESC_REGEXP_LF',
1783
- 'ESC_REGEXP_SLASH',
1784
- 'FILL',
1785
- 'FLAT',
1786
- 'FROM_CODE_POINT',
1787
- 'FUNCTION_19_LF',
1788
- 'GENERIC_ARRAY_TO_STRING',
1789
- 'GLOBAL_UNDEFINED',
1790
- 'GMT',
1791
- 'HISTORY',
1792
- 'HTMLDOCUMENT',
1793
- 'INCR_CHAR',
1794
- 'INTL',
1795
- 'LOCALE_INFINITY',
1796
- 'LOCALE_NUMERALS_EXT',
1797
- 'LOCATION',
1798
- 'NAME',
1799
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1800
- 'REGEXP_STRING_ITERATOR',
1801
- 'STATUS',
1802
- 'V8_SRC',
1803
- 'WINDOW',
1804
- ],
1805
- attributes:
1806
- {
1807
- 'char-increment-restriction': null,
1808
- 'unstable': null,
1809
- 'web-worker-restriction': null,
1810
- },
1312
+ var available = typeof history === 'object' && history + '' === '[object History]';
1313
+ return available;
1811
1314
  },
1812
- FF_ESR:
1315
+ attributes: { 'web-worker': 'web-worker-restriction' },
1316
+ },
1317
+ HTMLAUDIOELEMENT:
1318
+ {
1319
+ description:
1320
+ 'Existence of the global object Audio whose string representation starts with ' +
1321
+ '"function HTMLAudioElement".',
1322
+ check:
1323
+ function ()
1813
1324
  {
1814
- engine: 'the current version of Firefox ESR',
1815
- aliasFor: 'FF_78',
1325
+ var available =
1326
+ typeof Audio !== 'undefined' && /^function HTMLAudioElement/.test(Audio);
1327
+ return available;
1816
1328
  },
1817
- FF_78:
1329
+ includes: ['NO_IE_SRC'],
1330
+ attributes: { 'web-worker': 'web-worker-restriction' },
1331
+ },
1332
+ HTMLDOCUMENT:
1333
+ {
1334
+ description:
1335
+ 'Existence of the global object document having the string representation "[object ' +
1336
+ 'HTMLDocument]".',
1337
+ check:
1338
+ function ()
1818
1339
  {
1819
- engine: 'Firefox 78 to 82',
1820
- includes:
1821
- [
1822
- 'ARROW',
1823
- 'ATOB',
1824
- 'BARPROP',
1825
- 'ESC_HTML_QUOT_ONLY',
1826
- 'ESC_REGEXP_LF',
1827
- 'ESC_REGEXP_SLASH',
1828
- 'EXTERNAL',
1829
- 'FF_SRC',
1830
- 'FILL',
1831
- 'FLAT',
1832
- 'FROM_CODE_POINT',
1833
- 'FUNCTION_19_LF',
1834
- 'GENERIC_ARRAY_TO_STRING',
1835
- 'GLOBAL_UNDEFINED',
1836
- 'GMT',
1837
- 'HISTORY',
1838
- 'HTMLDOCUMENT',
1839
- 'INCR_CHAR',
1840
- 'LOCALE_INFINITY',
1841
- 'LOCALE_NUMERALS_EXT',
1842
- 'LOCATION',
1843
- 'NAME',
1844
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1845
- 'PLAIN_INTL',
1846
- 'REGEXP_STRING_ITERATOR',
1847
- 'SHORT_LOCALES',
1848
- 'STATUS',
1849
- 'WINDOW',
1850
- ],
1851
- attributes:
1852
- {
1853
- 'char-increment-restriction': null,
1854
- 'unstable': null,
1855
- 'web-worker-restriction': null,
1856
- },
1340
+ var available =
1341
+ typeof document === 'object' && document + '' === '[object HTMLDocument]';
1342
+ return available;
1857
1343
  },
1858
- FF_PREV:
1344
+ includes: ['ANY_DOCUMENT'],
1345
+ excludes: ['DOCUMENT'],
1346
+ attributes: { 'web-worker': 'web-worker-restriction' },
1347
+ },
1348
+ IE_SRC:
1349
+ {
1350
+ description:
1351
+ 'A string representation of native functions typical for Internet Explorer.\n' +
1352
+ 'Remarkable traits are the presence of a line feed character ("\\n") at the beginning ' +
1353
+ 'and at the end of the string and a line feed followed by four whitespaces ("\\n ") ' +
1354
+ 'before the "[native code]" sequence.',
1355
+ includes: ['NO_FF_SRC', 'NO_V8_SRC'],
1356
+ excludes: ['NO_IE_SRC'],
1357
+ },
1358
+ INCR_CHAR:
1359
+ {
1360
+ description:
1361
+ 'The ability to use unary increment operators with string characters, like in ( ++"some ' +
1362
+ 'string"[0] ): this will result in a TypeError in strict mode in ECMAScript compliant ' +
1363
+ 'engines.',
1364
+ check:
1365
+ function ()
1859
1366
  {
1860
- engine: 'the previous to current version of Firefox',
1861
- aliasFor: 'FF_83',
1367
+ return true;
1862
1368
  },
1863
- FF_83:
1369
+ attributes: { 'forced-strict-mode': 'char-increment-restriction' },
1370
+ },
1371
+ INTL:
1372
+ {
1373
+ description: 'Existence of the global object Intl.',
1374
+ check:
1375
+ function ()
1864
1376
  {
1865
- engine: 'Firefox 83 to 89',
1866
- includes:
1867
- [
1868
- 'ARROW',
1869
- 'ATOB',
1870
- 'BARPROP',
1871
- 'ESC_HTML_QUOT_ONLY',
1872
- 'ESC_REGEXP_LF',
1873
- 'ESC_REGEXP_SLASH',
1874
- 'EXTERNAL',
1875
- 'FF_SRC',
1876
- 'FILL',
1877
- 'FLAT',
1878
- 'FROM_CODE_POINT',
1879
- 'FUNCTION_19_LF',
1880
- 'GENERIC_ARRAY_TO_STRING',
1881
- 'GLOBAL_UNDEFINED',
1882
- 'GMT',
1883
- 'HISTORY',
1884
- 'HTMLDOCUMENT',
1885
- 'INCR_CHAR',
1886
- 'INTL',
1887
- 'LOCALE_INFINITY',
1888
- 'LOCALE_NUMERALS_EXT',
1889
- 'LOCATION',
1890
- 'NAME',
1891
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1892
- 'REGEXP_STRING_ITERATOR',
1893
- 'SHORT_LOCALES',
1894
- 'STATUS',
1895
- 'WINDOW',
1896
- ],
1897
- attributes:
1898
- {
1899
- 'char-increment-restriction': null,
1900
- 'unstable': null,
1901
- 'web-worker-restriction': null,
1902
- },
1377
+ var available = typeof Intl === 'object';
1378
+ return available;
1903
1379
  },
1904
- FF:
1380
+ },
1381
+ LOCALE_INFINITY:
1382
+ {
1383
+ description: 'Language sensitive string representation of Infinity as "∞".',
1384
+ check:
1385
+ function ()
1905
1386
  {
1906
- engine: 'the current stable version of Firefox',
1907
- aliasFor: 'FF_90',
1387
+ var available = Infinity.toLocaleString() === '∞';
1388
+ return available;
1908
1389
  },
1909
- FF_90:
1390
+ },
1391
+ LOCALE_NUMERALS:
1392
+ {
1393
+ description:
1394
+ 'Features shared by all engines capable of localized number formatting, including output ' +
1395
+ 'of Arabic digits, the Arabic decimal separator "٫", the letters in the first word of ' +
1396
+ 'the Arabic string representation of NaN ("ليس"), Persian digits and the Persian digit ' +
1397
+ 'group separator "٬".',
1398
+ check:
1399
+ function ()
1910
1400
  {
1911
- engine: 'Firefox 90 or later',
1912
- includes:
1913
- [
1914
- 'ARROW',
1915
- 'AT',
1916
- 'ATOB',
1917
- 'BARPROP',
1918
- 'ESC_HTML_QUOT_ONLY',
1919
- 'ESC_REGEXP_LF',
1920
- 'ESC_REGEXP_SLASH',
1921
- 'EXTERNAL',
1922
- 'FF_SRC',
1923
- 'FILL',
1924
- 'FLAT',
1925
- 'FROM_CODE_POINT',
1926
- 'FUNCTION_19_LF',
1927
- 'GENERIC_ARRAY_TO_STRING',
1928
- 'GLOBAL_UNDEFINED',
1929
- 'GMT',
1930
- 'HISTORY',
1931
- 'HTMLDOCUMENT',
1932
- 'INCR_CHAR',
1933
- 'INTL',
1934
- 'LOCALE_INFINITY',
1935
- 'LOCALE_NUMERALS_EXT',
1936
- 'LOCATION',
1937
- 'NAME',
1938
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1939
- 'REGEXP_STRING_ITERATOR',
1940
- 'SHORT_LOCALES',
1941
- 'STATUS',
1942
- 'WINDOW',
1943
- ],
1944
- attributes:
1945
- {
1946
- 'char-increment-restriction': null,
1947
- 'unstable': null,
1948
- 'web-worker-restriction': null,
1949
- },
1401
+ var available =
1402
+ Number.prototype.toLocaleString &&
1403
+ checkLocaleNumeral('ar', NaN, /^ليس/) &&
1404
+ checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
1405
+ checkLocaleNumeral('fa', 1234567890, /^۱٬۲۳۴٬۵۶۷٬۸۹۰/);
1406
+ return available;
1950
1407
  },
1951
- IE_9:
1408
+ },
1409
+ LOCALE_NUMERALS_EXT:
1410
+ {
1411
+ description:
1412
+ 'Extended localized number formatting.\n' +
1413
+ 'This includes all features of LOCALE_NUMERALS plus the output of the first three ' +
1414
+ 'letters in the second word of the Arabic string representation of NaN ("رقم"), Bengali ' +
1415
+ 'digits, the letters in the Russian string representation of NaN ("не\xa0число") and the ' +
1416
+ 'letters in the Persian string representation of NaN ("ناعدد").',
1417
+ check:
1418
+ function ()
1952
1419
  {
1953
- engine: 'Internet Explorer 9',
1954
- includes:
1955
- [
1956
- 'CAPITAL_HTML',
1957
- 'DOCUMENT',
1958
- 'ESC_REGEXP_LF',
1959
- 'ESC_REGEXP_SLASH',
1960
- 'FUNCTION_22_LF',
1961
- 'GENERIC_ARRAY_TO_STRING',
1962
- 'HISTORY',
1963
- 'IE_SRC',
1964
- 'INCR_CHAR',
1965
- 'STATUS',
1966
- 'UNDEFINED',
1967
- 'WINDOW',
1968
- ],
1969
- },
1970
- IE_10:
1420
+ var available =
1421
+ Number.prototype.toLocaleString &&
1422
+ checkLocaleNumeral('ar', NaN, /^ليس.رقم/) &&
1423
+ checkLocaleNumeral('ar-td', 234567890.1, /^٢٣٤٬?٥٦٧٬?٨٩٠٫١/) &&
1424
+ checkLocaleNumeral('bn', 1234567890, /^১,২৩,৪৫,৬৭,৮৯০/) &&
1425
+ checkLocaleNumeral('fa', 1234567890, /^۱٬۲۳۴٬۵۶۷٬۸۹۰/) &&
1426
+ checkLocaleNumeral('fa', NaN, /^ناعد/) &&
1427
+ checkLocaleNumeral('ru', NaN, /^не.число/);
1428
+ return available;
1429
+ },
1430
+ includes: ['LOCALE_NUMERALS'],
1431
+ },
1432
+ LOCATION:
1433
+ {
1434
+ description:
1435
+ 'Existence of the global object location with the property that ' +
1436
+ 'Object.prototype.toString.call(location) evaluates to a string that starts with ' +
1437
+ '"[object " and ends with "Location]".',
1438
+ check:
1439
+ function ()
1971
1440
  {
1972
- engine: 'Internet Explorer 10',
1973
- includes:
1974
- [
1975
- 'ATOB',
1976
- 'CAPITAL_HTML',
1977
- 'CONSOLE',
1978
- 'DOCUMENT',
1979
- 'ESC_REGEXP_LF',
1980
- 'ESC_REGEXP_SLASH',
1981
- 'FUNCTION_22_LF',
1982
- 'GENERIC_ARRAY_TO_STRING',
1983
- 'HISTORY',
1984
- 'IE_SRC',
1985
- 'INCR_CHAR',
1986
- 'OBJECT_UNDEFINED',
1987
- 'STATUS',
1988
- 'WINDOW',
1989
- ],
1990
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1441
+ var available =
1442
+ typeof location === 'object' &&
1443
+ /^\[object [\S\s]*Location]$/.test(Object.prototype.toString.call(location));
1444
+ return available;
1991
1445
  },
1992
- IE_11:
1446
+ },
1447
+ NAME:
1448
+ {
1449
+ description: 'Existence of the name property for functions.',
1450
+ check:
1451
+ function ()
1993
1452
  {
1994
- engine: 'Internet Explorer 11',
1995
- includes:
1996
- [
1997
- 'ATOB',
1998
- 'CAPITAL_HTML',
1999
- 'CONSOLE',
2000
- 'ESC_REGEXP_LF',
2001
- 'ESC_REGEXP_SLASH',
2002
- 'FUNCTION_22_LF',
2003
- 'GENERIC_ARRAY_TO_STRING',
2004
- 'GMT',
2005
- 'HISTORY',
2006
- 'HTMLDOCUMENT',
2007
- 'IE_SRC',
2008
- 'INCR_CHAR',
2009
- 'LOCALE_NUMERALS',
2010
- 'OBJECT_UNDEFINED',
2011
- 'PLAIN_INTL',
2012
- 'SHORT_LOCALES',
2013
- 'STATUS',
2014
- 'WINDOW',
2015
- ],
2016
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1453
+ var available = 'name' in Function();
1454
+ return available;
2017
1455
  },
2018
- IE_11_WIN_10:
1456
+ },
1457
+ NODECONSTRUCTOR:
1458
+ {
1459
+ description:
1460
+ 'Existence of the global object Node having the string representation "[object ' +
1461
+ 'NodeConstructor]".',
1462
+ check:
1463
+ function ()
2019
1464
  {
2020
- engine: 'Internet Explorer 11 on Windows 10',
2021
- includes:
2022
- [
2023
- 'ATOB',
2024
- 'CAPITAL_HTML',
2025
- 'CONSOLE',
2026
- 'ESC_REGEXP_LF',
2027
- 'ESC_REGEXP_SLASH',
2028
- 'FUNCTION_22_LF',
2029
- 'GENERIC_ARRAY_TO_STRING',
2030
- 'GMT',
2031
- 'HISTORY',
2032
- 'HTMLDOCUMENT',
2033
- 'IE_SRC',
2034
- 'INCR_CHAR',
2035
- 'LOCALE_INFINITY',
2036
- 'LOCALE_NUMERALS_EXT',
2037
- 'OBJECT_UNDEFINED',
2038
- 'PLAIN_INTL',
2039
- 'SHORT_LOCALES',
2040
- 'STATUS',
2041
- 'WINDOW',
2042
- ],
2043
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1465
+ var available = typeof Node !== 'undefined' && Node + '' === '[object NodeConstructor]';
1466
+ return available;
2044
1467
  },
2045
- NODE_0_10:
1468
+ attributes: { 'web-worker': 'web-worker-restriction' },
1469
+ },
1470
+ NO_FF_SRC:
1471
+ {
1472
+ description:
1473
+ 'A string representation of native functions typical for V8 or for Internet Explorer but ' +
1474
+ 'not for Firefox and Safari.',
1475
+ check:
1476
+ function ()
2046
1477
  {
2047
- engine: 'Node.js 0.10',
2048
- includes:
2049
- [
2050
- 'ESC_HTML_ALL',
2051
- 'FUNCTION_22_LF',
2052
- 'GENERIC_ARRAY_TO_STRING',
2053
- 'GLOBAL_UNDEFINED',
2054
- 'GMT',
2055
- 'INCR_CHAR',
2056
- 'NAME',
2057
- 'V8_SRC',
2058
- ],
1478
+ var available = /^(\n?)function Object\(\) \{\1 +\[native code]\s\}/.test(Object);
1479
+ return available;
2059
1480
  },
2060
- NODE_0_12:
1481
+ excludes: ['FF_SRC'],
1482
+ },
1483
+ NO_IE_SRC:
1484
+ {
1485
+ description:
1486
+ 'A string representation of native functions typical for most engines with the notable ' +
1487
+ 'exception of Internet Explorer.\n' +
1488
+ 'A remarkable trait of this feature is the lack of line feed characters at the beginning ' +
1489
+ 'and at the end of the string.',
1490
+ check:
1491
+ function ()
2061
1492
  {
2062
- engine: 'Node.js 0.12',
2063
- includes:
2064
- [
2065
- 'ESC_HTML_QUOT_ONLY',
2066
- 'FUNCTION_22_LF',
2067
- 'GENERIC_ARRAY_TO_STRING',
2068
- 'GLOBAL_UNDEFINED',
2069
- 'GMT',
2070
- 'INCR_CHAR',
2071
- 'LOCALE_INFINITY',
2072
- 'NAME',
2073
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2074
- 'PLAIN_INTL',
2075
- 'V8_SRC',
2076
- ],
1493
+ var available = /^function Object\(\) \{(\n )? \[native code]\s\}/.test(Object);
1494
+ return available;
2077
1495
  },
2078
- NODE_4:
1496
+ excludes: ['IE_SRC'],
1497
+ },
1498
+ NO_OLD_SAFARI_ARRAY_ITERATOR:
1499
+ {
1500
+ description:
1501
+ 'The property that the string representation of Array.prototype.entries() evaluates to ' +
1502
+ '"[object Array Iterator]" and that Array.prototype.entries().constructor is the global ' +
1503
+ 'function Object.',
1504
+ check:
1505
+ function ()
2079
1506
  {
2080
- engine: 'Node.js 4',
2081
- includes:
2082
- [
2083
- 'ARROW',
2084
- 'ESC_HTML_QUOT_ONLY',
2085
- 'ESC_REGEXP_SLASH',
2086
- 'FILL',
2087
- 'FROM_CODE_POINT',
2088
- 'FUNCTION_22_LF',
2089
- 'GENERIC_ARRAY_TO_STRING',
2090
- 'GLOBAL_UNDEFINED',
2091
- 'GMT',
2092
- 'INCR_CHAR',
2093
- 'LOCALE_INFINITY',
2094
- 'NAME',
2095
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2096
- 'PLAIN_INTL',
2097
- 'V8_SRC',
2098
- ],
1507
+ if (Array.prototype.entries)
1508
+ {
1509
+ var arrayIterator = [].entries();
1510
+ var available =
1511
+ arrayIterator + '' === '[object Array Iterator]' &&
1512
+ arrayIterator.constructor === Object;
1513
+ return available;
1514
+ }
2099
1515
  },
2100
- NODE_5:
1516
+ includes: ['ARRAY_ITERATOR'],
1517
+ },
1518
+ NO_V8_SRC:
1519
+ {
1520
+ description:
1521
+ 'A string representation of native functions typical for Firefox, Internet Explorer and ' +
1522
+ 'Safari.\n' +
1523
+ 'A most remarkable trait of this feature is the presence of a line feed followed by four ' +
1524
+ 'whitespaces ("\\n ") before the "[native code]" sequence.',
1525
+ check:
1526
+ function ()
2101
1527
  {
2102
- engine: 'Node.js 5 to 9',
2103
- includes:
2104
- [
2105
- 'ARROW',
2106
- 'ESC_HTML_QUOT_ONLY',
2107
- 'ESC_REGEXP_SLASH',
2108
- 'FILL',
2109
- 'FROM_CODE_POINT',
2110
- 'FUNCTION_22_LF',
2111
- 'GENERIC_ARRAY_TO_STRING',
2112
- 'GLOBAL_UNDEFINED',
2113
- 'GMT',
2114
- 'INCR_CHAR',
2115
- 'LOCALE_INFINITY',
2116
- 'NAME',
2117
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2118
- 'PLAIN_INTL',
2119
- 'V8_SRC',
2120
- ],
2121
- attributes: { 'char-increment-restriction': null },
1528
+ var available = /^\n?function Object\(\) \{\n \[native code]\s\}/.test(Object);
1529
+ return available;
2122
1530
  },
2123
- NODE_10:
1531
+ excludes: ['V8_SRC'],
1532
+ },
1533
+ OBJECT_L_LOCATION_CTOR:
1534
+ {
1535
+ description:
1536
+ 'Existence of the global function location.constructor whose string representation ' +
1537
+ 'starts with "[object L"',
1538
+ check:
1539
+ function ()
2124
1540
  {
2125
- engine: 'Node.js 10',
2126
- includes:
2127
- [
2128
- 'ARROW',
2129
- 'ESC_HTML_QUOT_ONLY',
2130
- 'ESC_REGEXP_SLASH',
2131
- 'FILL',
2132
- 'FROM_CODE_POINT',
2133
- 'FUNCTION_19_LF',
2134
- 'GENERIC_ARRAY_TO_STRING',
2135
- 'GLOBAL_UNDEFINED',
2136
- 'GMT',
2137
- 'INCR_CHAR',
2138
- 'LOCALE_INFINITY',
2139
- 'NAME',
2140
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2141
- 'PLAIN_INTL',
2142
- 'V8_SRC',
2143
- ],
2144
- attributes: { 'char-increment-restriction': null },
1541
+ var available =
1542
+ typeof location === 'object' && /^\[object L/.test(location.constructor);
1543
+ return available;
2145
1544
  },
2146
- NODE_11:
1545
+ attributes: { 'web-worker': 'web-worker-restriction' },
1546
+ },
1547
+ OBJECT_UNDEFINED:
1548
+ {
1549
+ description:
1550
+ 'Having the function Object.prototype.toString return the string "[object Undefined]" ' +
1551
+ 'when invoked without a binding.',
1552
+ check:
1553
+ function ()
2147
1554
  {
2148
- engine: 'Node.js 11',
2149
- includes:
2150
- [
2151
- 'ARROW',
2152
- 'ESC_HTML_QUOT_ONLY',
2153
- 'ESC_REGEXP_SLASH',
2154
- 'FILL',
2155
- 'FLAT',
2156
- 'FROM_CODE_POINT',
2157
- 'FUNCTION_19_LF',
2158
- 'GENERIC_ARRAY_TO_STRING',
2159
- 'GLOBAL_UNDEFINED',
2160
- 'GMT',
2161
- 'INCR_CHAR',
2162
- 'LOCALE_INFINITY',
2163
- 'NAME',
2164
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2165
- 'PLAIN_INTL',
2166
- 'V8_SRC',
2167
- ],
2168
- attributes: { 'char-increment-restriction': null },
1555
+ var toString = Object.prototype.toString;
1556
+ var available = toString() === '[object Undefined]';
1557
+ return available;
2169
1558
  },
2170
- NODE_12:
1559
+ includes: ['UNDEFINED'],
1560
+ },
1561
+ OBJECT_W_CTOR:
1562
+ {
1563
+ description:
1564
+ 'The property that the string representation of the global object constructor starts ' +
1565
+ 'with "[object W"',
1566
+ check:
1567
+ function ()
2171
1568
  {
2172
- engine: 'Node.js 12',
2173
- includes:
2174
- [
2175
- 'ARROW',
2176
- 'ESC_HTML_QUOT_ONLY',
2177
- 'ESC_REGEXP_LF',
2178
- 'ESC_REGEXP_SLASH',
2179
- 'FILL',
2180
- 'FLAT',
2181
- 'FROM_CODE_POINT',
2182
- 'FUNCTION_19_LF',
2183
- 'GENERIC_ARRAY_TO_STRING',
2184
- 'GLOBAL_UNDEFINED',
2185
- 'GMT',
2186
- 'INCR_CHAR',
2187
- 'LOCALE_INFINITY',
2188
- 'NAME',
2189
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2190
- 'PLAIN_INTL',
2191
- 'REGEXP_STRING_ITERATOR',
2192
- 'V8_SRC',
2193
- ],
2194
- attributes: { 'char-increment-restriction': null },
1569
+ var available = /^\[object W/.test(constructor);
1570
+ return available;
2195
1571
  },
2196
- NODE_13:
1572
+ attributes: { 'web-worker': 'old-safari-restriction' },
1573
+ },
1574
+ OLD_SAFARI_LOCATION_CTOR:
1575
+ {
1576
+ description:
1577
+ 'Existence of the global object location.constructor whose string representation starts ' +
1578
+ 'with "[object " and ends with "LocationConstructor]"',
1579
+ check:
1580
+ function ()
2197
1581
  {
2198
- engine: 'Node.js 13 and Node.js 14',
2199
- includes:
2200
- [
2201
- 'ARROW',
2202
- 'ESC_HTML_QUOT_ONLY',
2203
- 'ESC_REGEXP_LF',
2204
- 'ESC_REGEXP_SLASH',
2205
- 'FILL',
2206
- 'FLAT',
2207
- 'FROM_CODE_POINT',
2208
- 'FUNCTION_19_LF',
2209
- 'GENERIC_ARRAY_TO_STRING',
2210
- 'GLOBAL_UNDEFINED',
2211
- 'GMT',
2212
- 'INCR_CHAR',
2213
- 'LOCALE_INFINITY',
2214
- 'LOCALE_NUMERALS_EXT',
2215
- 'NAME',
2216
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2217
- 'PLAIN_INTL',
2218
- 'REGEXP_STRING_ITERATOR',
2219
- 'SHORT_LOCALES',
2220
- 'V8_SRC',
2221
- ],
2222
- attributes: { 'char-increment-restriction': null },
1582
+ var available =
1583
+ typeof location === 'object' &&
1584
+ /^\[object [\S\s]*LocationConstructor]$/.test(location.constructor);
1585
+ return available;
2223
1586
  },
2224
- NODE_15:
1587
+ },
1588
+ PLAIN_INTL:
1589
+ {
1590
+ description:
1591
+ 'Existence of the global object Intl having the string representation "[object Object]"',
1592
+ check:
1593
+ function ()
2225
1594
  {
2226
- engine: 'Node.js 15',
2227
- includes:
2228
- [
2229
- 'ARROW',
2230
- 'ESC_HTML_QUOT_ONLY',
2231
- 'ESC_REGEXP_LF',
2232
- 'ESC_REGEXP_SLASH',
2233
- 'FILL',
2234
- 'FLAT',
2235
- 'FROM_CODE_POINT',
2236
- 'FUNCTION_19_LF',
2237
- 'GENERIC_ARRAY_TO_STRING',
2238
- 'GLOBAL_UNDEFINED',
2239
- 'GMT',
2240
- 'INCR_CHAR',
2241
- 'INTL',
2242
- 'LOCALE_INFINITY',
2243
- 'LOCALE_NUMERALS_EXT',
2244
- 'NAME',
2245
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2246
- 'REGEXP_STRING_ITERATOR',
2247
- 'SHORT_LOCALES',
2248
- 'V8_SRC',
2249
- ],
2250
- attributes: { 'char-increment-restriction': null },
1595
+ var available = typeof Intl === 'object' && Intl + '' === '[object Object]';
1596
+ return available;
2251
1597
  },
2252
- NODE_16:
1598
+ includes: ['INTL'],
1599
+ },
1600
+ REGEXP_STRING_ITERATOR:
1601
+ {
1602
+ description:
1603
+ 'The property that the string representation of String.prototype.matchAll() evaluates to ' +
1604
+ '"[object RegExp String Iterator]".',
1605
+ check:
1606
+ function ()
2253
1607
  {
2254
- engine: 'Node.js 16 or later',
2255
- includes:
2256
- [
2257
- 'ARROW',
2258
- 'ATOB',
2259
- 'ESC_HTML_QUOT_ONLY',
2260
- 'ESC_REGEXP_LF',
2261
- 'ESC_REGEXP_SLASH',
2262
- 'FILL',
2263
- 'FLAT',
2264
- 'FROM_CODE_POINT',
2265
- 'FUNCTION_19_LF',
2266
- 'GENERIC_ARRAY_TO_STRING',
2267
- 'GLOBAL_UNDEFINED',
2268
- 'GMT',
2269
- 'INCR_CHAR',
2270
- 'INTL',
2271
- 'LOCALE_INFINITY',
2272
- 'LOCALE_NUMERALS_EXT',
2273
- 'NAME',
2274
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2275
- 'REGEXP_STRING_ITERATOR',
2276
- 'SHORT_LOCALES',
2277
- 'V8_SRC',
2278
- ],
2279
- attributes: { 'char-increment-restriction': null },
1608
+ var available =
1609
+ String.prototype.matchAll && ''.matchAll() + '' === '[object RegExp String Iterator]';
1610
+ return available;
2280
1611
  },
2281
- SAFARI_7_0:
2282
- {
2283
- engine: 'Safari 7.0',
2284
- includes:
2285
- [
2286
- 'ATOB',
2287
- 'BARPROP',
2288
- 'CONSOLE',
2289
- 'ESC_HTML_QUOT_ONLY',
2290
- 'ESC_REGEXP_LF',
2291
- 'ESC_REGEXP_SLASH',
2292
- 'FF_SRC',
2293
- 'GENERIC_ARRAY_TO_STRING',
2294
- 'GLOBAL_UNDEFINED',
2295
- 'GMT',
2296
- 'HISTORY',
2297
- 'HTMLDOCUMENT',
2298
- 'INCR_CHAR',
2299
- 'LOCATION',
2300
- 'NAME',
2301
- 'NODECONSTRUCTOR',
2302
- 'STATUS',
2303
- 'WINDOW',
2304
- ],
2305
- attributes:
1612
+ },
1613
+ SELF: { aliasFor: 'ANY_WINDOW' },
1614
+ SELF_OBJ:
1615
+ {
1616
+ description:
1617
+ 'Existence of the global object self whose string representation starts with "[object ".',
1618
+ check:
1619
+ checkSelfFeature.bind
1620
+ (
1621
+ function (str)
2306
1622
  {
2307
- 'char-increment-restriction': null,
2308
- 'no-atob-in-web-worker': null,
2309
- 'no-console-in-web-worker': null,
2310
- 'web-worker-restriction': null,
2311
- },
2312
- },
2313
- SAFARI_7_1:
1623
+ var available = /^\[object /.test(str);
1624
+ return available;
1625
+ }
1626
+ ),
1627
+ attributes: { 'web-worker': 'safari-bug-21820506' },
1628
+ },
1629
+ SHORT_LOCALES:
1630
+ {
1631
+ description:
1632
+ 'Support for the two-letter locale name "ar" to format decimal numbers as Arabic numerals.',
1633
+ check:
1634
+ function ()
2314
1635
  {
2315
- engine: 'Safari 7.1 and Safari 8',
2316
- includes:
2317
- [
2318
- 'ARRAY_ITERATOR',
2319
- 'ATOB',
2320
- 'BARPROP',
2321
- 'CONSOLE',
2322
- 'ESC_HTML_QUOT_ONLY',
2323
- 'ESC_REGEXP_LF',
2324
- 'ESC_REGEXP_SLASH',
2325
- 'FF_SRC',
2326
- 'FILL',
2327
- 'GENERIC_ARRAY_TO_STRING',
2328
- 'GLOBAL_UNDEFINED',
2329
- 'GMT',
2330
- 'HISTORY',
2331
- 'HTMLDOCUMENT',
2332
- 'INCR_CHAR',
2333
- 'LOCATION',
2334
- 'NAME',
2335
- 'NODECONSTRUCTOR',
2336
- 'STATUS',
2337
- 'WINDOW',
2338
- ],
2339
- attributes:
2340
- {
2341
- 'char-increment-restriction': null,
2342
- 'no-atob-in-web-worker': null,
2343
- 'safari-bug-21820506': null,
2344
- 'web-worker-restriction': null,
2345
- },
1636
+ var NUMBER = 9876430.125;
1637
+
1638
+ var localizedNumeral = NUMBER.toLocaleString('ar');
1639
+ var available =
1640
+ localizedNumeral === NUMBER.toLocaleString('ar-td') &&
1641
+ localizedNumeral !== NUMBER.toLocaleString('en');
1642
+ return available;
2346
1643
  },
2347
- SAFARI_8: { aliasFor: 'SAFARI_7_1' },
2348
- SAFARI_9:
1644
+ includes: ['LOCALE_NUMERALS'],
1645
+ },
1646
+ STATUS:
1647
+ {
1648
+ description: 'Existence of the global string status.',
1649
+ check:
1650
+ function ()
2349
1651
  {
2350
- engine: 'Safari 9',
2351
- includes:
2352
- [
2353
- 'ATOB',
2354
- 'BARPROP',
2355
- 'CONSOLE',
2356
- 'ESC_HTML_QUOT_ONLY',
2357
- 'ESC_REGEXP_LF',
2358
- 'ESC_REGEXP_SLASH',
2359
- 'FF_SRC',
2360
- 'FILL',
2361
- 'FROM_CODE_POINT',
2362
- 'FUNCTION_22_LF',
2363
- 'GENERIC_ARRAY_TO_STRING',
2364
- 'GLOBAL_UNDEFINED',
2365
- 'GMT',
2366
- 'HISTORY',
2367
- 'HTMLDOCUMENT',
2368
- 'INCR_CHAR',
2369
- 'LOCATION',
2370
- 'NAME',
2371
- 'NODECONSTRUCTOR',
2372
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2373
- 'STATUS',
2374
- 'WINDOW',
2375
- ],
2376
- attributes:
2377
- {
2378
- 'char-increment-restriction': null,
2379
- 'no-atob-in-web-worker': null,
2380
- 'safari-bug-21820506': null,
2381
- 'web-worker-restriction': null,
2382
- },
1652
+ var available = typeof status === 'string';
1653
+ return available;
2383
1654
  },
2384
- SAFARI_10:
1655
+ attributes: { 'web-worker': 'web-worker-restriction' },
1656
+ },
1657
+ UNDEFINED:
1658
+ {
1659
+ description:
1660
+ 'The property that Object.prototype.toString.call() evaluates to "[object Undefined]".\n' +
1661
+ 'This behavior is specified by ECMAScript, and is enforced by all engines except Android ' +
1662
+ 'Browser versions prior to 4.1.2, where this feature is not available.',
1663
+ check:
1664
+ function ()
2385
1665
  {
2386
- engine: 'Safari 10 and Safari 11',
2387
- includes:
2388
- [
2389
- 'ARROW',
2390
- 'ATOB',
2391
- 'BARPROP',
2392
- 'CONSOLE',
2393
- 'ESC_HTML_QUOT_ONLY',
2394
- 'ESC_REGEXP_LF',
2395
- 'ESC_REGEXP_SLASH',
2396
- 'FF_SRC',
2397
- 'FILL',
2398
- 'FROM_CODE_POINT',
2399
- 'FUNCTION_22_LF',
2400
- 'GENERIC_ARRAY_TO_STRING',
2401
- 'GLOBAL_UNDEFINED',
2402
- 'GMT',
2403
- 'HISTORY',
2404
- 'HTMLDOCUMENT',
2405
- 'INCR_CHAR',
2406
- 'LOCALE_INFINITY',
2407
- 'LOCALE_NUMERALS_EXT',
2408
- 'LOCATION',
2409
- 'NAME',
2410
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2411
- 'PLAIN_INTL',
2412
- 'SHORT_LOCALES',
2413
- 'STATUS',
2414
- 'WINDOW',
2415
- ],
2416
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1666
+ var available = Object.prototype.toString.call() === '[object Undefined]';
1667
+ return available;
2417
1668
  },
2418
- SAFARI_12:
1669
+ },
1670
+ V8_SRC:
1671
+ {
1672
+ description:
1673
+ 'A string representation of native functions typical for the V8 engine.\n' +
1674
+ 'Remarkable traits are the lack of line feed characters at the beginning and at the end ' +
1675
+ 'of the string and the presence of a single whitespace before the "[native code]" ' +
1676
+ 'sequence.',
1677
+ includes: ['NO_FF_SRC', 'NO_IE_SRC'],
1678
+ excludes: ['NO_V8_SRC'],
1679
+ },
1680
+ WINDOW:
1681
+ {
1682
+ description:
1683
+ 'Existence of the global object self having the string representation "[object Window]".',
1684
+ check:
1685
+ checkSelfFeature.bind
1686
+ (
1687
+ function (str)
1688
+ {
1689
+ var available = str === '[object Window]';
1690
+ return available;
1691
+ }
1692
+ ),
1693
+ includes: ['ANY_WINDOW'],
1694
+ excludes: ['DOMWINDOW'],
1695
+ attributes: { 'web-worker': 'web-worker-restriction' },
1696
+ },
1697
+
1698
+ DEFAULT:
1699
+ {
1700
+ description:
1701
+ 'Minimum feature level, compatible with all supported engines in all environments.',
1702
+ },
1703
+ BROWSER:
1704
+ {
1705
+ description:
1706
+ 'Features available in all browsers.\n' +
1707
+ 'No support for Node.js.',
1708
+ includes: ['ANY_DOCUMENT', 'ANY_WINDOW', 'HISTORY', 'INCR_CHAR', 'STATUS'],
1709
+ attributes:
2419
1710
  {
2420
- engine: 'Safari 12',
2421
- includes:
2422
- [
2423
- 'ARROW',
2424
- 'ATOB',
2425
- 'BARPROP',
2426
- 'CONSOLE',
2427
- 'ESC_HTML_QUOT_ONLY',
2428
- 'ESC_REGEXP_LF',
2429
- 'ESC_REGEXP_SLASH',
2430
- 'FF_SRC',
2431
- 'FILL',
2432
- 'FLAT',
2433
- 'FROM_CODE_POINT',
2434
- 'FUNCTION_22_LF',
2435
- 'GENERIC_ARRAY_TO_STRING',
2436
- 'GLOBAL_UNDEFINED',
2437
- 'GMT',
2438
- 'HISTORY',
2439
- 'HTMLDOCUMENT',
2440
- 'INCR_CHAR',
2441
- 'LOCALE_INFINITY',
2442
- 'LOCALE_NUMERALS_EXT',
2443
- 'LOCATION',
2444
- 'NAME',
2445
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2446
- 'PLAIN_INTL',
2447
- 'SHORT_LOCALES',
2448
- 'STATUS',
2449
- 'WINDOW',
2450
- ],
2451
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1711
+ 'char-increment-restriction': null,
1712
+ 'safari-bug-21820506': null,
1713
+ 'web-worker-restriction': null,
2452
1714
  },
2453
- SAFARI_13:
1715
+ },
1716
+ COMPACT:
1717
+ {
1718
+ description:
1719
+ 'All new browsers\' features.\n' +
1720
+ 'No support for Node.js and older browsers like Internet Explorer, Safari 9 or Android ' +
1721
+ 'Browser.',
1722
+ includes:
1723
+ [
1724
+ 'ARROW',
1725
+ 'ATOB',
1726
+ 'BARPROP',
1727
+ 'ESC_HTML_QUOT_ONLY',
1728
+ 'ESC_REGEXP_LF',
1729
+ 'ESC_REGEXP_SLASH',
1730
+ 'FILL',
1731
+ 'FLAT',
1732
+ 'FROM_CODE_POINT',
1733
+ 'GENERIC_ARRAY_TO_STRING',
1734
+ 'GLOBAL_UNDEFINED',
1735
+ 'GMT',
1736
+ 'HISTORY',
1737
+ 'HTMLDOCUMENT',
1738
+ 'INCR_CHAR',
1739
+ 'INTL',
1740
+ 'LOCALE_INFINITY',
1741
+ 'LOCALE_NUMERALS_EXT',
1742
+ 'LOCATION',
1743
+ 'NAME',
1744
+ 'NO_IE_SRC',
1745
+ 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1746
+ 'REGEXP_STRING_ITERATOR',
1747
+ 'STATUS',
1748
+ 'WINDOW',
1749
+ ],
1750
+ attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1751
+ },
1752
+ ANDRO_4_0:
1753
+ {
1754
+ families: ['Android Browser'],
1755
+ versions: ['4.0'],
1756
+ includes:
1757
+ [
1758
+ 'ATOB',
1759
+ 'CONSOLE',
1760
+ 'DOMWINDOW',
1761
+ 'ESC_HTML_ALL',
1762
+ 'FUNCTION_22_LF',
1763
+ 'GMT',
1764
+ 'HISTORY',
1765
+ 'HTMLDOCUMENT',
1766
+ 'INCR_CHAR',
1767
+ 'LOCATION',
1768
+ 'NAME',
1769
+ 'STATUS',
1770
+ 'V8_SRC',
1771
+ ],
1772
+ },
1773
+ ANDRO_4_1:
1774
+ {
1775
+ inherits: 'ANDRO_4_0',
1776
+ versions: [['4.1',, '4.3']],
1777
+ includes: { GENERIC_ARRAY_TO_STRING: true, OBJECT_UNDEFINED: true },
1778
+ },
1779
+ ANDRO_4_4:
1780
+ {
1781
+ inherits: 'ANDRO_4_1',
1782
+ versions: ['4.4'],
1783
+ includes:
2454
1784
  {
2455
- engine: 'Safari 13 and Safari 14.0.0',
2456
- includes:
2457
- [
2458
- 'ARROW',
2459
- 'ATOB',
2460
- 'BARPROP',
2461
- 'CONSOLE',
2462
- 'ESC_HTML_QUOT_ONLY',
2463
- 'ESC_REGEXP_LF',
2464
- 'ESC_REGEXP_SLASH',
2465
- 'FF_SRC',
2466
- 'FILL',
2467
- 'FLAT',
2468
- 'FROM_CODE_POINT',
2469
- 'FUNCTION_22_LF',
2470
- 'GENERIC_ARRAY_TO_STRING',
2471
- 'GLOBAL_UNDEFINED',
2472
- 'GMT',
2473
- 'HISTORY',
2474
- 'HTMLDOCUMENT',
2475
- 'INCR_CHAR',
2476
- 'LOCALE_INFINITY',
2477
- 'LOCALE_NUMERALS_EXT',
2478
- 'LOCATION',
2479
- 'NAME',
2480
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2481
- 'PLAIN_INTL',
2482
- 'REGEXP_STRING_ITERATOR',
2483
- 'SHORT_LOCALES',
2484
- 'STATUS',
2485
- 'WINDOW',
2486
- ],
2487
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1785
+ BARPROP: true,
1786
+ DOMWINDOW: false,
1787
+ HTMLAUDIOELEMENT: true,
1788
+ LOCALE_INFINITY: true,
1789
+ LOCALE_NUMERALS_EXT: true,
1790
+ PLAIN_INTL: true,
1791
+ SHORT_LOCALES: true,
1792
+ WINDOW: true,
2488
1793
  },
2489
- SAFARI_14_0_1:
1794
+ attributes: { 'no-console-in-web-worker': null, 'web-worker-restriction': null },
1795
+ },
1796
+ CHROME_PREV:
1797
+ {
1798
+ description: describeEngine('the previous to current versions of Chrome and Edge'),
1799
+ aliasFor: 'CHROME_92',
1800
+ },
1801
+ CHROME:
1802
+ {
1803
+ description: describeEngine('the current stable versions of Chrome, Edge and Opera'),
1804
+ aliasFor: 'CHROME_92',
1805
+ },
1806
+ CHROME_92:
1807
+ {
1808
+ families: ['Chrome', 'Edge', 'Opera'],
1809
+ versions: [['92'], ['92'], ['78']],
1810
+ includes:
1811
+ [
1812
+ 'ARROW',
1813
+ 'AT',
1814
+ 'ATOB',
1815
+ 'BARPROP',
1816
+ 'ESC_HTML_QUOT_ONLY',
1817
+ 'ESC_REGEXP_LF',
1818
+ 'ESC_REGEXP_SLASH',
1819
+ 'FILL',
1820
+ 'FLAT',
1821
+ 'FROM_CODE_POINT',
1822
+ 'FUNCTION_19_LF',
1823
+ 'GENERIC_ARRAY_TO_STRING',
1824
+ 'GLOBAL_UNDEFINED',
1825
+ 'GMT',
1826
+ 'HISTORY',
1827
+ 'HTMLDOCUMENT',
1828
+ 'INCR_CHAR',
1829
+ 'INTL',
1830
+ 'LOCALE_INFINITY',
1831
+ 'LOCALE_NUMERALS_EXT',
1832
+ 'LOCATION',
1833
+ 'NAME',
1834
+ 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1835
+ 'REGEXP_STRING_ITERATOR',
1836
+ 'STATUS',
1837
+ 'V8_SRC',
1838
+ 'WINDOW',
1839
+ ],
1840
+ attributes:
1841
+ { 'char-increment-restriction': null, 'unstable': null, 'web-worker-restriction': null },
1842
+ },
1843
+ FF_ESR:
1844
+ {
1845
+ description: describeEngine('the current version of Firefox ESR'),
1846
+ aliasFor: 'FF_78',
1847
+ },
1848
+ FF_78:
1849
+ {
1850
+ families: ['Firefox'],
1851
+ versions: [['78',, '82']],
1852
+ includes:
1853
+ [
1854
+ 'ARROW',
1855
+ 'ATOB',
1856
+ 'BARPROP',
1857
+ 'ESC_HTML_QUOT_ONLY',
1858
+ 'ESC_REGEXP_LF',
1859
+ 'ESC_REGEXP_SLASH',
1860
+ 'FF_SRC',
1861
+ 'FILL',
1862
+ 'FLAT',
1863
+ 'FROM_CODE_POINT',
1864
+ 'FUNCTION_19_LF',
1865
+ 'GENERIC_ARRAY_TO_STRING',
1866
+ 'GLOBAL_UNDEFINED',
1867
+ 'GMT',
1868
+ 'HISTORY',
1869
+ 'HTMLDOCUMENT',
1870
+ 'INCR_CHAR',
1871
+ 'LOCALE_INFINITY',
1872
+ 'LOCALE_NUMERALS_EXT',
1873
+ 'LOCATION',
1874
+ 'NAME',
1875
+ 'NO_OLD_SAFARI_ARRAY_ITERATOR',
1876
+ 'PLAIN_INTL',
1877
+ 'REGEXP_STRING_ITERATOR',
1878
+ 'SHORT_LOCALES',
1879
+ 'STATUS',
1880
+ 'WINDOW',
1881
+ ],
1882
+ attributes:
1883
+ { 'char-increment-restriction': null, 'unstable': null, 'web-worker-restriction': null },
1884
+ },
1885
+ FF_83:
1886
+ {
1887
+ inherits: 'FF_78',
1888
+ versions: [['83',, '89']],
1889
+ includes: { INTL: true, PLAIN_INTL: false },
1890
+ },
1891
+ FF_PREV:
1892
+ {
1893
+ description: describeEngine('the previous to current version of Firefox'),
1894
+ aliasFor: 'FF_90',
1895
+ },
1896
+ FF:
1897
+ {
1898
+ description: describeEngine('the current stable version of Firefox'),
1899
+ aliasFor: 'FF_90',
1900
+ },
1901
+ FF_90:
1902
+ {
1903
+ inherits: 'FF_83',
1904
+ versions: [['90']],
1905
+ includes: { AT: true },
1906
+ },
1907
+ IE_9:
1908
+ {
1909
+ families: ['Internet Explorer'],
1910
+ versions: ['9'],
1911
+ includes:
1912
+ [
1913
+ 'CAPITAL_HTML',
1914
+ 'DOCUMENT',
1915
+ 'ESC_REGEXP_LF',
1916
+ 'ESC_REGEXP_SLASH',
1917
+ 'FUNCTION_22_LF',
1918
+ 'GENERIC_ARRAY_TO_STRING',
1919
+ 'HISTORY',
1920
+ 'IE_SRC',
1921
+ 'INCR_CHAR',
1922
+ 'OBJECT_L_LOCATION_CTOR',
1923
+ 'OBJECT_W_CTOR',
1924
+ 'STATUS',
1925
+ 'UNDEFINED',
1926
+ 'WINDOW',
1927
+ ],
1928
+ },
1929
+ IE_10:
1930
+ {
1931
+ inherits: 'IE_9',
1932
+ versions: ['10'],
1933
+ includes: { ATOB: true, CONSOLE: true, OBJECT_UNDEFINED: true, UNDEFINED: false },
1934
+ attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1935
+ },
1936
+ IE_11:
1937
+ {
1938
+ inherits: 'IE_10',
1939
+ versions: ['11'],
1940
+ includes:
2490
1941
  {
2491
- engine: 'Safari 14.0.1 to 14.0.3',
2492
- includes:
2493
- [
2494
- 'ARROW',
2495
- 'ATOB',
2496
- 'BARPROP',
2497
- 'CONSOLE',
2498
- 'ESC_HTML_QUOT_ONLY',
2499
- 'ESC_REGEXP_LF',
2500
- 'ESC_REGEXP_SLASH',
2501
- 'FF_SRC',
2502
- 'FILL',
2503
- 'FLAT',
2504
- 'FROM_CODE_POINT',
2505
- 'FUNCTION_22_LF',
2506
- 'GENERIC_ARRAY_TO_STRING',
2507
- 'GLOBAL_UNDEFINED',
2508
- 'GMT',
2509
- 'HISTORY',
2510
- 'HTMLDOCUMENT',
2511
- 'INCR_CHAR',
2512
- 'INTL',
2513
- 'LOCALE_INFINITY',
2514
- 'LOCALE_NUMERALS_EXT',
2515
- 'LOCATION',
2516
- 'NAME',
2517
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2518
- 'REGEXP_STRING_ITERATOR',
2519
- 'SHORT_LOCALES',
2520
- 'STATUS',
2521
- 'WINDOW',
2522
- ],
2523
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
1942
+ DOCUMENT: false,
1943
+ GMT: true,
1944
+ HTMLDOCUMENT: true,
1945
+ LOCALE_NUMERALS: true,
1946
+ PLAIN_INTL: true,
1947
+ SHORT_LOCALES: true,
2524
1948
  },
2525
- SAFARI:
1949
+ },
1950
+ IE_11_WIN_10:
1951
+ {
1952
+ inherits: 'IE_11',
1953
+ versions: ['11'],
1954
+ compatibilityTag: 'on Windows 10',
1955
+ compatibilityShortTag: 'W10',
1956
+ includes: { LOCALE_INFINITY: true, LOCALE_NUMERALS: false, LOCALE_NUMERALS_EXT: true },
1957
+ },
1958
+ NODE_0_10:
1959
+ {
1960
+ families: ['Node.js'],
1961
+ versions: ['0.10'],
1962
+ includes:
1963
+ [
1964
+ 'ESC_HTML_ALL',
1965
+ 'FUNCTION_22_LF',
1966
+ 'GENERIC_ARRAY_TO_STRING',
1967
+ 'GLOBAL_UNDEFINED',
1968
+ 'GMT',
1969
+ 'INCR_CHAR',
1970
+ 'NAME',
1971
+ 'V8_SRC',
1972
+ ],
1973
+ },
1974
+ NODE_0_12:
1975
+ {
1976
+ inherits: 'NODE_0_10',
1977
+ versions: ['0.12'],
1978
+ includes:
2526
1979
  {
2527
- engine: 'the current stable version of Safari',
2528
- aliasFor: 'SAFARI_14_1',
1980
+ ESC_HTML_ALL: false,
1981
+ ESC_HTML_QUOT_ONLY: true,
1982
+ LOCALE_INFINITY: true,
1983
+ NO_OLD_SAFARI_ARRAY_ITERATOR: true,
1984
+ PLAIN_INTL: true,
1985
+ },
1986
+ },
1987
+ NODE_4:
1988
+ {
1989
+ inherits: 'NODE_0_12',
1990
+ versions: ['4'],
1991
+ includes: { ARROW: true, ESC_REGEXP_SLASH: true, FILL: true, FROM_CODE_POINT: true },
1992
+ },
1993
+ NODE_5:
1994
+ {
1995
+ inherits: 'NODE_4',
1996
+ versions: [['5',, '9']],
1997
+ attributes: { 'char-increment-restriction': null },
1998
+ },
1999
+ NODE_10:
2000
+ {
2001
+ inherits: 'NODE_5',
2002
+ versions: ['10'],
2003
+ includes: { FUNCTION_19_LF: true, FUNCTION_22_LF: false },
2004
+ },
2005
+ NODE_11:
2006
+ {
2007
+ inherits: 'NODE_10',
2008
+ versions: ['11'],
2009
+ includes: { FLAT: true },
2010
+ },
2011
+ NODE_12:
2012
+ {
2013
+ inherits: 'NODE_11',
2014
+ versions: ['12'],
2015
+ includes: { ESC_REGEXP_LF: true, REGEXP_STRING_ITERATOR: true },
2016
+ },
2017
+ NODE_13:
2018
+ {
2019
+ inherits: 'NODE_12',
2020
+ versions: [['13', '14']],
2021
+ includes: { LOCALE_NUMERALS_EXT: true, SHORT_LOCALES: true },
2022
+ },
2023
+ NODE_15:
2024
+ {
2025
+ inherits: 'NODE_13',
2026
+ versions: ['15'],
2027
+ includes: { INTL: true, PLAIN_INTL: false },
2028
+ },
2029
+ NODE_16_0:
2030
+ {
2031
+ inherits: 'NODE_15',
2032
+ versions: [['16.0',, '16.5']],
2033
+ includes: { ATOB: true },
2034
+ },
2035
+ NODE_16_6:
2036
+ {
2037
+ inherits: 'NODE_16_0',
2038
+ versions: [['16.6']],
2039
+ includes: { AT: true },
2040
+ },
2041
+ SAFARI_7_0:
2042
+ {
2043
+ families: ['Safari'],
2044
+ versions: ['7.0'],
2045
+ includes:
2046
+ [
2047
+ 'ATOB',
2048
+ 'BARPROP',
2049
+ 'CONSOLE',
2050
+ 'ESC_HTML_QUOT_ONLY',
2051
+ 'ESC_REGEXP_LF',
2052
+ 'ESC_REGEXP_SLASH',
2053
+ 'FF_SRC',
2054
+ 'GENERIC_ARRAY_TO_STRING',
2055
+ 'GLOBAL_UNDEFINED',
2056
+ 'GMT',
2057
+ 'HISTORY',
2058
+ 'HTMLDOCUMENT',
2059
+ 'INCR_CHAR',
2060
+ 'LOCATION',
2061
+ 'NAME',
2062
+ 'NODECONSTRUCTOR',
2063
+ 'OBJECT_L_LOCATION_CTOR',
2064
+ 'OBJECT_W_CTOR',
2065
+ 'OLD_SAFARI_LOCATION_CTOR',
2066
+ 'STATUS',
2067
+ 'WINDOW',
2068
+ ],
2069
+ attributes:
2070
+ {
2071
+ 'char-increment-restriction': null,
2072
+ 'no-console-in-web-worker': null,
2073
+ 'old-safari-restriction': null,
2074
+ 'web-worker-restriction': null,
2529
2075
  },
2530
- SAFARI_14_1:
2076
+ },
2077
+ SAFARI_7_1:
2078
+ {
2079
+ inherits: 'SAFARI_7_0',
2080
+ versions: [['7.1', '8']],
2081
+ includes: { ARRAY_ITERATOR: true, FILL: true },
2082
+ attributes: { 'no-console-in-web-worker': undefined, 'safari-bug-21820506': null },
2083
+ },
2084
+ SAFARI_9:
2085
+ {
2086
+ inherits: 'SAFARI_7_1',
2087
+ versions: ['9'],
2088
+ includes:
2531
2089
  {
2532
- engine: 'Safari 14.1 or later',
2533
- includes:
2534
- [
2535
- 'ARROW',
2536
- 'ATOB',
2537
- 'BARPROP',
2538
- 'ESC_HTML_QUOT_ONLY',
2539
- 'ESC_REGEXP_LF',
2540
- 'ESC_REGEXP_SLASH',
2541
- 'FF_SRC',
2542
- 'FILL',
2543
- 'FLAT',
2544
- 'FROM_CODE_POINT',
2545
- 'FUNCTION_22_LF',
2546
- 'GENERIC_ARRAY_TO_STRING',
2547
- 'GLOBAL_UNDEFINED',
2548
- 'GMT',
2549
- 'HISTORY',
2550
- 'HTMLDOCUMENT',
2551
- 'INCR_CHAR',
2552
- 'INTL',
2553
- 'LOCALE_INFINITY',
2554
- 'LOCALE_NUMERALS_EXT',
2555
- 'LOCATION',
2556
- 'NAME',
2557
- 'NO_OLD_SAFARI_ARRAY_ITERATOR',
2558
- 'REGEXP_STRING_ITERATOR',
2559
- 'SHORT_LOCALES',
2560
- 'STATUS',
2561
- 'WINDOW',
2562
- ],
2563
- attributes: { 'char-increment-restriction': null, 'web-worker-restriction': null },
2090
+ ARRAY_ITERATOR: false,
2091
+ FROM_CODE_POINT: true,
2092
+ FUNCTION_22_LF: true,
2093
+ NO_OLD_SAFARI_ARRAY_ITERATOR: true,
2564
2094
  },
2095
+ },
2096
+ SAFARI_10:
2097
+ {
2098
+ inherits: 'SAFARI_9',
2099
+ versions: [['10', '11']],
2100
+ includes:
2101
+ {
2102
+ ARROW: true,
2103
+ LOCALE_INFINITY: true,
2104
+ LOCALE_NUMERALS_EXT: true,
2105
+ NODECONSTRUCTOR: false,
2106
+ OBJECT_L_LOCATION_CTOR: false,
2107
+ OBJECT_W_CTOR: false,
2108
+ OLD_SAFARI_LOCATION_CTOR: false,
2109
+ PLAIN_INTL: true,
2110
+ SHORT_LOCALES: true,
2111
+ },
2112
+ attributes: { 'old-safari-restriction': undefined, 'safari-bug-21820506': undefined },
2113
+ },
2114
+ SAFARI_12:
2115
+ {
2116
+ inherits: 'SAFARI_10',
2117
+ versions: ['12'],
2118
+ includes: { FLAT: true },
2119
+ },
2120
+ SAFARI_13:
2121
+ {
2122
+ inherits: 'SAFARI_12',
2123
+ versions: [['13', '14.0.0']],
2124
+ includes: { REGEXP_STRING_ITERATOR: true },
2125
+ },
2126
+ SAFARI_14_0_1:
2127
+ {
2128
+ inherits: 'SAFARI_13',
2129
+ versions: [['14.0.1',, '14.0.3']],
2130
+ includes: { INTL: true, PLAIN_INTL: false },
2131
+ },
2132
+ SAFARI:
2133
+ {
2134
+ description: describeEngine('the current stable version of Safari'),
2135
+ aliasFor: 'SAFARI_14_1',
2136
+ },
2137
+ SAFARI_14_1:
2138
+ {
2139
+ inherits: 'SAFARI_14_0_1',
2140
+ versions: [['14.1']],
2141
+ includes: { CONSOLE: false },
2142
+ },
2143
+ };
2144
+ (function ()
2145
+ {
2146
+ function formatEngineDescription(compatibilities)
2147
+ {
2148
+ var appendix = '';
2149
+ var parts =
2150
+ compatibilities.map
2151
+ (
2152
+ function (compatibility)
2153
+ {
2154
+ var family = compatibility.family;
2155
+ var version = compatibility.version;
2156
+ var part = family;
2157
+ if (typeof version === 'string')
2158
+ part += ' ' + version;
2159
+ else
2160
+ {
2161
+ part += ' ' + version.from;
2162
+ var to = version.to;
2163
+ if (to != null)
2164
+ part += (version.dense ? ' and ' + family + ' ' : ' to ') + to;
2165
+ else
2166
+ appendix = ' or later';
2167
+ }
2168
+ var tag = compatibility.tag;
2169
+ if (tag != null)
2170
+ part += ' ' + tag;
2171
+ return part;
2172
+ }
2173
+ );
2174
+ var lastPart = parts.pop();
2175
+ var engine = (parts.length ? parts.join(', ') + ' and ' + lastPart : lastPart) + appendix;
2176
+ var description = describeEngine(engine);
2177
+ return description;
2565
2178
  }
2566
- );
2179
+
2180
+ var autoIncludes =
2181
+ _Object_keys$1(featureInfos).filter
2182
+ (
2183
+ function (featureName)
2184
+ {
2185
+ var featureInfo = featureInfos[featureName];
2186
+ var check = featureInfo.check;
2187
+ var returnValue = check && check();
2188
+ return returnValue;
2189
+ }
2190
+ );
2191
+ featureInfos.AUTO =
2192
+ {
2193
+ description: describeEngine('the current environment'),
2194
+ includes: autoIncludes,
2195
+ };
2196
+ Feature = createFeatureClass(featureInfos, formatEngineDescription);
2197
+ ELEMENTARY = Feature.ELEMENTARY;
2198
+ featureInfos = null;
2199
+ assignNoEnum$1(Feature.prototype, { restrict: restrict });
2200
+ var ALL = Feature.ALL;
2201
+ var descriptor = { enumerable: true };
2202
+ for (var featureName in ALL)
2203
+ {
2204
+ var featureObj = ALL[featureName];
2205
+ descriptor.value = featureObj;
2206
+ _Object_defineProperty$1(Feature, featureName, descriptor);
2207
+ }
2208
+ }
2209
+ )();
2567
2210
 
2568
2211
  function callWithFeatures()
2569
2212
  {
@@ -2675,7 +2318,7 @@
2675
2318
 
2676
2319
  var staticEncoder;
2677
2320
 
2678
- // novem 2.0.1 – https://github.com/fasttime/JScrewIt/tree/master/packages/novem
2321
+ // ~solution – https://github.com/fasttime/JScrewIt/tree/master/packages/~solution
2679
2322
 
2680
2323
  var INVALID_EXPR = {};
2681
2324
  function evalExpr$1(expr) {
@@ -3046,7 +2689,9 @@
3046
2689
  return replacement;
3047
2690
  };
3048
2691
 
3049
- assignNoEnum
2692
+ // End of module ~solution
2693
+
2694
+ assignNoEnum$1
3050
2695
  (
3051
2696
  AbstractSolution.prototype,
3052
2697
  {
@@ -3058,12 +2703,16 @@
3058
2703
  },
3059
2704
  set appendLength(appendLength)
3060
2705
  {
3061
- _Object_defineProperty(this, 'appendLength', { enumerable: true, value: appendLength });
2706
+ _Object_defineProperty$1(this, 'appendLength', { enumerable: true, value: appendLength });
3062
2707
  },
3063
2708
  }
3064
2709
  );
3065
2710
 
3066
2711
  // As of version 2.1.0, definitions are interpreted using JScrewIt's own express parser, which can
2712
+ // handle and optimize a useful subset of the JavaScript syntax.
2713
+ // See express-parse.js for details about constructs recognized by express.
2714
+ // Compared to generic purpose encoding, definition encoding differs mainly in that every identifier
2715
+ // used must be defined itself, too, in a constant definition.
3067
2716
 
3068
2717
  var AMENDINGS = ['true', 'undefined', 'NaN'];
3069
2718
 
@@ -3417,7 +3066,6 @@
3417
3066
  var ESC_HTML_QUOT_ONLY = Feature.ESC_HTML_QUOT_ONLY;
3418
3067
  var ESC_REGEXP_LF = Feature.ESC_REGEXP_LF;
3419
3068
  var ESC_REGEXP_SLASH = Feature.ESC_REGEXP_SLASH;
3420
- var EXTERNAL = Feature.EXTERNAL;
3421
3069
  var FF_SRC = Feature.FF_SRC;
3422
3070
  var FILL = Feature.FILL;
3423
3071
  var FLAT = Feature.FLAT;
@@ -3443,7 +3091,10 @@
3443
3091
  var NO_IE_SRC = Feature.NO_IE_SRC;
3444
3092
  var NO_OLD_SAFARI_ARRAY_ITERATOR = Feature.NO_OLD_SAFARI_ARRAY_ITERATOR;
3445
3093
  var NO_V8_SRC = Feature.NO_V8_SRC;
3094
+ var OBJECT_L_LOCATION_CTOR = Feature.OBJECT_L_LOCATION_CTOR;
3446
3095
  var OBJECT_UNDEFINED = Feature.OBJECT_UNDEFINED;
3096
+ var OBJECT_W_CTOR = Feature.OBJECT_W_CTOR;
3097
+ var OLD_SAFARI_LOCATION_CTOR = Feature.OLD_SAFARI_LOCATION_CTOR;
3447
3098
  var PLAIN_INTL = Feature.PLAIN_INTL;
3448
3099
  var REGEXP_STRING_ITERATOR = Feature.REGEXP_STRING_ITERATOR;
3449
3100
  var SELF_OBJ = Feature.SELF_OBJ;
@@ -3511,7 +3162,15 @@
3511
3162
  {
3512
3163
  var expr = '(' + number + ')[TO_LOCALE_STRING](' + locale + ')';
3513
3164
  if (index != null)
3514
- expr += '[' + index + ']';
3165
+ {
3166
+ if (index > 4)
3167
+ {
3168
+ var paddingBlock = R_PADDINGS[10 - index];
3169
+ expr = '(' + paddingBlock + ' + ' + expr + ')[10]';
3170
+ }
3171
+ else
3172
+ expr += '[' + index + ']';
3173
+ }
3515
3174
  var entry = define._callWithFeatures(expr, LOCALE_NUMERALS, arguments, 3);
3516
3175
  return entry;
3517
3176
  }
@@ -3549,7 +3208,7 @@
3549
3208
 
3550
3209
  function useLocaleNumeralDigitDefinitions(locale, zeroCharCode)
3551
3210
  {
3552
- var fromCharCode = _String.fromCharCode;
3211
+ var fromCharCode = _String$1.fromCharCode;
3553
3212
  for (var digit = 0; digit <= 9; ++digit)
3554
3213
  {
3555
3214
  var char = fromCharCode(zeroCharCode + digit);
@@ -3837,6 +3496,7 @@
3837
3496
  define('escape((RP_4_A + [+("1000" + (AT + 0)[31] + 0)] + AT)[40])[2]', AT), // *
3838
3497
  define('btoa("00")[1]', ATOB),
3839
3498
  define('(RP_3_WA + document)[11]', DOCUMENT),
3499
+ define('(RP_3_WA + self)[11]', DOMWINDOW),
3840
3500
  define // *
3841
3501
  ('escape((NaN + [+("10" + [(RP_6_S + FILL)[40]] + "000")] + FILL)[40])[2]', FILL),
3842
3502
  define // *
@@ -3857,7 +3517,6 @@
3857
3517
  defineCharAtFnPos('RegExp', 12),
3858
3518
  define('btoa("0NaN")[1]', ATOB),
3859
3519
  define('(RP_5_A + "".link())[10]', CAPITAL_HTML),
3860
- define('(RP_3_WA + sidebar)[11]', EXTERNAL),
3861
3520
  define('(RP_3_WA + Audio)[21]', HTMLAUDIOELEMENT),
3862
3521
  define('(RP_0_S + REGEXP_STRING_ITERATOR)[11]', REGEXP_STRING_ITERATOR),
3863
3522
  ],
@@ -3907,6 +3566,12 @@
3907
3566
  },
3908
3567
  LOCATION
3909
3568
  ),
3569
+ define('(RP_3_WA + LOCATION_CONSTRUCTOR)[11]', OBJECT_L_LOCATION_CTOR),
3570
+ define
3571
+ (
3572
+ '(LOCATION_CONSTRUCTOR + RP_0_S)[SLICE_OR_SUBSTR]("-20")[0]',
3573
+ OLD_SAFARI_LOCATION_CTOR
3574
+ ),
3910
3575
  define
3911
3576
  (
3912
3577
  {
@@ -3916,6 +3581,7 @@
3916
3581
  AT,
3917
3582
  LOCATION
3918
3583
  ),
3584
+ define('(LOCATION_CONSTRUCTOR + RP_0_S).at("-20")', AT, OLD_SAFARI_LOCATION_CTOR),
3919
3585
  define
3920
3586
  (
3921
3587
  '[][TO_STRING].call(location)[SLICE_OR_SUBSTR]("-10")[1]',
@@ -3934,6 +3600,7 @@
3934
3600
  [
3935
3601
  define('btoa(0)[0]', ATOB),
3936
3602
  define('"".small()[2]', CAPITAL_HTML),
3603
+ define('(RP_0_S + self)[10]', DOMWINDOW),
3937
3604
  define('(RP_4_A + Date())[30]', GMT),
3938
3605
  define('(RP_0_S + Audio)[11]', HTMLAUDIOELEMENT),
3939
3606
  define('(RP_0_S + document)[10]', HTMLDOCUMENT),
@@ -3945,6 +3612,7 @@
3945
3612
  define('(RP_3_WA + PLAIN_OBJECT)[11]'),
3946
3613
  define('btoa(NaN)[3]', ATOB),
3947
3614
  define('"".fontcolor()[2]', CAPITAL_HTML),
3615
+ define('(RP_1_WA + self)[10]', DOMWINDOW),
3948
3616
  define('(RP_3_WA + Intl)[11]', PLAIN_INTL),
3949
3617
  ],
3950
3618
  'P':
@@ -3996,11 +3664,24 @@
3996
3664
  [
3997
3665
  define('btoa("1NaN")[1]', ATOB),
3998
3666
  define('"".sub()[2]', CAPITAL_HTML),
3999
- define('(RP_3_WA + Function("return toString")()())[11]', GLOBAL_UNDEFINED),
4000
- define('(RP_3_WA + Function("return{}.toString")()())[11]', OBJECT_UNDEFINED),
3667
+ define
3668
+ (
3669
+ { expr: '(RP_3_WA + Function("return toString")()())[11]', optimize: true },
3670
+ GLOBAL_UNDEFINED
3671
+ ),
3672
+ define
3673
+ (
3674
+ { expr: '(RP_3_WA + Function("return{}.toString")()())[11]', optimize: true },
3675
+ OBJECT_UNDEFINED
3676
+ ),
4001
3677
  define('(RP_3_WA + PLAIN_OBJECT[TO_STRING].call())[11]', UNDEFINED),
4002
3678
  define('(RP_3_WA + ARRAY_ITERATOR[TO_STRING].call())[11]', ARRAY_ITERATOR, UNDEFINED),
4003
- define('(RP_3_WA + Function("return Intl.toString")()())[11]', INTL, OBJECT_UNDEFINED),
3679
+ define
3680
+ (
3681
+ { expr: '(RP_3_WA + Function("return Intl.toString")()())[11]', optimize: true },
3682
+ INTL,
3683
+ OBJECT_UNDEFINED
3684
+ ),
4004
3685
  define('(RP_3_WA + Intl[TO_STRING].call())[11]', INTL, UNDEFINED),
4005
3686
  ],
4006
3687
  'V':
@@ -4016,6 +3697,7 @@
4016
3697
  define('(self + RP_4_A)[SLICE_OR_SUBSTR]("-11")[0]', ANY_WINDOW),
4017
3698
  define('btoa(undefined)[1]', ATOB),
4018
3699
  define('(RP_0_S + self)[11]', DOMWINDOW),
3700
+ define('(RP_3_WA + Function("return constructor")())[11]', OBJECT_W_CTOR),
4019
3701
  define('(RP_3_WA + self)[11]', WINDOW),
4020
3702
  define('(self + RP_4_A).at("-11")', ANY_WINDOW, AT),
4021
3703
  defineCharDefault({ atob: false }),
@@ -4142,7 +3824,6 @@
4142
3824
  [
4143
3825
  define('101[TO_STRING]("34")[1]'),
4144
3826
  define('btoa("falsefalse")[10]', ATOB),
4145
- define('(RP_1_WA + sidebar)[10]', EXTERNAL),
4146
3827
  ],
4147
3828
  'y': '(RP_3_WA + [Infinity])[10]',
4148
3829
  'z':
@@ -4335,10 +4016,6 @@
4335
4016
  [
4336
4017
  define('Function("return self")()', SELF_OBJ),
4337
4018
  ],
4338
- sidebar:
4339
- [
4340
- define('Function("return sidebar")()', EXTERNAL),
4341
- ],
4342
4019
  unescape:
4343
4020
  [
4344
4021
  define({ expr: 'Function("return unescape")()', optimize: true }),
@@ -4486,6 +4163,11 @@
4486
4163
  define({ expr: '"ar-td"', solutionType: SolutionType.COMBINED_STRING }),
4487
4164
  define({ expr: '"ar"', solutionType: SolutionType.COMBINED_STRING }, SHORT_LOCALES),
4488
4165
  ],
4166
+ LOCATION_CONSTRUCTOR:
4167
+ [
4168
+ define('Function("return location")().constructor', OBJECT_L_LOCATION_CTOR),
4169
+ define('Function("return location")().constructor', OLD_SAFARI_LOCATION_CTOR),
4170
+ ],
4489
4171
  PLAIN_OBJECT:
4490
4172
  [
4491
4173
  define('Function("return{}")()'),
@@ -5474,8 +5156,8 @@
5474
5156
  while ('value' in unit && isUndecoratedUnit(unit))
5475
5157
  {
5476
5158
  var value = unit.value;
5477
- if (!_Array_isArray(value))
5478
- return value == null && inArray ? '' : _String(value);
5159
+ if (!_Array_isArray$1(value))
5160
+ return value == null && inArray ? '' : _String$1(value);
5479
5161
  unit = value[0];
5480
5162
  if (!unit)
5481
5163
  return '';
@@ -5669,7 +5351,7 @@
5669
5351
  this._length = -APPEND_LENGTH_OF_EMPTY;
5670
5352
  }
5671
5353
 
5672
- assignNoEnum
5354
+ assignNoEnum$1
5673
5355
  (
5674
5356
  ScrewBuffer.prototype,
5675
5357
  {
@@ -5781,7 +5463,7 @@
5781
5463
  function findBase64AlphabetDefinition(encoder, element)
5782
5464
  {
5783
5465
  var definition;
5784
- if (_Array_isArray(element))
5466
+ if (_Array_isArray$1(element))
5785
5467
  definition = encoder.findDefinition(element);
5786
5468
  else
5787
5469
  definition = element;
@@ -5815,7 +5497,7 @@
5815
5497
 
5816
5498
  function replaceIndexer(index)
5817
5499
  {
5818
- var indexStr = _String(index);
5500
+ var indexStr = _String$1(index);
5819
5501
  var replacement = '[' + replaceStaticString(indexStr) + ']';
5820
5502
  return replacement;
5821
5503
  }
@@ -5949,13 +5631,15 @@
5949
5631
  var BOND_STRENGTH_WEAK = 1;
5950
5632
  var BOND_STRENGTH_STRONG = 2;
5951
5633
 
5634
+ var featureFromMask = Feature._fromMask;
5635
+
5952
5636
  /** @class Encoder */
5953
5637
 
5954
5638
  function Encoder(mask)
5955
5639
  {
5956
5640
  this.mask = mask;
5957
- this._charCache = _Object_create(STATIC_CHAR_CACHE);
5958
- this._constCache = _Object_create(STATIC_CONST_CACHE);
5641
+ this._charCache = _Object_create$1(STATIC_CHAR_CACHE);
5642
+ this._constCache = _Object_create$1(STATIC_CONST_CACHE);
5959
5643
  this._definitionCache = createEmpty();
5960
5644
  this._optimizers = createEmpty();
5961
5645
  this._stack = [];
@@ -5974,7 +5658,7 @@
5974
5658
  var feature = featureFromMask(encoder.mask);
5975
5659
  var message = 'Circular reference detected: ' + chain.join(' < ') + ' – ' + feature;
5976
5660
  var error = new _SyntaxError(message);
5977
- assignNoEnum(error, { chain: chain, feature: feature });
5661
+ assignNoEnum$1(error, { chain: chain, feature: feature });
5978
5662
  throw error;
5979
5663
  }
5980
5664
  resolver.call(encoder);
@@ -6168,7 +5852,7 @@
6168
5852
  APPEND_LENGTH_OF_DIGIT_0 * extraZeroCount +
6169
5853
  APPEND_LENGTH_OF_SMALL_E +
6170
5854
  APPEND_LENGTH_OF_MINUS +
6171
- getMultiDigitLength(_String(-exp));
5855
+ getMultiDigitLength(_String$1(-exp));
6172
5856
  if (extraLength < rivalExtraLength)
6173
5857
  {
6174
5858
  var str = mantissa + 'e' + exp;
@@ -6249,7 +5933,7 @@
6249
5933
  var screwMode = bondStrength ? SCREW_AS_BONDED_STRING : SCREW_AS_STRING;
6250
5934
  output = strReplacer(encoder, value, screwMode, unitIndices, maxLength);
6251
5935
  }
6252
- else if (_Array_isArray(value))
5936
+ else if (_Array_isArray$1(value))
6253
5937
  {
6254
5938
  if (value.length)
6255
5939
  {
@@ -6284,7 +5968,7 @@
6284
5968
  output = '(' + output + ')';
6285
5969
  }
6286
5970
  else
6287
- output = replaceIdentifier(STATIC_ENCODER, _String(value), bondStrength);
5971
+ output = replaceIdentifier(STATIC_ENCODER, _String$1(value), bondStrength);
6288
5972
  if (output.length > maxLength)
6289
5973
  return;
6290
5974
  }
@@ -6313,7 +5997,7 @@
6313
5997
  (function ()
6314
5998
  {
6315
5999
  var matchSimpleAt;
6316
- var pattern = _Object_keys(SIMPLE).join('|');
6000
+ var pattern = _Object_keys$1(SIMPLE).join('|');
6317
6001
  var regExp = tryCreateRegExp(pattern, 'y');
6318
6002
  if (regExp)
6319
6003
  {
@@ -6343,7 +6027,7 @@
6343
6027
  }
6344
6028
  )();
6345
6029
 
6346
- assignNoEnum
6030
+ assignNoEnum$1
6347
6031
  (
6348
6032
  Encoder.prototype,
6349
6033
  {
@@ -6389,7 +6073,7 @@
6389
6073
  function (length)
6390
6074
  {
6391
6075
  var paddingBlock = R_PADDINGS[length];
6392
- if (paddingBlock !== undefined)
6076
+ if (paddingBlock)
6393
6077
  return paddingBlock;
6394
6078
  throwSyntaxError(this, 'Undefined regular padding block with length ' + length);
6395
6079
  },
@@ -6486,7 +6170,7 @@
6486
6170
  paddingBlock = padding.block;
6487
6171
  shiftedIndex = padding.shiftedIndex;
6488
6172
  }
6489
- var fullExpr = '(' + paddingBlock + '+' + expr + ')[' + shiftedIndex + ']';
6173
+ var fullExpr = '(' + paddingBlock + ' + ' + expr + ')[' + shiftedIndex + ']';
6490
6174
  var replacement = this.replaceExpr(fullExpr);
6491
6175
  var solution = new SimpleSolution(char, replacement, SolutionType.STRING);
6492
6176
  return solution;
@@ -6638,7 +6322,7 @@
6638
6322
  if (!buffer.append(solution) || buffer.length > maxLength)
6639
6323
  return;
6640
6324
  }
6641
- var replacement = _String(buffer);
6325
+ var replacement = _String$1(buffer);
6642
6326
  if (!(replacement.length > maxLength))
6643
6327
  return replacement;
6644
6328
  },
@@ -6684,11 +6368,11 @@
6684
6368
  callResolver
6685
6369
  (
6686
6370
  this,
6687
- _JSON_stringify(char),
6371
+ _JSON_stringify$1(char),
6688
6372
  function ()
6689
6373
  {
6690
6374
  var entries = CHARACTERS[char];
6691
- if (!entries || _Array_isArray(entries))
6375
+ if (!entries || _Array_isArray$1(entries))
6692
6376
  {
6693
6377
  if (entries)
6694
6378
  solution = findOptimalSolution(this, char, entries);
@@ -6722,7 +6406,7 @@
6722
6406
  function ()
6723
6407
  {
6724
6408
  var entries = this.constantDefinitions[constant];
6725
- if (_Array_isArray(entries))
6409
+ if (_Array_isArray$1(entries))
6726
6410
  {
6727
6411
  solution =
6728
6412
  findOptimalSolution(this, constant, entries, SolutionType.OBJECT);
@@ -6899,7 +6583,7 @@
6899
6583
  perfInfoList.inputLength = inputLength;
6900
6584
  perfLog.push(perfInfoList);
6901
6585
  var inputData = _Object(input);
6902
- _Object_keys(options).forEach
6586
+ _Object_keys$1(options).forEach
6903
6587
  (
6904
6588
  function (optName)
6905
6589
  {
@@ -7249,7 +6933,7 @@
7249
6933
  .count++;
7250
6934
  }
7251
6935
  );
7252
- var charList = _Object_keys(charMap);
6936
+ var charList = _Object_keys$1(charMap);
7253
6937
  inputData.freqList =
7254
6938
  freqList =
7255
6939
  charList.map
@@ -7780,7 +7464,7 @@
7780
7464
  }
7781
7465
  )();
7782
7466
 
7783
- assignNoEnum
7467
+ assignNoEnum$1
7784
7468
  (
7785
7469
  Encoder.prototype,
7786
7470
  {
@@ -7866,7 +7550,7 @@
7866
7550
  {
7867
7551
  var separator = AMENDINGS[index];
7868
7552
  var digit = firstDigit + index;
7869
- var joiner = _String(digit);
7553
+ var joiner = _String$1(digit);
7870
7554
  var substitution = { separator: separator, joiner: joiner };
7871
7555
  substitutions.push(substitution);
7872
7556
  }
@@ -7933,7 +7617,7 @@
7933
7617
  perfInfo.perfLog = perfLog;
7934
7618
  delete this.perfLog;
7935
7619
  if (output == null)
7936
- throw new _Error('Encoding failed');
7620
+ throw new _Error$1('Encoding failed');
7937
7621
  return output;
7938
7622
  },
7939
7623
 
@@ -8197,7 +7881,7 @@
8197
7881
  );
8198
7882
 
8199
7883
  var codePointOf =
8200
- _String.prototype.codePointAt ?
7884
+ _String$1.prototype.codePointAt ?
8201
7885
  function (char)
8202
7886
  {
8203
7887
  var codePoint = char.codePointAt();
@@ -8538,6 +8222,14 @@
8538
8222
  }
8539
8223
 
8540
8224
  // Optimized clusters take the form:
8225
+ //
8226
+ // +(X)["toString"](Y)
8227
+ //
8228
+ // X is a JSFuck integer between 23 and MAX_SAFE_INTEGER.
8229
+ //
8230
+ // Y takes at least 15 charactes for "20" and at most 46 characters for "36".
8231
+ //
8232
+ // The leading append plus is omitted when the optimized cluster is the first element of a group.
8541
8233
 
8542
8234
  var BOND_EXTRA_LENGTH = 2; // Extra length of bonding parentheses "(" and ")".
8543
8235
  var CLUSTER_EXTRA_LENGTHS = [];
@@ -8840,7 +8532,7 @@
8840
8532
  return optimizerList;
8841
8533
  }
8842
8534
 
8843
- assignNoEnum
8535
+ assignNoEnum$1
8844
8536
  (
8845
8537
  Encoder.prototype,
8846
8538
  {
@@ -8883,7 +8575,7 @@
8883
8575
 
8884
8576
  function encode(input, options)
8885
8577
  {
8886
- input = esToString(input);
8578
+ input = esToString$1(input);
8887
8579
  options = options || { };
8888
8580
  var features = options.features;
8889
8581
  var runAsData;
@@ -8910,7 +8602,7 @@
8910
8602
 
8911
8603
  if (input === undefined)
8912
8604
  return [wrapWithEval, STRATEGY_NAMES_BOTH];
8913
- switch (_String(input))
8605
+ switch (_String$1(input))
8914
8606
  {
8915
8607
  case 'call':
8916
8608
  return [wrapWithCall, STRATEGY_NAMES_TEXT];
@@ -8925,7 +8617,7 @@
8925
8617
  case 'none':
8926
8618
  return [, STRATEGY_NAMES_TEXT];
8927
8619
  }
8928
- throw new _Error('Invalid value for option ' + name);
8620
+ throw new _Error$1('Invalid value for option ' + name);
8929
8621
  }
8930
8622
 
8931
8623
  function flushEncoderCache()
@@ -8940,7 +8632,7 @@
8940
8632
 
8941
8633
  function getEncoder(features)
8942
8634
  {
8943
- var mask = getValidFeatureMask(features);
8635
+ var mask = getFeatureMask(features);
8944
8636
  var encoder = encoderCache.get(mask);
8945
8637
  if (!encoder)
8946
8638
  {
@@ -8952,15 +8644,9 @@
8952
8644
  return encoder;
8953
8645
  }
8954
8646
 
8955
- function getValidFeatureMask(features)
8956
- {
8957
- var mask = features !== undefined ? validMaskFromArrayOrStringOrFeature(features) : maskNew();
8958
- return mask;
8959
- }
8960
-
8961
8647
  function isEncoderInCache(features)
8962
8648
  {
8963
- var mask = getValidFeatureMask(features);
8649
+ var mask = getFeatureMask(features);
8964
8650
  var returnValue = encoderCache.has(mask);
8965
8651
  return returnValue;
8966
8652
  }
@@ -8976,7 +8662,9 @@
8976
8662
  timeout = _setTimeout(flushEncoderCache);
8977
8663
  }
8978
8664
 
8979
- var JScrewIt = assignNoEnum({ }, { Feature: Feature, encode: encode });
8665
+ var JScrewIt = assignNoEnum$1({ }, { Feature: Feature, encode: encode });
8666
+
8667
+ var getFeatureMask = Feature._getMask;
8980
8668
 
8981
8669
  var _permanentCaching = false;
8982
8670
  var encoderCache;
@@ -8985,7 +8673,7 @@
8985
8673
 
8986
8674
  resetEncoderCache();
8987
8675
 
8988
- assignNoEnum
8676
+ assignNoEnum$1
8989
8677
  (
8990
8678
  encode,
8991
8679
  {
@@ -9022,7 +8710,7 @@
9022
8710
  if (typeof obj === 'object')
9023
8711
  {
9024
8712
  var target = { };
9025
- var names = _Object_keys(obj);
8713
+ var names = _Object_keys$1(obj);
9026
8714
  names.forEach
9027
8715
  (
9028
8716
  function (name)
@@ -9041,7 +8729,7 @@
9041
8729
  var outputEntries;
9042
8730
  if (inputEntries)
9043
8731
  {
9044
- if (_Array_isArray(inputEntries))
8732
+ if (_Array_isArray$1(inputEntries))
9045
8733
  outputEntries = inputEntries.map(clone);
9046
8734
  else
9047
8735
  outputEntries = [createEntryClone(inputEntries, EMPTY_MASK)];
@@ -9051,7 +8739,7 @@
9051
8739
 
9052
8740
  function createEncoder(features)
9053
8741
  {
9054
- var mask = getValidFeatureMask(features);
8742
+ var mask = getFeatureMask(features);
9055
8743
  var encoder = new Encoder(mask);
9056
8744
  encoder.perfLog = [];
9057
8745
  return encoder;
@@ -9064,12 +8752,6 @@
9064
8752
  return entry;
9065
8753
  }
9066
8754
 
9067
- function createFeatureFromMask(mask)
9068
- {
9069
- var featureObj = isMaskCompatible(mask) ? featureFromMask(mask) : null;
9070
- return featureObj;
9071
- }
9072
-
9073
8755
  function createScrewBuffer(screwMode, groupThreshold, optimizerList)
9074
8756
  {
9075
8757
  var buffer = new ScrewBuffer(screwMode, groupThreshold, optimizerList);
@@ -9078,12 +8760,12 @@
9078
8760
 
9079
8761
  function defineConstant(encoder, constant, definition)
9080
8762
  {
9081
- constant = _String(constant);
8763
+ constant = _String$1(constant);
9082
8764
  if (!/^[$A-Z_a-z][$\w]*$/.test(constant))
9083
- throw new _SyntaxError('Invalid identifier ' + _JSON_stringify(constant));
8765
+ throw new _SyntaxError('Invalid identifier ' + _JSON_stringify$1(constant));
9084
8766
  if (!encoder.hasOwnProperty('constantDefinitions'))
9085
- encoder.constantDefinitions = _Object_create(CONSTANTS);
9086
- var entries = [define(esToString(definition))];
8767
+ encoder.constantDefinitions = _Object_create$1(CONSTANTS);
8768
+ var entries = [define(esToString$1(definition))];
9087
8769
  encoder.constantDefinitions[constant] = entries;
9088
8770
  }
9089
8771
 
@@ -9095,7 +8777,7 @@
9095
8777
 
9096
8778
  function getCharacters()
9097
8779
  {
9098
- var chars = _Object_keys(CHARACTERS).sort();
8780
+ var chars = _Object_keys$1(CHARACTERS).sort();
9099
8781
  return chars;
9100
8782
  }
9101
8783
 
@@ -9107,7 +8789,7 @@
9107
8789
 
9108
8790
  function getComplexNames()
9109
8791
  {
9110
- var names = _Object_keys(COMPLEX).sort();
8792
+ var names = _Object_keys$1(COMPLEX).sort();
9111
8793
  return names;
9112
8794
  }
9113
8795
 
@@ -9119,7 +8801,7 @@
9119
8801
 
9120
8802
  function getConstantNames()
9121
8803
  {
9122
- var names = _Object_keys(CONSTANTS).sort();
8804
+ var names = _Object_keys$1(CONSTANTS).sort();
9123
8805
  return names;
9124
8806
  }
9125
8807
 
@@ -9145,6 +8827,9 @@
9145
8827
  ENTRIES['BASE64_ALPHABET_LO_4:1'] = BASE64_ALPHABET_LO_4[1];
9146
8828
  ENTRIES['BASE64_ALPHABET_LO_4:3'] = BASE64_ALPHABET_LO_4[3];
9147
8829
 
8830
+ var featureFromMask = Feature._fromMask;
8831
+ var getFeatureMask = Feature._getMask;
8832
+
9148
8833
  (function ()
9149
8834
  {
9150
8835
  function exposeEntries(name, entries)
@@ -9163,7 +8848,7 @@
9163
8848
  )();
9164
8849
 
9165
8850
  var debug =
9166
- assignNoEnum
8851
+ assignNoEnum$1
9167
8852
  (
9168
8853
  { },
9169
8854
  {
@@ -9175,11 +8860,11 @@
9175
8860
  calculateSolutionType: calculateSolutionType,
9176
8861
  createClusteringPlan: createClusteringPlan,
9177
8862
  createEncoder: createEncoder,
9178
- createFeatureFromMask: createFeatureFromMask,
9179
8863
  createFigurator: createFigurator,
9180
8864
  createReindexMap: createReindexMap,
9181
8865
  createScrewBuffer: createScrewBuffer,
9182
8866
  defineConstant: defineConstant,
8867
+ featureFromMask: featureFromMask,
9183
8868
  getCharacterEntries: getCharacterEntries,
9184
8869
  getCharacters: getCharacters,
9185
8870
  getComplexEntry: getComplexEntry,
@@ -9189,17 +8874,14 @@
9189
8874
  getEntries: getEntries,
9190
8875
  getStrategies: getStrategies,
9191
8876
  isEncoderInCache: isEncoderInCache,
9192
- maskAreEqual: maskAreEqual,
9193
8877
  maskIncludes: maskIncludes,
9194
- maskNew: maskNew,
9195
- maskNext: maskNext,
9196
8878
  maskUnion: maskUnion,
9197
8879
  optimizeSolutions: optimizeSolutions,
9198
8880
  trimJS: trimJS$1,
9199
8881
  }
9200
8882
  );
9201
8883
 
9202
- assignNoEnum(JScrewIt, { debug: debug });
8884
+ assignNoEnum$1(JScrewIt, { debug: debug });
9203
8885
  }
9204
8886
  )();
9205
8887
  }