vendor: 78 bytes, lines 1-3
1/******/ (() => { // webpackBootstrap 2/******/ var __webpack_modules__ = ({ 3
vendor: 92,956 bytes, lines 4-2085
4/***/ "./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js": 5/*!*****************************************************************!*\ 6 !*** ./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js ***! 7 \*****************************************************************/ 8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 10"use strict"; 11__webpack_require__.r(__webpack_exports__); 12/* harmony export */ __webpack_require__.d(__webpack_exports__, { 13/* harmony export */ EnhancerArray: () => (/* binding */ EnhancerArray), 14/* harmony export */ MiddlewareArray: () => (/* binding */ MiddlewareArray), 15/* harmony export */ SHOULD_AUTOBATCH: () => (/* binding */ SHOULD_AUTOBATCH), 16/* harmony export */ TaskAbortError: () => (/* binding */ TaskAbortError), 17/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.__DO_NOT_USE__ActionTypes), 18/* harmony export */ addListener: () => (/* binding */ addListener), 19/* harmony export */ applyMiddleware: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware), 20/* harmony export */ autoBatchEnhancer: () => (/* binding */ autoBatchEnhancer), 21/* harmony export */ bindActionCreators: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.bindActionCreators), 22/* harmony export */ clearAllListeners: () => (/* binding */ clearAllListeners), 23/* harmony export */ combineReducers: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers), 24/* harmony export */ compose: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.compose), 25/* harmony export */ configureStore: () => (/* binding */ configureStore), 26/* harmony export */ createAction: () => (/* binding */ createAction), 27/* harmony export */ createActionCreatorInvariantMiddleware: () => (/* binding */ createActionCreatorInvariantMiddleware), 28/* harmony export */ createAsyncThunk: () => (/* binding */ createAsyncThunk), 29/* harmony export */ createDraftSafeSelector: () => (/* binding */ createDraftSafeSelector), 30/* harmony export */ createEntityAdapter: () => (/* binding */ createEntityAdapter), 31/* harmony export */ createImmutableStateInvariantMiddleware: () => (/* binding */ createImmutableStateInvariantMiddleware), 32/* harmony export */ createListenerMiddleware: () => (/* binding */ createListenerMiddleware), 33/* harmony export */ createNextState: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__["default"]), 34/* harmony export */ createReducer: () => (/* binding */ createReducer), 35/* harmony export */ createSelector: () => (/* reexport safe */ reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector), 36/* harmony export */ createSerializableStateInvariantMiddleware: () => (/* binding */ createSerializableStateInvariantMiddleware), 37/* harmony export */ createSlice: () => (/* binding */ createSlice), 38/* harmony export */ createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.createStore), 39/* harmony export */ current: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.current), 40/* harmony export */ findNonSerializableValue: () => (/* binding */ findNonSerializableValue), 41/* harmony export */ freeze: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.freeze), 42/* harmony export */ getDefaultMiddleware: () => (/* binding */ getDefaultMiddleware), 43/* harmony export */ getType: () => (/* binding */ getType), 44/* harmony export */ isAction: () => (/* binding */ isAction), 45/* harmony export */ isActionCreator: () => (/* binding */ isActionCreator), 46/* harmony export */ isAllOf: () => (/* binding */ isAllOf), 47/* harmony export */ isAnyOf: () => (/* binding */ isAnyOf), 48/* harmony export */ isAsyncThunkAction: () => (/* binding */ isAsyncThunkAction), 49/* harmony export */ isDraft: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.isDraft), 50/* harmony export */ isFluxStandardAction: () => (/* binding */ isFSA), 51/* harmony export */ isFulfilled: () => (/* binding */ isFulfilled), 52/* harmony export */ isImmutableDefault: () => (/* binding */ isImmutableDefault), 53/* harmony export */ isPending: () => (/* binding */ isPending), 54/* harmony export */ isPlain: () => (/* binding */ isPlain), 55/* harmony export */ isPlainObject: () => (/* binding */ isPlainObject), 56/* harmony export */ isRejected: () => (/* binding */ isRejected), 57/* harmony export */ isRejectedWithValue: () => (/* binding */ isRejectedWithValue), 58/* harmony export */ legacy_createStore: () => (/* reexport safe */ redux__WEBPACK_IMPORTED_MODULE_0__.legacy_createStore), 59/* harmony export */ miniSerializeError: () => (/* binding */ miniSerializeError), 60/* harmony export */ nanoid: () => (/* binding */ nanoid), 61/* harmony export */ original: () => (/* reexport safe */ immer__WEBPACK_IMPORTED_MODULE_2__.original), 62/* harmony export */ prepareAutoBatched: () => (/* binding */ prepareAutoBatched), 63/* harmony export */ removeListener: () => (/* binding */ removeListener), 64/* harmony export */ unwrapResult: () => (/* binding */ unwrapResult) 65/* harmony export */ }); 66/* harmony import */ var immer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! immer */ "./node_modules/immer/dist/immer.esm.mjs"); 67/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! redux */ "./node_modules/redux/es/redux.js"); 68/* harmony import */ var reselect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! reselect */ "./node_modules/reselect/es/index.js"); 69/* harmony import */ var redux_thunk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! redux-thunk */ "./node_modules/redux-thunk/es/index.js"); 70var __extends = (undefined && undefined.__extends) || (function () { 71 var extendStatics = function (d, b) { 72 extendStatics = Object.setPrototypeOf || 73 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || 74 function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 75 return extendStatics(d, b); 76 }; 77 return function (d, b) { 78 if (typeof b !== "function" && b !== null) 79 throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); 80 extendStatics(d, b); 81 function __() { this.constructor = d; } 82 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); 83 }; 84})(); 85var __generator = (undefined && undefined.__generator) || function (thisArg, body) { 86 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; 87 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; 88 function verb(n) { return function (v) { return step([n, v]); }; } 89 function step(op) { 90 if (f) throw new TypeError("Generator is already executing."); 91 while (_) try { 92 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; 93 if (y = 0, t) op = [op[0] & 2, t.value]; 94 switch (op[0]) { 95 case 0: case 1: t = op; break; 96 case 4: _.label++; return { value: op[1], done: false }; 97 case 5: _.label++; y = op[1]; op = [0]; continue; 98 case 7: op = _.ops.pop(); _.trys.pop(); continue; 99 default: 100 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } 101 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } 102 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } 103 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } 104 if (t[2]) _.ops.pop(); 105 _.trys.pop(); continue; 106 } 107 op = body.call(thisArg, _); 108 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } 109 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; 110 } 111}; 112var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from) { 113 for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) 114 to[j] = from[i]; 115 return to; 116}; 117var __defProp = Object.defineProperty; 118var __defProps = Object.defineProperties; 119var __getOwnPropDescs = Object.getOwnPropertyDescriptors; 120var __getOwnPropSymbols = Object.getOwnPropertySymbols; 121var __hasOwnProp = Object.prototype.hasOwnProperty; 122var __propIsEnum = Object.prototype.propertyIsEnumerable; 123var __defNormalProp = function (obj, key, value) { return key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value: value }) : obj[key] = value; }; 124var __spreadValues = function (a, b) { 125 for (var prop in b || (b = {})) 126 if (__hasOwnProp.call(b, prop)) 127 __defNormalProp(a, prop, b[prop]); 128 if (__getOwnPropSymbols) 129 for (var _i = 0, _c = __getOwnPropSymbols(b); _i < _c.length; _i++) { 130 var prop = _c[_i]; 131 if (__propIsEnum.call(b, prop)) 132 __defNormalProp(a, prop, b[prop]); 133 } 134 return a; 135}; 136var __spreadProps = function (a, b) { return __defProps(a, __getOwnPropDescs(b)); }; 137var __async = function (__this, __arguments, generator) { 138 return new Promise(function (resolve, reject) { 139 var fulfilled = function (value) { 140 try { 141 step(generator.next(value)); 142 } 143 catch (e) { 144 reject(e); 145 } 146 }; 147 var rejected = function (value) { 148 try { 149 step(generator.throw(value)); 150 } 151 catch (e) { 152 reject(e); 153 } 154 }; 155 var step = function (x) { return x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); }; 156 step((generator = generator.apply(__this, __arguments)).next()); 157 }); 158}; 159// src/index.ts 160 161 162 163 164// src/createDraftSafeSelector.ts 165 166 167var createDraftSafeSelector = function () { 168 var args = []; 169 for (var _i = 0; _i < arguments.length; _i++) { 170 args[_i] = arguments[_i]; 171 } 172 var selector = reselect__WEBPACK_IMPORTED_MODULE_1__.createSelector.apply(void 0, args); 173 var wrappedSelector = function (value) { 174 var rest = []; 175 for (var _i = 1; _i < arguments.length; _i++) { 176 rest[_i - 1] = arguments[_i]; 177 } 178 return selector.apply(void 0, __spreadArray([(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(value) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__.current)(value) : value], rest)); 179 }; 180 return wrappedSelector; 181}; 182// src/configureStore.ts 183 184// src/devtoolsExtension.ts 185 186var composeWithDevTools = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ : function () { 187 if (arguments.length === 0) 188 return void 0; 189 if (typeof arguments[0] === "object") 190 return redux__WEBPACK_IMPORTED_MODULE_0__.compose; 191 return redux__WEBPACK_IMPORTED_MODULE_0__.compose.apply(null, arguments); 192}; 193var devToolsEnhancer = typeof window !== "undefined" && window.__REDUX_DEVTOOLS_EXTENSION__ ? window.__REDUX_DEVTOOLS_EXTENSION__ : function () { 194 return function (noop2) { 195 return noop2; 196 }; 197}; 198// src/isPlainObject.ts 199function isPlainObject(value) { 200 if (typeof value !== "object" || value === null) 201 return false; 202 var proto = Object.getPrototypeOf(value); 203 if (proto === null) 204 return true; 205 var baseProto = proto; 206 while (Object.getPrototypeOf(baseProto) !== null) { 207 baseProto = Object.getPrototypeOf(baseProto); 208 } 209 return proto === baseProto; 210} 211// src/getDefaultMiddleware.ts 212 213// src/tsHelpers.ts 214var hasMatchFunction = function (v) { 215 return v && typeof v.match === "function"; 216}; 217// src/createAction.ts 218function createAction(type, prepareAction) { 219 function actionCreator() { 220 var args = []; 221 for (var _i = 0; _i < arguments.length; _i++) { 222 args[_i] = arguments[_i]; 223 } 224 if (prepareAction) { 225 var prepared = prepareAction.apply(void 0, args); 226 if (!prepared) { 227 throw new Error("prepareAction did not return an object"); 228 } 229 return __spreadValues(__spreadValues({ 230 type: type, 231 payload: prepared.payload 232 }, "meta" in prepared && { meta: prepared.meta }), "error" in prepared && { error: prepared.error }); 233 } 234 return { type: type, payload: args[0] }; 235 } 236 actionCreator.toString = function () { return "" + type; }; 237 actionCreator.type = type; 238 actionCreator.match = function (action) { return action.type === type; }; 239 return actionCreator; 240} 241function isAction(action) { 242 return isPlainObject(action) && "type" in action; 243} 244function isActionCreator(action) { 245 return typeof action === "function" && "type" in action && hasMatchFunction(action); 246} 247function isFSA(action) { 248 return isAction(action) && typeof action.type === "string" && Object.keys(action).every(isValidKey); 249} 250function isValidKey(key) { 251 return ["type", "payload", "error", "meta"].indexOf(key) > -1; 252} 253function getType(actionCreator) { 254 return "" + actionCreator; 255} 256// src/actionCreatorInvariantMiddleware.ts 257function getMessage(type) { 258 var splitType = type ? ("" + type).split("/") : []; 259 var actionName = splitType[splitType.length - 1] || "actionCreator"; 260 return "Detected an action creator with type \"" + (type || "unknown") + "\" being dispatched. \nMake sure you're calling the action creator before dispatching, i.e. `dispatch(" + actionName + "())` instead of `dispatch(" + actionName + ")`. This is necessary even if the action has no payload."; 261} 262function createActionCreatorInvariantMiddleware(options) { 263 if (options === void 0) { options = {}; } 264 if (false) {} 265 var _c = options.isActionCreator, isActionCreator2 = _c === void 0 ? isActionCreator : _c; 266 return function () { return function (next) { return function (action) { 267 if (isActionCreator2(action)) { 268 console.warn(getMessage(action.type)); 269 } 270 return next(action); 271 }; }; }; 272} 273// src/utils.ts 274 275function getTimeMeasureUtils(maxDelay, fnName) { 276 var elapsed = 0; 277 return { 278 measureTime: function (fn) { 279 var started = Date.now(); 280 try { 281 return fn(); 282 } 283 finally { 284 var finished = Date.now(); 285 elapsed += finished - started; 286 } 287 }, 288 warnIfExceeded: function () { 289 if (elapsed > maxDelay) { 290 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."); 291 } 292 } 293 }; 294} 295var MiddlewareArray = /** @class */ (function (_super) { 296 __extends(MiddlewareArray, _super); 297 function MiddlewareArray() { 298 var args = []; 299 for (var _i = 0; _i < arguments.length; _i++) { 300 args[_i] = arguments[_i]; 301 } 302 var _this = _super.apply(this, args) || this; 303 Object.setPrototypeOf(_this, MiddlewareArray.prototype); 304 return _this; 305 } 306 Object.defineProperty(MiddlewareArray, Symbol.species, { 307 get: function () { 308 return MiddlewareArray; 309 }, 310 enumerable: false, 311 configurable: true 312 }); 313 MiddlewareArray.prototype.concat = function () { 314 var arr = []; 315 for (var _i = 0; _i < arguments.length; _i++) { 316 arr[_i] = arguments[_i]; 317 } 318 return _super.prototype.concat.apply(this, arr); 319 }; 320 MiddlewareArray.prototype.prepend = function () { 321 var arr = []; 322 for (var _i = 0; _i < arguments.length; _i++) { 323 arr[_i] = arguments[_i]; 324 } 325 if (arr.length === 1 && Array.isArray(arr[0])) { 326 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr[0].concat(this))))(); 327 } 328 return new (MiddlewareArray.bind.apply(MiddlewareArray, __spreadArray([void 0], arr.concat(this))))(); 329 }; 330 return MiddlewareArray; 331}(Array)); 332var EnhancerArray = /** @class */ (function (_super) { 333 __extends(EnhancerArray, _super); 334 function EnhancerArray() { 335 var args = []; 336 for (var _i = 0; _i < arguments.length; _i++) { 337 args[_i] = arguments[_i]; 338 } 339 var _this = _super.apply(this, args) || this; 340 Object.setPrototypeOf(_this, EnhancerArray.prototype); 341 return _this; 342 } 343 Object.defineProperty(EnhancerArray, Symbol.species, { 344 get: function () { 345 return EnhancerArray; 346 }, 347 enumerable: false, 348 configurable: true 349 }); 350 EnhancerArray.prototype.concat = function () { 351 var arr = []; 352 for (var _i = 0; _i < arguments.length; _i++) { 353 arr[_i] = arguments[_i]; 354 } 355 return _super.prototype.concat.apply(this, arr); 356 }; 357 EnhancerArray.prototype.prepend = function () { 358 var arr = []; 359 for (var _i = 0; _i < arguments.length; _i++) { 360 arr[_i] = arguments[_i]; 361 } 362 if (arr.length === 1 && Array.isArray(arr[0])) { 363 return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr[0].concat(this))))(); 364 } 365 return new (EnhancerArray.bind.apply(EnhancerArray, __spreadArray([void 0], arr.concat(this))))(); 366 }; 367 return EnhancerArray; 368}(Array)); 369function freezeDraftable(val) { 370 return (0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(val) ? (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(val, function () { 371 }) : val; 372} 373// src/immutableStateInvariantMiddleware.ts 374var isProduction = "development" === "production"; 375var prefix = "Invariant failed"; 376function invariant(condition, message) { 377 if (condition) { 378 return; 379 } 380 if (isProduction) { 381 throw new Error(prefix); 382 } 383 throw new Error(prefix + ": " + (message || "")); 384} 385function stringify(obj, serializer, indent, decycler) { 386 return JSON.stringify(obj, getSerialize(serializer, decycler), indent); 387} 388function getSerialize(serializer, decycler) { 389 var stack = [], keys = []; 390 if (!decycler) 391 decycler = function (_, value) { 392 if (stack[0] === value) 393 return "[Circular ~]"; 394 return "[Circular ~." + keys.slice(0, stack.indexOf(value)).join(".") + "]"; 395 }; 396 return function (key, value) { 397 if (stack.length > 0) { 398 var thisPos = stack.indexOf(this); 399 ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); 400 ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); 401 if (~stack.indexOf(value)) 402 value = decycler.call(this, key, value); 403 } 404 else 405 stack.push(value); 406 return serializer == null ? value : serializer.call(this, key, value); 407 }; 408} 409function isImmutableDefault(value) { 410 return typeof value !== "object" || value == null || Object.isFrozen(value); 411} 412function trackForMutations(isImmutable, ignorePaths, obj) { 413 var trackedProperties = trackProperties(isImmutable, ignorePaths, obj); 414 return { 415 detectMutations: function () { 416 return detectMutations(isImmutable, ignorePaths, trackedProperties, obj); 417 } 418 }; 419} 420function trackProperties(isImmutable, ignorePaths, obj, path, checkedObjects) { 421 if (ignorePaths === void 0) { ignorePaths = []; } 422 if (path === void 0) { path = ""; } 423 if (checkedObjects === void 0) { checkedObjects = new Set(); } 424 var tracked = { value: obj }; 425 if (!isImmutable(obj) && !checkedObjects.has(obj)) { 426 checkedObjects.add(obj); 427 tracked.children = {}; 428 for (var key in obj) { 429 var childPath = path ? path + "." + key : key; 430 if (ignorePaths.length && ignorePaths.indexOf(childPath) !== -1) { 431 continue; 432 } 433 tracked.children[key] = trackProperties(isImmutable, ignorePaths, obj[key], childPath); 434 } 435 } 436 return tracked; 437} 438function detectMutations(isImmutable, ignoredPaths, trackedProperty, obj, sameParentRef, path) { 439 if (ignoredPaths === void 0) { ignoredPaths = []; } 440 if (sameParentRef === void 0) { sameParentRef = false; } 441 if (path === void 0) { path = ""; } 442 var prevObj = trackedProperty ? trackedProperty.value : void 0; 443 var sameRef = prevObj === obj; 444 if (sameParentRef && !sameRef && !Number.isNaN(obj)) { 445 return { wasMutated: true, path: path }; 446 } 447 if (isImmutable(prevObj) || isImmutable(obj)) { 448 return { wasMutated: false }; 449 } 450 var keysToDetect = {}; 451 for (var key in trackedProperty.children) { 452 keysToDetect[key] = true; 453 } 454 for (var key in obj) { 455 keysToDetect[key] = true; 456 } 457 var hasIgnoredPaths = ignoredPaths.length > 0; 458 var _loop_1 = function (key) { 459 var nestedPath = path ? path + "." + key : key; 460 if (hasIgnoredPaths) { 461 var hasMatches = ignoredPaths.some(function (ignored) { 462 if (ignored instanceof RegExp) { 463 return ignored.test(nestedPath); 464 } 465 return nestedPath === ignored; 466 }); 467 if (hasMatches) { 468 return "continue"; 469 } 470 } 471 var result = detectMutations(isImmutable, ignoredPaths, trackedProperty.children[key], obj[key], sameRef, nestedPath); 472 if (result.wasMutated) { 473 return { value: result }; 474 } 475 }; 476 for (var key in keysToDetect) { 477 var state_1 = _loop_1(key); 478 if (typeof state_1 === "object") 479 return state_1.value; 480 } 481 return { wasMutated: false }; 482} 483function createImmutableStateInvariantMiddleware(options) { 484 if (options === void 0) { options = {}; } 485 if (false) {} 486 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; 487 ignoredPaths = ignoredPaths || ignore; 488 var track = trackForMutations.bind(null, isImmutable, ignoredPaths); 489 return function (_c) { 490 var getState = _c.getState; 491 var state = getState(); 492 var tracker = track(state); 493 var result; 494 return function (next) { return function (action) { 495 var measureUtils = getTimeMeasureUtils(warnAfter, "ImmutableStateInvariantMiddleware"); 496 measureUtils.measureTime(function () { 497 state = getState(); 498 result = tracker.detectMutations(); 499 tracker = track(state); 500 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)"); 501 }); 502 var dispatchedAction = next(action); 503 measureUtils.measureTime(function () { 504 state = getState(); 505 result = tracker.detectMutations(); 506 tracker = track(state); 507 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)"); 508 }); 509 measureUtils.warnIfExceeded(); 510 return dispatchedAction; 511 }; }; 512 }; 513} 514// src/serializableStateInvariantMiddleware.ts 515function isPlain(val) { 516 var type = typeof val; 517 return val == null || type === "string" || type === "boolean" || type === "number" || Array.isArray(val) || isPlainObject(val); 518} 519function findNonSerializableValue(value, path, isSerializable, getEntries, ignoredPaths, cache) { 520 if (path === void 0) { path = ""; } 521 if (isSerializable === void 0) { isSerializable = isPlain; } 522 if (ignoredPaths === void 0) { ignoredPaths = []; } 523 var foundNestedSerializable; 524 if (!isSerializable(value)) { 525 return { 526 keyPath: path || "<root>", 527 value: value 528 }; 529 } 530 if (typeof value !== "object" || value === null) { 531 return false; 532 } 533 if (cache == null ? void 0 : cache.has(value)) 534 return false; 535 var entries = getEntries != null ? getEntries(value) : Object.entries(value); 536 var hasIgnoredPaths = ignoredPaths.length > 0; 537 var _loop_2 = function (key, nestedValue) { 538 var nestedPath = path ? path + "." + key : key; 539 if (hasIgnoredPaths) { 540 var hasMatches = ignoredPaths.some(function (ignored) { 541 if (ignored instanceof RegExp) { 542 return ignored.test(nestedPath); 543 } 544 return nestedPath === ignored; 545 }); 546 if (hasMatches) { 547 return "continue"; 548 } 549 } 550 if (!isSerializable(nestedValue)) { 551 return { value: { 552 keyPath: nestedPath, 553 value: nestedValue 554 } }; 555 } 556 if (typeof nestedValue === "object") { 557 foundNestedSerializable = findNonSerializableValue(nestedValue, nestedPath, isSerializable, getEntries, ignoredPaths, cache); 558 if (foundNestedSerializable) { 559 return { value: foundNestedSerializable }; 560 } 561 } 562 }; 563 for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) { 564 var _c = entries_1[_i], key = _c[0], nestedValue = _c[1]; 565 var state_2 = _loop_2(key, nestedValue); 566 if (typeof state_2 === "object") 567 return state_2.value; 568 } 569 if (cache && isNestedFrozen(value)) 570 cache.add(value); 571 return false; 572} 573function isNestedFrozen(value) { 574 if (!Object.isFrozen(value)) 575 return false; 576 for (var _i = 0, _c = Object.values(value); _i < _c.length; _i++) { 577 var nestedValue = _c[_i]; 578 if (typeof nestedValue !== "object" || nestedValue === null) 579 continue; 580 if (!isNestedFrozen(nestedValue)) 581 return false; 582 } 583 return true; 584} 585function createSerializableStateInvariantMiddleware(options) { 586 if (options === void 0) { options = {}; } 587 if (false) {} 588 var _c = options.isSerializable, isSerializable = _c === void 0 ? isPlain : _c, getEntries = options.getEntries, _d = options.ignoredActions, ignoredActions = _d === void 0 ? [] : _d, _e = options.ignoredActionPaths, ignoredActionPaths = _e === void 0 ? ["meta.arg", "meta.baseQueryMeta"] : _e, _f = options.ignoredPaths, ignoredPaths = _f === void 0 ? [] : _f, _g = options.warnAfter, warnAfter = _g === void 0 ? 32 : _g, _h = options.ignoreState, ignoreState = _h === void 0 ? false : _h, _j = options.ignoreActions, ignoreActions = _j === void 0 ? false : _j, _k = options.disableCache, disableCache = _k === void 0 ? false : _k; 589 var cache = !disableCache && WeakSet ? new WeakSet() : void 0; 590 return function (storeAPI) { return function (next) { return function (action) { 591 var result = next(action); 592 var measureUtils = getTimeMeasureUtils(warnAfter, "SerializableStateInvariantMiddleware"); 593 if (!ignoreActions && !(ignoredActions.length && ignoredActions.indexOf(action.type) !== -1)) { 594 measureUtils.measureTime(function () { 595 var foundActionNonSerializableValue = findNonSerializableValue(action, "", isSerializable, getEntries, ignoredActionPaths, cache); 596 if (foundActionNonSerializableValue) { 597 var keyPath = foundActionNonSerializableValue.keyPath, value = foundActionNonSerializableValue.value; 598 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)"); 599 } 600 }); 601 } 602 if (!ignoreState) { 603 measureUtils.measureTime(function () { 604 var state = storeAPI.getState(); 605 var foundStateNonSerializableValue = findNonSerializableValue(state, "", isSerializable, getEntries, ignoredPaths, cache); 606 if (foundStateNonSerializableValue) { 607 var keyPath = foundStateNonSerializableValue.keyPath, value = foundStateNonSerializableValue.value; 608 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)"); 609 } 610 }); 611 measureUtils.warnIfExceeded(); 612 } 613 return result; 614 }; }; }; 615} 616// src/getDefaultMiddleware.ts 617function isBoolean(x) { 618 return typeof x === "boolean"; 619} 620function curryGetDefaultMiddleware() { 621 return function curriedGetDefaultMiddleware(options) { 622 return getDefaultMiddleware(options); 623 }; 624} 625function getDefaultMiddleware(options) { 626 if (options === void 0) { options = {}; } 627 var _c = options.thunk, thunk = _c === void 0 ? true : _c, _d = options.immutableCheck, immutableCheck = _d === void 0 ? true : _d, _e = options.serializableCheck, serializableCheck = _e === void 0 ? true : _e, _f = options.actionCreatorCheck, actionCreatorCheck = _f === void 0 ? true : _f; 628 var middlewareArray = new MiddlewareArray(); 629 if (thunk) { 630 if (isBoolean(thunk)) { 631 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"]); 632 } 633 else { 634 middlewareArray.push(redux_thunk__WEBPACK_IMPORTED_MODULE_3__["default"].withExtraArgument(thunk.extraArgument)); 635 } 636 } 637 if (true) { 638 if (immutableCheck) { 639 var immutableOptions = {}; 640 if (!isBoolean(immutableCheck)) { 641 immutableOptions = immutableCheck; 642 } 643 middlewareArray.unshift(createImmutableStateInvariantMiddleware(immutableOptions)); 644 } 645 if (serializableCheck) { 646 var serializableOptions = {}; 647 if (!isBoolean(serializableCheck)) { 648 serializableOptions = serializableCheck; 649 } 650 middlewareArray.push(createSerializableStateInvariantMiddleware(serializableOptions)); 651 } 652 if (actionCreatorCheck) { 653 var actionCreatorOptions = {}; 654 if (!isBoolean(actionCreatorCheck)) { 655 actionCreatorOptions = actionCreatorCheck; 656 } 657 middlewareArray.unshift(createActionCreatorInvariantMiddleware(actionCreatorOptions)); 658 } 659 } 660 return middlewareArray; 661} 662// src/configureStore.ts 663var IS_PRODUCTION = "development" === "production"; 664function configureStore(options) { 665 var curriedGetDefaultMiddleware = curryGetDefaultMiddleware(); 666 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; 667 var rootReducer; 668 if (typeof reducer === "function") { 669 rootReducer = reducer; 670 } 671 else if (isPlainObject(reducer)) { 672 rootReducer = (0,redux__WEBPACK_IMPORTED_MODULE_0__.combineReducers)(reducer); 673 } 674 else { 675 throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers'); 676 } 677 var finalMiddleware = middleware; 678 if (typeof finalMiddleware === "function") { 679 finalMiddleware = finalMiddleware(curriedGetDefaultMiddleware); 680 if (!IS_PRODUCTION && !Array.isArray(finalMiddleware)) { 681 throw new Error("when using a middleware builder function, an array of middleware must be returned"); 682 } 683 } 684 if (!IS_PRODUCTION && finalMiddleware.some(function (item) { return typeof item !== "function"; })) { 685 throw new Error("each middleware provided to configureStore must be a function"); 686 } 687 var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__.applyMiddleware.apply(void 0, finalMiddleware); 688 var finalCompose = redux__WEBPACK_IMPORTED_MODULE_0__.compose; 689 if (devTools) { 690 finalCompose = composeWithDevTools(__spreadValues({ 691 trace: !IS_PRODUCTION 692 }, typeof devTools === "object" && devTools)); 693 } 694 var defaultEnhancers = new EnhancerArray(middlewareEnhancer); 695 var storeEnhancers = defaultEnhancers; 696 if (Array.isArray(enhancers)) { 697 storeEnhancers = __spreadArray([middlewareEnhancer], enhancers); 698 } 699 else if (typeof enhancers === "function") { 700 storeEnhancers = enhancers(defaultEnhancers); 701 } 702 var composedEnhancer = finalCompose.apply(void 0, storeEnhancers); 703 return (0,redux__WEBPACK_IMPORTED_MODULE_0__.createStore)(rootReducer, preloadedState, composedEnhancer); 704} 705// src/createReducer.ts 706 707// src/mapBuilders.ts 708function executeReducerBuilderCallback(builderCallback) { 709 var actionsMap = {}; 710 var actionMatchers = []; 711 var defaultCaseReducer; 712 var builder = { 713 addCase: function (typeOrActionCreator, reducer) { 714 if (true) { 715 if (actionMatchers.length > 0) { 716 throw new Error("`builder.addCase` should only be called before calling `builder.addMatcher`"); 717 } 718 if (defaultCaseReducer) { 719 throw new Error("`builder.addCase` should only be called before calling `builder.addDefaultCase`"); 720 } 721 } 722 var type = typeof typeOrActionCreator === "string" ? typeOrActionCreator : typeOrActionCreator.type; 723 if (!type) { 724 throw new Error("`builder.addCase` cannot be called with an empty action type"); 725 } 726 if (type in actionsMap) { 727 throw new Error("`builder.addCase` cannot be called with two reducers for the same action type"); 728 } 729 actionsMap[type] = reducer; 730 return builder; 731 }, 732 addMatcher: function (matcher, reducer) { 733 if (true) { 734 if (defaultCaseReducer) { 735 throw new Error("`builder.addMatcher` should only be called before calling `builder.addDefaultCase`"); 736 } 737 } 738 actionMatchers.push({ matcher: matcher, reducer: reducer }); 739 return builder; 740 }, 741 addDefaultCase: function (reducer) { 742 if (true) { 743 if (defaultCaseReducer) { 744 throw new Error("`builder.addDefaultCase` can only be called once"); 745 } 746 } 747 defaultCaseReducer = reducer; 748 return builder; 749 } 750 }; 751 builderCallback(builder); 752 return [actionsMap, actionMatchers, defaultCaseReducer]; 753} 754// src/createReducer.ts 755function isStateFunction(x) { 756 return typeof x === "function"; 757} 758var hasWarnedAboutObjectNotation = false; 759function createReducer(initialState, mapOrBuilderCallback, actionMatchers, defaultCaseReducer) { 760 if (actionMatchers === void 0) { actionMatchers = []; } 761 if (true) { 762 if (typeof mapOrBuilderCallback === "object") { 763 if (!hasWarnedAboutObjectNotation) { 764 hasWarnedAboutObjectNotation = true; 765 console.warn("The object notation for `createReducer` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer"); 766 } 767 } 768 } 769 var _c = typeof mapOrBuilderCallback === "function" ? executeReducerBuilderCallback(mapOrBuilderCallback) : [mapOrBuilderCallback, actionMatchers, defaultCaseReducer], actionsMap = _c[0], finalActionMatchers = _c[1], finalDefaultCaseReducer = _c[2]; 770 var getInitialState; 771 if (isStateFunction(initialState)) { 772 getInitialState = function () { return freezeDraftable(initialState()); }; 773 } 774 else { 775 var frozenInitialState_1 = freezeDraftable(initialState); 776 getInitialState = function () { return frozenInitialState_1; }; 777 } 778 function reducer(state, action) { 779 if (state === void 0) { state = getInitialState(); } 780 var caseReducers = __spreadArray([ 781 actionsMap[action.type] 782 ], finalActionMatchers.filter(function (_c) { 783 var matcher = _c.matcher; 784 return matcher(action); 785 }).map(function (_c) { 786 var reducer2 = _c.reducer; 787 return reducer2; 788 })); 789 if (caseReducers.filter(function (cr) { return !!cr; }).length === 0) { 790 caseReducers = [finalDefaultCaseReducer]; 791 } 792 return caseReducers.reduce(function (previousState, caseReducer) { 793 if (caseReducer) { 794 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(previousState)) { 795 var draft = previousState; 796 var result = caseReducer(draft, action); 797 if (result === void 0) { 798 return previousState; 799 } 800 return result; 801 } 802 else if (!(0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraftable)(previousState)) { 803 var result = caseReducer(previousState, action); 804 if (result === void 0) { 805 if (previousState === null) { 806 return previousState; 807 } 808 throw Error("A case reducer on a non-draftable value must not return undefined"); 809 } 810 return result; 811 } 812 else { 813 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(previousState, function (draft) { 814 return caseReducer(draft, action); 815 }); 816 } 817 } 818 return previousState; 819 }, state); 820 } 821 reducer.getInitialState = getInitialState; 822 return reducer; 823} 824// src/createSlice.ts 825var hasWarnedAboutObjectNotation2 = false; 826function getType2(slice, actionKey) { 827 return slice + "/" + actionKey; 828} 829function createSlice(options) { 830 var name = options.name; 831 if (!name) { 832 throw new Error("`name` is a required option for createSlice"); 833 } 834 if (typeof process !== "undefined" && "development" === "development") { 835 if (options.initialState === void 0) { 836 console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`"); 837 } 838 } 839 var initialState = typeof options.initialState == "function" ? options.initialState : freezeDraftable(options.initialState); 840 var reducers = options.reducers || {}; 841 var reducerNames = Object.keys(reducers); 842 var sliceCaseReducersByName = {}; 843 var sliceCaseReducersByType = {}; 844 var actionCreators = {}; 845 reducerNames.forEach(function (reducerName) { 846 var maybeReducerWithPrepare = reducers[reducerName]; 847 var type = getType2(name, reducerName); 848 var caseReducer; 849 var prepareCallback; 850 if ("reducer" in maybeReducerWithPrepare) { 851 caseReducer = maybeReducerWithPrepare.reducer; 852 prepareCallback = maybeReducerWithPrepare.prepare; 853 } 854 else { 855 caseReducer = maybeReducerWithPrepare; 856 } 857 sliceCaseReducersByName[reducerName] = caseReducer; 858 sliceCaseReducersByType[type] = caseReducer; 859 actionCreators[reducerName] = prepareCallback ? createAction(type, prepareCallback) : createAction(type); 860 }); 861 function buildReducer() { 862 if (true) { 863 if (typeof options.extraReducers === "object") { 864 if (!hasWarnedAboutObjectNotation2) { 865 hasWarnedAboutObjectNotation2 = true; 866 console.warn("The object notation for `createSlice.extraReducers` is deprecated, and will be removed in RTK 2.0. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice"); 867 } 868 } 869 } 870 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; 871 var finalCaseReducers = __spreadValues(__spreadValues({}, extraReducers), sliceCaseReducersByType); 872 return createReducer(initialState, function (builder) { 873 for (var key in finalCaseReducers) { 874 builder.addCase(key, finalCaseReducers[key]); 875 } 876 for (var _i = 0, actionMatchers_1 = actionMatchers; _i < actionMatchers_1.length; _i++) { 877 var m = actionMatchers_1[_i]; 878 builder.addMatcher(m.matcher, m.reducer); 879 } 880 if (defaultCaseReducer) { 881 builder.addDefaultCase(defaultCaseReducer); 882 } 883 }); 884 } 885 var _reducer; 886 return { 887 name: name, 888 reducer: function (state, action) { 889 if (!_reducer) 890 _reducer = buildReducer(); 891 return _reducer(state, action); 892 }, 893 actions: actionCreators, 894 caseReducers: sliceCaseReducersByName, 895 getInitialState: function () { 896 if (!_reducer) 897 _reducer = buildReducer(); 898 return _reducer.getInitialState(); 899 } 900 }; 901} 902// src/entities/entity_state.ts 903function getInitialEntityState() { 904 return { 905 ids: [], 906 entities: {} 907 }; 908} 909function createInitialStateFactory() { 910 function getInitialState(additionalState) { 911 if (additionalState === void 0) { additionalState = {}; } 912 return Object.assign(getInitialEntityState(), additionalState); 913 } 914 return { getInitialState: getInitialState }; 915} 916// src/entities/state_selectors.ts 917function createSelectorsFactory() { 918 function getSelectors(selectState) { 919 var selectIds = function (state) { return state.ids; }; 920 var selectEntities = function (state) { return state.entities; }; 921 var selectAll = createDraftSafeSelector(selectIds, selectEntities, function (ids, entities) { return ids.map(function (id) { return entities[id]; }); }); 922 var selectId = function (_, id) { return id; }; 923 var selectById = function (entities, id) { return entities[id]; }; 924 var selectTotal = createDraftSafeSelector(selectIds, function (ids) { return ids.length; }); 925 if (!selectState) { 926 return { 927 selectIds: selectIds, 928 selectEntities: selectEntities, 929 selectAll: selectAll, 930 selectTotal: selectTotal, 931 selectById: createDraftSafeSelector(selectEntities, selectId, selectById) 932 }; 933 } 934 var selectGlobalizedEntities = createDraftSafeSelector(selectState, selectEntities); 935 return { 936 selectIds: createDraftSafeSelector(selectState, selectIds), 937 selectEntities: selectGlobalizedEntities, 938 selectAll: createDraftSafeSelector(selectState, selectAll), 939 selectTotal: createDraftSafeSelector(selectState, selectTotal), 940 selectById: createDraftSafeSelector(selectGlobalizedEntities, selectId, selectById) 941 }; 942 } 943 return { getSelectors: getSelectors }; 944} 945// src/entities/state_adapter.ts 946 947function createSingleArgumentStateOperator(mutator) { 948 var operator = createStateOperator(function (_, state) { return mutator(state); }); 949 return function operation(state) { 950 return operator(state, void 0); 951 }; 952} 953function createStateOperator(mutator) { 954 return function operation(state, arg) { 955 function isPayloadActionArgument(arg2) { 956 return isFSA(arg2); 957 } 958 var runMutator = function (draft) { 959 if (isPayloadActionArgument(arg)) { 960 mutator(arg.payload, draft); 961 } 962 else { 963 mutator(arg, draft); 964 } 965 }; 966 if ((0,immer__WEBPACK_IMPORTED_MODULE_2__.isDraft)(state)) { 967 runMutator(state); 968 return state; 969 } 970 else { 971 return (0,immer__WEBPACK_IMPORTED_MODULE_2__["default"])(state, runMutator); 972 } 973 }; 974} 975// src/entities/utils.ts 976function selectIdValue(entity, selectId) { 977 var key = selectId(entity); 978 if ( true && key === void 0) { 979 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()); 980 } 981 return key; 982} 983function ensureEntitiesArray(entities) { 984 if (!Array.isArray(entities)) { 985 entities = Object.values(entities); 986 } 987 return entities; 988} 989function splitAddedUpdatedEntities(newEntities, selectId, state) { 990 newEntities = ensureEntitiesArray(newEntities); 991 var added = []; 992 var updated = []; 993 for (var _i = 0, newEntities_1 = newEntities; _i < newEntities_1.length; _i++) { 994 var entity = newEntities_1[_i]; 995 var id = selectIdValue(entity, selectId); 996 if (id in state.entities) { 997 updated.push({ id: id, changes: entity }); 998 } 999 else { 1000 added.push(entity); 1001 } 1002 } 1003 return [added, updated]; 1004} 1005// src/entities/unsorted_state_adapter.ts 1006function createUnsortedStateAdapter(selectId) { 1007 function addOneMutably(entity, state) { 1008 var key = selectIdValue(entity, selectId); 1009 if (key in state.entities) { 1010 return; 1011 } 1012 state.ids.push(key); 1013 state.entities[key] = entity; 1014 } 1015 function addManyMutably(newEntities, state) { 1016 newEntities = ensureEntitiesArray(newEntities); 1017 for (var _i = 0, newEntities_2 = newEntities; _i < newEntities_2.length; _i++) { 1018 var entity = newEntities_2[_i]; 1019 addOneMutably(entity, state); 1020 } 1021 } 1022 function setOneMutably(entity, state) { 1023 var key = selectIdValue(entity, selectId); 1024 if (!(key in state.entities)) { 1025 state.ids.push(key); 1026 } 1027 state.entities[key] = entity; 1028 } 1029 function setManyMutably(newEntities, state) { 1030 newEntities = ensureEntitiesArray(newEntities); 1031 for (var _i = 0, newEntities_3 = newEntities; _i < newEntities_3.length; _i++) { 1032 var entity = newEntities_3[_i]; 1033 setOneMutably(entity, state); 1034 } 1035 } 1036 function setAllMutably(newEntities, state) { 1037 newEntities = ensureEntitiesArray(newEntities); 1038 state.ids = []; 1039 state.entities = {}; 1040 addManyMutably(newEntities, state); 1041 } 1042 function removeOneMutably(key, state) { 1043 return removeManyMutably([key], state); 1044 } 1045 function removeManyMutably(keys, state) { 1046 var didMutate = false; 1047 keys.forEach(function (key) { 1048 if (key in state.entities) { 1049 delete state.entities[key]; 1050 didMutate = true; 1051 } 1052 }); 1053 if (didMutate) { 1054 state.ids = state.ids.filter(function (id) { return id in state.entities; }); 1055 } 1056 } 1057 function removeAllMutably(state) { 1058 Object.assign(state, { 1059 ids: [], 1060 entities: {} 1061 }); 1062 } 1063 function takeNewKey(keys, update, state) { 1064 var original2 = state.entities[update.id]; 1065 var updated = Object.assign({}, original2, update.changes); 1066 var newKey = selectIdValue(updated, selectId); 1067 var hasNewKey = newKey !== update.id; 1068 if (hasNewKey) { 1069 keys[update.id] = newKey; 1070 delete state.entities[update.id]; 1071 } 1072 state.entities[newKey] = updated; 1073 return hasNewKey; 1074 } 1075 function updateOneMutably(update, state) { 1076 return updateManyMutably([update], state); 1077 } 1078 function updateManyMutably(updates, state) { 1079 var newKeys = {}; 1080 var updatesPerEntity = {}; 1081 updates.forEach(function (update) { 1082 if (update.id in state.entities) { 1083 updatesPerEntity[update.id] = { 1084 id: update.id, 1085 changes: __spreadValues(__spreadValues({}, updatesPerEntity[update.id] ? updatesPerEntity[update.id].changes : null), update.changes) 1086 }; 1087 } 1088 }); 1089 updates = Object.values(updatesPerEntity); 1090 var didMutateEntities = updates.length > 0; 1091 if (didMutateEntities) { 1092 var didMutateIds = updates.filter(function (update) { return takeNewKey(newKeys, update, state); }).length > 0; 1093 if (didMutateIds) { 1094 state.ids = Object.keys(state.entities); 1095 } 1096 } 1097 } 1098 function upsertOneMutably(entity, state) { 1099 return upsertManyMutably([entity], state); 1100 } 1101 function upsertManyMutably(newEntities, state) { 1102 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; 1103 updateManyMutably(updated, state); 1104 addManyMutably(added, state); 1105 } 1106 return { 1107 removeAll: createSingleArgumentStateOperator(removeAllMutably), 1108 addOne: createStateOperator(addOneMutably), 1109 addMany: createStateOperator(addManyMutably), 1110 setOne: createStateOperator(setOneMutably), 1111 setMany: createStateOperator(setManyMutably), 1112 setAll: createStateOperator(setAllMutably), 1113 updateOne: createStateOperator(updateOneMutably), 1114 updateMany: createStateOperator(updateManyMutably), 1115 upsertOne: createStateOperator(upsertOneMutably), 1116 upsertMany: createStateOperator(upsertManyMutably), 1117 removeOne: createStateOperator(removeOneMutably), 1118 removeMany: createStateOperator(removeManyMutably) 1119 }; 1120} 1121// src/entities/sorted_state_adapter.ts 1122function createSortedStateAdapter(selectId, sort) { 1123 var _c = createUnsortedStateAdapter(selectId), removeOne = _c.removeOne, removeMany = _c.removeMany, removeAll = _c.removeAll; 1124 function addOneMutably(entity, state) { 1125 return addManyMutably([entity], state); 1126 } 1127 function addManyMutably(newEntities, state) { 1128 newEntities = ensureEntitiesArray(newEntities); 1129 var models = newEntities.filter(function (model) { return !(selectIdValue(model, selectId) in state.entities); }); 1130 if (models.length !== 0) { 1131 merge(models, state); 1132 } 1133 } 1134 function setOneMutably(entity, state) { 1135 return setManyMutably([entity], state); 1136 } 1137 function setManyMutably(newEntities, state) { 1138 newEntities = ensureEntitiesArray(newEntities); 1139 if (newEntities.length !== 0) { 1140 merge(newEntities, state); 1141 } 1142 } 1143 function setAllMutably(newEntities, state) { 1144 newEntities = ensureEntitiesArray(newEntities); 1145 state.entities = {}; 1146 state.ids = []; 1147 addManyMutably(newEntities, state); 1148 } 1149 function updateOneMutably(update, state) { 1150 return updateManyMutably([update], state); 1151 } 1152 function updateManyMutably(updates, state) { 1153 var appliedUpdates = false; 1154 for (var _i = 0, updates_1 = updates; _i < updates_1.length; _i++) { 1155 var update = updates_1[_i]; 1156 var entity = state.entities[update.id]; 1157 if (!entity) { 1158 continue; 1159 } 1160 appliedUpdates = true; 1161 Object.assign(entity, update.changes); 1162 var newId = selectId(entity); 1163 if (update.id !== newId) { 1164 delete state.entities[update.id]; 1165 state.entities[newId] = entity; 1166 } 1167 } 1168 if (appliedUpdates) { 1169 resortEntities(state); 1170 } 1171 } 1172 function upsertOneMutably(entity, state) { 1173 return upsertManyMutably([entity], state); 1174 } 1175 function upsertManyMutably(newEntities, state) { 1176 var _c = splitAddedUpdatedEntities(newEntities, selectId, state), added = _c[0], updated = _c[1]; 1177 updateManyMutably(updated, state); 1178 addManyMutably(added, state); 1179 } 1180 function areArraysEqual(a, b) { 1181 if (a.length !== b.length) { 1182 return false; 1183 } 1184 for (var i = 0; i < a.length && i < b.length; i++) { 1185 if (a[i] === b[i]) { 1186 continue; 1187 } 1188 return false; 1189 } 1190 return true; 1191 } 1192 function merge(models, state) { 1193 models.forEach(function (model) { 1194 state.entities[selectId(model)] = model; 1195 }); 1196 resortEntities(state); 1197 } 1198 function resortEntities(state) { 1199 var allEntities = Object.values(state.entities); 1200 allEntities.sort(sort); 1201 var newSortedIds = allEntities.map(selectId); 1202 var ids = state.ids; 1203 if (!areArraysEqual(ids, newSortedIds)) { 1204 state.ids = newSortedIds; 1205 } 1206 } 1207 return { 1208 removeOne: removeOne, 1209 removeMany: removeMany, 1210 removeAll: removeAll, 1211 addOne: createStateOperator(addOneMutably), 1212 updateOne: createStateOperator(updateOneMutably), 1213 upsertOne: createStateOperator(upsertOneMutably), 1214 setOne: createStateOperator(setOneMutably), 1215 setMany: createStateOperator(setManyMutably), 1216 setAll: createStateOperator(setAllMutably), 1217 addMany: createStateOperator(addManyMutably), 1218 updateMany: createStateOperator(updateManyMutably), 1219 upsertMany: createStateOperator(upsertManyMutably) 1220 }; 1221} 1222// src/entities/create_adapter.ts 1223function createEntityAdapter(options) { 1224 if (options === void 0) { options = {}; } 1225 var _c = __spreadValues({ 1226 sortComparer: false, 1227 selectId: function (instance) { return instance.id; } 1228 }, options), selectId = _c.selectId, sortComparer = _c.sortComparer; 1229 var stateFactory = createInitialStateFactory(); 1230 var selectorsFactory = createSelectorsFactory(); 1231 var stateAdapter = sortComparer ? createSortedStateAdapter(selectId, sortComparer) : createUnsortedStateAdapter(selectId); 1232 return __spreadValues(__spreadValues(__spreadValues({ 1233 selectId: selectId, 1234 sortComparer: sortComparer 1235 }, stateFactory), selectorsFactory), stateAdapter); 1236} 1237// src/nanoid.ts 1238var urlAlphabet = "ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"; 1239var nanoid = function (size) { 1240 if (size === void 0) { size = 21; } 1241 var id = ""; 1242 var i = size; 1243 while (i--) { 1244 id += urlAlphabet[Math.random() * 64 | 0]; 1245 } 1246 return id; 1247}; 1248// src/createAsyncThunk.ts 1249var commonProperties = [ 1250 "name", 1251 "message", 1252 "stack", 1253 "code" 1254]; 1255var RejectWithValue = /** @class */ (function () { 1256 function RejectWithValue(payload, meta) { 1257 this.payload = payload; 1258 this.meta = meta; 1259 } 1260 return RejectWithValue; 1261}()); 1262var FulfillWithMeta = /** @class */ (function () { 1263 function FulfillWithMeta(payload, meta) { 1264 this.payload = payload; 1265 this.meta = meta; 1266 } 1267 return FulfillWithMeta; 1268}()); 1269var miniSerializeError = function (value) { 1270 if (typeof value === "object" && value !== null) { 1271 var simpleError = {}; 1272 for (var _i = 0, commonProperties_1 = commonProperties; _i < commonProperties_1.length; _i++) { 1273 var property = commonProperties_1[_i]; 1274 if (typeof value[property] === "string") { 1275 simpleError[property] = value[property]; 1276 } 1277 } 1278 return simpleError; 1279 } 1280 return { message: String(value) }; 1281}; 1282var createAsyncThunk = (function () { 1283 function createAsyncThunk2(typePrefix, payloadCreator, options) { 1284 var fulfilled = createAction(typePrefix + "/fulfilled", function (payload, requestId, arg, meta) { return ({ 1285 payload: payload, 1286 meta: __spreadProps(__spreadValues({}, meta || {}), { 1287 arg: arg, 1288 requestId: requestId, 1289 requestStatus: "fulfilled" 1290 }) 1291 }); }); 1292 var pending = createAction(typePrefix + "/pending", function (requestId, arg, meta) { return ({ 1293 payload: void 0, 1294 meta: __spreadProps(__spreadValues({}, meta || {}), { 1295 arg: arg, 1296 requestId: requestId, 1297 requestStatus: "pending" 1298 }) 1299 }); }); 1300 var rejected = createAction(typePrefix + "/rejected", function (error, requestId, arg, payload, meta) { return ({ 1301 payload: payload, 1302 error: (options && options.serializeError || miniSerializeError)(error || "Rejected"), 1303 meta: __spreadProps(__spreadValues({}, meta || {}), { 1304 arg: arg, 1305 requestId: requestId, 1306 rejectedWithValue: !!payload, 1307 requestStatus: "rejected", 1308 aborted: (error == null ? void 0 : error.name) === "AbortError", 1309 condition: (error == null ? void 0 : error.name) === "ConditionError" 1310 }) 1311 }); }); 1312 var displayedWarning = false; 1313 var AC = typeof AbortController !== "undefined" ? AbortController : /** @class */ (function () { 1314 function class_1() { 1315 this.signal = { 1316 aborted: false, 1317 addEventListener: function () { 1318 }, 1319 dispatchEvent: function () { 1320 return false; 1321 }, 1322 onabort: function () { 1323 }, 1324 removeEventListener: function () { 1325 }, 1326 reason: void 0, 1327 throwIfAborted: function () { 1328 } 1329 }; 1330 } 1331 class_1.prototype.abort = function () { 1332 if (true) { 1333 if (!displayedWarning) { 1334 displayedWarning = true; 1335 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'."); 1336 } 1337 } 1338 }; 1339 return class_1; 1340 }()); 1341 function actionCreator(arg) { 1342 return function (dispatch, getState, extra) { 1343 var requestId = (options == null ? void 0 : options.idGenerator) ? options.idGenerator(arg) : nanoid(); 1344 var abortController = new AC(); 1345 var abortReason; 1346 var started = false; 1347 function abort(reason) { 1348 abortReason = reason; 1349 abortController.abort(); 1350 } 1351 var promise2 = function () { 1352 return __async(this, null, function () { 1353 var _a, _b, finalAction, conditionResult, abortedPromise, err_1, skipDispatch; 1354 return __generator(this, function (_c) { 1355 switch (_c.label) { 1356 case 0: 1357 _c.trys.push([0, 4, , 5]); 1358 conditionResult = (_a = options == null ? void 0 : options.condition) == null ? void 0 : _a.call(options, arg, { getState: getState, extra: extra }); 1359 if (!isThenable(conditionResult)) return [3 /*break*/, 2]; 1360 return [4 /*yield*/, conditionResult]; 1361 case 1: 1362 conditionResult = _c.sent(); 1363 _c.label = 2; 1364 case 2: 1365 if (conditionResult === false || abortController.signal.aborted) { 1366 throw { 1367 name: "ConditionError", 1368 message: "Aborted due to condition callback returning false." 1369 }; 1370 } 1371 started = true; 1372 abortedPromise = new Promise(function (_, reject) { return abortController.signal.addEventListener("abort", function () { return reject({ 1373 name: "AbortError", 1374 message: abortReason || "Aborted" 1375 }); }); }); 1376 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 }))); 1377 return [4 /*yield*/, Promise.race([ 1378 abortedPromise, 1379 Promise.resolve(payloadCreator(arg, { 1380 dispatch: dispatch, 1381 getState: getState, 1382 extra: extra, 1383 requestId: requestId, 1384 signal: abortController.signal, 1385 abort: abort, 1386 rejectWithValue: function (value, meta) { 1387 return new RejectWithValue(value, meta); 1388 }, 1389 fulfillWithValue: function (value, meta) { 1390 return new FulfillWithMeta(value, meta); 1391 } 1392 })).then(function (result) { 1393 if (result instanceof RejectWithValue) { 1394 throw result; 1395 } 1396 if (result instanceof FulfillWithMeta) { 1397 return fulfilled(result.payload, requestId, arg, result.meta); 1398 } 1399 return fulfilled(result, requestId, arg); 1400 }) 1401 ])]; 1402 case 3: 1403 finalAction = _c.sent(); 1404 return [3 /*break*/, 5]; 1405 case 4: 1406 err_1 = _c.sent(); 1407 finalAction = err_1 instanceof RejectWithValue ? rejected(null, requestId, arg, err_1.payload, err_1.meta) : rejected(err_1, requestId, arg); 1408 return [3 /*break*/, 5]; 1409 case 5: 1410 skipDispatch = options && !options.dispatchConditionRejection && rejected.match(finalAction) && finalAction.meta.condition; 1411 if (!skipDispatch) { 1412 dispatch(finalAction); 1413 } 1414 return [2 /*return*/, finalAction]; 1415 } 1416 }); 1417 }); 1418 }(); 1419 return Object.assign(promise2, { 1420 abort: abort, 1421 requestId: requestId, 1422 arg: arg, 1423 unwrap: function () { 1424 return promise2.then(unwrapResult); 1425 } 1426 }); 1427 }; 1428 } 1429 return Object.assign(actionCreator, { 1430 pending: pending, 1431 rejected: rejected, 1432 fulfilled: fulfilled, 1433 typePrefix: typePrefix 1434 }); 1435 } 1436 createAsyncThunk2.withTypes = function () { return createAsyncThunk2; }; 1437 return createAsyncThunk2; 1438})(); 1439function unwrapResult(action) { 1440 if (action.meta && action.meta.rejectedWithValue) { 1441 throw action.payload; 1442 } 1443 if (action.error) { 1444 throw action.error; 1445 } 1446 return action.payload; 1447} 1448function isThenable(value) { 1449 return value !== null && typeof value === "object" && typeof value.then === "function"; 1450} 1451// src/matchers.ts 1452var matches = function (matcher, action) { 1453 if (hasMatchFunction(matcher)) { 1454 return matcher.match(action); 1455 } 1456 else { 1457 return matcher(action); 1458 } 1459}; 1460function isAnyOf() { 1461 var matchers = []; 1462 for (var _i = 0; _i < arguments.length; _i++) { 1463 matchers[_i] = arguments[_i]; 1464 } 1465 return function (action) { 1466 return matchers.some(function (matcher) { return matches(matcher, action); }); 1467 }; 1468} 1469function isAllOf() { 1470 var matchers = []; 1471 for (var _i = 0; _i < arguments.length; _i++) { 1472 matchers[_i] = arguments[_i]; 1473 } 1474 return function (action) { 1475 return matchers.every(function (matcher) { return matches(matcher, action); }); 1476 }; 1477} 1478function hasExpectedRequestMetadata(action, validStatus) { 1479 if (!action || !action.meta) 1480 return false; 1481 var hasValidRequestId = typeof action.meta.requestId === "string"; 1482 var hasValidRequestStatus = validStatus.indexOf(action.meta.requestStatus) > -1; 1483 return hasValidRequestId && hasValidRequestStatus; 1484} 1485function isAsyncThunkArray(a) { 1486 return typeof a[0] === "function" && "pending" in a[0] && "fulfilled" in a[0] && "rejected" in a[0]; 1487} 1488function isPending() { 1489 var asyncThunks = []; 1490 for (var _i = 0; _i < arguments.length; _i++) { 1491 asyncThunks[_i] = arguments[_i]; 1492 } 1493 if (asyncThunks.length === 0) { 1494 return function (action) { return hasExpectedRequestMetadata(action, ["pending"]); }; 1495 } 1496 if (!isAsyncThunkArray(asyncThunks)) { 1497 return isPending()(asyncThunks[0]); 1498 } 1499 return function (action) { 1500 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.pending; }); 1501 var combinedMatcher = isAnyOf.apply(void 0, matchers); 1502 return combinedMatcher(action); 1503 }; 1504} 1505function isRejected() { 1506 var asyncThunks = []; 1507 for (var _i = 0; _i < arguments.length; _i++) { 1508 asyncThunks[_i] = arguments[_i]; 1509 } 1510 if (asyncThunks.length === 0) { 1511 return function (action) { return hasExpectedRequestMetadata(action, ["rejected"]); }; 1512 } 1513 if (!isAsyncThunkArray(asyncThunks)) { 1514 return isRejected()(asyncThunks[0]); 1515 } 1516 return function (action) { 1517 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.rejected; }); 1518 var combinedMatcher = isAnyOf.apply(void 0, matchers); 1519 return combinedMatcher(action); 1520 }; 1521} 1522function isRejectedWithValue() { 1523 var asyncThunks = []; 1524 for (var _i = 0; _i < arguments.length; _i++) { 1525 asyncThunks[_i] = arguments[_i]; 1526 } 1527 var hasFlag = function (action) { 1528 return action && action.meta && action.meta.rejectedWithValue; 1529 }; 1530 if (asyncThunks.length === 0) { 1531 return function (action) { 1532 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); 1533 return combinedMatcher(action); 1534 }; 1535 } 1536 if (!isAsyncThunkArray(asyncThunks)) { 1537 return isRejectedWithValue()(asyncThunks[0]); 1538 } 1539 return function (action) { 1540 var combinedMatcher = isAllOf(isRejected.apply(void 0, asyncThunks), hasFlag); 1541 return combinedMatcher(action); 1542 }; 1543} 1544function isFulfilled() { 1545 var asyncThunks = []; 1546 for (var _i = 0; _i < arguments.length; _i++) { 1547 asyncThunks[_i] = arguments[_i]; 1548 } 1549 if (asyncThunks.length === 0) { 1550 return function (action) { return hasExpectedRequestMetadata(action, ["fulfilled"]); }; 1551 } 1552 if (!isAsyncThunkArray(asyncThunks)) { 1553 return isFulfilled()(asyncThunks[0]); 1554 } 1555 return function (action) { 1556 var matchers = asyncThunks.map(function (asyncThunk) { return asyncThunk.fulfilled; }); 1557 var combinedMatcher = isAnyOf.apply(void 0, matchers); 1558 return combinedMatcher(action); 1559 }; 1560} 1561function isAsyncThunkAction() { 1562 var asyncThunks = []; 1563 for (var _i = 0; _i < arguments.length; _i++) { 1564 asyncThunks[_i] = arguments[_i]; 1565 } 1566 if (asyncThunks.length === 0) { 1567 return function (action) { return hasExpectedRequestMetadata(action, ["pending", "fulfilled", "rejected"]); }; 1568 } 1569 if (!isAsyncThunkArray(asyncThunks)) { 1570 return isAsyncThunkAction()(asyncThunks[0]); 1571 } 1572 return function (action) { 1573 var matchers = []; 1574 for (var _i = 0, asyncThunks_1 = asyncThunks; _i < asyncThunks_1.length; _i++) { 1575 var asyncThunk = asyncThunks_1[_i]; 1576 matchers.push(asyncThunk.pending, asyncThunk.rejected, asyncThunk.fulfilled); 1577 } 1578 var combinedMatcher = isAnyOf.apply(void 0, matchers); 1579 return combinedMatcher(action); 1580 }; 1581} 1582// src/listenerMiddleware/utils.ts 1583var assertFunction = function (func, expected) { 1584 if (typeof func !== "function") { 1585 throw new TypeError(expected + " is not a function"); 1586 } 1587}; 1588var noop = function () { 1589}; 1590var catchRejection = function (promise2, onError) { 1591 if (onError === void 0) { onError = noop; } 1592 promise2.catch(onError); 1593 return promise2; 1594}; 1595var addAbortSignalListener = function (abortSignal, callback) { 1596 abortSignal.addEventListener("abort", callback, { once: true }); 1597 return function () { return abortSignal.removeEventListener("abort", callback); }; 1598}; 1599var abortControllerWithReason = function (abortController, reason) { 1600 var signal = abortController.signal; 1601 if (signal.aborted) { 1602 return; 1603 } 1604 if (!("reason" in signal)) { 1605 Object.defineProperty(signal, "reason", { 1606 enumerable: true, 1607 value: reason, 1608 configurable: true, 1609 writable: true 1610 }); 1611 } 1612 ; 1613 abortController.abort(reason); 1614}; 1615// src/listenerMiddleware/exceptions.ts 1616var task = "task"; 1617var listener = "listener"; 1618var completed = "completed"; 1619var cancelled = "cancelled"; 1620var taskCancelled = "task-" + cancelled; 1621var taskCompleted = "task-" + completed; 1622var listenerCancelled = listener + "-" + cancelled; 1623var listenerCompleted = listener + "-" + completed; 1624var TaskAbortError = /** @class */ (function () { 1625 function TaskAbortError(code) { 1626 this.code = code; 1627 this.name = "TaskAbortError"; 1628 this.message = task + " " + cancelled + " (reason: " + code + ")"; 1629 } 1630 return TaskAbortError; 1631}()); 1632// src/listenerMiddleware/task.ts 1633var validateActive = function (signal) { 1634 if (signal.aborted) { 1635 throw new TaskAbortError(signal.reason); 1636 } 1637}; 1638function raceWithSignal(signal, promise2) { 1639 var cleanup = noop; 1640 return new Promise(function (resolve, reject) { 1641 var notifyRejection = function () { return reject(new TaskAbortError(signal.reason)); }; 1642 if (signal.aborted) { 1643 notifyRejection(); 1644 return; 1645 } 1646 cleanup = addAbortSignalListener(signal, notifyRejection); 1647 promise2.finally(function () { return cleanup(); }).then(resolve, reject); 1648 }).finally(function () { 1649 cleanup = noop; 1650 }); 1651} 1652var runTask = function (task2, cleanUp) { return __async(void 0, null, function () { 1653 var value, error_1; 1654 return __generator(this, function (_c) { 1655 switch (_c.label) { 1656 case 0: 1657 _c.trys.push([0, 3, 4, 5]); 1658 return [4 /*yield*/, Promise.resolve()]; 1659 case 1: 1660 _c.sent(); 1661 return [4 /*yield*/, task2()]; 1662 case 2: 1663 value = _c.sent(); 1664 return [2 /*return*/, { 1665 status: "ok", 1666 value: value 1667 }]; 1668 case 3: 1669 error_1 = _c.sent(); 1670 return [2 /*return*/, { 1671 status: error_1 instanceof TaskAbortError ? "cancelled" : "rejected", 1672 error: error_1 1673 }]; 1674 case 4: 1675 cleanUp == null ? void 0 : cleanUp(); 1676 return [7 /*endfinally*/]; 1677 case 5: return [2 /*return*/]; 1678 } 1679 }); 1680}); }; 1681var createPause = function (signal) { 1682 return function (promise2) { 1683 return catchRejection(raceWithSignal(signal, promise2).then(function (output) { 1684 validateActive(signal); 1685 return output; 1686 })); 1687 }; 1688}; 1689var createDelay = function (signal) { 1690 var pause = createPause(signal); 1691 return function (timeoutMs) { 1692 return pause(new Promise(function (resolve) { return setTimeout(resolve, timeoutMs); })); 1693 }; 1694}; 1695// src/listenerMiddleware/index.ts 1696var assign = Object.assign; 1697var INTERNAL_NIL_TOKEN = {}; 1698var alm = "listenerMiddleware"; 1699var createFork = function (parentAbortSignal, parentBlockingPromises) { 1700 var linkControllers = function (controller) { return addAbortSignalListener(parentAbortSignal, function () { return abortControllerWithReason(controller, parentAbortSignal.reason); }); }; 1701 return function (taskExecutor, opts) { 1702 assertFunction(taskExecutor, "taskExecutor"); 1703 var childAbortController = new AbortController(); 1704 linkControllers(childAbortController); 1705 var result = runTask(function () { return __async(void 0, null, function () { 1706 var result2; 1707 return __generator(this, function (_c) { 1708 switch (_c.label) { 1709 case 0: 1710 validateActive(parentAbortSignal); 1711 validateActive(childAbortController.signal); 1712 return [4 /*yield*/, taskExecutor({ 1713 pause: createPause(childAbortController.signal), 1714 delay: createDelay(childAbortController.signal), 1715 signal: childAbortController.signal 1716 })]; 1717 case 1: 1718 result2 = _c.sent(); 1719 validateActive(childAbortController.signal); 1720 return [2 /*return*/, result2]; 1721 } 1722 }); 1723 }); }, function () { return abortControllerWithReason(childAbortController, taskCompleted); }); 1724 if (opts == null ? void 0 : opts.autoJoin) { 1725 parentBlockingPromises.push(result); 1726 } 1727 return { 1728 result: createPause(parentAbortSignal)(result), 1729 cancel: function () { 1730 abortControllerWithReason(childAbortController, taskCancelled); 1731 } 1732 }; 1733 }; 1734}; 1735var createTakePattern = function (startListening, signal) { 1736 var take = function (predicate, timeout) { return __async(void 0, null, function () { 1737 var unsubscribe, tuplePromise, promises, output; 1738 return __generator(this, function (_c) { 1739 switch (_c.label) { 1740 case 0: 1741 validateActive(signal); 1742 unsubscribe = function () { 1743 }; 1744 tuplePromise = new Promise(function (resolve, reject) { 1745 var stopListening = startListening({ 1746 predicate: predicate, 1747 effect: function (action, listenerApi) { 1748 listenerApi.unsubscribe(); 1749 resolve([ 1750 action, 1751 listenerApi.getState(), 1752 listenerApi.getOriginalState() 1753 ]); 1754 } 1755 }); 1756 unsubscribe = function () { 1757 stopListening(); 1758 reject(); 1759 }; 1760 }); 1761 promises = [ 1762 tuplePromise 1763 ]; 1764 if (timeout != null) { 1765 promises.push(new Promise(function (resolve) { return setTimeout(resolve, timeout, null); })); 1766 } 1767 _c.label = 1; 1768 case 1: 1769 _c.trys.push([1, , 3, 4]); 1770 return [4 /*yield*/, raceWithSignal(signal, Promise.race(promises))]; 1771 case 2: 1772 output = _c.sent(); 1773 validateActive(signal); 1774 return [2 /*return*/, output]; 1775 case 3: 1776 unsubscribe(); 1777 return [7 /*endfinally*/]; 1778 case 4: return [2 /*return*/]; 1779 } 1780 }); 1781 }); }; 1782 return function (predicate, timeout) { return catchRejection(take(predicate, timeout)); }; 1783}; 1784var getListenerEntryPropsFrom = function (options) { 1785 var type = options.type, actionCreator = options.actionCreator, matcher = options.matcher, predicate = options.predicate, effect = options.effect; 1786 if (type) { 1787 predicate = createAction(type).match; 1788 } 1789 else if (actionCreator) { 1790 type = actionCreator.type; 1791 predicate = actionCreator.match; 1792 } 1793 else if (matcher) { 1794 predicate = matcher; 1795 } 1796 else if (predicate) { 1797 } 1798 else { 1799 throw new Error("Creating or removing a listener requires one of the known fields for matching an action"); 1800 } 1801 assertFunction(effect, "options.listener"); 1802 return { predicate: predicate, type: type, effect: effect }; 1803}; 1804var createListenerEntry = function (options) { 1805 var _c = getListenerEntryPropsFrom(options), type = _c.type, predicate = _c.predicate, effect = _c.effect; 1806 var id = nanoid(); 1807 var entry = { 1808 id: id, 1809 effect: effect, 1810 type: type, 1811 predicate: predicate, 1812 pending: new Set(), 1813 unsubscribe: function () { 1814 throw new Error("Unsubscribe not initialized"); 1815 } 1816 }; 1817 return entry; 1818}; 1819var cancelActiveListeners = function (entry) { 1820 entry.pending.forEach(function (controller) { 1821 abortControllerWithReason(controller, listenerCancelled); 1822 }); 1823}; 1824var createClearListenerMiddleware = function (listenerMap) { 1825 return function () { 1826 listenerMap.forEach(cancelActiveListeners); 1827 listenerMap.clear(); 1828 }; 1829}; 1830var safelyNotifyError = function (errorHandler, errorToNotify, errorInfo) { 1831 try { 1832 errorHandler(errorToNotify, errorInfo); 1833 } 1834 catch (errorHandlerError) { 1835 setTimeout(function () { 1836 throw errorHandlerError; 1837 }, 0); 1838 } 1839}; 1840var addListener = createAction(alm + "/add"); 1841var clearAllListeners = createAction(alm + "/removeAll"); 1842var removeListener = createAction(alm + "/remove"); 1843var defaultErrorHandler = function () { 1844 var args = []; 1845 for (var _i = 0; _i < arguments.length; _i++) { 1846 args[_i] = arguments[_i]; 1847 } 1848 console.error.apply(console, __spreadArray([alm + "/error"], args)); 1849}; 1850function createListenerMiddleware(middlewareOptions) { 1851 var _this = this; 1852 if (middlewareOptions === void 0) { middlewareOptions = {}; } 1853 var listenerMap = new Map(); 1854 var extra = middlewareOptions.extra, _c = middlewareOptions.onError, onError = _c === void 0 ? defaultErrorHandler : _c; 1855 assertFunction(onError, "onError"); 1856 var insertEntry = function (entry) { 1857 entry.unsubscribe = function () { return listenerMap.delete(entry.id); }; 1858 listenerMap.set(entry.id, entry); 1859 return function (cancelOptions) { 1860 entry.unsubscribe(); 1861 if (cancelOptions == null ? void 0 : cancelOptions.cancelActive) { 1862 cancelActiveListeners(entry); 1863 } 1864 }; 1865 }; 1866 var findListenerEntry = function (comparator) { 1867 for (var _i = 0, _c = Array.from(listenerMap.values()); _i < _c.length; _i++) { 1868 var entry = _c[_i]; 1869 if (comparator(entry)) { 1870 return entry; 1871 } 1872 } 1873 return void 0; 1874 }; 1875 var startListening = function (options) { 1876 var entry = findListenerEntry(function (existingEntry) { return existingEntry.effect === options.effect; }); 1877 if (!entry) { 1878 entry = createListenerEntry(options); 1879 } 1880 return insertEntry(entry); 1881 }; 1882 var stopListening = function (options) { 1883 var _c = getListenerEntryPropsFrom(options), type = _c.type, effect = _c.effect, predicate = _c.predicate; 1884 var entry = findListenerEntry(function (entry2) { 1885 var matchPredicateOrType = typeof type === "string" ? entry2.type === type : entry2.predicate === predicate; 1886 return matchPredicateOrType && entry2.effect === effect; 1887 }); 1888 if (entry) { 1889 entry.unsubscribe(); 1890 if (options.cancelActive) { 1891 cancelActiveListeners(entry); 1892 } 1893 } 1894 return !!entry; 1895 }; 1896 var notifyListener = function (entry, action, api, getOriginalState) { return __async(_this, null, function () { 1897 var internalTaskController, take, autoJoinPromises, listenerError_1; 1898 return __generator(this, function (_c) { 1899 switch (_c.label) { 1900 case 0: 1901 internalTaskController = new AbortController(); 1902 take = createTakePattern(startListening, internalTaskController.signal); 1903 autoJoinPromises = []; 1904 _c.label = 1; 1905 case 1: 1906 _c.trys.push([1, 3, 4, 6]); 1907 entry.pending.add(internalTaskController); 1908 return [4 /*yield*/, Promise.resolve(entry.effect(action, assign({}, api, { 1909 getOriginalState: getOriginalState, 1910 condition: function (predicate, timeout) { return take(predicate, timeout).then(Boolean); }, 1911 take: take, 1912 delay: createDelay(internalTaskController.signal), 1913 pause: createPause(internalTaskController.signal), 1914 extra: extra, 1915 signal: internalTaskController.signal, 1916 fork: createFork(internalTaskController.signal, autoJoinPromises), 1917 unsubscribe: entry.unsubscribe, 1918 subscribe: function () { 1919 listenerMap.set(entry.id, entry); 1920 }, 1921 cancelActiveListeners: function () { 1922 entry.pending.forEach(function (controller, _, set) { 1923 if (controller !== internalTaskController) { 1924 abortControllerWithReason(controller, listenerCancelled); 1925 set.delete(controller); 1926 } 1927 }); 1928 } 1929 })))]; 1930 case 2: 1931 _c.sent(); 1932 return [3 /*break*/, 6]; 1933 case 3: 1934 listenerError_1 = _c.sent(); 1935 if (!(listenerError_1 instanceof TaskAbortError)) { 1936 safelyNotifyError(onError, listenerError_1, { 1937 raisedBy: "effect" 1938 }); 1939 } 1940 return [3 /*break*/, 6]; 1941 case 4: return [4 /*yield*/, Promise.allSettled(autoJoinPromises)]; 1942 case 5: 1943 _c.sent(); 1944 abortControllerWithReason(internalTaskController, listenerCompleted); 1945 entry.pending.delete(internalTaskController); 1946 return [7 /*endfinally*/]; 1947 case 6: return [2 /*return*/]; 1948 } 1949 }); 1950 }); }; 1951 var clearListenerMiddleware = createClearListenerMiddleware(listenerMap); 1952 var middleware = function (api) { return function (next) { return function (action) { 1953 if (!isAction(action)) { 1954 return next(action); 1955 } 1956 if (addListener.match(action)) { 1957 return startListening(action.payload); 1958 } 1959 if (clearAllListeners.match(action)) { 1960 clearListenerMiddleware(); 1961 return; 1962 } 1963 if (removeListener.match(action)) { 1964 return stopListening(action.payload); 1965 } 1966 var originalState = api.getState(); 1967 var getOriginalState = function () { 1968 if (originalState === INTERNAL_NIL_TOKEN) { 1969 throw new Error(alm + ": getOriginalState can only be called synchronously"); 1970 } 1971 return originalState; 1972 }; 1973 var result; 1974 try { 1975 result = next(action); 1976 if (listenerMap.size > 0) { 1977 var currentState = api.getState(); 1978 var listenerEntries = Array.from(listenerMap.values()); 1979 for (var _i = 0, listenerEntries_1 = listenerEntries; _i < listenerEntries_1.length; _i++) { 1980 var entry = listenerEntries_1[_i]; 1981 var runListener = false; 1982 try { 1983 runListener = entry.predicate(action, currentState, originalState); 1984 } 1985 catch (predicateError) { 1986 runListener = false; 1987 safelyNotifyError(onError, predicateError, { 1988 raisedBy: "predicate" 1989 }); 1990 } 1991 if (!runListener) { 1992 continue; 1993 } 1994 notifyListener(entry, action, api, getOriginalState); 1995 } 1996 } 1997 } 1998 finally { 1999 originalState = INTERNAL_NIL_TOKEN; 2000 } 2001 return result; 2002 }; }; }; 2003 return { 2004 middleware: middleware, 2005 startListening: startListening, 2006 stopListening: stopListening, 2007 clearListeners: clearListenerMiddleware 2008 }; 2009} 2010// src/autoBatchEnhancer.ts 2011var SHOULD_AUTOBATCH = "RTK_autoBatch"; 2012var prepareAutoBatched = function () { return function (payload) { 2013 var _c; 2014 return ({ 2015 payload: payload, 2016 meta: (_c = {}, _c[SHOULD_AUTOBATCH] = true, _c) 2017 }); 2018}; }; 2019var promise; 2020var queueMicrotaskShim = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : typeof __webpack_require__.g !== "undefined" ? __webpack_require__.g : globalThis) : function (cb) { return (promise || (promise = Promise.resolve())).then(cb).catch(function (err) { return setTimeout(function () { 2021 throw err; 2022}, 0); }); }; 2023var createQueueWithTimer = function (timeout) { 2024 return function (notify) { 2025 setTimeout(notify, timeout); 2026 }; 2027}; 2028var rAF = typeof window !== "undefined" && window.requestAnimationFrame ? window.requestAnimationFrame : createQueueWithTimer(10); 2029var autoBatchEnhancer = function (options) { 2030 if (options === void 0) { options = { type: "raf" }; } 2031 return function (next) { return function () { 2032 var args = []; 2033 for (var _i = 0; _i < arguments.length; _i++) { 2034 args[_i] = arguments[_i]; 2035 } 2036 var store = next.apply(void 0, args); 2037 var notifying = true; 2038 var shouldNotifyAtEndOfTick = false; 2039 var notificationQueued = false; 2040 var listeners = new Set(); 2041 var queueCallback = options.type === "tick" ? queueMicrotaskShim : options.type === "raf" ? rAF : options.type === "callback" ? options.queueNotification : createQueueWithTimer(options.timeout); 2042 var notifyListeners = function () { 2043 notificationQueued = false; 2044 if (shouldNotifyAtEndOfTick) { 2045 shouldNotifyAtEndOfTick = false; 2046 listeners.forEach(function (l) { return l(); }); 2047 } 2048 }; 2049 return Object.assign({}, store, { 2050 subscribe: function (listener2) { 2051 var wrappedListener = function () { return notifying && listener2(); }; 2052 var unsubscribe = store.subscribe(wrappedListener); 2053 listeners.add(listener2); 2054 return function () { 2055 unsubscribe(); 2056 listeners.delete(listener2); 2057 }; 2058 }, 2059 dispatch: function (action) { 2060 var _a; 2061 try { 2062 notifying = !((_a = action == null ? void 0 : action.meta) == null ? void 0 : _a[SHOULD_AUTOBATCH]); 2063 shouldNotifyAtEndOfTick = !notifying; 2064 if (shouldNotifyAtEndOfTick) { 2065 if (!notificationQueued) { 2066 notificationQueued = true; 2067 queueCallback(notifyListeners); 2068 } 2069 } 2070 return store.dispatch(action); 2071 } 2072 finally { 2073 notifying = true; 2074 } 2075 } 2076 }); 2077 }; }; 2078}; 2079// src/index.ts 2080(0,immer__WEBPACK_IMPORTED_MODULE_2__.enableES5)(); 2081 2082//# sourceMappingURL=redux-toolkit.esm.js.map 2083 2084/***/ }), 2085
2086/***/ "./assets/js/src/app/store.js": 2087/*!************************************!*\ 2088 !*** ./assets/js/src/app/store.js ***! 2089 \************************************/ 2090/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2091 2092"use strict"; 2093__webpack_require__.r(__webpack_exports__); 2094/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2095/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2096/* harmony export */ }); 2097/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @reduxjs/toolkit */ "./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); 2098/* harmony import */ var _features_products_data_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../features/products-data/products-data-reducer */ "./assets/js/src/features/products-data/products-data-reducer.js"); 2099/* harmony import */ var _features_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../features/wishlists/wishlists-reducer */ "./assets/js/src/features/wishlists/wishlists-reducer.js"); 2100/* harmony import */ var _features_buttons_buttons_reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../features/buttons/buttons-reducer */ "./assets/js/src/features/buttons/buttons-reducer.js"); 2101/* harmony import */ var _features_products_data_invalidate_middleware__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../features/products-data/invalidate-middleware */ "./assets/js/src/features/products-data/invalidate-middleware.js"); 2102/* harmony import */ var _features_wishlists_wishlists_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../features/wishlists/wishlists-actions */ "./assets/js/src/features/wishlists/wishlists-actions.js"); 2103 2104 2105 2106 2107 2108 2109var store = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_5__.configureStore)({ 2110 reducer: { 2111 productsData: _features_products_data_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__["default"], 2112 wishlists: _features_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__["default"], 2113 buttons: _features_buttons_buttons_reducer__WEBPACK_IMPORTED_MODULE_2__["default"] 2114 }, 2115 middleware: function middleware(getDefaultMiddleware) { 2116 return getDefaultMiddleware().concat((0,_features_products_data_invalidate_middleware__WEBPACK_IMPORTED_MODULE_3__["default"])()); 2117 } 2118}); 2119store.dispatch((0,_features_wishlists_wishlists_actions__WEBPACK_IMPORTED_MODULE_4__.fetchWishlists)()); 2120/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (store); 2121 2122/***/ }), 2123
2124/***/ "./assets/js/src/components/add-to-wishlist/add-to-wishlist.js": 2125/*!*********************************************************************!*\ 2126 !*** ./assets/js/src/components/add-to-wishlist/add-to-wishlist.js ***! 2127 \*********************************************************************/ 2128/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2129 2130"use strict"; 2131__webpack_require__.r(__webpack_exports__); 2132/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2133/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2134/* harmony export */ }); 2135/* harmony import */ var _sub_components_add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sub-components/add-to-wishlist-button */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/index.js"); 2136/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils */ "./assets/js/src/utils/index.js"); 2137/* harmony import */ var _sub_components_feedback__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sub-components/feedback */ "./assets/js/src/components/add-to-wishlist/sub-components/feedback/index.js"); 2138 2139 2140 2141var AddToWishlist = function AddToWishlist() { 2142 var BeforeButton = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.useComponentsExtension)('beforeAddToWishlistButton'); 2143 var AfterButton = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.useComponentsExtension)('afterAddToWishlistButton'); 2144 var ButtonChildren = (0,_utils__WEBPACK_IMPORTED_MODULE_1__.useComponentsExtension)('addToWishlistButtonChildren'); 2145 return /*#__PURE__*/React.createElement(React.Fragment, null, BeforeButton && /*#__PURE__*/React.createElement(BeforeButton, null), /*#__PURE__*/React.createElement(_sub_components_add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_0__["default"], null, /*#__PURE__*/React.createElement(ButtonChildren, null)), AfterButton && /*#__PURE__*/React.createElement(AfterButton, null), /*#__PURE__*/React.createElement(_sub_components_feedback__WEBPACK_IMPORTED_MODULE_2__["default"], null)); 2146}; 2147/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddToWishlist); 2148 2149/***/ }), 2150
2151/***/ "./assets/js/src/components/add-to-wishlist/hooks/use-feedback.js": 2152/*!************************************************************************!*\ 2153 !*** ./assets/js/src/components/add-to-wishlist/hooks/use-feedback.js ***! 2154 \************************************************************************/ 2155/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2156 2157"use strict"; 2158__webpack_require__.r(__webpack_exports__); 2159/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2160/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2161/* harmony export */ }); 2162/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 2163/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 2164/* harmony import */ var _hooks_use_wishlist_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../hooks/use-wishlist-data */ "./assets/js/src/hooks/use-wishlist-data.js"); 2165/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils */ "./assets/js/src/utils/index.js"); 2166/* harmony import */ var _use_product_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-product-data */ "./assets/js/src/components/add-to-wishlist/hooks/use-product-data.js"); 2167function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 2168function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 2169function _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; } } 2170function _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; } 2171function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 2172function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 2173/* globals yithWcwlAddToWishlist */ 2174 2175 2176 2177 2178 2179var useFeedback = function useFeedback(productId, attributes, isPerformingAction) { 2180 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), 2181 _useState2 = _slicedToArray(_useState, 2), 2182 showFeedback = _useState2[0], 2183 setShowFeedback = _useState2[1]; 2184 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true), 2185 _useState4 = _slicedToArray(_useState3, 2), 2186 feedbackAnimation = _useState4[0], 2187 setFeedbackAnimation = _useState4[1]; 2188 var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''), 2189 _useState6 = _slicedToArray(_useState5, 2), 2190 feedbackMessage = _useState6[0], 2191 setFeedbackMessage = _useState6[1]; 2192 var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)('info'), 2193 _useState8 = _slicedToArray(_useState7, 2), 2194 feedbackType = _useState8[0], 2195 setFeedbackType = _useState8[1]; 2196 var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(yithWcwlAddToWishlist.feedback_duration), 2197 _useState10 = _slicedToArray(_useState9, 2), 2198 feedbackDuration = _useState10[0], 2199 setFeedbackDuration = _useState10[1]; 2200 var feedback_type = attributes.feedback_type, 2201 modal_close_behaviour = attributes.modal_close_behaviour; 2202 var _useProductData = (0,_use_product_data__WEBPACK_IMPORTED_MODULE_3__["default"])(productId, attributes), 2203 error = _useProductData.error, 2204 productData = _useProductData.productData, 2205 hasDataLoaded = _useProductData.hasDataLoaded; 2206 var clearFeedback = function clearFeedback() { 2207 setShowFeedback(false); 2208 setFeedbackMessage(''); 2209 setFeedbackType('info'); 2210 setFeedbackDuration(yithWcwlAddToWishlist.feedback_duration); 2211 }; 2212 var addFeedback = function addFeedback(_ref) { 2213 var message = _ref.message, 2214 type = _ref.type, 2215 duration = _ref.duration; 2216 if (message) { 2217 type && setFeedbackType(type); 2218 duration && setFeedbackDuration(duration); 2219 setFeedbackMessage(message); 2220 setShowFeedback(true); 2221 } 2222 }; 2223 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2224 if (feedbackMessage) { 2225 setShowFeedback(true); 2226 if ('modal' !== feedback_type || 'close' === modal_close_behaviour) { 2227 var FeedbackVisibilityTimer = setTimeout(clearFeedback, feedbackDuration); 2228 return function () { 2229 return clearTimeout(FeedbackVisibilityTimer); 2230 }; 2231 } 2232 } 2233 }, [feedbackMessage]); 2234 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2235 if (error) addFeedback({ 2236 message: error, 2237 type: 'error' 2238 }); 2239 }, [error]); 2240 var addedToWishlist = (0,_hooks_use_wishlist_data__WEBPACK_IMPORTED_MODULE_1__.useWishlistData)(productData === null || productData === void 0 ? void 0 : productData.added_to); 2241 var removedFromWishlist = (0,_hooks_use_wishlist_data__WEBPACK_IMPORTED_MODULE_1__.useWishlistData)(productData === null || productData === void 0 ? void 0 : productData.removed_from); 2242 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2243 if (isPerformingAction && hasDataLoaded && productData !== null && productData !== void 0 && productData.removed_from) { 2244 var wishlist = removedFromWishlist; 2245 addFeedback({ 2246 message: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.reactMultipleStringReplace)(yithWcwlAddToWishlist.i18n.feedbacks.removed, [{ 2247 search: '{{product_name}}', 2248 replace: function replace(match, i) { 2249 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", { 2250 key: match + i, 2251 className: 'yith-wcwl-feedback__product-name' 2252 }, "\"", productData === null || productData === void 0 ? void 0 : productData.name, "\""); 2253 } 2254 }, { 2255 search: '{{wishlist_name}}', 2256 replace: function replace(match, i) { 2257 return wishlist ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", { 2258 key: match + i, 2259 className: 'yith-wcwl-feedback__wishlist-name' 2260 }, "\"", wishlist === null || wishlist === void 0 ? void 0 : wishlist.name, "\"") : ''; 2261 } 2262 }]), 2263 type: 'product_removed' 2264 }); 2265 } 2266 }, [productData === null || productData === void 0 ? void 0 : productData.removed_from]); 2267 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2268 if (isPerformingAction && hasDataLoaded && productData !== null && productData !== void 0 && productData.added_to) { 2269 var wishlist = addedToWishlist; 2270 addFeedback({ 2271 message: (0,_utils__WEBPACK_IMPORTED_MODULE_2__.reactMultipleStringReplace)(yithWcwlAddToWishlist.i18n.feedbacks.added, [{ 2272 search: '{{product_name}}', 2273 replace: function replace(match, i) { 2274 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", { 2275 key: match + i, 2276 className: 'yith-wcwl-feedback__product-name' 2277 }, "\"", productData === null || productData === void 0 ? void 0 : productData.name, "\""); 2278 } 2279 }, { 2280 search: '{{wishlist_name}}', 2281 replace: function replace(match, i) { 2282 return wishlist ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", { 2283 key: match + i, 2284 className: 'yith-wcwl-feedback__wishlist-name' 2285 }, "\"", wishlist === null || wishlist === void 0 ? void 0 : wishlist.name, "\"") : ''; 2286 } 2287 }]), 2288 type: 'product_added' 2289 }); 2290 } 2291 }, [productData === null || productData === void 0 ? void 0 : productData.added_to]); 2292 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2293 if (!showFeedback) { 2294 setFeedbackAnimation(true); 2295 } 2296 }
2296, [showFeedback]); 2297 return { 2298 feedbackType: feedbackType, 2299 showFeedback: showFeedback, 2300 feedbackMessage: feedbackMessage, 2301 feedbackDuration: feedbackDuration, 2302 feedbackAnimation: feedbackAnimation, 2303 setFeedbackType: setFeedbackType, 2304 setShowFeedback: setShowFeedback, 2305 setFeedbackMessage: setFeedbackMessage, 2306 setFeedbackDuration: setFeedbackDuration, 2307 setFeedbackAnimation: setFeedbackAnimation, 2308 addFeedback: addFeedback, 2309 clearFeedback: clearFeedback 2310 }; 2311}; 2312/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useFeedback); 2313 2314/***/ }), 2315
2316/***/ "./assets/js/src/components/add-to-wishlist/hooks/use-product-data.js": 2317/*!****************************************************************************!*\ 2318 !*** ./assets/js/src/components/add-to-wishlist/hooks/use-product-data.js ***! 2319 \****************************************************************************/ 2320/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2321 2322"use strict"; 2323__webpack_require__.r(__webpack_exports__); 2324/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2325/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2326/* harmony export */ }); 2327/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 2328/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 2329/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); 2330/* harmony import */ var _features_products_data_products_data_actions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../features/products-data/products-data-actions */ "./assets/js/src/features/products-data/products-data-actions.js"); 2331/* harmony import */ var _features_products_data_products_data_selectors__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../features/products-data/products-data-selectors */ "./assets/js/src/features/products-data/products-data-selectors.js"); 2332function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 2333function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 2334function _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; } } 2335function _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; } 2336function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 2337function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 2338 2339 2340 2341 2342var useProductData = function useProductData(productId) { 2343 var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 2344 var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useDispatch)(); 2345 var productData = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(function (state) { 2346 return (0,_features_products_data_products_data_selectors__WEBPACK_IMPORTED_MODULE_3__.selectProductDataById)(state, productId); 2347 }); 2348 var error = (0,react_redux__WEBPACK_IMPORTED_MODULE_1__.useSelector)(function (state) { 2349 return (0,_features_products_data_products_data_selectors__WEBPACK_IMPORTED_MODULE_3__.selectError)(state, productId); 2350 }); 2351 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(attributes === null || attributes === void 0 ? void 0 : attributes.exists), 2352 _useState2 = _slicedToArray(_useState, 2), 2353 alreadyIn = _useState2[0], 2354 setAlreadyIn = _useState2[1]; 2355 var hasDataLoaded = undefined !== (productData === null || productData === void 0 ? void 0 : productData.isAdded); 2356 var isAdded = !!(undefined !== (productData === null || productData === void 0 ? void 0 : productData.isAdded) ? productData === null || productData === void 0 ? void 0 : productData.isAdded : attributes === null || attributes === void 0 ? void 0 : attributes.exists); 2357 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2358 if (!productData) dispatch((0,_features_products_data_products_data_actions__WEBPACK_IMPORTED_MODULE_2__.fetchProductDataAsync)(productId)); 2359 }
2359, [dispatch, productId]); 2360 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 2361 if (hasDataLoaded && !isAdded) { 2362 setAlreadyIn(false); 2363 } 2364 }, [isAdded]); 2365 return { 2366 productData: productData, 2367 error: error, 2368 isLoading: productData === null || productData === void 0 ? void 0 : productData.loading, 2369 count: productData === null || productData === void 0 ? void 0 : productData.count, 2370 lists: productData === null || productData === void 0 ? void 0 : productData.wishlists, 2371 isAdded: isAdded, 2372 alreadyIn: alreadyIn, 2373 hasDataLoaded: hasDataLoaded 2374 }; 2375}; 2376/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (useProductData); 2377 2378/***/ }), 2379
2380/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/index.js": 2381/*!*************************************************************************************************!*\ 2382 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/index.js ***! 2383 \*************************************************************************************************/ 2384/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2385 2386"use strict"; 2387__webpack_require__.r(__webpack_exports__); 2388/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2389/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2390/* harmony export */ }); 2391/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../utils */ "./assets/js/src/utils/index.js"); 2392/* harmony import */ var _variants_add_to_wishlist_icon_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./variants/add-to-wishlist-icon-button */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-icon-button.js"); 2393/* harmony import */ var _variants_add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./variants/add-to-wishlist-button */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/index.js"); 2394/* harmony import */ var _variants_add_to_wishlist_anchor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./variants/add-to-wishlist-anchor */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/index.js"); 2395/* harmony import */ var _utils_button_data_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../utils/button-data-context */ "./assets/js/src/utils/button-data-context.js"); 2396 2397 2398 2399 2400 2401var AddToWishlistButton = function AddToWishlistButton(props) { 2402 var _Button; 2403 var style = (0,_utils_button_data_context__WEBPACK_IMPORTED_MODULE_4__.useButtonStyle)(); 2404 var Button = false; 2405 if (style === 'icon-button') { 2406 Button = function Button(props) { 2407 return /*#__PURE__*/React.createElement(_variants_add_to_wishlist_icon_button__WEBPACK_IMPORTED_MODULE_1__["default"], props); 2408 }; 2409 } 2410 if (style === 'anchor') { 2411 Button = function Button(props) { 2412 return /*#__PURE__*/React.createElement(_variants_add_to_wishlist_anchor__WEBPACK_IMPORTED_MODULE_3__["default"], props); 2413 }; 2414 } 2415 if (!Button) { 2416 Button = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonStyle' + (0,_utils__WEBPACK_IMPORTED_MODULE_0__.formatPascalCaseString)(style)); 2417 } 2418 if (!Button || (_Button = Button) !== null && _Button !== void 0 && _Button.isEmpty) { 2419 Button = function Button(props) { 2420 return /*#__PURE__*/React.createElement(_variants_add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_2__["default"], props); 2421 }; 2422 } 2423 return /*#__PURE__*/React.createElement(Button, props); 2424}; 2425/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddToWishlistButton); 2426 2427/***/ }), 2428
2429/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/add-to-wishlist-anchor.js": 2430/*!**************************************************************************************************************************************************!*\ 2431 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/add-to-wishlist-anchor.js ***! 2432 \**************************************************************************************************************************************************/ 2433/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2434 2435"use strict"; 2436__webpack_require__.r(__webpack_exports__); 2437/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2438/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2439/* harmony export */ }); 2440/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../utils */ "./assets/js/src/utils/index.js"); 2441/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../icon */ "./assets/js/src/components/icon/index.js"); 2442/* harmony import */ var _utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../utils/button-data-context */ "./assets/js/src/utils/button-data-context.js"); 2443 2444 2445 2446var AddToWishlistAnchor = function AddToWishlistAnchor(_ref) { 2447 var children = _ref.children; 2448 var ButtonContentStart = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentStart'); 2449 var ButtonContentEnd = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentEnd'); 2450 var _useAddToWishlistButt = (0,_utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__.useAddToWishlistButtonData)(), 2451 ref = _useAddToWishlistButt.ref, 2452 href = _useAddToWishlistButt.href, 2453 icon = _useAddToWishlistButt.icon, 2454 label = _useAddToWishlistButt.label, 2455 onClick = _useAddToWishlistButt.onClick, 2456 className = _useAddToWishlistButt.className; 2457 return /*#__PURE__*/React.createElement("a", { 2458 className: className, 2459 onClick: onClick, 2460 ref: ref, 2461 href: href 2462 }, /*#__PURE__*/React.createElement(ButtonContentStart, null), /*#__PURE__*/React.createElement(_icon__WEBPACK_IMPORTED_MODULE_1__["default"], { 2463 iconName: icon, 2464 className: 'yith-wcwl-add-to-wishlist-button-icon' 2465 }), /*#__PURE__*/React.createElement("span", { 2466 className: 'yith-wcwl-add-to-wishlist-button__label' 2467 }, label), children, /*#__PURE__*/React.createElement(ButtonContentEnd, null)); 2468}; 2469/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddToWishlistAnchor); 2470 2471/***/ }), 2472
2473/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/index.js": 2474/*!*********************************************************************************************************************************!*\ 2475 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/index.js ***! 2476 \*********************************************************************************************************************************/ 2477/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2478 2479"use strict"; 2480__webpack_require__.r(__webpack_exports__); 2481/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2482/* harmony export */ "default": () => (/* reexport safe */ _add_to_wishlist_anchor__WEBPACK_IMPORTED_MODULE_0__["default"]) 2483/* harmony export */ }); 2484/* harmony import */ var _add_to_wishlist_anchor__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add-to-wishlist-anchor */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-anchor/add-to-wishlist-anchor.js"); 2485 2486 2487/***/ }), 2488
2489/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/add-to-wishlist-button.js": 2490/*!**************************************************************************************************************************************************!*\ 2491 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/add-to-wishlist-button.js ***! 2492 \**************************************************************************************************************************************************/ 2493/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2494 2495"use strict"; 2496__webpack_require__.r(__webpack_exports__); 2497/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2498/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2499/* harmony export */ }); 2500/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../utils */ "./assets/js/src/utils/index.js"); 2501/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../icon */ "./assets/js/src/components/icon/index.js"); 2502/* harmony import */ var _utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../../utils/button-data-context */ "./assets/js/src/utils/button-data-context.js"); 2503 2504 2505 2506var AddToWishlistButton = function AddToWishlistButton(_ref) { 2507 var children = _ref.children; 2508 var _useAddToWishlistButt = (0,_utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__.useAddToWishlistButtonData)(), 2509 ref = _useAddToWishlistButt.ref, 2510 href = _useAddToWishlistButt.href, 2511 icon = _useAddToWishlistButt.icon, 2512 label = _useAddToWishlistButt.label, 2513 onClick = _useAddToWishlistButt.onClick, 2514 className = _useAddToWishlistButt.className; 2515 var ButtonContentStart = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentStart'); 2516 var ButtonContentEnd = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentEnd'); 2517 var Button = function Button() { 2518 return /*#__PURE__*/React.createElement("button", { 2519 className: className, 2520 onClick: onClick, 2521 ref: ref 2522 }, /*#__PURE__*/React.createElement(ButtonContentStart, null), /*#__PURE__*/React.createElement(_icon__WEBPACK_IMPORTED_MODULE_1__["default"], { 2523 iconName: icon, 2524 wrapper: 'div', 2525 className: 'yith-wcwl-add-to-wishlist-button-icon' 2526 }), /*#__PURE__*/React.createElement("span", { 2527 className: 'yith-wcwl-add-to-wishlist-button__label' 2528 }, label), children, /*#__PURE__*/React.createElement(ButtonContentEnd, null)); 2529 }; 2530 return /*#__PURE__*/React.createElement(React.Fragment, null, href ? /*#__PURE__*/React.createElement("a", { 2531 href: href, 2532 className: 'yith-wcwl-add-to-wishlist-button-anchor-wrapper' 2533 }, /*#__PURE__*/React.createElement(Button, null)) : /*#__PURE__*/React.createElement(Button, null)); 2534}; 2535/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddToWishlistButton); 2536 2537/***/ }), 2538
2539/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/index.js": 2540/*!*********************************************************************************************************************************!*\ 2541 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/index.js ***! 2542 \*********************************************************************************************************************************/ 2543/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2544 2545"use strict"; 2546__webpack_require__.r(__webpack_exports__); 2547/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2548/* harmony export */ "default": () => (/* reexport safe */ _add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_0__["default"]) 2549/* harmony export */ }); 2550/* harmony import */ var _add_to_wishlist_button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./add-to-wishlist-button */ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-button/add-to-wishlist-button.js"); 2551 2552 2553/***/ }), 2554
2555/***/ "./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-icon-button.js": 2556/*!********************************************************************************************************************************!*\ 2557 !*** ./assets/js/src/components/add-to-wishlist/sub-components/add-to-wishlist-button/variants/add-to-wishlist-icon-button.js ***! 2558 \********************************************************************************************************************************/ 2559/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2560 2561"use strict"; 2562__webpack_require__.r(__webpack_exports__); 2563/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2564/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2565/* harmony export */ }); 2566/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../utils */ "./assets/js/src/utils/index.js"); 2567/* harmony import */ var _icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../icon */ "./assets/js/src/components/icon/index.js"); 2568/* harmony import */ var _utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../../../utils/button-data-context */ "./assets/js/src/utils/button-data-context.js"); 2569 2570 2571 2572var AddToWishlistIconButton = function AddToWishlistIconButton(_ref) { 2573 var children = _ref.children; 2574 var _useAddToWishlistButt = (0,_utils_button_data_context__WEBPACK_IMPORTED_MODULE_2__.useAddToWishlistButtonData)(), 2575 ref = _useAddToWishlistButt.ref, 2576 href = _useAddToWishlistButt.href, 2577 icon = _useAddToWishlistButt.icon, 2578 onClick = _useAddToWishlistButt.onClick, 2579 className = _useAddToWishlistButt.className; 2580 var ButtonContentStart = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentStart'); 2581 var ButtonContentEnd = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('buttonContentEnd'); 2582 var IconButton = /*#__PURE__*/React.createElement("button", { 2583 className: className, 2584 onClick: onClick, 2585 ref: ref 2586 }, /*#__PURE__*/React.createElement(ButtonContentStart, null), /*#__PURE__*/React.createElement(_icon__WEBPACK_IMPORTED_MODULE_1__["default"], { 2587 iconName: icon, 2588 className: 'yith-wcwl-add-to-wishlist-button-icon' 2589 }), /*#__PURE__*/React.createElement(ButtonContentEnd, null), children); 2590 return /*#__PURE__*/React.createElement(React.Fragment, null, href ? /*#__PURE__*/React.createElement("a", { 2591 href: href 2592 }, IconButton) : IconButton); 2593}; 2594/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (AddToWishlistIconButton); 2595 2596/***/ }), 2597
2598/***/ "./assets/js/src/components/add-to-wishlist/sub-components/feedback/hooks/use-feedback-data.js": 2599/*!*****************************************************************************************************!*\ 2600 !*** ./assets/js/src/components/add-to-wishlist/sub-components/feedback/hooks/use-feedback-data.js ***! 2601 \*****************************************************************************************************/ 2602/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2603 2604"use strict"; 2605__webpack_require__.r(__webpack_exports__); 2606/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2607/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2608/* harmony export */ }); 2609/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../utils */ "./assets/js/src/utils/index.js"); 2610/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); 2611/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); 2612/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "react"); 2613/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); 2614function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 2615function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 2616function _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; } } 2617function _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; } 2618function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 2619function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 2620 2621 2622 2623/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (function () { 2624 var _useButtonData = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useButtonData)(), 2625 feedbackMessage = _useButtonData.feedbackMessage, 2626 feedbackType = _useButtonData.feedbackType, 2627 showFeedback = _useButtonData.showFeedback, 2628 buttonRef = _useButtonData.buttonRef, 2629 isOverProductImage = _useButtonData.isOverProductImage, 2630 feedback_type = _useButtonData.richAttributes.feedback_type, 2631 feedbackDuration = _useButtonData.feedbackDuration; 2632 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(false), 2633 _useState2 = _slicedToArray(_useState, 2), 2634 feedbackFadeOut = _useState2[0], 2635 setFeedbackFadeOut = _useState2[1]; 2636 var container = 'error' !== feedbackType && isOverProductImage && buttonRef !== null && buttonRef !== void 0 && buttonRef.current ? buttonRef === null || buttonRef === void 0 ? void 0 : buttonRef.current.closest(yithWcwlAddToWishlist.containerSelectors.productC
2636ontainer.join(', ')).querySelector(yithWcwlAddToWishlist.containerSelectors.thumbnailContainer.join(', ')) : false; 2637 var feedbacksContainer = document.querySelector('div.yith-wcwl-feedback-messages-container'); 2638 if (!container && !feedbacksContainer) { 2639 feedbacksContainer = document.body.appendChild(document.createElement('div')); 2640 feedbacksContainer.classList.add('yith-wcwl-feedback-messages-container'); 2641 } 2642 var RenderFeedback = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.useComponentsExtension)('renderFeedback'); 2643 var className = classnames__WEBPACK_IMPORTED_MODULE_1___default()(['yith-wcwl-add-to-wishlist__feedback', 'yith-wcwl-add-to-wishlist__feedback--' + feedbackType, { 2644 'yith-wcwl-add-to-wishlist__feedback-on-product-image': !!container, 2645 'yith-wcwl-fade-out': feedbackFadeOut 2646 }]); 2647 (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () { 2648 if (feedbackMessage && 'modal' !== feedback_type) { 2649 setFeedbackFadeOut(false); 2650 var fadeOutTimer = setTimeout(function () { 2651 setFeedbackFadeOut(true); 2652 }, feedbackDuration - 500); 2653 return function () { 2654 return clearTimeout(fadeOutTimer); 2655 }; 2656 } 2657 }, [feedbackMessage]); 2658 return { 2659 className: className, 2660 showFeedback: showFeedback, 2661 RenderFeedback: RenderFeedback, 2662 feedbackMessage: feedbackMessage, 2663 container: container ? container : feedbacksContainer 2664 }; 2665}); 2666 2667/***/ }), 2668
2669/***/ "./assets/js/src/components/add-to-wishlist/sub-components/feedback/index.js": 2670/*!***********************************************************************************!*\ 2671 !*** ./assets/js/src/components/add-to-wishlist/sub-components/feedback/index.js ***! 2672 \***********************************************************************************/ 2673/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2674 2675"use strict"; 2676__webpack_require__.r(__webpack_exports__); 2677/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2678/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2679/* harmony export */ }); 2680/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 2681/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 2682/* harmony import */ var _lapilli_ui_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lapilli-ui/components */ "@lapilli-ui/components"); 2683/* harmony import */ var _lapilli_ui_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lapilli_ui_components__WEBPACK_IMPORTED_MODULE_1__); 2684/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ "react-dom"); 2685/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_2__); 2686/* harmony import */ var _hooks_use_feedback_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/use-feedback-data */ "./assets/js/src/components/add-to-wishlist/sub-components/feedback/hooks/use-feedback-data.js"); 2687function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); } 2688 2689 2690 2691 2692var Feedback = function Feedback() { 2693 _objectDestructuringEmpty((0,_hooks_use_feedback_data__WEBPACK_IMPORTED_MODULE_3__["default"])()); 2694 var _useFeedbackData2 = (0,_hooks_use_feedback_data__WEBPACK_IMPORTED_MODULE_3__["default"])(), 2695 className = _useFeedbackData2.className, 2696 showFeedback = _useFeedbackData2.showFeedback, 2697 RenderFeedback = _useFeedbackData2.RenderFeedback, 2698 feedbackMessage = _useFeedbackData2.feedbackMessage, 2699 container = _useFeedbackData2.container; 2700 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, showFeedback && (RenderFeedback && !(RenderFeedback !== null && RenderFeedback !== void 0 && RenderFeedback.isEmpty) ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(RenderFeedback, null) : /*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_2__.createPortal)(/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_lapilli_ui_components__WEBPACK_IMPORTED_MODULE_1__.Paper, { 2701 className: className, 2702 shadowColor: "secondaryGlow", 2703 elevation: 4 2704 }, feedbackMessage), container))); 2705}; 2706/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Feedback); 2707 2708/***/ }), 2709
2710/***/ "./assets/js/src/components/icon/index.js": 2711/*!************************************************!*\ 2712 !*** ./assets/js/src/components/icon/index.js ***! 2713 \************************************************/ 2714/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 2715 2716"use strict"; 2717__webpack_require__.r(__webpack_exports__); 2718/* harmony export */ __webpack_require__.d(__webpack_exports__, { 2719/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 2720/* harmony export */ }); 2721/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 2722/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 2723/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); 2724/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__); 2725/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils */ "./assets/js/src/utils/index.js"); 2726var _excluded = ["iconName", "wrapper", "height", "width", "className"]; 2727function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } 2728function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; } 2729function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; } 2730 2731 2732 2733var ArrowDown = function ArrowDown(props) { 2734 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2735 strokeLinecap: "round", 2736 strokeLinejoin: "round", 2737 d: "m19.5 8.25-7.5 7.5-7.5-7.5" 2738 })); 2739}; 2740ArrowDown.defaultProps = { 2741 fill: "none", 2742 strokeWidth: "2.5", 2743 stroke: "currentColor", 2744 viewBox: "0 0 24 24", 2745 xmlns: "http://www.w3.org/2000/svg" 2746}; 2747var Bookmark = function Bookmark(props) { 2748 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2749 clipRule: "evenodd", 2750 fillRule: "evenodd", 2751 d: "M6.32 2.577a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V21a.75.75 0 0 1-1.085.67L12 18.089l-7.165 3.583A.75.75 0 0 1 3.75 21V5.507c0-1.47 1.073-2.756 2.57-2.93Z" 2752 })); 2753}; 2754Bookmark.defaultProps = { 2755 id: "yith-wcwl-icon-bookmark", 2756 className: "yith-wcwl-icon-svg", 2757 fill: "currentColor", 2758 viewBox: "0 0 24 24", 2759 xmlns: "http://www.w3.org/2000/svg" 2760}; 2761var BookmarkOutline = function BookmarkOutline(props) { 2762 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2763 strokeLinecap: "round", 2764 strokeLinejoin: "round", 2765 d: "M17.593 3.322c1.1.128 1.907 1.077 1.907 2.185V21L12 17.25 4.5 21V5.507c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0Z" 2766 })); 2767}; 2768BookmarkOutline.defaultProps = { 2769 id: "yith-wcwl-icon-bookmark-outline", 2770 className: "yith-wcwl-icon-svg", 2771 fill: "none", 2772 strokeWidth: "1.5", 2773 stroke: "currentColor", 2774 viewBox: "0 0 24 24", 2775 xmlns: "http://www.w3.org/2000/svg" 2776}; 2777var Calculator = function Calculator(props) { 2778 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2779 clipRule: "evenodd", 2780 fillRule: "evenodd", 2781 d: "M6.32 1.827a49.255 49.255 0 0 1 11.36 0c1.497.174 2.57 1.46 2.57 2.93V19.5a3 3 0 0 1-3 3H6.75a3 3 0 0 1-3-3V4.757c0-1.47 1.073-2.756 2.57-2.93ZM7.5 11.25a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H8.25a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75H8.25Zm-.75 3a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H8.25a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V18a.75.75 0 0 0-.75-.75H8.25Zm1.748-6a.75.75 0 0 1 .75-.75h.007a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.007a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.335.75.75.75h.007a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75h-.007Zm-.75 3a.75.75 0 0 1 .75-.75h.007a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.007a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.335.75.75.75h.007a.75.75 0 0 0 .75-.75V18a.75.75 0 0 0-.75-.75h-.007Zm1.754-6a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.008a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75h-.008Zm-.75 3a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.008a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V18a.75.75 0 0 0-.75-.75h-.008Zm1.748-6a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75h-.008a.75.75 0 0 1-.75-.75v-.008Zm.75 1.5a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V13.5a.75.75 0 0 0-.75-.75h-.008Zm-8.25-6A.75.75 0 0 1 8.25 6h7.5a.75.75 0 0 1 .75.75v.75a.75.75 0 0 1-.75.75h-7.5a.75.75 0 0 1-.75-.75v-.75Zm9 9a.75.75 0 0 0-1.5 0V18a.75.75 0 0 0 1.5 0v-2.25Z" 2782 })); 2783}; 2784Calculator.defaultProps = { 2785 id: "yith-wcwl-icon-calculator", 2786 className: "yith-wcwl-icon-svg", 2787 fill: "currentColor", 2788 viewBox: "0 0 24 24", 2789 xmlns: "http://www.w3.org/2000/svg" 2790}; 2791var CalculatorOutline = function CalculatorOutline(props) { 2792 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2793 strokeLinecap: "round", 2794 strokeLinejoin: "round", 2795 d: "M15.75 15.75V18m-7.5-6.75h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V13.5Zm0 2.25h.008v.008H8.25v-.008Zm0 2.25h.008v.008H8.25V18Zm2.498-6.75h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V13.5Zm0 2.25h.007v.008h-.007v-.008Zm0 2.25h.007v.008h-.007V18Zm2.504-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5Zm0 2.25h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V18Zm2.498-6.75h.008v.008h-.008v-.008Zm0 2.25h.008v.008h-.008V13.5ZM8.25 6h7.5v2.25h-7.5V6ZM12 2.25c-1.892 0-3.758.11-5.593.322C5.307 2.7 4.5 3.65 4.5 4.757V19.5a2.25 2.25 0 0 0 2.25 2.25h10.5a2.25 2.25 0 0 0 2.25-2.25V4.757c0-1.108-.806-2.057-1.907-2.185A48.507 48.507 0 0 0 12 2.25Z" 2796 })); 2797}; 2798CalculatorOutline.defaultProps = { 2799 id: "yith-wcwl-icon-calculator-outline", 2800 className: "yith-wcwl-icon-svg", 2801 fill: "none", 2802 strokeWidth: "1.5", 2803 stroke: "currentColor", 2804 viewBox: "0 0 24 24", 2805 xmlns: "http://www.w3.org/2000/svg" 2806}; 2807var ChatBubbleLeftEllipsis = function ChatBubbleLeftEllipsis(props) { 2808 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2809 clipRule: "evenodd", 2810 fillRule: "evenodd", 2811 d: "M12 2.25c-2.429 0-4.817.178-7.152.521C2.87 3.061 1.5 4.795 1.5 6.741v6.018c0 1.946 1.37 3.68 3.348 3.97.877.129 1.761.234 2.652.316V21a.75.75 0 0 0 1.28.53l4.184-4.183a.39.39 0 0 1 .266-.112c2.006-.05 3.982-.22 5.922-.506 1.978-.29 3.348-2.023 3.348-3.97V6.741c0-1.947-1.37-3.68-3.348-3.97A49.145 49.145 0 0 0 12 2.25ZM8.25 8.625a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Zm2.625 1.125a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm4.875-1.125a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z" 2812 })); 2813};
2814ChatBubbleLeftEllipsis.defaultProps = { 2815 id: "yith-wcwl-icon-chat-bubble-left-ellipsis", 2816 className: "yith-wcwl-icon-svg", 2817 fill: "currentColor", 2818 viewBox: "0 0 24 24", 2819 xmlns: "http://www.w3.org/2000/svg" 2820}; 2821var ChatBubbleLeftEllipsisOutline = function ChatBubbleLeftEllipsisOutline(props) { 2822 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2823 strokeLinecap: "round", 2824 strokeLinejoin: "round", 2825 d: "M8.625 9.75a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375m-13.5 3.01c0 1.6 1.123 2.994 2.707 3.227 1.087.16 2.185.283 3.293.369V21l4.184-4.183a1.14 1.14 0 0 1 .778-.332 48.294 48.294 0 0 0 5.83-.498c1.585-.233 2.708-1.626 2.708-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z" 2826 })); 2827}; 2828ChatBubbleLeftEllipsisOutline.defaultProps = { 2829 id: "yith-wcwl-icon-chat-bubble-left-ellipsis-outline", 2830 className: "yith-wcwl-icon-svg", 2831 fill: "none", 2832 strokeWidth: "1.5", 2833 stroke: "currentColor", 2834 viewBox: "0 0 24 24", 2835 xmlns: "http://www.w3.org/2000/svg" 2836}; 2837var DocumentArrowUp = function DocumentArrowUp(props) { 2838 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2839 clipRule: "evenodd", 2840 fillRule: "evenodd", 2841 d: "M5.625 1.5H9a3.75 3.75 0 0 1 3.75 3.75v1.875c0 1.036.84 1.875 1.875 1.875H16.5a3.75 3.75 0 0 1 3.75 3.75v7.875c0 1.035-.84 1.875-1.875 1.875H5.625a1.875 1.875 0 0 1-1.875-1.875V3.375c0-1.036.84-1.875 1.875-1.875Zm6.905 9.97a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V18a.75.75 0 0 0 1.5 0v-4.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3Z" 2842 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2843 d: "M14.25 5.25a5.23 5.23 0 0 0-1.279-3.434 9.768 9.768 0 0 1 6.963 6.963A5.23 5.23 0 0 0 16.5 7.5h-1.875a.375.375 0 0 1-.375-.375V5.25Z" 2844 })); 2845}; 2846DocumentArrowUp.defaultProps = { 2847 id: "yith-wcwl-icon-document-arrow-up", 2848 className: "yith-wcwl-icon-svg", 2849 fill: "currentColor", 2850 viewBox: "0 0 24 24", 2851 xmlns: "http://www.w3.org/2000/svg" 2852}; 2853var DocumentArrowUpOutline = function DocumentArrowUpOutline(props) { 2854 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2855 strokeLinecap: "round", 2856 strokeLinejoin: "round", 2857 d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m6.75 12-3-3m0 0-3 3m3-3v6m-1.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" 2858 })); 2859}; 2860DocumentArrowUpOutline.defaultProps = { 2861 id: "yith-wcwl-icon-document-arrow-up-outline", 2862 className: "yith-wcwl-icon-svg", 2863 fill: "none", 2864 strokeWidth: "1.5", 2865 stroke: "currentColor", 2866 viewBox: "0 0 24 24", 2867 xmlns: "http://www.w3.org/2000/svg" 2868}; 2869var DocumentChartBar = function DocumentChartBar(props) { 2870 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2871 clipRule: "evenodd", 2872 fillRule: "evenodd", 2873 d: "M5.625 1.5H9a3.75 3.75 0 0 1 3.75 3.75v1.875c0 1.036.84 1.875 1.875 1.875H16.5a3.75 3.75 0 0 1 3.75 3.75v7.875c0 1.035-.84 1.875-1.875 1.875H5.625a1.875 1.875 0 0 1-1.875-1.875V3.375c0-1.036.84-1.875 1.875-1.875ZM9.75 17.25a.75.75 0 0 0-1.5 0V18a.75.75 0 0 0 1.5 0v-.75Zm2.25-3a.75.75 0 0 1 .75.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 .75-.75Zm3.75-1.5a.75.75 0 0 0-1.5 0V18a.75.75 0 0 0 1.5 0v-5.25Z" 2874 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2875 d: "M14.25 5.25a5.23 5.23 0 0 0-1.279-3.434 9.768 9.768 0 0 1 6.963 6.963A5.23 5.23 0 0 0 16.5 7.5h-1.875a.375.375 0 0 1-.375-.375V5.25Z" 2876 })); 2877}; 2878DocumentChartBar.defaultProps = { 2879 id: "yith-wcwl-icon-document-chart-bar", 2880 className: "yith-wcwl-icon-svg", 2881 fill: "currentColor", 2882 viewBox: "0 0 24 24", 2883 xmlns: "http://www.w3.org/2000/svg" 2884}; 2885var DocumentChartBarOutline = function DocumentChartBarOutline(props) { 2886 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2887 strokeLinecap: "round", 2888 strokeLinejoin: "round", 2889 d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25M9 16.5v.75m3-3v3M15 12v5.25m-4.5-15H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" 2890 })); 2891}; 2892DocumentChartBarOutline.defaultProps = { 2893 id: "yith-wcwl-icon-document-chart-bar-outline", 2894 className: "yith-wcwl-icon-svg", 2895 fill: "none", 2896 strokeWidth: "1.5", 2897 stroke: "currentColor", 2898 viewBox: "0 0 24 24", 2899 xmlns: "http://www.w3.org/2000/svg" 2900}; 2901var DocumentText = function DocumentText(props) { 2902 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2903 clipRule: "evenodd", 2904 fillRule: "evenodd", 2905 d: "M5.625 1.5c-1.036 0-1.875.84-1.875 1.875v17.25c0 1.035.84 1.875 1.875 1.875h12.75c1.035 0 1.875-.84 1.875-1.875V12.75A3.75 3.75 0 0 0 16.5 9h-1.875a1.875 1.875 0 0 1-1.875-1.875V5.25A3.75 3.75 0 0 0 9 1.5H5.625ZM7.5 15a.75.75 0 0 1 .75-.75h7.5a.75.75 0 0 1 0 1.5h-7.5A.75.75 0 0 1 7.5 15Zm.75 2.25a.75.75 0 0 0 0 1.5H12a.75.75 0 0 0 0-1.5H8.25Z" 2906 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2907 d: "M12.971 1.816A5.23 5.23 0 0 1 14.25 5.25v1.875c0 .207.168.375.375.375H16.5a5.23 5.23 0 0 1 3.434 1.279 9.768 9.768 0 0 0-6.963-6.963Z" 2908 })); 2909}; 2910DocumentText.defaultProps = { 2911 id: "yith-wcwl-icon-document-text", 2912 className: "yith-wcwl-icon-svg", 2913 fill: "currentColor", 2914 viewBox: "0 0 24 24", 2915 xmlns: "http://www.w3.org/2000/svg" 2916}; 2917var DocumentTextOutline = function DocumentTextOutline(props) { 2918 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2919 strokeLinecap: "round", 2920 strokeLinejoin: "round", 2921 d: "M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z" 2922 })); 2923}; 2924DocumentTextOutline.defaultProps = { 2925 id: "yith-wcwl-icon-document-text-outline", 2926 className: "yith-wcwl-icon-svg", 2927 fill: "none", 2928 strokeWidth: "1.5", 2929 stroke: "currentColor", 2930 viewBox: "0 0 24 24", 2931 xmlns: "http://www.w3.org/2000/svg" 2932}; 2933var Envelope = function Envelope(props) { 2934 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2935 d: "M1.5 8.67v8.58a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V8.67l-8.928 5.493a3 3 0 0 1-3.144 0L1.5 8.67Z" 2936 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2937 d: "M22.5 6.908V6.75a3 3 0 0 0-3-3h-15a3 3 0 0 0-3 3v.158l9.714 5.978a1.5 1.5 0 0 0 1.572 0L22.5 6.908Z" 2938 })); 2939}; 2940Envelope.defaultProps = { 2941 id: "yith-wcwl-icon-envelope", 2942 className: "yith-wcwl-icon-svg", 2943 width: "12", 2944 height: "12", 2945 fill: "currentColor", 2946 viewBox: "0 0 24 24", 2947 xmlns: "http://www.w3.org/2000/svg" 2948}; 2949var EnvelopeOutline = function EnvelopeOutline(props) { 2950 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2951 strokeLinecap: "round", 2952 strokeLinejoin: "round", 2953 d: "M21.75 6.75v10.5a2.25 2.25 0 0 1-2.25 2.25h-15a2.25 2.25 0 0 1-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0 0 19.5 4.5h-15a2.25 2.25 0 0 0-2.25 2.25m19.5 0v.243a2.25 2.25 0 0 1-1.07 1.916l-7.5 4.615a2.25 2.25 0 0 1-2.36 0L3.32 8.91a2.25 2.25 0 0 1-1.07-1.916V6.75" 2954 })); 2955}; 2956EnvelopeOutline.defaultProps = { 2957 id: "yith-wcwl-icon-envelope-outline", 2958 className: "yith-wcwl-icon-svg", 2959 width: "12", 2960 height: "12", 2961 fill: "none", 2962 strokeWidth: "1.5", 2963 stroke: "currentColor", 2964 viewBox: "0 0 24 24", 2965 xmlns: "http://www.w3.org/2000/svg" 2966}; 2967var Eye = function Eye(props) { 2968 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2969 strokeLinecap: "round", 2970 strokeLinejoin: "round", 2971 d: "M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z" 2972 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2973 strokeLinecap: "round", 2974 strokeLinejoin: "round", 2975 d: "M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" 2976 })); 2977}; 2978Eye.defaultProps = { 2979 fill: "none", 2980 strokeWidth: "1.5", 2981 stroke: "currentColor", 2982 viewBox: "0 0 24 24", 2983 xmlns: "http://www.w3.org/2000/svg" 2984}; 2985var Facebook = function Facebook(props) { 2986 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 2987 d: "m8.792 6.75.334-2.172H7.042V3.17c0-.594.29-1.173 1.224-1.173h.948V.146S8.354 0 7.532 0C5.816 0 4.694 1.04 4.694 2.923v1.655H2.786V6.75h1.908V12h2.348V6.75h1.75Z", 2988 fill: "currentColor" 2989 })); 2990}; 2991Facebook.defaultProps = { 2992 id: "yith-wcwl-icon-facebook", 2993 className: "yith-wcwl-icon-svg", 2994 width: "12", 2995 height: "12", 2996 fill: "none", 2997 xmlns: "http://www.w3.org/2000/svg" 2998}; 2999var Heart = function Heart(props) { 3000 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3001 d: "m11.645 20.91-.007-.003-.022-.012a15.247 15.247 0 0 1-.383-.218 25.18 25.18 0 0 1-4.244-3.17C4.688 15.36 2.25 12.174 2.25 8.25 2.25 5.322 4.714 3 7.688 3A5.5 5.5 0 0 1 12 5.052 5.5 5.5 0 0 1 16.313 3c2.973 0 5.437 2.322 5.437 5.25 0 3.925-2.438 7.111-4.739 9.256a25.175 25.175 0 0 1-4.244 3.17 15.247 15.247 0 0 1-.383.219l-.022.012-.007.004-.003.001a.752.752 0 0 1-.704 0l-.003-.001Z" 3002 })); 3003}; 3004Heart.defaultProps = { 3005 id: "yith-wcwl-icon-heart", 3006 className: "yith-wcwl-icon-svg", 3007 fill: "currentColor", 3008 viewBox: "0 0 24 24", 3009 xmlns: "http://www.w3.org/2000/svg" 3010}; 3011var HeartArrows = function HeartArrows(props) { 3012 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3013 id: "heart-arrows-A", 3014 d: "m19.5 6.625 3.042 2.75-.292-3.813c0-.094-2.938-4.625-3.219-4.719S2.938 1.75 2.938 1.75L-.906 9.094l1.438 11.24 8.547 2.697 6.039-2.063.466-1.427-2.291-1.875L19.5 6.625z" 3015 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3016 id: "heart-arrows-B" 3017 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3018 xlinkHref: "#heart-arrows-A" 3019 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3020 clipPath: "url(#heart-arrows-B)" 3021 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3022 fill: "none", 3023 stroke: "currentColor", 3024 strokeWidth: "1.5", 3025 strokeLinejoin: "round", 3026 d: "M21.375 8.094c0-2.588-2.187-4.688-4.884-4.688-2.016 0-3.747 1.173-4.491 2.847-.745-1.674-2.476-2.847-4.493-2.847-2.695 0-4.882 2.099-4.882 4.688 0 7.521 9.375 12.5 9.375 12.5s9.375-4.98 9.375-12.5z" 3027 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3028 d: "M16.287 11.652h4.999m-1.343-2.277 2.37 2.277-2.37 2.141m-4.817 2.232h5m-3.657-2.277-2.368 2.277 2.368 2.141", 3029 fill: "none", 3030 stroke: "currentColor", 3031 strokeWidth: "1.5", 3032 strokeLinecap: "round", 3033 strokeLinejoin: "round", 3034 strokeMiterlimit: "10" 3035 })); 3036}; 3037HeartArrows.defaultProps = { 3038 id: "yith-wcwl-icon-heart-arrows", 3039 className: "yith-wcwl-icon-svg", 3040 xmlns: "http://www.w3.org/2000/svg", 3041 xmlnsXlink: "http://www.w3.org/1999/xlink", 3042 viewBox: "0 0 24 24" 3043}; 3044var HeartArrowsLight = function HeartArrowsLight(props) { 3045 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3046 d: "M192.183 23.676h13.066m-5.644-5.904 6.142 5.904-6.142 5.548m-12.597 4.996h14.654m-9.479-5.903-6.14 5.903 6.14 5.549", 3047 fill: "none", 3048 stroke: "currentColor", 3049 strokeWidth: "2", 3050 strokeLinecap: "round", 3051 strokeLinejoin: "round" 3052 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3053 id: "heart-arrow-lightA", 3054 d: "m204.334 13.5 5.677 6.778L216.333-1 171-4.5h-18.5l-2 56.5c.5 0 27 3.166 28 2.833s10.613-11.5 10.613-11.5l-5.729-3.564L180.333 24l8.871-12.833 15.13 2.333z" 3055 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3056 id: "heart-arrow-light-B" 3057 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3058 xlinkHref: "#heart-arrow-lightA" 3059 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3060 clipPath: "url(#heart-arrow-light-B)" 3061 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3062 fill: "none", 3063 stroke: "#222", 3064 strokeWidth: "2", 3065 strokeLinejoin: "round", 3066 d: "M158.912 4.946c-5.272 5.261-5.272 13.792 0 19.054l23.047 23 23.045-23c5.272-5.262 5.272-13.792 0-19.054a13.52 13.52 0 0 0-19.092 0l-3.953 3.946-3.955-3.946c-5.273-5.261-13.819-5.261-19.092 0z" 3067 }))); 3068}; 3069HeartArrowsLight.defaultProps = { 3070 id: "yith-wcwl-icon-heart-arrows-light", 3071 className: "yith-wcwl-icon-svg yith-wcwl-icon-svg--light", 3072 xmlns: "http://www.w3.org/2000/svg", 3073 xmlnsXlink: "http://www.w3.org/1999/xlink", 3074 viewBox: "153.958 0 56 48" 3075}; 3076var HeartCheck = function HeartCheck(props) { 3077 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3078 fill: "none", 3079 stroke: "currentColor", 3080 strokeWidth: "1.5", 3081 strokeLinecap: "round", 3082 strokeLinejoin: "round", 3083 strokeMiterlimit: "10", 3084 d: "M23 15.197c0 2.84-2.297 5.137-5.136 5.137s-5.136-2.297-5.136-5.137 2.297-5.135 5.136-5.135S23 12.359 23 15.197zm-7.869.356 1.875 1.802 3.175-3.209" 3085 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3086 id: "heart-check-A",
3087 d: "m20.371 10.714 1.566.755.813-5.906c0-.093-3.188-4.625-3.469-4.719S3.063 1.75 3.063 1.75L-.843 9.094l1.406 11.24 8.531 2.697 6.031-2.063.156-1.063-1.906-1.594 6.996-7.597z" 3088 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3089 id: "heart-check-B" 3090 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3091 xlinkHref: "#heart-check-A" 3092 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3093 clipPath: "url(#heart-check-B)" 3094 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3095 fill: "none", 3096 stroke: "currentColor", 3097 strokeWidth: "1.5", 3098 strokeLinejoin: "round", 3099 d: "M21.375 8.094c0-2.588-2.187-4.688-4.884-4.688-2.016 0-3.747 1.173-4.491 2.847-.745-1.674-2.476-2.847-4.493-2.847-2.695 0-4.882 2.099-4.882 4.688 0 7.521 9.375 12.5 9.375 12.5s9.375-4.98 9.375-12.5z" 3100 }))); 3101}; 3102HeartCheck.defaultProps = { 3103 id: "yith-wcwl-icon-heart-check", 3104 className: "yith-wcwl-icon-svg", 3105 xmlns: "http://www.w3.org/2000/svg", 3106 xmlnsXlink: "http://www.w3.org/1999/xlink", 3107 viewBox: "0 0 24 24" 3108}; 3109var HeartCheckLight = function HeartCheckLight(props) { 3110 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3111 id: "heart-check-light-A", 3112 d: "m284.833 11.167 8.764 1.529L297.666-1l-45.333-3.5h-18.5l-2 56.5c.5 0 27 3.166 28 2.833s18.5-18.333 18.5-18.333l-8.833-9-7.834-3.5 8.871-12.833h14.296z" 3113 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3114 id: "heart-check-light-B" 3115 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3116 href: "#heart-check-light-A" 3117 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3118 clipPath: "url(#heart-check-light-B)" 3119 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3120 fill: "none", 3121 stroke: "#222", 3122 strokeWidth: "2", 3123 strokeLinejoin: "round", 3124 d: "M240.245 4.946c-5.272 5.261-5.272 13.792 0 19.054l23.047 23 23.045-23c5.272-5.262 5.272-13.792 0-19.054a13.52 13.52 0 0 0-19.092 0l-3.953 3.946-3.955-3.946c-5.273-5.261-13.819-5.261-19.092 0z" 3125 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3126 fill: "currentColor", 3127 d: "m279.486 31.831-7.447-8.148 2.953-2.699 4.604 5.037 10.27-10.425 2.85 2.808z" 3128 })); 3129}; 3130HeartCheckLight.defaultProps = { 3131 id: "yith-wcwl-icon-heart-check-light", 3132 className: "yith-wcwl-icon-svg yith-wcwl-icon-svg--light", 3133 xmlns: "http://www.w3.org/2000/svg", 3134 viewBox: "235.291 0 58.542 48" 3135}; 3136var HeartLight = function HeartLight(props) { 3137 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3138 id: "heart-check-light-A", 3139 d: "m284.833 11.167 8.764 1.529L297.666-1l-45.333-3.5h-18.5l-2 56.5c.5 0 27 3.166 28 2.833s18.5-18.333 18.5-18.333l-8.833-9-7.834-3.5 8.871-12.833h14.296z" 3140 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3141 clipPath: "url(#heart-check-light-B)" 3142 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3143 fill: "none", 3144 stroke: "#222", 3145 strokeWidth: "2", 3146 strokeLinejoin: "round", 3147 d: "M240.245 4.946c-5.272 5.261-5.272 13.792 0 19.054l23.047 23 23.045-23c5.272-5.262 5.272-13.792 0-19.054a13.52 13.52 0 0 0-19.092 0l-3.953 3.946-3.955-3.946c-5.273-5.261-13.819-5.261-19.092 0z" 3148 }))); 3149}; 3150HeartLight.defaultProps = { 3151 id: "yith-wcwl-icon-heart-light", 3152 className: "yith-wcwl-icon-svg yith-wcwl-icon-svg--light", 3153 xmlns: "http://www.w3.org/2000/svg", 3154 viewBox: "234.05 0 58.542 48" 3155}; 3156var HeartOutline = function HeartOutline(props) { 3157 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3158 strokeLinecap: "round", 3159 strokeLinejoin: "round", 3160 d: "M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12Z" 3161 })); 3162}; 3163HeartOutline.defaultProps = { 3164 id: "yith-wcwl-icon-heart-outline", 3165 className: "yith-wcwl-icon-svg", 3166 fill: "none", 3167 strokeWidth: "1.5", 3168 stroke: "currentColor", 3169 viewBox: "0 0 24 24", 3170 xmlns: "http://www.w3.org/2000/svg" 3171}; 3172var HeartRemove = function HeartRemove(props) { 3173 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3174 fill: "none", 3175 stroke: "currentColor", 3176 strokeWidth: "1.5", 3177 strokeLinecap: "round", 3178 strokeLinejoin: "round", 3179 strokeMiterlimit: "10",
3180 d: "m16.577 13.922 2.563 2.563m.011-2.563-2.563 2.563M23 15.197c0 2.84-2.297 5.137-5.136 5.137s-5.136-2.297-5.136-5.137 2.297-5.135 5.136-5.135S23 12.359 23 15.197z" 3181 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3182 id: "heart-remove-A", 3183 d: "m20.371 10.714 1.566.755.813-5.906c0-.093-3.188-4.625-3.469-4.719S3.063 1.75 3.063 1.75L-.843 9.094l1.406 11.24 8.531 2.697 6.031-2.063.156-1.063-1.906-1.594 6.996-7.597z" 3184 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3185 id: "heart-remove-B" 3186 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3187 xlinkHref: "#heart-remove-A" 3188 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3189 clipPath: "url(#heart-remove-B)" 3190 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3191 fill: "none", 3192 stroke: "currentColor", 3193 strokeWidth: "1.5", 3194 strokeLinejoin: "round", 3195 d: "M21.375 8.094c0-2.588-2.187-4.688-4.884-4.688-2.016 0-3.747 1.173-4.491 2.847-.745-1.674-2.476-2.847-4.493-2.847-2.695 0-4.882 2.099-4.882 4.688 0 7.521 9.375 12.5 9.375 12.5s9.375-4.98 9.375-12.5z" 3196 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3197 d: "M45.801 10.208h4.573m-1.228-2.083 2.167 2.083-2.167 1.959m-4.407 2.041h4.574m-3.345-2.083-2.167 2.083 2.167 1.958", 3198 fill: "none", 3199 stroke: "#000", 3200 strokeWidth: "1.5", 3201 strokeLinecap: "round", 3202 strokeLinejoin: "round", 3203 strokeMiterlimit: "10" 3204 })); 3205}; 3206HeartRemove.defaultProps = { 3207 id: "yith-wcwl-icon-heart-remove", 3208 className: "yith-wcwl-icon-svg", 3209 xmlns: "http://www.w3.org/2000/svg", 3210 xmlnsXlink: "http://www.w3.org/1999/xlink", 3211 viewBox: "0 0 24 24" 3212}; 3213var HeartRemoveLight = function HeartRemoveLight(props) { 3214 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3215 fill: "none", 3216 stroke: "currentColor", 3217 strokeWidth: "2", 3218 strokeLinecap: "round", 3219 strokeLinejoin: "round", 3220 d: "m123.109 27.936 7.714 7.715m.032-7.715-7.714 7.715m16.165-3.873a12.32 12.32 0 1 1-24.646 0 12.32 12.32 0 1 1 24.646 0z" 3221 }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3222 id: "heart-remove-light-A", 3223 d: "m136.167 17.772 4.396 4.836 6.771-26.275L99.5-6.833 81.167-4.5c-.167-.167.5 44.999 1 45.333s10.334 19.333 11.167 19 27.833-4.999 27.833-5.666-2.5-8.5-2.5-8.5l-6.5-5.898 24-21.997z" 3224 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3225 id: "heart-remove-light-B" 3226 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", { 3227 xlinkHref: "#heart-remove-light-A" 3228 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3229 clipPath: "url(#heart-remove-light-B)" 3230 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3231 fill: "none", 3232 stroke: "#222", 3233 strokeWidth: "2", 3234 strokeLinejoin: "round", 3235 d: "M90.287 4.946c-5.272 5.261-5.272 13.792 0 19.054l23.047 23 23.045-23c5.272-5.262 5.272-13.792 0-19.054a13.52 13.52 0 0 0-19.092 0l-3.953 3.946-3.955-3.946c-5.273-5.261-13.819-5.261-19.092 0z" 3236 }))); 3237}; 3238HeartRemoveLight.defaultProps = { 3239 id: "yith-wcwl-icon-heart-remove-light", 3240 className: "yith-wcwl-icon-svg yith-wcwl-icon-svg--light", 3241 xmlns: "http://www.w3.org/2000/svg", 3242 xmlnsXlink: "http://www.w3.org/1999/xlink", 3243 viewBox: "85.333 0 56 48" 3244}; 3245var Pinterest = function Pinterest(props) { 3246 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3247 d: "M6.289 0C3.822 0 1.384 1.645 1.384 4.306c0 1.693.952 2.654 1.529 2.654.238 0 .375-.663.375-.85 0-.224-.57-.7-.57-1.63 0-1.934 1.472-3.304 3.376-3.304 1.637 0 2.849.93 2.849 2.64 0 1.276-.512 3.671-2.171 3.671-.599 0-1.111-.433-1.111-1.053 0-.909.635-1.789.635-2.727 0-1.591-2.258-1.303-2.258.62 0 .405.05.852.23 1.22-.33 1.428-1.009 3.556-1.009 5.027 0 .454.065.902.108 1.356.082.091.041.082.166.036 1.212-1.659 1.169-1.983 1.717-4.154.296.562 1.06.865 1.666.865 2.553 0 3.7-2.488 3.7-4.732C10.616 1.558 8.553 0 6.29 0Z", 3248 fill: "currentColor" 3249 })); 3250}; 3251Pinterest.defaultProps = { 3252 id: "yith-wcwl-icon-pinterest", 3253 className: "yith-wcwl-icon-svg", 3254 width: "12", 3255 height: "12", 3256 fill: "none", 3257 xmlns: "http://www.w3.org/2000/svg" 3258}; 3259var Plus = function Plus(props) { 3260 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3261 clipRule: "evenodd", 3262 fillRule: "evenodd", 3263 d: "M12 3.75a.75.75 0 0 1 .75.75v6.75h6.75a.75.75 0 0 1 0 1.5h-6.75v6.75a.75.75 0 0 1-1.5 0v-6.75H4.5a.75.75 0 0 1 0-1.5h6.75V4.5a.75.75 0 0 1 .75-.75Z" 3264 })); 3265}; 3266Plus.defaultProps = { 3267 id: "yith-wcwl-icon-plus", 3268 className: "yith-wcwl-icon-svg", 3269 fill: "currentColor", 3270 viewBox: "0 0 24 24", 3271 xmlns: "http://www.w3.org/2000/svg" 3272}; 3273var PlusCircle = function PlusCircle(props) { 3274 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3275 clipRule: "evenodd", 3276 fillRule: "evenodd", 3277 d: "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 9a.75.75 0 0 0-1.5 0v2.25H9a.75.75 0 0 0 0 1.5h2.25V15a.75.75 0 0 0 1.5 0v-2.25H15a.75.75 0 0 0 0-1.5h-2.25V9Z" 3278 })); 3279}; 3280PlusCircle.defaultProps = { 3281 id: "yith-wcwl-icon-plus-circle", 3282 className: "yith-wcwl-icon-svg", 3283 fill: "currentColor", 3284 viewBox: "0 0 24 24", 3285 xmlns: "http://www.w3.org/2000/svg" 3286}; 3287var PlusCircleOutline = function PlusCircleOutline(props) { 3288 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3289 strokeLinecap: "round", 3290 strokeLinejoin: "round", 3291 d: "M12 9v6m3-3H9m12 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" 3292 })); 3293}; 3294PlusCircleOutline.defaultProps = { 3295 id: "yith-wcwl-icon-plus-circle-outline", 3296 className: "yith-wcwl-icon-svg", 3297 fill: "none", 3298 strokeWidth: "1.5", 3299 stroke: "currentColor", 3300 viewBox: "0 0 24 24", 3301 xmlns: "http://www.w3.org/2000/svg" 3302}; 3303var QuestionMarkCircle = function QuestionMarkCircle(props) { 3304 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3305 clipRule: "evenodd", 3306 fillRule: "evenodd", 3307 d: "M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502a2.28 2.28 0 0 0 .503-.331c.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z" 3308 })); 3309}; 3310QuestionMarkCircle.defaultProps = { 3311 id: "yith-wcwl-icon-question-mark-circle", 3312 className: "yith-wcwl-icon-svg", 3313 fill: "currentColor", 3314 viewBox: "0 0 24 24", 3315 xmlns: "http://www.w3.org/2000/svg" 3316}; 3317var QuestionMarkCircleOutline = function QuestionMarkCircleOutline(props) { 3318 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3319 strokeLinecap: "round", 3320 strokeLinejoin: "round", 3321 d: "M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" 3322 })); 3323}; 3324QuestionMarkCircleOutline.defaultProps = { 3325 id: "yith-wcwl-icon-question-mark-circle-outline", 3326 className: "yith-wcwl-icon-svg", 3327 fill: "none", 3328 strokeWidth: "1.5", 3329 stroke: "currentColor", 3330 viewBox: "0 0 24 24", 3331 xmlns: "http://www.w3.org/2000/svg" 3332}; 3333var ReceiptPercent = function ReceiptPercent(props) { 3334 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3335 clipRule: "evenodd", 3336 fillRule: "evenodd", 3337 d: "M12 1.5c-1.921 0-3.816.111-5.68.327-1.497.174-2.57 1.46-2.57 2.93V21.75a.75.75 0 0 0 1.029.696l3.471-1.388 3.472 1.388a.75.75 0 0 0 .556 0l3.472-1.388 3.471 1.388a.75.75 0 0 0 1.029-.696V4.757c0-1.47-1.073-2.756-2.57-2.93A49.255 49.255 0 0 0 12 1.5Zm3.53 7.28a.75.75 0 0 0-1.06-1.06l-6 6a.75.75 0 1 0 1.06 1.06l6-6ZM8.625 9a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0Zm5.625 3.375a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z" 3338 })); 3339}; 3340ReceiptPercent.defaultProps = { 3341 id: "yith-wcwl-icon-receipt-percent", 3342 className: "yith-wcwl-icon-svg", 3343 fill: "currentColor", 3344 viewBox: "0 0 24 24", 3345 xmlns: "http://www.w3.org/2000/svg" 3346}; 3347var ReceiptPercentOutline = function ReceiptPercentOutline(props) { 3348 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3349 strokeLinecap: "round", 3350 strokeLinejoin: "round",
3351 d: "m9 14.25 6-6m4.5-3.493V21.75l-3.75-1.5-3.75 1.5-3.75-1.5-3.75 1.5V4.757c0-1.108.806-2.057 1.907-2.185a48.507 48.507 0 0 1 11.186 0c1.1.128 1.907 1.077 1.907 2.185ZM9.75 9h.008v.008H9.75V9Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm4.125 4.5h.008v.008h-.008V13.5Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" 3352 })); 3353}; 3354ReceiptPercentOutline.defaultProps = { 3355 id: "yith-wcwl-icon-receipt-percent-outline", 3356 className: "yith-wcwl-icon-svg", 3357 fill: "none", 3358 strokeWidth: "1.5", 3359 stroke: "currentColor", 3360 viewBox: "0 0 24 24", 3361 xmlns: "http://www.w3.org/2000/svg" 3362}; 3363var ShoppingBag = function ShoppingBag(props) { 3364 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3365 clipRule: "evenodd", 3366 fillRule: "evenodd", 3367 d: "M7.5 6v.75H5.513c-.96 0-1.764.724-1.865 1.679l-1.263 12A1.875 1.875 0 0 0 4.25 22.5h15.5a1.875 1.875 0 0 0 1.865-2.071l-1.263-12a1.875 1.875 0 0 0-1.865-1.679H16.5V6a4.5 4.5 0 1 0-9 0ZM12 3a3 3 0 0 0-3 3v.75h6V6a3 3 0 0 0-3-3Zm-3 8.25a3 3 0 1 0 6 0v-.75a.75.75 0 0 1 1.5 0v.75a4.5 4.5 0 1 1-9 0v-.75a.75.75 0 0 1 1.5 0v.75Z" 3368 })); 3369}; 3370ShoppingBag.defaultProps = { 3371 id: "yith-wcwl-icon-shopping-bag", 3372 className: "yith-wcwl-icon-svg", 3373 fill: "currentColor", 3374 viewBox: "0 0 24 24", 3375 xmlns: "http://www.w3.org/2000/svg" 3376}; 3377var ShoppingBagOutline = function ShoppingBagOutline(props) { 3378 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3379 strokeLinecap: "round", 3380 strokeLinejoin: "round", 3381 d: "M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z" 3382 })); 3383}; 3384ShoppingBagOutline.defaultProps = { 3385 id: "yith-wcwl-icon-shopping-bag-outline", 3386 className: "yith-wcwl-icon-svg", 3387 fill: "none", 3388 strokeWidth: "1.5", 3389 stroke: "currentColor", 3390 viewBox: "0 0 24 24", 3391 xmlns: "http://www.w3.org/2000/svg" 3392}; 3393var ShoppingCart = function ShoppingCart(props) { 3394 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3395 d: "M2.25 2.25a.75.75 0 0 0 0 1.5h1.386c.17 0 .318.114.362.278l2.558 9.592a3.752 3.752 0 0 0-2.806 3.63c0 .414.336.75.75.75h15.75a.75.75 0 0 0 0-1.5H5.378A2.25 2.25 0 0 1 7.5 15h11.218a.75.75 0 0 0 .674-.421 60.358 60.358 0 0 0 2.96-7.228.75.75 0 0 0-.525-.965A60.864 60.864 0 0 0 5.68 4.509l-.232-.867A1.875 1.875 0 0 0 3.636 2.25H2.25Zm1.5 18a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Zm12.75 0a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0Z" 3396 })); 3397}; 3398ShoppingCart.defaultProps = { 3399 id: "yith-wcwl-icon-shopping-cart", 3400 className: "yith-wcwl-icon-svg", 3401 fill: "currentColor", 3402 viewBox: "0 0 24 24", 3403 xmlns: "http://www.w3.org/2000/svg" 3404}; 3405var ShoppingCartOutline = function ShoppingCartOutline(props) { 3406 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3407 strokeLinecap: "round", 3408 strokeLinejoin: "round", 3409 d: "M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 0 0-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 0 0-16.536-1.84M7.5 14.25 5.106 5.272M6 20.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm12.75 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z" 3410 })); 3411}; 3412ShoppingCartOutline.defaultProps = { 3413 id: "yith-wcwl-icon-shopping-cart-outline", 3414 className: "yith-wcwl-icon-svg", 3415 fill: "none", 3416 strokeWidth: "1.5", 3417 stroke: "currentColor", 3418 viewBox: "0 0 24 24", 3419 xmlns: "http://www.w3.org/2000/svg" 3420}; 3421var Star = function Star(props) { 3422 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3423 clipRule: "evenodd", 3424 fillRule: "evenodd", 3425 d: "M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.006 5.404.434c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.434 2.082-5.005Z" 3426 })); 3427}; 3428Star.defaultProps = { 3429 id: "yith-wcwl-icon-star", 3430 className: "yith-wcwl-icon-svg", 3431 fill: "currentColor", 3432 viewBox: "0 0 24 24", 3433 xmlns: "http://www.w3.org/2000/svg" 3434}; 3435var StarOutline = function StarOutline(props) { 3436 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3437 strokeLinecap: "round", 3438 strokeLinejoin: "round", 3439 d: "M11.48 3.499a.562.562 0 0 1 1.04 0l2.125 5.111a.563.563 0 0 0 .475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 0 0-.182.557l1.285 5.385a.562.562 0 0 1-.84.61l-4.725-2.885a.562.562 0 0 0-.586 0L6.982 20.54a.562.562 0 0 1-.84-.61l1.285-5.386a.562.562 0 0 0-.182-.557l-4.204-3.602a.562.562 0 0 1 .321-.988l5.518-.442a.563.563 0 0 0 .475-.345L11.48 3.5Z" 3440 })); 3441}; 3442StarOutline.defaultProps = { 3443 id: "yith-wcwl-icon-star-outline", 3444 className: "yith-wcwl-icon-svg", 3445 fill: "none", 3446 strokeWidth: "1.5", 3447 stroke: "currentColor", 3448 viewBox: "0 0 24 24", 3449 xmlns: "http://www.w3.org/2000/svg" 3450};
3451var Trash = function Trash(props) { 3452 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3453 strokeLinecap: "round", 3454 strokeLinejoin: "round", 3455 d: "m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" 3456 })); 3457}; 3458Trash.defaultProps = { 3459 id: "yith-wcwl-icon-trash", 3460 className: "yith-wcwl-icon-svg", 3461 fill: "none", 3462 strokeWidth: "1.5", 3463 stroke: "currentColor", 3464 viewBox: "0 0 24 24", 3465 xmlns: "http://www.w3.org/2000/svg" 3466}; 3467var WarningTriangle = function WarningTriangle(props) { 3468 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3469 clipRule: "evenodd", 3470 fillRule: "evenodd", 3471 d: "M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625l6.28-10.875ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" 3472 })); 3473}; 3474WarningTriangle.defaultProps = { 3475 id: "yith-wcwl-icon-warning-triangle", 3476 className: "yith-wcwl-icon-svg", 3477 fill: "currentColor", 3478 viewBox: "0 0 20 20", 3479 xmlns: "http://www.w3.org/2000/svg" 3480}; 3481var Whatsapp = function Whatsapp(props) { 3482 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("g", { 3483 clipPath: "url(#clip0_1126_7618)" 3484 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3485 d: "M10.203 1.744A5.902 5.902 0 0 0 5.997 0 5.954 5.954 0 0 0 .844 8.92L0 12l3.153-.828a5.928 5.928 0 0 0 2.842.723h.002C9.273 11.896 12 9.229 12 5.95c0-1.588-.675-3.08-1.797-4.205Zm-4.206 9.15c-.889 0-1.76-.239-2.518-.689l-.179-.107-1.87.49.499-1.824-.118-.187a4.926 4.926 0 0 1-.756-2.63A4.95 4.95 0 0 1 6 1.003c1.32 0 2.56.515 3.493 1.45.932.934 1.505 2.175 1.502 3.495 0 2.727-2.274 4.945-4.998 4.945Zm2.711-3.702a21.494 21.494 0 0 0-1.015-.482c-.137-.051-.236-.075-.335.075-.1.15-.383.482-.471.584-.086.099-.174.112-.322.037-.873-.436-1.446-.78-2.022-1.768-.153-.262.153-.243.436-.811.049-.1.025-.185-.013-.26-.037-.075-.335-.806-.458-1.104-.12-.289-.244-.249-.335-.254-.085-.005-.185-.005-.284-.005a.55.55 0 0 0-.396.184c-.137.15-.52.51-.52 1.24 0 .732.533 1.439.606 1.538.075.1 1.047 1.6 2.539 2.245.943.407 1.312.442 1.784.372.286-.043.878-.359 1.002-.707.123-.348.123-.646.085-.707-.035-.067-.134-.105-.281-.177Z", 3486 fill: "currentColor" 3487 })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("clipPath", { 3488 id: "clip0_1126_7618" 3489 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3490 fill: "#fff", 3491 d: "M0 0h12v12H0z" 3492 })))); 3493}; 3494Whatsapp.defaultProps = { 3495 id: "yith-wcwl-icon-whatsapp", 3496 className: "yith-wcwl-icon-svg", 3497 width: "12", 3498 height: "12", 3499 fill: "none", 3500 xmlns: "http://www.w3.org/2000/svg" 3501}; 3502var XTwitter = function XTwitter(props) { 3503 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", props, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", { 3504 d: "M9.45.576h1.84L7.27 5.171 12 11.424H8.297L5.395 7.632l-3.317 3.792H.235l4.3-4.916L0 .576h3.797l2.62 3.466L9.45.576Zm-.647 9.747h1.02L3.24 1.62H2.146l6.657 8.704Z", 3505 fill: "currentColor" 3506 })); 3507}; 3508XTwitter.defaultProps = { 3509 id: "yith-wcwl-icon-x-twitter", 3510 className: "yith-wcwl-icon-svg", 3511 width: "12", 3512 height: "12", 3513 fill: "none", 3514 xmlns: "http://www.w3.org/2000/svg" 3515}; 3516var iconMap = { 3517 'arrow-down': ArrowDown, 3518 'bookmark': Bookmark, 3519 'bookmark-outline': BookmarkOutline, 3520 'calculator': Calculator, 3521 'calculator-outline': CalculatorOutline, 3522 'chat-bubble-left-ellipsis': ChatBubbleLeftEllipsis, 3523 'chat-bubble-left-ellipsis-outline': ChatBubbleLeftEllipsisOutline, 3524 'document-arrow-up': DocumentArrowUp, 3525 'document-arrow-up-outline': DocumentArrowUpOutline, 3526 'document-chart-bar': DocumentChartBar, 3527 'document-chart-bar-outline': DocumentChartBarOutline, 3528 'document-text': DocumentText, 3529 'document-text-outline': DocumentTextOutline, 3530 'envelope': Envelope, 3531 'envelope-outline': EnvelopeOutline, 3532 'eye': Eye, 3533 'facebook': Facebook, 3534 'heart': Heart, 3535 'heart-arrows': HeartArrows, 3536 'heart-arrows-light': HeartArrowsLight, 3537 'heart-check': HeartCheck, 3538 'heart-check-light': HeartCheckLight, 3539 'heart-light': HeartLight, 3540 'heart-outline': HeartOutline, 3541 'heart-remove': HeartRemove, 3542 'heart-remove-light': HeartRemoveLight, 3543 'pinterest': Pinterest, 3544 'plus': Plus, 3545 'plus-circle': PlusCircle, 3546 'plus-circle-outline': PlusCircleOutline, 3547 'question-mark-circle': QuestionMarkCircle, 3548 'question-mark-circle-outline': QuestionMarkCircleOutline, 3549 'receipt-percent': ReceiptPercent, 3550 'receipt-percent-outline': ReceiptPercentOutline, 3551 'shopping-bag': ShoppingBag, 3552 'shopping-bag-outline': ShoppingBagOutline, 3553 'shopping-cart': ShoppingCart, 3554 'shopping-cart-outline': ShoppingCartOutline, 3555 'star': Star, 3556 'star-outline': StarOutline, 3557 'trash': Trash, 3558 'warning-triangle': WarningTriangle, 3559 'whatsapp': Whatsapp, 3560 'x-twitter': XTwitter 3561}; 3562function Icon(_ref) { 3563 var iconName = _ref.iconName, 3564 _ref$wrapper = _ref.wrapper, 3565 wrapper = _ref$wrapper === void 0 ? 'none' : _ref$wrapper, 3566 height = _ref.height, 3567 width = _ref.width, 3568 className = _ref.className, 3569 props = _objectWithoutProperties(_ref, _excluded); 3570 if (height || width) { 3571 if (!(props !== null && props !== void 0 && props.style)) { 3572 props.style = {}; 3573 } 3574 height && (props.style.height = height); 3575 width && (props.style.width = width); 3576 } 3577 var SelectedIcon = iconMap[iconName]; 3578 if (!SelectedIcon && !(0,_utils__WEBPACK_IMPORTED_MODULE_2__.isValidHttpUrl)(iconName)) { 3579 return null; 3580 } 3581 props.className = classnames__WEBPACK_IMPORTED_MODULE_1___default()('yith-wcwl-icon', { 3582 'yith-wcwl-icon-svg--light': iconName.endsWith('-light'), 3583 'yith-wcwl-icon-svg': !!SelectedIcon, 3584 'yith-wcwl-custom-icon': !SelectedIcon 3585 }, className); 3586 var iconElement = SelectedIcon ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SelectedIcon, props) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", _extends({ 3587 src: iconName, 3588 alt: "Add to wishlist icon" 3589 }, props)); 3590 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, wrapper === 'div' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { 3591 className: "yith-wcwl-icon-svg__wrapper" 3592 }, iconElement), wrapper === 'span' && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", { 3593 className: "yith-wcwl-icon-svg__wrapper" 3594 }, iconElement), wrapper === 'none' && iconElement); 3595} 3596/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon); 3597 3598/***/ }), 3599
3600/***/ "./assets/js/src/features/buttons/buttons-reducer.js": 3601/*!***********************************************************!*\ 3602 !*** ./assets/js/src/features/buttons/buttons-reducer.js ***! 3603 \***********************************************************/ 3604/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3605 3606"use strict"; 3607__webpack_require__.r(__webpack_exports__); 3608/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3609/* harmony export */ closeAllDropdowns: () => (/* binding */ closeAllDropdowns), 3610/* harmony export */ closeDropdown: () => (/* binding */ closeDropdown), 3611/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 3612/* harmony export */ openDropdown: () => (/* binding */ openDropdown), 3613/* harmony export */ toggleDropdown: () => (/* binding */ toggleDropdown) 3614/* harmony export */ }); 3615/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); 3616function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 3617function 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; } 3618function _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) { _defineProperty(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; } 3619function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 3620function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 3621function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 3622 3623var initialState = { 3624 buttons: {} 3625}; 3626var buttonsSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({ 3627 name: 'buttons', 3628 initialState: initialState, 3629 reducers: { 3630 closeDropdown: function closeDropdown(state, action) { 3631 var id = action.payload.id; 3632 state.buttons[id] = _objectSpread(_objectSpread({}, state.buttons[id]), {}, { 3633 isDropdownOpen: false 3634 }); 3635 }, 3636 openDropdown: function openDropdown(state, action) { 3637 var id = action.payload.id; 3638 state.buttons[id] = _objectSpread(_objectSpread({}, state.buttons[id]), {}, { 3639 isDropdownOpen: true 3640 }); 3641 }, 3642 toggleDropdown: function toggleDropdown(state, action) { 3643 var _state$buttons$id; 3644 var id = action.payload.id; 3645 state.buttons[id] = _objectSpread(_objectSpread({}, state.buttons[id]), {}, { 3646 isDropdownOpen: !((_state$buttons$id = state.buttons[id]) !== null && _state$buttons$id !== void 0 && _state$buttons$id.isDropdownOpen) 3647 }); 3648 }, 3649 closeAllDropdowns: function closeAllDropdowns(state, action) { 3650 var _action$payload; 3651 var idToExclude = action === null || action === void 0 || (_action$payload = action.payload) === null || _action$payload === void 0 ? void 0 : _action$payload.id; 3652 Object.keys(state.buttons).forEach(function (id) { 3653 if (idToExclude !== id) { 3654 state.buttons[id].isDropdownOpen = false; 3655 } 3656 }); 3657 } 3658 } 3659}); 3660var actions = buttonsSlice.actions, 3661 reducer = buttonsSlice.reducer; 3662var openDropdown = actions.openDropdown,
3663 closeDropdown = actions.closeDropdown, 3664 toggleDropdown = actions.toggleDropdown, 3665 closeAllDropdowns = actions.closeAllDropdowns; 3666 3667/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer); 3668 3669/***/ }), 3670
3671/***/ "./assets/js/src/features/products-data/invalidate-middleware.js": 3672/*!***********************************************************************!*\ 3673 !*** ./assets/js/src/features/products-data/invalidate-middleware.js ***! 3674 \***********************************************************************/ 3675/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3676 3677"use strict"; 3678__webpack_require__.r(__webpack_exports__); 3679/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3680/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 3681/* harmony export */ }); 3682/* harmony import */ var _products_data_actions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./products-data-actions */ "./assets/js/src/features/products-data/products-data-actions.js"); 3683/* harmony import */ var _wishlists_wishlists_actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wishlists/wishlists-actions */ "./assets/js/src/features/wishlists/wishlists-actions.js"); 3684 3685 3686var INVALIDATION_INTERVAL = 30000; 3687var createInvalidateMiddleware = function createInvalidateMiddleware() { 3688 var lastChecked = Date.now(); 3689 return function (store) { 3690 return function (next) { 3691 return function (action) { 3692 var forceInvalidation = 'FORCE_INVALIDATION' === (action === null || action === void 0 ? void 0 : action.type); 3693 if (forceInvalidation || Date.now() - lastChecked >= INVALIDATION_INTERVAL) { 3694 lastChecked = Date.now(); 3695 var state = store.getState(); 3696 var products = state.productsData.products; 3697 store.dispatch((0,_products_data_actions__WEBPACK_IMPORTED_MODULE_0__.fetchProductsDataAsync)(Object.keys(products))); 3698 store.dispatch((0,_wishlists_wishlists_actions__WEBPACK_IMPORTED_MODULE_1__.fetchWishlists)()); 3699 } 3700 return next(action); 3701 }; 3702 }; 3703 }; 3704}; 3705/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createInvalidateMiddleware); 3706 3707/***/ }), 3708
3709/***/ "./assets/js/src/features/products-data/products-data-actions.js": 3710/*!***********************************************************************!*\ 3711 !*** ./assets/js/src/features/products-data/products-data-actions.js ***! 3712 \***********************************************************************/ 3713/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 3714 3715"use strict"; 3716__webpack_require__.r(__webpack_exports__); 3717/* harmony export */ __webpack_require__.d(__webpack_exports__, { 3718/* harmony export */ addProductToWishlist: () => (/* binding */ addProductToWishlist), 3719/* harmony export */ createWishlistAndAddProduct: () => (/* binding */ createWishlistAndAddProduct), 3720/* harmony export */ fetchProductDataAsync: () => (/* binding */ fetchProductDataAsync), 3721/* harmony export */ fetchProductsDataAsync: () => (/* binding */ fetchProductsDataAsync), 3722/* harmony export */ moveProductToAnotherWishlist: () => (/* binding */ moveProductToAnotherWishlist), 3723/* harmony export */ removeProductFromWishlist: () => (/* binding */ removeProductFromWishlist) 3724/* harmony export */ }); 3725/* harmony import */ var _products_data_reducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./products-data-reducer */ "./assets/js/src/features/products-data/products-data-reducer.js"); 3726/* harmony import */ var _wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../wishlists/wishlists-reducer */ "./assets/js/src/features/wishlists/wishlists-reducer.js"); 3727/* harmony import */ var _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/add-to-wishlist-api */ "./assets/js/src/utils/add-to-wishlist-api.js"); 3728/* harmony import */ var _utils_wishlist_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/wishlist-api */ "./assets/js/src/utils/wishlist-api.js"); 3729function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 3730function 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; } 3731function _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) { _defineProperty(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; } 3732function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 3733function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 3734function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t
vendor: 9,083 bytes, lines 3734-3736
3734); } 3735function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 3736function asyncGeneratorStep(
3736n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } 3737function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 3738 3739 3740 3741 3742var fetchProductDataAsync = function fetchProductDataAsync(productId) { 3743 return /*#__PURE__*/function () { 3744 var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) { 3745 var product; 3746 return _regeneratorRuntime().wrap(function _callee$(_context) { 3747 while (1) switch (_context.prev = _context.next) { 3748 case 0: 3749 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataStart)({ 3750 productId: productId 3751 })); 3752 _context.prev = 1; 3753 _context.next = 4; 3754 return _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__["default"].fetchProductDataDebounced(productId); 3755 case 4: 3756 product = _context.sent; 3757 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataSuccess)({ 3758 productId: productId, 3759 data: product 3760 })); 3761 _context.next = 11; 3762 break; 3763 case 8: 3764 _context.prev = 8; 3765 _context.t0 = _context["catch"](1); 3766 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataFailure)({ 3767 productId: productId, 3768 error: _context.t0.message 3769 })); 3770 case 11: 3771 case "end": 3772 return _context.stop(); 3773 } 3774 }, _callee, null, [[1, 8]]); 3775 })); 3776 return function (_x) { 3777 return _ref.apply(this, arguments); 3778 }; 3779 }(); 3780}; 3781var fetchProductsDataAsync = function fetchProductsDataAsync(productIds) { 3782 return /*#__PURE__*/function () { 3783 var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) { 3784 var products; 3785 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 3786 while (1) switch (_context2.prev = _context2.next) { 3787 case 0: 3788 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductsDataStart)({ 3789 productIds: productIds 3790 })); 3791 _context2.prev = 1; 3792 _context2.next = 4; 3793 return _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__["default"].fetchProductsData(productIds); 3794 case 4: 3795 products = _context2.sent; 3796 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductsDataSuccess)({ 3797 productIds: productIds, 3798 data: products 3799 })); 3800 _context2.next = 11; 3801 break; 3802 case 8: 3803 _context2.prev = 8; 3804 _context2.t0 = _context2["catch"](1); 3805 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductsDataFailure)({ 3806 productIds: productIds, 3807 error: _context2.t0.message 3808 })); 3809 case 11: 3810 case "end": 3811 return _context2.stop(); 3812 } 3813 }, _callee2, null, [[1, 8]]); 3814 })); 3815 return function (_x2) { 3816 return _ref2.apply(this, arguments); 3817 }; 3818 }(); 3819}; 3820var addProductToWishlist = function addProductToWishlist(productId) { 3821 var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 3822 return /*#__PURE__*/function () { 3823 var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(dispatch) { 3824 var isCreatingWishlist, _yield$addToWishlistA, product_data, wishlist_data; 3825 return _regeneratorRuntime().wrap(function _callee3$(_context3) { 3826 while (1) switch (_context3.prev = _context3.next) { 3827 case 0: 3828 isCreatingWishlist = 'default' === (args === null || args === void 0 ? void 0 : args.wishlist_id); 3829 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataStart)({ 3830 productId: productId 3831 })); 3832 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsStart)()); 3833 _context3.prev = 3; 3834 _context3.next = 6; 3835 return _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__["default"].addToWishlist(_objectSpread({ 3836 product_id: productId 3837 }, args)); 3838 case 6: 3839 _yield$addToWishlistA = _context3.sent; 3840 product_data = _yield$addToWishlistA.product_data; 3841 wishlist_data = _yield$addToWishlistA.wishlist_data; 3842 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataSuccess)({ 3843 productId: productId, 3844 data: product_data 3845 })); 3846 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsSuccess)({ 3847 data: wishlist_data 3848 })); 3849 _context3.next = 17; 3850 break; 3851 case 13: 3852 _context3.prev = 13; 3853 _context3.t0 = _context3["catch"](3); 3854 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataFailure)({ 3855 productId: productId, 3856 error: _context3.t0.message 3857 })); 3858 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsFailure)()); 3859 case 17: 3860 case "end": 3861 return _context3.stop(); 3862 } 3863 }, _callee3, null, [[3, 13]]); 3864 })); 3865 return function (_x3) { 3866 return _ref3.apply(this, arguments); 3867 }; 3868 }(); 3869}; 3870var removeProductFromWishlist = function removeProductFromWishlist(productId, args) { 3871 return /*#__PURE__*/function () { 3872 var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(dispatch) { 3873 var _yield$addToWishlistA2, data; 3874 return _regeneratorRuntime().wrap(function _callee4$(_context4) { 3875 while (1) switch (_context4.prev = _context4.next) { 3876 case 0: 3877 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataStart)({ 3878 productId: productId 3879 })); 3880 _context4.prev = 1; 3881 _context4.next = 4; 3882 return _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__["default"].removeFromWishlist(_objectSpread({ 3883 product_id: productId 3884 }, args)); 3885 case 4: 3886 _yield$addToWishlistA2 = _context4.sent; 3887 data = _yield$addToWishlistA2.product_data; 3888 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataSuccess)({ 3889 productId: productId, 3890 data: data 3891 })); 3892 _context4.next = 12; 3893 break; 3894 case 9: 3895 _context4.prev = 9; 3896 _context4.t0 = _context4["catch"](1); 3897 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataFailure)({ 3898 productId: productId, 3899 error: _context4.t0.message 3900 })); 3901 case 12: 3902 case "end": 3903 return _context4.stop(); 3904 } 3905 }, _callee4, null, [[1, 9]]); 3906 })); 3907 return function (_x4) { 3908 return _ref4.apply(this, arguments); 3909 }; 3910 }(); 3911}; 3912var moveProductToAnotherWishlist = function moveProductToAnotherWishlist(productId, args) { 3913 return /*#__PURE__*/function () { 3914 var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(dispatch) { 3915 var isCreatingWishlist, _yield$addToWishlistA3, product_data, destination_wishlist; 3916 return _regeneratorRuntime().wrap(function _callee5$(_context5) { 3917 while (1) switch (_context5.prev = _context5.next) { 3918 case 0: 3919 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataStart)({ 3920 productId: productId 3921 })); 3922 isCreatingWishlist = 'new' === (args === null || args === void 0 ? void 0 : args.destination_wishlist); 3923 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsStart)()); 3924 _context5.prev = 3; 3925 _context5.next = 6; 3926 return _utils_add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_2__["default"].moveToAnotherWishlist(_objectSpread({ 3927 product_id: productId 3928 }, args)); 3929 case 6: 3930 _yield$addToWishlistA3 = _context5.sent; 3931 product_data = _yield$addToWishlistA3.product_data; 3932 destination_wishlist = _yield$addToWishlistA3.destination_wishlist; 3933 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataSuccess)({ 3934 productId: productId, 3935 data: product_data 3936 })); 3937 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsSuccess)({ 3938 data: destination_wishlist 3939 })); 3940 _context5.next = 17; 3941 break; 3942 case 13: 3943 _context5.prev = 13; 3944 _context5.t0 = _context5["catch"](3); 3945 dispatch((0,_products_data_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchProductDataFailure)({ 3946 productId: productId, 3947 error: _context5.t0.message 3948 })); 3949 isCreatingWishlist && dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsFailure)()); 3950 case 17: 3951 case "end": 3952 return _context5.stop(); 3953 } 3954 }, _callee5, null, [[3, 13]]); 3955 })); 3956 return function (_x5) { 3957 return _ref5.apply(this, arguments); 3958 }; 3959 }(); 3960}; 3961var createWishlistAndAddProduct = function createWishlistAndAddProduct(wishlistData, productId) { 3962 return /*#__PURE__*/function () { 3963 var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(dispatch) { 3964 var _yield$wishlistApi$cr, wishlist_data, wishlistId; 3965 return _regeneratorRuntime().wrap(function _callee6$(_context6) { 3966 while (1) switch (_context6.prev = _context6.next) { 3967 case 0: 3968 dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsStart)()); 3969 _context6.prev = 1; 3970 _context6.next = 4; 3971 return _utils_wishlist_api__WEBPACK_IMPORTED_MODULE_3__["default"].createWishlists(wishlistData); 3972 case 4: 3973 _yield$wishlistApi$cr = _context6.sent; 3974 wishlist_data = _yield$wishlistApi$cr.wishlist_data; 3975 wishlistId = _yield$wishlistApi$cr.wishlist_data.id; 3976 dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsSuccess)({ 3977 data: wishlist_data 3978 })); 3979 _context6.next = 10;
3980 return dispatch(addProductToWishlist(productId, { 3981 wishlist_id: wishlistId 3982 })); 3983 case 10: 3984 _context6.next = 15; 3985 break; 3986 case 12: 3987 _context6.prev = 12; 3988 _context6.t0 = _context6["catch"](1); 3989 dispatch((0,_wishlists_wishlists_reducer__WEBPACK_IMPORTED_MODULE_1__.createWishlistsFailure)({ 3990 error: _context6.t0.message 3991 })); 3992 case 15: 3993 case "end": 3994 return _context6.stop(); 3995 } 3996 }, _callee6, null, [[1, 12]]); 3997 })); 3998 return function (_x6) { 3999 return _ref6.apply(this, arguments); 4000 }; 4001 }(); 4002}; 4003 4004 4005/***/ }), 4006
4007/***/ "./assets/js/src/features/products-data/products-data-reducer.js": 4008/*!***********************************************************************!*\ 4009 !*** ./assets/js/src/features/products-data/products-data-reducer.js ***! 4010 \***********************************************************************/ 4011/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4012 4013"use strict"; 4014__webpack_require__.r(__webpack_exports__); 4015/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4016/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 4017/* harmony export */ fetchProductDataFailure: () => (/* binding */ fetchProductDataFailure), 4018/* harmony export */ fetchProductDataStart: () => (/* binding */ fetchProductDataStart), 4019/* harmony export */ fetchProductDataSuccess: () => (/* binding */ fetchProductDataSuccess), 4020/* harmony export */ fetchProductsDataFailure: () => (/* binding */ fetchProductsDataFailure), 4021/* harmony export */ fetchProductsDataStart: () => (/* binding */ fetchProductsDataStart), 4022/* harmony export */ fetchProductsDataSuccess: () => (/* binding */ fetchProductsDataSuccess) 4023/* harmony export */ }); 4024/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); 4025function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4026function 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; } 4027function _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) { _defineProperty(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; } 4028function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 4029function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 4030function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 4031 4032var initialState = { 4033 products: {} 4034}; 4035var productsDataSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({ 4036 name: 'productsData', 4037 initialState: initialState, 4038 reducers: { 4039 fetchProductDataStart: function fetchProductDataStart(state, action) { 4040 var productId = action.payload.productId; 4041 state.products[productId] = _objectSpread(_objectSpread({}, state.products[productId]), {}, { 4042 loading: true, 4043 error: null, 4044 added_to: false, 4045 removed_from: false,
4046 moved_to: false, 4047 moved_from: false 4048 }); 4049 }, 4050 fetchProductDataSuccess: function fetchProductDataSuccess(state, action) { 4051 var _action$payload = action.payload, 4052 productId = _action$payload.productId, 4053 data = _action$payload.data; 4054 state.products[productId] = _objectSpread(_objectSpread(_objectSpread({}, state.products[productId]), data), {}, { 4055 loading: false 4056 }); 4057 }, 4058 fetchProductDataFailure: function fetchProductDataFailure(state, action) { 4059 var _action$payload2 = action.payload, 4060 productId = _action$payload2.productId, 4061 error = _action$payload2.error; 4062 state.products[productId] = _objectSpread(_objectSpread({}, state.products[productId]), {}, { 4063 loading: false, 4064 added_to: false, 4065 removed_from: false, 4066 error: error, 4067 moved_to: false, 4068 moved_from: false 4069 }); 4070 }, 4071 fetchProductsDataStart: function fetchProductsDataStart(state, action) { 4072 var productIds = action.payload.productIds; 4073 productIds.forEach(function (productId) { 4074 state.products[productId] = _objectSpread(_objectSpread({}, state.products[productId]), {}, { 4075 loading: true, 4076 error: null, 4077 added_to: false, 4078 removed_from: false,
4079 moved_to: false, 4080 moved_from: false 4081 }); 4082 }); 4083 }, 4084 fetchProductsDataSuccess: function fetchProductsDataSuccess(state, action) { 4085 var _action$payload3 = action.payload, 4086 productIds = _action$payload3.productIds, 4087 data = _action$payload3.data; 4088 productIds.forEach(function (productId) { 4089 var productData = data[productId]; 4090 state.products[productId] = _objectSpread(_objectSpread(_objectSpread({}, state.products[productId]), productData), {}, { 4091 loading: false 4092 }); 4093 }); 4094 }, 4095 fetchProductsDataFailure: function fetchProductsDataFailure(state, action) { 4096 var _action$payload4 = action.payload, 4097 productIds = _action$payload4.productIds, 4098 error = _action$payload4.error; 4099 productIds.forEach(function (productId) { 4100 state.products[productId] = _objectSpread(_objectSpread({}, state.products[productId]), {}, { 4101 loading: false, 4102 added_to: false, 4103 removed_from: false, 4104 moved_to: fal
4104se, 4105 moved_from: false 4106 }); 4107 }); 4108 } 4109 } 4110}); 4111var actions = productsDataSlice.actions, 4112 reducer = productsDataSlice.reducer; 4113var fetchProductDataStart = actions.fetchProductDataStart, 4114 fetchProductDataSuccess = actions.fetchProductDataSuccess, 4115 fetchProductDataFailure = actions.fetchProductDataFailure, 4116 fetchProductsDataStart = actions.fetchProductsDataStart, 4117 fetchProductsDataSuccess = actions.fetchProductsDataSuccess, 4118 fetchProductsDataFailure = actions.fetchProductsDataFailure; 4119 4120/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer); 4121 4122/***/ }), 4123
4124/***/ "./assets/js/src/features/products-data/products-data-selectors.js": 4125/*!*************************************************************************!*\ 4126 !*** ./assets/js/src/features/products-data/products-data-selectors.js ***! 4127 \*************************************************************************/ 4128/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4129 4130"use strict"; 4131__webpack_require__.r(__webpack_exports__); 4132/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4133/* harmony export */ selectError: () => (/* binding */ selectError), 4134/* harmony export */ selectLoading: () => (/* binding */ selectLoading), 4135/* harmony export */ selectProductDataById: () => (/* binding */ selectProductDataById), 4136/* harmony export */ selectProductsData: () => (/* binding */ selectProductsData) 4137/* harmony export */ }); 4138var selectProductsData = function selectProductsData(state) { 4139 return state.productsData; 4140}; 4141var selectProductDataById = function selectProductDataById(state, productId) { 4142 return state.productsData.products[productId]; 4143}; 4144var selectError = function selectError(state, productId) { 4145 var _state$productsData$p; 4146 return (_state$productsData$p = state.productsData.products[productId]) === null || _state$productsData$p === void 0 ? void 0 : _state$productsData$p.error; 4147}; 4148var selectLoading = function selectLoading(state, productId) { 4149 var _state$productsData$p2; 4150 return (_state$productsData$p2 = state.productsData.products[productId]) === null || _state$productsData$p2 === void 0 ? void 0 : _state$productsData$p2.loading; 4151}; 4152 4153/***/ }), 4154
4155/***/ "./assets/js/src/features/wishlists/wishlists-actions.js": 4156/*!***************************************************************!*\ 4157 !*** ./assets/js/src/features/wishlists/wishlists-actions.js ***! 4158 \***************************************************************/ 4159/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4160 4161"use strict"; 4162__webpack_require__.r(__webpack_exports__); 4163/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4164/* harmony export */ createWishlist: () => (/* binding */ createWishlist), 4165/* harmony export */ fetchWishlists: () => (/* binding */ fetchWishlists) 4166/* harmony export */ }); 4167/* harmony import */ var _wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wishlists-reducer */ "./assets/js/src/features/wishlists/wishlists-reducer.js"); 4168/* harmony import */ var _utils_wishlist_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/wishlist-api */ "./assets/js/src/utils/wishlist-api.js");
vendor: 9,398 bytes, lines 4168-4171
4168 4169function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4170function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 4171function asyncGeneratorStep(
4171n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } 4172function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 4173 4174 4175var fetchWishlists = function fetchWishlists() { 4176 return /*#__PURE__*/function () { 4177 var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(dispatch) { 4178 var _yield$wishlistApi$fe, lists; 4179 return _regeneratorRuntime().wrap(function _callee$(_context) { 4180 while (1) switch (_context.prev = _context.next) { 4181 case 0: 4182 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchWishlistsStart)()); 4183 _context.prev = 1; 4184 _context.next = 4; 4185 return _utils_wishlist_api__WEBPACK_IMPORTED_MODULE_1__["default"].fetchWishlists(); 4186 case 4: 4187 _yield$wishlistApi$fe = _context.sent; 4188 lists = _yield$wishlistApi$fe.lists; 4189 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchWishlistsSuccess)({ 4190 lists: lists 4191 })); 4192 _context.next = 12; 4193 break; 4194 case 9: 4195 _context.prev = 9; 4196 _context.t0 = _context["catch"](1); 4197 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.fetchWishlistsFailure)({ 4198 error: _context.t0.message 4199 })); 4200 case 12: 4201 case "end": 4202 return _context.stop(); 4203 } 4204 }, _callee, null, [[1, 9]]); 4205 })); 4206 return function (_x) { 4207 return _ref.apply(this, arguments); 4208 }; 4209 }(); 4210}; 4211var createWishlist = function createWishlist(args) { 4212 return /*#__PURE__*/function () { 4213 var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(dispatch) { 4214 var _yield$wishlistApi$cr, data; 4215 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 4216 while (1) switch (_context2.prev = _context2.next) { 4217 case 0: 4218 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.createWishlistsStart)()); 4219 _context2.prev = 1; 4220 _context2.next = 4; 4221 return _utils_wishlist_api__WEBPACK_IMPORTED_MODULE_1__["default"].createWishlists(args); 4222 case 4: 4223 _yield$wishlistApi$cr = _context2.sent; 4224 data = _yield$wishlistApi$cr.wishlist_data; 4225 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.createWishlistsSuccess)({ 4226 data: data 4227 })); 4228 _context2.next = 12; 4229 break; 4230 case 9: 4231 _context2.prev = 9; 4232 _context2.t0 = _context2["catch"](1); 4233 dispatch((0,_wishlists_reducer__WEBPACK_IMPORTED_MODULE_0__.createWishlistsFailure)({ 4234 error: _context2.t0.message 4235 })); 4236 case 12: 4237 case "end": 4238 return _context2.stop(); 4239 } 4240 }, _callee2, null, [[1, 9]]); 4241 })); 4242 return function (_x2) { 4243 return _ref2.apply(this, arguments); 4244 }; 4245 }(); 4246}; 4247 4248/***/ }), 4249
4250/***/ "./assets/js/src/features/wishlists/wishlists-reducer.js": 4251/*!***************************************************************!*\ 4252 !*** ./assets/js/src/features/wishlists/wishlists-reducer.js ***! 4253 \***************************************************************/ 4254/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4255 4256"use strict"; 4257__webpack_require__.r(__webpack_exports__); 4258/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4259/* harmony export */ createWishlistsFailure: () => (/* binding */ createWishlistsFailure), 4260/* harmony export */ createWishlistsStart: () => (/* binding */ createWishlistsStart), 4261/* harmony export */ createWishlistsSuccess: () => (/* binding */ createWishlistsSuccess), 4262/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 4263/* harmony export */ fetchWishlistsFailure: () => (/* binding */ fetchWishlistsFailure), 4264/* harmony export */ fetchWishlistsStart: () => (/* binding */ fetchWishlistsStart), 4265/* harmony export */ fetchWishlistsSuccess: () => (/* binding */ fetchWishlistsSuccess) 4266/* harmony export */ }); 4267/* harmony import */ var _reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @reduxjs/toolkit */ "./node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js"); 4268function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4269function 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; } 4270function _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) { _defineProperty(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; } 4271function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 4272function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 4273function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 4274 4275var initialState = { 4276 wishlists: {}, 4277 loading: false, 4278 error: null, 4279 creation: { 4280 loading: false, 4281 error: null 4282 } 4283}; 4284var wishlistsSlice = (0,_reduxjs_toolkit__WEBPACK_IMPORTED_MODULE_0__.createSlice)({ 4285 name: 'wishlists', 4286 initialState: initialState, 4287 reducers: { 4288 fetchWishlistsStart: function fetchWishlistsStart(state, action) { 4289 state.loading = true; 4290 state.error = null; 4291 }, 4292 fetchWishlistsSuccess: function fetchWishlistsSuccess(state, action) { 4293 var lists = action.payload.lists; 4294 state.wishlists = _objectSpread(_objectSpread({}, state.wishlists), lists); 4295 state.loading = false; 4296 }, 4297 fetchWishlistsFailure: function fetchWishlistsFailure(state, action) { 4298 var error = action.payload.error; 4299 state.loading = false; 4300 state.error = error; 4301 }, 4302 createWishlistsStart: function createWishlistsStart(state, action) { 4303 state.creation.loading = true; 4304 state.creation.error = null; 4305 }, 4306 createWishlistsSuccess: function createWishlistsSuccess(state, action) { 4307 var _action$payload = action.payload, 4308 data = _action$payload.data, 4309 id = _action$payload.data.id; 4310 state.wishlists = _objectSpread(_objectSpread({}, state.wishlists), {}, _defineProperty({}, id, _objectSpread({}, data))); 4311 state.creation.loading = false;
4312 state.creation.lastCreatedId = id; 4313 }, 4314 createWishlistsFailure: function createWishlistsFailure(state, action) { 4315 var error = action.payload.error; 4316 state.creation.loading = false; 4317 state.creation.error = error; 4318 } 4319 } 4320}); 4321var actions = wishlistsSlice.actions, 4322 reducer = wishlistsSlice.reducer; 4323var fetchWishlistsStart = actions.fetchWishlistsStart, 4324 fetchWishlistsSuccess = actions.fetchWishlistsSuccess, 4325 fetchWishlistsFailure = actions.fetchWishlistsFailure, 4326 createWishlistsStart = actions.createWishlistsStart, 4327 createWishlistsSuccess = actions.createWishlistsSuccess, 4328 createWishlistsFailure = actions.createWishlistsFailure; 4329 4330/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (reducer); 4331 4332/***/ }), 4333
4334/***/ "./assets/js/src/features/wishlists/wishlists-selectors.js": 4335/*!*****************************************************************!*\ 4336 !*** ./assets/js/src/features/wishlists/wishlists-selectors.js ***! 4337 \*****************************************************************/ 4338/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4339 4340"use strict"; 4341__webpack_require__.r(__webpack_exports__); 4342/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4343/* harmony export */ selectWishlistById: () => (/* binding */ selectWishlistById), 4344/* harmony export */ selectWishlists: () => (/* binding */ selectWishlists), 4345/* harmony export */ selectWishlistsCreation: () => (/* binding */ selectWishlistsCreation), 4346/* harmony export */ selectWishlistsCreationError: () => (/* binding */ selectWishlistsCreationError), 4347/* harmony export */ selectWishlistsCreationLoading: () => (/* binding */ selectWishlistsCreationLoading), 4348/* harmony export */ selectWishlistsError: () => (/* binding */ selectWishlistsError), 4349/* harmony export */ selectWishlistsLoading: () => (/* binding */ selectWishlistsLoading) 4350/* harmony export */ }); 4351var selectWishlists = function selectWishlists(state) { 4352 return state.wishlists.wishlists; 4353}; 4354var selectWishlistById = function selectWishlistById(state, id) { 4355 return state.wishlists.wishlists[id]; 4356}; 4357var selectWishlistsLoading = function selectWishlistsLoading(state) { 4358 return state.wishlists.loading; 4359}; 4360var selectWishlistsError = function selectWishlistsError(state) { 4361 return state.wishlists.error; 4362}; 4363var selectWishlistsCreation = function selectWishlistsCreation(state) { 4364 return state.wishlists.creation; 4365}; 4366var selectWishlistsCreationLoading = function selectWishlistsCreationLoading(state) { 4367 return state.wishlists.creation.loading; 4368}; 4369var selectWishlistsCreationError = function selectWishlistsCreationError(state) { 4370 return state.wishlists.creation.error; 4371}; 4372 4373 4374/***/ }), 4375
4376/***/ "./assets/js/src/hooks/use-wishlist-data.js": 4377/*!**************************************************!*\ 4378 !*** ./assets/js/src/hooks/use-wishlist-data.js ***! 4379 \**************************************************/ 4380/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4381 4382"use strict"; 4383__webpack_require__.r(__webpack_exports__); 4384/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4385/* harmony export */ useWishlistData: () => (/* binding */ useWishlistData) 4386/* harmony export */ }); 4387/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); 4388/* harmony import */ var _features_wishlists_wishlists_selectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../features/wishlists/wishlists-selectors */ "./assets/js/src/features/wishlists/wishlists-selectors.js"); 4389 4390 4391var useWishlistData = function useWishlistData(wishlistId) { 4392 var wishlistData = (0,react_redux__WEBPACK_IMPORTED_MODULE_0__.useSelector)(function (state) { 4393 return (0,_features_wishlists_wishlists_selectors__WEBPACK_IMPORTED_MODULE_1__.selectWishlistById)(state, wishlistId); 4394 }); 4395 var _ref = wishlistData ? wishlistData : {}, 4396 name = _ref.name, 4397 slug = _ref.slug, 4398 privacy = _ref.privacy, 4399 token = _ref.token, 4400 isDefault = _ref.is_default; 4401 return { 4402 wishlistData: wishlistData, 4403 name: name, 4404 slug: slug, 4405 token: token, 4406 privacy: privacy, 4407 isDefault: isDefault 4408 }; 4409}; 4410 4411/***/ }), 4412
4413/***/ "./assets/js/src/utils/add-to-wishlist-api.js": 4414/*!****************************************************!*\ 4415 !*** ./assets/js/src/utils/add-to-wishlist-api.js ***! 4416 \****************************************************/ 4417/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4418 4419"use strict"; 4420__webpack_require__.r(__webpack_exports__); 4421/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4422/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 4423/* harmony export */ }); 4424/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash */ "lodash"); 4425/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__); 4426/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/url */ "@wordpress/url"); 4427/* harmony import */ var _wordpress_url__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_url__WEBPACK_IMPORTED_MODULE_1__); 4428/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); 4429/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__);
vendor: 9,398 bytes, lines 4429-4432
4429 4430function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4431function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 4432function asyncGeneratorStep(
4432n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } 4433function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 4434function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 4435function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 4436function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 4437function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 4438function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 4439 4440 4441 4442var AddToWishlistApiHandler = /*#__PURE__*/function () { 4443 function AddToWishlistApiHandler() { 4444 _classCallCheck(this, AddToWishlistApiHandler); 4445 this.pendingRequests = new Map(); 4446 this.handleDebouncedRequests = this.handleDebouncedRequests.bind(this); 4447 this.handleDebouncedRequestsDebounced = (0,lodash__WEBPACK_IMPORTED_MODULE_0__.debounce)(this.handleDebouncedRequests, 200); 4448 } 4449 return _createClass(AddToWishlistApiHandler, [{ 4450 key: "handleDebouncedRequests", 4451 value: function () { 4452 var _handleDebouncedRequests = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { 4453 var productIds, productsData, _i, _productIds, productId, resolve; 4454 return _regeneratorRuntime().wrap(function _callee$(_context) { 4455 while (1) switch (_context.prev = _context.next) { 4456 case 0: 4457 productIds = Array.from(this.pendingRequests.keys()); 4458 _context.next = 3; 4459 return this.fetchProductsData(productIds); 4460 case 3: 4461 productsData = _context.sent; 4462 for (_i = 0, _productIds = productIds; _i < _productIds.length; _i++) { 4463 productId = _productIds[_i]; 4464 resolve = this.pendingRequests.get(productId); 4465 resolve && resolve(productsData[productId]); 4466 this.pendingRequests["delete"](productId); 4467 } 4468 case 5: 4469 case "end": 4470 return _context.stop(); 4471 } 4472 }, _callee, this); 4473 })); 4474 function handleDebouncedRequests() { 4475 return _handleDebouncedRequests.apply(this, arguments); 4476 } 4477 return handleDebouncedRequests; 4478 }() 4479 }, { 4480 key: "fetchProductDataDebounced", 4481 value: function () { 4482 var _fetchProductDataDebounced = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(productId) { 4483 var _this = this; 4484 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 4485 while (1) switch (_context2.prev = _context2.next) { 4486 case 0: 4487 return _context2.abrupt("return", new Promise(function (resolve) { 4488 _this.pendingRequests.set(productId, resolve); 4489 _this.handleDebouncedRequestsDebounced(); 4490 })); 4491 case 1: 4492 case "end": 4493 return _context2.stop(); 4494 } 4495 }, _callee2); 4496 })); 4497 function fetchProductDataDebounced(_x) { 4498 return _fetchProductDataDebounced.apply(this, arguments); 4499 } 4500 return fetchProductDataDebounced; 4501 }() 4502 }, { 4503 key: "fetchProductsData", 4504 value: function () { 4505 var _fetchProductsData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(productIds) { 4506 return _regeneratorRuntime().wrap(function _callee3$(_context3) { 4507 while (1) switch (_context3.prev = _context3.next) { 4508 case 0: 4509 _context3.next = 2; 4510 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ 4511 path: (0,_wordpress_url__WEBPACK_IMPORTED_MODULE_1__.addQueryArgs)('/yith/wishlist/v1/products/', { 4512 product_ids: productIds 4513 }) 4514 }); 4515 case 2: 4516 return _context3.abrupt("return", _context3.sent); 4517 case 3: 4518 case "end": 4519 return _context3.stop(); 4520 } 4521 }, _callee3); 4522 })); 4523 function fetchProductsData(_x2) { 4524 return _fetchProductsData.apply(this, arguments); 4525 } 4526 return fetchProductsData; 4527 }() 4528 }, { 4529 key: "fetchProductData", 4530 value: function () { 4531 var _fetchProductData = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(productId) { 4532 return _regeneratorRuntime().wrap(function _callee4$(_context4) { 4533 while (1) switch (_context4.prev = _context4.next) { 4534 case 0: 4535 _context4.next = 2; 4536 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ 4537 path: '/yith/wishlist/v1/products/' + productId 4538 }); 4539 case 2: 4540 return _context4.abrupt("return", _context4.sent); 4541 case 3: 4542 case "end": 4543 return _context4.stop(); 4544 } 4545 }, _callee4); 4546 })); 4547 function fetchProductData(_x3) { 4548 return _fetchProductData.apply(this, arguments); 4549 } 4550 return fetchProductData; 4551 }() 4552 /** 4553 * Add products to wishlist 4554 * 4555 * 4556 * @param data 4557 * @return {Promise<*>} 4558 */ 4559 }, { 4560 key: "addToWishlist", 4561 value: (function () { 4562 var _addToWishlist = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(data) { 4563 var response; 4564 return _regeneratorRuntime().wrap(function _callee5$(_context5) { 4565 while (1) switch (_context5.prev = _context5.next) { 4566 case 0: 4567 _context5.next = 2; 4568 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ 4569 path: 'yith/wishlist/v1/items', 4570 method: 'POST', 4571 data: data 4572 }); 4573 case 2: 4574 response = _context5.sent; 4575 if (!(false === (response === null || response === void 0 ? void 0 : response.success))) { 4576 _context5.next = 5; 4577 break; 4578 } 4579 throw new Error(response === null || response === void 0 ? void 0 : response.message); 4580 case 5: 4581 return _context5.abrupt("return", response); 4582 case 6: 4583 case "end": 4584 return _context5.stop(); 4585 } 4586 }, _callee5); 4587 })); 4588 function addToWishlist(_x4) { 4589 return _addToWishlist.apply(this, arguments); 4590 } 4591 return addToWishlist; 4592 }() 4593 /** 4594 * Remove product from wishlist 4595 * 4596 * @param data 4597 * @return {Promise<*>} 4598 */ 4599 ) 4600 }, { 4601 key: "removeFromWishlist", 4602 value: (function () { 4603 var _removeFromWishlist = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(data) { 4604 var response; 4605 return _regeneratorRuntime().wrap(function _callee6$(_context6) { 4606 while (1) switch (_context6.prev = _context6.next) { 4607 case 0: 4608 _context6.next = 2; 4609 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ 4610 path: 'yith/wishlist/v1/items', 4611 method: 'DELETE', 4612 data: data 4613 }); 4614 case 2: 4615 response = _context6.sent; 4616 if (!(false === (response === null || response === void 0 ? void 0 : response.success))) { 4617 _context6.next = 5; 4618 break; 4619 } 4620 throw new Error(response === null || response === void 0 ? void 0 : response.message); 4621 case 5: 4622 return _context6.abrupt("return", response); 4623 case 6: 4624 case "end": 4625 return _context6.stop(); 4626 } 4627 }, _callee6); 4628 }));
4629 function removeFromWishlist(_x5) { 4630 return _removeFromWishlist.apply(this, arguments); 4631 } 4632 return removeFromWishlist; 4633 }() 4634 /** 4635 * Move a product from a wishlist to another 4636 * 4637 * @param data 4638 * @return {Promise<*>} 4639 */ 4640 ) 4641 }, { 4642 key: "moveToAnotherWishlist", 4643 value: (function () { 4644 var _moveToAnotherWishlist = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(data) { 4645 var response; 4646 return _regeneratorRuntime().wrap(function _callee7$(_context7) { 4647 while (1) switch (_context7.prev = _context7.next) { 4648 case 0: 4649 _context7.next = 2; 4650 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ 4651 path: 'yith/wishlist/v1/items/move', 4652 method: 'POST', 4653 data: data 4654 }); 4655 case 2: 4656 response = _context7.sent; 4657 if (!(false === (response === null || response === void 0 ? void 0 : response.success))) { 4658 _context7.next = 5; 4659 break; 4660 } 4661 throw new Error(response === null || response === void 0 ? void 0 : response.message); 4662 case 5: 4663 return _context7.abrupt("return", response); 4664 case 6: 4665 case "end": 4666 return _context7.stop(); 4667 } 4668 }, _callee7); 4669 })); 4670 function moveToAnotherWishlist(_x6) { 4671 return _moveToAnotherWishlist.apply(this, arguments); 4672 } 4673 return moveToAnotherWishlist; 4674 }()) 4675 }]); 4676}(); 4677/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new AddToWishlistApiHandler()); 4678 4679/***/ }), 4680
4681/***/ "./assets/js/src/utils/button-data-context.js": 4682/*!****************************************************!*\ 4683 !*** ./assets/js/src/utils/button-data-context.js ***! 4684 \****************************************************/ 4685/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 4686 4687"use strict"; 4688__webpack_require__.r(__webpack_exports__); 4689/* harmony export */ __webpack_require__.d(__webpack_exports__, { 4690/* harmony export */ ButtonDataProvider: () => (/* binding */ ButtonDataProvider), 4691/* harmony export */ useAddToWishlistButtonData: () => (/* binding */ useAddToWishlistButtonData), 4692/* harmony export */ useButtonAttributes: () => (/* binding */ useButtonAttributes), 4693/* harmony export */ useButtonData: () => (/* binding */ useButtonData), 4694/* harmony export */ useButtonDropdownData: () => (/* binding */ useButtonDropdownData), 4695/* harmony export */ useButtonStyle: () => (/* binding */ useButtonStyle), 4696/* harmony export */ useButtonTooltipData: () => (/* binding */ useButtonTooltipData) 4697/* harmony export */ }); 4698/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 4699/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 4700/* harmony import */ var _lapilli_ui_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @lapilli-ui/styles */ "@lapilli-ui/styles"); 4701/* harmony import */ var _lapilli_ui_styles__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_lapilli_ui_styles__WEBPACK_IMPORTED_MODULE_1__); 4702/* harmony import */ var use_context_selector__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! use-context-selector */ "./node_modules/use-context-selector/dist/index.js"); 4703/* harmony import */ var _components_add_to_wishlist_hooks_use_product_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/add-to-wishlist/hooks/use-product-data */ "./assets/js/src/components/add-to-wishlist/hooks/use-product-data.js"); 4704/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); 4705/* harmony import */ var _features_products_data_products_data_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../features/products-data/products-data-actions */ "./assets/js/src/features/products-data/products-data-actions.js"); 4706/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js"); 4707/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__); 4708/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index */ "./assets/js/src/utils/index.js"); 4709/* harmony import */ var _components_add_to_wishlist_hooks_use_feedback__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../components/add-to-wishlist/hooks/use-feedback */ "./assets/js/src/components/add-to-wishlist/hooks/use-feedback.js");
vendor: 9,398 bytes, lines 4709-4712
4709 4710function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 4711function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 4712function asyncGeneratorStep(
vendor: 2,318 bytes, lines 4712-4721
4712n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } 4713function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 4714function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); } 4715function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } 4716function _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; } } 4717function _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; } 4718function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } } 4719function _arrayWithHoles(r) { if (Array.isArray(r)) return r; } 4720function 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; } 4721function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {};
4721 r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(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; } 4722function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 4723function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 4724function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 4725/* globals yithWcwlAddToWishlist */ 4726 4727 4728 4729 4730 4731 4732 4733 4734 4735 4736var ButtonDataContext = (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.createContext)({}); 4737var useButtonAttributes = function useButtonAttributes() { 4738 var mergeWithGlobalOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; 4739 return mergeWithGlobalOptions ? _objectSpread(_objectSpread({}, yithWcwlAddToWishlist.globalOptions), (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ButtonDataContext).attributes) : (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(ButtonDataContext).attributes; 4740}; 4741var useButtonData = function useButtonData() { 4742 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.useContextSelector)(ButtonDataContext, function (v) { 4743 return v; 4744 }); 4745}; 4746var useButtonStyle = function useButtonStyle() { 4747 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.useContextSelector)(ButtonDataContext, function (v) { 4748 return v === null || v === void 0 ? void 0 : v.style; 4749 }); 4750}; 4751var useAddToWishlistButtonData = function useAddToWishlistButtonData() { 4752 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.useContextSelector)(ButtonDataContext, function (_ref) { 4753 var href = _ref.href, 4754 icon = _ref.icon, 4755 ref = _ref.buttonRef, 4756 className = _ref.className, 4757 onClick = _ref.onButtonClick, 4758 label = _ref.label; 4759 return { 4760 label: label, 4761 href: href, 4762 icon: icon, 4763 ref: ref, 4764 className: className, 4765 onClick: onClick 4766 }; 4767 }); 4768}; 4769var useButtonTooltipData = function useButtonTooltipData() { 4770 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.useContextSelector)(ButtonDataContext, function (state) { 4771 return { 4772 hasDataLoaded: state === null || state === void 0 ? void 0 : state.hasDataLoaded, 4773 add_label: state === null || state === void 0 ? void 0 : state.add_label, 4774 remove_label: state === null || state === void 0 ? void 0 : state.remove_label, 4775 browse_label: state === null || state === void 0 ? void 0 : state.browse_label, 4776 move_label: state === null || state === void 0 ? void 0 : state.move_label, 4777 isAdded: state === null || state === void 0 ? void 0 : state.isAdded, 4778 behaviour: state === null || state === void 0 ? void 0 : state.behaviour, 4779 buttonRef: state === null || state === void 0 ? void 0 : state.buttonRef, 4780 isDropdownOpen: state === null || state === void 0 ? void 0 : state.isDropdownOpen, 4781 tooltipEnabled: state === null || state === void 0 ? void 0 : state.tooltipEnabled 4782 }; 4783 }); 4784}; 4785var useButtonDropdownData = function useButtonDropdownData() { 4786 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_8__.useContextSelector)(ButtonDataContext, function (state) { 4787 return { 4788 buttonRef: state === null || state === void 0 ? void 0 : state.buttonRef, 4789 availableLists: state === null || state === void 0 ? void 0 : state.availableLists, 4790 isDropdownOpen: state === null || state === void 0 ? void 0 : state.isDropdownOpen, 4791 handleCloseDropdown: state === null || state === void 0 ? void 0 : state.handleCloseDropdown, 4792 wishlists: state === null || state === void 0 ? void 0 : state.wishlists 4793 }; 4794 }); 4795}; 4796var ButtonDataProvider = function ButtonDataProvider(_ref2) { 4797 var children = _ref2.children, 4798 attributes = _ref2.attributes, 4799 dataExtensions = _ref2.dataExtensions, 4800 componentsExtensions = _ref2.componentsExtensions; 4801 var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), 4802 _useState2 = _slicedToArray(_useState, 2), 4803 isPerformingAction = _useState2[0], 4804 setIsPerformingAction = _useState2[1]; 4805 var richAttributes = _objectSpread(_objectSpread({}, yithWcwlAddToWishlist.globalOptions), attributes); 4806 var buttonId = richAttributes.buttonId, 4807 productIdAttribute = richAttributes.productId, 4808 style = richAttributes.style, 4809 isOverProductImage = richAttributes.isOverProductImage, 4810 add_label = richAttributes.add_label, 4811 added_label = richAttributes.added_label, 4812 remove_label = richAttributes.remove_label, 4813 browse_label = richAttributes.browse_label, 4814 icon = richAttributes.icon, 4815 icon_type = richAttributes.icon_type, 4816 custom_icon = richAttributes.custom_icon, 4817 added_icon_attribute = richAttributes.added_icon, 4818 added_icon_type = richAttributes.added_icon_type, 4819 custom_added_icon = richAttributes.custom_added_icon, 4820 is_single = richAttributes.is_single, 4821 loop_position = richAttributes.loop_position, 4822 button_over_image_style = richAttributes.button_over_image_style, 4823 position_over_image_in_loop = richAttributes.position_over_image_in_loop, 4824 attribute_behaviour = richAttributes.behaviour; 4825 var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(productIdAttribute), 4826 _useState4 = _slicedToArray(_useState3, 2), 4827 productId = _useState4[0], 4828 setProductId = _useState4[1]; 4829 var _useProductData = (0,_components_add_to_wishlist_hooks_use_product_data__WEBPACK_IMPORTED_MODULE_2__["default"])(productId, attributes), 4830 isAdded = _useProductData.isAdded, 4831 isLoading = _useProductData.isLoading, 4832 alreadyIn = _useProductData.alreadyIn,
4833 productData = _useProductData.productData, 4834 hasDataLoaded = _useProductData.hasDataLoaded; 4835 var _useFeedback = (0,_components_add_to_wishlist_hooks_use_feedback__WEBPACK_IMPORTED_MODULE_7__["default"])(productId, richAttributes, isPerformingAction), 4836 feedbackType = _useFeedback.feedbackType, 4837 showFeedback = _useFeedback.showFeedback, 4838 feedbackMessage = _useFeedback.feedbackMessage, 4839 feedbackDuration = _useFeedback.feedbackDuration, 4840 setFeedbackType = _useFeedback.setFeedbackType, 4841 setShowFeedback = _useFeedback.setShowFeedback, 4842 setFeedbackMessage = _useFeedback.setFeedbackMessage, 4843 setFeedbackDuration = _useFeedback.setFeedbackDuration, 4844 addFeedback = _useFeedback.addFeedback, 4845 clearFeedback = _useFeedback.clearFeedback, 4846 feedbackAnimation = _useFeedback.feedbackAnimation, 4847 setFeedbackAnimation = _useFeedback.setFeedbackAnimation; 4848 var buttonRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); 4849 var dispatch = (0,react_redux__WEBPACK_IMPORTED_MODULE_3__.useDispatch)(); 4850 var add_icon = function () {
4851 if ('custom' === icon_type) { 4852 return custom_icon; 4853 } 4854 return icon; 4855 }(); 4856 var added_icon = function () { 4857 if (added_icon_type === 'same') { 4858 return add_icon; 4859 } 4860 if ('custom' === added_icon_type) { 4861 return custom_added_icon; 4862 } 4863 return added_icon_attribute; 4864 }(); 4865 var iconToDisplay = isAdded ? added_icon : add_icon; 4866 var behaviour = function () { 4867 if (!yithWcwlAddToWishlist.isUserLoggedIn && 'yes' === yithWcwlAddToWishlist.globalOptions.wishlist_disabled_for_unauthenticated_users) { 4868 return 'view'; 4869 } 4870 return ['add', 'remove'].includes(attribute_behaviour) ? attribute_behaviour : 'view'; 4871 }(); 4872 var href = function () { 4873 if (!yithWcwlAddToWishlist.isUserLoggedIn && 'yes' === yithWcwlAddToWishlist.globalOptions.wishlist_disabled_for_unauthenticated_users) { 4874 return yithWcwlAddToWishlist.login_wishlist_url.replace('%product_id%', productId); 4875 } 4876 return 'view' === behaviour && isAdded ? yithWcwlAddToWishlist.wishlist_url : null; 4877 }(); 4878 var handleActionCallback = function handleActionCallback(callback) { 4879 return function () { 4880 setIsPerformingAction(false); 4881 jQuery(document).trigger('yith_wcwl_reload_fragments', { 4882 firstLoad: false, 4883 avoidDataInvalidation: true 4884 }); 4885 'function' === typeof callback && callback(); 4886 }; 4887 }; 4888 var handleButtonAction = function handleButtonAction(action, callback) { 4889 if ('function' === typeof action) { 4890 setIsPerformingAction(true); 4891 action().then(handleActionCallback(callback)); 4892 } 4893 }; 4894 var handleAddToWishlist = function handleAddToWishlist(callback) { 4895 return handleButtonAction(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { 4896 return _regeneratorRuntime().wrap(function _callee$(_context) { 4897 while (1) switch (_context.prev = _context.next) { 4898 case 0: 4899 _context.next = 2; 4900 return dispatch((0,_features_products_data_products_data_actions__WEBPACK_IMPORTED_MODULE_4__.addProductToWishlist)(productId)); 4901 case 2: 4902 case "end": 4903 return _context.stop(); 4904 } 4905 }, _callee); 4906 })), callback); 4907 }; 4908 var handleRemoveFromWishlist = function handleRemoveFromWishlist(callback) { 4909 return handleButtonAction(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { 4910 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 4911 while (1) switch (_context2.prev = _context2.next) { 4912 case 0: 4913 _context2.next = 2; 4914 return dispatch((0,_features_products_data_products_data_actions__WEBPACK_IMPORTED_MODULE_4__.removeProductFromWishlist)(productId)); 4915 case 2: 4916 case "end": 4917 return _context2.stop(); 4918 } 4919 }, _callee2); 4920 })), callback); 4921 }; 4922 var onButtonClick = function onButtonClick(event) { 4923 if (href) return false; 4924 event === null || event === void 0 || event.preventDefault(); 4925 event === null || event === void 0 || event.stopPropagation(); 4926 if (!hasDataLoaded || isLoading) return false; 4927 if (isAdded && behaviour !== 'add') { 4928 if (behaviour === 'remove') { 4929 handleRemoveFromWishlist(); 4930 } else { 4931 window.location = yithWcwlAddToWishlist.wishlist_url; 4932 } 4933 } else { 4934 handleAddToWishlist(); 4935 } 4936 }; 4937 var getStyle = function getStyle() { 4938 if (!is_single && loop_position === 'before_image' && isOverProductImage) return 'icon-button'; 4939 if (style === 'link') return 'anchor'; 4940 return style === 'button_default' ? 'themed-button' : 'custom-button'; 4941 }; 4942 var getLabel = function getLabel() { 4943 if (isAdded) { 4944 if (behaviour === 'add' && !alreadyIn) return added_label; 4945 if (behaviour === 'remove') return remove_label; 4946 if (behaviour === 'view') return browse_label; 4947 } 4948 return add_label; 4949 }; 4950 var getClasses = function getClasses() { 4951 var _yithWcwlAddToWishlis; 4952 return classnames__WEBPACK_IMPORTED_MODULE_5___default()(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
4953 'yith-wcwl-add-to-wishlist-button': true 4954 }, "yith-wcwl-add-to-wishlist-button--".concat(getStyle()), true), 'yith-wcwl-add-to-wishlist-button--loading', isLoading), 'yith-wcwl-add-to-wishlist-button--first-loading', isLoading && (productData === null || productData === void 0 ? void 0 : productData.isAdded) === undefined), 'yith-wcwl-add-to-wishlist-button--added', isAdded), 'yith-wcwl-add-to-wishlist-button--single', is_single), 'yith-wcwl-add-to-wishlist-button-over-image', isOverProductImage), "yith-wcwl-add-to-wishlist-button-over-image--".concat(position_over_image_in_loop || 'top-left'), isOverProductImage && loop_position === 'before_image'), 'yith-wcwl-add-to-wishlist-button-over-image--hover', isOverProductImage && loop_position === 'before_image' && button_over_image_style === 'hover' && !isAdded), ((_yithWcwlAddToWishlis = yithWcwlAddToWishlist) === null || _yithWcwlAddToWishlis === void 0 ? void 0 : _yithWcwlAddToWishlis.buttonClasses) + ' yith-wcwl-theme-button-style', getStyle() === 'themed-button')); 4955 }; 4956 (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { 4957 if (is_single) { 4958 var handleFoundVariation = function handleFoundVariation(e, variation) { 4959 var form = e.target; 4960 var parentId = form === null || form === void 0 ? void 0 : form.getAttribute('data-product_id'); 4961 if (parentId === (attributes === null || attributes === void 0 ? void 0 : attributes.productId)) { 4962 setProductId(variation.variation_id); 4963 } 4964 }; 4965 var handleResetVariation = function handleResetVariation() { 4966 return setProductId(productIdAttribute); 4967 }; 4968 jQuery(document).on('found_variation', handleFoundVariation); 4969 jQuery(document).on('reset_data', handleResetVariation); 4970 return function () { 4971 jQuery(document).off('found_variation', handleFoundVariation); 4972 jQuery(document).off('reset_data', handleResetVariation); 4973 }; 4974 } 4975 }, []); 4976 var value = { 4977 buttonId: buttonId, 4978 productId: productId, 4979 attributes: attributes, 4980 productData: productData, 4981 hasDataLoaded: hasDataLoaded, 4982 richAttributes: richAttributes, 4983 isOverProductImage: isOverProductImage, 4984 isPerformingAction: isPerformingAction, 4985 setIsPerformingAction: setIsPerformingAction, 4986 icon: iconToDisplay, 4987 added_icon: added_icon, 4988 add_icon: add_icon, 4989 add_label: add_label, 4990 added_label: added_label, 4991 remove_label: remove_label, 4992 browse_label: browse_label, 4993 href: href, 4994 isAdded: isAdded, 4995 is_single: is_single, 4996 isLoading: isLoading, 4997 buttonRef: buttonRef, 4998 behaviour: behaviour, 4999 style: getStyle(), 5000 label: getLabel(), 5001 className: getClasses(), 5002 feedbackType: feedbackType, 5003 showFeedback: showFeedback, 5004 feedbackMessage: feedbackMessage, 5005 feedbackDuration: feedbackDuration, 5006 feedbackAnimation: feedbackAnimation, 5007 setFeedbackType: setFeedbackType, 5008 setShowFeedback: setShowFeedback, 5009 setFeedbackMessage: setFeedbackMessage, 5010 setFeedbackDuration: setFeedbackDuration, 5011 setFeedbackAnimation: setFeedbackAnimation, 5012 addFeedback: addFeedback, 5013 clearFeedback: clearFeedback, 5014 onButtonClick: onButtonClick, 5015 handleButtonAction: handleButtonAction, 5016 handleAddToWishlist: handleAddToWishlist, 5017 handleRemoveFromWishlist: handleRemoveFromWishlist 5018 }; 5019 if ('function' === typeof dataExtensions) { 5020 value = _objectSpread(_objectSpread({}, value), dataExtensions(value)); 5021 } 5022 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(ButtonDataContext.Provider, { 5023 value: value 5024 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_index__WEBPACK_IMPORTED_MODULE_6__.ComponentsExtensionProvider, { 5025 extensions: componentsExtensions 5026 }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_lapilli_ui_styles__WEBPACK_IMPORTED_MODULE_1__.ThemeProvider, null, children))); 5027}; 5028 5029/***/ }), 5030
5031/***/ "./assets/js/src/utils/components-extension-context.js": 5032/*!*************************************************************!*\ 5033 !*** ./assets/js/src/utils/components-extension-context.js ***! 5034 \*************************************************************/ 5035/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5036 5037"use strict"; 5038__webpack_require__.r(__webpack_exports__); 5039/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5040/* harmony export */ ComponentsExtensionProvider: () => (/* binding */ ComponentsExtensionProvider), 5041/* harmony export */ useComponentExtensionsContext: () => (/* binding */ useComponentExtensionsContext), 5042/* harmony export */ useComponentsExtension: () => (/* binding */ useComponentsExtension) 5043/* harmony export */ }); 5044/* harmony import */ var use_context_selector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-context-selector */ "./node_modules/use-context-selector/dist/index.js"); 5045 5046var ComponentsExtensionContext = (0,use_context_selector__WEBPACK_IMPORTED_MODULE_0__.createContext)({}); 5047var useComponentExtensionsContext = function useComponentExtensionsContext() { 5048 return (0,use_context_selector__WEBPACK_IMPORTED_MODULE_0__.useContextSelector)(ComponentsExtensionContext, function (state) { 5049 return state; 5050 }); 5051}; 5052var useComponentsExtension = function useComponentsExtension(hookName) { 5053 var extensions = useComponentExtensionsContext(); 5054 if (!extensions || !(extensions[hookName] || null)) { 5055 var EmptyFragment = function EmptyFragment() { 5056 return /*#__PURE__*/React.createElement(React.Fragment, null); 5057 }; 5058 EmptyFragment.isEmpty = true; 5059 return EmptyFragment; 5060 } 5061 return extensions[hookName]; 5062}; 5063var ComponentsExtensionProvider = function ComponentsExtensionProvider(_ref) { 5064 var children = _ref.children, 5065 extensions = _ref.extensions; 5066 return /*#__PURE__*/React.createElement(ComponentsExtensionContext.Provider, { 5067 value: extensions 5068 }, children); 5069}; 5070 5071/***/ }), 5072
5073/***/ "./assets/js/src/utils/index.js": 5074/*!**************************************!*\ 5075 !*** ./assets/js/src/utils/index.js ***! 5076 \**************************************/ 5077/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5078 5079"use strict"; 5080__webpack_require__.r(__webpack_exports__); 5081/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5082/* harmony export */ ButtonDataProvider: () => (/* reexport safe */ _button_data_context__WEBPACK_IMPORTED_MODULE_2__.ButtonDataProvider), 5083/* harmony export */ ComponentsExtensionProvider: () => (/* reexport safe */ _components_extension_context__WEBPACK_IMPORTED_MODULE_3__.ComponentsExtensionProvider), 5084/* harmony export */ addToWishlistApi: () => (/* reexport safe */ _add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_1__["default"]), 5085/* harmony export */ formatOptions: () => (/* binding */ formatOptions), 5086/* harmony export */ formatPascalCaseString: () => (/* binding */ formatPascalCaseString), 5087/* harmony export */ getPrivacyOptions: () => (/* binding */ getPrivacyOptions), 5088/* harmony export */ getProductFreeListsOptions: () => (/* binding */ getProductFreeListsOptions), 5089/* harmony export */ isValidHttpUrl: () => (/* binding */ isValidHttpUrl), 5090/* harmony export */ reactMultipleStringReplace: () => (/* binding */ reactMultipleStringReplace), 5091/* harmony export */ useButtonAttributes: () => (/* reexport safe */ _button_data_context__WEBPACK_IMPORTED_MODULE_2__.useButtonAttributes), 5092/* harmony export */ useButtonData: () => (/* reexport safe */ _button_data_context__WEBPACK_IMPORTED_MODULE_2__.useButtonData), 5093/* harmony export */ useComponentsExtension: () => (/* reexport safe */ _components_extension_context__WEBPACK_IMPORTED_MODULE_3__.useComponentsExtension), 5094/* harmony export */ wishlistApi: () => (/* reexport safe */ _wishlist_api__WEBPACK_IMPORTED_MODULE_0__["default"]) 5095/* harmony export */ }); 5096/* harmony import */ var _wishlist_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wishlist-api */ "./assets/js/src/utils/wishlist-api.js"); 5097/* harmony import */ var _add_to_wishlist_api__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./add-to-wishlist-api */ "./assets/js/src/utils/add-to-wishlist-api.js"); 5098/* harmony import */ var _button_data_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./button-data-context */ "./assets/js/src/utils/button-data-context.js"); 5099/* harmony import */ var _components_extension_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components-extension-context */ "./assets/js/src/utils/components-extension-context.js"); 5100/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); 5101/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); 5102/* harmony import */ var react_string_replace__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-string-replace */ "./node_modules/react-string-replace/index.js"); 5103/* harmony import */ var react_string_replace__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_string_replace__WEBPACK_IMPORTED_MODULE_5__); 5104/* globals yithWcwlAddToWishlist */ 5105 5106 5107 5108 5109 5110 5111 5112var formatOptions = function formatOptions(list, labelKey) { 5113 var options = []; 5114 Object.keys(list).forEach(function (key) { 5115 var label = labelKey ? list[key][labelKey] : list[key]; 5116 options.push({ 5117 value: isNaN(key) ? key : Number(key), 5118 label: label 5119 }); 5120 }); 5121 return options; 5122}; 5123var formatPascalCaseString = function formatPascalCaseString(str) { 5124 return str.split('-').map(function (substr) { 5125 return substr[0].toUpperCase() + substr.slice(1); 5126 }).join(''); 5127}; 5128var getPrivacyOptions = function getPrivacyOptions(withDescription) { 5129 var options = formatOptions(yithWcwlAddToWishlist.privacy_options); 5130 withDescription && options.forEach(function (option) { 5131 return options[option.value]['label'] = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("b", null, options[option.value]['label']), " - ", yithWcwlAddToWishlist.privacy_options_descriptions[option.value]); 5132 }); 5133 return options; 5134}; 5135var isValidHttpUrl = function isValidHttpUrl(string) { 5136 var url; 5137 try { 5138 url = new URL(string); 5139 } catch (e) { 5140 return false;
5141 } 5142 return url.protocol === 'http:' || url.protocol === 'https:'; 5143}; 5144var getProductFreeListsOptions = function getProductFreeListsOptions(addCreateOption) { 5145 var _useButtonData = (0,_button_data_context__WEBPACK_IMPORTED_MODULE_2__.useButtonData)(), 5146 availableLists = _useButtonData.availableLists, 5147 wishlists = _useButtonData.wishlists; 5148 if (!Object.keys(wishlists).length) { 5149 var _yithWcwlAddToWishlis; 5150 wishlists = { 5151 "default": { 5152 id: 'default', 5153 name: (_yithWcwlAddToWishlis = yithWcwlAddToWishlist) === null || _yithWcwlAddToWishlis === void 0 ? void 0 : _yithWcwlAddToWishlis.default_wishlist_name 5154 } 5155 }; 5156 availableLists.push('default'); 5157 } 5158 var options = formatOptions(Object.keys(wishlists).filter(function (key) { 5159 return availableLists.includes(key); 5160 }).reduce(function (obj, key) { 5161 obj[key] = wishlists[key]; 5162 return obj; 5163 }, {}), 'name'); 5164 if (addCreateOption) { 5165 options.push({ 5166 value: 'create', 5167 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Create a new list', 'yith-woocommerce-wishlist'), 5168 className: 'yith-wcwl-modal__wishlist-select__create-option' 5169 }); 5170 } 5171 return options; 5172}; 5173var reactMultipleStringReplace = function reactMultipleStringReplace(string, replacements) { 5174 replacements.forEach(function (_ref) { 5175 var search = _ref.search, 5176 replace = _ref.replace; 5177 return string = react_string_replace__WEBPACK_IMPORTED_MODULE_5___default()(string, search, replace); 5178 }); 5179 return string; 5180}; 5181 5182 5183/***/ }), 5184
5185/***/ "./assets/js/src/utils/wishlist-api.js": 5186/*!*********************************************!*\ 5187 !*** ./assets/js/src/utils/wishlist-api.js ***! 5188 \*********************************************/ 5189/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5190 5191"use strict"; 5192__webpack_require__.r(__webpack_exports__); 5193/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5194/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5195/* harmony export */ }); 5196/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); 5197/* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__);
vendor: 9,398 bytes, lines 5197-5200
5197 5198function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 5199function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } 5200function asyncGeneratorStep(
vendor: 2,599 bytes, lines 5200-5239
5200n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); } 5201function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; } 5202function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 5203function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 5204function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 5205function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 5206function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 5207 5208var WishlistApiHandler = /*#__PURE__*/function () { 5209 function WishlistApiHandler() { 5210 _classCallCheck(this, WishlistApiHandler); 5211 } 5212 return _createClass(WishlistApiHandler, [{ 5213 key: "fetchWishlists", 5214 value: function () { 5215 var _fetchWishlists = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { 5216 return _regeneratorRuntime().wrap(function _callee$(_context) { 5217 while (1) switch (_context.prev = _context.next) { 5218 case 0: 5219 _context.next = 2; 5220 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ 5221 path: '/yith/wishlist/v1/lists/' 5222 }); 5223 case 2: 5224 return _context.abrupt("return", _context.sent); 5225 case 3: 5226 case "end": 5227 return _context.stop(); 5228 } 5229 }, _callee); 5230 })); 5231 function fetchWishlists() { 5232 return _fetchWishlists.apply(this, arguments); 5233 } 5234 return fetchWishlists; 5235 }() 5236 }, { 5237 key: "createWishlists", 5238 value: function () { 5239 var _createWishlists = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(d
5239ata) { 5240 var response; 5241 return _regeneratorRuntime().wrap(function _callee2$(_context2) { 5242 while (1) switch (_context2.prev = _context2.next) { 5243 case 0: 5244 _context2.next = 2; 5245 return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ 5246 path: '/yith/wishlist/v1/lists/', 5247 method: 'POST', 5248 data: data 5249 }); 5250 case 2: 5251 response = _context2.sent; 5252 if (!(false === (response === null || response === void 0 ? void 0 : response.success))) { 5253 _context2.next = 5; 5254 break; 5255 } 5256 throw new Error(response === null || response === void 0 ? void 0 : response.message); 5257 case 5: 5258 return _context2.abrupt("return", response); 5259 case 6: 5260 case "end": 5261 return _context2.stop(); 5262 } 5263 }, _callee2); 5264 })); 5265 function createWishlists(_x) { 5266 return _createWishlists.apply(this, arguments); 5267 } 5268 return createWishlists; 5269 }() 5270 }]); 5271}(); 5272/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (new WishlistApiHandler()); 5273 5274/***/ }), 5275
vendor: 3,225 bytes, lines 5276-5389
5276/***/ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js": 5277/*!**********************************************************************************!*\ 5278 !*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***! 5279 \**********************************************************************************/ 5280/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 5281 5282"use strict"; 5283 5284 5285var reactIs = __webpack_require__(/*! react-is */ "./node_modules/react-is/index.js"); 5286 5287/** 5288 * Copyright 2015, Yahoo! Inc. 5289 * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms. 5290 */ 5291var REACT_STATICS = { 5292 childContextTypes: true, 5293 contextType: true, 5294 contextTypes: true, 5295 defaultProps: true, 5296 displayName: true, 5297 getDefaultProps: true, 5298 getDerivedStateFromError: true, 5299 getDerivedStateFromProps: true, 5300 mixins: true, 5301 propTypes: true, 5302 type: true 5303}; 5304var KNOWN_STATICS = { 5305 name: true, 5306 length: true, 5307 prototype: true, 5308 caller: true, 5309 callee: true, 5310 arguments: true, 5311 arity: true 5312}; 5313var FORWARD_REF_STATICS = { 5314 '$$typeof': true, 5315 render: true, 5316 defaultProps: true, 5317 displayName: true, 5318 propTypes: true 5319}; 5320var MEMO_STATICS = { 5321 '$$typeof': true, 5322 compare: true, 5323 defaultProps: true, 5324 displayName: true, 5325 propTypes: true, 5326 type: true 5327}; 5328var TYPE_STATICS = {}; 5329TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS; 5330TYPE_STATICS[reactIs.Memo] = MEMO_STATICS; 5331 5332function getStatics(component) { 5333 // React v16.11 and below 5334 if (reactIs.isMemo(component)) { 5335 return MEMO_STATICS; 5336 } // React v16.12 and above 5337 5338 5339 return TYPE_STATICS[component['$$typeof']] || REACT_STATICS; 5340} 5341 5342var defineProperty = Object.defineProperty; 5343var getOwnPropertyNames = Object.getOwnPropertyNames; 5344var getOwnPropertySymbols = Object.getOwnPropertySymbols; 5345var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; 5346var getPrototypeOf = Object.getPrototypeOf; 5347var objectPrototype = Object.prototype; 5348function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) { 5349 if (typeof sourceComponent !== 'string') { 5350 // don't hoist over string (html) components 5351 if (objectPrototype) { 5352 var inheritedComponent = getPrototypeOf(sourceComponent); 5353 5354 if (inheritedComponent && inheritedComponent !== objectPrototype) { 5355 hoistNonReactStatics(targetComponent, inheritedComponent, blacklist); 5356 } 5357 } 5358 5359 var keys = getOwnPropertyNames(sourceComponent); 5360 5361 if (getOwnPropertySymbols) { 5362 keys = keys.concat(getOwnPropertySymbols(sourceComponent)); 5363 } 5364 5365 var targetStatics = getStatics(targetComponent); 5366 var sourceStatics = getStatics(sourceComponent); 5367 5368 for (var i = 0; i < keys.length; ++i) { 5369 var key = keys[i]; 5370 5371 if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) { 5372 var descriptor = getOwnPropertyDescriptor(sourceComponent, key); 5373 5374 try { 5375 // Avoid failures from read-only properties 5376 defineProperty(targetComponent, key, descriptor); 5377 } catch (e) {} 5378 } 5379 } 5380 } 5381 5382 return targetComponent; 5383} 5384 5385module.exports = hoistNonReactStatics; 5386 5387 5388/***/ }), 5389
vendor: 7,264 bytes, lines 5390-5581
5390/***/ "./node_modules/react-is/cjs/react-is.development.js": 5391/*!***********************************************************!*\ 5392 !*** ./node_modules/react-is/cjs/react-is.development.js ***! 5393 \***********************************************************/ 5394/***/ ((__unused_webpack_module, exports) => { 5395 5396"use strict"; 5397/** @license React v16.13.1 5398 * react-is.development.js 5399 * 5400 * Copyright (c) Facebook, Inc. and its affiliates. 5401 * 5402 * This source code is licensed under the MIT license found in the 5403 * LICENSE file in the root directory of this source tree. 5404 */ 5405 5406 5407 5408 5409 5410if (true) { 5411 (function() { 5412'use strict'; 5413 5414// The Symbol used to tag the ReactElement-like types. If there is no native Symbol 5415// nor polyfill, then a plain number is used for performance. 5416var hasSymbol = typeof Symbol === 'function' && Symbol.for; 5417var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; 5418var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; 5419var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; 5420var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; 5421var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; 5422var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; 5423var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary 5424// (unstable) APIs that have been removed. Can we remove the symbols? 5425 5426var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; 5427var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; 5428var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; 5429var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; 5430var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; 5431var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; 5432var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; 5433var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; 5434var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; 5435var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; 5436var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; 5437 5438function isValidElementType(type) { 5439 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. 5440 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); 5441} 5442 5443function typeOf(object) { 5444 if (typeof object === 'object' && object !== null) { 5445 var $$typeof = object.$$typeof; 5446 5447 switch ($$typeof) { 5448 case REACT_ELEMENT_TYPE: 5449 var type = object.type; 5450 5451 switch (type) { 5452 case REACT_ASYNC_MODE_TYPE: 5453 case REACT_CONCURRENT_MODE_TYPE: 5454 case REACT_FRAGMENT_TYPE: 5455 case REACT_PROFILER_TYPE: 5456 case REACT_STRICT_MODE_TYPE: 5457 case REACT_SUSPENSE_TYPE: 5458 return type; 5459 5460 default: 5461 var $$typeofType = type && type.$$typeof; 5462 5463 switch ($$typeofType) { 5464 case REACT_CONTEXT_TYPE: 5465 case REACT_FORWARD_REF_TYPE: 5466 case REACT_LAZY_TYPE: 5467 case REACT_MEMO_TYPE: 5468 case REACT_PROVIDER_TYPE: 5469 return $$typeofType; 5470 5471 default: 5472 return $$typeof; 5473 } 5474 5475 } 5476 5477 case REACT_PORTAL_TYPE: 5478 return $$typeof; 5479 } 5480 } 5481 5482 return undefined; 5483} // AsyncMode is deprecated along with isAsyncMode 5484 5485var AsyncMode = REACT_ASYNC_MODE_TYPE; 5486var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; 5487var ContextConsumer = REACT_CONTEXT_TYPE; 5488var ContextProvider = REACT_PROVIDER_TYPE; 5489var Element = REACT_ELEMENT_TYPE; 5490var ForwardRef = REACT_FORWARD_REF_TYPE; 5491var Fragment = REACT_FRAGMENT_TYPE; 5492var Lazy = REACT_LAZY_TYPE; 5493var Memo = REACT_MEMO_TYPE; 5494var Portal = REACT_PORTAL_TYPE; 5495var Profiler = REACT_PROFILER_TYPE; 5496var StrictMode = REACT_STRICT_MODE_TYPE; 5497var Suspense = REACT_SUSPENSE_TYPE; 5498var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated 5499 5500function isAsyncMode(object) { 5501 { 5502 if (!hasWarnedAboutDeprecatedIsAsyncMode) { 5503 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint 5504 5505 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); 5506 } 5507 } 5508 5509 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; 5510} 5511function isConcurrentMode(object) { 5512 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; 5513} 5514function isContextConsumer(object) { 5515 return typeOf(object) === REACT_CONTEXT_TYPE; 5516} 5517function isContextProvider(object) { 5518 return typeOf(object) === REACT_PROVIDER_TYPE; 5519} 5520function isElement(object) { 5521 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 5522} 5523function isForwardRef(object) { 5524 return typeOf(object) === REACT_FORWARD_REF_TYPE; 5525} 5526function isFragment(object) { 5527 return typeOf(object) === REACT_FRAGMENT_TYPE; 5528} 5529function isLazy(object) { 5530 return typeOf(object) === REACT_LAZY_TYPE; 5531} 5532function isMemo(object) { 5533 return typeOf(object) === REACT_MEMO_TYPE; 5534} 5535function isPortal(object) { 5536 return typeOf(object) === REACT_PORTAL_TYPE; 5537} 5538function isProfiler(object) { 5539 return typeOf(object) === REACT_PROFILER_TYPE; 5540} 5541function isStrictMode(object) { 5542 return typeOf(object) === REACT_STRICT_MODE_TYPE; 5543} 5544function isSuspense(object) { 5545 return typeOf(object) === REACT_SUSPENSE_TYPE; 5546} 5547 5548exports.AsyncMode = AsyncMode; 5549exports.ConcurrentMode = ConcurrentMode; 5550exports.ContextConsumer = ContextConsumer; 5551exports.ContextProvider = ContextProvider; 5552exports.Element = Element; 5553exports.ForwardRef = ForwardRef; 5554exports.Fragment = Fragment; 5555exports.Lazy = Lazy; 5556exports.Memo = Memo; 5557exports.Portal = Portal; 5558exports.Profiler = Profiler; 5559exports.StrictMode = StrictMode; 5560exports.Suspense = Suspense; 5561exports.isAsyncMode = isAsyncMode; 5562exports.isConcurrentMode = isConcurrentMode; 5563exports.isContextConsumer = isContextConsumer; 5564exports.isContextProvider = isContextProvider; 5565exports.isElement = isElement; 5566exports.isForwardRef = isForwardRef; 5567exports.isFragment = isFragment; 5568exports.isLazy = isLazy; 5569exports.isMemo = isMemo; 5570exports.isPortal = isPortal; 5571exports.isProfiler = isProfiler; 5572exports.isStrictMode = isStrictMode; 5573exports.isSuspense = isSuspense; 5574exports.isValidElementType = isValidElementType; 5575exports.typeOf = typeOf; 5576 })(); 5577} 5578 5579 5580/***/ }), 5581
vendor: 432 bytes, lines 5582-5597
5582/***/ "./node_modules/react-is/index.js": 5583/*!****************************************!*\ 5584 !*** ./node_modules/react-is/index.js ***! 5585 \****************************************/ 5586/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 5587 5588"use strict"; 5589 5590 5591if (false) {} else { 5592 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-is/cjs/react-is.development.js"); 5593} 5594 5595 5596/***/ }), 5597
vendor: 1,836 bytes, lines 5598-5642
5598/***/ "./node_modules/react-redux/es/components/Context.js": 5599/*!***********************************************************!*\ 5600 !*** ./node_modules/react-redux/es/components/Context.js ***! 5601 \***********************************************************/ 5602/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5603 5604"use strict"; 5605__webpack_require__.r(__webpack_exports__); 5606/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5607/* harmony export */ ReactReduxContext: () => (/* binding */ ReactReduxContext), 5608/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5609/* harmony export */ }); 5610/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 5611/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 5612 5613const ContextKey = Symbol.for(`react-redux-context`); 5614const gT = typeof globalThis !== "undefined" ? globalThis : 5615/* fall back to a per-module scope (pre-8.1 behaviour) if `globalThis` is not available */ 5616{}; 5617 5618function getContext() { 5619 var _gT$ContextKey; 5620 5621 if (!react__WEBPACK_IMPORTED_MODULE_0__.createContext) return {}; 5622 const contextMap = (_gT$ContextKey = gT[ContextKey]) != null ? _gT$ContextKey : gT[ContextKey] = new Map(); 5623 let realContext = contextMap.get(react__WEBPACK_IMPORTED_MODULE_0__.createContext); 5624 5625 if (!realContext) { 5626 realContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(null); 5627 5628 if (true) { 5629 realContext.displayName = 'ReactRedux'; 5630 } 5631 5632 contextMap.set(react__WEBPACK_IMPORTED_MODULE_0__.createContext, realContext); 5633 } 5634 5635 return realContext; 5636} 5637 5638const ReactReduxContext = /*#__PURE__*/getContext(); 5639/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactReduxContext); 5640 5641/***/ }), 5642
vendor: 2,908 bytes, lines 5643-5709
5643/***/ "./node_modules/react-redux/es/components/Provider.js": 5644/*!************************************************************!*\ 5645 !*** ./node_modules/react-redux/es/components/Provider.js ***! 5646 \************************************************************/ 5647/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5648 5649"use strict"; 5650__webpack_require__.r(__webpack_exports__); 5651/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5652/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 5653/* harmony export */ }); 5654/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 5655/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 5656/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ "./node_modules/react-redux/es/components/Context.js"); 5657/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js"); 5658/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js"); 5659 5660 5661 5662 5663 5664function Provider({ 5665 store, 5666 context, 5667 children, 5668 serverState, 5669 stabilityCheck = 'once', 5670 noopCheck = 'once' 5671}) { 5672 const contextValue = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => { 5673 const subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_2__.createSubscription)(store); 5674 return { 5675 store, 5676 subscription, 5677 getServerState: serverState ? () => serverState : undefined, 5678 stabilityCheck, 5679 noopCheck 5680 }; 5681 }, [store, serverState, stabilityCheck, noopCheck]); 5682 const previousState = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => store.getState(), [store]); 5683 (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(() => { 5684 const { 5685 subscription 5686 } = contextValue; 5687 subscription.onStateChange = subscription.notifyNestedSubs; 5688 subscription.trySubscribe(); 5689 5690 if (previousState !== store.getState()) { 5691 subscription.notifyNestedSubs(); 5692 } 5693 5694 return () => { 5695 subscription.tryUnsubscribe(); 5696 subscription.onStateChange = undefined; 5697 }; 5698 }, [contextValue, previousState]); 5699 const Context = context || _Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext; // @ts-ignore 'AnyAction' is assignable to the constraint of type 'A', but 'A' could be instantiated with a different subtype 5700 5701 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(Context.Provider, { 5702 value: contextValue 5703 }, children); 5704} 5705 5706/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Provider); 5707 5708/***/ }), 5709
vendor: 24,405 bytes, lines 5710-6151
5710/***/ "./node_modules/react-redux/es/components/connect.js": 5711/*!***********************************************************!*\ 5712 !*** ./node_modules/react-redux/es/components/connect.js ***! 5713 \***********************************************************/ 5714/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 5715 5716"use strict"; 5717__webpack_require__.r(__webpack_exports__); 5718/* harmony export */ __webpack_require__.d(__webpack_exports__, { 5719/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 5720/* harmony export */ initializeConnect: () => (/* binding */ initializeConnect) 5721/* harmony export */ }); 5722/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); 5723/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); 5724/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! hoist-non-react-statics */ "./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"); 5725/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2__); 5726/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "react"); 5727/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__); 5728/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-is */ "./node_modules/react-redux/node_modules/react-is/index.js"); 5729/* harmony import */ var _connect_selectorFactory__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../connect/selectorFactory */ "./node_modules/react-redux/es/connect/selectorFactory.js"); 5730/* harmony import */ var _connect_mapDispatchToProps__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../connect/mapDispatchToProps */ "./node_modules/react-redux/es/connect/mapDispatchToProps.js"); 5731/* harmony import */ var _connect_mapStateToProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../connect/mapStateToProps */ "./node_modules/react-redux/es/connect/mapStateToProps.js"); 5732/* harmony import */ var _connect_mergeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../connect/mergeProps */ "./node_modules/react-redux/es/connect/mergeProps.js"); 5733/* harmony import */ var _utils_Subscription__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/Subscription */ "./node_modules/react-redux/es/utils/Subscription.js"); 5734/* harmony import */ var _utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/useIsomorphicLayoutEffect */ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js"); 5735/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js"); 5736/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js"); 5737/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Context */ "./node_modules/react-redux/es/components/Context.js"); 5738/* harmony import */ var _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useSyncExternalStore */ "./node_modules/react-redux/es/utils/useSyncExternalStore.js"); 5739 5740 5741const _excluded = ["reactReduxForwardedRef"]; 5742 5743/* eslint-disable valid-jsdoc, @typescript-eslint/no-unused-vars */ 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757let useSyncExternalStore = _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_14__.notInitialized; 5758const initializeConnect = fn => { 5759 useSyncExternalStore = fn; 5760}; // Define some constant arrays just to avoid re-creating these 5761 5762const EMPTY_ARRAY = [null, 0]; 5763const NO_SUBSCRIPTION_ARRAY = [null, null]; // Attempts to stringify whatever not-really-a-component value we were given 5764// for logging in an error message 5765 5766const stringifyComponent = Comp => { 5767 try { 5768 return JSON.stringify(Comp); 5769 } catch (err) { 5770 return String(Comp); 5771 } 5772}; 5773 5774// This is "just" a `useLayoutEffect`, but with two modifications: 5775// - we need to fall back to `useEffect` in SSR to avoid annoying warnings 5776// - we extract this to a separate function to avoid closing over values 5777// and causing memory leaks 5778function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) { 5779 (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(() => effectFunc(...effectArgs), dependencies); 5780} // Effect callback, extracted: assign the latest props values to refs for later usage 5781 5782 5783function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, // actualChildProps: unknown, 5784childPropsFromStoreUpdate, notifyNestedSubs) { 5785 // We want to capture the wrapper props and child props we used for later comparisons 5786 lastWrapperProps.current = wrapperProps; 5787 renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update 5788 5789 if (childPropsFromStoreUpdate.current) { 5790 childPropsFromStoreUpdate.current = null; 5791 notifyNestedSubs(); 5792 } 5793} // Effect callback, extracted: subscribe to the Redux store or nearest connected ancestor, 5794// check for updates after dispatched actions, and trigger re-renders. 5795 5796 5797function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, // forceComponentUpdateDispatch: React.Dispatch<any>, 5798additionalSubscribeListener) { 5799 // If we're not subscribed to the store, nothing to do here 5800 if (!shouldHandleStateChanges) return () => {}; // Capture values for checking if and when this component unmounts 5801 5802 let didUnsubscribe = false; 5803 let lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component 5804 5805 const checkForUpdates = () => { 5806 if (didUnsubscribe || !isMounted.current) { 5807 // Don't run stale listeners. 5808 // Redux doesn't guarantee unsubscriptions happen until next dispatch. 5809 return; 5810 } // TODO We're currently calling getState ourselves here, rather than letting `uSES` do it 5811 5812 5813 const latestStoreState = store.getState(); 5814 let newChildProps, error; 5815 5816 try { 5817 // Actually run the selector with the most recent store state and wrapper props 5818 // to determine what the child props should be 5819 newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current); 5820 } catch (e) { 5821 error = e; 5822 lastThrownError = e; 5823 } 5824 5825 if (!error) { 5826 lastThrownError = null; 5827 } // If the child props haven't changed, nothing to do here - cascade the subscription update 5828 5829 5830 if (newChildProps === lastChildProps.current) { 5831 if (!renderIsScheduled.current) { 5832 notifyNestedSubs(); 5833 } 5834 } else { 5835 // Save references to the new child props. Note that we track the "child props from store update" 5836 // as a ref instead of a useState/useReducer because we need a way to determine if that value has 5837 // been processed. If this went into useState/useReducer, we couldn't clear out the value without 5838 // forcing another re-render, which we don't want. 5839 lastChildProps.current = newChildProps; 5840 childPropsFromStoreUpdate.current = newChildProps; 5841 renderIsScheduled.current = true; // TODO This is hacky and not how `uSES` is meant to be used 5842 // Trigger the React `useSyncExternalStore` subscriber 5843 5844 additionalSubscribeListener(); 5845 } 5846 }; // Actually subscribe to the nearest connected ancestor (or store) 5847 5848 5849 subscription.onStateChange = checkForUpdates; 5850 subscription.trySubscribe(); // Pull data from the store after first render in case the store has 5851 // changed since we began. 5852 5853 checkForUpdates(); 5854 5855 const unsubscribeWrapper = () => { 5856 didUnsubscribe = true; 5857 subscription.tryUnsubscribe(); 5858 subscription.onStateChange = null; 5859 5860 if (lastThrownError) { 5861 // It's possible that we caught an error due to a bad mapState function, but the 5862 // parent re-rendered without this component and we're about to unmount. 5863 // This shouldn't happen as long as we do top-down subscriptions correctly, but 5864 // if we ever do those wrong, this throw will surface the error in our tests. 5865 // In that case, throw the error from here so it doesn't get lost. 5866 throw lastThrownError; 5867 } 5868 }; 5869 5870 return unsubscribeWrapper; 5871} // Reducer initial state creation for our update reducer 5872 5873 5874const initStateUpdates = () => EMPTY_ARRAY; 5875 5876function strictEqual(a, b) { 5877 return a === b; 5878} 5879/** 5880 * Infers the type of props that a connector will inject into a component. 5881 */ 5882 5883 5884let hasWarnedAboutDeprecatedPureOption = false; 5885/** 5886 * Connects a React component to a Redux store. 5887 * 5888 * - Without arguments, just wraps the component, without changing the behavior / props 5889 * 5890 * - If 2 params are passed (3rd param, mergeProps, is skipped), default behavior 5891 * is to override ownProps (as stated in the docs), so what remains is everything that's 5892 * not a state or dispatch prop 5893 * 5894 * - When 3rd param is passed, we don't know if ownProps propagate and whether they 5895 * should be valid component props, because it depends on mergeProps implementation. 5896 * As such, it is the user's responsibility to extend ownProps interface from state or 5897 * dispatch props or both when applicable 5898 * 5899 * @param mapStateToProps A function that extracts values from state 5900 * @param mapDispatchToProps Setup for dispatching actions 5901 * @param mergeProps Optional callback to merge state and dispatch props together 5902 * @param options Options for configuring the connection 5903 * 5904 */ 5905 5906function connect(mapStateToProps, mapDispatchToProps, mergeProps, { 5907 // The `pure` option has been removed, so TS doesn't like us destructuring this to check its existence. 5908 // @ts-ignore 5909 pure, 5910 areStatesEqual = strictEqual, 5911 areOwnPropsEqual = _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"], 5912 areStatePropsEqual = _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"], 5913 areMergedPropsEqual = _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_11__["default"], 5914 // use React's forwardRef to expose a ref of the wrapped component 5915 forwardRef = false, 5916 // the context consumer to use 5917 context = _Context__WEBPACK_IMPORTED_MODULE_13__.ReactReduxContext 5918} = {}) { 5919 if (true) { 5920 if (pure !== undefined && !hasWarnedAboutDeprecatedPureOption) { 5921 hasWarnedAboutDeprecatedPureOption = true; 5922 (0,_utils_warning__WEBPACK_IMPORTED_MODULE_12__["default"])('The `pure` option has been removed. `connect` is now always a "pure/memoized" component'); 5923 } 5924 } 5925 5926 const Context = context; 5927 const initMapStateToProps = (0,_connect_mapStateToProps__WEBPACK_IMPORTED_MODULE_7__.mapStateToPropsFactory)(mapStateToProps); 5928 const initMapDispatchToProps = (0,_connect_mapDispatchToProps__WEBPACK_IMPORTED_MODULE_6__.mapDispatchToPropsFactory)(mapDispatchToProps); 5929 const initMergeProps = (0,_connect_mergeProps__WEBPACK_IMPORTED_MODULE_8__.mergePropsFactory)(mergeProps); 5930 const shouldHandleStateChanges = Boolean(mapStateToProps); 5931 5932 const wrapWithConnect = WrappedComponent => { 5933 if ( true && !(0,react_is__WEBPACK_IMPORTED_MODULE_4__.isValidElementType)(WrappedComponent)) { 5934 throw new Error(`You must pass a component to the function returned by connect. Instead received ${stringifyComponent(WrappedComponent)}`); 5935 } 5936 5937 const wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component'; 5938 const displayName = `Connect(${wrappedComponentName})`; 5939 const selectorFactoryOptions = { 5940 shouldHandleStateChanges, 5941 displayName, 5942 wrappedComponentName, 5943 WrappedComponent, 5944 // @ts-ignore 5945 initMapStateToProps, 5946 // @ts-ignore 5947 initMapDispatchToProps, 5948 initMergeProps, 5949 areStatesEqual, 5950 areStatePropsEqual, 5951 areOwnPropsEqual, 5952 areMergedPropsEqual 5953 }; 5954 5955 function ConnectFunction(props) { 5956 const [propsContext, reactReduxForwardedRef, wrapperProps] = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 5957 // Distinguish between actual "data" props that were passed to the wrapper component, 5958 // and values needed to control behavior (forwarded refs, alternate context instances). 5959 // To maintain the wrapperProps object reference, memoize this destructuring. 5960 const { 5961 reactReduxForwardedRef 5962 } = props, 5963 wrapperProps = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__["default"])(props, _excluded); 5964 5965 return [props.context, reactReduxForwardedRef, wrapperProps]; 5966 }, [props]); 5967 const ContextToUse = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 5968 // Users may optionally pass in a custom context instance to use instead of our ReactReduxContext. 5969 // Memoize the check that determines which context instance we should use. 5970 return propsContext && propsContext.Consumer && // @ts-ignore 5971 (0,react_is__WEBPACK_IMPORTED_MODULE_4__.isContextConsumer)( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(propsContext.Consumer, null)) ? propsContext : Context; 5972 }, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available 5973 5974 const contextValue = react__WEBPACK_IMPORTED_MODULE_3__.useContext(ContextToUse); // The store _must_ exist as either a prop or in context. 5975 // We'll check to see if it _looks_ like a Redux store first. 5976 // This allows us to pass through a `store` prop that is just a plain value. 5977 5978 const didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch); 5979 const didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store); 5980 5981 if ( true && !didStoreComeFromProps && !didStoreComeFromContext) { 5982 throw new Error(`Could not find "store" in the context of ` + `"${displayName}". Either wrap the root component in a <Provider>, ` + `or pass a custom React context provider to <Provider> and the corresponding ` + `React context consumer to ${displayName} in connect options.`); 5983 } // Based on the previous check, one of these must be true 5984 5985 5986 const store = didStoreComeFromProps ? props.store : contextValue.store; 5987 const getServerState = didStoreComeFromContext ? contextValue.getServerState : store.getState; 5988 const childPropsSelector = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 5989 // The child props selector needs the store reference as an input. 5990 // Re-create this selector whenever the store changes. 5991 return (0,_connect_selectorFactory__WEBPACK_IMPORTED_MODULE_5__["default"])(store.dispatch, selectorFactoryOptions); 5992 }, [store]); 5993 const [subscription, notifyNestedSubs] = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 5994 if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component 5995 // connected to the store via props shouldn't use subscription from context, or vice versa. 5996 5997 const subscription = (0,_utils_Subscription__WEBPACK_IMPORTED_MODULE_9__.createSubscription)(store, didStoreComeFromProps ? undefined : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in 5998 // the middle of the notification loop, where `subscription` will then be null. This can 5999 // probably be avoided if Subscription's listeners logic is changed to not call listeners 6000 // that have been unsubscribed in the middle of the notification loop. 6001 6002 const notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription); 6003 return [subscription, notifyNestedSubs]; 6004 }, [store, didStoreComeFromProps, contextValue]); // Determine what {store, subscription} value should be put into nested context, if necessary, 6005 // and memoize that value to avoid unnecessary context updates. 6006 6007 const overriddenContextValue = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 6008 if (didStoreComeFromProps) { 6009 // This component is directly subscribed to a store from props. 6010 // We don't want descendants reading from this store - pass down whatever 6011 // the existing context value is from the nearest connected ancestor. 6012 return contextValue; 6013 } // Otherwise, put this component's subscription instance into context, so that 6014 // connected descendants won't update until after this component is done 6015 6016 6017 return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, contextValue, { 6018 subscription 6019 }); 6020 }, [didStoreComeFromProps, contextValue, subscription]); // Set up refs to coordinate values between the subscription effect and the render logic 6021 6022 const lastChildProps = react__WEBPACK_IMPORTED_MODULE_3__.useRef(); 6023 const lastWrapperProps = react__WEBPACK_IMPORTED_MODULE_3__.useRef(wrapperProps); 6024 const childPropsFromStoreUpdate = react__WEBPACK_IMPORTED_MODULE_3__.useRef(); 6025 const renderIsScheduled = react__WEBPACK_IMPORTED_MODULE_3__.useRef(false); 6026 const isProcessingDispatch = react__WEBPACK_IMPORTED_MODULE_3__.useRef(false); 6027 const isMounted = react__WEBPACK_IMPORTED_MODULE_3__.useRef(false); 6028 const latestSubscriptionCallbackError = react__WEBPACK_IMPORTED_MODULE_3__.useRef(); 6029 (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(() => { 6030 isMounted.current = true; 6031 return () => { 6032 isMounted.current = false; 6033 }; 6034 }, []); 6035 const actualChildPropsSelector = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 6036 const selector = () => { 6037 // Tricky logic here: 6038 // - This render may have been triggered by a Redux store update that produced new child props 6039 // - However, we may have gotten new wrapper props after that 6040 // If we have new child props, and the same wrapper props, we know we should use the new child props as-is. 6041 // But, if we have new wrapper props, those might change the child props, so we have to recalculate things. 6042 // So, we'll use the child props from store update only if the wrapper props are the same as last time. 6043 if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) { 6044 return childPropsFromStoreUpdate.current; 6045 } // TODO We're reading the store directly in render() here. Bad idea? 6046 // This will likely cause Bad Things (TM) to happen in Concurrent Mode. 6047 // Note that we do this because on renders _not_ caused by store updates, we need the latest store state 6048 // to determine what the child props should be. 6049 6050 6051 return childPropsSelector(store.getState(), wrapperProps); 6052 }; 6053 6054 return selector; 6055 }, [store, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns 6056 // about useLayoutEffect in SSR, so we try to detect environment and fall back to 6057 // just useEffect instead to avoid the warning, since neither will run anyway. 6058 6059 const subscribeForReact = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 6060 const subscribe = reactListener => { 6061 if (!subscription) { 6062 return () => {}; 6063 } 6064 6065 return subscribeUpdates(shouldHandleStateChanges, store, subscription, // @ts-ignore 6066 childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, isMounted, childPropsFromStoreUpdate, notifyNestedSubs, reactListener); 6067 }; 6068 6069 return subscribe; 6070 }, [subscription]); 6071 useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, childPropsFromStoreUpdate, notifyNestedSubs]); 6072 let actualChildProps; 6073 6074 try { 6075 actualChildProps = useSyncExternalStore( // TODO We're passing through a big wrapper that does a bunch of extra side effects besides subscribing 6076 subscribeForReact, // TODO This is incredibly hacky. We've already processed the store update and calculated new child props, 6077 // TODO and we're just passing that through so it triggers a re-render for us rather than relying on `uSES`. 6078 actualChildPropsSelector, getServerState ? () => childPropsSelector(getServerState(), wrapperProps) : actualChildPropsSelector); 6079 } catch (err) { 6080 if (latestSubscriptionCallbackError.current) { 6081 ; 6082 err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`; 6083 } 6084 6085 throw err; 6086 } 6087 6088 (0,_utils_useIsomorphicLayoutEffect__WEBPACK_IMPORTED_MODULE_10__.useIsomorphicLayoutEffect)(() => { 6089 latestSubscriptionCallbackError.current = undefined; 6090 childPropsFromStoreUpdate.current = undefined; 6091 lastChildProps.current = actualChildProps; 6092 }); // Now that all that's done, we can finally try to actually render the child component. 6093 // We memoize the elements for the rendered child component as an optimization. 6094 6095 const renderedWrappedComponent = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 6096 return ( 6097 /*#__PURE__*/ 6098 // @ts-ignore 6099 react__WEBPACK_IMPORTED_MODULE_3__.createElement(WrappedComponent, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, actualChildProps, { 6100 ref: reactReduxForwardedRef 6101 })) 6102 ); 6103 }, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering 6104 // that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate. 6105 6106 const renderedChild = react__WEBPACK_IMPORTED_MODULE_3__.useMemo(() => { 6107 if (shouldHandleStateChanges) { 6108 // If this component is subscribed to store updates, we need to pass its own 6109 // subscription instance down to our descendants. That means rendering the same 6110 // Context instance, and putting a different value into the context. 6111 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(ContextToUse.Provider, { 6112 value: overriddenContextValue 6113 }, renderedWrappedComponent); 6114 } 6115 6116 return renderedWrappedComponent; 6117 }, [ContextToUse, renderedWrappedComponent, overriddenContextValue]); 6118 return renderedChild; 6119 } 6120 6121 const _Connect = react__WEBPACK_IMPORTED_MODULE_3__.memo(ConnectFunction); 6122 6123 // Add a hacky cast to get the right output type 6124 const Connect = _Connect; 6125 Connect.WrappedComponent = WrappedComponent; 6126 Connect.displayName = ConnectFunction.displayName = displayName; 6127 6128 if (forwardRef) { 6129 const _forwarded = react__WEBPACK_IMPORTED_MODULE_3__.forwardRef(function forwardConnectRef(props, ref) { 6130 // @ts-ignore 6131 return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__.createElement(Connect, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, props, { 6132 reactReduxForwardedRef: ref 6133 })); 6134 }); 6135 6136 const forwarded = _forwarded; 6137 forwarded.displayName = displayName; 6138 forwarded.WrappedComponent = WrappedComponent; 6139 return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(forwarded, WrappedComponent); 6140 } 6141 6142 return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_2___default()(Connect, WrappedComponent); 6143 }; 6144 6145 return wrapWithConnect; 6146} 6147 6148/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (connect); 6149 6150/***/ }), 6151
vendor: 846 bytes, lines 6152-6170
6152/***/ "./node_modules/react-redux/es/connect/invalidArgFactory.js": 6153/*!******************************************************************!*\ 6154 !*** ./node_modules/react-redux/es/connect/invalidArgFactory.js ***! 6155 \******************************************************************/ 6156/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6157 6158"use strict"; 6159__webpack_require__.r(__webpack_exports__); 6160/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6161/* harmony export */ createInvalidArgFactory: () => (/* binding */ createInvalidArgFactory) 6162/* harmony export */ }); 6163function createInvalidArgFactory(arg, name) { 6164 return (dispatch, options) => { 6165 throw new Error(`Invalid value of type ${typeof arg} for ${name} argument when connecting component ${options.wrappedComponentName}.`); 6166 }; 6167} 6168 6169/***/ }), 6170
vendor: 1,944 bytes, lines 6171-6197
6171/***/ "./node_modules/react-redux/es/connect/mapDispatchToProps.js": 6172/*!*******************************************************************!*\ 6173 !*** ./node_modules/react-redux/es/connect/mapDispatchToProps.js ***! 6174 \*******************************************************************/ 6175/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6176 6177"use strict"; 6178__webpack_require__.r(__webpack_exports__); 6179/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6180/* harmony export */ mapDispatchToPropsFactory: () => (/* binding */ mapDispatchToPropsFactory) 6181/* harmony export */ }); 6182/* harmony import */ var _utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/bindActionCreators */ "./node_modules/react-redux/es/utils/bindActionCreators.js"); 6183/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js"); 6184/* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); 6185 6186 6187 6188function mapDispatchToPropsFactory(mapDispatchToProps) { 6189 return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(dispatch => // @ts-ignore 6190 (0,_utils_bindActionCreators__WEBPACK_IMPORTED_MODULE_0__["default"])(mapDispatchToProps, dispatch)) : !mapDispatchToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsConstant)(dispatch => ({ 6191 dispatch 6192 })) : typeof mapDispatchToProps === 'function' ? // @ts-ignore 6193 (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_1__.wrapMapToPropsFunc)(mapDispatchToProps, 'mapDispatchToProps') : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__.createInvalidArgFactory)(mapDispatchToProps, 'mapDispatchToProps'); 6194} 6195 6196/***/ }), 6197
vendor: 1,414 bytes, lines 6198-6219
6198/***/ "./node_modules/react-redux/es/connect/mapStateToProps.js": 6199/*!****************************************************************!*\ 6200 !*** ./node_modules/react-redux/es/connect/mapStateToProps.js ***! 6201 \****************************************************************/ 6202/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6203 6204"use strict"; 6205__webpack_require__.r(__webpack_exports__); 6206/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6207/* harmony export */ mapStateToPropsFactory: () => (/* binding */ mapStateToPropsFactory) 6208/* harmony export */ }); 6209/* harmony import */ var _wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./wrapMapToProps */ "./node_modules/react-redux/es/connect/wrapMapToProps.js"); 6210/* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); 6211 6212 6213function mapStateToPropsFactory(mapStateToProps) { 6214 return !mapStateToProps ? (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsConstant)(() => ({})) : typeof mapStateToProps === 'function' ? // @ts-ignore 6215 (0,_wrapMapToProps__WEBPACK_IMPORTED_MODULE_0__.wrapMapToPropsFunc)(mapStateToProps, 'mapStateToProps') : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_1__.createInvalidArgFactory)(mapStateToProps, 'mapStateToProps'); 6216} 6217 6218/***/ }), 6219
vendor: 2,539 bytes, lines 6220-6270
6220/***/ "./node_modules/react-redux/es/connect/mergeProps.js": 6221/*!***********************************************************!*\ 6222 !*** ./node_modules/react-redux/es/connect/mergeProps.js ***! 6223 \***********************************************************/ 6224/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6225 6226"use strict"; 6227__webpack_require__.r(__webpack_exports__); 6228/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6229/* harmony export */ defaultMergeProps: () => (/* binding */ defaultMergeProps), 6230/* harmony export */ mergePropsFactory: () => (/* binding */ mergePropsFactory), 6231/* harmony export */ wrapMergePropsFunc: () => (/* binding */ wrapMergePropsFunc) 6232/* harmony export */ }); 6233/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); 6234/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js"); 6235/* harmony import */ var _invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./invalidArgFactory */ "./node_modules/react-redux/es/connect/invalidArgFactory.js"); 6236 6237 6238 6239function defaultMergeProps(stateProps, dispatchProps, ownProps) { 6240 // @ts-ignore 6241 return (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, ownProps, stateProps, dispatchProps); 6242} 6243function wrapMergePropsFunc(mergeProps) { 6244 return function initMergePropsProxy(dispatch, { 6245 displayName, 6246 areMergedPropsEqual 6247 }) { 6248 let hasRunOnce = false; 6249 let mergedProps; 6250 return function mergePropsProxy(stateProps, dispatchProps, ownProps) { 6251 const nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps); 6252 6253 if (hasRunOnce) { 6254 if (!areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps; 6255 } else { 6256 hasRunOnce = true; 6257 mergedProps = nextMergedProps; 6258 if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_1__["default"])(mergedProps, displayName, 'mergeProps'); 6259 } 6260 6261 return mergedProps; 6262 }; 6263 }; 6264} 6265function mergePropsFactory(mergeProps) { 6266 return !mergeProps ? () => defaultMergeProps : typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : (0,_invalidArgFactory__WEBPACK_IMPORTED_MODULE_2__.createInvalidArgFactory)(mergeProps, 'mergeProps'); 6267} 6268 6269/***/ }), 6270
vendor: 4,391 bytes, lines 6271-6371
6271/***/ "./node_modules/react-redux/es/connect/selectorFactory.js": 6272/*!****************************************************************!*\ 6273 !*** ./node_modules/react-redux/es/connect/selectorFactory.js ***! 6274 \****************************************************************/ 6275/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6276 6277"use strict"; 6278__webpack_require__.r(__webpack_exports__); 6279/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6280/* harmony export */ "default": () => (/* binding */ finalPropsSelectorFactory), 6281/* harmony export */ pureFinalPropsSelectorFactory: () => (/* binding */ pureFinalPropsSelectorFactory) 6282/* harmony export */ }); 6283/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js"); 6284/* harmony import */ var _verifySubselectors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./verifySubselectors */ "./node_modules/react-redux/es/connect/verifySubselectors.js"); 6285 6286const _excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"]; 6287 6288function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, { 6289 areStatesEqual, 6290 areOwnPropsEqual, 6291 areStatePropsEqual 6292}) { 6293 let hasRunAtLeastOnce = false; 6294 let state; 6295 let ownProps; 6296 let stateProps; 6297 let dispatchProps; 6298 let mergedProps; 6299 6300 function handleFirstCall(firstState, firstOwnProps) { 6301 state = firstState; 6302 ownProps = firstOwnProps; 6303 stateProps = mapStateToProps(state, ownProps); 6304 dispatchProps = mapDispatchToProps(dispatch, ownProps); 6305 mergedProps = mergeProps(stateProps, dispatchProps, ownProps); 6306 hasRunAtLeastOnce = true; 6307 return mergedProps; 6308 } 6309 6310 function handleNewPropsAndNewState() { 6311 stateProps = mapStateToProps(state, ownProps); 6312 if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); 6313 mergedProps = mergeProps(stateProps, dispatchProps, ownProps); 6314 return mergedProps; 6315 } 6316 6317 function handleNewProps() { 6318 if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps); 6319 if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps); 6320 mergedProps = mergeProps(stateProps, dispatchProps, ownProps); 6321 return mergedProps; 6322 } 6323 6324 function handleNewState() { 6325 const nextStateProps = mapStateToProps(state, ownProps); 6326 const statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps); 6327 stateProps = nextStateProps; 6328 if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps); 6329 return mergedProps; 6330 } 6331 6332 function handleSubsequentCalls(nextState, nextOwnProps) { 6333 const propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps); 6334 const stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps); 6335 state = nextState; 6336 ownProps = nextOwnProps; 6337 if (propsChanged && stateChanged) return handleNewPropsAndNewState(); 6338 if (propsChanged) return handleNewProps(); 6339 if (stateChanged) return handleNewState(); 6340 return mergedProps; 6341 } 6342 6343 return function pureFinalPropsSelector(nextState, nextOwnProps) { 6344 return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps); 6345 }; 6346} 6347// TODO: Add more comments 6348// The selector returned by selectorFactory will memoize its results, 6349// allowing connect's shouldComponentUpdate to return false if final 6350// props have not changed. 6351function finalPropsSelectorFactory(dispatch, _ref) { 6352 let { 6353 initMapStateToProps, 6354 initMapDispatchToProps, 6355 initMergeProps 6356 } = _ref, 6357 options = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(_ref, _excluded); 6358 6359 const mapStateToProps = initMapStateToProps(dispatch, options); 6360 const mapDispatchToProps = initMapDispatchToProps(dispatch, options); 6361 const mergeProps = initMergeProps(dispatch, options); 6362 6363 if (true) { 6364 (0,_verifySubselectors__WEBPACK_IMPORTED_MODULE_1__["default"])(mapStateToProps, mapDispatchToProps, mergeProps); 6365 } 6366 6367 return pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options); 6368} 6369 6370/***/ }), 6371
vendor: 1,456 bytes, lines 6372-6403
6372/***/ "./node_modules/react-redux/es/connect/verifySubselectors.js": 6373/*!*******************************************************************!*\ 6374 !*** ./node_modules/react-redux/es/connect/verifySubselectors.js ***! 6375 \*******************************************************************/ 6376/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6377 6378"use strict"; 6379__webpack_require__.r(__webpack_exports__); 6380/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6381/* harmony export */ "default": () => (/* binding */ verifySubselectors) 6382/* harmony export */ }); 6383/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/warning */ "./node_modules/react-redux/es/utils/warning.js"); 6384 6385 6386function verify(selector, methodName) { 6387 if (!selector) { 6388 throw new Error(`Unexpected value for ${methodName} in connect.`); 6389 } else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') { 6390 if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) { 6391 (0,_utils_warning__WEBPACK_IMPORTED_MODULE_0__["default"])(`The selector for ${methodName} of connect did not specify a value for dependsOnOwnProps.`); 6392 } 6393 } 6394} 6395 6396function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps) { 6397 verify(mapStateToProps, 'mapStateToProps'); 6398 verify(mapDispatchToProps, 'mapDispatchToProps'); 6399 verify(mergeProps, 'mergeProps'); 6400} 6401 6402/***/ }), 6403
vendor: 3,970 bytes, lines 6404-6490
6404/***/ "./node_modules/react-redux/es/connect/wrapMapToProps.js": 6405/*!***************************************************************!*\ 6406 !*** ./node_modules/react-redux/es/connect/wrapMapToProps.js ***! 6407 \***************************************************************/ 6408/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6409 6410"use strict"; 6411__webpack_require__.r(__webpack_exports__); 6412/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6413/* harmony export */ getDependsOnOwnProps: () => (/* binding */ getDependsOnOwnProps), 6414/* harmony export */ wrapMapToPropsConstant: () => (/* binding */ wrapMapToPropsConstant), 6415/* harmony export */ wrapMapToPropsFunc: () => (/* binding */ wrapMapToPropsFunc) 6416/* harmony export */ }); 6417/* harmony import */ var _utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/verifyPlainObject */ "./node_modules/react-redux/es/utils/verifyPlainObject.js"); 6418 6419function wrapMapToPropsConstant( // * Note: 6420// It seems that the dispatch argument 6421// could be a dispatch function in some cases (ex: whenMapDispatchToPropsIsMissing) 6422// and a state object in some others (ex: whenMapStateToPropsIsMissing) 6423// eslint-disable-next-line no-unused-vars 6424getConstant) { 6425 return function initConstantSelector(dispatch) { 6426 const constant = getConstant(dispatch); 6427 6428 function constantSelector() { 6429 return constant; 6430 } 6431 6432 constantSelector.dependsOnOwnProps = false; 6433 return constantSelector; 6434 }; 6435} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args 6436// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine 6437// whether mapToProps needs to be invoked when props have changed. 6438// 6439// A length of one signals that mapToProps does not depend on props from the parent component. 6440// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and 6441// therefore not reporting its length accurately.. 6442// TODO Can this get pulled out so that we can subscribe directly to the store if we don't need ownProps? 6443 6444function getDependsOnOwnProps(mapToProps) { 6445 return mapToProps.dependsOnOwnProps ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1; 6446} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction, 6447// this function wraps mapToProps in a proxy function which does several things: 6448// 6449// * Detects whether the mapToProps function being called depends on props, which 6450// is used by selectorFactory to decide if it should reinvoke on props changes. 6451// 6452// * On first call, handles mapToProps if returns another function, and treats that 6453// new function as the true mapToProps for subsequent calls. 6454// 6455// * On first call, verifies the first result is a plain object, in order to warn 6456// the developer that their mapToProps function is not returning a valid result. 6457// 6458 6459function wrapMapToPropsFunc(mapToProps, methodName) { 6460 return function initProxySelector(dispatch, { 6461 displayName 6462 }) { 6463 const proxy = function mapToPropsProxy(stateOrDispatch, ownProps) { 6464 return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch, undefined); 6465 }; // allow detectFactoryAndVerify to get ownProps 6466 6467 6468 proxy.dependsOnOwnProps = true; 6469 6470 proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) { 6471 proxy.mapToProps = mapToProps; 6472 proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps); 6473 let props = proxy(stateOrDispatch, ownProps); 6474 6475 if (typeof props === 'function') { 6476 proxy.mapToProps = props; 6477 proxy.dependsOnOwnProps = getDependsOnOwnProps(props); 6478 props = proxy(stateOrDispatch, ownProps); 6479 } 6480 6481 if (true) (0,_utils_verifyPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(props, displayName, methodName); 6482 return props; 6483 }; 6484 6485 return proxy; 6486 }; 6487} 6488 6489/***/ }), 6490
vendor: 3,129 bytes, lines 6491-6530
6491/***/ "./node_modules/react-redux/es/exports.js": 6492/*!************************************************!*\ 6493 !*** ./node_modules/react-redux/es/exports.js ***! 6494 \************************************************/ 6495/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6496 6497"use strict"; 6498__webpack_require__.r(__webpack_exports__); 6499/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6500/* harmony export */ Provider: () => (/* reexport safe */ _components_Provider__WEBPACK_IMPORTED_MODULE_0__["default"]), 6501/* harmony export */ ReactReduxContext: () => (/* reexport safe */ _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext), 6502/* harmony export */ connect: () => (/* reexport safe */ _components_connect__WEBPACK_IMPORTED_MODULE_1__["default"]), 6503/* harmony export */ createDispatchHook: () => (/* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__.createDispatchHook), 6504/* harmony export */ createSelectorHook: () => (/* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.createSelectorHook), 6505/* harmony export */ createStoreHook: () => (/* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__.createStoreHook), 6506/* harmony export */ shallowEqual: () => (/* reexport safe */ _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_6__["default"]), 6507/* harmony export */ useDispatch: () => (/* reexport safe */ _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__.useDispatch), 6508/* harmony export */ useSelector: () => (/* reexport safe */ _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.useSelector), 6509/* harmony export */ useStore: () => (/* reexport safe */ _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__.useStore) 6510/* harmony export */ }); 6511/* harmony import */ var _components_Provider__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/Provider */ "./node_modules/react-redux/es/components/Provider.js"); 6512/* harmony import */ var _components_connect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/connect */ "./node_modules/react-redux/es/components/connect.js"); 6513/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/Context */ "./node_modules/react-redux/es/components/Context.js"); 6514/* harmony import */ var _hooks_useDispatch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useDispatch */ "./node_modules/react-redux/es/hooks/useDispatch.js"); 6515/* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useSelector */ "./node_modules/react-redux/es/hooks/useSelector.js"); 6516/* harmony import */ var _hooks_useStore__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./hooks/useStore */ "./node_modules/react-redux/es/hooks/useStore.js"); 6517/* harmony import */ var _utils_shallowEqual__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/shallowEqual */ "./node_modules/react-redux/es/utils/shallowEqual.js"); 6518/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./types */ "./node_modules/react-redux/es/types.js"); 6519 6520 6521 6522 6523 6524 6525 6526 6527 6528 6529/***/ }), 6530
vendor: 2,347 bytes, lines 6531-6588
6531/***/ "./node_modules/react-redux/es/hooks/useDispatch.js": 6532/*!**********************************************************!*\ 6533 !*** ./node_modules/react-redux/es/hooks/useDispatch.js ***! 6534 \**********************************************************/ 6535/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6536 6537"use strict"; 6538__webpack_require__.r(__webpack_exports__); 6539/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6540/* harmony export */ createDispatchHook: () => (/* binding */ createDispatchHook), 6541/* harmony export */ useDispatch: () => (/* binding */ useDispatch) 6542/* harmony export */ }); 6543/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); 6544/* harmony import */ var _useStore__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useStore */ "./node_modules/react-redux/es/hooks/useStore.js"); 6545 6546 6547/** 6548 * Hook factory, which creates a `useDispatch` hook bound to a given context. 6549 * 6550 * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. 6551 * @returns {Function} A `useDispatch` hook bound to the specified context. 6552 */ 6553 6554function createDispatchHook(context = _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext) { 6555 const useStore = // @ts-ignore 6556 context === _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext ? _useStore__WEBPACK_IMPORTED_MODULE_1__.useStore : (0,_useStore__WEBPACK_IMPORTED_MODULE_1__.createStoreHook)(context); 6557 return function useDispatch() { 6558 const store = useStore(); // @ts-ignore 6559 6560 return store.dispatch; 6561 }; 6562} 6563/** 6564 * A hook to access the redux `dispatch` function. 6565 * 6566 * @returns {any|function} redux store's `dispatch` function 6567 * 6568 * @example 6569 * 6570 * import React, { useCallback } from 'react' 6571 * import { useDispatch } from 'react-redux' 6572 * 6573 * export const CounterComponent = ({ value }) => { 6574 * const dispatch = useDispatch() 6575 * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), []) 6576 * return ( 6577 * <div> 6578 * <span>{value}</span> 6579 * <button onClick={increaseCounter}>Increase counter</button> 6580 * </div> 6581 * ) 6582 * } 6583 */ 6584 6585const useDispatch = /*#__PURE__*/createDispatchHook(); 6586 6587/***/ }), 6588
vendor: 2,404 bytes, lines 6589-6645
6589/***/ "./node_modules/react-redux/es/hooks/useReduxContext.js": 6590/*!**************************************************************!*\ 6591 !*** ./node_modules/react-redux/es/hooks/useReduxContext.js ***! 6592 \**************************************************************/ 6593/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6594 6595"use strict"; 6596__webpack_require__.r(__webpack_exports__); 6597/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6598/* harmony export */ createReduxContextHook: () => (/* binding */ createReduxContextHook), 6599/* harmony export */ useReduxContext: () => (/* binding */ useReduxContext) 6600/* harmony export */ }); 6601/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 6602/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 6603/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); 6604 6605 6606 6607/** 6608 * Hook factory, which creates a `useReduxContext` hook bound to a given context. This is a low-level 6609 * hook that you should usually not need to call directly. 6610 * 6611 * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. 6612 * @returns {Function} A `useReduxContext` hook bound to the specified context. 6613 */ 6614function createReduxContextHook(context = _components_Context__WEBPACK_IMPORTED_MODULE_1__.ReactReduxContext) { 6615 return function useReduxContext() { 6616 const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context); 6617 6618 if ( true && !contextValue) { 6619 throw new Error('could not find react-redux context value; please ensure the component is wrapped in a <Provider>'); 6620 } 6621 6622 return contextValue; 6623 }; 6624} 6625/** 6626 * A hook to access the value of the `ReactReduxContext`. This is a low-level 6627 * hook that you should usually not need to call directly. 6628 * 6629 * @returns {any} the value of the `ReactReduxContext` 6630 * 6631 * @example 6632 * 6633 * import React from 'react' 6634 * import { useReduxContext } from 'react-redux' 6635 * 6636 * export const CounterComponent = () => { 6637 * const { store } = useReduxContext() 6638 * return <div>{store.getState()}</div> 6639 * } 6640 */ 6641 6642const useReduxContext = /*#__PURE__*/createReduxContextHook(); 6643 6644/***/ }), 6645
vendor: 6,760 bytes, lines 6646-6807
6646/***/ "./node_modules/react-redux/es/hooks/useSelector.js": 6647/*!**********************************************************!*\ 6648 !*** ./node_modules/react-redux/es/hooks/useSelector.js ***! 6649 \**********************************************************/ 6650/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6651 6652"use strict"; 6653__webpack_require__.r(__webpack_exports__); 6654/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6655/* harmony export */ createSelectorHook: () => (/* binding */ createSelectorHook), 6656/* harmony export */ initializeUseSelector: () => (/* binding */ initializeUseSelector), 6657/* harmony export */ useSelector: () => (/* binding */ useSelector) 6658/* harmony export */ }); 6659/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 6660/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 6661/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useReduxContext */ "./node_modules/react-redux/es/hooks/useReduxContext.js"); 6662/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); 6663/* harmony import */ var _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/useSyncExternalStore */ "./node_modules/react-redux/es/utils/useSyncExternalStore.js"); 6664 6665 6666 6667 6668let useSyncExternalStoreWithSelector = _utils_useSyncExternalStore__WEBPACK_IMPORTED_MODULE_3__.notInitialized; 6669const initializeUseSelector = fn => { 6670 useSyncExternalStoreWithSelector = fn; 6671}; 6672 6673const refEquality = (a, b) => a === b; 6674/** 6675 * Hook factory, which creates a `useSelector` hook bound to a given context. 6676 * 6677 * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. 6678 * @returns {Function} A `useSelector` hook bound to the specified context. 6679 */ 6680 6681 6682function createSelectorHook(context = _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext) { 6683 const useReduxContext = context === _components_Context__WEBPACK_IMPORTED_MODULE_2__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_1__.useReduxContext : (0,_useReduxContext__WEBPACK_IMPORTED_MODULE_1__.createReduxContextHook)(context); 6684 return function useSelector(selector, equalityFnOrOptions = {}) { 6685 const { 6686 equalityFn = refEquality, 6687 stabilityCheck = undefined, 6688 noopCheck = undefined 6689 } = typeof equalityFnOrOptions === 'function' ? { 6690 equalityFn: equalityFnOrOptions 6691 } : equalityFnOrOptions; 6692 6693 if (true) { 6694 if (!selector) { 6695 throw new Error(`You must pass a selector to useSelector`); 6696 } 6697 6698 if (typeof selector !== 'function') { 6699 throw new Error(`You must pass a function as a selector to useSelector`); 6700 } 6701 6702 if (typeof equalityFn !== 'function') { 6703 throw new Error(`You must pass a function as an equality function to useSelector`); 6704 } 6705 } 6706 6707 const { 6708 store, 6709 subscription, 6710 getServerState, 6711 stabilityCheck: globalStabilityCheck, 6712 noopCheck: globalNoopCheck 6713 } = useReduxContext(); 6714 const firstRun = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true); 6715 const wrappedSelector = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)({ 6716 [selector.name](state) { 6717 const selected = selector(state); 6718 6719 if (true) { 6720 const finalStabilityCheck = typeof stabilityCheck === 'undefined' ? globalStabilityCheck : stabilityCheck; 6721 6722 if (finalStabilityCheck === 'always' || finalStabilityCheck === 'once' && firstRun.current) { 6723 const toCompare = selector(state); 6724 6725 if (!equalityFn(selected, toCompare)) { 6726 let stack = undefined; 6727 6728 try { 6729 throw new Error(); 6730 } catch (e) { 6731 ; 6732 ({ 6733 stack 6734 } = e); 6735 } 6736 6737 console.warn('Selector ' + (selector.name || 'unknown') + ' returned a different result when called with the same parameters. This can lead to unnecessary rerenders.' + '\nSelectors that return a new reference (such as an object or an array) should be memoized: https://redux.js.org/usage/deriving-data-selectors#optimizing-selectors-with-memoization', { 6738 state, 6739 selected, 6740 selected2: toCompare, 6741 stack 6742 }); 6743 } 6744 } 6745 6746 const finalNoopCheck = typeof noopCheck === 'undefined' ? globalNoopCheck : noopCheck; 6747 6748 if (finalNoopCheck === 'always' || finalNoopCheck === 'once' && firstRun.current) { 6749 // @ts-ignore 6750 if (selected === state) { 6751 let stack = undefined; 6752 6753 try { 6754 throw new Error(); 6755 } catch (e) { 6756 ; 6757 ({ 6758 stack 6759 } = e); 6760 } 6761 6762 console.warn('Selector ' + (selector.name || 'unknown') + ' returned the root state when called. This can lead to unnecessary rerenders.' + '\nSelectors that return the entire state are almost certainly a mistake, as they will cause a rerender whenever *anything* in state changes.', { 6763 stack 6764 }); 6765 } 6766 } 6767 6768 if (firstRun.current) firstRun.current = false; 6769 } 6770 6771 return selected; 6772 } 6773 6774 }[selector.name], [selector, globalStabilityCheck, stabilityCheck]); 6775 const selectedState = useSyncExternalStoreWithSelector(subscription.addNestedSub, store.getState, getServerState || store.getState, wrappedSelector, equalityFn); 6776 (0,react__WEBPACK_IMPORTED_MODULE_0__.useDebugValue)(selectedState); 6777 return selectedState; 6778 }; 6779} 6780/** 6781 * A hook to access the redux store's state. This hook takes a selector function 6782 * as an argument. The selector is called with the store state. 6783 * 6784 * This hook takes an optional equality comparison function as the second parameter 6785 * that allows you to customize the way the selected state is compared to determine 6786 * whether the component needs to be re-rendered. 6787 * 6788 * @param {Function} selector the selector function 6789 * @param {Function=} equalityFn the function that will be used to determine equality 6790 * 6791 * @returns {any} the selected state 6792 * 6793 * @example 6794 * 6795 * import React from 'react' 6796 * import { useSelector } from 'react-redux' 6797 * 6798 * export const CounterComponent = () => { 6799 * const counter = useSelector(state => state.counter) 6800 * return <div>{counter}</div> 6801 * } 6802 */ 6803 6804const useSelector = /*#__PURE__*/createSelectorHook(); 6805 6806/***/ }), 6807
vendor: 2,111 bytes, lines 6808-6862
6808/***/ "./node_modules/react-redux/es/hooks/useStore.js": 6809/*!*******************************************************!*\ 6810 !*** ./node_modules/react-redux/es/hooks/useStore.js ***! 6811 \*******************************************************/ 6812/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6813 6814"use strict"; 6815__webpack_require__.r(__webpack_exports__); 6816/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6817/* harmony export */ createStoreHook: () => (/* binding */ createStoreHook), 6818/* harmony export */ useStore: () => (/* binding */ useStore) 6819/* harmony export */ }); 6820/* harmony import */ var _components_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/Context */ "./node_modules/react-redux/es/components/Context.js"); 6821/* harmony import */ var _useReduxContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./useReduxContext */ "./node_modules/react-redux/es/hooks/useReduxContext.js"); 6822 6823 6824/** 6825 * Hook factory, which creates a `useStore` hook bound to a given context. 6826 * 6827 * @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`. 6828 * @returns {Function} A `useStore` hook bound to the specified context. 6829 */ 6830 6831function createStoreHook(context = _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext) { 6832 const useReduxContext = // @ts-ignore 6833 context === _components_Context__WEBPACK_IMPORTED_MODULE_0__.ReactReduxContext ? _useReduxContext__WEBPACK_IMPORTED_MODULE_1__.useReduxContext : // @ts-ignore 6834 (0,_useReduxContext__WEBPACK_IMPORTED_MODULE_1__.createReduxContextHook)(context); 6835 return function useStore() { 6836 const { 6837 store 6838 } = useReduxContext(); // @ts-ignore 6839 6840 return store; 6841 }; 6842} 6843/** 6844 * A hook to access the redux store. 6845 * 6846 * @returns {any} the redux store 6847 * 6848 * @example 6849 * 6850 * import React from 'react' 6851 * import { useStore } from 'react-redux' 6852 * 6853 * export const ExampleComponent = () => { 6854 * const store = useStore() 6855 * return <div>{store.getState()}</div> 6856 * } 6857 */ 6858 6859const useStore = /*#__PURE__*/createStoreHook(); 6860 6861/***/ }), 6862
vendor: 3,881 bytes, lines 6863-6909
6863/***/ "./node_modules/react-redux/es/index.js": 6864/*!**********************************************!*\ 6865 !*** ./node_modules/react-redux/es/index.js ***! 6866 \**********************************************/ 6867/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6868 6869"use strict"; 6870__webpack_require__.r(__webpack_exports__); 6871/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6872/* harmony export */ Provider: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.Provider), 6873/* harmony export */ ReactReduxContext: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.ReactReduxContext), 6874/* harmony export */ batch: () => (/* reexport safe */ _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__.unstable_batchedUpdates), 6875/* harmony export */ connect: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.connect), 6876/* harmony export */ createDispatchHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createDispatchHook), 6877/* harmony export */ createSelectorHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createSelectorHook), 6878/* harmony export */ createStoreHook: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.createStoreHook), 6879/* harmony export */ shallowEqual: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.shallowEqual), 6880/* harmony export */ useDispatch: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useDispatch), 6881/* harmony export */ useSelector: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useSelector), 6882/* harmony export */ useStore: () => (/* reexport safe */ _exports__WEBPACK_IMPORTED_MODULE_6__.useStore) 6883/* harmony export */ }); 6884/* harmony import */ var use_sync_external_store_shim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sync-external-store/shim */ "./node_modules/use-sync-external-store/shim/index.js"); 6885/* harmony import */ var use_sync_external_store_shim_with_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-sync-external-store/shim/with-selector */ "./node_modules/use-sync-external-store/shim/with-selector.js"); 6886/* harmony import */ var _utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/reactBatchedUpdates */ "./node_modules/react-redux/es/utils/reactBatchedUpdates.js"); 6887/* harmony import */ var _utils_batch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/batch */ "./node_modules/react-redux/es/utils/batch.js"); 6888/* harmony import */ var _hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./hooks/useSelector */ "./node_modules/react-redux/es/hooks/useSelector.js"); 6889/* harmony import */ var _components_connect__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/connect */ "./node_modules/react-redux/es/components/connect.js"); 6890/* harmony import */ var _exports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./exports */ "./node_modules/react-redux/es/exports.js"); 6891// The primary entry point assumes we're working with standard ReactDOM/RN, but 6892// older versions that do not include `useSyncExternalStore` (React 16.9 - 17.x). 6893// Because of that, the useSyncExternalStore compat shim is needed. 6894 6895 6896 6897 6898 6899 6900(0,_hooks_useSelector__WEBPACK_IMPORTED_MODULE_4__.initializeUseSelector)(use_sync_external_store_shim_with_selector__WEBPACK_IMPORTED_MODULE_1__.useSyncExternalStoreWithSelector); 6901(0,_components_connect__WEBPACK_IMPORTED_MODULE_5__.initializeConnect)(use_sync_external_store_shim__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore); // Enable batched updates in our subscriptions for use 6902// with standard React renderers (ReactDOM, React Native) 6903 6904(0,_utils_batch__WEBPACK_IMPORTED_MODULE_3__.setBatch)(_utils_reactBatchedUpdates__WEBPACK_IMPORTED_MODULE_2__.unstable_batchedUpdates); 6905 6906 6907 6908/***/ }), 6909
vendor: 355 bytes, lines 6910-6921
6910/***/ "./node_modules/react-redux/es/types.js": 6911/*!**********************************************!*\ 6912 !*** ./node_modules/react-redux/es/types.js ***! 6913 \**********************************************/ 6914/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6915 6916"use strict"; 6917__webpack_require__.r(__webpack_exports__); 6918 6919 6920/***/ }), 6921
vendor: 4,101 bytes, lines 6922-7094
6922/***/ "./node_modules/react-redux/es/utils/Subscription.js": 6923/*!***********************************************************!*\ 6924 !*** ./node_modules/react-redux/es/utils/Subscription.js ***! 6925 \***********************************************************/ 6926/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 6927 6928"use strict"; 6929__webpack_require__.r(__webpack_exports__); 6930/* harmony export */ __webpack_require__.d(__webpack_exports__, { 6931/* harmony export */ createSubscription: () => (/* binding */ createSubscription) 6932/* harmony export */ }); 6933/* harmony import */ var _batch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./batch */ "./node_modules/react-redux/es/utils/batch.js"); 6934 // encapsulates the subscription logic for connecting a component to the redux store, as 6935// well as nesting subscriptions of descendant components, so that we can ensure the 6936// ancestor components re-render before descendants 6937 6938function createListenerCollection() { 6939 const batch = (0,_batch__WEBPACK_IMPORTED_MODULE_0__.getBatch)(); 6940 let first = null; 6941 let last = null; 6942 return { 6943 clear() { 6944 first = null; 6945 last = null; 6946 }, 6947 6948 notify() { 6949 batch(() => { 6950 let listener = first; 6951 6952 while (listener) { 6953 listener.callback(); 6954 listener = listener.next; 6955 } 6956 }); 6957 }, 6958 6959 get() { 6960 let listeners = []; 6961 let listener = first; 6962 6963 while (listener) { 6964 listeners.push(listener); 6965 listener = listener.next; 6966 } 6967 6968 return listeners; 6969 }, 6970 6971 subscribe(callback) { 6972 let isSubscribed = true; 6973 let listener = last = { 6974 callback, 6975 next: null, 6976 prev: last 6977 }; 6978 6979 if (listener.prev) { 6980 listener.prev.next = listener; 6981 } else { 6982 first = listener; 6983 } 6984 6985 return function unsubscribe() { 6986 if (!isSubscribed || first === null) return; 6987 isSubscribed = false; 6988 6989 if (listener.next) { 6990 listener.next.prev = listener.prev; 6991 } else { 6992 last = listener.prev; 6993 } 6994 6995 if (listener.prev) { 6996 listener.prev.next = listener.next; 6997 } else { 6998 first = listener.next; 6999 } 7000 }; 7001 } 7002 7003 }; 7004} 7005 7006const nullListeners = { 7007 notify() {}, 7008 7009 get: () => [] 7010}; 7011function createSubscription(store, parentSub) { 7012 let unsubscribe; 7013 let listeners = nullListeners; // Reasons to keep the subscription active 7014 7015 let subscriptionsAmount = 0; // Is this specific subscription subscribed (or only nested ones?) 7016 7017 let selfSubscribed = false; 7018 7019 function addNestedSub(listener) { 7020 trySubscribe(); 7021 const cleanupListener = listeners.subscribe(listener); // cleanup nested sub 7022 7023 let removed = false; 7024 return () => { 7025 if (!removed) { 7026 removed = true; 7027 cleanupListener(); 7028 tryUnsubscribe(); 7029 } 7030 }; 7031 } 7032 7033 function notifyNestedSubs() { 7034 listeners.notify(); 7035 } 7036 7037 function handleChangeWrapper() { 7038 if (subscription.onStateChange) { 7039 subscription.onStateChange(); 7040 } 7041 } 7042 7043 function isSubscribed() { 7044 return selfSubscribed; 7045 } 7046 7047 function trySubscribe() { 7048 subscriptionsAmount++; 7049 7050 if (!unsubscribe) { 7051 unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper); 7052 listeners = createListenerCollection(); 7053 } 7054 } 7055 7056 function tryUnsubscribe() { 7057 subscriptionsAmount--; 7058 7059 if (unsubscribe && subscriptionsAmount === 0) { 7060 unsubscribe(); 7061 unsubscribe = undefined; 7062 listeners.clear(); 7063 listeners = nullListeners; 7064 } 7065 } 7066 7067 function trySubscribeSelf() { 7068 if (!selfSubscribed) { 7069 selfSubscribed = true; 7070 trySubscribe(); 7071 } 7072 } 7073 7074 function tryUnsubscribeSelf() { 7075 if (selfSubscribed) { 7076 selfSubscribed = false; 7077 tryUnsubscribe(); 7078 } 7079 } 7080 7081 const subscription = { 7082 addNestedSub, 7083 notifyNestedSubs, 7084 handleChangeWrapper, 7085 isSubscribed, 7086 trySubscribe: trySubscribeSelf, 7087 tryUnsubscribe: tryUnsubscribeSelf, 7088 getListeners: () => listeners 7089 }; 7090 return subscription; 7091} 7092 7093/***/ }), 7094
vendor: 944 bytes, lines 7095-7119
7095/***/ "./node_modules/react-redux/es/utils/batch.js": 7096/*!****************************************************!*\ 7097 !*** ./node_modules/react-redux/es/utils/batch.js ***! 7098 \****************************************************/ 7099/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7100 7101"use strict"; 7102__webpack_require__.r(__webpack_exports__); 7103/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7104/* harmony export */ getBatch: () => (/* binding */ getBatch), 7105/* harmony export */ setBatch: () => (/* binding */ setBatch) 7106/* harmony export */ }); 7107// Default to a dummy "batch" implementation that just runs the callback 7108function defaultNoopBatch(callback) { 7109 callback(); 7110} 7111 7112let batch = defaultNoopBatch; // Allow injecting another batching function later 7113 7114const setBatch = newBatch => batch = newBatch; // Supply a getter just to skip dealing with ESM bindings 7115 7116const getBatch = () => batch; 7117 7118/***/ }), 7119
vendor: 943 bytes, lines 7120-7146
7120/***/ "./node_modules/react-redux/es/utils/bindActionCreators.js": 7121/*!*****************************************************************!*\ 7122 !*** ./node_modules/react-redux/es/utils/bindActionCreators.js ***! 7123 \*****************************************************************/ 7124/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7125 7126"use strict"; 7127__webpack_require__.r(__webpack_exports__); 7128/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7129/* harmony export */ "default": () => (/* binding */ bindActionCreators) 7130/* harmony export */ }); 7131function bindActionCreators(actionCreators, dispatch) { 7132 const boundActionCreators = {}; 7133 7134 for (const key in actionCreators) { 7135 const actionCreator = actionCreators[key]; 7136 7137 if (typeof actionCreator === 'function') { 7138 boundActionCreators[key] = (...args) => dispatch(actionCreator(...args)); 7139 } 7140 } 7141 7142 return boundActionCreators; 7143} 7144 7145/***/ }), 7146
vendor: 1,033 bytes, lines 7147-7176
7147/***/ "./node_modules/react-redux/es/utils/isPlainObject.js": 7148/*!************************************************************!*\ 7149 !*** ./node_modules/react-redux/es/utils/isPlainObject.js ***! 7150 \************************************************************/ 7151/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7152 7153"use strict"; 7154__webpack_require__.r(__webpack_exports__); 7155/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7156/* harmony export */ "default": () => (/* binding */ isPlainObject) 7157/* harmony export */ }); 7158/** 7159 * @param {any} obj The object to inspect. 7160 * @returns {boolean} True if the argument appears to be a plain object. 7161 */ 7162function isPlainObject(obj) { 7163 if (typeof obj !== 'object' || obj === null) return false; 7164 let proto = Object.getPrototypeOf(obj); 7165 if (proto === null) return true; 7166 let baseProto = proto; 7167 7168 while (Object.getPrototypeOf(baseProto) !== null) { 7169 baseProto = Object.getPrototypeOf(baseProto); 7170 } 7171 7172 return proto === baseProto; 7173} 7174 7175/***/ }), 7176
vendor: 932 bytes, lines 7177-7193
7177/***/ "./node_modules/react-redux/es/utils/reactBatchedUpdates.js": 7178/*!******************************************************************!*\ 7179 !*** ./node_modules/react-redux/es/utils/reactBatchedUpdates.js ***! 7180 \******************************************************************/ 7181/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7182 7183"use strict"; 7184__webpack_require__.r(__webpack_exports__); 7185/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7186/* harmony export */ unstable_batchedUpdates: () => (/* reexport safe */ react_dom__WEBPACK_IMPORTED_MODULE_0__.unstable_batchedUpdates) 7187/* harmony export */ }); 7188/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "react-dom"); 7189/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__); 7190 7191 7192/***/ }), 7193
vendor: 1,210 bytes, lines 7194-7234
7194/***/ "./node_modules/react-redux/es/utils/shallowEqual.js": 7195/*!***********************************************************!*\ 7196 !*** ./node_modules/react-redux/es/utils/shallowEqual.js ***! 7197 \***********************************************************/ 7198/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7199 7200"use strict"; 7201__webpack_require__.r(__webpack_exports__); 7202/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7203/* harmony export */ "default": () => (/* binding */ shallowEqual) 7204/* harmony export */ }); 7205function is(x, y) { 7206 if (x === y) { 7207 return x !== 0 || y !== 0 || 1 / x === 1 / y; 7208 } else { 7209 return x !== x && y !== y; 7210 } 7211} 7212 7213function shallowEqual(objA, objB) { 7214 if (is(objA, objB)) return true; 7215 7216 if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) { 7217 return false; 7218 } 7219 7220 const keysA = Object.keys(objA); 7221 const keysB = Object.keys(objB); 7222 if (keysA.length !== keysB.length) return false; 7223 7224 for (let i = 0; i < keysA.length; i++) { 7225 if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) { 7226 return false; 7227 } 7228 } 7229 7230 return true; 7231} 7232 7233/***/ }), 7234
vendor: 1,939 bytes, lines 7235-7263
7235/***/ "./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js": 7236/*!************************************************************************!*\ 7237 !*** ./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js ***! 7238 \************************************************************************/ 7239/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7240 7241"use strict"; 7242__webpack_require__.r(__webpack_exports__); 7243/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7244/* harmony export */ canUseDOM: () => (/* binding */ canUseDOM), 7245/* harmony export */ useIsomorphicLayoutEffect: () => (/* binding */ useIsomorphicLayoutEffect) 7246/* harmony export */ }); 7247/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 7248/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 7249 // React currently throws a warning when using useLayoutEffect on the server. 7250// To get around it, we can conditionally useEffect on the server (no-op) and 7251// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store 7252// subscription callback always has the selector from the latest render commit 7253// available, otherwise a store update may happen between render and the effect, 7254// which may cause missed updates; we also must ensure the store subscription 7255// is created synchronously, otherwise a store update may occur before the 7256// subscription is created and an inconsistent state may be observed 7257// Matches logic in React's `shared/ExecutionEnvironment` file 7258 7259const canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); 7260const useIsomorphicLayoutEffect = canUseDOM ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect; 7261 7262/***/ }), 7263
vendor: 683 bytes, lines 7264-7280
7264/***/ "./node_modules/react-redux/es/utils/useSyncExternalStore.js": 7265/*!*******************************************************************!*\ 7266 !*** ./node_modules/react-redux/es/utils/useSyncExternalStore.js ***! 7267 \*******************************************************************/ 7268/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7269 7270"use strict"; 7271__webpack_require__.r(__webpack_exports__); 7272/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7273/* harmony export */ notInitialized: () => (/* binding */ notInitialized) 7274/* harmony export */ }); 7275const notInitialized = () => { 7276 throw new Error('uSES not initialized!'); 7277}; 7278 7279/***/ }), 7280
vendor: 1,210 bytes, lines 7281-7303
7281/***/ "./node_modules/react-redux/es/utils/verifyPlainObject.js": 7282/*!****************************************************************!*\ 7283 !*** ./node_modules/react-redux/es/utils/verifyPlainObject.js ***! 7284 \****************************************************************/ 7285/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7286 7287"use strict"; 7288__webpack_require__.r(__webpack_exports__); 7289/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7290/* harmony export */ "default": () => (/* binding */ verifyPlainObject) 7291/* harmony export */ }); 7292/* harmony import */ var _isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./isPlainObject */ "./node_modules/react-redux/es/utils/isPlainObject.js"); 7293/* harmony import */ var _warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./warning */ "./node_modules/react-redux/es/utils/warning.js"); 7294 7295 7296function verifyPlainObject(value, displayName, methodName) { 7297 if (!(0,_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(value)) { 7298 (0,_warning__WEBPACK_IMPORTED_MODULE_1__["default"])(`${methodName}() in ${displayName} must return a plain object. Instead received ${value}.`); 7299 } 7300} 7301 7302/***/ }), 7303
vendor: 1,172 bytes, lines 7304-7341
7304/***/ "./node_modules/react-redux/es/utils/warning.js": 7305/*!******************************************************!*\ 7306 !*** ./node_modules/react-redux/es/utils/warning.js ***! 7307 \******************************************************/ 7308/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7309 7310"use strict"; 7311__webpack_require__.r(__webpack_exports__); 7312/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7313/* harmony export */ "default": () => (/* binding */ warning) 7314/* harmony export */ }); 7315/** 7316 * Prints a warning in the console if it exists. 7317 * 7318 * @param {String} message The warning message. 7319 * @returns {void} 7320 */ 7321function warning(message) { 7322 /* eslint-disable no-console */ 7323 if (typeof console !== 'undefined' && typeof console.error === 'function') { 7324 console.error(message); 7325 } 7326 /* eslint-enable no-console */ 7327 7328 7329 try { 7330 // This error was thrown as a convenience so that if you enable 7331 // "break on all exceptions" in your console, 7332 // it would pause the execution at this line. 7333 throw new Error(message); 7334 /* eslint-disable no-empty */ 7335 } catch (e) {} 7336 /* eslint-enable no-empty */ 7337 7338} 7339 7340/***/ }), 7341
vendor: 7,743 bytes, lines 7342-7573
7342/***/ "./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js": 7343/*!************************************************************************************!*\ 7344 !*** ./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js ***! 7345 \************************************************************************************/ 7346/***/ ((__unused_webpack_module, exports) => { 7347 7348"use strict"; 7349/** 7350 * @license React 7351 * react-is.development.js 7352 * 7353 * Copyright (c) Facebook, Inc. and its affiliates. 7354 * 7355 * This source code is licensed under the MIT license found in the 7356 * LICENSE file in the root directory of this source tree. 7357 */ 7358 7359 7360 7361if (true) { 7362 (function() { 7363'use strict'; 7364 7365// ATTENTION 7366// When adding new symbols to this file, 7367// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' 7368// The Symbol used to tag the ReactElement-like types. 7369var REACT_ELEMENT_TYPE = Symbol.for('react.element'); 7370var REACT_PORTAL_TYPE = Symbol.for('react.portal'); 7371var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); 7372var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); 7373var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); 7374var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); 7375var REACT_CONTEXT_TYPE = Symbol.for('react.context'); 7376var REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context'); 7377var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); 7378var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); 7379var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); 7380var REACT_MEMO_TYPE = Symbol.for('react.memo'); 7381var REACT_LAZY_TYPE = Symbol.for('react.lazy'); 7382var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); 7383 7384// ----------------------------------------------------------------------------- 7385 7386var enableScopeAPI = false; // Experimental Create Event Handle API. 7387var enableCacheElement = false; 7388var enableTransitionTracing = false; // No known bugs, but needs performance testing 7389 7390var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber 7391// stuff. Intended to enable React core members to more easily debug scheduling 7392// issues in DEV builds. 7393 7394var enableDebugTracing = false; // Track which Fiber(s) schedule render work. 7395 7396var REACT_MODULE_REFERENCE; 7397 7398{ 7399 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); 7400} 7401 7402function isValidElementType(type) { 7403 if (typeof type === 'string' || typeof type === 'function') { 7404 return true; 7405 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). 7406 7407 7408 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) { 7409 return true; 7410 } 7411 7412 if (typeof type === 'object' && type !== null) { 7413 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object 7414 // types supported by any Flight configuration anywhere since 7415 // we don't know which Flight build this will end up being used 7416 // with. 7417 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { 7418 return true; 7419 } 7420 } 7421 7422 return false; 7423} 7424 7425function typeOf(object) { 7426 if (typeof object === 'object' && object !== null) { 7427 var $$typeof = object.$$typeof; 7428 7429 switch ($$typeof) { 7430 case REACT_ELEMENT_TYPE: 7431 var type = object.type; 7432 7433 switch (type) { 7434 case REACT_FRAGMENT_TYPE: 7435 case REACT_PROFILER_TYPE: 7436 case REACT_STRICT_MODE_TYPE: 7437 case REACT_SUSPENSE_TYPE: 7438 case REACT_SUSPENSE_LIST_TYPE: 7439 return type; 7440 7441 default: 7442 var $$typeofType = type && type.$$typeof; 7443 7444 switch ($$typeofType) { 7445 case REACT_SERVER_CONTEXT_TYPE: 7446 case REACT_CONTEXT_TYPE: 7447 case REACT_FORWARD_REF_TYPE: 7448 case REACT_LAZY_TYPE: 7449 case REACT_MEMO_TYPE: 7450 case REACT_PROVIDER_TYPE: 7451 return $$typeofType; 7452 7453 default: 7454 return $$typeof; 7455 } 7456 7457 } 7458 7459 case REACT_PORTAL_TYPE: 7460 return $$typeof; 7461 } 7462 } 7463 7464 return undefined; 7465} 7466var ContextConsumer = REACT_CONTEXT_TYPE; 7467var ContextProvider = REACT_PROVIDER_TYPE; 7468var Element = REACT_ELEMENT_TYPE; 7469var ForwardRef = REACT_FORWARD_REF_TYPE; 7470var Fragment = REACT_FRAGMENT_TYPE; 7471var Lazy = REACT_LAZY_TYPE; 7472var Memo = REACT_MEMO_TYPE; 7473var Portal = REACT_PORTAL_TYPE; 7474var Profiler = REACT_PROFILER_TYPE; 7475var StrictMode = REACT_STRICT_MODE_TYPE; 7476var Suspense = REACT_SUSPENSE_TYPE; 7477var SuspenseList = REACT_SUSPENSE_LIST_TYPE; 7478var hasWarnedAboutDeprecatedIsAsyncMode = false; 7479var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated 7480 7481function isAsyncMode(object) { 7482 { 7483 if (!hasWarnedAboutDeprecatedIsAsyncMode) { 7484 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint 7485 7486 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); 7487 } 7488 } 7489 7490 return false; 7491} 7492function isConcurrentMode(object) { 7493 { 7494 if (!hasWarnedAboutDeprecatedIsConcurrentMode) { 7495 hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint 7496 7497 console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.'); 7498 } 7499 } 7500 7501 return false; 7502} 7503function isContextConsumer(object) { 7504 return typeOf(object) === REACT_CONTEXT_TYPE; 7505} 7506function isContextProvider(object) { 7507 return typeOf(object) === REACT_PROVIDER_TYPE; 7508} 7509function isElement(object) { 7510 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; 7511} 7512function isForwardRef(object) { 7513 return typeOf(object) === REACT_FORWARD_REF_TYPE; 7514} 7515function isFragment(object) { 7516 return typeOf(object) === REACT_FRAGMENT_TYPE; 7517} 7518function isLazy(object) { 7519 return typeOf(object) === REACT_LAZY_TYPE; 7520} 7521function isMemo(object) { 7522 return typeOf(object) === REACT_MEMO_TYPE; 7523} 7524function isPortal(object) { 7525 return typeOf(object) === REACT_PORTAL_TYPE; 7526} 7527function isProfiler(object) { 7528 return typeOf(object) === REACT_PROFILER_TYPE; 7529} 7530function isStrictMode(object) { 7531 return typeOf(object) === REACT_STRICT_MODE_TYPE; 7532} 7533function isSuspense(object) { 7534 return typeOf(object) === REACT_SUSPENSE_TYPE; 7535} 7536function isSuspenseList(object) { 7537 return typeOf(object) === REACT_SUSPENSE_LIST_TYPE; 7538} 7539 7540exports.ContextConsumer = ContextConsumer; 7541exports.ContextProvider = ContextProvider; 7542exports.Element = Element; 7543exports.ForwardRef = ForwardRef; 7544exports.Fragment = Fragment; 7545exports.Lazy = Lazy; 7546exports.Memo = Memo; 7547exports.Portal = Portal; 7548exports.Profiler = Profiler; 7549exports.StrictMode = StrictMode; 7550exports.Suspense = Suspense; 7551exports.SuspenseList = SuspenseList; 7552exports.isAsyncMode = isAsyncMode; 7553exports.isConcurrentMode = isConcurrentMode; 7554exports.isContextConsumer = isContextConsumer; 7555exports.isContextProvider = isContextProvider; 7556exports.isElement = isElement; 7557exports.isForwardRef = isForwardRef; 7558exports.isFragment = isFragment; 7559exports.isLazy = isLazy; 7560exports.isMemo = isMemo; 7561exports.isPortal = isPortal; 7562exports.isProfiler = isProfiler; 7563exports.isStrictMode = isStrictMode; 7564exports.isSuspense = isSuspense; 7565exports.isSuspenseList = isSuspenseList; 7566exports.isValidElementType = isValidElementType; 7567exports.typeOf = typeOf; 7568 })(); 7569} 7570 7571 7572/***/ }), 7573
vendor: 557 bytes, lines 7574-7589
7574/***/ "./node_modules/react-redux/node_modules/react-is/index.js": 7575/*!*****************************************************************!*\ 7576 !*** ./node_modules/react-redux/node_modules/react-is/index.js ***! 7577 \*****************************************************************/ 7578/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 7579 7580"use strict"; 7581 7582 7583if (false) {} else { 7584 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "./node_modules/react-redux/node_modules/react-is/cjs/react-is.development.js"); 7585} 7586 7587 7588/***/ }), 7589
vendor: 3,074 bytes, lines 7590-7693
7590/***/ "./node_modules/react-string-replace/index.js": 7591/*!****************************************************!*\ 7592 !*** ./node_modules/react-string-replace/index.js ***! 7593 \****************************************************/ 7594/***/ ((module) => { 7595 7596/* eslint-disable vars-on-top, no-var, prefer-template */ 7597var isRegExp = function (re) { 7598 return re instanceof RegExp; 7599}; 7600var escapeRegExp = function escapeRegExp(string) { 7601 var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, 7602 reHasRegExpChar = RegExp(reRegExpChar.source); 7603 7604 return (string && reHasRegExpChar.test(string)) 7605 ? string.replace(reRegExpChar, '\\$&') 7606 : string; 7607}; 7608var isString = function (value) { 7609 return typeof value === 'string'; 7610}; 7611var flatten = function (array) { 7612 var newArray = []; 7613 7614 array.forEach(function (item) { 7615 if (Array.isArray(item)) { 7616 newArray = newArray.concat(item); 7617 } else { 7618 newArray.push(item); 7619 } 7620 }); 7621 7622 return newArray; 7623}; 7624 7625/** 7626 * Given a string, replace every substring that is matched by the `match` regex 7627 * with the result of calling `fn` on matched substring. The result will be an 7628 * array with all odd indexed elements containing the replacements. The primary 7629 * use case is similar to using String.prototype.replace except for React. 7630 * 7631 * React will happily render an array as children of a react element, which 7632 * makes this approach very useful for tasks like surrounding certain text 7633 * within a string with react elements. 7634 * 7635 * Example: 7636 * matchReplace( 7637 * 'Emphasize all phone numbers like 884-555-4443.', 7638 * /([\d|-]+)/g, 7639 * (number, i) => <strong key={i}>{number}</strong> 7640 * ); 7641 * // => ['Emphasize all phone numbers like ', <strong>884-555-4443</strong>, '.' 7642 * 7643 * @param {string} str 7644 * @param {RegExp|str} match Must contain a matching group 7645 * @param {function} fn 7646 * @return {array} 7647 */ 7648function replaceString(str, match, fn) { 7649 var curCharStart = 0; 7650 var curCharLen = 0; 7651 7652 if (str === '') { 7653 return str; 7654 } else if (!str || !isString(str)) { 7655 throw new TypeError('First argument to react-string-replace#replaceString must be a string'); 7656 } 7657 7658 var re = match; 7659 7660 if (!isRegExp(re)) { 7661 re = new RegExp('(' + escapeRegExp(re) + ')', 'gi'); 7662 } 7663 7664 var result = str.split(re); 7665 7666 // Apply fn to all odd elements 7667 for (var i = 1, length = result.length; i < length; i += 2) { 7668 /** @see {@link https://github.com/iansinnott/react-string-replace/issues/74} */ 7669 if (result[i] === undefined || result[i - 1] === undefined) { 7670 console.warn('reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.'); 7671 continue; 7672 } 7673 7674 curCharLen = result[i].length; 7675 curCharStart += result[i - 1].length; 7676 result[i] = fn(result[i], i, curCharStart); 7677 curCharStart += curCharLen; 7678 } 7679 7680 return result; 7681} 7682 7683module.exports = function reactStringReplace(source, match, fn) { 7684 if (!Array.isArray(source)) source = [source]; 7685 7686 return flatten(source.map(function(x) { 7687 return isString(x) ? replaceString(x, match, fn) : x; 7688 })); 7689}; 7690 7691 7692/***/ }), 7693
vendor: 1,870 bytes, lines 7694-7739
7694/***/ "./node_modules/redux-thunk/es/index.js": 7695/*!**********************************************!*\ 7696 !*** ./node_modules/redux-thunk/es/index.js ***! 7697 \**********************************************/ 7698/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7699 7700"use strict"; 7701__webpack_require__.r(__webpack_exports__); 7702/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7703/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) 7704/* harmony export */ }); 7705/** A function that accepts a potential "extra argument" value to be injected later, 7706 * and returns an instance of the thunk middleware that uses that value 7707 */ 7708function createThunkMiddleware(extraArgument) { 7709 // Standard Redux middleware definition pattern: 7710 // See: https://redux.js.org/tutorials/fundamentals/part-4-store#writing-custom-middleware 7711 var middleware = function middleware(_ref) { 7712 var dispatch = _ref.dispatch, 7713 getState = _ref.getState; 7714 return function (next) { 7715 return function (action) { 7716 // The thunk middleware looks for any functions that were passed to `store.dispatch`. 7717 // If this "action" is really a function, call it and return the result. 7718 if (typeof action === 'function') { 7719 // Inject the store's `dispatch` and `getState` methods, as well as any "extra arg" 7720 return action(dispatch, getState, extraArgument); 7721 } // Otherwise, pass the action down the middleware chain as usual 7722 7723 7724 return next(action); 7725 }; 7726 }; 7727 }; 7728 7729 return middleware; 7730} 7731 7732var thunk = createThunkMiddleware(); // Attach the factory function so users can create a customized version 7733// with whatever "extra arg" they want to inject into their thunks 7734 7735thunk.withExtraArgument = createThunkMiddleware; 7736/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (thunk); 7737 7738/***/ }), 7739
vendor: 27,324 bytes, lines 7740-8466
7740/***/ "./node_modules/redux/es/redux.js": 7741/*!****************************************!*\ 7742 !*** ./node_modules/redux/es/redux.js ***! 7743 \****************************************/ 7744/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 7745 7746"use strict"; 7747__webpack_require__.r(__webpack_exports__); 7748/* harmony export */ __webpack_require__.d(__webpack_exports__, { 7749/* harmony export */ __DO_NOT_USE__ActionTypes: () => (/* binding */ ActionTypes), 7750/* harmony export */ applyMiddleware: () => (/* binding */ applyMiddleware), 7751/* harmony export */ bindActionCreators: () => (/* binding */ bindActionCreators), 7752/* harmony export */ combineReducers: () => (/* binding */ combineReducers), 7753/* harmony export */ compose: () => (/* binding */ compose), 7754/* harmony export */ createStore: () => (/* binding */ createStore), 7755/* harmony export */ legacy_createStore: () => (/* binding */ legacy_createStore) 7756/* harmony export */ }); 7757/* 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"); 7758 7759 7760/** 7761 * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js 7762 * 7763 * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes 7764 * during build. 7765 * @param {number} code 7766 */ 7767function formatProdErrorMessage(code) { 7768 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. '; 7769} 7770 7771// Inlined version of the `symbol-observable` polyfill 7772var $$observable = (function () { 7773 return typeof Symbol === 'function' && Symbol.observable || '@@observable'; 7774})(); 7775 7776/** 7777 * These are private action types reserved by Redux. 7778 * For any unknown actions, you must return the current state. 7779 * If the current state is undefined, you must return the initial state. 7780 * Do not reference these action types directly in your code. 7781 */ 7782var randomString = function randomString() { 7783 return Math.random().toString(36).substring(7).split('').join('.'); 7784}; 7785 7786var ActionTypes = { 7787 INIT: "@@redux/INIT" + randomString(), 7788 REPLACE: "@@redux/REPLACE" + randomString(), 7789 PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() { 7790 return "@@redux/PROBE_UNKNOWN_ACTION" + randomString(); 7791 } 7792}; 7793 7794/** 7795 * @param {any} obj The object to inspect. 7796 * @returns {boolean} True if the argument appears to be a plain object. 7797 */ 7798function isPlainObject(obj) { 7799 if (typeof obj !== 'object' || obj === null) return false; 7800 var proto = obj; 7801 7802 while (Object.getPrototypeOf(proto) !== null) { 7803 proto = Object.getPrototypeOf(proto); 7804 } 7805 7806 return Object.getPrototypeOf(obj) === proto; 7807} 7808 7809// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of 7810function miniKindOf(val) { 7811 if (val === void 0) return 'undefined'; 7812 if (val === null) return 'null'; 7813 var type = typeof val; 7814 7815 switch (type) { 7816 case 'boolean': 7817 case 'string': 7818 case 'number': 7819 case 'symbol': 7820 case 'function': 7821 { 7822 return type; 7823 } 7824 } 7825 7826 if (Array.isArray(val)) return 'array'; 7827 if (isDate(val)) return 'date'; 7828 if (isError(val)) return 'error'; 7829 var constructorName = ctorName(val); 7830 7831 switch (constructorName) { 7832 case 'Symbol': 7833 case 'Promise': 7834 case 'WeakMap': 7835 case 'WeakSet': 7836 case 'Map': 7837 case 'Set': 7838 return constructorName; 7839 } // other 7840 7841 7842 return type.slice(8, -1).toLowerCase().replace(/\s/g, ''); 7843} 7844 7845function ctorName(val) { 7846 return typeof val.constructor === 'function' ? val.constructor.name : null; 7847} 7848 7849function isError(val) { 7850 return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number'; 7851} 7852 7853function isDate(val) { 7854 if (val instanceof Date) return true; 7855 return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function'; 7856} 7857 7858function kindOf(val) { 7859 var typeOfVal = typeof val; 7860 7861 if (true) { 7862 typeOfVal = miniKindOf(val); 7863 } 7864 7865 return typeOfVal; 7866} 7867 7868/** 7869 * @deprecated 7870 * 7871 * **We recommend using the `configureStore` method 7872 * of the `@reduxjs/toolkit` package**, which replaces `createStore`. 7873 * 7874 * Redux Toolkit is our recommended approach for writing Redux logic today, 7875 * including store setup, reducers, data fetching, and more. 7876 * 7877 * **For more details, please read this Redux docs page:** 7878 * **https://redux.js.org/introduction/why-rtk-is-redux-today** 7879 * 7880 * `configureStore` from Redux Toolkit is an improved version of `createStore` that 7881 * simplifies setup and helps avoid common bugs. 7882 * 7883 * You should not be using the `redux` core package by itself today, except for learning purposes. 7884 * The `createStore` method from the core `redux` package will not be removed, but we encourage 7885 * all users to migrate to using Redux Toolkit for all Redux code. 7886 * 7887 * If you want to use `createStore` without this visual deprecation warning, use 7888 * the `legacy_createStore` import instead: 7889 * 7890 * `import { legacy_createStore as createStore} from 'redux'` 7891 * 7892 */ 7893 7894function createStore(reducer, preloadedState, enhancer) { 7895 var _ref2; 7896 7897 if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') { 7898 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.'); 7899 } 7900 7901 if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { 7902 enhancer = preloadedState; 7903 preloadedState = undefined; 7904 } 7905 7906 if (typeof enhancer !== 'undefined') { 7907 if (typeof enhancer !== 'function') { 7908 throw new Error( false ? 0 : "Expected the enhancer to be a function. Instead, received: '" + kindOf(enhancer) + "'"); 7909 } 7910 7911 return enhancer(createStore)(reducer, preloadedState); 7912 } 7913 7914 if (typeof reducer !== 'function') { 7915 throw new Error( false ? 0 : "Expected the root reducer to be a function. Instead, received: '" + kindOf(reducer) + "'"); 7916 } 7917 7918 var currentReducer = reducer; 7919 var currentState = preloadedState; 7920 var currentListeners = []; 7921 var nextListeners = currentListeners; 7922 var isDispatching = false; 7923 /** 7924 * This makes a shallow copy of currentListeners so we can use 7925 * nextListeners as a temporary list while dispatching. 7926 * 7927 * This prevents any bugs around consumers calling 7928 * subscribe/unsubscribe in the middle of a dispatch. 7929 */ 7930 7931 function ensureCanMutateNextListeners() { 7932 if (nextListeners === currentListeners) { 7933 nextListeners = currentListeners.slice(); 7934 } 7935 } 7936 /** 7937 * Reads the state tree managed by the store. 7938 * 7939 * @returns {any} The current state tree of your application. 7940 */ 7941 7942 7943 function getState() { 7944 if (isDispatching) { 7945 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.'); 7946 } 7947 7948 return currentState; 7949 } 7950 /** 7951 * Adds a change listener. It will be called any time an action is dispatched, 7952 * and some part of the state tree may potentially have changed. You may then 7953 * call `getState()` to read the current state tree inside the callback. 7954 * 7955 * You may call `dispatch()` from a change listener, with the following 7956 * caveats: 7957 * 7958 * 1. The subscriptions are snapshotted just before every `dispatch()` call. 7959 * If you subscribe or unsubscribe while the listeners are being invoked, this 7960 * will not have any effect on the `dispatch()` that is currently in progress. 7961 * However, the next `dispatch()` call, whether nested or not, will use a more 7962 * recent snapshot of the subscription list. 7963 * 7964 * 2. The listener should not expect to see all state changes, as the state 7965 * might have been updated multiple times during a nested `dispatch()` before 7966 * the listener is called. It is, however, guaranteed that all subscribers 7967 * registered before the `dispatch()` started will be called with the latest 7968 * state by the time it exits. 7969 * 7970 * @param {Function} listener A callback to be invoked on every dispatch. 7971 * @returns {Function} A function to remove this change listener. 7972 */ 7973 7974 7975 function subscribe(listener) { 7976 if (typeof listener !== 'function') { 7977 throw new Error( false ? 0 : "Expected the listener to be a function. Instead, received: '" + kindOf(listener) + "'"); 7978 } 7979 7980 if (isDispatching) { 7981 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.'); 7982 } 7983 7984 var isSubscribed = true; 7985 ensureCanMutateNextListeners(); 7986 nextListeners.push(listener); 7987 return function unsubscribe() { 7988 if (!isSubscribed) { 7989 return; 7990 } 7991 7992 if (isDispatching) { 7993 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.'); 7994 } 7995 7996 isSubscribed = false; 7997 ensureCanMutateNextListeners(); 7998 var index = nextListeners.indexOf(listener); 7999 nextListeners.splice(index, 1); 8000 currentListeners = null; 8001 }; 8002 } 8003 /** 8004 * Dispatches an action. It is the only way to trigger a state change. 8005 * 8006 * The `reducer` function, used to create the store, will be called with the 8007 * current state tree and the given `action`. Its return value will 8008 * be considered the **next** state of the tree, and the change listeners 8009 * will be notified. 8010 * 8011 * The base implementation only supports plain object actions. If you want to 8012 * dispatch a Promise, an Observable, a thunk, or something else, you need to 8013 * wrap your store creating function into the corresponding middleware. For 8014 * example, see the documentation for the `redux-thunk` package. Even the 8015 * middleware will eventually dispatch plain object actions using this method. 8016 * 8017 * @param {Object} action A plain object representing âwhat changedâ. It is 8018 * a good idea to keep actions serializable so you can record and replay user 8019 * sessions, or use the time travelling `redux-devtools`. An action must have 8020 * a `type` property which may not be `undefined`. It is a good idea to use 8021 * string constants for action types. 8022 * 8023 * @returns {Object} For convenience, the same action object you dispatched. 8024 * 8025 * Note that, if you use a custom middleware, it may wrap `dispatch()` to 8026 * return something else (for example, a Promise you can await). 8027 */ 8028 8029 8030 function dispatch(action) { 8031 if (!isPlainObject(action)) { 8032 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."); 8033 } 8034 8035 if (typeof action.type === 'undefined') { 8036 throw new Error( false ? 0 : 'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.'); 8037 } 8038 8039 if (isDispatching) { 8040 throw new Error( false ? 0 : 'Reducers may not dispatch actions.'); 8041 } 8042 8043 try { 8044 isDispatching = true; 8045 currentState = currentReducer(currentState, action); 8046 } finally { 8047 isDispatching = false; 8048 } 8049 8050 var listeners = currentListeners = nextListeners; 8051 8052 for (var i = 0; i < listeners.length; i++) { 8053 var listener = listeners[i]; 8054 listener(); 8055 } 8056 8057 return action; 8058 } 8059 /** 8060 * Replaces the reducer currently used by the store to calculate the state. 8061 * 8062 * You might need this if your app implements code splitting and you want to 8063 * load some of the reducers dynamically. You might also need this if you 8064 * implement a hot reloading mechanism for Redux. 8065 * 8066 * @param {Function} nextReducer The reducer for the store to use instead. 8067 * @returns {void} 8068 */ 8069 8070 8071 function replaceReducer(nextReducer) { 8072 if (typeof nextReducer !== 'function') { 8073 throw new Error( false ? 0 : "Expected the nextReducer to be a function. Instead, received: '" + kindOf(nextReducer)); 8074 } 8075 8076 currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT. 8077 // Any reducers that existed in both the new and old rootReducer 8078 // will receive the previous state. This effectively populates 8079 // the new state tree with any relevant data from the old one. 8080 8081 dispatch({ 8082 type: ActionTypes.REPLACE 8083 }); 8084 } 8085 /** 8086 * Interoperability point for observable/reactive libraries. 8087 * @returns {observable} A minimal observable of state changes. 8088 * For more information, see the observable proposal: 8089 * https://github.com/tc39/proposal-observable 8090 */ 8091 8092 8093 function observable() { 8094 var _ref; 8095 8096 var outerSubscribe = subscribe; 8097 return _ref = { 8098 /** 8099 * The minimal observable subscription method. 8100 * @param {Object} observer Any object that can be used as an observer. 8101 * The observer object should have a `next` method. 8102 * @returns {subscription} An object with an `unsubscribe` method that can 8103 * be used to unsubscribe the observable from the store, and prevent further 8104 * emission of values from the observable. 8105 */ 8106 subscribe: function subscribe(observer) { 8107 if (typeof observer !== 'object' || observer === null) { 8108 throw new Error( false ? 0 : "Expected the observer to be an object. Instead, received: '" + kindOf(observer) + "'"); 8109 } 8110 8111 function observeState() { 8112 if (observer.next) { 8113 observer.next(getState()); 8114 } 8115 } 8116 8117 observeState(); 8118 var unsubscribe = outerSubscribe(observeState); 8119 return { 8120 unsubscribe: unsubscribe 8121 }; 8122 } 8123 }, _ref[$$observable] = function () { 8124 return this; 8125 }, _ref; 8126 } // When a store is created, an "INIT" action is dispatched so that every 8127 // reducer returns their initial state. This effectively populates 8128 // the initial state tree. 8129 8130 8131 dispatch({ 8132 type: ActionTypes.INIT 8133 }); 8134 return _ref2 = { 8135 dispatch: dispatch, 8136 subscribe: subscribe, 8137 getState: getState, 8138 replaceReducer: replaceReducer 8139 }, _ref2[$$observable] = observable, _ref2; 8140} 8141/** 8142 * Creates a Redux store that holds the state tree. 8143 * 8144 * **We recommend using `configureStore` from the 8145 * `@reduxjs/toolkit` package**, which replaces `createStore`: 8146 * **https://redux.js.org/introduction/why-rtk-is-redux-today** 8147 * 8148 * The only way to change the data in the store is to call `dispatch()` on it. 8149 * 8150 * There should only be a single store in your app. To specify how different 8151 * parts of the state tree respond to actions, you may combine several reducers 8152 * into a single reducer function by using `combineReducers`. 8153 * 8154 * @param {Function} reducer A function that returns the next state tree, given 8155 * the current state tree and the action to handle. 8156 * 8157 * @param {any} [preloadedState] The initial state. You may optionally specify it 8158 * to hydrate the state from the server in universal apps, or to restore a 8159 * previously serialized user session. 8160 * If you use `combineReducers` to produce the root reducer function, this must be 8161 * an object with the same shape as `combineReducers` keys. 8162 * 8163 * @param {Function} [enhancer] The store enhancer. You may optionally specify it 8164 * to enhance the store with third-party capabilities such as middleware, 8165 * time travel, persistence, etc. The only store enhancer that ships with Redux 8166 * is `applyMiddleware()`. 8167 * 8168 * @returns {Store} A Redux store that lets you read the state, dispatch actions 8169 * and subscribe to changes. 8170 */ 8171 8172var legacy_createStore = createStore; 8173 8174/** 8175 * Prints a warning in the console if it exists. 8176 * 8177 * @param {String} message The warning message. 8178 * @returns {void} 8179 */ 8180function warning(message) { 8181 /* eslint-disable no-console */ 8182 if (typeof console !== 'undefined' && typeof console.error === 'function') { 8183 console.error(message); 8184 } 8185 /* eslint-enable no-console */ 8186 8187 8188 try { 8189 // This error was thrown as a convenience so that if you enable 8190 // "break on all exceptions" in your console, 8191 // it would pause the execution at this line. 8192 throw new Error(message); 8193 } catch (e) {} // eslint-disable-line no-empty 8194 8195} 8196 8197function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { 8198 var reducerKeys = Object.keys(reducers); 8199 var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; 8200 8201 if (reducerKeys.length === 0) { 8202 return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; 8203 } 8204 8205 if (!isPlainObject(inputState)) { 8206 return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\""); 8207 } 8208 8209 var unexpectedKeys = Object.keys(inputState).filter(function (key) { 8210 return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; 8211 }); 8212 unexpectedKeys.forEach(function (key) { 8213 unexpectedKeyCache[key] = true; 8214 }); 8215 if (action && action.type === ActionTypes.REPLACE) return; 8216 8217 if (unexpectedKeys.length > 0) { 8218 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."); 8219 } 8220} 8221 8222function assertReducerShape(reducers) { 8223 Object.keys(reducers).forEach(function (key) { 8224 var reducer = reducers[key]; 8225 var initialState = reducer(undefined, { 8226 type: ActionTypes.INIT 8227 }); 8228 8229 if (typeof initialState === 'undefined') { 8230 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."); 8231 } 8232 8233 if (typeof reducer(undefined, { 8234 type: ActionTypes.PROBE_UNKNOWN_ACTION() 8235 }) === 'undefined') { 8236 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."); 8237 } 8238 }); 8239} 8240/** 8241 * Turns an object whose values are different reducer functions, into a single 8242 * reducer function. It will call every child reducer, and gather their results 8243 * into a single state object, whose keys correspond to the keys of the passed 8244 * reducer functions. 8245 * 8246 * @param {Object} reducers An object whose values correspond to different 8247 * reducer functions that need to be combined into one. One handy way to obtain 8248 * it is to use ES6 `import * as reducers` syntax. The reducers may never return 8249 * undefined for any action. Instead, they should return their initial state 8250 * if the state passed to them was undefined, and the current state for any 8251 * unrecognized action. 8252 * 8253 * @returns {Function} A reducer function that invokes every reducer inside the 8254 * passed object, and builds a state object with the same shape. 8255 */ 8256 8257 8258function combineReducers(reducers) { 8259 var reducerKeys = Object.keys(reducers); 8260 var finalReducers = {}; 8261 8262 for (var i = 0; i < reducerKeys.length; i++) { 8263 var key = reducerKeys[i]; 8264 8265 if (true) { 8266 if (typeof reducers[key] === 'undefined') { 8267 warning("No reducer provided for key \"" + key + "\""); 8268 } 8269 } 8270 8271 if (typeof reducers[key] === 'function') { 8272 finalReducers[key] = reducers[key]; 8273 } 8274 } 8275 8276 var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same 8277 // keys multiple times. 8278 8279 var unexpectedKeyCache; 8280 8281 if (true) { 8282 unexpectedKeyCache = {}; 8283 } 8284 8285 var shapeAssertionError; 8286 8287 try { 8288 assertReducerShape(finalReducers); 8289 } catch (e) { 8290 shapeAssertionError = e; 8291 } 8292 8293 return function combination(state, action) { 8294 if (state === void 0) { 8295 state = {}; 8296 } 8297 8298 if (shapeAssertionError) { 8299 throw shapeAssertionError; 8300 } 8301 8302 if (true) { 8303 var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); 8304 8305 if (warningMessage) { 8306 warning(warningMessage); 8307 } 8308 } 8309 8310 var hasChanged = false; 8311 var nextState = {}; 8312 8313 for (var _i = 0; _i < finalReducerKeys.length; _i++) { 8314 var _key = finalReducerKeys[_i]; 8315 var reducer = finalReducers[_key]; 8316 var previousStateForKey = state[_key]; 8317 var nextStateForKey = reducer(previousStateForKey, action); 8318 8319 if (typeof nextStateForKey === 'undefined') { 8320 var actionType = action && action.type; 8321 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."); 8322 } 8323 8324 nextState[_key] = nextStateForKey; 8325 hasChanged = hasChanged || nextStateForKey !== previousStateForKey; 8326 } 8327 8328 hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length; 8329 return hasChanged ? nextState : state; 8330 }; 8331} 8332 8333function bindActionCreator(actionCreator, dispatch) { 8334 return function () { 8335 return dispatch(actionCreator.apply(this, arguments)); 8336 }; 8337} 8338/** 8339 * Turns an object whose values are action creators, into an object with the 8340 * same keys, but with every function wrapped into a `dispatch` call so they 8341 * may be invoked directly. This is just a convenience method, as you can call 8342 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. 8343 * 8344 * For convenience, you can also pass an action creator as the first argument, 8345 * and get a dispatch wrapped function in return. 8346 * 8347 * @param {Function|Object} actionCreators An object whose values are action 8348 * creator functions. One handy way to obtain it is to use ES6 `import * as` 8349 * syntax. You may also pass a single function. 8350 * 8351 * @param {Function} dispatch The `dispatch` function available on your Redux 8352 * store. 8353 * 8354 * @returns {Function|Object} The object mimicking the original object, but with 8355 * every action creator wrapped into the `dispatch` call. If you passed a 8356 * function as `actionCreators`, the return value will also be a single 8357 * function. 8358 */ 8359 8360 8361function bindActionCreators(actionCreators, dispatch) { 8362 if (typeof actionCreators === 'function') { 8363 return bindActionCreator(actionCreators, dispatch); 8364 } 8365 8366 if (typeof actionCreators !== 'object' || actionCreators === null) { 8367 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\"?"); 8368 } 8369 8370 var boundActionCreators = {}; 8371 8372 for (var key in actionCreators) { 8373 var actionCreator = actionCreators[key]; 8374 8375 if (typeof actionCreator === 'function') { 8376 boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); 8377 } 8378 } 8379 8380 return boundActionCreators; 8381} 8382 8383/** 8384 * Composes single-argument functions from right to left. The rightmost 8385 * function can take multiple arguments as it provides the signature for 8386 * the resulting composite function. 8387 * 8388 * @param {...Function} funcs The functions to compose. 8389 * @returns {Function} A function obtained by composing the argument functions 8390 * from right to left. For example, compose(f, g, h) is identical to doing 8391 * (...args) => f(g(h(...args))). 8392 */ 8393function compose() { 8394 for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) { 8395 funcs[_key] = arguments[_key]; 8396 } 8397 8398 if (funcs.length === 0) { 8399 return function (arg) { 8400 return arg; 8401 }; 8402 } 8403 8404 if (funcs.length === 1) { 8405 return funcs[0]; 8406 } 8407 8408 return funcs.reduce(function (a, b) { 8409 return function () { 8410 return a(b.apply(void 0, arguments)); 8411 }; 8412 }); 8413} 8414 8415/** 8416 * Creates a store enhancer that applies middleware to the dispatch method 8417 * of the Redux store. This is handy for a variety of tasks, such as expressing 8418 * asynchronous actions in a concise manner, or logging every action payload. 8419 * 8420 * See `redux-thunk` package as an example of the Redux middleware. 8421 * 8422 * Because middleware is potentially asynchronous, this should be the first 8423 * store enhancer in the composition chain. 8424 * 8425 * Note that each middleware will be given the `dispatch` and `getState` functions 8426 * as named arguments. 8427 * 8428 * @param {...Function} middlewares The middleware chain to be applied. 8429 * @returns {Function} A store enhancer applying the middleware. 8430 */ 8431 8432function applyMiddleware() { 8433 for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) { 8434 middlewares[_key] = arguments[_key]; 8435 } 8436 8437 return function (createStore) { 8438 return function () { 8439 var store = createStore.apply(void 0, arguments); 8440 8441 var _dispatch = function dispatch() { 8442 throw new Error( false ? 0 : 'Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.'); 8443 }; 8444 8445 var middlewareAPI = { 8446 getState: store.getState, 8447 dispatch: function dispatch() { 8448 return _dispatch.apply(void 0, arguments); 8449 } 8450 }; 8451 var chain = middlewares.map(function (middleware) { 8452 return middleware(middlewareAPI); 8453 }); 8454 _dispatch = compose.apply(void 0, chain)(store.dispatch); 8455 return (0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])((0,_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__["default"])({}, store), {}, { 8456 dispatch: _dispatch 8457 }); 8458 }; 8459 }; 8460} 8461 8462 8463 8464 8465/***/ }), 8466
vendor: 4,456 bytes, lines 8467-8629
8467/***/ "./node_modules/reselect/es/defaultMemoize.js": 8468/*!****************************************************!*\ 8469 !*** ./node_modules/reselect/es/defaultMemoize.js ***! 8470 \****************************************************/ 8471/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8472 8473"use strict"; 8474__webpack_require__.r(__webpack_exports__); 8475/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8476/* harmony export */ createCacheKeyComparator: () => (/* binding */ createCacheKeyComparator), 8477/* harmony export */ defaultEqualityCheck: () => (/* binding */ defaultEqualityCheck), 8478/* harmony export */ defaultMemoize: () => (/* binding */ defaultMemoize) 8479/* harmony export */ }); 8480// Cache implementation based on Erik Rasmussen's `lru-memoize`: 8481// https://github.com/erikras/lru-memoize 8482var NOT_FOUND = 'NOT_FOUND'; 8483 8484function createSingletonCache(equals) { 8485 var entry; 8486 return { 8487 get: function get(key) { 8488 if (entry && equals(entry.key, key)) { 8489 return entry.value; 8490 } 8491 8492 return NOT_FOUND; 8493 }, 8494 put: function put(key, value) { 8495 entry = { 8496 key: key, 8497 value: value 8498 }; 8499 }, 8500 getEntries: function getEntries() { 8501 return entry ? [entry] : []; 8502 }, 8503 clear: function clear() { 8504 entry = undefined; 8505 } 8506 }; 8507} 8508 8509function createLruCache(maxSize, equals) { 8510 var entries = []; 8511 8512 function get(key) { 8513 var cacheIndex = entries.findIndex(function (entry) { 8514 return equals(key, entry.key); 8515 }); // We found a cached entry 8516 8517 if (cacheIndex > -1) { 8518 var entry = entries[cacheIndex]; // Cached entry not at top of cache, move it to the top 8519 8520 if (cacheIndex > 0) { 8521 entries.splice(cacheIndex, 1); 8522 entries.unshift(entry); 8523 } 8524 8525 return entry.value; 8526 } // No entry found in cache, return sentinel 8527 8528 8529 return NOT_FOUND; 8530 } 8531 8532 function put(key, value) { 8533 if (get(key) === NOT_FOUND) { 8534 // TODO Is unshift slow? 8535 entries.unshift({ 8536 key: key, 8537 value: value 8538 }); 8539 8540 if (entries.length > maxSize) { 8541 entries.pop(); 8542 } 8543 } 8544 } 8545 8546 function getEntries() { 8547 return entries; 8548 } 8549 8550 function clear() { 8551 entries = []; 8552 } 8553 8554 return { 8555 get: get, 8556 put: put, 8557 getEntries: getEntries, 8558 clear: clear 8559 }; 8560} 8561 8562var defaultEqualityCheck = function defaultEqualityCheck(a, b) { 8563 return a === b; 8564}; 8565function createCacheKeyComparator(equalityCheck) { 8566 return function areArgumentsShallowlyEqual(prev, next) { 8567 if (prev === null || next === null || prev.length !== next.length) { 8568 return false; 8569 } // Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible. 8570 8571 8572 var length = prev.length; 8573 8574 for (var i = 0; i < length; i++) { 8575 if (!equalityCheck(prev[i], next[i])) { 8576 return false; 8577 } 8578 } 8579 8580 return true; 8581 }; 8582} 8583// defaultMemoize now supports a configurable cache size with LRU behavior, 8584// and optional comparison of the result value with existing values 8585function defaultMemoize(func, equalityCheckOrOptions) { 8586 var providedOptions = typeof equalityCheckOrOptions === 'object' ? equalityCheckOrOptions : { 8587 equalityCheck: equalityCheckOrOptions 8588 }; 8589 var _providedOptions$equa = providedOptions.equalityCheck, 8590 equalityCheck = _providedOptions$equa === void 0 ? defaultEqualityCheck : _providedOptions$equa, 8591 _providedOptions$maxS = providedOptions.maxSize, 8592 maxSize = _providedOptions$maxS === void 0 ? 1 : _providedOptions$maxS, 8593 resultEqualityCheck = providedOptions.resultEqualityCheck; 8594 var comparator = createCacheKeyComparator(equalityCheck); 8595 var cache = maxSize === 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator); // we reference arguments instead of spreading them for performance reasons 8596 8597 function memoized() { 8598 var value = cache.get(arguments); 8599 8600 if (value === NOT_FOUND) { 8601 // @ts-ignore 8602 value = func.apply(null, arguments); 8603 8604 if (resultEqualityCheck) { 8605 var entries = cache.getEntries(); 8606 var matchingEntry = entries.find(function (entry) { 8607 return resultEqualityCheck(entry.value, value); 8608 }); 8609 8610 if (matchingEntry) { 8611 value = matchingEntry.value; 8612 } 8613 } 8614 8615 cache.put(arguments, value); 8616 } 8617 8618 return value; 8619 } 8620 8621 memoized.clearCache = function () { 8622 return cache.clear(); 8623 }; 8624 8625 return memoized; 8626} 8627 8628/***/ }), 8629
vendor: 6,352 bytes, lines 8630-8778
8630/***/ "./node_modules/reselect/es/index.js": 8631/*!*******************************************!*\ 8632 !*** ./node_modules/reselect/es/index.js ***! 8633 \*******************************************/ 8634/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 8635 8636"use strict"; 8637__webpack_require__.r(__webpack_exports__); 8638/* harmony export */ __webpack_require__.d(__webpack_exports__, { 8639/* harmony export */ createSelector: () => (/* binding */ createSelector), 8640/* harmony export */ createSelectorCreator: () => (/* binding */ createSelectorCreator), 8641/* harmony export */ createStructuredSelector: () => (/* binding */ createStructuredSelector), 8642/* harmony export */ defaultEqualityCheck: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultEqualityCheck), 8643/* harmony export */ defaultMemoize: () => (/* reexport safe */ _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize) 8644/* harmony export */ }); 8645/* harmony import */ var _defaultMemoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defaultMemoize */ "./node_modules/reselect/es/defaultMemoize.js"); 8646 8647 8648 8649function getDependencies(funcs) { 8650 var dependencies = Array.isArray(funcs[0]) ? funcs[0] : funcs; 8651 8652 if (!dependencies.every(function (dep) { 8653 return typeof dep === 'function'; 8654 })) { 8655 var dependencyTypes = dependencies.map(function (dep) { 8656 return typeof dep === 'function' ? "function " + (dep.name || 'unnamed') + "()" : typeof dep; 8657 }).join(', '); 8658 throw new Error("createSelector expects all input-selectors to be functions, but received the following types: [" + dependencyTypes + "]"); 8659 } 8660 8661 return dependencies; 8662} 8663 8664function createSelectorCreator(memoize) { 8665 for (var _len = arguments.length, memoizeOptionsFromArgs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { 8666 memoizeOptionsFromArgs[_key - 1] = arguments[_key]; 8667 } 8668 8669 var createSelector = function createSelector() { 8670 for (var _len2 = arguments.length, funcs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 8671 funcs[_key2] = arguments[_key2]; 8672 } 8673 8674 var _recomputations = 0; 8675 8676 var _lastResult; // Due to the intricacies of rest params, we can't do an optional arg after `...funcs`. 8677 // So, start by declaring the default value here. 8678 // (And yes, the words 'memoize' and 'options' appear too many times in this next sequence.) 8679 8680 8681 var directlyPassedOptions = { 8682 memoizeOptions: undefined 8683 }; // Normally, the result func or "output selector" is the last arg 8684 8685 var resultFunc = funcs.pop(); // If the result func is actually an _object_, assume it's our options object 8686 8687 if (typeof resultFunc === 'object') { 8688 directlyPassedOptions = resultFunc; // and pop the real result func off 8689 8690 resultFunc = funcs.pop(); 8691 } 8692 8693 if (typeof resultFunc !== 'function') { 8694 throw new Error("createSelector expects an output function after the inputs, but received: [" + typeof resultFunc + "]"); 8695 } // Determine which set of options we're using. Prefer options passed directly, 8696 // but fall back to options given to createSelectorCreator. 8697 8698 8699 var _directlyPassedOption = directlyPassedOptions, 8700 _directlyPassedOption2 = _directlyPassedOption.memoizeOptions, 8701 memoizeOptions = _directlyPassedOption2 === void 0 ? memoizeOptionsFromArgs : _directlyPassedOption2; // Simplifying assumption: it's unlikely that the first options arg of the provided memoizer 8702 // is an array. In most libs I've looked at, it's an equality function or options object. 8703 // Based on that, if `memoizeOptions` _is_ an array, we assume it's a full 8704 // user-provided array of options. Otherwise, it must be just the _first_ arg, and so 8705 // we wrap it in an array so we can apply it. 8706 8707 var finalMemoizeOptions = Array.isArray(memoizeOptions) ? memoizeOptions : [memoizeOptions]; 8708 var dependencies = getDependencies(funcs); 8709 var memoizedResultFunc = memoize.apply(void 0, [function recomputationWrapper() { 8710 _recomputations++; // apply arguments instead of spreading for performance. 8711 8712 return resultFunc.apply(null, arguments); 8713 }].concat(finalMemoizeOptions)); // If a selector is called with the exact same arguments we don't need to traverse our dependencies again. 8714 8715 var selector = memoize(function dependenciesChecker() { 8716 var params = []; 8717 var length = dependencies.length; 8718 8719 for (var i = 0; i < length; i++) { 8720 // apply arguments instead of spreading and mutate a local list of params for performance. 8721 // @ts-ignore 8722 params.push(dependencies[i].apply(null, arguments)); 8723 } // apply arguments instead of spreading for performance. 8724 8725 8726 _lastResult = memoizedResultFunc.apply(null, params); 8727 return _lastResult; 8728 }); 8729 Object.assign(selector, { 8730 resultFunc: resultFunc, 8731 memoizedResultFunc: memoizedResultFunc, 8732 dependencies: dependencies, 8733 lastResult: function lastResult() { 8734 return _lastResult; 8735 }, 8736 recomputations: function recomputations() { 8737 return _recomputations; 8738 }, 8739 resetRecomputations: function resetRecomputations() { 8740 return _recomputations = 0; 8741 } 8742 }); 8743 return selector; 8744 }; // @ts-ignore 8745 8746 8747 return createSelector; 8748} 8749var createSelector = /* #__PURE__ */createSelectorCreator(_defaultMemoize__WEBPACK_IMPORTED_MODULE_0__.defaultMemoize); 8750// Manual definition of state and output arguments 8751var createStructuredSelector = function createStructuredSelector(selectors, selectorCreator) { 8752 if (selectorCreator === void 0) { 8753 selectorCreator = createSelector; 8754 } 8755 8756 if (typeof selectors !== 'object') { 8757 throw new Error('createStructuredSelector expects first argument to be an object ' + ("where each property is a selector, instead received a " + typeof selectors)); 8758 } 8759 8760 var objectKeys = Object.keys(selectors); 8761 var resultSelector = selectorCreator( // @ts-ignore 8762 objectKeys.map(function (key) { 8763 return selectors[key]; 8764 }), function () { 8765 for (var _len3 = arguments.length, values = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { 8766 values[_key3] = arguments[_key3]; 8767 } 8768 8769 return values.reduce(function (composition, value, index) { 8770 composition[objectKeys[index]] = value; 8771 return composition; 8772 }, {}); 8773 }); 8774 return resultSelector; 8775}; 8776 8777/***/ }), 8778
vendor: 17,789 bytes, lines 8779-9423
8779/***/ "./node_modules/scheduler/cjs/scheduler.development.js": 8780/*!*************************************************************!*\ 8781 !*** ./node_modules/scheduler/cjs/scheduler.development.js ***! 8782 \*************************************************************/ 8783/***/ ((__unused_webpack_module, exports) => { 8784 8785"use strict"; 8786/** 8787 * @license React 8788 * scheduler.development.js 8789 * 8790 * Copyright (c) Facebook, Inc. and its affiliates. 8791 * 8792 * This source code is licensed under the MIT license found in the 8793 * LICENSE file in the root directory of this source tree. 8794 */ 8795 8796 8797 8798if (true) { 8799 (function() { 8800 8801 'use strict'; 8802 8803/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 8804if ( 8805 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 8806 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 8807 'function' 8808) { 8809 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); 8810} 8811 var enableSchedulerDebugging = false; 8812var enableProfiling = false; 8813var frameYieldMs = 5; 8814 8815function push(heap, node) { 8816 var index = heap.length; 8817 heap.push(node); 8818 siftUp(heap, node, index); 8819} 8820function peek(heap) { 8821 return heap.length === 0 ? null : heap[0]; 8822} 8823function pop(heap) { 8824 if (heap.length === 0) { 8825 return null; 8826 } 8827 8828 var first = heap[0]; 8829 var last = heap.pop(); 8830 8831 if (last !== first) { 8832 heap[0] = last; 8833 siftDown(heap, last, 0); 8834 } 8835 8836 return first; 8837} 8838 8839function siftUp(heap, node, i) { 8840 var index = i; 8841 8842 while (index > 0) { 8843 var parentIndex = index - 1 >>> 1; 8844 var parent = heap[parentIndex]; 8845 8846 if (compare(parent, node) > 0) { 8847 // The parent is larger. Swap positions. 8848 heap[parentIndex] = node; 8849 heap[index] = parent; 8850 index = parentIndex; 8851 } else { 8852 // The parent is smaller. Exit. 8853 return; 8854 } 8855 } 8856} 8857 8858function siftDown(heap, node, i) { 8859 var index = i; 8860 var length = heap.length; 8861 var halfLength = length >>> 1; 8862 8863 while (index < halfLength) { 8864 var leftIndex = (index + 1) * 2 - 1; 8865 var left = heap[leftIndex]; 8866 var rightIndex = leftIndex + 1; 8867 var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those. 8868 8869 if (compare(left, node) < 0) { 8870 if (rightIndex < length && compare(right, left) < 0) { 8871 heap[index] = right; 8872 heap[rightIndex] = node; 8873 index = rightIndex; 8874 } else { 8875 heap[index] = left; 8876 heap[leftIndex] = node; 8877 index = leftIndex; 8878 } 8879 } else if (rightIndex < length && compare(right, node) < 0) { 8880 heap[index] = right; 8881 heap[rightIndex] = node; 8882 index = rightIndex; 8883 } else { 8884 // Neither child is smaller. Exit. 8885 return; 8886 } 8887 } 8888} 8889 8890function compare(a, b) { 8891 // Compare sort index first, then task id. 8892 var diff = a.sortIndex - b.sortIndex; 8893 return diff !== 0 ? diff : a.id - b.id; 8894} 8895 8896// TODO: Use symbols? 8897var ImmediatePriority = 1; 8898var UserBlockingPriority = 2; 8899var NormalPriority = 3; 8900var LowPriority = 4; 8901var IdlePriority = 5; 8902 8903function markTaskErrored(task, ms) { 8904} 8905 8906/* eslint-disable no-var */ 8907 8908var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function'; 8909 8910if (hasPerformanceNow) { 8911 var localPerformance = performance; 8912 8913 exports.unstable_now = function () { 8914 return localPerformance.now(); 8915 }; 8916} else { 8917 var localDate = Date; 8918 var initialTime = localDate.now(); 8919 8920 exports.unstable_now = function () { 8921 return localDate.now() - initialTime; 8922 }; 8923} // Max 31 bit integer. The max integer size in V8 for 32-bit systems. 8924// Math.pow(2, 30) - 1 8925// 0b111111111111111111111111111111 8926 8927 8928var maxSigned31BitInt = 1073741823; // Times out immediately 8929 8930var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out 8931 8932var USER_BLOCKING_PRIORITY_TIMEOUT = 250; 8933var NORMAL_PRIORITY_TIMEOUT = 5000; 8934var LOW_PRIORITY_TIMEOUT = 10000; // Never times out 8935 8936var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap 8937 8938var taskQueue = []; 8939var timerQueue = []; // Incrementing id counter. Used to maintain insertion order. 8940 8941var taskIdCounter = 1; // Pausing the scheduler is useful for debugging. 8942var currentTask = null; 8943var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrance. 8944 8945var isPerformingWork = false; 8946var isHostCallbackScheduled = false; 8947var isHostTimeoutScheduled = false; // Capture local references to native APIs, in case a polyfill overrides them. 8948 8949var localSetTimeout = typeof setTimeout === 'function' ? setTimeout : null; 8950var localClearTimeout = typeof clearTimeout === 'function' ? clearTimeout : null; 8951var localSetImmediate = typeof setImmediate !== 'undefined' ? setImmediate : null; // IE and Node.js + jsdom 8952 8953var isInputPending = typeof navigator !== 'undefined' && navigator.scheduling !== undefined && navigator.scheduling.isInputPending !== undefined ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null; 8954 8955function advanceTimers(currentTime) { 8956 // Check for tasks that are no longer delayed and add them to the queue. 8957 var timer = peek(timerQueue); 8958 8959 while (timer !== null) { 8960 if (timer.callback === null) { 8961 // Timer was cancelled. 8962 pop(timerQueue); 8963 } else if (timer.startTime <= currentTime) { 8964 // Timer fired. Transfer to the task queue. 8965 pop(timerQueue); 8966 timer.sortIndex = timer.expirationTime; 8967 push(taskQueue, timer); 8968 } else { 8969 // Remaining timers are pending. 8970 return; 8971 } 8972 8973 timer = peek(timerQueue); 8974 } 8975} 8976 8977function handleTimeout(currentTime) { 8978 isHostTimeoutScheduled = false; 8979 advanceTimers(currentTime); 8980 8981 if (!isHostCallbackScheduled) { 8982 if (peek(taskQueue) !== null) { 8983 isHostCallbackScheduled = true; 8984 requestHostCallback(flushWork); 8985 } else { 8986 var firstTimer = peek(timerQueue); 8987 8988 if (firstTimer !== null) { 8989 requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); 8990 } 8991 } 8992 } 8993} 8994 8995function flushWork(hasTimeRemaining, initialTime) { 8996 8997 8998 isHostCallbackScheduled = false; 8999 9000 if (isHostTimeoutScheduled) { 9001 // We scheduled a timeout but it's no longer needed. Cancel it. 9002 isHostTimeoutScheduled = false; 9003 cancelHostTimeout(); 9004 } 9005 9006 isPerformingWork = true; 9007 var previousPriorityLevel = currentPriorityLevel; 9008 9009 try { 9010 if (enableProfiling) { 9011 try { 9012 return workLoop(hasTimeRemaining, initialTime); 9013 } catch (error) { 9014 if (currentTask !== null) { 9015 var currentTime = exports.unstable_now(); 9016 markTaskErrored(currentTask, currentTime); 9017 currentTask.isQueued = false; 9018 } 9019 9020 throw error; 9021 } 9022 } else { 9023 // No catch in prod code path. 9024 return workLoop(hasTimeRemaining, initialTime); 9025 } 9026 } finally { 9027 currentTask = null; 9028 currentPriorityLevel = previousPriorityLevel; 9029 isPerformingWork = false; 9030 } 9031} 9032 9033function workLoop(hasTimeRemaining, initialTime) { 9034 var currentTime = initialTime; 9035 advanceTimers(currentTime); 9036 currentTask = peek(taskQueue); 9037 9038 while (currentTask !== null && !(enableSchedulerDebugging )) { 9039 if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) { 9040 // This currentTask hasn't expired, and we've reached the deadline. 9041 break; 9042 } 9043 9044 var callback = currentTask.callback; 9045 9046 if (typeof callback === 'function') { 9047 currentTask.callback = null; 9048 currentPriorityLevel = currentTask.priorityLevel; 9049 var didUserCallbackTimeout = currentTask.expirationTime <= currentTime; 9050 9051 var continuationCallback = callback(didUserCallbackTimeout); 9052 currentTime = exports.unstable_now(); 9053 9054 if (typeof continuationCallback === 'function') { 9055 currentTask.callback = continuationCallback; 9056 } else { 9057 9058 if (currentTask === peek(taskQueue)) { 9059 pop(taskQueue); 9060 } 9061 } 9062 9063 advanceTimers(currentTime); 9064 } else { 9065 pop(taskQueue); 9066 } 9067 9068 currentTask = peek(taskQueue); 9069 } // Return whether there's additional work 9070 9071 9072 if (currentTask !== null) { 9073 return true; 9074 } else { 9075 var firstTimer = peek(timerQueue); 9076 9077 if (firstTimer !== null) { 9078 requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime); 9079 } 9080 9081 return false; 9082 } 9083} 9084 9085function unstable_runWithPriority(priorityLevel, eventHandler) { 9086 switch (priorityLevel) { 9087 case ImmediatePriority: 9088 case UserBlockingPriority: 9089 case NormalPriority: 9090 case LowPriority: 9091 case IdlePriority: 9092 break; 9093 9094 default: 9095 priorityLevel = NormalPriority; 9096 } 9097 9098 var previousPriorityLevel = currentPriorityLevel; 9099 currentPriorityLevel = priorityLevel; 9100 9101 try { 9102 return eventHandler(); 9103 } finally { 9104 currentPriorityLevel = previousPriorityLevel; 9105 } 9106} 9107 9108function unstable_next(eventHandler) { 9109 var priorityLevel; 9110 9111 switch (currentPriorityLevel) { 9112 case ImmediatePriority: 9113 case UserBlockingPriority: 9114 case NormalPriority: 9115 // Shift down to normal priority 9116 priorityLevel = NormalPriority; 9117 break; 9118 9119 default: 9120 // Anything lower than normal priority should remain at the current level. 9121 priorityLevel = currentPriorityLevel; 9122 break; 9123 } 9124 9125 var previousPriorityLevel = currentPriorityLevel; 9126 currentPriorityLevel = priorityLevel; 9127 9128 try { 9129 return eventHandler(); 9130 } finally { 9131 currentPriorityLevel = previousPriorityLevel; 9132 } 9133} 9134 9135function unstable_wrapCallback(callback) { 9136 var parentPriorityLevel = currentPriorityLevel; 9137 return function () { 9138 // This is a fork of runWithPriority, inlined for performance. 9139 var previousPriorityLevel = currentPriorityLevel; 9140 currentPriorityLevel = parentPriorityLevel; 9141 9142 try { 9143 return callback.apply(this, arguments); 9144 } finally { 9145 currentPriorityLevel = previousPriorityLevel; 9146 } 9147 }; 9148} 9149 9150function unstable_scheduleCallback(priorityLevel, callback, options) { 9151 var currentTime = exports.unstable_now(); 9152 var startTime; 9153 9154 if (typeof options === 'object' && options !== null) { 9155 var delay = options.delay; 9156 9157 if (typeof delay === 'number' && delay > 0) { 9158 startTime = currentTime + delay; 9159 } else { 9160 startTime = currentTime; 9161 } 9162 } else { 9163 startTime = currentTime; 9164 } 9165 9166 var timeout; 9167 9168 switch (priorityLevel) { 9169 case ImmediatePriority: 9170 timeout = IMMEDIATE_PRIORITY_TIMEOUT; 9171 break; 9172 9173 case UserBlockingPriority: 9174 timeout = USER_BLOCKING_PRIORITY_TIMEOUT; 9175 break; 9176 9177 case IdlePriority: 9178 timeout = IDLE_PRIORITY_TIMEOUT; 9179 break; 9180 9181 case LowPriority: 9182 timeout = LOW_PRIORITY_TIMEOUT; 9183 break; 9184 9185 case NormalPriority: 9186 default: 9187 timeout = NORMAL_PRIORITY_TIMEOUT; 9188 break; 9189 } 9190 9191 var expirationTime = startTime + timeout; 9192 var newTask = { 9193 id: taskIdCounter++, 9194 callback: callback, 9195 priorityLevel: priorityLevel, 9196 startTime: startTime, 9197 expirationTime: expirationTime, 9198 sortIndex: -1 9199 }; 9200 9201 if (startTime > currentTime) { 9202 // This is a delayed task. 9203 newTask.sortIndex = startTime; 9204 push(timerQueue, newTask); 9205 9206 if (peek(taskQueue) === null && newTask === peek(timerQueue)) { 9207 // All tasks are delayed, and this is the task with the earliest delay. 9208 if (isHostTimeoutScheduled) { 9209 // Cancel an existing timeout. 9210 cancelHostTimeout(); 9211 } else { 9212 isHostTimeoutScheduled = true; 9213 } // Schedule a timeout. 9214 9215 9216 requestHostTimeout(handleTimeout, startTime - currentTime); 9217 } 9218 } else { 9219 newTask.sortIndex = expirationTime; 9220 push(taskQueue, newTask); 9221 // wait until the next time we yield. 9222 9223 9224 if (!isHostCallbackScheduled && !isPerformingWork) { 9225 isHostCallbackScheduled = true; 9226 requestHostCallback(flushWork); 9227 } 9228 } 9229 9230 return newTask; 9231} 9232 9233function unstable_pauseExecution() { 9234} 9235 9236function unstable_continueExecution() { 9237 9238 if (!isHostCallbackScheduled && !isPerformingWork) { 9239 isHostCallbackScheduled = true; 9240 requestHostCallback(flushWork); 9241 } 9242} 9243 9244function unstable_getFirstCallbackNode() { 9245 return peek(taskQueue); 9246} 9247 9248function unstable_cancelCallback(task) { 9249 // remove from the queue because you can't remove arbitrary nodes from an 9250 // array based heap, only the first one.) 9251 9252 9253 task.callback = null; 9254} 9255 9256function unstable_getCurrentPriorityLevel() { 9257 return currentPriorityLevel; 9258} 9259 9260var isMessageLoopRunning = false; 9261var scheduledHostCallback = null; 9262var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main 9263// thread, like user events. By default, it yields multiple times per frame. 9264// It does not attempt to align with frame boundaries, since most tasks don't 9265// need to be frame aligned; for those that do, use requestAnimationFrame. 9266 9267var frameInterval = frameYieldMs; 9268var startTime = -1; 9269 9270function shouldYieldToHost() { 9271 var timeElapsed = exports.unstable_now() - startTime; 9272 9273 if (timeElapsed < frameInterval) { 9274 // The main thread has only been blocked for a really short amount of time; 9275 // smaller than a single frame. Don't yield yet. 9276 return false; 9277 } // The main thread has been blocked for a non-negligible amount of time. We 9278 9279 9280 return true; 9281} 9282 9283function requestPaint() { 9284 9285} 9286 9287function forceFrameRate(fps) { 9288 if (fps < 0 || fps > 125) { 9289 // Using console['error'] to evade Babel and ESLint 9290 console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported'); 9291 return; 9292 } 9293 9294 if (fps > 0) { 9295 frameInterval = Math.floor(1000 / fps); 9296 } else { 9297 // reset the framerate 9298 frameInterval = frameYieldMs; 9299 } 9300} 9301 9302var performWorkUntilDeadline = function () { 9303 if (scheduledHostCallback !== null) { 9304 var currentTime = exports.unstable_now(); // Keep track of the start time so we can measure how long the main thread 9305 // has been blocked. 9306 9307 startTime = currentTime; 9308 var hasTimeRemaining = true; // If a scheduler task throws, exit the current browser task so the 9309 // error can be observed. 9310 // 9311 // Intentionally not using a try-catch, since that makes some debugging 9312 // techniques harder. Instead, if `scheduledHostCallback` errors, then 9313 // `hasMoreWork` will remain true, and we'll continue the work loop. 9314 9315 var hasMoreWork = true; 9316 9317 try { 9318 hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime); 9319 } finally { 9320 if (hasMoreWork) { 9321 // If there's more work, schedule the next message event at the end 9322 // of the preceding one. 9323 schedulePerformWorkUntilDeadline(); 9324 } else { 9325 isMessageLoopRunning = false; 9326 scheduledHostCallback = null; 9327 } 9328 } 9329 } else { 9330 isMessageLoopRunning = false; 9331 } // Yielding to the browser will give it a chance to paint, so we can 9332}; 9333 9334var schedulePerformWorkUntilDeadline; 9335 9336if (typeof localSetImmediate === 'function') { 9337 // Node.js and old IE. 9338 // There's a few reasons for why we prefer setImmediate. 9339 // 9340 // Unlike MessageChannel, it doesn't prevent a Node.js process from exiting. 9341 // (Even though this is a DOM fork of the Scheduler, you could get here 9342 // with a mix of Node.js 15+, which has a MessageChannel, and jsdom.) 9343 // https://github.com/facebook/react/issues/20756 9344 // 9345 // But also, it runs earlier which is the semantic we want. 9346 // If other browsers ever implement it, it's better to use it. 9347 // Although both of these would be inferior to native scheduling. 9348 schedulePerformWorkUntilDeadline = function () { 9349 localSetImmediate(performWorkUntilDeadline); 9350 }; 9351} else if (typeof MessageChannel !== 'undefined') { 9352 // DOM and Worker environments. 9353 // We prefer MessageChannel because of the 4ms setTimeout clamping. 9354 var channel = new MessageChannel(); 9355 var port = channel.port2; 9356 channel.port1.onmessage = performWorkUntilDeadline; 9357 9358 schedulePerformWorkUntilDeadline = function () { 9359 port.postMessage(null); 9360 }; 9361} else { 9362 // We should only fallback here in non-browser environments. 9363 schedulePerformWorkUntilDeadline = function () { 9364 localSetTimeout(performWorkUntilDeadline, 0); 9365 }; 9366} 9367 9368function requestHostCallback(callback) { 9369 scheduledHostCallback = callback; 9370 9371 if (!isMessageLoopRunning) { 9372 isMessageLoopRunning = true; 9373 schedulePerformWorkUntilDeadline(); 9374 } 9375} 9376 9377function requestHostTimeout(callback, ms) { 9378 taskTimeoutID = localSetTimeout(function () { 9379 callback(exports.unstable_now()); 9380 }, ms); 9381} 9382 9383function cancelHostTimeout() { 9384 localClearTimeout(taskTimeoutID); 9385 taskTimeoutID = -1; 9386} 9387 9388var unstable_requestPaint = requestPaint; 9389var unstable_Profiling = null; 9390 9391exports.unstable_IdlePriority = IdlePriority; 9392exports.unstable_ImmediatePriority = ImmediatePriority; 9393exports.unstable_LowPriority = LowPriority; 9394exports.unstable_NormalPriority = NormalPriority; 9395exports.unstable_Profiling = unstable_Profiling; 9396exports.unstable_UserBlockingPriority = UserBlockingPriority; 9397exports.unstable_cancelCallback = unstable_cancelCallback; 9398exports.unstable_continueExecution = unstable_continueExecution; 9399exports.unstable_forceFrameRate = forceFrameRate; 9400exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel; 9401exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode; 9402exports.unstable_next = unstable_next; 9403exports.unstable_pauseExecution = unstable_pauseExecution; 9404exports.unstable_requestPaint = unstable_requestPaint; 9405exports.unstable_runWithPriority = unstable_runWithPriority; 9406exports.unstable_scheduleCallback = unstable_scheduleCallback; 9407exports.unstable_shouldYield = shouldYieldToHost; 9408exports.unstable_wrapCallback = unstable_wrapCallback; 9409 /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 9410if ( 9411 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 9412 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 9413 'function' 9414) { 9415 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); 9416} 9417 9418 })(); 9419} 9420 9421 9422/***/ }), 9423
vendor: 439 bytes, lines 9424-9439
9424/***/ "./node_modules/scheduler/index.js": 9425/*!*****************************************!*\ 9426 !*** ./node_modules/scheduler/index.js ***! 9427 \*****************************************/ 9428/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 9429 9430"use strict"; 9431 9432 9433if (false) {} else { 9434 module.exports = __webpack_require__(/*! ./cjs/scheduler.development.js */ "./node_modules/scheduler/cjs/scheduler.development.js"); 9435} 9436 9437 9438/***/ }), 9439
vendor: 8,890 bytes, lines 9440-9689
9440/***/ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js": 9441/*!**********************************************************************************************!*\ 9442 !*** ./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js ***! 9443 \**********************************************************************************************/ 9444/***/ ((__unused_webpack_module, exports, __webpack_require__) => { 9445 9446"use strict"; 9447/** 9448 * @license React 9449 * use-sync-external-store-shim.development.js 9450 * 9451 * Copyright (c) Facebook, Inc. and its affiliates. 9452 * 9453 * This source code is licensed under the MIT license found in the 9454 * LICENSE file in the root directory of this source tree. 9455 */ 9456 9457 9458 9459if (true) { 9460 (function() { 9461 9462 'use strict'; 9463 9464/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 9465if ( 9466 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 9467 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 9468 'function' 9469) { 9470 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); 9471} 9472 var React = __webpack_require__(/*! react */ "react"); 9473 9474var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; 9475 9476function error(format) { 9477 { 9478 { 9479 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 9480 args[_key2 - 1] = arguments[_key2]; 9481 } 9482 9483 printWarning('error', format, args); 9484 } 9485 } 9486} 9487 9488function printWarning(level, format, args) { 9489 // When changing this logic, you might want to also 9490 // update consoleWithStackDev.www.js as well. 9491 { 9492 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; 9493 var stack = ReactDebugCurrentFrame.getStackAddendum(); 9494 9495 if (stack !== '') { 9496 format += '%s'; 9497 args = args.concat([stack]); 9498 } // eslint-disable-next-line react-internal/safe-string-coercion 9499 9500 9501 var argsWithFormat = args.map(function (item) { 9502 return String(item); 9503 }); // Careful: RN currently depends on this prefix 9504 9505 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it 9506 // breaks IE9: https://github.com/facebook/react/issues/13610 9507 // eslint-disable-next-line react-internal/no-production-logging 9508 9509 Function.prototype.apply.call(console[level], console, argsWithFormat); 9510 } 9511} 9512 9513/** 9514 * inlined Object.is polyfill to avoid requiring consumers ship their own 9515 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 9516 */ 9517function is(x, y) { 9518 return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare 9519 ; 9520} 9521 9522var objectIs = typeof Object.is === 'function' ? Object.is : is; 9523 9524// dispatch for CommonJS interop named imports. 9525 9526var useState = React.useState, 9527 useEffect = React.useEffect, 9528 useLayoutEffect = React.useLayoutEffect, 9529 useDebugValue = React.useDebugValue; 9530var didWarnOld18Alpha = false; 9531var didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works 9532// because of a very particular set of implementation details and assumptions 9533// -- change any one of them and it will break. The most important assumption 9534// is that updates are always synchronous, because concurrent rendering is 9535// only available in versions of React that also have a built-in 9536// useSyncExternalStore API. And we only use this shim when the built-in API 9537// does not exist. 9538// 9539// Do not assume that the clever hacks used by this hook also work in general. 9540// The point of this shim is to replace the need for hacks by other libraries. 9541 9542function useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of 9543// React do not expose a way to check if we're hydrating. So users of the shim 9544// will need to track that themselves and return the correct value 9545// from `getSnapshot`. 9546getServerSnapshot) { 9547 { 9548 if (!didWarnOld18Alpha) { 9549 if (React.startTransition !== undefined) { 9550 didWarnOld18Alpha = true; 9551 9552 error('You are using an outdated, pre-release alpha of React 18 that ' + 'does not support useSyncExternalStore. The ' + 'use-sync-external-store shim will not work correctly. Upgrade ' + 'to a newer pre-release.'); 9553 } 9554 } 9555 } // Read the current snapshot from the store on every render. Again, this 9556 // breaks the rules of React, and only works here because of specific 9557 // implementation details, most importantly that updates are 9558 // always synchronous. 9559 9560 9561 var value = getSnapshot(); 9562 9563 { 9564 if (!didWarnUncachedGetSnapshot) { 9565 var cachedValue = getSnapshot(); 9566 9567 if (!objectIs(value, cachedValue)) { 9568 error('The result of getSnapshot should be cached to avoid an infinite loop'); 9569 9570 didWarnUncachedGetSnapshot = true; 9571 } 9572 } 9573 } // Because updates are synchronous, we don't queue them. Instead we force a 9574 // re-render whenever the subscribed state changes by updating an some 9575 // arbitrary useState hook. Then, during render, we call getSnapshot to read 9576 // the current value. 9577 // 9578 // Because we don't actually use the state returned by the useState hook, we 9579 // can save a bit of memory by storing other stuff in that slot. 9580 // 9581 // To implement the early bailout, we need to track some things on a mutable 9582 // object. Usually, we would put that in a useRef hook, but we can stash it in 9583 // our useState hook instead. 9584 // 9585 // To force a re-render, we call forceUpdate({inst}). That works because the 9586 // new object always fails an equality check. 9587 9588 9589 var _useState = useState({ 9590 inst: { 9591 value: value, 9592 getSnapshot: getSnapshot 9593 } 9594 }), 9595 inst = _useState[0].inst, 9596 forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated 9597 // in the layout phase so we can access it during the tearing check that 9598 // happens on subscribe. 9599 9600 9601 useLayoutEffect(function () { 9602 inst.value = value; 9603 inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the 9604 // commit phase if there was an interleaved mutation. In concurrent mode 9605 // this can happen all the time, but even in synchronous mode, an earlier 9606 // effect may have mutated the store. 9607 9608 if (checkIfSnapshotChanged(inst)) { 9609 // Force a re-render. 9610 forceUpdate({ 9611 inst: inst 9612 }); 9613 } 9614 }, [subscribe, value, getSnapshot]); 9615 useEffect(function () { 9616 // Check for changes right before subscribing. Subsequent changes will be 9617 // detected in the subscription handler. 9618 if (checkIfSnapshotChanged(inst)) { 9619 // Force a re-render. 9620 forceUpdate({ 9621 inst: inst 9622 }); 9623 } 9624 9625 var handleStoreChange = function () { 9626 // TODO: Because there is no cross-renderer API for batching updates, it's 9627 // up to the consumer of this library to wrap their subscription event 9628 // with unstable_batchedUpdates. Should we try to detect when this isn't 9629 // the case and print a warning in development? 9630 // The store changed. Check if the snapshot changed since the last time we 9631 // read from the store. 9632 if (checkIfSnapshotChanged(inst)) { 9633 // Force a re-render. 9634 forceUpdate({ 9635 inst: inst 9636 }); 9637 } 9638 }; // Subscribe to the store and return a clean-up function. 9639 9640 9641 return subscribe(handleStoreChange); 9642 }, [subscribe]); 9643 useDebugValue(value); 9644 return value; 9645} 9646 9647function checkIfSnapshotChanged(inst) { 9648 var latestGetSnapshot = inst.getSnapshot; 9649 var prevValue = inst.value; 9650 9651 try { 9652 var nextValue = latestGetSnapshot(); 9653 return !objectIs(prevValue, nextValue); 9654 } catch (error) { 9655 return true; 9656 } 9657} 9658 9659function useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) { 9660 // Note: The shim does not use getServerSnapshot, because pre-18 versions of 9661 // React do not expose a way to check if we're hydrating. So users of the shim 9662 // will need to track that themselves and return the correct value 9663 // from `getSnapshot`. 9664 return getSnapshot(); 9665} 9666 9667var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined'); 9668 9669var isServerEnvironment = !canUseDOM; 9670 9671var shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore; 9672var useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim; 9673 9674exports.useSyncExternalStore = useSyncExternalStore$2; 9675 /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 9676if ( 9677 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 9678 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 9679 'function' 9680) { 9681 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); 9682} 9683 9684 })(); 9685} 9686 9687 9688/***/ }), 9689
vendor: 6,293 bytes, lines 9690-9865
9690/***/ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js": 9691/*!************************************************************************************************************!*\ 9692 !*** ./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js ***! 9693 \************************************************************************************************************/ 9694/***/ ((__unused_webpack_module, exports, __webpack_require__) => { 9695 9696"use strict"; 9697/** 9698 * @license React 9699 * use-sync-external-store-shim/with-selector.development.js 9700 * 9701 * Copyright (c) Facebook, Inc. and its affiliates. 9702 * 9703 * This source code is licensed under the MIT license found in the 9704 * LICENSE file in the root directory of this source tree. 9705 */ 9706 9707 9708 9709if (true) { 9710 (function() { 9711 9712 'use strict'; 9713 9714/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 9715if ( 9716 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 9717 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === 9718 'function' 9719) { 9720 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error()); 9721} 9722 var React = __webpack_require__(/*! react */ "react"); 9723var shim = __webpack_require__(/*! use-sync-external-store/shim */ "./node_modules/use-sync-external-store/shim/index.js"); 9724 9725/** 9726 * inlined Object.is polyfill to avoid requiring consumers ship their own 9727 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is 9728 */ 9729function is(x, y) { 9730 return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare 9731 ; 9732} 9733 9734var objectIs = typeof Object.is === 'function' ? Object.is : is; 9735 9736var useSyncExternalStore = shim.useSyncExternalStore; 9737 9738// for CommonJS interop. 9739 9740var useRef = React.useRef, 9741 useEffect = React.useEffect, 9742 useMemo = React.useMemo, 9743 useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments. 9744 9745function useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) { 9746 // Use this to track the rendered snapshot. 9747 var instRef = useRef(null); 9748 var inst; 9749 9750 if (instRef.current === null) { 9751 inst = { 9752 hasValue: false, 9753 value: null 9754 }; 9755 instRef.current = inst; 9756 } else { 9757 inst = instRef.current; 9758 } 9759 9760 var _useMemo = useMemo(function () { 9761 // Track the memoized state using closure variables that are local to this 9762 // memoized instance of a getSnapshot function. Intentionally not using a 9763 // useRef hook, because that state would be shared across all concurrent 9764 // copies of the hook/component. 9765 var hasMemo = false; 9766 var memoizedSnapshot; 9767 var memoizedSelection; 9768 9769 var memoizedSelector = function (nextSnapshot) { 9770 if (!hasMemo) { 9771 // The first time the hook is called, there is no memoized result. 9772 hasMemo = true; 9773 memoizedSnapshot = nextSnapshot; 9774 9775 var _nextSelection = selector(nextSnapshot); 9776 9777 if (isEqual !== undefined) { 9778 // Even if the selector has changed, the currently rendered selection 9779 // may be equal to the new selection. We should attempt to reuse the 9780 // current value if possible, to preserve downstream memoizations. 9781 if (inst.hasValue) { 9782 var currentSelection = inst.value; 9783 9784 if (isEqual(currentSelection, _nextSelection)) { 9785 memoizedSelection = currentSelection; 9786 return currentSelection; 9787 } 9788 } 9789 } 9790 9791 memoizedSelection = _nextSelection; 9792 return _nextSelection; 9793 } // We may be able to reuse the previous invocation's result. 9794 9795 9796 // We may be able to reuse the previous invocation's result. 9797 var prevSnapshot = memoizedSnapshot; 9798 var prevSelection = memoizedSelection; 9799 9800 if (objectIs(prevSnapshot, nextSnapshot)) { 9801 // The snapshot is the same as last time. Reuse the previous selection. 9802 return prevSelection; 9803 } // The snapshot has changed, so we need to compute a new selection. 9804 9805 9806 // The snapshot has changed, so we need to compute a new selection. 9807 var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data 9808 // has changed. If it hasn't, return the previous selection. That signals 9809 // to React that the selections are conceptually equal, and we can bail 9810 // out of rendering. 9811 9812 // If a custom isEqual function is provided, use that to check if the data 9813 // has changed. If it hasn't, return the previous selection. That signals 9814 // to React that the selections are conceptually equal, and we can bail 9815 // out of rendering. 9816 if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) { 9817 return prevSelection; 9818 } 9819 9820 memoizedSnapshot = nextSnapshot; 9821 memoizedSelection = nextSelection; 9822 return nextSelection; 9823 }; // Assigning this to a constant so that Flow knows it can't change. 9824 9825 9826 // Assigning this to a constant so that Flow knows it can't change. 9827 var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot; 9828 9829 var getSnapshotWithSelector = function () { 9830 return memoizedSelector(getSnapshot()); 9831 }; 9832 9833 var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () { 9834 return memoizedSelector(maybeGetServerSnapshot()); 9835 }; 9836 return [getSnapshotWithSelector, getServerSnapshotWithSelector]; 9837 }, [getSnapshot, getServerSnapshot, selector, isEqual]), 9838 getSelection = _useMemo[0], 9839 getServerSelection = _useMemo[1]; 9840 9841 var value = useSyncExternalStore(subscribe, getSelection, getServerSelection); 9842 useEffect(function () { 9843 inst.hasValue = true; 9844 inst.value = value; 9845 }, [value]); 9846 useDebugValue(value); 9847 return value; 9848} 9849 9850exports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector; 9851 /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */ 9852if ( 9853 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && 9854 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === 9855 'function' 9856) { 9857 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error()); 9858} 9859 9860 })(); 9861} 9862 9863 9864/***/ }), 9865
vendor: 568 bytes, lines 9866-9881
9866/***/ "./node_modules/use-sync-external-store/shim/index.js": 9867/*!************************************************************!*\ 9868 !*** ./node_modules/use-sync-external-store/shim/index.js ***! 9869 \************************************************************/ 9870/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 9871 9872"use strict"; 9873 9874 9875if (false) {} else { 9876 module.exports = __webpack_require__(/*! ../cjs/use-sync-external-store-shim.development.js */ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"); 9877} 9878 9879 9880/***/ }), 9881
vendor: 2,839 bytes, lines 9882-10007
9882/***/ "./node_modules/use-sync-external-store/shim/with-selector.js": 9883/*!********************************************************************!*\ 9884 !*** ./node_modules/use-sync-external-store/shim/with-selector.js ***! 9885 \********************************************************************/ 9886/***/ ((module, __unused_webpack_exports, __webpack_require__) => { 9887 9888"use strict"; 9889 9890 9891if (false) {} else { 9892 module.exports = __webpack_require__(/*! ../cjs/use-sync-external-store-shim/with-selector.development.js */ "./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"); 9893} 9894 9895 9896/***/ }), 9897 9898/***/ "react-dom/client": 9899/*!***************************!*\ 9900 !*** external "ReactDOM" ***! 9901 \***************************/ 9902/***/ ((module) => { 9903 9904"use strict"; 9905module.exports = ReactDOM; 9906 9907/***/ }), 9908 9909/***/ "react": 9910/*!************************!*\ 9911 !*** external "React" ***! 9912 \************************/ 9913/***/ ((module) => { 9914 9915"use strict"; 9916module.exports = window["React"]; 9917 9918/***/ }), 9919 9920/***/ "react-dom": 9921/*!***************************!*\ 9922 !*** external "ReactDOM" ***! 9923 \***************************/ 9924/***/ ((module) => { 9925 9926"use strict"; 9927module.exports = window["ReactDOM"]; 9928 9929/***/ }), 9930 9931/***/ "lodash": 9932/*!*************************!*\ 9933 !*** external "lodash" ***! 9934 \*************************/ 9935/***/ ((module) => { 9936 9937"use strict"; 9938module.exports = window["lodash"]; 9939 9940/***/ }), 9941 9942/***/ "@lapilli-ui/components": 9943/*!*******************************************!*\ 9944 !*** external ["lapilliUI","components"] ***! 9945 \*******************************************/ 9946/***/ ((module) => { 9947 9948"use strict"; 9949module.exports = window["lapilliUI"]["components"]; 9950 9951/***/ }), 9952 9953/***/ "@lapilli-ui/styles": 9954/*!***************************************!*\ 9955 !*** external ["lapilliUI","styles"] ***! 9956 \***************************************/ 9957/***/ ((module) => { 9958 9959"use strict"; 9960module.exports = window["lapilliUI"]["styles"]; 9961 9962/***/ }), 9963 9964/***/ "@wordpress/api-fetch": 9965/*!**********************************!*\ 9966 !*** external ["wp","apiFetch"] ***! 9967 \**********************************/ 9968/***/ ((module) => { 9969 9970"use strict"; 9971module.exports = window["wp"]["apiFetch"]; 9972 9973/***/ }), 9974 9975/***/ "@wordpress/hooks": 9976/*!*******************************!*\ 9977 !*** external ["wp","hooks"] ***! 9978 \*******************************/ 9979/***/ ((module) => { 9980 9981"use strict"; 9982module.exports = window["wp"]["hooks"]; 9983 9984/***/ }), 9985 9986/***/ "@wordpress/i18n": 9987/*!******************************!*\ 9988 !*** external ["wp","i18n"] ***! 9989 \******************************/ 9990/***/ ((module) => { 9991 9992"use strict"; 9993module.exports = window["wp"]["i18n"]; 9994 9995/***/ }), 9996 9997/***/ "@wordpress/url": 9998/*!*****************************!*\ 9999 !*** external ["wp","url"] ***! 10000 \*****************************/ 10001/***/ ((module) => { 10002 10003"use strict"; 10004module.exports = window["wp"]["url"]; 10005 10006/***/ }), 10007
vendor: 1,883 bytes, lines 10008-10093
10008/***/ "./node_modules/classnames/index.js": 10009/*!******************************************!*\ 10010 !*** ./node_modules/classnames/index.js ***! 10011 \******************************************/ 10012/***/ ((module, exports) => { 10013 10014var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 10015 Copyright (c) 2018 Jed Watson. 10016 Licensed under the MIT License (MIT), see 10017 http://jedwatson.github.io/classnames 10018*/ 10019/* global define */ 10020 10021(function () { 10022 'use strict'; 10023 10024 var hasOwn = {}.hasOwnProperty; 10025 10026 function classNames () { 10027 var classes = ''; 10028 10029 for (var i = 0; i < arguments.length; i++) { 10030 var arg = arguments[i]; 10031 if (arg) { 10032 classes = appendClass(classes, parseValue(arg)); 10033 } 10034 } 10035 10036 return classes; 10037 } 10038 10039 function parseValue (arg) { 10040 if (typeof arg === 'string' || typeof arg === 'number') { 10041 return arg; 10042 } 10043 10044 if (typeof arg !== 'object') { 10045 return ''; 10046 } 10047 10048 if (Array.isArray(arg)) { 10049 return classNames.apply(null, arg); 10050 } 10051 10052 if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) { 10053 return arg.toString(); 10054 } 10055 10056 var classes = ''; 10057 10058 for (var key in arg) { 10059 if (hasOwn.call(arg, key) && arg[key]) { 10060 classes = appendClass(classes, key); 10061 } 10062 } 10063 10064 return classes; 10065 } 10066 10067 function appendClass (value, newClass) { 10068 if (!newClass) { 10069 return value; 10070 } 10071 10072 if (value) { 10073 return value + ' ' + newClass; 10074 } 10075 10076 return value + newClass; 10077 } 10078 10079 if ( true && module.exports) { 10080 classNames.default = classNames; 10081 module.exports = classNames; 10082 } else if (true) { 10083 // register as 'classnames', consistent with npm package name 10084 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { 10085 return classNames; 10086 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 10087 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 10088 } else {} 10089}()); 10090 10091 10092/***/ }), 10093
vendor: 1,046 bytes, lines 10094-10118
10094/***/ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js": 10095/*!*******************************************************************!*\ 10096 !*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***! 10097 \*******************************************************************/ 10098/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10099 10100"use strict"; 10101__webpack_require__.r(__webpack_exports__); 10102/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10103/* harmony export */ "default": () => (/* binding */ _defineProperty) 10104/* harmony export */ }); 10105/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js"); 10106 10107function _defineProperty(e, r, t) { 10108 return (r = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__["default"])(r)) in e ? Object.defineProperty(e, r, { 10109 value: t, 10110 enumerable: !0, 10111 configurable: !0, 10112 writable: !0 10113 }) : e[r] = t, e; 10114} 10115 10116 10117/***/ }), 10118
vendor: 884 bytes, lines 10119-10142
10119/***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": 10120/*!************************************************************!*\ 10121 !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! 10122 \************************************************************/ 10123/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10124 10125"use strict"; 10126__webpack_require__.r(__webpack_exports__); 10127/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10128/* harmony export */ "default": () => (/* binding */ _extends) 10129/* harmony export */ }); 10130function _extends() { 10131 return _extends = Object.assign ? Object.assign.bind() : function (n) { 10132 for (var e = 1; e < arguments.length; e++) { 10133 var t = arguments[e]; 10134 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); 10135 } 10136 return n; 10137 }, _extends.apply(null, arguments); 10138} 10139 10140 10141/***/ }), 10142
vendor: 1,600 bytes, lines 10143-10180
10143/***/ "./node_modules/@babel/runtime/helpers/esm/objectSpread2.js": 10144/*!******************************************************************!*\ 10145 !*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***! 10146 \******************************************************************/ 10147/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10148 10149"use strict"; 10150__webpack_require__.r(__webpack_exports__); 10151/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10152/* harmony export */ "default": () => (/* binding */ _objectSpread2) 10153/* harmony export */ }); 10154/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "./node_modules/@babel/runtime/helpers/esm/defineProperty.js"); 10155 10156function ownKeys(e, r) { 10157 var t = Object.keys(e); 10158 if (Object.getOwnPropertySymbols) { 10159 var o = Object.getOwnPropertySymbols(e); 10160 r && (o = o.filter(function (r) { 10161 return Object.getOwnPropertyDescriptor(e, r).enumerable; 10162 })), t.push.apply(t, o); 10163 } 10164 return t; 10165} 10166function _objectSpread2(e) { 10167 for (var r = 1; r < arguments.length; r++) { 10168 var t = null != arguments[r] ? arguments[r] : {}; 10169 r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { 10170 (0,_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__["default"])(e, r, t[r]); 10171 }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { 10172 Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); 10173 }); 10174 } 10175 return e; 10176} 10177 10178 10179/***/ }), 10180
vendor: 896 bytes, lines 10181-10204
10181/***/ "./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js": 10182/*!*********************************************************************************!*\ 10183 !*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***! 10184 \*********************************************************************************/ 10185/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10186 10187"use strict"; 10188__webpack_require__.r(__webpack_exports__); 10189/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10190/* harmony export */ "default": () => (/* binding */ _objectWithoutPropertiesLoose) 10191/* harmony export */ }); 10192function _objectWithoutPropertiesLoose(r, e) { 10193 if (null == r) return {}; 10194 var t = {}; 10195 for (var n in r) if ({}.hasOwnProperty.call(r, n)) { 10196 if (e.includes(n)) continue; 10197 t[n] = r[n]; 10198 } 10199 return t; 10200} 10201 10202 10203/***/ }), 10204
vendor: 1,193 bytes, lines 10205-10231
10205/***/ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js": 10206/*!****************************************************************!*\ 10207 !*** ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js ***! 10208 \****************************************************************/ 10209/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10210 10211"use strict"; 10212__webpack_require__.r(__webpack_exports__); 10213/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10214/* harmony export */ "default": () => (/* binding */ toPrimitive) 10215/* harmony export */ }); 10216/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); 10217 10218function toPrimitive(t, r) { 10219 if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(t) || !t) return t; 10220 var e = t[Symbol.toPrimitive]; 10221 if (void 0 !== e) { 10222 var i = e.call(t, r || "default"); 10223 if ("object" != (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i)) return i; 10224 throw new TypeError("@@toPrimitive must return a primitive value."); 10225 } 10226 return ("string" === r ? String : Number)(t); 10227} 10228 10229 10230/***/ }), 10231
vendor: 1,156 bytes, lines 10232-10254
10232/***/ "./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js": 10233/*!******************************************************************!*\ 10234 !*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js ***! 10235 \******************************************************************/ 10236/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10237 10238"use strict"; 10239__webpack_require__.r(__webpack_exports__); 10240/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10241/* harmony export */ "default": () => (/* binding */ toPropertyKey) 10242/* harmony export */ }); 10243/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "./node_modules/@babel/runtime/helpers/esm/typeof.js"); 10244/* harmony import */ var _toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./toPrimitive.js */ "./node_modules/@babel/runtime/helpers/esm/toPrimitive.js"); 10245 10246 10247function toPropertyKey(t) { 10248 var i = (0,_toPrimitive_js__WEBPACK_IMPORTED_MODULE_1__["default"])(t, "string"); 10249 return "symbol" == (0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__["default"])(i) ? i : i + ""; 10250} 10251 10252 10253/***/ }), 10254
vendor: 910 bytes, lines 10255-10278
10255/***/ "./node_modules/@babel/runtime/helpers/esm/typeof.js": 10256/*!***********************************************************!*\ 10257 !*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***! 10258 \***********************************************************/ 10259/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10260 10261"use strict"; 10262__webpack_require__.r(__webpack_exports__); 10263/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10264/* harmony export */ "default": () => (/* binding */ _typeof) 10265/* harmony export */ }); 10266function _typeof(o) { 10267 "@babel/helpers - typeof"; 10268 10269 return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { 10270 return typeof o; 10271 } : function (o) { 10272 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; 10273 }, _typeof(o); 10274} 10275 10276 10277/***/ }), 10278
vendor: 19,682 bytes, lines 10279-10316
10279/***/ "./node_modules/immer/dist/immer.esm.mjs": 10280/*!***********************************************!*\ 10281 !*** ./node_modules/immer/dist/immer.esm.mjs ***! 10282 \***********************************************/ 10283/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10284 10285"use strict"; 10286__webpack_require__.r(__webpack_exports__); 10287/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10288/* harmony export */ Immer: () => (/* binding */ un), 10289/* harmony export */ applyPatches: () => (/* binding */ pn), 10290/* harmony export */ castDraft: () => (/* binding */ K), 10291/* harmony export */ castImmutable: () => (/* binding */ $), 10292/* harmony export */ createDraft: () => (/* binding */ ln), 10293/* harmony export */ current: () => (/* binding */ R), 10294/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 10295/* harmony export */ enableAllPlugins: () => (/* binding */ J), 10296/* harmony export */ enableES5: () => (/* binding */ F), 10297/* harmony export */ enableMapSet: () => (/* binding */ C), 10298/* harmony export */ enablePatches: () => (/* binding */ T), 10299/* harmony export */ finishDraft: () => (/* binding */ dn), 10300/* harmony export */ freeze: () => (/* binding */ d), 10301/* harmony export */ immerable: () => (/* binding */ L), 10302/* harmony export */ isDraft: () => (/* binding */ r), 10303/* harmony export */ isDraftable: () => (/* binding */ t), 10304/* harmony export */ nothing: () => (/* binding */ H), 10305/* harmony export */ original: () => (/* binding */ e), 10306/* harmony export */ produce: () => (/* binding */ fn), 10307/* harmony export */ produceWithPatches: () => (/* binding */ cn), 10308/* harmony export */ setAutoFreeze: () => (/* binding */ sn), 10309/* harmony export */ setUseProxies: () => (/* binding */ vn) 10310/* harmony export */ }); 10311function 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.add(t):n[r]=t}function c(n,r){return n===r?0!==n||1/n==1/r:n!=n&&r!=r}function s(n){return X&&n instanceof Map}function v(n){return q&&n instanceof Set}function p(n){return n.o||n.t}function l(n){if(Array.isArray(n))return Array.prototype.slice.call(n);var r=rn(n);delete r[Q];for(var t=nn(r),e=0;e<t.length;e++){var i=t[e],o=r[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(r[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:n[i]})}return Object.create(Object.getPrototypeOf(n),r)}function d(n,e){return void 0===e&&(e=!1),y(n)||r(n)||!t(n)||(o(n)>1&&(n.set=n.add=n.clear=n.delete=h),Object.freeze(n),e&&i(n,(function(n,r){return d(r,!0)}),!0)),n}function h(){n(2)}function y(n){return null==n||"object"!=typeof n||Object.isFrozen(n)}function b(r){var t=tn[r];return t||n(18,r),t}function m(n,r){tn[n]||(tn[n]=r)}function _(){return false||U||n(0),U}function j(n,r){r&&(b("Patches"),n.u=[],n.s=[],n.v=r)}function g(n){O(n),n.p.forEach(S),n.p=null}function O(n){n===U&&(U=n.l)}function w(n){return U={p:[],l:U,h:n,m:!0,_:0}}function S(n){var r=n[Q];0===r.i||1===r.i?r.j():r.g=!0}function P(r,e){e._=e.p.length;var i=e.p[0],o=void 0!==r&&r!==i;return e.h.O||b("ES5").S(e,r,o),o?(i[Q].P&&(g(e),n(4)),t(r)&&(r=M(e,r),e.l||x(e,r)),e.u&&b("Patches").M(i[Q].t,r,e.u,e.s)):r=M(e,i,[]),g(e),e.u&&e.v(e.u,e.s),r!==H?r:void 0}function M(n,r,t){if(y(r))return r;var e=r[Q];if(!e)return i(r,(function(i,o){return A(n,e,r,i,o,t)}),!0),r;if(e.A!==n)return r;if(!e.P)return x(n,e.t,!0),e.t;if(!e.I){e.I=!0,e.A._--;var o=4===e.i||5===e.i?e.o=l(e.k):e.o,u=o,a=!1;3===e.i&&(u=new Set(o),o.clear(),a=!0),i(u,(function(r,i){return A(n,e,o,r,i,t,a)})),x(n,o,!1),t&&n.u&&b("Patches").N(e,t,n.u,n.s)}return e.o}function A(e,i,o,a,c,s,v){if( true&&c===o&&n(5),r(c)){var p=M(e,c,s&&i&&3!==i.i&&!u(i.R,a)?s.concat(a):void 0);if(f(o,a,p),!r(p))return;e.m=!1}else v&&o.add(c);if(t(c)&&!y(c)){if(!e.h.D&&e._<1)return;M(e,c),i&&i.A.l||x(e,c)}}function x(n,r,t){void 0===t&&(t=!1),!n.l&&n.h.D&&n.m&&d(r,t)}function z(n,r){var t=n[Q];return(t?p(t):n)[r]}function I(n,r){if(r in n)for(var t=Object.getPrototypeOf(n);t;){var e=Object.getOwnPropertyDescriptor(t,r);if(e)return e;t=Object.getPrototypeOf(t)}}function k(n){n.P||(n.P=!0,n.l&&k(n.l))}function E(n){n.o||(n.o=l(n.t))}function N(n,r,t){var e=s(r)?b("MapSet").F(r,t):v(r)?b("MapSet").T(r,t):n.O?function(n,r){var t=Array.isArray(n),e={i:t?1:0,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:null,o:null,j:null,C:!1},i=e,o=en;t&&(i=[e],o=on);var u=Proxy.revocable(i,o),a=u.revoke,f=u.proxy;return e.k=f,e.j=a,f}(r,t):b("ES5").J(r,t);return(t?t.A:_()).p.push(e),e}function R(e){return r(e)||n(22,e),function n(r){if(!t(r))return r;var e,u=r[Q],c=o(r);if(u){if(!u.P&&(u.i<4||!b("ES5").K(u)))return u.t;u.I=!0,e=D(r,c),u.I=!1}else e=D(r,c);return i(e,(function(r,t){u&&a(u.t,r)===t||f(e,r,n(t))})),3===c?new Set(e):e}(e)}function D(n,r){switch(r){case 2:return new Map(n);case 3:return Array.from(n)}return l(n)}function F(){function t(n,r){var t=s[n];return t?t.enumerable=r:s[n]=t={configurable:!0,enumerable:r,get:function(){var r=this[Q];return true&&f(r),en.get(r,n)},set:function(r){var t=this[Q]; true&&f(t),en.set(t,n,r)}},t}function e(n){for(var r=n.length-1;r>=0;r--){var t=n[r][Q];if(!t.P)switch(t.i){case 5:a(t)&&k(t);break;case 4:o(t)&&k(t)}}}function o(n){for(var r=n.t,t=n.k,e=nn(t),i=e.length-1;i>=0;i--){var o=e[i];if(o!==Q){var a=r[o];if(void 0===a&&!u(r,o))return!0;var f=t[o],s=f&&f[Q];if(s?s.t!==a:!c(f,a))return!0}}var v=!!r[Q];return e.length!==nn(r).length+(v?0:1)}function a(n){var r=n.k;if(r.length!==n.t.length)return!0;var t=Object.getOwnPropertyDescriptor(r,r.length-1);if(t&&!t.get)return!0;for(var e=0;e<r.length;e++)if(!r.hasOwnProperty(e))return!0;return!1}function f(r){r.g&&n(3,JSON.stringify(p(r)))}var s={};m("ES5",{J:function(n,r){var e=Array.isArray(n),i=function(n,r){if(n){for(var e=Array(r.length),i=0;i<r.length;i++)Object.defineProperty(e,""+i,t(i,!0));return e}var o=rn(r);delete o[Q];for(var u=nn(o),a=0;a<u.length;a++){var f=u[a];o[f]=t(f,n||!!o[f].enumerable)}return Object.create(Object.getPrototypeOf(r),o)}(e,n),o={i:e?5:4,A:r?r.A:_(),P:!1,I:!1,R:{},l:r,t:n,k:i,o:null,g:!1,C:!1};return Object.defineProperty(i,Q,{value:o,writable:!0}),i},S:function(n,t,o){o?r(t)&&t[Q].A===n&&e(n.p):(n.u&&function n(r){if(r&&"object"==typeof r){var t=r[Q];if(t){var e=t.t,o=t.k,f=t.R,c=t.i;if(4===c)i(o,(function(r){r!==Q&&(void 0!==e[r]||u(e,r)?f[r]||n(o[r]):(f[r]=!0,k(t)))})),i(e,(function(n){void 0!==o[n]||u(o,n)||(f[n]=!1,k(t))}));else if(5===c){if(a(t)&&(k(t),f.length=!0),o.length<e.length)for(var s=o.length;s<e.length;s++)f[s]=!1;else for(var v=e.length;v<o.length;v++)f[v]=!0;for(var p=Math.min(o.length,e.length),l=0;l<p;l++)o.hasOwnProperty(l)||(f[l]=!0),void 0===f[l]&&n(o[l])}}}}(n.p[0]),e(n.p))},K:function(n){return 4===n.i?o(n):a(n)}})}function T(){function e(n){if(!t(n))return n;if(Array.isArray(n))return n.map(e);if(s(n))return new Map(Array.from(n.entries()).map((function(n){return[n[0],e(n[1])]})));if(v(n))return new Set(Array.from(n).map(e));var r=Object.create(Object.getPrototypeOf(n));for(var i in n)r[i]=e(n[i]);return u(n,L)&&(r[L]=n[L]),r}function f(n){return r(n)?e(n):n}var c="add";m("Patches",{$:function(r,t){return t.forEach((function(t){for(var i=t.path,u=t.op,f=r,s=0;s<i.length-1;s++){var v=o(f),p=i[s];"string"!=typeof p&&"number"!=typeof p&&(p=""+p),0!==v&&1!==v||"__proto__"!==p&&"constructor"!==p||n(24),"function"==typeof f&&"prototype"===p&&n(24),"object"!=typeof(f=a(f,p))&&n(15,i.join("/"))}var l=o(f),d=e(t.value),h=i[i.length-1];switch(u){case"replace":switch(l){case 2:return f.set(h,d);case 3:n(16);default:return f[h]=d}case c:switch(l){case 1:return"-"===h?f.push(d):f.splice(h,0,d);case 2:return f.set(h,d);case 3:return f.add(d);default:return f[h]=d}case"remove":switch(l){case 1:return f.splice(h,1);case 2:return f.delete(h);case 3:return f.delete(t.value);default:return delete f[h]}default:n(17,u)}})),r},N:function(n,r,t,e){switch(n.i){case 0:case 4:case 2:return function(n,r,t,e){var o=n.t,s=n.o;i(n.R,(function(n,i){var v=a(o,n),p=a(s,n),l=i?u(o,n)?"replace":c:"remove";if(v!==p||"replace"!==l){var d=r.concat(n);t.push("remove"===l?{op:l,path:d}:{op:l,path:d,value:p}),e.push(l===c?{op:"remove",path:d}:"remove"===l?{op:c,path:d,value:f(v)}:{op:"replace",path:d,value:f(v)})}}))}(n,r,t,e);case 5:case 1:return function(n,r,t,e){var i=n.t,o=n.R,u=n.o;if(u.length<i.length){var a=[u,i];i=a[0],u=a[1];var s=[e,t];t=s[0],e=s[1]}for(var v=0;v<i.length;v++)if(o[v]&&u[v]!==i[v]){var p=r.concat([v]);t.push({op:"replace",path:p,value:f(u[v])}),e.push({op:"replace",path:p,value:f(i[v])})}for(var l=i.length;l<u.length;l++){var d=r.concat([l]);t.push({op:c,path:d,value:f(u[l])})}i.length<u.length&&e.push({op:"replace",path:r.concat(["length"]),value:i.length})}(n,r,t,e);case 3:return function(n,r,t,e){var i=n.t,o=n.o,u=0;i.forEach((function(n){if(!o.has(n)){var i=r.concat([u]);t.push({op:"remove",path:i,value:n}),e.unshift({op:c,path:i,value:n})}u++})),u=0,o.forEach((function(n){if(!i.has(n)){var o=r.concat([u]);t.push({op:c,path:o,value:n}),e.unshift({op:"remove",path:o,value:n})}u++}))}(n,r,t,e)}},M:function(n,r,t,e){t.push({op:"replace",path:[],value:r===H?void 0:r}),e.push({op:"replace",path:[],value:n})}})}function C(){function r(n,r){function t(){this.constructor=n}a(n,r),n.prototype=(t.prototype=r.prototype,new t)}function e(n){n.o||(n.R=new Map,n.o=new Map(n.t))}function o(n){n.o||(n.o=new Set,n.t.forEach((function(r){if(t(r)){var e=N(n.A.h,r,n);n.p.set(r,e),n.o.add(e)}else n.o.add(r)})))}function u(r){r.g&&n(3,JSON.stringify(p(r)))}var a=function(n,r){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var t in r)r.hasOwnProperty(t)&&(n[t]=r[t])})(n,r)},f=function(){function n(n,r){return this[Q]={i:2,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,R:void 0,t:n,k:this,C:!1,g:!1},this}r(n,Map);var o=n.prototype;return Object.defineProperty(o,"size",{get:function(){return p(this[Q]).size}}),o.has=function(n){return p(this[Q]).has(n)},o.set=function(n,r){var t=this[Q];return u(t),p(t).has(n)&&p(t).get(n)===r||(e(t),k(t),t.R.set(n,!0),t.o.set(n,r),t.R.set(n,!0)),this},o.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),e(r),k(r),r.t.has(n)?r.R.set(n,!1):r.R.delete(n),r.o.delete(n),!0},o.clear=function(){var n=this[Q];u(n),p(n).size&&(e(n),k(n),n.R=new Map,i(n.t,(function(r){n.R.set(r,!1)})),n.o.clear())},o.forEach=function(n,r){var t=this;p(this[Q]).forEach((function(e,i){n.call(r,t.get(i),i,t)}))},o.get=function(n){var r=this[Q];u(r);var i=p(r).get(n);if(r.I||!t(i))return i;if(i!==r.t.get(n))return i;var o=N(r.A.h,i,r);return e(r),r.o.set(n,o),o},o.keys=function(){return p(this[Q]).keys()},o.values=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.values()},n.next=function(){var n=t.next();return n.done?n:{done:!1,value:r.get(n.value)}},n},o.entries=function(){var n,r=this,t=this.keys();return(n={})[V]=function(){return r.entries()},n.next=function(){var n=t.next();if(n.done)return n;var e=r.get(n.value);return{done:!1,value:[n.value,e]}},n},o[V]=function(){return this.entries()},n}(),c=function(){function n(n,r){return this[Q]={i:3,l:r,A:r?r.A:_(),P:!1,I:!1,o:void 0,t:n,k:this,p:new Map,g:!1,C:!1},this}r(n,Set);var t=n.prototype;return Object.defineProperty(t,"size",{get:function(){return p(this[Q]).size}}),t.has=function(n){var r=this[Q];return u(r),r.o?!!r.o.has(n)||!(!r.p.has(n)||!r.o.has(r.p.get(n))):r.t.has(n)},t.add=function(n){var r=this[Q];return u(r),this.has(n)||(o(r),k(r),r.o.add(n)),this},t.delete=function(n){if(!this.has(n))return!1;var r=this[Q];return u(r),o(r),k(r),r.o.delete(n)||!!r.p.has(n)&&r.o.delete(r.p.get(n))},t.clear=function(){var n=this[Q];u(n),p(n).size&&(o(n),k(n),n.o.clear())},t.values=function(){var n=this[Q];return u(n),o(n),n.o.values()},t.entries=function(){var n=this[Q];return u(n),o(n),n.o.entries()},t.keys=function(){return this.values()},t[V]=function(){return this.values()},t.forEach=function(n,r){for(var t=this.values(),e=t.next();!e.done;)n.call(r,e.value,e.value,this),e=t.next()},n}();m("MapSet",{F:function(n,r){return new f(n,r)},T:function(n,r){return new c(n,r)}})}function J(){F(),C(),T()}function K(n){return n}function $(n){return n}var G,U,W="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),X="undefined"!=typeof Map,q="undefined"!=typeof Set,B="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,H=W?Symbol.for("immer-nothing"):((G={})["immer-nothing"]=!0,G),L=W?Symbol.for("immer-draftable"):"__$immer_draftable",Q=W?Symbol.for("immer-state"):"__$immer_state",V="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",Y={0:"Illegal state",1:"Immer drafts cannot have computed properties",2:"This object has been frozen and should not be mutated",3:function(n){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+n},4:"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",5:"Immer forbids circular references",6:"The first or second argument to `produce` must be a function",7:"The third argument to `produce` must be a function or undefined",8:"First argument to `createDraft` must be a plain object, an array, or an immerable object",9:"First argument to `finishDraft` must be a draft returned by `createDraft`",10:"The given draft is already finalized",11:"Object.defineProperty() cannot be used on an Immer draft",12:"Object.setPrototypeOf() cannot be used on an Immer draft",13:"Immer only supports deleting array indices",14:"Immer only supports setting array indices and the 'length' property",15:function(n){return"Cannot apply patch, path doesn't resolve: "+n},16:'Sets cannot have "replace" patches.',17:function(n){return"Unsupported patch operation: "+n},18:function(n){return"The plugin for '"+n+"' has not been loaded into Immer. To enable the plugin, import and call `enable"+n+"()` when initializing your application."},20:"Cannot use proxies if Proxy, Proxy.revocable or Reflect are not available",21:function(n){return"produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '"+n+"'"},22:function(n){return"'current' expects a draft, got: "+n},23:function(n){return"'original' expects a draft, got: "+n},24:"Patching reserved attributes like __proto__, prototype and constructor is not allowed"},Z=""+Object.prototype.constructor,nn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(n){return Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n))}:Object.getOwnPropertyNames,rn=Object.getOwnPropertyDescriptors||function(n){var r={};return nn(n).forEach((function(t){r[t]=Object.getOwnPropertyDescriptor(n,t)})),r},tn={},en={get:function(n,r){if(r===Q)return n;var e=p(n);if(!u(e,r))return function(n,r,t){var e,i=I(r,t);return i?"value"in i?i.value:null===(e=i.get)||void 0===e?void 0:e.call(n.k):void 0}(n,e,r);var i=e[r];return n.I||!t(i)?i:i===z(n.t,r)?(E(n),n.o[r]=N(n.A.h,i,n)):i},has:function(n,r){return r in p(n)},ownKeys:function(n){return Reflect.ownKeys(p(n))},set:function(n,r,t){var e=I(p(n),r);if(null==e?void 0:e.set)return e.set.call(n.k,t),!0;if(!n.P){var i=z(p(n),r),o=null==i?void 0:i[Q];if(o&&o.t===t)return n.o[r]=t,n.R[r]=!1,!0;if(c(t,i)&&(void 0!==t||u(n.t,r)))return!0;E(n),k(n)}return n.o[r]===t&&(void 0!==t||r in n.o)||Number.isNaN(t)&&Number.isNaN(n.o[r])||(n.o[r]=t,n.R[r]=!0),!0},deleteProperty:function(n,r){return void 0!==z(n.t,r)||r in n.t?(n.R[r]=!1,E(n),k(n)):delete n.R[r],n.o&&delete n.o[r],!0},getOwnPropertyDescriptor:function(n,r){var t=p(n),e=Reflect.getOwnPropertyDescriptor(t,r);return e?{writable:!0,configurable:1!==n.i||"length"!==r,enumerable:e.enumerable,value:t[r]}:e},defineProperty:function(){n(11)},getPrototypeOf:function(n){return Object.getPrototypeOf(n.t)},setPrototypeOf:function(){n(12)}},on={};i(en,(function(n,r){on[n]=function(){return arguments[0]=arguments[0][0],r.apply(this,arguments)}})),on.deleteProperty=function(r,t){return true&&isNaN(parseInt(t))&&n(13),on.set.call(this,r,t,void 0)},on.set=function(r,t,e){return true&&"length"!==t&&isNaN(parseInt(t))&&n(14),en.set.call(this,r[0],t,e,r[0])};var un=function(){function e(r){var e=this;this.O=B,this.D=!0,this.produce=function(r,i,o){if("function"==typeof r&&"function"!=typeof i){var u=i;i=r;var a=e;return function(n){var r=this;void 0===n&&(n=u);for(var t=arguments.length,e=Array(t>1?t-1:0),o=1;o<t;o++)e[o-1]=arguments[o];return a.produce(n,(function(n){var t;return(t=i).call.apply(t,[r,n].concat(e))}))}}var f;if("function"!=typeof i&&n(6),void 0!==o&&"function"!=typeof o&&n(7),t(r)){var c=w(e),s=N(e,r,void 0),v=!0;try{f=i(s),v=!1}finally{v?g(c):O(c)}return"undefined"!=typeof Promise&&f instanceof Promise?f.then((function(n){return j(c,o),P(n,c)}),(function(n){throw g(c),n})):(j(c,o),P(f,c))}if(!r||"object"!=typeof r){if(void 0===(f=i(r))&&(f=r),f===H&&(f=void 0),e.D&&d(f,!0),o){var p=[],l=[];b("Patches").M(r,f,p,l),o(p,l)}return f}n(21,r)},this.produceWithPatches=function(n,r){if("function"==typeof n)return function(r){for(var t=arguments.length,i=Array(t>1?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.produceWithPatches(r,(function(r){return n.apply(void 0,[r].concat(i))}))};var t,i,o=e.produce(n,r,(function(n,r){t=n,i=r}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(n){return[n,t,i]})):[o,t,i]},"boolean"==typeof(null==r?void 0:r.useProxies)&&this.setUseProxies(r.useProxies),"boolean"==typeof(null==r?void 0:r.autoFreeze)&&this.setAutoFreeze(r.autoFreeze)}var i=e.prototype;return i.createDraft=function(e){t(e)||n(8),r(e)&&(e=R(e));var i=w(this),o=N(this,e,void 0);return o[Q].C=!0,O(i),o},i.finishDraft=function(r,t){var e=r&&r[Q]; true&&(e&&e.C||n(9),e.I&&n(10));var i=e.A;return j(i,t),P(void 0,i)},i.setAutoFreeze=function(n){this.D=n},i.setUseProxies=function(r){r&&!B&&n(20),this.O=r},i.applyPatches=function(n,t){var e;for(e=t.length-1;e>=0;e--){var i=t[e];if(0===i.path.length&&"replace"===i.op){n=i.value;break}}e>-1&&(t=t.slice(e+1));var o=b("Patches").$;return r(n)?o(n,t):this.produce(n,(function(n){return o(n,t)}))},e}(),an=new un,fn=an.produce,cn=an.produceWithPatches.bind(an),sn=an.setAutoFreeze.bind(an),vn=an.setUseProxies.bind(an),pn=an.applyPatches.bind(an),ln=an.createDraft.bind(an),dn=an.finishDraft.bind(an);/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fn); 10312//# sourceMappingURL=immer.esm.js.map 10313 10314 10315/***/ }), 10316
vendor: 9,856 bytes, lines 10317-10579
10317/***/ "./node_modules/use-context-selector/dist/index.js": 10318/*!*********************************************************!*\ 10319 !*** ./node_modules/use-context-selector/dist/index.js ***! 10320 \*********************************************************/ 10321/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 10322 10323"use strict"; 10324__webpack_require__.r(__webpack_exports__); 10325/* harmony export */ __webpack_require__.d(__webpack_exports__, { 10326/* harmony export */ BridgeProvider: () => (/* binding */ BridgeProvider), 10327/* harmony export */ createContext: () => (/* binding */ createContext), 10328/* harmony export */ useBridgeValue: () => (/* binding */ useBridgeValue), 10329/* harmony export */ useContext: () => (/* binding */ useContext), 10330/* harmony export */ useContextSelector: () => (/* binding */ useContextSelector), 10331/* harmony export */ useContextUpdate: () => (/* binding */ useContextUpdate) 10332/* harmony export */ }); 10333/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 10334/* harmony import */ var scheduler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! scheduler */ "./node_modules/scheduler/index.js"); 10335 10336 10337const CONTEXT_VALUE = Symbol(); 10338const ORIGINAL_PROVIDER = Symbol(); 10339const isSSR = typeof window === 'undefined' || 10340 /ServerSideRendering/.test(window.navigator && window.navigator.userAgent); 10341const useIsomorphicLayoutEffect = isSSR ? react__WEBPACK_IMPORTED_MODULE_0__.useEffect : react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect; 10342// for preact that doesn't have runWithPriority 10343const runWithNormalPriority = scheduler__WEBPACK_IMPORTED_MODULE_1__.unstable_runWithPriority 10344 ? (fn) => { 10345 try { 10346 (0,scheduler__WEBPACK_IMPORTED_MODULE_1__.unstable_runWithPriority)(scheduler__WEBPACK_IMPORTED_MODULE_1__.unstable_NormalPriority, fn); 10347 } 10348 catch (e) { 10349 if (e.message === 'Not implemented.') { 10350 fn(); 10351 } 10352 else { 10353 throw e; 10354 } 10355 } 10356 } 10357 : (fn) => fn(); 10358const createProvider = (ProviderOrig) => { 10359 const ContextProvider = ({ value, children, }) => { 10360 const valueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value); 10361 const versionRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0); 10362 const [resolve, setResolve] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null); 10363 if (resolve) { 10364 resolve(value); 10365 setResolve(null); 10366 } 10367 const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); 10368 if (!contextValue.current) { 10369 const listeners = new Set(); 10370 const update = (fn, options) => { 10371 versionRef.current += 1; 10372 const action = { 10373 n: versionRef.current, 10374 }; 10375 if (options === null || options === void 0 ? void 0 : options.suspense) { 10376 action.n *= -1; // this is intentional to make it temporary version 10377 action.p = new Promise((r) => { 10378 setResolve(() => (v) => { 10379 action.v = v; 10380 delete action.p; 10381 r(v); 10382 }); 10383 }); 10384 } 10385 listeners.forEach((listener) => listener(action)); 10386 fn(); 10387 }; 10388 contextValue.current = { 10389 [CONTEXT_VALUE]: { 10390 /* "v"alue */ v: valueRef, 10391 /* versio"n" */ n: versionRef, 10392 /* "l"isteners */ l: listeners, 10393 /* "u"pdate */ u: update, 10394 }, 10395 }; 10396 } 10397 useIsomorphicLayoutEffect(() => { 10398 valueRef.current = value; 10399 versionRef.current += 1; 10400 runWithNormalPriority(() => { 10401 contextValue.current[CONTEXT_VALUE].l.forEach((listener) => { 10402 listener({ n: versionRef.current, v: value }); 10403 }); 10404 }); 10405 }, [value]); 10406 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ProviderOrig, { value: contextValue.current }, children); 10407 }; 10408 return ContextProvider; 10409}; 10410const identity = (x) => x; 10411/** 10412 * This creates a special context for `useContextSelector`. 10413 * 10414 * @example 10415 * import { createContext } from 'use-context-selector'; 10416 * 10417 * const PersonContext = createContext({ firstName: '', familyName: '' }); 10418 */ 10419function createContext(defaultValue) { 10420 const context = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({ 10421 [CONTEXT_VALUE]: { 10422 /* "v"alue */ v: { current: defaultValue }, 10423 /* versio"n" */ n: { current: -1 }, 10424 /* "l"isteners */ l: new Set(), 10425 /* "u"pdate */ u: (f) => f(), 10426 }, 10427 }); 10428 context[ORIGINAL_PROVIDER] = context.Provider; 10429 context.Provider = createProvider(context.Provider); 10430 delete context.Consumer; // no support for Consumer 10431 return context; 10432} 10433/** 10434 * This hook returns context selected value by selector. 10435 * 10436 * It will only accept context created by `createContext`. 10437 * It will trigger re-render if only the selected value is referentially changed. 10438 * 10439 * The selector should return referentially equal result for same input for better performance. 10440 * 10441 * @example 10442 * import { useContextSelector } from 'use-context-selector'; 10443 * 10444 * const firstName = useContextSelector(PersonContext, (state) => state.firstName); 10445 */ 10446function useContextSelector(context, selector) { 10447 const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context)[CONTEXT_VALUE]; 10448 if (typeof process === 'object' && "development" !== 'production') { 10449 if (!contextValue) { 10450 throw new Error('useContextSelector requires special context'); 10451 } 10452 } 10453 const { 10454 /* "v"alue */ v: { current: value }, 10455 /* versio"n" */ n: { current: version }, 10456 /* "l"isteners */ l: listeners, } = contextValue; 10457 const selected = selector(value); 10458 const [state, dispatch] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)((prev, action) => { 10459 if (!action) { 10460 // case for `dispatch()` below 10461 return [value, selected]; 10462 } 10463 if ('p' in action) { 10464 throw action.p; 10465 } 10466 if (action.n === version) { 10467 if (Object.is(prev[1], selected)) { 10468 return prev; // bail out 10469 } 10470 return [value, selected]; 10471 } 10472 try { 10473 if ('v' in action) { 10474 if (Object.is(prev[0], action.v)) { 10475 return prev; // do not update 10476 } 10477 const nextSelected = selector(action.v); 10478 if (Object.is(prev[1], nextSelected)) { 10479 return prev; // do not update 10480 } 10481 return [action.v, nextSelected]; 10482 } 10483 } 10484 catch (_e) { 10485 // ignored (stale props or some other reason) 10486 } 10487 return [...prev]; // schedule update 10488 }, [value, selected]); 10489 if (!Object.is(state[1], selected)) { 10490 // schedule re-render 10491 // this is safe because it's self contained 10492 dispatch(); 10493 } 10494 useIsomorphicLayoutEffect(() => { 10495 listeners.add(dispatch); 10496 return () => { 10497 listeners.delete(dispatch); 10498 }; 10499 }, [listeners]); 10500 return state[1]; 10501} 10502/** 10503 * This hook returns the entire context value. 10504 * Use this instead of React.useContext for consistent behavior. 10505 * 10506 * @example 10507 * import { useContext } from 'use-context-selector'; 10508 * 10509 * const person = useContext(PersonContext); 10510 */ 10511function useContext(context) { 10512 return useContextSelector(context, identity); 10513} 10514/** 10515 * This hook returns an update function to wrap an updating function 10516 * 10517 * Use this for a function that will change a value in 10518 * concurrent rendering in React 18. 10519 * Otherwise, there's no need to use this hook. 10520 * 10521 * @example 10522 * import { useContextUpdate } from 'use-context-selector'; 10523 * 10524 * const update = useContextUpdate(); 10525 * 10526 * // Wrap set state function 10527 * update(() => setState(...)); 10528 * 10529 * // Experimental suspense mode 10530 * update(() => setState(...), { suspense: true }); 10531 */ 10532function useContextUpdate(context) { 10533 const contextValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context)[CONTEXT_VALUE]; 10534 if (typeof process === 'object' && "development" !== 'production') { 10535 if (!contextValue) { 10536 throw new Error('useContextUpdate requires special context'); 10537 } 10538 } 10539 const { u: update } = contextValue; 10540 return update; 10541} 10542/* eslint-disable @typescript-eslint/no-explicit-any */ 10543/** 10544 * This is a Provider component for bridging multiple react roots 10545 * 10546 * @example 10547 * const valueToBridge = useBridgeValue(PersonContext); 10548 * return ( 10549 * <Renderer> 10550 * <BridgeProvider context={PersonContext} value={valueToBridge}> 10551 * {children} 10552 * </BridgeProvider> 10553 * </Renderer> 10554 * ); 10555 */ 10556const BridgeProvider = ({ context, value, children, }) => { 10557 const { [ORIGINAL_PROVIDER]: ProviderOrig } = context; 10558 if (typeof process === 'object' && "development" !== 'production') { 10559 if (!ProviderOrig) { 10560 throw new Error('BridgeProvider requires special context'); 10561 } 10562 } 10563 return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ProviderOrig, { value }, children); 10564}; 10565/** 10566 * This hook return a value for BridgeProvider 10567 */ 10568const useBridgeValue = (context) => { 10569 const bridgeValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(context); 10570 if (typeof process === 'object' && "development" !== 'production') { 10571 if (!bridgeValue[CONTEXT_VALUE]) { 10572 throw new Error('useBridgeValue requires special context'); 10573 } 10574 } 10575 return bridgeValue; 10576}; 10577 10578 10579/***/ })
vendor: 5,152 bytes, lines 10579-10680
10579 10580 10581/******/ }); 10582/************************************************************************/ 10583/******/ // The module cache 10584/******/ var __webpack_module_cache__ = {}; 10585/******/ 10586/******/ // The require function 10587/******/ function __webpack_require__(moduleId) { 10588/******/ // Check if module is in cache 10589/******/ var cachedModule = __webpack_module_cache__[moduleId]; 10590/******/ if (cachedModule !== undefined) { 10591/******/ return cachedModule.exports; 10592/******/ } 10593/******/ // Create a new module (and put it into the cache) 10594/******/ var module = __webpack_module_cache__[moduleId] = { 10595/******/ // no module.id needed 10596/******/ // no module.loaded needed 10597/******/ exports: {} 10598/******/ }; 10599/******/ 10600/******/ // Execute the module function 10601/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); 10602/******/ 10603/******/ // Return the exports of the module 10604/******/ return module.exports; 10605/******/ } 10606/******/ 10607/************************************************************************/ 10608/******/ /* webpack/runtime/compat get default export */ 10609/******/ (() => { 10610/******/ // getDefaultExport function for compatibility with non-harmony modules 10611/******/ __webpack_require__.n = (module) => { 10612/******/ var getter = module && module.__esModule ? 10613/******/ () => (module['default']) : 10614/******/ () => (module); 10615/******/ __webpack_require__.d(getter, { a: getter }); 10616/******/ return getter; 10617/******/ }; 10618/******/ })(); 10619/******/ 10620/******/ /* webpack/runtime/define property getters */ 10621/******/ (() => { 10622/******/ // define getter functions for harmony exports 10623/******/ __webpack_require__.d = (exports, definition) => { 10624/******/ for(var key in definition) { 10625/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 10626/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 10627/******/ } 10628/******/ } 10629/******/ }; 10630/******/ })(); 10631/******/ 10632/******/ /* webpack/runtime/global */ 10633/******/ (() => { 10634/******/ __webpack_require__.g = (function() { 10635/******/ if (typeof globalThis === 'object') return globalThis; 10636/******/ try { 10637/******/ return this || new Function('return this')(); 10638/******/ } catch (e) { 10639/******/ if (typeof window === 'object') return window; 10640/******/ } 10641/******/ })(); 10642/******/ })(); 10643/******/ 10644/******/ /* webpack/runtime/hasOwnProperty shorthand */ 10645/******/ (() => { 10646/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 10647/******/ })(); 10648/******/ 10649/******/ /* webpack/runtime/make namespace object */ 10650/******/ (() => { 10651/******/ // define __esModule on exports 10652/******/ __webpack_require__.r = (exports) => { 10653/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 10654/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 10655/******/ } 10656/******/ Object.defineProperty(exports, '__esModule', { value: true }); 10657/******/ }; 10658/******/ })(); 10659/******/ 10660/************************************************************************/ 10661var __webpack_exports__ = {}; 10662// This entry need to be wrapped in an IIFE because it need to be in strict mode. 10663(() => { 10664"use strict"; 10665/*!***********************************************************!*\ 10666 !*** ./assets/js/src/components/add-to-wishlist/index.js ***! 10667 \***********************************************************/ 10668__webpack_require__.r(__webpack_exports__); 10669/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); 10670/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); 10671/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "react-dom"); 10672/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__); 10673/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom/client */ "react-dom/client"); 10674/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_dom_client__WEBPACK_IMPORTED_MODULE_2__); 10675/* harmony import */ var react_redux__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react-redux */ "./node_modules/react-redux/es/index.js"); 10676/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); 10677/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__); 10678/* harmony import */ var _app_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../app/store */ "./assets/js/src/app/store.js"); 10679/* harmony import */ var _utils___WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/ */ "./assets/js/src/utils/index.js"); 10680/* harmony import */ var _add_to_wishlist__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./add-to-wis
10680hlist */ "./assets/js/src/components/add-to-wishlist/add-to-wishlist.js"); 10681function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 10682function 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; } 10683function _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) { _defineProperty(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; } 10684function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 10685function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 10686function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 10687/* globals yithWcwlAddToWishlist */ 10688 10689 10690 10691 10692 10693 10694 10695 10696 10697var initApp = function initApp() { 10698 jQuery(document).on('yith_wcwl_fragments_replaced', function (event, _ref) { 10699 var data = _ref.data; 10700 if (!(data !== null && data !== void 0 && data.avoidDataInvalidation)) { 10701 _app_store__WEBPACK_IMPORTED_MODULE_5__["default"].dispatch({ 10702 type: 'FORCE_INVALIDATION' 10703 }); 10704 } 10705 }); 10706 initAddToWishlistButtons(); 10707}; 10708var initAddToWishlistButtons = function initAddToWishlistButtons() { 10709 var buttons = document.querySelectorAll('.yith-add-to-wishlist-button-block:not(.yith-add-to-wishlist-button-block--initialized)'); 10710 if (buttons) { 10711 buttons.forEach(initAddToWishlistButton); 10712 } 10713}; 10714var initAddToWishlistButton = function initAddToWishlistButton(container) { 10715 var _yithWcwlAddToWishlis; 10716 var productId = container.getAttribute('data-product-id'); 10717 var buttonId = Date.now() + '' + productId; 10718 var attributes = _objectSpread({ 10719 productId: productId, 10720 buttonId: buttonId 10721 }, JSON.parse(container.getAttribute('data-attributes'))); 10722 var portalContainer = false; 10723 if ('before_image' === ((_yithWcwlAddToWishlis = yithWcwlAddToWishlist.globalOptions) === null || _yithWcwlAddToWishlis === void 0 ? void 0 : _yithWcwlAddToWishlis.loop_position)) { 10724 var _container$closest; 10725 portalContainer = (_container$closest = container.closest(yithWcwlAddToWishlist.containerSelectors.productC
10725ontainer.join(', '))) === null || _container$closest === void 0 ? void 0 : _container$closest.querySelector(yithWcwlAddToWishlist.containerSelectors.thumbnailContainer.join(', ')); 10726 if (portalContainer) { 10727 attributes.isOverProductImage = true; 10728 } 10729 } 10730 var appComponent = /*#__PURE__*/React.createElement(react_redux__WEBPACK_IMPORTED_MODULE_3__.Provider, { 10731 store: _app_store__WEBPACK_IMPORTED_MODULE_5__["default"] 10732 }, /*#__PURE__*/React.createElement(react__WEBPACK_IMPORTED_MODULE_0__.StrictMode, null, /*#__PURE__*/React.createElement(_utils___WEBPACK_IMPORTED_MODULE_6__.ButtonDataProvider, { 10733 attributes: attributes 10734 }, /*#__PURE__*/React.createElement(_add_to_wishlist__WEBPACK_IMPORTED_MODULE_7__["default"], null)))); 10735 if (portalContainer) { 10736 (0,react_dom_client__WEBPACK_IMPORTED_MODULE_2__.createRoot)(container).render(/*#__PURE__*/(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(appComponent, portalContainer)); 10737 } else { 10738 (0,react_dom_client__WEBPACK_IMPORTED_MODULE_2__.createRoot)(container).render(appComponent); 10739 } 10740 container.classList.add('yith-add-to-wishlist-button-block--initialized'); 10741}; 10742document.addEventListener('DOMContentLoaded', initApp); 10743(0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.addAction)('yith_wcwl_init_add_to_wishlist_components', 'yith-woocommerce-wishlist', initAddToWishlistButtons); 10744})(); 10745 10746/******/ })() 10747; 10748//# sourceMappingURL=index.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.