@bigbinary/neeto-templates-frontend 1.1.19 → 1.1.21

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