@bigbinary/neeto-commons-frontend 2.0.7 → 2.0.9
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/README.md +1 -1
- package/initializers.cjs.js +17 -21
- package/initializers.js +17 -21
- package/package.json +2 -2
- package/pure.cjs.js +49 -41
- package/pure.d.ts +3 -1
- package/pure.js +49 -42
- package/react-utils.cjs.js +8 -1
- package/react-utils.d.ts +3 -3
- package/react-utils.js +8 -1
- package/utils.cjs.js +1950 -514
- package/utils.js +1950 -515
package/utils.cjs.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var axios = require('axios');
|
|
6
6
|
var ramda = require('ramda');
|
|
7
7
|
var i18next = require('i18next');
|
|
8
|
+
var require$$0 = require('util');
|
|
8
9
|
var dayjs = require('dayjs');
|
|
9
10
|
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
10
11
|
var updateLocale = require('dayjs/plugin/updateLocale');
|
|
@@ -13,6 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
14
|
|
|
14
15
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
15
16
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
17
|
+
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
16
18
|
var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
|
|
17
19
|
var relativeTime__default = /*#__PURE__*/_interopDefaultLegacy(relativeTime);
|
|
18
20
|
var updateLocale__default = /*#__PURE__*/_interopDefaultLegacy(updateLocale);
|
|
@@ -143,7 +145,7 @@ function _defineProperty(obj, key, value) {
|
|
|
143
145
|
|
|
144
146
|
var regeneratorRuntime$1 = {exports: {}};
|
|
145
147
|
|
|
146
|
-
var _typeof = {exports: {}};
|
|
148
|
+
var _typeof$1 = {exports: {}};
|
|
147
149
|
|
|
148
150
|
(function (module) {
|
|
149
151
|
function _typeof(obj) {
|
|
@@ -157,10 +159,10 @@ var _typeof = {exports: {}};
|
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
160
|
-
} (_typeof));
|
|
162
|
+
} (_typeof$1));
|
|
161
163
|
|
|
162
164
|
(function (module) {
|
|
163
|
-
var _typeof
|
|
165
|
+
var _typeof = _typeof$1.exports["default"];
|
|
164
166
|
|
|
165
167
|
function _regeneratorRuntime() {
|
|
166
168
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
@@ -287,7 +289,7 @@ var _typeof = {exports: {}};
|
|
|
287
289
|
if ("throw" !== record.type) {
|
|
288
290
|
var result = record.arg,
|
|
289
291
|
value = result.value;
|
|
290
|
-
return value && "object" == _typeof
|
|
292
|
+
return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
|
|
291
293
|
invoke("next", value, resolve, reject);
|
|
292
294
|
}, function (err) {
|
|
293
295
|
invoke("throw", err, resolve, reject);
|
|
@@ -546,625 +548,2059 @@ var getRandomInt = function getRandomInt() {
|
|
|
546
548
|
return Math.floor(Math.random() * (b - a) + a);
|
|
547
549
|
};
|
|
548
550
|
|
|
549
|
-
|
|
551
|
+
function _typeof(obj) {
|
|
552
|
+
"@babel/helpers - typeof";
|
|
550
553
|
|
|
551
|
-
|
|
554
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
555
|
+
return typeof obj;
|
|
556
|
+
} : function (obj) {
|
|
557
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
558
|
+
}, _typeof(obj);
|
|
559
|
+
}
|
|
552
560
|
|
|
553
|
-
var
|
|
554
|
-
var
|
|
555
|
-
var multiMatcher = new RegExp('(' + token + ')+', 'gi');
|
|
561
|
+
var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
|
|
562
|
+
var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
556
563
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
return decodeURIComponent(components.join(''));
|
|
561
|
-
} catch (err) {
|
|
562
|
-
// Do nothing
|
|
563
|
-
}
|
|
564
|
+
if (objectPreProcessor && typeof objectPreProcessor === "function") {
|
|
565
|
+
object = objectPreProcessor(object);
|
|
566
|
+
}
|
|
564
567
|
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
+
if (Array.isArray(object)) {
|
|
569
|
+
return object.map(function (obj) {
|
|
570
|
+
return transformObjectDeep(obj, keyValueTransformer, objectPreProcessor);
|
|
571
|
+
});
|
|
572
|
+
} else if (object === null || _typeof(object) !== "object") {
|
|
573
|
+
return object;
|
|
574
|
+
}
|
|
568
575
|
|
|
569
|
-
|
|
576
|
+
return Object.fromEntries(Object.entries(object).map(function (_ref3) {
|
|
577
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
578
|
+
key = _ref4[0],
|
|
579
|
+
value = _ref4[1];
|
|
570
580
|
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
581
|
+
return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer, objectPreProcessor));
|
|
582
|
+
}));
|
|
583
|
+
};
|
|
584
|
+
var preprocessForSerialization = function preprocessForSerialization(object) {
|
|
585
|
+
return transformObjectDeep(object, function (key, value) {
|
|
586
|
+
return [key, value];
|
|
587
|
+
}, function (object) {
|
|
588
|
+
return typeof (object === null || object === void 0 ? void 0 : object.toJSON) === "function" ? object.toJSON() : object;
|
|
589
|
+
});
|
|
590
|
+
};
|
|
574
591
|
|
|
575
|
-
|
|
576
|
-
|
|
592
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
593
|
+
var shams = function hasSymbols() {
|
|
594
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
595
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
577
596
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
var tokens = input.match(singleMatcher);
|
|
597
|
+
var obj = {};
|
|
598
|
+
var sym = Symbol('test');
|
|
599
|
+
var symObj = Object(sym);
|
|
600
|
+
if (typeof sym === 'string') { return false; }
|
|
583
601
|
|
|
584
|
-
|
|
585
|
-
|
|
602
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
603
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
586
604
|
|
|
587
|
-
|
|
588
|
-
|
|
605
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
606
|
+
// if (sym instanceof Symbol) { return false; }
|
|
607
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
608
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
589
609
|
|
|
590
|
-
|
|
591
|
-
}
|
|
592
|
-
}
|
|
610
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
611
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
593
612
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
'%FF%FE': '\uFFFD\uFFFD'
|
|
599
|
-
};
|
|
613
|
+
var symVal = 42;
|
|
614
|
+
obj[sym] = symVal;
|
|
615
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
616
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
600
617
|
|
|
601
|
-
|
|
602
|
-
while (match) {
|
|
603
|
-
try {
|
|
604
|
-
// Decode as big chunks as possible
|
|
605
|
-
replaceMap[match[0]] = decodeURIComponent(match[0]);
|
|
606
|
-
} catch (err) {
|
|
607
|
-
var result = decode(match[0]);
|
|
618
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
608
619
|
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
620
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
621
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
622
|
+
|
|
623
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
613
624
|
|
|
614
|
-
|
|
625
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
626
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
627
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
615
628
|
}
|
|
616
629
|
|
|
617
|
-
|
|
618
|
-
|
|
630
|
+
return true;
|
|
631
|
+
};
|
|
619
632
|
|
|
620
|
-
|
|
633
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
634
|
+
var hasSymbolSham = shams;
|
|
621
635
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
}
|
|
636
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
637
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
638
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
639
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
640
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
627
641
|
|
|
628
|
-
return
|
|
629
|
-
}
|
|
642
|
+
return hasSymbolSham();
|
|
643
|
+
};
|
|
630
644
|
|
|
631
|
-
|
|
632
|
-
if (typeof encodedURI !== 'string') {
|
|
633
|
-
throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
|
|
634
|
-
}
|
|
645
|
+
/* eslint no-invalid-this: 1 */
|
|
635
646
|
|
|
636
|
-
|
|
637
|
-
|
|
647
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
648
|
+
var slice = Array.prototype.slice;
|
|
649
|
+
var toStr$1 = Object.prototype.toString;
|
|
650
|
+
var funcType = '[object Function]';
|
|
638
651
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
652
|
+
var implementation$1 = function bind(that) {
|
|
653
|
+
var target = this;
|
|
654
|
+
if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
|
|
655
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
656
|
+
}
|
|
657
|
+
var args = slice.call(arguments, 1);
|
|
658
|
+
|
|
659
|
+
var bound;
|
|
660
|
+
var binder = function () {
|
|
661
|
+
if (this instanceof bound) {
|
|
662
|
+
var result = target.apply(
|
|
663
|
+
this,
|
|
664
|
+
args.concat(slice.call(arguments))
|
|
665
|
+
);
|
|
666
|
+
if (Object(result) === result) {
|
|
667
|
+
return result;
|
|
668
|
+
}
|
|
669
|
+
return this;
|
|
670
|
+
} else {
|
|
671
|
+
return target.apply(
|
|
672
|
+
that,
|
|
673
|
+
args.concat(slice.call(arguments))
|
|
674
|
+
);
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
679
|
+
var boundArgs = [];
|
|
680
|
+
for (var i = 0; i < boundLength; i++) {
|
|
681
|
+
boundArgs.push('$' + i);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
685
|
+
|
|
686
|
+
if (target.prototype) {
|
|
687
|
+
var Empty = function Empty() {};
|
|
688
|
+
Empty.prototype = target.prototype;
|
|
689
|
+
bound.prototype = new Empty();
|
|
690
|
+
Empty.prototype = null;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
return bound;
|
|
645
694
|
};
|
|
646
695
|
|
|
647
|
-
var
|
|
648
|
-
if (!(typeof string === 'string' && typeof separator === 'string')) {
|
|
649
|
-
throw new TypeError('Expected the arguments to be of type `string`');
|
|
650
|
-
}
|
|
696
|
+
var implementation = implementation$1;
|
|
651
697
|
|
|
652
|
-
|
|
653
|
-
return [string];
|
|
654
|
-
}
|
|
698
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
655
699
|
|
|
656
|
-
|
|
700
|
+
var bind$1 = functionBind;
|
|
657
701
|
|
|
658
|
-
|
|
659
|
-
return [string];
|
|
660
|
-
}
|
|
702
|
+
var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
|
|
661
703
|
|
|
662
|
-
|
|
663
|
-
string.slice(0, separatorIndex),
|
|
664
|
-
string.slice(separatorIndex + separator.length)
|
|
665
|
-
];
|
|
666
|
-
};
|
|
704
|
+
var undefined$1;
|
|
667
705
|
|
|
668
|
-
var
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
var isArr = Array.isArray(predicate);
|
|
706
|
+
var $SyntaxError = SyntaxError;
|
|
707
|
+
var $Function = Function;
|
|
708
|
+
var $TypeError$1 = TypeError;
|
|
672
709
|
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
710
|
+
// eslint-disable-next-line consistent-return
|
|
711
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
712
|
+
try {
|
|
713
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
714
|
+
} catch (e) {}
|
|
715
|
+
};
|
|
676
716
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
717
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
718
|
+
if ($gOPD) {
|
|
719
|
+
try {
|
|
720
|
+
$gOPD({}, '');
|
|
721
|
+
} catch (e) {
|
|
722
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
680
723
|
}
|
|
724
|
+
}
|
|
681
725
|
|
|
682
|
-
|
|
726
|
+
var throwTypeError = function () {
|
|
727
|
+
throw new $TypeError$1();
|
|
683
728
|
};
|
|
684
|
-
|
|
685
|
-
(function (
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
switch (options.arrayFormat) {
|
|
697
|
-
case 'index':
|
|
698
|
-
return key => (result, value) => {
|
|
699
|
-
const index = result.length;
|
|
700
|
-
|
|
701
|
-
if (
|
|
702
|
-
value === undefined ||
|
|
703
|
-
(options.skipNull && value === null) ||
|
|
704
|
-
(options.skipEmptyString && value === '')
|
|
705
|
-
) {
|
|
706
|
-
return result;
|
|
707
|
-
}
|
|
708
|
-
|
|
709
|
-
if (value === null) {
|
|
710
|
-
return [...result, [encode(key, options), '[', index, ']'].join('')];
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
return [
|
|
714
|
-
...result,
|
|
715
|
-
[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')
|
|
716
|
-
];
|
|
717
|
-
};
|
|
718
|
-
|
|
719
|
-
case 'bracket':
|
|
720
|
-
return key => (result, value) => {
|
|
721
|
-
if (
|
|
722
|
-
value === undefined ||
|
|
723
|
-
(options.skipNull && value === null) ||
|
|
724
|
-
(options.skipEmptyString && value === '')
|
|
725
|
-
) {
|
|
726
|
-
return result;
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
if (value === null) {
|
|
730
|
-
return [...result, [encode(key, options), '[]'].join('')];
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
return [...result, [encode(key, options), '[]=', encode(value, options)].join('')];
|
|
734
|
-
};
|
|
735
|
-
|
|
736
|
-
case 'colon-list-separator':
|
|
737
|
-
return key => (result, value) => {
|
|
738
|
-
if (
|
|
739
|
-
value === undefined ||
|
|
740
|
-
(options.skipNull && value === null) ||
|
|
741
|
-
(options.skipEmptyString && value === '')
|
|
742
|
-
) {
|
|
743
|
-
return result;
|
|
744
|
-
}
|
|
745
|
-
|
|
746
|
-
if (value === null) {
|
|
747
|
-
return [...result, [encode(key, options), ':list='].join('')];
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
return [...result, [encode(key, options), ':list=', encode(value, options)].join('')];
|
|
751
|
-
};
|
|
752
|
-
|
|
753
|
-
case 'comma':
|
|
754
|
-
case 'separator':
|
|
755
|
-
case 'bracket-separator': {
|
|
756
|
-
const keyValueSep = options.arrayFormat === 'bracket-separator' ?
|
|
757
|
-
'[]=' :
|
|
758
|
-
'=';
|
|
759
|
-
|
|
760
|
-
return key => (result, value) => {
|
|
761
|
-
if (
|
|
762
|
-
value === undefined ||
|
|
763
|
-
(options.skipNull && value === null) ||
|
|
764
|
-
(options.skipEmptyString && value === '')
|
|
765
|
-
) {
|
|
766
|
-
return result;
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
// Translate null to an empty string so that it doesn't serialize as 'null'
|
|
770
|
-
value = value === null ? '' : value;
|
|
771
|
-
|
|
772
|
-
if (result.length === 0) {
|
|
773
|
-
return [[encode(key, options), keyValueSep, encode(value, options)].join('')];
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
return [[result, encode(value, options)].join(options.arrayFormatSeparator)];
|
|
777
|
-
};
|
|
729
|
+
var ThrowTypeError = $gOPD
|
|
730
|
+
? (function () {
|
|
731
|
+
try {
|
|
732
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
733
|
+
arguments.callee; // IE 8 does not throw here
|
|
734
|
+
return throwTypeError;
|
|
735
|
+
} catch (calleeThrows) {
|
|
736
|
+
try {
|
|
737
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
738
|
+
return $gOPD(arguments, 'callee').get;
|
|
739
|
+
} catch (gOPDthrows) {
|
|
740
|
+
return throwTypeError;
|
|
778
741
|
}
|
|
779
|
-
|
|
780
|
-
default:
|
|
781
|
-
return key => (result, value) => {
|
|
782
|
-
if (
|
|
783
|
-
value === undefined ||
|
|
784
|
-
(options.skipNull && value === null) ||
|
|
785
|
-
(options.skipEmptyString && value === '')
|
|
786
|
-
) {
|
|
787
|
-
return result;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
if (value === null) {
|
|
791
|
-
return [...result, encode(key, options)];
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
return [...result, [encode(key, options), '=', encode(value, options)].join('')];
|
|
795
|
-
};
|
|
796
742
|
}
|
|
797
|
-
}
|
|
743
|
+
}())
|
|
744
|
+
: throwTypeError;
|
|
745
|
+
|
|
746
|
+
var hasSymbols = hasSymbols$1();
|
|
747
|
+
|
|
748
|
+
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
|
749
|
+
|
|
750
|
+
var needsEval = {};
|
|
751
|
+
|
|
752
|
+
var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
|
|
753
|
+
|
|
754
|
+
var INTRINSICS = {
|
|
755
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
756
|
+
'%Array%': Array,
|
|
757
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
758
|
+
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
759
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
760
|
+
'%AsyncFunction%': needsEval,
|
|
761
|
+
'%AsyncGenerator%': needsEval,
|
|
762
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
763
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
764
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
765
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
766
|
+
'%Boolean%': Boolean,
|
|
767
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
768
|
+
'%Date%': Date,
|
|
769
|
+
'%decodeURI%': decodeURI,
|
|
770
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
771
|
+
'%encodeURI%': encodeURI,
|
|
772
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
773
|
+
'%Error%': Error,
|
|
774
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
775
|
+
'%EvalError%': EvalError,
|
|
776
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
777
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
778
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
779
|
+
'%Function%': $Function,
|
|
780
|
+
'%GeneratorFunction%': needsEval,
|
|
781
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
782
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
783
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
784
|
+
'%isFinite%': isFinite,
|
|
785
|
+
'%isNaN%': isNaN,
|
|
786
|
+
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
787
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
788
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
789
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
790
|
+
'%Math%': Math,
|
|
791
|
+
'%Number%': Number,
|
|
792
|
+
'%Object%': Object,
|
|
793
|
+
'%parseFloat%': parseFloat,
|
|
794
|
+
'%parseInt%': parseInt,
|
|
795
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
796
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
797
|
+
'%RangeError%': RangeError,
|
|
798
|
+
'%ReferenceError%': ReferenceError,
|
|
799
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
800
|
+
'%RegExp%': RegExp,
|
|
801
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
802
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
803
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
804
|
+
'%String%': String,
|
|
805
|
+
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
806
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
807
|
+
'%SyntaxError%': $SyntaxError,
|
|
808
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
809
|
+
'%TypedArray%': TypedArray,
|
|
810
|
+
'%TypeError%': $TypeError$1,
|
|
811
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
812
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
813
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
814
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
815
|
+
'%URIError%': URIError,
|
|
816
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
817
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
818
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
819
|
+
};
|
|
798
820
|
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
accumulator[key][result[1]] = value;
|
|
819
|
-
};
|
|
820
|
-
|
|
821
|
-
case 'bracket':
|
|
822
|
-
return (key, value, accumulator) => {
|
|
823
|
-
result = /(\[\])$/.exec(key);
|
|
824
|
-
key = key.replace(/\[\]$/, '');
|
|
825
|
-
|
|
826
|
-
if (!result) {
|
|
827
|
-
accumulator[key] = value;
|
|
828
|
-
return;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
if (accumulator[key] === undefined) {
|
|
832
|
-
accumulator[key] = [value];
|
|
833
|
-
return;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
accumulator[key] = [].concat(accumulator[key], value);
|
|
837
|
-
};
|
|
838
|
-
|
|
839
|
-
case 'colon-list-separator':
|
|
840
|
-
return (key, value, accumulator) => {
|
|
841
|
-
result = /(:list)$/.exec(key);
|
|
842
|
-
key = key.replace(/:list$/, '');
|
|
843
|
-
|
|
844
|
-
if (!result) {
|
|
845
|
-
accumulator[key] = value;
|
|
846
|
-
return;
|
|
847
|
-
}
|
|
848
|
-
|
|
849
|
-
if (accumulator[key] === undefined) {
|
|
850
|
-
accumulator[key] = [value];
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
accumulator[key] = [].concat(accumulator[key], value);
|
|
855
|
-
};
|
|
856
|
-
|
|
857
|
-
case 'comma':
|
|
858
|
-
case 'separator':
|
|
859
|
-
return (key, value, accumulator) => {
|
|
860
|
-
const isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);
|
|
861
|
-
const isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));
|
|
862
|
-
value = isEncodedArray ? decode(value, options) : value;
|
|
863
|
-
const newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);
|
|
864
|
-
accumulator[key] = newValue;
|
|
865
|
-
};
|
|
866
|
-
|
|
867
|
-
case 'bracket-separator':
|
|
868
|
-
return (key, value, accumulator) => {
|
|
869
|
-
const isArray = /(\[\])$/.test(key);
|
|
870
|
-
key = key.replace(/\[\]$/, '');
|
|
871
|
-
|
|
872
|
-
if (!isArray) {
|
|
873
|
-
accumulator[key] = value ? decode(value, options) : value;
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
|
-
const arrayValue = value === null ?
|
|
878
|
-
[] :
|
|
879
|
-
value.split(options.arrayFormatSeparator).map(item => decode(item, options));
|
|
880
|
-
|
|
881
|
-
if (accumulator[key] === undefined) {
|
|
882
|
-
accumulator[key] = arrayValue;
|
|
883
|
-
return;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
accumulator[key] = [].concat(accumulator[key], arrayValue);
|
|
887
|
-
};
|
|
888
|
-
|
|
889
|
-
default:
|
|
890
|
-
return (key, value, accumulator) => {
|
|
891
|
-
if (accumulator[key] === undefined) {
|
|
892
|
-
accumulator[key] = value;
|
|
893
|
-
return;
|
|
894
|
-
}
|
|
895
|
-
|
|
896
|
-
accumulator[key] = [].concat(accumulator[key], value);
|
|
897
|
-
};
|
|
821
|
+
var doEval = function doEval(name) {
|
|
822
|
+
var value;
|
|
823
|
+
if (name === '%AsyncFunction%') {
|
|
824
|
+
value = getEvalledConstructor('async function () {}');
|
|
825
|
+
} else if (name === '%GeneratorFunction%') {
|
|
826
|
+
value = getEvalledConstructor('function* () {}');
|
|
827
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
828
|
+
value = getEvalledConstructor('async function* () {}');
|
|
829
|
+
} else if (name === '%AsyncGenerator%') {
|
|
830
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
831
|
+
if (fn) {
|
|
832
|
+
value = fn.prototype;
|
|
833
|
+
}
|
|
834
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
835
|
+
var gen = doEval('%AsyncGenerator%');
|
|
836
|
+
if (gen) {
|
|
837
|
+
value = getProto(gen.prototype);
|
|
898
838
|
}
|
|
899
839
|
}
|
|
900
840
|
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
841
|
+
INTRINSICS[name] = value;
|
|
842
|
+
|
|
843
|
+
return value;
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
var LEGACY_ALIASES = {
|
|
847
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
848
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
849
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
850
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
851
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
852
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
853
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
854
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
855
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
856
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
857
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
858
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
859
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
860
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
861
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
862
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
863
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
864
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
865
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
866
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
867
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
868
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
869
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
870
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
871
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
872
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
873
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
874
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
875
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
876
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
877
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
878
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
879
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
880
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
881
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
882
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
883
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
884
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
885
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
886
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
887
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
888
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
889
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
890
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
891
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
892
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
893
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
894
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
895
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
896
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
897
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
var bind = functionBind;
|
|
901
|
+
var hasOwn$1 = src;
|
|
902
|
+
var $concat$1 = bind.call(Function.call, Array.prototype.concat);
|
|
903
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
904
|
+
var $replace$1 = bind.call(Function.call, String.prototype.replace);
|
|
905
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
906
|
+
|
|
907
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
908
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
909
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
910
|
+
var stringToPath = function stringToPath(string) {
|
|
911
|
+
var first = $strSlice(string, 0, 1);
|
|
912
|
+
var last = $strSlice(string, -1);
|
|
913
|
+
if (first === '%' && last !== '%') {
|
|
914
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
915
|
+
} else if (last === '%' && first !== '%') {
|
|
916
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
917
|
+
}
|
|
918
|
+
var result = [];
|
|
919
|
+
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
920
|
+
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
921
|
+
});
|
|
922
|
+
return result;
|
|
923
|
+
};
|
|
924
|
+
/* end adaptation */
|
|
925
|
+
|
|
926
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
927
|
+
var intrinsicName = name;
|
|
928
|
+
var alias;
|
|
929
|
+
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
930
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
931
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
905
932
|
}
|
|
906
933
|
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
934
|
+
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
935
|
+
var value = INTRINSICS[intrinsicName];
|
|
936
|
+
if (value === needsEval) {
|
|
937
|
+
value = doEval(intrinsicName);
|
|
938
|
+
}
|
|
939
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
940
|
+
throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
910
941
|
}
|
|
911
942
|
|
|
912
|
-
return
|
|
943
|
+
return {
|
|
944
|
+
alias: alias,
|
|
945
|
+
name: intrinsicName,
|
|
946
|
+
value: value
|
|
947
|
+
};
|
|
913
948
|
}
|
|
914
949
|
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
return decodeComponent(value);
|
|
918
|
-
}
|
|
950
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
951
|
+
};
|
|
919
952
|
|
|
920
|
-
|
|
953
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
954
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
955
|
+
throw new $TypeError$1('intrinsic name must be a non-empty string');
|
|
956
|
+
}
|
|
957
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
958
|
+
throw new $TypeError$1('"allowMissing" argument must be a boolean');
|
|
921
959
|
}
|
|
922
960
|
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
return input.sort();
|
|
926
|
-
}
|
|
961
|
+
var parts = stringToPath(name);
|
|
962
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
927
963
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
}
|
|
964
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
965
|
+
var intrinsicRealName = intrinsic.name;
|
|
966
|
+
var value = intrinsic.value;
|
|
967
|
+
var skipFurtherCaching = false;
|
|
933
968
|
|
|
934
|
-
|
|
969
|
+
var alias = intrinsic.alias;
|
|
970
|
+
if (alias) {
|
|
971
|
+
intrinsicBaseName = alias[0];
|
|
972
|
+
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
935
973
|
}
|
|
936
974
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
975
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
976
|
+
var part = parts[i];
|
|
977
|
+
var first = $strSlice(part, 0, 1);
|
|
978
|
+
var last = $strSlice(part, -1);
|
|
979
|
+
if (
|
|
980
|
+
(
|
|
981
|
+
(first === '"' || first === "'" || first === '`')
|
|
982
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
983
|
+
)
|
|
984
|
+
&& first !== last
|
|
985
|
+
) {
|
|
986
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
987
|
+
}
|
|
988
|
+
if (part === 'constructor' || !isOwn) {
|
|
989
|
+
skipFurtherCaching = true;
|
|
941
990
|
}
|
|
942
991
|
|
|
943
|
-
|
|
944
|
-
|
|
992
|
+
intrinsicBaseName += '.' + part;
|
|
993
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
994
|
+
|
|
995
|
+
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
996
|
+
value = INTRINSICS[intrinsicRealName];
|
|
997
|
+
} else if (value != null) {
|
|
998
|
+
if (!(part in value)) {
|
|
999
|
+
if (!allowMissing) {
|
|
1000
|
+
throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1001
|
+
}
|
|
1002
|
+
return void undefined$1;
|
|
1003
|
+
}
|
|
1004
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1005
|
+
var desc = $gOPD(value, part);
|
|
1006
|
+
isOwn = !!desc;
|
|
1007
|
+
|
|
1008
|
+
// By convention, when a data property is converted to an accessor
|
|
1009
|
+
// property to emulate a data property that does not suffer from
|
|
1010
|
+
// the override mistake, that accessor's getter is marked with
|
|
1011
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1012
|
+
// uphold the illusion by pretending to see that original data
|
|
1013
|
+
// property, i.e., returning the value rather than the getter
|
|
1014
|
+
// itself.
|
|
1015
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1016
|
+
value = desc.get;
|
|
1017
|
+
} else {
|
|
1018
|
+
value = value[part];
|
|
1019
|
+
}
|
|
1020
|
+
} else {
|
|
1021
|
+
isOwn = hasOwn$1(value, part);
|
|
1022
|
+
value = value[part];
|
|
1023
|
+
}
|
|
945
1024
|
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
if (hashStart !== -1) {
|
|
950
|
-
hash = url.slice(hashStart);
|
|
1025
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1026
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1027
|
+
}
|
|
951
1028
|
}
|
|
1029
|
+
}
|
|
1030
|
+
return value;
|
|
1031
|
+
};
|
|
1032
|
+
|
|
1033
|
+
var callBind$1 = {exports: {}};
|
|
1034
|
+
|
|
1035
|
+
(function (module) {
|
|
1036
|
+
|
|
1037
|
+
var bind = functionBind;
|
|
1038
|
+
var GetIntrinsic = getIntrinsic;
|
|
952
1039
|
|
|
953
|
-
|
|
1040
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
1041
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
1042
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
1043
|
+
|
|
1044
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
1045
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
1046
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
1047
|
+
|
|
1048
|
+
if ($defineProperty) {
|
|
1049
|
+
try {
|
|
1050
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1051
|
+
} catch (e) {
|
|
1052
|
+
// IE 8 has a broken defineProperty
|
|
1053
|
+
$defineProperty = null;
|
|
1054
|
+
}
|
|
954
1055
|
}
|
|
955
1056
|
|
|
956
|
-
function
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
1057
|
+
module.exports = function callBind(originalFunction) {
|
|
1058
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
1059
|
+
if ($gOPD && $defineProperty) {
|
|
1060
|
+
var desc = $gOPD(func, 'length');
|
|
1061
|
+
if (desc.configurable) {
|
|
1062
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
1063
|
+
$defineProperty(
|
|
1064
|
+
func,
|
|
1065
|
+
'length',
|
|
1066
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
1067
|
+
);
|
|
1068
|
+
}
|
|
961
1069
|
}
|
|
1070
|
+
return func;
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
var applyBind = function applyBind() {
|
|
1074
|
+
return $reflectApply(bind, $apply, arguments);
|
|
1075
|
+
};
|
|
962
1076
|
|
|
963
|
-
|
|
1077
|
+
if ($defineProperty) {
|
|
1078
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
1079
|
+
} else {
|
|
1080
|
+
module.exports.apply = applyBind;
|
|
964
1081
|
}
|
|
1082
|
+
} (callBind$1));
|
|
965
1083
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
}
|
|
1084
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
1085
|
+
|
|
1086
|
+
var callBind = callBind$1.exports;
|
|
1087
|
+
|
|
1088
|
+
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
972
1089
|
|
|
973
|
-
|
|
1090
|
+
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
1091
|
+
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
1092
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
1093
|
+
return callBind(intrinsic);
|
|
974
1094
|
}
|
|
1095
|
+
return intrinsic;
|
|
1096
|
+
};
|
|
975
1097
|
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1098
|
+
var util_inspect = require$$0__default["default"].inspect;
|
|
1099
|
+
|
|
1100
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
1101
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
1102
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
1103
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
1104
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
1105
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
1106
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
1107
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
1108
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
1109
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
1110
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
1111
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
1112
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
1113
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
1114
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
1115
|
+
var objectToString = Object.prototype.toString;
|
|
1116
|
+
var functionToString = Function.prototype.toString;
|
|
1117
|
+
var $match = String.prototype.match;
|
|
1118
|
+
var $slice = String.prototype.slice;
|
|
1119
|
+
var $replace = String.prototype.replace;
|
|
1120
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
1121
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
1122
|
+
var $test = RegExp.prototype.test;
|
|
1123
|
+
var $concat = Array.prototype.concat;
|
|
1124
|
+
var $join = Array.prototype.join;
|
|
1125
|
+
var $arrSlice = Array.prototype.slice;
|
|
1126
|
+
var $floor = Math.floor;
|
|
1127
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
1128
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
1129
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
1130
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
1131
|
+
// ie, `has-tostringtag/shams
|
|
1132
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
1133
|
+
? Symbol.toStringTag
|
|
1134
|
+
: null;
|
|
1135
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1136
|
+
|
|
1137
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
1138
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
1139
|
+
? function (O) {
|
|
1140
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
1141
|
+
}
|
|
1142
|
+
: null
|
|
1143
|
+
);
|
|
1144
|
+
|
|
1145
|
+
function addNumericSeparator(num, str) {
|
|
1146
|
+
if (
|
|
1147
|
+
num === Infinity
|
|
1148
|
+
|| num === -Infinity
|
|
1149
|
+
|| num !== num
|
|
1150
|
+
|| (num && num > -1000 && num < 1000)
|
|
1151
|
+
|| $test.call(/e/, str)
|
|
1152
|
+
) {
|
|
1153
|
+
return str;
|
|
1154
|
+
}
|
|
1155
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
1156
|
+
if (typeof num === 'number') {
|
|
1157
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
1158
|
+
if (int !== num) {
|
|
1159
|
+
var intStr = String(int);
|
|
1160
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
1161
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
1165
|
+
}
|
|
985
1166
|
|
|
986
|
-
|
|
1167
|
+
var inspectCustom = util_inspect.custom;
|
|
1168
|
+
var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
|
|
987
1169
|
|
|
988
|
-
|
|
1170
|
+
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
1171
|
+
var opts = options || {};
|
|
989
1172
|
|
|
990
|
-
|
|
991
|
-
|
|
1173
|
+
if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
1174
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1175
|
+
}
|
|
1176
|
+
if (
|
|
1177
|
+
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
1178
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
1179
|
+
: opts.maxStringLength !== null
|
|
1180
|
+
)
|
|
1181
|
+
) {
|
|
1182
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
1183
|
+
}
|
|
1184
|
+
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
1185
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
1186
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
1187
|
+
}
|
|
992
1188
|
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1189
|
+
if (
|
|
1190
|
+
has$3(opts, 'indent')
|
|
1191
|
+
&& opts.indent !== null
|
|
1192
|
+
&& opts.indent !== '\t'
|
|
1193
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
1194
|
+
) {
|
|
1195
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
1196
|
+
}
|
|
1197
|
+
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
1198
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
1199
|
+
}
|
|
1200
|
+
var numericSeparator = opts.numericSeparator;
|
|
996
1201
|
|
|
997
|
-
|
|
1202
|
+
if (typeof obj === 'undefined') {
|
|
1203
|
+
return 'undefined';
|
|
1204
|
+
}
|
|
1205
|
+
if (obj === null) {
|
|
1206
|
+
return 'null';
|
|
1207
|
+
}
|
|
1208
|
+
if (typeof obj === 'boolean') {
|
|
1209
|
+
return obj ? 'true' : 'false';
|
|
1210
|
+
}
|
|
998
1211
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1212
|
+
if (typeof obj === 'string') {
|
|
1213
|
+
return inspectString(obj, opts);
|
|
1214
|
+
}
|
|
1215
|
+
if (typeof obj === 'number') {
|
|
1216
|
+
if (obj === 0) {
|
|
1217
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
1218
|
+
}
|
|
1219
|
+
var str = String(obj);
|
|
1220
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
1221
|
+
}
|
|
1222
|
+
if (typeof obj === 'bigint') {
|
|
1223
|
+
var bigIntStr = String(obj) + 'n';
|
|
1224
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
1225
|
+
}
|
|
1002
1226
|
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1227
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
1228
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
1229
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
1230
|
+
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
1231
|
+
}
|
|
1007
1232
|
|
|
1008
|
-
|
|
1233
|
+
var indent = getIndent(opts, depth);
|
|
1009
1234
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1235
|
+
if (typeof seen === 'undefined') {
|
|
1236
|
+
seen = [];
|
|
1237
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
1238
|
+
return '[Circular]';
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
function inspect(value, from, noIndent) {
|
|
1242
|
+
if (from) {
|
|
1243
|
+
seen = $arrSlice.call(seen);
|
|
1244
|
+
seen.push(from);
|
|
1245
|
+
}
|
|
1246
|
+
if (noIndent) {
|
|
1247
|
+
var newOpts = {
|
|
1248
|
+
depth: opts.depth
|
|
1249
|
+
};
|
|
1250
|
+
if (has$3(opts, 'quoteStyle')) {
|
|
1251
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
1252
|
+
}
|
|
1253
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
1254
|
+
}
|
|
1255
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
if (typeof obj === 'function') {
|
|
1259
|
+
var name = nameOf(obj);
|
|
1260
|
+
var keys = arrObjKeys(obj, inspect);
|
|
1261
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
1262
|
+
}
|
|
1263
|
+
if (isSymbol(obj)) {
|
|
1264
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
1265
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
1266
|
+
}
|
|
1267
|
+
if (isElement(obj)) {
|
|
1268
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
1269
|
+
var attrs = obj.attributes || [];
|
|
1270
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
1271
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
1272
|
+
}
|
|
1273
|
+
s += '>';
|
|
1274
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
1275
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
1276
|
+
return s;
|
|
1277
|
+
}
|
|
1278
|
+
if (isArray$3(obj)) {
|
|
1279
|
+
if (obj.length === 0) { return '[]'; }
|
|
1280
|
+
var xs = arrObjKeys(obj, inspect);
|
|
1281
|
+
if (indent && !singleLineValues(xs)) {
|
|
1282
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
1283
|
+
}
|
|
1284
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
1285
|
+
}
|
|
1286
|
+
if (isError(obj)) {
|
|
1287
|
+
var parts = arrObjKeys(obj, inspect);
|
|
1288
|
+
if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
1289
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
1290
|
+
}
|
|
1291
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
1292
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
1293
|
+
}
|
|
1294
|
+
if (typeof obj === 'object' && customInspect) {
|
|
1295
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
|
|
1296
|
+
return obj[inspectSymbol]();
|
|
1297
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
1298
|
+
return obj.inspect();
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
if (isMap(obj)) {
|
|
1302
|
+
var mapParts = [];
|
|
1303
|
+
mapForEach.call(obj, function (value, key) {
|
|
1304
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
1305
|
+
});
|
|
1306
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
1307
|
+
}
|
|
1308
|
+
if (isSet(obj)) {
|
|
1309
|
+
var setParts = [];
|
|
1310
|
+
setForEach.call(obj, function (value) {
|
|
1311
|
+
setParts.push(inspect(value, obj));
|
|
1312
|
+
});
|
|
1313
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
1314
|
+
}
|
|
1315
|
+
if (isWeakMap(obj)) {
|
|
1316
|
+
return weakCollectionOf('WeakMap');
|
|
1317
|
+
}
|
|
1318
|
+
if (isWeakSet(obj)) {
|
|
1319
|
+
return weakCollectionOf('WeakSet');
|
|
1320
|
+
}
|
|
1321
|
+
if (isWeakRef(obj)) {
|
|
1322
|
+
return weakCollectionOf('WeakRef');
|
|
1323
|
+
}
|
|
1324
|
+
if (isNumber(obj)) {
|
|
1325
|
+
return markBoxed(inspect(Number(obj)));
|
|
1326
|
+
}
|
|
1327
|
+
if (isBigInt(obj)) {
|
|
1328
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
1329
|
+
}
|
|
1330
|
+
if (isBoolean(obj)) {
|
|
1331
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
1332
|
+
}
|
|
1333
|
+
if (isString(obj)) {
|
|
1334
|
+
return markBoxed(inspect(String(obj)));
|
|
1335
|
+
}
|
|
1336
|
+
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
1337
|
+
var ys = arrObjKeys(obj, inspect);
|
|
1338
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1339
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
1340
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
1341
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
1342
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
1343
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
1344
|
+
if (indent) {
|
|
1345
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
1346
|
+
}
|
|
1347
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
1348
|
+
}
|
|
1349
|
+
return String(obj);
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
1353
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
1354
|
+
return quoteChar + s + quoteChar;
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
function quote(s) {
|
|
1358
|
+
return $replace.call(String(s), /"/g, '"');
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1362
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1363
|
+
function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1364
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1365
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1366
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1367
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1368
|
+
|
|
1369
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
1370
|
+
function isSymbol(obj) {
|
|
1371
|
+
if (hasShammedSymbols) {
|
|
1372
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
1373
|
+
}
|
|
1374
|
+
if (typeof obj === 'symbol') {
|
|
1375
|
+
return true;
|
|
1376
|
+
}
|
|
1377
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
1378
|
+
return false;
|
|
1379
|
+
}
|
|
1380
|
+
try {
|
|
1381
|
+
symToString.call(obj);
|
|
1382
|
+
return true;
|
|
1383
|
+
} catch (e) {}
|
|
1384
|
+
return false;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
function isBigInt(obj) {
|
|
1388
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
1389
|
+
return false;
|
|
1390
|
+
}
|
|
1391
|
+
try {
|
|
1392
|
+
bigIntValueOf.call(obj);
|
|
1393
|
+
return true;
|
|
1394
|
+
} catch (e) {}
|
|
1395
|
+
return false;
|
|
1396
|
+
}
|
|
1397
|
+
|
|
1398
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
1399
|
+
function has$3(obj, key) {
|
|
1400
|
+
return hasOwn.call(obj, key);
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
function toStr(obj) {
|
|
1404
|
+
return objectToString.call(obj);
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
function nameOf(f) {
|
|
1408
|
+
if (f.name) { return f.name; }
|
|
1409
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
1410
|
+
if (m) { return m[1]; }
|
|
1411
|
+
return null;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
function indexOf(xs, x) {
|
|
1415
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
1416
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
1417
|
+
if (xs[i] === x) { return i; }
|
|
1418
|
+
}
|
|
1419
|
+
return -1;
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
function isMap(x) {
|
|
1423
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
1424
|
+
return false;
|
|
1425
|
+
}
|
|
1426
|
+
try {
|
|
1427
|
+
mapSize.call(x);
|
|
1428
|
+
try {
|
|
1429
|
+
setSize.call(x);
|
|
1430
|
+
} catch (s) {
|
|
1431
|
+
return true;
|
|
1432
|
+
}
|
|
1433
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
1434
|
+
} catch (e) {}
|
|
1435
|
+
return false;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
function isWeakMap(x) {
|
|
1439
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
1440
|
+
return false;
|
|
1441
|
+
}
|
|
1442
|
+
try {
|
|
1443
|
+
weakMapHas.call(x, weakMapHas);
|
|
1444
|
+
try {
|
|
1445
|
+
weakSetHas.call(x, weakSetHas);
|
|
1446
|
+
} catch (s) {
|
|
1447
|
+
return true;
|
|
1448
|
+
}
|
|
1449
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
1450
|
+
} catch (e) {}
|
|
1451
|
+
return false;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
function isWeakRef(x) {
|
|
1455
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
1456
|
+
return false;
|
|
1457
|
+
}
|
|
1458
|
+
try {
|
|
1459
|
+
weakRefDeref.call(x);
|
|
1460
|
+
return true;
|
|
1461
|
+
} catch (e) {}
|
|
1462
|
+
return false;
|
|
1463
|
+
}
|
|
1464
|
+
|
|
1465
|
+
function isSet(x) {
|
|
1466
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
1467
|
+
return false;
|
|
1468
|
+
}
|
|
1469
|
+
try {
|
|
1470
|
+
setSize.call(x);
|
|
1471
|
+
try {
|
|
1472
|
+
mapSize.call(x);
|
|
1473
|
+
} catch (m) {
|
|
1474
|
+
return true;
|
|
1475
|
+
}
|
|
1476
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
1477
|
+
} catch (e) {}
|
|
1478
|
+
return false;
|
|
1479
|
+
}
|
|
1480
|
+
|
|
1481
|
+
function isWeakSet(x) {
|
|
1482
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
1483
|
+
return false;
|
|
1484
|
+
}
|
|
1485
|
+
try {
|
|
1486
|
+
weakSetHas.call(x, weakSetHas);
|
|
1487
|
+
try {
|
|
1488
|
+
weakMapHas.call(x, weakMapHas);
|
|
1489
|
+
} catch (s) {
|
|
1490
|
+
return true;
|
|
1491
|
+
}
|
|
1492
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
1493
|
+
} catch (e) {}
|
|
1494
|
+
return false;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
function isElement(x) {
|
|
1498
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
1499
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
1500
|
+
return true;
|
|
1501
|
+
}
|
|
1502
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
function inspectString(str, opts) {
|
|
1506
|
+
if (str.length > opts.maxStringLength) {
|
|
1507
|
+
var remaining = str.length - opts.maxStringLength;
|
|
1508
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1509
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1510
|
+
}
|
|
1511
|
+
// eslint-disable-next-line no-control-regex
|
|
1512
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1513
|
+
return wrapQuotes(s, 'single', opts);
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
function lowbyte(c) {
|
|
1517
|
+
var n = c.charCodeAt(0);
|
|
1518
|
+
var x = {
|
|
1519
|
+
8: 'b',
|
|
1520
|
+
9: 't',
|
|
1521
|
+
10: 'n',
|
|
1522
|
+
12: 'f',
|
|
1523
|
+
13: 'r'
|
|
1524
|
+
}[n];
|
|
1525
|
+
if (x) { return '\\' + x; }
|
|
1526
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
function markBoxed(str) {
|
|
1530
|
+
return 'Object(' + str + ')';
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
function weakCollectionOf(type) {
|
|
1534
|
+
return type + ' { ? }';
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
function collectionOf(type, size, entries, indent) {
|
|
1538
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
1539
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
function singleLineValues(xs) {
|
|
1543
|
+
for (var i = 0; i < xs.length; i++) {
|
|
1544
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
1545
|
+
return false;
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
return true;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
function getIndent(opts, depth) {
|
|
1552
|
+
var baseIndent;
|
|
1553
|
+
if (opts.indent === '\t') {
|
|
1554
|
+
baseIndent = '\t';
|
|
1555
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
1556
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
1557
|
+
} else {
|
|
1558
|
+
return null;
|
|
1559
|
+
}
|
|
1560
|
+
return {
|
|
1561
|
+
base: baseIndent,
|
|
1562
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
function indentedJoin(xs, indent) {
|
|
1567
|
+
if (xs.length === 0) { return ''; }
|
|
1568
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
1569
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
function arrObjKeys(obj, inspect) {
|
|
1573
|
+
var isArr = isArray$3(obj);
|
|
1574
|
+
var xs = [];
|
|
1575
|
+
if (isArr) {
|
|
1576
|
+
xs.length = obj.length;
|
|
1577
|
+
for (var i = 0; i < obj.length; i++) {
|
|
1578
|
+
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
1582
|
+
var symMap;
|
|
1583
|
+
if (hasShammedSymbols) {
|
|
1584
|
+
symMap = {};
|
|
1585
|
+
for (var k = 0; k < syms.length; k++) {
|
|
1586
|
+
symMap['$' + syms[k]] = syms[k];
|
|
1587
|
+
}
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
1591
|
+
if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1592
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1593
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
1594
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
1595
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
1596
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
1597
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
1598
|
+
} else {
|
|
1599
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
if (typeof gOPS === 'function') {
|
|
1603
|
+
for (var j = 0; j < syms.length; j++) {
|
|
1604
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
1605
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
return xs;
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
var GetIntrinsic = getIntrinsic;
|
|
1613
|
+
var callBound = callBound$1;
|
|
1614
|
+
var inspect = objectInspect;
|
|
1615
|
+
|
|
1616
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
1617
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
1618
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
1619
|
+
|
|
1620
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
1621
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
1622
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
1623
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
1624
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
1625
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
1626
|
+
|
|
1627
|
+
/*
|
|
1628
|
+
* This function traverses the list returning the node corresponding to the
|
|
1629
|
+
* given key.
|
|
1630
|
+
*
|
|
1631
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
1632
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
1633
|
+
* used nodes can be accessed relatively quickly.
|
|
1634
|
+
*/
|
|
1635
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
1636
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
1637
|
+
if (curr.key === key) {
|
|
1638
|
+
prev.next = curr.next;
|
|
1639
|
+
curr.next = list.next;
|
|
1640
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1641
|
+
return curr;
|
|
1014
1642
|
}
|
|
1643
|
+
}
|
|
1644
|
+
};
|
|
1015
1645
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1646
|
+
var listGet = function (objects, key) {
|
|
1647
|
+
var node = listGetNode(objects, key);
|
|
1648
|
+
return node && node.value;
|
|
1649
|
+
};
|
|
1650
|
+
var listSet = function (objects, key, value) {
|
|
1651
|
+
var node = listGetNode(objects, key);
|
|
1652
|
+
if (node) {
|
|
1653
|
+
node.value = value;
|
|
1654
|
+
} else {
|
|
1655
|
+
// Prepend the new node to the beginning of the list
|
|
1656
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
1657
|
+
key: key,
|
|
1658
|
+
next: objects.next,
|
|
1659
|
+
value: value
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
};
|
|
1663
|
+
var listHas = function (objects, key) {
|
|
1664
|
+
return !!listGetNode(objects, key);
|
|
1665
|
+
};
|
|
1666
|
+
|
|
1667
|
+
var sideChannel = function getSideChannel() {
|
|
1668
|
+
var $wm;
|
|
1669
|
+
var $m;
|
|
1670
|
+
var $o;
|
|
1671
|
+
var channel = {
|
|
1672
|
+
assert: function (key) {
|
|
1673
|
+
if (!channel.has(key)) {
|
|
1674
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
1678
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1679
|
+
if ($wm) {
|
|
1680
|
+
return $weakMapGet($wm, key);
|
|
1681
|
+
}
|
|
1682
|
+
} else if ($Map) {
|
|
1683
|
+
if ($m) {
|
|
1684
|
+
return $mapGet($m, key);
|
|
1685
|
+
}
|
|
1686
|
+
} else {
|
|
1687
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
1688
|
+
return listGet($o, key);
|
|
1689
|
+
}
|
|
1690
|
+
}
|
|
1691
|
+
},
|
|
1692
|
+
has: function (key) {
|
|
1693
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1694
|
+
if ($wm) {
|
|
1695
|
+
return $weakMapHas($wm, key);
|
|
1696
|
+
}
|
|
1697
|
+
} else if ($Map) {
|
|
1698
|
+
if ($m) {
|
|
1699
|
+
return $mapHas($m, key);
|
|
1700
|
+
}
|
|
1701
|
+
} else {
|
|
1702
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
1703
|
+
return listHas($o, key);
|
|
1021
1704
|
}
|
|
1705
|
+
}
|
|
1706
|
+
return false;
|
|
1707
|
+
},
|
|
1708
|
+
set: function (key, value) {
|
|
1709
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1710
|
+
if (!$wm) {
|
|
1711
|
+
$wm = new $WeakMap();
|
|
1712
|
+
}
|
|
1713
|
+
$weakMapSet($wm, key, value);
|
|
1714
|
+
} else if ($Map) {
|
|
1715
|
+
if (!$m) {
|
|
1716
|
+
$m = new $Map();
|
|
1717
|
+
}
|
|
1718
|
+
$mapSet($m, key, value);
|
|
1022
1719
|
} else {
|
|
1023
|
-
|
|
1720
|
+
if (!$o) {
|
|
1721
|
+
/*
|
|
1722
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
1723
|
+
* to special-case handling of the first node: we can always refer to
|
|
1724
|
+
* it as (previous node).next, instead of something like (list).head
|
|
1725
|
+
*/
|
|
1726
|
+
$o = { key: {}, next: null };
|
|
1727
|
+
}
|
|
1728
|
+
listSet($o, key, value);
|
|
1024
1729
|
}
|
|
1025
1730
|
}
|
|
1731
|
+
};
|
|
1732
|
+
return channel;
|
|
1733
|
+
};
|
|
1026
1734
|
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
}
|
|
1735
|
+
var replace = String.prototype.replace;
|
|
1736
|
+
var percentTwenties = /%20/g;
|
|
1030
1737
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
result[key] = keysSorter(value);
|
|
1036
|
-
} else {
|
|
1037
|
-
result[key] = value;
|
|
1038
|
-
}
|
|
1738
|
+
var Format = {
|
|
1739
|
+
RFC1738: 'RFC1738',
|
|
1740
|
+
RFC3986: 'RFC3986'
|
|
1741
|
+
};
|
|
1039
1742
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1743
|
+
var formats$3 = {
|
|
1744
|
+
'default': Format.RFC3986,
|
|
1745
|
+
formatters: {
|
|
1746
|
+
RFC1738: function (value) {
|
|
1747
|
+
return replace.call(value, percentTwenties, '+');
|
|
1748
|
+
},
|
|
1749
|
+
RFC3986: function (value) {
|
|
1750
|
+
return String(value);
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
RFC1738: Format.RFC1738,
|
|
1754
|
+
RFC3986: Format.RFC3986
|
|
1755
|
+
};
|
|
1043
1756
|
|
|
1044
|
-
|
|
1045
|
-
exports.parse = parse;
|
|
1757
|
+
var formats$2 = formats$3;
|
|
1046
1758
|
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
return '';
|
|
1050
|
-
}
|
|
1759
|
+
var has$2 = Object.prototype.hasOwnProperty;
|
|
1760
|
+
var isArray$2 = Array.isArray;
|
|
1051
1761
|
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
}, options);
|
|
1762
|
+
var hexTable = (function () {
|
|
1763
|
+
var array = [];
|
|
1764
|
+
for (var i = 0; i < 256; ++i) {
|
|
1765
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
1766
|
+
}
|
|
1058
1767
|
|
|
1059
|
-
|
|
1768
|
+
return array;
|
|
1769
|
+
}());
|
|
1060
1770
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1771
|
+
var compactQueue = function compactQueue(queue) {
|
|
1772
|
+
while (queue.length > 1) {
|
|
1773
|
+
var item = queue.pop();
|
|
1774
|
+
var obj = item.obj[item.prop];
|
|
1065
1775
|
|
|
1066
|
-
|
|
1776
|
+
if (isArray$2(obj)) {
|
|
1777
|
+
var compacted = [];
|
|
1067
1778
|
|
|
1068
|
-
|
|
1779
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
1780
|
+
if (typeof obj[j] !== 'undefined') {
|
|
1781
|
+
compacted.push(obj[j]);
|
|
1782
|
+
}
|
|
1783
|
+
}
|
|
1069
1784
|
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
}
|
|
1785
|
+
item.obj[item.prop] = compacted;
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
};
|
|
1075
1789
|
|
|
1076
|
-
|
|
1790
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
1791
|
+
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
1792
|
+
for (var i = 0; i < source.length; ++i) {
|
|
1793
|
+
if (typeof source[i] !== 'undefined') {
|
|
1794
|
+
obj[i] = source[i];
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1077
1797
|
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
}
|
|
1798
|
+
return obj;
|
|
1799
|
+
};
|
|
1081
1800
|
|
|
1082
|
-
|
|
1083
|
-
|
|
1801
|
+
var merge = function merge(target, source, options) {
|
|
1802
|
+
/* eslint no-param-reassign: 0 */
|
|
1803
|
+
if (!source) {
|
|
1804
|
+
return target;
|
|
1805
|
+
}
|
|
1084
1806
|
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1807
|
+
if (typeof source !== 'object') {
|
|
1808
|
+
if (isArray$2(target)) {
|
|
1809
|
+
target.push(source);
|
|
1810
|
+
} else if (target && typeof target === 'object') {
|
|
1811
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
|
|
1812
|
+
target[source] = true;
|
|
1813
|
+
}
|
|
1814
|
+
} else {
|
|
1815
|
+
return [target, source];
|
|
1816
|
+
}
|
|
1088
1817
|
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
}
|
|
1818
|
+
return target;
|
|
1819
|
+
}
|
|
1092
1820
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
}
|
|
1821
|
+
if (!target || typeof target !== 'object') {
|
|
1822
|
+
return [target].concat(source);
|
|
1823
|
+
}
|
|
1097
1824
|
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1825
|
+
var mergeTarget = target;
|
|
1826
|
+
if (isArray$2(target) && !isArray$2(source)) {
|
|
1827
|
+
mergeTarget = arrayToObject(target, options);
|
|
1828
|
+
}
|
|
1102
1829
|
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1830
|
+
if (isArray$2(target) && isArray$2(source)) {
|
|
1831
|
+
source.forEach(function (item, i) {
|
|
1832
|
+
if (has$2.call(target, i)) {
|
|
1833
|
+
var targetItem = target[i];
|
|
1834
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
1835
|
+
target[i] = merge(targetItem, item, options);
|
|
1836
|
+
} else {
|
|
1837
|
+
target.push(item);
|
|
1838
|
+
}
|
|
1839
|
+
} else {
|
|
1840
|
+
target[i] = item;
|
|
1841
|
+
}
|
|
1842
|
+
});
|
|
1843
|
+
return target;
|
|
1844
|
+
}
|
|
1106
1845
|
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
decode: true
|
|
1110
|
-
}, options);
|
|
1846
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
1847
|
+
var value = source[key];
|
|
1111
1848
|
|
|
1112
|
-
|
|
1849
|
+
if (has$2.call(acc, key)) {
|
|
1850
|
+
acc[key] = merge(acc[key], value, options);
|
|
1851
|
+
} else {
|
|
1852
|
+
acc[key] = value;
|
|
1853
|
+
}
|
|
1854
|
+
return acc;
|
|
1855
|
+
}, mergeTarget);
|
|
1856
|
+
};
|
|
1113
1857
|
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
);
|
|
1121
|
-
};
|
|
1858
|
+
var assign = function assignSingleSource(target, source) {
|
|
1859
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
1860
|
+
acc[key] = source[key];
|
|
1861
|
+
return acc;
|
|
1862
|
+
}, target);
|
|
1863
|
+
};
|
|
1122
1864
|
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
if (queryString) {
|
|
1137
|
-
queryString = `?${queryString}`;
|
|
1138
|
-
}
|
|
1865
|
+
var decode = function (str, decoder, charset) {
|
|
1866
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
1867
|
+
if (charset === 'iso-8859-1') {
|
|
1868
|
+
// unescape never throws, no try...catch needed:
|
|
1869
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
1870
|
+
}
|
|
1871
|
+
// utf-8
|
|
1872
|
+
try {
|
|
1873
|
+
return decodeURIComponent(strWithoutPlus);
|
|
1874
|
+
} catch (e) {
|
|
1875
|
+
return strWithoutPlus;
|
|
1876
|
+
}
|
|
1877
|
+
};
|
|
1139
1878
|
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1879
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
1880
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
1881
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
1882
|
+
if (str.length === 0) {
|
|
1883
|
+
return str;
|
|
1884
|
+
}
|
|
1144
1885
|
|
|
1145
|
-
|
|
1146
|
-
|
|
1886
|
+
var string = str;
|
|
1887
|
+
if (typeof str === 'symbol') {
|
|
1888
|
+
string = Symbol.prototype.toString.call(str);
|
|
1889
|
+
} else if (typeof str !== 'string') {
|
|
1890
|
+
string = String(str);
|
|
1891
|
+
}
|
|
1147
1892
|
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
const {url, query, fragmentIdentifier} = exports.parseUrl(input, options);
|
|
1155
|
-
return exports.stringifyUrl({
|
|
1156
|
-
url,
|
|
1157
|
-
query: filterObject(query, filter),
|
|
1158
|
-
fragmentIdentifier
|
|
1159
|
-
}, options);
|
|
1160
|
-
};
|
|
1893
|
+
if (charset === 'iso-8859-1') {
|
|
1894
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
1895
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1161
1898
|
|
|
1162
|
-
|
|
1163
|
-
|
|
1899
|
+
var out = '';
|
|
1900
|
+
for (var i = 0; i < string.length; ++i) {
|
|
1901
|
+
var c = string.charCodeAt(i);
|
|
1902
|
+
|
|
1903
|
+
if (
|
|
1904
|
+
c === 0x2D // -
|
|
1905
|
+
|| c === 0x2E // .
|
|
1906
|
+
|| c === 0x5F // _
|
|
1907
|
+
|| c === 0x7E // ~
|
|
1908
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
1909
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
1910
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
1911
|
+
|| (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
1912
|
+
) {
|
|
1913
|
+
out += string.charAt(i);
|
|
1914
|
+
continue;
|
|
1915
|
+
}
|
|
1164
1916
|
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1917
|
+
if (c < 0x80) {
|
|
1918
|
+
out = out + hexTable[c];
|
|
1919
|
+
continue;
|
|
1920
|
+
}
|
|
1921
|
+
|
|
1922
|
+
if (c < 0x800) {
|
|
1923
|
+
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
|
1924
|
+
continue;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
1928
|
+
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
|
1929
|
+
continue;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
i += 1;
|
|
1933
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
1934
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
1935
|
+
out += hexTable[0xF0 | (c >> 18)]
|
|
1936
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
1937
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
1938
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
return out;
|
|
1942
|
+
};
|
|
1943
|
+
|
|
1944
|
+
var compact = function compact(value) {
|
|
1945
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
1946
|
+
var refs = [];
|
|
1947
|
+
|
|
1948
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
1949
|
+
var item = queue[i];
|
|
1950
|
+
var obj = item.obj[item.prop];
|
|
1951
|
+
|
|
1952
|
+
var keys = Object.keys(obj);
|
|
1953
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
1954
|
+
var key = keys[j];
|
|
1955
|
+
var val = obj[key];
|
|
1956
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
1957
|
+
queue.push({ obj: obj, prop: key });
|
|
1958
|
+
refs.push(val);
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
compactQueue(queue);
|
|
1964
|
+
|
|
1965
|
+
return value;
|
|
1966
|
+
};
|
|
1967
|
+
|
|
1968
|
+
var isRegExp = function isRegExp(obj) {
|
|
1969
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1972
|
+
var isBuffer = function isBuffer(obj) {
|
|
1973
|
+
if (!obj || typeof obj !== 'object') {
|
|
1974
|
+
return false;
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
1978
|
+
};
|
|
1979
|
+
|
|
1980
|
+
var combine = function combine(a, b) {
|
|
1981
|
+
return [].concat(a, b);
|
|
1982
|
+
};
|
|
1983
|
+
|
|
1984
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
1985
|
+
if (isArray$2(val)) {
|
|
1986
|
+
var mapped = [];
|
|
1987
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
1988
|
+
mapped.push(fn(val[i]));
|
|
1989
|
+
}
|
|
1990
|
+
return mapped;
|
|
1991
|
+
}
|
|
1992
|
+
return fn(val);
|
|
1993
|
+
};
|
|
1994
|
+
|
|
1995
|
+
var utils$2 = {
|
|
1996
|
+
arrayToObject: arrayToObject,
|
|
1997
|
+
assign: assign,
|
|
1998
|
+
combine: combine,
|
|
1999
|
+
compact: compact,
|
|
2000
|
+
decode: decode,
|
|
2001
|
+
encode: encode,
|
|
2002
|
+
isBuffer: isBuffer,
|
|
2003
|
+
isRegExp: isRegExp,
|
|
2004
|
+
maybeMap: maybeMap,
|
|
2005
|
+
merge: merge
|
|
2006
|
+
};
|
|
2007
|
+
|
|
2008
|
+
var getSideChannel = sideChannel;
|
|
2009
|
+
var utils$1 = utils$2;
|
|
2010
|
+
var formats$1 = formats$3;
|
|
2011
|
+
var has$1 = Object.prototype.hasOwnProperty;
|
|
2012
|
+
|
|
2013
|
+
var arrayPrefixGenerators = {
|
|
2014
|
+
brackets: function brackets(prefix) {
|
|
2015
|
+
return prefix + '[]';
|
|
2016
|
+
},
|
|
2017
|
+
comma: 'comma',
|
|
2018
|
+
indices: function indices(prefix, key) {
|
|
2019
|
+
return prefix + '[' + key + ']';
|
|
2020
|
+
},
|
|
2021
|
+
repeat: function repeat(prefix) {
|
|
2022
|
+
return prefix;
|
|
2023
|
+
}
|
|
2024
|
+
};
|
|
2025
|
+
|
|
2026
|
+
var isArray$1 = Array.isArray;
|
|
2027
|
+
var split = String.prototype.split;
|
|
2028
|
+
var push = Array.prototype.push;
|
|
2029
|
+
var pushToArray = function (arr, valueOrArray) {
|
|
2030
|
+
push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
2031
|
+
};
|
|
2032
|
+
|
|
2033
|
+
var toISO = Date.prototype.toISOString;
|
|
2034
|
+
|
|
2035
|
+
var defaultFormat = formats$1['default'];
|
|
2036
|
+
var defaults$1 = {
|
|
2037
|
+
addQueryPrefix: false,
|
|
2038
|
+
allowDots: false,
|
|
2039
|
+
charset: 'utf-8',
|
|
2040
|
+
charsetSentinel: false,
|
|
2041
|
+
delimiter: '&',
|
|
2042
|
+
encode: true,
|
|
2043
|
+
encoder: utils$1.encode,
|
|
2044
|
+
encodeValuesOnly: false,
|
|
2045
|
+
format: defaultFormat,
|
|
2046
|
+
formatter: formats$1.formatters[defaultFormat],
|
|
2047
|
+
// deprecated
|
|
2048
|
+
indices: false,
|
|
2049
|
+
serializeDate: function serializeDate(date) {
|
|
2050
|
+
return toISO.call(date);
|
|
2051
|
+
},
|
|
2052
|
+
skipNulls: false,
|
|
2053
|
+
strictNullHandling: false
|
|
2054
|
+
};
|
|
2055
|
+
|
|
2056
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
2057
|
+
return typeof v === 'string'
|
|
2058
|
+
|| typeof v === 'number'
|
|
2059
|
+
|| typeof v === 'boolean'
|
|
2060
|
+
|| typeof v === 'symbol'
|
|
2061
|
+
|| typeof v === 'bigint';
|
|
2062
|
+
};
|
|
2063
|
+
|
|
2064
|
+
var sentinel = {};
|
|
2065
|
+
|
|
2066
|
+
var stringify$1 = function stringify(
|
|
2067
|
+
object,
|
|
2068
|
+
prefix,
|
|
2069
|
+
generateArrayPrefix,
|
|
2070
|
+
commaRoundTrip,
|
|
2071
|
+
strictNullHandling,
|
|
2072
|
+
skipNulls,
|
|
2073
|
+
encoder,
|
|
2074
|
+
filter,
|
|
2075
|
+
sort,
|
|
2076
|
+
allowDots,
|
|
2077
|
+
serializeDate,
|
|
2078
|
+
format,
|
|
2079
|
+
formatter,
|
|
2080
|
+
encodeValuesOnly,
|
|
2081
|
+
charset,
|
|
2082
|
+
sideChannel
|
|
2083
|
+
) {
|
|
2084
|
+
var obj = object;
|
|
2085
|
+
|
|
2086
|
+
var tmpSc = sideChannel;
|
|
2087
|
+
var step = 0;
|
|
2088
|
+
var findFlag = false;
|
|
2089
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
2090
|
+
// Where object last appeared in the ref tree
|
|
2091
|
+
var pos = tmpSc.get(object);
|
|
2092
|
+
step += 1;
|
|
2093
|
+
if (typeof pos !== 'undefined') {
|
|
2094
|
+
if (pos === step) {
|
|
2095
|
+
throw new RangeError('Cyclic object value');
|
|
2096
|
+
} else {
|
|
2097
|
+
findFlag = true; // Break while
|
|
2098
|
+
}
|
|
2099
|
+
}
|
|
2100
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
2101
|
+
step = 0;
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2105
|
+
if (typeof filter === 'function') {
|
|
2106
|
+
obj = filter(prefix, obj);
|
|
2107
|
+
} else if (obj instanceof Date) {
|
|
2108
|
+
obj = serializeDate(obj);
|
|
2109
|
+
} else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2110
|
+
obj = utils$1.maybeMap(obj, function (value) {
|
|
2111
|
+
if (value instanceof Date) {
|
|
2112
|
+
return serializeDate(value);
|
|
2113
|
+
}
|
|
2114
|
+
return value;
|
|
2115
|
+
});
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
if (obj === null) {
|
|
2119
|
+
if (strictNullHandling) {
|
|
2120
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
|
|
2121
|
+
}
|
|
2122
|
+
|
|
2123
|
+
obj = '';
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2126
|
+
if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
|
|
2127
|
+
if (encoder) {
|
|
2128
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
|
|
2129
|
+
if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
|
|
2130
|
+
var valuesArray = split.call(String(obj), ',');
|
|
2131
|
+
var valuesJoined = '';
|
|
2132
|
+
for (var i = 0; i < valuesArray.length; ++i) {
|
|
2133
|
+
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
|
|
2134
|
+
}
|
|
2135
|
+
return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
2136
|
+
}
|
|
2137
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
|
|
2138
|
+
}
|
|
2139
|
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
var values = [];
|
|
2143
|
+
|
|
2144
|
+
if (typeof obj === 'undefined') {
|
|
2145
|
+
return values;
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
var objKeys;
|
|
2149
|
+
if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2150
|
+
// we need to join elements in
|
|
2151
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
2152
|
+
} else if (isArray$1(filter)) {
|
|
2153
|
+
objKeys = filter;
|
|
2154
|
+
} else {
|
|
2155
|
+
var keys = Object.keys(obj);
|
|
2156
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
2160
|
+
|
|
2161
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
2162
|
+
var key = objKeys[j];
|
|
2163
|
+
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
2164
|
+
|
|
2165
|
+
if (skipNulls && value === null) {
|
|
2166
|
+
continue;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
var keyPrefix = isArray$1(obj)
|
|
2170
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
2171
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
2172
|
+
|
|
2173
|
+
sideChannel.set(object, step);
|
|
2174
|
+
var valueSideChannel = getSideChannel();
|
|
2175
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
2176
|
+
pushToArray(values, stringify(
|
|
2177
|
+
value,
|
|
2178
|
+
keyPrefix,
|
|
2179
|
+
generateArrayPrefix,
|
|
2180
|
+
commaRoundTrip,
|
|
2181
|
+
strictNullHandling,
|
|
2182
|
+
skipNulls,
|
|
2183
|
+
encoder,
|
|
2184
|
+
filter,
|
|
2185
|
+
sort,
|
|
2186
|
+
allowDots,
|
|
2187
|
+
serializeDate,
|
|
2188
|
+
format,
|
|
2189
|
+
formatter,
|
|
2190
|
+
encodeValuesOnly,
|
|
2191
|
+
charset,
|
|
2192
|
+
valueSideChannel
|
|
2193
|
+
));
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
return values;
|
|
2197
|
+
};
|
|
2198
|
+
|
|
2199
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
2200
|
+
if (!opts) {
|
|
2201
|
+
return defaults$1;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
2205
|
+
throw new TypeError('Encoder has to be a function.');
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
var charset = opts.charset || defaults$1.charset;
|
|
2209
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2210
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
var format = formats$1['default'];
|
|
2214
|
+
if (typeof opts.format !== 'undefined') {
|
|
2215
|
+
if (!has$1.call(formats$1.formatters, opts.format)) {
|
|
2216
|
+
throw new TypeError('Unknown format option provided.');
|
|
2217
|
+
}
|
|
2218
|
+
format = opts.format;
|
|
2219
|
+
}
|
|
2220
|
+
var formatter = formats$1.formatters[format];
|
|
2221
|
+
|
|
2222
|
+
var filter = defaults$1.filter;
|
|
2223
|
+
if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
|
|
2224
|
+
filter = opts.filter;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
return {
|
|
2228
|
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
|
|
2229
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
|
|
2230
|
+
charset: charset,
|
|
2231
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
2232
|
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
2233
|
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
2234
|
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
|
|
2235
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
|
|
2236
|
+
filter: filter,
|
|
2237
|
+
format: format,
|
|
2238
|
+
formatter: formatter,
|
|
2239
|
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
|
|
2240
|
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
|
|
2241
|
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
2242
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
|
|
2243
|
+
};
|
|
2244
|
+
};
|
|
2245
|
+
|
|
2246
|
+
var stringify_1 = function (object, opts) {
|
|
2247
|
+
var obj = object;
|
|
2248
|
+
var options = normalizeStringifyOptions(opts);
|
|
2249
|
+
|
|
2250
|
+
var objKeys;
|
|
2251
|
+
var filter;
|
|
2252
|
+
|
|
2253
|
+
if (typeof options.filter === 'function') {
|
|
2254
|
+
filter = options.filter;
|
|
2255
|
+
obj = filter('', obj);
|
|
2256
|
+
} else if (isArray$1(options.filter)) {
|
|
2257
|
+
filter = options.filter;
|
|
2258
|
+
objKeys = filter;
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
var keys = [];
|
|
2262
|
+
|
|
2263
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
2264
|
+
return '';
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
var arrayFormat;
|
|
2268
|
+
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
|
2269
|
+
arrayFormat = opts.arrayFormat;
|
|
2270
|
+
} else if (opts && 'indices' in opts) {
|
|
2271
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
2272
|
+
} else {
|
|
2273
|
+
arrayFormat = 'indices';
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
2277
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
2278
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
2279
|
+
}
|
|
2280
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
2281
|
+
|
|
2282
|
+
if (!objKeys) {
|
|
2283
|
+
objKeys = Object.keys(obj);
|
|
2284
|
+
}
|
|
2285
|
+
|
|
2286
|
+
if (options.sort) {
|
|
2287
|
+
objKeys.sort(options.sort);
|
|
2288
|
+
}
|
|
2289
|
+
|
|
2290
|
+
var sideChannel = getSideChannel();
|
|
2291
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
2292
|
+
var key = objKeys[i];
|
|
2293
|
+
|
|
2294
|
+
if (options.skipNulls && obj[key] === null) {
|
|
2295
|
+
continue;
|
|
2296
|
+
}
|
|
2297
|
+
pushToArray(keys, stringify$1(
|
|
2298
|
+
obj[key],
|
|
2299
|
+
key,
|
|
2300
|
+
generateArrayPrefix,
|
|
2301
|
+
commaRoundTrip,
|
|
2302
|
+
options.strictNullHandling,
|
|
2303
|
+
options.skipNulls,
|
|
2304
|
+
options.encode ? options.encoder : null,
|
|
2305
|
+
options.filter,
|
|
2306
|
+
options.sort,
|
|
2307
|
+
options.allowDots,
|
|
2308
|
+
options.serializeDate,
|
|
2309
|
+
options.format,
|
|
2310
|
+
options.formatter,
|
|
2311
|
+
options.encodeValuesOnly,
|
|
2312
|
+
options.charset,
|
|
2313
|
+
sideChannel
|
|
2314
|
+
));
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
var joined = keys.join(options.delimiter);
|
|
2318
|
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
2319
|
+
|
|
2320
|
+
if (options.charsetSentinel) {
|
|
2321
|
+
if (options.charset === 'iso-8859-1') {
|
|
2322
|
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
2323
|
+
prefix += 'utf8=%26%2310003%3B&';
|
|
2324
|
+
} else {
|
|
2325
|
+
// encodeURIComponent('✓')
|
|
2326
|
+
prefix += 'utf8=%E2%9C%93&';
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
|
|
2330
|
+
return joined.length > 0 ? prefix + joined : '';
|
|
2331
|
+
};
|
|
2332
|
+
|
|
2333
|
+
var utils = utils$2;
|
|
2334
|
+
|
|
2335
|
+
var has = Object.prototype.hasOwnProperty;
|
|
2336
|
+
var isArray = Array.isArray;
|
|
2337
|
+
|
|
2338
|
+
var defaults = {
|
|
2339
|
+
allowDots: false,
|
|
2340
|
+
allowPrototypes: false,
|
|
2341
|
+
allowSparse: false,
|
|
2342
|
+
arrayLimit: 20,
|
|
2343
|
+
charset: 'utf-8',
|
|
2344
|
+
charsetSentinel: false,
|
|
2345
|
+
comma: false,
|
|
2346
|
+
decoder: utils.decode,
|
|
2347
|
+
delimiter: '&',
|
|
2348
|
+
depth: 5,
|
|
2349
|
+
ignoreQueryPrefix: false,
|
|
2350
|
+
interpretNumericEntities: false,
|
|
2351
|
+
parameterLimit: 1000,
|
|
2352
|
+
parseArrays: true,
|
|
2353
|
+
plainObjects: false,
|
|
2354
|
+
strictNullHandling: false
|
|
2355
|
+
};
|
|
2356
|
+
|
|
2357
|
+
var interpretNumericEntities = function (str) {
|
|
2358
|
+
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
2359
|
+
return String.fromCharCode(parseInt(numberStr, 10));
|
|
2360
|
+
});
|
|
2361
|
+
};
|
|
2362
|
+
|
|
2363
|
+
var parseArrayValue = function (val, options) {
|
|
2364
|
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
2365
|
+
return val.split(',');
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
return val;
|
|
2369
|
+
};
|
|
2370
|
+
|
|
2371
|
+
// This is what browsers will submit when the ✓ character occurs in an
|
|
2372
|
+
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
2373
|
+
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
2374
|
+
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
2375
|
+
// the ✓ character, such as us-ascii.
|
|
2376
|
+
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
2377
|
+
|
|
2378
|
+
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
2379
|
+
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
2380
|
+
|
|
2381
|
+
var parseValues = function parseQueryStringValues(str, options) {
|
|
2382
|
+
var obj = {};
|
|
2383
|
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
2384
|
+
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
2385
|
+
var parts = cleanStr.split(options.delimiter, limit);
|
|
2386
|
+
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
2387
|
+
var i;
|
|
2388
|
+
|
|
2389
|
+
var charset = options.charset;
|
|
2390
|
+
if (options.charsetSentinel) {
|
|
2391
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2392
|
+
if (parts[i].indexOf('utf8=') === 0) {
|
|
2393
|
+
if (parts[i] === charsetSentinel) {
|
|
2394
|
+
charset = 'utf-8';
|
|
2395
|
+
} else if (parts[i] === isoSentinel) {
|
|
2396
|
+
charset = 'iso-8859-1';
|
|
2397
|
+
}
|
|
2398
|
+
skipIndex = i;
|
|
2399
|
+
i = parts.length; // The eslint settings do not allow break;
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2405
|
+
if (i === skipIndex) {
|
|
2406
|
+
continue;
|
|
2407
|
+
}
|
|
2408
|
+
var part = parts[i];
|
|
2409
|
+
|
|
2410
|
+
var bracketEqualsPos = part.indexOf(']=');
|
|
2411
|
+
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
2412
|
+
|
|
2413
|
+
var key, val;
|
|
2414
|
+
if (pos === -1) {
|
|
2415
|
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
2416
|
+
val = options.strictNullHandling ? null : '';
|
|
2417
|
+
} else {
|
|
2418
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
2419
|
+
val = utils.maybeMap(
|
|
2420
|
+
parseArrayValue(part.slice(pos + 1), options),
|
|
2421
|
+
function (encodedVal) {
|
|
2422
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
2423
|
+
}
|
|
2424
|
+
);
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
2428
|
+
val = interpretNumericEntities(val);
|
|
2429
|
+
}
|
|
2430
|
+
|
|
2431
|
+
if (part.indexOf('[]=') > -1) {
|
|
2432
|
+
val = isArray(val) ? [val] : val;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
if (has.call(obj, key)) {
|
|
2436
|
+
obj[key] = utils.combine(obj[key], val);
|
|
2437
|
+
} else {
|
|
2438
|
+
obj[key] = val;
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
return obj;
|
|
2443
|
+
};
|
|
2444
|
+
|
|
2445
|
+
var parseObject = function (chain, val, options, valuesParsed) {
|
|
2446
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
2447
|
+
|
|
2448
|
+
for (var i = chain.length - 1; i >= 0; --i) {
|
|
2449
|
+
var obj;
|
|
2450
|
+
var root = chain[i];
|
|
2451
|
+
|
|
2452
|
+
if (root === '[]' && options.parseArrays) {
|
|
2453
|
+
obj = [].concat(leaf);
|
|
2454
|
+
} else {
|
|
2455
|
+
obj = options.plainObjects ? Object.create(null) : {};
|
|
2456
|
+
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
2457
|
+
var index = parseInt(cleanRoot, 10);
|
|
2458
|
+
if (!options.parseArrays && cleanRoot === '') {
|
|
2459
|
+
obj = { 0: leaf };
|
|
2460
|
+
} else if (
|
|
2461
|
+
!isNaN(index)
|
|
2462
|
+
&& root !== cleanRoot
|
|
2463
|
+
&& String(index) === cleanRoot
|
|
2464
|
+
&& index >= 0
|
|
2465
|
+
&& (options.parseArrays && index <= options.arrayLimit)
|
|
2466
|
+
) {
|
|
2467
|
+
obj = [];
|
|
2468
|
+
obj[index] = leaf;
|
|
2469
|
+
} else if (cleanRoot !== '__proto__') {
|
|
2470
|
+
obj[cleanRoot] = leaf;
|
|
2471
|
+
}
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
leaf = obj;
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
return leaf;
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2480
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
2481
|
+
if (!givenKey) {
|
|
2482
|
+
return;
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
// Transform dot notation to bracket notation
|
|
2486
|
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
2487
|
+
|
|
2488
|
+
// The regex chunks
|
|
2489
|
+
|
|
2490
|
+
var brackets = /(\[[^[\]]*])/;
|
|
2491
|
+
var child = /(\[[^[\]]*])/g;
|
|
2492
|
+
|
|
2493
|
+
// Get the parent
|
|
2494
|
+
|
|
2495
|
+
var segment = options.depth > 0 && brackets.exec(key);
|
|
2496
|
+
var parent = segment ? key.slice(0, segment.index) : key;
|
|
2497
|
+
|
|
2498
|
+
// Stash the parent if it exists
|
|
2499
|
+
|
|
2500
|
+
var keys = [];
|
|
2501
|
+
if (parent) {
|
|
2502
|
+
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
2503
|
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
2504
|
+
if (!options.allowPrototypes) {
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
keys.push(parent);
|
|
2510
|
+
}
|
|
2511
|
+
|
|
2512
|
+
// Loop through children appending to the array until we hit depth
|
|
2513
|
+
|
|
2514
|
+
var i = 0;
|
|
2515
|
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
2516
|
+
i += 1;
|
|
2517
|
+
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
2518
|
+
if (!options.allowPrototypes) {
|
|
2519
|
+
return;
|
|
2520
|
+
}
|
|
2521
|
+
}
|
|
2522
|
+
keys.push(segment[1]);
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
// If there's a remainder, just add whatever is left
|
|
2526
|
+
|
|
2527
|
+
if (segment) {
|
|
2528
|
+
keys.push('[' + key.slice(segment.index) + ']');
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
2532
|
+
};
|
|
2533
|
+
|
|
2534
|
+
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
2535
|
+
if (!opts) {
|
|
2536
|
+
return defaults;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
|
2540
|
+
throw new TypeError('Decoder has to be a function.');
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2544
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2545
|
+
}
|
|
2546
|
+
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
2547
|
+
|
|
2548
|
+
return {
|
|
2549
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
2550
|
+
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
2551
|
+
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
2552
|
+
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
2553
|
+
charset: charset,
|
|
2554
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
2555
|
+
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
2556
|
+
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
2557
|
+
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
2558
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2559
|
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
2560
|
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
2561
|
+
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
2562
|
+
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
2563
|
+
parseArrays: opts.parseArrays !== false,
|
|
2564
|
+
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
2565
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
2566
|
+
};
|
|
2567
|
+
};
|
|
2568
|
+
|
|
2569
|
+
var parse$1 = function (str, opts) {
|
|
2570
|
+
var options = normalizeParseOptions(opts);
|
|
2571
|
+
|
|
2572
|
+
if (str === '' || str === null || typeof str === 'undefined') {
|
|
2573
|
+
return options.plainObjects ? Object.create(null) : {};
|
|
2574
|
+
}
|
|
2575
|
+
|
|
2576
|
+
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
2577
|
+
var obj = options.plainObjects ? Object.create(null) : {};
|
|
2578
|
+
|
|
2579
|
+
// Iterate over the keys and setup the new object
|
|
2580
|
+
|
|
2581
|
+
var keys = Object.keys(tempObj);
|
|
2582
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
2583
|
+
var key = keys[i];
|
|
2584
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
2585
|
+
obj = utils.merge(obj, newObj, options);
|
|
2586
|
+
}
|
|
2587
|
+
|
|
2588
|
+
if (options.allowSparse === true) {
|
|
2589
|
+
return obj;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
return utils.compact(obj);
|
|
2593
|
+
};
|
|
2594
|
+
|
|
2595
|
+
var stringify = stringify_1;
|
|
2596
|
+
var parse = parse$1;
|
|
2597
|
+
var formats = formats$3;
|
|
2598
|
+
|
|
2599
|
+
var lib = {
|
|
2600
|
+
formats: formats,
|
|
2601
|
+
parse: parse,
|
|
2602
|
+
stringify: stringify
|
|
2603
|
+
};
|
|
1168
2604
|
|
|
1169
2605
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1170
2606
|
|
|
@@ -1273,8 +2709,8 @@ var buildUrl = function buildUrl(route, params) {
|
|
|
1273
2709
|
route = route.replace(":".concat(key), encodeURIComponent(value));
|
|
1274
2710
|
}
|
|
1275
2711
|
});
|
|
1276
|
-
var queryParams = ramda.omit(placeHolders, params);
|
|
1277
|
-
return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(
|
|
2712
|
+
var queryParams = ramda.pipe(ramda.omit(placeHolders), preprocessForSerialization, lib.stringify)(params);
|
|
2713
|
+
return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
|
|
1278
2714
|
};
|
|
1279
2715
|
|
|
1280
2716
|
dayjs__default["default"].extend(relativeTime__default["default"]);
|