node-red-contrib-web-worldmap 2.29.0 → 2.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +13 -0
- package/CHANGELOG.md +6 -2
- package/README.md +4 -10
- package/node_modules/array-flatten/package.json +6 -9
- package/node_modules/body-parser/HISTORY.md +18 -0
- package/node_modules/body-parser/README.md +9 -1
- package/node_modules/body-parser/SECURITY.md +25 -0
- package/node_modules/body-parser/lib/read.js +26 -2
- package/node_modules/body-parser/lib/types/json.js +10 -4
- package/node_modules/body-parser/package.json +24 -20
- package/node_modules/call-bind/.eslintignore +1 -0
- package/node_modules/call-bind/.eslintrc +17 -0
- package/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind/.nycrc +13 -0
- package/node_modules/call-bind/CHANGELOG.md +42 -0
- package/node_modules/call-bind/LICENSE +21 -0
- package/node_modules/call-bind/README.md +2 -0
- package/node_modules/call-bind/callBound.js +15 -0
- package/node_modules/call-bind/index.js +47 -0
- package/node_modules/call-bind/package.json +108 -0
- package/node_modules/call-bind/test/callBound.js +55 -0
- package/node_modules/call-bind/test/index.js +66 -0
- package/node_modules/cookie/HISTORY.md +8 -0
- package/node_modules/cookie/README.md +50 -34
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +83 -15
- package/node_modules/cookie/package.json +17 -15
- package/node_modules/cookie-signature/package.json +6 -9
- package/node_modules/depd/History.md +7 -0
- package/node_modules/depd/LICENSE +1 -1
- package/node_modules/depd/Readme.md +8 -8
- package/node_modules/depd/index.js +29 -13
- package/node_modules/depd/package.json +25 -24
- package/node_modules/destroy/LICENSE +1 -0
- package/node_modules/destroy/README.md +15 -12
- package/node_modules/destroy/index.js +147 -13
- package/node_modules/destroy/package.json +29 -20
- package/node_modules/ee-first/package.json +6 -9
- package/node_modules/encodeurl/package.json +11 -14
- package/node_modules/escape-html/package.json +11 -14
- package/node_modules/etag/package.json +11 -14
- package/node_modules/express/History.md +54 -0
- package/node_modules/express/Readme.md +39 -31
- package/node_modules/express/lib/application.js +18 -1
- package/node_modules/express/lib/response.js +40 -18
- package/node_modules/express/lib/router/index.js +20 -15
- package/node_modules/express/lib/router/route.js +9 -0
- package/node_modules/express/lib/utils.js +1 -0
- package/node_modules/express/lib/view.js +1 -1
- package/node_modules/express/package.json +25 -26
- package/node_modules/finalhandler/HISTORY.md +8 -0
- package/node_modules/finalhandler/LICENSE +1 -1
- package/node_modules/finalhandler/README.md +5 -6
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +8 -3
- package/node_modules/finalhandler/package.json +30 -32
- package/node_modules/fresh/package.json +6 -9
- package/node_modules/function-bind/.editorconfig +20 -0
- package/node_modules/function-bind/.eslintrc +15 -0
- package/node_modules/function-bind/.jscs.json +176 -0
- package/node_modules/function-bind/.npmignore +22 -0
- package/node_modules/function-bind/.travis.yml +168 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +48 -0
- package/node_modules/function-bind/implementation.js +52 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +96 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +37 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +98 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +334 -0
- package/node_modules/get-intrinsic/package.json +120 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/has/LICENSE-MIT +22 -0
- package/node_modules/has/README.md +18 -0
- package/node_modules/has/package.json +73 -0
- package/node_modules/has/src/index.js +5 -0
- package/node_modules/has/test/index.js +10 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.js +13 -0
- package/node_modules/has-symbols/package.json +126 -0
- package/node_modules/has-symbols/shams.js +42 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/node_modules/has-symbols/test/tests.js +56 -0
- package/node_modules/http-errors/HISTORY.md +15 -0
- package/node_modules/http-errors/README.md +2 -2
- package/node_modules/http-errors/index.js +15 -25
- package/node_modules/http-errors/package.json +22 -20
- package/node_modules/media-typer/package.json +6 -9
- package/node_modules/merge-descriptors/package.json +6 -9
- package/node_modules/methods/package.json +11 -14
- package/node_modules/object-inspect/.eslintrc +53 -0
- package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/node_modules/object-inspect/.nycrc +13 -0
- package/node_modules/object-inspect/CHANGELOG.md +360 -0
- package/node_modules/object-inspect/LICENSE +21 -0
- package/node_modules/object-inspect/example/all.js +23 -0
- package/node_modules/object-inspect/example/circular.js +6 -0
- package/node_modules/object-inspect/example/fn.js +5 -0
- package/node_modules/object-inspect/example/inspect.js +10 -0
- package/node_modules/object-inspect/index.js +512 -0
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +122 -0
- package/node_modules/object-inspect/readme.markdown +86 -0
- package/node_modules/object-inspect/test/bigint.js +58 -0
- package/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/node_modules/object-inspect/test/circular.js +16 -0
- package/node_modules/object-inspect/test/deep.js +12 -0
- package/node_modules/object-inspect/test/element.js +53 -0
- package/node_modules/object-inspect/test/err.js +48 -0
- package/node_modules/object-inspect/test/fakes.js +29 -0
- package/node_modules/object-inspect/test/fn.js +76 -0
- package/node_modules/object-inspect/test/has.js +15 -0
- package/node_modules/object-inspect/test/holes.js +15 -0
- package/node_modules/object-inspect/test/indent-option.js +271 -0
- package/node_modules/object-inspect/test/inspect.js +139 -0
- package/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/node_modules/object-inspect/test/number.js +58 -0
- package/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/node_modules/object-inspect/test/undef.js +12 -0
- package/node_modules/object-inspect/test/values.js +211 -0
- package/node_modules/object-inspect/test-core-js.js +26 -0
- package/node_modules/object-inspect/util.inspect.js +1 -0
- package/node_modules/on-finished/HISTORY.md +10 -0
- package/node_modules/on-finished/README.md +28 -20
- package/node_modules/on-finished/index.js +51 -13
- package/node_modules/on-finished/package.json +25 -20
- package/node_modules/path-to-regexp/package.json +6 -9
- package/node_modules/qs/CHANGELOG.md +22 -5
- package/node_modules/qs/README.md +7 -0
- package/node_modules/qs/dist/qs.js +1207 -5
- package/node_modules/qs/lib/parse.js +6 -0
- package/node_modules/qs/lib/stringify.js +33 -3
- package/node_modules/qs/package.json +16 -13
- package/node_modules/qs/test/parse.js +9 -0
- package/node_modules/qs/test/stringify.js +62 -1
- package/node_modules/raw-body/HISTORY.md +14 -0
- package/node_modules/raw-body/LICENSE +1 -1
- package/node_modules/raw-body/README.md +4 -0
- package/node_modules/raw-body/SECURITY.md +24 -0
- package/node_modules/raw-body/index.js +45 -2
- package/node_modules/raw-body/package.json +16 -15
- package/node_modules/send/HISTORY.md +15 -0
- package/node_modules/send/LICENSE +1 -1
- package/node_modules/send/README.md +2 -2
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +37 -27
- package/node_modules/send/package.json +22 -21
- package/node_modules/serve-static/HISTORY.md +12 -0
- package/node_modules/serve-static/README.md +1 -1
- package/node_modules/serve-static/package.json +16 -16
- package/node_modules/side-channel/.eslintignore +1 -0
- package/node_modules/side-channel/.eslintrc +11 -0
- package/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel/.nycrc +13 -0
- package/node_modules/side-channel/CHANGELOG.md +65 -0
- package/node_modules/side-channel/LICENSE +21 -0
- package/node_modules/side-channel/README.md +2 -0
- package/node_modules/side-channel/index.js +124 -0
- package/node_modules/side-channel/package.json +95 -0
- package/node_modules/side-channel/test/index.js +78 -0
- package/node_modules/statuses/HISTORY.md +17 -0
- package/node_modules/statuses/README.md +51 -42
- package/node_modules/statuses/codes.json +2 -3
- package/node_modules/statuses/index.js +52 -19
- package/node_modules/statuses/package.json +29 -31
- package/node_modules/unpipe/package.json +7 -9
- package/node_modules/utils-merge/package.json +6 -9
- package/package.json +2 -2
- package/worldmap/worldmap.js +22 -7
- package/worldmap.html +17 -1
- package/worldmap.js +553 -551
- package/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/depd/lib/compat/index.js +0 -79
|
@@ -47,6 +47,7 @@ var isArray = Array.isArray;
|
|
|
47
47
|
var defaults = {
|
|
48
48
|
allowDots: false,
|
|
49
49
|
allowPrototypes: false,
|
|
50
|
+
allowSparse: false,
|
|
50
51
|
arrayLimit: 20,
|
|
51
52
|
charset: 'utf-8',
|
|
52
53
|
charsetSentinel: false,
|
|
@@ -256,6 +257,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
256
257
|
return {
|
|
257
258
|
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
258
259
|
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
260
|
+
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
259
261
|
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
260
262
|
charset: charset,
|
|
261
263
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
@@ -292,12 +294,17 @@ module.exports = function (str, opts) {
|
|
|
292
294
|
obj = utils.merge(obj, newObj, options);
|
|
293
295
|
}
|
|
294
296
|
|
|
297
|
+
if (options.allowSparse === true) {
|
|
298
|
+
return obj;
|
|
299
|
+
}
|
|
300
|
+
|
|
295
301
|
return utils.compact(obj);
|
|
296
302
|
};
|
|
297
303
|
|
|
298
304
|
},{"./utils":5}],4:[function(require,module,exports){
|
|
299
305
|
'use strict';
|
|
300
306
|
|
|
307
|
+
var getSideChannel = require('side-channel');
|
|
301
308
|
var utils = require('./utils');
|
|
302
309
|
var formats = require('./formats');
|
|
303
310
|
var has = Object.prototype.hasOwnProperty;
|
|
@@ -353,6 +360,8 @@ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
|
353
360
|
|| typeof v === 'bigint';
|
|
354
361
|
};
|
|
355
362
|
|
|
363
|
+
var sentinel = {};
|
|
364
|
+
|
|
356
365
|
var stringify = function stringify(
|
|
357
366
|
object,
|
|
358
367
|
prefix,
|
|
@@ -367,9 +376,30 @@ var stringify = function stringify(
|
|
|
367
376
|
format,
|
|
368
377
|
formatter,
|
|
369
378
|
encodeValuesOnly,
|
|
370
|
-
charset
|
|
379
|
+
charset,
|
|
380
|
+
sideChannel
|
|
371
381
|
) {
|
|
372
382
|
var obj = object;
|
|
383
|
+
|
|
384
|
+
var tmpSc = sideChannel;
|
|
385
|
+
var step = 0;
|
|
386
|
+
var findFlag = false;
|
|
387
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
388
|
+
// Where object last appeared in the ref tree
|
|
389
|
+
var pos = tmpSc.get(object);
|
|
390
|
+
step += 1;
|
|
391
|
+
if (typeof pos !== 'undefined') {
|
|
392
|
+
if (pos === step) {
|
|
393
|
+
throw new RangeError('Cyclic object value');
|
|
394
|
+
} else {
|
|
395
|
+
findFlag = true; // Break while
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
399
|
+
step = 0;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
373
403
|
if (typeof filter === 'function') {
|
|
374
404
|
obj = filter(prefix, obj);
|
|
375
405
|
} else if (obj instanceof Date) {
|
|
@@ -436,6 +466,9 @@ var stringify = function stringify(
|
|
|
436
466
|
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
|
437
467
|
: prefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
438
468
|
|
|
469
|
+
sideChannel.set(object, step);
|
|
470
|
+
var valueSideChannel = getSideChannel();
|
|
471
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
439
472
|
pushToArray(values, stringify(
|
|
440
473
|
value,
|
|
441
474
|
keyPrefix,
|
|
@@ -450,7 +483,8 @@ var stringify = function stringify(
|
|
|
450
483
|
format,
|
|
451
484
|
formatter,
|
|
452
485
|
encodeValuesOnly,
|
|
453
|
-
charset
|
|
486
|
+
charset,
|
|
487
|
+
valueSideChannel
|
|
454
488
|
));
|
|
455
489
|
}
|
|
456
490
|
|
|
@@ -544,6 +578,7 @@ module.exports = function (object, opts) {
|
|
|
544
578
|
objKeys.sort(options.sort);
|
|
545
579
|
}
|
|
546
580
|
|
|
581
|
+
var sideChannel = getSideChannel();
|
|
547
582
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
548
583
|
var key = objKeys[i];
|
|
549
584
|
|
|
@@ -564,7 +599,8 @@ module.exports = function (object, opts) {
|
|
|
564
599
|
options.format,
|
|
565
600
|
options.formatter,
|
|
566
601
|
options.encodeValuesOnly,
|
|
567
|
-
options.charset
|
|
602
|
+
options.charset,
|
|
603
|
+
sideChannel
|
|
568
604
|
));
|
|
569
605
|
}
|
|
570
606
|
|
|
@@ -584,7 +620,7 @@ module.exports = function (object, opts) {
|
|
|
584
620
|
return joined.length > 0 ? prefix + joined : '';
|
|
585
621
|
};
|
|
586
622
|
|
|
587
|
-
},{"./formats":1,"./utils":5}],5:[function(require,module,exports){
|
|
623
|
+
},{"./formats":1,"./utils":5,"side-channel":16}],5:[function(require,module,exports){
|
|
588
624
|
'use strict';
|
|
589
625
|
|
|
590
626
|
var formats = require('./formats');
|
|
@@ -838,5 +874,1171 @@ module.exports = {
|
|
|
838
874
|
merge: merge
|
|
839
875
|
};
|
|
840
876
|
|
|
841
|
-
},{"./formats":1}]
|
|
877
|
+
},{"./formats":1}],6:[function(require,module,exports){
|
|
878
|
+
|
|
879
|
+
},{}],7:[function(require,module,exports){
|
|
880
|
+
'use strict';
|
|
881
|
+
|
|
882
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
883
|
+
|
|
884
|
+
var callBind = require('./');
|
|
885
|
+
|
|
886
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
887
|
+
|
|
888
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
889
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
890
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
891
|
+
return callBind(intrinsic);
|
|
892
|
+
}
|
|
893
|
+
return intrinsic;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
},{"./":8,"get-intrinsic":11}],8:[function(require,module,exports){
|
|
897
|
+
'use strict';
|
|
898
|
+
|
|
899
|
+
var bind = require('function-bind');
|
|
900
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
901
|
+
|
|
902
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
903
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
904
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
905
|
+
|
|
906
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
907
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
908
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
909
|
+
|
|
910
|
+
if ($defineProperty) {
|
|
911
|
+
try {
|
|
912
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
913
|
+
} catch (e) {
|
|
914
|
+
// IE 8 has a broken defineProperty
|
|
915
|
+
$defineProperty = null;
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
module.exports = function callBind(originalFunction) {
|
|
920
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
921
|
+
if ($gOPD && $defineProperty) {
|
|
922
|
+
var desc = $gOPD(func, 'length');
|
|
923
|
+
if (desc.configurable) {
|
|
924
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
925
|
+
$defineProperty(
|
|
926
|
+
func,
|
|
927
|
+
'length',
|
|
928
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
return func;
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
var applyBind = function applyBind() {
|
|
936
|
+
return $reflectApply(bind, $apply, arguments);
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
if ($defineProperty) {
|
|
940
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
941
|
+
} else {
|
|
942
|
+
module.exports.apply = applyBind;
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
},{"function-bind":10,"get-intrinsic":11}],9:[function(require,module,exports){
|
|
946
|
+
'use strict';
|
|
947
|
+
|
|
948
|
+
/* eslint no-invalid-this: 1 */
|
|
949
|
+
|
|
950
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
951
|
+
var slice = Array.prototype.slice;
|
|
952
|
+
var toStr = Object.prototype.toString;
|
|
953
|
+
var funcType = '[object Function]';
|
|
954
|
+
|
|
955
|
+
module.exports = function bind(that) {
|
|
956
|
+
var target = this;
|
|
957
|
+
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
|
958
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
959
|
+
}
|
|
960
|
+
var args = slice.call(arguments, 1);
|
|
961
|
+
|
|
962
|
+
var bound;
|
|
963
|
+
var binder = function () {
|
|
964
|
+
if (this instanceof bound) {
|
|
965
|
+
var result = target.apply(
|
|
966
|
+
this,
|
|
967
|
+
args.concat(slice.call(arguments))
|
|
968
|
+
);
|
|
969
|
+
if (Object(result) === result) {
|
|
970
|
+
return result;
|
|
971
|
+
}
|
|
972
|
+
return this;
|
|
973
|
+
} else {
|
|
974
|
+
return target.apply(
|
|
975
|
+
that,
|
|
976
|
+
args.concat(slice.call(arguments))
|
|
977
|
+
);
|
|
978
|
+
}
|
|
979
|
+
};
|
|
980
|
+
|
|
981
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
982
|
+
var boundArgs = [];
|
|
983
|
+
for (var i = 0; i < boundLength; i++) {
|
|
984
|
+
boundArgs.push('$' + i);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
988
|
+
|
|
989
|
+
if (target.prototype) {
|
|
990
|
+
var Empty = function Empty() {};
|
|
991
|
+
Empty.prototype = target.prototype;
|
|
992
|
+
bound.prototype = new Empty();
|
|
993
|
+
Empty.prototype = null;
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
return bound;
|
|
997
|
+
};
|
|
998
|
+
|
|
999
|
+
},{}],10:[function(require,module,exports){
|
|
1000
|
+
'use strict';
|
|
1001
|
+
|
|
1002
|
+
var implementation = require('./implementation');
|
|
1003
|
+
|
|
1004
|
+
module.exports = Function.prototype.bind || implementation;
|
|
1005
|
+
|
|
1006
|
+
},{"./implementation":9}],11:[function(require,module,exports){
|
|
1007
|
+
'use strict';
|
|
1008
|
+
|
|
1009
|
+
var undefined;
|
|
1010
|
+
|
|
1011
|
+
var $SyntaxError = SyntaxError;
|
|
1012
|
+
var $Function = Function;
|
|
1013
|
+
var $TypeError = TypeError;
|
|
1014
|
+
|
|
1015
|
+
// eslint-disable-next-line consistent-return
|
|
1016
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
1017
|
+
try {
|
|
1018
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
1019
|
+
} catch (e) {}
|
|
1020
|
+
};
|
|
1021
|
+
|
|
1022
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
1023
|
+
if ($gOPD) {
|
|
1024
|
+
try {
|
|
1025
|
+
$gOPD({}, '');
|
|
1026
|
+
} catch (e) {
|
|
1027
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
var throwTypeError = function () {
|
|
1032
|
+
throw new $TypeError();
|
|
1033
|
+
};
|
|
1034
|
+
var ThrowTypeError = $gOPD
|
|
1035
|
+
? (function () {
|
|
1036
|
+
try {
|
|
1037
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
1038
|
+
arguments.callee; // IE 8 does not throw here
|
|
1039
|
+
return throwTypeError;
|
|
1040
|
+
} catch (calleeThrows) {
|
|
1041
|
+
try {
|
|
1042
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
1043
|
+
return $gOPD(arguments, 'callee').get;
|
|
1044
|
+
} catch (gOPDthrows) {
|
|
1045
|
+
return throwTypeError;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}())
|
|
1049
|
+
: throwTypeError;
|
|
1050
|
+
|
|
1051
|
+
var hasSymbols = require('has-symbols')();
|
|
1052
|
+
|
|
1053
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
1054
|
+
|
|
1055
|
+
var needsEval = {};
|
|
1056
|
+
|
|
1057
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
|
1058
|
+
|
|
1059
|
+
var INTRINSICS = {
|
|
1060
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
|
1061
|
+
'%Array%': Array,
|
|
1062
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
|
1063
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
|
1064
|
+
'%AsyncFromSyncIteratorPrototype%': undefined,
|
|
1065
|
+
'%AsyncFunction%': needsEval,
|
|
1066
|
+
'%AsyncGenerator%': needsEval,
|
|
1067
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
1068
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
1069
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
|
1070
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
|
1071
|
+
'%Boolean%': Boolean,
|
|
1072
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
|
1073
|
+
'%Date%': Date,
|
|
1074
|
+
'%decodeURI%': decodeURI,
|
|
1075
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
1076
|
+
'%encodeURI%': encodeURI,
|
|
1077
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
1078
|
+
'%Error%': Error,
|
|
1079
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
1080
|
+
'%EvalError%': EvalError,
|
|
1081
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
|
|
1082
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
|
|
1083
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
|
|
1084
|
+
'%Function%': $Function,
|
|
1085
|
+
'%GeneratorFunction%': needsEval,
|
|
1086
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
|
|
1087
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
|
|
1088
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
|
1089
|
+
'%isFinite%': isFinite,
|
|
1090
|
+
'%isNaN%': isNaN,
|
|
1091
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
|
1092
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
|
1093
|
+
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
|
1094
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
|
1095
|
+
'%Math%': Math,
|
|
1096
|
+
'%Number%': Number,
|
|
1097
|
+
'%Object%': Object,
|
|
1098
|
+
'%parseFloat%': parseFloat,
|
|
1099
|
+
'%parseInt%': parseInt,
|
|
1100
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
|
|
1101
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
|
|
1102
|
+
'%RangeError%': RangeError,
|
|
1103
|
+
'%ReferenceError%': ReferenceError,
|
|
1104
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
|
1105
|
+
'%RegExp%': RegExp,
|
|
1106
|
+
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
|
1107
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
|
1108
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
|
1109
|
+
'%String%': String,
|
|
1110
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
|
1111
|
+
'%Symbol%': hasSymbols ? Symbol : undefined,
|
|
1112
|
+
'%SyntaxError%': $SyntaxError,
|
|
1113
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
1114
|
+
'%TypedArray%': TypedArray,
|
|
1115
|
+
'%TypeError%': $TypeError,
|
|
1116
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
|
|
1117
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
|
|
1118
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
|
|
1119
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
|
|
1120
|
+
'%URIError%': URIError,
|
|
1121
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
|
|
1122
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
|
|
1123
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
var doEval = function doEval(name) {
|
|
1127
|
+
var value;
|
|
1128
|
+
if (name === '%AsyncFunction%') {
|
|
1129
|
+
value = getEvalledConstructor('async function () {}');
|
|
1130
|
+
} else if (name === '%GeneratorFunction%') {
|
|
1131
|
+
value = getEvalledConstructor('function* () {}');
|
|
1132
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1133
|
+
value = getEvalledConstructor('async function* () {}');
|
|
1134
|
+
} else if (name === '%AsyncGenerator%') {
|
|
1135
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1136
|
+
if (fn) {
|
|
1137
|
+
value = fn.prototype;
|
|
1138
|
+
}
|
|
1139
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1140
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1141
|
+
if (gen) {
|
|
1142
|
+
value = getProto(gen.prototype);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
INTRINSICS[name] = value;
|
|
1147
|
+
|
|
1148
|
+
return value;
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1151
|
+
var LEGACY_ALIASES = {
|
|
1152
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1153
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1154
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1155
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1156
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1157
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1158
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1159
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1160
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1161
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1162
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1163
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1164
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1165
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1166
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1167
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1168
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1169
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1170
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1171
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1172
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1173
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1174
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1175
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1176
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1177
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1178
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1179
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1180
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1181
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1182
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1183
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1184
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1185
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1186
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1187
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1188
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1189
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1190
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1191
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1192
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1193
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1194
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1195
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1196
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1197
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1198
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1199
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1200
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1201
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1202
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1203
|
+
};
|
|
1204
|
+
|
|
1205
|
+
var bind = require('function-bind');
|
|
1206
|
+
var hasOwn = require('has');
|
|
1207
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
1208
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
1209
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
1210
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
1211
|
+
|
|
1212
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1213
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1214
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1215
|
+
var stringToPath = function stringToPath(string) {
|
|
1216
|
+
var first = $strSlice(string, 0, 1);
|
|
1217
|
+
var last = $strSlice(string, -1);
|
|
1218
|
+
if (first === '%' && last !== '%') {
|
|
1219
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1220
|
+
} else if (last === '%' && first !== '%') {
|
|
1221
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1222
|
+
}
|
|
1223
|
+
var result = [];
|
|
1224
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1225
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
1226
|
+
});
|
|
1227
|
+
return result;
|
|
1228
|
+
};
|
|
1229
|
+
/* end adaptation */
|
|
1230
|
+
|
|
1231
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1232
|
+
var intrinsicName = name;
|
|
1233
|
+
var alias;
|
|
1234
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1235
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1236
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1240
|
+
var value = INTRINSICS[intrinsicName];
|
|
1241
|
+
if (value === needsEval) {
|
|
1242
|
+
value = doEval(intrinsicName);
|
|
1243
|
+
}
|
|
1244
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1245
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
return {
|
|
1249
|
+
alias: alias,
|
|
1250
|
+
name: intrinsicName,
|
|
1251
|
+
value: value
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
module.exports = function GetIntrinsic(name, allowMissing) {
|
|
1259
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1260
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
1261
|
+
}
|
|
1262
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1263
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
var parts = stringToPath(name);
|
|
1267
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1268
|
+
|
|
1269
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1270
|
+
var intrinsicRealName = intrinsic.name;
|
|
1271
|
+
var value = intrinsic.value;
|
|
1272
|
+
var skipFurtherCaching = false;
|
|
1273
|
+
|
|
1274
|
+
var alias = intrinsic.alias;
|
|
1275
|
+
if (alias) {
|
|
1276
|
+
intrinsicBaseName = alias[0];
|
|
1277
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1278
|
+
}
|
|
1279
|
+
|
|
1280
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1281
|
+
var part = parts[i];
|
|
1282
|
+
var first = $strSlice(part, 0, 1);
|
|
1283
|
+
var last = $strSlice(part, -1);
|
|
1284
|
+
if (
|
|
1285
|
+
(
|
|
1286
|
+
(first === '"' || first === "'" || first === '`')
|
|
1287
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1288
|
+
)
|
|
1289
|
+
&& first !== last
|
|
1290
|
+
) {
|
|
1291
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1292
|
+
}
|
|
1293
|
+
if (part === 'constructor' || !isOwn) {
|
|
1294
|
+
skipFurtherCaching = true;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
intrinsicBaseName += '.' + part;
|
|
1298
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1299
|
+
|
|
1300
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1301
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1302
|
+
} else if (value != null) {
|
|
1303
|
+
if (!(part in value)) {
|
|
1304
|
+
if (!allowMissing) {
|
|
1305
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1306
|
+
}
|
|
1307
|
+
return void undefined;
|
|
1308
|
+
}
|
|
1309
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1310
|
+
var desc = $gOPD(value, part);
|
|
1311
|
+
isOwn = !!desc;
|
|
1312
|
+
|
|
1313
|
+
// By convention, when a data property is converted to an accessor
|
|
1314
|
+
// property to emulate a data property that does not suffer from
|
|
1315
|
+
// the override mistake, that accessor's getter is marked with
|
|
1316
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1317
|
+
// uphold the illusion by pretending to see that original data
|
|
1318
|
+
// property, i.e., returning the value rather than the getter
|
|
1319
|
+
// itself.
|
|
1320
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1321
|
+
value = desc.get;
|
|
1322
|
+
} else {
|
|
1323
|
+
value = value[part];
|
|
1324
|
+
}
|
|
1325
|
+
} else {
|
|
1326
|
+
isOwn = hasOwn(value, part);
|
|
1327
|
+
value = value[part];
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1331
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
return value;
|
|
1336
|
+
};
|
|
1337
|
+
|
|
1338
|
+
},{"function-bind":10,"has":14,"has-symbols":12}],12:[function(require,module,exports){
|
|
1339
|
+
'use strict';
|
|
1340
|
+
|
|
1341
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
1342
|
+
var hasSymbolSham = require('./shams');
|
|
1343
|
+
|
|
1344
|
+
module.exports = function hasNativeSymbols() {
|
|
1345
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
1346
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
1347
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
1348
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
1349
|
+
|
|
1350
|
+
return hasSymbolSham();
|
|
1351
|
+
};
|
|
1352
|
+
|
|
1353
|
+
},{"./shams":13}],13:[function(require,module,exports){
|
|
1354
|
+
'use strict';
|
|
1355
|
+
|
|
1356
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
1357
|
+
module.exports = function hasSymbols() {
|
|
1358
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
1359
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
1360
|
+
|
|
1361
|
+
var obj = {};
|
|
1362
|
+
var sym = Symbol('test');
|
|
1363
|
+
var symObj = Object(sym);
|
|
1364
|
+
if (typeof sym === 'string') { return false; }
|
|
1365
|
+
|
|
1366
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
1367
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
1368
|
+
|
|
1369
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
1370
|
+
// if (sym instanceof Symbol) { return false; }
|
|
1371
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
1372
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
1373
|
+
|
|
1374
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
1375
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
1376
|
+
|
|
1377
|
+
var symVal = 42;
|
|
1378
|
+
obj[sym] = symVal;
|
|
1379
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
1380
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
1381
|
+
|
|
1382
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
1383
|
+
|
|
1384
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
1385
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
1386
|
+
|
|
1387
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
1388
|
+
|
|
1389
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
1390
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
1391
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
return true;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
},{}],14:[function(require,module,exports){
|
|
1398
|
+
'use strict';
|
|
1399
|
+
|
|
1400
|
+
var bind = require('function-bind');
|
|
1401
|
+
|
|
1402
|
+
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
|
1403
|
+
|
|
1404
|
+
},{"function-bind":10}],15:[function(require,module,exports){
|
|
1405
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
1406
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
1407
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
1408
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
1409
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
1410
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
1411
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
1412
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
1413
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
1414
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
1415
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
1416
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
1417
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
1418
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
1419
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
1420
|
+
var objectToString = Object.prototype.toString;
|
|
1421
|
+
var functionToString = Function.prototype.toString;
|
|
1422
|
+
var $match = String.prototype.match;
|
|
1423
|
+
var $slice = String.prototype.slice;
|
|
1424
|
+
var $replace = String.prototype.replace;
|
|
1425
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
1426
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
1427
|
+
var $test = RegExp.prototype.test;
|
|
1428
|
+
var $concat = Array.prototype.concat;
|
|
1429
|
+
var $join = Array.prototype.join;
|
|
1430
|
+
var $arrSlice = Array.prototype.slice;
|
|
1431
|
+
var $floor = Math.floor;
|
|
1432
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
1433
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
1434
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
1435
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
1436
|
+
// ie, `has-tostringtag/shams
|
|
1437
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
1438
|
+
? Symbol.toStringTag
|
|
1439
|
+
: null;
|
|
1440
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1441
|
+
|
|
1442
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
1443
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
1444
|
+
? function (O) {
|
|
1445
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
1446
|
+
}
|
|
1447
|
+
: null
|
|
1448
|
+
);
|
|
1449
|
+
|
|
1450
|
+
function addNumericSeparator(num, str) {
|
|
1451
|
+
if (
|
|
1452
|
+
num === Infinity
|
|
1453
|
+
|| num === -Infinity
|
|
1454
|
+
|| num !== num
|
|
1455
|
+
|| (num && num > -1000 && num < 1000)
|
|
1456
|
+
|| $test.call(/e/, str)
|
|
1457
|
+
) {
|
|
1458
|
+
return str;
|
|
1459
|
+
}
|
|
1460
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
1461
|
+
if (typeof num === 'number') {
|
|
1462
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
1463
|
+
if (int !== num) {
|
|
1464
|
+
var intStr = String(int);
|
|
1465
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
1466
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
var inspectCustom = require('./util.inspect').custom;
|
|
1473
|
+
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
|
|
1474
|
+
|
|
1475
|
+
module.exports = function inspect_(obj, options, depth, seen) {
|
|
1476
|
+
var opts = options || {};
|
|
1477
|
+
|
|
1478
|
+
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
1479
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1480
|
+
}
|
|
1481
|
+
if (
|
|
1482
|
+
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
1483
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
1484
|
+
: opts.maxStringLength !== null
|
|
1485
|
+
)
|
|
1486
|
+
) {
|
|
1487
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
1488
|
+
}
|
|
1489
|
+
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
|
|
1490
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
1491
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
if (
|
|
1495
|
+
has(opts, 'indent')
|
|
1496
|
+
&& opts.indent !== null
|
|
1497
|
+
&& opts.indent !== '\t'
|
|
1498
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
1499
|
+
) {
|
|
1500
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
1501
|
+
}
|
|
1502
|
+
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
1503
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
1504
|
+
}
|
|
1505
|
+
var numericSeparator = opts.numericSeparator;
|
|
1506
|
+
|
|
1507
|
+
if (typeof obj === 'undefined') {
|
|
1508
|
+
return 'undefined';
|
|
1509
|
+
}
|
|
1510
|
+
if (obj === null) {
|
|
1511
|
+
return 'null';
|
|
1512
|
+
}
|
|
1513
|
+
if (typeof obj === 'boolean') {
|
|
1514
|
+
return obj ? 'true' : 'false';
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
if (typeof obj === 'string') {
|
|
1518
|
+
return inspectString(obj, opts);
|
|
1519
|
+
}
|
|
1520
|
+
if (typeof obj === 'number') {
|
|
1521
|
+
if (obj === 0) {
|
|
1522
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
1523
|
+
}
|
|
1524
|
+
var str = String(obj);
|
|
1525
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
1526
|
+
}
|
|
1527
|
+
if (typeof obj === 'bigint') {
|
|
1528
|
+
var bigIntStr = String(obj) + 'n';
|
|
1529
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
1533
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
1534
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
1535
|
+
return isArray(obj) ? '[Array]' : '[Object]';
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
var indent = getIndent(opts, depth);
|
|
1539
|
+
|
|
1540
|
+
if (typeof seen === 'undefined') {
|
|
1541
|
+
seen = [];
|
|
1542
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
1543
|
+
return '[Circular]';
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
function inspect(value, from, noIndent) {
|
|
1547
|
+
if (from) {
|
|
1548
|
+
seen = $arrSlice.call(seen);
|
|
1549
|
+
seen.push(from);
|
|
1550
|
+
}
|
|
1551
|
+
if (noIndent) {
|
|
1552
|
+
var newOpts = {
|
|
1553
|
+
depth: opts.depth
|
|
1554
|
+
};
|
|
1555
|
+
if (has(opts, 'quoteStyle')) {
|
|
1556
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
1557
|
+
}
|
|
1558
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
1559
|
+
}
|
|
1560
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
if (typeof obj === 'function') {
|
|
1564
|
+
var name = nameOf(obj);
|
|
1565
|
+
var keys = arrObjKeys(obj, inspect);
|
|
1566
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
1567
|
+
}
|
|
1568
|
+
if (isSymbol(obj)) {
|
|
1569
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
1570
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
1571
|
+
}
|
|
1572
|
+
if (isElement(obj)) {
|
|
1573
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
1574
|
+
var attrs = obj.attributes || [];
|
|
1575
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
1576
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
1577
|
+
}
|
|
1578
|
+
s += '>';
|
|
1579
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
1580
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
1581
|
+
return s;
|
|
1582
|
+
}
|
|
1583
|
+
if (isArray(obj)) {
|
|
1584
|
+
if (obj.length === 0) { return '[]'; }
|
|
1585
|
+
var xs = arrObjKeys(obj, inspect);
|
|
1586
|
+
if (indent && !singleLineValues(xs)) {
|
|
1587
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
1588
|
+
}
|
|
1589
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
1590
|
+
}
|
|
1591
|
+
if (isError(obj)) {
|
|
1592
|
+
var parts = arrObjKeys(obj, inspect);
|
|
1593
|
+
if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
1594
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
1595
|
+
}
|
|
1596
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
1597
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
1598
|
+
}
|
|
1599
|
+
if (typeof obj === 'object' && customInspect) {
|
|
1600
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
|
|
1601
|
+
return obj[inspectSymbol]();
|
|
1602
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
1603
|
+
return obj.inspect();
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
if (isMap(obj)) {
|
|
1607
|
+
var mapParts = [];
|
|
1608
|
+
mapForEach.call(obj, function (value, key) {
|
|
1609
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
1610
|
+
});
|
|
1611
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
1612
|
+
}
|
|
1613
|
+
if (isSet(obj)) {
|
|
1614
|
+
var setParts = [];
|
|
1615
|
+
setForEach.call(obj, function (value) {
|
|
1616
|
+
setParts.push(inspect(value, obj));
|
|
1617
|
+
});
|
|
1618
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
1619
|
+
}
|
|
1620
|
+
if (isWeakMap(obj)) {
|
|
1621
|
+
return weakCollectionOf('WeakMap');
|
|
1622
|
+
}
|
|
1623
|
+
if (isWeakSet(obj)) {
|
|
1624
|
+
return weakCollectionOf('WeakSet');
|
|
1625
|
+
}
|
|
1626
|
+
if (isWeakRef(obj)) {
|
|
1627
|
+
return weakCollectionOf('WeakRef');
|
|
1628
|
+
}
|
|
1629
|
+
if (isNumber(obj)) {
|
|
1630
|
+
return markBoxed(inspect(Number(obj)));
|
|
1631
|
+
}
|
|
1632
|
+
if (isBigInt(obj)) {
|
|
1633
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
1634
|
+
}
|
|
1635
|
+
if (isBoolean(obj)) {
|
|
1636
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
1637
|
+
}
|
|
1638
|
+
if (isString(obj)) {
|
|
1639
|
+
return markBoxed(inspect(String(obj)));
|
|
1640
|
+
}
|
|
1641
|
+
if (!isDate(obj) && !isRegExp(obj)) {
|
|
1642
|
+
var ys = arrObjKeys(obj, inspect);
|
|
1643
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1644
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
1645
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
1646
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
1647
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
1648
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
1649
|
+
if (indent) {
|
|
1650
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
1651
|
+
}
|
|
1652
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
1653
|
+
}
|
|
1654
|
+
return String(obj);
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
1658
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
1659
|
+
return quoteChar + s + quoteChar;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
function quote(s) {
|
|
1663
|
+
return $replace.call(String(s), /"/g, '"');
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1667
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1668
|
+
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1669
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1670
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1671
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1672
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1673
|
+
|
|
1674
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
1675
|
+
function isSymbol(obj) {
|
|
1676
|
+
if (hasShammedSymbols) {
|
|
1677
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
1678
|
+
}
|
|
1679
|
+
if (typeof obj === 'symbol') {
|
|
1680
|
+
return true;
|
|
1681
|
+
}
|
|
1682
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
1683
|
+
return false;
|
|
1684
|
+
}
|
|
1685
|
+
try {
|
|
1686
|
+
symToString.call(obj);
|
|
1687
|
+
return true;
|
|
1688
|
+
} catch (e) {}
|
|
1689
|
+
return false;
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
function isBigInt(obj) {
|
|
1693
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
1694
|
+
return false;
|
|
1695
|
+
}
|
|
1696
|
+
try {
|
|
1697
|
+
bigIntValueOf.call(obj);
|
|
1698
|
+
return true;
|
|
1699
|
+
} catch (e) {}
|
|
1700
|
+
return false;
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
1704
|
+
function has(obj, key) {
|
|
1705
|
+
return hasOwn.call(obj, key);
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
function toStr(obj) {
|
|
1709
|
+
return objectToString.call(obj);
|
|
1710
|
+
}
|
|
1711
|
+
|
|
1712
|
+
function nameOf(f) {
|
|
1713
|
+
if (f.name) { return f.name; }
|
|
1714
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
1715
|
+
if (m) { return m[1]; }
|
|
1716
|
+
return null;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
function indexOf(xs, x) {
|
|
1720
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
1721
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
1722
|
+
if (xs[i] === x) { return i; }
|
|
1723
|
+
}
|
|
1724
|
+
return -1;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
function isMap(x) {
|
|
1728
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
1729
|
+
return false;
|
|
1730
|
+
}
|
|
1731
|
+
try {
|
|
1732
|
+
mapSize.call(x);
|
|
1733
|
+
try {
|
|
1734
|
+
setSize.call(x);
|
|
1735
|
+
} catch (s) {
|
|
1736
|
+
return true;
|
|
1737
|
+
}
|
|
1738
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
1739
|
+
} catch (e) {}
|
|
1740
|
+
return false;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
function isWeakMap(x) {
|
|
1744
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
1745
|
+
return false;
|
|
1746
|
+
}
|
|
1747
|
+
try {
|
|
1748
|
+
weakMapHas.call(x, weakMapHas);
|
|
1749
|
+
try {
|
|
1750
|
+
weakSetHas.call(x, weakSetHas);
|
|
1751
|
+
} catch (s) {
|
|
1752
|
+
return true;
|
|
1753
|
+
}
|
|
1754
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
1755
|
+
} catch (e) {}
|
|
1756
|
+
return false;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
function isWeakRef(x) {
|
|
1760
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
1761
|
+
return false;
|
|
1762
|
+
}
|
|
1763
|
+
try {
|
|
1764
|
+
weakRefDeref.call(x);
|
|
1765
|
+
return true;
|
|
1766
|
+
} catch (e) {}
|
|
1767
|
+
return false;
|
|
1768
|
+
}
|
|
1769
|
+
|
|
1770
|
+
function isSet(x) {
|
|
1771
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
1772
|
+
return false;
|
|
1773
|
+
}
|
|
1774
|
+
try {
|
|
1775
|
+
setSize.call(x);
|
|
1776
|
+
try {
|
|
1777
|
+
mapSize.call(x);
|
|
1778
|
+
} catch (m) {
|
|
1779
|
+
return true;
|
|
1780
|
+
}
|
|
1781
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
1782
|
+
} catch (e) {}
|
|
1783
|
+
return false;
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
function isWeakSet(x) {
|
|
1787
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
1788
|
+
return false;
|
|
1789
|
+
}
|
|
1790
|
+
try {
|
|
1791
|
+
weakSetHas.call(x, weakSetHas);
|
|
1792
|
+
try {
|
|
1793
|
+
weakMapHas.call(x, weakMapHas);
|
|
1794
|
+
} catch (s) {
|
|
1795
|
+
return true;
|
|
1796
|
+
}
|
|
1797
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
1798
|
+
} catch (e) {}
|
|
1799
|
+
return false;
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
function isElement(x) {
|
|
1803
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
1804
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
1805
|
+
return true;
|
|
1806
|
+
}
|
|
1807
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
function inspectString(str, opts) {
|
|
1811
|
+
if (str.length > opts.maxStringLength) {
|
|
1812
|
+
var remaining = str.length - opts.maxStringLength;
|
|
1813
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1814
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1815
|
+
}
|
|
1816
|
+
// eslint-disable-next-line no-control-regex
|
|
1817
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1818
|
+
return wrapQuotes(s, 'single', opts);
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
function lowbyte(c) {
|
|
1822
|
+
var n = c.charCodeAt(0);
|
|
1823
|
+
var x = {
|
|
1824
|
+
8: 'b',
|
|
1825
|
+
9: 't',
|
|
1826
|
+
10: 'n',
|
|
1827
|
+
12: 'f',
|
|
1828
|
+
13: 'r'
|
|
1829
|
+
}[n];
|
|
1830
|
+
if (x) { return '\\' + x; }
|
|
1831
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
function markBoxed(str) {
|
|
1835
|
+
return 'Object(' + str + ')';
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
function weakCollectionOf(type) {
|
|
1839
|
+
return type + ' { ? }';
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
function collectionOf(type, size, entries, indent) {
|
|
1843
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
1844
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
function singleLineValues(xs) {
|
|
1848
|
+
for (var i = 0; i < xs.length; i++) {
|
|
1849
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
1850
|
+
return false;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
return true;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
function getIndent(opts, depth) {
|
|
1857
|
+
var baseIndent;
|
|
1858
|
+
if (opts.indent === '\t') {
|
|
1859
|
+
baseIndent = '\t';
|
|
1860
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
1861
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
1862
|
+
} else {
|
|
1863
|
+
return null;
|
|
1864
|
+
}
|
|
1865
|
+
return {
|
|
1866
|
+
base: baseIndent,
|
|
1867
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
1868
|
+
};
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
function indentedJoin(xs, indent) {
|
|
1872
|
+
if (xs.length === 0) { return ''; }
|
|
1873
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
1874
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
1875
|
+
}
|
|
1876
|
+
|
|
1877
|
+
function arrObjKeys(obj, inspect) {
|
|
1878
|
+
var isArr = isArray(obj);
|
|
1879
|
+
var xs = [];
|
|
1880
|
+
if (isArr) {
|
|
1881
|
+
xs.length = obj.length;
|
|
1882
|
+
for (var i = 0; i < obj.length; i++) {
|
|
1883
|
+
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
|
|
1884
|
+
}
|
|
1885
|
+
}
|
|
1886
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
1887
|
+
var symMap;
|
|
1888
|
+
if (hasShammedSymbols) {
|
|
1889
|
+
symMap = {};
|
|
1890
|
+
for (var k = 0; k < syms.length; k++) {
|
|
1891
|
+
symMap['$' + syms[k]] = syms[k];
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
1896
|
+
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1897
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1898
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
1899
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
1900
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
1901
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
1902
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
1903
|
+
} else {
|
|
1904
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
1905
|
+
}
|
|
1906
|
+
}
|
|
1907
|
+
if (typeof gOPS === 'function') {
|
|
1908
|
+
for (var j = 0; j < syms.length; j++) {
|
|
1909
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
1910
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
return xs;
|
|
1915
|
+
}
|
|
1916
|
+
|
|
1917
|
+
},{"./util.inspect":6}],16:[function(require,module,exports){
|
|
1918
|
+
'use strict';
|
|
1919
|
+
|
|
1920
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
1921
|
+
var callBound = require('call-bind/callBound');
|
|
1922
|
+
var inspect = require('object-inspect');
|
|
1923
|
+
|
|
1924
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
1925
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
1926
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
1927
|
+
|
|
1928
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
1929
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
1930
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
1931
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
1932
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
1933
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
1934
|
+
|
|
1935
|
+
/*
|
|
1936
|
+
* This function traverses the list returning the node corresponding to the
|
|
1937
|
+
* given key.
|
|
1938
|
+
*
|
|
1939
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
1940
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
1941
|
+
* used nodes can be accessed relatively quickly.
|
|
1942
|
+
*/
|
|
1943
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
1944
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
1945
|
+
if (curr.key === key) {
|
|
1946
|
+
prev.next = curr.next;
|
|
1947
|
+
curr.next = list.next;
|
|
1948
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1949
|
+
return curr;
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
};
|
|
1953
|
+
|
|
1954
|
+
var listGet = function (objects, key) {
|
|
1955
|
+
var node = listGetNode(objects, key);
|
|
1956
|
+
return node && node.value;
|
|
1957
|
+
};
|
|
1958
|
+
var listSet = function (objects, key, value) {
|
|
1959
|
+
var node = listGetNode(objects, key);
|
|
1960
|
+
if (node) {
|
|
1961
|
+
node.value = value;
|
|
1962
|
+
} else {
|
|
1963
|
+
// Prepend the new node to the beginning of the list
|
|
1964
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
1965
|
+
key: key,
|
|
1966
|
+
next: objects.next,
|
|
1967
|
+
value: value
|
|
1968
|
+
};
|
|
1969
|
+
}
|
|
1970
|
+
};
|
|
1971
|
+
var listHas = function (objects, key) {
|
|
1972
|
+
return !!listGetNode(objects, key);
|
|
1973
|
+
};
|
|
1974
|
+
|
|
1975
|
+
module.exports = function getSideChannel() {
|
|
1976
|
+
var $wm;
|
|
1977
|
+
var $m;
|
|
1978
|
+
var $o;
|
|
1979
|
+
var channel = {
|
|
1980
|
+
assert: function (key) {
|
|
1981
|
+
if (!channel.has(key)) {
|
|
1982
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
1983
|
+
}
|
|
1984
|
+
},
|
|
1985
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
1986
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1987
|
+
if ($wm) {
|
|
1988
|
+
return $weakMapGet($wm, key);
|
|
1989
|
+
}
|
|
1990
|
+
} else if ($Map) {
|
|
1991
|
+
if ($m) {
|
|
1992
|
+
return $mapGet($m, key);
|
|
1993
|
+
}
|
|
1994
|
+
} else {
|
|
1995
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
1996
|
+
return listGet($o, key);
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
},
|
|
2000
|
+
has: function (key) {
|
|
2001
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2002
|
+
if ($wm) {
|
|
2003
|
+
return $weakMapHas($wm, key);
|
|
2004
|
+
}
|
|
2005
|
+
} else if ($Map) {
|
|
2006
|
+
if ($m) {
|
|
2007
|
+
return $mapHas($m, key);
|
|
2008
|
+
}
|
|
2009
|
+
} else {
|
|
2010
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
2011
|
+
return listHas($o, key);
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
return false;
|
|
2015
|
+
},
|
|
2016
|
+
set: function (key, value) {
|
|
2017
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2018
|
+
if (!$wm) {
|
|
2019
|
+
$wm = new $WeakMap();
|
|
2020
|
+
}
|
|
2021
|
+
$weakMapSet($wm, key, value);
|
|
2022
|
+
} else if ($Map) {
|
|
2023
|
+
if (!$m) {
|
|
2024
|
+
$m = new $Map();
|
|
2025
|
+
}
|
|
2026
|
+
$mapSet($m, key, value);
|
|
2027
|
+
} else {
|
|
2028
|
+
if (!$o) {
|
|
2029
|
+
/*
|
|
2030
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
2031
|
+
* to special-case handling of the first node: we can always refer to
|
|
2032
|
+
* it as (previous node).next, instead of something like (list).head
|
|
2033
|
+
*/
|
|
2034
|
+
$o = { key: {}, next: null };
|
|
2035
|
+
}
|
|
2036
|
+
listSet($o, key, value);
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
};
|
|
2040
|
+
return channel;
|
|
2041
|
+
};
|
|
2042
|
+
|
|
2043
|
+
},{"call-bind/callBound":7,"get-intrinsic":11,"object-inspect":15}]},{},[2])(2)
|
|
842
2044
|
});
|