| @@ -1,172 +1,1845 @@ | ||
| 1 | +/*! elementor - v3.9.0 - 06-12-2022 */ | |
| 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__) => { | |
| 5 | +/***/ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js": | |
| 6 | +/*!******************************************************************!*\ | |
| 7 | + !*** ../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***! | |
| 8 | + \******************************************************************/ | |
| 9 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 9 | 10 | |
| 10 | 11 | "use strict"; |
| 12 | +__webpack_require__.r(__webpack_exports__); | |
| 13 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 14 | +/* harmony export */ "MiddlewareArray": () => (/* binding */ MiddlewareArray), | |
| 15 | +/* harmony export */ "TaskAbortError": () => (/* binding */ TaskAbortError), | |
| 16 | +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes), | |
| 17 | +/* harmony export */ "addListener": () => (/* binding */ addListener), | |
| 18 | +/* harmony export */ "applyMiddleware": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware), | |
| 19 | +/* harmony export */ "bindActionCreators": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators), | |
| 20 | +/* harmony export */ "clearAllListeners": () => (/* binding */ clearAllListeners), | |
| 21 | +/* harmony export */ "combineReducers": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers), | |
| 22 | +/* harmony export */ "compose": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose), | |
| 23 | +/* harmony export */ "configureStore": () => (/* binding */ configureStore), | |
| 24 | +/* harmony export */ "createAction": () => (/* binding */ createAction), | |
| 25 | +/* harmony export */ "createAsyncThunk": () => (/* binding */ createAsyncThunk), | |
| 26 | +/* harmony export */ "createDraftSafeSelector": () => (/* binding */ createDraftSafeSelector), | |
| 27 | +/* harmony export */ "createEntityAdapter": () => (/* binding */ createEntityAdapter), | |
| 28 | +/* harmony export */ "createImmutableStateInvariantMiddleware": () => (/* binding */ createImmutableStateInvariantMiddleware), | |
| 29 | +/* harmony export */ "createListenerMiddleware": () => (/* binding */ createListenerMiddleware), | |
| 30 | +/* harmony export */ "createNextState": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]), | |
| 31 | +/* harmony export */ "createReducer": () => (/* binding */ createReducer), | |
| 32 | +/* harmony export */ "createSelector": () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector), | |
| 33 | +/* harmony export */ "createSerializableStateInvariantMiddleware": () => (/* binding */ createSerializableStateInvariantMiddleware), | |
| 34 | +/* harmony export */ "createSlice": () => (/* binding */ createSlice), | |
| 35 | +/* harmony export */ "createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore), | |
| 36 | +/* harmony export */ "current": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current), | |
| 37 | +/* harmony export */ "findNonSerializableValue": () => (/* binding */ findNonSerializableValue), | |
| 38 | +/* harmony export */ "freeze": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze), | |
| 39 | +/* harmony export */ "getDefaultMiddleware": () => (/* binding */ getDefaultMiddleware), | |
| 40 | +/* harmony export */ "getType": () => (/* binding */ getType), | |
| 41 | +/* harmony export */ "isAllOf": () => (/* binding */ isAllOf), | |
| 42 | +/* harmony export */ "isAnyOf": () => (/* binding */ isAnyOf), | |
| 43 | +/* harmony export */ "isAsyncThunkAction": () => (/* binding */ isAsyncThunkAction), | |
| 44 | +/* harmony export */ "isDraft": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft), | |
| 45 | +/* harmony export */ "isFulfilled": () => (/* binding */ isFulfilled), | |
| 46 | +/* harmony export */ "isImmutableDefault": () => (/* binding */ isImmutableDefault), | |
| 47 | +/* harmony export */ "isPending": () => (/* binding */ isPending), | |
| 48 | +/* harmony export */ "isPlain": () => (/* binding */ isPlain), | |
| 49 | +/* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject), | |
| 50 | +/* harmony export */ "isRejected": () => (/* binding */ isRejected), | |
| 51 | +/* harmony export */ "isRejectedWithValue": () => (/* binding */ isRejectedWithValue), | |
| 52 | +/* harmony export */ "legacy_createStore": () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore), | |
| 53 | +/* harmony export */ "miniSerializeError": () => (/* binding */ miniSerializeError), | |
| 54 | +/* harmony export */ "nanoid": () => (/* binding */ nanoid), | |
| 55 | +/* harmony export */ "original": () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original), | |
| 56 | +/* harmony export */ "removeListener": () => (/* binding */ removeListener), | |
| 57 | +/* harmony export */ "unwrapResult": () => (/* binding */ unwrapResult) | |
| 58 | +/* harmony export */ }); | |
| 59 | +/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "../node_modules/immer/dist/immer.esm.mjs"); | |
| 60 | +/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "../node_modules/redux/es/redux.js"); | |
| 61 | +/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "../node_modules/reselect/es/index.js"); | |
| 62 | +/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "../node_modules/redux-thunk/es/index.js"); | |
| 63 | +var __extends = (undefined && undefined.__extends) || (function () { | |
| 64 | + var extendStatics = function (d, b) { | |
| 65 | + extendStatics = Object.setPrototypeOf || | |
| 66 | + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | |
| 67 | + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; | |
| 68 | + return extendStatics(d, b); | |
| 69 | + }; | |
| 70 | + return function (d, b) { | |
| 71 | + if (typeof b !== "function" && b !== null) | |
| 72 | + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); | |
| 73 | + extendStatics(d, b); | |
| 74 | + function __() { this.constructor = d; } | |
| 75 | + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | |
| 76 | + }; | |
| 77 | +})(); | |
| 78 | +var __generator = (undefined && undefined.__generator) || function (thisArg, body) { | |
| 79 | + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | |
| 80 | + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | |
| 81 | + function verb(n) { return function (v) { return step([n, v]); }; } | |
| 82 | + function step(op) { | |
| 83 | + if (f) throw new TypeError("Generator is already executing."); | |
| 84 | + while (_) try { | |
| 85 | + 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; | |
| 86 | + if (y = 0, t) op = [op[0] & 2, t.value]; | |
| 87 | + switch (op[0]) { | |
| 88 | + case 0: case 1: t = op; break; | |
| 89 | + case 4: _.label++; return { value: op[1], done: false }; | |
| 90 | + case 5: _.label++; y = op[1]; op = [0]; continue; | |
| 91 | + case 7: op = _.ops.pop(); _.trys.pop(); continue; | |
| 92 | + default: | |
| 93 | + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | |
| 94 | + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | |
| 95 | + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | |
| 96 | + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | |
| 97 | + if (t[2]) _.ops.pop(); | |
| 98 | + _.trys.pop(); continue; | |
| 99 | + } | |
| 100 | + op = body.call(thisArg, _); | |
| 101 | + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | |
| 102 | + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | |
| 103 | + } | |
| 104 | +}; | |
| 105 | +var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { | |
| 106 | + for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | |
| 107 | + to[j] = from[i]; | |
| 108 | + return to; | |
| 109 | +}; | |
| 110 | +var __defProp = Object.defineProperty; | |
| 111 | +var __defProps = Object.defineProperties; | |
| 112 | +var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | |
| 113 | +var __getOwnPropSymbols = Object.getOwnPropertySymbols; | |
| 114 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 115 | +var __propIsEnum = Object.prototype.propertyIsEnumerable; | |
| 116 | +var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; | |
| 117 | +var __spreadValues = function (a, b) { | |
| 118 | + for (var prop in b || (b = {})) | |
| 119 | + if (__hasOwnProp.call(b, prop)) | |
| 120 | + __defNormalProp(a, prop, b[prop]); | |
| 121 | + if (__getOwnPropSymbols) | |
| 122 | + for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { | |
| 123 | + var prop = _c[_i]; | |
| 124 | + if (__propIsEnum.call(b, prop)) | |
| 125 | + __defNormalProp(a, prop, b[prop]); | |
| 126 | + } | |
| 127 | + return a; | |
| 128 | +}; | |
| 129 | +var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; | |
| 130 | +var __async = function (__this, __arguments, generator) { | |
| 131 | + return new Promise(function (resolve, reject) { | |
| 132 | + var fulfilled = function (value) { | |
| 133 | + try { | |
| 134 | + step(generator.next(value)); | |
| 135 | + } | |
| 136 | + catch (e) { | |
| 137 | + reject(e); | |
| 138 | + } | |
| 139 | + }; | |
| 140 | + var rejected = function (value) { | |
| 141 | + try { | |
| 142 | + step(generator.throw(value)); | |
| 143 | + } | |
| 144 | + catch (e) { | |
| 145 | + reject(e); | |
| 146 | + } | |
| 147 | + }; | |
| 148 | + var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; | |
| 149 | + step((generator = generator.apply(__this, __arguments)).next()); | |
| 150 | + }); | |
| 151 | +}; | |
| 152 | +// src/index.ts | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | +// src/createDraftSafeSelector.ts | |
| 158 | + | |
| 159 | + | |
| 160 | +var createDraftSafeSelector = function () { | |
| 161 | + var args = []; | |
| 162 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 163 | + args[_i] = arguments[_i]; | |
| 164 | + } | |
| 165 | + var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args); | |
| 166 | + var wrappedSelector = function (value) { | |
| 167 | + var rest = []; | |
| 168 | + for (var _i = 1; _i < arguments.length; _i++) { | |
| 169 | + rest[_i - 1] = arguments[_i]; | |
| 170 | + } | |
| 171 | + return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest)); | |
| 172 | + }; | |
| 173 | + return wrappedSelector; | |
| 174 | +}; | |
| 175 | +// src/configureStore.ts | |
| 176 | + | |
| 177 | +// src/devtoolsExtension.ts | |
| 178 | + | |
| 179 | +var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { | |
| 180 | + if (arguments.length === 0) | |
| 181 | + return void 0; | |
| 182 | + if (typeof arguments[0] === "object") | |
| 183 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 184 | + return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments); | |
| 185 | +}; | |
| 186 | +var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { | |
| 187 | + return function (noop2) { | |
| 188 | + return noop2; | |
| 189 | + }; | |
| 190 | +}; | |
| 191 | +// src/isPlainObject.ts | |
| 192 | +function isPlainObject(value) { | |
| 193 | + if (typeof value !== "object" || value === null) | |
| 194 | + return false; | |
| 195 | + var proto = Object.getPrototypeOf(value); | |
| 196 | + if (proto === null) | |
| 197 | + return true; | |
| 198 | + var baseProto = proto; | |
| 199 | + while (Object.getPrototypeOf(baseProto) !== null) { | |
| 200 | + baseProto = Object.getPrototypeOf(baseProto); | |
| 201 | + } | |
| 202 | + return proto === baseProto; | |
| 203 | +} | |
| 204 | +// src/getDefaultMiddleware.ts | |
| 205 | + | |
| 206 | +// src/utils.ts | |
| 207 | + | |
| 208 | +function getTimeMeasureUtils(maxDelay, fnName) { | |
| 209 | + var elapsed = 0; | |
| 210 | + return { | |
| 211 | + measureTime: function (fn) { | |
| 212 | + var started = Date.now(); | |
| 213 | + try { | |
| 214 | + return fn(); | |
| 215 | + } | |
| 216 | + finally { | |
| 217 | + var finished = Date.now(); | |
| 218 | + elapsed += finished - started; | |
| 219 | + } | |
| 220 | + }, | |
| 221 | + warnIfExceeded: function () { | |
| 222 | + if (elapsed > maxDelay) { | |
| 223 | + 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."); | |
| 224 | + } | |
| 225 | + } | |
| 226 | + }; | |
| 227 | +} | |
| 228 | +var MiddlewareArray = /** @class */ (function (_super) { | |
| 229 | + __extends(MiddlewareArray, _super); | |
| 230 | + function MiddlewareArray() { | |
| 231 | + var args = []; | |
| 232 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 233 | + args[_i] = arguments[_i]; | |
| 234 | + } | |
| 235 | + var _this = _super.apply(this, args) || this; | |
| 236 | + Object.setPrototypeOf(_this, MiddlewareArray.prototype); | |
| 237 | + return _this; | |
| 238 | + } | |
| 239 | + Object.defineProperty(MiddlewareArray, Symbol.species, { | |
| 240 | + get: function () { | |
| 241 | + return MiddlewareArray; | |
| 242 | + }, | |
| 243 | + enumerable: false, | |
| 244 | + configurable: true | |
| 245 | + }); | |
| 246 | + MiddlewareArray.prototype.concat = function () { | |
| 247 | + var arr = []; | |
| 248 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 249 | + arr[_i] = arguments[_i]; | |
| 250 | + } | |
| 251 | + return _super.prototype.concat.apply(this, arr); | |
| 252 | + }; | |
| 253 | + MiddlewareArray.prototype.prepend = function () { | |
| 254 | + var arr = []; | |
| 255 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 256 | + arr[_i] = arguments[_i]; | |
| 257 | + } | |
| 258 | + if (arr.length === 1 && Array.isArray(arr[0])) { | |
| 259 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); | |
| 260 | + } | |
| 261 | + return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); | |
| 262 | + }; | |
| 263 | + return MiddlewareArray; | |
| 264 | +}(Array)); | |
| 265 | +function freezeDraftable(val) { | |
| 266 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () { | |
| 267 | + }) : val; | |
| 268 | +} | |
| 269 | +// src/immutableStateInvariantMiddleware.ts | |
| 270 | +var isProduction = "development" === "production"; | |
| 271 | +var prefix = "Invariant failed"; | |
| 272 | +function invariant(condition, message) { | |
| 273 | + if (condition) { | |
| 274 | + return; | |
| 275 | + } | |
| 276 | + if (isProduction) { | |
| 277 | + throw new Error(prefix); | |
| 278 | + } | |
| 279 | + throw new Error(prefix + ": " + (message || "")); | |
| 280 | +} | |
| 281 | +function stringify(obj, serializer, indent, decycler) { | |
| 282 | + return JSON.stringify(obj, getSerialize(serializer, decycler), indent); | |
| 283 | +} | |
| 284 | +function getSerialize(serializer, decycler) { | |
| 285 | + var stack = [], keys = []; | |
| 286 | + if (!decycler) | |
| 287 | + decycler = function (_, value) { | |
| 288 | + if (stack[0] === value) | |
| 289 | + return "[Circular ~]"; | |
| 290 | + return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; | |
| 291 | + }; | |
| 292 | + return function (key, value) { | |
| 293 | + if (stack.length > 0) { | |
| 294 | + var thisPos = stack.indexOf(this); | |
| 295 | + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); | |
| 296 | + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); | |
| 297 | + if (~stack.indexOf(value)) | |
| 298 | + value = decycler.call(this, key, value); | |
| 299 | + } | |
| 300 | + else | |
| 301 | + stack.push(value); | |
| 302 | + return serializer == null ? value : serializer.call(this, key, value); | |
| 303 | + }; | |
| 304 | +} | |
| 305 | +function isImmutableDefault(value) { | |
| 306 | + return typeof value !== "object" || value == null || Object.isFrozen(value); | |
| 307 | +} | |
| 308 | +function trackForMutations(isImmutable, ignorePaths, obj) { | |
| 309 | + var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); | |
| 310 | + return { | |
| 311 | + detectMutations: function () { | |
| 312 | + return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); | |
| 313 | + } | |
| 314 | + }; | |
| 315 | +} | |
| 316 | +function trackProperties(isImmutable, ignorePaths, obj, path) { | |
| 317 | + if (ignorePaths === void 0) { ignorePaths = []; } | |
| 318 | + if (path === void 0) { path = ""; } | |
| 319 | + var tracked = { value: obj }; | |
| 320 | + if (!isImmutable(obj)) { | |
| 321 | + tracked.children = {}; | |
| 322 | + for (var key in obj) { | |
| 323 | + var childPath = path ? path + "." + key : key; | |
| 324 | + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 325 | + continue; | |
| 326 | + } | |
| 327 | + tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); | |
| 328 | + } | |
| 329 | + } | |
| 330 | + return tracked; | |
| 331 | +} | |
| 332 | +function detectMutations(isImmutable, ignorePaths, trackedProperty, obj, sameParentRef, path) { | |
| 333 | + if (ignorePaths === void 0) { ignorePaths = []; } | |
| 334 | + if (sameParentRef === void 0) { sameParentRef = false; } | |
| 335 | + if (path === void 0) { path = ""; } | |
| 336 | + var prevObj = trackedProperty ? trackedProperty.value : void 0; | |
| 337 | + var sameRef = prevObj === obj; | |
| 338 | + if (sameParentRef && !sameRef && !Number.isNaN(obj)) { | |
| 339 | + return { wasMutated: true, path: path }; | |
| 340 | + } | |
| 341 | + if (isImmutable(prevObj) || isImmutable(obj)) { | |
| 342 | + return { wasMutated: false }; | |
| 343 | + } | |
| 344 | + var keysToDetect = {}; | |
| 345 | + for (var key in trackedProperty.children) { | |
| 346 | + keysToDetect[key] = true; | |
| 347 | + } | |
| 348 | + for (var key in obj) { | |
| 349 | + keysToDetect[key] = true; | |
| 350 | + } | |
| 351 | + for (var key in keysToDetect) { | |
| 352 | + var childPath = path ? path + "." + key : key; | |
| 353 | + if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { | |
| 354 | + continue; | |
| 355 | + } | |
| 356 | + var result = detectMutations(isImmutable, ignorePaths, trackedProperty.children[key], obj[key], sameRef, childPath); | |
| 357 | + if (result.wasMutated) { | |
| 358 | + return result; | |
| 359 | + } | |
| 360 | + } | |
| 361 | + return { wasMutated: false }; | |
| 362 | +} | |
| 363 | +function createImmutableStateInvariantMiddleware(options) { | |
| 364 | + if (options === void 0) { options = {}; } | |
| 365 | + if (false) {} | |
| 366 | + 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; | |
| 367 | + ignoredPaths = ignoredPaths || ignore; | |
| 368 | + var track = trackForMutations.bind(null, isImmutable, ignoredPaths); | |
| 369 | + return function (_c) { | |
| 370 | + var getState = _c.getState; | |
| 371 | + var state = getState(); | |
| 372 | + var tracker = track(state); | |
| 373 | + var result; | |
| 374 | + return function (next) { return function (action) { | |
| 375 | + var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); | |
| 376 | + measureUtils.measureTime(function () { | |
| 377 | + state = getState(); | |
| 378 | + result = tracker.detectMutations(); | |
| 379 | + tracker = track(state); | |
| 380 | + 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)"); | |
| 381 | + }); | |
| 382 | + var dispatchedAction = next(action); | |
| 383 | + measureUtils.measureTime(function () { | |
| 384 | + state = getState(); | |
| 385 | + result = tracker.detectMutations(); | |
| 386 | + tracker = track(state); | |
| 387 | + 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)"); | |
| 388 | + }); | |
| 389 | + measureUtils.warnIfExceeded(); | |
| 390 | + return dispatchedAction; | |
| 391 | + }; }; | |
| 392 | + }; | |
| 393 | +} | |
| 394 | +// src/serializableStateInvariantMiddleware.ts | |
| 395 | +function isPlain(val) { | |
| 396 | + var type = typeof val; | |
| 397 | + return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); | |
| 398 | +} | |
| 399 | +function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths) { | |
| 400 | + if (path === void 0) { path = ""; } | |
| 401 | + if (isSerializable === void 0) { isSerializable = isPlain; } | |
| 402 | + if (ignoredPaths === void 0) { ignoredPaths = []; } | |
| 403 | + var foundNestedSerializable; | |
| 404 | + if (!isSerializable(value)) { | |
| 405 | + return { | |
| 406 | + keyPath: path || "<root>", | |
| 407 | + value: value | |
| 408 | + }; | |
| 409 | + } | |
| 410 | + if (typeof value !== "object" || value === null) { | |
| 411 | + return false; | |
| 412 | + } | |
| 413 | + var entries = getEntries != null ? getEntries(value) : Object.entries(value); | |
| 414 | + var hasIgnoredPaths = ignoredPaths.length > 0; | |
| 415 | + for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { | |
| 416 | + var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; | |
| 417 | + var nestedPath = path ? path + "." + key : key; | |
| 418 | + if (hasIgnoredPaths && ignoredPaths.indexOf(nestedPath) >= 0) { | |
| 419 | + continue; | |
| 420 | + } | |
| 421 | + if (!isSerializable(nestedValue)) { | |
| 422 | + return { | |
| 423 | + keyPath: nestedPath, | |
| 424 | + value: nestedValue | |
| 425 | + }; | |
| 426 | + } | |
| 427 | + if (typeof nestedValue === "object") { | |
| 428 | + foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths); | |
| 429 | + if (foundNestedSerializable) { | |
| 430 | + return foundNestedSerializable; | |
| 431 | + } | |
| 432 | + } | |
| 433 | + } | |
| 434 | + return false; | |
| 435 | +} | |
| 436 | +function createSerializableStateInvariantMiddleware(options) { | |
| 437 | + if (options === void 0) { options = {}; } | |
| 438 | + if (false) {} | |
| 439 | + 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; | |
| 440 | + return function (storeAPI) { return function (next) { return function (action) { | |
| 441 | + var result = next(action); | |
| 442 | + var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); | |
| 443 | + if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { | |
| 444 | + measureUtils.measureTime(function () { | |
| 445 | + var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths); | |
| 446 | + if (foundActionNonSerializableValue) { | |
| 447 | + var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; | |
| 448 | + 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)"); | |
| 449 | + } | |
| 450 | + }); | |
| 451 | + } | |
| 452 | + if (!ignoreState) { | |
| 453 | + measureUtils.measureTime(function () { | |
| 454 | + var state = storeAPI.getState(); | |
| 455 | + var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths); | |
| 456 | + if (foundStateNonSerializableValue) { | |
| 457 | + var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; | |
| 458 | + 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)"); | |
| 459 | + } | |
| 460 | + }); | |
| 461 | + measureUtils.warnIfExceeded(); | |
| 462 | + } | |
| 463 | + return result; | |
| 464 | + }; }; }; | |
| 465 | +} | |
| 466 | +// src/getDefaultMiddleware.ts | |
| 467 | +function isBoolean(x) { | |
| 468 | + return typeof x === "boolean"; | |
| 469 | +} | |
| 470 | +function curryGetDefaultMiddleware() { | |
| 471 | + return function curriedGetDefaultMiddleware(options) { | |
| 472 | + return getDefaultMiddleware(options); | |
| 473 | + }; | |
| 474 | +} | |
| 475 | +function getDefaultMiddleware(options) { | |
| 476 | + if (options === void 0) { options = {}; } | |
| 477 | + 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; | |
| 478 | + var middlewareArray = new MiddlewareArray(); | |
| 479 | + if (thunk) { | |
| 480 | + if (isBoolean(thunk)) { | |
| 481 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); | |
| 482 | + } | |
| 483 | + else { | |
| 484 | + middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); | |
| 485 | + } | |
| 486 | + } | |
| 487 | + if (true) { | |
| 488 | + if (immutableCheck) { | |
| 489 | + var immutableOptions = {}; | |
| 490 | + if (!isBoolean(immutableCheck)) { | |
| 491 | + immutableOptions = immutableCheck; | |
| 492 | + } | |
| 493 | + middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); | |
| 494 | + } | |
| 495 | + if (serializableCheck) { | |
| 496 | + var serializableOptions = {}; | |
| 497 | + if (!isBoolean(serializableCheck)) { | |
| 498 | + serializableOptions = serializableCheck; | |
| 499 | + } | |
| 500 | + middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); | |
| 501 | + } | |
| 502 | + } | |
| 503 | + return middlewareArray; | |
| 504 | +} | |
| 505 | +// src/configureStore.ts | |
| 506 | +var IS_PRODUCTION = "development" === "production"; | |
| 507 | +function configureStore(options) { | |
| 508 | + var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); | |
| 509 | + 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; | |
| 510 | + var rootReducer; | |
| 511 | + if (typeof reducer === "function") { | |
| 512 | + rootReducer = reducer; | |
| 513 | + } | |
| 514 | + else if (isPlainObject(reducer)) { | |
| 515 | + rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer); | |
| 516 | + } | |
| 517 | + else { | |
| 518 | + throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); | |
| 519 | + } | |
| 520 | + var finalMiddleware = middleware; | |
| 521 | + if (typeof finalMiddleware === "function") { | |
| 522 | + finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); | |
| 523 | + if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { | |
| 524 | + throw new Error("when using a middleware builder function, an array of middleware must be returned"); | |
| 525 | + } | |
| 526 | + } | |
| 527 | + if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { | |
| 528 | + throw new Error("each middleware provided to configureStore must be a function"); | |
| 529 | + } | |
| 530 | + var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware); | |
| 531 | + var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose; | |
| 532 | + if (devTools) { | |
| 533 | + finalCompose = composeWithDevTools(__spreadValues({ | |
| 534 | + trace: !IS_PRODUCTION | |
| 535 | + }, typeof devTools === "object" && devTools)); | |
| 536 | + } | |
| 537 | + var storeEnhancers = [middlewareEnhancer]; | |
| 538 | + if (Array.isArray(enhancers)) { | |
| 539 | + storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); | |
| 540 | + } | |
| 541 | + else if (typeof enhancers === "function") { | |
| 542 | + storeEnhancers = enhancers(storeEnhancers); | |
| 543 | + } | |
| 544 | + var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); | |
| 545 | + return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer); | |
| 546 | +} | |
| 547 | +// src/createAction.ts | |
| 548 | +function createAction(type, prepareAction) { | |
| 549 | + function actionCreator() { | |
| 550 | + var args = []; | |
| 551 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 552 | + args[_i] = arguments[_i]; | |
| 553 | + } | |
| 554 | + if (prepareAction) { | |
| 555 | + var prepared = prepareAction.apply(void 0, args); | |
| 556 | + if (!prepared) { | |
| 557 | + throw new Error("prepareAction did not return an object"); | |
| 558 | + } | |
| 559 | + return __spreadValues(__spreadValues({ | |
| 560 | + type: type, | |
| 561 | + payload: prepared.payload | |
| 562 | + }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); | |
| 563 | + } | |
| 564 | + return { type: type, payload: args[0] }; | |
| 565 | + } | |
| 566 | + actionCreator.toString = function () { return "" + type; }; | |
| 567 | + actionCreator.type = type; | |
| 568 | + actionCreator.match = function (action) { return action.type === type; }; | |
| 569 | + return actionCreator; | |
| 570 | +} | |
| 571 | +function isFSA(action) { | |
| 572 | + return isPlainObject(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); | |
| 573 | +} | |
| 574 | +function isValidKey(key) { | |
| 575 | + return ["type", "payload", "error", "meta"].indexOf(key) > -1; | |
| 576 | +} | |
| 577 | +function getType(actionCreator) { | |
| 578 | + return "" + actionCreator; | |
| 579 | +} | |
| 580 | +// src/createReducer.ts | |
| 581 | + | |
| 582 | +// src/mapBuilders.ts | |
| 583 | +function executeReducerBuilderCallback(builderCallback) { | |
| 584 | + var actionsMap = {}; | |
| 585 | + var actionMatchers = []; | |
| 586 | + var defaultCaseReducer; | |
| 587 | + var builder = { | |
| 588 | + addCase: function (typeOrActionCreator, reducer) { | |
| 589 | + if (true) { | |
| 590 | + if (actionMatchers.length > 0) { | |
| 591 | + throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); | |
| 592 | + } | |
| 593 | + if (defaultCaseReducer) { | |
| 594 | + throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); | |
| 595 | + } | |
| 596 | + } | |
| 597 | + var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; | |
| 598 | + if (type in actionsMap) { | |
| 599 | + throw new Error("addCase cannot be called with two reducers for the same action type"); | |
| 600 | + } | |
| 601 | + actionsMap[type] = reducer; | |
| 602 | + return builder; | |
| 603 | + }, | |
| 604 | + addMatcher: function (matcher, reducer) { | |
| 605 | + if (true) { | |
| 606 | + if (defaultCaseReducer) { | |
| 607 | + throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); | |
| 608 | + } | |
| 609 | + } | |
| 610 | + actionMatchers.push({ matcher: matcher, reducer: reducer }); | |
| 611 | + return builder; | |
| 612 | + }, | |
| 613 | + addDefaultCase: function (reducer) { | |
| 614 | + if (true) { | |
| 615 | + if (defaultCaseReducer) { | |
| 616 | + throw new Error("`builder.addDefaultCase` can only be called once"); | |
| 617 | + } | |
| 618 | + } | |
| 619 | + defaultCaseReducer = reducer; | |
| 620 | + return builder; | |
| 621 | + } | |
| 622 | + }; | |
| 623 | + builderCallback(builder); | |
| 624 | + return [actionsMap, actionMatchers, defaultCaseReducer]; | |
| 625 | +} | |
| 626 | +// src/createReducer.ts | |
| 627 | +function isStateFunction(x) { | |
| 628 | + return typeof x === "function"; | |
| 629 | +} | |
| 630 | +function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { | |
| 631 | + if (actionMatchers === void 0) { actionMatchers = []; } | |
| 632 | + var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; | |
| 633 | + var getInitialState; | |
| 634 | + if (isStateFunction(initialState)) { | |
| 635 | + getInitialState = function () { return freezeDraftable(initialState()); }; | |
| 636 | + } | |
| 637 | + else { | |
| 638 | + var frozenInitialState_1 = freezeDraftable(initialState); | |
| 639 | + getInitialState = function () { return frozenInitialState_1; }; | |
| 640 | + } | |
| 641 | + function reducer(state, action) { | |
| 642 | + if (state === void 0) { state = getInitialState(); } | |
| 643 | + var caseReducers = __spreadArray([ | |
| 644 | + actionsMap[action.type] | |
| 645 | + ], finalActionMatchers.filter(function (_c) { | |
| 646 | + var matcher = _c.matcher; | |
| 647 | + return matcher(action); | |
| 648 | + }).map(function (_c) { | |
| 649 | + var reducer2 = _c.reducer; | |
| 650 | + return reducer2; | |
| 651 | + })); | |
| 652 | + if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { | |
| 653 | + caseReducers = [finalDefaultCaseReducer]; | |
| 654 | + } | |
| 655 | + return caseReducers.reduce(function (previousState, caseReducer) { | |
| 656 | + if (caseReducer) { | |
| 657 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) { | |
| 658 | + var draft = previousState; | |
| 659 | + var result = caseReducer(draft, action); | |
| 660 | + if (result === void 0) { | |
| 661 | + return previousState; | |
| 662 | + } | |
| 663 | + return result; | |
| 664 | + } | |
| 665 | + else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) { | |
| 666 | + var result = caseReducer(previousState, action); | |
| 667 | + if (result === void 0) { | |
| 668 | + if (previousState === null) { | |
| 669 | + return previousState; | |
| 670 | + } | |
| 671 | + throw Error("A case reducer on a non-draftable value must not return undefined"); | |
| 672 | + } | |
| 673 | + return result; | |
| 674 | + } | |
| 675 | + else { | |
| 676 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) { | |
| 677 | + return caseReducer(draft, action); | |
| 678 | + }); | |
| 679 | + } | |
| 680 | + } | |
| 681 | + return previousState; | |
| 682 | + }, state); | |
| 683 | + } | |
| 684 | + reducer.getInitialState = getInitialState; | |
| 685 | + return reducer; | |
| 686 | +} | |
| 687 | +// src/createSlice.ts | |
| 688 | +function getType2(slice, actionKey) { | |
| 689 | + return slice + "/" + actionKey; | |
| 690 | +} | |
| 691 | +function createSlice(options) { | |
| 692 | + var name = options.name; | |
| 693 | + if (!name) { | |
| 694 | + throw new Error("`name` is a required option for createSlice"); | |
| 695 | + } | |
| 696 | + if (typeof process !== "undefined" && "development" === "development") { | |
| 697 | + if (options.initialState === void 0) { | |
| 698 | + console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); | |
| 699 | + } | |
| 700 | + } | |
| 701 | + var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); | |
| 702 | + var reducers = options.reducers || {}; | |
| 703 | + var reducerNames = Object.keys(reducers); | |
| 704 | + var sliceCaseReducersByName = {}; | |
| 705 | + var sliceCaseReducersByType = {}; | |
| 706 | + var actionCreators = {}; | |
| 707 | + reducerNames.forEach(function (reducerName) { | |
| 708 | + var maybeReducerWithPrepare = reducers[reducerName]; | |
| 709 | + var type = getType2(name, reducerName); | |
| 710 | + var caseReducer; | |
| 711 | + var prepareCallback; | |
| 712 | + if ("reducer" in maybeReducerWithPrepare) { | |
| 713 | + caseReducer = maybeReducerWithPrepare.reducer; | |
| 714 | + prepareCallback = maybeReducerWithPrepare.prepare; | |
| 715 | + } | |
| 716 | + else { | |
| 717 | + caseReducer = maybeReducerWithPrepare; | |
| 718 | + } | |
| 719 | + sliceCaseReducersByName[reducerName] = caseReducer; | |
| 720 | + sliceCaseReducersByType[type] = caseReducer; | |
| 721 | + actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); | |
| 722 | + }); | |
| 723 | + function buildReducer() { | |
| 724 | + 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; | |
| 725 | + var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); | |
| 726 | + return createReducer(initialState, finalCaseReducers, actionMatchers, defaultCaseReducer); | |
| 727 | + } | |
| 728 | + var _reducer; | |
| 729 | + return { | |
| 730 | + name: name, | |
| 731 | + reducer: function (state, action) { | |
| 732 | + if (!_reducer) | |
| 733 | + _reducer = buildReducer(); | |
| 734 | + return _reducer(state, action); | |
| 735 | + }, | |
| 736 | + actions: actionCreators, | |
| 737 | + caseReducers: sliceCaseReducersByName, | |
| 738 | + getInitialState: function () { | |
| 739 | + if (!_reducer) | |
| 740 | + _reducer = buildReducer(); | |
| 741 | + return _reducer.getInitialState(); | |
| 742 | + } | |
| 743 | + }; | |
| 744 | +} | |
| 745 | +// src/entities/entity_state.ts | |
| 746 | +function getInitialEntityState() { | |
| 747 | + return { | |
| 748 | + ids: [], | |
| 749 | + entities: {} | |
| 750 | + }; | |
| 751 | +} | |
| 752 | +function createInitialStateFactory() { | |
| 753 | + function getInitialState(additionalState) { | |
| 754 | + if (additionalState === void 0) { additionalState = {}; } | |
| 755 | + return Object.assign(getInitialEntityState(), additionalState); | |
| 756 | + } | |
| 757 | + return { getInitialState: getInitialState }; | |
| 758 | +} | |
| 759 | +// src/entities/state_selectors.ts | |
| 760 | +function createSelectorsFactory() { | |
| 761 | + function getSelectors(selectState) { | |
| 762 | + var selectIds = function (state) { return state.ids; }; | |
| 763 | + var selectEntities = function (state) { return state.entities; }; | |
| 764 | + var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); | |
| 765 | + var selectId = function (_, id) { return id; }; | |
| 766 | + var selectById = function (entities, id) { return entities[id]; }; | |
| 767 | + var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); | |
| 768 | + if (!selectState) { | |
| 769 | + return { | |
| 770 | + selectIds: selectIds, | |
| 771 | + selectEntities: selectEntities, | |
| 772 | + selectAll: selectAll, | |
| 773 | + selectTotal: selectTotal, | |
| 774 | + selectById: createDraftSafeSelector(selectEntities, selectId, selectById) | |
| 775 | + }; | |
| 776 | + } | |
| 777 | + var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); | |
| 778 | + return { | |
| 779 | + selectIds: createDraftSafeSelector(selectState, selectIds), | |
| 780 | + selectEntities: selectGlobalizedEntities, | |
| 781 | + selectAll: createDraftSafeSelector(selectState, selectAll), | |
| 782 | + selectTotal: createDraftSafeSelector(selectState, selectTotal), | |
| 783 | + selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) | |
| 784 | + }; | |
| 785 | + } | |
| 786 | + return { getSelectors: getSelectors }; | |
| 787 | +} | |
| 788 | +// src/entities/state_adapter.ts | |
| 789 | + | |
| 790 | +function createSingleArgumentStateOperator(mutator) { | |
| 791 | + var operator = createStateOperator(function (_, state) { return mutator(state); }); | |
| 792 | + return function operation(state) { | |
| 793 | + return operator(state, void 0); | |
| 794 | + }; | |
| 795 | +} | |
| 796 | +function createStateOperator(mutator) { | |
| 797 | + return function operation(state, arg) { | |
| 798 | + function isPayloadActionArgument(arg2) { | |
| 799 | + return isFSA(arg2); | |
| 800 | + } | |
| 801 | + var runMutator = function (draft) { | |
| 802 | + if (isPayloadActionArgument(arg)) { | |
| 803 | + mutator(arg.payload, draft); | |
| 804 | + } | |
| 805 | + else { | |
| 806 | + mutator(arg, draft); | |
| 807 | + } | |
| 808 | + }; | |
| 809 | + if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) { | |
| 810 | + runMutator(state); | |
| 811 | + return state; | |
| 812 | + } | |
| 813 | + else { | |
| 814 | + return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator); | |
| 815 | + } | |
| 816 | + }; | |
| 817 | +} | |
| 818 | +// src/entities/utils.ts | |
| 819 | +function selectIdValue(entity, selectId) { | |
| 820 | + var key = selectId(entity); | |
| 821 | + if ( true && key === void 0) { | |
| 822 | + 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()); | |
| 823 | + } | |
| 824 | + return key; | |
| 825 | +} | |
| 826 | +function ensureEntitiesArray(entities) { | |
| 827 | + if (!Array.isArray(entities)) { | |
| 828 | + entities = Object.values(entities); | |
| 829 | + } | |
| 830 | + return entities; | |
| 831 | +} | |
| 832 | +function splitAddedUpdatedEntities(newEntities, selectId, state) { | |
| 833 | + newEntities = ensureEntitiesArray(newEntities); | |
| 834 | + var added = []; | |
| 835 | + var updated = []; | |
| 836 | + for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { | |
| 837 | + var entity = newEntities_1[_i]; | |
| 838 | + var id = selectIdValue(entity, selectId); | |
| 839 | + if (id in state.entities) { | |
| 840 | + updated.push({ id: id, changes: entity }); | |
| 841 | + } | |
| 842 | + else { | |
| 843 | + added.push(entity); | |
| 844 | + } | |
| 845 | + } | |
| 846 | + return [added, updated]; | |
| 847 | +} | |
| 848 | +// src/entities/unsorted_state_adapter.ts | |
| 849 | +function createUnsortedStateAdapter(selectId) { | |
| 850 | + function addOneMutably(entity, state) { | |
| 851 | + var key = selectIdValue(entity, selectId); | |
| 852 | + if (key in state.entities) { | |
| 853 | + return; | |
| 854 | + } | |
| 855 | + state.ids.push(key); | |
| 856 | + state.entities[key] = entity; | |
| 857 | + } | |
| 858 | + function addManyMutably(newEntities, state) { | |
| 859 | + newEntities = ensureEntitiesArray(newEntities); | |
| 860 | + for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { | |
| 861 | + var entity = newEntities_2[_i]; | |
| 862 | + addOneMutably(entity, state); | |
| 863 | + } | |
| 864 | + } | |
| 865 | + function setOneMutably(entity, state) { | |
| 866 | + var key = selectIdValue(entity, selectId); | |
| 867 | + if (!(key in state.entities)) { | |
| 868 | + state.ids.push(key); | |
| 869 | + } | |
| 870 | + state.entities[key] = entity; | |
| 871 | + } | |
| 872 | + function setManyMutably(newEntities, state) { | |
| 873 | + newEntities = ensureEntitiesArray(newEntities); | |
| 874 | + for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { | |
| 875 | + var entity = newEntities_3[_i]; | |
| 876 | + setOneMutably(entity, state); | |
| 877 | + } | |
| 878 | + } | |
| 879 | + function setAllMutably(newEntities, state) { | |
| 880 | + newEntities = ensureEntitiesArray(newEntities); | |
| 881 | + state.ids = []; | |
| 882 | + state.entities = {}; | |
| 883 | + addManyMutably(newEntities, state); | |
| 884 | + } | |
| 885 | + function removeOneMutably(key, state) { | |
| 886 | + return removeManyMutably([key], state); | |
| 887 | + } | |
| 888 | + function removeManyMutably(keys, state) { | |
| 889 | + var didMutate = false; | |
| 890 | + keys.forEach(function (key) { | |
| 891 | + if (key in state.entities) { | |
| 892 | + delete state.entities[key]; | |
| 893 | + didMutate = true; | |
| 894 | + } | |
| 895 | + }); | |
| 896 | + if (didMutate) { | |
| 897 | + state.ids = state.ids.filter(function (id) { return id in state.entities; }); | |
| 898 | + } | |
| 899 | + } | |
| 900 | + function removeAllMutably(state) { | |
| 901 | + Object.assign(state, { | |
| 902 | + ids: [], | |
| 903 | + entities: {} | |
| 904 | + }); | |
| 905 | + } | |
| 906 | + function takeNewKey(keys, update, state) { | |
| 907 | + var original2 = state.entities[update.id]; | |
| 908 | + var updated = Object.assign({}, original2, update.changes); | |
| 909 | + var newKey = selectIdValue(updated, selectId); | |
| 910 | + var hasNewKey = newKey !== update.id; | |
| 911 | + if (hasNewKey) { | |
| 912 | + keys[update.id] = newKey; | |
| 913 | + delete state.entities[update.id]; | |
| 914 | + } | |
| 915 | + state.entities[newKey] = updated; | |
| 916 | + return hasNewKey; | |
| 917 | + } | |
| 918 | + function updateOneMutably(update, state) { | |
| 919 | + return updateManyMutably([update], state); | |
| 920 | + } | |
| 921 | + function updateManyMutably(updates, state) { | |
| 922 | + var newKeys = {}; | |
| 923 | + var updatesPerEntity = {}; | |
| 924 | + updates.forEach(function (update) { | |
| 925 | + if (update.id in state.entities) { | |
| 926 | + updatesPerEntity[update.id] = { | |
| 927 | + id: update.id, | |
| 928 | + changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) | |
| 929 | + }; | |
| 930 | + } | |
| 931 | + }); | |
| 932 | + updates = Object.values(updatesPerEntity); | |
| 933 | + var didMutateEntities = updates.length > 0; | |
| 934 | + if (didMutateEntities) { | |
| 935 | + var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; | |
| 936 | + if (didMutateIds) { | |
| 937 | + state.ids = Object.keys(state.entities); | |
| 938 | + } | |
| 939 | + } | |
| 940 | + } | |
| 941 | + function upsertOneMutably(entity, state) { | |
| 942 | + return upsertManyMutably([entity], state); | |
| 943 | + } | |
| 944 | + function upsertManyMutably(newEntities, state) { | |
| 945 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 946 | + updateManyMutably(updated, state); | |
| 947 | + addManyMutably(added, state); | |
| 948 | + } | |
| 949 | + return { | |
| 950 | + removeAll: createSingleArgumentStateOperator(removeAllMutably), | |
| 951 | + addOne: createStateOperator(addOneMutably), | |
| 952 | + addMany: createStateOperator(addManyMutably), | |
| 953 | + setOne: createStateOperator(setOneMutably), | |
| 954 | + setMany: createStateOperator(setManyMutably), | |
| 955 | + setAll: createStateOperator(setAllMutably), | |
| 956 | + updateOne: createStateOperator(updateOneMutably), | |
| 957 | + updateMany: createStateOperator(updateManyMutably), | |
| 958 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 959 | + upsertMany: createStateOperator(upsertManyMutably), | |
| 960 | + removeOne: createStateOperator(removeOneMutably), | |
| 961 | + removeMany: createStateOperator(removeManyMutably) | |
| 962 | + }; | |
| 963 | +} | |
| 964 | +// src/entities/sorted_state_adapter.ts | |
| 965 | +function createSortedStateAdapter(selectId, sort) { | |
| 966 | + var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; | |
| 967 | + function addOneMutably(entity, state) { | |
| 968 | + return addManyMutably([entity], state); | |
| 969 | + } | |
| 970 | + function addManyMutably(newEntities, state) { | |
| 971 | + newEntities = ensureEntitiesArray(newEntities); | |
| 972 | + var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); | |
| 973 | + if (models.length !== 0) { | |
| 974 | + merge(models, state); | |
| 975 | + } | |
| 976 | + } | |
| 977 | + function setOneMutably(entity, state) { | |
| 978 | + return setManyMutably([entity], state); | |
| 979 | + } | |
| 980 | + function setManyMutably(newEntities, state) { | |
| 981 | + newEntities = ensureEntitiesArray(newEntities); | |
| 982 | + if (newEntities.length !== 0) { | |
| 983 | + merge(newEntities, state); | |
| 984 | + } | |
| 985 | + } | |
| 986 | + function setAllMutably(newEntities, state) { | |
| 987 | + newEntities = ensureEntitiesArray(newEntities); | |
| 988 | + state.entities = {}; | |
| 989 | + state.ids = []; | |
| 990 | + addManyMutably(newEntities, state); | |
| 991 | + } | |
| 992 | + function updateOneMutably(update, state) { | |
| 993 | + return updateManyMutably([update], state); | |
| 994 | + } | |
| 995 | + function updateManyMutably(updates, state) { | |
| 996 | + var appliedUpdates = false; | |
| 997 | + for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { | |
| 998 | + var update = updates_1[_i]; | |
| 999 | + var entity = state.entities[update.id]; | |
| 1000 | + if (!entity) { | |
| 1001 | + continue; | |
| 1002 | + } | |
| 1003 | + appliedUpdates = true; | |
| 1004 | + Object.assign(entity, update.changes); | |
| 1005 | + var newId = selectId(entity); | |
| 1006 | + if (update.id !== newId) { | |
| 1007 | + delete state.entities[update.id]; | |
| 1008 | + state.entities[newId] = entity; | |
| 1009 | + } | |
| 1010 | + } | |
| 1011 | + if (appliedUpdates) { | |
| 1012 | + resortEntities(state); | |
| 1013 | + } | |
| 1014 | + } | |
| 1015 | + function upsertOneMutably(entity, state) { | |
| 1016 | + return upsertManyMutably([entity], state); | |
| 1017 | + } | |
| 1018 | + function upsertManyMutably(newEntities, state) { | |
| 1019 | + var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; | |
| 1020 | + updateManyMutably(updated, state); | |
| 1021 | + addManyMutably(added, state); | |
| 1022 | + } | |
| 1023 | + function areArraysEqual(a, b) { | |
| 1024 | + if (a.length !== b.length) { | |
| 1025 | + return false; | |
| 1026 | + } | |
| 1027 | + for (var i = 0; i < a.length && i < b.length; i++) { | |
| 1028 | + if (a[i] === b[i]) { | |
| 1029 | + continue; | |
| 1030 | + } | |
| 1031 | + return false; | |
| 1032 | + } | |
| 1033 | + return true; | |
| 1034 | + } | |
| 1035 | + function merge(models, state) { | |
| 1036 | + models.forEach(function (model) { | |
| 1037 | + state.entities[selectId(model)] = model; | |
| 1038 | + }); | |
| 1039 | + resortEntities(state); | |
| 1040 | + } | |
| 1041 | + function resortEntities(state) { | |
| 1042 | + var allEntities = Object.values(state.entities); | |
| 1043 | + allEntities.sort(sort); | |
| 1044 | + var newSortedIds = allEntities.map(selectId); | |
| 1045 | + var ids = state.ids; | |
| 1046 | + if (!areArraysEqual(ids, newSortedIds)) { | |
| 1047 | + state.ids = newSortedIds; | |
| 1048 | + } | |
| 1049 | + } | |
| 1050 | + return { | |
| 1051 | + removeOne: removeOne, | |
| 1052 | + removeMany: removeMany, | |
| 1053 | + removeAll: removeAll, | |
| 1054 | + addOne: createStateOperator(addOneMutably), | |
| 1055 | + updateOne: createStateOperator(updateOneMutably), | |
| 1056 | + upsertOne: createStateOperator(upsertOneMutably), | |
| 1057 | + setOne: createStateOperator(setOneMutably), | |
| 1058 | + setMany: createStateOperator(setManyMutably), | |
| 1059 | + setAll: createStateOperator(setAllMutably), | |
| 1060 | + addMany: createStateOperator(addManyMutably), | |
| 1061 | + updateMany: createStateOperator(updateManyMutably), | |
| 1062 | + upsertMany: createStateOperator(upsertManyMutably) | |
| 1063 | + }; | |
| 1064 | +} | |
| 1065 | +// src/entities/create_adapter.ts | |
| 1066 | +function createEntityAdapter(options) { | |
| 1067 | + if (options === void 0) { options = {}; } | |
| 1068 | + var _c = __spreadValues({ | |
| 1069 | + sortComparer: false, | |
| 1070 | + selectId: function (instance) { return instance.id; } | |
| 1071 | + }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; | |
| 1072 | + var stateFactory = createInitialStateFactory(); | |
| 1073 | + var selectorsFactory = createSelectorsFactory(); | |
| 1074 | + var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); | |
| 1075 | + return __spreadValues(__spreadValues(__spreadValues({ | |
| 1076 | + selectId: selectId, | |
| 1077 | + sortComparer: sortComparer | |
| 1078 | + }, stateFactory), selectorsFactory), stateAdapter); | |
| 1079 | +} | |
| 1080 | +// src/nanoid.ts | |
| 1081 | +var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; | |
| 1082 | +var nanoid = function (size) { | |
| 1083 | + if (size === void 0) { size = 21; } | |
| 1084 | + var id = ""; | |
| 1085 | + var i = size; | |
| 1086 | + while (i--) { | |
| 1087 | + id += urlAlphabet[Math.random() * 64 | 0]; | |
| 1088 | + } | |
| 1089 | + return id; | |
| 1090 | +}; | |
| 1091 | +// src/createAsyncThunk.ts | |
| 1092 | +var commonProperties = [ | |
| 1093 | + "name", | |
| 1094 | + "message", | |
| 1095 | + "stack", | |
| 1096 | + "code" | |
| 1097 | +]; | |
| 1098 | +var RejectWithValue = /** @class */ (function () { | |
| 1099 | + function RejectWithValue(payload, meta) { | |
| 1100 | + this.payload = payload; | |
| 1101 | + this.meta = meta; | |
| 1102 | + } | |
| 1103 | + return RejectWithValue; | |
| 1104 | +}()); | |
| 1105 | +var FulfillWithMeta = /** @class */ (function () { | |
| 1106 | + function FulfillWithMeta(payload, meta) { | |
| 1107 | + this.payload = payload; | |
| 1108 | + this.meta = meta; | |
| 1109 | + } | |
| 1110 | + return FulfillWithMeta; | |
| 1111 | +}()); | |
| 1112 | +var miniSerializeError = function (value) { | |
| 1113 | + if (typeof value === "object" && value !== null) { | |
| 1114 | + var simpleError = {}; | |
| 1115 | + for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { | |
| 1116 | + var property = commonProperties_1[_i]; | |
| 1117 | + if (typeof value[property] === "string") { | |
| 1118 | + simpleError[property] = value[property]; | |
| 1119 | + } | |
| 1120 | + } | |
| 1121 | + return simpleError; | |
| 1122 | + } | |
| 1123 | + return { message: String(value) }; | |
| 1124 | +}; | |
| 1125 | +function createAsyncThunk(typePrefix, payloadCreator, options) { | |
| 1126 | + var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ | |
| 1127 | + payload: payload, | |
| 1128 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1129 | + arg: arg, | |
| 1130 | + requestId: requestId, | |
| 1131 | + requestStatus: "fulfilled" | |
| 1132 | + }) | |
| 1133 | + }); }); | |
| 1134 | + var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ | |
| 1135 | + payload: void 0, | |
| 1136 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1137 | + arg: arg, | |
| 1138 | + requestId: requestId, | |
| 1139 | + requestStatus: "pending" | |
| 1140 | + }) | |
| 1141 | + }); }); | |
| 1142 | + var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ | |
| 1143 | + payload: payload, | |
| 1144 | + error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), | |
| 1145 | + meta: __spreadProps(__spreadValues({}, meta || {}), { | |
| 1146 | + arg: arg, | |
| 1147 | + requestId: requestId, | |
| 1148 | + rejectedWithValue: !!payload, | |
| 1149 | + requestStatus: "rejected", | |
| 1150 | + aborted: (error == null ? void 0 : error.name) === "AbortError", | |
| 1151 | + condition: (error == null ? void 0 : error.name) === "ConditionError" | |
| 1152 | + }) | |
| 1153 | + }); }); | |
| 1154 | + var displayedWarning = false; | |
| 1155 | + var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { | |
| 1156 | + function class_1() { | |
| 1157 | + this.signal = { | |
| 1158 | + aborted: false, | |
| 1159 | + addEventListener: function () { | |
| 1160 | + }, | |
| 1161 | + dispatchEvent: function () { | |
| 1162 | + return false; | |
| 1163 | + }, | |
| 1164 | + onabort: function () { | |
| 1165 | + }, | |
| 1166 | + removeEventListener: function () { | |
| 1167 | + }, | |
| 1168 | + reason: void 0, | |
| 1169 | + throwIfAborted: function () { | |
| 1170 | + } | |
| 1171 | + }; | |
| 1172 | + } | |
| 1173 | + class_1.prototype.abort = function () { | |
| 1174 | + if (true) { | |
| 1175 | + if (!displayedWarning) { | |
| 1176 | + displayedWarning = true; | |
| 1177 | + 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'."); | |
| 1178 | + } | |
| 1179 | + } | |
| 1180 | + }; | |
| 1181 | + return class_1; | |
| 1182 | + }()); | |
| 1183 | + function actionCreator(arg) { | |
| 1184 | + return function (dispatch, getState, extra) { | |
| 1185 | + var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); | |
| 1186 | + var abortController = new AC(); | |
| 1187 | + var abortReason; | |
| 1188 | + var abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ name: "AbortError", message: abortReason || "Aborted" }); }); }); | |
| 1189 | + var started = false; | |
| 1190 | + function abort(reason) { | |
| 1191 | + if (started) { | |
| 1192 | + abortReason = reason; | |
| 1193 | + abortController.abort(); | |
| 1194 | + } | |
| 1195 | + } | |
| 1196 | + var promise = function () { | |
| 1197 | + return __async(this, null, function () { | |
| 1198 | + var _a, _b, finalAction, conditionResult, err_1, skipDispatch; | |
| 1199 | + return __generator(this, function (_c) { | |
| 1200 | + switch (_c.label) { | |
| 1201 | + case 0: | |
| 1202 | + _c.trys.push([0, 4, , 5]); | |
| 1203 | + conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); | |
| 1204 | + if (!isThenable(conditionResult)) return [3 /*break*/, 2]; | |
| 1205 | + return [4 /*yield*/, conditionResult]; | |
| 1206 | + case 1: | |
| 1207 | + conditionResult = _c.sent(); | |
| 1208 | + _c.label = 2; | |
| 1209 | + case 2: | |
| 1210 | + if (conditionResult === false) { | |
| 1211 | + throw { | |
| 1212 | + name: "ConditionError", | |
| 1213 | + message: "Aborted due to condition callback returning false." | |
| 1214 | + }; | |
| 1215 | + } | |
| 1216 | + started = true; | |
| 1217 | + 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 }))); | |
| 1218 | + return [4 /*yield*/, Promise.race([ | |
| 1219 | + abortedPromise, | |
| 1220 | + Promise.resolve(payloadCreator(arg, { | |
| 1221 | + dispatch: dispatch, | |
| 1222 | + getState: getState, | |
| 1223 | + extra: extra, | |
| 1224 | + requestId: requestId, | |
| 1225 | + signal: abortController.signal, | |
| 1226 | + rejectWithValue: function (value, meta) { | |
| 1227 | + return new RejectWithValue(value, meta); | |
| 1228 | + }, | |
| 1229 | + fulfillWithValue: function (value, meta) { | |
| 1230 | + return new FulfillWithMeta(value, meta); | |
| 1231 | + } | |
| 1232 | + })).then(function (result) { | |
| 1233 | + if (result instanceof RejectWithValue) { | |
| 1234 | + throw result; | |
| 1235 | + } | |
| 1236 | + if (result instanceof FulfillWithMeta) { | |
| 1237 | + return fulfilled(result.payload, requestId, arg, result.meta); | |
| 1238 | + } | |
| 1239 | + return fulfilled(result, requestId, arg); | |
| 1240 | + }) | |
| 1241 | + ])]; | |
| 1242 | + case 3: | |
| 1243 | + finalAction = _c.sent(); | |
| 1244 | + return [3 /*break*/, 5]; | |
| 1245 | + case 4: | |
| 1246 | + err_1 = _c.sent(); | |
| 1247 | + finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); | |
| 1248 | + return [3 /*break*/, 5]; | |
| 1249 | + case 5: | |
| 1250 | + skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; | |
| 1251 | + if (!skipDispatch) { | |
| 1252 | + dispatch(finalAction); | |
| 1253 | + } | |
| 1254 | + return [2 /*return*/, finalAction]; | |
| 1255 | + } | |
| 1256 | + }); | |
| 1257 | + }); | |
| 1258 | + }(); | |
| 1259 | + return Object.assign(promise, { | |
| 1260 | + abort: abort, | |
| 1261 | + requestId: requestId, | |
| 1262 | + arg: arg, | |
| 1263 | + unwrap: function () { | |
| 1264 | + return promise.then(unwrapResult); | |
| 1265 | + } | |
| 1266 | + }); | |
| 1267 | + }; | |
| 1268 | + } | |
| 1269 | + return Object.assign(actionCreator, { | |
| 1270 | + pending: pending, | |
| 1271 | + rejected: rejected, | |
| 1272 | + fulfilled: fulfilled, | |
| 1273 | + typePrefix: typePrefix | |
| 1274 | + }); | |
| 1275 | +} | |
| 1276 | +function unwrapResult(action) { | |
| 1277 | + if (action.meta && action.meta.rejectedWithValue) { | |
| 1278 | + throw action.payload; | |
| 1279 | + } | |
| 1280 | + if (action.error) { | |
| 1281 | + throw action.error; | |
| 1282 | + } | |
| 1283 | + return action.payload; | |
| 1284 | +} | |
| 1285 | +function isThenable(value) { | |
| 1286 | + return value !== null && typeof value === "object" && typeof value.then === "function"; | |
| 1287 | +} | |
| 1288 | +// src/tsHelpers.ts | |
| 1289 | +var hasMatchFunction = function (v) { | |
| 1290 | + return v && typeof v.match === "function"; | |
| 1291 | +}; | |
| 1292 | +// src/matchers.ts | |
| 1293 | +var matches = function (matcher, action) { | |
| 1294 | + if (hasMatchFunction(matcher)) { | |
| 1295 | + return matcher.match(action); | |
| 1296 | + } | |
| 1297 | + else { | |
| 1298 | + return matcher(action); | |
| 1299 | + } | |
| 1300 | +}; | |
| 1301 | +function isAnyOf() { | |
| 1302 | + var matchers = []; | |
| 1303 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1304 | + matchers[_i] = arguments[_i]; | |
| 1305 | + } | |
| 1306 | + return function (action) { | |
| 1307 | + return matchers.some(function (matcher) { return matches(matcher, action); }); | |
| 1308 | + }; | |
| 1309 | +} | |
| 1310 | +function isAllOf() { | |
| 1311 | + var matchers = []; | |
| 1312 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1313 | + matchers[_i] = arguments[_i]; | |
| 1314 | + } | |
| 1315 | + return function (action) { | |
| 1316 | + return matchers.every(function (matcher) { return matches(matcher, action); }); | |
| 1317 | + }; | |
| 1318 | +} | |
| 1319 | +function hasExpectedRequestMetadata(action, validStatus) { | |
| 1320 | + if (!action || !action.meta) | |
| 1321 | + return false; | |
| 1322 | + var hasValidRequestId = typeof action.meta.requestId === "string"; | |
| 1323 | + var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; | |
| 1324 | + return hasValidRequestId && hasValidRequestStatus; | |
| 1325 | +} | |
| 1326 | +function isAsyncThunkArray(a) { | |
| 1327 | + return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; | |
| 1328 | +} | |
| 1329 | +function isPending() { | |
| 1330 | + var asyncThunks = []; | |
| 1331 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1332 | + asyncThunks[_i] = arguments[_i]; | |
| 1333 | + } | |
| 1334 | + if (asyncThunks.length === 0) { | |
| 1335 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; | |
| 1336 | + } | |
| 1337 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1338 | + return isPending()(asyncThunks[0]); | |
| 1339 | + } | |
| 1340 | + return function (action) { | |
| 1341 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); | |
| 1342 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1343 | + return combinedMatcher(action); | |
| 1344 | + }; | |
| 1345 | +} | |
| 1346 | +function isRejected() { | |
| 1347 | + var asyncThunks = []; | |
| 1348 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1349 | + asyncThunks[_i] = arguments[_i]; | |
| 1350 | + } | |
| 1351 | + if (asyncThunks.length === 0) { | |
| 1352 | + return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; | |
| 1353 | + } | |
| 1354 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1355 | + return isRejected()(asyncThunks[0]); | |
| 1356 | + } | |
| 1357 | + return function (action) { | |
| 1358 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); | |
| 1359 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1360 | + return combinedMatcher(action); | |
| 1361 | + }; | |
| 1362 | +} | |
| 1363 | +function isRejectedWithValue() { | |
| 1364 | + var asyncThunks = []; | |
| 1365 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1366 | + asyncThunks[_i] = arguments[_i]; | |
| 1367 | + } | |
| 1368 | + var hasFlag = function (action) { | |
| 1369 | + return action && action.meta && action.meta.rejectedWithValue; | |
| 1370 | + }; | |
| 1371 | + if (asyncThunks.length === 0) { | |
| 1372 | + return function (action) { | |
| 1373 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1374 | + return combinedMatcher(action); | |
| 1375 | + }; | |
| 1376 | + } | |
| 1377 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1378 | + return isRejectedWithValue()(asyncThunks[0]); | |
| 1379 | + } | |
| 1380 | + return function (action) { | |
| 1381 | + var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); | |
| 1382 | + return combinedMatcher(action); | |
| 1383 | + }; | |
| 1384 | +} | |
| 1385 | +function isFulfilled() { | |
| 1386 | + var asyncThunks = []; | |
| 1387 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1388 | + asyncThunks[_i] = arguments[_i]; | |
| 1389 | + } | |
| 1390 | + if (asyncThunks.length === 0) { | |
| 1391 | + return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; | |
| 1392 | + } | |
| 1393 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1394 | + return isFulfilled()(asyncThunks[0]); | |
| 1395 | + } | |
| 1396 | + return function (action) { | |
| 1397 | + var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); | |
| 1398 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1399 | + return combinedMatcher(action); | |
| 1400 | + }; | |
| 1401 | +} | |
| 1402 | +function isAsyncThunkAction() { | |
| 1403 | + var asyncThunks = []; | |
| 1404 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1405 | + asyncThunks[_i] = arguments[_i]; | |
| 1406 | + } | |
| 1407 | + if (asyncThunks.length === 0) { | |
| 1408 | + return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; | |
| 1409 | + } | |
| 1410 | + if (!isAsyncThunkArray(asyncThunks)) { | |
| 1411 | + return isAsyncThunkAction()(asyncThunks[0]); | |
| 1412 | + } | |
| 1413 | + return function (action) { | |
| 1414 | + var matchers = []; | |
| 1415 | + for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { | |
| 1416 | + var asyncThunk = asyncThunks_1[_i]; | |
| 1417 | + matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); | |
| 1418 | + } | |
| 1419 | + var combinedMatcher = isAnyOf.apply(void 0, matchers); | |
| 1420 | + return combinedMatcher(action); | |
| 1421 | + }; | |
| 1422 | +} | |
| 1423 | +// src/listenerMiddleware/utils.ts | |
| 1424 | +var assertFunction = function (func, expected) { | |
| 1425 | + if (typeof func !== "function") { | |
| 1426 | + throw new TypeError(expected + " is not a function"); | |
| 1427 | + } | |
| 1428 | +}; | |
| 1429 | +var noop = function () { | |
| 1430 | +}; | |
| 1431 | +var catchRejection = function (promise, onError) { | |
| 1432 | + if (onError === void 0) { onError = noop; } | |
| 1433 | + promise.catch(onError); | |
| 1434 | + return promise; | |
| 1435 | +}; | |
| 1436 | +var addAbortSignalListener = function (abortSignal, callback) { | |
| 1437 | + abortSignal.addEventListener("abort", callback, { once: true }); | |
| 1438 | +}; | |
| 1439 | +var abortControllerWithReason = function (abortController, reason) { | |
| 1440 | + var signal = abortController.signal; | |
| 1441 | + if (signal.aborted) { | |
| 1442 | + return; | |
| 1443 | + } | |
| 1444 | + if (!("reason" in signal)) { | |
| 1445 | + Object.defineProperty(signal, "reason", { | |
| 1446 | + enumerable: true, | |
| 1447 | + value: reason, | |
| 1448 | + configurable: true, | |
| 1449 | + writable: true | |
| 1450 | + }); | |
| 1451 | + } | |
| 1452 | + ; | |
| 1453 | + abortController.abort(reason); | |
| 1454 | +}; | |
| 1455 | +// src/listenerMiddleware/exceptions.ts | |
| 1456 | +var task = "task"; | |
| 1457 | +var listener = "listener"; | |
| 1458 | +var completed = "completed"; | |
| 1459 | +var cancelled = "cancelled"; | |
| 1460 | +var taskCancelled = "task-" + cancelled; | |
| 1461 | +var taskCompleted = "task-" + completed; | |
| 1462 | +var listenerCancelled = listener + "-" + cancelled; | |
| 1463 | +var listenerCompleted = listener + "-" + completed; | |
| 1464 | +var TaskAbortError = /** @class */ (function () { | |
| 1465 | + function TaskAbortError(code) { | |
| 1466 | + this.code = code; | |
| 1467 | + this.name = "TaskAbortError"; | |
| 1468 | + this.message = task + " " + cancelled + " (reason: " + code + ")"; | |
| 1469 | + } | |
| 1470 | + return TaskAbortError; | |
| 1471 | +}()); | |
| 1472 | +// src/listenerMiddleware/task.ts | |
| 1473 | +var validateActive = function (signal) { | |
| 1474 | + if (signal.aborted) { | |
| 1475 | + throw new TaskAbortError(signal.reason); | |
| 1476 | + } | |
| 1477 | +}; | |
| 1478 | +var promisifyAbortSignal = function (signal) { | |
| 1479 | + return catchRejection(new Promise(function (_, reject) { | |
| 1480 | + var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; | |
| 1481 | + if (signal.aborted) { | |
| 1482 | + notifyRejection(); | |
| 1483 | + } | |
| 1484 | + else { | |
| 1485 | + addAbortSignalListener(signal, notifyRejection); | |
| 1486 | + } | |
| 1487 | + })); | |
| 1488 | +}; | |
| 1489 | +var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { | |
| 1490 | + var value, error_1; | |
| 1491 | + return __generator(this, function (_c) { | |
| 1492 | + switch (_c.label) { | |
| 1493 | + case 0: | |
| 1494 | + _c.trys.push([0, 3, 4, 5]); | |
| 1495 | + return [4 /*yield*/, Promise.resolve()]; | |
| 1496 | + case 1: | |
| 1497 | + _c.sent(); | |
| 1498 | + return [4 /*yield*/, task2()]; | |
| 1499 | + case 2: | |
| 1500 | + value = _c.sent(); | |
| 1501 | + return [2 /*return*/, { | |
| 1502 | + status: "ok", | |
| 1503 | + value: value | |
| 1504 | + }]; | |
| 1505 | + case 3: | |
| 1506 | + error_1 = _c.sent(); | |
| 1507 | + return [2 /*return*/, { | |
| 1508 | + status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", | |
| 1509 | + error: error_1 | |
| 1510 | + }]; | |
| 1511 | + case 4: | |
| 1512 | + cleanUp == null ? void 0 : cleanUp(); | |
| 1513 | + return [7 /*endfinally*/]; | |
| 1514 | + case 5: return [2 /*return*/]; | |
| 1515 | + } | |
| 1516 | + }); | |
| 1517 | +}); }; | |
| 1518 | +var createPause = function (signal) { | |
| 1519 | + return function (promise) { | |
| 1520 | + return catchRejection(Promise.race([promisifyAbortSignal(signal), promise]).then(function (output) { | |
| 1521 | + validateActive(signal); | |
| 1522 | + return output; | |
| 1523 | + })); | |
| 1524 | + }; | |
| 1525 | +}; | |
| 1526 | +var createDelay = function (signal) { | |
| 1527 | + var pause = createPause(signal); | |
| 1528 | + return function (timeoutMs) { | |
| 1529 | + return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); | |
| 1530 | + }; | |
| 1531 | +}; | |
| 1532 | +// src/listenerMiddleware/index.ts | |
| 1533 | +var assign = Object.assign; | |
| 1534 | +var INTERNAL_NIL_TOKEN = {}; | |
| 1535 | +var alm = "listenerMiddleware"; | |
| 1536 | +var createFork = function (parentAbortSignal) { | |
| 1537 | + var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; | |
| 1538 | + return function (taskExecutor) { | |
| 1539 | + assertFunction(taskExecutor, "taskExecutor"); | |
| 1540 | + var childAbortController = new AbortController(); | |
| 1541 | + linkControllers(childAbortController); | |
| 1542 | + var result = runTask(function () { return __async(void 0, null, function () { | |
| 1543 | + var result2; | |
| 1544 | + return __generator(this, function (_c) { | |
| 1545 | + switch (_c.label) { | |
| 1546 | + case 0: | |
| 1547 | + validateActive(parentAbortSignal); | |
| 1548 | + validateActive(childAbortController.signal); | |
| 1549 | + return [4 /*yield*/, taskExecutor({ | |
| 1550 | + pause: createPause(childAbortController.signal), | |
| 1551 | + delay: createDelay(childAbortController.signal), | |
| 1552 | + signal: childAbortController.signal | |
| 1553 | + })]; | |
| 1554 | + case 1: | |
| 1555 | + result2 = _c.sent(); | |
| 1556 | + validateActive(childAbortController.signal); | |
| 1557 | + return [2 /*return*/, result2]; | |
| 1558 | + } | |
| 1559 | + }); | |
| 1560 | + }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); | |
| 1561 | + return { | |
| 1562 | + result: createPause(parentAbortSignal)(result), | |
| 1563 | + cancel: function () { | |
| 1564 | + abortControllerWithReason(childAbortController, taskCancelled); | |
| 1565 | + } | |
| 1566 | + }; | |
| 1567 | + }; | |
| 1568 | +}; | |
| 1569 | +var createTakePattern = function (startListening, signal) { | |
| 1570 | + var take = function (predicate, timeout) { return __async(void 0, null, function () { | |
| 1571 | + var unsubscribe, tuplePromise, promises, output; | |
| 1572 | + return __generator(this, function (_c) { | |
| 1573 | + switch (_c.label) { | |
| 1574 | + case 0: | |
| 1575 | + validateActive(signal); | |
| 1576 | + unsubscribe = function () { | |
| 1577 | + }; | |
| 1578 | + tuplePromise = new Promise(function (resolve) { | |
| 1579 | + unsubscribe = startListening({ | |
| 1580 | + predicate: predicate, | |
| 1581 | + effect: function (action, listenerApi) { | |
| 1582 | + listenerApi.unsubscribe(); | |
| 1583 | + resolve([ | |
| 1584 | + action, | |
| 1585 | + listenerApi.getState(), | |
| 1586 | + listenerApi.getOriginalState() | |
| 1587 | + ]); | |
| 1588 | + } | |
| 1589 | + }); | |
| 1590 | + }); | |
| 1591 | + promises = [ | |
| 1592 | + promisifyAbortSignal(signal), | |
| 1593 | + tuplePromise | |
| 1594 | + ]; | |
| 1595 | + if (timeout != null) { | |
| 1596 | + promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); | |
| 1597 | + } | |
| 1598 | + _c.label = 1; | |
| 1599 | + case 1: | |
| 1600 | + _c.trys.push([1, , 3, 4]); | |
| 1601 | + return [4 /*yield*/, Promise.race(promises)]; | |
| 1602 | + case 2: | |
| 1603 | + output = _c.sent(); | |
| 1604 | + validateActive(signal); | |
| 1605 | + return [2 /*return*/, output]; | |
| 1606 | + case 3: | |
| 1607 | + unsubscribe(); | |
| 1608 | + return [7 /*endfinally*/]; | |
| 1609 | + case 4: return [2 /*return*/]; | |
| 1610 | + } | |
| 1611 | + }); | |
| 1612 | + }); }; | |
| 1613 | + return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; | |
| 1614 | +}; | |
| 1615 | +var getListenerEntryPropsFrom = function (options) { | |
| 1616 | + var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; | |
| 1617 | + if (type) { | |
| 1618 | + predicate = createAction(type).match; | |
| 1619 | + } | |
| 1620 | + else if (actionCreator) { | |
| 1621 | + type = actionCreator.type; | |
| 1622 | + predicate = actionCreator.match; | |
| 1623 | + } | |
| 1624 | + else if (matcher) { | |
| 1625 | + predicate = matcher; | |
| 1626 | + } | |
| 1627 | + else if (predicate) { | |
| 1628 | + } | |
| 1629 | + else { | |
| 1630 | + throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); | |
| 1631 | + } | |
| 1632 | + assertFunction(effect, "options.listener"); | |
| 1633 | + return { predicate: predicate, type: type, effect: effect }; | |
| 1634 | +}; | |
| 1635 | +var createListenerEntry = function (options) { | |
| 1636 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; | |
| 1637 | + var id = nanoid(); | |
| 1638 | + var entry = { | |
| 1639 | + id: id, | |
| 1640 | + effect: effect, | |
| 1641 | + type: type, | |
| 1642 | + predicate: predicate, | |
| 1643 | + pending: new Set(), | |
| 1644 | + unsubscribe: function () { | |
| 1645 | + throw new Error("Unsubscribe not initialized"); | |
| 1646 | + } | |
| 1647 | + }; | |
| 1648 | + return entry; | |
| 1649 | +}; | |
| 1650 | +var createClearListenerMiddleware = function (listenerMap) { | |
| 1651 | + return function () { | |
| 1652 | + listenerMap.forEach(cancelActiveListeners); | |
| 1653 | + listenerMap.clear(); | |
| 1654 | + }; | |
| 1655 | +}; | |
| 1656 | +var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { | |
| 1657 | + try { | |
| 1658 | + errorHandler(errorToNotify, errorInfo); | |
| 1659 | + } | |
| 1660 | + catch (errorHandlerError) { | |
| 1661 | + setTimeout(function () { | |
| 1662 | + throw errorHandlerError; | |
| 1663 | + }, 0); | |
| 1664 | + } | |
| 1665 | +}; | |
| 1666 | +var addListener = createAction(alm + "/add"); | |
| 1667 | +var clearAllListeners = createAction(alm + "/removeAll"); | |
| 1668 | +var removeListener = createAction(alm + "/remove"); | |
| 1669 | +var defaultErrorHandler = function () { | |
| 1670 | + var args = []; | |
| 1671 | + for (var _i = 0; _i < arguments.length; _i++) { | |
| 1672 | + args[_i] = arguments[_i]; | |
| 1673 | + } | |
| 1674 | + console.error.apply(console, __spreadArray([alm + "/error"], args)); | |
| 1675 | +}; | |
| 1676 | +var cancelActiveListeners = function (entry) { | |
| 1677 | + entry.pending.forEach(function (controller) { | |
| 1678 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1679 | + }); | |
| 1680 | +}; | |
| 1681 | +function createListenerMiddleware(middlewareOptions) { | |
| 1682 | + var _this = this; | |
| 1683 | + if (middlewareOptions === void 0) { middlewareOptions = {}; } | |
| 1684 | + var listenerMap = new Map(); | |
| 1685 | + var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; | |
| 1686 | + assertFunction(onError, "onError"); | |
| 1687 | + var insertEntry = function (entry) { | |
| 1688 | + entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; | |
| 1689 | + listenerMap.set(entry.id, entry); | |
| 1690 | + return function (cancelOptions) { | |
| 1691 | + entry.unsubscribe(); | |
| 1692 | + if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { | |
| 1693 | + cancelActiveListeners(entry); | |
| 1694 | + } | |
| 1695 | + }; | |
| 1696 | + }; | |
| 1697 | + var findListenerEntry = function (comparator) { | |
| 1698 | + for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { | |
| 1699 | + var entry = _c[_i]; | |
| 1700 | + if (comparator(entry)) { | |
| 1701 | + return entry; | |
| 1702 | + } | |
| 1703 | + } | |
| 1704 | + return void 0; | |
| 1705 | + }; | |
| 1706 | + var startListening = function (options) { | |
| 1707 | + var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); | |
| 1708 | + if (!entry) { | |
| 1709 | + entry = createListenerEntry(options); | |
| 1710 | + } | |
| 1711 | + return insertEntry(entry); | |
| 1712 | + }; | |
| 1713 | + var stopListening = function (options) { | |
| 1714 | + var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; | |
| 1715 | + var entry = findListenerEntry(function (entry2) { | |
| 1716 | + var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; | |
| 1717 | + return matchPredicateOrType && entry2.effect === effect; | |
| 1718 | + }); | |
| 1719 | + if (entry) { | |
| 1720 | + entry.unsubscribe(); | |
| 1721 | + if (options.cancelActive) { | |
| 1722 | + cancelActiveListeners(entry); | |
| 1723 | + } | |
| 1724 | + } | |
| 1725 | + return !!entry; | |
| 1726 | + }; | |
| 1727 | + var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { | |
| 1728 | + var internalTaskController, take, listenerError_1; | |
| 1729 | + return __generator(this, function (_c) { | |
| 1730 | + switch (_c.label) { | |
| 1731 | + case 0: | |
| 1732 | + internalTaskController = new AbortController(); | |
| 1733 | + take = createTakePattern(startListening, internalTaskController.signal); | |
| 1734 | + _c.label = 1; | |
| 1735 | + case 1: | |
| 1736 | + _c.trys.push([1, 3, 4, 5]); | |
| 1737 | + entry.pending.add(internalTaskController); | |
| 1738 | + return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { | |
| 1739 | + getOriginalState: getOriginalState, | |
| 1740 | + condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, | |
| 1741 | + take: take, | |
| 1742 | + delay: createDelay(internalTaskController.signal), | |
| 1743 | + pause: createPause(internalTaskController.signal), | |
| 1744 | + extra: extra, | |
| 1745 | + signal: internalTaskController.signal, | |
| 1746 | + fork: createFork(internalTaskController.signal), | |
| 1747 | + unsubscribe: entry.unsubscribe, | |
| 1748 | + subscribe: function () { | |
| 1749 | + listenerMap.set(entry.id, entry); | |
| 1750 | + }, | |
| 1751 | + cancelActiveListeners: function () { | |
| 1752 | + entry.pending.forEach(function (controller, _, set) { | |
| 1753 | + if (controller !== internalTaskController) { | |
| 1754 | + abortControllerWithReason(controller, listenerCancelled); | |
| 1755 | + set.delete(controller); | |
| 1756 | + } | |
| 1757 | + }); | |
| 1758 | + } | |
| 1759 | + })))]; | |
| 1760 | + case 2: | |
| 1761 | + _c.sent(); | |
| 1762 | + return [3 /*break*/, 5]; | |
| 1763 | + case 3: | |
| 1764 | + listenerError_1 = _c.sent(); | |
| 1765 | + if (!(listenerError_1 instanceof TaskAbortError)) { | |
| 1766 | + safelyNotifyError(onError, listenerError_1, { | |
| 1767 | + raisedBy: "effect" | |
| 1768 | + }); | |
| 1769 | + } | |
| 1770 | + return [3 /*break*/, 5]; | |
| 1771 | + case 4: | |
| 1772 | + abortControllerWithReason(internalTaskController, listenerCompleted); | |
| 1773 | + entry.pending.delete(internalTaskController); | |
| 1774 | + return [7 /*endfinally*/]; | |
| 1775 | + case 5: return [2 /*return*/]; | |
| 1776 | + } | |
| 1777 | + }); | |
| 1778 | + }); }; | |
| 1779 | + var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); | |
| 1780 | + var middleware = function (api) { return function (next) { return function (action) { | |
| 1781 | + if (addListener.match(action)) { | |
| 1782 | + return startListening(action.payload); | |
| 1783 | + } | |
| 1784 | + if (clearAllListeners.match(action)) { | |
| 1785 | + clearListenerMiddleware(); | |
| 1786 | + return; | |
| 1787 | + } | |
| 1788 | + if (removeListener.match(action)) { | |
| 1789 | + return stopListening(action.payload); | |
| 1790 | + } | |
| 1791 | + var originalState = api.getState(); | |
| 1792 | + var getOriginalState = function () { | |
| 1793 | + if (originalState === INTERNAL_NIL_TOKEN) { | |
| 1794 | + throw new Error(alm + ": getOriginalState can only be called synchronously"); | |
| 1795 | + } | |
| 1796 | + return originalState; | |
| 1797 | + }; | |
| 1798 | + var result; | |
| 1799 | + try { | |
| 1800 | + result = next(action); | |
| 1801 | + if (listenerMap.size > 0) { | |
| 1802 | + var currentState = api.getState(); | |
| 1803 | + var listenerEntries = Array.from(listenerMap.values()); | |
| 1804 | + for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { | |
| 1805 | + var entry = listenerEntries_1[_i]; | |
| 1806 | + var runListener = false; | |
| 1807 | + try { | |
| 1808 | + runListener = entry.predicate(action, currentState, originalState); | |
| 1809 | + } | |
| 1810 | + catch (predicateError) { | |
| 1811 | + runListener = false; | |
| 1812 | + safelyNotifyError(onError, predicateError, { | |
| 1813 | + raisedBy: "predicate" | |
| 1814 | + }); | |
| 1815 | + } | |
| 1816 | + if (!runListener) { | |
| 1817 | + continue; | |
| 1818 | + } | |
| 1819 | + notifyListener(entry, action, api, getOriginalState); | |
| 1820 | + } | |
| 1821 | + } | |
| 1822 | + } | |
| 1823 | + finally { | |
| 1824 | + originalState = INTERNAL_NIL_TOKEN; | |
| 1825 | + } | |
| 1826 | + return result; | |
| 1827 | + }; }; }; | |
| 1828 | + return { | |
| 1829 | + middleware: middleware, | |
| 1830 | + startListening: startListening, | |
| 1831 | + stopListening: stopListening, | |
| 1832 | + clearListeners: clearListenerMiddleware | |
| 1833 | + }; | |
| 1834 | +} | |
| 1835 | +// src/index.ts | |
| 1836 | +(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)(); | |
| 1837 | + | |
| 1838 | +//# sourceMappingURL=redux-toolkit.esm.js.map | |
| 11 | 1839 | |
| 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 | 1840 | /***/ }), |
| 106 | 1841 | |
| 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 | 1842 | /***/ "../assets/dev/js/editor/utils/is-instanceof.js": |
| 170 | 1843 | /*!******************************************************!*\ |
| 171 | 1844 | !*** ../assets/dev/js/editor/utils/is-instanceof.js ***! |
| 172 | 1845 | \******************************************************/ |
| @@ -178,11 +1851,11 @@ | ||
| 178 | 1851 | Object.defineProperty(exports, "__esModule", ({ |
| 179 | 1852 | value: true |
| 180 | 1853 | })); |
| 181 | 1854 | exports["default"] = void 0; |
| 182 | -function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; } | |
| 183 | -function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } } | |
| 184 | -function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } | |
| 1855 | +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } | |
| 1856 | +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } | |
| 1857 | +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } | |
| 185 | 1858 | /** |
| 186 | 1859 | * Some FileAPI objects such as FileList, DataTransferItem and DataTransferItemList has inconsistency with the retrieved |
| 187 | 1860 | * object (from events, etc.) and the actual JavaScript object so a regular instanceof doesn't work. This function can |
| 188 | 1861 | * check whether it's instanceof by using the objects constructor and prototype names. |
| @@ -190,16 +1863,16 @@ | ||
| 190 | 1863 | * @param object |
| 191 | 1864 | * @param constructors |
| 192 | 1865 | * @return {boolean} |
| 193 | 1866 | */ |
| 194 | -var _default = exports["default"] = function _default(object, constructors) { | |
| 1867 | +var _default = function _default(object, constructors) { | |
| 195 | 1868 | constructors = Array.isArray(constructors) ? constructors : [constructors]; |
| 196 | 1869 | var _iterator = _createForOfIteratorHelper(constructors), |
| 197 | 1870 | _step; |
| 198 | 1871 | try { |
| 199 | 1872 | for (_iterator.s(); !(_step = _iterator.n()).done;) { |
| 200 | - var constructor = _step.value; | |
| 201 | - if (object.constructor.name === constructor.prototype[Symbol.toStringTag]) { | |
| 1873 | + var _constructor = _step.value; | |
| 1874 | + if (object.constructor.name === _constructor.prototype[Symbol.toStringTag]) { | |
| 202 | 1875 | return true; |
| 203 | 1876 | } |
| 204 | 1877 | } |
| 205 | 1878 | } catch (err) { |
| @@ -208,8 +1881,9 @@ | ||
| 208 | 1881 | _iterator.f(); |
| 209 | 1882 | } |
| 210 | 1883 | return false; |
| 211 | 1884 | }; |
| 1885 | +exports["default"] = _default; | |
| 212 | 1886 | |
| 213 | 1887 | /***/ }), |
| 214 | 1888 | |
| 215 | 1889 | /***/ "../assets/dev/js/modules/imports/args-object.js": |
| @@ -228,16 +1902,18 @@ | ||
| 228 | 1902 | exports["default"] = void 0; |
| 229 | 1903 | var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js")); |
| 230 | 1904 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 231 | 1905 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 1906 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 232 | 1907 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 233 | 1908 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 234 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 235 | 1909 | var _instanceType = _interopRequireDefault(__webpack_require__(/*! ./instance-type */ "../assets/dev/js/modules/imports/instance-type.js")); |
| 236 | 1910 | var _isInstanceof = _interopRequireDefault(__webpack_require__(/*! ../../editor/utils/is-instanceof */ "../assets/dev/js/editor/utils/is-instanceof.js")); |
| 237 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 238 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 239 | -var ArgsObject = exports["default"] = /*#__PURE__*/function (_InstanceType) { | |
| 1911 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 1912 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1913 | +var ArgsObject = /*#__PURE__*/function (_InstanceType) { | |
| 1914 | + (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 1915 | + var _super = _createSuper(ArgsObject); | |
| 240 | 1916 | /** |
| 241 | 1917 | * Function constructor(). |
| 242 | 1918 | * |
| 243 | 1919 | * Create ArgsObject. |
| @@ -246,9 +1922,9 @@ | ||
| 246 | 1922 | */ |
| 247 | 1923 | function ArgsObject(args) { |
| 248 | 1924 | var _this; |
| 249 | 1925 | (0, _classCallCheck2.default)(this, ArgsObject); |
| 250 | - _this = _callSuper(this, ArgsObject); | |
| 1926 | + _this = _super.call(this); | |
| 251 | 1927 | _this.args = args; |
| 252 | 1928 | return _this; |
| 253 | 1929 | } |
| 254 | 1930 | |
| @@ -260,11 +1936,11 @@ | ||
| 260 | 1936 | * @param {string} property |
| 261 | 1937 | * @param {{}} args |
| 262 | 1938 | * |
| 263 | 1939 | * @throws {Error} |
| 1940 | + * | |
| 264 | 1941 | */ |
| 265 | - (0, _inherits2.default)(ArgsObject, _InstanceType); | |
| 266 | - return (0, _createClass2.default)(ArgsObject, [{ | |
| 1942 | + (0, _createClass2.default)(ArgsObject, [{ | |
| 267 | 1943 | key: "requireArgument", |
| 268 | 1944 | value: function requireArgument(property) { |
| 269 | 1945 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.args; |
| 270 | 1946 | if (!Object.prototype.hasOwnProperty.call(args, property)) { |
| @@ -281,8 +1957,9 @@ | ||
| 281 | 1957 | * @param {string} type |
| 282 | 1958 | * @param {{}} args |
| 283 | 1959 | * |
| 284 | 1960 | * @throws {Error} |
| 1961 | + * | |
| 285 | 1962 | */ |
| 286 | 1963 | }, { |
| 287 | 1964 | key: "requireArgumentType", |
| 288 | 1965 | value: function requireArgumentType(property, type) { |
| @@ -302,8 +1979,9 @@ | ||
| 302 | 1979 | * @param {*} instance |
| 303 | 1980 | * @param {{}} args |
| 304 | 1981 | * |
| 305 | 1982 | * @throws {Error} |
| 1983 | + * | |
| 306 | 1984 | */ |
| 307 | 1985 | }, { |
| 308 | 1986 | key: "requireArgumentInstance", |
| 309 | 1987 | value: function requireArgumentInstance(property, instance) { |
| @@ -323,8 +2001,9 @@ | ||
| 323 | 2001 | * @param {*} type |
| 324 | 2002 | * @param {{}} args |
| 325 | 2003 | * |
| 326 | 2004 | * @throws {Error} |
| 2005 | + * | |
| 327 | 2006 | */ |
| 328 | 2007 | }, { |
| 329 | 2008 | key: "requireArgumentConstructor", |
| 330 | 2009 | value: function requireArgumentConstructor(property, type) { |
| @@ -342,9 +2021,11 @@ | ||
| 342 | 2021 | value: function getInstanceType() { |
| 343 | 2022 | return 'ArgsObject'; |
| 344 | 2023 | } |
| 345 | 2024 | }]); |
| 2025 | + return ArgsObject; | |
| 346 | 2026 | }(_instanceType.default); |
| 2027 | +exports["default"] = ArgsObject; | |
| 347 | 2028 | |
| 348 | 2029 | /***/ }), |
| 349 | 2030 | |
| 350 | 2031 | /***/ "../assets/dev/js/modules/imports/force-method-implementation.js": |
| @@ -362,22 +2043,25 @@ | ||
| 362 | 2043 | })); |
| 363 | 2044 | exports["default"] = exports.ForceMethodImplementation = void 0; |
| 364 | 2045 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 365 | 2046 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2047 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 2048 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 366 | 2049 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 367 | 2050 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 368 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 369 | 2051 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 370 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 371 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2052 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2053 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 372 | 2054 | // TODO: Wrong location used as `elementorModules.ForceMethodImplementation(); should be` `elementorUtils.forceMethodImplementation()`; |
| 373 | -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 2055 | +var ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 2056 | + (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 2057 | + var _super = _createSuper(ForceMethodImplementation); | |
| 374 | 2058 | function ForceMethodImplementation() { |
| 375 | 2059 | var _this; |
| 376 | 2060 | var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 377 | 2061 | var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; |
| 378 | 2062 | (0, _classCallCheck2.default)(this, ForceMethodImplementation); |
| 379 | - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."), args]); | |
| 2063 | + _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality."), args); | |
| 380 | 2064 | |
| 381 | 2065 | // Allow to pass custom properties to the error. |
| 382 | 2066 | if (Object.keys(args).length) { |
| 383 | 2067 | // eslint-disable-next-line no-console |
| @@ -382,15 +2066,15 @@ | ||
| 382 | 2066 | if (Object.keys(args).length) { |
| 383 | 2067 | // eslint-disable-next-line no-console |
| 384 | 2068 | console.error(args); |
| 385 | 2069 | } |
| 386 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 2070 | + Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation); | |
| 387 | 2071 | return _this; |
| 388 | 2072 | } |
| 389 | - (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 390 | 2073 | return (0, _createClass2.default)(ForceMethodImplementation); |
| 391 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 392 | -var _default = exports["default"] = function _default(args) { | |
| 2074 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 2075 | +exports.ForceMethodImplementation = ForceMethodImplementation; | |
| 2076 | +var _default = function _default(args) { | |
| 393 | 2077 | var stack = Error().stack, |
| 394 | 2078 | caller = stack.split('\n')[2].trim(), |
| 395 | 2079 | callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], |
| 396 | 2080 | info = {}; |
| @@ -404,8 +2088,9 @@ | ||
| 404 | 2088 | info.isStatic = true; |
| 405 | 2089 | } |
| 406 | 2090 | throw new ForceMethodImplementation(info, args); |
| 407 | 2091 | }; |
| 2092 | +exports["default"] = _default; | |
| 408 | 2093 | |
| 409 | 2094 | /***/ }), |
| 410 | 2095 | |
| 411 | 2096 | /***/ "../assets/dev/js/modules/imports/instance-type.js": |
| @@ -423,12 +2108,11 @@ | ||
| 423 | 2108 | })); |
| 424 | 2109 | exports["default"] = void 0; |
| 425 | 2110 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 426 | 2111 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2112 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 427 | 2113 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 428 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 429 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 430 | -var InstanceType = exports["default"] = /*#__PURE__*/function () { | |
| 2114 | +var InstanceType = /*#__PURE__*/function (_Symbol$hasInstance) { | |
| 431 | 2115 | function InstanceType() { |
| 432 | 2116 | var _this = this; |
| 433 | 2117 | (0, _classCallCheck2.default)(this, InstanceType); |
| 434 | 2118 | // Since anonymous classes sometimes do not get validated by babel, do it manually. |
| @@ -441,10 +2125,10 @@ | ||
| 441 | 2125 | prototypes.reverse().forEach(function (proto) { |
| 442 | 2126 | return _this instanceof proto; |
| 443 | 2127 | }); |
| 444 | 2128 | } |
| 445 | - return (0, _createClass2.default)(InstanceType, null, [{ | |
| 446 | - key: Symbol.hasInstance, | |
| 2129 | + (0, _createClass2.default)(InstanceType, null, [{ | |
| 2130 | + key: _Symbol$hasInstance, | |
| 447 | 2131 | value: function value(target) { |
| 448 | 2132 | /** |
| 449 | 2133 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 450 | 2134 | * its give's opportunity to mange capabilities of instanceOf operator. |
| @@ -449,9 +2133,9 @@ | ||
| 449 | 2133 | * This is function extending being called each time JS uses instanceOf, since babel use it each time it create new class |
| 450 | 2134 | * its give's opportunity to mange capabilities of instanceOf operator. |
| 451 | 2135 | * saving current class each time will give option later to handle instanceOf manually. |
| 452 | 2136 | */ |
| 453 | - var result = _superPropGet(InstanceType, Symbol.hasInstance, this, 2)([target]); | |
| 2137 | + var result = (0, _get2.default)((0, _getPrototypeOf2.default)(InstanceType), Symbol.hasInstance, this).call(this, target); | |
| 454 | 2138 | |
| 455 | 2139 | // Act normal when validate a class, which does not have instance type. |
| 456 | 2140 | if (target && !target.constructor.getInstanceType) { |
| 457 | 2141 | return result; |
| @@ -483,9 +2167,11 @@ | ||
| 483 | 2167 | value: function getInstanceType() { |
| 484 | 2168 | elementorModules.ForceMethodImplementation(); |
| 485 | 2169 | } |
| 486 | 2170 | }]); |
| 487 | -}(); | |
| 2171 | + return InstanceType; | |
| 2172 | +}(Symbol.hasInstance); | |
| 2173 | +exports["default"] = InstanceType; | |
| 488 | 2174 | |
| 489 | 2175 | /***/ }), |
| 490 | 2176 | |
| 491 | 2177 | /***/ "../assets/dev/js/modules/imports/module.js": |
| @@ -670,9 +2356,9 @@ | ||
| 670 | 2356 | value: true |
| 671 | 2357 | })); |
| 672 | 2358 | exports["default"] = void 0; |
| 673 | 2359 | var _viewModule = _interopRequireDefault(__webpack_require__(/*! ../view-module */ "../assets/dev/js/modules/imports/view-module.js")); |
| 674 | -var _default = exports["default"] = _viewModule.default.extend({ | |
| 2360 | +var _default = _viewModule.default.extend({ | |
| 675 | 2361 | getDefaultSettings: function getDefaultSettings() { |
| 676 | 2362 | return { |
| 677 | 2363 | container: null, |
| 678 | 2364 | items: null, |
| @@ -709,8 +2395,9 @@ | ||
| 709 | 2395 | } |
| 710 | 2396 | }); |
| 711 | 2397 | } |
| 712 | 2398 | }); |
| 2399 | +exports["default"] = _default; | |
| 713 | 2400 | |
| 714 | 2401 | /***/ }), |
| 715 | 2402 | |
| 716 | 2403 | /***/ "../assets/dev/js/modules/imports/utils/scroll.js": |
| @@ -729,13 +2416,13 @@ | ||
| 729 | 2416 | exports["default"] = void 0; |
| 730 | 2417 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 731 | 2418 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 732 | 2419 | // Moved from elementor pro: 'assets/dev/js/frontend/utils' |
| 733 | -var Scroll = exports["default"] = /*#__PURE__*/function () { | |
| 2420 | +var Scroll = /*#__PURE__*/function () { | |
| 734 | 2421 | function Scroll() { |
| 735 | 2422 | (0, _classCallCheck2.default)(this, Scroll); |
| 736 | 2423 | } |
| 737 | - return (0, _createClass2.default)(Scroll, null, [{ | |
| 2424 | + (0, _createClass2.default)(Scroll, null, [{ | |
| 738 | 2425 | key: "scrollObserver", |
| 739 | 2426 | value: |
| 740 | 2427 | /** |
| 741 | 2428 | * @param {Object} obj |
| @@ -746,27 +2433,27 @@ | ||
| 746 | 2433 | */ |
| 747 | 2434 | function scrollObserver(obj) { |
| 748 | 2435 | var lastScrollY = 0; |
| 749 | 2436 | |
| 750 | - // Generating thresholds points along the animation height | |
| 751 | - // More thresholds points = more trigger points of the callback | |
| 752 | - var buildThresholds = function buildThresholds() { | |
| 2437 | + // Generating threshholds points along the animation height | |
| 2438 | + // More threshholds points = more trigger points of the callback | |
| 2439 | + var buildThreshholds = function buildThreshholds() { | |
| 753 | 2440 | var sensitivityPercentage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; |
| 754 | - var thresholds = []; | |
| 2441 | + var threshholds = []; | |
| 755 | 2442 | if (sensitivityPercentage > 0 && sensitivityPercentage <= 100) { |
| 756 | 2443 | var increment = 100 / sensitivityPercentage; |
| 757 | 2444 | for (var i = 0; i <= 100; i += increment) { |
| 758 | - thresholds.push(i / 100); | |
| 2445 | + threshholds.push(i / 100); | |
| 759 | 2446 | } |
| 760 | 2447 | } else { |
| 761 | - thresholds.push(0); | |
| 2448 | + threshholds.push(0); | |
| 762 | 2449 | } |
| 763 | - return thresholds; | |
| 2450 | + return threshholds; | |
| 764 | 2451 | }; |
| 765 | 2452 | var options = { |
| 766 | 2453 | root: obj.root || null, |
| 767 | 2454 | rootMargin: obj.offset || '0px', |
| 768 | - threshold: buildThresholds(obj.sensitivity) | |
| 2455 | + threshold: buildThreshholds(obj.sensitivity) | |
| 769 | 2456 | }; |
| 770 | 2457 | function handleIntersect(entries) { |
| 771 | 2458 | var currentScrollY = entries[0].boundingClientRect.y, |
| 772 | 2459 | isInViewport = entries[0].isIntersecting, |
| @@ -825,9 +2512,11 @@ | ||
| 825 | 2512 | scrollPos = document.documentElement.scrollTop + document.body.scrollTop + heightOffset; |
| 826 | 2513 | return scrollPos / pageRange * 100; |
| 827 | 2514 | } |
| 828 | 2515 | }]); |
| 2516 | + return Scroll; | |
| 829 | 2517 | }(); |
| 2518 | +exports["default"] = Scroll; | |
| 830 | 2519 | |
| 831 | 2520 | /***/ }), |
| 832 | 2521 | |
| 833 | 2522 | /***/ "../assets/dev/js/modules/imports/view-module.js": |
| @@ -844,9 +2533,9 @@ | ||
| 844 | 2533 | value: true |
| 845 | 2534 | })); |
| 846 | 2535 | exports["default"] = void 0; |
| 847 | 2536 | var _module = _interopRequireDefault(__webpack_require__(/*! ./module */ "../assets/dev/js/modules/imports/module.js")); |
| 848 | -var _default = exports["default"] = _module.default.extend({ | |
| 2537 | +var _default = _module.default.extend({ | |
| 849 | 2538 | elements: null, |
| 850 | 2539 | getDefaultElements: function getDefaultElements() { |
| 851 | 2540 | return {}; |
| 852 | 2541 | }, |
| @@ -858,8 +2547,9 @@ | ||
| 858 | 2547 | initElements: function initElements() { |
| 859 | 2548 | this.elements = this.getDefaultElements(); |
| 860 | 2549 | } |
| 861 | 2550 | }); |
| 2551 | +exports["default"] = _default; | |
| 862 | 2552 | |
| 863 | 2553 | /***/ }), |
| 864 | 2554 | |
| 865 | 2555 | /***/ "../assets/dev/js/modules/modules.js": |
| @@ -881,11 +2571,9 @@ | ||
| 881 | 2571 | var _argsObject = _interopRequireDefault(__webpack_require__(/*! ./imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 882 | 2572 | var _masonry = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/masonry */ "../assets/dev/js/modules/imports/utils/masonry.js")); |
| 883 | 2573 | var _scroll = _interopRequireDefault(__webpack_require__(/*! ./imports/utils/scroll */ "../assets/dev/js/modules/imports/utils/scroll.js")); |
| 884 | 2574 | 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 = { | |
| 2575 | +var _default = window.elementorModules = { | |
| 888 | 2576 | Module: _module.default, |
| 889 | 2577 | ViewModule: _viewModule.default, |
| 890 | 2578 | ArgsObject: _argsObject.default, |
| 891 | 2579 | ForceMethodImplementation: _forceMethodImplementation.default, |
| @@ -891,20 +2579,11 @@ | ||
| 891 | 2579 | ForceMethodImplementation: _forceMethodImplementation.default, |
| 892 | 2580 | utils: { |
| 893 | 2581 | Masonry: _masonry.default, |
| 894 | 2582 | Scroll: _scroll.default |
| 895 | - }, | |
| 896 | - importExport: { | |
| 897 | - createGetInitialState: _templateRegistryHelpers.createGetInitialState, | |
| 898 | - customizationDialogsRegistry: _customizationDialogs.customizationDialogsRegistry | |
| 899 | 2583 | } |
| 900 | 2584 | }; |
| 901 | -if (!window.elementorModules) { | |
| 902 | - window.elementorModules = baseModules; | |
| 903 | -} else { | |
| 904 | - Object.assign(window.elementorModules, baseModules); | |
| 905 | -} | |
| 906 | -var _default = exports["default"] = window.elementorModules; | |
| 2585 | +exports["default"] = _default; | |
| 907 | 2586 | |
| 908 | 2587 | /***/ }), |
| 909 | 2588 | |
| 910 | 2589 | /***/ "../core/common/assets/js/views/modal/header.js": |
| @@ -922,25 +2601,21 @@ | ||
| 922 | 2601 | })); |
| 923 | 2602 | exports["default"] = void 0; |
| 924 | 2603 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 925 | 2604 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2605 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 926 | 2606 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 927 | 2607 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 928 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 929 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 930 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 931 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 2608 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2609 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2610 | +var _default = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 2611 | + (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 2612 | + var _super = _createSuper(_default); | |
| 932 | 2613 | function _default() { |
| 933 | 2614 | (0, _classCallCheck2.default)(this, _default); |
| 934 | - return _callSuper(this, _default, arguments); | |
| 2615 | + return _super.apply(this, arguments); | |
| 935 | 2616 | } |
| 936 | - (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 937 | - return (0, _createClass2.default)(_default, [{ | |
| 938 | - key: "tagName", | |
| 939 | - value: function tagName() { | |
| 940 | - return 'header'; | |
| 941 | - } | |
| 942 | - }, { | |
| 2617 | + (0, _createClass2.default)(_default, [{ | |
| 943 | 2618 | key: "className", |
| 944 | 2619 | value: function className() { |
| 945 | 2620 | return 'elementor-templates-modal__header'; |
| 946 | 2621 | } |
| @@ -972,31 +2647,8 @@ | ||
| 972 | 2647 | 'click @ui.closeModal': 'onCloseModalClick' |
| 973 | 2648 | }; |
| 974 | 2649 | } |
| 975 | 2650 | }, { |
| 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 | 2651 | key: "templateHelpers", |
| 1000 | 2652 | value: function templateHelpers() { |
| 1001 | 2653 | return { |
| 1002 | 2654 | closeType: this.getOption('closeType') |
| @@ -1005,36 +2657,13 @@ | ||
| 1005 | 2657 | }, { |
| 1006 | 2658 | key: "onCloseModalClick", |
| 1007 | 2659 | value: function onCloseModalClick() { |
| 1008 | 2660 | this._parent._parent._parent.hideModal(); |
| 1009 | - var documentType = this.getDocumentType(); | |
| 1010 | - var customEvent = new CustomEvent("core/modal/close/".concat(documentType)); | |
| 1011 | - window.dispatchEvent(customEvent); | |
| 1012 | - if (this.isFloatingButtonLibraryClose()) { | |
| 1013 | - $e.internal('document/save/set-is-modified', { | |
| 1014 | - status: false | |
| 1015 | - }); | |
| 1016 | - window.location.href = elementor.config.admin_floating_button_admin_url; | |
| 1017 | - } | |
| 1018 | 2661 | } |
| 1019 | - }, { | |
| 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 | - key: "isFloatingButtonLibraryClose", | |
| 1031 | - 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); | |
| 1034 | - } | |
| 1035 | 2662 | }]); |
| 2663 | + return _default; | |
| 1036 | 2664 | }(Marionette.LayoutView); |
| 2665 | +exports["default"] = _default; | |
| 1037 | 2666 | |
| 1038 | 2667 | /***/ }), |
| 1039 | 2668 | |
| 1040 | 2669 | /***/ "../core/common/assets/js/views/modal/layout.js": |
| @@ -1052,23 +2681,24 @@ | ||
| 1052 | 2681 | })); |
| 1053 | 2682 | exports["default"] = void 0; |
| 1054 | 2683 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1055 | 2684 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2685 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1056 | 2686 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1057 | 2687 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1058 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1059 | 2688 | var _header = _interopRequireDefault(__webpack_require__(/*! ./header */ "../core/common/assets/js/views/modal/header.js")); |
| 1060 | 2689 | var _logo = _interopRequireDefault(__webpack_require__(/*! ./logo */ "../core/common/assets/js/views/modal/logo.js")); |
| 1061 | 2690 | var _loading = _interopRequireDefault(__webpack_require__(/*! ./loading */ "../core/common/assets/js/views/modal/loading.js")); |
| 1062 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1063 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1064 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 2691 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2692 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2693 | +var _default = /*#__PURE__*/function (_Marionette$LayoutVie) { | |
| 2694 | + (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 2695 | + var _super = _createSuper(_default); | |
| 1065 | 2696 | function _default() { |
| 1066 | 2697 | (0, _classCallCheck2.default)(this, _default); |
| 1067 | - return _callSuper(this, _default, arguments); | |
| 2698 | + return _super.apply(this, arguments); | |
| 1068 | 2699 | } |
| 1069 | - (0, _inherits2.default)(_default, _Marionette$LayoutVie); | |
| 1070 | - return (0, _createClass2.default)(_default, [{ | |
| 2700 | + (0, _createClass2.default)(_default, [{ | |
| 1071 | 2701 | key: "el", |
| 1072 | 2702 | value: function el() { |
| 1073 | 2703 | return this.getModal().getElements('widget'); |
| 1074 | 2704 | } |
| @@ -1175,9 +2805,11 @@ | ||
| 1175 | 2805 | value: function showLogo() { |
| 1176 | 2806 | this.getHeaderView().logoArea.show(new _logo.default(this.getLogoOptions())); |
| 1177 | 2807 | } |
| 1178 | 2808 | }]); |
| 2809 | + return _default; | |
| 1179 | 2810 | }(Marionette.LayoutView); |
| 2811 | +exports["default"] = _default; | |
| 1180 | 2812 | |
| 1181 | 2813 | /***/ }), |
| 1182 | 2814 | |
| 1183 | 2815 | /***/ "../core/common/assets/js/views/modal/loading.js": |
| @@ -1195,20 +2827,21 @@ | ||
| 1195 | 2827 | })); |
| 1196 | 2828 | exports["default"] = void 0; |
| 1197 | 2829 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1198 | 2830 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2831 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1199 | 2832 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1200 | 2833 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1201 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1202 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1203 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1204 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 2834 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2835 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2836 | +var _default = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 2837 | + (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 2838 | + var _super = _createSuper(_default); | |
| 1205 | 2839 | function _default() { |
| 1206 | 2840 | (0, _classCallCheck2.default)(this, _default); |
| 1207 | - return _callSuper(this, _default, arguments); | |
| 2841 | + return _super.apply(this, arguments); | |
| 1208 | 2842 | } |
| 1209 | - (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 1210 | - return (0, _createClass2.default)(_default, [{ | |
| 2843 | + (0, _createClass2.default)(_default, [{ | |
| 1211 | 2844 | key: "id", |
| 1212 | 2845 | value: function id() { |
| 1213 | 2846 | return 'elementor-template-library-loading'; |
| 1214 | 2847 | } |
| @@ -1217,9 +2850,11 @@ | ||
| 1217 | 2850 | value: function getTemplate() { |
| 1218 | 2851 | return '#tmpl-elementor-template-library-loading'; |
| 1219 | 2852 | } |
| 1220 | 2853 | }]); |
| 2854 | + return _default; | |
| 1221 | 2855 | }(Marionette.ItemView); |
| 2856 | +exports["default"] = _default; | |
| 1222 | 2857 | |
| 1223 | 2858 | /***/ }), |
| 1224 | 2859 | |
| 1225 | 2860 | /***/ "../core/common/assets/js/views/modal/logo.js": |
| @@ -1237,20 +2872,21 @@ | ||
| 1237 | 2872 | })); |
| 1238 | 2873 | exports["default"] = void 0; |
| 1239 | 2874 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1240 | 2875 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2876 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1241 | 2877 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1242 | 2878 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1243 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1244 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1245 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1246 | -var _default = exports["default"] = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 2879 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2880 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2881 | +var _default = /*#__PURE__*/function (_Marionette$ItemView) { | |
| 2882 | + (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 2883 | + var _super = _createSuper(_default); | |
| 1247 | 2884 | function _default() { |
| 1248 | 2885 | (0, _classCallCheck2.default)(this, _default); |
| 1249 | - return _callSuper(this, _default, arguments); | |
| 2886 | + return _super.apply(this, arguments); | |
| 1250 | 2887 | } |
| 1251 | - (0, _inherits2.default)(_default, _Marionette$ItemView); | |
| 1252 | - return (0, _createClass2.default)(_default, [{ | |
| 2888 | + (0, _createClass2.default)(_default, [{ | |
| 1253 | 2889 | key: "getTemplate", |
| 1254 | 2890 | value: function getTemplate() { |
| 1255 | 2891 | return '#tmpl-elementor-templates-modal__header__logo'; |
| 1256 | 2892 | } |
| @@ -1281,9 +2917,11 @@ | ||
| 1281 | 2917 | clickCallback(); |
| 1282 | 2918 | } |
| 1283 | 2919 | } |
| 1284 | 2920 | }]); |
| 2921 | + return _default; | |
| 1285 | 2922 | }(Marionette.ItemView); |
| 2923 | +exports["default"] = _default; | |
| 1286 | 2924 | |
| 1287 | 2925 | /***/ }), |
| 1288 | 2926 | |
| 1289 | 2927 | /***/ "../modules/web-cli/assets/js/modules/command-base.js": |
| @@ -1301,25 +2939,26 @@ | ||
| 1301 | 2939 | })); |
| 1302 | 2940 | exports["default"] = void 0; |
| 1303 | 2941 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1304 | 2942 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2943 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1305 | 2944 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1306 | 2945 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1307 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1308 | 2946 | var _commandInfra = _interopRequireDefault(__webpack_require__(/*! ./command-infra */ "../modules/web-cli/assets/js/modules/command-infra.js")); |
| 1309 | 2947 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 1310 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1311 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2948 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 2949 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1312 | 2950 | /** |
| 1313 | 2951 | * @name $e.modules.CommandBase |
| 1314 | 2952 | */ |
| 1315 | -var CommandBase = exports["default"] = /*#__PURE__*/function (_CommandInfra) { | |
| 2953 | +var CommandBase = /*#__PURE__*/function (_CommandInfra) { | |
| 2954 | + (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 2955 | + var _super = _createSuper(CommandBase); | |
| 1316 | 2956 | function CommandBase() { |
| 1317 | 2957 | (0, _classCallCheck2.default)(this, CommandBase); |
| 1318 | - return _callSuper(this, CommandBase, arguments); | |
| 2958 | + return _super.apply(this, arguments); | |
| 1319 | 2959 | } |
| 1320 | - (0, _inherits2.default)(CommandBase, _CommandInfra); | |
| 1321 | - return (0, _createClass2.default)(CommandBase, [{ | |
| 2960 | + (0, _createClass2.default)(CommandBase, [{ | |
| 1322 | 2961 | key: "onBeforeRun", |
| 1323 | 2962 | value: function onBeforeRun() { |
| 1324 | 2963 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1325 | 2964 | $e.hooks.runUIBefore(this.command, args); |
| @@ -1341,9 +2980,9 @@ | ||
| 1341 | 2980 | key: "onAfterApply", |
| 1342 | 2981 | value: function onAfterApply() { |
| 1343 | 2982 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1344 | 2983 | var result = arguments.length > 1 ? arguments[1] : undefined; |
| 1345 | - return $e.hooks.runDataAfter(this.command, args, result); | |
| 2984 | + $e.hooks.runDataAfter(this.command, args, result); | |
| 1346 | 2985 | } |
| 1347 | 2986 | }, { |
| 1348 | 2987 | key: "onCatchApply", |
| 1349 | 2988 | value: function onCatchApply(e) { |
| @@ -1369,9 +3008,8 @@ | ||
| 1369 | 3008 | * |
| 1370 | 3009 | * Validate `arg.container` & `arg.containers`. |
| 1371 | 3010 | * |
| 1372 | 3011 | * @param {{}} args |
| 1373 | - * @deprecated since 3.7.0, extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase` instead. | |
| 1374 | 3012 | * |
| 1375 | 3013 | * @throws {Error} |
| 1376 | 3014 | */ |
| 1377 | 3015 | }, { |
| @@ -1378,9 +3016,9 @@ | ||
| 1378 | 3016 | key: "requireContainer", |
| 1379 | 3017 | value: function requireContainer() { |
| 1380 | 3018 | var _this = this; |
| 1381 | 3019 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.args; |
| 1382 | - _deprecation.default.deprecated('requireContainer()', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 3020 | + _deprecation.default.deprecated('requireContainer', '3.7.0', 'Extend `$e.modules.editor.CommandContainerBase` or `$e.modules.editor.CommandContainerInternalBase`'); | |
| 1383 | 3021 | if (!args.container && !args.containers) { |
| 1384 | 3022 | throw Error('container or containers are required.'); |
| 1385 | 3023 | } |
| 1386 | 3024 | if (args.container && args.containers) { |
| @@ -1398,9 +3036,11 @@ | ||
| 1398 | 3036 | value: function getInstanceType() { |
| 1399 | 3037 | return 'CommandBase'; |
| 1400 | 3038 | } |
| 1401 | 3039 | }]); |
| 3040 | + return CommandBase; | |
| 1402 | 3041 | }(_commandInfra.default); |
| 3042 | +exports["default"] = CommandBase; | |
| 1403 | 3043 | |
| 1404 | 3044 | /***/ }), |
| 1405 | 3045 | |
| 1406 | 3046 | /***/ "../modules/web-cli/assets/js/modules/command-callback-base.js": |
| @@ -1418,24 +3058,25 @@ | ||
| 1418 | 3058 | })); |
| 1419 | 3059 | exports["default"] = void 0; |
| 1420 | 3060 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1421 | 3061 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3062 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1422 | 3063 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1423 | 3064 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1424 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1425 | 3065 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! ./command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 1426 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1427 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3066 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3067 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1428 | 3068 | /** |
| 1429 | 3069 | * To support pure callbacks in the API(commands.js), to ensure they have registered with the proper context. |
| 1430 | 3070 | */ |
| 1431 | -var CommandCallbackBase = exports["default"] = /*#__PURE__*/function (_CommandBase) { | |
| 3071 | +var CommandCallbackBase = /*#__PURE__*/function (_CommandBase) { | |
| 3072 | + (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 3073 | + var _super = _createSuper(CommandCallbackBase); | |
| 1432 | 3074 | function CommandCallbackBase() { |
| 1433 | 3075 | (0, _classCallCheck2.default)(this, CommandCallbackBase); |
| 1434 | - return _callSuper(this, CommandCallbackBase, arguments); | |
| 3076 | + return _super.apply(this, arguments); | |
| 1435 | 3077 | } |
| 1436 | - (0, _inherits2.default)(CommandCallbackBase, _CommandBase); | |
| 1437 | - return (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 3078 | + (0, _createClass2.default)(CommandCallbackBase, [{ | |
| 1438 | 3079 | key: "apply", |
| 1439 | 3080 | value: function apply() { |
| 1440 | 3081 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1441 | 3082 | return this.constructor.getCallback()(args); |
| @@ -1458,9 +3099,11 @@ | ||
| 1458 | 3099 | value: function getCallback() { |
| 1459 | 3100 | return this.registerConfig.callback; |
| 1460 | 3101 | } |
| 1461 | 3102 | }]); |
| 3103 | + return CommandCallbackBase; | |
| 1462 | 3104 | }(_commandBase.default); |
| 3105 | +exports["default"] = CommandCallbackBase; | |
| 1463 | 3106 | |
| 1464 | 3107 | /***/ }), |
| 1465 | 3108 | |
| 1466 | 3109 | /***/ "../modules/web-cli/assets/js/modules/command-infra.js": |
| @@ -1478,20 +3121,22 @@ | ||
| 1478 | 3121 | })); |
| 1479 | 3122 | exports["default"] = void 0; |
| 1480 | 3123 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1481 | 3124 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3125 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1482 | 3126 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1483 | 3127 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1484 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1485 | 3128 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1486 | 3129 | var _argsObject = _interopRequireDefault(__webpack_require__(/*! elementor-assets-js/modules/imports/args-object */ "../assets/dev/js/modules/imports/args-object.js")); |
| 1487 | 3130 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 1488 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1489 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3131 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3132 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1490 | 3133 | /** |
| 1491 | 3134 | * @typedef {import('../modules/component-base')} ComponentBase |
| 1492 | 3135 | */ |
| 1493 | -var CommandInfra = exports["default"] = /*#__PURE__*/function (_ArgsObject) { | |
| 3136 | +var CommandInfra = /*#__PURE__*/function (_ArgsObject) { | |
| 3137 | + (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 3138 | + var _super = _createSuper(CommandInfra); | |
| 1494 | 3139 | /** |
| 1495 | 3140 | * Function constructor(). |
| 1496 | 3141 | * |
| 1497 | 3142 | * Create Commands Base. |
| @@ -1501,9 +3146,9 @@ | ||
| 1501 | 3146 | function CommandInfra() { |
| 1502 | 3147 | var _this; |
| 1503 | 3148 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1504 | 3149 | (0, _classCallCheck2.default)(this, CommandInfra); |
| 1505 | - _this = _callSuper(this, CommandInfra, [args]); | |
| 3150 | + _this = _super.call(this, args); | |
| 1506 | 3151 | if (!_this.constructor.registerConfig) { |
| 1507 | 3152 | throw RangeError('Doing it wrong: Each command type should have `registerConfig`.'); |
| 1508 | 3153 | } |
| 1509 | 3154 | |
| @@ -1530,15 +3175,12 @@ | ||
| 1530 | 3175 | * Initialize command, called after construction. |
| 1531 | 3176 | * |
| 1532 | 3177 | * @param {{}} args |
| 1533 | 3178 | */ |
| 1534 | - (0, _inherits2.default)(CommandInfra, _ArgsObject); | |
| 1535 | - return (0, _createClass2.default)(CommandInfra, [{ | |
| 3179 | + (0, _createClass2.default)(CommandInfra, [{ | |
| 1536 | 3180 | key: "currentCommand", |
| 1537 | 3181 | get: |
| 1538 | - /** | |
| 1539 | - * @deprecated since 3.7.0, use `this.command` instead. | |
| 1540 | - */ | |
| 3182 | + // TODO - Remove backwards compatibility. | |
| 1541 | 3183 | function get() { |
| 1542 | 3184 | _deprecation.default.deprecated('this.currentCommand', '3.7.0', 'this.command'); |
| 1543 | 3185 | return this.command; |
| 1544 | 3186 | } |
| @@ -1659,9 +3301,14 @@ | ||
| 1659 | 3301 | key: "onCatchApply", |
| 1660 | 3302 | value: function onCatchApply(e) {} // eslint-disable-line no-unused-vars |
| 1661 | 3303 | }], [{ |
| 1662 | 3304 | key: "getInstanceType", |
| 1663 | - value: function getInstanceType() { | |
| 3305 | + value: | |
| 3306 | + /** | |
| 3307 | + * @type {Object} | |
| 3308 | + */ | |
| 3309 | + | |
| 3310 | + function getInstanceType() { | |
| 1664 | 3311 | return 'CommandInfra'; |
| 1665 | 3312 | } |
| 1666 | 3313 | |
| 1667 | 3314 | /** |
| @@ -1697,12 +3344,11 @@ | ||
| 1697 | 3344 | value: function setRegisterConfig(config) { |
| 1698 | 3345 | this.registerConfig = Object.freeze(config); |
| 1699 | 3346 | } |
| 1700 | 3347 | }]); |
| 3348 | + return CommandInfra; | |
| 1701 | 3349 | }(_argsObject.default); |
| 1702 | -/** | |
| 1703 | - * @type {Object} | |
| 1704 | - */ | |
| 3350 | +exports["default"] = CommandInfra; | |
| 1705 | 3351 | (0, _defineProperty2.default)(CommandInfra, "registerConfig", null); |
| 1706 | 3352 | |
| 1707 | 3353 | /***/ }), |
| 1708 | 3354 | |
| @@ -1721,28 +3367,32 @@ | ||
| 1721 | 3367 | })); |
| 1722 | 3368 | exports["default"] = exports.Close = void 0; |
| 1723 | 3369 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1724 | 3370 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3371 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1725 | 3372 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1726 | 3373 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1727 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1728 | 3374 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 1729 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1730 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1731 | -var Close = exports.Close = /*#__PURE__*/function (_CommandBase) { | |
| 3375 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3376 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 3377 | +var Close = /*#__PURE__*/function (_CommandBase) { | |
| 3378 | + (0, _inherits2.default)(Close, _CommandBase); | |
| 3379 | + var _super = _createSuper(Close); | |
| 1732 | 3380 | function Close() { |
| 1733 | 3381 | (0, _classCallCheck2.default)(this, Close); |
| 1734 | - return _callSuper(this, Close, arguments); | |
| 3382 | + return _super.apply(this, arguments); | |
| 1735 | 3383 | } |
| 1736 | - (0, _inherits2.default)(Close, _CommandBase); | |
| 1737 | - return (0, _createClass2.default)(Close, [{ | |
| 3384 | + (0, _createClass2.default)(Close, [{ | |
| 1738 | 3385 | key: "apply", |
| 1739 | 3386 | value: function apply() { |
| 1740 | 3387 | this.component.close(); |
| 1741 | 3388 | } |
| 1742 | 3389 | }]); |
| 3390 | + return Close; | |
| 1743 | 3391 | }(_commandBase.default); |
| 1744 | -var _default = exports["default"] = Close; | |
| 3392 | +exports.Close = Close; | |
| 3393 | +var _default = Close; | |
| 3394 | +exports["default"] = _default; | |
| 1745 | 3395 | |
| 1746 | 3396 | /***/ }), |
| 1747 | 3397 | |
| 1748 | 3398 | /***/ "../modules/web-cli/assets/js/modules/commands/index.js": |
| @@ -1796,28 +3446,32 @@ | ||
| 1796 | 3446 | })); |
| 1797 | 3447 | exports["default"] = exports.Open = void 0; |
| 1798 | 3448 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1799 | 3449 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3450 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1800 | 3451 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1801 | 3452 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1802 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1803 | 3453 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 1804 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1805 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1806 | -var Open = exports.Open = /*#__PURE__*/function (_CommandBase) { | |
| 3454 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3455 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 3456 | +var Open = /*#__PURE__*/function (_CommandBase) { | |
| 3457 | + (0, _inherits2.default)(Open, _CommandBase); | |
| 3458 | + var _super = _createSuper(Open); | |
| 1807 | 3459 | function Open() { |
| 1808 | 3460 | (0, _classCallCheck2.default)(this, Open); |
| 1809 | - return _callSuper(this, Open, arguments); | |
| 3461 | + return _super.apply(this, arguments); | |
| 1810 | 3462 | } |
| 1811 | - (0, _inherits2.default)(Open, _CommandBase); | |
| 1812 | - return (0, _createClass2.default)(Open, [{ | |
| 3463 | + (0, _createClass2.default)(Open, [{ | |
| 1813 | 3464 | key: "apply", |
| 1814 | 3465 | value: function apply() { |
| 1815 | 3466 | $e.route(this.component.getNamespace()); |
| 1816 | 3467 | } |
| 1817 | 3468 | }]); |
| 3469 | + return Open; | |
| 1818 | 3470 | }(_commandBase.default); |
| 1819 | -var _default = exports["default"] = Open; | |
| 3471 | +exports.Open = Open; | |
| 3472 | +var _default = Open; | |
| 3473 | +exports["default"] = _default; | |
| 1820 | 3474 | |
| 1821 | 3475 | /***/ }), |
| 1822 | 3476 | |
| 1823 | 3477 | /***/ "../modules/web-cli/assets/js/modules/commands/toggle.js": |
| @@ -1835,21 +3489,22 @@ | ||
| 1835 | 3489 | })); |
| 1836 | 3490 | exports["default"] = exports.Toggle = void 0; |
| 1837 | 3491 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1838 | 3492 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3493 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1839 | 3494 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1840 | 3495 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1841 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1842 | 3496 | var _commandBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/command-base */ "../modules/web-cli/assets/js/modules/command-base.js")); |
| 1843 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1844 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1845 | -var Toggle = exports.Toggle = /*#__PURE__*/function (_CommandBase) { | |
| 3497 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3498 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 3499 | +var Toggle = /*#__PURE__*/function (_CommandBase) { | |
| 3500 | + (0, _inherits2.default)(Toggle, _CommandBase); | |
| 3501 | + var _super = _createSuper(Toggle); | |
| 1846 | 3502 | function Toggle() { |
| 1847 | 3503 | (0, _classCallCheck2.default)(this, Toggle); |
| 1848 | - return _callSuper(this, Toggle, arguments); | |
| 3504 | + return _super.apply(this, arguments); | |
| 1849 | 3505 | } |
| 1850 | - (0, _inherits2.default)(Toggle, _CommandBase); | |
| 1851 | - return (0, _createClass2.default)(Toggle, [{ | |
| 3506 | + (0, _createClass2.default)(Toggle, [{ | |
| 1852 | 3507 | key: "apply", |
| 1853 | 3508 | value: function apply() { |
| 1854 | 3509 | if (this.component.isOpen) { |
| 1855 | 3510 | this.component.close(); |
| @@ -1857,10 +3512,13 @@ | ||
| 1857 | 3512 | $e.route(this.component.getNamespace()); |
| 1858 | 3513 | } |
| 1859 | 3514 | } |
| 1860 | 3515 | }]); |
| 3516 | + return Toggle; | |
| 1861 | 3517 | }(_commandBase.default); |
| 1862 | -var _default = exports["default"] = Toggle; | |
| 3518 | +exports.Toggle = Toggle; | |
| 3519 | +var _default = Toggle; | |
| 3520 | +exports["default"] = _default; | |
| 1863 | 3521 | |
| 1864 | 3522 | /***/ }), |
| 1865 | 3523 | |
| 1866 | 3524 | /***/ "../modules/web-cli/assets/js/modules/component-base.js": |
| @@ -1880,32 +3538,33 @@ | ||
| 1880 | 3538 | var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); |
| 1881 | 3539 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 1882 | 3540 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 1883 | 3541 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 3542 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1884 | 3543 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 1885 | 3544 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 1886 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1887 | 3545 | 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"); | |
| 3546 | +var _toolkit = __webpack_require__(/*! @reduxjs/toolkit */ "../node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); | |
| 1889 | 3547 | var _module = _interopRequireDefault(__webpack_require__(/*! elementor/assets/dev/js/modules/imports/module.js */ "../assets/dev/js/modules/imports/module.js")); |
| 1890 | 3548 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 1891 | 3549 | var _deprecation = _interopRequireDefault(__webpack_require__(/*! elementor-api/utils/deprecation */ "../modules/web-cli/assets/js/utils/deprecation.js")); |
| 1892 | -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; } | |
| 1893 | -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; } | |
| 1894 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1895 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 3550 | +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | |
| 3551 | +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | |
| 3552 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 3553 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 1896 | 3554 | /** |
| 1897 | 3555 | * @typedef {import('./command-infra')} CommandInfra |
| 1898 | 3556 | * @typedef {import('./hook-base')} HookBase |
| 1899 | 3557 | * @typedef {import('../core/states/ui-state-base')} UiStateBase |
| 1900 | 3558 | */ |
| 1901 | -var ComponentBase = exports["default"] = /*#__PURE__*/function (_Module) { | |
| 3559 | +var ComponentBase = /*#__PURE__*/function (_Module) { | |
| 3560 | + (0, _inherits2.default)(ComponentBase, _Module); | |
| 3561 | + var _super = _createSuper(ComponentBase); | |
| 1902 | 3562 | function ComponentBase() { |
| 1903 | 3563 | (0, _classCallCheck2.default)(this, ComponentBase); |
| 1904 | - return _callSuper(this, ComponentBase, arguments); | |
| 3564 | + return _super.apply(this, arguments); | |
| 1905 | 3565 | } |
| 1906 | - (0, _inherits2.default)(ComponentBase, _Module); | |
| 1907 | - return (0, _createClass2.default)(ComponentBase, [{ | |
| 3566 | + (0, _createClass2.default)(ComponentBase, [{ | |
| 1908 | 3567 | key: "__construct", |
| 1909 | 3568 | value: function __construct() { |
| 1910 | 3569 | var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 1911 | 3570 | if (args.manager) { |
| @@ -1961,11 +3620,11 @@ | ||
| 1961 | 3620 | Object.values(this.getUiStates()).forEach(function (instance) { |
| 1962 | 3621 | return _this.registerUiState(instance); |
| 1963 | 3622 | }); |
| 1964 | 3623 | Object.entries(this.getStates()).forEach(function (_ref9) { |
| 1965 | - var _ref0 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 1966 | - id = _ref0[0], | |
| 1967 | - state = _ref0[1]; | |
| 3624 | + var _ref10 = (0, _slicedToArray2.default)(_ref9, 2), | |
| 3625 | + id = _ref10[0], | |
| 3626 | + state = _ref10[1]; | |
| 1968 | 3627 | return _this.registerState(id, state); |
| 1969 | 3628 | }); |
| 1970 | 3629 | } |
| 1971 | 3630 | |
| @@ -1977,12 +3636,8 @@ | ||
| 1977 | 3636 | key: "getNamespace", |
| 1978 | 3637 | value: function getNamespace() { |
| 1979 | 3638 | (0, _forceMethodImplementation.default)(); |
| 1980 | 3639 | } |
| 1981 | - | |
| 1982 | - /** | |
| 1983 | - * @deprecated since 3.7.0, use `getServiceName()` instead. | |
| 1984 | - */ | |
| 1985 | 3640 | }, { |
| 1986 | 3641 | key: "getRootContainer", |
| 1987 | 3642 | value: function getRootContainer() { |
| 1988 | 3643 | _deprecation.default.deprecated('getRootContainer()', '3.7.0', 'getServiceName()'); |
| @@ -2156,13 +3811,14 @@ | ||
| 2156 | 3811 | registerConfig.callback = context; |
| 2157 | 3812 | |
| 2158 | 3813 | // Unique class. |
| 2159 | 3814 | context = /*#__PURE__*/function (_CommandCallbackBase) { |
| 3815 | + (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 3816 | + var _super2 = _createSuper(context); | |
| 2160 | 3817 | function context() { |
| 2161 | 3818 | (0, _classCallCheck2.default)(this, context); |
| 2162 | - return _callSuper(this, context, arguments); | |
| 3819 | + return _super2.apply(this, arguments); | |
| 2163 | 3820 | } |
| 2164 | - (0, _inherits2.default)(context, _CommandCallbackBase); | |
| 2165 | 3821 | return (0, _createClass2.default)(context); |
| 2166 | 3822 | }(_commandCallbackBase.default); |
| 2167 | 3823 | } |
| 2168 | 3824 | context.setRegisterConfig(registerConfig); |
| @@ -2346,8 +4002,9 @@ | ||
| 2346 | 4002 | }, { |
| 2347 | 4003 | key: "activateTab", |
| 2348 | 4004 | value: function activateTab(tab, args) { |
| 2349 | 4005 | var _this4 = this; |
| 4006 | + this.currentTab = tab; | |
| 2350 | 4007 | this.renderTab(tab, args); |
| 2351 | 4008 | jQuery(this.getTabsWrapperSelector() + ' .elementor-component-tab').off('click').on('click', function (event) { |
| 2352 | 4009 | $e.route(_this4.getTabRoute(event.currentTarget.dataset.tab), args); |
| 2353 | 4010 | }).removeClass('elementor-active').filter('[data-tab="' + tab + '"]').addClass('elementor-active'); |
| @@ -2387,12 +4044,12 @@ | ||
| 2387 | 4044 | var _this5 = this; |
| 2388 | 4045 | var commands = {}; |
| 2389 | 4046 | |
| 2390 | 4047 | // Convert `Commands` to `ComponentBase` workable format. |
| 2391 | - Object.entries(commandsFromImport).forEach(function (_ref1) { | |
| 2392 | - var _ref10 = (0, _slicedToArray2.default)(_ref1, 2), | |
| 2393 | - className = _ref10[0], | |
| 2394 | - Class = _ref10[1]; | |
| 4048 | + Object.entries(commandsFromImport).forEach(function (_ref11) { | |
| 4049 | + var _ref12 = (0, _slicedToArray2.default)(_ref11, 2), | |
| 4050 | + className = _ref12[0], | |
| 4051 | + Class = _ref12[1]; | |
| 2395 | 4052 | var command = _this5.normalizeCommandName(className); |
| 2396 | 4053 | commands[command] = Class; |
| 2397 | 4054 | }); |
| 2398 | 4055 | return commands; |
| @@ -2452,9 +4109,11 @@ | ||
| 2452 | 4109 | value: function toggleHistoryClass() { |
| 2453 | 4110 | document.body.classList.toggle('e-routes-has-history', !!$e.routes.getHistory(this.getServiceName()).length); |
| 2454 | 4111 | } |
| 2455 | 4112 | }]); |
| 4113 | + return ComponentBase; | |
| 2456 | 4114 | }(_module.default); |
| 4115 | +exports["default"] = ComponentBase; | |
| 2457 | 4116 | |
| 2458 | 4117 | /***/ }), |
| 2459 | 4118 | |
| 2460 | 4119 | /***/ "../modules/web-cli/assets/js/modules/component-modal-base.js": |
| @@ -2471,33 +4130,33 @@ | ||
| 2471 | 4130 | Object.defineProperty(exports, "__esModule", ({ |
| 2472 | 4131 | value: true |
| 2473 | 4132 | })); |
| 2474 | 4133 | exports["default"] = void 0; |
| 2475 | -var _readOnlyError2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/readOnlyError */ "../node_modules/@babel/runtime/helpers/readOnlyError.js")); | |
| 2476 | 4134 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2477 | 4135 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 4136 | +var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 4137 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2478 | 4138 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2479 | 4139 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2480 | -var _get2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/get */ "../node_modules/@babel/runtime/helpers/get.js")); | |
| 2481 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2482 | 4140 | var _componentBase = _interopRequireDefault(__webpack_require__(/*! ./component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 2483 | 4141 | var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/web-cli/assets/js/modules/commands/index.js")); |
| 2484 | 4142 | var _forceMethodImplementation = _interopRequireDefault(__webpack_require__(/*! ../utils/force-method-implementation */ "../modules/web-cli/assets/js/utils/force-method-implementation.js")); |
| 2485 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 2486 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2487 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2488 | -function _superPropGet(t, o, e, r) { var p = (0, _get2.default)((0, _getPrototypeOf2.default)(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; } | |
| 2489 | -var ComponentModalBase = exports["default"] = /*#__PURE__*/function (_ComponentBase) { | |
| 4143 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 4144 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 4145 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 4146 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 4147 | +var ComponentModalBase = /*#__PURE__*/function (_ComponentBase) { | |
| 4148 | + (0, _inherits2.default)(ComponentModalBase, _ComponentBase); | |
| 4149 | + var _super = _createSuper(ComponentModalBase); | |
| 2490 | 4150 | function ComponentModalBase() { |
| 2491 | 4151 | (0, _classCallCheck2.default)(this, ComponentModalBase); |
| 2492 | - return _callSuper(this, ComponentModalBase, arguments); | |
| 4152 | + return _super.apply(this, arguments); | |
| 2493 | 4153 | } |
| 2494 | - (0, _inherits2.default)(ComponentModalBase, _ComponentBase); | |
| 2495 | - return (0, _createClass2.default)(ComponentModalBase, [{ | |
| 4154 | + (0, _createClass2.default)(ComponentModalBase, [{ | |
| 2496 | 4155 | key: "registerAPI", |
| 2497 | 4156 | value: function registerAPI() { |
| 2498 | 4157 | var _this = this; |
| 2499 | - _superPropGet(ComponentModalBase, "registerAPI", this, 3)([]); | |
| 4158 | + (0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "registerAPI", this).call(this); | |
| 2500 | 4159 | $e.shortcuts.register('esc', { |
| 2501 | 4160 | scopes: [this.getNamespace()], |
| 2502 | 4161 | callback: function callback() { |
| 2503 | 4162 | return _this.close(); |
| @@ -2534,13 +4193,12 @@ | ||
| 2534 | 4193 | } |
| 2535 | 4194 | }, { |
| 2536 | 4195 | key: "close", |
| 2537 | 4196 | value: function close() { |
| 2538 | - if (!_superPropGet(ComponentModalBase, "close", this, 3)([])) { | |
| 4197 | + if (!(0, _get2.default)((0, _getPrototypeOf2.default)(ComponentModalBase.prototype), "close", this).call(this)) { | |
| 2539 | 4198 | return false; |
| 2540 | 4199 | } |
| 2541 | - var close = elementor.hooks.applyFilters('component/modal/close', this.layout.getModal().hide.bind(this.layout.getModal()), this); | |
| 2542 | - close(); | |
| 4200 | + this.layout.getModal().hide(); | |
| 2543 | 4201 | return true; |
| 2544 | 4202 | } |
| 2545 | 4203 | }, { |
| 2546 | 4204 | key: "getModalLayout", |
| @@ -2547,9 +4205,11 @@ | ||
| 2547 | 4205 | value: function getModalLayout() { |
| 2548 | 4206 | (0, _forceMethodImplementation.default)(); |
| 2549 | 4207 | } |
| 2550 | 4208 | }]); |
| 4209 | + return ComponentModalBase; | |
| 2551 | 4210 | }(_componentBase.default); |
| 4211 | +exports["default"] = ComponentModalBase; | |
| 2552 | 4212 | |
| 2553 | 4213 | /***/ }), |
| 2554 | 4214 | |
| 2555 | 4215 | /***/ "../modules/web-cli/assets/js/modules/hook-break.js": |
| @@ -2567,22 +4227,24 @@ | ||
| 2567 | 4227 | })); |
| 2568 | 4228 | exports["default"] = void 0; |
| 2569 | 4229 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2570 | 4230 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4231 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2571 | 4232 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2572 | 4233 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2573 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2574 | 4234 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 2575 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2576 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 2577 | -var HookBreak = exports["default"] = /*#__PURE__*/function (_Error) { | |
| 4235 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 4236 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 4237 | +var HookBreak = /*#__PURE__*/function (_Error) { | |
| 4238 | + (0, _inherits2.default)(HookBreak, _Error); | |
| 4239 | + var _super = _createSuper(HookBreak); | |
| 2578 | 4240 | function HookBreak() { |
| 2579 | 4241 | (0, _classCallCheck2.default)(this, HookBreak); |
| 2580 | - return _callSuper(this, HookBreak, ['HookBreak']); | |
| 4242 | + return _super.call(this, 'HookBreak'); | |
| 2581 | 4243 | } |
| 2582 | - (0, _inherits2.default)(HookBreak, _Error); | |
| 2583 | 4244 | return (0, _createClass2.default)(HookBreak); |
| 2584 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 4245 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 4246 | +exports["default"] = HookBreak; | |
| 2585 | 4247 | |
| 2586 | 4248 | /***/ }), |
| 2587 | 4249 | |
| 2588 | 4250 | /***/ "../modules/web-cli/assets/js/utils/console.js": |
| @@ -2600,13 +4262,13 @@ | ||
| 2600 | 4262 | })); |
| 2601 | 4263 | exports["default"] = void 0; |
| 2602 | 4264 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 2603 | 4265 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2604 | -var Console = exports["default"] = /*#__PURE__*/function () { | |
| 4266 | +var Console = /*#__PURE__*/function () { | |
| 2605 | 4267 | function Console() { |
| 2606 | 4268 | (0, _classCallCheck2.default)(this, Console); |
| 2607 | 4269 | } |
| 2608 | - return (0, _createClass2.default)(Console, null, [{ | |
| 4270 | + (0, _createClass2.default)(Console, null, [{ | |
| 2609 | 4271 | key: "error", |
| 2610 | 4272 | value: function error(message) { |
| 2611 | 4273 | // Show an error if devTools is available. |
| 2612 | 4274 | if ($e.devTools) { |
| @@ -2630,9 +4292,11 @@ | ||
| 2630 | 4292 | args.unshift('%c %c', style, ''); |
| 2631 | 4293 | (_console = console).warn.apply(_console, args); // eslint-disable-line no-console |
| 2632 | 4294 | } |
| 2633 | 4295 | }]); |
| 4296 | + return Console; | |
| 2634 | 4297 | }(); |
| 4298 | +exports["default"] = Console; | |
| 2635 | 4299 | |
| 2636 | 4300 | /***/ }), |
| 2637 | 4301 | |
| 2638 | 4302 | /***/ "../modules/web-cli/assets/js/utils/deprecation.js": |
| @@ -2676,13 +4340,13 @@ | ||
| 2676 | 4340 | message += " - Use `".concat(replacement, "` instead"); |
| 2677 | 4341 | } |
| 2678 | 4342 | _console.default.warn(message); |
| 2679 | 4343 | }; |
| 2680 | -var Deprecation = exports["default"] = /*#__PURE__*/function () { | |
| 4344 | +var Deprecation = /*#__PURE__*/function () { | |
| 2681 | 4345 | function Deprecation() { |
| 2682 | 4346 | (0, _classCallCheck2.default)(this, Deprecation); |
| 2683 | 4347 | } |
| 2684 | - return (0, _createClass2.default)(Deprecation, null, [{ | |
| 4348 | + (0, _createClass2.default)(Deprecation, null, [{ | |
| 2685 | 4349 | key: "deprecated", |
| 2686 | 4350 | value: function deprecated(name, version, replacement) { |
| 2687 | 4351 | if (this.isHardDeprecated(version)) { |
| 2688 | 4352 | hardDeprecated(name, version, replacement); |
| @@ -2777,9 +4441,11 @@ | ||
| 2777 | 4441 | var total = this.compareVersion(version, elementorWebCliConfig.version); |
| 2778 | 4442 | return total < 0 || total >= 8; |
| 2779 | 4443 | } |
| 2780 | 4444 | }]); |
| 4445 | + return Deprecation; | |
| 2781 | 4446 | }(); |
| 4447 | +exports["default"] = Deprecation; | |
| 2782 | 4448 | |
| 2783 | 4449 | /***/ }), |
| 2784 | 4450 | |
| 2785 | 4451 | /***/ "../modules/web-cli/assets/js/utils/force-method-implementation.js": |
| @@ -2797,28 +4463,31 @@ | ||
| 2797 | 4463 | })); |
| 2798 | 4464 | exports["default"] = exports.ForceMethodImplementation = void 0; |
| 2799 | 4465 | var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); |
| 2800 | 4466 | var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); |
| 4467 | +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js")); | |
| 4468 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2801 | 4469 | var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); |
| 2802 | 4470 | var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); |
| 2803 | -var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 2804 | 4471 | var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ "../node_modules/@babel/runtime/helpers/wrapNativeSuper.js")); |
| 2805 | -function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 2806 | -function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 4472 | +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } | |
| 4473 | +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | |
| 2807 | 4474 | // TODO: Copied from `assets/dev/js/modules/imports/force-method-implementation.js`; |
| 2808 | -var ForceMethodImplementation = exports.ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 4475 | +var ForceMethodImplementation = /*#__PURE__*/function (_Error) { | |
| 4476 | + (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 4477 | + var _super = _createSuper(ForceMethodImplementation); | |
| 2809 | 4478 | function ForceMethodImplementation() { |
| 2810 | 4479 | var _this; |
| 2811 | 4480 | var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
| 2812 | 4481 | (0, _classCallCheck2.default)(this, ForceMethodImplementation); |
| 2813 | - _this = _callSuper(this, ForceMethodImplementation, ["".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")]); | |
| 2814 | - Error.captureStackTrace(_this, ForceMethodImplementation); | |
| 4482 | + _this = _super.call(this, "".concat(info.isStatic ? 'static ' : '').concat(info.fullName, "() should be implemented, please provide '").concat(info.functionName || info.fullName, "' functionality.")); | |
| 4483 | + Error.captureStackTrace((0, _assertThisInitialized2.default)(_this), ForceMethodImplementation); | |
| 2815 | 4484 | return _this; |
| 2816 | 4485 | } |
| 2817 | - (0, _inherits2.default)(ForceMethodImplementation, _Error); | |
| 2818 | 4486 | return (0, _createClass2.default)(ForceMethodImplementation); |
| 2819 | -}(/*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 2820 | -var _default = exports["default"] = function _default() { | |
| 4487 | +}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); | |
| 4488 | +exports.ForceMethodImplementation = ForceMethodImplementation; | |
| 4489 | +var _default = function _default() { | |
| 2821 | 4490 | var stack = Error().stack, |
| 2822 | 4491 | caller = stack.split('\n')[2].trim(), |
| 2823 | 4492 | callerName = caller.startsWith('at new') ? 'constructor' : caller.split(' ')[1], |
| 2824 | 4493 | info = {}; |
| @@ -2832,11 +4501,1108 @@ | ||
| 2832 | 4501 | info.isStatic = true; |
| 2833 | 4502 | } |
| 2834 | 4503 | throw new ForceMethodImplementation(info); |
| 2835 | 4504 | }; |
| 4505 | +exports["default"] = _default; | |
| 2836 | 4506 | |
| 2837 | 4507 | /***/ }), |
| 2838 | 4508 | |
| 4509 | +/***/ "../node_modules/redux-thunk/es/index.js": | |
| 4510 | +/*!***********************************************!*\ | |
| 4511 | + !*** ../node_modules/redux-thunk/es/index.js ***! | |
| 4512 | + \***********************************************/ | |
| 4513 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4514 | + | |
| 4515 | +"use strict"; | |
| 4516 | +__webpack_require__.r(__webpack_exports__); | |
| 4517 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4518 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) | |
| 4519 | +/* harmony export */ }); | |
| 4520 | +/** A function that accepts a potential "extra argument" value to be injected later, | |
| 4521 | + * and returns an instance of the thunk middleware that uses that value | |
| 4522 | + */ | |
| 4523 | +function createThunkMiddleware(extraArgument) { | |
| 4524 | + // Standard Redux middleware definition pattern: | |
| 4525 | + // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware | |
| 4526 | + var middleware = function middleware(_ref) { | |
| 4527 | + var dispatch = _ref.dispatch, | |
| 4528 | + getState = _ref.getState; | |
| 4529 | + return function (next) { | |
| 4530 | + return function (action) { | |
| 4531 | + // The thunk middleware looks for any functions that were passed to `store.dispatch`. | |
| 4532 | + // If this "action" is really a function, call it and return the result. | |
| 4533 | + if (typeof action === 'function') { | |
| 4534 | + // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" | |
| 4535 | + return action(dispatch, getState, extraArgument); | |
| 4536 | + } // Otherwise, pass the action down the middleware chain as usual | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + return next(action); | |
| 4540 | + }; | |
| 4541 | + }; | |
| 4542 | + }; | |
| 4543 | + | |
| 4544 | + return middleware; | |
| 4545 | +} | |
| 4546 | + | |
| 4547 | +var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version | |
| 4548 | +// with whatever "extra arg" they want to inject into their thunks | |
| 4549 | + | |
| 4550 | +thunk.withExtraArgument = createThunkMiddleware; | |
| 4551 | +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); | |
| 4552 | + | |
| 4553 | +/***/ }), | |
| 4554 | + | |
| 4555 | +/***/ "../node_modules/redux/es/redux.js": | |
| 4556 | +/*!*****************************************!*\ | |
| 4557 | + !*** ../node_modules/redux/es/redux.js ***! | |
| 4558 | + \*****************************************/ | |
| 4559 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 4560 | + | |
| 4561 | +"use strict"; | |
| 4562 | +__webpack_require__.r(__webpack_exports__); | |
| 4563 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 4564 | +/* harmony export */ "__DO_NOT_USE__ActionTypes": () => (/* binding */ ActionTypes), | |
| 4565 | +/* harmony export */ "applyMiddleware": () => (/* binding */ applyMiddleware), | |
| 4566 | +/* harmony export */ "bindActionCreators": () => (/* binding */ bindActionCreators), | |
| 4567 | +/* harmony export */ "combineReducers": () => (/* binding */ combineReducers), | |
| 4568 | +/* harmony export */ "compose": () => (/* binding */ compose), | |
| 4569 | +/* harmony export */ "createStore": () => (/* binding */ createStore), | |
| 4570 | +/* harmony export */ "legacy_createStore": () => (/* binding */ legacy_createStore) | |
| 4571 | +/* harmony export */ }); | |
| 4572 | +/* 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"); | |
| 4573 | + | |
| 4574 | + | |
| 4575 | +/** | |
| 4576 | + * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js | |
| 4577 | + * | |
| 4578 | + * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes | |
| 4579 | + * during build. | |
| 4580 | + * @param {number} code | |
| 4581 | + */ | |
| 4582 | +function formatProdErrorMessage(code) { | |
| 4583 | + 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. '; | |
| 4584 | +} | |
| 4585 | + | |
| 4586 | +// Inlined version of the `symbol-observable` polyfill | |
| 4587 | +var $$observable = (function () { | |
| 4588 | + return typeof Symbol === 'function' && Symbol.observable || '@@observable'; | |
| 4589 | +})(); | |
| 4590 | + | |
| 4591 | +/** | |
| 4592 | + * These are private action types reserved by Redux. | |
| 4593 | + * For any unknown actions, you must return the current state. | |
| 4594 | + * If the current state is undefined, you must return the initial state. | |
| 4595 | + * Do not reference these action types directly in your code. | |
| 4596 | + */ | |
| 4597 | +var randomString = function randomString() { | |
| 4598 | + return Math.random().toString(36).substring(7).split('').join('.'); | |
| 4599 | +}; | |
| 4600 | + | |
| 4601 | +var ActionTypes = { | |
| 4602 | + INIT: "@@redux/INIT" + randomString(), | |
| 4603 | + REPLACE: "@@redux/REPLACE" + randomString(), | |
| 4604 | + PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { | |
| 4605 | + return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); | |
| 4606 | + } | |
| 4607 | +}; | |
| 4608 | + | |
| 4609 | +/** | |
| 4610 | + * @param {any} obj The object to inspect. | |
| 4611 | + * @returns {boolean} True if the argument appears to be a plain object. | |
| 4612 | + */ | |
| 4613 | +function isPlainObject(obj) { | |
| 4614 | + if (typeof obj !== 'object' || obj === null) return false; | |
| 4615 | + var proto = obj; | |
| 4616 | + | |
| 4617 | + while (Object.getPrototypeOf(proto) !== null) { | |
| 4618 | + proto = Object.getPrototypeOf(proto); | |
| 4619 | + } | |
| 4620 | + | |
| 4621 | + return Object.getPrototypeOf(obj) === proto; | |
| 4622 | +} | |
| 4623 | + | |
| 4624 | +// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of | |
| 4625 | +function miniKindOf(val) { | |
| 4626 | + if (val === void 0) return 'undefined'; | |
| 4627 | + if (val === null) return 'null'; | |
| 4628 | + var type = typeof val; | |
| 4629 | + | |
| 4630 | + switch (type) { | |
| 4631 | + case 'boolean': | |
| 4632 | + case 'string': | |
| 4633 | + case 'number': | |
| 4634 | + case 'symbol': | |
| 4635 | + case 'function': | |
| 4636 | + { | |
| 4637 | + return type; | |
| 4638 | + } | |
| 4639 | + } | |
| 4640 | + | |
| 4641 | + if (Array.isArray(val)) return 'array'; | |
| 4642 | + if (isDate(val)) return 'date'; | |
| 4643 | + if (isError(val)) return 'error'; | |
| 4644 | + var constructorName = ctorName(val); | |
| 4645 | + | |
| 4646 | + switch (constructorName) { | |
| 4647 | + case 'Symbol': | |
| 4648 | + case 'Promise': | |
| 4649 | + case 'WeakMap': | |
| 4650 | + case 'WeakSet': | |
| 4651 | + case 'Map': | |
| 4652 | + case 'Set': | |
| 4653 | + return constructorName; | |
| 4654 | + } // other | |
| 4655 | + | |
| 4656 | + | |
| 4657 | + return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); | |
| 4658 | +} | |
| 4659 | + | |
| 4660 | +function ctorName(val) { | |
| 4661 | + return typeof val.constructor === 'function' ? val.constructor.name : null; | |
| 4662 | +} | |
| 4663 | + | |
| 4664 | +function isError(val) { | |
| 4665 | + return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; | |
| 4666 | +} | |
| 4667 | + | |
| 4668 | +function isDate(val) { | |
| 4669 | + if (val instanceof Date) return true; | |
| 4670 | + return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; | |
| 4671 | +} | |
| 4672 | + | |
| 4673 | +function kindOf(val) { | |
| 4674 | + var typeOfVal = typeof val; | |
| 4675 | + | |
| 4676 | + if (true) { | |
| 4677 | + typeOfVal = miniKindOf(val); | |
| 4678 | + } | |
| 4679 | + | |
| 4680 | + return typeOfVal; | |
| 4681 | +} | |
| 4682 | + | |
| 4683 | +/** | |
| 4684 | + * @deprecated | |
| 4685 | + * | |
| 4686 | + * **We recommend using the `configureStore` method | |
| 4687 | + * of the `@reduxjs/toolkit` package**, which replaces `createStore`. | |
| 4688 | + * | |
| 4689 | + * Redux Toolkit is our recommended approach for writing Redux logic today, | |
| 4690 | + * including store setup, reducers, data fetching, and more. | |
| 4691 | + * | |
| 4692 | + * **For more details, please read this Redux docs page:** | |
| 4693 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 4694 | + * | |
| 4695 | + * `configureStore` from Redux Toolkit is an improved version of `createStore` that | |
| 4696 | + * simplifies setup and helps avoid common bugs. | |
| 4697 | + * | |
| 4698 | + * You should not be using the `redux` core package by itself today, except for learning purposes. | |
| 4699 | + * The `createStore` method from the core `redux` package will not be removed, but we encourage | |
| 4700 | + * all users to migrate to using Redux Toolkit for all Redux code. | |
| 4701 | + * | |
| 4702 | + * If you want to use `createStore` without this visual deprecation warning, use | |
| 4703 | + * the `legacy_createStore` import instead: | |
| 4704 | + * | |
| 4705 | + * `import { legacy_createStore as createStore} from 'redux'` | |
| 4706 | + * | |
| 4707 | + */ | |
| 4708 | + | |
| 4709 | +function createStore(reducer, preloadedState, enhancer) { | |
| 4710 | + var _ref2; | |
| 4711 | + | |
| 4712 | + if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { | |
| 4713 | + 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.'); | |
| 4714 | + } | |
| 4715 | + | |
| 4716 | + if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
| 4717 | + enhancer = preloadedState; | |
| 4718 | + preloadedState = undefined; | |
| 4719 | + } | |
| 4720 | + | |
| 4721 | + if (typeof enhancer !== 'undefined') { | |
| 4722 | + if (typeof enhancer !== 'function') { | |
| 4723 | + throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); | |
| 4724 | + } | |
| 4725 | + | |
| 4726 | + return enhancer(createStore)(reducer, preloadedState); | |
| 4727 | + } | |
| 4728 | + | |
| 4729 | + if (typeof reducer !== 'function') { | |
| 4730 | + throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); | |
| 4731 | + } | |
| 4732 | + | |
| 4733 | + var currentReducer = reducer; | |
| 4734 | + var currentState = preloadedState; | |
| 4735 | + var currentListeners = []; | |
| 4736 | + var nextListeners = currentListeners; | |
| 4737 | + var isDispatching = false; | |
| 4738 | + /** | |
| 4739 | + * This makes a shallow copy of currentListeners so we can use | |
| 4740 | + * nextListeners as a temporary list while dispatching. | |
| 4741 | + * | |
| 4742 | + * This prevents any bugs around consumers calling | |
| 4743 | + * subscribe/unsubscribe in the middle of a dispatch. | |
| 4744 | + */ | |
| 4745 | + | |
| 4746 | + function ensureCanMutateNextListeners() { | |
| 4747 | + if (nextListeners === currentListeners) { | |
| 4748 | + nextListeners = currentListeners.slice(); | |
| 4749 | + } | |
| 4750 | + } | |
| 4751 | + /** | |
| 4752 | + * Reads the state tree managed by the store. | |
| 4753 | + * | |
| 4754 | + * @returns {any} The current state tree of your application. | |
| 4755 | + */ | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + function getState() { | |
| 4759 | + if (isDispatching) { | |
| 4760 | + 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.'); | |
| 4761 | + } | |
| 4762 | + | |
| 4763 | + return currentState; | |
| 4764 | + } | |
| 4765 | + /** | |
| 4766 | + * Adds a change listener. It will be called any time an action is dispatched, | |
| 4767 | + * and some part of the state tree may potentially have changed. You may then | |
| 4768 | + * call `getState()` to read the current state tree inside the callback. | |
| 4769 | + * | |
| 4770 | + * You may call `dispatch()` from a change listener, with the following | |
| 4771 | + * caveats: | |
| 4772 | + * | |
| 4773 | + * 1. The subscriptions are snapshotted just before every `dispatch()` call. | |
| 4774 | + * If you subscribe or unsubscribe while the listeners are being invoked, this | |
| 4775 | + * will not have any effect on the `dispatch()` that is currently in progress. | |
| 4776 | + * However, the next `dispatch()` call, whether nested or not, will use a more | |
| 4777 | + * recent snapshot of the subscription list. | |
| 4778 | + * | |
| 4779 | + * 2. The listener should not expect to see all state changes, as the state | |
| 4780 | + * might have been updated multiple times during a nested `dispatch()` before | |
| 4781 | + * the listener is called. It is, however, guaranteed that all subscribers | |
| 4782 | + * registered before the `dispatch()` started will be called with the latest | |
| 4783 | + * state by the time it exits. | |
| 4784 | + * | |
| 4785 | + * @param {Function} listener A callback to be invoked on every dispatch. | |
| 4786 | + * @returns {Function} A function to remove this change listener. | |
| 4787 | + */ | |
| 4788 | + | |
| 4789 | + | |
| 4790 | + function subscribe(listener) { | |
| 4791 | + if (typeof listener !== 'function') { | |
| 4792 | + throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); | |
| 4793 | + } | |
| 4794 | + | |
| 4795 | + if (isDispatching) { | |
| 4796 | + 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.'); | |
| 4797 | + } | |
| 4798 | + | |
| 4799 | + var isSubscribed = true; | |
| 4800 | + ensureCanMutateNextListeners(); | |
| 4801 | + nextListeners.push(listener); | |
| 4802 | + return function unsubscribe() { | |
| 4803 | + if (!isSubscribed) { | |
| 4804 | + return; | |
| 4805 | + } | |
| 4806 | + | |
| 4807 | + if (isDispatching) { | |
| 4808 | + 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.'); | |
| 4809 | + } | |
| 4810 | + | |
| 4811 | + isSubscribed = false; | |
| 4812 | + ensureCanMutateNextListeners(); | |
| 4813 | + var index = nextListeners.indexOf(listener); | |
| 4814 | + nextListeners.splice(index, 1); | |
| 4815 | + currentListeners = null; | |
| 4816 | + }; | |
| 4817 | + } | |
| 4818 | + /** | |
| 4819 | + * Dispatches an action. It is the only way to trigger a state change. | |
| 4820 | + * | |
| 4821 | + * The `reducer` function, used to create the store, will be called with the | |
| 4822 | + * current state tree and the given `action`. Its return value will | |
| 4823 | + * be considered the **next** state of the tree, and the change listeners | |
| 4824 | + * will be notified. | |
| 4825 | + * | |
| 4826 | + * The base implementation only supports plain object actions. If you want to | |
| 4827 | + * dispatch a Promise, an Observable, a thunk, or something else, you need to | |
| 4828 | + * wrap your store creating function into the corresponding middleware. For | |
| 4829 | + * example, see the documentation for the `redux-thunk` package. Even the | |
| 4830 | + * middleware will eventually dispatch plain object actions using this method. | |
| 4831 | + * | |
| 4832 | + * @param {Object} action A plain object representing “what changed”. It is | |
| 4833 | + * a good idea to keep actions serializable so you can record and replay user | |
| 4834 | + * sessions, or use the time travelling `redux-devtools`. An action must have | |
| 4835 | + * a `type` property which may not be `undefined`. It is a good idea to use | |
| 4836 | + * string constants for action types. | |
| 4837 | + * | |
| 4838 | + * @returns {Object} For convenience, the same action object you dispatched. | |
| 4839 | + * | |
| 4840 | + * Note that, if you use a custom middleware, it may wrap `dispatch()` to | |
| 4841 | + * return something else (for example, a Promise you can await). | |
| 4842 | + */ | |
| 4843 | + | |
| 4844 | + | |
| 4845 | + function dispatch(action) { | |
| 4846 | + if (!isPlainObject(action)) { | |
| 4847 | + 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."); | |
| 4848 | + } | |
| 4849 | + | |
| 4850 | + if (typeof action.type === 'undefined') { | |
| 4851 | + throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); | |
| 4852 | + } | |
| 4853 | + | |
| 4854 | + if (isDispatching) { | |
| 4855 | + throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); | |
| 4856 | + } | |
| 4857 | + | |
| 4858 | + try { | |
| 4859 | + isDispatching = true; | |
| 4860 | + currentState = currentReducer(currentState, action); | |
| 4861 | + } finally { | |
| 4862 | + isDispatching = false; | |
| 4863 | + } | |
| 4864 | + | |
| 4865 | + var listeners = currentListeners = nextListeners; | |
| 4866 | + | |
| 4867 | + for (var i = 0; i < listeners.length; i++) { | |
| 4868 | + var listener = listeners[i]; | |
| 4869 | + listener(); | |
| 4870 | + } | |
| 4871 | + | |
| 4872 | + return action; | |
| 4873 | + } | |
| 4874 | + /** | |
| 4875 | + * Replaces the reducer currently used by the store to calculate the state. | |
| 4876 | + * | |
| 4877 | + * You might need this if your app implements code splitting and you want to | |
| 4878 | + * load some of the reducers dynamically. You might also need this if you | |
| 4879 | + * implement a hot reloading mechanism for Redux. | |
| 4880 | + * | |
| 4881 | + * @param {Function} nextReducer The reducer for the store to use instead. | |
| 4882 | + * @returns {void} | |
| 4883 | + */ | |
| 4884 | + | |
| 4885 | + | |
| 4886 | + function replaceReducer(nextReducer) { | |
| 4887 | + if (typeof nextReducer !== 'function') { | |
| 4888 | + throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); | |
| 4889 | + } | |
| 4890 | + | |
| 4891 | + currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. | |
| 4892 | + // Any reducers that existed in both the new and old rootReducer | |
| 4893 | + // will receive the previous state. This effectively populates | |
| 4894 | + // the new state tree with any relevant data from the old one. | |
| 4895 | + | |
| 4896 | + dispatch({ | |
| 4897 | + type: ActionTypes.REPLACE | |
| 4898 | + }); | |
| 4899 | + } | |
| 4900 | + /** | |
| 4901 | + * Interoperability point for observable/reactive libraries. | |
| 4902 | + * @returns {observable} A minimal observable of state changes. | |
| 4903 | + * For more information, see the observable proposal: | |
| 4904 | + * https://github.com/tc39/proposal-observable | |
| 4905 | + */ | |
| 4906 | + | |
| 4907 | + | |
| 4908 | + function observable() { | |
| 4909 | + var _ref; | |
| 4910 | + | |
| 4911 | + var outerSubscribe = subscribe; | |
| 4912 | + return _ref = { | |
| 4913 | + /** | |
| 4914 | + * The minimal observable subscription method. | |
| 4915 | + * @param {Object} observer Any object that can be used as an observer. | |
| 4916 | + * The observer object should have a `next` method. | |
| 4917 | + * @returns {subscription} An object with an `unsubscribe` method that can | |
| 4918 | + * be used to unsubscribe the observable from the store, and prevent further | |
| 4919 | + * emission of values from the observable. | |
| 4920 | + */ | |
| 4921 | + subscribe: function subscribe(observer) { | |
| 4922 | + if (typeof observer !== 'object' || observer === null) { | |
| 4923 | + throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); | |
| 4924 | + } | |
| 4925 | + | |
| 4926 | + function observeState() { | |
| 4927 | + if (observer.next) { | |
| 4928 | + observer.next(getState()); | |
| 4929 | + } | |
| 4930 | + } | |
| 4931 | + | |
| 4932 | + observeState(); | |
| 4933 | + var unsubscribe = outerSubscribe(observeState); | |
| 4934 | + return { | |
| 4935 | + unsubscribe: unsubscribe | |
| 4936 | + }; | |
| 4937 | + } | |
| 4938 | + }, _ref[$$observable] = function () { | |
| 4939 | + return this; | |
| 4940 | + }, _ref; | |
| 4941 | + } // When a store is created, an "INIT" action is dispatched so that every | |
| 4942 | + // reducer returns their initial state. This effectively populates | |
| 4943 | + // the initial state tree. | |
| 4944 | + | |
| 4945 | + | |
| 4946 | + dispatch({ | |
| 4947 | + type: ActionTypes.INIT | |
| 4948 | + }); | |
| 4949 | + return _ref2 = { | |
| 4950 | + dispatch: dispatch, | |
| 4951 | + subscribe: subscribe, | |
| 4952 | + getState: getState, | |
| 4953 | + replaceReducer: replaceReducer | |
| 4954 | + }, _ref2[$$observable] = observable, _ref2; | |
| 4955 | +} | |
| 4956 | +/** | |
| 4957 | + * Creates a Redux store that holds the state tree. | |
| 4958 | + * | |
| 4959 | + * **We recommend using `configureStore` from the | |
| 4960 | + * `@reduxjs/toolkit` package**, which replaces `createStore`: | |
| 4961 | + * **https://redux.js.org/introduction/why-rtk-is-redux-today** | |
| 4962 | + * | |
| 4963 | + * The only way to change the data in the store is to call `dispatch()` on it. | |
| 4964 | + * | |
| 4965 | + * There should only be a single store in your app. To specify how different | |
| 4966 | + * parts of the state tree respond to actions, you may combine several reducers | |
| 4967 | + * into a single reducer function by using `combineReducers`. | |
| 4968 | + * | |
| 4969 | + * @param {Function} reducer A function that returns the next state tree, given | |
| 4970 | + * the current state tree and the action to handle. | |
| 4971 | + * | |
| 4972 | + * @param {any} [preloadedState] The initial state. You may optionally specify it | |
| 4973 | + * to hydrate the state from the server in universal apps, or to restore a | |
| 4974 | + * previously serialized user session. | |
| 4975 | + * If you use `combineReducers` to produce the root reducer function, this must be | |
| 4976 | + * an object with the same shape as `combineReducers` keys. | |
| 4977 | + * | |
| 4978 | + * @param {Function} [enhancer] The store enhancer. You may optionally specify it | |
| 4979 | + * to enhance the store with third-party capabilities such as middleware, | |
| 4980 | + * time travel, persistence, etc. The only store enhancer that ships with Redux | |
| 4981 | + * is `applyMiddleware()`. | |
| 4982 | + * | |
| 4983 | + * @returns {Store} A Redux store that lets you read the state, dispatch actions | |
| 4984 | + * and subscribe to changes. | |
| 4985 | + */ | |
| 4986 | + | |
| 4987 | +var legacy_createStore = createStore; | |
| 4988 | + | |
| 4989 | +/** | |
| 4990 | + * Prints a warning in the console if it exists. | |
| 4991 | + * | |
| 4992 | + * @param {String} message The warning message. | |
| 4993 | + * @returns {void} | |
| 4994 | + */ | |
| 4995 | +function warning(message) { | |
| 4996 | + /* eslint-disable no-console */ | |
| 4997 | + if (typeof console !== 'undefined' && typeof console.error === 'function') { | |
| 4998 | + console.error(message); | |
| 4999 | + } | |
| 5000 | + /* eslint-enable no-console */ | |
| 5001 | + | |
| 5002 | + | |
| 5003 | + try { | |
| 5004 | + // This error was thrown as a convenience so that if you enable | |
| 5005 | + // "break on all exceptions" in your console, | |
| 5006 | + // it would pause the execution at this line. | |
| 5007 | + throw new Error(message); | |
| 5008 | + } catch (e) {} // eslint-disable-line no-empty | |
| 5009 | + | |
| 5010 | +} | |
| 5011 | + | |
| 5012 | +function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { | |
| 5013 | + var reducerKeys = Object.keys(reducers); | |
| 5014 | + var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; | |
| 5015 | + | |
| 5016 | + if (reducerKeys.length === 0) { | |
| 5017 | + return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; | |
| 5018 | + } | |
| 5019 | + | |
| 5020 | + if (!isPlainObject(inputState)) { | |
| 5021 | + return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); | |
| 5022 | + } | |
| 5023 | + | |
| 5024 | + var unexpectedKeys = Object.keys(inputState).filter(function (key) { | |
| 5025 | + return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; | |
| 5026 | + }); | |
| 5027 | + unexpectedKeys.forEach(function (key) { | |
| 5028 | + unexpectedKeyCache[key] = true; | |
| 5029 | + }); | |
| 5030 | + if (action && action.type === ActionTypes.REPLACE) return; | |
| 5031 | + | |
| 5032 | + if (unexpectedKeys.length > 0) { | |
| 5033 | + 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."); | |
| 5034 | + } | |
| 5035 | +} | |
| 5036 | + | |
| 5037 | +function assertReducerShape(reducers) { | |
| 5038 | + Object.keys(reducers).forEach(function (key) { | |
| 5039 | + var reducer = reducers[key]; | |
| 5040 | + var initialState = reducer(undefined, { | |
| 5041 | + type: ActionTypes.INIT | |
| 5042 | + }); | |
| 5043 | + | |
| 5044 | + if (typeof initialState === 'undefined') { | |
| 5045 | + 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."); | |
| 5046 | + } | |
| 5047 | + | |
| 5048 | + if (typeof reducer(undefined, { | |
| 5049 | + type: ActionTypes.PROBE_UNKNOWN_ACTION() | |
| 5050 | + }) === 'undefined') { | |
| 5051 | + 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."); | |
| 5052 | + } | |
| 5053 | + }); | |
| 5054 | +} | |
| 5055 | +/** | |
| 5056 | + * Turns an object whose values are different reducer functions, into a single | |
| 5057 | + * reducer function. It will call every child reducer, and gather their results | |
| 5058 | + * into a single state object, whose keys correspond to the keys of the passed | |
| 5059 | + * reducer functions. | |
| 5060 | + * | |
| 5061 | + * @param {Object} reducers An object whose values correspond to different | |
| 5062 | + * reducer functions that need to be combined into one. One handy way to obtain | |
| 5063 | + * it is to use ES6 `import * as reducers` syntax. The reducers may never return | |
| 5064 | + * undefined for any action. Instead, they should return their initial state | |
| 5065 | + * if the state passed to them was undefined, and the current state for any | |
| 5066 | + * unrecognized action. | |
| 5067 | + * | |
| 5068 | + * @returns {Function} A reducer function that invokes every reducer inside the | |
| 5069 | + * passed object, and builds a state object with the same shape. | |
| 5070 | + */ | |
| 5071 | + | |
| 5072 | + | |
| 5073 | +function combineReducers(reducers) { | |
| 5074 | + var reducerKeys = Object.keys(reducers); | |
| 5075 | + var finalReducers = {}; | |
| 5076 | + | |
| 5077 | + for (var i = 0; i < reducerKeys.length; i++) { | |
| 5078 | + var key = reducerKeys[i]; | |
| 5079 | + | |
| 5080 | + if (true) { | |
| 5081 | + if (typeof reducers[key] === 'undefined') { | |
| 5082 | + warning("No reducer provided for key \"" + key + "\""); | |
| 5083 | + } | |
| 5084 | + } | |
| 5085 | + | |
| 5086 | + if (typeof reducers[key] === 'function') { | |
| 5087 | + finalReducers[key] = reducers[key]; | |
| 5088 | + } | |
| 5089 | + } | |
| 5090 | + | |
| 5091 | + var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same | |
| 5092 | + // keys multiple times. | |
| 5093 | + | |
| 5094 | + var unexpectedKeyCache; | |
| 5095 | + | |
| 5096 | + if (true) { | |
| 5097 | + unexpectedKeyCache = {}; | |
| 5098 | + } | |
| 5099 | + | |
| 5100 | + var shapeAssertionError; | |
| 5101 | + | |
| 5102 | + try { | |
| 5103 | + assertReducerShape(finalReducers); | |
| 5104 | + } catch (e) { | |
| 5105 | + shapeAssertionError = e; | |
| 5106 | + } | |
| 5107 | + | |
| 5108 | + return function combination(state, action) { | |
| 5109 | + if (state === void 0) { | |
| 5110 | + state = {}; | |
| 5111 | + } | |
| 5112 | + | |
| 5113 | + if (shapeAssertionError) { | |
| 5114 | + throw shapeAssertionError; | |
| 5115 | + } | |
| 5116 | + | |
| 5117 | + if (true) { | |
| 5118 | + var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); | |
| 5119 | + | |
| 5120 | + if (warningMessage) { | |
| 5121 | + warning(warningMessage); | |
| 5122 | + } | |
| 5123 | + } | |
| 5124 | + | |
| 5125 | + var hasChanged = false; | |
| 5126 | + var nextState = {}; | |
| 5127 | + | |
| 5128 | + for (var _i = 0; _i < finalReducerKeys.length; _i++) { | |
| 5129 | + var _key = finalReducerKeys[_i]; | |
| 5130 | + var reducer = finalReducers[_key]; | |
| 5131 | + var previousStateForKey = state[_key]; | |
| 5132 | + var nextStateForKey = reducer(previousStateForKey, action); | |
| 5133 | + | |
| 5134 | + if (typeof nextStateForKey === 'undefined') { | |
| 5135 | + var actionType = action && action.type; | |
| 5136 | + 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."); | |
| 5137 | + } | |
| 5138 | + | |
| 5139 | + nextState[_key] = nextStateForKey; | |
| 5140 | + hasChanged = hasChanged || nextStateForKey !== previousStateForKey; | |
| 5141 | + } | |
| 5142 | + | |
| 5143 | + hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; | |
| 5144 | + return hasChanged ? nextState : state; | |
| 5145 | + }; | |
| 5146 | +} | |
| 5147 | + | |
| 5148 | +function bindActionCreator(actionCreator, dispatch) { | |
| 5149 | + return function () { | |
| 5150 | + return dispatch(actionCreator.apply(this, arguments)); | |
| 5151 | + }; | |
| 5152 | +} | |
| 5153 | +/** | |
| 5154 | + * Turns an object whose values are action creators, into an object with the | |
| 5155 | + * same keys, but with every function wrapped into a `dispatch` call so they | |
| 5156 | + * may be invoked directly. This is just a convenience method, as you can call | |
| 5157 | + * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. | |
| 5158 | + * | |
| 5159 | + * For convenience, you can also pass an action creator as the first argument, | |
| 5160 | + * and get a dispatch wrapped function in return. | |
| 5161 | + * | |
| 5162 | + * @param {Function|Object} actionCreators An object whose values are action | |
| 5163 | + * creator functions. One handy way to obtain it is to use ES6 `import * as` | |
| 5164 | + * syntax. You may also pass a single function. | |
| 5165 | + * | |
| 5166 | + * @param {Function} dispatch The `dispatch` function available on your Redux | |
| 5167 | + * store. | |
| 5168 | + * | |
| 5169 | + * @returns {Function|Object} The object mimicking the original object, but with | |
| 5170 | + * every action creator wrapped into the `dispatch` call. If you passed a | |
| 5171 | + * function as `actionCreators`, the return value will also be a single | |
| 5172 | + * function. | |
| 5173 | + */ | |
| 5174 | + | |
| 5175 | + | |
| 5176 | +function bindActionCreators(actionCreators, dispatch) { | |
| 5177 | + if (typeof actionCreators === 'function') { | |
| 5178 | + return bindActionCreator(actionCreators, dispatch); | |
| 5179 | + } | |
| 5180 | + | |
| 5181 | + if (typeof actionCreators !== 'object' || actionCreators === null) { | |
| 5182 | + 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\"?"); | |
| 5183 | + } | |
| 5184 | + | |
| 5185 | + var boundActionCreators = {}; | |
| 5186 | + | |
| 5187 | + for (var key in actionCreators) { | |
| 5188 | + var actionCreator = actionCreators[key]; | |
| 5189 | + | |
| 5190 | + if (typeof actionCreator === 'function') { | |
| 5191 | + boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); | |
| 5192 | + } | |
| 5193 | + } | |
| 5194 | + | |
| 5195 | + return boundActionCreators; | |
| 5196 | +} | |
| 5197 | + | |
| 5198 | +/** | |
| 5199 | + * Composes single-argument functions from right to left. The rightmost | |
| 5200 | + * function can take multiple arguments as it provides the signature for | |
| 5201 | + * the resulting composite function. | |
| 5202 | + * | |
| 5203 | + * @param {...Function} funcs The functions to compose. | |
| 5204 | + * @returns {Function} A function obtained by composing the argument functions | |
| 5205 | + * from right to left. For example, compose(f, g, h) is identical to doing | |
| 5206 | + * (...args) => f(g(h(...args))). | |
| 5207 | + */ | |
| 5208 | +function compose() { | |
| 5209 | + for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 5210 | + funcs[_key] = arguments[_key]; | |
| 5211 | + } | |
| 5212 | + | |
| 5213 | + if (funcs.length === 0) { | |
| 5214 | + return function (arg) { | |
| 5215 | + return arg; | |
| 5216 | + }; | |
| 5217 | + } | |
| 5218 | + | |
| 5219 | + if (funcs.length === 1) { | |
| 5220 | + return funcs[0]; | |
| 5221 | + } | |
| 5222 | + | |
| 5223 | + return funcs.reduce(function (a, b) { | |
| 5224 | + return function () { | |
| 5225 | + return a(b.apply(void 0, arguments)); | |
| 5226 | + }; | |
| 5227 | + }); | |
| 5228 | +} | |
| 5229 | + | |
| 5230 | +/** | |
| 5231 | + * Creates a store enhancer that applies middleware to the dispatch method | |
| 5232 | + * of the Redux store. This is handy for a variety of tasks, such as expressing | |
| 5233 | + * asynchronous actions in a concise manner, or logging every action payload. | |
| 5234 | + * | |
| 5235 | + * See `redux-thunk` package as an example of the Redux middleware. | |
| 5236 | + * | |
| 5237 | + * Because middleware is potentially asynchronous, this should be the first | |
| 5238 | + * store enhancer in the composition chain. | |
| 5239 | + * | |
| 5240 | + * Note that each middleware will be given the `dispatch` and `getState` functions | |
| 5241 | + * as named arguments. | |
| 5242 | + * | |
| 5243 | + * @param {...Function} middlewares The middleware chain to be applied. | |
| 5244 | + * @returns {Function} A store enhancer applying the middleware. | |
| 5245 | + */ | |
| 5246 | + | |
| 5247 | +function applyMiddleware() { | |
| 5248 | + for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { | |
| 5249 | + middlewares[_key] = arguments[_key]; | |
| 5250 | + } | |
| 5251 | + | |
| 5252 | + return function (createStore) { | |
| 5253 | + return function () { | |
| 5254 | + var store = createStore.apply(void 0, arguments); | |
| 5255 | + | |
| 5256 | + var _dispatch = function dispatch() { | |
| 5257 | + throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); | |
| 5258 | + }; | |
| 5259 | + | |
| 5260 | + var middlewareAPI = { | |
| 5261 | + getState: store.getState, | |
| 5262 | + dispatch: function dispatch() { | |
| 5263 | + return _dispatch.apply(void 0, arguments); | |
| 5264 | + } | |
| 5265 | + }; | |
| 5266 | + var chain = middlewares.map(function (middleware) { | |
| 5267 | + return middleware(middlewareAPI); | |
| 5268 | + }); | |
| 5269 | + _dispatch = compose.apply(void 0, chain)(store.dispatch); | |
| 5270 | + return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { | |
| 5271 | + dispatch: _dispatch | |
| 5272 | + }); | |
| 5273 | + }; | |
| 5274 | + }; | |
| 5275 | +} | |
| 5276 | + | |
| 5277 | +/* | |
| 5278 | + * This is a dummy function to check if the function name has been altered by minification. | |
| 5279 | + * If the function has been minified and NODE_ENV !== 'production', warn the user. | |
| 5280 | + */ | |
| 5281 | + | |
| 5282 | +function isCrushed() {} | |
| 5283 | + | |
| 5284 | +if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { | |
| 5285 | + warning('You are currently using minified code outside of NODE_ENV === "production". ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' + 'to ensure you have the correct code for your production build.'); | |
| 5286 | +} | |
| 5287 | + | |
| 5288 | + | |
| 5289 | + | |
| 5290 | + | |
| 5291 | +/***/ }), | |
| 5292 | + | |
| 5293 | +/***/ "../node_modules/reselect/es/defaultMemoize.js": | |
| 5294 | +/*!*****************************************************!*\ | |
| 5295 | + !*** ../node_modules/reselect/es/defaultMemoize.js ***! | |
| 5296 | + \*****************************************************/ | |
| 5297 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 5298 | + | |
| 5299 | +"use strict"; | |
| 5300 | +__webpack_require__.r(__webpack_exports__); | |
| 5301 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5302 | +/* harmony export */ "createCacheKeyComparator": () => (/* binding */ createCacheKeyComparator), | |
| 5303 | +/* harmony export */ "defaultEqualityCheck": () => (/* binding */ defaultEqualityCheck), | |
| 5304 | +/* harmony export */ "defaultMemoize": () => (/* binding */ defaultMemoize) | |
| 5305 | +/* harmony export */ }); | |
| 5306 | +// Cache implementation based on Erik Rasmussen's `lru-memoize`: | |
| 5307 | +// https://github.com/erikras/lru-memoize | |
| 5308 | +var NOT_FOUND = 'NOT_FOUND'; | |
| 5309 | + | |
| 5310 | +function createSingletonCache(equals) { | |
| 5311 | + var entry; | |
| 5312 | + return { | |
| 5313 | + get: function get(key) { | |
| 5314 | + if (entry && equals(entry.key, key)) { | |
| 5315 | + return entry.value; | |
| 5316 | + } | |
| 5317 | + | |
| 5318 | + return NOT_FOUND; | |
| 5319 | + }, | |
| 5320 | + put: function put(key, value) { | |
| 5321 | + entry = { | |
| 5322 | + key: key, | |
| 5323 | + value: value | |
| 5324 | + }; | |
| 5325 | + }, | |
| 5326 | + getEntries: function getEntries() { | |
| 5327 | + return entry ? [entry] : []; | |
| 5328 | + }, | |
| 5329 | + clear: function clear() { | |
| 5330 | + entry = undefined; | |
| 5331 | + } | |
| 5332 | + }; | |
| 5333 | +} | |
| 5334 | + | |
| 5335 | +function createLruCache(maxSize, equals) { | |
| 5336 | + var entries = []; | |
| 5337 | + | |
| 5338 | + function get(key) { | |
| 5339 | + var cacheIndex = entries.findIndex(function (entry) { | |
| 5340 | + return equals(key, entry.key); | |
| 5341 | + }); // We found a cached entry | |
| 5342 | + | |
| 5343 | + if (cacheIndex > -1) { | |
| 5344 | + var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top | |
| 5345 | + | |
| 5346 | + if (cacheIndex > 0) { | |
| 5347 | + entries.splice(cacheIndex, 1); | |
| 5348 | + entries.unshift(entry); | |
| 5349 | + } | |
| 5350 | + | |
| 5351 | + return entry.value; | |
| 5352 | + } // No entry found in cache, return sentinel | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + return NOT_FOUND; | |
| 5356 | + } | |
| 5357 | + | |
| 5358 | + function put(key, value) { | |
| 5359 | + if (get(key) === NOT_FOUND) { | |
| 5360 | + // TODO Is unshift slow? | |
| 5361 | + entries.unshift({ | |
| 5362 | + key: key, | |
| 5363 | + value: value | |
| 5364 | + }); | |
| 5365 | + | |
| 5366 | + if (entries.length > maxSize) { | |
| 5367 | + entries.pop(); | |
| 5368 | + } | |
| 5369 | + } | |
| 5370 | + } | |
| 5371 | + | |
| 5372 | + function getEntries() { | |
| 5373 | + return entries; | |
| 5374 | + } | |
| 5375 | + | |
| 5376 | + function clear() { | |
| 5377 | + entries = []; | |
| 5378 | + } | |
| 5379 | + | |
| 5380 | + return { | |
| 5381 | + get: get, | |
| 5382 | + put: put, | |
| 5383 | + getEntries: getEntries, | |
| 5384 | + clear: clear | |
| 5385 | + }; | |
| 5386 | +} | |
| 5387 | + | |
| 5388 | +var defaultEqualityCheck = function defaultEqualityCheck(a, b) { | |
| 5389 | + return a === b; | |
| 5390 | +}; | |
| 5391 | +function createCacheKeyComparator(equalityCheck) { | |
| 5392 | + return function areArgumentsShallowlyEqual(prev, next) { | |
| 5393 | + if (prev === null || next === null || prev.length !== next.length) { | |
| 5394 | + return false; | |
| 5395 | + } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. | |
| 5396 | + | |
| 5397 | + | |
| 5398 | + var length = prev.length; | |
| 5399 | + | |
| 5400 | + for (var i = 0; i < length; i++) { | |
| 5401 | + if (!equalityCheck(prev[i], next[i])) { | |
| 5402 | + return false; | |
| 5403 | + } | |
| 5404 | + } | |
| 5405 | + | |
| 5406 | + return true; | |
| 5407 | + }; | |
| 5408 | +} | |
| 5409 | +// defaultMemoize now supports a configurable cache size with LRU behavior, | |
| 5410 | +// and optional comparison of the result value with existing values | |
| 5411 | +function defaultMemoize(func, equalityCheckOrOptions) { | |
| 5412 | + var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { | |
| 5413 | + equalityCheck: equalityCheckOrOptions | |
| 5414 | + }; | |
| 5415 | + var _providedOptions$equa = providedOptions.equalityCheck, | |
| 5416 | + equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, | |
| 5417 | + _providedOptions$maxS = providedOptions.maxSize, | |
| 5418 | + maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, | |
| 5419 | + resultEqualityCheck = providedOptions.resultEqualityCheck; | |
| 5420 | + var comparator = createCacheKeyComparator(equalityCheck); | |
| 5421 | + var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons | |
| 5422 | + | |
| 5423 | + function memoized() { | |
| 5424 | + var value = cache.get(arguments); | |
| 5425 | + | |
| 5426 | + if (value === NOT_FOUND) { | |
| 5427 | + // @ts-ignore | |
| 5428 | + value = func.apply(null, arguments); | |
| 5429 | + | |
| 5430 | + if (resultEqualityCheck) { | |
| 5431 | + var entries = cache.getEntries(); | |
| 5432 | + var matchingEntry = entries.find(function (entry) { | |
| 5433 | + return resultEqualityCheck(entry.value, value); | |
| 5434 | + }); | |
| 5435 | + | |
| 5436 | + if (matchingEntry) { | |
| 5437 | + value = matchingEntry.value; | |
| 5438 | + } | |
| 5439 | + } | |
| 5440 | + | |
| 5441 | + cache.put(arguments, value); | |
| 5442 | + } | |
| 5443 | + | |
| 5444 | + return value; | |
| 5445 | + } | |
| 5446 | + | |
| 5447 | + memoized.clearCache = function () { | |
| 5448 | + return cache.clear(); | |
| 5449 | + }; | |
| 5450 | + | |
| 5451 | + return memoized; | |
| 5452 | +} | |
| 5453 | + | |
| 5454 | +/***/ }), | |
| 5455 | + | |
| 5456 | +/***/ "../node_modules/reselect/es/index.js": | |
| 5457 | +/*!********************************************!*\ | |
| 5458 | + !*** ../node_modules/reselect/es/index.js ***! | |
| 5459 | + \********************************************/ | |
| 5460 | +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { | |
| 5461 | + | |
| 5462 | +"use strict"; | |
| 5463 | +__webpack_require__.r(__webpack_exports__); | |
| 5464 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 5465 | +/* harmony export */ "createSelector": () => (/* binding */ createSelector), | |
| 5466 | +/* harmony export */ "createSelectorCreator": () => (/* binding */ createSelectorCreator), | |
| 5467 | +/* harmony export */ "createStructuredSelector": () => (/* binding */ createStructuredSelector), | |
| 5468 | +/* harmony export */ "defaultEqualityCheck": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), | |
| 5469 | +/* harmony export */ "defaultMemoize": () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) | |
| 5470 | +/* harmony export */ }); | |
| 5471 | +/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "../node_modules/reselect/es/defaultMemoize.js"); | |
| 5472 | + | |
| 5473 | + | |
| 5474 | + | |
| 5475 | +function getDependencies(funcs) { | |
| 5476 | + var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; | |
| 5477 | + | |
| 5478 | + if (!dependencies.every(function (dep) { | |
| 5479 | + return typeof dep === 'function'; | |
| 5480 | + })) { | |
| 5481 | + var dependencyTypes = dependencies.map(function (dep) { | |
| 5482 | + return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; | |
| 5483 | + }).join(', '); | |
| 5484 | + throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); | |
| 5485 | + } | |
| 5486 | + | |
| 5487 | + return dependencies; | |
| 5488 | +} | |
| 5489 | + | |
| 5490 | +function createSelectorCreator(memoize) { | |
| 5491 | + for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | |
| 5492 | + memoizeOptionsFromArgs[_key - 1] = arguments[_key]; | |
| 5493 | + } | |
| 5494 | + | |
| 5495 | + var createSelector = function createSelector() { | |
| 5496 | + for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | |
| 5497 | + funcs[_key2] = arguments[_key2]; | |
| 5498 | + } | |
| 5499 | + | |
| 5500 | + var _recomputations = 0; | |
| 5501 | + | |
| 5502 | + var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. | |
| 5503 | + // So, start by declaring the default value here. | |
| 5504 | + // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) | |
| 5505 | + | |
| 5506 | + | |
| 5507 | + var directlyPassedOptions = { | |
| 5508 | + memoizeOptions: undefined | |
| 5509 | + }; // Normally, the result func or "output selector" is the last arg | |
| 5510 | + | |
| 5511 | + var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object | |
| 5512 | + | |
| 5513 | + if (typeof resultFunc === 'object') { | |
| 5514 | + directlyPassedOptions = resultFunc; // and pop the real result func off | |
| 5515 | + | |
| 5516 | + resultFunc = funcs.pop(); | |
| 5517 | + } | |
| 5518 | + | |
| 5519 | + if (typeof resultFunc !== 'function') { | |
| 5520 | + throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); | |
| 5521 | + } // Determine which set of options we're using. Prefer options passed directly, | |
| 5522 | + // but fall back to options given to createSelectorCreator. | |
| 5523 | + | |
| 5524 | + | |
| 5525 | + var _directlyPassedOption = directlyPassedOptions, | |
| 5526 | + _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, | |
| 5527 | + memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer | |
| 5528 | + // is an array. In most libs I've looked at, it's an equality function or options object. | |
| 5529 | + // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full | |
| 5530 | + // user-provided array of options. Otherwise, it must be just the _first_ arg, and so | |
| 5531 | + // we wrap it in an array so we can apply it. | |
| 5532 | + | |
| 5533 | + var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; | |
| 5534 | + var dependencies = getDependencies(funcs); | |
| 5535 | + var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { | |
| 5536 | + _recomputations++; // apply arguments instead of spreading for performance. | |
| 5537 | + | |
| 5538 | + return resultFunc.apply(null, arguments); | |
| 5539 | + }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. | |
| 5540 | + | |
| 5541 | + var selector = memoize(function dependenciesChecker() { | |
| 5542 | + var params = []; | |
| 5543 | + var length = dependencies.length; | |
| 5544 | + | |
| 5545 | + for (var i = 0; i < length; i++) { | |
| 5546 | + // apply arguments instead of spreading and mutate a local list of params for performance. | |
| 5547 | + // @ts-ignore | |
| 5548 | + params.push(dependencies[i].apply(null, arguments)); | |
| 5549 | + } // apply arguments instead of spreading for performance. | |
| 5550 | + | |
| 5551 | + | |
| 5552 | + _lastResult = memoizedResultFunc.apply(null, params); | |
| 5553 | + return _lastResult; | |
| 5554 | + }); | |
| 5555 | + Object.assign(selector, { | |
| 5556 | + resultFunc: resultFunc, | |
| 5557 | + memoizedResultFunc: memoizedResultFunc, | |
| 5558 | + dependencies: dependencies, | |
| 5559 | + lastResult: function lastResult() { | |
| 5560 | + return _lastResult; | |
| 5561 | + }, | |
| 5562 | + recomputations: function recomputations() { | |
| 5563 | + return _recomputations; | |
| 5564 | + }, | |
| 5565 | + resetRecomputations: function resetRecomputations() { | |
| 5566 | + return _recomputations = 0; | |
| 5567 | + } | |
| 5568 | + }); | |
| 5569 | + return selector; | |
| 5570 | + }; // @ts-ignore | |
| 5571 | + | |
| 5572 | + | |
| 5573 | + return createSelector; | |
| 5574 | +} | |
| 5575 | +var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); | |
| 5576 | +// Manual definition of state and output arguments | |
| 5577 | +var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { | |
| 5578 | + if (selectorCreator === void 0) { | |
| 5579 | + selectorCreator = createSelector; | |
| 5580 | + } | |
| 5581 | + | |
| 5582 | + if (typeof selectors !== 'object') { | |
| 5583 | + throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); | |
| 5584 | + } | |
| 5585 | + | |
| 5586 | + var objectKeys = Object.keys(selectors); | |
| 5587 | + var resultSelector = selectorCreator( // @ts-ignore | |
| 5588 | + objectKeys.map(function (key) { | |
| 5589 | + return selectors[key]; | |
| 5590 | + }), function () { | |
| 5591 | + for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | |
| 5592 | + values[_key3] = arguments[_key3]; | |
| 5593 | + } | |
| 5594 | + | |
| 5595 | + return values.reduce(function (composition, value, index) { | |
| 5596 | + composition[objectKeys[index]] = value; | |
| 5597 | + return composition; | |
| 5598 | + }, {}); | |
| 5599 | + }); | |
| 5600 | + return resultSelector; | |
| 5601 | +}; | |
| 5602 | + | |
| 5603 | +/***/ }), | |
| 5604 | + | |
| 2839 | 5605 | /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": |
| 2840 | 5606 | /*!******************************************************************!*\ |
| 2841 | 5607 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 2842 | 5608 | \******************************************************************/ |
| @@ -2841,12 +5607,14 @@ | ||
| 2841 | 5607 | !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! |
| 2842 | 5608 | \******************************************************************/ |
| 2843 | 5609 | /***/ ((module) => { |
| 2844 | 5610 | |
| 2845 | -function _arrayLikeToArray(r, a) { | |
| 2846 | - (null == a || a > r.length) && (a = r.length); | |
| 2847 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 2848 | - return n; | |
| 5611 | +function _arrayLikeToArray(arr, len) { | |
| 5612 | + if (len == null || len > arr.length) len = arr.length; | |
| 5613 | + for (var i = 0, arr2 = new Array(len); i < len; i++) { | |
| 5614 | + arr2[i] = arr[i]; | |
| 5615 | + } | |
| 5616 | + return arr2; | |
| 2849 | 5617 | } |
| 2850 | 5618 | module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2851 | 5619 | |
| 2852 | 5620 | /***/ }), |
| @@ -2856,29 +5624,15 @@ | ||
| 2856 | 5624 | !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! |
| 2857 | 5625 | \****************************************************************/ |
| 2858 | 5626 | /***/ ((module) => { |
| 2859 | 5627 | |
| 2860 | -function _arrayWithHoles(r) { | |
| 2861 | - if (Array.isArray(r)) return r; | |
| 5628 | +function _arrayWithHoles(arr) { | |
| 5629 | + if (Array.isArray(arr)) return arr; | |
| 2862 | 5630 | } |
| 2863 | 5631 | module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2864 | 5632 | |
| 2865 | 5633 | /***/ }), |
| 2866 | 5634 | |
| 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 | 5635 | /***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": |
| 2882 | 5636 | /*!***********************************************************************!*\ |
| 2883 | 5637 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 2884 | 5638 | \***********************************************************************/ |
| @@ -2883,11 +5637,13 @@ | ||
| 2883 | 5637 | !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! |
| 2884 | 5638 | \***********************************************************************/ |
| 2885 | 5639 | /***/ ((module) => { |
| 2886 | 5640 | |
| 2887 | -function _assertThisInitialized(e) { | |
| 2888 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 2889 | - return e; | |
| 5641 | +function _assertThisInitialized(self) { | |
| 5642 | + if (self === void 0) { | |
| 5643 | + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 5644 | + } | |
| 5645 | + return self; | |
| 2890 | 5646 | } |
| 2891 | 5647 | module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2892 | 5648 | |
| 2893 | 5649 | /***/ }), |
| @@ -2897,10 +5653,12 @@ | ||
| 2897 | 5653 | !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! |
| 2898 | 5654 | \****************************************************************/ |
| 2899 | 5655 | /***/ ((module) => { |
| 2900 | 5656 | |
| 2901 | -function _classCallCheck(a, n) { | |
| 2902 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 5657 | +function _classCallCheck(instance, Constructor) { | |
| 5658 | + if (!(instance instanceof Constructor)) { | |
| 5659 | + throw new TypeError("Cannot call a class as a function"); | |
| 5660 | + } | |
| 2903 | 5661 | } |
| 2904 | 5662 | module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2905 | 5663 | |
| 2906 | 5664 | /***/ }), |
| @@ -2910,16 +5668,24 @@ | ||
| 2910 | 5668 | !*** ../node_modules/@babel/runtime/helpers/construct.js ***! |
| 2911 | 5669 | \***********************************************************/ |
| 2912 | 5670 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2913 | 5671 | |
| 5672 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 2914 | 5673 | var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "../node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js"); |
| 2915 | -var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 2916 | -function _construct(t, e, r) { | |
| 2917 | - if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments); | |
| 2918 | - var o = [null]; | |
| 2919 | - o.push.apply(o, e); | |
| 2920 | - var p = new (t.bind.apply(t, o))(); | |
| 2921 | - return r && setPrototypeOf(p, r.prototype), p; | |
| 5674 | +function _construct(Parent, args, Class) { | |
| 5675 | + if (isNativeReflectConstruct()) { | |
| 5676 | + module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5677 | + } else { | |
| 5678 | + module.exports = _construct = function _construct(Parent, args, Class) { | |
| 5679 | + var a = [null]; | |
| 5680 | + a.push.apply(a, args); | |
| 5681 | + var Constructor = Function.bind.apply(Parent, a); | |
| 5682 | + var instance = new Constructor(); | |
| 5683 | + if (Class) setPrototypeOf(instance, Class.prototype); | |
| 5684 | + return instance; | |
| 5685 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5686 | + } | |
| 5687 | + return _construct.apply(null, arguments); | |
| 2922 | 5688 | } |
| 2923 | 5689 | module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2924 | 5690 | |
| 2925 | 5691 | /***/ }), |
| @@ -2927,21 +5693,26 @@ | ||
| 2927 | 5693 | /***/ "../node_modules/@babel/runtime/helpers/createClass.js": |
| 2928 | 5694 | /*!*************************************************************!*\ |
| 2929 | 5695 | !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! |
| 2930 | 5696 | \*************************************************************/ |
| 2931 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5697 | +/***/ ((module) => { | |
| 2932 | 5698 | |
| 2933 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2934 | -function _defineProperties(e, r) { | |
| 2935 | - for (var t = 0; t < r.length; t++) { | |
| 2936 | - var o = r[t]; | |
| 2937 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 5699 | +function _defineProperties(target, props) { | |
| 5700 | + for (var i = 0; i < props.length; i++) { | |
| 5701 | + var descriptor = props[i]; | |
| 5702 | + descriptor.enumerable = descriptor.enumerable || false; | |
| 5703 | + descriptor.configurable = true; | |
| 5704 | + if ("value" in descriptor) descriptor.writable = true; | |
| 5705 | + Object.defineProperty(target, descriptor.key, descriptor); | |
| 2938 | 5706 | } |
| 2939 | 5707 | } |
| 2940 | -function _createClass(e, r, t) { | |
| 2941 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 2942 | - writable: !1 | |
| 2943 | - }), e; | |
| 5708 | +function _createClass(Constructor, protoProps, staticProps) { | |
| 5709 | + if (protoProps) _defineProperties(Constructor.prototype, protoProps); | |
| 5710 | + if (staticProps) _defineProperties(Constructor, staticProps); | |
| 5711 | + Object.defineProperty(Constructor, "prototype", { | |
| 5712 | + writable: false | |
| 5713 | + }); | |
| 5714 | + return Constructor; | |
| 2944 | 5715 | } |
| 2945 | 5716 | module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2946 | 5717 | |
| 2947 | 5718 | /***/ }), |
| @@ -2949,18 +5720,22 @@ | ||
| 2949 | 5720 | /***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": |
| 2950 | 5721 | /*!****************************************************************!*\ |
| 2951 | 5722 | !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! |
| 2952 | 5723 | \****************************************************************/ |
| 2953 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5724 | +/***/ ((module) => { | |
| 2954 | 5725 | |
| 2955 | -var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 2956 | -function _defineProperty(e, r, t) { | |
| 2957 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 2958 | - value: t, | |
| 2959 | - enumerable: !0, | |
| 2960 | - configurable: !0, | |
| 2961 | - writable: !0 | |
| 2962 | - }) : e[r] = t, e; | |
| 5726 | +function _defineProperty(obj, key, value) { | |
| 5727 | + if (key in obj) { | |
| 5728 | + Object.defineProperty(obj, key, { | |
| 5729 | + value: value, | |
| 5730 | + enumerable: true, | |
| 5731 | + configurable: true, | |
| 5732 | + writable: true | |
| 5733 | + }); | |
| 5734 | + } else { | |
| 5735 | + obj[key] = value; | |
| 5736 | + } | |
| 5737 | + return obj; | |
| 2963 | 5738 | } |
| 2964 | 5739 | module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2965 | 5740 | |
| 2966 | 5741 | /***/ }), |
| @@ -2972,15 +5747,22 @@ | ||
| 2972 | 5747 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 2973 | 5748 | |
| 2974 | 5749 | var superPropBase = __webpack_require__(/*! ./superPropBase.js */ "../node_modules/@babel/runtime/helpers/superPropBase.js"); |
| 2975 | 5750 | function _get() { |
| 2976 | - return module.exports = _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { | |
| 2977 | - var p = superPropBase(e, t); | |
| 2978 | - if (p) { | |
| 2979 | - var n = Object.getOwnPropertyDescriptor(p, t); | |
| 2980 | - return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; | |
| 2981 | - } | |
| 2982 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _get.apply(null, arguments); | |
| 5751 | + if (typeof Reflect !== "undefined" && Reflect.get) { | |
| 5752 | + module.exports = _get = Reflect.get.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5753 | + } else { | |
| 5754 | + module.exports = _get = function _get(target, property, receiver) { | |
| 5755 | + var base = superPropBase(target, property); | |
| 5756 | + if (!base) return; | |
| 5757 | + var desc = Object.getOwnPropertyDescriptor(base, property); | |
| 5758 | + if (desc.get) { | |
| 5759 | + return desc.get.call(arguments.length < 3 ? target : receiver); | |
| 5760 | + } | |
| 5761 | + return desc.value; | |
| 5762 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5763 | + } | |
| 5764 | + return _get.apply(this, arguments); | |
| 2983 | 5765 | } |
| 2984 | 5766 | module.exports = _get, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 2985 | 5767 | |
| 2986 | 5768 | /***/ }), |
| @@ -2990,12 +5772,13 @@ | ||
| 2990 | 5772 | !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! |
| 2991 | 5773 | \****************************************************************/ |
| 2992 | 5774 | /***/ ((module) => { |
| 2993 | 5775 | |
| 2994 | -function _getPrototypeOf(t) { | |
| 2995 | - return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 2996 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 2997 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 5776 | +function _getPrototypeOf(o) { | |
| 5777 | + module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { | |
| 5778 | + return o.__proto__ || Object.getPrototypeOf(o); | |
| 5779 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5780 | + return _getPrototypeOf(o); | |
| 2998 | 5781 | } |
| 2999 | 5782 | module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3000 | 5783 | |
| 3001 | 5784 | /***/ }), |
| @@ -3006,19 +5789,23 @@ | ||
| 3006 | 5789 | \**********************************************************/ |
| 3007 | 5790 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3008 | 5791 | |
| 3009 | 5792 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 3010 | -function _inherits(t, e) { | |
| 3011 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 3012 | - t.prototype = Object.create(e && e.prototype, { | |
| 5793 | +function _inherits(subClass, superClass) { | |
| 5794 | + if (typeof superClass !== "function" && superClass !== null) { | |
| 5795 | + throw new TypeError("Super expression must either be null or a function"); | |
| 5796 | + } | |
| 5797 | + subClass.prototype = Object.create(superClass && superClass.prototype, { | |
| 3013 | 5798 | constructor: { |
| 3014 | - value: t, | |
| 3015 | - writable: !0, | |
| 3016 | - configurable: !0 | |
| 5799 | + value: subClass, | |
| 5800 | + writable: true, | |
| 5801 | + configurable: true | |
| 3017 | 5802 | } |
| 3018 | - }), Object.defineProperty(t, "prototype", { | |
| 3019 | - writable: !1 | |
| 3020 | - }), e && setPrototypeOf(t, e); | |
| 5803 | + }); | |
| 5804 | + Object.defineProperty(subClass, "prototype", { | |
| 5805 | + writable: false | |
| 5806 | + }); | |
| 5807 | + if (superClass) setPrototypeOf(subClass, superClass); | |
| 3021 | 5808 | } |
| 3022 | 5809 | module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3023 | 5810 | |
| 3024 | 5811 | /***/ }), |
| @@ -3028,11 +5815,11 @@ | ||
| 3028 | 5815 | !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! |
| 3029 | 5816 | \***********************************************************************/ |
| 3030 | 5817 | /***/ ((module) => { |
| 3031 | 5818 | |
| 3032 | -function _interopRequireDefault(e) { | |
| 3033 | - return e && e.__esModule ? e : { | |
| 3034 | - "default": e | |
| 5819 | +function _interopRequireDefault(obj) { | |
| 5820 | + return obj && obj.__esModule ? obj : { | |
| 5821 | + "default": obj | |
| 3035 | 5822 | }; |
| 3036 | 5823 | } |
| 3037 | 5824 | module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3038 | 5825 | |
| @@ -3043,14 +5830,10 @@ | ||
| 3043 | 5830 | !*** ../node_modules/@babel/runtime/helpers/isNativeFunction.js ***! |
| 3044 | 5831 | \******************************************************************/ |
| 3045 | 5832 | /***/ ((module) => { |
| 3046 | 5833 | |
| 3047 | -function _isNativeFunction(t) { | |
| 3048 | - try { | |
| 3049 | - return -1 !== Function.toString.call(t).indexOf("[native code]"); | |
| 3050 | - } catch (n) { | |
| 3051 | - return "function" == typeof t; | |
| 3052 | - } | |
| 5834 | +function _isNativeFunction(fn) { | |
| 5835 | + return Function.toString.call(fn).indexOf("[native code]") !== -1; | |
| 3053 | 5836 | } |
| 3054 | 5837 | module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3055 | 5838 | |
| 3056 | 5839 | /***/ }), |
| @@ -3061,32 +5844,22 @@ | ||
| 3061 | 5844 | \**************************************************************************/ |
| 3062 | 5845 | /***/ ((module) => { |
| 3063 | 5846 | |
| 3064 | 5847 | function _isNativeReflectConstruct() { |
| 5848 | + if (typeof Reflect === "undefined" || !Reflect.construct) return false; | |
| 5849 | + if (Reflect.construct.sham) return false; | |
| 5850 | + if (typeof Proxy === "function") return true; | |
| 3065 | 5851 | try { |
| 3066 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 3067 | - } catch (t) {} | |
| 3068 | - return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 3069 | - return !!t; | |
| 3070 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 5852 | + Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); | |
| 5853 | + return true; | |
| 5854 | + } catch (e) { | |
| 5855 | + return false; | |
| 5856 | + } | |
| 3071 | 5857 | } |
| 3072 | 5858 | module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3073 | 5859 | |
| 3074 | 5860 | /***/ }), |
| 3075 | 5861 | |
| 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 | 5862 | /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": |
| 3090 | 5863 | /*!**********************************************************************!*\ |
| 3091 | 5864 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 3092 | 5865 | \**********************************************************************/ |
| @@ -3091,34 +5864,31 @@ | ||
| 3091 | 5864 | !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! |
| 3092 | 5865 | \**********************************************************************/ |
| 3093 | 5866 | /***/ ((module) => { |
| 3094 | 5867 | |
| 3095 | -function _iterableToArrayLimit(r, l) { | |
| 3096 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 3097 | - if (null != t) { | |
| 3098 | - var e, | |
| 3099 | - n, | |
| 3100 | - i, | |
| 3101 | - u, | |
| 3102 | - a = [], | |
| 3103 | - f = !0, | |
| 3104 | - o = !1; | |
| 5868 | +function _iterableToArrayLimit(arr, i) { | |
| 5869 | + var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; | |
| 5870 | + if (_i == null) return; | |
| 5871 | + var _arr = []; | |
| 5872 | + var _n = true; | |
| 5873 | + var _d = false; | |
| 5874 | + var _s, _e; | |
| 5875 | + try { | |
| 5876 | + for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { | |
| 5877 | + _arr.push(_s.value); | |
| 5878 | + if (i && _arr.length === i) break; | |
| 5879 | + } | |
| 5880 | + } catch (err) { | |
| 5881 | + _d = true; | |
| 5882 | + _e = err; | |
| 5883 | + } finally { | |
| 3105 | 5884 | try { |
| 3106 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 3107 | - if (Object(t) !== t) return; | |
| 3108 | - f = !1; | |
| 3109 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 3110 | - } catch (r) { | |
| 3111 | - o = !0, n = r; | |
| 5885 | + if (!_n && _i["return"] != null) _i["return"](); | |
| 3112 | 5886 | } finally { |
| 3113 | - try { | |
| 3114 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 3115 | - } finally { | |
| 3116 | - if (o) throw n; | |
| 3117 | - } | |
| 5887 | + if (_d) throw _e; | |
| 3118 | 5888 | } |
| 3119 | - return a; | |
| 3120 | 5889 | } |
| 5890 | + return _arr; | |
| 3121 | 5891 | } |
| 3122 | 5892 | module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3123 | 5893 | |
| 3124 | 5894 | /***/ }), |
| @@ -3135,62 +5905,8 @@ | ||
| 3135 | 5905 | module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3136 | 5906 | |
| 3137 | 5907 | /***/ }), |
| 3138 | 5908 | |
| 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 | 5909 | /***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": |
| 3194 | 5910 | /*!***************************************************************************!*\ |
| 3195 | 5911 | !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! |
| 3196 | 5912 | \***************************************************************************/ |
| @@ -3197,30 +5913,20 @@ | ||
| 3197 | 5913 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3198 | 5914 | |
| 3199 | 5915 | var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); |
| 3200 | 5916 | var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); |
| 3201 | -function _possibleConstructorReturn(t, e) { | |
| 3202 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 3203 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 3204 | - return assertThisInitialized(t); | |
| 5917 | +function _possibleConstructorReturn(self, call) { | |
| 5918 | + if (call && (_typeof(call) === "object" || typeof call === "function")) { | |
| 5919 | + return call; | |
| 5920 | + } else if (call !== void 0) { | |
| 5921 | + throw new TypeError("Derived constructors may only return object or undefined"); | |
| 5922 | + } | |
| 5923 | + return assertThisInitialized(self); | |
| 3205 | 5924 | } |
| 3206 | 5925 | module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3207 | 5926 | |
| 3208 | 5927 | /***/ }), |
| 3209 | 5928 | |
| 3210 | -/***/ "../node_modules/@babel/runtime/helpers/readOnlyError.js": | |
| 3211 | -/*!***************************************************************!*\ | |
| 3212 | - !*** ../node_modules/@babel/runtime/helpers/readOnlyError.js ***! | |
| 3213 | - \***************************************************************/ | |
| 3214 | -/***/ ((module) => { | |
| 3215 | - | |
| 3216 | -function _readOnlyError(r) { | |
| 3217 | - throw new TypeError('"' + r + '" is read-only'); | |
| 3218 | -} | |
| 3219 | -module.exports = _readOnlyError, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3220 | - | |
| 3221 | -/***/ }), | |
| 3222 | - | |
| 3223 | 5929 | /***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": |
| 3224 | 5930 | /*!****************************************************************!*\ |
| 3225 | 5931 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 3226 | 5932 | \****************************************************************/ |
| @@ -3225,12 +5931,14 @@ | ||
| 3225 | 5931 | !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! |
| 3226 | 5932 | \****************************************************************/ |
| 3227 | 5933 | /***/ ((module) => { |
| 3228 | 5934 | |
| 3229 | -function _setPrototypeOf(t, e) { | |
| 3230 | - return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 3231 | - return t.__proto__ = e, t; | |
| 3232 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 5935 | +function _setPrototypeOf(o, p) { | |
| 5936 | + module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { | |
| 5937 | + o.__proto__ = p; | |
| 5938 | + return o; | |
| 5939 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 5940 | + return _setPrototypeOf(o, p); | |
| 3233 | 5941 | } |
| 3234 | 5942 | module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3235 | 5943 | |
| 3236 | 5944 | /***/ }), |
| @@ -3244,10 +5952,10 @@ | ||
| 3244 | 5952 | var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); |
| 3245 | 5953 | var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); |
| 3246 | 5954 | var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); |
| 3247 | 5955 | var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); |
| 3248 | -function _slicedToArray(r, e) { | |
| 3249 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 5956 | +function _slicedToArray(arr, i) { | |
| 5957 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 3250 | 5958 | } |
| 3251 | 5959 | module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3252 | 5960 | |
| 3253 | 5961 | /***/ }), |
| @@ -3258,70 +5966,19 @@ | ||
| 3258 | 5966 | \***************************************************************/ |
| 3259 | 5967 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3260 | 5968 | |
| 3261 | 5969 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 3262 | -function _superPropBase(t, o) { | |
| 3263 | - for (; !{}.hasOwnProperty.call(t, o) && null !== (t = getPrototypeOf(t));); | |
| 3264 | - return t; | |
| 5970 | +function _superPropBase(object, property) { | |
| 5971 | + while (!Object.prototype.hasOwnProperty.call(object, property)) { | |
| 5972 | + object = getPrototypeOf(object); | |
| 5973 | + if (object === null) break; | |
| 5974 | + } | |
| 5975 | + return object; | |
| 3265 | 5976 | } |
| 3266 | 5977 | module.exports = _superPropBase, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3267 | 5978 | |
| 3268 | 5979 | /***/ }), |
| 3269 | 5980 | |
| 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 | -/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 3288 | -/*!*************************************************************!*\ | |
| 3289 | - !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 3290 | - \*************************************************************/ | |
| 3291 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3292 | - | |
| 3293 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3294 | -function toPrimitive(t, r) { | |
| 3295 | - if ("object" != _typeof(t) || !t) return t; | |
| 3296 | - var e = t[Symbol.toPrimitive]; | |
| 3297 | - if (void 0 !== e) { | |
| 3298 | - var i = e.call(t, r || "default"); | |
| 3299 | - if ("object" != _typeof(i)) return i; | |
| 3300 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 3301 | - } | |
| 3302 | - return ("string" === r ? String : Number)(t); | |
| 3303 | -} | |
| 3304 | -module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3305 | - | |
| 3306 | -/***/ }), | |
| 3307 | - | |
| 3308 | -/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 3309 | -/*!***************************************************************!*\ | |
| 3310 | - !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 3311 | - \***************************************************************/ | |
| 3312 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3313 | - | |
| 3314 | -var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 3315 | -var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 3316 | -function toPropertyKey(t) { | |
| 3317 | - var i = toPrimitive(t, "string"); | |
| 3318 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 3319 | -} | |
| 3320 | -module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 3321 | - | |
| 3322 | -/***/ }), | |
| 3323 | - | |
| 3324 | 5981 | /***/ "../node_modules/@babel/runtime/helpers/typeof.js": |
| 3325 | 5982 | /*!********************************************************!*\ |
| 3326 | 5983 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 3327 | 5984 | \********************************************************/ |
| @@ -3326,16 +5983,16 @@ | ||
| 3326 | 5983 | !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! |
| 3327 | 5984 | \********************************************************/ |
| 3328 | 5985 | /***/ ((module) => { |
| 3329 | 5986 | |
| 3330 | -function _typeof(o) { | |
| 5987 | +function _typeof(obj) { | |
| 3331 | 5988 | "@babel/helpers - typeof"; |
| 3332 | 5989 | |
| 3333 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 3334 | - return typeof o; | |
| 3335 | - } : function (o) { | |
| 3336 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 3337 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 5990 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { | |
| 5991 | + return typeof obj; | |
| 5992 | + } : function (obj) { | |
| 5993 | + return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; | |
| 5994 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj); | |
| 3338 | 5995 | } |
| 3339 | 5996 | module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3340 | 5997 | |
| 3341 | 5998 | /***/ }), |
| @@ -3346,14 +6003,15 @@ | ||
| 3346 | 6003 | \****************************************************************************/ |
| 3347 | 6004 | /***/ ((module, __unused_webpack_exports, __webpack_require__) => { |
| 3348 | 6005 | |
| 3349 | 6006 | var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); |
| 3350 | -function _unsupportedIterableToArray(r, a) { | |
| 3351 | - if (r) { | |
| 3352 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 3353 | - var t = {}.toString.call(r).slice(8, -1); | |
| 3354 | - return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0; | |
| 3355 | - } | |
| 6007 | +function _unsupportedIterableToArray(o, minLen) { | |
| 6008 | + if (!o) return; | |
| 6009 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 6010 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 6011 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 6012 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 6013 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 3356 | 6014 | } |
| 3357 | 6015 | module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3358 | 6016 | |
| 3359 | 6017 | /***/ }), |
| @@ -3367,43 +6025,138 @@ | ||
| 3367 | 6025 | var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js"); |
| 3368 | 6026 | var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); |
| 3369 | 6027 | var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ "../node_modules/@babel/runtime/helpers/isNativeFunction.js"); |
| 3370 | 6028 | var construct = __webpack_require__(/*! ./construct.js */ "../node_modules/@babel/runtime/helpers/construct.js"); |
| 3371 | -function _wrapNativeSuper(t) { | |
| 3372 | - var r = "function" == typeof Map ? new Map() : void 0; | |
| 3373 | - return module.exports = _wrapNativeSuper = function _wrapNativeSuper(t) { | |
| 3374 | - if (null === t || !isNativeFunction(t)) return t; | |
| 3375 | - if ("function" != typeof t) throw new TypeError("Super expression must either be null or a function"); | |
| 3376 | - if (void 0 !== r) { | |
| 3377 | - if (r.has(t)) return r.get(t); | |
| 3378 | - r.set(t, Wrapper); | |
| 6029 | +function _wrapNativeSuper(Class) { | |
| 6030 | + var _cache = typeof Map === "function" ? new Map() : undefined; | |
| 6031 | + module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) { | |
| 6032 | + if (Class === null || !isNativeFunction(Class)) return Class; | |
| 6033 | + if (typeof Class !== "function") { | |
| 6034 | + throw new TypeError("Super expression must either be null or a function"); | |
| 3379 | 6035 | } |
| 6036 | + if (typeof _cache !== "undefined") { | |
| 6037 | + if (_cache.has(Class)) return _cache.get(Class); | |
| 6038 | + _cache.set(Class, Wrapper); | |
| 6039 | + } | |
| 3380 | 6040 | function Wrapper() { |
| 3381 | - return construct(t, arguments, getPrototypeOf(this).constructor); | |
| 6041 | + return construct(Class, arguments, getPrototypeOf(this).constructor); | |
| 3382 | 6042 | } |
| 3383 | - return Wrapper.prototype = Object.create(t.prototype, { | |
| 6043 | + Wrapper.prototype = Object.create(Class.prototype, { | |
| 3384 | 6044 | constructor: { |
| 3385 | 6045 | value: Wrapper, |
| 3386 | - enumerable: !1, | |
| 3387 | - writable: !0, | |
| 3388 | - configurable: !0 | |
| 6046 | + enumerable: false, | |
| 6047 | + writable: true, | |
| 6048 | + configurable: true | |
| 3389 | 6049 | } |
| 3390 | - }), setPrototypeOf(Wrapper, t); | |
| 3391 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _wrapNativeSuper(t); | |
| 6050 | + }); | |
| 6051 | + return setPrototypeOf(Wrapper, Class); | |
| 6052 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 6053 | + return _wrapNativeSuper(Class); | |
| 3392 | 6054 | } |
| 3393 | 6055 | module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports; |
| 3394 | 6056 | |
| 3395 | 6057 | /***/ }), |
| 3396 | 6058 | |
| 3397 | -/***/ "@reduxjs/toolkit": | |
| 6059 | +/***/ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js": | |
| 6060 | +/*!********************************************************************!*\ | |
| 6061 | + !*** ../node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! | |
| 6062 | + \********************************************************************/ | |
| 6063 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 6064 | + | |
| 6065 | +"use strict"; | |
| 6066 | +__webpack_require__.r(__webpack_exports__); | |
| 6067 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6068 | +/* harmony export */ "default": () => (/* binding */ _defineProperty) | |
| 6069 | +/* harmony export */ }); | |
| 6070 | +function _defineProperty(obj, key, value) { | |
| 6071 | + if (key in obj) { | |
| 6072 | + Object.defineProperty(obj, key, { | |
| 6073 | + value: value, | |
| 6074 | + enumerable: true, | |
| 6075 | + configurable: true, | |
| 6076 | + writable: true | |
| 6077 | + }); | |
| 6078 | + } else { | |
| 6079 | + obj[key] = value; | |
| 6080 | + } | |
| 6081 | + return obj; | |
| 6082 | +} | |
| 6083 | + | |
| 6084 | +/***/ }), | |
| 6085 | + | |
| 6086 | +/***/ "../node_modules/@babel/runtime/helpers/esm/objectSpread2.js": | |
| 6087 | +/*!*******************************************************************!*\ | |
| 6088 | + !*** ../node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! | |
| 6089 | + \*******************************************************************/ | |
| 6090 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 6091 | + | |
| 6092 | +"use strict"; | |
| 6093 | +__webpack_require__.r(__webpack_exports__); | |
| 6094 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6095 | +/* harmony export */ "default": () => (/* binding */ _objectSpread2) | |
| 6096 | +/* harmony export */ }); | |
| 6097 | +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "../node_modules/@babel/runtime/helpers/esm/defineProperty.js"); | |
| 6098 | + | |
| 6099 | +function ownKeys(object, enumerableOnly) { | |
| 6100 | + var keys = Object.keys(object); | |
| 6101 | + if (Object.getOwnPropertySymbols) { | |
| 6102 | + var symbols = Object.getOwnPropertySymbols(object); | |
| 6103 | + enumerableOnly && (symbols = symbols.filter(function (sym) { | |
| 6104 | + return Object.getOwnPropertyDescriptor(object, sym).enumerable; | |
| 6105 | + })), keys.push.apply(keys, symbols); | |
| 6106 | + } | |
| 6107 | + return keys; | |
| 6108 | +} | |
| 6109 | +function _objectSpread2(target) { | |
| 6110 | + for (var i = 1; i < arguments.length; i++) { | |
| 6111 | + var source = null != arguments[i] ? arguments[i] : {}; | |
| 6112 | + i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { | |
| 6113 | + (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(target, key, source[key]); | |
| 6114 | + }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { | |
| 6115 | + Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); | |
| 6116 | + }); | |
| 6117 | + } | |
| 6118 | + return target; | |
| 6119 | +} | |
| 6120 | + | |
| 6121 | +/***/ }), | |
| 6122 | + | |
| 6123 | +/***/ "../node_modules/immer/dist/immer.esm.mjs": | |
| 3398 | 6124 | /*!************************************************!*\ |
| 3399 | - !*** external "elementorVendors.reduxToolkit" ***! | |
| 6125 | + !*** ../node_modules/immer/dist/immer.esm.mjs ***! | |
| 3400 | 6126 | \************************************************/ |
| 3401 | -/***/ ((module) => { | |
| 6127 | +/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { | |
| 3402 | 6128 | |
| 3403 | 6129 | "use strict"; |
| 3404 | -module.exports = elementorVendors.reduxToolkit; | |
| 6130 | +__webpack_require__.r(__webpack_exports__); | |
| 6131 | +/* harmony export */ __webpack_require__.d(__webpack_exports__, { | |
| 6132 | +/* harmony export */ "Immer": () => (/* binding */ un), | |
| 6133 | +/* harmony export */ "applyPatches": () => (/* binding */ pn), | |
| 6134 | +/* harmony export */ "castDraft": () => (/* binding */ K), | |
| 6135 | +/* harmony export */ "castImmutable": () => (/* binding */ $), | |
| 6136 | +/* harmony export */ "createDraft": () => (/* binding */ ln), | |
| 6137 | +/* harmony export */ "current": () => (/* binding */ D), | |
| 6138 | +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), | |
| 6139 | +/* harmony export */ "enableAllPlugins": () => (/* binding */ J), | |
| 6140 | +/* harmony export */ "enableES5": () => (/* binding */ N), | |
| 6141 | +/* harmony export */ "enableMapSet": () => (/* binding */ C), | |
| 6142 | +/* harmony export */ "enablePatches": () => (/* binding */ T), | |
| 6143 | +/* harmony export */ "finishDraft": () => (/* binding */ dn), | |
| 6144 | +/* harmony export */ "freeze": () => (/* binding */ d), | |
| 6145 | +/* harmony export */ "immerable": () => (/* binding */ L), | |
| 6146 | +/* harmony export */ "isDraft": () => (/* binding */ r), | |
| 6147 | +/* harmony export */ "isDraftable": () => (/* binding */ t), | |
| 6148 | +/* harmony export */ "nothing": () => (/* binding */ H), | |
| 6149 | +/* harmony export */ "original": () => (/* binding */ e), | |
| 6150 | +/* harmony export */ "produce": () => (/* binding */ fn), | |
| 6151 | +/* harmony export */ "produceWithPatches": () => (/* binding */ cn), | |
| 6152 | +/* harmony export */ "setAutoFreeze": () => (/* binding */ sn), | |
| 6153 | +/* harmony export */ "setUseProxies": () => (/* binding */ vn) | |
| 6154 | +/* harmony export */ }); | |
| 6155 | +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)}throw Error("[Immer] minified error nr: "+n+(t.length?" "+t.map((function(n){return"'"+n+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}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.delete(r),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)?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 O(n){g(n),n.p.forEach(S),n.p=null}function g(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.O=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.g||b("ES5").S(e,r,o),o?(i[Q].P&&(O(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,[]),O(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;i(3===e.i?new Set(o):o,(function(r,i){return A(n,e,o,r,i,t)})),x(n,o,!1),t&&n.u&&b("Patches").R(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s){if( true&&c===o&&n(5),r(c)){var v=M(e,c,s&&i&&3!==i.i&&!u(i.D,a)?s.concat(a):void 0);if(f(o,a,v),!r(v))return;e.m=!1}if(t(c)&&!y(c)){if(!e.h.F&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),n.h.F&&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 R(n,r,t){var e=s(r)?b("MapSet").N(r,t):v(r)?b("MapSet").T(r,t):n.g?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,D:{},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 D(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=F(r,c),u.I=!1}else e=F(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 F(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function N(){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.O&&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,D:{},l:r,t:n,k:i,o:null,O:!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.D,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];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},R: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.D,(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.D,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.D=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=R(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.O&&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,D:void 0,t:n,k:this,C:!1,O:!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.D.set(n,!0),t.o.set(n,r),t.D.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.D.set(n,!1):r.D.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.D=new Map,i(n.t,(function(r){n.D.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=R(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,O:!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",{N:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){N(),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]=R(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.D[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&&"number"!=typeof t&&(void 0!==t||r in n.o)||(n.o[r]=t,n.D[r]=!0,!0)},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.D[r]=!1,E(n),k(n)):delete n.D[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.g=B,this.F=!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=R(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?O(c):g(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw O(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.F&&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=D(e));var i=w(this),o=R(this,e,void 0);return o[Q].C=!0,g(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.F=n},i.setUseProxies=function(r){r&&!B&&n(20),this.g=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); | |
| 6156 | +//# sourceMappingURL=immer.esm.js.map | |
| 3405 | 6157 | |
| 6158 | + | |
| 3406 | 6159 | /***/ }) |
| 3407 | 6160 | |
| 3408 | 6161 | /******/ }); |
| 3409 | 6162 | /************************************************************************/ |
| @@ -3431,10 +6184,39 @@ | ||
| 3431 | 6184 | /******/ return module.exports; |
| 3432 | 6185 | /******/ } |
| 3433 | 6186 | /******/ |
| 3434 | 6187 | /************************************************************************/ |
| 6188 | +/******/ /* webpack/runtime/define property getters */ | |
| 6189 | +/******/ (() => { | |
| 6190 | +/******/ // define getter functions for harmony exports | |
| 6191 | +/******/ __webpack_require__.d = (exports, definition) => { | |
| 6192 | +/******/ for(var key in definition) { | |
| 6193 | +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { | |
| 6194 | +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); | |
| 6195 | +/******/ } | |
| 6196 | +/******/ } | |
| 6197 | +/******/ }; | |
| 6198 | +/******/ })(); | |
| 6199 | +/******/ | |
| 6200 | +/******/ /* webpack/runtime/hasOwnProperty shorthand */ | |
| 6201 | +/******/ (() => { | |
| 6202 | +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) | |
| 6203 | +/******/ })(); | |
| 6204 | +/******/ | |
| 6205 | +/******/ /* webpack/runtime/make namespace object */ | |
| 6206 | +/******/ (() => { | |
| 6207 | +/******/ // define __esModule on exports | |
| 6208 | +/******/ __webpack_require__.r = (exports) => { | |
| 6209 | +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { | |
| 6210 | +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); | |
| 6211 | +/******/ } | |
| 6212 | +/******/ Object.defineProperty(exports, '__esModule', { value: true }); | |
| 6213 | +/******/ }; | |
| 6214 | +/******/ })(); | |
| 6215 | +/******/ | |
| 6216 | +/************************************************************************/ | |
| 3435 | 6217 | var __webpack_exports__ = {}; |
| 3436 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 6218 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 3437 | 6219 | (() => { |
| 3438 | 6220 | "use strict"; |
| 3439 | 6221 | /*!*******************************************!*\ |
| 3440 | 6222 | !*** ../core/common/assets/js/modules.js ***! |
| @@ -3447,11 +6229,8 @@ | ||
| 3447 | 6229 | var _componentBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-base */ "../modules/web-cli/assets/js/modules/component-base.js")); |
| 3448 | 6230 | var _componentModalBase = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/component-modal-base */ "../modules/web-cli/assets/js/modules/component-modal-base.js")); |
| 3449 | 6231 | var _hookBreak = _interopRequireDefault(__webpack_require__(/*! elementor-api/modules/hook-break */ "../modules/web-cli/assets/js/modules/hook-break.js")); |
| 3450 | 6232 | _modules.default.common = { |
| 3451 | - /** | |
| 3452 | - * @deprecated since 2.9.0, use `$e.modules.ComponentBase` instead. | |
| 3453 | - */ | |
| 3454 | 6233 | get Component() { |
| 3455 | 6234 | // `elementorCommon` isn't available during it self initialize. |
| 3456 | 6235 | setTimeout(function () { |
| 3457 | 6236 | elementorDevTools.deprecation.deprecated('elementorModules.common.Component', '2.9.0', '$e.modules.ComponentBase'); |
| @@ -3457,11 +6236,8 @@ | ||
| 3457 | 6236 | elementorDevTools.deprecation.deprecated('elementorModules.common.Component', '2.9.0', '$e.modules.ComponentBase'); |
| 3458 | 6237 | }, 2000); |
| 3459 | 6238 | return _componentBase.default; |
| 3460 | 6239 | }, |
| 3461 | - /** | |
| 3462 | - * @deprecated since 2.9.0, use `$e.modules.ComponentModalBase` instead. | |
| 3463 | - */ | |
| 3464 | 6240 | get ComponentModal() { |
| 3465 | 6241 | // `elementorCommon` isn't available during it self initialize. |
| 3466 | 6242 | setTimeout(function () { |
| 3467 | 6243 | elementorDevTools.deprecation.deprecated('elementorModules.common.ComponentModal', '2.9.0', '$e.modules.ComponentModalBase'); |
| @@ -3467,11 +6243,8 @@ | ||
| 3467 | 6243 | elementorDevTools.deprecation.deprecated('elementorModules.common.ComponentModal', '2.9.0', '$e.modules.ComponentModalBase'); |
| 3468 | 6244 | }, 2000); |
| 3469 | 6245 | return _componentModalBase.default; |
| 3470 | 6246 | }, |
| 3471 | - /** | |
| 3472 | - * @deprecated since 2.9.0, use `$e.modules.HookBreak` instead. | |
| 3473 | - */ | |
| 3474 | 6247 | get HookBreak() { |
| 3475 | 6248 | // `elementorCommon` isn't available during it self initialize. |
| 3476 | 6249 | setTimeout(function () { |
| 3477 | 6250 | elementorDevTools.deprecation.deprecated('elementorModules.common.HookBreak', '2.9.0', '$e.modules.HookBreak'); |