PluginProbe
Elementor Website Builder – more than just a page builder / 3.31.4
Elementor Website Builder – more than just a page builder v3.31.4
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/common-modules.js +3390 -325 4.2.0-beta2 → 3.31.4 View file →
@@ -1,172 +1,8 @@
1 +/*! elementor - v3.31.0 - 08-09-2025 */
1 2 /******/ (() => { // webpackBootstrap
2 3 /******/ var __webpack_modules__ = ({
3 4
4 -/***/ "../app/modules/import-export-customization/assets/js/shared/registry/base.js":
5 -/*!************************************************************************************!*\
6 - !*** ../app/modules/import-export-customization/assets/js/shared/registry/base.js ***!
7 - \************************************************************************************/
8 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
9 -
10 -"use strict";
11 -
12 -
13 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
14 -Object.defineProperty(exports, "__esModule", ({
15 - value: true
16 -}));
17 -exports.BaseRegistry = void 0;
18 -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js"));
19 -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
20 -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"));
21 -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js"));
22 -var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js"));
23 -var _excluded = ["children"];
24 -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
25 -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
26 -var BaseRegistry = exports.BaseRegistry = /*#__PURE__*/function () {
27 - function BaseRegistry() {
28 - (0, _classCallCheck2.default)(this, BaseRegistry);
29 - this.sections = new Map();
30 - }
31 - return (0, _createClass2.default)(BaseRegistry, [{
32 - key: "register",
33 - value: function register(section) {
34 - var _this = this;
35 - if (!section.key || !section.title) {
36 - throw new Error('Template type must have key and title');
37 - }
38 - var existingSection = this.get(section.key);
39 - var formattedSection = existingSection || this.formatSection(section);
40 - if (section.children) {
41 - // If existing section has children, merge them with new children
42 - if (formattedSection.children) {
43 - var existingChildrenMap = new Map(formattedSection.children.map(function (child) {
44 - return [child.key, child];
45 - }));
46 -
47 - // Override existing children with new ones and add new children
48 - section.children.forEach(function (childSection) {
49 - var formattedChild = _this.formatSection(childSection);
50 - existingChildrenMap.set(childSection.key, formattedChild);
51 - });
52 - formattedSection.children = Array.from(existingChildrenMap.values());
53 - } else {
54 - formattedSection.children = section.children.map(function (childSection) {
55 - return _this.formatSection(childSection);
56 - });
57 - }
58 - }
59 - this.sections.set(section.key, formattedSection);
60 - }
61 - }, {
62 - key: "formatSection",
63 - value: function formatSection(_ref) {
64 - var children = _ref.children,
65 - section = (0, _objectWithoutProperties2.default)(_ref, _excluded);
66 - return _objectSpread({
67 - key: section.key,
68 - title: section.title,
69 - description: section.description || '',
70 - useParentDefault: section.useParentDefault !== false,
71 - getInitialState: section.getInitialState || null,
72 - component: section.component || null,
73 - order: section.order || 10,
74 - isAvailable: section.isAvailable || function () {
75 - return true;
76 - }
77 - }, section);
78 - }
79 - }, {
80 - key: "getAll",
81 - value: function getAll() {
82 - return Array.from(this.sections.values()).filter(function (type) {
83 - return type.isAvailable();
84 - }).map(function (type) {
85 - if (type.children) {
86 - return _objectSpread(_objectSpread({}, type), {}, {
87 - children: (0, _toConsumableArray2.default)(type.children).sort(function (a, b) {
88 - return a.order - b.order;
89 - })
90 - });
91 - }
92 - return type;
93 - }).sort(function (a, b) {
94 - return a.order - b.order;
95 - });
96 - }
97 - }, {
98 - key: "get",
99 - value: function get(key) {
100 - return this.sections.get(key);
101 - }
102 - }]);
103 -}();
104 -
105 -/***/ }),
106 -
107 -/***/ "../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js":
108 -/*!*****************************************************************************************************!*\
109 - !*** ../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js ***!
110 - \*****************************************************************************************************/
111 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
112 -
113 -"use strict";
114 -
115 -
116 -Object.defineProperty(exports, "__esModule", ({
117 - value: true
118 -}));
119 -exports.customizationDialogsRegistry = void 0;
120 -var _base = __webpack_require__(/*! ./base */ "../app/modules/import-export-customization/assets/js/shared/registry/base.js");
121 -var customizationDialogsRegistry = exports.customizationDialogsRegistry = new _base.BaseRegistry();
122 -
123 -/***/ }),
124 -
125 -/***/ "../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js":
126 -/*!******************************************************************************************************!*\
127 - !*** ../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js ***!
128 - \******************************************************************************************************/
129 -/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
130 -
131 -"use strict";
132 -
133 -
134 -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
135 -Object.defineProperty(exports, "__esModule", ({
136 - value: true
137 -}));
138 -exports.createGetInitialState = createGetInitialState;
139 -var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js"));
140 -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
141 -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
142 -function createGetInitialState(exportGroup) {
143 - var additionalProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
144 - return function (data, parentInitialState) {
145 - var isEnabled = parentInitialState;
146 - var isImport = data.hasOwnProperty('uploadedData');
147 - if (isImport) {
148 - var _elementorAppConfig;
149 - isEnabled = false;
150 - var templates = data.uploadedData.manifest.templates;
151 - var exportGroups = ((_elementorAppConfig = elementorAppConfig) === null || _elementorAppConfig === void 0 || (_elementorAppConfig = _elementorAppConfig['import-export-customization']) === null || _elementorAppConfig === void 0 ? void 0 : _elementorAppConfig.exportGroups) || {};
152 - for (var templateId in templates) {
153 - var template = templates[templateId];
154 - var templateExportGroup = exportGroups[template.doc_type];
155 - if (templateExportGroup === exportGroup) {
156 - isEnabled = true;
157 - break;
158 - }
159 - }
160 - }
161 - return _objectSpread({
162 - enabled: isEnabled
163 - }, additionalProps);
164 - };
165 -}
166 -
167 -/***/ }),
168 -
169 5 /***/ "../assets/dev/js/editor/utils/is-instanceof.js":
170 6 /*!******************************************************!*\
171 7 !*** ../assets/dev/js/editor/utils/is-instanceof.js ***!
172 8 \******************************************************/
@@ -196,10 +32,10 @@
196 32 var _iterator = _createForOfIteratorHelper(constructors),
197 33 _step;
198 34 try {
199 35 for (_iterator.s(); !(_step = _iterator.n()).done;) {
200 - var constructor = _step.value;
201 - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) {
36 + var _constructor = _step.value;
37 + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) {
202 38 return true;
203 39 }
204 40 }
205 41 } catch (err) {
@@ -881,11 +717,9 @@
881 717 var _argsObject = _interopRequireDefault(__webpack_require__(/*! ./imports/args-object */ "../assets/dev/js/modules/imports/args-object.js"));
882 718 var _masonry = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/masonry */ "../assets/dev/js/modules/imports/utils/masonry.js"));
883 719 var _scroll = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/scroll */ "../assets/dev/js/modules/imports/utils/scroll.js"));
884 720 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ./imports/force-method-implementation */ "../assets/dev/js/modules/imports/force-method-implementation.js"));
885 -var _templateRegistryHelpers = __webpack_require__(/*! ../../../../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers */ "../app/modules/import-export-customization/assets/js/shared/utils/template-registry-helpers.js");
886 -var _customizationDialogs = __webpack_require__(/*! ../../../../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs */ "../app/modules/import-export-customization/assets/js/shared/registry/customization-dialogs.js");
887 -var baseModules = {
721 +var _default = exports["default"] = window.elementorModules = {
888 722 Module: _module.default,
889 723 ViewModule: _viewModule.default,
890 724 ArgsObject: _argsObject.default,
891 725 ForceMethodImplementation: _forceMethodImplementation.default,
@@ -891,20 +725,10 @@
891 725 ForceMethodImplementation: _forceMethodImplementation.default,
892 726 utils: {
893 727 Masonry: _masonry.default,
894 728 Scroll: _scroll.default
895 - },
896 - importExport: {
897 - createGetInitialState: _templateRegistryHelpers.createGetInitialState,
898 - customizationDialogsRegistry: _customizationDialogs.customizationDialogsRegistry
899 729 }
900 730 };
901 -if (!window.elementorModules) {
902 - window.elementorModules = baseModules;
903 -} else {
904 - Object.assign(window.elementorModules, baseModules);
905 -}
906 -var _default = exports["default"] = window.elementorModules;
907 731
908 732 /***/ }),
909 733
910 734 /***/ "../core/common/assets/js/views/modal/header.js":
@@ -934,13 +758,8 @@
934 758 return _callSuper(this, _default, arguments);
935 759 }
936 760 (0, _inherits2.default)(_default, _Marionette$LayoutVie);
937 761 return (0, _createClass2.default)(_default, [{
938 - key: "tagName",
939 - value: function tagName() {
940 - return 'header';
941 - }
942 - }, {
943 762 key: "className",
944 763 value: function className() {
945 764 return 'elementor-templates-modal__header';
946 765 }
@@ -972,31 +791,8 @@
972 791 'click @ui.closeModal': 'onCloseModalClick'
973 792 };
974 793 }
975 794 }, {
976 - key: "onRender",
977 - value: function onRender() {
978 - this.bindEscapeKey();
979 - }
980 - }, {
981 - key: "bindEscapeKey",
982 - value: function bindEscapeKey() {
983 - var _this = this;
984 - this.onDocumentKeyDown = function (event) {
985 - if ('Escape' === event.key) {
986 - _this.onCloseModalClick();
987 - }
988 - };
989 - document.addEventListener('keydown', this.onDocumentKeyDown);
990 - }
991 - }, {
992 - key: "onDestroy",
993 - value: function onDestroy() {
994 - if (this.onDocumentKeyDown) {
995 - document.removeEventListener('keydown', this.onDocumentKeyDown);
996 - }
997 - }
998 - }, {
999 795 key: "templateHelpers",
1000 796 value: function templateHelpers() {
1001 797 return {
1002 798 closeType: this.getOption('closeType')
@@ -1004,11 +800,12 @@
1004 800 }
1005 801 }, {
1006 802 key: "onCloseModalClick",
1007 803 value: function onCloseModalClick() {
804 + var _elementor$config$doc, _elementor$config;
1008 805 this._parent._parent._parent.hideModal();
1009 - var documentType = this.getDocumentType();
1010 - var customEvent = new CustomEvent("core/modal/close/".concat(documentType));
806 + var type = (_elementor$config$doc = (_elementor$config = elementor.config) === null || _elementor$config === void 0 || (_elementor$config = _elementor$config.document) === null || _elementor$config === void 0 ? void 0 : _elementor$config.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : 'default';
807 + var customEvent = new CustomEvent("core/modal/close/".concat(type));
1011 808 window.dispatchEvent(customEvent);
1012 809 if (this.isFloatingButtonLibraryClose()) {
1013 810 $e.internal('document/save/set-is-modified', {
1014 811 status: false
@@ -1016,22 +813,12 @@
1016 813 window.location.href = elementor.config.admin_floating_button_admin_url;
1017 814 }
1018 815 }
1019 816 }, {
1020 - key: "getDocumentType",
1021 - value: function getDocumentType() {
1022 - var _elementor$config$doc, _elementor;
1023 - var DEFAULT_TYPE = 'default';
1024 - if ('undefined' === typeof window.elementor) {
1025 - return DEFAULT_TYPE;
1026 - }
1027 - return (_elementor$config$doc = (_elementor = elementor) === null || _elementor === void 0 || (_elementor = _elementor.config) === null || _elementor === void 0 || (_elementor = _elementor.document) === null || _elementor === void 0 ? void 0 : _elementor.type) !== null && _elementor$config$doc !== void 0 ? _elementor$config$doc : DEFAULT_TYPE;
1028 - }
1029 - }, {
1030 817 key: "isFloatingButtonLibraryClose",
1031 818 value: function isFloatingButtonLibraryClose() {
1032 - var _elementor$config, _elementor$config2;
1033 - return window.elementor && ((_elementor$config = elementor.config) === null || _elementor$config === void 0 ? void 0 : _elementor$config.admin_floating_button_admin_url) && 'floating-buttons' === ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 || (_elementor$config2 = _elementor$config2.document) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.type) && (this.$el.closest('.dialog-lightbox-widget-content').find('.elementor-template-library-template-floating_button').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-preview').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-templates-empty').length);
819 + var _elementor$config2, _elementor$config3;
820 + return window.elementor && ((_elementor$config2 = elementor.config) === null || _elementor$config2 === void 0 ? void 0 : _elementor$config2.admin_floating_button_admin_url) && 'floating-buttons' === ((_elementor$config3 = elementor.config) === null || _elementor$config3 === void 0 || (_elementor$config3 = _elementor$config3.document) === null || _elementor$config3 === void 0 ? void 0 : _elementor$config3.type) && (this.$el.closest('.dialog-lightbox-widget-content').find('.elementor-template-library-template-floating_button').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-preview').length || this.$el.closest('.dialog-lightbox-widget-content').find('#elementor-template-library-templates-empty').length);
1034 821 }
1035 822 }]);
1036 823 }(Marionette.LayoutView);
1037 824
@@ -1884,9 +1671,9 @@
1884 1671 var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"));
1885 1672 var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"));
1886 1673 var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js"));
1887 1674 var _commandCallbackBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-callback-base */ "../modules/web-cli/assets/js/modules/command-callback-base.js"));
1888 -var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "@reduxjs/toolkit");
1675 +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js");
1889 1676 var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js"));
1890 1677 var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js"));
1891 1678 var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js"));
1892 1679 function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -2863,22 +2650,8 @@
2863 2650 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
2864 2651
2865 2652 /***/ }),
2866 2653
2867 -/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
2868 -/*!*******************************************************************!*\
2869 - !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
2870 - \*******************************************************************/
2871 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2872 -
2873 -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
2874 -function _arrayWithoutHoles(r) {
2875 - if (Array.isArray(r)) return arrayLikeToArray(r);
2876 -}
2877 -module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
2878 -
2879 -/***/ }),
2880 -
2881 2654 /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
2882 2655 /*!***********************************************************************!*\
2883 2656 !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
2884 2657 \***********************************************************************/
@@ -2964,8 +2737,145 @@
2964 2737 module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
2965 2738
2966 2739 /***/ }),
2967 2740
2741 +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js":
2742 +/*!********************************************************************!*\
2743 + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
2744 + \********************************************************************/
2745 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2746 +
2747 +"use strict";
2748 +__webpack_require__.r(__webpack_exports__);
2749 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2750 +/* harmony export */ "default": () => (/* binding */ _defineProperty)
2751 +/* harmony export */ });
2752 +/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
2753 +
2754 +function _defineProperty(e, r, t) {
2755 + return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, {
2756 + value: t,
2757 + enumerable: !0,
2758 + configurable: !0,
2759 + writable: !0
2760 + }) : e[r] = t, e;
2761 +}
2762 +
2763 +
2764 +/***/ }),
2765 +
2766 +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js":
2767 +/*!*******************************************************************!*\
2768 + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
2769 + \*******************************************************************/
2770 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2771 +
2772 +"use strict";
2773 +__webpack_require__.r(__webpack_exports__);
2774 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2775 +/* harmony export */ "default": () => (/* binding */ _objectSpread2)
2776 +/* harmony export */ });
2777 +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js");
2778 +
2779 +function ownKeys(e, r) {
2780 + var t = Object.keys(e);
2781 + if (Object.getOwnPropertySymbols) {
2782 + var o = Object.getOwnPropertySymbols(e);
2783 + r && (o = o.filter(function (r) {
2784 + return Object.getOwnPropertyDescriptor(e, r).enumerable;
2785 + })), t.push.apply(t, o);
2786 + }
2787 + return t;
2788 +}
2789 +function _objectSpread2(e) {
2790 + for (var r = 1; r < arguments.length; r++) {
2791 + var t = null != arguments[r] ? arguments[r] : {};
2792 + r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
2793 + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]);
2794 + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
2795 + Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
2796 + });
2797 + }
2798 + return e;
2799 +}
2800 +
2801 +
2802 +/***/ }),
2803 +
2804 +/***/ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js":
2805 +/*!*****************************************************************!*\
2806 + !*** ../node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***!
2807 + \*****************************************************************/
2808 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2809 +
2810 +"use strict";
2811 +__webpack_require__.r(__webpack_exports__);
2812 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2813 +/* harmony export */ "default": () => (/* binding */ toPrimitive)
2814 +/* harmony export */ });
2815 +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js");
2816 +
2817 +function toPrimitive(t, r) {
2818 + if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t;
2819 + var e = t[Symbol.toPrimitive];
2820 + if (void 0 !== e) {
2821 + var i = e.call(t, r || "default");
2822 + if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i;
2823 + throw new TypeError("@@toPrimitive must return a primitive value.");
2824 + }
2825 + return ("string" === r ? String : Number)(t);
2826 +}
2827 +
2828 +
2829 +/***/ }),
2830 +
2831 +/***/ "../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
2832 +/*!*******************************************************************!*\
2833 + !*** ../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***!
2834 + \*******************************************************************/
2835 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2836 +
2837 +"use strict";
2838 +__webpack_require__.r(__webpack_exports__);
2839 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2840 +/* harmony export */ "default": () => (/* binding */ toPropertyKey)
2841 +/* harmony export */ });
2842 +/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/esm/typeof.js");
2843 +/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/esm/toPrimitive.js");
2844 +
2845 +
2846 +function toPropertyKey(t) {
2847 + var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string");
2848 + return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + "";
2849 +}
2850 +
2851 +
2852 +/***/ }),
2853 +
2854 +/***/ "../node_modules/@babel/runtime/helpers/esm/typeof.js":
2855 +/*!************************************************************!*\
2856 + !*** ../node_modules/@babel/runtime/helpers/esm/typeof.js ***!
2857 + \************************************************************/
2858 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2859 +
2860 +"use strict";
2861 +__webpack_require__.r(__webpack_exports__);
2862 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
2863 +/* harmony export */ "default": () => (/* binding */ _typeof)
2864 +/* harmony export */ });
2865 +function _typeof(o) {
2866 + "@babel/helpers - typeof";
2867 +
2868 + return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
2869 + return typeof o;
2870 + } : function (o) {
2871 + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
2872 + }, _typeof(o);
2873 +}
2874 +
2875 +
2876 +/***/ }),
2877 +
2968 2878 /***/ "../node_modules/@babel/runtime/helpers/get.js":
2969 2879 /*!*****************************************************!*\
2970 2880 !*** ../node_modules/@babel/runtime/helpers/get.js ***!
2971 2881 \*****************************************************/
@@ -3072,21 +2982,8 @@
3072 2982 module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
3073 2983
3074 2984 /***/ }),
3075 2985
3076 -/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js":
3077 -/*!*****************************************************************!*\
3078 - !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***!
3079 - \*****************************************************************/
3080 -/***/ ((module) => {
3081 -
3082 -function _iterableToArray(r) {
3083 - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
3084 -}
3085 -module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3086 -
3087 -/***/ }),
3088 -
3089 2986 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
3090 2987 /*!**********************************************************************!*\
3091 2988 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
3092 2989 \**********************************************************************/
@@ -3135,62 +3032,8 @@
3135 3032 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
3136 3033
3137 3034 /***/ }),
3138 3035
3139 -/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js":
3140 -/*!*******************************************************************!*\
3141 - !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
3142 - \*******************************************************************/
3143 -/***/ ((module) => {
3144 -
3145 -function _nonIterableSpread() {
3146 - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3147 -}
3148 -module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
3149 -
3150 -/***/ }),
3151 -
3152 -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
3153 -/*!*************************************************************************!*\
3154 - !*** ../node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
3155 - \*************************************************************************/
3156 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3157 -
3158 -var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js");
3159 -function _objectWithoutProperties(e, t) {
3160 - if (null == e) return {};
3161 - var o,
3162 - r,
3163 - i = objectWithoutPropertiesLoose(e, t);
3164 - if (Object.getOwnPropertySymbols) {
3165 - var n = Object.getOwnPropertySymbols(e);
3166 - for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
3167 - }
3168 - return i;
3169 -}
3170 -module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
3171 -
3172 -/***/ }),
3173 -
3174 -/***/ "../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
3175 -/*!******************************************************************************!*\
3176 - !*** ../node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
3177 - \******************************************************************************/
3178 -/***/ ((module) => {
3179 -
3180 -function _objectWithoutPropertiesLoose(r, e) {
3181 - if (null == r) return {};
3182 - var t = {};
3183 - for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
3184 - if (-1 !== e.indexOf(n)) continue;
3185 - t[n] = r[n];
3186 - }
3187 - return t;
3188 -}
3189 -module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
3190 -
3191 -/***/ }),
3192 -
3193 3036 /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
3194 3037 /*!***************************************************************************!*\
3195 3038 !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
3196 3039 \***************************************************************************/
@@ -3266,25 +3109,8 @@
3266 3109 module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports;
3267 3110
3268 3111 /***/ }),
3269 3112
3270 -/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js":
3271 -/*!*******************************************************************!*\
3272 - !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
3273 - \*******************************************************************/
3274 -/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3275 -
3276 -var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
3277 -var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js");
3278 -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3279 -var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js");
3280 -function _toConsumableArray(r) {
3281 - return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
3282 -}
3283 -module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3284 -
3285 -/***/ }),
3286 -
3287 3113 /***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
3288 3114 /*!*************************************************************!*\
3289 3115 !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
3290 3116 \*************************************************************/
@@ -3393,17 +3219,3215 @@
3393 3219 module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
3394 3220
3395 3221 /***/ }),
3396 3222
3397 -/***/ "@reduxjs/toolkit":
3223 +/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js":
3224 +/*!******************************************************************!*\
3225 + !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***!
3226 + \******************************************************************/
3227 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3228 +
3229 +"use strict";
3230 +__webpack_require__.r(__webpack_exports__);
3231 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
3232 +/* harmony export */ EnhancerArray: () => (/* binding */ EnhancerArray),
3233 +/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray),
3234 +/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH),
3235 +/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError),
3236 +/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes),
3237 +/* harmony export */ addListener: () => (/* binding */ addListener),
3238 +/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware),
3239 +/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer),
3240 +/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators),
3241 +/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners),
3242 +/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers),
3243 +/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose),
3244 +/* harmony export */ configureStore: () => (/* binding */ configureStore),
3245 +/* harmony export */ createAction: () => (/* binding */ createAction),
3246 +/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware),
3247 +/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk),
3248 +/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector),
3249 +/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter),
3250 +/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware),
3251 +/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware),
3252 +/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]),
3253 +/* harmony export */ createReducer: () => (/* binding */ createReducer),
3254 +/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector),
3255 +/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware),
3256 +/* harmony export */ createSlice: () => (/* binding */ createSlice),
3257 +/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore),
3258 +/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current),
3259 +/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue),
3260 +/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze),
3261 +/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware),
3262 +/* harmony export */ getType: () => (/* binding */ getType),
3263 +/* harmony export */ isAction: () => (/* binding */ isAction),
3264 +/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator),
3265 +/* harmony export */ isAllOf: () => (/* binding */ isAllOf),
3266 +/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf),
3267 +/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction),
3268 +/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft),
3269 +/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA),
3270 +/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled),
3271 +/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault),
3272 +/* harmony export */ isPending: () => (/* binding */ isPending),
3273 +/* harmony export */ isPlain: () => (/* binding */ isPlain),
3274 +/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject),
3275 +/* harmony export */ isRejected: () => (/* binding */ isRejected),
3276 +/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue),
3277 +/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore),
3278 +/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError),
3279 +/* harmony export */ nanoid: () => (/* binding */ nanoid),
3280 +/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original),
3281 +/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched),
3282 +/* harmony export */ removeListener: () => (/* binding */ removeListener),
3283 +/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult)
3284 +/* harmony export */ });
3285 +/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs");
3286 +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js");
3287 +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js");
3288 +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js");
3289 +var __extends = (undefined && undefined.__extends) || (function () {
3290 + var extendStatics = function (d, b) {
3291 + extendStatics = Object.setPrototypeOf ||
3292 + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
3293 + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
3294 + return extendStatics(d, b);
3295 + };
3296 + return function (d, b) {
3297 + if (typeof b !== "function" && b !== null)
3298 + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3299 + extendStatics(d, b);
3300 + function __() { this.constructor = d; }
3301 + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3302 + };
3303 +})();
3304 +var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
3305 + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
3306 + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
3307 + function verb(n) { return function (v) { return step([n, v]); }; }
3308 + function step(op) {
3309 + if (f) throw new TypeError("Generator is already executing.");
3310 + while (_) try {
3311 + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
3312 + if (y = 0, t) op = [op[0] & 2, t.value];
3313 + switch (op[0]) {
3314 + case 0: case 1: t = op; break;
3315 + case 4: _.label++; return { value: op[1], done: false };
3316 + case 5: _.label++; y = op[1]; op = [0]; continue;
3317 + case 7: op = _.ops.pop(); _.trys.pop(); continue;
3318 + default:
3319 + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
3320 + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
3321 + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
3322 + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
3323 + if (t[2]) _.ops.pop();
3324 + _.trys.pop(); continue;
3325 + }
3326 + op = body.call(thisArg, _);
3327 + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
3328 + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3329 + }
3330 +};
3331 +var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) {
3332 + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
3333 + to[j] = from[i];
3334 + return to;
3335 +};
3336 +var __defProp = Object.defineProperty;
3337 +var __defProps = Object.defineProperties;
3338 +var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
3339 +var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3340 +var __hasOwnProp = Object.prototype.hasOwnProperty;
3341 +var __propIsEnum = Object.prototype.propertyIsEnumerable;
3342 +var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; };
3343 +var __spreadValues = function (a, b) {
3344 + for (var prop in b || (b = {}))
3345 + if (__hasOwnProp.call(b, prop))
3346 + __defNormalProp(a, prop, b[prop]);
3347 + if (__getOwnPropSymbols)
3348 + for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) {
3349 + var prop = _c[_i];
3350 + if (__propIsEnum.call(b, prop))
3351 + __defNormalProp(a, prop, b[prop]);
3352 + }
3353 + return a;
3354 +};
3355 +var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); };
3356 +var __async = function (__this, __arguments, generator) {
3357 + return new Promise(function (resolve, reject) {
3358 + var fulfilled = function (value) {
3359 + try {
3360 + step(generator.next(value));
3361 + }
3362 + catch (e) {
3363 + reject(e);
3364 + }
3365 + };
3366 + var rejected = function (value) {
3367 + try {
3368 + step(generator.throw(value));
3369 + }
3370 + catch (e) {
3371 + reject(e);
3372 + }
3373 + };
3374 + var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); };
3375 + step((generator = generator.apply(__this, __arguments)).next());
3376 + });
3377 +};
3378 +// src/index.ts
3379 +
3380 +
3381 +
3382 +
3383 +// src/createDraftSafeSelector.ts
3384 +
3385 +
3386 +var createDraftSafeSelector = function () {
3387 + var args = [];
3388 + for (var _i = 0; _i < arguments.length; _i++) {
3389 + args[_i] = arguments[_i];
3390 + }
3391 + var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args);
3392 + var wrappedSelector = function (value) {
3393 + var rest = [];
3394 + for (var _i = 1; _i < arguments.length; _i++) {
3395 + rest[_i - 1] = arguments[_i];
3396 + }
3397 + return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest));
3398 + };
3399 + return wrappedSelector;
3400 +};
3401 +// src/configureStore.ts
3402 +
3403 +// src/devtoolsExtension.ts
3404 +
3405 +var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () {
3406 + if (arguments.length === 0)
3407 + return void 0;
3408 + if (typeof arguments[0] === "object")
3409 + return redux__WEBPACK_IMPORTED_MODULE_0__.compose;
3410 + return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments);
3411 +};
3412 +var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () {
3413 + return function (noop2) {
3414 + return noop2;
3415 + };
3416 +};
3417 +// src/isPlainObject.ts
3418 +function isPlainObject(value) {
3419 + if (typeof value !== "object" || value === null)
3420 + return false;
3421 + var proto = Object.getPrototypeOf(value);
3422 + if (proto === null)
3423 + return true;
3424 + var baseProto = proto;
3425 + while (Object.getPrototypeOf(baseProto) !== null) {
3426 + baseProto = Object.getPrototypeOf(baseProto);
3427 + }
3428 + return proto === baseProto;
3429 +}
3430 +// src/getDefaultMiddleware.ts
3431 +
3432 +// src/tsHelpers.ts
3433 +var hasMatchFunction = function (v) {
3434 + return v && typeof v.match === "function";
3435 +};
3436 +// src/createAction.ts
3437 +function createAction(type, prepareAction) {
3438 + function actionCreator() {
3439 + var args = [];
3440 + for (var _i = 0; _i < arguments.length; _i++) {
3441 + args[_i] = arguments[_i];
3442 + }
3443 + if (prepareAction) {
3444 + var prepared = prepareAction.apply(void 0, args);
3445 + if (!prepared) {
3446 + throw new Error("prepareAction did not return an object");
3447 + }
3448 + return __spreadValues(__spreadValues({
3449 + type: type,
3450 + payload: prepared.payload
3451 + }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error });
3452 + }
3453 + return { type: type, payload: args[0] };
3454 + }
3455 + actionCreator.toString = function () { return "" + type; };
3456 + actionCreator.type = type;
3457 + actionCreator.match = function (action) { return action.type === type; };
3458 + return actionCreator;
3459 +}
3460 +function isAction(action) {
3461 + return isPlainObject(action) && "type" in action;
3462 +}
3463 +function isActionCreator(action) {
3464 + return typeof action === "function" && "type" in action && hasMatchFunction(action);
3465 +}
3466 +function isFSA(action) {
3467 + return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey);
3468 +}
3469 +function isValidKey(key) {
3470 + return ["type", "payload", "error", "meta"].indexOf(key) > -1;
3471 +}
3472 +function getType(actionCreator) {
3473 + return "" + actionCreator;
3474 +}
3475 +// src/actionCreatorInvariantMiddleware.ts
3476 +function getMessage(type) {
3477 + var splitType = type ? ("" + type).split("/") : [];
3478 + var actionName = splitType[splitType.length - 1] || "actionCreator";
3479 + return "Detected an action creator with type \"" + (type || "unknown") + "\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch(" + actionName + "())` instead of `dispatch(" + actionName + ")`. This is necessary even if the action has no payload.";
3480 +}
3481 +function createActionCreatorInvariantMiddleware(options) {
3482 + if (options === void 0) { options = {}; }
3483 + if (false) // removed by dead control flow
3484 +{}
3485 + var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c;
3486 + return function () { return function (next) { return function (action) {
3487 + if (isActionCreator2(action)) {
3488 + console.warn(getMessage(action.type));
3489 + }
3490 + return next(action);
3491 + }; }; };
3492 +}
3493 +// src/utils.ts
3494 +
3495 +function getTimeMeasureUtils(maxDelay, fnName) {
3496 + var elapsed = 0;
3497 + return {
3498 + measureTime: function (fn) {
3499 + var started = Date.now();
3500 + try {
3501 + return fn();
3502 + }
3503 + finally {
3504 + var finished = Date.now();
3505 + elapsed += finished - started;
3506 + }
3507 + },
3508 + warnIfExceeded: function () {
3509 + if (elapsed > maxDelay) {
3510 + console.warn(fnName + " took " + elapsed + "ms, which is more than the warning threshold of " + maxDelay + "ms. \nIf your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.\nIt is disabled in production builds, so you don't need to worry about that.");
3511 + }
3512 + }
3513 + };
3514 +}
3515 +var MiddlewareArray = /** @class */ (function (_super) {
3516 + __extends(MiddlewareArray, _super);
3517 + function MiddlewareArray() {
3518 + var args = [];
3519 + for (var _i = 0; _i < arguments.length; _i++) {
3520 + args[_i] = arguments[_i];
3521 + }
3522 + var _this = _super.apply(this, args) || this;
3523 + Object.setPrototypeOf(_this, MiddlewareArray.prototype);
3524 + return _this;
3525 + }
3526 + Object.defineProperty(MiddlewareArray, Symbol.species, {
3527 + get: function () {
3528 + return MiddlewareArray;
3529 + },
3530 + enumerable: false,
3531 + configurable: true
3532 + });
3533 + MiddlewareArray.prototype.concat = function () {
3534 + var arr = [];
3535 + for (var _i = 0; _i < arguments.length; _i++) {
3536 + arr[_i] = arguments[_i];
3537 + }
3538 + return _super.prototype.concat.apply(this, arr);
3539 + };
3540 + MiddlewareArray.prototype.prepend = function () {
3541 + var arr = [];
3542 + for (var _i = 0; _i < arguments.length; _i++) {
3543 + arr[_i] = arguments[_i];
3544 + }
3545 + if (arr.length === 1 && Array.isArray(arr[0])) {
3546 + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))();
3547 + }
3548 + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))();
3549 + };
3550 + return MiddlewareArray;
3551 +}(Array));
3552 +var EnhancerArray = /** @class */ (function (_super) {
3553 + __extends(EnhancerArray, _super);
3554 + function EnhancerArray() {
3555 + var args = [];
3556 + for (var _i = 0; _i < arguments.length; _i++) {
3557 + args[_i] = arguments[_i];
3558 + }
3559 + var _this = _super.apply(this, args) || this;
3560 + Object.setPrototypeOf(_this, EnhancerArray.prototype);
3561 + return _this;
3562 + }
3563 + Object.defineProperty(EnhancerArray, Symbol.species, {
3564 + get: function () {
3565 + return EnhancerArray;
3566 + },
3567 + enumerable: false,
3568 + configurable: true
3569 + });
3570 + EnhancerArray.prototype.concat = function () {
3571 + var arr = [];
3572 + for (var _i = 0; _i < arguments.length; _i++) {
3573 + arr[_i] = arguments[_i];
3574 + }
3575 + return _super.prototype.concat.apply(this, arr);
3576 + };
3577 + EnhancerArray.prototype.prepend = function () {
3578 + var arr = [];
3579 + for (var _i = 0; _i < arguments.length; _i++) {
3580 + arr[_i] = arguments[_i];
3581 + }
3582 + if (arr.length === 1 && Array.isArray(arr[0])) {
3583 + return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))();
3584 + }
3585 + return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))();
3586 + };
3587 + return EnhancerArray;
3588 +}(Array));
3589 +function freezeDraftable(val) {
3590 + return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () {
3591 + }) : val;
3592 +}
3593 +// src/immutableStateInvariantMiddleware.ts
3594 +var isProduction = "development" === "production";
3595 +var prefix = "Invariant failed";
3596 +function invariant(condition, message) {
3597 + if (condition) {
3598 + return;
3599 + }
3600 + if (isProduction) {
3601 + throw new Error(prefix);
3602 + }
3603 + throw new Error(prefix + ": " + (message || ""));
3604 +}
3605 +function stringify(obj, serializer, indent, decycler) {
3606 + return JSON.stringify(obj, getSerialize(serializer, decycler), indent);
3607 +}
3608 +function getSerialize(serializer, decycler) {
3609 + var stack = [], keys = [];
3610 + if (!decycler)
3611 + decycler = function (_, value) {
3612 + if (stack[0] === value)
3613 + return "[Circular ~]";
3614 + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]";
3615 + };
3616 + return function (key, value) {
3617 + if (stack.length > 0) {
3618 + var thisPos = stack.indexOf(this);
3619 + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);
3620 + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);
3621 + if (~stack.indexOf(value))
3622 + value = decycler.call(this, key, value);
3623 + }
3624 + else
3625 + stack.push(value);
3626 + return serializer == null ? value : serializer.call(this, key, value);
3627 + };
3628 +}
3629 +function isImmutableDefault(value) {
3630 + return typeof value !== "object" || value == null || Object.isFrozen(value);
3631 +}
3632 +function trackForMutations(isImmutable, ignorePaths, obj) {
3633 + var trackedProperties = trackProperties(isImmutable, ignorePaths, obj);
3634 + return {
3635 + detectMutations: function () {
3636 + return detectMutations(isImmutable, ignorePaths, trackedProperties, obj);
3637 + }
3638 + };
3639 +}
3640 +function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) {
3641 + if (ignorePaths === void 0) { ignorePaths = []; }
3642 + if (path === void 0) { path = ""; }
3643 + if (checkedObjects === void 0) { checkedObjects = new Set(); }
3644 + var tracked = { value: obj };
3645 + if (!isImmutable(obj) && !checkedObjects.has(obj)) {
3646 + checkedObjects.add(obj);
3647 + tracked.children = {};
3648 + for (var key in obj) {
3649 + var childPath = path ? path + "." + key : key;
3650 + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) {
3651 + continue;
3652 + }
3653 + tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath);
3654 + }
3655 + }
3656 + return tracked;
3657 +}
3658 +function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) {
3659 + if (ignoredPaths === void 0) { ignoredPaths = []; }
3660 + if (sameParentRef === void 0) { sameParentRef = false; }
3661 + if (path === void 0) { path = ""; }
3662 + var prevObj = trackedProperty ? trackedProperty.value : void 0;
3663 + var sameRef = prevObj === obj;
3664 + if (sameParentRef && !sameRef && !Number.isNaN(obj)) {
3665 + return { wasMutated: true, path: path };
3666 + }
3667 + if (isImmutable(prevObj) || isImmutable(obj)) {
3668 + return { wasMutated: false };
3669 + }
3670 + var keysToDetect = {};
3671 + for (var key in trackedProperty.children) {
3672 + keysToDetect[key] = true;
3673 + }
3674 + for (var key in obj) {
3675 + keysToDetect[key] = true;
3676 + }
3677 + var hasIgnoredPaths = ignoredPaths.length > 0;
3678 + var _loop_1 = function (key) {
3679 + var nestedPath = path ? path + "." + key : key;
3680 + if (hasIgnoredPaths) {
3681 + var hasMatches = ignoredPaths.some(function (ignored) {
3682 + if (ignored instanceof RegExp) {
3683 + return ignored.test(nestedPath);
3684 + }
3685 + return nestedPath === ignored;
3686 + });
3687 + if (hasMatches) {
3688 + return "continue";
3689 + }
3690 + }
3691 + var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath);
3692 + if (result.wasMutated) {
3693 + return { value: result };
3694 + }
3695 + };
3696 + for (var key in keysToDetect) {
3697 + var state_1 = _loop_1(key);
3698 + if (typeof state_1 === "object")
3699 + return state_1.value;
3700 + }
3701 + return { wasMutated: false };
3702 +}
3703 +function createImmutableStateInvariantMiddleware(options) {
3704 + if (options === void 0) { options = {}; }
3705 + if (false) // removed by dead control flow
3706 +{}
3707 + var _c = options.isImmutable, isImmutable = _c === void 0 ? isImmutableDefault : _c, ignoredPaths = options.ignoredPaths, _d = options.warnAfter, warnAfter = _d === void 0 ? 32 : _d, ignore = options.ignore;
3708 + ignoredPaths = ignoredPaths || ignore;
3709 + var track = trackForMutations.bind(null, isImmutable, ignoredPaths);
3710 + return function (_c) {
3711 + var getState = _c.getState;
3712 + var state = getState();
3713 + var tracker = track(state);
3714 + var result;
3715 + return function (next) { return function (action) {
3716 + var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware");
3717 + measureUtils.measureTime(function () {
3718 + state = getState();
3719 + result = tracker.detectMutations();
3720 + tracker = track(state);
3721 + invariant(!result.wasMutated, "A state mutation was detected between dispatches, in the path '" + (result.path || "") + "'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
3722 + });
3723 + var dispatchedAction = next(action);
3724 + measureUtils.measureTime(function () {
3725 + state = getState();
3726 + result = tracker.detectMutations();
3727 + tracker = track(state);
3728 + result.wasMutated && invariant(!result.wasMutated, "A state mutation was detected inside a dispatch, in the path: " + (result.path || "") + ". Take a look at the reducer(s) handling the action " + stringify(action) + ". (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)");
3729 + });
3730 + measureUtils.warnIfExceeded();
3731 + return dispatchedAction;
3732 + }; };
3733 + };
3734 +}
3735 +// src/serializableStateInvariantMiddleware.ts
3736 +function isPlain(val) {
3737 + var type = typeof val;
3738 + return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val);
3739 +}
3740 +function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) {
3741 + if (path === void 0) { path = ""; }
3742 + if (isSerializable === void 0) { isSerializable = isPlain; }
3743 + if (ignoredPaths === void 0) { ignoredPaths = []; }
3744 + var foundNestedSerializable;
3745 + if (!isSerializable(value)) {
3746 + return {
3747 + keyPath: path || "<root>",
3748 + value: value
3749 + };
3750 + }
3751 + if (typeof value !== "object" || value === null) {
3752 + return false;
3753 + }
3754 + if (cache == null ? void 0 : cache.has(value))
3755 + return false;
3756 + var entries = getEntries != null ? getEntries(value) : Object.entries(value);
3757 + var hasIgnoredPaths = ignoredPaths.length > 0;
3758 + var _loop_2 = function (key, nestedValue) {
3759 + var nestedPath = path ? path + "." + key : key;
3760 + if (hasIgnoredPaths) {
3761 + var hasMatches = ignoredPaths.some(function (ignored) {
3762 + if (ignored instanceof RegExp) {
3763 + return ignored.test(nestedPath);
3764 + }
3765 + return nestedPath === ignored;
3766 + });
3767 + if (hasMatches) {
3768 + return "continue";
3769 + }
3770 + }
3771 + if (!isSerializable(nestedValue)) {
3772 + return { value: {
3773 + keyPath: nestedPath,
3774 + value: nestedValue
3775 + } };
3776 + }
3777 + if (typeof nestedValue === "object") {
3778 + foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache);
3779 + if (foundNestedSerializable) {
3780 + return { value: foundNestedSerializable };
3781 + }
3782 + }
3783 + };
3784 + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {
3785 + var _c = entries_1[_i], key = _c[0], nestedValue = _c[1];
3786 + var state_2 = _loop_2(key, nestedValue);
3787 + if (typeof state_2 === "object")
3788 + return state_2.value;
3789 + }
3790 + if (cache && isNestedFrozen(value))
3791 + cache.add(value);
3792 + return false;
3793 +}
3794 +function isNestedFrozen(value) {
3795 + if (!Object.isFrozen(value))
3796 + return false;
3797 + for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) {
3798 + var nestedValue = _c[_i];
3799 + if (typeof nestedValue !== "object" || nestedValue === null)
3800 + continue;
3801 + if (!isNestedFrozen(nestedValue))
3802 + return false;
3803 + }
3804 + return true;
3805 +}
3806 +function createSerializableStateInvariantMiddleware(options) {
3807 + if (options === void 0) { options = {}; }
3808 + if (false) // removed by dead control flow
3809 +{}
3810 + var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k;
3811 + var cache = !disableCache && WeakSet ? new WeakSet() : void 0;
3812 + return function (storeAPI) { return function (next) { return function (action) {
3813 + var result = next(action);
3814 + var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware");
3815 + if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) {
3816 + measureUtils.measureTime(function () {
3817 + var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache);
3818 + if (foundActionNonSerializableValue) {
3819 + var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value;
3820 + console.error("A non-serializable value was detected in an action, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the logic that dispatched this action: ", action, "\n(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)", "\n(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)");
3821 + }
3822 + });
3823 + }
3824 + if (!ignoreState) {
3825 + measureUtils.measureTime(function () {
3826 + var state = storeAPI.getState();
3827 + var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache);
3828 + if (foundStateNonSerializableValue) {
3829 + var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value;
3830 + console.error("A non-serializable value was detected in the state, in the path: `" + keyPath + "`. Value:", value, "\nTake a look at the reducer(s) handling this action type: " + action.type + ".\n(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)");
3831 + }
3832 + });
3833 + measureUtils.warnIfExceeded();
3834 + }
3835 + return result;
3836 + }; }; };
3837 +}
3838 +// src/getDefaultMiddleware.ts
3839 +function isBoolean(x) {
3840 + return typeof x === "boolean";
3841 +}
3842 +function curryGetDefaultMiddleware() {
3843 + return function curriedGetDefaultMiddleware(options) {
3844 + return getDefaultMiddleware(options);
3845 + };
3846 +}
3847 +function getDefaultMiddleware(options) {
3848 + if (options === void 0) { options = {}; }
3849 + var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f;
3850 + var middlewareArray = new MiddlewareArray();
3851 + if (thunk) {
3852 + if (isBoolean(thunk)) {
3853 + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]);
3854 + }
3855 + else {
3856 + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument));
3857 + }
3858 + }
3859 + if (true) {
3860 + if (immutableCheck) {
3861 + var immutableOptions = {};
3862 + if (!isBoolean(immutableCheck)) {
3863 + immutableOptions = immutableCheck;
3864 + }
3865 + middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions));
3866 + }
3867 + if (serializableCheck) {
3868 + var serializableOptions = {};
3869 + if (!isBoolean(serializableCheck)) {
3870 + serializableOptions = serializableCheck;
3871 + }
3872 + middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions));
3873 + }
3874 + if (actionCreatorCheck) {
3875 + var actionCreatorOptions = {};
3876 + if (!isBoolean(actionCreatorCheck)) {
3877 + actionCreatorOptions = actionCreatorCheck;
3878 + }
3879 + middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions));
3880 + }
3881 + }
3882 + return middlewareArray;
3883 +}
3884 +// src/configureStore.ts
3885 +var IS_PRODUCTION = "development" === "production";
3886 +function configureStore(options) {
3887 + var curriedGetDefaultMiddleware = curryGetDefaultMiddleware();
3888 + var _c = options || {}, _d = _c.reducer, reducer = _d === void 0 ? void 0 : _d, _e = _c.middleware, middleware = _e === void 0 ? curriedGetDefaultMiddleware() : _e, _f = _c.devTools, devTools = _f === void 0 ? true : _f, _g = _c.preloadedState, preloadedState = _g === void 0 ? void 0 : _g, _h = _c.enhancers, enhancers = _h === void 0 ? void 0 : _h;
3889 + var rootReducer;
3890 + if (typeof reducer === "function") {
3891 + rootReducer = reducer;
3892 + }
3893 + else if (isPlainObject(reducer)) {
3894 + rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer);
3895 + }
3896 + else {
3897 + throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');
3898 + }
3899 + var finalMiddleware = middleware;
3900 + if (typeof finalMiddleware === "function") {
3901 + finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware);
3902 + if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) {
3903 + throw new Error("when using a middleware builder function, an array of middleware must be returned");
3904 + }
3905 + }
3906 + if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) {
3907 + throw new Error("each middleware provided to configureStore must be a function");
3908 + }
3909 + var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware);
3910 + var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose;
3911 + if (devTools) {
3912 + finalCompose = composeWithDevTools(__spreadValues({
3913 + trace: !IS_PRODUCTION
3914 + }, typeof devTools === "object" && devTools));
3915 + }
3916 + var defaultEnhancers = new EnhancerArray(middlewareEnhancer);
3917 + var storeEnhancers = defaultEnhancers;
3918 + if (Array.isArray(enhancers)) {
3919 + storeEnhancers = __spreadArray([middlewareEnhancer], enhancers);
3920 + }
3921 + else if (typeof enhancers === "function") {
3922 + storeEnhancers = enhancers(defaultEnhancers);
3923 + }
3924 + var composedEnhancer = finalCompose.apply(void 0, storeEnhancers);
3925 + return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer);
3926 +}
3927 +// src/createReducer.ts
3928 +
3929 +// src/mapBuilders.ts
3930 +function executeReducerBuilderCallback(builderCallback) {
3931 + var actionsMap = {};
3932 + var actionMatchers = [];
3933 + var defaultCaseReducer;
3934 + var builder = {
3935 + addCase: function (typeOrActionCreator, reducer) {
3936 + if (true) {
3937 + if (actionMatchers.length > 0) {
3938 + throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`");
3939 + }
3940 + if (defaultCaseReducer) {
3941 + throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`");
3942 + }
3943 + }
3944 + var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type;
3945 + if (!type) {
3946 + throw new Error("`builder.addCase` cannot be called with an empty action type");
3947 + }
3948 + if (type in actionsMap) {
3949 + throw new Error("`builder.addCase` cannot be called with two reducers for the same action type");
3950 + }
3951 + actionsMap[type] = reducer;
3952 + return builder;
3953 + },
3954 + addMatcher: function (matcher, reducer) {
3955 + if (true) {
3956 + if (defaultCaseReducer) {
3957 + throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");
3958 + }
3959 + }
3960 + actionMatchers.push({ matcher: matcher, reducer: reducer });
3961 + return builder;
3962 + },
3963 + addDefaultCase: function (reducer) {
3964 + if (true) {
3965 + if (defaultCaseReducer) {
3966 + throw new Error("`builder.addDefaultCase` can only be called once");
3967 + }
3968 + }
3969 + defaultCaseReducer = reducer;
3970 + return builder;
3971 + }
3972 + };
3973 + builderCallback(builder);
3974 + return [actionsMap, actionMatchers, defaultCaseReducer];
3975 +}
3976 +// src/createReducer.ts
3977 +function isStateFunction(x) {
3978 + return typeof x === "function";
3979 +}
3980 +var hasWarnedAboutObjectNotation = false;
3981 +function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) {
3982 + if (actionMatchers === void 0) { actionMatchers = []; }
3983 + if (true) {
3984 + if (typeof mapOrBuilderCallback === "object") {
3985 + if (!hasWarnedAboutObjectNotation) {
3986 + hasWarnedAboutObjectNotation = true;
3987 + console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");
3988 + }
3989 + }
3990 + }
3991 + var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2];
3992 + var getInitialState;
3993 + if (isStateFunction(initialState)) {
3994 + getInitialState = function () { return freezeDraftable(initialState()); };
3995 + }
3996 + else {
3997 + var frozenInitialState_1 = freezeDraftable(initialState);
3998 + getInitialState = function () { return frozenInitialState_1; };
3999 + }
4000 + function reducer(state, action) {
4001 + if (state === void 0) { state = getInitialState(); }
4002 + var caseReducers = __spreadArray([
4003 + actionsMap[action.type]
4004 + ], finalActionMatchers.filter(function (_c) {
4005 + var matcher = _c.matcher;
4006 + return matcher(action);
4007 + }).map(function (_c) {
4008 + var reducer2 = _c.reducer;
4009 + return reducer2;
4010 + }));
4011 + if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) {
4012 + caseReducers = [finalDefaultCaseReducer];
4013 + }
4014 + return caseReducers.reduce(function (previousState, caseReducer) {
4015 + if (caseReducer) {
4016 + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) {
4017 + var draft = previousState;
4018 + var result = caseReducer(draft, action);
4019 + if (result === void 0) {
4020 + return previousState;
4021 + }
4022 + return result;
4023 + }
4024 + else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) {
4025 + var result = caseReducer(previousState, action);
4026 + if (result === void 0) {
4027 + if (previousState === null) {
4028 + return previousState;
4029 + }
4030 + throw Error("A case reducer on a non-draftable value must not return undefined");
4031 + }
4032 + return result;
4033 + }
4034 + else {
4035 + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) {
4036 + return caseReducer(draft, action);
4037 + });
4038 + }
4039 + }
4040 + return previousState;
4041 + }, state);
4042 + }
4043 + reducer.getInitialState = getInitialState;
4044 + return reducer;
4045 +}
4046 +// src/createSlice.ts
4047 +var hasWarnedAboutObjectNotation2 = false;
4048 +function getType2(slice, actionKey) {
4049 + return slice + "/" + actionKey;
4050 +}
4051 +function createSlice(options) {
4052 + var name = options.name;
4053 + if (!name) {
4054 + throw new Error("`name` is a required option for createSlice");
4055 + }
4056 + if (typeof process !== "undefined" && "development" === "development") {
4057 + if (options.initialState === void 0) {
4058 + console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");
4059 + }
4060 + }
4061 + var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState);
4062 + var reducers = options.reducers || {};
4063 + var reducerNames = Object.keys(reducers);
4064 + var sliceCaseReducersByName = {};
4065 + var sliceCaseReducersByType = {};
4066 + var actionCreators = {};
4067 + reducerNames.forEach(function (reducerName) {
4068 + var maybeReducerWithPrepare = reducers[reducerName];
4069 + var type = getType2(name, reducerName);
4070 + var caseReducer;
4071 + var prepareCallback;
4072 + if ("reducer" in maybeReducerWithPrepare) {
4073 + caseReducer = maybeReducerWithPrepare.reducer;
4074 + prepareCallback = maybeReducerWithPrepare.prepare;
4075 + }
4076 + else {
4077 + caseReducer = maybeReducerWithPrepare;
4078 + }
4079 + sliceCaseReducersByName[reducerName] = caseReducer;
4080 + sliceCaseReducersByType[type] = caseReducer;
4081 + actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type);
4082 + });
4083 + function buildReducer() {
4084 + if (true) {
4085 + if (typeof options.extraReducers === "object") {
4086 + if (!hasWarnedAboutObjectNotation2) {
4087 + hasWarnedAboutObjectNotation2 = true;
4088 + console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");
4089 + }
4090 + }
4091 + }
4092 + var _c = typeof options.extraReducers === "function" ? executeReducerBuilderCallback(options.extraReducers) : [options.extraReducers], _d = _c[0], extraReducers = _d === void 0 ? {} : _d, _e = _c[1], actionMatchers = _e === void 0 ? [] : _e, _f = _c[2], defaultCaseReducer = _f === void 0 ? void 0 : _f;
4093 + var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType);
4094 + return createReducer(initialState, function (builder) {
4095 + for (var key in finalCaseReducers) {
4096 + builder.addCase(key, finalCaseReducers[key]);
4097 + }
4098 + for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) {
4099 + var m = actionMatchers_1[_i];
4100 + builder.addMatcher(m.matcher, m.reducer);
4101 + }
4102 + if (defaultCaseReducer) {
4103 + builder.addDefaultCase(defaultCaseReducer);
4104 + }
4105 + });
4106 + }
4107 + var _reducer;
4108 + return {
4109 + name: name,
4110 + reducer: function (state, action) {
4111 + if (!_reducer)
4112 + _reducer = buildReducer();
4113 + return _reducer(state, action);
4114 + },
4115 + actions: actionCreators,
4116 + caseReducers: sliceCaseReducersByName,
4117 + getInitialState: function () {
4118 + if (!_reducer)
4119 + _reducer = buildReducer();
4120 + return _reducer.getInitialState();
4121 + }
4122 + };
4123 +}
4124 +// src/entities/entity_state.ts
4125 +function getInitialEntityState() {
4126 + return {
4127 + ids: [],
4128 + entities: {}
4129 + };
4130 +}
4131 +function createInitialStateFactory() {
4132 + function getInitialState(additionalState) {
4133 + if (additionalState === void 0) { additionalState = {}; }
4134 + return Object.assign(getInitialEntityState(), additionalState);
4135 + }
4136 + return { getInitialState: getInitialState };
4137 +}
4138 +// src/entities/state_selectors.ts
4139 +function createSelectorsFactory() {
4140 + function getSelectors(selectState) {
4141 + var selectIds = function (state) { return state.ids; };
4142 + var selectEntities = function (state) { return state.entities; };
4143 + var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); });
4144 + var selectId = function (_, id) { return id; };
4145 + var selectById = function (entities, id) { return entities[id]; };
4146 + var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; });
4147 + if (!selectState) {
4148 + return {
4149 + selectIds: selectIds,
4150 + selectEntities: selectEntities,
4151 + selectAll: selectAll,
4152 + selectTotal: selectTotal,
4153 + selectById: createDraftSafeSelector(selectEntities, selectId, selectById)
4154 + };
4155 + }
4156 + var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities);
4157 + return {
4158 + selectIds: createDraftSafeSelector(selectState, selectIds),
4159 + selectEntities: selectGlobalizedEntities,
4160 + selectAll: createDraftSafeSelector(selectState, selectAll),
4161 + selectTotal: createDraftSafeSelector(selectState, selectTotal),
4162 + selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById)
4163 + };
4164 + }
4165 + return { getSelectors: getSelectors };
4166 +}
4167 +// src/entities/state_adapter.ts
4168 +
4169 +function createSingleArgumentStateOperator(mutator) {
4170 + var operator = createStateOperator(function (_, state) { return mutator(state); });
4171 + return function operation(state) {
4172 + return operator(state, void 0);
4173 + };
4174 +}
4175 +function createStateOperator(mutator) {
4176 + return function operation(state, arg) {
4177 + function isPayloadActionArgument(arg2) {
4178 + return isFSA(arg2);
4179 + }
4180 + var runMutator = function (draft) {
4181 + if (isPayloadActionArgument(arg)) {
4182 + mutator(arg.payload, draft);
4183 + }
4184 + else {
4185 + mutator(arg, draft);
4186 + }
4187 + };
4188 + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) {
4189 + runMutator(state);
4190 + return state;
4191 + }
4192 + else {
4193 + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator);
4194 + }
4195 + };
4196 +}
4197 +// src/entities/utils.ts
4198 +function selectIdValue(entity, selectId) {
4199 + var key = selectId(entity);
4200 + if ( true && key === void 0) {
4201 + console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", entity, "The `selectId` implementation:", selectId.toString());
4202 + }
4203 + return key;
4204 +}
4205 +function ensureEntitiesArray(entities) {
4206 + if (!Array.isArray(entities)) {
4207 + entities = Object.values(entities);
4208 + }
4209 + return entities;
4210 +}
4211 +function splitAddedUpdatedEntities(newEntities, selectId, state) {
4212 + newEntities = ensureEntitiesArray(newEntities);
4213 + var added = [];
4214 + var updated = [];
4215 + for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) {
4216 + var entity = newEntities_1[_i];
4217 + var id = selectIdValue(entity, selectId);
4218 + if (id in state.entities) {
4219 + updated.push({ id: id, changes: entity });
4220 + }
4221 + else {
4222 + added.push(entity);
4223 + }
4224 + }
4225 + return [added, updated];
4226 +}
4227 +// src/entities/unsorted_state_adapter.ts
4228 +function createUnsortedStateAdapter(selectId) {
4229 + function addOneMutably(entity, state) {
4230 + var key = selectIdValue(entity, selectId);
4231 + if (key in state.entities) {
4232 + return;
4233 + }
4234 + state.ids.push(key);
4235 + state.entities[key] = entity;
4236 + }
4237 + function addManyMutably(newEntities, state) {
4238 + newEntities = ensureEntitiesArray(newEntities);
4239 + for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) {
4240 + var entity = newEntities_2[_i];
4241 + addOneMutably(entity, state);
4242 + }
4243 + }
4244 + function setOneMutably(entity, state) {
4245 + var key = selectIdValue(entity, selectId);
4246 + if (!(key in state.entities)) {
4247 + state.ids.push(key);
4248 + }
4249 + state.entities[key] = entity;
4250 + }
4251 + function setManyMutably(newEntities, state) {
4252 + newEntities = ensureEntitiesArray(newEntities);
4253 + for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) {
4254 + var entity = newEntities_3[_i];
4255 + setOneMutably(entity, state);
4256 + }
4257 + }
4258 + function setAllMutably(newEntities, state) {
4259 + newEntities = ensureEntitiesArray(newEntities);
4260 + state.ids = [];
4261 + state.entities = {};
4262 + addManyMutably(newEntities, state);
4263 + }
4264 + function removeOneMutably(key, state) {
4265 + return removeManyMutably([key], state);
4266 + }
4267 + function removeManyMutably(keys, state) {
4268 + var didMutate = false;
4269 + keys.forEach(function (key) {
4270 + if (key in state.entities) {
4271 + delete state.entities[key];
4272 + didMutate = true;
4273 + }
4274 + });
4275 + if (didMutate) {
4276 + state.ids = state.ids.filter(function (id) { return id in state.entities; });
4277 + }
4278 + }
4279 + function removeAllMutably(state) {
4280 + Object.assign(state, {
4281 + ids: [],
4282 + entities: {}
4283 + });
4284 + }
4285 + function takeNewKey(keys, update, state) {
4286 + var original2 = state.entities[update.id];
4287 + var updated = Object.assign({}, original2, update.changes);
4288 + var newKey = selectIdValue(updated, selectId);
4289 + var hasNewKey = newKey !== update.id;
4290 + if (hasNewKey) {
4291 + keys[update.id] = newKey;
4292 + delete state.entities[update.id];
4293 + }
4294 + state.entities[newKey] = updated;
4295 + return hasNewKey;
4296 + }
4297 + function updateOneMutably(update, state) {
4298 + return updateManyMutably([update], state);
4299 + }
4300 + function updateManyMutably(updates, state) {
4301 + var newKeys = {};
4302 + var updatesPerEntity = {};
4303 + updates.forEach(function (update) {
4304 + if (update.id in state.entities) {
4305 + updatesPerEntity[update.id] = {
4306 + id: update.id,
4307 + changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes)
4308 + };
4309 + }
4310 + });
4311 + updates = Object.values(updatesPerEntity);
4312 + var didMutateEntities = updates.length > 0;
4313 + if (didMutateEntities) {
4314 + var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0;
4315 + if (didMutateIds) {
4316 + state.ids = Object.keys(state.entities);
4317 + }
4318 + }
4319 + }
4320 + function upsertOneMutably(entity, state) {
4321 + return upsertManyMutably([entity], state);
4322 + }
4323 + function upsertManyMutably(newEntities, state) {
4324 + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
4325 + updateManyMutably(updated, state);
4326 + addManyMutably(added, state);
4327 + }
4328 + return {
4329 + removeAll: createSingleArgumentStateOperator(removeAllMutably),
4330 + addOne: createStateOperator(addOneMutably),
4331 + addMany: createStateOperator(addManyMutably),
4332 + setOne: createStateOperator(setOneMutably),
4333 + setMany: createStateOperator(setManyMutably),
4334 + setAll: createStateOperator(setAllMutably),
4335 + updateOne: createStateOperator(updateOneMutably),
4336 + updateMany: createStateOperator(updateManyMutably),
4337 + upsertOne: createStateOperator(upsertOneMutably),
4338 + upsertMany: createStateOperator(upsertManyMutably),
4339 + removeOne: createStateOperator(removeOneMutably),
4340 + removeMany: createStateOperator(removeManyMutably)
4341 + };
4342 +}
4343 +// src/entities/sorted_state_adapter.ts
4344 +function createSortedStateAdapter(selectId, sort) {
4345 + var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll;
4346 + function addOneMutably(entity, state) {
4347 + return addManyMutably([entity], state);
4348 + }
4349 + function addManyMutably(newEntities, state) {
4350 + newEntities = ensureEntitiesArray(newEntities);
4351 + var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); });
4352 + if (models.length !== 0) {
4353 + merge(models, state);
4354 + }
4355 + }
4356 + function setOneMutably(entity, state) {
4357 + return setManyMutably([entity], state);
4358 + }
4359 + function setManyMutably(newEntities, state) {
4360 + newEntities = ensureEntitiesArray(newEntities);
4361 + if (newEntities.length !== 0) {
4362 + merge(newEntities, state);
4363 + }
4364 + }
4365 + function setAllMutably(newEntities, state) {
4366 + newEntities = ensureEntitiesArray(newEntities);
4367 + state.entities = {};
4368 + state.ids = [];
4369 + addManyMutably(newEntities, state);
4370 + }
4371 + function updateOneMutably(update, state) {
4372 + return updateManyMutably([update], state);
4373 + }
4374 + function updateManyMutably(updates, state) {
4375 + var appliedUpdates = false;
4376 + for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) {
4377 + var update = updates_1[_i];
4378 + var entity = state.entities[update.id];
4379 + if (!entity) {
4380 + continue;
4381 + }
4382 + appliedUpdates = true;
4383 + Object.assign(entity, update.changes);
4384 + var newId = selectId(entity);
4385 + if (update.id !== newId) {
4386 + delete state.entities[update.id];
4387 + state.entities[newId] = entity;
4388 + }
4389 + }
4390 + if (appliedUpdates) {
4391 + resortEntities(state);
4392 + }
4393 + }
4394 + function upsertOneMutably(entity, state) {
4395 + return upsertManyMutably([entity], state);
4396 + }
4397 + function upsertManyMutably(newEntities, state) {
4398 + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1];
4399 + updateManyMutably(updated, state);
4400 + addManyMutably(added, state);
4401 + }
4402 + function areArraysEqual(a, b) {
4403 + if (a.length !== b.length) {
4404 + return false;
4405 + }
4406 + for (var i = 0; i < a.length && i < b.length; i++) {
4407 + if (a[i] === b[i]) {
4408 + continue;
4409 + }
4410 + return false;
4411 + }
4412 + return true;
4413 + }
4414 + function merge(models, state) {
4415 + models.forEach(function (model) {
4416 + state.entities[selectId(model)] = model;
4417 + });
4418 + resortEntities(state);
4419 + }
4420 + function resortEntities(state) {
4421 + var allEntities = Object.values(state.entities);
4422 + allEntities.sort(sort);
4423 + var newSortedIds = allEntities.map(selectId);
4424 + var ids = state.ids;
4425 + if (!areArraysEqual(ids, newSortedIds)) {
4426 + state.ids = newSortedIds;
4427 + }
4428 + }
4429 + return {
4430 + removeOne: removeOne,
4431 + removeMany: removeMany,
4432 + removeAll: removeAll,
4433 + addOne: createStateOperator(addOneMutably),
4434 + updateOne: createStateOperator(updateOneMutably),
4435 + upsertOne: createStateOperator(upsertOneMutably),
4436 + setOne: createStateOperator(setOneMutably),
4437 + setMany: createStateOperator(setManyMutably),
4438 + setAll: createStateOperator(setAllMutably),
4439 + addMany: createStateOperator(addManyMutably),
4440 + updateMany: createStateOperator(updateManyMutably),
4441 + upsertMany: createStateOperator(upsertManyMutably)
4442 + };
4443 +}
4444 +// src/entities/create_adapter.ts
4445 +function createEntityAdapter(options) {
4446 + if (options === void 0) { options = {}; }
4447 + var _c = __spreadValues({
4448 + sortComparer: false,
4449 + selectId: function (instance) { return instance.id; }
4450 + }, options), selectId = _c.selectId, sortComparer = _c.sortComparer;
4451 + var stateFactory = createInitialStateFactory();
4452 + var selectorsFactory = createSelectorsFactory();
4453 + var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId);
4454 + return __spreadValues(__spreadValues(__spreadValues({
4455 + selectId: selectId,
4456 + sortComparer: sortComparer
4457 + }, stateFactory), selectorsFactory), stateAdapter);
4458 +}
4459 +// src/nanoid.ts
4460 +var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW";
4461 +var nanoid = function (size) {
4462 + if (size === void 0) { size = 21; }
4463 + var id = "";
4464 + var i = size;
4465 + while (i--) {
4466 + id += urlAlphabet[Math.random() * 64 | 0];
4467 + }
4468 + return id;
4469 +};
4470 +// src/createAsyncThunk.ts
4471 +var commonProperties = [
4472 + "name",
4473 + "message",
4474 + "stack",
4475 + "code"
4476 +];
4477 +var RejectWithValue = /** @class */ (function () {
4478 + function RejectWithValue(payload, meta) {
4479 + this.payload = payload;
4480 + this.meta = meta;
4481 + }
4482 + return RejectWithValue;
4483 +}());
4484 +var FulfillWithMeta = /** @class */ (function () {
4485 + function FulfillWithMeta(payload, meta) {
4486 + this.payload = payload;
4487 + this.meta = meta;
4488 + }
4489 + return FulfillWithMeta;
4490 +}());
4491 +var miniSerializeError = function (value) {
4492 + if (typeof value === "object" && value !== null) {
4493 + var simpleError = {};
4494 + for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) {
4495 + var property = commonProperties_1[_i];
4496 + if (typeof value[property] === "string") {
4497 + simpleError[property] = value[property];
4498 + }
4499 + }
4500 + return simpleError;
4501 + }
4502 + return { message: String(value) };
4503 +};
4504 +var createAsyncThunk = (function () {
4505 + function createAsyncThunk2(typePrefix, payloadCreator, options) {
4506 + var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({
4507 + payload: payload,
4508 + meta: __spreadProps(__spreadValues({}, meta || {}), {
4509 + arg: arg,
4510 + requestId: requestId,
4511 + requestStatus: "fulfilled"
4512 + })
4513 + }); });
4514 + var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({
4515 + payload: void 0,
4516 + meta: __spreadProps(__spreadValues({}, meta || {}), {
4517 + arg: arg,
4518 + requestId: requestId,
4519 + requestStatus: "pending"
4520 + })
4521 + }); });
4522 + var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({
4523 + payload: payload,
4524 + error: (options && options.serializeError || miniSerializeError)(error || "Rejected"),
4525 + meta: __spreadProps(__spreadValues({}, meta || {}), {
4526 + arg: arg,
4527 + requestId: requestId,
4528 + rejectedWithValue: !!payload,
4529 + requestStatus: "rejected",
4530 + aborted: (error == null ? void 0 : error.name) === "AbortError",
4531 + condition: (error == null ? void 0 : error.name) === "ConditionError"
4532 + })
4533 + }); });
4534 + var displayedWarning = false;
4535 + var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () {
4536 + function class_1() {
4537 + this.signal = {
4538 + aborted: false,
4539 + addEventListener: function () {
4540 + },
4541 + dispatchEvent: function () {
4542 + return false;
4543 + },
4544 + onabort: function () {
4545 + },
4546 + removeEventListener: function () {
4547 + },
4548 + reason: void 0,
4549 + throwIfAborted: function () {
4550 + }
4551 + };
4552 + }
4553 + class_1.prototype.abort = function () {
4554 + if (true) {
4555 + if (!displayedWarning) {
4556 + displayedWarning = true;
4557 + console.info("This platform does not implement AbortController. \nIf you want to use the AbortController to react to `abort` events, please consider importing a polyfill like 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'.");
4558 + }
4559 + }
4560 + };
4561 + return class_1;
4562 + }());
4563 + function actionCreator(arg) {
4564 + return function (dispatch, getState, extra) {
4565 + var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid();
4566 + var abortController = new AC();
4567 + var abortReason;
4568 + var started = false;
4569 + function abort(reason) {
4570 + abortReason = reason;
4571 + abortController.abort();
4572 + }
4573 + var promise2 = function () {
4574 + return __async(this, null, function () {
4575 + var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch;
4576 + return __generator(this, function (_c) {
4577 + switch (_c.label) {
4578 + case 0:
4579 + _c.trys.push([0, 4, , 5]);
4580 + conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra });
4581 + if (!isThenable(conditionResult)) return [3 /*break*/, 2];
4582 + return [4 /*yield*/, conditionResult];
4583 + case 1:
4584 + conditionResult = _c.sent();
4585 + _c.label = 2;
4586 + case 2:
4587 + if (conditionResult === false || abortController.signal.aborted) {
4588 + throw {
4589 + name: "ConditionError",
4590 + message: "Aborted due to condition callback returning false."
4591 + };
4592 + }
4593 + started = true;
4594 + abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({
4595 + name: "AbortError",
4596 + message: abortReason || "Aborted"
4597 + }); }); });
4598 + dispatch(pending(requestId, arg, (_b = options == null ? void 0 : options.getPendingMeta) == null ? void 0 : _b.call(options, { requestId: requestId, arg: arg }, { getState: getState, extra: extra })));
4599 + return [4 /*yield*/, Promise.race([
4600 + abortedPromise,
4601 + Promise.resolve(payloadCreator(arg, {
4602 + dispatch: dispatch,
4603 + getState: getState,
4604 + extra: extra,
4605 + requestId: requestId,
4606 + signal: abortController.signal,
4607 + abort: abort,
4608 + rejectWithValue: function (value, meta) {
4609 + return new RejectWithValue(value, meta);
4610 + },
4611 + fulfillWithValue: function (value, meta) {
4612 + return new FulfillWithMeta(value, meta);
4613 + }
4614 + })).then(function (result) {
4615 + if (result instanceof RejectWithValue) {
4616 + throw result;
4617 + }
4618 + if (result instanceof FulfillWithMeta) {
4619 + return fulfilled(result.payload, requestId, arg, result.meta);
4620 + }
4621 + return fulfilled(result, requestId, arg);
4622 + })
4623 + ])];
4624 + case 3:
4625 + finalAction = _c.sent();
4626 + return [3 /*break*/, 5];
4627 + case 4:
4628 + err_1 = _c.sent();
4629 + finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg);
4630 + return [3 /*break*/, 5];
4631 + case 5:
4632 + skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition;
4633 + if (!skipDispatch) {
4634 + dispatch(finalAction);
4635 + }
4636 + return [2 /*return*/, finalAction];
4637 + }
4638 + });
4639 + });
4640 + }();
4641 + return Object.assign(promise2, {
4642 + abort: abort,
4643 + requestId: requestId,
4644 + arg: arg,
4645 + unwrap: function () {
4646 + return promise2.then(unwrapResult);
4647 + }
4648 + });
4649 + };
4650 + }
4651 + return Object.assign(actionCreator, {
4652 + pending: pending,
4653 + rejected: rejected,
4654 + fulfilled: fulfilled,
4655 + typePrefix: typePrefix
4656 + });
4657 + }
4658 + createAsyncThunk2.withTypes = function () { return createAsyncThunk2; };
4659 + return createAsyncThunk2;
4660 +})();
4661 +function unwrapResult(action) {
4662 + if (action.meta && action.meta.rejectedWithValue) {
4663 + throw action.payload;
4664 + }
4665 + if (action.error) {
4666 + throw action.error;
4667 + }
4668 + return action.payload;
4669 +}
4670 +function isThenable(value) {
4671 + return value !== null && typeof value === "object" && typeof value.then === "function";
4672 +}
4673 +// src/matchers.ts
4674 +var matches = function (matcher, action) {
4675 + if (hasMatchFunction(matcher)) {
4676 + return matcher.match(action);
4677 + }
4678 + else {
4679 + return matcher(action);
4680 + }
4681 +};
4682 +function isAnyOf() {
4683 + var matchers = [];
4684 + for (var _i = 0; _i < arguments.length; _i++) {
4685 + matchers[_i] = arguments[_i];
4686 + }
4687 + return function (action) {
4688 + return matchers.some(function (matcher) { return matches(matcher, action); });
4689 + };
4690 +}
4691 +function isAllOf() {
4692 + var matchers = [];
4693 + for (var _i = 0; _i < arguments.length; _i++) {
4694 + matchers[_i] = arguments[_i];
4695 + }
4696 + return function (action) {
4697 + return matchers.every(function (matcher) { return matches(matcher, action); });
4698 + };
4699 +}
4700 +function hasExpectedRequestMetadata(action, validStatus) {
4701 + if (!action || !action.meta)
4702 + return false;
4703 + var hasValidRequestId = typeof action.meta.requestId === "string";
4704 + var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1;
4705 + return hasValidRequestId && hasValidRequestStatus;
4706 +}
4707 +function isAsyncThunkArray(a) {
4708 + return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0];
4709 +}
4710 +function isPending() {
4711 + var asyncThunks = [];
4712 + for (var _i = 0; _i < arguments.length; _i++) {
4713 + asyncThunks[_i] = arguments[_i];
4714 + }
4715 + if (asyncThunks.length === 0) {
4716 + return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); };
4717 + }
4718 + if (!isAsyncThunkArray(asyncThunks)) {
4719 + return isPending()(asyncThunks[0]);
4720 + }
4721 + return function (action) {
4722 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; });
4723 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
4724 + return combinedMatcher(action);
4725 + };
4726 +}
4727 +function isRejected() {
4728 + var asyncThunks = [];
4729 + for (var _i = 0; _i < arguments.length; _i++) {
4730 + asyncThunks[_i] = arguments[_i];
4731 + }
4732 + if (asyncThunks.length === 0) {
4733 + return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); };
4734 + }
4735 + if (!isAsyncThunkArray(asyncThunks)) {
4736 + return isRejected()(asyncThunks[0]);
4737 + }
4738 + return function (action) {
4739 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; });
4740 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
4741 + return combinedMatcher(action);
4742 + };
4743 +}
4744 +function isRejectedWithValue() {
4745 + var asyncThunks = [];
4746 + for (var _i = 0; _i < arguments.length; _i++) {
4747 + asyncThunks[_i] = arguments[_i];
4748 + }
4749 + var hasFlag = function (action) {
4750 + return action && action.meta && action.meta.rejectedWithValue;
4751 + };
4752 + if (asyncThunks.length === 0) {
4753 + return function (action) {
4754 + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
4755 + return combinedMatcher(action);
4756 + };
4757 + }
4758 + if (!isAsyncThunkArray(asyncThunks)) {
4759 + return isRejectedWithValue()(asyncThunks[0]);
4760 + }
4761 + return function (action) {
4762 + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag);
4763 + return combinedMatcher(action);
4764 + };
4765 +}
4766 +function isFulfilled() {
4767 + var asyncThunks = [];
4768 + for (var _i = 0; _i < arguments.length; _i++) {
4769 + asyncThunks[_i] = arguments[_i];
4770 + }
4771 + if (asyncThunks.length === 0) {
4772 + return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); };
4773 + }
4774 + if (!isAsyncThunkArray(asyncThunks)) {
4775 + return isFulfilled()(asyncThunks[0]);
4776 + }
4777 + return function (action) {
4778 + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; });
4779 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
4780 + return combinedMatcher(action);
4781 + };
4782 +}
4783 +function isAsyncThunkAction() {
4784 + var asyncThunks = [];
4785 + for (var _i = 0; _i < arguments.length; _i++) {
4786 + asyncThunks[_i] = arguments[_i];
4787 + }
4788 + if (asyncThunks.length === 0) {
4789 + return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); };
4790 + }
4791 + if (!isAsyncThunkArray(asyncThunks)) {
4792 + return isAsyncThunkAction()(asyncThunks[0]);
4793 + }
4794 + return function (action) {
4795 + var matchers = [];
4796 + for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) {
4797 + var asyncThunk = asyncThunks_1[_i];
4798 + matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled);
4799 + }
4800 + var combinedMatcher = isAnyOf.apply(void 0, matchers);
4801 + return combinedMatcher(action);
4802 + };
4803 +}
4804 +// src/listenerMiddleware/utils.ts
4805 +var assertFunction = function (func, expected) {
4806 + if (typeof func !== "function") {
4807 + throw new TypeError(expected + " is not a function");
4808 + }
4809 +};
4810 +var noop = function () {
4811 +};
4812 +var catchRejection = function (promise2, onError) {
4813 + if (onError === void 0) { onError = noop; }
4814 + promise2.catch(onError);
4815 + return promise2;
4816 +};
4817 +var addAbortSignalListener = function (abortSignal, callback) {
4818 + abortSignal.addEventListener("abort", callback, { once: true });
4819 + return function () { return abortSignal.removeEventListener("abort", callback); };
4820 +};
4821 +var abortControllerWithReason = function (abortController, reason) {
4822 + var signal = abortController.signal;
4823 + if (signal.aborted) {
4824 + return;
4825 + }
4826 + if (!("reason" in signal)) {
4827 + Object.defineProperty(signal, "reason", {
4828 + enumerable: true,
4829 + value: reason,
4830 + configurable: true,
4831 + writable: true
4832 + });
4833 + }
4834 + ;
4835 + abortController.abort(reason);
4836 +};
4837 +// src/listenerMiddleware/exceptions.ts
4838 +var task = "task";
4839 +var listener = "listener";
4840 +var completed = "completed";
4841 +var cancelled = "cancelled";
4842 +var taskCancelled = "task-" + cancelled;
4843 +var taskCompleted = "task-" + completed;
4844 +var listenerCancelled = listener + "-" + cancelled;
4845 +var listenerCompleted = listener + "-" + completed;
4846 +var TaskAbortError = /** @class */ (function () {
4847 + function TaskAbortError(code) {
4848 + this.code = code;
4849 + this.name = "TaskAbortError";
4850 + this.message = task + " " + cancelled + " (reason: " + code + ")";
4851 + }
4852 + return TaskAbortError;
4853 +}());
4854 +// src/listenerMiddleware/task.ts
4855 +var validateActive = function (signal) {
4856 + if (signal.aborted) {
4857 + throw new TaskAbortError(signal.reason);
4858 + }
4859 +};
4860 +function raceWithSignal(signal, promise2) {
4861 + var cleanup = noop;
4862 + return new Promise(function (resolve, reject) {
4863 + var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); };
4864 + if (signal.aborted) {
4865 + notifyRejection();
4866 + return;
4867 + }
4868 + cleanup = addAbortSignalListener(signal, notifyRejection);
4869 + promise2.finally(function () { return cleanup(); }).then(resolve, reject);
4870 + }).finally(function () {
4871 + cleanup = noop;
4872 + });
4873 +}
4874 +var runTask = function (task2, cleanUp) { return __async(void 0, null, function () {
4875 + var value, error_1;
4876 + return __generator(this, function (_c) {
4877 + switch (_c.label) {
4878 + case 0:
4879 + _c.trys.push([0, 3, 4, 5]);
4880 + return [4 /*yield*/, Promise.resolve()];
4881 + case 1:
4882 + _c.sent();
4883 + return [4 /*yield*/, task2()];
4884 + case 2:
4885 + value = _c.sent();
4886 + return [2 /*return*/, {
4887 + status: "ok",
4888 + value: value
4889 + }];
4890 + case 3:
4891 + error_1 = _c.sent();
4892 + return [2 /*return*/, {
4893 + status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected",
4894 + error: error_1
4895 + }];
4896 + case 4:
4897 + cleanUp == null ? void 0 : cleanUp();
4898 + return [7 /*endfinally*/];
4899 + case 5: return [2 /*return*/];
4900 + }
4901 + });
4902 +}); };
4903 +var createPause = function (signal) {
4904 + return function (promise2) {
4905 + return catchRejection(raceWithSignal(signal, promise2).then(function (output) {
4906 + validateActive(signal);
4907 + return output;
4908 + }));
4909 + };
4910 +};
4911 +var createDelay = function (signal) {
4912 + var pause = createPause(signal);
4913 + return function (timeoutMs) {
4914 + return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); }));
4915 + };
4916 +};
4917 +// src/listenerMiddleware/index.ts
4918 +var assign = Object.assign;
4919 +var INTERNAL_NIL_TOKEN = {};
4920 +var alm = "listenerMiddleware";
4921 +var createFork = function (parentAbortSignal, parentBlockingPromises) {
4922 + var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); };
4923 + return function (taskExecutor, opts) {
4924 + assertFunction(taskExecutor, "taskExecutor");
4925 + var childAbortController = new AbortController();
4926 + linkControllers(childAbortController);
4927 + var result = runTask(function () { return __async(void 0, null, function () {
4928 + var result2;
4929 + return __generator(this, function (_c) {
4930 + switch (_c.label) {
4931 + case 0:
4932 + validateActive(parentAbortSignal);
4933 + validateActive(childAbortController.signal);
4934 + return [4 /*yield*/, taskExecutor({
4935 + pause: createPause(childAbortController.signal),
4936 + delay: createDelay(childAbortController.signal),
4937 + signal: childAbortController.signal
4938 + })];
4939 + case 1:
4940 + result2 = _c.sent();
4941 + validateActive(childAbortController.signal);
4942 + return [2 /*return*/, result2];
4943 + }
4944 + });
4945 + }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); });
4946 + if (opts == null ? void 0 : opts.autoJoin) {
4947 + parentBlockingPromises.push(result);
4948 + }
4949 + return {
4950 + result: createPause(parentAbortSignal)(result),
4951 + cancel: function () {
4952 + abortControllerWithReason(childAbortController, taskCancelled);
4953 + }
4954 + };
4955 + };
4956 +};
4957 +var createTakePattern = function (startListening, signal) {
4958 + var take = function (predicate, timeout) { return __async(void 0, null, function () {
4959 + var unsubscribe, tuplePromise, promises, output;
4960 + return __generator(this, function (_c) {
4961 + switch (_c.label) {
4962 + case 0:
4963 + validateActive(signal);
4964 + unsubscribe = function () {
4965 + };
4966 + tuplePromise = new Promise(function (resolve, reject) {
4967 + var stopListening = startListening({
4968 + predicate: predicate,
4969 + effect: function (action, listenerApi) {
4970 + listenerApi.unsubscribe();
4971 + resolve([
4972 + action,
4973 + listenerApi.getState(),
4974 + listenerApi.getOriginalState()
4975 + ]);
4976 + }
4977 + });
4978 + unsubscribe = function () {
4979 + stopListening();
4980 + reject();
4981 + };
4982 + });
4983 + promises = [
4984 + tuplePromise
4985 + ];
4986 + if (timeout != null) {
4987 + promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); }));
4988 + }
4989 + _c.label = 1;
4990 + case 1:
4991 + _c.trys.push([1, , 3, 4]);
4992 + return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))];
4993 + case 2:
4994 + output = _c.sent();
4995 + validateActive(signal);
4996 + return [2 /*return*/, output];
4997 + case 3:
4998 + unsubscribe();
4999 + return [7 /*endfinally*/];
5000 + case 4: return [2 /*return*/];
5001 + }
5002 + });
5003 + }); };
5004 + return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); };
5005 +};
5006 +var getListenerEntryPropsFrom = function (options) {
5007 + var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect;
5008 + if (type) {
5009 + predicate = createAction(type).match;
5010 + }
5011 + else if (actionCreator) {
5012 + type = actionCreator.type;
5013 + predicate = actionCreator.match;
5014 + }
5015 + else if (matcher) {
5016 + predicate = matcher;
5017 + }
5018 + else if (predicate) {
5019 + }
5020 + else {
5021 + throw new Error("Creating or removing a listener requires one of the known fields for matching an action");
5022 + }
5023 + assertFunction(effect, "options.listener");
5024 + return { predicate: predicate, type: type, effect: effect };
5025 +};
5026 +var createListenerEntry = function (options) {
5027 + var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect;
5028 + var id = nanoid();
5029 + var entry = {
5030 + id: id,
5031 + effect: effect,
5032 + type: type,
5033 + predicate: predicate,
5034 + pending: new Set(),
5035 + unsubscribe: function () {
5036 + throw new Error("Unsubscribe not initialized");
5037 + }
5038 + };
5039 + return entry;
5040 +};
5041 +var cancelActiveListeners = function (entry) {
5042 + entry.pending.forEach(function (controller) {
5043 + abortControllerWithReason(controller, listenerCancelled);
5044 + });
5045 +};
5046 +var createClearListenerMiddleware = function (listenerMap) {
5047 + return function () {
5048 + listenerMap.forEach(cancelActiveListeners);
5049 + listenerMap.clear();
5050 + };
5051 +};
5052 +var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) {
5053 + try {
5054 + errorHandler(errorToNotify, errorInfo);
5055 + }
5056 + catch (errorHandlerError) {
5057 + setTimeout(function () {
5058 + throw errorHandlerError;
5059 + }, 0);
5060 + }
5061 +};
5062 +var addListener = createAction(alm + "/add");
5063 +var clearAllListeners = createAction(alm + "/removeAll");
5064 +var removeListener = createAction(alm + "/remove");
5065 +var defaultErrorHandler = function () {
5066 + var args = [];
5067 + for (var _i = 0; _i < arguments.length; _i++) {
5068 + args[_i] = arguments[_i];
5069 + }
5070 + console.error.apply(console, __spreadArray([alm + "/error"], args));
5071 +};
5072 +function createListenerMiddleware(middlewareOptions) {
5073 + var _this = this;
5074 + if (middlewareOptions === void 0) { middlewareOptions = {}; }
5075 + var listenerMap = new Map();
5076 + var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c;
5077 + assertFunction(onError, "onError");
5078 + var insertEntry = function (entry) {
5079 + entry.unsubscribe = function () { return listenerMap.delete(entry.id); };
5080 + listenerMap.set(entry.id, entry);
5081 + return function (cancelOptions) {
5082 + entry.unsubscribe();
5083 + if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) {
5084 + cancelActiveListeners(entry);
5085 + }
5086 + };
5087 + };
5088 + var findListenerEntry = function (comparator) {
5089 + for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) {
5090 + var entry = _c[_i];
5091 + if (comparator(entry)) {
5092 + return entry;
5093 + }
5094 + }
5095 + return void 0;
5096 + };
5097 + var startListening = function (options) {
5098 + var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; });
5099 + if (!entry) {
5100 + entry = createListenerEntry(options);
5101 + }
5102 + return insertEntry(entry);
5103 + };
5104 + var stopListening = function (options) {
5105 + var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate;
5106 + var entry = findListenerEntry(function (entry2) {
5107 + var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate;
5108 + return matchPredicateOrType && entry2.effect === effect;
5109 + });
5110 + if (entry) {
5111 + entry.unsubscribe();
5112 + if (options.cancelActive) {
5113 + cancelActiveListeners(entry);
5114 + }
5115 + }
5116 + return !!entry;
5117 + };
5118 + var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () {
5119 + var internalTaskController, take, autoJoinPromises, listenerError_1;
5120 + return __generator(this, function (_c) {
5121 + switch (_c.label) {
5122 + case 0:
5123 + internalTaskController = new AbortController();
5124 + take = createTakePattern(startListening, internalTaskController.signal);
5125 + autoJoinPromises = [];
5126 + _c.label = 1;
5127 + case 1:
5128 + _c.trys.push([1, 3, 4, 6]);
5129 + entry.pending.add(internalTaskController);
5130 + return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, {
5131 + getOriginalState: getOriginalState,
5132 + condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); },
5133 + take: take,
5134 + delay: createDelay(internalTaskController.signal),
5135 + pause: createPause(internalTaskController.signal),
5136 + extra: extra,
5137 + signal: internalTaskController.signal,
5138 + fork: createFork(internalTaskController.signal, autoJoinPromises),
5139 + unsubscribe: entry.unsubscribe,
5140 + subscribe: function () {
5141 + listenerMap.set(entry.id, entry);
5142 + },
5143 + cancelActiveListeners: function () {
5144 + entry.pending.forEach(function (controller, _, set) {
5145 + if (controller !== internalTaskController) {
5146 + abortControllerWithReason(controller, listenerCancelled);
5147 + set.delete(controller);
5148 + }
5149 + });
5150 + }
5151 + })))];
5152 + case 2:
5153 + _c.sent();
5154 + return [3 /*break*/, 6];
5155 + case 3:
5156 + listenerError_1 = _c.sent();
5157 + if (!(listenerError_1 instanceof TaskAbortError)) {
5158 + safelyNotifyError(onError, listenerError_1, {
5159 + raisedBy: "effect"
5160 + });
5161 + }
5162 + return [3 /*break*/, 6];
5163 + case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)];
5164 + case 5:
5165 + _c.sent();
5166 + abortControllerWithReason(internalTaskController, listenerCompleted);
5167 + entry.pending.delete(internalTaskController);
5168 + return [7 /*endfinally*/];
5169 + case 6: return [2 /*return*/];
5170 + }
5171 + });
5172 + }); };
5173 + var clearListenerMiddleware = createClearListenerMiddleware(listenerMap);
5174 + var middleware = function (api) { return function (next) { return function (action) {
5175 + if (!isAction(action)) {
5176 + return next(action);
5177 + }
5178 + if (addListener.match(action)) {
5179 + return startListening(action.payload);
5180 + }
5181 + if (clearAllListeners.match(action)) {
5182 + clearListenerMiddleware();
5183 + return;
5184 + }
5185 + if (removeListener.match(action)) {
5186 + return stopListening(action.payload);
5187 + }
5188 + var originalState = api.getState();
5189 + var getOriginalState = function () {
5190 + if (originalState === INTERNAL_NIL_TOKEN) {
5191 + throw new Error(alm + ": getOriginalState can only be called synchronously");
5192 + }
5193 + return originalState;
5194 + };
5195 + var result;
5196 + try {
5197 + result = next(action);
5198 + if (listenerMap.size > 0) {
5199 + var currentState = api.getState();
5200 + var listenerEntries = Array.from(listenerMap.values());
5201 + for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) {
5202 + var entry = listenerEntries_1[_i];
5203 + var runListener = false;
5204 + try {
5205 + runListener = entry.predicate(action, currentState, originalState);
5206 + }
5207 + catch (predicateError) {
5208 + runListener = false;
5209 + safelyNotifyError(onError, predicateError, {
5210 + raisedBy: "predicate"
5211 + });
5212 + }
5213 + if (!runListener) {
5214 + continue;
5215 + }
5216 + notifyListener(entry, action, api, getOriginalState);
5217 + }
5218 + }
5219 + }
5220 + finally {
5221 + originalState = INTERNAL_NIL_TOKEN;
5222 + }
5223 + return result;
5224 + }; }; };
5225 + return {
5226 + middleware: middleware,
5227 + startListening: startListening,
5228 + stopListening: stopListening,
5229 + clearListeners: clearListenerMiddleware
5230 + };
5231 +}
5232 +// src/autoBatchEnhancer.ts
5233 +var SHOULD_AUTOBATCH = "RTK_autoBatch";
5234 +var prepareAutoBatched = function () { return function (payload) {
5235 + var _c;
5236 + return ({
5237 + payload: payload,
5238 + meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c)
5239 + });
5240 +}; };
5241 +var promise;
5242 +var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () {
5243 + throw err;
5244 +}, 0); }); };
5245 +var createQueueWithTimer = function (timeout) {
5246 + return function (notify) {
5247 + setTimeout(notify, timeout);
5248 + };
5249 +};
5250 +var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10);
5251 +var autoBatchEnhancer = function (options) {
5252 + if (options === void 0) { options = { type: "raf" }; }
5253 + return function (next) { return function () {
5254 + var args = [];
5255 + for (var _i = 0; _i < arguments.length; _i++) {
5256 + args[_i] = arguments[_i];
5257 + }
5258 + var store = next.apply(void 0, args);
5259 + var notifying = true;
5260 + var shouldNotifyAtEndOfTick = false;
5261 + var notificationQueued = false;
5262 + var listeners = new Set();
5263 + var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout);
5264 + var notifyListeners = function () {
5265 + notificationQueued = false;
5266 + if (shouldNotifyAtEndOfTick) {
5267 + shouldNotifyAtEndOfTick = false;
5268 + listeners.forEach(function (l) { return l(); });
5269 + }
5270 + };
5271 + return Object.assign({}, store, {
5272 + subscribe: function (listener2) {
5273 + var wrappedListener = function () { return notifying && listener2(); };
5274 + var unsubscribe = store.subscribe(wrappedListener);
5275 + listeners.add(listener2);
5276 + return function () {
5277 + unsubscribe();
5278 + listeners.delete(listener2);
5279 + };
5280 + },
5281 + dispatch: function (action) {
5282 + var _a;
5283 + try {
5284 + notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]);
5285 + shouldNotifyAtEndOfTick = !notifying;
5286 + if (shouldNotifyAtEndOfTick) {
5287 + if (!notificationQueued) {
5288 + notificationQueued = true;
5289 + queueCallback(notifyListeners);
5290 + }
5291 + }
5292 + return store.dispatch(action);
5293 + }
5294 + finally {
5295 + notifying = true;
5296 + }
5297 + }
5298 + });
5299 + }; };
5300 +};
5301 +// src/index.ts
5302 +(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)();
5303 +
5304 +//# sourceMappingURL=redux-toolkit.esm.js.map
5305 +
5306 +/***/ }),
5307 +
5308 +/***/ "../node_modules/immer/dist/immer.esm.mjs":
3398 5309 /*!************************************************!*\
3399 - !*** external "elementorVendors.reduxToolkit" ***!
5310 + !*** ../node_modules/immer/dist/immer.esm.mjs ***!
3400 5311 \************************************************/
3401 -/***/ ((module) => {
5312 +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
3402 5313
3403 5314 "use strict";
3404 -module.exports = elementorVendors.reduxToolkit;
5315 +__webpack_require__.r(__webpack_exports__);
5316 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5317 +/* harmony export */ Immer: () => (/* binding */ un),
5318 +/* harmony export */ applyPatches: () => (/* binding */ pn),
5319 +/* harmony export */ castDraft: () => (/* binding */ K),
5320 +/* harmony export */ castImmutable: () => (/* binding */ $),
5321 +/* harmony export */ createDraft: () => (/* binding */ ln),
5322 +/* harmony export */ current: () => (/* binding */ R),
5323 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
5324 +/* harmony export */ enableAllPlugins: () => (/* binding */ J),
5325 +/* harmony export */ enableES5: () => (/* binding */ F),
5326 +/* harmony export */ enableMapSet: () => (/* binding */ C),
5327 +/* harmony export */ enablePatches: () => (/* binding */ T),
5328 +/* harmony export */ finishDraft: () => (/* binding */ dn),
5329 +/* harmony export */ freeze: () => (/* binding */ d),
5330 +/* harmony export */ immerable: () => (/* binding */ L),
5331 +/* harmony export */ isDraft: () => (/* binding */ r),
5332 +/* harmony export */ isDraftable: () => (/* binding */ t),
5333 +/* harmony export */ nothing: () => (/* binding */ H),
5334 +/* harmony export */ original: () => (/* binding */ e),
5335 +/* harmony export */ produce: () => (/* binding */ fn),
5336 +/* harmony export */ produceWithPatches: () => (/* binding */ cn),
5337 +/* harmony export */ setAutoFreeze: () => (/* binding */ sn),
5338 +/* harmony export */ setUseProxies: () => (/* binding */ vn)
5339 +/* harmony export */ });
5340 +function n(n){for(var r=arguments.length,t=Array(r>1?r-1:0),e=1;e<r;e++)t[e-1]=arguments[e];if(true){var i=Y[n],o=i?"function"==typeof i?i.apply(null,t):i:"unknown error nr: "+n;throw Error("[Immer] "+o)}// removed by dead control flow
5341 +{}}function r(n){return!!n&&!!n[Q]}function t(n){var r;return!!n&&(function(n){if(!n||"object"!=typeof n)return!1;var r=Object.getPrototypeOf(n);if(null===r)return!0;var t=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return t===Object||"function"==typeof t&&Function.toString.call(t)===Z}(n)||Array.isArray(n)||!!n[L]||!!(null===(r=n.constructor)||void 0===r?void 0:r[L])||s(n)||v(n))}function e(t){return r(t)||n(23,t),t[Q].t}function i(n,r,t){void 0===t&&(t=!1),0===o(n)?(t?Object.keys:nn)(n).forEach((function(e){t&&"symbol"==typeof e||r(e,n[e],n)})):n.forEach((function(t,e){return r(e,t,n)}))}function o(n){var r=n[Q];return r?r.i>3?r.i-4:r.i:Array.isArray(n)?1:s(n)?2:v(n)?3:0}function u(n,r){return 2===o(n)?n.has(r):Object.prototype.hasOwnProperty.call(n,r)}function a(n,r){return 2===o(n)?n.get(r):n[r]}function f(n,r,t){var e=o(n);2===e?n.set(r,t):3===e?n.add(t):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function g(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if( true&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return true&&f(r),en.get(r,n)},set:function(r){var t=this[Q]; true&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.g&&n(3,JSON.stringify(p(r)))}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.R,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c="add";m("Patches",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=i[s];"string"!=typeof p&&"number"!=typeof p&&(p=""+p),0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return"-"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},N:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.R,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=r.concat(n);t.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.R,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:r.concat(["length"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:"replace",path:[],value:r===H?void 0:r}),e.push({op:"replace",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.R=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=N(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.g&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,R:void 0,t:n,k:this,C:!1,g:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.R.set(n,!0),t.o.set(n,r),t.R.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.R.set(n,!1):r.R.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.R=new Map,i(n.t,(function(r){n.R.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=N(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,g:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,"size",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m("MapSet",{F:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){F(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return true&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return true&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?g(c):O(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q]; true&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n},i.setUseProxies=function(r){r&&!B&&n(20),this.O=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fn);
5342 +//# sourceMappingURL=immer.esm.js.map
3405 5343
5344 +
5345 +/***/ }),
5346 +
5347 +/***/ "../node_modules/redux-thunk/es/index.js":
5348 +/*!***********************************************!*\
5349 + !*** ../node_modules/redux-thunk/es/index.js ***!
5350 + \***********************************************/
5351 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5352 +
5353 +"use strict";
5354 +__webpack_require__.r(__webpack_exports__);
5355 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5356 +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
5357 +/* harmony export */ });
5358 +/** A function that accepts a potential "extra argument" value to be injected later,
5359 + * and returns an instance of the thunk middleware that uses that value
5360 + */
5361 +function createThunkMiddleware(extraArgument) {
5362 + // Standard Redux middleware definition pattern:
5363 + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware
5364 + var middleware = function middleware(_ref) {
5365 + var dispatch = _ref.dispatch,
5366 + getState = _ref.getState;
5367 + return function (next) {
5368 + return function (action) {
5369 + // The thunk middleware looks for any functions that were passed to `store.dispatch`.
5370 + // If this "action" is really a function, call it and return the result.
5371 + if (typeof action === 'function') {
5372 + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg"
5373 + return action(dispatch, getState, extraArgument);
5374 + } // Otherwise, pass the action down the middleware chain as usual
5375 +
5376 +
5377 + return next(action);
5378 + };
5379 + };
5380 + };
5381 +
5382 + return middleware;
5383 +}
5384 +
5385 +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version
5386 +// with whatever "extra arg" they want to inject into their thunks
5387 +
5388 +thunk.withExtraArgument = createThunkMiddleware;
5389 +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk);
5390 +
5391 +/***/ }),
5392 +
5393 +/***/ "../node_modules/redux/es/redux.js":
5394 +/*!*****************************************!*\
5395 + !*** ../node_modules/redux/es/redux.js ***!
5396 + \*****************************************/
5397 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
5398 +
5399 +"use strict";
5400 +__webpack_require__.r(__webpack_exports__);
5401 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
5402 +/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes),
5403 +/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware),
5404 +/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators),
5405 +/* harmony export */ combineReducers: () => (/* binding */ combineReducers),
5406 +/* harmony export */ compose: () => (/* binding */ compose),
5407 +/* harmony export */ createStore: () => (/* binding */ createStore),
5408 +/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore)
5409 +/* harmony export */ });
5410 +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js");
5411 +
5412 +
5413 +/**
5414 + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
5415 + *
5416 + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
5417 + * during build.
5418 + * @param {number} code
5419 + */
5420 +function formatProdErrorMessage(code) {
5421 + return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
5422 +}
5423 +
5424 +// Inlined version of the `symbol-observable` polyfill
5425 +var $$observable = (function () {
5426 + return typeof Symbol === 'function' && Symbol.observable || '@@observable';
5427 +})();
5428 +
5429 +/**
5430 + * These are private action types reserved by Redux.
5431 + * For any unknown actions, you must return the current state.
5432 + * If the current state is undefined, you must return the initial state.
5433 + * Do not reference these action types directly in your code.
5434 + */
5435 +var randomString = function randomString() {
5436 + return Math.random().toString(36).substring(7).split('').join('.');
5437 +};
5438 +
5439 +var ActionTypes = {
5440 + INIT: "@@redux/INIT" + randomString(),
5441 + REPLACE: "@@redux/REPLACE" + randomString(),
5442 + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
5443 + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
5444 + }
5445 +};
5446 +
5447 +/**
5448 + * @param {any} obj The object to inspect.
5449 + * @returns {boolean} True if the argument appears to be a plain object.
5450 + */
5451 +function isPlainObject(obj) {
5452 + if (typeof obj !== 'object' || obj === null) return false;
5453 + var proto = obj;
5454 +
5455 + while (Object.getPrototypeOf(proto) !== null) {
5456 + proto = Object.getPrototypeOf(proto);
5457 + }
5458 +
5459 + return Object.getPrototypeOf(obj) === proto;
5460 +}
5461 +
5462 +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
5463 +function miniKindOf(val) {
5464 + if (val === void 0) return 'undefined';
5465 + if (val === null) return 'null';
5466 + var type = typeof val;
5467 +
5468 + switch (type) {
5469 + case 'boolean':
5470 + case 'string':
5471 + case 'number':
5472 + case 'symbol':
5473 + case 'function':
5474 + {
5475 + return type;
5476 + }
5477 + }
5478 +
5479 + if (Array.isArray(val)) return 'array';
5480 + if (isDate(val)) return 'date';
5481 + if (isError(val)) return 'error';
5482 + var constructorName = ctorName(val);
5483 +
5484 + switch (constructorName) {
5485 + case 'Symbol':
5486 + case 'Promise':
5487 + case 'WeakMap':
5488 + case 'WeakSet':
5489 + case 'Map':
5490 + case 'Set':
5491 + return constructorName;
5492 + } // other
5493 +
5494 +
5495 + return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
5496 +}
5497 +
5498 +function ctorName(val) {
5499 + return typeof val.constructor === 'function' ? val.constructor.name : null;
5500 +}
5501 +
5502 +function isError(val) {
5503 + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
5504 +}
5505 +
5506 +function isDate(val) {
5507 + if (val instanceof Date) return true;
5508 + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
5509 +}
5510 +
5511 +function kindOf(val) {
5512 + var typeOfVal = typeof val;
5513 +
5514 + if (true) {
5515 + typeOfVal = miniKindOf(val);
5516 + }
5517 +
5518 + return typeOfVal;
5519 +}
5520 +
5521 +/**
5522 + * @deprecated
5523 + *
5524 + * **We recommend using the `configureStore` method
5525 + * of the `@reduxjs/toolkit` package**, which replaces `createStore`.
5526 + *
5527 + * Redux Toolkit is our recommended approach for writing Redux logic today,
5528 + * including store setup, reducers, data fetching, and more.
5529 + *
5530 + * **For more details, please read this Redux docs page:**
5531 + * **https://redux.js.org/introduction/why-rtk-is-redux-today**
5532 + *
5533 + * `configureStore` from Redux Toolkit is an improved version of `createStore` that
5534 + * simplifies setup and helps avoid common bugs.
5535 + *
5536 + * You should not be using the `redux` core package by itself today, except for learning purposes.
5537 + * The `createStore` method from the core `redux` package will not be removed, but we encourage
5538 + * all users to migrate to using Redux Toolkit for all Redux code.
5539 + *
5540 + * If you want to use `createStore` without this visual deprecation warning, use
5541 + * the `legacy_createStore` import instead:
5542 + *
5543 + * `import { legacy_createStore as createStore} from 'redux'`
5544 + *
5545 + */
5546 +
5547 +function createStore(reducer, preloadedState, enhancer) {
5548 + var _ref2;
5549 +
5550 + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
5551 + throw new Error( false ? 0 : 'It looks like you are passing several store enhancers to ' + 'createStore(). This is not supported. Instead, compose them ' + 'together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.');
5552 + }
5553 +
5554 + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
5555 + enhancer = preloadedState;
5556 + preloadedState = undefined;
5557 + }
5558 +
5559 + if (typeof enhancer !== 'undefined') {
5560 + if (typeof enhancer !== 'function') {
5561 + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'");
5562 + }
5563 +
5564 + return enhancer(createStore)(reducer, preloadedState);
5565 + }
5566 +
5567 + if (typeof reducer !== 'function') {
5568 + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'");
5569 + }
5570 +
5571 + var currentReducer = reducer;
5572 + var currentState = preloadedState;
5573 + var currentListeners = [];
5574 + var nextListeners = currentListeners;
5575 + var isDispatching = false;
5576 + /**
5577 + * This makes a shallow copy of currentListeners so we can use
5578 + * nextListeners as a temporary list while dispatching.
5579 + *
5580 + * This prevents any bugs around consumers calling
5581 + * subscribe/unsubscribe in the middle of a dispatch.
5582 + */
5583 +
5584 + function ensureCanMutateNextListeners() {
5585 + if (nextListeners === currentListeners) {
5586 + nextListeners = currentListeners.slice();
5587 + }
5588 + }
5589 + /**
5590 + * Reads the state tree managed by the store.
5591 + *
5592 + * @returns {any} The current state tree of your application.
5593 + */
5594 +
5595 +
5596 + function getState() {
5597 + if (isDispatching) {
5598 + throw new Error( false ? 0 : 'You may not call store.getState() while the reducer is executing. ' + 'The reducer has already received the state as an argument. ' + 'Pass it down from the top reducer instead of reading it from the store.');
5599 + }
5600 +
5601 + return currentState;
5602 + }
5603 + /**
5604 + * Adds a change listener. It will be called any time an action is dispatched,
5605 + * and some part of the state tree may potentially have changed. You may then
5606 + * call `getState()` to read the current state tree inside the callback.
5607 + *
5608 + * You may call `dispatch()` from a change listener, with the following
5609 + * caveats:
5610 + *
5611 + * 1. The subscriptions are snapshotted just before every `dispatch()` call.
5612 + * If you subscribe or unsubscribe while the listeners are being invoked, this
5613 + * will not have any effect on the `dispatch()` that is currently in progress.
5614 + * However, the next `dispatch()` call, whether nested or not, will use a more
5615 + * recent snapshot of the subscription list.
5616 + *
5617 + * 2. The listener should not expect to see all state changes, as the state
5618 + * might have been updated multiple times during a nested `dispatch()` before
5619 + * the listener is called. It is, however, guaranteed that all subscribers
5620 + * registered before the `dispatch()` started will be called with the latest
5621 + * state by the time it exits.
5622 + *
5623 + * @param {Function} listener A callback to be invoked on every dispatch.
5624 + * @returns {Function} A function to remove this change listener.
5625 + */
5626 +
5627 +
5628 + function subscribe(listener) {
5629 + if (typeof listener !== 'function') {
5630 + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'");
5631 + }
5632 +
5633 + if (isDispatching) {
5634 + throw new Error( false ? 0 : 'You may not call store.subscribe() while the reducer is executing. ' + 'If you would like to be notified after the store has been updated, subscribe from a ' + 'component and invoke store.getState() in the callback to access the latest state. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
5635 + }
5636 +
5637 + var isSubscribed = true;
5638 + ensureCanMutateNextListeners();
5639 + nextListeners.push(listener);
5640 + return function unsubscribe() {
5641 + if (!isSubscribed) {
5642 + return;
5643 + }
5644 +
5645 + if (isDispatching) {
5646 + throw new Error( false ? 0 : 'You may not unsubscribe from a store listener while the reducer is executing. ' + 'See https://redux.js.org/api/store#subscribelistener for more details.');
5647 + }
5648 +
5649 + isSubscribed = false;
5650 + ensureCanMutateNextListeners();
5651 + var index = nextListeners.indexOf(listener);
5652 + nextListeners.splice(index, 1);
5653 + currentListeners = null;
5654 + };
5655 + }
5656 + /**
5657 + * Dispatches an action. It is the only way to trigger a state change.
5658 + *
5659 + * The `reducer` function, used to create the store, will be called with the
5660 + * current state tree and the given `action`. Its return value will
5661 + * be considered the **next** state of the tree, and the change listeners
5662 + * will be notified.
5663 + *
5664 + * The base implementation only supports plain object actions. If you want to
5665 + * dispatch a Promise, an Observable, a thunk, or something else, you need to
5666 + * wrap your store creating function into the corresponding middleware. For
5667 + * example, see the documentation for the `redux-thunk` package. Even the
5668 + * middleware will eventually dispatch plain object actions using this method.
5669 + *
5670 + * @param {Object} action A plain object representing “what changed”. It is
5671 + * a good idea to keep actions serializable so you can record and replay user
5672 + * sessions, or use the time travelling `redux-devtools`. An action must have
5673 + * a `type` property which may not be `undefined`. It is a good idea to use
5674 + * string constants for action types.
5675 + *
5676 + * @returns {Object} For convenience, the same action object you dispatched.
5677 + *
5678 + * Note that, if you use a custom middleware, it may wrap `dispatch()` to
5679 + * return something else (for example, a Promise you can await).
5680 + */
5681 +
5682 +
5683 + function dispatch(action) {
5684 + if (!isPlainObject(action)) {
5685 + throw new Error( false ? 0 : "Actions must be plain objects. Instead, the actual type was: '" + kindOf(action) + "'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");
5686 + }
5687 +
5688 + if (typeof action.type === 'undefined') {
5689 + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');
5690 + }
5691 +
5692 + if (isDispatching) {
5693 + throw new Error( false ? 0 : 'Reducers may not dispatch actions.');
5694 + }
5695 +
5696 + try {
5697 + isDispatching = true;
5698 + currentState = currentReducer(currentState, action);
5699 + } finally {
5700 + isDispatching = false;
5701 + }
5702 +
5703 + var listeners = currentListeners = nextListeners;
5704 +
5705 + for (var i = 0; i < listeners.length; i++) {
5706 + var listener = listeners[i];
5707 + listener();
5708 + }
5709 +
5710 + return action;
5711 + }
5712 + /**
5713 + * Replaces the reducer currently used by the store to calculate the state.
5714 + *
5715 + * You might need this if your app implements code splitting and you want to
5716 + * load some of the reducers dynamically. You might also need this if you
5717 + * implement a hot reloading mechanism for Redux.
5718 + *
5719 + * @param {Function} nextReducer The reducer for the store to use instead.
5720 + * @returns {void}
5721 + */
5722 +
5723 +
5724 + function replaceReducer(nextReducer) {
5725 + if (typeof nextReducer !== 'function') {
5726 + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer));
5727 + }
5728 +
5729 + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
5730 + // Any reducers that existed in both the new and old rootReducer
5731 + // will receive the previous state. This effectively populates
5732 + // the new state tree with any relevant data from the old one.
5733 +
5734 + dispatch({
5735 + type: ActionTypes.REPLACE
5736 + });
5737 + }
5738 + /**
5739 + * Interoperability point for observable/reactive libraries.
5740 + * @returns {observable} A minimal observable of state changes.
5741 + * For more information, see the observable proposal:
5742 + * https://github.com/tc39/proposal-observable
5743 + */
5744 +
5745 +
5746 + function observable() {
5747 + var _ref;
5748 +
5749 + var outerSubscribe = subscribe;
5750 + return _ref = {
5751 + /**
5752 + * The minimal observable subscription method.
5753 + * @param {Object} observer Any object that can be used as an observer.
5754 + * The observer object should have a `next` method.
5755 + * @returns {subscription} An object with an `unsubscribe` method that can
5756 + * be used to unsubscribe the observable from the store, and prevent further
5757 + * emission of values from the observable.
5758 + */
5759 + subscribe: function subscribe(observer) {
5760 + if (typeof observer !== 'object' || observer === null) {
5761 + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'");
5762 + }
5763 +
5764 + function observeState() {
5765 + if (observer.next) {
5766 + observer.next(getState());
5767 + }
5768 + }
5769 +
5770 + observeState();
5771 + var unsubscribe = outerSubscribe(observeState);
5772 + return {
5773 + unsubscribe: unsubscribe
5774 + };
5775 + }
5776 + }, _ref[$$observable] = function () {
5777 + return this;
5778 + }, _ref;
5779 + } // When a store is created, an "INIT" action is dispatched so that every
5780 + // reducer returns their initial state. This effectively populates
5781 + // the initial state tree.
5782 +
5783 +
5784 + dispatch({
5785 + type: ActionTypes.INIT
5786 + });
5787 + return _ref2 = {
5788 + dispatch: dispatch,
5789 + subscribe: subscribe,
5790 + getState: getState,
5791 + replaceReducer: replaceReducer
5792 + }, _ref2[$$observable] = observable, _ref2;
5793 +}
5794 +/**
5795 + * Creates a Redux store that holds the state tree.
5796 + *
5797 + * **We recommend using `configureStore` from the
5798 + * `@reduxjs/toolkit` package**, which replaces `createStore`:
5799 + * **https://redux.js.org/introduction/why-rtk-is-redux-today**
5800 + *
5801 + * The only way to change the data in the store is to call `dispatch()` on it.
5802 + *
5803 + * There should only be a single store in your app. To specify how different
5804 + * parts of the state tree respond to actions, you may combine several reducers
5805 + * into a single reducer function by using `combineReducers`.
5806 + *
5807 + * @param {Function} reducer A function that returns the next state tree, given
5808 + * the current state tree and the action to handle.
5809 + *
5810 + * @param {any} [preloadedState] The initial state. You may optionally specify it
5811 + * to hydrate the state from the server in universal apps, or to restore a
5812 + * previously serialized user session.
5813 + * If you use `combineReducers` to produce the root reducer function, this must be
5814 + * an object with the same shape as `combineReducers` keys.
5815 + *
5816 + * @param {Function} [enhancer] The store enhancer. You may optionally specify it
5817 + * to enhance the store with third-party capabilities such as middleware,
5818 + * time travel, persistence, etc. The only store enhancer that ships with Redux
5819 + * is `applyMiddleware()`.
5820 + *
5821 + * @returns {Store} A Redux store that lets you read the state, dispatch actions
5822 + * and subscribe to changes.
5823 + */
5824 +
5825 +var legacy_createStore = createStore;
5826 +
5827 +/**
5828 + * Prints a warning in the console if it exists.
5829 + *
5830 + * @param {String} message The warning message.
5831 + * @returns {void}
5832 + */
5833 +function warning(message) {
5834 + /* eslint-disable no-console */
5835 + if (typeof console !== 'undefined' && typeof console.error === 'function') {
5836 + console.error(message);
5837 + }
5838 + /* eslint-enable no-console */
5839 +
5840 +
5841 + try {
5842 + // This error was thrown as a convenience so that if you enable
5843 + // "break on all exceptions" in your console,
5844 + // it would pause the execution at this line.
5845 + throw new Error(message);
5846 + } catch (e) {} // eslint-disable-line no-empty
5847 +
5848 +}
5849 +
5850 +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
5851 + var reducerKeys = Object.keys(reducers);
5852 + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
5853 +
5854 + if (reducerKeys.length === 0) {
5855 + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
5856 + }
5857 +
5858 + if (!isPlainObject(inputState)) {
5859 + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
5860 + }
5861 +
5862 + var unexpectedKeys = Object.keys(inputState).filter(function (key) {
5863 + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
5864 + });
5865 + unexpectedKeys.forEach(function (key) {
5866 + unexpectedKeyCache[key] = true;
5867 + });
5868 + if (action && action.type === ActionTypes.REPLACE) return;
5869 +
5870 + if (unexpectedKeys.length > 0) {
5871 + return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
5872 + }
5873 +}
5874 +
5875 +function assertReducerShape(reducers) {
5876 + Object.keys(reducers).forEach(function (key) {
5877 + var reducer = reducers[key];
5878 + var initialState = reducer(undefined, {
5879 + type: ActionTypes.INIT
5880 + });
5881 +
5882 + if (typeof initialState === 'undefined') {
5883 + throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined during initialization. " + "If the state passed to the reducer is undefined, you must " + "explicitly return the initial state. The initial state may " + "not be undefined. If you don't want to set a value for this reducer, " + "you can use null instead of undefined.");
5884 + }
5885 +
5886 + if (typeof reducer(undefined, {
5887 + type: ActionTypes.PROBE_UNKNOWN_ACTION()
5888 + }) === 'undefined') {
5889 + throw new Error( false ? 0 : "The slice reducer for key \"" + key + "\" returned undefined when probed with a random type. " + ("Don't try to handle '" + ActionTypes.INIT + "' or other actions in \"redux/*\" ") + "namespace. They are considered private. Instead, you must return the " + "current state for any unknown actions, unless it is undefined, " + "in which case you must return the initial state, regardless of the " + "action type. The initial state may not be undefined, but can be null.");
5890 + }
5891 + });
5892 +}
5893 +/**
5894 + * Turns an object whose values are different reducer functions, into a single
5895 + * reducer function. It will call every child reducer, and gather their results
5896 + * into a single state object, whose keys correspond to the keys of the passed
5897 + * reducer functions.
5898 + *
5899 + * @param {Object} reducers An object whose values correspond to different
5900 + * reducer functions that need to be combined into one. One handy way to obtain
5901 + * it is to use ES6 `import * as reducers` syntax. The reducers may never return
5902 + * undefined for any action. Instead, they should return their initial state
5903 + * if the state passed to them was undefined, and the current state for any
5904 + * unrecognized action.
5905 + *
5906 + * @returns {Function} A reducer function that invokes every reducer inside the
5907 + * passed object, and builds a state object with the same shape.
5908 + */
5909 +
5910 +
5911 +function combineReducers(reducers) {
5912 + var reducerKeys = Object.keys(reducers);
5913 + var finalReducers = {};
5914 +
5915 + for (var i = 0; i < reducerKeys.length; i++) {
5916 + var key = reducerKeys[i];
5917 +
5918 + if (true) {
5919 + if (typeof reducers[key] === 'undefined') {
5920 + warning("No reducer provided for key \"" + key + "\"");
5921 + }
5922 + }
5923 +
5924 + if (typeof reducers[key] === 'function') {
5925 + finalReducers[key] = reducers[key];
5926 + }
5927 + }
5928 +
5929 + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
5930 + // keys multiple times.
5931 +
5932 + var unexpectedKeyCache;
5933 +
5934 + if (true) {
5935 + unexpectedKeyCache = {};
5936 + }
5937 +
5938 + var shapeAssertionError;
5939 +
5940 + try {
5941 + assertReducerShape(finalReducers);
5942 + } catch (e) {
5943 + shapeAssertionError = e;
5944 + }
5945 +
5946 + return function combination(state, action) {
5947 + if (state === void 0) {
5948 + state = {};
5949 + }
5950 +
5951 + if (shapeAssertionError) {
5952 + throw shapeAssertionError;
5953 + }
5954 +
5955 + if (true) {
5956 + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
5957 +
5958 + if (warningMessage) {
5959 + warning(warningMessage);
5960 + }
5961 + }
5962 +
5963 + var hasChanged = false;
5964 + var nextState = {};
5965 +
5966 + for (var _i = 0; _i < finalReducerKeys.length; _i++) {
5967 + var _key = finalReducerKeys[_i];
5968 + var reducer = finalReducers[_key];
5969 + var previousStateForKey = state[_key];
5970 + var nextStateForKey = reducer(previousStateForKey, action);
5971 +
5972 + if (typeof nextStateForKey === 'undefined') {
5973 + var actionType = action && action.type;
5974 + throw new Error( false ? 0 : "When called with an action of type " + (actionType ? "\"" + String(actionType) + "\"" : '(unknown type)') + ", the slice reducer for key \"" + _key + "\" returned undefined. " + "To ignore an action, you must explicitly return the previous state. " + "If you want this reducer to hold no value, you can return null instead of undefined.");
5975 + }
5976 +
5977 + nextState[_key] = nextStateForKey;
5978 + hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
5979 + }
5980 +
5981 + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
5982 + return hasChanged ? nextState : state;
5983 + };
5984 +}
5985 +
5986 +function bindActionCreator(actionCreator, dispatch) {
5987 + return function () {
5988 + return dispatch(actionCreator.apply(this, arguments));
5989 + };
5990 +}
5991 +/**
5992 + * Turns an object whose values are action creators, into an object with the
5993 + * same keys, but with every function wrapped into a `dispatch` call so they
5994 + * may be invoked directly. This is just a convenience method, as you can call
5995 + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
5996 + *
5997 + * For convenience, you can also pass an action creator as the first argument,
5998 + * and get a dispatch wrapped function in return.
5999 + *
6000 + * @param {Function|Object} actionCreators An object whose values are action
6001 + * creator functions. One handy way to obtain it is to use ES6 `import * as`
6002 + * syntax. You may also pass a single function.
6003 + *
6004 + * @param {Function} dispatch The `dispatch` function available on your Redux
6005 + * store.
6006 + *
6007 + * @returns {Function|Object} The object mimicking the original object, but with
6008 + * every action creator wrapped into the `dispatch` call. If you passed a
6009 + * function as `actionCreators`, the return value will also be a single
6010 + * function.
6011 + */
6012 +
6013 +
6014 +function bindActionCreators(actionCreators, dispatch) {
6015 + if (typeof actionCreators === 'function') {
6016 + return bindActionCreator(actionCreators, dispatch);
6017 + }
6018 +
6019 + if (typeof actionCreators !== 'object' || actionCreators === null) {
6020 + throw new Error( false ? 0 : "bindActionCreators expected an object or a function, but instead received: '" + kindOf(actionCreators) + "'. " + "Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?");
6021 + }
6022 +
6023 + var boundActionCreators = {};
6024 +
6025 + for (var key in actionCreators) {
6026 + var actionCreator = actionCreators[key];
6027 +
6028 + if (typeof actionCreator === 'function') {
6029 + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
6030 + }
6031 + }
6032 +
6033 + return boundActionCreators;
6034 +}
6035 +
6036 +/**
6037 + * Composes single-argument functions from right to left. The rightmost
6038 + * function can take multiple arguments as it provides the signature for
6039 + * the resulting composite function.
6040 + *
6041 + * @param {...Function} funcs The functions to compose.
6042 + * @returns {Function} A function obtained by composing the argument functions
6043 + * from right to left. For example, compose(f, g, h) is identical to doing
6044 + * (...args) => f(g(h(...args))).
6045 + */
6046 +function compose() {
6047 + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
6048 + funcs[_key] = arguments[_key];
6049 + }
6050 +
6051 + if (funcs.length === 0) {
6052 + return function (arg) {
6053 + return arg;
6054 + };
6055 + }
6056 +
6057 + if (funcs.length === 1) {
6058 + return funcs[0];
6059 + }
6060 +
6061 + return funcs.reduce(function (a, b) {
6062 + return function () {
6063 + return a(b.apply(void 0, arguments));
6064 + };
6065 + });
6066 +}
6067 +
6068 +/**
6069 + * Creates a store enhancer that applies middleware to the dispatch method
6070 + * of the Redux store. This is handy for a variety of tasks, such as expressing
6071 + * asynchronous actions in a concise manner, or logging every action payload.
6072 + *
6073 + * See `redux-thunk` package as an example of the Redux middleware.
6074 + *
6075 + * Because middleware is potentially asynchronous, this should be the first
6076 + * store enhancer in the composition chain.
6077 + *
6078 + * Note that each middleware will be given the `dispatch` and `getState` functions
6079 + * as named arguments.
6080 + *
6081 + * @param {...Function} middlewares The middleware chain to be applied.
6082 + * @returns {Function} A store enhancer applying the middleware.
6083 + */
6084 +
6085 +function applyMiddleware() {
6086 + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
6087 + middlewares[_key] = arguments[_key];
6088 + }
6089 +
6090 + return function (createStore) {
6091 + return function () {
6092 + var store = createStore.apply(void 0, arguments);
6093 +
6094 + var _dispatch = function dispatch() {
6095 + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');
6096 + };
6097 +
6098 + var middlewareAPI = {
6099 + getState: store.getState,
6100 + dispatch: function dispatch() {
6101 + return _dispatch.apply(void 0, arguments);
6102 + }
6103 + };
6104 + var chain = middlewares.map(function (middleware) {
6105 + return middleware(middlewareAPI);
6106 + });
6107 + _dispatch = compose.apply(void 0, chain)(store.dispatch);
6108 + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, {
6109 + dispatch: _dispatch
6110 + });
6111 + };
6112 + };
6113 +}
6114 +
6115 +
6116 +
6117 +
6118 +/***/ }),
6119 +
6120 +/***/ "../node_modules/reselect/es/defaultMemoize.js":
6121 +/*!*****************************************************!*\
6122 + !*** ../node_modules/reselect/es/defaultMemoize.js ***!
6123 + \*****************************************************/
6124 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6125 +
6126 +"use strict";
6127 +__webpack_require__.r(__webpack_exports__);
6128 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
6129 +/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator),
6130 +/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck),
6131 +/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize)
6132 +/* harmony export */ });
6133 +// Cache implementation based on Erik Rasmussen's `lru-memoize`:
6134 +// https://github.com/erikras/lru-memoize
6135 +var NOT_FOUND = 'NOT_FOUND';
6136 +
6137 +function createSingletonCache(equals) {
6138 + var entry;
6139 + return {
6140 + get: function get(key) {
6141 + if (entry && equals(entry.key, key)) {
6142 + return entry.value;
6143 + }
6144 +
6145 + return NOT_FOUND;
6146 + },
6147 + put: function put(key, value) {
6148 + entry = {
6149 + key: key,
6150 + value: value
6151 + };
6152 + },
6153 + getEntries: function getEntries() {
6154 + return entry ? [entry] : [];
6155 + },
6156 + clear: function clear() {
6157 + entry = undefined;
6158 + }
6159 + };
6160 +}
6161 +
6162 +function createLruCache(maxSize, equals) {
6163 + var entries = [];
6164 +
6165 + function get(key) {
6166 + var cacheIndex = entries.findIndex(function (entry) {
6167 + return equals(key, entry.key);
6168 + }); // We found a cached entry
6169 +
6170 + if (cacheIndex > -1) {
6171 + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top
6172 +
6173 + if (cacheIndex > 0) {
6174 + entries.splice(cacheIndex, 1);
6175 + entries.unshift(entry);
6176 + }
6177 +
6178 + return entry.value;
6179 + } // No entry found in cache, return sentinel
6180 +
6181 +
6182 + return NOT_FOUND;
6183 + }
6184 +
6185 + function put(key, value) {
6186 + if (get(key) === NOT_FOUND) {
6187 + // TODO Is unshift slow?
6188 + entries.unshift({
6189 + key: key,
6190 + value: value
6191 + });
6192 +
6193 + if (entries.length > maxSize) {
6194 + entries.pop();
6195 + }
6196 + }
6197 + }
6198 +
6199 + function getEntries() {
6200 + return entries;
6201 + }
6202 +
6203 + function clear() {
6204 + entries = [];
6205 + }
6206 +
6207 + return {
6208 + get: get,
6209 + put: put,
6210 + getEntries: getEntries,
6211 + clear: clear
6212 + };
6213 +}
6214 +
6215 +var defaultEqualityCheck = function defaultEqualityCheck(a, b) {
6216 + return a === b;
6217 +};
6218 +function createCacheKeyComparator(equalityCheck) {
6219 + return function areArgumentsShallowlyEqual(prev, next) {
6220 + if (prev === null || next === null || prev.length !== next.length) {
6221 + return false;
6222 + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
6223 +
6224 +
6225 + var length = prev.length;
6226 +
6227 + for (var i = 0; i < length; i++) {
6228 + if (!equalityCheck(prev[i], next[i])) {
6229 + return false;
6230 + }
6231 + }
6232 +
6233 + return true;
6234 + };
6235 +}
6236 +// defaultMemoize now supports a configurable cache size with LRU behavior,
6237 +// and optional comparison of the result value with existing values
6238 +function defaultMemoize(func, equalityCheckOrOptions) {
6239 + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : {
6240 + equalityCheck: equalityCheckOrOptions
6241 + };
6242 + var _providedOptions$equa = providedOptions.equalityCheck,
6243 + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa,
6244 + _providedOptions$maxS = providedOptions.maxSize,
6245 + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS,
6246 + resultEqualityCheck = providedOptions.resultEqualityCheck;
6247 + var comparator = createCacheKeyComparator(equalityCheck);
6248 + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons
6249 +
6250 + function memoized() {
6251 + var value = cache.get(arguments);
6252 +
6253 + if (value === NOT_FOUND) {
6254 + // @ts-ignore
6255 + value = func.apply(null, arguments);
6256 +
6257 + if (resultEqualityCheck) {
6258 + var entries = cache.getEntries();
6259 + var matchingEntry = entries.find(function (entry) {
6260 + return resultEqualityCheck(entry.value, value);
6261 + });
6262 +
6263 + if (matchingEntry) {
6264 + value = matchingEntry.value;
6265 + }
6266 + }
6267 +
6268 + cache.put(arguments, value);
6269 + }
6270 +
6271 + return value;
6272 + }
6273 +
6274 + memoized.clearCache = function () {
6275 + return cache.clear();
6276 + };
6277 +
6278 + return memoized;
6279 +}
6280 +
6281 +/***/ }),
6282 +
6283 +/***/ "../node_modules/reselect/es/index.js":
6284 +/*!********************************************!*\
6285 + !*** ../node_modules/reselect/es/index.js ***!
6286 + \********************************************/
6287 +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6288 +
6289 +"use strict";
6290 +__webpack_require__.r(__webpack_exports__);
6291 +/* harmony export */ __webpack_require__.d(__webpack_exports__, {
6292 +/* harmony export */ createSelector: () => (/* binding */ createSelector),
6293 +/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator),
6294 +/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector),
6295 +/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck),
6296 +/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize)
6297 +/* harmony export */ });
6298 +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js");
6299 +
6300 +
6301 +
6302 +function getDependencies(funcs) {
6303 + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs;
6304 +
6305 + if (!dependencies.every(function (dep) {
6306 + return typeof dep === 'function';
6307 + })) {
6308 + var dependencyTypes = dependencies.map(function (dep) {
6309 + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep;
6310 + }).join(', ');
6311 + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]");
6312 + }
6313 +
6314 + return dependencies;
6315 +}
6316 +
6317 +function createSelectorCreator(memoize) {
6318 + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
6319 + memoizeOptionsFromArgs[_key - 1] = arguments[_key];
6320 + }
6321 +
6322 + var createSelector = function createSelector() {
6323 + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
6324 + funcs[_key2] = arguments[_key2];
6325 + }
6326 +
6327 + var _recomputations = 0;
6328 +
6329 + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`.
6330 + // So, start by declaring the default value here.
6331 + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.)
6332 +
6333 +
6334 + var directlyPassedOptions = {
6335 + memoizeOptions: undefined
6336 + }; // Normally, the result func or "output selector" is the last arg
6337 +
6338 + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object
6339 +
6340 + if (typeof resultFunc === 'object') {
6341 + directlyPassedOptions = resultFunc; // and pop the real result func off
6342 +
6343 + resultFunc = funcs.pop();
6344 + }
6345 +
6346 + if (typeof resultFunc !== 'function') {
6347 + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]");
6348 + } // Determine which set of options we're using. Prefer options passed directly,
6349 + // but fall back to options given to createSelectorCreator.
6350 +
6351 +
6352 + var _directlyPassedOption = directlyPassedOptions,
6353 + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions,
6354 + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer
6355 + // is an array. In most libs I've looked at, it's an equality function or options object.
6356 + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full
6357 + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so
6358 + // we wrap it in an array so we can apply it.
6359 +
6360 + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions];
6361 + var dependencies = getDependencies(funcs);
6362 + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() {
6363 + _recomputations++; // apply arguments instead of spreading for performance.
6364 +
6365 + return resultFunc.apply(null, arguments);
6366 + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
6367 +
6368 + var selector = memoize(function dependenciesChecker() {
6369 + var params = [];
6370 + var length = dependencies.length;
6371 +
6372 + for (var i = 0; i < length; i++) {
6373 + // apply arguments instead of spreading and mutate a local list of params for performance.
6374 + // @ts-ignore
6375 + params.push(dependencies[i].apply(null, arguments));
6376 + } // apply arguments instead of spreading for performance.
6377 +
6378 +
6379 + _lastResult = memoizedResultFunc.apply(null, params);
6380 + return _lastResult;
6381 + });
6382 + Object.assign(selector, {
6383 + resultFunc: resultFunc,
6384 + memoizedResultFunc: memoizedResultFunc,
6385 + dependencies: dependencies,
6386 + lastResult: function lastResult() {
6387 + return _lastResult;
6388 + },
6389 + recomputations: function recomputations() {
6390 + return _recomputations;
6391 + },
6392 + resetRecomputations: function resetRecomputations() {
6393 + return _recomputations = 0;
6394 + }
6395 + });
6396 + return selector;
6397 + }; // @ts-ignore
6398 +
6399 +
6400 + return createSelector;
6401 +}
6402 +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize);
6403 +// Manual definition of state and output arguments
6404 +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) {
6405 + if (selectorCreator === void 0) {
6406 + selectorCreator = createSelector;
6407 + }
6408 +
6409 + if (typeof selectors !== 'object') {
6410 + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors));
6411 + }
6412 +
6413 + var objectKeys = Object.keys(selectors);
6414 + var resultSelector = selectorCreator( // @ts-ignore
6415 + objectKeys.map(function (key) {
6416 + return selectors[key];
6417 + }), function () {
6418 + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
6419 + values[_key3] = arguments[_key3];
6420 + }
6421 +
6422 + return values.reduce(function (composition, value, index) {
6423 + composition[objectKeys[index]] = value;
6424 + return composition;
6425 + }, {});
6426 + });
6427 + return resultSelector;
6428 +};
6429 +
3406 6430 /***/ })
3407 6431
3408 6432 /******/ });
3409 6433 /************************************************************************/
@@ -3429,8 +6453,49 @@
3429 6453 /******/
3430 6454 /******/ // Return the exports of the module
3431 6455 /******/ return module.exports;
3432 6456 /******/ }
6457 +/******/
6458 +/************************************************************************/
6459 +/******/ /* webpack/runtime/define property getters */
6460 +/******/ (() => {
6461 +/******/ // define getter functions for harmony exports
6462 +/******/ __webpack_require__.d = (exports, definition) => {
6463 +/******/ for(var key in definition) {
6464 +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
6465 +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
6466 +/******/ }
6467 +/******/ }
6468 +/******/ };
6469 +/******/ })();
6470 +/******/
6471 +/******/ /* webpack/runtime/global */
6472 +/******/ (() => {
6473 +/******/ __webpack_require__.g = (function() {
6474 +/******/ if (typeof globalThis === 'object') return globalThis;
6475 +/******/ try {
6476 +/******/ return this || new Function('return this')();
6477 +/******/ } catch (e) {
6478 +/******/ if (typeof window === 'object') return window;
6479 +/******/ }
6480 +/******/ })();
6481 +/******/ })();
6482 +/******/
6483 +/******/ /* webpack/runtime/hasOwnProperty shorthand */
6484 +/******/ (() => {
6485 +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
6486 +/******/ })();
6487 +/******/
6488 +/******/ /* webpack/runtime/make namespace object */
6489 +/******/ (() => {
6490 +/******/ // define __esModule on exports
6491 +/******/ __webpack_require__.r = (exports) => {
6492 +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
6493 +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
6494 +/******/ }
6495 +/******/ Object.defineProperty(exports, '__esModule', { value: true });
6496 +/******/ };
6497 +/******/ })();
3433 6498 /******/
3434 6499 /************************************************************************/
3435 6500 var __webpack_exports__ = {};
3436 6501 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.