@bigbinary/neeto-commons-frontend 0.0.1 → 0.0.2

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