| @@ -1,2459 +1,10027 @@ | ||
| 1 | -(function(_elementor_editor_app_bar, _wordpress_i18n, react, _elementor_query, _elementor_editor_v1_adapters, _elementor_icons_RocketIcon, _elementor_ui, _elementor_icons) { | |
| 1 | +/*! elementor - v3.26.0 - 19-12-2024 */ | |
| 2 | +/******/ (() => { // webpackBootstrap | |
| 3 | +/******/ var __webpack_modules__ = ({ | |
| 2 | 4 | |
| 3 | -//#region \0rolldown/runtime.js | |
| 4 | - var __create = Object.create; | |
| 5 | - var __defProp = Object.defineProperty; | |
| 6 | - var __name = (target, value) => __defProp(target, "name", { | |
| 7 | - value, | |
| 8 | - configurable: true | |
| 9 | - }); | |
| 10 | - var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | - var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | - var __getProtoOf = Object.getPrototypeOf; | |
| 13 | - var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | - var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports); | |
| 15 | - var __exportAll = (all, no_symbols) => { | |
| 16 | - let target = {}; | |
| 17 | - for (var name in all) { | |
| 18 | - __defProp(target, name, { | |
| 19 | - get: all[name], | |
| 20 | - enumerable: true | |
| 21 | - }); | |
| 5 | +/***/ "../node_modules/@elementor/query/dist/index.js": | |
| 6 | +/*!******************************************************!*\ | |
| 7 | + !*** ../node_modules/@elementor/query/dist/index.js ***! | |
| 8 | + \******************************************************/ | |
| 9 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 10 | + | |
| 11 | +"use strict"; | |
| 12 | + | |
| 13 | +var __defProp = Object.defineProperty; | |
| 14 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 15 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 16 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 17 | +var __export = (target, all) => { | |
| 18 | + for (var name in all) | |
| 19 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 20 | +}; | |
| 21 | +var __copyProps = (to, from, except, desc) => { | |
| 22 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 23 | + for (let key of __getOwnPropNames(from)) | |
| 24 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 25 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 26 | + } | |
| 27 | + return to; | |
| 28 | +}; | |
| 29 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 30 | + | |
| 31 | +// src/index.ts | |
| 32 | +var src_exports = {}; | |
| 33 | +__export(src_exports, { | |
| 34 | + QueryClient: () => import_react_query2.QueryClient, | |
| 35 | + QueryClientProvider: () => import_react_query2.QueryClientProvider, | |
| 36 | + createQueryClient: () => createQueryClient, | |
| 37 | + useInfiniteQuery: () => import_react_query2.useInfiniteQuery, | |
| 38 | + useMutation: () => import_react_query2.useMutation, | |
| 39 | + useQuery: () => import_react_query2.useQuery, | |
| 40 | + useQueryClient: () => import_react_query2.useQueryClient | |
| 41 | +}); | |
| 42 | +module.exports = __toCommonJS(src_exports); | |
| 43 | +var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 44 | +var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 45 | +function createQueryClient() { | |
| 46 | + return new import_react_query.QueryClient({ | |
| 47 | + defaultOptions: { | |
| 48 | + queries: { | |
| 49 | + refetchOnWindowFocus: false, | |
| 50 | + refetchOnReconnect: false | |
| 51 | + } | |
| 52 | + } | |
| 53 | + }); | |
| 54 | +} | |
| 55 | +// Annotate the CommonJS export names for ESM import in node: | |
| 56 | +0 && (0); | |
| 57 | +//# sourceMappingURL=index.js.map | |
| 58 | + | |
| 59 | +/***/ }), | |
| 60 | + | |
| 61 | +/***/ "../app/assets/js/hooks/use-ajax.js": | |
| 62 | +/*!******************************************!*\ | |
| 63 | + !*** ../app/assets/js/hooks/use-ajax.js ***! | |
| 64 | + \******************************************/ | |
| 65 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 66 | + | |
| 67 | +"use strict"; | |
| 68 | + | |
| 69 | + | |
| 70 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 71 | +Object.defineProperty(exports, "__esModule", ({ | |
| 72 | + value: true | |
| 73 | +})); | |
| 74 | +exports["default"] = useAjax; | |
| 75 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 76 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 77 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 78 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 79 | +var _react = __webpack_require__(/*! react */ "react"); | |
| 80 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 81 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 82 | +function useAjax() { | |
| 83 | + var _useState = (0, _react.useState)(null), | |
| 84 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 85 | + ajax = _useState2[0], | |
| 86 | + setAjax = _useState2[1], | |
| 87 | + initialStatusKey = 'initial', | |
| 88 | + uploadInitialState = { | |
| 89 | + status: initialStatusKey, | |
| 90 | + isComplete: false, | |
| 91 | + response: null | |
| 92 | + }, | |
| 93 | + _useState3 = (0, _react.useState)(uploadInitialState), | |
| 94 | + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 95 | + ajaxState = _useState4[0], | |
| 96 | + setAjaxState = _useState4[1], | |
| 97 | + ajaxActions = { | |
| 98 | + reset: function reset() { | |
| 99 | + return setAjaxState(initialStatusKey); | |
| 100 | + } | |
| 101 | + }; | |
| 102 | + var runRequest = /*#__PURE__*/function () { | |
| 103 | + var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee(config) { | |
| 104 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 105 | + while (1) switch (_context.prev = _context.next) { | |
| 106 | + case 0: | |
| 107 | + return _context.abrupt("return", new Promise(function (resolve, reject) { | |
| 108 | + var formData = new FormData(); | |
| 109 | + if (config.data) { | |
| 110 | + for (var key in config.data) { | |
| 111 | + formData.append(key, config.data[key]); | |
| 112 | + } | |
| 113 | + if (!config.data.nonce) { | |
| 114 | + formData.append('_nonce', elementorCommon.config.ajax.nonce); | |
| 115 | + } | |
| 116 | + } | |
| 117 | + var options = _objectSpread(_objectSpread({ | |
| 118 | + type: 'post', | |
| 119 | + url: elementorCommon.config.ajax.url, | |
| 120 | + headers: {}, | |
| 121 | + cache: false, | |
| 122 | + contentType: false, | |
| 123 | + processData: false | |
| 124 | + }, config), {}, { | |
| 125 | + data: formData, | |
| 126 | + success: function success(response) { | |
| 127 | + resolve(response); | |
| 128 | + }, | |
| 129 | + error: function error(_error) { | |
| 130 | + reject(_error); | |
| 131 | + } | |
| 132 | + }); | |
| 133 | + jQuery.ajax(options); | |
| 134 | + })); | |
| 135 | + case 1: | |
| 136 | + case "end": | |
| 137 | + return _context.stop(); | |
| 138 | + } | |
| 139 | + }, _callee); | |
| 140 | + })); | |
| 141 | + return function runRequest(_x) { | |
| 142 | + return _ref.apply(this, arguments); | |
| 143 | + }; | |
| 144 | + }(); | |
| 145 | + (0, _react.useEffect)(function () { | |
| 146 | + if (ajax) { | |
| 147 | + runRequest(ajax).then(function (response) { | |
| 148 | + var status = response.success ? 'success' : 'error'; | |
| 149 | + setAjaxState(function (prevState) { | |
| 150 | + return _objectSpread(_objectSpread({}, prevState), {}, { | |
| 151 | + status: status, | |
| 152 | + response: response === null || response === void 0 ? void 0 : response.data | |
| 153 | + }); | |
| 154 | + }); | |
| 155 | + }).catch(function (error) { | |
| 156 | + var _error$responseJSON; | |
| 157 | + var response = 408 === error.status ? 'timeout' : (_error$responseJSON = error.responseJSON) === null || _error$responseJSON === void 0 ? void 0 : _error$responseJSON.data; | |
| 158 | + setAjaxState(function (prevState) { | |
| 159 | + return _objectSpread(_objectSpread({}, prevState), {}, { | |
| 160 | + status: 'error', | |
| 161 | + response: response | |
| 162 | + }); | |
| 163 | + }); | |
| 164 | + }).finally(function () { | |
| 165 | + setAjaxState(function (prevState) { | |
| 166 | + return _objectSpread(_objectSpread({}, prevState), {}, { | |
| 167 | + isComplete: true | |
| 168 | + }); | |
| 169 | + }); | |
| 170 | + }); | |
| 171 | + } | |
| 172 | + }, [ajax]); | |
| 173 | + return { | |
| 174 | + ajax: ajax, | |
| 175 | + setAjax: setAjax, | |
| 176 | + ajaxState: ajaxState, | |
| 177 | + ajaxActions: ajaxActions, | |
| 178 | + runRequest: runRequest | |
| 179 | + }; | |
| 180 | +} | |
| 181 | + | |
| 182 | +/***/ }), | |
| 183 | + | |
| 184 | +/***/ "../modules/checklist/assets/js/app/app.js": | |
| 185 | +/*!*************************************************!*\ | |
| 186 | + !*** ../modules/checklist/assets/js/app/app.js ***! | |
| 187 | + \*************************************************/ | |
| 188 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 189 | + | |
| 190 | +"use strict"; | |
| 191 | + | |
| 192 | + | |
| 193 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 194 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 195 | +Object.defineProperty(exports, "__esModule", ({ | |
| 196 | + value: true | |
| 197 | +})); | |
| 198 | +exports["default"] = void 0; | |
| 199 | +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 200 | +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "../node_modules/@babel/runtime/helpers/toConsumableArray.js")); | |
| 201 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 202 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 203 | +var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); | |
| 204 | +var _checklist = _interopRequireDefault(__webpack_require__(/*! ./components/checklist */ "../modules/checklist/assets/js/app/components/checklist.js")); | |
| 205 | +var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 206 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 207 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 208 | +var App = function App() { | |
| 209 | + var isRTL = elementorCommon.config.isRTL, | |
| 210 | + _useQuery = (0, _query.useQuery)({ | |
| 211 | + queryKey: ['steps'], | |
| 212 | + queryFn: _functions.fetchSteps, | |
| 213 | + gcTime: 0, | |
| 214 | + enabled: false | |
| 215 | + }), | |
| 216 | + stepsError = _useQuery.error, | |
| 217 | + steps = _useQuery.data, | |
| 218 | + refetchSteps = _useQuery.refetch, | |
| 219 | + _useQuery2 = (0, _query.useQuery)({ | |
| 220 | + queryKey: ['statusData'], | |
| 221 | + queryFn: _functions.fetchUserProgress, | |
| 222 | + gcTime: 0, | |
| 223 | + enabled: false | |
| 224 | + }), | |
| 225 | + userProgressError = _useQuery2.error, | |
| 226 | + userProgress = _useQuery2.data, | |
| 227 | + refetchUserProgress = _useQuery2.refetch; | |
| 228 | + var fetchData = function fetchData() { | |
| 229 | + refetchSteps(); | |
| 230 | + refetchUserProgress(); | |
| 231 | + }; | |
| 232 | + (0, _react.useEffect)(function () { | |
| 233 | + fetchData(); | |
| 234 | + return (0, _editorV1Adapters.__privateListenTo)((0, _editorV1Adapters.commandEndEvent)('document/save/save'), function (_ref) { | |
| 235 | + var _args$document; | |
| 236 | + var args = _ref.args; | |
| 237 | + if ('kit' === (args === null || args === void 0 || (_args$document = args.document) === null || _args$document === void 0 || (_args$document = _args$document.config) === null || _args$document === void 0 ? void 0 : _args$document.type)) { | |
| 238 | + fetchData(); | |
| 239 | + } | |
| 240 | + }); | |
| 241 | + }, []); | |
| 242 | + if (userProgressError || !userProgress || stepsError || !(steps !== null && steps !== void 0 && steps.length)) { | |
| 243 | + return null; | |
| 244 | + } | |
| 245 | + return /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { | |
| 246 | + rtl: isRTL | |
| 247 | + }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { | |
| 248 | + colorScheme: "light" | |
| 249 | + }, /*#__PURE__*/_react.default.createElement(_checklist.default, { | |
| 250 | + steps: (0, _toConsumableArray2.default)(steps), | |
| 251 | + userProgress: userProgress | |
| 252 | + }))); | |
| 253 | +}; | |
| 254 | +var _default = exports["default"] = App; | |
| 255 | + | |
| 256 | +/***/ }), | |
| 257 | + | |
| 258 | +/***/ "../modules/checklist/assets/js/app/components/checklist-card-content.js": | |
| 259 | +/*!*******************************************************************************!*\ | |
| 260 | + !*** ../modules/checklist/assets/js/app/components/checklist-card-content.js ***! | |
| 261 | + \*******************************************************************************/ | |
| 262 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 263 | + | |
| 264 | +"use strict"; | |
| 265 | + | |
| 266 | + | |
| 267 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 268 | +Object.defineProperty(exports, "__esModule", ({ | |
| 269 | + value: true | |
| 270 | +})); | |
| 271 | +exports["default"] = void 0; | |
| 272 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 273 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 274 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 275 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 276 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 277 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 278 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 279 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 280 | +var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 281 | +var IS_MARKED_COMPLETED = _consts.STEP.IS_MARKED_COMPLETED, | |
| 282 | + IS_ABSOLUTE_COMPLETED = _consts.STEP.IS_ABSOLUTE_COMPLETED, | |
| 283 | + IS_IMMUTABLE_COMPLETED = _consts.STEP.IS_IMMUTABLE_COMPLETED; | |
| 284 | +var DONE = _consts.MIXPANEL_CHECKLIST_STEPS.DONE, | |
| 285 | + UNDONE = _consts.MIXPANEL_CHECKLIST_STEPS.UNDONE, | |
| 286 | + ACTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACTION, | |
| 287 | + UPGRADE = _consts.MIXPANEL_CHECKLIST_STEPS.UPGRADE; | |
| 288 | +var ChecklistCardContent = function ChecklistCardContent(_ref) { | |
| 289 | + var step = _ref.step, | |
| 290 | + setSteps = _ref.setSteps; | |
| 291 | + var _step$config = step.config, | |
| 292 | + id = _step$config.id, | |
| 293 | + description = _step$config.description, | |
| 294 | + learnMoreUrl = _step$config.learn_more_url, | |
| 295 | + learnMoreText = _step$config.learn_more_text, | |
| 296 | + imageSrc = _step$config.image_src, | |
| 297 | + promotionData = _step$config.promotion_data; | |
| 298 | + var ctaText = promotionData ? (promotionData === null || promotionData === void 0 ? void 0 : promotionData.text) || (0, _i18n.__)('Upgrade Now', 'elementor') : step.config.cta_text, | |
| 299 | + ctaUrl = promotionData ? promotionData.url : step.config.cta_url, | |
| 300 | + isAbsoluteCompleted = step[IS_ABSOLUTE_COMPLETED], | |
| 301 | + isImmutableCompleted = step[IS_IMMUTABLE_COMPLETED], | |
| 302 | + isMarkedCompleted = step[IS_MARKED_COMPLETED], | |
| 303 | + shouldShowMarkAsDone = !isAbsoluteCompleted && !isImmutableCompleted && !promotionData; | |
| 304 | + var redirectHandler = /*#__PURE__*/function () { | |
| 305 | + var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 306 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 307 | + while (1) switch (_context.prev = _context.next) { | |
| 308 | + case 0: | |
| 309 | + if (promotionData) { | |
| 310 | + (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UPGRADE); | |
| 311 | + } else { | |
| 312 | + (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, ACTION); | |
| 313 | + } | |
| 314 | + if (!(!elementor || !_consts.STEP_IDS_TO_COMPLETE_IN_EDITOR.includes(id) || !_consts.PANEL_ROUTES[id])) { | |
| 315 | + _context.next = 3; | |
| 316 | + break; | |
| 317 | + } | |
| 318 | + return _context.abrupt("return", window.open(ctaUrl, '_blank')); | |
| 319 | + case 3: | |
| 320 | + _context.next = 5; | |
| 321 | + return $e.run('panel/global/open'); | |
| 322 | + case 5: | |
| 323 | + $e.route(_consts.PANEL_ROUTES[id]); | |
| 324 | + case 6: | |
| 325 | + case "end": | |
| 326 | + return _context.stop(); | |
| 327 | + } | |
| 328 | + }, _callee); | |
| 329 | + })); | |
| 330 | + return function redirectHandler() { | |
| 331 | + return _ref2.apply(this, arguments); | |
| 332 | + }; | |
| 333 | + }(); | |
| 334 | + var toggleMarkAsDone = /*#__PURE__*/function () { | |
| 335 | + var _ref3 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 336 | + var currState; | |
| 337 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 338 | + while (1) switch (_context2.prev = _context2.next) { | |
| 339 | + case 0: | |
| 340 | + currState = isMarkedCompleted; | |
| 341 | + if (isMarkedCompleted) { | |
| 342 | + (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, UNDONE); | |
| 343 | + } else { | |
| 344 | + (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, DONE); | |
| 345 | + } | |
| 346 | + _context2.prev = 2; | |
| 347 | + updateStepsState(IS_MARKED_COMPLETED, !currState); | |
| 348 | + _context2.next = 6; | |
| 349 | + return (0, _functions.updateStep)(id, (0, _defineProperty2.default)({}, IS_MARKED_COMPLETED, !currState)); | |
| 350 | + case 6: | |
| 351 | + _context2.next = 11; | |
| 352 | + break; | |
| 353 | + case 8: | |
| 354 | + _context2.prev = 8; | |
| 355 | + _context2.t0 = _context2["catch"](2); | |
| 356 | + updateStepsState(IS_MARKED_COMPLETED, currState); | |
| 357 | + case 11: | |
| 358 | + case "end": | |
| 359 | + return _context2.stop(); | |
| 360 | + } | |
| 361 | + }, _callee2, null, [[2, 8]]); | |
| 362 | + })); | |
| 363 | + return function toggleMarkAsDone() { | |
| 364 | + return _ref3.apply(this, arguments); | |
| 365 | + }; | |
| 366 | + }(); | |
| 367 | + var updateStepsState = function updateStepsState(key, value) { | |
| 368 | + setSteps(function (steps) { | |
| 369 | + return steps.map(function (iteratedStep) { | |
| 370 | + return (0, _functions.getAndUpdateStep)(step.config.id, iteratedStep, key, value); | |
| 371 | + }); | |
| 372 | + }); | |
| 373 | + }; | |
| 374 | + return /*#__PURE__*/_react.default.createElement(_ui.Card, { | |
| 375 | + elevation: 0, | |
| 376 | + square: true, | |
| 377 | + "data-step-id": id | |
| 378 | + }, /*#__PURE__*/_react.default.createElement(_ui.CardMedia, { | |
| 379 | + image: imageSrc, | |
| 380 | + sx: { | |
| 381 | + height: 180 | |
| 382 | + } | |
| 383 | + }), /*#__PURE__*/_react.default.createElement(_ui.CardContent, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 384 | + variant: "body2", | |
| 385 | + color: "text.secondary", | |
| 386 | + component: "p" | |
| 387 | + }, description + ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, { | |
| 388 | + href: learnMoreUrl, | |
| 389 | + target: "_blank", | |
| 390 | + rel: "noreferrer", | |
| 391 | + underline: "hover", | |
| 392 | + color: "info.main", | |
| 393 | + noWrap: true | |
| 394 | + }, learnMoreText))), /*#__PURE__*/_react.default.createElement(_ui.CardActions, null, shouldShowMarkAsDone ? /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 395 | + size: "small", | |
| 396 | + color: "secondary", | |
| 397 | + variant: "text", | |
| 398 | + onClick: toggleMarkAsDone | |
| 399 | + }, isMarkedCompleted ? (0, _i18n.__)('Unmark as done', 'elementor') : (0, _i18n.__)('Mark as done', 'elementor')) : null, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 400 | + color: promotionData ? 'promotion' : 'primary', | |
| 401 | + size: "small", | |
| 402 | + variant: "contained", | |
| 403 | + onClick: redirectHandler | |
| 404 | + }, ctaText))); | |
| 405 | +}; | |
| 406 | +var _default = exports["default"] = ChecklistCardContent; | |
| 407 | +ChecklistCardContent.propTypes = { | |
| 408 | + step: _propTypes.default.object.isRequired, | |
| 409 | + setSteps: _propTypes.default.func.isRequired | |
| 410 | +}; | |
| 411 | + | |
| 412 | +/***/ }), | |
| 413 | + | |
| 414 | +/***/ "../modules/checklist/assets/js/app/components/checklist-item.js": | |
| 415 | +/*!***********************************************************************!*\ | |
| 416 | + !*** ../modules/checklist/assets/js/app/components/checklist-item.js ***! | |
| 417 | + \***********************************************************************/ | |
| 418 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 419 | + | |
| 420 | +"use strict"; | |
| 421 | + | |
| 422 | + | |
| 423 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 424 | +Object.defineProperty(exports, "__esModule", ({ | |
| 425 | + value: true | |
| 426 | +})); | |
| 427 | +exports["default"] = void 0; | |
| 428 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 429 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 430 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 431 | +var _checklistCardContent = _interopRequireDefault(__webpack_require__(/*! ./checklist-card-content */ "../modules/checklist/assets/js/app/components/checklist-card-content.js")); | |
| 432 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 433 | +var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 434 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 435 | +var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 436 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 437 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 438 | +var PROMOTION_DATA = _consts.STEP.PROMOTION_DATA; | |
| 439 | +var TITLE = _consts.MIXPANEL_CHECKLIST_STEPS.TITLE, | |
| 440 | + ACCORDION_SECTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACCORDION_SECTION; | |
| 441 | +function CheckListItem(props) { | |
| 442 | + var expandedIndex = props.expandedIndex, | |
| 443 | + setExpandedIndex = props.setExpandedIndex, | |
| 444 | + setSteps = props.setSteps, | |
| 445 | + index = props.index, | |
| 446 | + step = props.step, | |
| 447 | + chevronStyle = index === expandedIndex ? { | |
| 448 | + transform: 'rotate(180deg)' | |
| 449 | + } : {}, | |
| 450 | + isChecked = (0, _functions.isStepChecked)(step), | |
| 451 | + promotionData = step.config[PROMOTION_DATA]; | |
| 452 | + var handleExpandClick = function handleExpandClick() { | |
| 453 | + (0, _functions.addMixpanelTrackingChecklistSteps)(step.config.id, TITLE, ACCORDION_SECTION); | |
| 454 | + setExpandedIndex(index === expandedIndex ? -1 : index); | |
| 455 | + }; | |
| 456 | + var getUpgradeIcon = function getUpgradeIcon() { | |
| 457 | + return 'default' === (promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon) ? /*#__PURE__*/_react.default.createElement(_icons.UpgradeIcon, { | |
| 458 | + color: "promotion", | |
| 459 | + sx: { | |
| 460 | + mr: 1 | |
| 461 | + } | |
| 462 | + }) : /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, { | |
| 463 | + color: "promotion", | |
| 464 | + sx: { | |
| 465 | + mr: 1 | |
| 466 | + } | |
| 467 | + }, /*#__PURE__*/_react.default.createElement("img", { | |
| 468 | + src: promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon, | |
| 469 | + alt: promotionData.iconAlt || '' | |
| 470 | + })); | |
| 471 | + }; | |
| 472 | + return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.ListItemButton, { | |
| 473 | + onClick: handleExpandClick, | |
| 474 | + "data-step-id": step.config.id, | |
| 475 | + dense: true | |
| 476 | + }, /*#__PURE__*/_react.default.createElement(_ui.ListItemIcon, null, /*#__PURE__*/_react.default.createElement(_ui.Checkbox, { | |
| 477 | + "data-is-checked": isChecked, | |
| 478 | + icon: /*#__PURE__*/_react.default.createElement(_icons.RadioButtonUncheckedIcon, null), | |
| 479 | + checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CircleCheckFilledIcon, { | |
| 480 | + color: "primary" | |
| 481 | + }), | |
| 482 | + edge: "start", | |
| 483 | + checked: isChecked, | |
| 484 | + tabIndex: -1, | |
| 485 | + inputProps: { | |
| 486 | + 'aria-labelledby': step.config.title | |
| 487 | + } | |
| 488 | + })), /*#__PURE__*/_react.default.createElement(_ui.ListItemText, { | |
| 489 | + primary: step.config.title, | |
| 490 | + primaryTypographyProps: { | |
| 491 | + variant: 'body2' | |
| 492 | + } | |
| 493 | + }), promotionData ? getUpgradeIcon() : null, /*#__PURE__*/_react.default.createElement(_icons.ChevronDownIcon, { | |
| 494 | + sx: _objectSpread(_objectSpread({}, chevronStyle), {}, { | |
| 495 | + transition: '300ms' | |
| 496 | + }) | |
| 497 | + })), /*#__PURE__*/_react.default.createElement(_ui.Collapse, { | |
| 498 | + in: index === expandedIndex | |
| 499 | + }, /*#__PURE__*/_react.default.createElement(_checklistCardContent.default, { | |
| 500 | + step: step, | |
| 501 | + setSteps: setSteps | |
| 502 | + }))); | |
| 503 | +} | |
| 504 | +var _default = exports["default"] = CheckListItem; | |
| 505 | +CheckListItem.propTypes = { | |
| 506 | + step: _propTypes.default.object.isRequired, | |
| 507 | + expandedIndex: _propTypes.default.number, | |
| 508 | + setExpandedIndex: _propTypes.default.func.isRequired, | |
| 509 | + setSteps: _propTypes.default.func.isRequired, | |
| 510 | + index: _propTypes.default.number.isRequired | |
| 511 | +}; | |
| 512 | + | |
| 513 | +/***/ }), | |
| 514 | + | |
| 515 | +/***/ "../modules/checklist/assets/js/app/components/checklist-wrapper.js": | |
| 516 | +/*!**************************************************************************!*\ | |
| 517 | + !*** ../modules/checklist/assets/js/app/components/checklist-wrapper.js ***! | |
| 518 | + \**************************************************************************/ | |
| 519 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 520 | + | |
| 521 | +"use strict"; | |
| 522 | + | |
| 523 | + | |
| 524 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 525 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 526 | +Object.defineProperty(exports, "__esModule", ({ | |
| 527 | + value: true | |
| 528 | +})); | |
| 529 | +exports["default"] = void 0; | |
| 530 | +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 531 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 532 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 533 | +var _checklistItem = _interopRequireDefault(__webpack_require__(/*! ./checklist-item */ "../modules/checklist/assets/js/app/components/checklist-item.js")); | |
| 534 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 535 | +var _successMessage = _interopRequireDefault(__webpack_require__(/*! ./success-message */ "../modules/checklist/assets/js/app/components/success-message.js")); | |
| 536 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 537 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 538 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 539 | +var ChecklistWrapper = function ChecklistWrapper(_ref) { | |
| 540 | + var steps = _ref.steps, | |
| 541 | + setSteps = _ref.setSteps, | |
| 542 | + isMinimized = _ref.isMinimized; | |
| 543 | + var _useState = (0, _react.useState)(-1), | |
| 544 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 545 | + expandedIndex = _useState2[0], | |
| 546 | + setExpandedIndex = _useState2[1]; | |
| 547 | + var isChecklistCompleted = steps.filter(_functions.isStepChecked).length === steps.length; | |
| 548 | + return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 549 | + sx: { | |
| 550 | + transition: '400ms', | |
| 551 | + maxHeight: isMinimized ? 0 : '645px' | |
| 552 | + } | |
| 553 | + }, /*#__PURE__*/_react.default.createElement(_ui.List, { | |
| 554 | + component: "div", | |
| 555 | + sx: { | |
| 556 | + py: 0 | |
| 557 | + } | |
| 558 | + }, steps.map(function (step, index) { | |
| 559 | + return /*#__PURE__*/_react.default.createElement(_react.Fragment, { | |
| 560 | + key: index | |
| 561 | + }, index ? /*#__PURE__*/_react.default.createElement(_ui.Divider, null) : null, /*#__PURE__*/_react.default.createElement(_checklistItem.default, { | |
| 562 | + step: step, | |
| 563 | + setSteps: setSteps, | |
| 564 | + setExpandedIndex: setExpandedIndex, | |
| 565 | + expandedIndex: expandedIndex, | |
| 566 | + index: index | |
| 567 | + })); | |
| 568 | + })), isChecklistCompleted ? /*#__PURE__*/_react.default.createElement(_successMessage.default, null) : null); | |
| 569 | +}; | |
| 570 | +var _default = exports["default"] = ChecklistWrapper; | |
| 571 | +ChecklistWrapper.propTypes = { | |
| 572 | + steps: _propTypes.default.array.isRequired, | |
| 573 | + setSteps: _propTypes.default.func.isRequired, | |
| 574 | + isMinimized: _propTypes.default.bool.isRequired | |
| 575 | +}; | |
| 576 | + | |
| 577 | +/***/ }), | |
| 578 | + | |
| 579 | +/***/ "../modules/checklist/assets/js/app/components/checklist.js": | |
| 580 | +/*!******************************************************************!*\ | |
| 581 | + !*** ../modules/checklist/assets/js/app/components/checklist.js ***! | |
| 582 | + \******************************************************************/ | |
| 583 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 584 | + | |
| 585 | +"use strict"; | |
| 586 | +/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); | |
| 587 | + | |
| 588 | + | |
| 589 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 590 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 591 | +Object.defineProperty(exports, "__esModule", ({ | |
| 592 | + value: true | |
| 593 | +})); | |
| 594 | +exports["default"] = void 0; | |
| 595 | +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 596 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 597 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 598 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 599 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 600 | +var _header = _interopRequireDefault(__webpack_require__(/*! ./header */ "../modules/checklist/assets/js/app/components/header.js")); | |
| 601 | +var _checklistWrapper = _interopRequireDefault(__webpack_require__(/*! ./checklist-wrapper */ "../modules/checklist/assets/js/app/components/checklist-wrapper.js")); | |
| 602 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 603 | +var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 604 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 605 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 606 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 607 | +var IS_POPUP_MINIMIZED = _consts.USER_PROGRESS.IS_POPUP_MINIMIZED; | |
| 608 | +var Checklist = function Checklist(props) { | |
| 609 | + var _useState = (0, _react.useState)(props.steps), | |
| 610 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 611 | + steps = _useState2[0], | |
| 612 | + setSteps = _useState2[1], | |
| 613 | + _useState3 = (0, _react.useState)(!!props.userProgress[IS_POPUP_MINIMIZED]), | |
| 614 | + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 615 | + isMinimized = _useState4[0], | |
| 616 | + setIsMinimized = _useState4[1]; | |
| 617 | + var toggleIsMinimized = /*#__PURE__*/function () { | |
| 618 | + var _ref = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 619 | + var currState; | |
| 620 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 621 | + while (1) switch (_context.prev = _context.next) { | |
| 622 | + case 0: | |
| 623 | + currState = isMinimized; | |
| 624 | + _context.prev = 1; | |
| 625 | + setIsMinimized(!currState); | |
| 626 | + _context.next = 5; | |
| 627 | + return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, IS_POPUP_MINIMIZED, !currState)); | |
| 628 | + case 5: | |
| 629 | + _context.next = 10; | |
| 630 | + break; | |
| 631 | + case 7: | |
| 632 | + _context.prev = 7; | |
| 633 | + _context.t0 = _context["catch"](1); | |
| 634 | + setIsMinimized(currState); | |
| 635 | + case 10: | |
| 636 | + case "end": | |
| 637 | + return _context.stop(); | |
| 638 | + } | |
| 639 | + }, _callee, null, [[1, 7]]); | |
| 640 | + })); | |
| 641 | + return function toggleIsMinimized() { | |
| 642 | + return _ref.apply(this, arguments); | |
| 643 | + }; | |
| 644 | + }(); | |
| 645 | + (0, _react.useEffect)(function () { | |
| 646 | + setSteps(props.steps); | |
| 647 | + }, [props.steps]); | |
| 648 | + return /*#__PURE__*/_react.default.createElement(_ui.Paper, { | |
| 649 | + elevation: 5, | |
| 650 | + sx: { | |
| 651 | + position: 'fixed', | |
| 652 | + width: '360px', | |
| 653 | + bottom: '40px', | |
| 654 | + insetInlineEnd: '40px', | |
| 655 | + zIndex: '99999', | |
| 656 | + hidden: true, | |
| 657 | + maxHeight: '645px', | |
| 658 | + overflowY: 'auto' | |
| 659 | + } | |
| 660 | + }, /*#__PURE__*/_react.default.createElement(_header.default, { | |
| 661 | + steps: steps, | |
| 662 | + isMinimized: isMinimized, | |
| 663 | + toggleIsMinimized: toggleIsMinimized | |
| 664 | + }), /*#__PURE__*/_react.default.createElement(_checklistWrapper.default, { | |
| 665 | + steps: steps, | |
| 666 | + setSteps: setSteps, | |
| 667 | + isMinimized: isMinimized | |
| 668 | + })); | |
| 669 | +}; | |
| 670 | +Checklist.propTypes = { | |
| 671 | + steps: PropTypes.array.isRequired, | |
| 672 | + userProgress: PropTypes.object.isRequired | |
| 673 | +}; | |
| 674 | +var _default = exports["default"] = Checklist; | |
| 675 | + | |
| 676 | +/***/ }), | |
| 677 | + | |
| 678 | +/***/ "../modules/checklist/assets/js/app/components/header.js": | |
| 679 | +/*!***************************************************************!*\ | |
| 680 | + !*** ../modules/checklist/assets/js/app/components/header.js ***! | |
| 681 | + \***************************************************************/ | |
| 682 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 683 | + | |
| 684 | +"use strict"; | |
| 685 | + | |
| 686 | + | |
| 687 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 688 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 689 | +Object.defineProperty(exports, "__esModule", ({ | |
| 690 | + value: true | |
| 691 | +})); | |
| 692 | +exports["default"] = void 0; | |
| 693 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 694 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 695 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 696 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 697 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 698 | +var _progress = _interopRequireDefault(__webpack_require__(/*! ./progress */ "../modules/checklist/assets/js/app/components/progress.js")); | |
| 699 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 700 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 701 | +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 702 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 703 | +var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 704 | +var _icons = __webpack_require__(/*! @elementor/icons */ "@elementor/icons"); | |
| 705 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 706 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 707 | +var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; | |
| 708 | +var CHECKLIST_HEADER_CLOSE = _consts.MIXPANEL_CHECKLIST_STEPS.CHECKLIST_HEADER_CLOSE; | |
| 709 | +var Header = function Header(_ref) { | |
| 710 | + var steps = _ref.steps, | |
| 711 | + isMinimized = _ref.isMinimized, | |
| 712 | + toggleIsMinimized = _ref.toggleIsMinimized; | |
| 713 | + var _useQuery = (0, _query.useQuery)({ | |
| 714 | + queryKey: ['closedForFirstTime'], | |
| 715 | + queryFn: _functions.fetchUserProgress | |
| 716 | + }), | |
| 717 | + userProgress = _useQuery.data, | |
| 718 | + closedForFirstTime = (userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]) || false; | |
| 719 | + var closeChecklist = /*#__PURE__*/function () { | |
| 720 | + var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 721 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 722 | + while (1) switch (_context.prev = _context.next) { | |
| 723 | + case 0: | |
| 724 | + (0, _functions.addMixpanelTrackingChecklistHeader)(CHECKLIST_HEADER_CLOSE); | |
| 725 | + if (closedForFirstTime) { | |
| 726 | + _context.next = 5; | |
| 727 | + break; | |
| 728 | + } | |
| 729 | + _context.next = 4; | |
| 730 | + return (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME, true)); | |
| 731 | + case 4: | |
| 732 | + window.dispatchEvent(new CustomEvent('elementor/checklist/first_close', { | |
| 733 | + detail: { | |
| 734 | + message: 'firstClose' | |
| 735 | + } | |
| 736 | + })); | |
| 737 | + case 5: | |
| 738 | + (0, _functions.toggleChecklistPopup)(); | |
| 739 | + case 6: | |
| 740 | + case "end": | |
| 741 | + return _context.stop(); | |
| 742 | + } | |
| 743 | + }, _callee); | |
| 744 | + })); | |
| 745 | + return function closeChecklist() { | |
| 746 | + return _ref2.apply(this, arguments); | |
| 747 | + }; | |
| 748 | + }(); | |
| 749 | + return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_ui.AppBar, { | |
| 750 | + elevation: 0, | |
| 751 | + position: "sticky", | |
| 752 | + sx: { | |
| 753 | + p: 2, | |
| 754 | + backgroundColor: 'background.default' | |
| 755 | + } | |
| 756 | + }, /*#__PURE__*/React.createElement(_ui.Toolbar, { | |
| 757 | + variant: "dense", | |
| 758 | + disableGutters: true | |
| 759 | + }, /*#__PURE__*/React.createElement(_ui.Typography, { | |
| 760 | + variant: "subtitle1", | |
| 761 | + sx: { | |
| 762 | + flexGrow: 1 | |
| 763 | + } | |
| 764 | + }, (0, _i18n.__)('Let\'s make a productivity boost', 'elementor')), /*#__PURE__*/React.createElement(_ui.IconButton, { | |
| 765 | + size: "small", | |
| 766 | + onClick: toggleIsMinimized, | |
| 767 | + "aria-expanded": !isMinimized | |
| 768 | + }, isMinimized ? /*#__PURE__*/React.createElement(_icons.ExpandDiagonalIcon, null) : /*#__PURE__*/React.createElement(_icons.MinimizeDiagonalIcon, null)), /*#__PURE__*/React.createElement(_ui.CloseButton, { | |
| 769 | + sx: { | |
| 770 | + mr: -0.5 | |
| 771 | + }, | |
| 772 | + size: "small", | |
| 773 | + onClick: closeChecklist | |
| 774 | + })), /*#__PURE__*/React.createElement(_progress.default, { | |
| 775 | + steps: steps | |
| 776 | + })), /*#__PURE__*/React.createElement(_ui.Divider, null)); | |
| 777 | +}; | |
| 778 | +Header.propTypes = { | |
| 779 | + steps: _propTypes.default.array.isRequired, | |
| 780 | + isMinimized: _propTypes.default.bool.isRequired, | |
| 781 | + toggleIsMinimized: _propTypes.default.func.isRequired | |
| 782 | +}; | |
| 783 | +var _default = exports["default"] = Header; | |
| 784 | + | |
| 785 | +/***/ }), | |
| 786 | + | |
| 787 | +/***/ "../modules/checklist/assets/js/app/components/progress.js": | |
| 788 | +/*!*****************************************************************!*\ | |
| 789 | + !*** ../modules/checklist/assets/js/app/components/progress.js ***! | |
| 790 | + \*****************************************************************/ | |
| 791 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 792 | + | |
| 793 | +"use strict"; | |
| 794 | + | |
| 795 | + | |
| 796 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 797 | +Object.defineProperty(exports, "__esModule", ({ | |
| 798 | + value: true | |
| 799 | +})); | |
| 800 | +exports["default"] = void 0; | |
| 801 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 802 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 803 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 804 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 805 | +var Progress = function Progress(_ref) { | |
| 806 | + var steps = _ref.steps; | |
| 807 | + var progress = steps.filter(_functions.isStepChecked).length * 100 / steps.length; | |
| 808 | + return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 809 | + sx: { | |
| 810 | + display: 'flex', | |
| 811 | + alignItems: 'center', | |
| 812 | + gap: 1 | |
| 813 | + } | |
| 814 | + }, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 815 | + sx: { | |
| 816 | + width: '100%' | |
| 817 | + } | |
| 818 | + }, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, { | |
| 819 | + variant: "determinate", | |
| 820 | + value: progress | |
| 821 | + })), /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 822 | + sx: { | |
| 823 | + width: 'fit-content' | |
| 824 | + } | |
| 825 | + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 826 | + variant: "body2", | |
| 827 | + color: "text.secondary" | |
| 828 | + }, "".concat(Math.round(progress), "%")))); | |
| 829 | +}; | |
| 830 | +var _default = exports["default"] = Progress; | |
| 831 | +Progress.propTypes = { | |
| 832 | + steps: _propTypes.default.array.isRequired | |
| 833 | +}; | |
| 834 | + | |
| 835 | +/***/ }), | |
| 836 | + | |
| 837 | +/***/ "../modules/checklist/assets/js/app/components/reminder-modal.js": | |
| 838 | +/*!***********************************************************************!*\ | |
| 839 | + !*** ../modules/checklist/assets/js/app/components/reminder-modal.js ***! | |
| 840 | + \***********************************************************************/ | |
| 841 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 842 | + | |
| 843 | +"use strict"; | |
| 844 | + | |
| 845 | + | |
| 846 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 847 | +Object.defineProperty(exports, "__esModule", ({ | |
| 848 | + value: true | |
| 849 | +})); | |
| 850 | +exports["default"] = void 0; | |
| 851 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 852 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 853 | +var _propTypes = _interopRequireDefault(__webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js")); | |
| 854 | +var ReminderModal = function ReminderModal(_ref) { | |
| 855 | + var setOpen = _ref.setOpen; | |
| 856 | + var closeChecklist = function closeChecklist(e) { | |
| 857 | + e.stopPropagation(); | |
| 858 | + setOpen(false); | |
| 859 | + }; | |
| 860 | + return /*#__PURE__*/_react.default.createElement(_ui.Card, { | |
| 861 | + elevation: 0, | |
| 862 | + sx: { | |
| 863 | + maxWidth: 336 | |
| 864 | + }, | |
| 865 | + className: "e-checklist-infotip-first-time-closed" | |
| 866 | + }, /*#__PURE__*/_react.default.createElement(_ui.CardContent, null, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 867 | + variant: "subtitle2", | |
| 868 | + sx: { | |
| 869 | + mb: 2 | |
| 870 | + } | |
| 871 | + }, "Looking for your Launchpad Checklist?"), /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 872 | + variant: "body2" | |
| 873 | + }, "Click the launch icon to continue setting up your site.")), /*#__PURE__*/_react.default.createElement(_ui.CardActions, null, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 874 | + size: "small", | |
| 875 | + variant: "contained", | |
| 876 | + className: "infotip-first-time-closed-button", | |
| 877 | + onClick: closeChecklist | |
| 878 | + }, "Got it"))); | |
| 879 | +}; | |
| 880 | +var _default = exports["default"] = ReminderModal; | |
| 881 | +ReminderModal.propTypes = { | |
| 882 | + setOpen: _propTypes.default.func.isRequired | |
| 883 | +}; | |
| 884 | + | |
| 885 | +/***/ }), | |
| 886 | + | |
| 887 | +/***/ "../modules/checklist/assets/js/app/components/success-message.js": | |
| 888 | +/*!************************************************************************!*\ | |
| 889 | + !*** ../modules/checklist/assets/js/app/components/success-message.js ***! | |
| 890 | + \************************************************************************/ | |
| 891 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 892 | + | |
| 893 | +"use strict"; | |
| 894 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 895 | + | |
| 896 | + | |
| 897 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 898 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 899 | +Object.defineProperty(exports, "__esModule", ({ | |
| 900 | + value: true | |
| 901 | +})); | |
| 902 | +exports["default"] = void 0; | |
| 903 | +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 904 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 905 | +var _useAjax2 = _interopRequireDefault(__webpack_require__(/*! elementor-app/hooks/use-ajax */ "../app/assets/js/hooks/use-ajax.js")); | |
| 906 | +var _functions = __webpack_require__(/*! ../../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 907 | +var _consts = __webpack_require__(/*! ../../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 908 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 909 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 910 | +var ACTION = _consts.MIXPANEL_CHECKLIST_STEPS.ACTION, | |
| 911 | + WELL_DONE = _consts.MIXPANEL_CHECKLIST_STEPS.WELL_DONE; | |
| 912 | +var SuccessMessage = function SuccessMessage() { | |
| 913 | + var _useAjax = (0, _useAjax2.default)(), | |
| 914 | + ajaxState = _useAjax.ajaxState, | |
| 915 | + setAjax = _useAjax.setAjax; | |
| 916 | + var hideChecklist = function hideChecklist() { | |
| 917 | + (0, _functions.addMixpanelTrackingChecklistSteps)(WELL_DONE, ACTION); | |
| 918 | + setAjax({ | |
| 919 | + data: { | |
| 920 | + action: 'elementor_ajax', | |
| 921 | + actions: JSON.stringify({ | |
| 922 | + save_editorPreferences_settings: { | |
| 923 | + action: 'save_editorPreferences_settings', | |
| 924 | + data: { | |
| 925 | + data: { | |
| 926 | + show_launchpad_checklist: '' | |
| 927 | + } | |
| 928 | + } | |
| 929 | + } | |
| 930 | + }) | |
| 931 | + } | |
| 932 | + }); | |
| 933 | + }; | |
| 934 | + (0, _react.useEffect)(function () { | |
| 935 | + switch (ajaxState.status) { | |
| 936 | + case 'success': | |
| 937 | + setTimeout(function () { | |
| 938 | + $e.commands.run('checklist/toggle-icon', false); | |
| 939 | + }, 0); | |
| 940 | + break; | |
| 941 | + case 'error': | |
| 942 | + break; | |
| 943 | + } | |
| 944 | + }, [ajaxState]); | |
| 945 | + return /*#__PURE__*/_react.default.createElement(_ui.Card, { | |
| 946 | + elevation: 0, | |
| 947 | + square: true, | |
| 948 | + className: "e-checklist-done" | |
| 949 | + }, /*#__PURE__*/_react.default.createElement(_ui.CardMedia, { | |
| 950 | + image: "https://assets.elementor.com/checklist/v1/images/checklist-step-7.jpg", | |
| 951 | + sx: { | |
| 952 | + height: 180 | |
| 953 | + } | |
| 954 | + }), /*#__PURE__*/_react.default.createElement(_ui.CardContent, { | |
| 955 | + sx: { | |
| 956 | + textAlign: 'center' | |
| 957 | + } | |
| 958 | + }, /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 959 | + variant: "h6", | |
| 960 | + color: "text.primary" | |
| 961 | + }, __('You\'re on your way!', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.Typography, { | |
| 962 | + variant: "body2", | |
| 963 | + color: "text.secondary", | |
| 964 | + component: "p" | |
| 965 | + }, __('With these steps, you\'ve got a great base for a robust website. Enjoy your web creation journey!', 'elementor'))), /*#__PURE__*/_react.default.createElement(_ui.CardActions, { | |
| 966 | + sx: { | |
| 967 | + justifyContent: 'center' | |
| 968 | + } | |
| 969 | + }, /*#__PURE__*/_react.default.createElement(_ui.Button, { | |
| 970 | + color: "primary", | |
| 971 | + size: "small", | |
| 972 | + variant: "contained", | |
| 973 | + onClick: hideChecklist | |
| 974 | + }, __('Got it', 'elementor')))); | |
| 975 | +}; | |
| 976 | +var _default = exports["default"] = SuccessMessage; | |
| 977 | + | |
| 978 | +/***/ }), | |
| 979 | + | |
| 980 | +/***/ "../modules/checklist/assets/js/commands-data/index.js": | |
| 981 | +/*!*************************************************************!*\ | |
| 982 | + !*** ../modules/checklist/assets/js/commands-data/index.js ***! | |
| 983 | + \*************************************************************/ | |
| 984 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 985 | + | |
| 986 | +"use strict"; | |
| 987 | + | |
| 988 | + | |
| 989 | +Object.defineProperty(exports, "__esModule", ({ | |
| 990 | + value: true | |
| 991 | +})); | |
| 992 | +Object.defineProperty(exports, "Steps", ({ | |
| 993 | + enumerable: true, | |
| 994 | + get: function get() { | |
| 995 | + return _steps.Steps; | |
| 996 | + } | |
| 997 | +})); | |
| 998 | +Object.defineProperty(exports, "UserProgress", ({ | |
| 999 | + enumerable: true, | |
| 1000 | + get: function get() { | |
| 1001 | + return _userProgress.UserProgress; | |
| 1002 | + } | |
| 1003 | +})); | |
| 1004 | +var _steps = __webpack_require__(/*! ./steps */ "../modules/checklist/assets/js/commands-data/steps.js"); | |
| 1005 | +var _userProgress = __webpack_require__(/*! ./user-progress */ "../modules/checklist/assets/js/commands-data/user-progress.js"); | |
| 1006 | + | |
| 1007 | +/***/ }), | |
| 1008 | + | |
| 1009 | +/***/ "../modules/checklist/assets/js/commands-data/steps.js": | |
| 1010 | +/*!*************************************************************!*\ | |
| 1011 | + !*** ../modules/checklist/assets/js/commands-data/steps.js ***! | |
| 1012 | + \*************************************************************/ | |
| 1013 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1014 | + | |
| 1015 | +"use strict"; | |
| 1016 | + | |
| 1017 | + | |
| 1018 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1019 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1020 | + value: true | |
| 1021 | +})); | |
| 1022 | +exports["default"] = exports.Steps = void 0; | |
| 1023 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1024 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1025 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1026 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1027 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1028 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1029 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1030 | +var Steps = exports.Steps = /*#__PURE__*/function (_$e$modules$CommandDa) { | |
| 1031 | + function Steps() { | |
| 1032 | + (0, _classCallCheck2.default)(this, Steps); | |
| 1033 | + return _callSuper(this, Steps, arguments); | |
| 1034 | + } | |
| 1035 | + (0, _inherits2.default)(Steps, _$e$modules$CommandDa); | |
| 1036 | + return (0, _createClass2.default)(Steps, null, [{ | |
| 1037 | + key: "getEndpointFormat", | |
| 1038 | + value: function getEndpointFormat() { | |
| 1039 | + return 'checklist/steps/{id}'; | |
| 1040 | + } | |
| 1041 | + }]); | |
| 1042 | +}($e.modules.CommandData); | |
| 1043 | +var _default = exports["default"] = Steps; | |
| 1044 | + | |
| 1045 | +/***/ }), | |
| 1046 | + | |
| 1047 | +/***/ "../modules/checklist/assets/js/commands-data/user-progress.js": | |
| 1048 | +/*!*********************************************************************!*\ | |
| 1049 | + !*** ../modules/checklist/assets/js/commands-data/user-progress.js ***! | |
| 1050 | + \*********************************************************************/ | |
| 1051 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1052 | + | |
| 1053 | +"use strict"; | |
| 1054 | + | |
| 1055 | + | |
| 1056 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1057 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1058 | + value: true | |
| 1059 | +})); | |
| 1060 | +exports["default"] = exports.UserProgress = void 0; | |
| 1061 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1062 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1063 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1064 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1065 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1066 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1067 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1068 | +var UserProgress = exports.UserProgress = /*#__PURE__*/function (_$e$modules$CommandDa) { | |
| 1069 | + function UserProgress() { | |
| 1070 | + (0, _classCallCheck2.default)(this, UserProgress); | |
| 1071 | + return _callSuper(this, UserProgress, arguments); | |
| 1072 | + } | |
| 1073 | + (0, _inherits2.default)(UserProgress, _$e$modules$CommandDa); | |
| 1074 | + return (0, _createClass2.default)(UserProgress, null, [{ | |
| 1075 | + key: "getEndpointFormat", | |
| 1076 | + value: function getEndpointFormat() { | |
| 1077 | + return 'checklist/user-progress'; | |
| 1078 | + } | |
| 1079 | + }]); | |
| 1080 | +}($e.modules.CommandData); | |
| 1081 | +var _default = exports["default"] = UserProgress; | |
| 1082 | + | |
| 1083 | +/***/ }), | |
| 1084 | + | |
| 1085 | +/***/ "../modules/checklist/assets/js/commands/index.js": | |
| 1086 | +/*!********************************************************!*\ | |
| 1087 | + !*** ../modules/checklist/assets/js/commands/index.js ***! | |
| 1088 | + \********************************************************/ | |
| 1089 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1090 | + | |
| 1091 | +"use strict"; | |
| 1092 | + | |
| 1093 | + | |
| 1094 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1095 | + value: true | |
| 1096 | +})); | |
| 1097 | +Object.defineProperty(exports, "ToggleIcon", ({ | |
| 1098 | + enumerable: true, | |
| 1099 | + get: function get() { | |
| 1100 | + return _toggleIcon.ToggleIcon; | |
| 1101 | + } | |
| 1102 | +})); | |
| 1103 | +Object.defineProperty(exports, "TogglePopup", ({ | |
| 1104 | + enumerable: true, | |
| 1105 | + get: function get() { | |
| 1106 | + return _togglePopup.TogglePopup; | |
| 1107 | + } | |
| 1108 | +})); | |
| 1109 | +var _togglePopup = __webpack_require__(/*! ./toggle-popup */ "../modules/checklist/assets/js/commands/toggle-popup.js"); | |
| 1110 | +var _toggleIcon = __webpack_require__(/*! ./toggle-icon */ "../modules/checklist/assets/js/commands/toggle-icon.js"); | |
| 1111 | + | |
| 1112 | +/***/ }), | |
| 1113 | + | |
| 1114 | +/***/ "../modules/checklist/assets/js/commands/toggle-icon.js": | |
| 1115 | +/*!**************************************************************!*\ | |
| 1116 | + !*** ../modules/checklist/assets/js/commands/toggle-icon.js ***! | |
| 1117 | + \**************************************************************/ | |
| 1118 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1119 | + | |
| 1120 | +"use strict"; | |
| 1121 | + | |
| 1122 | + | |
| 1123 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1124 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1125 | + value: true | |
| 1126 | +})); | |
| 1127 | +exports["default"] = exports.ToggleIcon = void 0; | |
| 1128 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1129 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1130 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1131 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1132 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1133 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1134 | +var _togglePopup = _interopRequireDefault(__webpack_require__(/*! ./toggle-popup */ "../modules/checklist/assets/js/commands/toggle-popup.js")); | |
| 1135 | +var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 1136 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1137 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1138 | +var ToggleIcon = exports.ToggleIcon = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 1139 | + function ToggleIcon() { | |
| 1140 | + (0, _classCallCheck2.default)(this, ToggleIcon); | |
| 1141 | + return _callSuper(this, ToggleIcon, arguments); | |
| 1142 | + } | |
| 1143 | + (0, _inherits2.default)(ToggleIcon, _$e$modules$CommandBa); | |
| 1144 | + return (0, _createClass2.default)(ToggleIcon, [{ | |
| 1145 | + key: "apply", | |
| 1146 | + value: function apply(shouldShow) { | |
| 1147 | + document.body.querySelector('[aria-label="Checklist"]').parentElement.style.display = shouldShow ? 'block' : 'none'; | |
| 1148 | + if (!shouldShow && _togglePopup.default.isOpen) { | |
| 1149 | + (0, _functions.toggleChecklistPopup)(); | |
| 1150 | + } | |
| 1151 | + } | |
| 1152 | + }]); | |
| 1153 | +}($e.modules.CommandBase); | |
| 1154 | +(0, _defineProperty2.default)(ToggleIcon, "isSettingsOn", true); | |
| 1155 | +var _default = exports["default"] = ToggleIcon; | |
| 1156 | + | |
| 1157 | +/***/ }), | |
| 1158 | + | |
| 1159 | +/***/ "../modules/checklist/assets/js/commands/toggle-popup.js": | |
| 1160 | +/*!***************************************************************!*\ | |
| 1161 | + !*** ../modules/checklist/assets/js/commands/toggle-popup.js ***! | |
| 1162 | + \***************************************************************/ | |
| 1163 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1164 | + | |
| 1165 | +"use strict"; | |
| 1166 | + | |
| 1167 | + | |
| 1168 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1169 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1170 | + value: true | |
| 1171 | +})); | |
| 1172 | +exports["default"] = exports.TogglePopup = void 0; | |
| 1173 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 1174 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1175 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1176 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1177 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1178 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1179 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1180 | +var _app = _interopRequireDefault(__webpack_require__(/*! ../app/app */ "../modules/checklist/assets/js/app/app.js")); | |
| 1181 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1182 | +var _client = _interopRequireDefault(__webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js")); | |
| 1183 | +var _functions = __webpack_require__(/*! ../utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 1184 | +var _consts = __webpack_require__(/*! ../utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 1185 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1186 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1187 | +var queryClient = new _query.QueryClient(); | |
| 1188 | +var TogglePopup = exports.TogglePopup = /*#__PURE__*/function (_$e$modules$CommandBa) { | |
| 1189 | + function TogglePopup() { | |
| 1190 | + (0, _classCallCheck2.default)(this, TogglePopup); | |
| 1191 | + return _callSuper(this, TogglePopup, arguments); | |
| 1192 | + } | |
| 1193 | + (0, _inherits2.default)(TogglePopup, _$e$modules$CommandBa); | |
| 1194 | + return (0, _createClass2.default)(TogglePopup, [{ | |
| 1195 | + key: "apply", | |
| 1196 | + value: function apply(args) { | |
| 1197 | + if (!TogglePopup.isOpen) { | |
| 1198 | + this.mount(); | |
| 1199 | + } else { | |
| 1200 | + this.unmount(); | |
| 1201 | + } | |
| 1202 | + TogglePopup.isOpen = !TogglePopup.isOpen; | |
| 1203 | + args.isOpen = TogglePopup.isOpen; | |
| 1204 | + (0, _functions.updateUserProgress)((0, _defineProperty2.default)({}, _consts.USER_PROGRESS.LAST_OPENED_TIMESTAMP, TogglePopup.isOpen)); | |
| 1205 | + } | |
| 1206 | + }, { | |
| 1207 | + key: "mount", | |
| 1208 | + value: function mount() { | |
| 1209 | + this.setRootElement(); | |
| 1210 | + TogglePopup.rootElement.render(/*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, { | |
| 1211 | + client: queryClient | |
| 1212 | + }, /*#__PURE__*/_react.default.createElement(_app.default, null))); | |
| 1213 | + } | |
| 1214 | + }, { | |
| 1215 | + key: "unmount", | |
| 1216 | + value: function unmount() { | |
| 1217 | + TogglePopup.rootElement.unmount(); | |
| 1218 | + document.body.removeChild(document.body.querySelector('#e-checklist')); | |
| 1219 | + } | |
| 1220 | + }, { | |
| 1221 | + key: "setRootElement", | |
| 1222 | + value: function setRootElement() { | |
| 1223 | + var root = document.body.querySelector('#e-checklist'); | |
| 1224 | + if (!root) { | |
| 1225 | + root = document.createElement('div'); | |
| 1226 | + root.id = 'e-checklist'; | |
| 1227 | + document.body.appendChild(root); | |
| 1228 | + } | |
| 1229 | + TogglePopup.rootElement = _client.default.createRoot(root); | |
| 1230 | + } | |
| 1231 | + }]); | |
| 1232 | +}($e.modules.CommandBase); | |
| 1233 | +(0, _defineProperty2.default)(TogglePopup, "rootElement", null); | |
| 1234 | +(0, _defineProperty2.default)(TogglePopup, "isOpen", false); | |
| 1235 | +var _default = exports["default"] = TogglePopup; | |
| 1236 | + | |
| 1237 | +/***/ }), | |
| 1238 | + | |
| 1239 | +/***/ "../modules/checklist/assets/js/component.js": | |
| 1240 | +/*!***************************************************!*\ | |
| 1241 | + !*** ../modules/checklist/assets/js/component.js ***! | |
| 1242 | + \***************************************************/ | |
| 1243 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1244 | + | |
| 1245 | +"use strict"; | |
| 1246 | + | |
| 1247 | + | |
| 1248 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1249 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 1250 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1251 | + value: true | |
| 1252 | +})); | |
| 1253 | +exports["default"] = void 0; | |
| 1254 | +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "../node_modules/@babel/runtime/helpers/classCallCheck.js")); | |
| 1255 | +var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ "../node_modules/@babel/runtime/helpers/createClass.js")); | |
| 1256 | +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js")); | |
| 1257 | +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js")); | |
| 1258 | +var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ "../node_modules/@babel/runtime/helpers/inherits.js")); | |
| 1259 | +var commands = _interopRequireWildcard(__webpack_require__(/*! ./commands/ */ "../modules/checklist/assets/js/commands/index.js")); | |
| 1260 | +var commandsData = _interopRequireWildcard(__webpack_require__(/*! ./commands-data/ */ "../modules/checklist/assets/js/commands-data/index.js")); | |
| 1261 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 1262 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 1263 | +function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); } | |
| 1264 | +function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } | |
| 1265 | +var Component = exports["default"] = /*#__PURE__*/function (_$e$modules$Component) { | |
| 1266 | + function Component() { | |
| 1267 | + (0, _classCallCheck2.default)(this, Component); | |
| 1268 | + return _callSuper(this, Component, arguments); | |
| 1269 | + } | |
| 1270 | + (0, _inherits2.default)(Component, _$e$modules$Component); | |
| 1271 | + return (0, _createClass2.default)(Component, [{ | |
| 1272 | + key: "getNamespace", | |
| 1273 | + value: function getNamespace() { | |
| 1274 | + return 'checklist'; | |
| 1275 | + } | |
| 1276 | + }, { | |
| 1277 | + key: "defaultCommands", | |
| 1278 | + value: function defaultCommands() { | |
| 1279 | + return this.importCommands(commands); | |
| 1280 | + } | |
| 1281 | + }, { | |
| 1282 | + key: "defaultData", | |
| 1283 | + value: function defaultData() { | |
| 1284 | + return this.importCommands(commandsData); | |
| 1285 | + } | |
| 1286 | + }], [{ | |
| 1287 | + key: "getEndpointFormat", | |
| 1288 | + value: function getEndpointFormat() { | |
| 1289 | + return 'checklist'; | |
| 1290 | + } | |
| 1291 | + }]); | |
| 1292 | +}($e.modules.ComponentBase); | |
| 1293 | + | |
| 1294 | +/***/ }), | |
| 1295 | + | |
| 1296 | +/***/ "../modules/checklist/assets/js/editor-v-2.js": | |
| 1297 | +/*!****************************************************!*\ | |
| 1298 | + !*** ../modules/checklist/assets/js/editor-v-2.js ***! | |
| 1299 | + \****************************************************/ | |
| 1300 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1301 | + | |
| 1302 | +"use strict"; | |
| 1303 | + | |
| 1304 | + | |
| 1305 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1306 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 1307 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1308 | + value: true | |
| 1309 | +})); | |
| 1310 | +exports.editorV2 = void 0; | |
| 1311 | +var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar")); | |
| 1312 | +var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 1313 | +var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 1314 | +var _topbarIcon = _interopRequireDefault(__webpack_require__(/*! ./topbar-icon */ "../modules/checklist/assets/js/topbar-icon.js")); | |
| 1315 | +var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 1316 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1317 | +var _commands = __webpack_require__(/*! ./commands */ "../modules/checklist/assets/js/commands/index.js"); | |
| 1318 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 1319 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 1320 | +var queryClient = new _query.QueryClient(); | |
| 1321 | +var editorV2 = exports.editorV2 = function editorV2() { | |
| 1322 | + var utilitiesMenu = EditorAppBar.utilitiesMenu; | |
| 1323 | + utilitiesMenu.registerLink({ | |
| 1324 | + id: 'app-bar-menu-item-checklist', | |
| 1325 | + priority: 5, | |
| 1326 | + useProps: function useProps() { | |
| 1327 | + return { | |
| 1328 | + title: (0, _i18n.__)('Checklist', 'elementor'), | |
| 1329 | + icon: function icon() { | |
| 1330 | + return /*#__PURE__*/React.createElement(_query.QueryClientProvider, { | |
| 1331 | + client: queryClient | |
| 1332 | + }, /*#__PURE__*/React.createElement(_topbarIcon.default, null)); | |
| 1333 | + }, | |
| 1334 | + onClick: function onClick() { | |
| 1335 | + (0, _functions.addMixpanelTrackingChecklistTopBar)(_commands.TogglePopup.isOpen); | |
| 1336 | + (0, _functions.toggleChecklistPopup)(); | |
| 1337 | + } | |
| 1338 | + }; | |
| 1339 | + } | |
| 1340 | + }); | |
| 1341 | +}; | |
| 1342 | + | |
| 1343 | +/***/ }), | |
| 1344 | + | |
| 1345 | +/***/ "../modules/checklist/assets/js/topbar-icon.js": | |
| 1346 | +/*!*****************************************************!*\ | |
| 1347 | + !*** ../modules/checklist/assets/js/topbar-icon.js ***! | |
| 1348 | + \*****************************************************/ | |
| 1349 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1350 | + | |
| 1351 | +"use strict"; | |
| 1352 | + | |
| 1353 | + | |
| 1354 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1355 | +var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 1356 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1357 | + value: true | |
| 1358 | +})); | |
| 1359 | +exports["default"] = void 0; | |
| 1360 | +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 1361 | +var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 1362 | +var React = _react; | |
| 1363 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 1364 | +var _editorV1Adapters = __webpack_require__(/*! @elementor/editor-v1-adapters */ "@elementor/editor-v1-adapters"); | |
| 1365 | +var _RocketIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/RocketIcon */ "@elementor/icons/RocketIcon")); | |
| 1366 | +var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 1367 | +var _reminderModal = _interopRequireDefault(__webpack_require__(/*! ./app/components/reminder-modal */ "../modules/checklist/assets/js/app/components/reminder-modal.js")); | |
| 1368 | +var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 1369 | +var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 1370 | +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | |
| 1371 | +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | |
| 1372 | +var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = _consts.USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; | |
| 1373 | +var TopBarIcon = function TopBarIcon() { | |
| 1374 | + var _useState = (0, _react.useState)(false), | |
| 1375 | + _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 1376 | + hasRoot = _useState2[0], | |
| 1377 | + setHasRoot = _useState2[1], | |
| 1378 | + _useState3 = (0, _react.useState)(false), | |
| 1379 | + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 1380 | + open = _useState4[0], | |
| 1381 | + setOpen = _useState4[1], | |
| 1382 | + _useQuery = (0, _query.useQuery)({ | |
| 1383 | + queryKey: ['closedForFirstTime'], | |
| 1384 | + queryFn: _functions.fetchUserProgress | |
| 1385 | + }), | |
| 1386 | + error = _useQuery.error, | |
| 1387 | + userProgress = _useQuery.data, | |
| 1388 | + closedForFirstTime = userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]; | |
| 1389 | + (0, _react.useEffect)(function () { | |
| 1390 | + return (0, _editorV1Adapters.__privateListenTo)((0, _editorV1Adapters.commandEndEvent)('checklist/toggle-popup'), function (e) { | |
| 1391 | + setHasRoot(e.args.isOpen); | |
| 1392 | + }); | |
| 1393 | + }, [hasRoot]); | |
| 1394 | + (0, _react.useEffect)(function () { | |
| 1395 | + var handleFirstClosed = function handleFirstClosed() { | |
| 1396 | + setOpen(true); | |
| 1397 | + }; | |
| 1398 | + window.addEventListener('elementor/checklist/first_close', handleFirstClosed); | |
| 1399 | + return function () { | |
| 1400 | + window.removeEventListener('elementor/checklist/first_close', handleFirstClosed); | |
| 1401 | + }; | |
| 1402 | + }, []); | |
| 1403 | + if (error) { | |
| 1404 | + return null; | |
| 1405 | + } | |
| 1406 | + return hasRoot && !closedForFirstTime ? /*#__PURE__*/React.createElement(_RocketIcon.default, null) : /*#__PURE__*/React.createElement(_ui.Infotip, { | |
| 1407 | + placement: "bottom-start", | |
| 1408 | + content: /*#__PURE__*/React.createElement(_reminderModal.default, { | |
| 1409 | + setHasRoot: setHasRoot, | |
| 1410 | + setOpen: setOpen | |
| 1411 | + }), | |
| 1412 | + open: open, | |
| 1413 | + PopperProps: { | |
| 1414 | + modifiers: [{ | |
| 1415 | + name: 'offset', | |
| 1416 | + options: { | |
| 1417 | + offset: [-16, 12] | |
| 1418 | + } | |
| 1419 | + }] | |
| 1420 | + } | |
| 1421 | + }, /*#__PURE__*/React.createElement(_RocketIcon.default, null)); | |
| 1422 | +}; | |
| 1423 | +var _default = exports["default"] = TopBarIcon; | |
| 1424 | + | |
| 1425 | +/***/ }), | |
| 1426 | + | |
| 1427 | +/***/ "../modules/checklist/assets/js/utils/consts.js": | |
| 1428 | +/*!******************************************************!*\ | |
| 1429 | + !*** ../modules/checklist/assets/js/utils/consts.js ***! | |
| 1430 | + \******************************************************/ | |
| 1431 | +/***/ ((__unused_webpack_module, exports) => { | |
| 1432 | + | |
| 1433 | +"use strict"; | |
| 1434 | + | |
| 1435 | + | |
| 1436 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1437 | + value: true | |
| 1438 | +})); | |
| 1439 | +exports.USER_PROGRESS_ROUTE = exports.USER_PROGRESS = exports.STEP_IDS_TO_COMPLETE_IN_EDITOR = exports.STEPS_ROUTE = exports.STEP = exports.PANEL_ROUTES = exports.MIXPANEL_CHECKLIST_STEPS = void 0; | |
| 1440 | +var STEPS_ROUTE = exports.STEPS_ROUTE = 'checklist/steps', | |
| 1441 | + USER_PROGRESS_ROUTE = exports.USER_PROGRESS_ROUTE = 'checklist/user-progress'; | |
| 1442 | +var STEP = exports.STEP = { | |
| 1443 | + IS_MARKED_COMPLETED: 'is_marked_completed', | |
| 1444 | + IS_IMMUTABLE_COMPLETED: 'is_immutable_completed', | |
| 1445 | + IS_ABSOLUTE_COMPLETED: 'is_absolute_completed', | |
| 1446 | + PROMOTION_DATA: 'promotion_data' | |
| 1447 | +}; | |
| 1448 | +var USER_PROGRESS = exports.USER_PROGRESS = { | |
| 1449 | + LAST_OPENED_TIMESTAMP: 'last_opened_timestamp', | |
| 1450 | + SHOULD_OPEN_IN_EDITOR: 'should_open_in_editor', | |
| 1451 | + CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME: 'first_closed_checklist_in_editor', | |
| 1452 | + IS_POPUP_MINIMIZED: 'is_popup_minimized', | |
| 1453 | + EDITOR_VISIT_COUNT: 'e_editor_counter' | |
| 1454 | +}; | |
| 1455 | +var STEP_IDS_TO_COMPLETE_IN_EDITOR = exports.STEP_IDS_TO_COMPLETE_IN_EDITOR = ['add_logo', 'set_fonts_and_colors']; | |
| 1456 | +var PANEL_ROUTES = exports.PANEL_ROUTES = { | |
| 1457 | + add_logo: 'panel/global/settings-site-identity', | |
| 1458 | + set_fonts_and_colors: 'panel/global/global-typography' | |
| 1459 | +}; | |
| 1460 | +var MIXPANEL_CHECKLIST_STEPS = exports.MIXPANEL_CHECKLIST_STEPS = { | |
| 1461 | + UPGRADE: 'upgrade', | |
| 1462 | + ACTION: 'action', | |
| 1463 | + DONE: 'done', | |
| 1464 | + UNDONE: 'undone', | |
| 1465 | + TITLE: 'title', | |
| 1466 | + WELL_DONE: 'well_done', | |
| 1467 | + CHECKLIST_HEADER_CLOSE: 'checklistHeaderClose', | |
| 1468 | + ACCORDION_SECTION: 'accordionSection' | |
| 1469 | +}; | |
| 1470 | + | |
| 1471 | +/***/ }), | |
| 1472 | + | |
| 1473 | +/***/ "../modules/checklist/assets/js/utils/functions.js": | |
| 1474 | +/*!*********************************************************!*\ | |
| 1475 | + !*** ../modules/checklist/assets/js/utils/functions.js ***! | |
| 1476 | + \*********************************************************/ | |
| 1477 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1478 | + | |
| 1479 | +"use strict"; | |
| 1480 | + | |
| 1481 | + | |
| 1482 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 1483 | +Object.defineProperty(exports, "__esModule", ({ | |
| 1484 | + value: true | |
| 1485 | +})); | |
| 1486 | +exports.addMixpanelTrackingChecklistHeader = addMixpanelTrackingChecklistHeader; | |
| 1487 | +exports.addMixpanelTrackingChecklistSteps = addMixpanelTrackingChecklistSteps; | |
| 1488 | +exports.addMixpanelTrackingChecklistTopBar = addMixpanelTrackingChecklistTopBar; | |
| 1489 | +exports.dispatchChecklistOpenEvent = dispatchChecklistOpenEvent; | |
| 1490 | +exports.fetchSteps = fetchSteps; | |
| 1491 | +exports.fetchUserProgress = fetchUserProgress; | |
| 1492 | +exports.getAndUpdateStep = getAndUpdateStep; | |
| 1493 | +exports.getDocumentMetaDataMixpanel = getDocumentMetaDataMixpanel; | |
| 1494 | +exports.isStepChecked = isStepChecked; | |
| 1495 | +exports.toggleChecklistPopup = toggleChecklistPopup; | |
| 1496 | +exports.updateStep = updateStep; | |
| 1497 | +exports.updateUserProgress = updateUserProgress; | |
| 1498 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 1499 | +var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "../node_modules/@babel/runtime/helpers/defineProperty.js")); | |
| 1500 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 1501 | +var _consts = __webpack_require__(/*! ./consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 1502 | +function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } | |
| 1503 | +function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } | |
| 1504 | +var IS_MARKED_COMPLETED = _consts.STEP.IS_MARKED_COMPLETED, | |
| 1505 | + IS_ABSOLUTE_COMPLETED = _consts.STEP.IS_ABSOLUTE_COMPLETED, | |
| 1506 | + IS_IMMUTABLE_COMPLETED = _consts.STEP.IS_IMMUTABLE_COMPLETED, | |
| 1507 | + PROMOTION_DATA = _consts.STEP.PROMOTION_DATA; | |
| 1508 | +function isStepChecked(step) { | |
| 1509 | + return !step[PROMOTION_DATA] && (step[IS_MARKED_COMPLETED] || step[IS_ABSOLUTE_COMPLETED] || step[IS_IMMUTABLE_COMPLETED]); | |
| 1510 | +} | |
| 1511 | +function toggleChecklistPopup() { | |
| 1512 | + $e.run('checklist/toggle-popup'); | |
| 1513 | +} | |
| 1514 | +function fetchSteps() { | |
| 1515 | + return _fetchSteps.apply(this, arguments); | |
| 1516 | +} | |
| 1517 | +function _fetchSteps() { | |
| 1518 | + _fetchSteps = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 1519 | + var _response$data; | |
| 1520 | + var response; | |
| 1521 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 1522 | + while (1) switch (_context.prev = _context.next) { | |
| 1523 | + case 0: | |
| 1524 | + _context.next = 2; | |
| 1525 | + return $e.data.get(_consts.STEPS_ROUTE, {}, { | |
| 1526 | + refresh: true | |
| 1527 | + }); | |
| 1528 | + case 2: | |
| 1529 | + response = _context.sent; | |
| 1530 | + return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.data) || null); | |
| 1531 | + case 4: | |
| 1532 | + case "end": | |
| 1533 | + return _context.stop(); | |
| 1534 | + } | |
| 1535 | + }, _callee); | |
| 1536 | + })); | |
| 1537 | + return _fetchSteps.apply(this, arguments); | |
| 1538 | +} | |
| 1539 | +function fetchUserProgress() { | |
| 1540 | + return _fetchUserProgress.apply(this, arguments); | |
| 1541 | +} | |
| 1542 | +function _fetchUserProgress() { | |
| 1543 | + _fetchUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee2() { | |
| 1544 | + var _response$data2; | |
| 1545 | + var response; | |
| 1546 | + return _regenerator.default.wrap(function _callee2$(_context2) { | |
| 1547 | + while (1) switch (_context2.prev = _context2.next) { | |
| 1548 | + case 0: | |
| 1549 | + _context2.next = 2; | |
| 1550 | + return $e.data.get(_consts.USER_PROGRESS_ROUTE, {}, { | |
| 1551 | + refresh: true | |
| 1552 | + }); | |
| 1553 | + case 2: | |
| 1554 | + response = _context2.sent; | |
| 1555 | + return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.data) || null); | |
| 1556 | + case 4: | |
| 1557 | + case "end": | |
| 1558 | + return _context2.stop(); | |
| 1559 | + } | |
| 1560 | + }, _callee2); | |
| 1561 | + })); | |
| 1562 | + return _fetchUserProgress.apply(this, arguments); | |
| 1563 | +} | |
| 1564 | +function updateStep(_x, _x2) { | |
| 1565 | + return _updateStep.apply(this, arguments); | |
| 1566 | +} | |
| 1567 | +function _updateStep() { | |
| 1568 | + _updateStep = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee3(id, data) { | |
| 1569 | + return _regenerator.default.wrap(function _callee3$(_context3) { | |
| 1570 | + while (1) switch (_context3.prev = _context3.next) { | |
| 1571 | + case 0: | |
| 1572 | + _context3.next = 2; | |
| 1573 | + return $e.data.update(_consts.STEPS_ROUTE, _objectSpread({ | |
| 1574 | + id: id | |
| 1575 | + }, data), { | |
| 1576 | + id: id | |
| 1577 | + }); | |
| 1578 | + case 2: | |
| 1579 | + return _context3.abrupt("return", _context3.sent); | |
| 1580 | + case 3: | |
| 1581 | + case "end": | |
| 1582 | + return _context3.stop(); | |
| 1583 | + } | |
| 1584 | + }, _callee3); | |
| 1585 | + })); | |
| 1586 | + return _updateStep.apply(this, arguments); | |
| 1587 | +} | |
| 1588 | +function updateUserProgress(_x3) { | |
| 1589 | + return _updateUserProgress.apply(this, arguments); | |
| 1590 | +} | |
| 1591 | +function _updateUserProgress() { | |
| 1592 | + _updateUserProgress = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee4(data) { | |
| 1593 | + return _regenerator.default.wrap(function _callee4$(_context4) { | |
| 1594 | + while (1) switch (_context4.prev = _context4.next) { | |
| 1595 | + case 0: | |
| 1596 | + _context4.next = 2; | |
| 1597 | + return $e.data.update(_consts.USER_PROGRESS_ROUTE, data); | |
| 1598 | + case 2: | |
| 1599 | + return _context4.abrupt("return", _context4.sent); | |
| 1600 | + case 3: | |
| 1601 | + case "end": | |
| 1602 | + return _context4.stop(); | |
| 1603 | + } | |
| 1604 | + }, _callee4); | |
| 1605 | + })); | |
| 1606 | + return _updateUserProgress.apply(this, arguments); | |
| 1607 | +} | |
| 1608 | +function getAndUpdateStep(id, step, key, value) { | |
| 1609 | + if (step.config.id !== id) { | |
| 1610 | + return step; | |
| 1611 | + } | |
| 1612 | + return _objectSpread(_objectSpread({}, step), {}, (0, _defineProperty2.default)({}, key, value)); | |
| 1613 | +} | |
| 1614 | +function addMixpanelTrackingChecklistSteps(name, action) { | |
| 1615 | + var element = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'button'; | |
| 1616 | + var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1617 | + name = name.replace(/_/g, ''); | |
| 1618 | + var eventName = "checklist_steps_".concat(action, "_").concat(name); | |
| 1619 | + return elementor.editorEvents.dispatchEvent(eventName, _objectSpread({ | |
| 1620 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1621 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.checklistSteps, | |
| 1622 | + trigger: elementor.editorEvents.config.triggers.click, | |
| 1623 | + element: elementor.editorEvents.config.elements[element] | |
| 1624 | + }, documentMetaData)); | |
| 1625 | +} | |
| 1626 | +function addMixpanelTrackingChecklistHeader(name) { | |
| 1627 | + var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1628 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.elementorEditor.checklist[name], _objectSpread({ | |
| 1629 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1630 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.checklistHeader, | |
| 1631 | + trigger: elementor.editorEvents.config.triggers.click, | |
| 1632 | + element: elementor.editorEvents.config.elements.buttonIcon | |
| 1633 | + }, documentMetaData)); | |
| 1634 | +} | |
| 1635 | +function addMixpanelTrackingChecklistTopBar(togglePopupState) { | |
| 1636 | + var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1637 | + var name = !togglePopupState ? 'launchpadOn' : 'launchpadOff'; | |
| 1638 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.topBar[name], _objectSpread({ | |
| 1639 | + location: elementor.editorEvents.config.locations.topBar, | |
| 1640 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.launchpad, | |
| 1641 | + trigger: elementor.editorEvents.config.triggers.toggleClick, | |
| 1642 | + element: elementor.editorEvents.config.elements.buttonIcon | |
| 1643 | + }, documentMetaData)); | |
| 1644 | +} | |
| 1645 | +function dispatchChecklistOpenEvent() { | |
| 1646 | + var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1647 | + return elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.elementorEditor.checklist.checklistFirstPopup, _objectSpread({ | |
| 1648 | + location: elementor.editorEvents.config.locations.elementorEditor, | |
| 1649 | + secondaryLocation: elementor.editorEvents.config.secondaryLocations.launchpad, | |
| 1650 | + trigger: elementor.editorEvents.config.triggers.editorLoaded, | |
| 1651 | + element: elementor.editorEvents.config.elements.launchpadChecklist | |
| 1652 | + }, documentMetaData)); | |
| 1653 | +} | |
| 1654 | +function getDocumentMetaDataMixpanel() { | |
| 1655 | + var postId = elementor.getPreviewContainer().document.config.id; | |
| 1656 | + var postTitle = elementor.getPreviewContainer().model.attributes.settings.attributes.post_title; | |
| 1657 | + var postTypeTitle = elementor.getPreviewContainer().document.config.post_type_title; | |
| 1658 | + var documentType = elementor.getPreviewContainer().document.config.type; | |
| 1659 | + return { | |
| 1660 | + postId: postId, | |
| 1661 | + postTitle: postTitle, | |
| 1662 | + postTypeTitle: postTypeTitle, | |
| 1663 | + documentType: documentType | |
| 1664 | + }; | |
| 1665 | +} | |
| 1666 | + | |
| 1667 | +/***/ }), | |
| 1668 | + | |
| 1669 | +/***/ "../node_modules/object-assign/index.js": | |
| 1670 | +/*!**********************************************!*\ | |
| 1671 | + !*** ../node_modules/object-assign/index.js ***! | |
| 1672 | + \**********************************************/ | |
| 1673 | +/***/ ((module) => { | |
| 1674 | + | |
| 1675 | +"use strict"; | |
| 1676 | +/* | |
| 1677 | +object-assign | |
| 1678 | +(c) Sindre Sorhus | |
| 1679 | +@license MIT | |
| 1680 | +*/ | |
| 1681 | + | |
| 1682 | + | |
| 1683 | +/* eslint-disable no-unused-vars */ | |
| 1684 | +var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 1685 | +var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 1686 | +var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 1687 | + | |
| 1688 | +function toObject(val) { | |
| 1689 | + if (val === null || val === undefined) { | |
| 1690 | + throw new TypeError('Object.assign cannot be called with null or undefined'); | |
| 1691 | + } | |
| 1692 | + | |
| 1693 | + return Object(val); | |
| 1694 | +} | |
| 1695 | + | |
| 1696 | +function shouldUseNative() { | |
| 1697 | + try { | |
| 1698 | + if (!Object.assign) { | |
| 1699 | + return false; | |
| 22 | 1700 | } |
| 23 | - if (!no_symbols) { | |
| 24 | - __defProp(target, Symbol.toStringTag, { value: "Module" }); | |
| 1701 | + | |
| 1702 | + // Detect buggy property enumeration order in older V8 versions. | |
| 1703 | + | |
| 1704 | + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 | |
| 1705 | + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers | |
| 1706 | + test1[5] = 'de'; | |
| 1707 | + if (Object.getOwnPropertyNames(test1)[0] === '5') { | |
| 1708 | + return false; | |
| 25 | 1709 | } |
| 26 | - return target; | |
| 27 | - }; | |
| 28 | - var __copyProps = (to, from, except, desc) => { | |
| 29 | - if (from && typeof from === "object" || typeof from === "function") { | |
| 30 | - for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { | |
| 31 | - key = keys[i]; | |
| 32 | - if (!__hasOwnProp.call(to, key) && key !== except) { | |
| 33 | - __defProp(to, key, { | |
| 34 | - get: ((k) => from[k]).bind(null, key), | |
| 35 | - enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable | |
| 36 | - }); | |
| 37 | - } | |
| 38 | - } | |
| 1710 | + | |
| 1711 | + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 1712 | + var test2 = {}; | |
| 1713 | + for (var i = 0; i < 10; i++) { | |
| 1714 | + test2['_' + String.fromCharCode(i)] = i; | |
| 39 | 1715 | } |
| 40 | - return to; | |
| 41 | - }; | |
| 42 | - var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { | |
| 43 | - value: mod, | |
| 44 | - enumerable: true | |
| 45 | - }) : target, mod)); | |
| 1716 | + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { | |
| 1717 | + return test2[n]; | |
| 1718 | + }); | |
| 1719 | + if (order2.join('') !== '0123456789') { | |
| 1720 | + return false; | |
| 1721 | + } | |
| 46 | 1722 | |
| 47 | -//#endregion | |
| 48 | -_elementor_editor_app_bar = __toESM(_elementor_editor_app_bar); | |
| 49 | -react = __toESM(react); | |
| 50 | -_elementor_icons_RocketIcon = __toESM(_elementor_icons_RocketIcon); | |
| 1723 | + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 | |
| 1724 | + var test3 = {}; | |
| 1725 | + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { | |
| 1726 | + test3[letter] = letter; | |
| 1727 | + }); | |
| 1728 | + if (Object.keys(Object.assign({}, test3)).join('') !== | |
| 1729 | + 'abcdefghijklmnopqrst') { | |
| 1730 | + return false; | |
| 1731 | + } | |
| 51 | 1732 | |
| 52 | -//#region node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js | |
| 53 | - function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 54 | - try { | |
| 55 | - var i = n[a](c); | |
| 56 | - var u = i.value; | |
| 57 | - } catch (n) { | |
| 58 | - e(n); | |
| 59 | - return; | |
| 60 | - } | |
| 61 | - i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 1733 | + return true; | |
| 1734 | + } catch (err) { | |
| 1735 | + // We don't expect any of the above to throw, but better to be safe. | |
| 1736 | + return false; | |
| 62 | 1737 | } |
| 63 | - function _asyncToGenerator(n) { | |
| 64 | - return function() { | |
| 65 | - var t = this; | |
| 66 | - var e = arguments; | |
| 67 | - return new Promise(function(r, o) { | |
| 68 | - var a = n.apply(t, e); | |
| 69 | - function _next(n) { | |
| 70 | - asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 71 | - } | |
| 72 | - function _throw(n) { | |
| 73 | - asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 74 | - } | |
| 75 | - _next(void 0); | |
| 76 | - }); | |
| 77 | - }; | |
| 78 | - } | |
| 1738 | +} | |
| 79 | 1739 | |
| 80 | -//#endregion | |
| 81 | -//#region node_modules/@babel/runtime/helpers/OverloadYield.js | |
| 82 | - var require_OverloadYield = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 83 | - function _OverloadYield(e, d) { | |
| 84 | - this.v = e, this.k = d; | |
| 85 | - } | |
| 86 | - module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 87 | - })); | |
| 1740 | +module.exports = shouldUseNative() ? Object.assign : function (target, source) { | |
| 1741 | + var from; | |
| 1742 | + var to = toObject(target); | |
| 1743 | + var symbols; | |
| 88 | 1744 | |
| 89 | -//#endregion | |
| 90 | -//#region node_modules/@babel/runtime/helpers/regeneratorDefine.js | |
| 91 | - var require_regeneratorDefine = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 92 | - function _regeneratorDefine(e, r, n, t) { | |
| 93 | - var i = Object.defineProperty; | |
| 94 | - try { | |
| 95 | - i({}, "", {}); | |
| 96 | - } catch (e) { | |
| 97 | - i = 0; | |
| 98 | - } | |
| 99 | - module.exports = _regeneratorDefine = function regeneratorDefine(e, r, n, t) { | |
| 100 | - function o(r, n) { | |
| 101 | - _regeneratorDefine(e, r, function(e) { | |
| 102 | - return this._invoke(r, n, e); | |
| 103 | - }); | |
| 104 | - } | |
| 105 | - r ? i ? i(e, r, { | |
| 106 | - value: n, | |
| 107 | - enumerable: !t, | |
| 108 | - configurable: !t, | |
| 109 | - writable: !t | |
| 110 | - }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); | |
| 111 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _regeneratorDefine(e, r, n, t); | |
| 112 | - } | |
| 113 | - module.exports = _regeneratorDefine, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 114 | - })); | |
| 1745 | + for (var s = 1; s < arguments.length; s++) { | |
| 1746 | + from = Object(arguments[s]); | |
| 115 | 1747 | |
| 116 | -//#endregion | |
| 117 | -//#region node_modules/@babel/runtime/helpers/regenerator.js | |
| 118 | - var require_regenerator$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 119 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 120 | - function _regenerator() { | |
| 121 | - /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ | |
| 122 | - var e; | |
| 123 | - var t; | |
| 124 | - var r = "function" == typeof Symbol ? Symbol : {}; | |
| 125 | - var n = r.iterator || "@@iterator"; | |
| 126 | - var o = r.toStringTag || "@@toStringTag"; | |
| 127 | - function i(r, n, o, i) { | |
| 128 | - var c = n && n.prototype instanceof Generator ? n : Generator; | |
| 129 | - var u = Object.create(c.prototype); | |
| 130 | - return regeneratorDefine(u, "_invoke", function(r, n, o) { | |
| 131 | - var i; | |
| 132 | - var c; | |
| 133 | - var u; | |
| 134 | - var f = 0; | |
| 135 | - var p = o || []; | |
| 136 | - var y = !1; | |
| 137 | - var G = { | |
| 138 | - p: 0, | |
| 139 | - n: 0, | |
| 140 | - v: e, | |
| 141 | - a: d, | |
| 142 | - f: d.bind(e, 4), | |
| 143 | - d: function d(t, r) { | |
| 144 | - return i = t, c = 0, u = e, G.n = r, a; | |
| 145 | - } | |
| 146 | - }; | |
| 147 | - function d(r, n) { | |
| 148 | - for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { | |
| 149 | - var o; | |
| 150 | - var i = p[t]; | |
| 151 | - var d = G.p; | |
| 152 | - var l = i[2]; | |
| 153 | - r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); | |
| 154 | - } | |
| 155 | - if (o || r > 1) return a; | |
| 156 | - throw y = !0, n; | |
| 157 | - } | |
| 158 | - return function(o, p, l) { | |
| 159 | - if (f > 1) throw TypeError("Generator is already running"); | |
| 160 | - for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { | |
| 161 | - i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); | |
| 162 | - try { | |
| 163 | - if (f = 2, i) { | |
| 164 | - if (c || (o = "next"), t = i[o]) { | |
| 165 | - if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); | |
| 166 | - if (!t.done) return t; | |
| 167 | - u = t.value, c < 2 && (c = 0); | |
| 168 | - } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); | |
| 169 | - i = e; | |
| 170 | - } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; | |
| 171 | - } catch (t) { | |
| 172 | - i = e, c = 1, u = t; | |
| 173 | - } finally { | |
| 174 | - f = 1; | |
| 175 | - } | |
| 176 | - } | |
| 177 | - return { | |
| 178 | - value: t, | |
| 179 | - done: y | |
| 180 | - }; | |
| 181 | - }; | |
| 182 | - }(r, o, i), !0), u; | |
| 1748 | + for (var key in from) { | |
| 1749 | + if (hasOwnProperty.call(from, key)) { | |
| 1750 | + to[key] = from[key]; | |
| 183 | 1751 | } |
| 184 | - var a = {}; | |
| 185 | - function Generator() {} | |
| 186 | - function GeneratorFunction() {} | |
| 187 | - function GeneratorFunctionPrototype() {} | |
| 188 | - t = Object.getPrototypeOf; | |
| 189 | - var c = [][n] ? t(t([][n]())) : (regeneratorDefine(t = {}, n, function() { | |
| 190 | - return this; | |
| 191 | - }), t); | |
| 192 | - var u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); | |
| 193 | - function f(e) { | |
| 194 | - return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; | |
| 195 | - } | |
| 196 | - return GeneratorFunction.prototype = GeneratorFunctionPrototype, regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), regeneratorDefine(u), regeneratorDefine(u, o, "Generator"), regeneratorDefine(u, n, function() { | |
| 197 | - return this; | |
| 198 | - }), regeneratorDefine(u, "toString", function() { | |
| 199 | - return "[object Generator]"; | |
| 200 | - }), (module.exports = _regenerator = function _regenerator() { | |
| 201 | - return { | |
| 202 | - w: i, | |
| 203 | - m: f | |
| 204 | - }; | |
| 205 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 206 | 1752 | } |
| 207 | - module.exports = _regenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 208 | - })); | |
| 209 | 1753 | |
| 210 | -//#endregion | |
| 211 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncIterator.js | |
| 212 | - var require_regeneratorAsyncIterator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 213 | - var OverloadYield = require_OverloadYield(); | |
| 214 | - var regeneratorDefine = require_regeneratorDefine(); | |
| 215 | - function AsyncIterator(t, e) { | |
| 216 | - function n(r, o, i, f) { | |
| 217 | - try { | |
| 218 | - var c = t[r](o); | |
| 219 | - var u = c.value; | |
| 220 | - return u instanceof OverloadYield ? e.resolve(u.v).then(function(t) { | |
| 221 | - n("next", t, i, f); | |
| 222 | - }, function(t) { | |
| 223 | - n("throw", t, i, f); | |
| 224 | - }) : e.resolve(u).then(function(t) { | |
| 225 | - c.value = t, i(c); | |
| 226 | - }, function(t) { | |
| 227 | - return n("throw", t, i, f); | |
| 228 | - }); | |
| 229 | - } catch (t) { | |
| 230 | - f(t); | |
| 1754 | + if (getOwnPropertySymbols) { | |
| 1755 | + symbols = getOwnPropertySymbols(from); | |
| 1756 | + for (var i = 0; i < symbols.length; i++) { | |
| 1757 | + if (propIsEnumerable.call(from, symbols[i])) { | |
| 1758 | + to[symbols[i]] = from[symbols[i]]; | |
| 231 | 1759 | } |
| 232 | 1760 | } |
| 233 | - var r; | |
| 234 | - this.next || (regeneratorDefine(AsyncIterator.prototype), regeneratorDefine(AsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function() { | |
| 235 | - return this; | |
| 236 | - })), regeneratorDefine(this, "_invoke", function(t, o, i) { | |
| 237 | - function f() { | |
| 238 | - return new e(function(e, r) { | |
| 239 | - n(t, i, e, r); | |
| 240 | - }); | |
| 241 | - } | |
| 242 | - return r = r ? r.then(f, f) : f(); | |
| 243 | - }, !0); | |
| 244 | 1761 | } |
| 245 | - module.exports = AsyncIterator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 246 | - })); | |
| 1762 | + } | |
| 247 | 1763 | |
| 248 | -//#endregion | |
| 249 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsyncGen.js | |
| 250 | - var require_regeneratorAsyncGen = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 251 | - var regenerator = require_regenerator$1(); | |
| 252 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 253 | - function _regeneratorAsyncGen(r, e, t, o, n) { | |
| 254 | - return new regeneratorAsyncIterator(regenerator().w(r, e, t, o), n || Promise); | |
| 255 | - } | |
| 256 | - module.exports = _regeneratorAsyncGen, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 257 | - })); | |
| 1764 | + return to; | |
| 1765 | +}; | |
| 258 | 1766 | |
| 259 | -//#endregion | |
| 260 | -//#region node_modules/@babel/runtime/helpers/regeneratorAsync.js | |
| 261 | - var require_regeneratorAsync = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 262 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 263 | - function _regeneratorAsync(n, e, r, t, o) { | |
| 264 | - var a = regeneratorAsyncGen(n, e, r, t, o); | |
| 265 | - return a.next().then(function(n) { | |
| 266 | - return n.done ? n.value : a.next(); | |
| 267 | - }); | |
| 268 | - } | |
| 269 | - module.exports = _regeneratorAsync, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 270 | - })); | |
| 271 | 1767 | |
| 272 | -//#endregion | |
| 273 | -//#region node_modules/@babel/runtime/helpers/regeneratorKeys.js | |
| 274 | - var require_regeneratorKeys = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 275 | - function _regeneratorKeys(e) { | |
| 276 | - var n = Object(e); | |
| 277 | - var r = []; | |
| 278 | - for (var t in n) r.unshift(t); | |
| 279 | - return function e() { | |
| 280 | - for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; | |
| 281 | - return e.done = !0, e; | |
| 282 | - }; | |
| 283 | - } | |
| 284 | - module.exports = _regeneratorKeys, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 285 | - })); | |
| 1768 | +/***/ }), | |
| 286 | 1769 | |
| 287 | -//#endregion | |
| 288 | -//#region node_modules/@babel/runtime/helpers/typeof.js | |
| 289 | - var require_typeof = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 290 | - function _typeof(o) { | |
| 291 | - "@babel/helpers - typeof"; | |
| 292 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 293 | - return typeof o; | |
| 294 | - } : function(o) { | |
| 295 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 296 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 297 | - } | |
| 298 | - module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 299 | - })); | |
| 1770 | +/***/ "../node_modules/prop-types/checkPropTypes.js": | |
| 1771 | +/*!****************************************************!*\ | |
| 1772 | + !*** ../node_modules/prop-types/checkPropTypes.js ***! | |
| 1773 | + \****************************************************/ | |
| 1774 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 300 | 1775 | |
| 301 | -//#endregion | |
| 302 | -//#region node_modules/@babel/runtime/helpers/regeneratorValues.js | |
| 303 | - var require_regeneratorValues = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 304 | - var _typeof = require_typeof()["default"]; | |
| 305 | - function _regeneratorValues(e) { | |
| 306 | - if (null != e) { | |
| 307 | - var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"]; | |
| 308 | - var r = 0; | |
| 309 | - if (t) return t.call(e); | |
| 310 | - if ("function" == typeof e.next) return e; | |
| 311 | - if (!isNaN(e.length)) return { next: function next() { | |
| 312 | - return e && r >= e.length && (e = void 0), { | |
| 313 | - value: e && e[r++], | |
| 314 | - done: !e | |
| 315 | - }; | |
| 316 | - } }; | |
| 317 | - } | |
| 318 | - throw new TypeError(_typeof(e) + " is not iterable"); | |
| 319 | - } | |
| 320 | - module.exports = _regeneratorValues, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 321 | - })); | |
| 1776 | +"use strict"; | |
| 1777 | +/** | |
| 1778 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 1779 | + * | |
| 1780 | + * This source code is licensed under the MIT license found in the | |
| 1781 | + * LICENSE file in the root directory of this source tree. | |
| 1782 | + */ | |
| 322 | 1783 | |
| 323 | -//#endregion | |
| 324 | -//#region node_modules/@babel/runtime/helpers/regeneratorRuntime.js | |
| 325 | - var require_regeneratorRuntime = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 326 | - var OverloadYield = require_OverloadYield(); | |
| 327 | - var regenerator = require_regenerator$1(); | |
| 328 | - var regeneratorAsync = require_regeneratorAsync(); | |
| 329 | - var regeneratorAsyncGen = require_regeneratorAsyncGen(); | |
| 330 | - var regeneratorAsyncIterator = require_regeneratorAsyncIterator(); | |
| 331 | - var regeneratorKeys = require_regeneratorKeys(); | |
| 332 | - var regeneratorValues = require_regeneratorValues(); | |
| 333 | - function _regeneratorRuntime() { | |
| 334 | - "use strict"; | |
| 335 | - var r = regenerator(); | |
| 336 | - var e = r.m(_regeneratorRuntime); | |
| 337 | - var t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; | |
| 338 | - function n(r) { | |
| 339 | - var e = "function" == typeof r && r.constructor; | |
| 340 | - return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); | |
| 341 | - } | |
| 342 | - var o = { | |
| 343 | - "throw": 1, | |
| 344 | - "return": 2, | |
| 345 | - "break": 3, | |
| 346 | - "continue": 3 | |
| 347 | - }; | |
| 348 | - function a(r) { | |
| 349 | - var e; | |
| 350 | - var t; | |
| 351 | - return function(n) { | |
| 352 | - e || (e = { | |
| 353 | - stop: function stop() { | |
| 354 | - return t(n.a, 2); | |
| 355 | - }, | |
| 356 | - "catch": function _catch() { | |
| 357 | - return n.v; | |
| 358 | - }, | |
| 359 | - abrupt: function abrupt(r, e) { | |
| 360 | - return t(n.a, o[r], e); | |
| 361 | - }, | |
| 362 | - delegateYield: function delegateYield(r, o, a) { | |
| 363 | - return e.resultName = o, t(n.d, regeneratorValues(r), a); | |
| 364 | - }, | |
| 365 | - finish: function finish(r) { | |
| 366 | - return t(n.f, r); | |
| 367 | - } | |
| 368 | - }, t = function t(r, _t, o) { | |
| 369 | - n.p = e.prev, n.n = e.next; | |
| 370 | - try { | |
| 371 | - return r(_t, o); | |
| 372 | - } finally { | |
| 373 | - e.next = n.n; | |
| 374 | - } | |
| 375 | - }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; | |
| 376 | - try { | |
| 377 | - return r.call(this, e); | |
| 378 | - } finally { | |
| 379 | - n.p = e.prev, n.n = e.next; | |
| 380 | - } | |
| 381 | - }; | |
| 382 | - } | |
| 383 | - return (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 384 | - return { | |
| 385 | - wrap: function wrap(e, t, n, o) { | |
| 386 | - return r.w(a(e), t, n, o && o.reverse()); | |
| 387 | - }, | |
| 388 | - isGeneratorFunction: n, | |
| 389 | - mark: r.m, | |
| 390 | - awrap: function awrap(r, e) { | |
| 391 | - return new OverloadYield(r, e); | |
| 392 | - }, | |
| 393 | - AsyncIterator: regeneratorAsyncIterator, | |
| 394 | - async: function async(r, e, t, o, u) { | |
| 395 | - return (n(e) ? regeneratorAsyncGen : regeneratorAsync)(a(r), e, t, o, u); | |
| 396 | - }, | |
| 397 | - keys: regeneratorKeys, | |
| 398 | - values: regeneratorValues | |
| 399 | - }; | |
| 400 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports)(); | |
| 401 | - } | |
| 402 | - module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 403 | - })); | |
| 404 | 1784 | |
| 405 | -//#endregion | |
| 406 | -//#region node_modules/@babel/runtime/regenerator/index.js | |
| 407 | - var require_regenerator = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 408 | - var runtime = require_regeneratorRuntime()(); | |
| 409 | - module.exports = runtime; | |
| 410 | - try { | |
| 411 | - regeneratorRuntime = runtime; | |
| 412 | - } catch (accidentalStrictMode) { | |
| 413 | - if (typeof globalThis === "object") globalThis.regeneratorRuntime = runtime; | |
| 414 | - else Function("r", "regeneratorRuntime = r")(runtime); | |
| 415 | - } | |
| 416 | - })); | |
| 417 | 1785 | |
| 418 | -//#endregion | |
| 419 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js | |
| 420 | -var import_regenerator = /* @__PURE__ */ __toESM(require_regenerator()); | |
| 421 | - function _arrayWithHoles(r) { | |
| 422 | - if (Array.isArray(r)) return r; | |
| 423 | - } | |
| 1786 | +var printWarning = function() {}; | |
| 424 | 1787 | |
| 425 | -//#endregion | |
| 426 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js | |
| 427 | - function _iterableToArrayLimit(r, l) { | |
| 428 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 429 | - if (null != t) { | |
| 430 | - var e; | |
| 431 | - var n; | |
| 432 | - var i; | |
| 433 | - var u; | |
| 434 | - var a = []; | |
| 435 | - var f = !0; | |
| 436 | - var o = !1; | |
| 437 | - try { | |
| 438 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 439 | - if (Object(t) !== t) return; | |
| 440 | - f = !1; | |
| 441 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 442 | - } catch (r) { | |
| 443 | - o = !0, n = r; | |
| 444 | - } finally { | |
| 445 | - try { | |
| 446 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 447 | - } finally { | |
| 448 | - if (o) throw n; | |
| 449 | - } | |
| 450 | - } | |
| 451 | - return a; | |
| 452 | - } | |
| 453 | - } | |
| 1788 | +if (true) { | |
| 1789 | + var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 1790 | + var loggedTypeFailures = {}; | |
| 1791 | + var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 454 | 1792 | |
| 455 | -//#endregion | |
| 456 | -//#region node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js | |
| 457 | - function _arrayLikeToArray(r, a) { | |
| 458 | - (null == a || a > r.length) && (a = r.length); | |
| 459 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 460 | - return n; | |
| 461 | - } | |
| 1793 | + printWarning = function(text) { | |
| 1794 | + var message = 'Warning: ' + text; | |
| 1795 | + if (typeof console !== 'undefined') { | |
| 1796 | + console.error(message); | |
| 1797 | + } | |
| 1798 | + try { | |
| 1799 | + // --- Welcome to debugging React --- | |
| 1800 | + // This error was thrown as a convenience so that you can use this stack | |
| 1801 | + // to find the callsite that caused this warning to fire. | |
| 1802 | + throw new Error(message); | |
| 1803 | + } catch (x) { /**/ } | |
| 1804 | + }; | |
| 1805 | +} | |
| 462 | 1806 | |
| 463 | -//#endregion | |
| 464 | -//#region node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js | |
| 465 | - function _unsupportedIterableToArray(r, a) { | |
| 466 | - if (r) { | |
| 467 | - if ("string" == typeof r) return _arrayLikeToArray(r, a); | |
| 468 | - var t = {}.toString.call(r).slice(8, -1); | |
| 469 | - 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; | |
| 470 | - } | |
| 471 | - } | |
| 1807 | +/** | |
| 1808 | + * Assert that the values match with the type specs. | |
| 1809 | + * Error messages are memorized and will only be shown once. | |
| 1810 | + * | |
| 1811 | + * @param {object} typeSpecs Map of name to a ReactPropType | |
| 1812 | + * @param {object} values Runtime values that need to be type-checked | |
| 1813 | + * @param {string} location e.g. "prop", "context", "child context" | |
| 1814 | + * @param {string} componentName Name of the component for error messages. | |
| 1815 | + * @param {?Function} getStack Returns the component stack. | |
| 1816 | + * @private | |
| 1817 | + */ | |
| 1818 | +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 1819 | + if (true) { | |
| 1820 | + for (var typeSpecName in typeSpecs) { | |
| 1821 | + if (has(typeSpecs, typeSpecName)) { | |
| 1822 | + var error; | |
| 1823 | + // Prop type validation may throw. In case they do, we don't want to | |
| 1824 | + // fail the render phase where it didn't fail before. So we log it. | |
| 1825 | + // After these have been cleaned up, we'll let them throw. | |
| 1826 | + try { | |
| 1827 | + // This is intentionally an invariant that gets caught. It's the same | |
| 1828 | + // behavior as without this statement except with a better message. | |
| 1829 | + if (typeof typeSpecs[typeSpecName] !== 'function') { | |
| 1830 | + var err = Error( | |
| 1831 | + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + | |
| 1832 | + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + | |
| 1833 | + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' | |
| 1834 | + ); | |
| 1835 | + err.name = 'Invariant Violation'; | |
| 1836 | + throw err; | |
| 1837 | + } | |
| 1838 | + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 1839 | + } catch (ex) { | |
| 1840 | + error = ex; | |
| 1841 | + } | |
| 1842 | + if (error && !(error instanceof Error)) { | |
| 1843 | + printWarning( | |
| 1844 | + (componentName || 'React class') + ': type specification of ' + | |
| 1845 | + location + ' `' + typeSpecName + '` is invalid; the type checker ' + | |
| 1846 | + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + | |
| 1847 | + 'You may have forgotten to pass an argument to the type checker ' + | |
| 1848 | + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + | |
| 1849 | + 'shape all require an argument).' | |
| 1850 | + ); | |
| 1851 | + } | |
| 1852 | + if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 1853 | + // Only monitor this failure once because there tends to be a lot of the | |
| 1854 | + // same error. | |
| 1855 | + loggedTypeFailures[error.message] = true; | |
| 472 | 1856 | |
| 473 | -//#endregion | |
| 474 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableRest.js | |
| 475 | - function _nonIterableRest() { | |
| 476 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 477 | - } | |
| 1857 | + var stack = getStack ? getStack() : ''; | |
| 478 | 1858 | |
| 479 | -//#endregion | |
| 480 | -//#region node_modules/@babel/runtime/helpers/esm/slicedToArray.js | |
| 481 | - function _slicedToArray(r, e) { | |
| 482 | - return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); | |
| 483 | - } | |
| 1859 | + printWarning( | |
| 1860 | + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') | |
| 1861 | + ); | |
| 1862 | + } | |
| 1863 | + } | |
| 1864 | + } | |
| 1865 | + } | |
| 1866 | +} | |
| 484 | 1867 | |
| 485 | -//#endregion | |
| 486 | -//#region node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js | |
| 1868 | +/** | |
| 1869 | + * Resets warning cache when testing. | |
| 1870 | + * | |
| 1871 | + * @private | |
| 1872 | + */ | |
| 1873 | +checkPropTypes.resetWarningCache = function() { | |
| 1874 | + if (true) { | |
| 1875 | + loggedTypeFailures = {}; | |
| 1876 | + } | |
| 1877 | +} | |
| 1878 | + | |
| 1879 | +module.exports = checkPropTypes; | |
| 1880 | + | |
| 1881 | + | |
| 1882 | +/***/ }), | |
| 1883 | + | |
| 1884 | +/***/ "../node_modules/prop-types/factoryWithTypeCheckers.js": | |
| 1885 | +/*!*************************************************************!*\ | |
| 1886 | + !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***! | |
| 1887 | + \*************************************************************/ | |
| 1888 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1889 | + | |
| 1890 | +"use strict"; | |
| 1891 | +/** | |
| 1892 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 1893 | + * | |
| 1894 | + * This source code is licensed under the MIT license found in the | |
| 1895 | + * LICENSE file in the root directory of this source tree. | |
| 1896 | + */ | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | +var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 1901 | +var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js"); | |
| 1902 | + | |
| 1903 | +var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js"); | |
| 1904 | +var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js"); | |
| 1905 | +var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js"); | |
| 1906 | + | |
| 1907 | +var printWarning = function() {}; | |
| 1908 | + | |
| 1909 | +if (true) { | |
| 1910 | + printWarning = function(text) { | |
| 1911 | + var message = 'Warning: ' + text; | |
| 1912 | + if (typeof console !== 'undefined') { | |
| 1913 | + console.error(message); | |
| 1914 | + } | |
| 1915 | + try { | |
| 1916 | + // --- Welcome to debugging React --- | |
| 1917 | + // This error was thrown as a convenience so that you can use this stack | |
| 1918 | + // to find the callsite that caused this warning to fire. | |
| 1919 | + throw new Error(message); | |
| 1920 | + } catch (x) {} | |
| 1921 | + }; | |
| 1922 | +} | |
| 1923 | + | |
| 1924 | +function emptyFunctionThatReturnsNull() { | |
| 1925 | + return null; | |
| 1926 | +} | |
| 1927 | + | |
| 1928 | +module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 1929 | + /* global Symbol */ | |
| 1930 | + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; | |
| 1931 | + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. | |
| 1932 | + | |
| 1933 | + /** | |
| 1934 | + * Returns the iterator method function contained on the iterable object. | |
| 1935 | + * | |
| 1936 | + * Be sure to invoke the function with the iterable as context: | |
| 1937 | + * | |
| 1938 | + * var iteratorFn = getIteratorFn(myIterable); | |
| 1939 | + * if (iteratorFn) { | |
| 1940 | + * var iterator = iteratorFn.call(myIterable); | |
| 1941 | + * ... | |
| 1942 | + * } | |
| 1943 | + * | |
| 1944 | + * @param {?object} maybeIterable | |
| 1945 | + * @return {?function} | |
| 1946 | + */ | |
| 1947 | + function getIteratorFn(maybeIterable) { | |
| 1948 | + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 1949 | + if (typeof iteratorFn === 'function') { | |
| 1950 | + return iteratorFn; | |
| 1951 | + } | |
| 1952 | + } | |
| 1953 | + | |
| 1954 | + /** | |
| 1955 | + * Collection of methods that allow declaration and validation of props that are | |
| 1956 | + * supplied to React components. Example usage: | |
| 1957 | + * | |
| 1958 | + * var Props = require('ReactPropTypes'); | |
| 1959 | + * var MyArticle = React.createClass({ | |
| 1960 | + * propTypes: { | |
| 1961 | + * // An optional string prop named "description". | |
| 1962 | + * description: Props.string, | |
| 1963 | + * | |
| 1964 | + * // A required enum prop named "category". | |
| 1965 | + * category: Props.oneOf(['News','Photos']).isRequired, | |
| 1966 | + * | |
| 1967 | + * // A prop named "dialog" that requires an instance of Dialog. | |
| 1968 | + * dialog: Props.instanceOf(Dialog).isRequired | |
| 1969 | + * }, | |
| 1970 | + * render: function() { ... } | |
| 1971 | + * }); | |
| 1972 | + * | |
| 1973 | + * A more formal specification of how these methods are used: | |
| 1974 | + * | |
| 1975 | + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 1976 | + * decl := ReactPropTypes.{type}(.isRequired)? | |
| 1977 | + * | |
| 1978 | + * Each and every declaration produces a function with the same signature. This | |
| 1979 | + * allows the creation of custom validation functions. For example: | |
| 1980 | + * | |
| 1981 | + * var MyLink = React.createClass({ | |
| 1982 | + * propTypes: { | |
| 1983 | + * // An optional string or URI prop named "href". | |
| 1984 | + * href: function(props, propName, componentName) { | |
| 1985 | + * var propValue = props[propName]; | |
| 1986 | + * if (propValue != null && typeof propValue !== 'string' && | |
| 1987 | + * !(propValue instanceof URI)) { | |
| 1988 | + * return new Error( | |
| 1989 | + * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 1990 | + * componentName | |
| 1991 | + * ); | |
| 1992 | + * } | |
| 1993 | + * } | |
| 1994 | + * }, | |
| 1995 | + * render: function() {...} | |
| 1996 | + * }); | |
| 1997 | + * | |
| 1998 | + * @internal | |
| 1999 | + */ | |
| 2000 | + | |
| 2001 | + var ANONYMOUS = '<<anonymous>>'; | |
| 2002 | + | |
| 2003 | + // Important! | |
| 2004 | + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. | |
| 2005 | + var ReactPropTypes = { | |
| 2006 | + array: createPrimitiveTypeChecker('array'), | |
| 2007 | + bigint: createPrimitiveTypeChecker('bigint'), | |
| 2008 | + bool: createPrimitiveTypeChecker('boolean'), | |
| 2009 | + func: createPrimitiveTypeChecker('function'), | |
| 2010 | + number: createPrimitiveTypeChecker('number'), | |
| 2011 | + object: createPrimitiveTypeChecker('object'), | |
| 2012 | + string: createPrimitiveTypeChecker('string'), | |
| 2013 | + symbol: createPrimitiveTypeChecker('symbol'), | |
| 2014 | + | |
| 2015 | + any: createAnyTypeChecker(), | |
| 2016 | + arrayOf: createArrayOfTypeChecker, | |
| 2017 | + element: createElementTypeChecker(), | |
| 2018 | + elementType: createElementTypeTypeChecker(), | |
| 2019 | + instanceOf: createInstanceTypeChecker, | |
| 2020 | + node: createNodeChecker(), | |
| 2021 | + objectOf: createObjectOfTypeChecker, | |
| 2022 | + oneOf: createEnumTypeChecker, | |
| 2023 | + oneOfType: createUnionTypeChecker, | |
| 2024 | + shape: createShapeTypeChecker, | |
| 2025 | + exact: createStrictShapeTypeChecker, | |
| 2026 | + }; | |
| 2027 | + | |
| 2028 | + /** | |
| 2029 | + * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 2030 | + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 2031 | + */ | |
| 2032 | + /*eslint-disable no-self-compare*/ | |
| 2033 | + function is(x, y) { | |
| 2034 | + // SameValue algorithm | |
| 2035 | + if (x === y) { | |
| 2036 | + // Steps 1-5, 7-10 | |
| 2037 | + // Steps 6.b-6.e: +0 != -0 | |
| 2038 | + return x !== 0 || 1 / x === 1 / y; | |
| 2039 | + } else { | |
| 2040 | + // Step 6.a: NaN == NaN | |
| 2041 | + return x !== x && y !== y; | |
| 2042 | + } | |
| 2043 | + } | |
| 2044 | + /*eslint-enable no-self-compare*/ | |
| 2045 | + | |
| 2046 | + /** | |
| 2047 | + * We use an Error-like object for backward compatibility as people may call | |
| 2048 | + * PropTypes directly and inspect their output. However, we don't use real | |
| 2049 | + * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 2050 | + * is prohibitively expensive if they are created too often, such as what | |
| 2051 | + * happens in oneOfType() for any type before the one that matched. | |
| 2052 | + */ | |
| 2053 | + function PropTypeError(message, data) { | |
| 2054 | + this.message = message; | |
| 2055 | + this.data = data && typeof data === 'object' ? data: {}; | |
| 2056 | + this.stack = ''; | |
| 2057 | + } | |
| 2058 | + // Make `instanceof Error` still work for returned errors. | |
| 2059 | + PropTypeError.prototype = Error.prototype; | |
| 2060 | + | |
| 2061 | + function createChainableTypeChecker(validate) { | |
| 2062 | + if (true) { | |
| 2063 | + var manualPropTypeCallCache = {}; | |
| 2064 | + var manualPropTypeWarningCount = 0; | |
| 2065 | + } | |
| 2066 | + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 2067 | + componentName = componentName || ANONYMOUS; | |
| 2068 | + propFullName = propFullName || propName; | |
| 2069 | + | |
| 2070 | + if (secret !== ReactPropTypesSecret) { | |
| 2071 | + if (throwOnDirectAccess) { | |
| 2072 | + // New behavior only for users of `prop-types` package | |
| 2073 | + var err = new Error( | |
| 2074 | + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + | |
| 2075 | + 'Use `PropTypes.checkPropTypes()` to call them. ' + | |
| 2076 | + 'Read more at http://fb.me/use-check-prop-types' | |
| 2077 | + ); | |
| 2078 | + err.name = 'Invariant Violation'; | |
| 2079 | + throw err; | |
| 2080 | + } else if ( true && typeof console !== 'undefined') { | |
| 2081 | + // Old behavior for people using React.PropTypes | |
| 2082 | + var cacheKey = componentName + ':' + propName; | |
| 2083 | + if ( | |
| 2084 | + !manualPropTypeCallCache[cacheKey] && | |
| 2085 | + // Avoid spamming the console because they are often not actionable except for lib authors | |
| 2086 | + manualPropTypeWarningCount < 3 | |
| 2087 | + ) { | |
| 2088 | + printWarning( | |
| 2089 | + 'You are manually calling a React.PropTypes validation ' + | |
| 2090 | + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | |
| 2091 | + 'and will throw in the standalone `prop-types` package. ' + | |
| 2092 | + 'You may be seeing this warning due to a third-party PropTypes ' + | |
| 2093 | + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' | |
| 2094 | + ); | |
| 2095 | + manualPropTypeCallCache[cacheKey] = true; | |
| 2096 | + manualPropTypeWarningCount++; | |
| 2097 | + } | |
| 2098 | + } | |
| 2099 | + } | |
| 2100 | + if (props[propName] == null) { | |
| 2101 | + if (isRequired) { | |
| 2102 | + if (props[propName] === null) { | |
| 2103 | + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); | |
| 2104 | + } | |
| 2105 | + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); | |
| 2106 | + } | |
| 2107 | + return null; | |
| 2108 | + } else { | |
| 2109 | + return validate(props, propName, componentName, location, propFullName); | |
| 2110 | + } | |
| 2111 | + } | |
| 2112 | + | |
| 2113 | + var chainedCheckType = checkType.bind(null, false); | |
| 2114 | + chainedCheckType.isRequired = checkType.bind(null, true); | |
| 2115 | + | |
| 2116 | + return chainedCheckType; | |
| 2117 | + } | |
| 2118 | + | |
| 2119 | + function createPrimitiveTypeChecker(expectedType) { | |
| 2120 | + function validate(props, propName, componentName, location, propFullName, secret) { | |
| 2121 | + var propValue = props[propName]; | |
| 2122 | + var propType = getPropType(propValue); | |
| 2123 | + if (propType !== expectedType) { | |
| 2124 | + // `propValue` being instance of, say, date/regexp, pass the 'object' | |
| 2125 | + // check, but we can offer a more precise error message here rather than | |
| 2126 | + // 'of type `object`'. | |
| 2127 | + var preciseType = getPreciseType(propValue); | |
| 2128 | + | |
| 2129 | + return new PropTypeError( | |
| 2130 | + 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), | |
| 2131 | + {expectedType: expectedType} | |
| 2132 | + ); | |
| 2133 | + } | |
| 2134 | + return null; | |
| 2135 | + } | |
| 2136 | + return createChainableTypeChecker(validate); | |
| 2137 | + } | |
| 2138 | + | |
| 2139 | + function createAnyTypeChecker() { | |
| 2140 | + return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 2141 | + } | |
| 2142 | + | |
| 2143 | + function createArrayOfTypeChecker(typeChecker) { | |
| 2144 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2145 | + if (typeof typeChecker !== 'function') { | |
| 2146 | + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); | |
| 2147 | + } | |
| 2148 | + var propValue = props[propName]; | |
| 2149 | + if (!Array.isArray(propValue)) { | |
| 2150 | + var propType = getPropType(propValue); | |
| 2151 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); | |
| 2152 | + } | |
| 2153 | + for (var i = 0; i < propValue.length; i++) { | |
| 2154 | + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); | |
| 2155 | + if (error instanceof Error) { | |
| 2156 | + return error; | |
| 2157 | + } | |
| 2158 | + } | |
| 2159 | + return null; | |
| 2160 | + } | |
| 2161 | + return createChainableTypeChecker(validate); | |
| 2162 | + } | |
| 2163 | + | |
| 2164 | + function createElementTypeChecker() { | |
| 2165 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2166 | + var propValue = props[propName]; | |
| 2167 | + if (!isValidElement(propValue)) { | |
| 2168 | + var propType = getPropType(propValue); | |
| 2169 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); | |
| 2170 | + } | |
| 2171 | + return null; | |
| 2172 | + } | |
| 2173 | + return createChainableTypeChecker(validate); | |
| 2174 | + } | |
| 2175 | + | |
| 2176 | + function createElementTypeTypeChecker() { | |
| 2177 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2178 | + var propValue = props[propName]; | |
| 2179 | + if (!ReactIs.isValidElementType(propValue)) { | |
| 2180 | + var propType = getPropType(propValue); | |
| 2181 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); | |
| 2182 | + } | |
| 2183 | + return null; | |
| 2184 | + } | |
| 2185 | + return createChainableTypeChecker(validate); | |
| 2186 | + } | |
| 2187 | + | |
| 2188 | + function createInstanceTypeChecker(expectedClass) { | |
| 2189 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2190 | + if (!(props[propName] instanceof expectedClass)) { | |
| 2191 | + var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 2192 | + var actualClassName = getClassName(props[propName]); | |
| 2193 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); | |
| 2194 | + } | |
| 2195 | + return null; | |
| 2196 | + } | |
| 2197 | + return createChainableTypeChecker(validate); | |
| 2198 | + } | |
| 2199 | + | |
| 2200 | + function createEnumTypeChecker(expectedValues) { | |
| 2201 | + if (!Array.isArray(expectedValues)) { | |
| 2202 | + if (true) { | |
| 2203 | + if (arguments.length > 1) { | |
| 2204 | + printWarning( | |
| 2205 | + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + | |
| 2206 | + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' | |
| 2207 | + ); | |
| 2208 | + } else { | |
| 2209 | + printWarning('Invalid argument supplied to oneOf, expected an array.'); | |
| 2210 | + } | |
| 2211 | + } | |
| 2212 | + return emptyFunctionThatReturnsNull; | |
| 2213 | + } | |
| 2214 | + | |
| 2215 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2216 | + var propValue = props[propName]; | |
| 2217 | + for (var i = 0; i < expectedValues.length; i++) { | |
| 2218 | + if (is(propValue, expectedValues[i])) { | |
| 2219 | + return null; | |
| 2220 | + } | |
| 2221 | + } | |
| 2222 | + | |
| 2223 | + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 2224 | + var type = getPreciseType(value); | |
| 2225 | + if (type === 'symbol') { | |
| 2226 | + return String(value); | |
| 2227 | + } | |
| 2228 | + return value; | |
| 2229 | + }); | |
| 2230 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); | |
| 2231 | + } | |
| 2232 | + return createChainableTypeChecker(validate); | |
| 2233 | + } | |
| 2234 | + | |
| 2235 | + function createObjectOfTypeChecker(typeChecker) { | |
| 2236 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2237 | + if (typeof typeChecker !== 'function') { | |
| 2238 | + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); | |
| 2239 | + } | |
| 2240 | + var propValue = props[propName]; | |
| 2241 | + var propType = getPropType(propValue); | |
| 2242 | + if (propType !== 'object') { | |
| 2243 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); | |
| 2244 | + } | |
| 2245 | + for (var key in propValue) { | |
| 2246 | + if (has(propValue, key)) { | |
| 2247 | + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 2248 | + if (error instanceof Error) { | |
| 2249 | + return error; | |
| 2250 | + } | |
| 2251 | + } | |
| 2252 | + } | |
| 2253 | + return null; | |
| 2254 | + } | |
| 2255 | + return createChainableTypeChecker(validate); | |
| 2256 | + } | |
| 2257 | + | |
| 2258 | + function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 2259 | + if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 2260 | + true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0; | |
| 2261 | + return emptyFunctionThatReturnsNull; | |
| 2262 | + } | |
| 2263 | + | |
| 2264 | + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 2265 | + var checker = arrayOfTypeCheckers[i]; | |
| 2266 | + if (typeof checker !== 'function') { | |
| 2267 | + printWarning( | |
| 2268 | + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + | |
| 2269 | + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' | |
| 2270 | + ); | |
| 2271 | + return emptyFunctionThatReturnsNull; | |
| 2272 | + } | |
| 2273 | + } | |
| 2274 | + | |
| 2275 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2276 | + var expectedTypes = []; | |
| 2277 | + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 2278 | + var checker = arrayOfTypeCheckers[i]; | |
| 2279 | + var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 2280 | + if (checkerResult == null) { | |
| 2281 | + return null; | |
| 2282 | + } | |
| 2283 | + if (checkerResult.data && has(checkerResult.data, 'expectedType')) { | |
| 2284 | + expectedTypes.push(checkerResult.data.expectedType); | |
| 2285 | + } | |
| 2286 | + } | |
| 2287 | + var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; | |
| 2288 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); | |
| 2289 | + } | |
| 2290 | + return createChainableTypeChecker(validate); | |
| 2291 | + } | |
| 2292 | + | |
| 2293 | + function createNodeChecker() { | |
| 2294 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2295 | + if (!isNode(props[propName])) { | |
| 2296 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); | |
| 2297 | + } | |
| 2298 | + return null; | |
| 2299 | + } | |
| 2300 | + return createChainableTypeChecker(validate); | |
| 2301 | + } | |
| 2302 | + | |
| 2303 | + function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 2304 | + return new PropTypeError( | |
| 2305 | + (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + | |
| 2306 | + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' | |
| 2307 | + ); | |
| 2308 | + } | |
| 2309 | + | |
| 2310 | + function createShapeTypeChecker(shapeTypes) { | |
| 2311 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2312 | + var propValue = props[propName]; | |
| 2313 | + var propType = getPropType(propValue); | |
| 2314 | + if (propType !== 'object') { | |
| 2315 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 2316 | + } | |
| 2317 | + for (var key in shapeTypes) { | |
| 2318 | + var checker = shapeTypes[key]; | |
| 2319 | + if (typeof checker !== 'function') { | |
| 2320 | + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 2321 | + } | |
| 2322 | + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 2323 | + if (error) { | |
| 2324 | + return error; | |
| 2325 | + } | |
| 2326 | + } | |
| 2327 | + return null; | |
| 2328 | + } | |
| 2329 | + return createChainableTypeChecker(validate); | |
| 2330 | + } | |
| 2331 | + | |
| 2332 | + function createStrictShapeTypeChecker(shapeTypes) { | |
| 2333 | + function validate(props, propName, componentName, location, propFullName) { | |
| 2334 | + var propValue = props[propName]; | |
| 2335 | + var propType = getPropType(propValue); | |
| 2336 | + if (propType !== 'object') { | |
| 2337 | + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); | |
| 2338 | + } | |
| 2339 | + // We need to check all keys in case some are required but missing from props. | |
| 2340 | + var allKeys = assign({}, props[propName], shapeTypes); | |
| 2341 | + for (var key in allKeys) { | |
| 2342 | + var checker = shapeTypes[key]; | |
| 2343 | + if (has(shapeTypes, key) && typeof checker !== 'function') { | |
| 2344 | + return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 2345 | + } | |
| 2346 | + if (!checker) { | |
| 2347 | + return new PropTypeError( | |
| 2348 | + 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + | |
| 2349 | + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + | |
| 2350 | + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | |
| 2351 | + ); | |
| 2352 | + } | |
| 2353 | + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); | |
| 2354 | + if (error) { | |
| 2355 | + return error; | |
| 2356 | + } | |
| 2357 | + } | |
| 2358 | + return null; | |
| 2359 | + } | |
| 2360 | + | |
| 2361 | + return createChainableTypeChecker(validate); | |
| 2362 | + } | |
| 2363 | + | |
| 2364 | + function isNode(propValue) { | |
| 2365 | + switch (typeof propValue) { | |
| 2366 | + case 'number': | |
| 2367 | + case 'string': | |
| 2368 | + case 'undefined': | |
| 2369 | + return true; | |
| 2370 | + case 'boolean': | |
| 2371 | + return !propValue; | |
| 2372 | + case 'object': | |
| 2373 | + if (Array.isArray(propValue)) { | |
| 2374 | + return propValue.every(isNode); | |
| 2375 | + } | |
| 2376 | + if (propValue === null || isValidElement(propValue)) { | |
| 2377 | + return true; | |
| 2378 | + } | |
| 2379 | + | |
| 2380 | + var iteratorFn = getIteratorFn(propValue); | |
| 2381 | + if (iteratorFn) { | |
| 2382 | + var iterator = iteratorFn.call(propValue); | |
| 2383 | + var step; | |
| 2384 | + if (iteratorFn !== propValue.entries) { | |
| 2385 | + while (!(step = iterator.next()).done) { | |
| 2386 | + if (!isNode(step.value)) { | |
| 2387 | + return false; | |
| 2388 | + } | |
| 2389 | + } | |
| 2390 | + } else { | |
| 2391 | + // Iterator will provide entry [k,v] tuples rather than values. | |
| 2392 | + while (!(step = iterator.next()).done) { | |
| 2393 | + var entry = step.value; | |
| 2394 | + if (entry) { | |
| 2395 | + if (!isNode(entry[1])) { | |
| 2396 | + return false; | |
| 2397 | + } | |
| 2398 | + } | |
| 2399 | + } | |
| 2400 | + } | |
| 2401 | + } else { | |
| 2402 | + return false; | |
| 2403 | + } | |
| 2404 | + | |
| 2405 | + return true; | |
| 2406 | + default: | |
| 2407 | + return false; | |
| 2408 | + } | |
| 2409 | + } | |
| 2410 | + | |
| 2411 | + function isSymbol(propType, propValue) { | |
| 2412 | + // Native Symbol. | |
| 2413 | + if (propType === 'symbol') { | |
| 2414 | + return true; | |
| 2415 | + } | |
| 2416 | + | |
| 2417 | + // falsy value can't be a Symbol | |
| 2418 | + if (!propValue) { | |
| 2419 | + return false; | |
| 2420 | + } | |
| 2421 | + | |
| 2422 | + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' | |
| 2423 | + if (propValue['@@toStringTag'] === 'Symbol') { | |
| 2424 | + return true; | |
| 2425 | + } | |
| 2426 | + | |
| 2427 | + // Fallback for non-spec compliant Symbols which are polyfilled. | |
| 2428 | + if (typeof Symbol === 'function' && propValue instanceof Symbol) { | |
| 2429 | + return true; | |
| 2430 | + } | |
| 2431 | + | |
| 2432 | + return false; | |
| 2433 | + } | |
| 2434 | + | |
| 2435 | + // Equivalent of `typeof` but with special handling for array and regexp. | |
| 2436 | + function getPropType(propValue) { | |
| 2437 | + var propType = typeof propValue; | |
| 2438 | + if (Array.isArray(propValue)) { | |
| 2439 | + return 'array'; | |
| 2440 | + } | |
| 2441 | + if (propValue instanceof RegExp) { | |
| 2442 | + // Old webkits (at least until Android 4.0) return 'function' rather than | |
| 2443 | + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ | |
| 2444 | + // passes PropTypes.object. | |
| 2445 | + return 'object'; | |
| 2446 | + } | |
| 2447 | + if (isSymbol(propType, propValue)) { | |
| 2448 | + return 'symbol'; | |
| 2449 | + } | |
| 2450 | + return propType; | |
| 2451 | + } | |
| 2452 | + | |
| 2453 | + // This handles more types than `getPropType`. Only used for error messages. | |
| 2454 | + // See `createPrimitiveTypeChecker`. | |
| 2455 | + function getPreciseType(propValue) { | |
| 2456 | + if (typeof propValue === 'undefined' || propValue === null) { | |
| 2457 | + return '' + propValue; | |
| 2458 | + } | |
| 2459 | + var propType = getPropType(propValue); | |
| 2460 | + if (propType === 'object') { | |
| 2461 | + if (propValue instanceof Date) { | |
| 2462 | + return 'date'; | |
| 2463 | + } else if (propValue instanceof RegExp) { | |
| 2464 | + return 'regexp'; | |
| 2465 | + } | |
| 2466 | + } | |
| 2467 | + return propType; | |
| 2468 | + } | |
| 2469 | + | |
| 2470 | + // Returns a string that is postfixed to a warning about an invalid type. | |
| 2471 | + // For example, "undefined" or "of type array" | |
| 2472 | + function getPostfixForTypeWarning(value) { | |
| 2473 | + var type = getPreciseType(value); | |
| 2474 | + switch (type) { | |
| 2475 | + case 'array': | |
| 2476 | + case 'object': | |
| 2477 | + return 'an ' + type; | |
| 2478 | + case 'boolean': | |
| 2479 | + case 'date': | |
| 2480 | + case 'regexp': | |
| 2481 | + return 'a ' + type; | |
| 2482 | + default: | |
| 2483 | + return type; | |
| 2484 | + } | |
| 2485 | + } | |
| 2486 | + | |
| 2487 | + // Returns class name of the object, if any. | |
| 2488 | + function getClassName(propValue) { | |
| 2489 | + if (!propValue.constructor || !propValue.constructor.name) { | |
| 2490 | + return ANONYMOUS; | |
| 2491 | + } | |
| 2492 | + return propValue.constructor.name; | |
| 2493 | + } | |
| 2494 | + | |
| 2495 | + ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 2496 | + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 2497 | + ReactPropTypes.PropTypes = ReactPropTypes; | |
| 2498 | + | |
| 2499 | + return ReactPropTypes; | |
| 2500 | +}; | |
| 2501 | + | |
| 2502 | + | |
| 2503 | +/***/ }), | |
| 2504 | + | |
| 2505 | +/***/ "../node_modules/prop-types/index.js": | |
| 2506 | +/*!*******************************************!*\ | |
| 2507 | + !*** ../node_modules/prop-types/index.js ***! | |
| 2508 | + \*******************************************/ | |
| 2509 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2510 | + | |
| 2511 | +/** | |
| 2512 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 2513 | + * | |
| 2514 | + * This source code is licensed under the MIT license found in the | |
| 2515 | + * LICENSE file in the root directory of this source tree. | |
| 2516 | + */ | |
| 2517 | + | |
| 2518 | +if (true) { | |
| 2519 | + var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js"); | |
| 2520 | + | |
| 2521 | + // By explicitly using `prop-types` you are opting into new development behavior. | |
| 2522 | + // http://fb.me/prop-types-in-prod | |
| 2523 | + var throwOnDirectAccess = true; | |
| 2524 | + module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); | |
| 2525 | +} else {} | |
| 2526 | + | |
| 2527 | + | |
| 2528 | +/***/ }), | |
| 2529 | + | |
| 2530 | +/***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js": | |
| 2531 | +/*!**************************************************************!*\ | |
| 2532 | + !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***! | |
| 2533 | + \**************************************************************/ | |
| 2534 | +/***/ ((module) => { | |
| 2535 | + | |
| 2536 | +"use strict"; | |
| 2537 | +/** | |
| 2538 | + * Copyright (c) 2013-present, Facebook, Inc. | |
| 2539 | + * | |
| 2540 | + * This source code is licensed under the MIT license found in the | |
| 2541 | + * LICENSE file in the root directory of this source tree. | |
| 2542 | + */ | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; | |
| 2547 | + | |
| 2548 | +module.exports = ReactPropTypesSecret; | |
| 2549 | + | |
| 2550 | + | |
| 2551 | +/***/ }), | |
| 2552 | + | |
| 2553 | +/***/ "../node_modules/prop-types/lib/has.js": | |
| 2554 | +/*!*********************************************!*\ | |
| 2555 | + !*** ../node_modules/prop-types/lib/has.js ***! | |
| 2556 | + \*********************************************/ | |
| 2557 | +/***/ ((module) => { | |
| 2558 | + | |
| 2559 | +module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 2560 | + | |
| 2561 | + | |
| 2562 | +/***/ }), | |
| 2563 | + | |
| 2564 | +/***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js": | |
| 2565 | +/*!************************************************************************************!*\ | |
| 2566 | + !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***! | |
| 2567 | + \************************************************************************************/ | |
| 2568 | +/***/ ((__unused_webpack_module, exports) => { | |
| 2569 | + | |
| 2570 | +"use strict"; | |
| 487 | 2571 | /** @license React v16.13.1 |
| 488 | - * react-is.development.js | |
| 489 | - * | |
| 490 | - * Copyright (c) Facebook, Inc. and its affiliates. | |
| 491 | - * | |
| 492 | - * This source code is licensed under the MIT license found in the | |
| 493 | - * LICENSE file in the root directory of this source tree. | |
| 494 | - */ | |
| 495 | - var require_react_is_development = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 496 | - (function() { | |
| 497 | - "use strict"; | |
| 498 | - var hasSymbol = typeof Symbol === "function" && Symbol.for; | |
| 499 | - var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103; | |
| 500 | - var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106; | |
| 501 | - var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107; | |
| 502 | - var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108; | |
| 503 | - var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114; | |
| 504 | - var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109; | |
| 505 | - var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110; | |
| 506 | - var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111; | |
| 507 | - var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111; | |
| 508 | - var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112; | |
| 509 | - var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113; | |
| 510 | - var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120; | |
| 511 | - var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115; | |
| 512 | - var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116; | |
| 513 | - var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121; | |
| 514 | - var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117; | |
| 515 | - var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118; | |
| 516 | - var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119; | |
| 517 | - function isValidElementType(type) { | |
| 518 | - return typeof type === "string" || typeof type === "function" || 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); | |
| 519 | - } | |
| 520 | - function typeOf(object) { | |
| 521 | - if (typeof object === "object" && object !== null) { | |
| 522 | - var $$typeof = object.$$typeof; | |
| 523 | - switch ($$typeof) { | |
| 524 | - case REACT_ELEMENT_TYPE: | |
| 525 | - var type = object.type; | |
| 526 | - switch (type) { | |
| 527 | - case REACT_ASYNC_MODE_TYPE: | |
| 528 | - case REACT_CONCURRENT_MODE_TYPE: | |
| 529 | - case REACT_FRAGMENT_TYPE: | |
| 530 | - case REACT_PROFILER_TYPE: | |
| 531 | - case REACT_STRICT_MODE_TYPE: | |
| 532 | - case REACT_SUSPENSE_TYPE: return type; | |
| 533 | - default: | |
| 534 | - var $$typeofType = type && type.$$typeof; | |
| 535 | - switch ($$typeofType) { | |
| 536 | - case REACT_CONTEXT_TYPE: | |
| 537 | - case REACT_FORWARD_REF_TYPE: | |
| 538 | - case REACT_LAZY_TYPE: | |
| 539 | - case REACT_MEMO_TYPE: | |
| 540 | - case REACT_PROVIDER_TYPE: return $$typeofType; | |
| 541 | - default: return $$typeof; | |
| 542 | - } | |
| 543 | - } | |
| 544 | - case REACT_PORTAL_TYPE: return $$typeof; | |
| 545 | - } | |
| 546 | - } | |
| 547 | - } | |
| 548 | - var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 549 | - var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 550 | - var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 551 | - var ContextProvider = REACT_PROVIDER_TYPE; | |
| 552 | - var Element = REACT_ELEMENT_TYPE; | |
| 553 | - var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 554 | - var Fragment = REACT_FRAGMENT_TYPE; | |
| 555 | - var Lazy = REACT_LAZY_TYPE; | |
| 556 | - var Memo = REACT_MEMO_TYPE; | |
| 557 | - var Portal = REACT_PORTAL_TYPE; | |
| 558 | - var Profiler = REACT_PROFILER_TYPE; | |
| 559 | - var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 560 | - var Suspense = REACT_SUSPENSE_TYPE; | |
| 561 | - var hasWarnedAboutDeprecatedIsAsyncMode = false; | |
| 562 | - function isAsyncMode(object) { | |
| 563 | - if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 564 | - hasWarnedAboutDeprecatedIsAsyncMode = true; | |
| 565 | - 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."); | |
| 566 | - } | |
| 567 | - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 568 | - } | |
| 569 | - function isConcurrentMode(object) { | |
| 570 | - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 571 | - } | |
| 572 | - function isContextConsumer(object) { | |
| 573 | - return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 574 | - } | |
| 575 | - function isContextProvider(object) { | |
| 576 | - return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 577 | - } | |
| 578 | - function isElement(object) { | |
| 579 | - return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 580 | - } | |
| 581 | - function isForwardRef(object) { | |
| 582 | - return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 583 | - } | |
| 584 | - function isFragment(object) { | |
| 585 | - return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 586 | - } | |
| 587 | - function isLazy(object) { | |
| 588 | - return typeOf(object) === REACT_LAZY_TYPE; | |
| 589 | - } | |
| 590 | - function isMemo(object) { | |
| 591 | - return typeOf(object) === REACT_MEMO_TYPE; | |
| 592 | - } | |
| 593 | - function isPortal(object) { | |
| 594 | - return typeOf(object) === REACT_PORTAL_TYPE; | |
| 595 | - } | |
| 596 | - function isProfiler(object) { | |
| 597 | - return typeOf(object) === REACT_PROFILER_TYPE; | |
| 598 | - } | |
| 599 | - function isStrictMode(object) { | |
| 600 | - return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 601 | - } | |
| 602 | - function isSuspense(object) { | |
| 603 | - return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 604 | - } | |
| 605 | - exports.AsyncMode = AsyncMode; | |
| 606 | - exports.ConcurrentMode = ConcurrentMode; | |
| 607 | - exports.ContextConsumer = ContextConsumer; | |
| 608 | - exports.ContextProvider = ContextProvider; | |
| 609 | - exports.Element = Element; | |
| 610 | - exports.ForwardRef = ForwardRef; | |
| 611 | - exports.Fragment = Fragment; | |
| 612 | - exports.Lazy = Lazy; | |
| 613 | - exports.Memo = Memo; | |
| 614 | - exports.Portal = Portal; | |
| 615 | - exports.Profiler = Profiler; | |
| 616 | - exports.StrictMode = StrictMode; | |
| 617 | - exports.Suspense = Suspense; | |
| 618 | - exports.isAsyncMode = isAsyncMode; | |
| 619 | - exports.isConcurrentMode = isConcurrentMode; | |
| 620 | - exports.isContextConsumer = isContextConsumer; | |
| 621 | - exports.isContextProvider = isContextProvider; | |
| 622 | - exports.isElement = isElement; | |
| 623 | - exports.isForwardRef = isForwardRef; | |
| 624 | - exports.isFragment = isFragment; | |
| 625 | - exports.isLazy = isLazy; | |
| 626 | - exports.isMemo = isMemo; | |
| 627 | - exports.isPortal = isPortal; | |
| 628 | - exports.isProfiler = isProfiler; | |
| 629 | - exports.isStrictMode = isStrictMode; | |
| 630 | - exports.isSuspense = isSuspense; | |
| 631 | - exports.isValidElementType = isValidElementType; | |
| 632 | - exports.typeOf = typeOf; | |
| 633 | - })(); | |
| 634 | - })); | |
| 2572 | + * react-is.development.js | |
| 2573 | + * | |
| 2574 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 2575 | + * | |
| 2576 | + * This source code is licensed under the MIT license found in the | |
| 2577 | + * LICENSE file in the root directory of this source tree. | |
| 2578 | + */ | |
| 635 | 2579 | |
| 636 | -//#endregion | |
| 637 | -//#region node_modules/prop-types/node_modules/react-is/index.js | |
| 638 | - var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 639 | - module.exports = require_react_is_development(); | |
| 640 | - })); | |
| 641 | 2580 | |
| 642 | -//#endregion | |
| 643 | -//#region node_modules/object-assign/index.js | |
| 2581 | + | |
| 2582 | + | |
| 2583 | + | |
| 2584 | +if (true) { | |
| 2585 | + (function() { | |
| 2586 | +'use strict'; | |
| 2587 | + | |
| 2588 | +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol | |
| 2589 | +// nor polyfill, then a plain number is used for performance. | |
| 2590 | +var hasSymbol = typeof Symbol === 'function' && Symbol.for; | |
| 2591 | +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; | |
| 2592 | +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; | |
| 2593 | +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; | |
| 2594 | +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; | |
| 2595 | +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; | |
| 2596 | +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; | |
| 2597 | +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary | |
| 2598 | +// (unstable) APIs that have been removed. Can we remove the symbols? | |
| 2599 | + | |
| 2600 | +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; | |
| 2601 | +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; | |
| 2602 | +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; | |
| 2603 | +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; | |
| 2604 | +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; | |
| 2605 | +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; | |
| 2606 | +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; | |
| 2607 | +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; | |
| 2608 | +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; | |
| 2609 | +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; | |
| 2610 | +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; | |
| 2611 | + | |
| 2612 | +function isValidElementType(type) { | |
| 2613 | + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. | |
| 2614 | + 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); | |
| 2615 | +} | |
| 2616 | + | |
| 2617 | +function typeOf(object) { | |
| 2618 | + if (typeof object === 'object' && object !== null) { | |
| 2619 | + var $$typeof = object.$$typeof; | |
| 2620 | + | |
| 2621 | + switch ($$typeof) { | |
| 2622 | + case REACT_ELEMENT_TYPE: | |
| 2623 | + var type = object.type; | |
| 2624 | + | |
| 2625 | + switch (type) { | |
| 2626 | + case REACT_ASYNC_MODE_TYPE: | |
| 2627 | + case REACT_CONCURRENT_MODE_TYPE: | |
| 2628 | + case REACT_FRAGMENT_TYPE: | |
| 2629 | + case REACT_PROFILER_TYPE: | |
| 2630 | + case REACT_STRICT_MODE_TYPE: | |
| 2631 | + case REACT_SUSPENSE_TYPE: | |
| 2632 | + return type; | |
| 2633 | + | |
| 2634 | + default: | |
| 2635 | + var $$typeofType = type && type.$$typeof; | |
| 2636 | + | |
| 2637 | + switch ($$typeofType) { | |
| 2638 | + case REACT_CONTEXT_TYPE: | |
| 2639 | + case REACT_FORWARD_REF_TYPE: | |
| 2640 | + case REACT_LAZY_TYPE: | |
| 2641 | + case REACT_MEMO_TYPE: | |
| 2642 | + case REACT_PROVIDER_TYPE: | |
| 2643 | + return $$typeofType; | |
| 2644 | + | |
| 2645 | + default: | |
| 2646 | + return $$typeof; | |
| 2647 | + } | |
| 2648 | + | |
| 2649 | + } | |
| 2650 | + | |
| 2651 | + case REACT_PORTAL_TYPE: | |
| 2652 | + return $$typeof; | |
| 2653 | + } | |
| 2654 | + } | |
| 2655 | + | |
| 2656 | + return undefined; | |
| 2657 | +} // AsyncMode is deprecated along with isAsyncMode | |
| 2658 | + | |
| 2659 | +var AsyncMode = REACT_ASYNC_MODE_TYPE; | |
| 2660 | +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; | |
| 2661 | +var ContextConsumer = REACT_CONTEXT_TYPE; | |
| 2662 | +var ContextProvider = REACT_PROVIDER_TYPE; | |
| 2663 | +var Element = REACT_ELEMENT_TYPE; | |
| 2664 | +var ForwardRef = REACT_FORWARD_REF_TYPE; | |
| 2665 | +var Fragment = REACT_FRAGMENT_TYPE; | |
| 2666 | +var Lazy = REACT_LAZY_TYPE; | |
| 2667 | +var Memo = REACT_MEMO_TYPE; | |
| 2668 | +var Portal = REACT_PORTAL_TYPE; | |
| 2669 | +var Profiler = REACT_PROFILER_TYPE; | |
| 2670 | +var StrictMode = REACT_STRICT_MODE_TYPE; | |
| 2671 | +var Suspense = REACT_SUSPENSE_TYPE; | |
| 2672 | +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated | |
| 2673 | + | |
| 2674 | +function isAsyncMode(object) { | |
| 2675 | + { | |
| 2676 | + if (!hasWarnedAboutDeprecatedIsAsyncMode) { | |
| 2677 | + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint | |
| 2678 | + | |
| 2679 | + 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.'); | |
| 2680 | + } | |
| 2681 | + } | |
| 2682 | + | |
| 2683 | + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; | |
| 2684 | +} | |
| 2685 | +function isConcurrentMode(object) { | |
| 2686 | + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; | |
| 2687 | +} | |
| 2688 | +function isContextConsumer(object) { | |
| 2689 | + return typeOf(object) === REACT_CONTEXT_TYPE; | |
| 2690 | +} | |
| 2691 | +function isContextProvider(object) { | |
| 2692 | + return typeOf(object) === REACT_PROVIDER_TYPE; | |
| 2693 | +} | |
| 2694 | +function isElement(object) { | |
| 2695 | + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 2696 | +} | |
| 2697 | +function isForwardRef(object) { | |
| 2698 | + return typeOf(object) === REACT_FORWARD_REF_TYPE; | |
| 2699 | +} | |
| 2700 | +function isFragment(object) { | |
| 2701 | + return typeOf(object) === REACT_FRAGMENT_TYPE; | |
| 2702 | +} | |
| 2703 | +function isLazy(object) { | |
| 2704 | + return typeOf(object) === REACT_LAZY_TYPE; | |
| 2705 | +} | |
| 2706 | +function isMemo(object) { | |
| 2707 | + return typeOf(object) === REACT_MEMO_TYPE; | |
| 2708 | +} | |
| 2709 | +function isPortal(object) { | |
| 2710 | + return typeOf(object) === REACT_PORTAL_TYPE; | |
| 2711 | +} | |
| 2712 | +function isProfiler(object) { | |
| 2713 | + return typeOf(object) === REACT_PROFILER_TYPE; | |
| 2714 | +} | |
| 2715 | +function isStrictMode(object) { | |
| 2716 | + return typeOf(object) === REACT_STRICT_MODE_TYPE; | |
| 2717 | +} | |
| 2718 | +function isSuspense(object) { | |
| 2719 | + return typeOf(object) === REACT_SUSPENSE_TYPE; | |
| 2720 | +} | |
| 2721 | + | |
| 2722 | +exports.AsyncMode = AsyncMode; | |
| 2723 | +exports.ConcurrentMode = ConcurrentMode; | |
| 2724 | +exports.ContextConsumer = ContextConsumer; | |
| 2725 | +exports.ContextProvider = ContextProvider; | |
| 2726 | +exports.Element = Element; | |
| 2727 | +exports.ForwardRef = ForwardRef; | |
| 2728 | +exports.Fragment = Fragment; | |
| 2729 | +exports.Lazy = Lazy; | |
| 2730 | +exports.Memo = Memo; | |
| 2731 | +exports.Portal = Portal; | |
| 2732 | +exports.Profiler = Profiler; | |
| 2733 | +exports.StrictMode = StrictMode; | |
| 2734 | +exports.Suspense = Suspense; | |
| 2735 | +exports.isAsyncMode = isAsyncMode; | |
| 2736 | +exports.isConcurrentMode = isConcurrentMode; | |
| 2737 | +exports.isContextConsumer = isContextConsumer; | |
| 2738 | +exports.isContextProvider = isContextProvider; | |
| 2739 | +exports.isElement = isElement; | |
| 2740 | +exports.isForwardRef = isForwardRef; | |
| 2741 | +exports.isFragment = isFragment; | |
| 2742 | +exports.isLazy = isLazy; | |
| 2743 | +exports.isMemo = isMemo; | |
| 2744 | +exports.isPortal = isPortal; | |
| 2745 | +exports.isProfiler = isProfiler; | |
| 2746 | +exports.isStrictMode = isStrictMode; | |
| 2747 | +exports.isSuspense = isSuspense; | |
| 2748 | +exports.isValidElementType = isValidElementType; | |
| 2749 | +exports.typeOf = typeOf; | |
| 2750 | + })(); | |
| 2751 | +} | |
| 2752 | + | |
| 2753 | + | |
| 2754 | +/***/ }), | |
| 2755 | + | |
| 2756 | +/***/ "../node_modules/prop-types/node_modules/react-is/index.js": | |
| 2757 | +/*!*****************************************************************!*\ | |
| 2758 | + !*** ../node_modules/prop-types/node_modules/react-is/index.js ***! | |
| 2759 | + \*****************************************************************/ | |
| 2760 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2761 | + | |
| 2762 | +"use strict"; | |
| 2763 | + | |
| 2764 | + | |
| 2765 | +if (false) {} else { | |
| 2766 | + module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); | |
| 2767 | +} | |
| 2768 | + | |
| 2769 | + | |
| 2770 | +/***/ }), | |
| 2771 | + | |
| 2772 | +/***/ "../node_modules/react-dom/client.js": | |
| 2773 | +/*!*******************************************!*\ | |
| 2774 | + !*** ../node_modules/react-dom/client.js ***! | |
| 2775 | + \*******************************************/ | |
| 2776 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2777 | + | |
| 2778 | +"use strict"; | |
| 2779 | + | |
| 2780 | + | |
| 2781 | +var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 2782 | +if (false) {} else { | |
| 2783 | + var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2784 | + exports.createRoot = function(c, o) { | |
| 2785 | + i.usingClientEntryPoint = true; | |
| 2786 | + try { | |
| 2787 | + return m.createRoot(c, o); | |
| 2788 | + } finally { | |
| 2789 | + i.usingClientEntryPoint = false; | |
| 2790 | + } | |
| 2791 | + }; | |
| 2792 | + exports.hydrateRoot = function(c, h, o) { | |
| 2793 | + i.usingClientEntryPoint = true; | |
| 2794 | + try { | |
| 2795 | + return m.hydrateRoot(c, h, o); | |
| 2796 | + } finally { | |
| 2797 | + i.usingClientEntryPoint = false; | |
| 2798 | + } | |
| 2799 | + }; | |
| 2800 | +} | |
| 2801 | + | |
| 2802 | + | |
| 2803 | +/***/ }), | |
| 2804 | + | |
| 2805 | +/***/ "../node_modules/react/cjs/react-jsx-runtime.development.js": | |
| 2806 | +/*!******************************************************************!*\ | |
| 2807 | + !*** ../node_modules/react/cjs/react-jsx-runtime.development.js ***! | |
| 2808 | + \******************************************************************/ | |
| 2809 | +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 2810 | + | |
| 2811 | +"use strict"; | |
| 2812 | +/** | |
| 2813 | + * @license React | |
| 2814 | + * react-jsx-runtime.development.js | |
| 2815 | + * | |
| 2816 | + * Copyright (c) Facebook, Inc. and its affiliates. | |
| 2817 | + * | |
| 2818 | + * This source code is licensed under the MIT license found in the | |
| 2819 | + * LICENSE file in the root directory of this source tree. | |
| 2820 | + */ | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | +if (true) { | |
| 2825 | + (function() { | |
| 2826 | +'use strict'; | |
| 2827 | + | |
| 2828 | +var React = __webpack_require__(/*! react */ "react"); | |
| 2829 | + | |
| 2830 | +// ATTENTION | |
| 2831 | +// When adding new symbols to this file, | |
| 2832 | +// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols' | |
| 2833 | +// The Symbol used to tag the ReactElement-like types. | |
| 2834 | +var REACT_ELEMENT_TYPE = Symbol.for('react.element'); | |
| 2835 | +var REACT_PORTAL_TYPE = Symbol.for('react.portal'); | |
| 2836 | +var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment'); | |
| 2837 | +var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode'); | |
| 2838 | +var REACT_PROFILER_TYPE = Symbol.for('react.profiler'); | |
| 2839 | +var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); | |
| 2840 | +var REACT_CONTEXT_TYPE = Symbol.for('react.context'); | |
| 2841 | +var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref'); | |
| 2842 | +var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense'); | |
| 2843 | +var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list'); | |
| 2844 | +var REACT_MEMO_TYPE = Symbol.for('react.memo'); | |
| 2845 | +var REACT_LAZY_TYPE = Symbol.for('react.lazy'); | |
| 2846 | +var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen'); | |
| 2847 | +var MAYBE_ITERATOR_SYMBOL = Symbol.iterator; | |
| 2848 | +var FAUX_ITERATOR_SYMBOL = '@@iterator'; | |
| 2849 | +function getIteratorFn(maybeIterable) { | |
| 2850 | + if (maybeIterable === null || typeof maybeIterable !== 'object') { | |
| 2851 | + return null; | |
| 2852 | + } | |
| 2853 | + | |
| 2854 | + var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]; | |
| 2855 | + | |
| 2856 | + if (typeof maybeIterator === 'function') { | |
| 2857 | + return maybeIterator; | |
| 2858 | + } | |
| 2859 | + | |
| 2860 | + return null; | |
| 2861 | +} | |
| 2862 | + | |
| 2863 | +var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2864 | + | |
| 2865 | +function error(format) { | |
| 2866 | + { | |
| 2867 | + { | |
| 2868 | + for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { | |
| 2869 | + args[_key2 - 1] = arguments[_key2]; | |
| 2870 | + } | |
| 2871 | + | |
| 2872 | + printWarning('error', format, args); | |
| 2873 | + } | |
| 2874 | + } | |
| 2875 | +} | |
| 2876 | + | |
| 2877 | +function printWarning(level, format, args) { | |
| 2878 | + // When changing this logic, you might want to also | |
| 2879 | + // update consoleWithStackDev.www.js as well. | |
| 2880 | + { | |
| 2881 | + var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 2882 | + var stack = ReactDebugCurrentFrame.getStackAddendum(); | |
| 2883 | + | |
| 2884 | + if (stack !== '') { | |
| 2885 | + format += '%s'; | |
| 2886 | + args = args.concat([stack]); | |
| 2887 | + } // eslint-disable-next-line react-internal/safe-string-coercion | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + var argsWithFormat = args.map(function (item) { | |
| 2891 | + return String(item); | |
| 2892 | + }); // Careful: RN currently depends on this prefix | |
| 2893 | + | |
| 2894 | + argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it | |
| 2895 | + // breaks IE9: https://github.com/facebook/react/issues/13610 | |
| 2896 | + // eslint-disable-next-line react-internal/no-production-logging | |
| 2897 | + | |
| 2898 | + Function.prototype.apply.call(console[level], console, argsWithFormat); | |
| 2899 | + } | |
| 2900 | +} | |
| 2901 | + | |
| 2902 | +// ----------------------------------------------------------------------------- | |
| 2903 | + | |
| 2904 | +var enableScopeAPI = false; // Experimental Create Event Handle API. | |
| 2905 | +var enableCacheElement = false; | |
| 2906 | +var enableTransitionTracing = false; // No known bugs, but needs performance testing | |
| 2907 | + | |
| 2908 | +var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber | |
| 2909 | +// stuff. Intended to enable React core members to more easily debug scheduling | |
| 2910 | +// issues in DEV builds. | |
| 2911 | + | |
| 2912 | +var enableDebugTracing = false; // Track which Fiber(s) schedule render work. | |
| 2913 | + | |
| 2914 | +var REACT_MODULE_REFERENCE; | |
| 2915 | + | |
| 2916 | +{ | |
| 2917 | + REACT_MODULE_REFERENCE = Symbol.for('react.module.reference'); | |
| 2918 | +} | |
| 2919 | + | |
| 2920 | +function isValidElementType(type) { | |
| 2921 | + if (typeof type === 'string' || typeof type === 'function') { | |
| 2922 | + return true; | |
| 2923 | + } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill). | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + 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 ) { | |
| 2927 | + return true; | |
| 2928 | + } | |
| 2929 | + | |
| 2930 | + if (typeof type === 'object' && type !== null) { | |
| 2931 | + 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 | |
| 2932 | + // types supported by any Flight configuration anywhere since | |
| 2933 | + // we don't know which Flight build this will end up being used | |
| 2934 | + // with. | |
| 2935 | + type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) { | |
| 2936 | + return true; | |
| 2937 | + } | |
| 2938 | + } | |
| 2939 | + | |
| 2940 | + return false; | |
| 2941 | +} | |
| 2942 | + | |
| 2943 | +function getWrappedName(outerType, innerType, wrapperName) { | |
| 2944 | + var displayName = outerType.displayName; | |
| 2945 | + | |
| 2946 | + if (displayName) { | |
| 2947 | + return displayName; | |
| 2948 | + } | |
| 2949 | + | |
| 2950 | + var functionName = innerType.displayName || innerType.name || ''; | |
| 2951 | + return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName; | |
| 2952 | +} // Keep in sync with react-reconciler/getComponentNameFromFiber | |
| 2953 | + | |
| 2954 | + | |
| 2955 | +function getContextName(type) { | |
| 2956 | + return type.displayName || 'Context'; | |
| 2957 | +} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead. | |
| 2958 | + | |
| 2959 | + | |
| 2960 | +function getComponentNameFromType(type) { | |
| 2961 | + if (type == null) { | |
| 2962 | + // Host root, text node or just invalid type. | |
| 2963 | + return null; | |
| 2964 | + } | |
| 2965 | + | |
| 2966 | + { | |
| 2967 | + if (typeof type.tag === 'number') { | |
| 2968 | + error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.'); | |
| 2969 | + } | |
| 2970 | + } | |
| 2971 | + | |
| 2972 | + if (typeof type === 'function') { | |
| 2973 | + return type.displayName || type.name || null; | |
| 2974 | + } | |
| 2975 | + | |
| 2976 | + if (typeof type === 'string') { | |
| 2977 | + return type; | |
| 2978 | + } | |
| 2979 | + | |
| 2980 | + switch (type) { | |
| 2981 | + case REACT_FRAGMENT_TYPE: | |
| 2982 | + return 'Fragment'; | |
| 2983 | + | |
| 2984 | + case REACT_PORTAL_TYPE: | |
| 2985 | + return 'Portal'; | |
| 2986 | + | |
| 2987 | + case REACT_PROFILER_TYPE: | |
| 2988 | + return 'Profiler'; | |
| 2989 | + | |
| 2990 | + case REACT_STRICT_MODE_TYPE: | |
| 2991 | + return 'StrictMode'; | |
| 2992 | + | |
| 2993 | + case REACT_SUSPENSE_TYPE: | |
| 2994 | + return 'Suspense'; | |
| 2995 | + | |
| 2996 | + case REACT_SUSPENSE_LIST_TYPE: | |
| 2997 | + return 'SuspenseList'; | |
| 2998 | + | |
| 2999 | + } | |
| 3000 | + | |
| 3001 | + if (typeof type === 'object') { | |
| 3002 | + switch (type.$$typeof) { | |
| 3003 | + case REACT_CONTEXT_TYPE: | |
| 3004 | + var context = type; | |
| 3005 | + return getContextName(context) + '.Consumer'; | |
| 3006 | + | |
| 3007 | + case REACT_PROVIDER_TYPE: | |
| 3008 | + var provider = type; | |
| 3009 | + return getContextName(provider._context) + '.Provider'; | |
| 3010 | + | |
| 3011 | + case REACT_FORWARD_REF_TYPE: | |
| 3012 | + return getWrappedName(type, type.render, 'ForwardRef'); | |
| 3013 | + | |
| 3014 | + case REACT_MEMO_TYPE: | |
| 3015 | + var outerName = type.displayName || null; | |
| 3016 | + | |
| 3017 | + if (outerName !== null) { | |
| 3018 | + return outerName; | |
| 3019 | + } | |
| 3020 | + | |
| 3021 | + return getComponentNameFromType(type.type) || 'Memo'; | |
| 3022 | + | |
| 3023 | + case REACT_LAZY_TYPE: | |
| 3024 | + { | |
| 3025 | + var lazyComponent = type; | |
| 3026 | + var payload = lazyComponent._payload; | |
| 3027 | + var init = lazyComponent._init; | |
| 3028 | + | |
| 3029 | + try { | |
| 3030 | + return getComponentNameFromType(init(payload)); | |
| 3031 | + } catch (x) { | |
| 3032 | + return null; | |
| 3033 | + } | |
| 3034 | + } | |
| 3035 | + | |
| 3036 | + // eslint-disable-next-line no-fallthrough | |
| 3037 | + } | |
| 3038 | + } | |
| 3039 | + | |
| 3040 | + return null; | |
| 3041 | +} | |
| 3042 | + | |
| 3043 | +var assign = Object.assign; | |
| 3044 | + | |
| 3045 | +// Helpers to patch console.logs to avoid logging during side-effect free | |
| 3046 | +// replaying on render function. This currently only patches the object | |
| 3047 | +// lazily which won't cover if the log function was extracted eagerly. | |
| 3048 | +// We could also eagerly patch the method. | |
| 3049 | +var disabledDepth = 0; | |
| 3050 | +var prevLog; | |
| 3051 | +var prevInfo; | |
| 3052 | +var prevWarn; | |
| 3053 | +var prevError; | |
| 3054 | +var prevGroup; | |
| 3055 | +var prevGroupCollapsed; | |
| 3056 | +var prevGroupEnd; | |
| 3057 | + | |
| 3058 | +function disabledLog() {} | |
| 3059 | + | |
| 3060 | +disabledLog.__reactDisabledLog = true; | |
| 3061 | +function disableLogs() { | |
| 3062 | + { | |
| 3063 | + if (disabledDepth === 0) { | |
| 3064 | + /* eslint-disable react-internal/no-production-logging */ | |
| 3065 | + prevLog = console.log; | |
| 3066 | + prevInfo = console.info; | |
| 3067 | + prevWarn = console.warn; | |
| 3068 | + prevError = console.error; | |
| 3069 | + prevGroup = console.group; | |
| 3070 | + prevGroupCollapsed = console.groupCollapsed; | |
| 3071 | + prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099 | |
| 3072 | + | |
| 3073 | + var props = { | |
| 3074 | + configurable: true, | |
| 3075 | + enumerable: true, | |
| 3076 | + value: disabledLog, | |
| 3077 | + writable: true | |
| 3078 | + }; // $FlowFixMe Flow thinks console is immutable. | |
| 3079 | + | |
| 3080 | + Object.defineProperties(console, { | |
| 3081 | + info: props, | |
| 3082 | + log: props, | |
| 3083 | + warn: props, | |
| 3084 | + error: props, | |
| 3085 | + group: props, | |
| 3086 | + groupCollapsed: props, | |
| 3087 | + groupEnd: props | |
| 3088 | + }); | |
| 3089 | + /* eslint-enable react-internal/no-production-logging */ | |
| 3090 | + } | |
| 3091 | + | |
| 3092 | + disabledDepth++; | |
| 3093 | + } | |
| 3094 | +} | |
| 3095 | +function reenableLogs() { | |
| 3096 | + { | |
| 3097 | + disabledDepth--; | |
| 3098 | + | |
| 3099 | + if (disabledDepth === 0) { | |
| 3100 | + /* eslint-disable react-internal/no-production-logging */ | |
| 3101 | + var props = { | |
| 3102 | + configurable: true, | |
| 3103 | + enumerable: true, | |
| 3104 | + writable: true | |
| 3105 | + }; // $FlowFixMe Flow thinks console is immutable. | |
| 3106 | + | |
| 3107 | + Object.defineProperties(console, { | |
| 3108 | + log: assign({}, props, { | |
| 3109 | + value: prevLog | |
| 3110 | + }), | |
| 3111 | + info: assign({}, props, { | |
| 3112 | + value: prevInfo | |
| 3113 | + }), | |
| 3114 | + warn: assign({}, props, { | |
| 3115 | + value: prevWarn | |
| 3116 | + }), | |
| 3117 | + error: assign({}, props, { | |
| 3118 | + value: prevError | |
| 3119 | + }), | |
| 3120 | + group: assign({}, props, { | |
| 3121 | + value: prevGroup | |
| 3122 | + }), | |
| 3123 | + groupCollapsed: assign({}, props, { | |
| 3124 | + value: prevGroupCollapsed | |
| 3125 | + }), | |
| 3126 | + groupEnd: assign({}, props, { | |
| 3127 | + value: prevGroupEnd | |
| 3128 | + }) | |
| 3129 | + }); | |
| 3130 | + /* eslint-enable react-internal/no-production-logging */ | |
| 3131 | + } | |
| 3132 | + | |
| 3133 | + if (disabledDepth < 0) { | |
| 3134 | + error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.'); | |
| 3135 | + } | |
| 3136 | + } | |
| 3137 | +} | |
| 3138 | + | |
| 3139 | +var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher; | |
| 3140 | +var prefix; | |
| 3141 | +function describeBuiltInComponentFrame(name, source, ownerFn) { | |
| 3142 | + { | |
| 3143 | + if (prefix === undefined) { | |
| 3144 | + // Extract the VM specific prefix used by each line. | |
| 3145 | + try { | |
| 3146 | + throw Error(); | |
| 3147 | + } catch (x) { | |
| 3148 | + var match = x.stack.trim().match(/\n( *(at )?)/); | |
| 3149 | + prefix = match && match[1] || ''; | |
| 3150 | + } | |
| 3151 | + } // We use the prefix to ensure our stacks line up with native stack frames. | |
| 3152 | + | |
| 3153 | + | |
| 3154 | + return '\n' + prefix + name; | |
| 3155 | + } | |
| 3156 | +} | |
| 3157 | +var reentry = false; | |
| 3158 | +var componentFrameCache; | |
| 3159 | + | |
| 3160 | +{ | |
| 3161 | + var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map; | |
| 3162 | + componentFrameCache = new PossiblyWeakMap(); | |
| 3163 | +} | |
| 3164 | + | |
| 3165 | +function describeNativeComponentFrame(fn, construct) { | |
| 3166 | + // If something asked for a stack inside a fake render, it should get ignored. | |
| 3167 | + if ( !fn || reentry) { | |
| 3168 | + return ''; | |
| 3169 | + } | |
| 3170 | + | |
| 3171 | + { | |
| 3172 | + var frame = componentFrameCache.get(fn); | |
| 3173 | + | |
| 3174 | + if (frame !== undefined) { | |
| 3175 | + return frame; | |
| 3176 | + } | |
| 3177 | + } | |
| 3178 | + | |
| 3179 | + var control; | |
| 3180 | + reentry = true; | |
| 3181 | + var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined. | |
| 3182 | + | |
| 3183 | + Error.prepareStackTrace = undefined; | |
| 3184 | + var previousDispatcher; | |
| 3185 | + | |
| 3186 | + { | |
| 3187 | + previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function | |
| 3188 | + // for warnings. | |
| 3189 | + | |
| 3190 | + ReactCurrentDispatcher.current = null; | |
| 3191 | + disableLogs(); | |
| 3192 | + } | |
| 3193 | + | |
| 3194 | + try { | |
| 3195 | + // This should throw. | |
| 3196 | + if (construct) { | |
| 3197 | + // Something should be setting the props in the constructor. | |
| 3198 | + var Fake = function () { | |
| 3199 | + throw Error(); | |
| 3200 | + }; // $FlowFixMe | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + Object.defineProperty(Fake.prototype, 'props', { | |
| 3204 | + set: function () { | |
| 3205 | + // We use a throwing setter instead of frozen or non-writable props | |
| 3206 | + // because that won't throw in a non-strict mode function. | |
| 3207 | + throw Error(); | |
| 3208 | + } | |
| 3209 | + }); | |
| 3210 | + | |
| 3211 | + if (typeof Reflect === 'object' && Reflect.construct) { | |
| 3212 | + // We construct a different control for this case to include any extra | |
| 3213 | + // frames added by the construct call. | |
| 3214 | + try { | |
| 3215 | + Reflect.construct(Fake, []); | |
| 3216 | + } catch (x) { | |
| 3217 | + control = x; | |
| 3218 | + } | |
| 3219 | + | |
| 3220 | + Reflect.construct(fn, [], Fake); | |
| 3221 | + } else { | |
| 3222 | + try { | |
| 3223 | + Fake.call(); | |
| 3224 | + } catch (x) { | |
| 3225 | + control = x; | |
| 3226 | + } | |
| 3227 | + | |
| 3228 | + fn.call(Fake.prototype); | |
| 3229 | + } | |
| 3230 | + } else { | |
| 3231 | + try { | |
| 3232 | + throw Error(); | |
| 3233 | + } catch (x) { | |
| 3234 | + control = x; | |
| 3235 | + } | |
| 3236 | + | |
| 3237 | + fn(); | |
| 3238 | + } | |
| 3239 | + } catch (sample) { | |
| 3240 | + // This is inlined manually because closure doesn't do it for us. | |
| 3241 | + if (sample && control && typeof sample.stack === 'string') { | |
| 3242 | + // This extracts the first frame from the sample that isn't also in the control. | |
| 3243 | + // Skipping one frame that we assume is the frame that calls the two. | |
| 3244 | + var sampleLines = sample.stack.split('\n'); | |
| 3245 | + var controlLines = control.stack.split('\n'); | |
| 3246 | + var s = sampleLines.length - 1; | |
| 3247 | + var c = controlLines.length - 1; | |
| 3248 | + | |
| 3249 | + while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) { | |
| 3250 | + // We expect at least one stack frame to be shared. | |
| 3251 | + // Typically this will be the root most one. However, stack frames may be | |
| 3252 | + // cut off due to maximum stack limits. In this case, one maybe cut off | |
| 3253 | + // earlier than the other. We assume that the sample is longer or the same | |
| 3254 | + // and there for cut off earlier. So we should find the root most frame in | |
| 3255 | + // the sample somewhere in the control. | |
| 3256 | + c--; | |
| 3257 | + } | |
| 3258 | + | |
| 3259 | + for (; s >= 1 && c >= 0; s--, c--) { | |
| 3260 | + // Next we find the first one that isn't the same which should be the | |
| 3261 | + // frame that called our sample function and the control. | |
| 3262 | + if (sampleLines[s] !== controlLines[c]) { | |
| 3263 | + // In V8, the first line is describing the message but other VMs don't. | |
| 3264 | + // If we're about to return the first line, and the control is also on the same | |
| 3265 | + // line, that's a pretty good indicator that our sample threw at same line as | |
| 3266 | + // the control. I.e. before we entered the sample frame. So we ignore this result. | |
| 3267 | + // This can happen if you passed a class to function component, or non-function. | |
| 3268 | + if (s !== 1 || c !== 1) { | |
| 3269 | + do { | |
| 3270 | + s--; | |
| 3271 | + c--; // We may still have similar intermediate frames from the construct call. | |
| 3272 | + // The next one that isn't the same should be our match though. | |
| 3273 | + | |
| 3274 | + if (c < 0 || sampleLines[s] !== controlLines[c]) { | |
| 3275 | + // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier. | |
| 3276 | + var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>" | |
| 3277 | + // but we have a user-provided "displayName" | |
| 3278 | + // splice it in to make the stack more readable. | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + if (fn.displayName && _frame.includes('<anonymous>')) { | |
| 3282 | + _frame = _frame.replace('<anonymous>', fn.displayName); | |
| 3283 | + } | |
| 3284 | + | |
| 3285 | + { | |
| 3286 | + if (typeof fn === 'function') { | |
| 3287 | + componentFrameCache.set(fn, _frame); | |
| 3288 | + } | |
| 3289 | + } // Return the line we found. | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + return _frame; | |
| 3293 | + } | |
| 3294 | + } while (s >= 1 && c >= 0); | |
| 3295 | + } | |
| 3296 | + | |
| 3297 | + break; | |
| 3298 | + } | |
| 3299 | + } | |
| 3300 | + } | |
| 3301 | + } finally { | |
| 3302 | + reentry = false; | |
| 3303 | + | |
| 3304 | + { | |
| 3305 | + ReactCurrentDispatcher.current = previousDispatcher; | |
| 3306 | + reenableLogs(); | |
| 3307 | + } | |
| 3308 | + | |
| 3309 | + Error.prepareStackTrace = previousPrepareStackTrace; | |
| 3310 | + } // Fallback to just using the name if we couldn't make it throw. | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + var name = fn ? fn.displayName || fn.name : ''; | |
| 3314 | + var syntheticFrame = name ? describeBuiltInComponentFrame(name) : ''; | |
| 3315 | + | |
| 3316 | + { | |
| 3317 | + if (typeof fn === 'function') { | |
| 3318 | + componentFrameCache.set(fn, syntheticFrame); | |
| 3319 | + } | |
| 3320 | + } | |
| 3321 | + | |
| 3322 | + return syntheticFrame; | |
| 3323 | +} | |
| 3324 | +function describeFunctionComponentFrame(fn, source, ownerFn) { | |
| 3325 | + { | |
| 3326 | + return describeNativeComponentFrame(fn, false); | |
| 3327 | + } | |
| 3328 | +} | |
| 3329 | + | |
| 3330 | +function shouldConstruct(Component) { | |
| 3331 | + var prototype = Component.prototype; | |
| 3332 | + return !!(prototype && prototype.isReactComponent); | |
| 3333 | +} | |
| 3334 | + | |
| 3335 | +function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) { | |
| 3336 | + | |
| 3337 | + if (type == null) { | |
| 3338 | + return ''; | |
| 3339 | + } | |
| 3340 | + | |
| 3341 | + if (typeof type === 'function') { | |
| 3342 | + { | |
| 3343 | + return describeNativeComponentFrame(type, shouldConstruct(type)); | |
| 3344 | + } | |
| 3345 | + } | |
| 3346 | + | |
| 3347 | + if (typeof type === 'string') { | |
| 3348 | + return describeBuiltInComponentFrame(type); | |
| 3349 | + } | |
| 3350 | + | |
| 3351 | + switch (type) { | |
| 3352 | + case REACT_SUSPENSE_TYPE: | |
| 3353 | + return describeBuiltInComponentFrame('Suspense'); | |
| 3354 | + | |
| 3355 | + case REACT_SUSPENSE_LIST_TYPE: | |
| 3356 | + return describeBuiltInComponentFrame('SuspenseList'); | |
| 3357 | + } | |
| 3358 | + | |
| 3359 | + if (typeof type === 'object') { | |
| 3360 | + switch (type.$$typeof) { | |
| 3361 | + case REACT_FORWARD_REF_TYPE: | |
| 3362 | + return describeFunctionComponentFrame(type.render); | |
| 3363 | + | |
| 3364 | + case REACT_MEMO_TYPE: | |
| 3365 | + // Memo may contain any component type so we recursively resolve it. | |
| 3366 | + return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn); | |
| 3367 | + | |
| 3368 | + case REACT_LAZY_TYPE: | |
| 3369 | + { | |
| 3370 | + var lazyComponent = type; | |
| 3371 | + var payload = lazyComponent._payload; | |
| 3372 | + var init = lazyComponent._init; | |
| 3373 | + | |
| 3374 | + try { | |
| 3375 | + // Lazy may contain any component type so we recursively resolve it. | |
| 3376 | + return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn); | |
| 3377 | + } catch (x) {} | |
| 3378 | + } | |
| 3379 | + } | |
| 3380 | + } | |
| 3381 | + | |
| 3382 | + return ''; | |
| 3383 | +} | |
| 3384 | + | |
| 3385 | +var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 3386 | + | |
| 3387 | +var loggedTypeFailures = {}; | |
| 3388 | +var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 3389 | + | |
| 3390 | +function setCurrentlyValidatingElement(element) { | |
| 3391 | + { | |
| 3392 | + if (element) { | |
| 3393 | + var owner = element._owner; | |
| 3394 | + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | |
| 3395 | + ReactDebugCurrentFrame.setExtraStackFrame(stack); | |
| 3396 | + } else { | |
| 3397 | + ReactDebugCurrentFrame.setExtraStackFrame(null); | |
| 3398 | + } | |
| 3399 | + } | |
| 3400 | +} | |
| 3401 | + | |
| 3402 | +function checkPropTypes(typeSpecs, values, location, componentName, element) { | |
| 3403 | + { | |
| 3404 | + // $FlowFixMe This is okay but Flow doesn't know it. | |
| 3405 | + var has = Function.call.bind(hasOwnProperty); | |
| 3406 | + | |
| 3407 | + for (var typeSpecName in typeSpecs) { | |
| 3408 | + if (has(typeSpecs, typeSpecName)) { | |
| 3409 | + var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to | |
| 3410 | + // fail the render phase where it didn't fail before. So we log it. | |
| 3411 | + // After these have been cleaned up, we'll let them throw. | |
| 3412 | + | |
| 3413 | + try { | |
| 3414 | + // This is intentionally an invariant that gets caught. It's the same | |
| 3415 | + // behavior as without this statement except with a better message. | |
| 3416 | + if (typeof typeSpecs[typeSpecName] !== 'function') { | |
| 3417 | + // eslint-disable-next-line react-internal/prod-error-codes | |
| 3418 | + var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'); | |
| 3419 | + err.name = 'Invariant Violation'; | |
| 3420 | + throw err; | |
| 3421 | + } | |
| 3422 | + | |
| 3423 | + error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'); | |
| 3424 | + } catch (ex) { | |
| 3425 | + error$1 = ex; | |
| 3426 | + } | |
| 3427 | + | |
| 3428 | + if (error$1 && !(error$1 instanceof Error)) { | |
| 3429 | + setCurrentlyValidatingElement(element); | |
| 3430 | + | |
| 3431 | + error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1); | |
| 3432 | + | |
| 3433 | + setCurrentlyValidatingElement(null); | |
| 3434 | + } | |
| 3435 | + | |
| 3436 | + if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) { | |
| 3437 | + // Only monitor this failure once because there tends to be a lot of the | |
| 3438 | + // same error. | |
| 3439 | + loggedTypeFailures[error$1.message] = true; | |
| 3440 | + setCurrentlyValidatingElement(element); | |
| 3441 | + | |
| 3442 | + error('Failed %s type: %s', location, error$1.message); | |
| 3443 | + | |
| 3444 | + setCurrentlyValidatingElement(null); | |
| 3445 | + } | |
| 3446 | + } | |
| 3447 | + } | |
| 3448 | + } | |
| 3449 | +} | |
| 3450 | + | |
| 3451 | +var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare | |
| 3452 | + | |
| 3453 | +function isArray(a) { | |
| 3454 | + return isArrayImpl(a); | |
| 3455 | +} | |
| 3456 | + | |
| 644 | 3457 | /* |
| 645 | - object-assign | |
| 646 | - (c) Sindre Sorhus | |
| 647 | - @license MIT | |
| 648 | - */ | |
| 649 | - var require_object_assign = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 650 | - var getOwnPropertySymbols = Object.getOwnPropertySymbols; | |
| 651 | - var hasOwnProperty = Object.prototype.hasOwnProperty; | |
| 652 | - var propIsEnumerable = Object.prototype.propertyIsEnumerable; | |
| 653 | - function toObject(val) { | |
| 654 | - if (val === null || val === void 0) throw new TypeError("Object.assign cannot be called with null or undefined"); | |
| 655 | - return Object(val); | |
| 656 | - } | |
| 657 | - function shouldUseNative() { | |
| 658 | - try { | |
| 659 | - if (!Object.assign) return false; | |
| 660 | - var test1 = /* @__PURE__ */ new String("abc"); | |
| 661 | - test1[5] = "de"; | |
| 662 | - if (Object.getOwnPropertyNames(test1)[0] === "5") return false; | |
| 663 | - var test2 = {}; | |
| 664 | - for (var i = 0; i < 10; i++) test2["_" + String.fromCharCode(i)] = i; | |
| 665 | - if (Object.getOwnPropertyNames(test2).map(function(n) { | |
| 666 | - return test2[n]; | |
| 667 | - }).join("") !== "0123456789") return false; | |
| 668 | - var test3 = {}; | |
| 669 | - "abcdefghijklmnopqrst".split("").forEach(function(letter) { | |
| 670 | - test3[letter] = letter; | |
| 671 | - }); | |
| 672 | - if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") return false; | |
| 673 | - return true; | |
| 674 | - } catch (err) { | |
| 675 | - return false; | |
| 676 | - } | |
| 677 | - } | |
| 678 | - module.exports = shouldUseNative() ? Object.assign : function(target, source) { | |
| 679 | - var from; | |
| 680 | - var to = toObject(target); | |
| 681 | - var symbols; | |
| 682 | - for (var s = 1; s < arguments.length; s++) { | |
| 683 | - from = Object(arguments[s]); | |
| 684 | - for (var key in from) if (hasOwnProperty.call(from, key)) to[key] = from[key]; | |
| 685 | - if (getOwnPropertySymbols) { | |
| 686 | - symbols = getOwnPropertySymbols(from); | |
| 687 | - for (var i = 0; i < symbols.length; i++) if (propIsEnumerable.call(from, symbols[i])) to[symbols[i]] = from[symbols[i]]; | |
| 688 | - } | |
| 689 | - } | |
| 690 | - return to; | |
| 691 | - }; | |
| 692 | - })); | |
| 3458 | + * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol | |
| 3459 | + * and Temporal.* types. See https://github.com/facebook/react/pull/22064. | |
| 3460 | + * | |
| 3461 | + * The functions in this module will throw an easier-to-understand, | |
| 3462 | + * easier-to-debug exception with a clear errors message message explaining the | |
| 3463 | + * problem. (Instead of a confusing exception thrown inside the implementation | |
| 3464 | + * of the `value` object). | |
| 3465 | + */ | |
| 3466 | +// $FlowFixMe only called in DEV, so void return is not possible. | |
| 3467 | +function typeName(value) { | |
| 3468 | + { | |
| 3469 | + // toStringTag is needed for namespaced types like Temporal.Instant | |
| 3470 | + var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag; | |
| 3471 | + var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; | |
| 3472 | + return type; | |
| 3473 | + } | |
| 3474 | +} // $FlowFixMe only called in DEV, so void return is not possible. | |
| 693 | 3475 | |
| 694 | -//#endregion | |
| 695 | -//#region node_modules/prop-types/lib/ReactPropTypesSecret.js | |
| 3476 | + | |
| 3477 | +function willCoercionThrow(value) { | |
| 3478 | + { | |
| 3479 | + try { | |
| 3480 | + testStringCoercion(value); | |
| 3481 | + return false; | |
| 3482 | + } catch (e) { | |
| 3483 | + return true; | |
| 3484 | + } | |
| 3485 | + } | |
| 3486 | +} | |
| 3487 | + | |
| 3488 | +function testStringCoercion(value) { | |
| 3489 | + // If you ended up here by following an exception call stack, here's what's | |
| 3490 | + // happened: you supplied an object or symbol value to React (as a prop, key, | |
| 3491 | + // DOM attribute, CSS property, string ref, etc.) and when React tried to | |
| 3492 | + // coerce it to a string using `'' + value`, an exception was thrown. | |
| 3493 | + // | |
| 3494 | + // The most common types that will cause this exception are `Symbol` instances | |
| 3495 | + // and Temporal objects like `Temporal.Instant`. But any object that has a | |
| 3496 | + // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this | |
| 3497 | + // exception. (Library authors do this to prevent users from using built-in | |
| 3498 | + // numeric operators like `+` or comparison operators like `>=` because custom | |
| 3499 | + // methods are needed to perform accurate arithmetic or comparison.) | |
| 3500 | + // | |
| 3501 | + // To fix the problem, coerce this object or symbol value to a string before | |
| 3502 | + // passing it to React. The most reliable way is usually `String(value)`. | |
| 3503 | + // | |
| 3504 | + // To find which value is throwing, check the browser or debugger console. | |
| 3505 | + // Before this exception was thrown, there should be `console.error` output | |
| 3506 | + // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the | |
| 3507 | + // problem and how that type was used: key, atrribute, input value prop, etc. | |
| 3508 | + // In most cases, this console output also shows the component and its | |
| 3509 | + // ancestor components where the exception happened. | |
| 3510 | + // | |
| 3511 | + // eslint-disable-next-line react-internal/safe-string-coercion | |
| 3512 | + return '' + value; | |
| 3513 | +} | |
| 3514 | +function checkKeyStringCoercion(value) { | |
| 3515 | + { | |
| 3516 | + if (willCoercionThrow(value)) { | |
| 3517 | + error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value)); | |
| 3518 | + | |
| 3519 | + return testStringCoercion(value); // throw (to help callers find troubleshooting comments) | |
| 3520 | + } | |
| 3521 | + } | |
| 3522 | +} | |
| 3523 | + | |
| 3524 | +var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner; | |
| 3525 | +var RESERVED_PROPS = { | |
| 3526 | + key: true, | |
| 3527 | + ref: true, | |
| 3528 | + __self: true, | |
| 3529 | + __source: true | |
| 3530 | +}; | |
| 3531 | +var specialPropKeyWarningShown; | |
| 3532 | +var specialPropRefWarningShown; | |
| 3533 | +var didWarnAboutStringRefs; | |
| 3534 | + | |
| 3535 | +{ | |
| 3536 | + didWarnAboutStringRefs = {}; | |
| 3537 | +} | |
| 3538 | + | |
| 3539 | +function hasValidRef(config) { | |
| 3540 | + { | |
| 3541 | + if (hasOwnProperty.call(config, 'ref')) { | |
| 3542 | + var getter = Object.getOwnPropertyDescriptor(config, 'ref').get; | |
| 3543 | + | |
| 3544 | + if (getter && getter.isReactWarning) { | |
| 3545 | + return false; | |
| 3546 | + } | |
| 3547 | + } | |
| 3548 | + } | |
| 3549 | + | |
| 3550 | + return config.ref !== undefined; | |
| 3551 | +} | |
| 3552 | + | |
| 3553 | +function hasValidKey(config) { | |
| 3554 | + { | |
| 3555 | + if (hasOwnProperty.call(config, 'key')) { | |
| 3556 | + var getter = Object.getOwnPropertyDescriptor(config, 'key').get; | |
| 3557 | + | |
| 3558 | + if (getter && getter.isReactWarning) { | |
| 3559 | + return false; | |
| 3560 | + } | |
| 3561 | + } | |
| 3562 | + } | |
| 3563 | + | |
| 3564 | + return config.key !== undefined; | |
| 3565 | +} | |
| 3566 | + | |
| 3567 | +function warnIfStringRefCannotBeAutoConverted(config, self) { | |
| 3568 | + { | |
| 3569 | + if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) { | |
| 3570 | + var componentName = getComponentNameFromType(ReactCurrentOwner.current.type); | |
| 3571 | + | |
| 3572 | + if (!didWarnAboutStringRefs[componentName]) { | |
| 3573 | + error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref); | |
| 3574 | + | |
| 3575 | + didWarnAboutStringRefs[componentName] = true; | |
| 3576 | + } | |
| 3577 | + } | |
| 3578 | + } | |
| 3579 | +} | |
| 3580 | + | |
| 3581 | +function defineKeyPropWarningGetter(props, displayName) { | |
| 3582 | + { | |
| 3583 | + var warnAboutAccessingKey = function () { | |
| 3584 | + if (!specialPropKeyWarningShown) { | |
| 3585 | + specialPropKeyWarningShown = true; | |
| 3586 | + | |
| 3587 | + error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | |
| 3588 | + } | |
| 3589 | + }; | |
| 3590 | + | |
| 3591 | + warnAboutAccessingKey.isReactWarning = true; | |
| 3592 | + Object.defineProperty(props, 'key', { | |
| 3593 | + get: warnAboutAccessingKey, | |
| 3594 | + configurable: true | |
| 3595 | + }); | |
| 3596 | + } | |
| 3597 | +} | |
| 3598 | + | |
| 3599 | +function defineRefPropWarningGetter(props, displayName) { | |
| 3600 | + { | |
| 3601 | + var warnAboutAccessingRef = function () { | |
| 3602 | + if (!specialPropRefWarningShown) { | |
| 3603 | + specialPropRefWarningShown = true; | |
| 3604 | + | |
| 3605 | + error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName); | |
| 3606 | + } | |
| 3607 | + }; | |
| 3608 | + | |
| 3609 | + warnAboutAccessingRef.isReactWarning = true; | |
| 3610 | + Object.defineProperty(props, 'ref', { | |
| 3611 | + get: warnAboutAccessingRef, | |
| 3612 | + configurable: true | |
| 3613 | + }); | |
| 3614 | + } | |
| 3615 | +} | |
| 696 | 3616 | /** |
| 697 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 698 | - * | |
| 699 | - * This source code is licensed under the MIT license found in the | |
| 700 | - * LICENSE file in the root directory of this source tree. | |
| 701 | - */ | |
| 702 | - var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 703 | - var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; | |
| 704 | - module.exports = ReactPropTypesSecret; | |
| 705 | - })); | |
| 3617 | + * Factory method to create a new React element. This no longer adheres to | |
| 3618 | + * the class pattern, so do not use new to call it. Also, instanceof check | |
| 3619 | + * will not work. Instead test $$typeof field against Symbol.for('react.element') to check | |
| 3620 | + * if something is a React Element. | |
| 3621 | + * | |
| 3622 | + * @param {*} type | |
| 3623 | + * @param {*} props | |
| 3624 | + * @param {*} key | |
| 3625 | + * @param {string|object} ref | |
| 3626 | + * @param {*} owner | |
| 3627 | + * @param {*} self A *temporary* helper to detect places where `this` is | |
| 3628 | + * different from the `owner` when React.createElement is called, so that we | |
| 3629 | + * can warn. We want to get rid of owner and replace string `ref`s with arrow | |
| 3630 | + * functions, and as long as `this` and owner are the same, there will be no | |
| 3631 | + * change in behavior. | |
| 3632 | + * @param {*} source An annotation object (added by a transpiler or otherwise) | |
| 3633 | + * indicating filename, line number, and/or other information. | |
| 3634 | + * @internal | |
| 3635 | + */ | |
| 706 | 3636 | |
| 707 | -//#endregion | |
| 708 | -//#region node_modules/prop-types/lib/has.js | |
| 709 | - var require_has = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 710 | - module.exports = Function.call.bind(Object.prototype.hasOwnProperty); | |
| 711 | - })); | |
| 712 | 3637 | |
| 713 | -//#endregion | |
| 714 | -//#region node_modules/prop-types/checkPropTypes.js | |
| 3638 | +var ReactElement = function (type, key, ref, self, source, owner, props) { | |
| 3639 | + var element = { | |
| 3640 | + // This tag allows us to uniquely identify this as a React Element | |
| 3641 | + $$typeof: REACT_ELEMENT_TYPE, | |
| 3642 | + // Built-in properties that belong on the element | |
| 3643 | + type: type, | |
| 3644 | + key: key, | |
| 3645 | + ref: ref, | |
| 3646 | + props: props, | |
| 3647 | + // Record the component responsible for creating this element. | |
| 3648 | + _owner: owner | |
| 3649 | + }; | |
| 3650 | + | |
| 3651 | + { | |
| 3652 | + // The validation flag is currently mutative. We put it on | |
| 3653 | + // an external backing store so that we can freeze the whole object. | |
| 3654 | + // This can be replaced with a WeakMap once they are implemented in | |
| 3655 | + // commonly used development environments. | |
| 3656 | + element._store = {}; // To make comparing ReactElements easier for testing purposes, we make | |
| 3657 | + // the validation flag non-enumerable (where possible, which should | |
| 3658 | + // include every environment we run tests in), so the test framework | |
| 3659 | + // ignores it. | |
| 3660 | + | |
| 3661 | + Object.defineProperty(element._store, 'validated', { | |
| 3662 | + configurable: false, | |
| 3663 | + enumerable: false, | |
| 3664 | + writable: true, | |
| 3665 | + value: false | |
| 3666 | + }); // self and source are DEV only properties. | |
| 3667 | + | |
| 3668 | + Object.defineProperty(element, '_self', { | |
| 3669 | + configurable: false, | |
| 3670 | + enumerable: false, | |
| 3671 | + writable: false, | |
| 3672 | + value: self | |
| 3673 | + }); // Two elements created in two different places should be considered | |
| 3674 | + // equal for testing purposes and therefore we hide it from enumeration. | |
| 3675 | + | |
| 3676 | + Object.defineProperty(element, '_source', { | |
| 3677 | + configurable: false, | |
| 3678 | + enumerable: false, | |
| 3679 | + writable: false, | |
| 3680 | + value: source | |
| 3681 | + }); | |
| 3682 | + | |
| 3683 | + if (Object.freeze) { | |
| 3684 | + Object.freeze(element.props); | |
| 3685 | + Object.freeze(element); | |
| 3686 | + } | |
| 3687 | + } | |
| 3688 | + | |
| 3689 | + return element; | |
| 3690 | +}; | |
| 715 | 3691 | /** |
| 716 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 717 | - * | |
| 718 | - * This source code is licensed under the MIT license found in the | |
| 719 | - * LICENSE file in the root directory of this source tree. | |
| 720 | - */ | |
| 721 | - var require_checkPropTypes = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 722 | - var printWarning = function() {}; | |
| 723 | - var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 724 | - var loggedTypeFailures = {}; | |
| 725 | - var has = require_has(); | |
| 726 | - printWarning = function(text) { | |
| 727 | - var message = "Warning: " + text; | |
| 728 | - if (typeof console !== "undefined") console.error(message); | |
| 729 | - try { | |
| 730 | - throw new Error(message); | |
| 731 | - } catch (x) {} | |
| 732 | - }; | |
| 733 | - /** | |
| 734 | - * Assert that the values match with the type specs. | |
| 735 | - * Error messages are memorized and will only be shown once. | |
| 736 | - * | |
| 737 | - * @param {object} typeSpecs Map of name to a ReactPropType | |
| 738 | - * @param {object} values Runtime values that need to be type-checked | |
| 739 | - * @param {string} location e.g. "prop", "context", "child context" | |
| 740 | - * @param {string} componentName Name of the component for error messages. | |
| 741 | - * @param {?Function} getStack Returns the component stack. | |
| 742 | - * @private | |
| 743 | - */ | |
| 744 | - function checkPropTypes(typeSpecs, values, location, componentName, getStack) { | |
| 745 | - for (var typeSpecName in typeSpecs) if (has(typeSpecs, typeSpecName)) { | |
| 746 | - var error; | |
| 747 | - try { | |
| 748 | - if (typeof typeSpecs[typeSpecName] !== "function") { | |
| 749 | - var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | |
| 750 | - err.name = "Invariant Violation"; | |
| 751 | - throw err; | |
| 752 | - } | |
| 753 | - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); | |
| 754 | - } catch (ex) { | |
| 755 | - error = ex; | |
| 756 | - } | |
| 757 | - if (error && !(error instanceof Error)) printWarning((componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."); | |
| 758 | - if (error instanceof Error && !(error.message in loggedTypeFailures)) { | |
| 759 | - loggedTypeFailures[error.message] = true; | |
| 760 | - var stack = getStack ? getStack() : ""; | |
| 761 | - printWarning("Failed " + location + " type: " + error.message + (stack != null ? stack : "")); | |
| 762 | - } | |
| 763 | - } | |
| 764 | - } | |
| 765 | - /** | |
| 766 | - * Resets warning cache when testing. | |
| 767 | - * | |
| 768 | - * @private | |
| 769 | - */ | |
| 770 | - checkPropTypes.resetWarningCache = function() { | |
| 771 | - loggedTypeFailures = {}; | |
| 772 | - }; | |
| 773 | - module.exports = checkPropTypes; | |
| 774 | - })); | |
| 3692 | + * https://github.com/reactjs/rfcs/pull/107 | |
| 3693 | + * @param {*} type | |
| 3694 | + * @param {object} props | |
| 3695 | + * @param {string} key | |
| 3696 | + */ | |
| 775 | 3697 | |
| 776 | -//#endregion | |
| 777 | -//#region node_modules/prop-types/factoryWithTypeCheckers.js | |
| 3698 | +function jsxDEV(type, config, maybeKey, source, self) { | |
| 3699 | + { | |
| 3700 | + var propName; // Reserved names are extracted | |
| 3701 | + | |
| 3702 | + var props = {}; | |
| 3703 | + var key = null; | |
| 3704 | + var ref = null; // Currently, key can be spread in as a prop. This causes a potential | |
| 3705 | + // issue if key is also explicitly declared (ie. <div {...props} key="Hi" /> | |
| 3706 | + // or <div key="Hi" {...props} /> ). We want to deprecate key spread, | |
| 3707 | + // but as an intermediary step, we will use jsxDEV for everything except | |
| 3708 | + // <div {...props} key="Hi" />, because we aren't currently able to tell if | |
| 3709 | + // key is explicitly declared to be undefined or not. | |
| 3710 | + | |
| 3711 | + if (maybeKey !== undefined) { | |
| 3712 | + { | |
| 3713 | + checkKeyStringCoercion(maybeKey); | |
| 3714 | + } | |
| 3715 | + | |
| 3716 | + key = '' + maybeKey; | |
| 3717 | + } | |
| 3718 | + | |
| 3719 | + if (hasValidKey(config)) { | |
| 3720 | + { | |
| 3721 | + checkKeyStringCoercion(config.key); | |
| 3722 | + } | |
| 3723 | + | |
| 3724 | + key = '' + config.key; | |
| 3725 | + } | |
| 3726 | + | |
| 3727 | + if (hasValidRef(config)) { | |
| 3728 | + ref = config.ref; | |
| 3729 | + warnIfStringRefCannotBeAutoConverted(config, self); | |
| 3730 | + } // Remaining properties are added to a new props object | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + for (propName in config) { | |
| 3734 | + if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) { | |
| 3735 | + props[propName] = config[propName]; | |
| 3736 | + } | |
| 3737 | + } // Resolve default props | |
| 3738 | + | |
| 3739 | + | |
| 3740 | + if (type && type.defaultProps) { | |
| 3741 | + var defaultProps = type.defaultProps; | |
| 3742 | + | |
| 3743 | + for (propName in defaultProps) { | |
| 3744 | + if (props[propName] === undefined) { | |
| 3745 | + props[propName] = defaultProps[propName]; | |
| 3746 | + } | |
| 3747 | + } | |
| 3748 | + } | |
| 3749 | + | |
| 3750 | + if (key || ref) { | |
| 3751 | + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; | |
| 3752 | + | |
| 3753 | + if (key) { | |
| 3754 | + defineKeyPropWarningGetter(props, displayName); | |
| 3755 | + } | |
| 3756 | + | |
| 3757 | + if (ref) { | |
| 3758 | + defineRefPropWarningGetter(props, displayName); | |
| 3759 | + } | |
| 3760 | + } | |
| 3761 | + | |
| 3762 | + return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props); | |
| 3763 | + } | |
| 3764 | +} | |
| 3765 | + | |
| 3766 | +var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner; | |
| 3767 | +var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame; | |
| 3768 | + | |
| 3769 | +function setCurrentlyValidatingElement$1(element) { | |
| 3770 | + { | |
| 3771 | + if (element) { | |
| 3772 | + var owner = element._owner; | |
| 3773 | + var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null); | |
| 3774 | + ReactDebugCurrentFrame$1.setExtraStackFrame(stack); | |
| 3775 | + } else { | |
| 3776 | + ReactDebugCurrentFrame$1.setExtraStackFrame(null); | |
| 3777 | + } | |
| 3778 | + } | |
| 3779 | +} | |
| 3780 | + | |
| 3781 | +var propTypesMisspellWarningShown; | |
| 3782 | + | |
| 3783 | +{ | |
| 3784 | + propTypesMisspellWarningShown = false; | |
| 3785 | +} | |
| 778 | 3786 | /** |
| 779 | - * Copyright (c) 2013-present, Facebook, Inc. | |
| 780 | - * | |
| 781 | - * This source code is licensed under the MIT license found in the | |
| 782 | - * LICENSE file in the root directory of this source tree. | |
| 783 | - */ | |
| 784 | - var require_factoryWithTypeCheckers = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 785 | - var ReactIs = require_react_is(); | |
| 786 | - var assign = require_object_assign(); | |
| 787 | - var ReactPropTypesSecret = require_ReactPropTypesSecret(); | |
| 788 | - var has = require_has(); | |
| 789 | - var checkPropTypes = require_checkPropTypes(); | |
| 790 | - var printWarning = function() {}; | |
| 791 | - printWarning = function(text) { | |
| 792 | - var message = "Warning: " + text; | |
| 793 | - if (typeof console !== "undefined") console.error(message); | |
| 794 | - try { | |
| 795 | - throw new Error(message); | |
| 796 | - } catch (x) {} | |
| 797 | - }; | |
| 798 | - function emptyFunctionThatReturnsNull() { | |
| 799 | - return null; | |
| 800 | - } | |
| 801 | - module.exports = function(isValidElement, throwOnDirectAccess) { | |
| 802 | - var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator; | |
| 803 | - var FAUX_ITERATOR_SYMBOL = "@@iterator"; | |
| 804 | - /** | |
| 805 | - * Returns the iterator method function contained on the iterable object. | |
| 806 | - * | |
| 807 | - * Be sure to invoke the function with the iterable as context: | |
| 808 | - * | |
| 809 | - * var iteratorFn = getIteratorFn(myIterable); | |
| 810 | - * if (iteratorFn) { | |
| 811 | - * var iterator = iteratorFn.call(myIterable); | |
| 812 | - * ... | |
| 813 | - * } | |
| 814 | - * | |
| 815 | - * @param {?object} maybeIterable | |
| 816 | - * @return {?function} | |
| 817 | - */ | |
| 818 | - function getIteratorFn(maybeIterable) { | |
| 819 | - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); | |
| 820 | - if (typeof iteratorFn === "function") return iteratorFn; | |
| 821 | - } | |
| 822 | - /** | |
| 823 | - * Collection of methods that allow declaration and validation of props that are | |
| 824 | - * supplied to React components. Example usage: | |
| 825 | - * | |
| 826 | - * var Props = require('ReactPropTypes'); | |
| 827 | - * var MyArticle = React.createClass({ | |
| 828 | - * propTypes: { | |
| 829 | - * // An optional string prop named "description". | |
| 830 | - * description: Props.string, | |
| 831 | - * | |
| 832 | - * // A required enum prop named "category". | |
| 833 | - * category: Props.oneOf(['News','Photos']).isRequired, | |
| 834 | - * | |
| 835 | - * // A prop named "dialog" that requires an instance of Dialog. | |
| 836 | - * dialog: Props.instanceOf(Dialog).isRequired | |
| 837 | - * }, | |
| 838 | - * render: function() { ... } | |
| 839 | - * }); | |
| 840 | - * | |
| 841 | - * A more formal specification of how these methods are used: | |
| 842 | - * | |
| 843 | - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) | |
| 844 | - * decl := ReactPropTypes.{type}(.isRequired)? | |
| 845 | - * | |
| 846 | - * Each and every declaration produces a function with the same signature. This | |
| 847 | - * allows the creation of custom validation functions. For example: | |
| 848 | - * | |
| 849 | - * var MyLink = React.createClass({ | |
| 850 | - * propTypes: { | |
| 851 | - * // An optional string or URI prop named "href". | |
| 852 | - * href: function(props, propName, componentName) { | |
| 853 | - * var propValue = props[propName]; | |
| 854 | - * if (propValue != null && typeof propValue !== 'string' && | |
| 855 | - * !(propValue instanceof URI)) { | |
| 856 | - * return new Error( | |
| 857 | - * 'Expected a string or an URI for ' + propName + ' in ' + | |
| 858 | - * componentName | |
| 859 | - * ); | |
| 860 | - * } | |
| 861 | - * } | |
| 862 | - * }, | |
| 863 | - * render: function() {...} | |
| 864 | - * }); | |
| 865 | - * | |
| 866 | - * @internal | |
| 867 | - */ | |
| 868 | - var ANONYMOUS = "<<anonymous>>"; | |
| 869 | - var ReactPropTypes = { | |
| 870 | - array: createPrimitiveTypeChecker("array"), | |
| 871 | - bigint: createPrimitiveTypeChecker("bigint"), | |
| 872 | - bool: createPrimitiveTypeChecker("boolean"), | |
| 873 | - func: createPrimitiveTypeChecker("function"), | |
| 874 | - number: createPrimitiveTypeChecker("number"), | |
| 875 | - object: createPrimitiveTypeChecker("object"), | |
| 876 | - string: createPrimitiveTypeChecker("string"), | |
| 877 | - symbol: createPrimitiveTypeChecker("symbol"), | |
| 878 | - any: createAnyTypeChecker(), | |
| 879 | - arrayOf: createArrayOfTypeChecker, | |
| 880 | - element: createElementTypeChecker(), | |
| 881 | - elementType: createElementTypeTypeChecker(), | |
| 882 | - instanceOf: createInstanceTypeChecker, | |
| 883 | - node: createNodeChecker(), | |
| 884 | - objectOf: createObjectOfTypeChecker, | |
| 885 | - oneOf: createEnumTypeChecker, | |
| 886 | - oneOfType: createUnionTypeChecker, | |
| 887 | - shape: createShapeTypeChecker, | |
| 888 | - exact: createStrictShapeTypeChecker | |
| 889 | - }; | |
| 890 | - /** | |
| 891 | - * inlined Object.is polyfill to avoid requiring consumers ship their own | |
| 892 | - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is | |
| 893 | - */ | |
| 894 | - function is(x, y) { | |
| 895 | - if (x === y) return x !== 0 || 1 / x === 1 / y; | |
| 896 | - else return x !== x && y !== y; | |
| 897 | - } | |
| 898 | - /** | |
| 899 | - * We use an Error-like object for backward compatibility as people may call | |
| 900 | - * PropTypes directly and inspect their output. However, we don't use real | |
| 901 | - * Errors anymore. We don't inspect their stack anyway, and creating them | |
| 902 | - * is prohibitively expensive if they are created too often, such as what | |
| 903 | - * happens in oneOfType() for any type before the one that matched. | |
| 904 | - */ | |
| 905 | - function PropTypeError(message, data) { | |
| 906 | - this.message = message; | |
| 907 | - this.data = data && typeof data === "object" ? data : {}; | |
| 908 | - this.stack = ""; | |
| 909 | - } | |
| 910 | - PropTypeError.prototype = Error.prototype; | |
| 911 | - function createChainableTypeChecker(validate) { | |
| 912 | - var manualPropTypeCallCache = {}; | |
| 913 | - var manualPropTypeWarningCount = 0; | |
| 914 | - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { | |
| 915 | - componentName = componentName || ANONYMOUS; | |
| 916 | - propFullName = propFullName || propName; | |
| 917 | - if (secret !== ReactPropTypesSecret) { | |
| 918 | - if (throwOnDirectAccess) { | |
| 919 | - var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"); | |
| 920 | - err.name = "Invariant Violation"; | |
| 921 | - throw err; | |
| 922 | - } else if (typeof console !== "undefined") { | |
| 923 | - var cacheKey = componentName + ":" + propName; | |
| 924 | - if (!manualPropTypeCallCache[cacheKey] && manualPropTypeWarningCount < 3) { | |
| 925 | - printWarning("You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."); | |
| 926 | - manualPropTypeCallCache[cacheKey] = true; | |
| 927 | - manualPropTypeWarningCount++; | |
| 928 | - } | |
| 929 | - } | |
| 930 | - } | |
| 931 | - if (props[propName] == null) { | |
| 932 | - if (isRequired) { | |
| 933 | - if (props[propName] === null) return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`.")); | |
| 934 | - return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`.")); | |
| 935 | - } | |
| 936 | - return null; | |
| 937 | - } else return validate(props, propName, componentName, location, propFullName); | |
| 938 | - } | |
| 939 | - var chainedCheckType = checkType.bind(null, false); | |
| 940 | - chainedCheckType.isRequired = checkType.bind(null, true); | |
| 941 | - return chainedCheckType; | |
| 942 | - } | |
| 943 | - function createPrimitiveTypeChecker(expectedType) { | |
| 944 | - function validate(props, propName, componentName, location, propFullName, secret) { | |
| 945 | - var propValue = props[propName]; | |
| 946 | - if (getPropType(propValue) !== expectedType) { | |
| 947 | - var preciseType = getPreciseType(propValue); | |
| 948 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."), { expectedType }); | |
| 949 | - } | |
| 950 | - return null; | |
| 951 | - } | |
| 952 | - return createChainableTypeChecker(validate); | |
| 953 | - } | |
| 954 | - function createAnyTypeChecker() { | |
| 955 | - return createChainableTypeChecker(emptyFunctionThatReturnsNull); | |
| 956 | - } | |
| 957 | - function createArrayOfTypeChecker(typeChecker) { | |
| 958 | - function validate(props, propName, componentName, location, propFullName) { | |
| 959 | - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf."); | |
| 960 | - var propValue = props[propName]; | |
| 961 | - if (!Array.isArray(propValue)) { | |
| 962 | - var propType = getPropType(propValue); | |
| 963 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.")); | |
| 964 | - } | |
| 965 | - for (var i = 0; i < propValue.length; i++) { | |
| 966 | - var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret); | |
| 967 | - if (error instanceof Error) return error; | |
| 968 | - } | |
| 969 | - return null; | |
| 970 | - } | |
| 971 | - return createChainableTypeChecker(validate); | |
| 972 | - } | |
| 973 | - function createElementTypeChecker() { | |
| 974 | - function validate(props, propName, componentName, location, propFullName) { | |
| 975 | - var propValue = props[propName]; | |
| 976 | - if (!isValidElement(propValue)) { | |
| 977 | - var propType = getPropType(propValue); | |
| 978 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement.")); | |
| 979 | - } | |
| 980 | - return null; | |
| 981 | - } | |
| 982 | - return createChainableTypeChecker(validate); | |
| 983 | - } | |
| 984 | - function createElementTypeTypeChecker() { | |
| 985 | - function validate(props, propName, componentName, location, propFullName) { | |
| 986 | - var propValue = props[propName]; | |
| 987 | - if (!ReactIs.isValidElementType(propValue)) { | |
| 988 | - var propType = getPropType(propValue); | |
| 989 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type.")); | |
| 990 | - } | |
| 991 | - return null; | |
| 992 | - } | |
| 993 | - return createChainableTypeChecker(validate); | |
| 994 | - } | |
| 995 | - function createInstanceTypeChecker(expectedClass) { | |
| 996 | - function validate(props, propName, componentName, location, propFullName) { | |
| 997 | - if (!(props[propName] instanceof expectedClass)) { | |
| 998 | - var expectedClassName = expectedClass.name || ANONYMOUS; | |
| 999 | - var actualClassName = getClassName(props[propName]); | |
| 1000 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`.")); | |
| 1001 | - } | |
| 1002 | - return null; | |
| 1003 | - } | |
| 1004 | - return createChainableTypeChecker(validate); | |
| 1005 | - } | |
| 1006 | - function createEnumTypeChecker(expectedValues) { | |
| 1007 | - if (!Array.isArray(expectedValues)) { | |
| 1008 | - if (arguments.length > 1) printWarning("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."); | |
| 1009 | - else printWarning("Invalid argument supplied to oneOf, expected an array."); | |
| 1010 | - return emptyFunctionThatReturnsNull; | |
| 1011 | - } | |
| 1012 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1013 | - var propValue = props[propName]; | |
| 1014 | - for (var i = 0; i < expectedValues.length; i++) if (is(propValue, expectedValues[i])) return null; | |
| 1015 | - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { | |
| 1016 | - if (getPreciseType(value) === "symbol") return String(value); | |
| 1017 | - return value; | |
| 1018 | - }); | |
| 1019 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".")); | |
| 1020 | - } | |
| 1021 | - return createChainableTypeChecker(validate); | |
| 1022 | - } | |
| 1023 | - function createObjectOfTypeChecker(typeChecker) { | |
| 1024 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1025 | - if (typeof typeChecker !== "function") return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf."); | |
| 1026 | - var propValue = props[propName]; | |
| 1027 | - var propType = getPropType(propValue); | |
| 1028 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.")); | |
| 1029 | - for (var key in propValue) if (has(propValue, key)) { | |
| 1030 | - var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1031 | - if (error instanceof Error) return error; | |
| 1032 | - } | |
| 1033 | - return null; | |
| 1034 | - } | |
| 1035 | - return createChainableTypeChecker(validate); | |
| 1036 | - } | |
| 1037 | - function createUnionTypeChecker(arrayOfTypeCheckers) { | |
| 1038 | - if (!Array.isArray(arrayOfTypeCheckers)) { | |
| 1039 | - printWarning("Invalid argument supplied to oneOfType, expected an instance of array."); | |
| 1040 | - return emptyFunctionThatReturnsNull; | |
| 1041 | - } | |
| 1042 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1043 | - var checker = arrayOfTypeCheckers[i]; | |
| 1044 | - if (typeof checker !== "function") { | |
| 1045 | - printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."); | |
| 1046 | - return emptyFunctionThatReturnsNull; | |
| 1047 | - } | |
| 1048 | - } | |
| 1049 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1050 | - var expectedTypes = []; | |
| 1051 | - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | |
| 1052 | - var checker = arrayOfTypeCheckers[i]; | |
| 1053 | - var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret); | |
| 1054 | - if (checkerResult == null) return null; | |
| 1055 | - if (checkerResult.data && has(checkerResult.data, "expectedType")) expectedTypes.push(checkerResult.data.expectedType); | |
| 1056 | - } | |
| 1057 | - var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : ""; | |
| 1058 | - return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + ".")); | |
| 1059 | - } | |
| 1060 | - return createChainableTypeChecker(validate); | |
| 1061 | - } | |
| 1062 | - function createNodeChecker() { | |
| 1063 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1064 | - if (!isNode(props[propName])) return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode.")); | |
| 1065 | - return null; | |
| 1066 | - } | |
| 1067 | - return createChainableTypeChecker(validate); | |
| 1068 | - } | |
| 1069 | - function invalidValidatorError(componentName, location, propFullName, key, type) { | |
| 1070 | - return new PropTypeError((componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."); | |
| 1071 | - } | |
| 1072 | - function createShapeTypeChecker(shapeTypes) { | |
| 1073 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1074 | - var propValue = props[propName]; | |
| 1075 | - var propType = getPropType(propValue); | |
| 1076 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1077 | - for (var key in shapeTypes) { | |
| 1078 | - var checker = shapeTypes[key]; | |
| 1079 | - if (typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1080 | - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1081 | - if (error) return error; | |
| 1082 | - } | |
| 1083 | - return null; | |
| 1084 | - } | |
| 1085 | - return createChainableTypeChecker(validate); | |
| 1086 | - } | |
| 1087 | - function createStrictShapeTypeChecker(shapeTypes) { | |
| 1088 | - function validate(props, propName, componentName, location, propFullName) { | |
| 1089 | - var propValue = props[propName]; | |
| 1090 | - var propType = getPropType(propValue); | |
| 1091 | - if (propType !== "object") return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`.")); | |
| 1092 | - for (var key in assign({}, props[propName], shapeTypes)) { | |
| 1093 | - var checker = shapeTypes[key]; | |
| 1094 | - if (has(shapeTypes, key) && typeof checker !== "function") return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | |
| 1095 | - if (!checker) return new PropTypeError("Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")); | |
| 1096 | - var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret); | |
| 1097 | - if (error) return error; | |
| 1098 | - } | |
| 1099 | - return null; | |
| 1100 | - } | |
| 1101 | - return createChainableTypeChecker(validate); | |
| 1102 | - } | |
| 1103 | - function isNode(propValue) { | |
| 1104 | - switch (typeof propValue) { | |
| 1105 | - case "number": | |
| 1106 | - case "string": | |
| 1107 | - case "undefined": return true; | |
| 1108 | - case "boolean": return !propValue; | |
| 1109 | - case "object": | |
| 1110 | - if (Array.isArray(propValue)) return propValue.every(isNode); | |
| 1111 | - if (propValue === null || isValidElement(propValue)) return true; | |
| 1112 | - var iteratorFn = getIteratorFn(propValue); | |
| 1113 | - if (iteratorFn) { | |
| 1114 | - var iterator = iteratorFn.call(propValue); | |
| 1115 | - var step; | |
| 1116 | - if (iteratorFn !== propValue.entries) { | |
| 1117 | - while (!(step = iterator.next()).done) if (!isNode(step.value)) return false; | |
| 1118 | - } else while (!(step = iterator.next()).done) { | |
| 1119 | - var entry = step.value; | |
| 1120 | - if (entry) { | |
| 1121 | - if (!isNode(entry[1])) return false; | |
| 1122 | - } | |
| 1123 | - } | |
| 1124 | - } else return false; | |
| 1125 | - return true; | |
| 1126 | - default: return false; | |
| 1127 | - } | |
| 1128 | - } | |
| 1129 | - function isSymbol(propType, propValue) { | |
| 1130 | - if (propType === "symbol") return true; | |
| 1131 | - if (!propValue) return false; | |
| 1132 | - if (propValue["@@toStringTag"] === "Symbol") return true; | |
| 1133 | - if (typeof Symbol === "function" && propValue instanceof Symbol) return true; | |
| 1134 | - return false; | |
| 1135 | - } | |
| 1136 | - function getPropType(propValue) { | |
| 1137 | - var propType = typeof propValue; | |
| 1138 | - if (Array.isArray(propValue)) return "array"; | |
| 1139 | - if (propValue instanceof RegExp) return "object"; | |
| 1140 | - if (isSymbol(propType, propValue)) return "symbol"; | |
| 1141 | - return propType; | |
| 1142 | - } | |
| 1143 | - function getPreciseType(propValue) { | |
| 1144 | - if (typeof propValue === "undefined" || propValue === null) return "" + propValue; | |
| 1145 | - var propType = getPropType(propValue); | |
| 1146 | - if (propType === "object") { | |
| 1147 | - if (propValue instanceof Date) return "date"; | |
| 1148 | - else if (propValue instanceof RegExp) return "regexp"; | |
| 1149 | - } | |
| 1150 | - return propType; | |
| 1151 | - } | |
| 1152 | - function getPostfixForTypeWarning(value) { | |
| 1153 | - var type = getPreciseType(value); | |
| 1154 | - switch (type) { | |
| 1155 | - case "array": | |
| 1156 | - case "object": return "an " + type; | |
| 1157 | - case "boolean": | |
| 1158 | - case "date": | |
| 1159 | - case "regexp": return "a " + type; | |
| 1160 | - default: return type; | |
| 1161 | - } | |
| 1162 | - } | |
| 1163 | - function getClassName(propValue) { | |
| 1164 | - if (!propValue.constructor || !propValue.constructor.name) return ANONYMOUS; | |
| 1165 | - return propValue.constructor.name; | |
| 1166 | - } | |
| 1167 | - ReactPropTypes.checkPropTypes = checkPropTypes; | |
| 1168 | - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; | |
| 1169 | - ReactPropTypes.PropTypes = ReactPropTypes; | |
| 1170 | - return ReactPropTypes; | |
| 1171 | - }; | |
| 1172 | - })); | |
| 3787 | + * Verifies the object is a ReactElement. | |
| 3788 | + * See https://reactjs.org/docs/react-api.html#isvalidelement | |
| 3789 | + * @param {?object} object | |
| 3790 | + * @return {boolean} True if `object` is a ReactElement. | |
| 3791 | + * @final | |
| 3792 | + */ | |
| 1173 | 3793 | |
| 1174 | -//#endregion | |
| 1175 | -//#region node_modules/prop-types/index.js | |
| 1176 | - var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => { | |
| 1177 | - var ReactIs = require_react_is(); | |
| 1178 | - var throwOnDirectAccess = true; | |
| 1179 | - module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess); | |
| 1180 | - })); | |
| 1181 | 3794 | |
| 1182 | -//#endregion | |
| 1183 | -//#region modules/checklist/assets/js/app/components/reminder-modal.js | |
| 1184 | - var import_prop_types = /* @__PURE__ */ __toESM(require_prop_types()); | |
| 1185 | - var ReminderModal = function ReminderModal(_ref) { | |
| 1186 | - var setOpen = _ref.setOpen; | |
| 1187 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Card, { | |
| 1188 | - elevation: 0, | |
| 1189 | - sx: { maxWidth: 336 }, | |
| 1190 | - className: "e-checklist-infotip-first-time-closed" | |
| 1191 | - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.CardContent, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 1192 | - variant: "subtitle2", | |
| 1193 | - sx: { mb: 2 } | |
| 1194 | - }, (0, _wordpress_i18n.__)("Looking for your Launchpad Checklist?", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { variant: "body2" }, (0, _wordpress_i18n.__)("Click the launch icon to continue setting up your site.", "elementor"))), /*#__PURE__*/ react.default.createElement(_elementor_ui.CardActions, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1195 | - size: "small", | |
| 1196 | - variant: "contained", | |
| 1197 | - className: "infotip-first-time-closed-button", | |
| 1198 | - onClick: function closeChecklist(e) { | |
| 1199 | - e.stopPropagation(); | |
| 1200 | - setOpen(false); | |
| 1201 | - } | |
| 1202 | - }, (0, _wordpress_i18n.__)("Got it", "elementor")))); | |
| 1203 | - }; | |
| 1204 | - ReminderModal.propTypes = { setOpen: import_prop_types.default.func.isRequired }; | |
| 3795 | +function isValidElement(object) { | |
| 3796 | + { | |
| 3797 | + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; | |
| 3798 | + } | |
| 3799 | +} | |
| 1205 | 3800 | |
| 1206 | -//#endregion | |
| 1207 | -//#region modules/checklist/assets/js/utils/consts.js | |
| 1208 | - var STEPS_ROUTE = "checklist/steps"; | |
| 1209 | - var USER_PROGRESS_ROUTE = "checklist/user-progress"; | |
| 1210 | - var STEP = { | |
| 1211 | - IS_MARKED_COMPLETED: "is_marked_completed", | |
| 1212 | - IS_IMMUTABLE_COMPLETED: "is_immutable_completed", | |
| 1213 | - IS_ABSOLUTE_COMPLETED: "is_absolute_completed", | |
| 1214 | - PROMOTION_DATA: "promotion_data" | |
| 1215 | - }; | |
| 1216 | - var USER_PROGRESS = { | |
| 1217 | - LAST_OPENED_TIMESTAMP: "last_opened_timestamp", | |
| 1218 | - SHOULD_OPEN_IN_EDITOR: "should_open_in_editor", | |
| 1219 | - CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME: "first_closed_checklist_in_editor", | |
| 1220 | - IS_POPUP_MINIMIZED: "is_popup_minimized", | |
| 1221 | - EDITOR_VISIT_COUNT: "e_editor_counter" | |
| 1222 | - }; | |
| 1223 | - var STEP_IDS_TO_COMPLETE_IN_EDITOR = ["add_logo", "set_fonts_and_colors"]; | |
| 1224 | - var PANEL_ROUTES = { | |
| 1225 | - add_logo: "panel/global/settings-site-identity", | |
| 1226 | - set_fonts_and_colors: "panel/global/global-typography" | |
| 1227 | - }; | |
| 1228 | - var MIXPANEL_CHECKLIST_STEPS = { | |
| 1229 | - UPGRADE: "upgrade", | |
| 1230 | - ACTION: "action", | |
| 1231 | - DONE: "done", | |
| 1232 | - UNDONE: "undone", | |
| 1233 | - TITLE: "title", | |
| 1234 | - WELL_DONE: "well_done", | |
| 1235 | - CHECKLIST_HEADER_CLOSE: "checklistHeaderClose", | |
| 1236 | - ACCORDION_SECTION: "accordionSection" | |
| 1237 | - }; | |
| 3801 | +function getDeclarationErrorAddendum() { | |
| 3802 | + { | |
| 3803 | + if (ReactCurrentOwner$1.current) { | |
| 3804 | + var name = getComponentNameFromType(ReactCurrentOwner$1.current.type); | |
| 1238 | 3805 | |
| 1239 | -//#endregion | |
| 1240 | -//#region node_modules/@babel/runtime/helpers/esm/typeof.js | |
| 1241 | - function _typeof(o) { | |
| 1242 | - "@babel/helpers - typeof"; | |
| 1243 | - return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) { | |
| 1244 | - return typeof o; | |
| 1245 | - } : function(o) { | |
| 1246 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1247 | - }, _typeof(o); | |
| 1248 | - } | |
| 3806 | + if (name) { | |
| 3807 | + return '\n\nCheck the render method of `' + name + '`.'; | |
| 3808 | + } | |
| 3809 | + } | |
| 1249 | 3810 | |
| 1250 | -//#endregion | |
| 1251 | -//#region node_modules/@babel/runtime/helpers/esm/toPrimitive.js | |
| 1252 | - function toPrimitive(t, r) { | |
| 1253 | - if ("object" != _typeof(t) || !t) return t; | |
| 1254 | - var e = t[Symbol.toPrimitive]; | |
| 1255 | - if (void 0 !== e) { | |
| 1256 | - var i = e.call(t, r || "default"); | |
| 1257 | - if ("object" != _typeof(i)) return i; | |
| 1258 | - throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 1259 | - } | |
| 1260 | - return ("string" === r ? String : Number)(t); | |
| 1261 | - } | |
| 3811 | + return ''; | |
| 3812 | + } | |
| 3813 | +} | |
| 1262 | 3814 | |
| 1263 | -//#endregion | |
| 1264 | -//#region node_modules/@babel/runtime/helpers/esm/toPropertyKey.js | |
| 1265 | - function toPropertyKey(t) { | |
| 1266 | - var i = toPrimitive(t, "string"); | |
| 1267 | - return "symbol" == _typeof(i) ? i : i + ""; | |
| 1268 | - } | |
| 3815 | +function getSourceInfoErrorAddendum(source) { | |
| 3816 | + { | |
| 3817 | + if (source !== undefined) { | |
| 3818 | + var fileName = source.fileName.replace(/^.*[\\\/]/, ''); | |
| 3819 | + var lineNumber = source.lineNumber; | |
| 3820 | + return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.'; | |
| 3821 | + } | |
| 1269 | 3822 | |
| 1270 | -//#endregion | |
| 1271 | -//#region node_modules/@babel/runtime/helpers/esm/defineProperty.js | |
| 1272 | - function _defineProperty(e, r, t) { | |
| 1273 | - return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 1274 | - value: t, | |
| 1275 | - enumerable: !0, | |
| 1276 | - configurable: !0, | |
| 1277 | - writable: !0 | |
| 1278 | - }) : e[r] = t, e; | |
| 1279 | - } | |
| 3823 | + return ''; | |
| 3824 | + } | |
| 3825 | +} | |
| 3826 | +/** | |
| 3827 | + * Warn if there's no key explicitly set on dynamic arrays of children or | |
| 3828 | + * object keys are not valid. This allows us to keep track of children between | |
| 3829 | + * updates. | |
| 3830 | + */ | |
| 1280 | 3831 | |
| 1281 | -//#endregion | |
| 1282 | -//#region modules/checklist/assets/js/utils/functions.js | |
| 1283 | - function ownKeys$2(e, r) { | |
| 1284 | - var t = Object.keys(e); | |
| 1285 | - if (Object.getOwnPropertySymbols) { | |
| 1286 | - var o = Object.getOwnPropertySymbols(e); | |
| 1287 | - r && (o = o.filter(function(r) { | |
| 1288 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 1289 | - })), t.push.apply(t, o); | |
| 1290 | - } | |
| 1291 | - return t; | |
| 1292 | - } | |
| 1293 | - __name(ownKeys$2, "ownKeys"); | |
| 1294 | - function _objectSpread$2(e) { | |
| 1295 | - for (var r = 1; r < arguments.length; r++) { | |
| 1296 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 1297 | - r % 2 ? ownKeys$2(Object(t), !0).forEach(function(r) { | |
| 1298 | - _defineProperty(e, r, t[r]); | |
| 1299 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function(r) { | |
| 1300 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 1301 | - }); | |
| 1302 | - } | |
| 1303 | - return e; | |
| 1304 | - } | |
| 1305 | - __name(_objectSpread$2, "_objectSpread"); | |
| 1306 | - var IS_MARKED_COMPLETED$1 = STEP.IS_MARKED_COMPLETED; | |
| 1307 | - var IS_ABSOLUTE_COMPLETED$1 = STEP.IS_ABSOLUTE_COMPLETED; | |
| 1308 | - var IS_IMMUTABLE_COMPLETED$1 = STEP.IS_IMMUTABLE_COMPLETED; | |
| 1309 | - var PROMOTION_DATA$1 = STEP.PROMOTION_DATA; | |
| 1310 | - function isStepChecked(step) { | |
| 1311 | - return !step[PROMOTION_DATA$1] && (step[IS_MARKED_COMPLETED$1] || step[IS_ABSOLUTE_COMPLETED$1] || step[IS_IMMUTABLE_COMPLETED$1]); | |
| 1312 | - } | |
| 1313 | - function toggleChecklistPopup() { | |
| 1314 | - $e.run("checklist/toggle-popup"); | |
| 1315 | - } | |
| 1316 | - function fetchSteps() { | |
| 1317 | - return _fetchSteps.apply(this, arguments); | |
| 1318 | - } | |
| 1319 | - function _fetchSteps() { | |
| 1320 | - _fetchSteps = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1321 | - var _response$data; | |
| 1322 | - var response; | |
| 1323 | - return import_regenerator.default.wrap(function(_context) { | |
| 1324 | - while (1) switch (_context.prev = _context.next) { | |
| 1325 | - case 0: | |
| 1326 | - _context.next = 1; | |
| 1327 | - return $e.data.get(STEPS_ROUTE, {}, { refresh: true }); | |
| 1328 | - case 1: | |
| 1329 | - response = _context.sent; | |
| 1330 | - return _context.abrupt("return", (response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.data) || null); | |
| 1331 | - case 2: | |
| 1332 | - case "end": return _context.stop(); | |
| 1333 | - } | |
| 1334 | - }, _callee); | |
| 1335 | - })); | |
| 1336 | - return _fetchSteps.apply(this, arguments); | |
| 1337 | - } | |
| 1338 | - function fetchUserProgress() { | |
| 1339 | - return _fetchUserProgress.apply(this, arguments); | |
| 1340 | - } | |
| 1341 | - function _fetchUserProgress() { | |
| 1342 | - _fetchUserProgress = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 1343 | - var _response$data2; | |
| 1344 | - var response; | |
| 1345 | - return import_regenerator.default.wrap(function(_context2) { | |
| 1346 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1347 | - case 0: | |
| 1348 | - _context2.next = 1; | |
| 1349 | - return $e.data.get(USER_PROGRESS_ROUTE, {}, { refresh: true }); | |
| 1350 | - case 1: | |
| 1351 | - response = _context2.sent; | |
| 1352 | - return _context2.abrupt("return", (response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.data) || null); | |
| 1353 | - case 2: | |
| 1354 | - case "end": return _context2.stop(); | |
| 1355 | - } | |
| 1356 | - }, _callee2); | |
| 1357 | - })); | |
| 1358 | - return _fetchUserProgress.apply(this, arguments); | |
| 1359 | - } | |
| 1360 | - function updateStep(_x, _x2) { | |
| 1361 | - return _updateStep.apply(this, arguments); | |
| 1362 | - } | |
| 1363 | - function _updateStep() { | |
| 1364 | - _updateStep = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee3(id, data) { | |
| 1365 | - return import_regenerator.default.wrap(function(_context3) { | |
| 1366 | - while (1) switch (_context3.prev = _context3.next) { | |
| 1367 | - case 0: | |
| 1368 | - _context3.next = 1; | |
| 1369 | - return $e.data.update(STEPS_ROUTE, _objectSpread$2({ id }, data), { id }); | |
| 1370 | - case 1: return _context3.abrupt("return", _context3.sent); | |
| 1371 | - case 2: | |
| 1372 | - case "end": return _context3.stop(); | |
| 1373 | - } | |
| 1374 | - }, _callee3); | |
| 1375 | - })); | |
| 1376 | - return _updateStep.apply(this, arguments); | |
| 1377 | - } | |
| 1378 | - function updateUserProgress(_x3) { | |
| 1379 | - return _updateUserProgress.apply(this, arguments); | |
| 1380 | - } | |
| 1381 | - function _updateUserProgress() { | |
| 1382 | - _updateUserProgress = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee4(data) { | |
| 1383 | - return import_regenerator.default.wrap(function(_context4) { | |
| 1384 | - while (1) switch (_context4.prev = _context4.next) { | |
| 1385 | - case 0: | |
| 1386 | - _context4.next = 1; | |
| 1387 | - return $e.data.update(USER_PROGRESS_ROUTE, data); | |
| 1388 | - case 1: return _context4.abrupt("return", _context4.sent); | |
| 1389 | - case 2: | |
| 1390 | - case "end": return _context4.stop(); | |
| 1391 | - } | |
| 1392 | - }, _callee4); | |
| 1393 | - })); | |
| 1394 | - return _updateUserProgress.apply(this, arguments); | |
| 1395 | - } | |
| 1396 | - function getAndUpdateStep(id, step, key, value) { | |
| 1397 | - if (step.config.id !== id) return step; | |
| 1398 | - return _objectSpread$2(_objectSpread$2({}, step), {}, _defineProperty({}, key, value)); | |
| 1399 | - } | |
| 1400 | - function addMixpanelTrackingChecklistSteps(name, action) { | |
| 1401 | - var element = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "button"; | |
| 1402 | - var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1403 | - name = name.replace(/_/g, ""); | |
| 1404 | - var eventName = "checklist_steps_".concat(action, "_").concat(name); | |
| 1405 | - return elementorCommon.eventsManager.dispatchEvent(eventName, _objectSpread$2({ | |
| 1406 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1407 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistSteps, | |
| 1408 | - trigger: elementorCommon.eventsManager.config.triggers.click, | |
| 1409 | - element: elementorCommon.eventsManager.config.elements[element] | |
| 1410 | - }, documentMetaData)); | |
| 1411 | - } | |
| 1412 | - function addMixpanelTrackingChecklistHeader(name) { | |
| 1413 | - var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1414 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist[name], _objectSpread$2({ | |
| 1415 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1416 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.checklistHeader, | |
| 1417 | - trigger: elementorCommon.eventsManager.config.triggers.click, | |
| 1418 | - element: elementorCommon.eventsManager.config.elements.buttonIcon | |
| 1419 | - }, documentMetaData)); | |
| 1420 | - } | |
| 1421 | - function addMixpanelTrackingChecklistTopBar(togglePopupState) { | |
| 1422 | - var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1423 | - var name = !togglePopupState ? "launchpadOn" : "launchpadOff"; | |
| 1424 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar[name], _objectSpread$2({ | |
| 1425 | - location: elementorCommon.eventsManager.config.locations.topBar, | |
| 1426 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, | |
| 1427 | - trigger: elementorCommon.eventsManager.config.triggers.toggleClick, | |
| 1428 | - element: elementorCommon.eventsManager.config.elements.buttonIcon | |
| 1429 | - }, documentMetaData)); | |
| 1430 | - } | |
| 1431 | - function dispatchChecklistOpenEvent() { | |
| 1432 | - var documentMetaData = getDocumentMetaDataMixpanel(); | |
| 1433 | - return elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.elementorEditor.checklist.checklistFirstPopup, _objectSpread$2({ | |
| 1434 | - location: elementorCommon.eventsManager.config.locations.elementorEditor, | |
| 1435 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations.launchpad, | |
| 1436 | - trigger: elementorCommon.eventsManager.config.triggers.editorLoaded, | |
| 1437 | - element: elementorCommon.eventsManager.config.elements.launchpadChecklist | |
| 1438 | - }, documentMetaData)); | |
| 1439 | - } | |
| 1440 | - function getDocumentMetaDataMixpanel() { | |
| 1441 | - return { | |
| 1442 | - postId: elementor.getPreviewContainer().document.config.id, | |
| 1443 | - postTitle: elementor.getPreviewContainer().model.attributes.settings.attributes.post_title, | |
| 1444 | - postTypeTitle: elementor.getPreviewContainer().document.config.post_type_title, | |
| 1445 | - documentType: elementor.getPreviewContainer().document.config.type | |
| 1446 | - }; | |
| 1447 | - } | |
| 1448 | 3832 | |
| 1449 | -//#endregion | |
| 1450 | -//#region modules/checklist/assets/js/topbar-icon.js | |
| 1451 | - var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME$1 = USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; | |
| 1452 | - var TopBarIcon = function TopBarIcon() { | |
| 1453 | - var _useState2 = _slicedToArray((0, react.useState)(false), 2); | |
| 1454 | - var hasRoot = _useState2[0]; | |
| 1455 | - var setHasRoot = _useState2[1]; | |
| 1456 | - var _useState4 = _slicedToArray((0, react.useState)(false), 2); | |
| 1457 | - var open = _useState4[0]; | |
| 1458 | - var setOpen = _useState4[1]; | |
| 1459 | - var _useQuery = (0, _elementor_query.useQuery)({ | |
| 1460 | - queryKey: ["closedForFirstTime"], | |
| 1461 | - queryFn: fetchUserProgress | |
| 1462 | - }); | |
| 1463 | - var error = _useQuery.error; | |
| 1464 | - var userProgress = _useQuery.data; | |
| 1465 | - var closedForFirstTime = userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME$1]; | |
| 1466 | - (0, react.useEffect)(function() { | |
| 1467 | - return (0, _elementor_editor_v1_adapters.__privateListenTo)((0, _elementor_editor_v1_adapters.commandEndEvent)("checklist/toggle-popup"), function(e) { | |
| 1468 | - setHasRoot(e.args.isOpen); | |
| 1469 | - }); | |
| 1470 | - }, [hasRoot]); | |
| 1471 | - (0, react.useEffect)(function() { | |
| 1472 | - var handleFirstClosed = function handleFirstClosed() { | |
| 1473 | - setOpen(true); | |
| 1474 | - }; | |
| 1475 | - window.addEventListener("elementor/checklist/first_close", handleFirstClosed); | |
| 1476 | - return function() { | |
| 1477 | - window.removeEventListener("elementor/checklist/first_close", handleFirstClosed); | |
| 1478 | - }; | |
| 1479 | - }, []); | |
| 1480 | - if (error) return null; | |
| 1481 | - return hasRoot && !closedForFirstTime ? /*#__PURE__*/ react.createElement(_elementor_icons_RocketIcon.default, null) : /*#__PURE__*/ react.createElement(_elementor_ui.Infotip, { | |
| 1482 | - placement: "bottom-start", | |
| 1483 | - content: /*#__PURE__*/ react.createElement(ReminderModal, { | |
| 1484 | - setHasRoot, | |
| 1485 | - setOpen | |
| 1486 | - }), | |
| 1487 | - open, | |
| 1488 | - PopperProps: { modifiers: [{ | |
| 1489 | - name: "offset", | |
| 1490 | - options: { offset: [-16, 12] } | |
| 1491 | - }] } | |
| 1492 | - }, /*#__PURE__*/ react.createElement(_elementor_icons_RocketIcon.default, null)); | |
| 1493 | - }; | |
| 3833 | +var ownerHasKeyUseWarning = {}; | |
| 1494 | 3834 | |
| 1495 | -//#endregion | |
| 1496 | -//#region node_modules/@babel/runtime/helpers/esm/classCallCheck.js | |
| 1497 | - function _classCallCheck(a, n) { | |
| 1498 | - if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 1499 | - } | |
| 3835 | +function getCurrentComponentErrorInfo(parentType) { | |
| 3836 | + { | |
| 3837 | + var info = getDeclarationErrorAddendum(); | |
| 1500 | 3838 | |
| 1501 | -//#endregion | |
| 1502 | -//#region node_modules/@babel/runtime/helpers/esm/createClass.js | |
| 1503 | - function _defineProperties(e, r) { | |
| 1504 | - for (var t = 0; t < r.length; t++) { | |
| 1505 | - var o = r[t]; | |
| 1506 | - o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 1507 | - } | |
| 1508 | - } | |
| 1509 | - function _createClass(e, r, t) { | |
| 1510 | - return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; | |
| 1511 | - } | |
| 3839 | + if (!info) { | |
| 3840 | + var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name; | |
| 1512 | 3841 | |
| 1513 | -//#endregion | |
| 1514 | -//#region node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js | |
| 1515 | - function _assertThisInitialized(e) { | |
| 1516 | - if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 1517 | - return e; | |
| 1518 | - } | |
| 3842 | + if (parentName) { | |
| 3843 | + info = "\n\nCheck the top-level render call using <" + parentName + ">."; | |
| 3844 | + } | |
| 3845 | + } | |
| 1519 | 3846 | |
| 1520 | -//#endregion | |
| 1521 | -//#region node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js | |
| 1522 | - function _possibleConstructorReturn(t, e) { | |
| 1523 | - if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 1524 | - if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 1525 | - return _assertThisInitialized(t); | |
| 1526 | - } | |
| 3847 | + return info; | |
| 3848 | + } | |
| 3849 | +} | |
| 3850 | +/** | |
| 3851 | + * Warn if the element doesn't have an explicit key assigned to it. | |
| 3852 | + * This element is in an array. The array could grow and shrink or be | |
| 3853 | + * reordered. All children that haven't already been validated are required to | |
| 3854 | + * have a "key" property assigned to it. Error statuses are cached so a warning | |
| 3855 | + * will only be shown once. | |
| 3856 | + * | |
| 3857 | + * @internal | |
| 3858 | + * @param {ReactElement} element Element that requires a key. | |
| 3859 | + * @param {*} parentType element's parent's type. | |
| 3860 | + */ | |
| 1527 | 3861 | |
| 1528 | -//#endregion | |
| 1529 | -//#region node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js | |
| 1530 | - function _getPrototypeOf(t) { | |
| 1531 | - return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { | |
| 1532 | - return t.__proto__ || Object.getPrototypeOf(t); | |
| 1533 | - }, _getPrototypeOf(t); | |
| 1534 | - } | |
| 1535 | 3862 | |
| 1536 | -//#endregion | |
| 1537 | -//#region node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js | |
| 1538 | - function _setPrototypeOf(t, e) { | |
| 1539 | - return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, e) { | |
| 1540 | - return t.__proto__ = e, t; | |
| 1541 | - }, _setPrototypeOf(t, e); | |
| 1542 | - } | |
| 3863 | +function validateExplicitKey(element, parentType) { | |
| 3864 | + { | |
| 3865 | + if (!element._store || element._store.validated || element.key != null) { | |
| 3866 | + return; | |
| 3867 | + } | |
| 1543 | 3868 | |
| 1544 | -//#endregion | |
| 1545 | -//#region node_modules/@babel/runtime/helpers/esm/inherits.js | |
| 1546 | - function _inherits(t, e) { | |
| 1547 | - if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 1548 | - t.prototype = Object.create(e && e.prototype, { constructor: { | |
| 1549 | - value: t, | |
| 1550 | - writable: !0, | |
| 1551 | - configurable: !0 | |
| 1552 | - } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); | |
| 1553 | - } | |
| 3869 | + element._store.validated = true; | |
| 3870 | + var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType); | |
| 1554 | 3871 | |
| 1555 | -//#endregion | |
| 1556 | -//#region node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js | |
| 1557 | - function _arrayWithoutHoles(r) { | |
| 1558 | - if (Array.isArray(r)) return _arrayLikeToArray(r); | |
| 1559 | - } | |
| 3872 | + if (ownerHasKeyUseWarning[currentComponentErrorInfo]) { | |
| 3873 | + return; | |
| 3874 | + } | |
| 1560 | 3875 | |
| 1561 | -//#endregion | |
| 1562 | -//#region node_modules/@babel/runtime/helpers/esm/iterableToArray.js | |
| 1563 | - function _iterableToArray(r) { | |
| 1564 | - if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 1565 | - } | |
| 3876 | + ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a | |
| 3877 | + // property, it may be the creator of the child that's responsible for | |
| 3878 | + // assigning it a key. | |
| 1566 | 3879 | |
| 1567 | -//#endregion | |
| 1568 | -//#region node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js | |
| 1569 | - function _nonIterableSpread() { | |
| 1570 | - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1571 | - } | |
| 3880 | + var childOwner = ''; | |
| 1572 | 3881 | |
| 1573 | -//#endregion | |
| 1574 | -//#region node_modules/@babel/runtime/helpers/esm/toConsumableArray.js | |
| 1575 | - function _toConsumableArray(r) { | |
| 1576 | - return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); | |
| 1577 | - } | |
| 3882 | + if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) { | |
| 3883 | + // Give the component that originally created this child. | |
| 3884 | + childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + "."; | |
| 3885 | + } | |
| 1578 | 3886 | |
| 1579 | -//#endregion | |
| 1580 | -//#region modules/checklist/assets/js/app/components/progress.js | |
| 1581 | - var Progress = function Progress(_ref) { | |
| 1582 | - var steps = _ref.steps; | |
| 1583 | - var progress = steps.filter(isStepChecked).length * 100 / steps.length; | |
| 1584 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 1585 | - display: "flex", | |
| 1586 | - alignItems: "center", | |
| 1587 | - gap: 1 | |
| 1588 | - } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { width: "100%" } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.LinearProgress, { | |
| 1589 | - variant: "determinate", | |
| 1590 | - value: progress | |
| 1591 | - })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { width: "fit-content" } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 1592 | - variant: "body2", | |
| 1593 | - color: "text.secondary" | |
| 1594 | - }, "".concat(Math.round(progress), "%")))); | |
| 1595 | - }; | |
| 1596 | - Progress.propTypes = { steps: import_prop_types.default.array.isRequired }; | |
| 3887 | + setCurrentlyValidatingElement$1(element); | |
| 1597 | 3888 | |
| 1598 | -//#endregion | |
| 1599 | -//#region modules/checklist/assets/js/app/components/header.js | |
| 1600 | - var CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME = USER_PROGRESS.CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME; | |
| 1601 | - var CHECKLIST_HEADER_CLOSE = MIXPANEL_CHECKLIST_STEPS.CHECKLIST_HEADER_CLOSE; | |
| 1602 | - var Header = function Header(_ref) { | |
| 1603 | - var steps = _ref.steps; | |
| 1604 | - var isMinimized = _ref.isMinimized; | |
| 1605 | - var toggleIsMinimized = _ref.toggleIsMinimized; | |
| 1606 | - var userProgress = (0, _elementor_query.useQuery)({ | |
| 1607 | - queryKey: ["closedForFirstTime"], | |
| 1608 | - queryFn: fetchUserProgress | |
| 1609 | - }).data; | |
| 1610 | - var closedForFirstTime = (userProgress === null || userProgress === void 0 ? void 0 : userProgress[CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME]) || false; | |
| 1611 | - var closeChecklist = /*#__PURE__*/ function() { | |
| 1612 | - var _ref2 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1613 | - return import_regenerator.default.wrap(function(_context) { | |
| 1614 | - while (1) switch (_context.prev = _context.next) { | |
| 1615 | - case 0: | |
| 1616 | - addMixpanelTrackingChecklistHeader(CHECKLIST_HEADER_CLOSE); | |
| 1617 | - if (closedForFirstTime) { | |
| 1618 | - _context.next = 2; | |
| 1619 | - break; | |
| 1620 | - } | |
| 1621 | - _context.next = 1; | |
| 1622 | - return updateUserProgress(_defineProperty({}, CHECKLIST_CLOSED_IN_THE_EDITOR_FOR_FIRST_TIME, true)); | |
| 1623 | - case 1: window.dispatchEvent(new CustomEvent("elementor/checklist/first_close", { detail: { message: "firstClose" } })); | |
| 1624 | - case 2: toggleChecklistPopup(); | |
| 1625 | - case 3: | |
| 1626 | - case "end": return _context.stop(); | |
| 1627 | - } | |
| 1628 | - }, _callee); | |
| 1629 | - })); | |
| 1630 | - return function closeChecklist() { | |
| 1631 | - return _ref2.apply(this, arguments); | |
| 1632 | - }; | |
| 1633 | - }(); | |
| 1634 | - return /*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(_elementor_ui.AppBar, { | |
| 1635 | - elevation: 0, | |
| 1636 | - position: "sticky", | |
| 1637 | - sx: { | |
| 1638 | - p: 2, | |
| 1639 | - backgroundColor: "background.default" | |
| 1640 | - } | |
| 1641 | - }, /*#__PURE__*/ react.createElement(_elementor_ui.Toolbar, { | |
| 1642 | - variant: "dense", | |
| 1643 | - disableGutters: true | |
| 1644 | - }, /*#__PURE__*/ react.createElement(_elementor_ui.Typography, { | |
| 1645 | - variant: "subtitle1", | |
| 1646 | - sx: { flexGrow: 1 } | |
| 1647 | - }, (0, _wordpress_i18n.__)("Let's make a productivity boost", "elementor")), /*#__PURE__*/ react.createElement(_elementor_ui.IconButton, { | |
| 1648 | - size: "small", | |
| 1649 | - onClick: toggleIsMinimized, | |
| 1650 | - "aria-expanded": !isMinimized | |
| 1651 | - }, isMinimized ? /*#__PURE__*/ react.createElement(_elementor_icons.ExpandDiagonalIcon, null) : /*#__PURE__*/ react.createElement(_elementor_icons.MinimizeDiagonalIcon, null)), /*#__PURE__*/ react.createElement(_elementor_ui.CloseButton, { | |
| 1652 | - sx: { mr: -.5 }, | |
| 1653 | - size: "small", | |
| 1654 | - onClick: closeChecklist | |
| 1655 | - })), /*#__PURE__*/ react.createElement(Progress, { steps })), /*#__PURE__*/ react.createElement(_elementor_ui.Divider, null)); | |
| 1656 | - }; | |
| 1657 | - Header.propTypes = { | |
| 1658 | - steps: import_prop_types.default.array.isRequired, | |
| 1659 | - isMinimized: import_prop_types.default.bool.isRequired, | |
| 1660 | - toggleIsMinimized: import_prop_types.default.func.isRequired | |
| 1661 | - }; | |
| 3889 | + error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner); | |
| 1662 | 3890 | |
| 1663 | -//#endregion | |
| 1664 | -//#region modules/checklist/assets/js/app/components/checklist-card-content.js | |
| 1665 | - var IS_MARKED_COMPLETED = STEP.IS_MARKED_COMPLETED; | |
| 1666 | - var IS_ABSOLUTE_COMPLETED = STEP.IS_ABSOLUTE_COMPLETED; | |
| 1667 | - var IS_IMMUTABLE_COMPLETED = STEP.IS_IMMUTABLE_COMPLETED; | |
| 1668 | - var DONE = MIXPANEL_CHECKLIST_STEPS.DONE; | |
| 1669 | - var UNDONE = MIXPANEL_CHECKLIST_STEPS.UNDONE; | |
| 1670 | - var ACTION$1 = MIXPANEL_CHECKLIST_STEPS.ACTION; | |
| 1671 | - var UPGRADE = MIXPANEL_CHECKLIST_STEPS.UPGRADE; | |
| 1672 | - var ChecklistCardContent = function ChecklistCardContent(_ref) { | |
| 1673 | - var step = _ref.step; | |
| 1674 | - var setSteps = _ref.setSteps; | |
| 1675 | - var _step$config = step.config; | |
| 1676 | - var id = _step$config.id; | |
| 1677 | - var description = _step$config.description; | |
| 1678 | - var learnMoreUrl = _step$config.learn_more_url; | |
| 1679 | - var learnMoreText = _step$config.learn_more_text; | |
| 1680 | - var imageSrc = _step$config.image_src; | |
| 1681 | - var promotionData = _step$config.promotion_data; | |
| 1682 | - var ctaText = promotionData ? (promotionData === null || promotionData === void 0 ? void 0 : promotionData.text) || (0, _wordpress_i18n.__)("Upgrade Now", "elementor") : step.config.cta_text; | |
| 1683 | - var ctaUrl = promotionData ? promotionData.url : step.config.cta_url; | |
| 1684 | - var isAbsoluteCompleted = step[IS_ABSOLUTE_COMPLETED]; | |
| 1685 | - var isImmutableCompleted = step[IS_IMMUTABLE_COMPLETED]; | |
| 1686 | - var isMarkedCompleted = step[IS_MARKED_COMPLETED]; | |
| 1687 | - var shouldShowMarkAsDone = !isAbsoluteCompleted && !isImmutableCompleted && !promotionData; | |
| 1688 | - var redirectHandler = /*#__PURE__*/ function() { | |
| 1689 | - var _ref2 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 1690 | - return import_regenerator.default.wrap(function(_context) { | |
| 1691 | - while (1) switch (_context.prev = _context.next) { | |
| 1692 | - case 0: | |
| 1693 | - if (promotionData) addMixpanelTrackingChecklistSteps(step.config.id, UPGRADE); | |
| 1694 | - else addMixpanelTrackingChecklistSteps(step.config.id, ACTION$1); | |
| 1695 | - if (!(!elementor || !STEP_IDS_TO_COMPLETE_IN_EDITOR.includes(id) || !PANEL_ROUTES[id])) { | |
| 1696 | - _context.next = 1; | |
| 1697 | - break; | |
| 1698 | - } | |
| 1699 | - return _context.abrupt("return", window.open(ctaUrl, "_blank")); | |
| 1700 | - case 1: | |
| 1701 | - _context.next = 2; | |
| 1702 | - return $e.run("panel/global/open"); | |
| 1703 | - case 2: $e.route(PANEL_ROUTES[id]); | |
| 1704 | - case 3: | |
| 1705 | - case "end": return _context.stop(); | |
| 1706 | - } | |
| 1707 | - }, _callee); | |
| 1708 | - })); | |
| 1709 | - return function redirectHandler() { | |
| 1710 | - return _ref2.apply(this, arguments); | |
| 1711 | - }; | |
| 1712 | - }(); | |
| 1713 | - var toggleMarkAsDone = /*#__PURE__*/ function() { | |
| 1714 | - var _ref3 = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee2() { | |
| 1715 | - var currState; | |
| 1716 | - return import_regenerator.default.wrap(function(_context2) { | |
| 1717 | - while (1) switch (_context2.prev = _context2.next) { | |
| 1718 | - case 0: | |
| 1719 | - currState = isMarkedCompleted; | |
| 1720 | - if (isMarkedCompleted) addMixpanelTrackingChecklistSteps(step.config.id, UNDONE); | |
| 1721 | - else addMixpanelTrackingChecklistSteps(step.config.id, DONE); | |
| 1722 | - _context2.prev = 1; | |
| 1723 | - updateStepsState(IS_MARKED_COMPLETED, !currState); | |
| 1724 | - _context2.next = 2; | |
| 1725 | - return updateStep(id, _defineProperty({}, IS_MARKED_COMPLETED, !currState)); | |
| 1726 | - case 2: | |
| 1727 | - _context2.next = 4; | |
| 1728 | - break; | |
| 1729 | - case 3: | |
| 1730 | - _context2.prev = 3; | |
| 1731 | - _context2["catch"](1); | |
| 1732 | - updateStepsState(IS_MARKED_COMPLETED, currState); | |
| 1733 | - case 4: | |
| 1734 | - case "end": return _context2.stop(); | |
| 1735 | - } | |
| 1736 | - }, _callee2, null, [[1, 3]]); | |
| 1737 | - })); | |
| 1738 | - return function toggleMarkAsDone() { | |
| 1739 | - return _ref3.apply(this, arguments); | |
| 1740 | - }; | |
| 1741 | - }(); | |
| 1742 | - var updateStepsState = function updateStepsState(key, value) { | |
| 1743 | - setSteps(function(steps) { | |
| 1744 | - return steps.map(function(iteratedStep) { | |
| 1745 | - return getAndUpdateStep(step.config.id, iteratedStep, key, value); | |
| 1746 | - }); | |
| 1747 | - }); | |
| 1748 | - }; | |
| 1749 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Card, { | |
| 1750 | - elevation: 0, | |
| 1751 | - square: true, | |
| 1752 | - "data-step-id": id | |
| 1753 | - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.CardMedia, { | |
| 1754 | - image: imageSrc, | |
| 1755 | - sx: { height: 180 } | |
| 1756 | - }), /*#__PURE__*/ react.default.createElement(_elementor_ui.CardContent, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 1757 | - variant: "body2", | |
| 1758 | - color: "text.secondary", | |
| 1759 | - component: "p" | |
| 1760 | - }, description + " ", /*#__PURE__*/ react.default.createElement(_elementor_ui.Link, { | |
| 1761 | - href: learnMoreUrl, | |
| 1762 | - target: "_blank", | |
| 1763 | - rel: "noreferrer", | |
| 1764 | - underline: "hover", | |
| 1765 | - color: "info.main", | |
| 1766 | - noWrap: true | |
| 1767 | - }, learnMoreText))), /*#__PURE__*/ react.default.createElement(_elementor_ui.CardActions, null, shouldShowMarkAsDone ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1768 | - size: "small", | |
| 1769 | - color: "secondary", | |
| 1770 | - variant: "text", | |
| 1771 | - onClick: toggleMarkAsDone | |
| 1772 | - }, isMarkedCompleted ? (0, _wordpress_i18n.__)("Unmark as done", "elementor") : (0, _wordpress_i18n.__)("Mark as done", "elementor")) : null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 1773 | - color: promotionData ? "promotion" : "primary", | |
| 1774 | - size: "small", | |
| 1775 | - variant: "contained", | |
| 1776 | - onClick: redirectHandler | |
| 1777 | - }, ctaText))); | |
| 1778 | - }; | |
| 1779 | - ChecklistCardContent.propTypes = { | |
| 1780 | - step: import_prop_types.default.object.isRequired, | |
| 1781 | - setSteps: import_prop_types.default.func.isRequired | |
| 1782 | - }; | |
| 3891 | + setCurrentlyValidatingElement$1(null); | |
| 3892 | + } | |
| 3893 | +} | |
| 3894 | +/** | |
| 3895 | + * Ensure that every element either is passed in a static location, in an | |
| 3896 | + * array with an explicit keys property defined, or in an object literal | |
| 3897 | + * with valid key property. | |
| 3898 | + * | |
| 3899 | + * @internal | |
| 3900 | + * @param {ReactNode} node Statically passed child of any type. | |
| 3901 | + * @param {*} parentType node's parent's type. | |
| 3902 | + */ | |
| 1783 | 3903 | |
| 1784 | -//#endregion | |
| 1785 | -//#region modules/checklist/assets/js/app/components/checklist-item.js | |
| 1786 | - function ownKeys$1(e, r) { | |
| 1787 | - var t = Object.keys(e); | |
| 1788 | - if (Object.getOwnPropertySymbols) { | |
| 1789 | - var o = Object.getOwnPropertySymbols(e); | |
| 1790 | - r && (o = o.filter(function(r) { | |
| 1791 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 1792 | - })), t.push.apply(t, o); | |
| 1793 | - } | |
| 1794 | - return t; | |
| 1795 | - } | |
| 1796 | - __name(ownKeys$1, "ownKeys"); | |
| 1797 | - function _objectSpread$1(e) { | |
| 1798 | - for (var r = 1; r < arguments.length; r++) { | |
| 1799 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 1800 | - r % 2 ? ownKeys$1(Object(t), !0).forEach(function(r) { | |
| 1801 | - _defineProperty(e, r, t[r]); | |
| 1802 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function(r) { | |
| 1803 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 1804 | - }); | |
| 1805 | - } | |
| 1806 | - return e; | |
| 1807 | - } | |
| 1808 | - __name(_objectSpread$1, "_objectSpread"); | |
| 1809 | - var PROMOTION_DATA = STEP.PROMOTION_DATA; | |
| 1810 | - var TITLE = MIXPANEL_CHECKLIST_STEPS.TITLE; | |
| 1811 | - var ACCORDION_SECTION = MIXPANEL_CHECKLIST_STEPS.ACCORDION_SECTION; | |
| 1812 | - function CheckListItem(props) { | |
| 1813 | - var expandedIndex = props.expandedIndex; | |
| 1814 | - var setExpandedIndex = props.setExpandedIndex; | |
| 1815 | - var setSteps = props.setSteps; | |
| 1816 | - var index = props.index; | |
| 1817 | - var step = props.step; | |
| 1818 | - var chevronStyle = index === expandedIndex ? { transform: "rotate(180deg)" } : {}; | |
| 1819 | - var isChecked = isStepChecked(step); | |
| 1820 | - var promotionData = step.config[PROMOTION_DATA]; | |
| 1821 | - return /*#__PURE__*/ react.default.createElement(react.default.Fragment, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemButton, { | |
| 1822 | - onClick: function handleExpandClick() { | |
| 1823 | - addMixpanelTrackingChecklistSteps(step.config.id, TITLE, ACCORDION_SECTION); | |
| 1824 | - setExpandedIndex(index === expandedIndex ? -1 : index); | |
| 1825 | - }, | |
| 1826 | - "data-step-id": step.config.id, | |
| 1827 | - dense: true | |
| 1828 | - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemIcon, null, /*#__PURE__*/ react.default.createElement(_elementor_ui.Checkbox, { | |
| 1829 | - "data-is-checked": isChecked, | |
| 1830 | - icon: /*#__PURE__*/ react.default.createElement(_elementor_icons.RadioButtonUncheckedIcon, null), | |
| 1831 | - checkedIcon: /*#__PURE__*/ react.default.createElement(_elementor_icons.CircleCheckFilledIcon, { color: "primary" }), | |
| 1832 | - edge: "start", | |
| 1833 | - checked: isChecked, | |
| 1834 | - tabIndex: -1, | |
| 1835 | - inputProps: { "aria-labelledby": step.config.title } | |
| 1836 | - })), /*#__PURE__*/ react.default.createElement(_elementor_ui.ListItemText, { | |
| 1837 | - primary: step.config.title, | |
| 1838 | - primaryTypographyProps: { variant: "body2" } | |
| 1839 | - }), promotionData ? function getUpgradeIcon() { | |
| 1840 | - return "default" === (promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon) ? /*#__PURE__*/ react.default.createElement(_elementor_icons.UpgradeIcon, { | |
| 1841 | - color: "promotion", | |
| 1842 | - sx: { mr: 1 } | |
| 1843 | - }) : /*#__PURE__*/ react.default.createElement(_elementor_ui.SvgIcon, { | |
| 1844 | - color: "promotion", | |
| 1845 | - sx: { mr: 1 } | |
| 1846 | - }, /*#__PURE__*/ react.default.createElement("img", { | |
| 1847 | - src: promotionData === null || promotionData === void 0 ? void 0 : promotionData.icon, | |
| 1848 | - alt: promotionData.iconAlt || "" | |
| 1849 | - })); | |
| 1850 | - }() : null, /*#__PURE__*/ react.default.createElement(_elementor_icons.ChevronDownIcon, { sx: _objectSpread$1(_objectSpread$1({}, chevronStyle), {}, { transition: "300ms" }) })), /*#__PURE__*/ react.default.createElement(_elementor_ui.Collapse, { in: index === expandedIndex }, /*#__PURE__*/ react.default.createElement(ChecklistCardContent, { | |
| 1851 | - step, | |
| 1852 | - setSteps | |
| 1853 | - }))); | |
| 1854 | - } | |
| 1855 | - CheckListItem.propTypes = { | |
| 1856 | - step: import_prop_types.default.object.isRequired, | |
| 1857 | - expandedIndex: import_prop_types.default.number, | |
| 1858 | - setExpandedIndex: import_prop_types.default.func.isRequired, | |
| 1859 | - setSteps: import_prop_types.default.func.isRequired, | |
| 1860 | - index: import_prop_types.default.number.isRequired | |
| 1861 | - }; | |
| 1862 | 3904 | |
| 1863 | -//#endregion | |
| 1864 | -//#region app/assets/js/hooks/use-ajax.js | |
| 1865 | - function ownKeys(e, r) { | |
| 1866 | - var t = Object.keys(e); | |
| 1867 | - if (Object.getOwnPropertySymbols) { | |
| 1868 | - var o = Object.getOwnPropertySymbols(e); | |
| 1869 | - r && (o = o.filter(function(r) { | |
| 1870 | - return Object.getOwnPropertyDescriptor(e, r).enumerable; | |
| 1871 | - })), t.push.apply(t, o); | |
| 1872 | - } | |
| 1873 | - return t; | |
| 1874 | - } | |
| 1875 | - function _objectSpread(e) { | |
| 1876 | - for (var r = 1; r < arguments.length; r++) { | |
| 1877 | - var t = null != arguments[r] ? arguments[r] : {}; | |
| 1878 | - r % 2 ? ownKeys(Object(t), !0).forEach(function(r) { | |
| 1879 | - _defineProperty(e, r, t[r]); | |
| 1880 | - }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) { | |
| 1881 | - Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); | |
| 1882 | - }); | |
| 1883 | - } | |
| 1884 | - return e; | |
| 1885 | - } | |
| 1886 | - function useAjax() { | |
| 1887 | - var _useState2 = _slicedToArray((0, react.useState)(null), 2); | |
| 1888 | - var ajax = _useState2[0]; | |
| 1889 | - var setAjax = _useState2[1]; | |
| 1890 | - var initialStatusKey = "initial"; | |
| 1891 | - var _useState4 = _slicedToArray((0, react.useState)({ | |
| 1892 | - status: initialStatusKey, | |
| 1893 | - isComplete: false, | |
| 1894 | - response: null | |
| 1895 | - }), 2); | |
| 1896 | - var ajaxState = _useState4[0]; | |
| 1897 | - var setAjaxState = _useState4[1]; | |
| 1898 | - var ajaxActions = { reset: function reset() { | |
| 1899 | - return setAjaxState(initialStatusKey); | |
| 1900 | - } }; | |
| 1901 | - var runRequest = /*#__PURE__*/ function() { | |
| 1902 | - var _ref = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee(config) { | |
| 1903 | - return import_regenerator.default.wrap(function(_context) { | |
| 1904 | - while (1) switch (_context.prev = _context.next) { | |
| 1905 | - case 0: return _context.abrupt("return", new Promise(function(resolve, reject) { | |
| 1906 | - var formData = new FormData(); | |
| 1907 | - if (config.data) { | |
| 1908 | - for (var key in config.data) formData.append(key, config.data[key]); | |
| 1909 | - if (!config.data.nonce) formData.append("_nonce", elementorCommon.config.ajax.nonce); | |
| 1910 | - } | |
| 1911 | - var options = _objectSpread(_objectSpread({ | |
| 1912 | - type: "post", | |
| 1913 | - url: elementorCommon.config.ajax.url, | |
| 1914 | - headers: {}, | |
| 1915 | - cache: false, | |
| 1916 | - contentType: false, | |
| 1917 | - processData: false | |
| 1918 | - }, config), {}, { | |
| 1919 | - data: formData, | |
| 1920 | - success: function success(response) { | |
| 1921 | - resolve(response); | |
| 1922 | - }, | |
| 1923 | - error: function error(_error) { | |
| 1924 | - reject(_error); | |
| 1925 | - } | |
| 1926 | - }); | |
| 1927 | - jQuery.ajax(options); | |
| 1928 | - })); | |
| 1929 | - case 1: | |
| 1930 | - case "end": return _context.stop(); | |
| 1931 | - } | |
| 1932 | - }, _callee); | |
| 1933 | - })); | |
| 1934 | - return function runRequest(_x) { | |
| 1935 | - return _ref.apply(this, arguments); | |
| 1936 | - }; | |
| 1937 | - }(); | |
| 1938 | - (0, react.useEffect)(function() { | |
| 1939 | - if (ajax) runRequest(ajax).then(function(response) { | |
| 1940 | - var status = response.success ? "success" : "error"; | |
| 1941 | - setAjaxState(function(prevState) { | |
| 1942 | - return _objectSpread(_objectSpread({}, prevState), {}, { | |
| 1943 | - status, | |
| 1944 | - response: response === null || response === void 0 ? void 0 : response.data | |
| 1945 | - }); | |
| 1946 | - }); | |
| 1947 | - }).catch(function(error) { | |
| 1948 | - var _error$responseJSON; | |
| 1949 | - var response = 408 === error.status ? "timeout" : (_error$responseJSON = error.responseJSON) === null || _error$responseJSON === void 0 ? void 0 : _error$responseJSON.data; | |
| 1950 | - setAjaxState(function(prevState) { | |
| 1951 | - return _objectSpread(_objectSpread({}, prevState), {}, { | |
| 1952 | - status: "error", | |
| 1953 | - response | |
| 1954 | - }); | |
| 1955 | - }); | |
| 1956 | - }).finally(function() { | |
| 1957 | - setAjaxState(function(prevState) { | |
| 1958 | - return _objectSpread(_objectSpread({}, prevState), {}, { isComplete: true }); | |
| 1959 | - }); | |
| 1960 | - }); | |
| 1961 | - }, [ajax]); | |
| 1962 | - return { | |
| 1963 | - ajax, | |
| 1964 | - setAjax, | |
| 1965 | - ajaxState, | |
| 1966 | - ajaxActions, | |
| 1967 | - runRequest | |
| 1968 | - }; | |
| 1969 | - } | |
| 3905 | +function validateChildKeys(node, parentType) { | |
| 3906 | + { | |
| 3907 | + if (typeof node !== 'object') { | |
| 3908 | + return; | |
| 3909 | + } | |
| 1970 | 3910 | |
| 1971 | -//#endregion | |
| 1972 | -//#region modules/checklist/assets/js/app/components/success-message.js | |
| 1973 | - var ACTION = MIXPANEL_CHECKLIST_STEPS.ACTION; | |
| 1974 | - var WELL_DONE = MIXPANEL_CHECKLIST_STEPS.WELL_DONE; | |
| 1975 | - var SuccessMessage = function SuccessMessage() { | |
| 1976 | - var _useAjax = useAjax(); | |
| 1977 | - var ajaxState = _useAjax.ajaxState; | |
| 1978 | - var setAjax = _useAjax.setAjax; | |
| 1979 | - var hideChecklist = function hideChecklist() { | |
| 1980 | - addMixpanelTrackingChecklistSteps(WELL_DONE, ACTION); | |
| 1981 | - setAjax({ data: { | |
| 1982 | - action: "elementor_ajax", | |
| 1983 | - actions: JSON.stringify({ save_editorPreferences_settings: { | |
| 1984 | - action: "save_editorPreferences_settings", | |
| 1985 | - data: { data: { show_launchpad_checklist: "" } } | |
| 1986 | - } }) | |
| 1987 | - } }); | |
| 1988 | - }; | |
| 1989 | - (0, react.useEffect)(function() { | |
| 1990 | - switch (ajaxState.status) { | |
| 1991 | - case "success": | |
| 1992 | - setTimeout(function() { | |
| 1993 | - $e.commands.run("checklist/toggle-icon", false); | |
| 1994 | - }, 0); | |
| 1995 | - break; | |
| 1996 | - case "error": break; | |
| 1997 | - } | |
| 1998 | - }, [ajaxState]); | |
| 1999 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Card, { | |
| 2000 | - elevation: 0, | |
| 2001 | - square: true, | |
| 2002 | - className: "e-checklist-done" | |
| 2003 | - }, /*#__PURE__*/ react.default.createElement(_elementor_ui.CardMedia, { | |
| 2004 | - image: "https://assets.elementor.com/checklist/v1/images/checklist-step-7.jpg", | |
| 2005 | - sx: { height: 180 } | |
| 2006 | - }), /*#__PURE__*/ react.default.createElement(_elementor_ui.CardContent, { sx: { textAlign: "center" } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2007 | - variant: "h6", | |
| 2008 | - color: "text.primary" | |
| 2009 | - }, (0, _wordpress_i18n.__)("You're on your way!", "elementor")), /*#__PURE__*/ react.default.createElement(_elementor_ui.Typography, { | |
| 2010 | - variant: "body2", | |
| 2011 | - color: "text.secondary", | |
| 2012 | - component: "p" | |
| 2013 | - }, (0, _wordpress_i18n.__)("With these steps, you've got a great base for a robust website. Enjoy your web creation journey!", "elementor"))), /*#__PURE__*/ react.default.createElement(_elementor_ui.CardActions, { sx: { justifyContent: "center" } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.Button, { | |
| 2014 | - color: "primary", | |
| 2015 | - size: "small", | |
| 2016 | - variant: "contained", | |
| 2017 | - onClick: hideChecklist | |
| 2018 | - }, (0, _wordpress_i18n.__)("Got it", "elementor")))); | |
| 2019 | - }; | |
| 3911 | + if (isArray(node)) { | |
| 3912 | + for (var i = 0; i < node.length; i++) { | |
| 3913 | + var child = node[i]; | |
| 2020 | 3914 | |
| 2021 | -//#endregion | |
| 2022 | -//#region modules/checklist/assets/js/app/components/checklist-wrapper.js | |
| 2023 | - var ChecklistWrapper = function ChecklistWrapper(_ref) { | |
| 2024 | - var steps = _ref.steps; | |
| 2025 | - var setSteps = _ref.setSteps; | |
| 2026 | - var isMinimized = _ref.isMinimized; | |
| 2027 | - var _useState2 = _slicedToArray((0, react.useState)(-1), 2); | |
| 2028 | - var expandedIndex = _useState2[0]; | |
| 2029 | - var setExpandedIndex = _useState2[1]; | |
| 2030 | - var isChecklistCompleted = steps.filter(isStepChecked).length === steps.length; | |
| 2031 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Box, { sx: { | |
| 2032 | - transition: "400ms", | |
| 2033 | - maxHeight: isMinimized ? 0 : "645px" | |
| 2034 | - } }, /*#__PURE__*/ react.default.createElement(_elementor_ui.List, { | |
| 2035 | - component: "div", | |
| 2036 | - sx: { py: 0 } | |
| 2037 | - }, steps.map(function(step, index) { | |
| 2038 | - return /*#__PURE__*/ react.default.createElement(react.Fragment, { key: index }, index ? /*#__PURE__*/ react.default.createElement(_elementor_ui.Divider, null) : null, /*#__PURE__*/ react.default.createElement(CheckListItem, { | |
| 2039 | - step, | |
| 2040 | - setSteps, | |
| 2041 | - setExpandedIndex, | |
| 2042 | - expandedIndex, | |
| 2043 | - index | |
| 2044 | - })); | |
| 2045 | - })), isChecklistCompleted ? /*#__PURE__*/ react.default.createElement(SuccessMessage, null) : null); | |
| 2046 | - }; | |
| 2047 | - ChecklistWrapper.propTypes = { | |
| 2048 | - steps: import_prop_types.default.array.isRequired, | |
| 2049 | - setSteps: import_prop_types.default.func.isRequired, | |
| 2050 | - isMinimized: import_prop_types.default.bool.isRequired | |
| 2051 | - }; | |
| 3915 | + if (isValidElement(child)) { | |
| 3916 | + validateExplicitKey(child, parentType); | |
| 3917 | + } | |
| 3918 | + } | |
| 3919 | + } else if (isValidElement(node)) { | |
| 3920 | + // This element was passed in a valid location. | |
| 3921 | + if (node._store) { | |
| 3922 | + node._store.validated = true; | |
| 3923 | + } | |
| 3924 | + } else if (node) { | |
| 3925 | + var iteratorFn = getIteratorFn(node); | |
| 2052 | 3926 | |
| 2053 | -//#endregion | |
| 2054 | -//#region modules/checklist/assets/js/app/components/checklist.js | |
| 2055 | - var IS_POPUP_MINIMIZED = USER_PROGRESS.IS_POPUP_MINIMIZED; | |
| 2056 | - var Checklist = function Checklist(props) { | |
| 2057 | - var _useState2 = _slicedToArray((0, react.useState)(props.steps), 2); | |
| 2058 | - var steps = _useState2[0]; | |
| 2059 | - var setSteps = _useState2[1]; | |
| 2060 | - var _useState4 = _slicedToArray((0, react.useState)(!!props.userProgress[IS_POPUP_MINIMIZED]), 2); | |
| 2061 | - var isMinimized = _useState4[0]; | |
| 2062 | - var setIsMinimized = _useState4[1]; | |
| 2063 | - var toggleIsMinimized = /*#__PURE__*/ function() { | |
| 2064 | - var _ref = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 2065 | - var currState; | |
| 2066 | - return import_regenerator.default.wrap(function(_context) { | |
| 2067 | - while (1) switch (_context.prev = _context.next) { | |
| 2068 | - case 0: | |
| 2069 | - currState = isMinimized; | |
| 2070 | - _context.prev = 1; | |
| 2071 | - setIsMinimized(!currState); | |
| 2072 | - _context.next = 2; | |
| 2073 | - return updateUserProgress(_defineProperty({}, IS_POPUP_MINIMIZED, !currState)); | |
| 2074 | - case 2: | |
| 2075 | - _context.next = 4; | |
| 2076 | - break; | |
| 2077 | - case 3: | |
| 2078 | - _context.prev = 3; | |
| 2079 | - _context["catch"](1); | |
| 2080 | - setIsMinimized(currState); | |
| 2081 | - case 4: | |
| 2082 | - case "end": return _context.stop(); | |
| 2083 | - } | |
| 2084 | - }, _callee, null, [[1, 3]]); | |
| 2085 | - })); | |
| 2086 | - return function toggleIsMinimized() { | |
| 2087 | - return _ref.apply(this, arguments); | |
| 2088 | - }; | |
| 2089 | - }(); | |
| 2090 | - (0, react.useEffect)(function() { | |
| 2091 | - setSteps(props.steps); | |
| 2092 | - }, [props.steps]); | |
| 2093 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.Paper, { | |
| 2094 | - elevation: 5, | |
| 2095 | - sx: { | |
| 2096 | - position: "fixed", | |
| 2097 | - width: "360px", | |
| 2098 | - bottom: "40px", | |
| 2099 | - insetInlineEnd: "40px", | |
| 2100 | - zIndex: "99999", | |
| 2101 | - hidden: true, | |
| 2102 | - maxHeight: "645px", | |
| 2103 | - overflowY: "auto" | |
| 2104 | - } | |
| 2105 | - }, /*#__PURE__*/ react.default.createElement(Header, { | |
| 2106 | - steps, | |
| 2107 | - isMinimized, | |
| 2108 | - toggleIsMinimized | |
| 2109 | - }), /*#__PURE__*/ react.default.createElement(ChecklistWrapper, { | |
| 2110 | - steps, | |
| 2111 | - setSteps, | |
| 2112 | - isMinimized | |
| 2113 | - })); | |
| 2114 | - }; | |
| 2115 | - Checklist.propTypes = { | |
| 2116 | - steps: import_prop_types.default.array.isRequired, | |
| 2117 | - userProgress: import_prop_types.default.object.isRequired | |
| 2118 | - }; | |
| 3927 | + if (typeof iteratorFn === 'function') { | |
| 3928 | + // Entry iterators used to provide implicit keys, | |
| 3929 | + // but now we print a separate warning for them later. | |
| 3930 | + if (iteratorFn !== node.entries) { | |
| 3931 | + var iterator = iteratorFn.call(node); | |
| 3932 | + var step; | |
| 2119 | 3933 | |
| 2120 | -//#endregion | |
| 2121 | -//#region modules/checklist/assets/js/app/app.js | |
| 2122 | - var App = function App() { | |
| 2123 | - var isRTL = elementorCommon.config.isRTL; | |
| 2124 | - var _useQuery = (0, _elementor_query.useQuery)({ | |
| 2125 | - queryKey: ["steps"], | |
| 2126 | - queryFn: fetchSteps, | |
| 2127 | - gcTime: 0, | |
| 2128 | - enabled: false | |
| 2129 | - }); | |
| 2130 | - var stepsError = _useQuery.error; | |
| 2131 | - var steps = _useQuery.data; | |
| 2132 | - var refetchSteps = _useQuery.refetch; | |
| 2133 | - var _useQuery2 = (0, _elementor_query.useQuery)({ | |
| 2134 | - queryKey: ["statusData"], | |
| 2135 | - queryFn: fetchUserProgress, | |
| 2136 | - gcTime: 0, | |
| 2137 | - enabled: false | |
| 2138 | - }); | |
| 2139 | - var userProgressError = _useQuery2.error; | |
| 2140 | - var userProgress = _useQuery2.data; | |
| 2141 | - var refetchUserProgress = _useQuery2.refetch; | |
| 2142 | - var fetchData = function fetchData() { | |
| 2143 | - refetchSteps(); | |
| 2144 | - refetchUserProgress(); | |
| 2145 | - }; | |
| 2146 | - (0, react.useEffect)(function() { | |
| 2147 | - fetchData(); | |
| 2148 | - return (0, _elementor_editor_v1_adapters.__privateListenTo)((0, _elementor_editor_v1_adapters.commandEndEvent)("document/save/save"), function(_ref) { | |
| 2149 | - var _args$document; | |
| 2150 | - var args = _ref.args; | |
| 2151 | - if ("kit" === (args === null || args === void 0 || (_args$document = args.document) === null || _args$document === void 0 || (_args$document = _args$document.config) === null || _args$document === void 0 ? void 0 : _args$document.type)) fetchData(); | |
| 2152 | - }); | |
| 2153 | - }, []); | |
| 2154 | - if (userProgressError || !userProgress || stepsError || !(steps !== null && steps !== void 0 && steps.length)) return null; | |
| 2155 | - return /*#__PURE__*/ react.default.createElement(_elementor_ui.DirectionProvider, { rtl: isRTL }, /*#__PURE__*/ react.default.createElement(_elementor_ui.ThemeProvider, { colorScheme: "light" }, /*#__PURE__*/ react.default.createElement(Checklist, { | |
| 2156 | - steps: _toConsumableArray(steps), | |
| 2157 | - userProgress | |
| 2158 | - }))); | |
| 2159 | - }; | |
| 3934 | + while (!(step = iterator.next()).done) { | |
| 3935 | + if (isValidElement(step.value)) { | |
| 3936 | + validateExplicitKey(step.value, parentType); | |
| 3937 | + } | |
| 3938 | + } | |
| 3939 | + } | |
| 3940 | + } | |
| 3941 | + } | |
| 3942 | + } | |
| 3943 | +} | |
| 3944 | +/** | |
| 3945 | + * Given an element, validate that its props follow the propTypes definition, | |
| 3946 | + * provided by the type. | |
| 3947 | + * | |
| 3948 | + * @param {ReactElement} element | |
| 3949 | + */ | |
| 2160 | 3950 | |
| 2161 | -//#endregion | |
| 2162 | -//#region node_modules/react-dom/client.js | |
| 2163 | - var require_client = /* @__PURE__ */ __commonJSMin(((exports) => { | |
| 2164 | - var m = (globalThis.ReactDOM); | |
| 2165 | - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2166 | - exports.createRoot = function(c, o) { | |
| 2167 | - i.usingClientEntryPoint = true; | |
| 2168 | - try { | |
| 2169 | - return m.createRoot(c, o); | |
| 2170 | - } finally { | |
| 2171 | - i.usingClientEntryPoint = false; | |
| 2172 | - } | |
| 2173 | - }; | |
| 2174 | - })); | |
| 2175 | 3951 | |
| 2176 | -//#endregion | |
| 2177 | -//#region modules/checklist/assets/js/commands/toggle-popup.js | |
| 2178 | - var import_client = /* @__PURE__ */ __toESM(require_client()); | |
| 2179 | - function _callSuper$4(t, o, e) { | |
| 2180 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$4() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2181 | - } | |
| 2182 | - __name(_callSuper$4, "_callSuper"); | |
| 2183 | - function _isNativeReflectConstruct$4() { | |
| 2184 | - try { | |
| 2185 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2186 | - } catch (t) {} | |
| 2187 | - return (_isNativeReflectConstruct$4 = function _isNativeReflectConstruct() { | |
| 2188 | - return !!t; | |
| 2189 | - })(); | |
| 2190 | - } | |
| 2191 | - __name(_isNativeReflectConstruct$4, "_isNativeReflectConstruct"); | |
| 2192 | - var queryClient$1 = new _elementor_query.QueryClient(); | |
| 2193 | - var TogglePopup = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 2194 | - function TogglePopup() { | |
| 2195 | - _classCallCheck(this, TogglePopup); | |
| 2196 | - return _callSuper$4(this, TogglePopup, arguments); | |
| 2197 | - } | |
| 2198 | - _inherits(TogglePopup, _$e$modules$CommandBa); | |
| 2199 | - return _createClass(TogglePopup, [ | |
| 2200 | - { | |
| 2201 | - key: "apply", | |
| 2202 | - value: function apply(args) { | |
| 2203 | - if (!TogglePopup.isOpen) this.mount(); | |
| 2204 | - else this.unmount(); | |
| 2205 | - TogglePopup.isOpen = !TogglePopup.isOpen; | |
| 2206 | - args.isOpen = TogglePopup.isOpen; | |
| 2207 | - updateUserProgress(_defineProperty({}, USER_PROGRESS.LAST_OPENED_TIMESTAMP, TogglePopup.isOpen)); | |
| 2208 | - } | |
| 2209 | - }, | |
| 2210 | - { | |
| 2211 | - key: "mount", | |
| 2212 | - value: function mount() { | |
| 2213 | - this.setRootElement(); | |
| 2214 | - TogglePopup.rootElement.render(/*#__PURE__*/ react.default.createElement(_elementor_query.QueryClientProvider, { client: queryClient$1 }, /*#__PURE__*/ react.default.createElement(App, null))); | |
| 2215 | - } | |
| 2216 | - }, | |
| 2217 | - { | |
| 2218 | - key: "unmount", | |
| 2219 | - value: function unmount() { | |
| 2220 | - TogglePopup.rootElement.unmount(); | |
| 2221 | - document.body.removeChild(document.body.querySelector("#e-checklist")); | |
| 2222 | - } | |
| 2223 | - }, | |
| 2224 | - { | |
| 2225 | - key: "setRootElement", | |
| 2226 | - value: function setRootElement() { | |
| 2227 | - var root = document.body.querySelector("#e-checklist"); | |
| 2228 | - if (!root) { | |
| 2229 | - root = document.createElement("div"); | |
| 2230 | - root.id = "e-checklist"; | |
| 2231 | - document.body.appendChild(root); | |
| 2232 | - } | |
| 2233 | - TogglePopup.rootElement = import_client.createRoot(root); | |
| 2234 | - } | |
| 2235 | - } | |
| 2236 | - ]); | |
| 2237 | - }($e.modules.CommandBase); | |
| 2238 | - _defineProperty(TogglePopup, "rootElement", null); | |
| 2239 | - _defineProperty(TogglePopup, "isOpen", false); | |
| 3952 | +function validatePropTypes(element) { | |
| 3953 | + { | |
| 3954 | + var type = element.type; | |
| 2240 | 3955 | |
| 2241 | -//#endregion | |
| 2242 | -//#region modules/checklist/assets/js/commands/toggle-icon.js | |
| 2243 | - function _callSuper$3(t, o, e) { | |
| 2244 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2245 | - } | |
| 2246 | - __name(_callSuper$3, "_callSuper"); | |
| 2247 | - function _isNativeReflectConstruct$3() { | |
| 2248 | - try { | |
| 2249 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2250 | - } catch (t) {} | |
| 2251 | - return (_isNativeReflectConstruct$3 = function _isNativeReflectConstruct() { | |
| 2252 | - return !!t; | |
| 2253 | - })(); | |
| 2254 | - } | |
| 2255 | - __name(_isNativeReflectConstruct$3, "_isNativeReflectConstruct"); | |
| 2256 | - var ToggleIcon = /*#__PURE__*/ function(_$e$modules$CommandBa) { | |
| 2257 | - function ToggleIcon() { | |
| 2258 | - _classCallCheck(this, ToggleIcon); | |
| 2259 | - return _callSuper$3(this, ToggleIcon, arguments); | |
| 2260 | - } | |
| 2261 | - _inherits(ToggleIcon, _$e$modules$CommandBa); | |
| 2262 | - return _createClass(ToggleIcon, [{ | |
| 2263 | - key: "apply", | |
| 2264 | - value: function apply(shouldShow) { | |
| 2265 | - document.body.querySelector("[aria-label=\"Checklist\"]").parentElement.style.display = shouldShow ? "block" : "none"; | |
| 2266 | - if (!shouldShow && TogglePopup.isOpen) toggleChecklistPopup(); | |
| 2267 | - } | |
| 2268 | - }]); | |
| 2269 | - }($e.modules.CommandBase); | |
| 2270 | - _defineProperty(ToggleIcon, "isSettingsOn", true); | |
| 3956 | + if (type === null || type === undefined || typeof type === 'string') { | |
| 3957 | + return; | |
| 3958 | + } | |
| 2271 | 3959 | |
| 2272 | -//#endregion | |
| 2273 | -//#region modules/checklist/assets/js/commands/index.js | |
| 2274 | - var commands_exports = /* @__PURE__ */ __exportAll({ | |
| 2275 | - ToggleIcon: () => ToggleIcon, | |
| 2276 | - TogglePopup: () => TogglePopup | |
| 2277 | - }); | |
| 3960 | + var propTypes; | |
| 2278 | 3961 | |
| 2279 | -//#endregion | |
| 2280 | -//#region modules/checklist/assets/js/editor-app-bar-link.js | |
| 2281 | - var queryClient = new _elementor_query.QueryClient(); | |
| 2282 | - var editorAppBarLink = function editorAppBarLink() { | |
| 2283 | - _elementor_editor_app_bar.utilitiesMenu.registerLink({ | |
| 2284 | - id: "app-bar-menu-item-checklist", | |
| 2285 | - priority: 5, | |
| 2286 | - useProps: function useProps() { | |
| 2287 | - return { | |
| 2288 | - title: (0, _wordpress_i18n.__)("Checklist", "elementor"), | |
| 2289 | - icon: function icon() { | |
| 2290 | - return /*#__PURE__*/ react.createElement(_elementor_query.QueryClientProvider, { client: queryClient }, /*#__PURE__*/ react.createElement(TopBarIcon, null)); | |
| 2291 | - }, | |
| 2292 | - onClick: function onClick() { | |
| 2293 | - addMixpanelTrackingChecklistTopBar(TogglePopup.isOpen); | |
| 2294 | - toggleChecklistPopup(); | |
| 2295 | - } | |
| 2296 | - }; | |
| 2297 | - } | |
| 2298 | - }); | |
| 2299 | - }; | |
| 3962 | + if (typeof type === 'function') { | |
| 3963 | + propTypes = type.propTypes; | |
| 3964 | + } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here. | |
| 3965 | + // Inner props are checked in the reconciler. | |
| 3966 | + type.$$typeof === REACT_MEMO_TYPE)) { | |
| 3967 | + propTypes = type.propTypes; | |
| 3968 | + } else { | |
| 3969 | + return; | |
| 3970 | + } | |
| 2300 | 3971 | |
| 2301 | -//#endregion | |
| 2302 | -//#region modules/checklist/assets/js/commands-data/steps.js | |
| 2303 | - function _callSuper$2(t, o, e) { | |
| 2304 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2305 | - } | |
| 2306 | - __name(_callSuper$2, "_callSuper"); | |
| 2307 | - function _isNativeReflectConstruct$2() { | |
| 2308 | - try { | |
| 2309 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2310 | - } catch (t) {} | |
| 2311 | - return (_isNativeReflectConstruct$2 = function _isNativeReflectConstruct() { | |
| 2312 | - return !!t; | |
| 2313 | - })(); | |
| 2314 | - } | |
| 2315 | - __name(_isNativeReflectConstruct$2, "_isNativeReflectConstruct"); | |
| 2316 | - var Steps = /*#__PURE__*/ function(_$e$modules$CommandDa) { | |
| 2317 | - function Steps() { | |
| 2318 | - _classCallCheck(this, Steps); | |
| 2319 | - return _callSuper$2(this, Steps, arguments); | |
| 2320 | - } | |
| 2321 | - _inherits(Steps, _$e$modules$CommandDa); | |
| 2322 | - return _createClass(Steps, null, [{ | |
| 2323 | - key: "getEndpointFormat", | |
| 2324 | - value: function getEndpointFormat() { | |
| 2325 | - return "checklist/steps/{id}"; | |
| 2326 | - } | |
| 2327 | - }]); | |
| 2328 | - }($e.modules.CommandData); | |
| 3972 | + if (propTypes) { | |
| 3973 | + // Intentionally inside to avoid triggering lazy initializers: | |
| 3974 | + var name = getComponentNameFromType(type); | |
| 3975 | + checkPropTypes(propTypes, element.props, 'prop', name, element); | |
| 3976 | + } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) { | |
| 3977 | + propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers: | |
| 2329 | 3978 | |
| 2330 | -//#endregion | |
| 2331 | -//#region modules/checklist/assets/js/commands-data/user-progress.js | |
| 2332 | - function _callSuper$1(t, o, e) { | |
| 2333 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$1() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2334 | - } | |
| 2335 | - __name(_callSuper$1, "_callSuper"); | |
| 2336 | - function _isNativeReflectConstruct$1() { | |
| 2337 | - try { | |
| 2338 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2339 | - } catch (t) {} | |
| 2340 | - return (_isNativeReflectConstruct$1 = function _isNativeReflectConstruct() { | |
| 2341 | - return !!t; | |
| 2342 | - })(); | |
| 2343 | - } | |
| 2344 | - __name(_isNativeReflectConstruct$1, "_isNativeReflectConstruct"); | |
| 2345 | - var UserProgress = /*#__PURE__*/ function(_$e$modules$CommandDa) { | |
| 2346 | - function UserProgress() { | |
| 2347 | - _classCallCheck(this, UserProgress); | |
| 2348 | - return _callSuper$1(this, UserProgress, arguments); | |
| 2349 | - } | |
| 2350 | - _inherits(UserProgress, _$e$modules$CommandDa); | |
| 2351 | - return _createClass(UserProgress, null, [{ | |
| 2352 | - key: "getEndpointFormat", | |
| 2353 | - value: function getEndpointFormat() { | |
| 2354 | - return "checklist/user-progress"; | |
| 2355 | - } | |
| 2356 | - }]); | |
| 2357 | - }($e.modules.CommandData); | |
| 3979 | + var _name = getComponentNameFromType(type); | |
| 2358 | 3980 | |
| 2359 | -//#endregion | |
| 2360 | -//#region modules/checklist/assets/js/commands-data/index.js | |
| 2361 | - var commands_data_exports = /* @__PURE__ */ __exportAll({ | |
| 2362 | - Steps: () => Steps, | |
| 2363 | - UserProgress: () => UserProgress | |
| 2364 | - }); | |
| 3981 | + error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown'); | |
| 3982 | + } | |
| 2365 | 3983 | |
| 2366 | -//#endregion | |
| 2367 | -//#region modules/checklist/assets/js/component.js | |
| 2368 | - function _callSuper(t, o, e) { | |
| 2369 | - return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); | |
| 2370 | - } | |
| 2371 | - function _isNativeReflectConstruct() { | |
| 2372 | - try { | |
| 2373 | - var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {})); | |
| 2374 | - } catch (t) {} | |
| 2375 | - return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { | |
| 2376 | - return !!t; | |
| 2377 | - })(); | |
| 2378 | - } | |
| 2379 | - var Component = /*#__PURE__*/ function(_$e$modules$Component) { | |
| 2380 | - function Component() { | |
| 2381 | - _classCallCheck(this, Component); | |
| 2382 | - return _callSuper(this, Component, arguments); | |
| 2383 | - } | |
| 2384 | - _inherits(Component, _$e$modules$Component); | |
| 2385 | - return _createClass(Component, [ | |
| 2386 | - { | |
| 2387 | - key: "getNamespace", | |
| 2388 | - value: function getNamespace() { | |
| 2389 | - return "checklist"; | |
| 2390 | - } | |
| 2391 | - }, | |
| 2392 | - { | |
| 2393 | - key: "defaultCommands", | |
| 2394 | - value: function defaultCommands() { | |
| 2395 | - return this.importCommands(commands_exports); | |
| 2396 | - } | |
| 2397 | - }, | |
| 2398 | - { | |
| 2399 | - key: "defaultData", | |
| 2400 | - value: function defaultData() { | |
| 2401 | - return this.importCommands(commands_data_exports); | |
| 2402 | - } | |
| 2403 | - } | |
| 2404 | - ], [{ | |
| 2405 | - key: "getEndpointFormat", | |
| 2406 | - value: function getEndpointFormat() { | |
| 2407 | - return "checklist"; | |
| 2408 | - } | |
| 2409 | - }]); | |
| 2410 | - }($e.modules.ComponentBase); | |
| 3984 | + if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) { | |
| 3985 | + error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.'); | |
| 3986 | + } | |
| 3987 | + } | |
| 3988 | +} | |
| 3989 | +/** | |
| 3990 | + * Given a fragment, validate that it can only be provided with fragment props | |
| 3991 | + * @param {ReactElement} fragment | |
| 3992 | + */ | |
| 2411 | 3993 | |
| 2412 | -//#endregion | |
| 2413 | -//#region modules/checklist/assets/js/editor.js | |
| 2414 | - $e.components.register(new Component()); | |
| 2415 | - editorAppBarLink(); | |
| 2416 | - elementorCommon.elements.$window.on("elementor:loaded", elementorLoaded); | |
| 2417 | - function elementorLoaded() { | |
| 2418 | - elementor.on("document:loaded", checklistStartup); | |
| 2419 | - elementorCommon.elements.$window.off("elementor:loaded", elementorLoaded); | |
| 2420 | - } | |
| 2421 | - function checklistStartup() { | |
| 2422 | - return _checklistStartup.apply(this, arguments); | |
| 2423 | - } | |
| 2424 | - function _checklistStartup() { | |
| 2425 | - _checklistStartup = _asyncToGenerator(/*#__PURE__*/ import_regenerator.default.mark(function _callee() { | |
| 2426 | - var shouldHide; | |
| 2427 | - var userProgress; | |
| 2428 | - return import_regenerator.default.wrap(function(_context) { | |
| 2429 | - while (1) switch (_context.prev = _context.next) { | |
| 2430 | - case 0: | |
| 2431 | - shouldHide = "yes" !== elementor.getPreferences("show_launchpad_checklist"); | |
| 2432 | - if (!shouldHide) { | |
| 2433 | - _context.next = 1; | |
| 2434 | - break; | |
| 2435 | - } | |
| 2436 | - $e.commands.run("checklist/toggle-icon", false); | |
| 2437 | - _context.next = 3; | |
| 2438 | - break; | |
| 2439 | - case 1: | |
| 2440 | - _context.next = 2; | |
| 2441 | - return fetchUserProgress(); | |
| 2442 | - case 2: | |
| 2443 | - userProgress = _context.sent; | |
| 2444 | - if (userProgress !== null && userProgress !== void 0 && userProgress[USER_PROGRESS.SHOULD_OPEN_IN_EDITOR]) { | |
| 2445 | - toggleChecklistPopup(); | |
| 2446 | - dispatchChecklistOpenEvent(); | |
| 2447 | - } | |
| 2448 | - case 3: elementor.off("document:loaded", checklistStartup); | |
| 2449 | - case 4: | |
| 2450 | - case "end": return _context.stop(); | |
| 2451 | - } | |
| 2452 | - }, _callee); | |
| 2453 | - })); | |
| 2454 | - return _checklistStartup.apply(this, arguments); | |
| 2455 | - } | |
| 2456 | 3994 | |
| 2457 | -//#endregion | |
| 2458 | -})(elementorV2.editorAppBar, wp.i18n, React, elementorV2.query, elementorV2.editorV1Adapters, elementorV2.icons['RocketIcon'], elementorV2.ui, elementorV2.icons); | |
| 3995 | +function validateFragmentProps(fragment) { | |
| 3996 | + { | |
| 3997 | + var keys = Object.keys(fragment.props); | |
| 3998 | + | |
| 3999 | + for (var i = 0; i < keys.length; i++) { | |
| 4000 | + var key = keys[i]; | |
| 4001 | + | |
| 4002 | + if (key !== 'children' && key !== 'key') { | |
| 4003 | + setCurrentlyValidatingElement$1(fragment); | |
| 4004 | + | |
| 4005 | + error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key); | |
| 4006 | + | |
| 4007 | + setCurrentlyValidatingElement$1(null); | |
| 4008 | + break; | |
| 4009 | + } | |
| 4010 | + } | |
| 4011 | + | |
| 4012 | + if (fragment.ref !== null) { | |
| 4013 | + setCurrentlyValidatingElement$1(fragment); | |
| 4014 | + | |
| 4015 | + error('Invalid attribute `ref` supplied to `React.Fragment`.'); | |
| 4016 | + | |
| 4017 | + setCurrentlyValidatingElement$1(null); | |
| 4018 | + } | |
| 4019 | + } | |
| 4020 | +} | |
| 4021 | + | |
| 4022 | +var didWarnAboutKeySpread = {}; | |
| 4023 | +function jsxWithValidation(type, props, key, isStaticChildren, source, self) { | |
| 4024 | + { | |
| 4025 | + var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to | |
| 4026 | + // succeed and there will likely be errors in render. | |
| 4027 | + | |
| 4028 | + if (!validType) { | |
| 4029 | + var info = ''; | |
| 4030 | + | |
| 4031 | + if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) { | |
| 4032 | + info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports."; | |
| 4033 | + } | |
| 4034 | + | |
| 4035 | + var sourceInfo = getSourceInfoErrorAddendum(source); | |
| 4036 | + | |
| 4037 | + if (sourceInfo) { | |
| 4038 | + info += sourceInfo; | |
| 4039 | + } else { | |
| 4040 | + info += getDeclarationErrorAddendum(); | |
| 4041 | + } | |
| 4042 | + | |
| 4043 | + var typeString; | |
| 4044 | + | |
| 4045 | + if (type === null) { | |
| 4046 | + typeString = 'null'; | |
| 4047 | + } else if (isArray(type)) { | |
| 4048 | + typeString = 'array'; | |
| 4049 | + } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) { | |
| 4050 | + typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />"; | |
| 4051 | + info = ' Did you accidentally export a JSX literal instead of a component?'; | |
| 4052 | + } else { | |
| 4053 | + typeString = typeof type; | |
| 4054 | + } | |
| 4055 | + | |
| 4056 | + error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info); | |
| 4057 | + } | |
| 4058 | + | |
| 4059 | + var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used. | |
| 4060 | + // TODO: Drop this when these are no longer allowed as the type argument. | |
| 4061 | + | |
| 4062 | + if (element == null) { | |
| 4063 | + return element; | |
| 4064 | + } // Skip key warning if the type isn't valid since our key validation logic | |
| 4065 | + // doesn't expect a non-string/function type and can throw confusing errors. | |
| 4066 | + // We don't want exception behavior to differ between dev and prod. | |
| 4067 | + // (Rendering will throw with a helpful message and as soon as the type is | |
| 4068 | + // fixed, the key warnings will appear.) | |
| 4069 | + | |
| 4070 | + | |
| 4071 | + if (validType) { | |
| 4072 | + var children = props.children; | |
| 4073 | + | |
| 4074 | + if (children !== undefined) { | |
| 4075 | + if (isStaticChildren) { | |
| 4076 | + if (isArray(children)) { | |
| 4077 | + for (var i = 0; i < children.length; i++) { | |
| 4078 | + validateChildKeys(children[i], type); | |
| 4079 | + } | |
| 4080 | + | |
| 4081 | + if (Object.freeze) { | |
| 4082 | + Object.freeze(children); | |
| 4083 | + } | |
| 4084 | + } else { | |
| 4085 | + error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.'); | |
| 4086 | + } | |
| 4087 | + } else { | |
| 4088 | + validateChildKeys(children, type); | |
| 4089 | + } | |
| 4090 | + } | |
| 4091 | + } | |
| 4092 | + | |
| 4093 | + { | |
| 4094 | + if (hasOwnProperty.call(props, 'key')) { | |
| 4095 | + var componentName = getComponentNameFromType(type); | |
| 4096 | + var keys = Object.keys(props).filter(function (k) { | |
| 4097 | + return k !== 'key'; | |
| 4098 | + }); | |
| 4099 | + var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}'; | |
| 4100 | + | |
| 4101 | + if (!didWarnAboutKeySpread[componentName + beforeExample]) { | |
| 4102 | + var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}'; | |
| 4103 | + | |
| 4104 | + error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName); | |
| 4105 | + | |
| 4106 | + didWarnAboutKeySpread[componentName + beforeExample] = true; | |
| 4107 | + } | |
| 4108 | + } | |
| 4109 | + } | |
| 4110 | + | |
| 4111 | + if (type === REACT_FRAGMENT_TYPE) { | |
| 4112 | + validateFragmentProps(element); | |
| 4113 | + } else { | |
| 4114 | + validatePropTypes(element); | |
| 4115 | + } | |
| 4116 | + | |
| 4117 | + return element; | |
| 4118 | + } | |
| 4119 | +} // These two functions exist to still get child warnings in dev | |
| 4120 | +// even with the prod transform. This means that jsxDEV is purely | |
| 4121 | +// opt-in behavior for better messages but that we won't stop | |
| 4122 | +// giving you warnings if you use production apis. | |
| 4123 | + | |
| 4124 | +function jsxWithValidationStatic(type, props, key) { | |
| 4125 | + { | |
| 4126 | + return jsxWithValidation(type, props, key, true); | |
| 4127 | + } | |
| 4128 | +} | |
| 4129 | +function jsxWithValidationDynamic(type, props, key) { | |
| 4130 | + { | |
| 4131 | + return jsxWithValidation(type, props, key, false); | |
| 4132 | + } | |
| 4133 | +} | |
| 4134 | + | |
| 4135 | +var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children. | |
| 4136 | +// for now we can ship identical prod functions | |
| 4137 | + | |
| 4138 | +var jsxs = jsxWithValidationStatic ; | |
| 4139 | + | |
| 4140 | +exports.Fragment = REACT_FRAGMENT_TYPE; | |
| 4141 | +exports.jsx = jsx; | |
| 4142 | +exports.jsxs = jsxs; | |
| 4143 | + })(); | |
| 4144 | +} | |
| 4145 | + | |
| 4146 | + | |
| 4147 | +/***/ }), | |
| 4148 | + | |
| 4149 | +/***/ "../node_modules/react/jsx-runtime.js": | |
| 4150 | +/*!********************************************!*\ | |
| 4151 | + !*** ../node_modules/react/jsx-runtime.js ***! | |
| 4152 | + \********************************************/ | |
| 4153 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4154 | + | |
| 4155 | +"use strict"; | |
| 4156 | + | |
| 4157 | + | |
| 4158 | +if (false) {} else { | |
| 4159 | + module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js"); | |
| 4160 | +} | |
| 4161 | + | |
| 4162 | + | |
| 4163 | +/***/ }), | |
| 4164 | + | |
| 4165 | +/***/ "react": | |
| 4166 | +/*!************************!*\ | |
| 4167 | + !*** external "React" ***! | |
| 4168 | + \************************/ | |
| 4169 | +/***/ ((module) => { | |
| 4170 | + | |
| 4171 | +"use strict"; | |
| 4172 | +module.exports = React; | |
| 4173 | + | |
| 4174 | +/***/ }), | |
| 4175 | + | |
| 4176 | +/***/ "react-dom": | |
| 4177 | +/*!***************************!*\ | |
| 4178 | + !*** external "ReactDOM" ***! | |
| 4179 | + \***************************/ | |
| 4180 | +/***/ ((module) => { | |
| 4181 | + | |
| 4182 | +"use strict"; | |
| 4183 | +module.exports = ReactDOM; | |
| 4184 | + | |
| 4185 | +/***/ }), | |
| 4186 | + | |
| 4187 | +/***/ "@elementor/editor-app-bar": | |
| 4188 | +/*!*******************************************!*\ | |
| 4189 | + !*** external "elementorV2.editorAppBar" ***! | |
| 4190 | + \*******************************************/ | |
| 4191 | +/***/ ((module) => { | |
| 4192 | + | |
| 4193 | +"use strict"; | |
| 4194 | +module.exports = elementorV2.editorAppBar; | |
| 4195 | + | |
| 4196 | +/***/ }), | |
| 4197 | + | |
| 4198 | +/***/ "@elementor/editor-v1-adapters": | |
| 4199 | +/*!***********************************************!*\ | |
| 4200 | + !*** external "elementorV2.editorV1Adapters" ***! | |
| 4201 | + \***********************************************/ | |
| 4202 | +/***/ ((module) => { | |
| 4203 | + | |
| 4204 | +"use strict"; | |
| 4205 | +module.exports = elementorV2.editorV1Adapters; | |
| 4206 | + | |
| 4207 | +/***/ }), | |
| 4208 | + | |
| 4209 | +/***/ "@elementor/icons": | |
| 4210 | +/*!************************************!*\ | |
| 4211 | + !*** external "elementorV2.icons" ***! | |
| 4212 | + \************************************/ | |
| 4213 | +/***/ ((module) => { | |
| 4214 | + | |
| 4215 | +"use strict"; | |
| 4216 | +module.exports = elementorV2.icons; | |
| 4217 | + | |
| 4218 | +/***/ }), | |
| 4219 | + | |
| 4220 | +/***/ "@elementor/icons/RocketIcon": | |
| 4221 | +/*!**************************************************!*\ | |
| 4222 | + !*** external "elementorV2.icons['RocketIcon']" ***! | |
| 4223 | + \**************************************************/ | |
| 4224 | +/***/ ((module) => { | |
| 4225 | + | |
| 4226 | +"use strict"; | |
| 4227 | +module.exports = elementorV2.icons['RocketIcon']; | |
| 4228 | + | |
| 4229 | +/***/ }), | |
| 4230 | + | |
| 4231 | +/***/ "@elementor/ui": | |
| 4232 | +/*!*********************************!*\ | |
| 4233 | + !*** external "elementorV2.ui" ***! | |
| 4234 | + \*********************************/ | |
| 4235 | +/***/ ((module) => { | |
| 4236 | + | |
| 4237 | +"use strict"; | |
| 4238 | +module.exports = elementorV2.ui; | |
| 4239 | + | |
| 4240 | +/***/ }), | |
| 4241 | + | |
| 4242 | +/***/ "@wordpress/i18n": | |
| 4243 | +/*!**************************!*\ | |
| 4244 | + !*** external "wp.i18n" ***! | |
| 4245 | + \**************************/ | |
| 4246 | +/***/ ((module) => { | |
| 4247 | + | |
| 4248 | +"use strict"; | |
| 4249 | +module.exports = wp.i18n; | |
| 4250 | + | |
| 4251 | +/***/ }), | |
| 4252 | + | |
| 4253 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 4254 | +/*!******************************************************************!*\ | |
| 4255 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 4256 | + \******************************************************************/ | |
| 4257 | +/***/ ((module) => { | |
| 4258 | + | |
| 4259 | +function _arrayLikeToArray(r, a) { | |
| 4260 | + (null == a || a > r.length) && (a = r.length); | |
| 4261 | + for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 4262 | + return n; | |
| 4263 | +} | |
| 4264 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4265 | + | |
| 4266 | +/***/ }), | |
| 4267 | + | |
| 4268 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 4269 | +/*!****************************************************************!*\ | |
| 4270 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 4271 | + \****************************************************************/ | |
| 4272 | +/***/ ((module) => { | |
| 4273 | + | |
| 4274 | +function _arrayWithHoles(r) { | |
| 4275 | + if (Array.isArray(r)) return r; | |
| 4276 | +} | |
| 4277 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4278 | + | |
| 4279 | +/***/ }), | |
| 4280 | + | |
| 4281 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js": | |
| 4282 | +/*!*******************************************************************!*\ | |
| 4283 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***! | |
| 4284 | + \*******************************************************************/ | |
| 4285 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4286 | + | |
| 4287 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 4288 | +function _arrayWithoutHoles(r) { | |
| 4289 | + if (Array.isArray(r)) return arrayLikeToArray(r); | |
| 4290 | +} | |
| 4291 | +module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4292 | + | |
| 4293 | +/***/ }), | |
| 4294 | + | |
| 4295 | +/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js": | |
| 4296 | +/*!***********************************************************************!*\ | |
| 4297 | + !*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! | |
| 4298 | + \***********************************************************************/ | |
| 4299 | +/***/ ((module) => { | |
| 4300 | + | |
| 4301 | +function _assertThisInitialized(e) { | |
| 4302 | + if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | |
| 4303 | + return e; | |
| 4304 | +} | |
| 4305 | +module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4306 | + | |
| 4307 | +/***/ }), | |
| 4308 | + | |
| 4309 | +/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js": | |
| 4310 | +/*!******************************************************************!*\ | |
| 4311 | + !*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***! | |
| 4312 | + \******************************************************************/ | |
| 4313 | +/***/ ((module) => { | |
| 4314 | + | |
| 4315 | +function asyncGeneratorStep(n, t, e, r, o, a, c) { | |
| 4316 | + try { | |
| 4317 | + var i = n[a](c), | |
| 4318 | + u = i.value; | |
| 4319 | + } catch (n) { | |
| 4320 | + return void e(n); | |
| 4321 | + } | |
| 4322 | + i.done ? t(u) : Promise.resolve(u).then(r, o); | |
| 4323 | +} | |
| 4324 | +function _asyncToGenerator(n) { | |
| 4325 | + return function () { | |
| 4326 | + var t = this, | |
| 4327 | + e = arguments; | |
| 4328 | + return new Promise(function (r, o) { | |
| 4329 | + var a = n.apply(t, e); | |
| 4330 | + function _next(n) { | |
| 4331 | + asyncGeneratorStep(a, r, o, _next, _throw, "next", n); | |
| 4332 | + } | |
| 4333 | + function _throw(n) { | |
| 4334 | + asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); | |
| 4335 | + } | |
| 4336 | + _next(void 0); | |
| 4337 | + }); | |
| 4338 | + }; | |
| 4339 | +} | |
| 4340 | +module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4341 | + | |
| 4342 | +/***/ }), | |
| 4343 | + | |
| 4344 | +/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js": | |
| 4345 | +/*!****************************************************************!*\ | |
| 4346 | + !*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***! | |
| 4347 | + \****************************************************************/ | |
| 4348 | +/***/ ((module) => { | |
| 4349 | + | |
| 4350 | +function _classCallCheck(a, n) { | |
| 4351 | + if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); | |
| 4352 | +} | |
| 4353 | +module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4354 | + | |
| 4355 | +/***/ }), | |
| 4356 | + | |
| 4357 | +/***/ "../node_modules/@babel/runtime/helpers/createClass.js": | |
| 4358 | +/*!*************************************************************!*\ | |
| 4359 | + !*** ../node_modules/@babel/runtime/helpers/createClass.js ***! | |
| 4360 | + \*************************************************************/ | |
| 4361 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4362 | + | |
| 4363 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 4364 | +function _defineProperties(e, r) { | |
| 4365 | + for (var t = 0; t < r.length; t++) { | |
| 4366 | + var o = r[t]; | |
| 4367 | + o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o); | |
| 4368 | + } | |
| 4369 | +} | |
| 4370 | +function _createClass(e, r, t) { | |
| 4371 | + return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { | |
| 4372 | + writable: !1 | |
| 4373 | + }), e; | |
| 4374 | +} | |
| 4375 | +module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4376 | + | |
| 4377 | +/***/ }), | |
| 4378 | + | |
| 4379 | +/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js": | |
| 4380 | +/*!****************************************************************!*\ | |
| 4381 | + !*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***! | |
| 4382 | + \****************************************************************/ | |
| 4383 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4384 | + | |
| 4385 | +var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js"); | |
| 4386 | +function _defineProperty(e, r, t) { | |
| 4387 | + return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, { | |
| 4388 | + value: t, | |
| 4389 | + enumerable: !0, | |
| 4390 | + configurable: !0, | |
| 4391 | + writable: !0 | |
| 4392 | + }) : e[r] = t, e; | |
| 4393 | +} | |
| 4394 | +module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4395 | + | |
| 4396 | +/***/ }), | |
| 4397 | + | |
| 4398 | +/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js": | |
| 4399 | +/*!****************************************************************!*\ | |
| 4400 | + !*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! | |
| 4401 | + \****************************************************************/ | |
| 4402 | +/***/ ((module) => { | |
| 4403 | + | |
| 4404 | +function _getPrototypeOf(t) { | |
| 4405 | + return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { | |
| 4406 | + return t.__proto__ || Object.getPrototypeOf(t); | |
| 4407 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t); | |
| 4408 | +} | |
| 4409 | +module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4410 | + | |
| 4411 | +/***/ }), | |
| 4412 | + | |
| 4413 | +/***/ "../node_modules/@babel/runtime/helpers/inherits.js": | |
| 4414 | +/*!**********************************************************!*\ | |
| 4415 | + !*** ../node_modules/@babel/runtime/helpers/inherits.js ***! | |
| 4416 | + \**********************************************************/ | |
| 4417 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4418 | + | |
| 4419 | +var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js"); | |
| 4420 | +function _inherits(t, e) { | |
| 4421 | + if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); | |
| 4422 | + t.prototype = Object.create(e && e.prototype, { | |
| 4423 | + constructor: { | |
| 4424 | + value: t, | |
| 4425 | + writable: !0, | |
| 4426 | + configurable: !0 | |
| 4427 | + } | |
| 4428 | + }), Object.defineProperty(t, "prototype", { | |
| 4429 | + writable: !1 | |
| 4430 | + }), e && setPrototypeOf(t, e); | |
| 4431 | +} | |
| 4432 | +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4433 | + | |
| 4434 | +/***/ }), | |
| 4435 | + | |
| 4436 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 4437 | +/*!***********************************************************************!*\ | |
| 4438 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 4439 | + \***********************************************************************/ | |
| 4440 | +/***/ ((module) => { | |
| 4441 | + | |
| 4442 | +function _interopRequireDefault(e) { | |
| 4443 | + return e && e.__esModule ? e : { | |
| 4444 | + "default": e | |
| 4445 | + }; | |
| 4446 | +} | |
| 4447 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4448 | + | |
| 4449 | +/***/ }), | |
| 4450 | + | |
| 4451 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js": | |
| 4452 | +/*!*****************************************************************!*\ | |
| 4453 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***! | |
| 4454 | + \*****************************************************************/ | |
| 4455 | +/***/ ((module) => { | |
| 4456 | + | |
| 4457 | +function _iterableToArray(r) { | |
| 4458 | + if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); | |
| 4459 | +} | |
| 4460 | +module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4461 | + | |
| 4462 | +/***/ }), | |
| 4463 | + | |
| 4464 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 4465 | +/*!**********************************************************************!*\ | |
| 4466 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 4467 | + \**********************************************************************/ | |
| 4468 | +/***/ ((module) => { | |
| 4469 | + | |
| 4470 | +function _iterableToArrayLimit(r, l) { | |
| 4471 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 4472 | + if (null != t) { | |
| 4473 | + var e, | |
| 4474 | + n, | |
| 4475 | + i, | |
| 4476 | + u, | |
| 4477 | + a = [], | |
| 4478 | + f = !0, | |
| 4479 | + o = !1; | |
| 4480 | + try { | |
| 4481 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 4482 | + if (Object(t) !== t) return; | |
| 4483 | + f = !1; | |
| 4484 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 4485 | + } catch (r) { | |
| 4486 | + o = !0, n = r; | |
| 4487 | + } finally { | |
| 4488 | + try { | |
| 4489 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 4490 | + } finally { | |
| 4491 | + if (o) throw n; | |
| 4492 | + } | |
| 4493 | + } | |
| 4494 | + return a; | |
| 4495 | + } | |
| 4496 | +} | |
| 4497 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4498 | + | |
| 4499 | +/***/ }), | |
| 4500 | + | |
| 4501 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 4502 | +/*!*****************************************************************!*\ | |
| 4503 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 4504 | + \*****************************************************************/ | |
| 4505 | +/***/ ((module) => { | |
| 4506 | + | |
| 4507 | +function _nonIterableRest() { | |
| 4508 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 4509 | +} | |
| 4510 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4511 | + | |
| 4512 | +/***/ }), | |
| 4513 | + | |
| 4514 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js": | |
| 4515 | +/*!*******************************************************************!*\ | |
| 4516 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***! | |
| 4517 | + \*******************************************************************/ | |
| 4518 | +/***/ ((module) => { | |
| 4519 | + | |
| 4520 | +function _nonIterableSpread() { | |
| 4521 | + throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 4522 | +} | |
| 4523 | +module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4524 | + | |
| 4525 | +/***/ }), | |
| 4526 | + | |
| 4527 | +/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": | |
| 4528 | +/*!***************************************************************************!*\ | |
| 4529 | + !*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! | |
| 4530 | + \***************************************************************************/ | |
| 4531 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4532 | + | |
| 4533 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4534 | +var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js"); | |
| 4535 | +function _possibleConstructorReturn(t, e) { | |
| 4536 | + if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; | |
| 4537 | + if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); | |
| 4538 | + return assertThisInitialized(t); | |
| 4539 | +} | |
| 4540 | +module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4541 | + | |
| 4542 | +/***/ }), | |
| 4543 | + | |
| 4544 | +/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js": | |
| 4545 | +/*!********************************************************************!*\ | |
| 4546 | + !*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***! | |
| 4547 | + \********************************************************************/ | |
| 4548 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4549 | + | |
| 4550 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4551 | +function _regeneratorRuntime() { | |
| 4552 | + "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | |
| 4553 | + module.exports = _regeneratorRuntime = function _regeneratorRuntime() { | |
| 4554 | + return e; | |
| 4555 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4556 | + var t, | |
| 4557 | + e = {}, | |
| 4558 | + r = Object.prototype, | |
| 4559 | + n = r.hasOwnProperty, | |
| 4560 | + o = Object.defineProperty || function (t, e, r) { | |
| 4561 | + t[e] = r.value; | |
| 4562 | + }, | |
| 4563 | + i = "function" == typeof Symbol ? Symbol : {}, | |
| 4564 | + a = i.iterator || "@@iterator", | |
| 4565 | + c = i.asyncIterator || "@@asyncIterator", | |
| 4566 | + u = i.toStringTag || "@@toStringTag"; | |
| 4567 | + function define(t, e, r) { | |
| 4568 | + return Object.defineProperty(t, e, { | |
| 4569 | + value: r, | |
| 4570 | + enumerable: !0, | |
| 4571 | + configurable: !0, | |
| 4572 | + writable: !0 | |
| 4573 | + }), t[e]; | |
| 4574 | + } | |
| 4575 | + try { | |
| 4576 | + define({}, ""); | |
| 4577 | + } catch (t) { | |
| 4578 | + define = function define(t, e, r) { | |
| 4579 | + return t[e] = r; | |
| 4580 | + }; | |
| 4581 | + } | |
| 4582 | + function wrap(t, e, r, n) { | |
| 4583 | + var i = e && e.prototype instanceof Generator ? e : Generator, | |
| 4584 | + a = Object.create(i.prototype), | |
| 4585 | + c = new Context(n || []); | |
| 4586 | + return o(a, "_invoke", { | |
| 4587 | + value: makeInvokeMethod(t, r, c) | |
| 4588 | + }), a; | |
| 4589 | + } | |
| 4590 | + function tryCatch(t, e, r) { | |
| 4591 | + try { | |
| 4592 | + return { | |
| 4593 | + type: "normal", | |
| 4594 | + arg: t.call(e, r) | |
| 4595 | + }; | |
| 4596 | + } catch (t) { | |
| 4597 | + return { | |
| 4598 | + type: "throw", | |
| 4599 | + arg: t | |
| 4600 | + }; | |
| 4601 | + } | |
| 4602 | + } | |
| 4603 | + e.wrap = wrap; | |
| 4604 | + var h = "suspendedStart", | |
| 4605 | + l = "suspendedYield", | |
| 4606 | + f = "executing", | |
| 4607 | + s = "completed", | |
| 4608 | + y = {}; | |
| 4609 | + function Generator() {} | |
| 4610 | + function GeneratorFunction() {} | |
| 4611 | + function GeneratorFunctionPrototype() {} | |
| 4612 | + var p = {}; | |
| 4613 | + define(p, a, function () { | |
| 4614 | + return this; | |
| 4615 | + }); | |
| 4616 | + var d = Object.getPrototypeOf, | |
| 4617 | + v = d && d(d(values([]))); | |
| 4618 | + v && v !== r && n.call(v, a) && (p = v); | |
| 4619 | + var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); | |
| 4620 | + function defineIteratorMethods(t) { | |
| 4621 | + ["next", "throw", "return"].forEach(function (e) { | |
| 4622 | + define(t, e, function (t) { | |
| 4623 | + return this._invoke(e, t); | |
| 4624 | + }); | |
| 4625 | + }); | |
| 4626 | + } | |
| 4627 | + function AsyncIterator(t, e) { | |
| 4628 | + function invoke(r, o, i, a) { | |
| 4629 | + var c = tryCatch(t[r], t, o); | |
| 4630 | + if ("throw" !== c.type) { | |
| 4631 | + var u = c.arg, | |
| 4632 | + h = u.value; | |
| 4633 | + return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { | |
| 4634 | + invoke("next", t, i, a); | |
| 4635 | + }, function (t) { | |
| 4636 | + invoke("throw", t, i, a); | |
| 4637 | + }) : e.resolve(h).then(function (t) { | |
| 4638 | + u.value = t, i(u); | |
| 4639 | + }, function (t) { | |
| 4640 | + return invoke("throw", t, i, a); | |
| 4641 | + }); | |
| 4642 | + } | |
| 4643 | + a(c.arg); | |
| 4644 | + } | |
| 4645 | + var r; | |
| 4646 | + o(this, "_invoke", { | |
| 4647 | + value: function value(t, n) { | |
| 4648 | + function callInvokeWithMethodAndArg() { | |
| 4649 | + return new e(function (e, r) { | |
| 4650 | + invoke(t, n, e, r); | |
| 4651 | + }); | |
| 4652 | + } | |
| 4653 | + return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); | |
| 4654 | + } | |
| 4655 | + }); | |
| 4656 | + } | |
| 4657 | + function makeInvokeMethod(e, r, n) { | |
| 4658 | + var o = h; | |
| 4659 | + return function (i, a) { | |
| 4660 | + if (o === f) throw Error("Generator is already running"); | |
| 4661 | + if (o === s) { | |
| 4662 | + if ("throw" === i) throw a; | |
| 4663 | + return { | |
| 4664 | + value: t, | |
| 4665 | + done: !0 | |
| 4666 | + }; | |
| 4667 | + } | |
| 4668 | + for (n.method = i, n.arg = a;;) { | |
| 4669 | + var c = n.delegate; | |
| 4670 | + if (c) { | |
| 4671 | + var u = maybeInvokeDelegate(c, n); | |
| 4672 | + if (u) { | |
| 4673 | + if (u === y) continue; | |
| 4674 | + return u; | |
| 4675 | + } | |
| 4676 | + } | |
| 4677 | + if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { | |
| 4678 | + if (o === h) throw o = s, n.arg; | |
| 4679 | + n.dispatchException(n.arg); | |
| 4680 | + } else "return" === n.method && n.abrupt("return", n.arg); | |
| 4681 | + o = f; | |
| 4682 | + var p = tryCatch(e, r, n); | |
| 4683 | + if ("normal" === p.type) { | |
| 4684 | + if (o = n.done ? s : l, p.arg === y) continue; | |
| 4685 | + return { | |
| 4686 | + value: p.arg, | |
| 4687 | + done: n.done | |
| 4688 | + }; | |
| 4689 | + } | |
| 4690 | + "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); | |
| 4691 | + } | |
| 4692 | + }; | |
| 4693 | + } | |
| 4694 | + function maybeInvokeDelegate(e, r) { | |
| 4695 | + var n = r.method, | |
| 4696 | + o = e.iterator[n]; | |
| 4697 | + 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; | |
| 4698 | + var i = tryCatch(o, e.iterator, r.arg); | |
| 4699 | + if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; | |
| 4700 | + var a = i.arg; | |
| 4701 | + 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); | |
| 4702 | + } | |
| 4703 | + function pushTryEntry(t) { | |
| 4704 | + var e = { | |
| 4705 | + tryLoc: t[0] | |
| 4706 | + }; | |
| 4707 | + 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); | |
| 4708 | + } | |
| 4709 | + function resetTryEntry(t) { | |
| 4710 | + var e = t.completion || {}; | |
| 4711 | + e.type = "normal", delete e.arg, t.completion = e; | |
| 4712 | + } | |
| 4713 | + function Context(t) { | |
| 4714 | + this.tryEntries = [{ | |
| 4715 | + tryLoc: "root" | |
| 4716 | + }], t.forEach(pushTryEntry, this), this.reset(!0); | |
| 4717 | + } | |
| 4718 | + function values(e) { | |
| 4719 | + if (e || "" === e) { | |
| 4720 | + var r = e[a]; | |
| 4721 | + if (r) return r.call(e); | |
| 4722 | + if ("function" == typeof e.next) return e; | |
| 4723 | + if (!isNaN(e.length)) { | |
| 4724 | + var o = -1, | |
| 4725 | + i = function next() { | |
| 4726 | + for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; | |
| 4727 | + return next.value = t, next.done = !0, next; | |
| 4728 | + }; | |
| 4729 | + return i.next = i; | |
| 4730 | + } | |
| 4731 | + } | |
| 4732 | + throw new TypeError(_typeof(e) + " is not iterable"); | |
| 4733 | + } | |
| 4734 | + return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { | |
| 4735 | + value: GeneratorFunctionPrototype, | |
| 4736 | + configurable: !0 | |
| 4737 | + }), o(GeneratorFunctionPrototype, "constructor", { | |
| 4738 | + value: GeneratorFunction, | |
| 4739 | + configurable: !0 | |
| 4740 | + }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { | |
| 4741 | + var e = "function" == typeof t && t.constructor; | |
| 4742 | + return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); | |
| 4743 | + }, e.mark = function (t) { | |
| 4744 | + return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; | |
| 4745 | + }, e.awrap = function (t) { | |
| 4746 | + return { | |
| 4747 | + __await: t | |
| 4748 | + }; | |
| 4749 | + }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { | |
| 4750 | + return this; | |
| 4751 | + }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { | |
| 4752 | + void 0 === i && (i = Promise); | |
| 4753 | + var a = new AsyncIterator(wrap(t, r, n, o), i); | |
| 4754 | + return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { | |
| 4755 | + return t.done ? t.value : a.next(); | |
| 4756 | + }); | |
| 4757 | + }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { | |
| 4758 | + return this; | |
| 4759 | + }), define(g, "toString", function () { | |
| 4760 | + return "[object Generator]"; | |
| 4761 | + }), e.keys = function (t) { | |
| 4762 | + var e = Object(t), | |
| 4763 | + r = []; | |
| 4764 | + for (var n in e) r.push(n); | |
| 4765 | + return r.reverse(), function next() { | |
| 4766 | + for (; r.length;) { | |
| 4767 | + var t = r.pop(); | |
| 4768 | + if (t in e) return next.value = t, next.done = !1, next; | |
| 4769 | + } | |
| 4770 | + return next.done = !0, next; | |
| 4771 | + }; | |
| 4772 | + }, e.values = values, Context.prototype = { | |
| 4773 | + constructor: Context, | |
| 4774 | + reset: function reset(e) { | |
| 4775 | + 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); | |
| 4776 | + }, | |
| 4777 | + stop: function stop() { | |
| 4778 | + this.done = !0; | |
| 4779 | + var t = this.tryEntries[0].completion; | |
| 4780 | + if ("throw" === t.type) throw t.arg; | |
| 4781 | + return this.rval; | |
| 4782 | + }, | |
| 4783 | + dispatchException: function dispatchException(e) { | |
| 4784 | + if (this.done) throw e; | |
| 4785 | + var r = this; | |
| 4786 | + function handle(n, o) { | |
| 4787 | + return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; | |
| 4788 | + } | |
| 4789 | + for (var o = this.tryEntries.length - 1; o >= 0; --o) { | |
| 4790 | + var i = this.tryEntries[o], | |
| 4791 | + a = i.completion; | |
| 4792 | + if ("root" === i.tryLoc) return handle("end"); | |
| 4793 | + if (i.tryLoc <= this.prev) { | |
| 4794 | + var c = n.call(i, "catchLoc"), | |
| 4795 | + u = n.call(i, "finallyLoc"); | |
| 4796 | + if (c && u) { | |
| 4797 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 4798 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 4799 | + } else if (c) { | |
| 4800 | + if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); | |
| 4801 | + } else { | |
| 4802 | + if (!u) throw Error("try statement without catch or finally"); | |
| 4803 | + if (this.prev < i.finallyLoc) return handle(i.finallyLoc); | |
| 4804 | + } | |
| 4805 | + } | |
| 4806 | + } | |
| 4807 | + }, | |
| 4808 | + abrupt: function abrupt(t, e) { | |
| 4809 | + for (var r = this.tryEntries.length - 1; r >= 0; --r) { | |
| 4810 | + var o = this.tryEntries[r]; | |
| 4811 | + if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { | |
| 4812 | + var i = o; | |
| 4813 | + break; | |
| 4814 | + } | |
| 4815 | + } | |
| 4816 | + i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); | |
| 4817 | + var a = i ? i.completion : {}; | |
| 4818 | + return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); | |
| 4819 | + }, | |
| 4820 | + complete: function complete(t, e) { | |
| 4821 | + if ("throw" === t.type) throw t.arg; | |
| 4822 | + 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; | |
| 4823 | + }, | |
| 4824 | + finish: function finish(t) { | |
| 4825 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 4826 | + var r = this.tryEntries[e]; | |
| 4827 | + if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; | |
| 4828 | + } | |
| 4829 | + }, | |
| 4830 | + "catch": function _catch(t) { | |
| 4831 | + for (var e = this.tryEntries.length - 1; e >= 0; --e) { | |
| 4832 | + var r = this.tryEntries[e]; | |
| 4833 | + if (r.tryLoc === t) { | |
| 4834 | + var n = r.completion; | |
| 4835 | + if ("throw" === n.type) { | |
| 4836 | + var o = n.arg; | |
| 4837 | + resetTryEntry(r); | |
| 4838 | + } | |
| 4839 | + return o; | |
| 4840 | + } | |
| 4841 | + } | |
| 4842 | + throw Error("illegal catch attempt"); | |
| 4843 | + }, | |
| 4844 | + delegateYield: function delegateYield(e, r, n) { | |
| 4845 | + return this.delegate = { | |
| 4846 | + iterator: values(e), | |
| 4847 | + resultName: r, | |
| 4848 | + nextLoc: n | |
| 4849 | + }, "next" === this.method && (this.arg = t), y; | |
| 4850 | + } | |
| 4851 | + }, e; | |
| 4852 | +} | |
| 4853 | +module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4854 | + | |
| 4855 | +/***/ }), | |
| 4856 | + | |
| 4857 | +/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js": | |
| 4858 | +/*!****************************************************************!*\ | |
| 4859 | + !*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! | |
| 4860 | + \****************************************************************/ | |
| 4861 | +/***/ ((module) => { | |
| 4862 | + | |
| 4863 | +function _setPrototypeOf(t, e) { | |
| 4864 | + return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { | |
| 4865 | + return t.__proto__ = e, t; | |
| 4866 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e); | |
| 4867 | +} | |
| 4868 | +module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4869 | + | |
| 4870 | +/***/ }), | |
| 4871 | + | |
| 4872 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 4873 | +/*!***************************************************************!*\ | |
| 4874 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 4875 | + \***************************************************************/ | |
| 4876 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4877 | + | |
| 4878 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 4879 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 4880 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 4881 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 4882 | +function _slicedToArray(r, e) { | |
| 4883 | + return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 4884 | +} | |
| 4885 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4886 | + | |
| 4887 | +/***/ }), | |
| 4888 | + | |
| 4889 | +/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js": | |
| 4890 | +/*!*******************************************************************!*\ | |
| 4891 | + !*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***! | |
| 4892 | + \*******************************************************************/ | |
| 4893 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4894 | + | |
| 4895 | +var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"); | |
| 4896 | +var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js"); | |
| 4897 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 4898 | +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js"); | |
| 4899 | +function _toConsumableArray(r) { | |
| 4900 | + return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread(); | |
| 4901 | +} | |
| 4902 | +module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4903 | + | |
| 4904 | +/***/ }), | |
| 4905 | + | |
| 4906 | +/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js": | |
| 4907 | +/*!*************************************************************!*\ | |
| 4908 | + !*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***! | |
| 4909 | + \*************************************************************/ | |
| 4910 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4911 | + | |
| 4912 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4913 | +function toPrimitive(t, r) { | |
| 4914 | + if ("object" != _typeof(t) || !t) return t; | |
| 4915 | + var e = t[Symbol.toPrimitive]; | |
| 4916 | + if (void 0 !== e) { | |
| 4917 | + var i = e.call(t, r || "default"); | |
| 4918 | + if ("object" != _typeof(i)) return i; | |
| 4919 | + throw new TypeError("@@toPrimitive must return a primitive value."); | |
| 4920 | + } | |
| 4921 | + return ("string" === r ? String : Number)(t); | |
| 4922 | +} | |
| 4923 | +module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4924 | + | |
| 4925 | +/***/ }), | |
| 4926 | + | |
| 4927 | +/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js": | |
| 4928 | +/*!***************************************************************!*\ | |
| 4929 | + !*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***! | |
| 4930 | + \***************************************************************/ | |
| 4931 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4932 | + | |
| 4933 | +var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]); | |
| 4934 | +var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js"); | |
| 4935 | +function toPropertyKey(t) { | |
| 4936 | + var i = toPrimitive(t, "string"); | |
| 4937 | + return "symbol" == _typeof(i) ? i : i + ""; | |
| 4938 | +} | |
| 4939 | +module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4940 | + | |
| 4941 | +/***/ }), | |
| 4942 | + | |
| 4943 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 4944 | +/*!********************************************************!*\ | |
| 4945 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 4946 | + \********************************************************/ | |
| 4947 | +/***/ ((module) => { | |
| 4948 | + | |
| 4949 | +function _typeof(o) { | |
| 4950 | + "@babel/helpers - typeof"; | |
| 4951 | + | |
| 4952 | + return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 4953 | + return typeof o; | |
| 4954 | + } : function (o) { | |
| 4955 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 4956 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 4957 | +} | |
| 4958 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4959 | + | |
| 4960 | +/***/ }), | |
| 4961 | + | |
| 4962 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 4963 | +/*!****************************************************************************!*\ | |
| 4964 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 4965 | + \****************************************************************************/ | |
| 4966 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4967 | + | |
| 4968 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 4969 | +function _unsupportedIterableToArray(r, a) { | |
| 4970 | + if (r) { | |
| 4971 | + if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 4972 | + var t = {}.toString.call(r).slice(8, -1); | |
| 4973 | + 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; | |
| 4974 | + } | |
| 4975 | +} | |
| 4976 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 4977 | + | |
| 4978 | +/***/ }), | |
| 4979 | + | |
| 4980 | +/***/ "../node_modules/@babel/runtime/regenerator/index.js": | |
| 4981 | +/*!***********************************************************!*\ | |
| 4982 | + !*** ../node_modules/@babel/runtime/regenerator/index.js ***! | |
| 4983 | + \***********************************************************/ | |
| 4984 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4985 | + | |
| 4986 | +// TODO(Babel 8): Remove this file. | |
| 4987 | + | |
| 4988 | +var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")(); | |
| 4989 | +module.exports = runtime; | |
| 4990 | + | |
| 4991 | +// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= | |
| 4992 | +try { | |
| 4993 | + regeneratorRuntime = runtime; | |
| 4994 | +} catch (accidentalStrictMode) { | |
| 4995 | + if (typeof globalThis === "object") { | |
| 4996 | + globalThis.regeneratorRuntime = runtime; | |
| 4997 | + } else { | |
| 4998 | + Function("r", "regeneratorRuntime = r")(runtime); | |
| 4999 | + } | |
| 5000 | +} | |
| 5001 | + | |
| 5002 | + | |
| 5003 | +/***/ }), | |
| 5004 | + | |
| 5005 | +/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs": | |
| 5006 | +/*!**************************************************************************!*\ | |
| 5007 | + !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***! | |
| 5008 | + \**************************************************************************/ | |
| 5009 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5010 | + | |
| 5011 | +"use strict"; | |
| 5012 | + | |
| 5013 | +var __defProp = Object.defineProperty; | |
| 5014 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5015 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5016 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5017 | +var __export = (target, all) => { | |
| 5018 | + for (var name in all) | |
| 5019 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5020 | +}; | |
| 5021 | +var __copyProps = (to, from, except, desc) => { | |
| 5022 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5023 | + for (let key of __getOwnPropNames(from)) | |
| 5024 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5025 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5026 | + } | |
| 5027 | + return to; | |
| 5028 | +}; | |
| 5029 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5030 | + | |
| 5031 | +// src/focusManager.ts | |
| 5032 | +var focusManager_exports = {}; | |
| 5033 | +__export(focusManager_exports, { | |
| 5034 | + FocusManager: () => FocusManager, | |
| 5035 | + focusManager: () => focusManager | |
| 5036 | +}); | |
| 5037 | +module.exports = __toCommonJS(focusManager_exports); | |
| 5038 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 5039 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5040 | +var FocusManager = class extends import_subscribable.Subscribable { | |
| 5041 | + #focused; | |
| 5042 | + #cleanup; | |
| 5043 | + #setup; | |
| 5044 | + constructor() { | |
| 5045 | + super(); | |
| 5046 | + this.#setup = (onFocus) => { | |
| 5047 | + if (!import_utils.isServer && window.addEventListener) { | |
| 5048 | + const listener = () => onFocus(); | |
| 5049 | + window.addEventListener("visibilitychange", listener, false); | |
| 5050 | + return () => { | |
| 5051 | + window.removeEventListener("visibilitychange", listener); | |
| 5052 | + }; | |
| 5053 | + } | |
| 5054 | + return; | |
| 5055 | + }; | |
| 5056 | + } | |
| 5057 | + onSubscribe() { | |
| 5058 | + if (!this.#cleanup) { | |
| 5059 | + this.setEventListener(this.#setup); | |
| 5060 | + } | |
| 5061 | + } | |
| 5062 | + onUnsubscribe() { | |
| 5063 | + if (!this.hasListeners()) { | |
| 5064 | + this.#cleanup?.(); | |
| 5065 | + this.#cleanup = void 0; | |
| 5066 | + } | |
| 5067 | + } | |
| 5068 | + setEventListener(setup) { | |
| 5069 | + this.#setup = setup; | |
| 5070 | + this.#cleanup?.(); | |
| 5071 | + this.#cleanup = setup((focused) => { | |
| 5072 | + if (typeof focused === "boolean") { | |
| 5073 | + this.setFocused(focused); | |
| 5074 | + } else { | |
| 5075 | + this.onFocus(); | |
| 5076 | + } | |
| 5077 | + }); | |
| 5078 | + } | |
| 5079 | + setFocused(focused) { | |
| 5080 | + const changed = this.#focused !== focused; | |
| 5081 | + if (changed) { | |
| 5082 | + this.#focused = focused; | |
| 5083 | + this.onFocus(); | |
| 5084 | + } | |
| 5085 | + } | |
| 5086 | + onFocus() { | |
| 5087 | + const isFocused = this.isFocused(); | |
| 5088 | + this.listeners.forEach((listener) => { | |
| 5089 | + listener(isFocused); | |
| 5090 | + }); | |
| 5091 | + } | |
| 5092 | + isFocused() { | |
| 5093 | + if (typeof this.#focused === "boolean") { | |
| 5094 | + return this.#focused; | |
| 5095 | + } | |
| 5096 | + return globalThis.document?.visibilityState !== "hidden"; | |
| 5097 | + } | |
| 5098 | +}; | |
| 5099 | +var focusManager = new FocusManager(); | |
| 5100 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5101 | +0 && (0); | |
| 5102 | +//# sourceMappingURL=focusManager.cjs.map | |
| 5103 | + | |
| 5104 | +/***/ }), | |
| 5105 | + | |
| 5106 | +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs": | |
| 5107 | +/*!***********************************************************************!*\ | |
| 5108 | + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***! | |
| 5109 | + \***********************************************************************/ | |
| 5110 | +/***/ ((module) => { | |
| 5111 | + | |
| 5112 | +"use strict"; | |
| 5113 | + | |
| 5114 | +var __defProp = Object.defineProperty; | |
| 5115 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5116 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5117 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5118 | +var __export = (target, all) => { | |
| 5119 | + for (var name in all) | |
| 5120 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5121 | +}; | |
| 5122 | +var __copyProps = (to, from, except, desc) => { | |
| 5123 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5124 | + for (let key of __getOwnPropNames(from)) | |
| 5125 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5126 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5127 | + } | |
| 5128 | + return to; | |
| 5129 | +}; | |
| 5130 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5131 | + | |
| 5132 | +// src/hydration.ts | |
| 5133 | +var hydration_exports = {}; | |
| 5134 | +__export(hydration_exports, { | |
| 5135 | + defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation, | |
| 5136 | + defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery, | |
| 5137 | + dehydrate: () => dehydrate, | |
| 5138 | + hydrate: () => hydrate | |
| 5139 | +}); | |
| 5140 | +module.exports = __toCommonJS(hydration_exports); | |
| 5141 | +function defaultTransformerFn(data) { | |
| 5142 | + return data; | |
| 5143 | +} | |
| 5144 | +function dehydrateMutation(mutation) { | |
| 5145 | + return { | |
| 5146 | + mutationKey: mutation.options.mutationKey, | |
| 5147 | + state: mutation.state, | |
| 5148 | + ...mutation.options.scope && { scope: mutation.options.scope }, | |
| 5149 | + ...mutation.meta && { meta: mutation.meta } | |
| 5150 | + }; | |
| 5151 | +} | |
| 5152 | +function dehydrateQuery(query, serializeData) { | |
| 5153 | + return { | |
| 5154 | + state: { | |
| 5155 | + ...query.state, | |
| 5156 | + ...query.state.data !== void 0 && { | |
| 5157 | + data: serializeData(query.state.data) | |
| 5158 | + } | |
| 5159 | + }, | |
| 5160 | + queryKey: query.queryKey, | |
| 5161 | + queryHash: query.queryHash, | |
| 5162 | + ...query.state.status === "pending" && { | |
| 5163 | + promise: query.promise?.then(serializeData).catch((error) => { | |
| 5164 | + if (true) { | |
| 5165 | + console.error( | |
| 5166 | + `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds` | |
| 5167 | + ); | |
| 5168 | + } | |
| 5169 | + return Promise.reject(new Error("redacted")); | |
| 5170 | + }) | |
| 5171 | + }, | |
| 5172 | + ...query.meta && { meta: query.meta } | |
| 5173 | + }; | |
| 5174 | +} | |
| 5175 | +function defaultShouldDehydrateMutation(mutation) { | |
| 5176 | + return mutation.state.isPaused; | |
| 5177 | +} | |
| 5178 | +function defaultShouldDehydrateQuery(query) { | |
| 5179 | + return query.state.status === "success"; | |
| 5180 | +} | |
| 5181 | +function dehydrate(client, options = {}) { | |
| 5182 | + const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation; | |
| 5183 | + const mutations = client.getMutationCache().getAll().flatMap( | |
| 5184 | + (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : [] | |
| 5185 | + ); | |
| 5186 | + const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery; | |
| 5187 | + const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn; | |
| 5188 | + const queries = client.getQueryCache().getAll().flatMap( | |
| 5189 | + (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : [] | |
| 5190 | + ); | |
| 5191 | + return { mutations, queries }; | |
| 5192 | +} | |
| 5193 | +function hydrate(client, dehydratedState, options) { | |
| 5194 | + if (typeof dehydratedState !== "object" || dehydratedState === null) { | |
| 5195 | + return; | |
| 5196 | + } | |
| 5197 | + const mutationCache = client.getMutationCache(); | |
| 5198 | + const queryCache = client.getQueryCache(); | |
| 5199 | + const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn; | |
| 5200 | + const mutations = dehydratedState.mutations || []; | |
| 5201 | + const queries = dehydratedState.queries || []; | |
| 5202 | + mutations.forEach(({ state, ...mutationOptions }) => { | |
| 5203 | + mutationCache.build( | |
| 5204 | + client, | |
| 5205 | + { | |
| 5206 | + ...client.getDefaultOptions().hydrate?.mutations, | |
| 5207 | + ...options?.defaultOptions?.mutations, | |
| 5208 | + ...mutationOptions | |
| 5209 | + }, | |
| 5210 | + state | |
| 5211 | + ); | |
| 5212 | + }); | |
| 5213 | + queries.forEach(({ queryKey, state, queryHash, meta, promise }) => { | |
| 5214 | + let query = queryCache.get(queryHash); | |
| 5215 | + const data = state.data === void 0 ? state.data : deserializeData(state.data); | |
| 5216 | + if (query) { | |
| 5217 | + if (query.state.dataUpdatedAt < state.dataUpdatedAt) { | |
| 5218 | + const { fetchStatus: _ignored, ...serializedState } = state; | |
| 5219 | + query.setState({ | |
| 5220 | + ...serializedState, | |
| 5221 | + data | |
| 5222 | + }); | |
| 5223 | + } | |
| 5224 | + } else { | |
| 5225 | + query = queryCache.build( | |
| 5226 | + client, | |
| 5227 | + { | |
| 5228 | + ...client.getDefaultOptions().hydrate?.queries, | |
| 5229 | + ...options?.defaultOptions?.queries, | |
| 5230 | + queryKey, | |
| 5231 | + queryHash, | |
| 5232 | + meta | |
| 5233 | + }, | |
| 5234 | + // Reset fetch status to idle to avoid | |
| 5235 | + // query being stuck in fetching state upon hydration | |
| 5236 | + { | |
| 5237 | + ...state, | |
| 5238 | + data, | |
| 5239 | + fetchStatus: "idle" | |
| 5240 | + } | |
| 5241 | + ); | |
| 5242 | + } | |
| 5243 | + if (promise) { | |
| 5244 | + const initialPromise = Promise.resolve(promise).then(deserializeData); | |
| 5245 | + void query.fetch(void 0, { initialPromise }); | |
| 5246 | + } | |
| 5247 | + }); | |
| 5248 | +} | |
| 5249 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5250 | +0 && (0); | |
| 5251 | +//# sourceMappingURL=hydration.cjs.map | |
| 5252 | + | |
| 5253 | +/***/ }), | |
| 5254 | + | |
| 5255 | +/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs": | |
| 5256 | +/*!*******************************************************************!*\ | |
| 5257 | + !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***! | |
| 5258 | + \*******************************************************************/ | |
| 5259 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5260 | + | |
| 5261 | +"use strict"; | |
| 5262 | + | |
| 5263 | +var __defProp = Object.defineProperty; | |
| 5264 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5265 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5266 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5267 | +var __export = (target, all) => { | |
| 5268 | + for (var name in all) | |
| 5269 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5270 | +}; | |
| 5271 | +var __copyProps = (to, from, except, desc) => { | |
| 5272 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5273 | + for (let key of __getOwnPropNames(from)) | |
| 5274 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5275 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5276 | + } | |
| 5277 | + return to; | |
| 5278 | +}; | |
| 5279 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 5280 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5281 | + | |
| 5282 | +// src/index.ts | |
| 5283 | +var src_exports = {}; | |
| 5284 | +__export(src_exports, { | |
| 5285 | + CancelledError: () => import_retryer.CancelledError, | |
| 5286 | + InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver, | |
| 5287 | + MutationCache: () => import_mutationCache.MutationCache, | |
| 5288 | + MutationObserver: () => import_mutationObserver.MutationObserver, | |
| 5289 | + QueriesObserver: () => import_queriesObserver.QueriesObserver, | |
| 5290 | + Query: () => import_query.Query, | |
| 5291 | + QueryCache: () => import_queryCache.QueryCache, | |
| 5292 | + QueryClient: () => import_queryClient.QueryClient, | |
| 5293 | + QueryObserver: () => import_queryObserver.QueryObserver, | |
| 5294 | + defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation, | |
| 5295 | + defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery, | |
| 5296 | + dehydrate: () => import_hydration.dehydrate, | |
| 5297 | + focusManager: () => import_focusManager.focusManager, | |
| 5298 | + hashKey: () => import_utils.hashKey, | |
| 5299 | + hydrate: () => import_hydration.hydrate, | |
| 5300 | + isCancelledError: () => import_retryer2.isCancelledError, | |
| 5301 | + isServer: () => import_utils.isServer, | |
| 5302 | + keepPreviousData: () => import_utils.keepPreviousData, | |
| 5303 | + matchMutation: () => import_utils.matchMutation, | |
| 5304 | + matchQuery: () => import_utils.matchQuery, | |
| 5305 | + notifyManager: () => import_notifyManager.notifyManager, | |
| 5306 | + onlineManager: () => import_onlineManager.onlineManager, | |
| 5307 | + replaceEqualDeep: () => import_utils.replaceEqualDeep, | |
| 5308 | + skipToken: () => import_utils.skipToken | |
| 5309 | +}); | |
| 5310 | +module.exports = __toCommonJS(src_exports); | |
| 5311 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5312 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 5313 | +var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs"); | |
| 5314 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 5315 | +var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs"); | |
| 5316 | +var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs"); | |
| 5317 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 5318 | +var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs"); | |
| 5319 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5320 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 5321 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 5322 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5323 | +var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5324 | +var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs"); | |
| 5325 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports); | |
| 5326 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 5327 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5328 | +0 && (0); | |
| 5329 | +//# sourceMappingURL=index.cjs.map | |
| 5330 | + | |
| 5331 | +/***/ }), | |
| 5332 | + | |
| 5333 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs": | |
| 5334 | +/*!***********************************************************************************!*\ | |
| 5335 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***! | |
| 5336 | + \***********************************************************************************/ | |
| 5337 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5338 | + | |
| 5339 | +"use strict"; | |
| 5340 | + | |
| 5341 | +var __defProp = Object.defineProperty; | |
| 5342 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5343 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5344 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5345 | +var __export = (target, all) => { | |
| 5346 | + for (var name in all) | |
| 5347 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5348 | +}; | |
| 5349 | +var __copyProps = (to, from, except, desc) => { | |
| 5350 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5351 | + for (let key of __getOwnPropNames(from)) | |
| 5352 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5353 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5354 | + } | |
| 5355 | + return to; | |
| 5356 | +}; | |
| 5357 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5358 | + | |
| 5359 | +// src/infiniteQueryBehavior.ts | |
| 5360 | +var infiniteQueryBehavior_exports = {}; | |
| 5361 | +__export(infiniteQueryBehavior_exports, { | |
| 5362 | + hasNextPage: () => hasNextPage, | |
| 5363 | + hasPreviousPage: () => hasPreviousPage, | |
| 5364 | + infiniteQueryBehavior: () => infiniteQueryBehavior | |
| 5365 | +}); | |
| 5366 | +module.exports = __toCommonJS(infiniteQueryBehavior_exports); | |
| 5367 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5368 | +function infiniteQueryBehavior(pages) { | |
| 5369 | + return { | |
| 5370 | + onFetch: (context, query) => { | |
| 5371 | + const fetchFn = async () => { | |
| 5372 | + const options = context.options; | |
| 5373 | + const direction = context.fetchOptions?.meta?.fetchMore?.direction; | |
| 5374 | + const oldPages = context.state.data?.pages || []; | |
| 5375 | + const oldPageParams = context.state.data?.pageParams || []; | |
| 5376 | + const empty = { pages: [], pageParams: [] }; | |
| 5377 | + let cancelled = false; | |
| 5378 | + const addSignalProperty = (object) => { | |
| 5379 | + Object.defineProperty(object, "signal", { | |
| 5380 | + enumerable: true, | |
| 5381 | + get: () => { | |
| 5382 | + if (context.signal.aborted) { | |
| 5383 | + cancelled = true; | |
| 5384 | + } else { | |
| 5385 | + context.signal.addEventListener("abort", () => { | |
| 5386 | + cancelled = true; | |
| 5387 | + }); | |
| 5388 | + } | |
| 5389 | + return context.signal; | |
| 5390 | + } | |
| 5391 | + }); | |
| 5392 | + }; | |
| 5393 | + const queryFn = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions); | |
| 5394 | + const fetchPage = async (data, param, previous) => { | |
| 5395 | + if (cancelled) { | |
| 5396 | + return Promise.reject(); | |
| 5397 | + } | |
| 5398 | + if (param == null && data.pages.length) { | |
| 5399 | + return Promise.resolve(data); | |
| 5400 | + } | |
| 5401 | + const queryFnContext = { | |
| 5402 | + queryKey: context.queryKey, | |
| 5403 | + pageParam: param, | |
| 5404 | + direction: previous ? "backward" : "forward", | |
| 5405 | + meta: context.options.meta | |
| 5406 | + }; | |
| 5407 | + addSignalProperty(queryFnContext); | |
| 5408 | + const page = await queryFn( | |
| 5409 | + queryFnContext | |
| 5410 | + ); | |
| 5411 | + const { maxPages } = context.options; | |
| 5412 | + const addTo = previous ? import_utils.addToStart : import_utils.addToEnd; | |
| 5413 | + return { | |
| 5414 | + pages: addTo(data.pages, page, maxPages), | |
| 5415 | + pageParams: addTo(data.pageParams, param, maxPages) | |
| 5416 | + }; | |
| 5417 | + }; | |
| 5418 | + let result; | |
| 5419 | + if (direction && oldPages.length) { | |
| 5420 | + const previous = direction === "backward"; | |
| 5421 | + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam; | |
| 5422 | + const oldData = { | |
| 5423 | + pages: oldPages, | |
| 5424 | + pageParams: oldPageParams | |
| 5425 | + }; | |
| 5426 | + const param = pageParamFn(options, oldData); | |
| 5427 | + result = await fetchPage(oldData, param, previous); | |
| 5428 | + } else { | |
| 5429 | + result = await fetchPage( | |
| 5430 | + empty, | |
| 5431 | + oldPageParams[0] ?? options.initialPageParam | |
| 5432 | + ); | |
| 5433 | + const remainingPages = pages ?? oldPages.length; | |
| 5434 | + for (let i = 1; i < remainingPages; i++) { | |
| 5435 | + const param = getNextPageParam(options, result); | |
| 5436 | + result = await fetchPage(result, param); | |
| 5437 | + } | |
| 5438 | + } | |
| 5439 | + return result; | |
| 5440 | + }; | |
| 5441 | + if (context.options.persister) { | |
| 5442 | + context.fetchFn = () => { | |
| 5443 | + return context.options.persister?.( | |
| 5444 | + fetchFn, | |
| 5445 | + { | |
| 5446 | + queryKey: context.queryKey, | |
| 5447 | + meta: context.options.meta, | |
| 5448 | + signal: context.signal | |
| 5449 | + }, | |
| 5450 | + query | |
| 5451 | + ); | |
| 5452 | + }; | |
| 5453 | + } else { | |
| 5454 | + context.fetchFn = fetchFn; | |
| 5455 | + } | |
| 5456 | + } | |
| 5457 | + }; | |
| 5458 | +} | |
| 5459 | +function getNextPageParam(options, { pages, pageParams }) { | |
| 5460 | + const lastIndex = pages.length - 1; | |
| 5461 | + return options.getNextPageParam( | |
| 5462 | + pages[lastIndex], | |
| 5463 | + pages, | |
| 5464 | + pageParams[lastIndex], | |
| 5465 | + pageParams | |
| 5466 | + ); | |
| 5467 | +} | |
| 5468 | +function getPreviousPageParam(options, { pages, pageParams }) { | |
| 5469 | + return options.getPreviousPageParam?.( | |
| 5470 | + pages[0], | |
| 5471 | + pages, | |
| 5472 | + pageParams[0], | |
| 5473 | + pageParams | |
| 5474 | + ); | |
| 5475 | +} | |
| 5476 | +function hasNextPage(options, data) { | |
| 5477 | + if (!data) | |
| 5478 | + return false; | |
| 5479 | + return getNextPageParam(options, data) != null; | |
| 5480 | +} | |
| 5481 | +function hasPreviousPage(options, data) { | |
| 5482 | + if (!data || !options.getPreviousPageParam) | |
| 5483 | + return false; | |
| 5484 | + return getPreviousPageParam(options, data) != null; | |
| 5485 | +} | |
| 5486 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5487 | +0 && (0); | |
| 5488 | +//# sourceMappingURL=infiniteQueryBehavior.cjs.map | |
| 5489 | + | |
| 5490 | +/***/ }), | |
| 5491 | + | |
| 5492 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs": | |
| 5493 | +/*!***********************************************************************************!*\ | |
| 5494 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***! | |
| 5495 | + \***********************************************************************************/ | |
| 5496 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5497 | + | |
| 5498 | +"use strict"; | |
| 5499 | + | |
| 5500 | +var __defProp = Object.defineProperty; | |
| 5501 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5502 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5503 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5504 | +var __export = (target, all) => { | |
| 5505 | + for (var name in all) | |
| 5506 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5507 | +}; | |
| 5508 | +var __copyProps = (to, from, except, desc) => { | |
| 5509 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5510 | + for (let key of __getOwnPropNames(from)) | |
| 5511 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5512 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5513 | + } | |
| 5514 | + return to; | |
| 5515 | +}; | |
| 5516 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5517 | + | |
| 5518 | +// src/infiniteQueryObserver.ts | |
| 5519 | +var infiniteQueryObserver_exports = {}; | |
| 5520 | +__export(infiniteQueryObserver_exports, { | |
| 5521 | + InfiniteQueryObserver: () => InfiniteQueryObserver | |
| 5522 | +}); | |
| 5523 | +module.exports = __toCommonJS(infiniteQueryObserver_exports); | |
| 5524 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 5525 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 5526 | +var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver { | |
| 5527 | + constructor(client, options) { | |
| 5528 | + super(client, options); | |
| 5529 | + } | |
| 5530 | + bindMethods() { | |
| 5531 | + super.bindMethods(); | |
| 5532 | + this.fetchNextPage = this.fetchNextPage.bind(this); | |
| 5533 | + this.fetchPreviousPage = this.fetchPreviousPage.bind(this); | |
| 5534 | + } | |
| 5535 | + setOptions(options, notifyOptions) { | |
| 5536 | + super.setOptions( | |
| 5537 | + { | |
| 5538 | + ...options, | |
| 5539 | + behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)() | |
| 5540 | + }, | |
| 5541 | + notifyOptions | |
| 5542 | + ); | |
| 5543 | + } | |
| 5544 | + getOptimisticResult(options) { | |
| 5545 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(); | |
| 5546 | + return super.getOptimisticResult(options); | |
| 5547 | + } | |
| 5548 | + fetchNextPage(options) { | |
| 5549 | + return this.fetch({ | |
| 5550 | + ...options, | |
| 5551 | + meta: { | |
| 5552 | + fetchMore: { direction: "forward" } | |
| 5553 | + } | |
| 5554 | + }); | |
| 5555 | + } | |
| 5556 | + fetchPreviousPage(options) { | |
| 5557 | + return this.fetch({ | |
| 5558 | + ...options, | |
| 5559 | + meta: { | |
| 5560 | + fetchMore: { direction: "backward" } | |
| 5561 | + } | |
| 5562 | + }); | |
| 5563 | + } | |
| 5564 | + createResult(query, options) { | |
| 5565 | + const { state } = query; | |
| 5566 | + const parentResult = super.createResult(query, options); | |
| 5567 | + const { isFetching, isRefetching, isError, isRefetchError } = parentResult; | |
| 5568 | + const fetchDirection = state.fetchMeta?.fetchMore?.direction; | |
| 5569 | + const isFetchNextPageError = isError && fetchDirection === "forward"; | |
| 5570 | + const isFetchingNextPage = isFetching && fetchDirection === "forward"; | |
| 5571 | + const isFetchPreviousPageError = isError && fetchDirection === "backward"; | |
| 5572 | + const isFetchingPreviousPage = isFetching && fetchDirection === "backward"; | |
| 5573 | + const result = { | |
| 5574 | + ...parentResult, | |
| 5575 | + fetchNextPage: this.fetchNextPage, | |
| 5576 | + fetchPreviousPage: this.fetchPreviousPage, | |
| 5577 | + hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data), | |
| 5578 | + hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data), | |
| 5579 | + isFetchNextPageError, | |
| 5580 | + isFetchingNextPage, | |
| 5581 | + isFetchPreviousPageError, | |
| 5582 | + isFetchingPreviousPage, | |
| 5583 | + isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError, | |
| 5584 | + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage | |
| 5585 | + }; | |
| 5586 | + return result; | |
| 5587 | + } | |
| 5588 | +}; | |
| 5589 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5590 | +0 && (0); | |
| 5591 | +//# sourceMappingURL=infiniteQueryObserver.cjs.map | |
| 5592 | + | |
| 5593 | +/***/ }), | |
| 5594 | + | |
| 5595 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs": | |
| 5596 | +/*!**********************************************************************!*\ | |
| 5597 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***! | |
| 5598 | + \**********************************************************************/ | |
| 5599 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5600 | + | |
| 5601 | +"use strict"; | |
| 5602 | + | |
| 5603 | +var __defProp = Object.defineProperty; | |
| 5604 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5605 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5606 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5607 | +var __export = (target, all) => { | |
| 5608 | + for (var name in all) | |
| 5609 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5610 | +}; | |
| 5611 | +var __copyProps = (to, from, except, desc) => { | |
| 5612 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5613 | + for (let key of __getOwnPropNames(from)) | |
| 5614 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5615 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5616 | + } | |
| 5617 | + return to; | |
| 5618 | +}; | |
| 5619 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5620 | + | |
| 5621 | +// src/mutation.ts | |
| 5622 | +var mutation_exports = {}; | |
| 5623 | +__export(mutation_exports, { | |
| 5624 | + Mutation: () => Mutation, | |
| 5625 | + getDefaultState: () => getDefaultState | |
| 5626 | +}); | |
| 5627 | +module.exports = __toCommonJS(mutation_exports); | |
| 5628 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5629 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 5630 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 5631 | +var Mutation = class extends import_removable.Removable { | |
| 5632 | + #observers; | |
| 5633 | + #mutationCache; | |
| 5634 | + #retryer; | |
| 5635 | + constructor(config) { | |
| 5636 | + super(); | |
| 5637 | + this.mutationId = config.mutationId; | |
| 5638 | + this.#mutationCache = config.mutationCache; | |
| 5639 | + this.#observers = []; | |
| 5640 | + this.state = config.state || getDefaultState(); | |
| 5641 | + this.setOptions(config.options); | |
| 5642 | + this.scheduleGc(); | |
| 5643 | + } | |
| 5644 | + setOptions(options) { | |
| 5645 | + this.options = options; | |
| 5646 | + this.updateGcTime(this.options.gcTime); | |
| 5647 | + } | |
| 5648 | + get meta() { | |
| 5649 | + return this.options.meta; | |
| 5650 | + } | |
| 5651 | + addObserver(observer) { | |
| 5652 | + if (!this.#observers.includes(observer)) { | |
| 5653 | + this.#observers.push(observer); | |
| 5654 | + this.clearGcTimeout(); | |
| 5655 | + this.#mutationCache.notify({ | |
| 5656 | + type: "observerAdded", | |
| 5657 | + mutation: this, | |
| 5658 | + observer | |
| 5659 | + }); | |
| 5660 | + } | |
| 5661 | + } | |
| 5662 | + removeObserver(observer) { | |
| 5663 | + this.#observers = this.#observers.filter((x) => x !== observer); | |
| 5664 | + this.scheduleGc(); | |
| 5665 | + this.#mutationCache.notify({ | |
| 5666 | + type: "observerRemoved", | |
| 5667 | + mutation: this, | |
| 5668 | + observer | |
| 5669 | + }); | |
| 5670 | + } | |
| 5671 | + optionalRemove() { | |
| 5672 | + if (!this.#observers.length) { | |
| 5673 | + if (this.state.status === "pending") { | |
| 5674 | + this.scheduleGc(); | |
| 5675 | + } else { | |
| 5676 | + this.#mutationCache.remove(this); | |
| 5677 | + } | |
| 5678 | + } | |
| 5679 | + } | |
| 5680 | + continue() { | |
| 5681 | + return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before | |
| 5682 | + this.execute(this.state.variables); | |
| 5683 | + } | |
| 5684 | + async execute(variables) { | |
| 5685 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 5686 | + fn: () => { | |
| 5687 | + if (!this.options.mutationFn) { | |
| 5688 | + return Promise.reject(new Error("No mutationFn found")); | |
| 5689 | + } | |
| 5690 | + return this.options.mutationFn(variables); | |
| 5691 | + }, | |
| 5692 | + onFail: (failureCount, error) => { | |
| 5693 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 5694 | + }, | |
| 5695 | + onPause: () => { | |
| 5696 | + this.#dispatch({ type: "pause" }); | |
| 5697 | + }, | |
| 5698 | + onContinue: () => { | |
| 5699 | + this.#dispatch({ type: "continue" }); | |
| 5700 | + }, | |
| 5701 | + retry: this.options.retry ?? 0, | |
| 5702 | + retryDelay: this.options.retryDelay, | |
| 5703 | + networkMode: this.options.networkMode, | |
| 5704 | + canRun: () => this.#mutationCache.canRun(this) | |
| 5705 | + }); | |
| 5706 | + const restored = this.state.status === "pending"; | |
| 5707 | + const isPaused = !this.#retryer.canStart(); | |
| 5708 | + try { | |
| 5709 | + if (!restored) { | |
| 5710 | + this.#dispatch({ type: "pending", variables, isPaused }); | |
| 5711 | + await this.#mutationCache.config.onMutate?.( | |
| 5712 | + variables, | |
| 5713 | + this | |
| 5714 | + ); | |
| 5715 | + const context = await this.options.onMutate?.(variables); | |
| 5716 | + if (context !== this.state.context) { | |
| 5717 | + this.#dispatch({ | |
| 5718 | + type: "pending", | |
| 5719 | + context, | |
| 5720 | + variables, | |
| 5721 | + isPaused | |
| 5722 | + }); | |
| 5723 | + } | |
| 5724 | + } | |
| 5725 | + const data = await this.#retryer.start(); | |
| 5726 | + await this.#mutationCache.config.onSuccess?.( | |
| 5727 | + data, | |
| 5728 | + variables, | |
| 5729 | + this.state.context, | |
| 5730 | + this | |
| 5731 | + ); | |
| 5732 | + await this.options.onSuccess?.(data, variables, this.state.context); | |
| 5733 | + await this.#mutationCache.config.onSettled?.( | |
| 5734 | + data, | |
| 5735 | + null, | |
| 5736 | + this.state.variables, | |
| 5737 | + this.state.context, | |
| 5738 | + this | |
| 5739 | + ); | |
| 5740 | + await this.options.onSettled?.(data, null, variables, this.state.context); | |
| 5741 | + this.#dispatch({ type: "success", data }); | |
| 5742 | + return data; | |
| 5743 | + } catch (error) { | |
| 5744 | + try { | |
| 5745 | + await this.#mutationCache.config.onError?.( | |
| 5746 | + error, | |
| 5747 | + variables, | |
| 5748 | + this.state.context, | |
| 5749 | + this | |
| 5750 | + ); | |
| 5751 | + await this.options.onError?.( | |
| 5752 | + error, | |
| 5753 | + variables, | |
| 5754 | + this.state.context | |
| 5755 | + ); | |
| 5756 | + await this.#mutationCache.config.onSettled?.( | |
| 5757 | + void 0, | |
| 5758 | + error, | |
| 5759 | + this.state.variables, | |
| 5760 | + this.state.context, | |
| 5761 | + this | |
| 5762 | + ); | |
| 5763 | + await this.options.onSettled?.( | |
| 5764 | + void 0, | |
| 5765 | + error, | |
| 5766 | + variables, | |
| 5767 | + this.state.context | |
| 5768 | + ); | |
| 5769 | + throw error; | |
| 5770 | + } finally { | |
| 5771 | + this.#dispatch({ type: "error", error }); | |
| 5772 | + } | |
| 5773 | + } finally { | |
| 5774 | + this.#mutationCache.runNext(this); | |
| 5775 | + } | |
| 5776 | + } | |
| 5777 | + #dispatch(action) { | |
| 5778 | + const reducer = (state) => { | |
| 5779 | + switch (action.type) { | |
| 5780 | + case "failed": | |
| 5781 | + return { | |
| 5782 | + ...state, | |
| 5783 | + failureCount: action.failureCount, | |
| 5784 | + failureReason: action.error | |
| 5785 | + }; | |
| 5786 | + case "pause": | |
| 5787 | + return { | |
| 5788 | + ...state, | |
| 5789 | + isPaused: true | |
| 5790 | + }; | |
| 5791 | + case "continue": | |
| 5792 | + return { | |
| 5793 | + ...state, | |
| 5794 | + isPaused: false | |
| 5795 | + }; | |
| 5796 | + case "pending": | |
| 5797 | + return { | |
| 5798 | + ...state, | |
| 5799 | + context: action.context, | |
| 5800 | + data: void 0, | |
| 5801 | + failureCount: 0, | |
| 5802 | + failureReason: null, | |
| 5803 | + error: null, | |
| 5804 | + isPaused: action.isPaused, | |
| 5805 | + status: "pending", | |
| 5806 | + variables: action.variables, | |
| 5807 | + submittedAt: Date.now() | |
| 5808 | + }; | |
| 5809 | + case "success": | |
| 5810 | + return { | |
| 5811 | + ...state, | |
| 5812 | + data: action.data, | |
| 5813 | + failureCount: 0, | |
| 5814 | + failureReason: null, | |
| 5815 | + error: null, | |
| 5816 | + status: "success", | |
| 5817 | + isPaused: false | |
| 5818 | + }; | |
| 5819 | + case "error": | |
| 5820 | + return { | |
| 5821 | + ...state, | |
| 5822 | + data: void 0, | |
| 5823 | + error: action.error, | |
| 5824 | + failureCount: state.failureCount + 1, | |
| 5825 | + failureReason: action.error, | |
| 5826 | + isPaused: false, | |
| 5827 | + status: "error" | |
| 5828 | + }; | |
| 5829 | + } | |
| 5830 | + }; | |
| 5831 | + this.state = reducer(this.state); | |
| 5832 | + import_notifyManager.notifyManager.batch(() => { | |
| 5833 | + this.#observers.forEach((observer) => { | |
| 5834 | + observer.onMutationUpdate(action); | |
| 5835 | + }); | |
| 5836 | + this.#mutationCache.notify({ | |
| 5837 | + mutation: this, | |
| 5838 | + type: "updated", | |
| 5839 | + action | |
| 5840 | + }); | |
| 5841 | + }); | |
| 5842 | + } | |
| 5843 | +}; | |
| 5844 | +function getDefaultState() { | |
| 5845 | + return { | |
| 5846 | + context: void 0, | |
| 5847 | + data: void 0, | |
| 5848 | + error: null, | |
| 5849 | + failureCount: 0, | |
| 5850 | + failureReason: null, | |
| 5851 | + isPaused: false, | |
| 5852 | + status: "idle", | |
| 5853 | + variables: void 0, | |
| 5854 | + submittedAt: 0 | |
| 5855 | + }; | |
| 5856 | +} | |
| 5857 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5858 | +0 && (0); | |
| 5859 | +//# sourceMappingURL=mutation.cjs.map | |
| 5860 | + | |
| 5861 | +/***/ }), | |
| 5862 | + | |
| 5863 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs": | |
| 5864 | +/*!***************************************************************************!*\ | |
| 5865 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***! | |
| 5866 | + \***************************************************************************/ | |
| 5867 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5868 | + | |
| 5869 | +"use strict"; | |
| 5870 | + | |
| 5871 | +var __defProp = Object.defineProperty; | |
| 5872 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5873 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5874 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5875 | +var __export = (target, all) => { | |
| 5876 | + for (var name in all) | |
| 5877 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5878 | +}; | |
| 5879 | +var __copyProps = (to, from, except, desc) => { | |
| 5880 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5881 | + for (let key of __getOwnPropNames(from)) | |
| 5882 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5883 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5884 | + } | |
| 5885 | + return to; | |
| 5886 | +}; | |
| 5887 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5888 | + | |
| 5889 | +// src/mutationCache.ts | |
| 5890 | +var mutationCache_exports = {}; | |
| 5891 | +__export(mutationCache_exports, { | |
| 5892 | + MutationCache: () => MutationCache | |
| 5893 | +}); | |
| 5894 | +module.exports = __toCommonJS(mutationCache_exports); | |
| 5895 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 5896 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 5897 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 5898 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 5899 | +var MutationCache = class extends import_subscribable.Subscribable { | |
| 5900 | + constructor(config = {}) { | |
| 5901 | + super(); | |
| 5902 | + this.config = config; | |
| 5903 | + this.#mutations = /* @__PURE__ */ new Map(); | |
| 5904 | + this.#mutationId = Date.now(); | |
| 5905 | + } | |
| 5906 | + #mutations; | |
| 5907 | + #mutationId; | |
| 5908 | + build(client, options, state) { | |
| 5909 | + const mutation = new import_mutation.Mutation({ | |
| 5910 | + mutationCache: this, | |
| 5911 | + mutationId: ++this.#mutationId, | |
| 5912 | + options: client.defaultMutationOptions(options), | |
| 5913 | + state | |
| 5914 | + }); | |
| 5915 | + this.add(mutation); | |
| 5916 | + return mutation; | |
| 5917 | + } | |
| 5918 | + add(mutation) { | |
| 5919 | + const scope = scopeFor(mutation); | |
| 5920 | + const mutations = this.#mutations.get(scope) ?? []; | |
| 5921 | + mutations.push(mutation); | |
| 5922 | + this.#mutations.set(scope, mutations); | |
| 5923 | + this.notify({ type: "added", mutation }); | |
| 5924 | + } | |
| 5925 | + remove(mutation) { | |
| 5926 | + const scope = scopeFor(mutation); | |
| 5927 | + if (this.#mutations.has(scope)) { | |
| 5928 | + const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation); | |
| 5929 | + if (mutations) { | |
| 5930 | + if (mutations.length === 0) { | |
| 5931 | + this.#mutations.delete(scope); | |
| 5932 | + } else { | |
| 5933 | + this.#mutations.set(scope, mutations); | |
| 5934 | + } | |
| 5935 | + } | |
| 5936 | + } | |
| 5937 | + this.notify({ type: "removed", mutation }); | |
| 5938 | + } | |
| 5939 | + canRun(mutation) { | |
| 5940 | + const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending"); | |
| 5941 | + return !firstPendingMutation || firstPendingMutation === mutation; | |
| 5942 | + } | |
| 5943 | + runNext(mutation) { | |
| 5944 | + const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused); | |
| 5945 | + return foundMutation?.continue() ?? Promise.resolve(); | |
| 5946 | + } | |
| 5947 | + clear() { | |
| 5948 | + import_notifyManager.notifyManager.batch(() => { | |
| 5949 | + this.getAll().forEach((mutation) => { | |
| 5950 | + this.remove(mutation); | |
| 5951 | + }); | |
| 5952 | + }); | |
| 5953 | + } | |
| 5954 | + getAll() { | |
| 5955 | + return [...this.#mutations.values()].flat(); | |
| 5956 | + } | |
| 5957 | + find(filters) { | |
| 5958 | + const defaultedFilters = { exact: true, ...filters }; | |
| 5959 | + return this.getAll().find( | |
| 5960 | + (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation) | |
| 5961 | + ); | |
| 5962 | + } | |
| 5963 | + findAll(filters = {}) { | |
| 5964 | + return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation)); | |
| 5965 | + } | |
| 5966 | + notify(event) { | |
| 5967 | + import_notifyManager.notifyManager.batch(() => { | |
| 5968 | + this.listeners.forEach((listener) => { | |
| 5969 | + listener(event); | |
| 5970 | + }); | |
| 5971 | + }); | |
| 5972 | + } | |
| 5973 | + resumePausedMutations() { | |
| 5974 | + const pausedMutations = this.getAll().filter((x) => x.state.isPaused); | |
| 5975 | + return import_notifyManager.notifyManager.batch( | |
| 5976 | + () => Promise.all( | |
| 5977 | + pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop)) | |
| 5978 | + ) | |
| 5979 | + ); | |
| 5980 | + } | |
| 5981 | +}; | |
| 5982 | +function scopeFor(mutation) { | |
| 5983 | + return mutation.options.scope?.id ?? String(mutation.mutationId); | |
| 5984 | +} | |
| 5985 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5986 | +0 && (0); | |
| 5987 | +//# sourceMappingURL=mutationCache.cjs.map | |
| 5988 | + | |
| 5989 | +/***/ }), | |
| 5990 | + | |
| 5991 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs": | |
| 5992 | +/*!******************************************************************************!*\ | |
| 5993 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***! | |
| 5994 | + \******************************************************************************/ | |
| 5995 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5996 | + | |
| 5997 | +"use strict"; | |
| 5998 | + | |
| 5999 | +var __defProp = Object.defineProperty; | |
| 6000 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6001 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6002 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6003 | +var __export = (target, all) => { | |
| 6004 | + for (var name in all) | |
| 6005 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6006 | +}; | |
| 6007 | +var __copyProps = (to, from, except, desc) => { | |
| 6008 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6009 | + for (let key of __getOwnPropNames(from)) | |
| 6010 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6011 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6012 | + } | |
| 6013 | + return to; | |
| 6014 | +}; | |
| 6015 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6016 | + | |
| 6017 | +// src/mutationObserver.ts | |
| 6018 | +var mutationObserver_exports = {}; | |
| 6019 | +__export(mutationObserver_exports, { | |
| 6020 | + MutationObserver: () => MutationObserver | |
| 6021 | +}); | |
| 6022 | +module.exports = __toCommonJS(mutationObserver_exports); | |
| 6023 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 6024 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6025 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6026 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6027 | +var MutationObserver = class extends import_subscribable.Subscribable { | |
| 6028 | + #client; | |
| 6029 | + #currentResult = void 0; | |
| 6030 | + #currentMutation; | |
| 6031 | + #mutateOptions; | |
| 6032 | + constructor(client, options) { | |
| 6033 | + super(); | |
| 6034 | + this.#client = client; | |
| 6035 | + this.setOptions(options); | |
| 6036 | + this.bindMethods(); | |
| 6037 | + this.#updateResult(); | |
| 6038 | + } | |
| 6039 | + bindMethods() { | |
| 6040 | + this.mutate = this.mutate.bind(this); | |
| 6041 | + this.reset = this.reset.bind(this); | |
| 6042 | + } | |
| 6043 | + setOptions(options) { | |
| 6044 | + const prevOptions = this.options; | |
| 6045 | + this.options = this.#client.defaultMutationOptions(options); | |
| 6046 | + if (!(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) { | |
| 6047 | + this.#client.getMutationCache().notify({ | |
| 6048 | + type: "observerOptionsUpdated", | |
| 6049 | + mutation: this.#currentMutation, | |
| 6050 | + observer: this | |
| 6051 | + }); | |
| 6052 | + } | |
| 6053 | + if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) { | |
| 6054 | + this.reset(); | |
| 6055 | + } else if (this.#currentMutation?.state.status === "pending") { | |
| 6056 | + this.#currentMutation.setOptions(this.options); | |
| 6057 | + } | |
| 6058 | + } | |
| 6059 | + onUnsubscribe() { | |
| 6060 | + if (!this.hasListeners()) { | |
| 6061 | + this.#currentMutation?.removeObserver(this); | |
| 6062 | + } | |
| 6063 | + } | |
| 6064 | + onMutationUpdate(action) { | |
| 6065 | + this.#updateResult(); | |
| 6066 | + this.#notify(action); | |
| 6067 | + } | |
| 6068 | + getCurrentResult() { | |
| 6069 | + return this.#currentResult; | |
| 6070 | + } | |
| 6071 | + reset() { | |
| 6072 | + this.#currentMutation?.removeObserver(this); | |
| 6073 | + this.#currentMutation = void 0; | |
| 6074 | + this.#updateResult(); | |
| 6075 | + this.#notify(); | |
| 6076 | + } | |
| 6077 | + mutate(variables, options) { | |
| 6078 | + this.#mutateOptions = options; | |
| 6079 | + this.#currentMutation?.removeObserver(this); | |
| 6080 | + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options); | |
| 6081 | + this.#currentMutation.addObserver(this); | |
| 6082 | + return this.#currentMutation.execute(variables); | |
| 6083 | + } | |
| 6084 | + #updateResult() { | |
| 6085 | + const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)(); | |
| 6086 | + this.#currentResult = { | |
| 6087 | + ...state, | |
| 6088 | + isPending: state.status === "pending", | |
| 6089 | + isSuccess: state.status === "success", | |
| 6090 | + isError: state.status === "error", | |
| 6091 | + isIdle: state.status === "idle", | |
| 6092 | + mutate: this.mutate, | |
| 6093 | + reset: this.reset | |
| 6094 | + }; | |
| 6095 | + } | |
| 6096 | + #notify(action) { | |
| 6097 | + import_notifyManager.notifyManager.batch(() => { | |
| 6098 | + if (this.#mutateOptions && this.hasListeners()) { | |
| 6099 | + const variables = this.#currentResult.variables; | |
| 6100 | + const context = this.#currentResult.context; | |
| 6101 | + if (action?.type === "success") { | |
| 6102 | + this.#mutateOptions.onSuccess?.(action.data, variables, context); | |
| 6103 | + this.#mutateOptions.onSettled?.(action.data, null, variables, context); | |
| 6104 | + } else if (action?.type === "error") { | |
| 6105 | + this.#mutateOptions.onError?.(action.error, variables, context); | |
| 6106 | + this.#mutateOptions.onSettled?.( | |
| 6107 | + void 0, | |
| 6108 | + action.error, | |
| 6109 | + variables, | |
| 6110 | + context | |
| 6111 | + ); | |
| 6112 | + } | |
| 6113 | + } | |
| 6114 | + this.listeners.forEach((listener) => { | |
| 6115 | + listener(this.#currentResult); | |
| 6116 | + }); | |
| 6117 | + }); | |
| 6118 | + } | |
| 6119 | +}; | |
| 6120 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6121 | +0 && (0); | |
| 6122 | +//# sourceMappingURL=mutationObserver.cjs.map | |
| 6123 | + | |
| 6124 | +/***/ }), | |
| 6125 | + | |
| 6126 | +/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs": | |
| 6127 | +/*!***************************************************************************!*\ | |
| 6128 | + !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***! | |
| 6129 | + \***************************************************************************/ | |
| 6130 | +/***/ ((module) => { | |
| 6131 | + | |
| 6132 | +"use strict"; | |
| 6133 | + | |
| 6134 | +var __defProp = Object.defineProperty; | |
| 6135 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6136 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6137 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6138 | +var __export = (target, all) => { | |
| 6139 | + for (var name in all) | |
| 6140 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6141 | +}; | |
| 6142 | +var __copyProps = (to, from, except, desc) => { | |
| 6143 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6144 | + for (let key of __getOwnPropNames(from)) | |
| 6145 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6146 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6147 | + } | |
| 6148 | + return to; | |
| 6149 | +}; | |
| 6150 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6151 | + | |
| 6152 | +// src/notifyManager.ts | |
| 6153 | +var notifyManager_exports = {}; | |
| 6154 | +__export(notifyManager_exports, { | |
| 6155 | + createNotifyManager: () => createNotifyManager, | |
| 6156 | + notifyManager: () => notifyManager | |
| 6157 | +}); | |
| 6158 | +module.exports = __toCommonJS(notifyManager_exports); | |
| 6159 | +function createNotifyManager() { | |
| 6160 | + let queue = []; | |
| 6161 | + let transactions = 0; | |
| 6162 | + let notifyFn = (callback) => { | |
| 6163 | + callback(); | |
| 6164 | + }; | |
| 6165 | + let batchNotifyFn = (callback) => { | |
| 6166 | + callback(); | |
| 6167 | + }; | |
| 6168 | + let scheduleFn = (cb) => setTimeout(cb, 0); | |
| 6169 | + const setScheduler = (fn) => { | |
| 6170 | + scheduleFn = fn; | |
| 6171 | + }; | |
| 6172 | + const batch = (callback) => { | |
| 6173 | + let result; | |
| 6174 | + transactions++; | |
| 6175 | + try { | |
| 6176 | + result = callback(); | |
| 6177 | + } finally { | |
| 6178 | + transactions--; | |
| 6179 | + if (!transactions) { | |
| 6180 | + flush(); | |
| 6181 | + } | |
| 6182 | + } | |
| 6183 | + return result; | |
| 6184 | + }; | |
| 6185 | + const schedule = (callback) => { | |
| 6186 | + if (transactions) { | |
| 6187 | + queue.push(callback); | |
| 6188 | + } else { | |
| 6189 | + scheduleFn(() => { | |
| 6190 | + notifyFn(callback); | |
| 6191 | + }); | |
| 6192 | + } | |
| 6193 | + }; | |
| 6194 | + const batchCalls = (callback) => { | |
| 6195 | + return (...args) => { | |
| 6196 | + schedule(() => { | |
| 6197 | + callback(...args); | |
| 6198 | + }); | |
| 6199 | + }; | |
| 6200 | + }; | |
| 6201 | + const flush = () => { | |
| 6202 | + const originalQueue = queue; | |
| 6203 | + queue = []; | |
| 6204 | + if (originalQueue.length) { | |
| 6205 | + scheduleFn(() => { | |
| 6206 | + batchNotifyFn(() => { | |
| 6207 | + originalQueue.forEach((callback) => { | |
| 6208 | + notifyFn(callback); | |
| 6209 | + }); | |
| 6210 | + }); | |
| 6211 | + }); | |
| 6212 | + } | |
| 6213 | + }; | |
| 6214 | + const setNotifyFunction = (fn) => { | |
| 6215 | + notifyFn = fn; | |
| 6216 | + }; | |
| 6217 | + const setBatchNotifyFunction = (fn) => { | |
| 6218 | + batchNotifyFn = fn; | |
| 6219 | + }; | |
| 6220 | + return { | |
| 6221 | + batch, | |
| 6222 | + batchCalls, | |
| 6223 | + schedule, | |
| 6224 | + setNotifyFunction, | |
| 6225 | + setBatchNotifyFunction, | |
| 6226 | + setScheduler | |
| 6227 | + }; | |
| 6228 | +} | |
| 6229 | +var notifyManager = createNotifyManager(); | |
| 6230 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6231 | +0 && (0); | |
| 6232 | +//# sourceMappingURL=notifyManager.cjs.map | |
| 6233 | + | |
| 6234 | +/***/ }), | |
| 6235 | + | |
| 6236 | +/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs": | |
| 6237 | +/*!***************************************************************************!*\ | |
| 6238 | + !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***! | |
| 6239 | + \***************************************************************************/ | |
| 6240 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6241 | + | |
| 6242 | +"use strict"; | |
| 6243 | + | |
| 6244 | +var __defProp = Object.defineProperty; | |
| 6245 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6246 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6247 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6248 | +var __export = (target, all) => { | |
| 6249 | + for (var name in all) | |
| 6250 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6251 | +}; | |
| 6252 | +var __copyProps = (to, from, except, desc) => { | |
| 6253 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6254 | + for (let key of __getOwnPropNames(from)) | |
| 6255 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6256 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6257 | + } | |
| 6258 | + return to; | |
| 6259 | +}; | |
| 6260 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6261 | + | |
| 6262 | +// src/onlineManager.ts | |
| 6263 | +var onlineManager_exports = {}; | |
| 6264 | +__export(onlineManager_exports, { | |
| 6265 | + OnlineManager: () => OnlineManager, | |
| 6266 | + onlineManager: () => onlineManager | |
| 6267 | +}); | |
| 6268 | +module.exports = __toCommonJS(onlineManager_exports); | |
| 6269 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6270 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6271 | +var OnlineManager = class extends import_subscribable.Subscribable { | |
| 6272 | + #online = true; | |
| 6273 | + #cleanup; | |
| 6274 | + #setup; | |
| 6275 | + constructor() { | |
| 6276 | + super(); | |
| 6277 | + this.#setup = (onOnline) => { | |
| 6278 | + if (!import_utils.isServer && window.addEventListener) { | |
| 6279 | + const onlineListener = () => onOnline(true); | |
| 6280 | + const offlineListener = () => onOnline(false); | |
| 6281 | + window.addEventListener("online", onlineListener, false); | |
| 6282 | + window.addEventListener("offline", offlineListener, false); | |
| 6283 | + return () => { | |
| 6284 | + window.removeEventListener("online", onlineListener); | |
| 6285 | + window.removeEventListener("offline", offlineListener); | |
| 6286 | + }; | |
| 6287 | + } | |
| 6288 | + return; | |
| 6289 | + }; | |
| 6290 | + } | |
| 6291 | + onSubscribe() { | |
| 6292 | + if (!this.#cleanup) { | |
| 6293 | + this.setEventListener(this.#setup); | |
| 6294 | + } | |
| 6295 | + } | |
| 6296 | + onUnsubscribe() { | |
| 6297 | + if (!this.hasListeners()) { | |
| 6298 | + this.#cleanup?.(); | |
| 6299 | + this.#cleanup = void 0; | |
| 6300 | + } | |
| 6301 | + } | |
| 6302 | + setEventListener(setup) { | |
| 6303 | + this.#setup = setup; | |
| 6304 | + this.#cleanup?.(); | |
| 6305 | + this.#cleanup = setup(this.setOnline.bind(this)); | |
| 6306 | + } | |
| 6307 | + setOnline(online) { | |
| 6308 | + const changed = this.#online !== online; | |
| 6309 | + if (changed) { | |
| 6310 | + this.#online = online; | |
| 6311 | + this.listeners.forEach((listener) => { | |
| 6312 | + listener(online); | |
| 6313 | + }); | |
| 6314 | + } | |
| 6315 | + } | |
| 6316 | + isOnline() { | |
| 6317 | + return this.#online; | |
| 6318 | + } | |
| 6319 | +}; | |
| 6320 | +var onlineManager = new OnlineManager(); | |
| 6321 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6322 | +0 && (0); | |
| 6323 | +//# sourceMappingURL=onlineManager.cjs.map | |
| 6324 | + | |
| 6325 | +/***/ }), | |
| 6326 | + | |
| 6327 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs": | |
| 6328 | +/*!*****************************************************************************!*\ | |
| 6329 | + !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***! | |
| 6330 | + \*****************************************************************************/ | |
| 6331 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6332 | + | |
| 6333 | +"use strict"; | |
| 6334 | + | |
| 6335 | +var __defProp = Object.defineProperty; | |
| 6336 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6337 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6338 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6339 | +var __export = (target, all) => { | |
| 6340 | + for (var name in all) | |
| 6341 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6342 | +}; | |
| 6343 | +var __copyProps = (to, from, except, desc) => { | |
| 6344 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6345 | + for (let key of __getOwnPropNames(from)) | |
| 6346 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6347 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6348 | + } | |
| 6349 | + return to; | |
| 6350 | +}; | |
| 6351 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6352 | + | |
| 6353 | +// src/queriesObserver.ts | |
| 6354 | +var queriesObserver_exports = {}; | |
| 6355 | +__export(queriesObserver_exports, { | |
| 6356 | + QueriesObserver: () => QueriesObserver | |
| 6357 | +}); | |
| 6358 | +module.exports = __toCommonJS(queriesObserver_exports); | |
| 6359 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6360 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 6361 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6362 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6363 | +function difference(array1, array2) { | |
| 6364 | + return array1.filter((x) => !array2.includes(x)); | |
| 6365 | +} | |
| 6366 | +function replaceAt(array, index, value) { | |
| 6367 | + const copy = array.slice(0); | |
| 6368 | + copy[index] = value; | |
| 6369 | + return copy; | |
| 6370 | +} | |
| 6371 | +var QueriesObserver = class extends import_subscribable.Subscribable { | |
| 6372 | + #client; | |
| 6373 | + #result; | |
| 6374 | + #queries; | |
| 6375 | + #observers; | |
| 6376 | + #combinedResult; | |
| 6377 | + #lastCombine; | |
| 6378 | + #lastResult; | |
| 6379 | + constructor(client, queries, _options) { | |
| 6380 | + super(); | |
| 6381 | + this.#client = client; | |
| 6382 | + this.#queries = []; | |
| 6383 | + this.#observers = []; | |
| 6384 | + this.#result = []; | |
| 6385 | + this.setQueries(queries); | |
| 6386 | + } | |
| 6387 | + onSubscribe() { | |
| 6388 | + if (this.listeners.size === 1) { | |
| 6389 | + this.#observers.forEach((observer) => { | |
| 6390 | + observer.subscribe((result) => { | |
| 6391 | + this.#onUpdate(observer, result); | |
| 6392 | + }); | |
| 6393 | + }); | |
| 6394 | + } | |
| 6395 | + } | |
| 6396 | + onUnsubscribe() { | |
| 6397 | + if (!this.listeners.size) { | |
| 6398 | + this.destroy(); | |
| 6399 | + } | |
| 6400 | + } | |
| 6401 | + destroy() { | |
| 6402 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 6403 | + this.#observers.forEach((observer) => { | |
| 6404 | + observer.destroy(); | |
| 6405 | + }); | |
| 6406 | + } | |
| 6407 | + setQueries(queries, _options, notifyOptions) { | |
| 6408 | + this.#queries = queries; | |
| 6409 | + import_notifyManager.notifyManager.batch(() => { | |
| 6410 | + const prevObservers = this.#observers; | |
| 6411 | + const newObserverMatches = this.#findMatchingObservers(this.#queries); | |
| 6412 | + newObserverMatches.forEach( | |
| 6413 | + (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions) | |
| 6414 | + ); | |
| 6415 | + const newObservers = newObserverMatches.map((match) => match.observer); | |
| 6416 | + const newResult = newObservers.map( | |
| 6417 | + (observer) => observer.getCurrentResult() | |
| 6418 | + ); | |
| 6419 | + const hasIndexChange = newObservers.some( | |
| 6420 | + (observer, index) => observer !== prevObservers[index] | |
| 6421 | + ); | |
| 6422 | + if (prevObservers.length === newObservers.length && !hasIndexChange) { | |
| 6423 | + return; | |
| 6424 | + } | |
| 6425 | + this.#observers = newObservers; | |
| 6426 | + this.#result = newResult; | |
| 6427 | + if (!this.hasListeners()) { | |
| 6428 | + return; | |
| 6429 | + } | |
| 6430 | + difference(prevObservers, newObservers).forEach((observer) => { | |
| 6431 | + observer.destroy(); | |
| 6432 | + }); | |
| 6433 | + difference(newObservers, prevObservers).forEach((observer) => { | |
| 6434 | + observer.subscribe((result) => { | |
| 6435 | + this.#onUpdate(observer, result); | |
| 6436 | + }); | |
| 6437 | + }); | |
| 6438 | + this.#notify(); | |
| 6439 | + }); | |
| 6440 | + } | |
| 6441 | + getCurrentResult() { | |
| 6442 | + return this.#result; | |
| 6443 | + } | |
| 6444 | + getQueries() { | |
| 6445 | + return this.#observers.map((observer) => observer.getCurrentQuery()); | |
| 6446 | + } | |
| 6447 | + getObservers() { | |
| 6448 | + return this.#observers; | |
| 6449 | + } | |
| 6450 | + getOptimisticResult(queries, combine) { | |
| 6451 | + const matches = this.#findMatchingObservers(queries); | |
| 6452 | + const result = matches.map( | |
| 6453 | + (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions) | |
| 6454 | + ); | |
| 6455 | + return [ | |
| 6456 | + result, | |
| 6457 | + (r) => { | |
| 6458 | + return this.#combineResult(r ?? result, combine); | |
| 6459 | + }, | |
| 6460 | + () => { | |
| 6461 | + return matches.map((match, index) => { | |
| 6462 | + const observerResult = result[index]; | |
| 6463 | + return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => { | |
| 6464 | + matches.forEach((m) => { | |
| 6465 | + m.observer.trackProp(accessedProp); | |
| 6466 | + }); | |
| 6467 | + }) : observerResult; | |
| 6468 | + }); | |
| 6469 | + } | |
| 6470 | + ]; | |
| 6471 | + } | |
| 6472 | + #combineResult(input, combine) { | |
| 6473 | + if (combine) { | |
| 6474 | + if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) { | |
| 6475 | + this.#lastCombine = combine; | |
| 6476 | + this.#lastResult = this.#result; | |
| 6477 | + this.#combinedResult = (0, import_utils.replaceEqualDeep)( | |
| 6478 | + this.#combinedResult, | |
| 6479 | + combine(input) | |
| 6480 | + ); | |
| 6481 | + } | |
| 6482 | + return this.#combinedResult; | |
| 6483 | + } | |
| 6484 | + return input; | |
| 6485 | + } | |
| 6486 | + #findMatchingObservers(queries) { | |
| 6487 | + const prevObservers = this.#observers; | |
| 6488 | + const prevObserversMap = new Map( | |
| 6489 | + prevObservers.map((observer) => [observer.options.queryHash, observer]) | |
| 6490 | + ); | |
| 6491 | + const defaultedQueryOptions = queries.map( | |
| 6492 | + (options) => this.#client.defaultQueryOptions(options) | |
| 6493 | + ); | |
| 6494 | + const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => { | |
| 6495 | + const match = prevObserversMap.get(defaultedOptions.queryHash); | |
| 6496 | + if (match != null) { | |
| 6497 | + return [{ defaultedQueryOptions: defaultedOptions, observer: match }]; | |
| 6498 | + } | |
| 6499 | + return []; | |
| 6500 | + }); | |
| 6501 | + const matchedQueryHashes = new Set( | |
| 6502 | + matchingObservers.map((match) => match.defaultedQueryOptions.queryHash) | |
| 6503 | + ); | |
| 6504 | + const unmatchedQueries = defaultedQueryOptions.filter( | |
| 6505 | + (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash) | |
| 6506 | + ); | |
| 6507 | + const getObserver = (options) => { | |
| 6508 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 6509 | + const currentObserver = this.#observers.find( | |
| 6510 | + (o) => o.options.queryHash === defaultedOptions.queryHash | |
| 6511 | + ); | |
| 6512 | + return currentObserver ?? new import_queryObserver.QueryObserver(this.#client, defaultedOptions); | |
| 6513 | + }; | |
| 6514 | + const newOrReusedObservers = unmatchedQueries.map((options) => { | |
| 6515 | + return { | |
| 6516 | + defaultedQueryOptions: options, | |
| 6517 | + observer: getObserver(options) | |
| 6518 | + }; | |
| 6519 | + }); | |
| 6520 | + const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions); | |
| 6521 | + return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries); | |
| 6522 | + } | |
| 6523 | + #onUpdate(observer, result) { | |
| 6524 | + const index = this.#observers.indexOf(observer); | |
| 6525 | + if (index !== -1) { | |
| 6526 | + this.#result = replaceAt(this.#result, index, result); | |
| 6527 | + this.#notify(); | |
| 6528 | + } | |
| 6529 | + } | |
| 6530 | + #notify() { | |
| 6531 | + import_notifyManager.notifyManager.batch(() => { | |
| 6532 | + this.listeners.forEach((listener) => { | |
| 6533 | + listener(this.#result); | |
| 6534 | + }); | |
| 6535 | + }); | |
| 6536 | + } | |
| 6537 | +}; | |
| 6538 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6539 | +0 && (0); | |
| 6540 | +//# sourceMappingURL=queriesObserver.cjs.map | |
| 6541 | + | |
| 6542 | +/***/ }), | |
| 6543 | + | |
| 6544 | +/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs": | |
| 6545 | +/*!*******************************************************************!*\ | |
| 6546 | + !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***! | |
| 6547 | + \*******************************************************************/ | |
| 6548 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6549 | + | |
| 6550 | +"use strict"; | |
| 6551 | + | |
| 6552 | +var __defProp = Object.defineProperty; | |
| 6553 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6554 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6555 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6556 | +var __export = (target, all) => { | |
| 6557 | + for (var name in all) | |
| 6558 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6559 | +}; | |
| 6560 | +var __copyProps = (to, from, except, desc) => { | |
| 6561 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6562 | + for (let key of __getOwnPropNames(from)) | |
| 6563 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6564 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6565 | + } | |
| 6566 | + return to; | |
| 6567 | +}; | |
| 6568 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6569 | + | |
| 6570 | +// src/query.ts | |
| 6571 | +var query_exports = {}; | |
| 6572 | +__export(query_exports, { | |
| 6573 | + Query: () => Query, | |
| 6574 | + fetchState: () => fetchState | |
| 6575 | +}); | |
| 6576 | +module.exports = __toCommonJS(query_exports); | |
| 6577 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6578 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6579 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 6580 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 6581 | +var Query = class extends import_removable.Removable { | |
| 6582 | + #initialState; | |
| 6583 | + #revertState; | |
| 6584 | + #cache; | |
| 6585 | + #retryer; | |
| 6586 | + #defaultOptions; | |
| 6587 | + #abortSignalConsumed; | |
| 6588 | + constructor(config) { | |
| 6589 | + super(); | |
| 6590 | + this.#abortSignalConsumed = false; | |
| 6591 | + this.#defaultOptions = config.defaultOptions; | |
| 6592 | + this.setOptions(config.options); | |
| 6593 | + this.observers = []; | |
| 6594 | + this.#cache = config.cache; | |
| 6595 | + this.queryKey = config.queryKey; | |
| 6596 | + this.queryHash = config.queryHash; | |
| 6597 | + this.#initialState = config.state || getDefaultState(this.options); | |
| 6598 | + this.state = this.#initialState; | |
| 6599 | + this.scheduleGc(); | |
| 6600 | + } | |
| 6601 | + get meta() { | |
| 6602 | + return this.options.meta; | |
| 6603 | + } | |
| 6604 | + get promise() { | |
| 6605 | + return this.#retryer?.promise; | |
| 6606 | + } | |
| 6607 | + setOptions(options) { | |
| 6608 | + this.options = { ...this.#defaultOptions, ...options }; | |
| 6609 | + this.updateGcTime(this.options.gcTime); | |
| 6610 | + } | |
| 6611 | + optionalRemove() { | |
| 6612 | + if (!this.observers.length && this.state.fetchStatus === "idle") { | |
| 6613 | + this.#cache.remove(this); | |
| 6614 | + } | |
| 6615 | + } | |
| 6616 | + setData(newData, options) { | |
| 6617 | + const data = (0, import_utils.replaceData)(this.state.data, newData, this.options); | |
| 6618 | + this.#dispatch({ | |
| 6619 | + data, | |
| 6620 | + type: "success", | |
| 6621 | + dataUpdatedAt: options?.updatedAt, | |
| 6622 | + manual: options?.manual | |
| 6623 | + }); | |
| 6624 | + return data; | |
| 6625 | + } | |
| 6626 | + setState(state, setStateOptions) { | |
| 6627 | + this.#dispatch({ type: "setState", state, setStateOptions }); | |
| 6628 | + } | |
| 6629 | + cancel(options) { | |
| 6630 | + const promise = this.#retryer?.promise; | |
| 6631 | + this.#retryer?.cancel(options); | |
| 6632 | + return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve(); | |
| 6633 | + } | |
| 6634 | + destroy() { | |
| 6635 | + super.destroy(); | |
| 6636 | + this.cancel({ silent: true }); | |
| 6637 | + } | |
| 6638 | + reset() { | |
| 6639 | + this.destroy(); | |
| 6640 | + this.setState(this.#initialState); | |
| 6641 | + } | |
| 6642 | + isActive() { | |
| 6643 | + return this.observers.some( | |
| 6644 | + (observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false | |
| 6645 | + ); | |
| 6646 | + } | |
| 6647 | + isDisabled() { | |
| 6648 | + return this.getObserversCount() > 0 && !this.isActive(); | |
| 6649 | + } | |
| 6650 | + isStale() { | |
| 6651 | + if (this.state.isInvalidated) { | |
| 6652 | + return true; | |
| 6653 | + } | |
| 6654 | + if (this.getObserversCount() > 0) { | |
| 6655 | + return this.observers.some( | |
| 6656 | + (observer) => observer.getCurrentResult().isStale | |
| 6657 | + ); | |
| 6658 | + } | |
| 6659 | + return this.state.data === void 0; | |
| 6660 | + } | |
| 6661 | + isStaleByTime(staleTime = 0) { | |
| 6662 | + return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime); | |
| 6663 | + } | |
| 6664 | + onFocus() { | |
| 6665 | + const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus()); | |
| 6666 | + observer?.refetch({ cancelRefetch: false }); | |
| 6667 | + this.#retryer?.continue(); | |
| 6668 | + } | |
| 6669 | + onOnline() { | |
| 6670 | + const observer = this.observers.find((x) => x.shouldFetchOnReconnect()); | |
| 6671 | + observer?.refetch({ cancelRefetch: false }); | |
| 6672 | + this.#retryer?.continue(); | |
| 6673 | + } | |
| 6674 | + addObserver(observer) { | |
| 6675 | + if (!this.observers.includes(observer)) { | |
| 6676 | + this.observers.push(observer); | |
| 6677 | + this.clearGcTimeout(); | |
| 6678 | + this.#cache.notify({ type: "observerAdded", query: this, observer }); | |
| 6679 | + } | |
| 6680 | + } | |
| 6681 | + removeObserver(observer) { | |
| 6682 | + if (this.observers.includes(observer)) { | |
| 6683 | + this.observers = this.observers.filter((x) => x !== observer); | |
| 6684 | + if (!this.observers.length) { | |
| 6685 | + if (this.#retryer) { | |
| 6686 | + if (this.#abortSignalConsumed) { | |
| 6687 | + this.#retryer.cancel({ revert: true }); | |
| 6688 | + } else { | |
| 6689 | + this.#retryer.cancelRetry(); | |
| 6690 | + } | |
| 6691 | + } | |
| 6692 | + this.scheduleGc(); | |
| 6693 | + } | |
| 6694 | + this.#cache.notify({ type: "observerRemoved", query: this, observer }); | |
| 6695 | + } | |
| 6696 | + } | |
| 6697 | + getObserversCount() { | |
| 6698 | + return this.observers.length; | |
| 6699 | + } | |
| 6700 | + invalidate() { | |
| 6701 | + if (!this.state.isInvalidated) { | |
| 6702 | + this.#dispatch({ type: "invalidate" }); | |
| 6703 | + } | |
| 6704 | + } | |
| 6705 | + fetch(options, fetchOptions) { | |
| 6706 | + if (this.state.fetchStatus !== "idle") { | |
| 6707 | + if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) { | |
| 6708 | + this.cancel({ silent: true }); | |
| 6709 | + } else if (this.#retryer) { | |
| 6710 | + this.#retryer.continueRetry(); | |
| 6711 | + return this.#retryer.promise; | |
| 6712 | + } | |
| 6713 | + } | |
| 6714 | + if (options) { | |
| 6715 | + this.setOptions(options); | |
| 6716 | + } | |
| 6717 | + if (!this.options.queryFn) { | |
| 6718 | + const observer = this.observers.find((x) => x.options.queryFn); | |
| 6719 | + if (observer) { | |
| 6720 | + this.setOptions(observer.options); | |
| 6721 | + } | |
| 6722 | + } | |
| 6723 | + if (true) { | |
| 6724 | + if (!Array.isArray(this.options.queryKey)) { | |
| 6725 | + console.error( | |
| 6726 | + `As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']` | |
| 6727 | + ); | |
| 6728 | + } | |
| 6729 | + } | |
| 6730 | + const abortController = new AbortController(); | |
| 6731 | + const addSignalProperty = (object) => { | |
| 6732 | + Object.defineProperty(object, "signal", { | |
| 6733 | + enumerable: true, | |
| 6734 | + get: () => { | |
| 6735 | + this.#abortSignalConsumed = true; | |
| 6736 | + return abortController.signal; | |
| 6737 | + } | |
| 6738 | + }); | |
| 6739 | + }; | |
| 6740 | + const fetchFn = () => { | |
| 6741 | + const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions); | |
| 6742 | + const queryFnContext = { | |
| 6743 | + queryKey: this.queryKey, | |
| 6744 | + meta: this.meta | |
| 6745 | + }; | |
| 6746 | + addSignalProperty(queryFnContext); | |
| 6747 | + this.#abortSignalConsumed = false; | |
| 6748 | + if (this.options.persister) { | |
| 6749 | + return this.options.persister( | |
| 6750 | + queryFn, | |
| 6751 | + queryFnContext, | |
| 6752 | + this | |
| 6753 | + ); | |
| 6754 | + } | |
| 6755 | + return queryFn(queryFnContext); | |
| 6756 | + }; | |
| 6757 | + const context = { | |
| 6758 | + fetchOptions, | |
| 6759 | + options: this.options, | |
| 6760 | + queryKey: this.queryKey, | |
| 6761 | + state: this.state, | |
| 6762 | + fetchFn | |
| 6763 | + }; | |
| 6764 | + addSignalProperty(context); | |
| 6765 | + this.options.behavior?.onFetch( | |
| 6766 | + context, | |
| 6767 | + this | |
| 6768 | + ); | |
| 6769 | + this.#revertState = this.state; | |
| 6770 | + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) { | |
| 6771 | + this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta }); | |
| 6772 | + } | |
| 6773 | + const onError = (error) => { | |
| 6774 | + if (!((0, import_retryer.isCancelledError)(error) && error.silent)) { | |
| 6775 | + this.#dispatch({ | |
| 6776 | + type: "error", | |
| 6777 | + error | |
| 6778 | + }); | |
| 6779 | + } | |
| 6780 | + if (!(0, import_retryer.isCancelledError)(error)) { | |
| 6781 | + this.#cache.config.onError?.( | |
| 6782 | + error, | |
| 6783 | + this | |
| 6784 | + ); | |
| 6785 | + this.#cache.config.onSettled?.( | |
| 6786 | + this.state.data, | |
| 6787 | + error, | |
| 6788 | + this | |
| 6789 | + ); | |
| 6790 | + } | |
| 6791 | + if (!this.isFetchingOptimistic) { | |
| 6792 | + this.scheduleGc(); | |
| 6793 | + } | |
| 6794 | + this.isFetchingOptimistic = false; | |
| 6795 | + }; | |
| 6796 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 6797 | + initialPromise: fetchOptions?.initialPromise, | |
| 6798 | + fn: context.fetchFn, | |
| 6799 | + abort: abortController.abort.bind(abortController), | |
| 6800 | + onSuccess: (data) => { | |
| 6801 | + if (data === void 0) { | |
| 6802 | + if (true) { | |
| 6803 | + console.error( | |
| 6804 | + `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}` | |
| 6805 | + ); | |
| 6806 | + } | |
| 6807 | + onError(new Error(`${this.queryHash} data is undefined`)); | |
| 6808 | + return; | |
| 6809 | + } | |
| 6810 | + this.setData(data); | |
| 6811 | + this.#cache.config.onSuccess?.(data, this); | |
| 6812 | + this.#cache.config.onSettled?.( | |
| 6813 | + data, | |
| 6814 | + this.state.error, | |
| 6815 | + this | |
| 6816 | + ); | |
| 6817 | + if (!this.isFetchingOptimistic) { | |
| 6818 | + this.scheduleGc(); | |
| 6819 | + } | |
| 6820 | + this.isFetchingOptimistic = false; | |
| 6821 | + }, | |
| 6822 | + onError, | |
| 6823 | + onFail: (failureCount, error) => { | |
| 6824 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 6825 | + }, | |
| 6826 | + onPause: () => { | |
| 6827 | + this.#dispatch({ type: "pause" }); | |
| 6828 | + }, | |
| 6829 | + onContinue: () => { | |
| 6830 | + this.#dispatch({ type: "continue" }); | |
| 6831 | + }, | |
| 6832 | + retry: context.options.retry, | |
| 6833 | + retryDelay: context.options.retryDelay, | |
| 6834 | + networkMode: context.options.networkMode, | |
| 6835 | + canRun: () => true | |
| 6836 | + }); | |
| 6837 | + return this.#retryer.start(); | |
| 6838 | + } | |
| 6839 | + #dispatch(action) { | |
| 6840 | + const reducer = (state) => { | |
| 6841 | + switch (action.type) { | |
| 6842 | + case "failed": | |
| 6843 | + return { | |
| 6844 | + ...state, | |
| 6845 | + fetchFailureCount: action.failureCount, | |
| 6846 | + fetchFailureReason: action.error | |
| 6847 | + }; | |
| 6848 | + case "pause": | |
| 6849 | + return { | |
| 6850 | + ...state, | |
| 6851 | + fetchStatus: "paused" | |
| 6852 | + }; | |
| 6853 | + case "continue": | |
| 6854 | + return { | |
| 6855 | + ...state, | |
| 6856 | + fetchStatus: "fetching" | |
| 6857 | + }; | |
| 6858 | + case "fetch": | |
| 6859 | + return { | |
| 6860 | + ...state, | |
| 6861 | + ...fetchState(state.data, this.options), | |
| 6862 | + fetchMeta: action.meta ?? null | |
| 6863 | + }; | |
| 6864 | + case "success": | |
| 6865 | + return { | |
| 6866 | + ...state, | |
| 6867 | + data: action.data, | |
| 6868 | + dataUpdateCount: state.dataUpdateCount + 1, | |
| 6869 | + dataUpdatedAt: action.dataUpdatedAt ?? Date.now(), | |
| 6870 | + error: null, | |
| 6871 | + isInvalidated: false, | |
| 6872 | + status: "success", | |
| 6873 | + ...!action.manual && { | |
| 6874 | + fetchStatus: "idle", | |
| 6875 | + fetchFailureCount: 0, | |
| 6876 | + fetchFailureReason: null | |
| 6877 | + } | |
| 6878 | + }; | |
| 6879 | + case "error": | |
| 6880 | + const error = action.error; | |
| 6881 | + if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) { | |
| 6882 | + return { ...this.#revertState, fetchStatus: "idle" }; | |
| 6883 | + } | |
| 6884 | + return { | |
| 6885 | + ...state, | |
| 6886 | + error, | |
| 6887 | + errorUpdateCount: state.errorUpdateCount + 1, | |
| 6888 | + errorUpdatedAt: Date.now(), | |
| 6889 | + fetchFailureCount: state.fetchFailureCount + 1, | |
| 6890 | + fetchFailureReason: error, | |
| 6891 | + fetchStatus: "idle", | |
| 6892 | + status: "error" | |
| 6893 | + }; | |
| 6894 | + case "invalidate": | |
| 6895 | + return { | |
| 6896 | + ...state, | |
| 6897 | + isInvalidated: true | |
| 6898 | + }; | |
| 6899 | + case "setState": | |
| 6900 | + return { | |
| 6901 | + ...state, | |
| 6902 | + ...action.state | |
| 6903 | + }; | |
| 6904 | + } | |
| 6905 | + }; | |
| 6906 | + this.state = reducer(this.state); | |
| 6907 | + import_notifyManager.notifyManager.batch(() => { | |
| 6908 | + this.observers.forEach((observer) => { | |
| 6909 | + observer.onQueryUpdate(); | |
| 6910 | + }); | |
| 6911 | + this.#cache.notify({ query: this, type: "updated", action }); | |
| 6912 | + }); | |
| 6913 | + } | |
| 6914 | +}; | |
| 6915 | +function fetchState(data, options) { | |
| 6916 | + return { | |
| 6917 | + fetchFailureCount: 0, | |
| 6918 | + fetchFailureReason: null, | |
| 6919 | + fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused", | |
| 6920 | + ...data === void 0 && { | |
| 6921 | + error: null, | |
| 6922 | + status: "pending" | |
| 6923 | + } | |
| 6924 | + }; | |
| 6925 | +} | |
| 6926 | +function getDefaultState(options) { | |
| 6927 | + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData; | |
| 6928 | + const hasData = data !== void 0; | |
| 6929 | + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0; | |
| 6930 | + return { | |
| 6931 | + data, | |
| 6932 | + dataUpdateCount: 0, | |
| 6933 | + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0, | |
| 6934 | + error: null, | |
| 6935 | + errorUpdateCount: 0, | |
| 6936 | + errorUpdatedAt: 0, | |
| 6937 | + fetchFailureCount: 0, | |
| 6938 | + fetchFailureReason: null, | |
| 6939 | + fetchMeta: null, | |
| 6940 | + isInvalidated: false, | |
| 6941 | + status: hasData ? "success" : "pending", | |
| 6942 | + fetchStatus: "idle" | |
| 6943 | + }; | |
| 6944 | +} | |
| 6945 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6946 | +0 && (0); | |
| 6947 | +//# sourceMappingURL=query.cjs.map | |
| 6948 | + | |
| 6949 | +/***/ }), | |
| 6950 | + | |
| 6951 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs": | |
| 6952 | +/*!************************************************************************!*\ | |
| 6953 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***! | |
| 6954 | + \************************************************************************/ | |
| 6955 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6956 | + | |
| 6957 | +"use strict"; | |
| 6958 | + | |
| 6959 | +var __defProp = Object.defineProperty; | |
| 6960 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6961 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6962 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6963 | +var __export = (target, all) => { | |
| 6964 | + for (var name in all) | |
| 6965 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6966 | +}; | |
| 6967 | +var __copyProps = (to, from, except, desc) => { | |
| 6968 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6969 | + for (let key of __getOwnPropNames(from)) | |
| 6970 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6971 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6972 | + } | |
| 6973 | + return to; | |
| 6974 | +}; | |
| 6975 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6976 | + | |
| 6977 | +// src/queryCache.ts | |
| 6978 | +var queryCache_exports = {}; | |
| 6979 | +__export(queryCache_exports, { | |
| 6980 | + QueryCache: () => QueryCache | |
| 6981 | +}); | |
| 6982 | +module.exports = __toCommonJS(queryCache_exports); | |
| 6983 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 6984 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 6985 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 6986 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 6987 | +var QueryCache = class extends import_subscribable.Subscribable { | |
| 6988 | + constructor(config = {}) { | |
| 6989 | + super(); | |
| 6990 | + this.config = config; | |
| 6991 | + this.#queries = /* @__PURE__ */ new Map(); | |
| 6992 | + } | |
| 6993 | + #queries; | |
| 6994 | + build(client, options, state) { | |
| 6995 | + const queryKey = options.queryKey; | |
| 6996 | + const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options); | |
| 6997 | + let query = this.get(queryHash); | |
| 6998 | + if (!query) { | |
| 6999 | + query = new import_query.Query({ | |
| 7000 | + cache: this, | |
| 7001 | + queryKey, | |
| 7002 | + queryHash, | |
| 7003 | + options: client.defaultQueryOptions(options), | |
| 7004 | + state, | |
| 7005 | + defaultOptions: client.getQueryDefaults(queryKey) | |
| 7006 | + }); | |
| 7007 | + this.add(query); | |
| 7008 | + } | |
| 7009 | + return query; | |
| 7010 | + } | |
| 7011 | + add(query) { | |
| 7012 | + if (!this.#queries.has(query.queryHash)) { | |
| 7013 | + this.#queries.set(query.queryHash, query); | |
| 7014 | + this.notify({ | |
| 7015 | + type: "added", | |
| 7016 | + query | |
| 7017 | + }); | |
| 7018 | + } | |
| 7019 | + } | |
| 7020 | + remove(query) { | |
| 7021 | + const queryInMap = this.#queries.get(query.queryHash); | |
| 7022 | + if (queryInMap) { | |
| 7023 | + query.destroy(); | |
| 7024 | + if (queryInMap === query) { | |
| 7025 | + this.#queries.delete(query.queryHash); | |
| 7026 | + } | |
| 7027 | + this.notify({ type: "removed", query }); | |
| 7028 | + } | |
| 7029 | + } | |
| 7030 | + clear() { | |
| 7031 | + import_notifyManager.notifyManager.batch(() => { | |
| 7032 | + this.getAll().forEach((query) => { | |
| 7033 | + this.remove(query); | |
| 7034 | + }); | |
| 7035 | + }); | |
| 7036 | + } | |
| 7037 | + get(queryHash) { | |
| 7038 | + return this.#queries.get(queryHash); | |
| 7039 | + } | |
| 7040 | + getAll() { | |
| 7041 | + return [...this.#queries.values()]; | |
| 7042 | + } | |
| 7043 | + find(filters) { | |
| 7044 | + const defaultedFilters = { exact: true, ...filters }; | |
| 7045 | + return this.getAll().find( | |
| 7046 | + (query) => (0, import_utils.matchQuery)(defaultedFilters, query) | |
| 7047 | + ); | |
| 7048 | + } | |
| 7049 | + findAll(filters = {}) { | |
| 7050 | + const queries = this.getAll(); | |
| 7051 | + return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries; | |
| 7052 | + } | |
| 7053 | + notify(event) { | |
| 7054 | + import_notifyManager.notifyManager.batch(() => { | |
| 7055 | + this.listeners.forEach((listener) => { | |
| 7056 | + listener(event); | |
| 7057 | + }); | |
| 7058 | + }); | |
| 7059 | + } | |
| 7060 | + onFocus() { | |
| 7061 | + import_notifyManager.notifyManager.batch(() => { | |
| 7062 | + this.getAll().forEach((query) => { | |
| 7063 | + query.onFocus(); | |
| 7064 | + }); | |
| 7065 | + }); | |
| 7066 | + } | |
| 7067 | + onOnline() { | |
| 7068 | + import_notifyManager.notifyManager.batch(() => { | |
| 7069 | + this.getAll().forEach((query) => { | |
| 7070 | + query.onOnline(); | |
| 7071 | + }); | |
| 7072 | + }); | |
| 7073 | + } | |
| 7074 | +}; | |
| 7075 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7076 | +0 && (0); | |
| 7077 | +//# sourceMappingURL=queryCache.cjs.map | |
| 7078 | + | |
| 7079 | +/***/ }), | |
| 7080 | + | |
| 7081 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs": | |
| 7082 | +/*!*************************************************************************!*\ | |
| 7083 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***! | |
| 7084 | + \*************************************************************************/ | |
| 7085 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7086 | + | |
| 7087 | +"use strict"; | |
| 7088 | + | |
| 7089 | +var __defProp = Object.defineProperty; | |
| 7090 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7091 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7092 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7093 | +var __export = (target, all) => { | |
| 7094 | + for (var name in all) | |
| 7095 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7096 | +}; | |
| 7097 | +var __copyProps = (to, from, except, desc) => { | |
| 7098 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7099 | + for (let key of __getOwnPropNames(from)) | |
| 7100 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7101 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7102 | + } | |
| 7103 | + return to; | |
| 7104 | +}; | |
| 7105 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7106 | + | |
| 7107 | +// src/queryClient.ts | |
| 7108 | +var queryClient_exports = {}; | |
| 7109 | +__export(queryClient_exports, { | |
| 7110 | + QueryClient: () => QueryClient | |
| 7111 | +}); | |
| 7112 | +module.exports = __toCommonJS(queryClient_exports); | |
| 7113 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7114 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 7115 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 7116 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 7117 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 7118 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 7119 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 7120 | +var QueryClient = class { | |
| 7121 | + #queryCache; | |
| 7122 | + #mutationCache; | |
| 7123 | + #defaultOptions; | |
| 7124 | + #queryDefaults; | |
| 7125 | + #mutationDefaults; | |
| 7126 | + #mountCount; | |
| 7127 | + #unsubscribeFocus; | |
| 7128 | + #unsubscribeOnline; | |
| 7129 | + constructor(config = {}) { | |
| 7130 | + this.#queryCache = config.queryCache || new import_queryCache.QueryCache(); | |
| 7131 | + this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache(); | |
| 7132 | + this.#defaultOptions = config.defaultOptions || {}; | |
| 7133 | + this.#queryDefaults = /* @__PURE__ */ new Map(); | |
| 7134 | + this.#mutationDefaults = /* @__PURE__ */ new Map(); | |
| 7135 | + this.#mountCount = 0; | |
| 7136 | + } | |
| 7137 | + mount() { | |
| 7138 | + this.#mountCount++; | |
| 7139 | + if (this.#mountCount !== 1) | |
| 7140 | + return; | |
| 7141 | + this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(async (focused) => { | |
| 7142 | + if (focused) { | |
| 7143 | + await this.resumePausedMutations(); | |
| 7144 | + this.#queryCache.onFocus(); | |
| 7145 | + } | |
| 7146 | + }); | |
| 7147 | + this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => { | |
| 7148 | + if (online) { | |
| 7149 | + await this.resumePausedMutations(); | |
| 7150 | + this.#queryCache.onOnline(); | |
| 7151 | + } | |
| 7152 | + }); | |
| 7153 | + } | |
| 7154 | + unmount() { | |
| 7155 | + this.#mountCount--; | |
| 7156 | + if (this.#mountCount !== 0) | |
| 7157 | + return; | |
| 7158 | + this.#unsubscribeFocus?.(); | |
| 7159 | + this.#unsubscribeFocus = void 0; | |
| 7160 | + this.#unsubscribeOnline?.(); | |
| 7161 | + this.#unsubscribeOnline = void 0; | |
| 7162 | + } | |
| 7163 | + isFetching(filters) { | |
| 7164 | + return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length; | |
| 7165 | + } | |
| 7166 | + isMutating(filters) { | |
| 7167 | + return this.#mutationCache.findAll({ ...filters, status: "pending" }).length; | |
| 7168 | + } | |
| 7169 | + getQueryData(queryKey) { | |
| 7170 | + const options = this.defaultQueryOptions({ queryKey }); | |
| 7171 | + return this.#queryCache.get(options.queryHash)?.state.data; | |
| 7172 | + } | |
| 7173 | + ensureQueryData(options) { | |
| 7174 | + const cachedData = this.getQueryData(options.queryKey); | |
| 7175 | + if (cachedData === void 0) | |
| 7176 | + return this.fetchQuery(options); | |
| 7177 | + else { | |
| 7178 | + const defaultedOptions = this.defaultQueryOptions(options); | |
| 7179 | + const query = this.#queryCache.build(this, defaultedOptions); | |
| 7180 | + if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) { | |
| 7181 | + void this.prefetchQuery(defaultedOptions); | |
| 7182 | + } | |
| 7183 | + return Promise.resolve(cachedData); | |
| 7184 | + } | |
| 7185 | + } | |
| 7186 | + getQueriesData(filters) { | |
| 7187 | + return this.#queryCache.findAll(filters).map(({ queryKey, state }) => { | |
| 7188 | + const data = state.data; | |
| 7189 | + return [queryKey, data]; | |
| 7190 | + }); | |
| 7191 | + } | |
| 7192 | + setQueryData(queryKey, updater, options) { | |
| 7193 | + const defaultedOptions = this.defaultQueryOptions({ queryKey }); | |
| 7194 | + const query = this.#queryCache.get( | |
| 7195 | + defaultedOptions.queryHash | |
| 7196 | + ); | |
| 7197 | + const prevData = query?.state.data; | |
| 7198 | + const data = (0, import_utils.functionalUpdate)(updater, prevData); | |
| 7199 | + if (data === void 0) { | |
| 7200 | + return void 0; | |
| 7201 | + } | |
| 7202 | + return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true }); | |
| 7203 | + } | |
| 7204 | + setQueriesData(filters, updater, options) { | |
| 7205 | + return import_notifyManager.notifyManager.batch( | |
| 7206 | + () => this.#queryCache.findAll(filters).map(({ queryKey }) => [ | |
| 7207 | + queryKey, | |
| 7208 | + this.setQueryData(queryKey, updater, options) | |
| 7209 | + ]) | |
| 7210 | + ); | |
| 7211 | + } | |
| 7212 | + getQueryState(queryKey) { | |
| 7213 | + const options = this.defaultQueryOptions({ queryKey }); | |
| 7214 | + return this.#queryCache.get(options.queryHash)?.state; | |
| 7215 | + } | |
| 7216 | + removeQueries(filters) { | |
| 7217 | + const queryCache = this.#queryCache; | |
| 7218 | + import_notifyManager.notifyManager.batch(() => { | |
| 7219 | + queryCache.findAll(filters).forEach((query) => { | |
| 7220 | + queryCache.remove(query); | |
| 7221 | + }); | |
| 7222 | + }); | |
| 7223 | + } | |
| 7224 | + resetQueries(filters, options) { | |
| 7225 | + const queryCache = this.#queryCache; | |
| 7226 | + const refetchFilters = { | |
| 7227 | + type: "active", | |
| 7228 | + ...filters | |
| 7229 | + }; | |
| 7230 | + return import_notifyManager.notifyManager.batch(() => { | |
| 7231 | + queryCache.findAll(filters).forEach((query) => { | |
| 7232 | + query.reset(); | |
| 7233 | + }); | |
| 7234 | + return this.refetchQueries(refetchFilters, options); | |
| 7235 | + }); | |
| 7236 | + } | |
| 7237 | + cancelQueries(filters = {}, cancelOptions = {}) { | |
| 7238 | + const defaultedCancelOptions = { revert: true, ...cancelOptions }; | |
| 7239 | + const promises = import_notifyManager.notifyManager.batch( | |
| 7240 | + () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)) | |
| 7241 | + ); | |
| 7242 | + return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop); | |
| 7243 | + } | |
| 7244 | + invalidateQueries(filters = {}, options = {}) { | |
| 7245 | + return import_notifyManager.notifyManager.batch(() => { | |
| 7246 | + this.#queryCache.findAll(filters).forEach((query) => { | |
| 7247 | + query.invalidate(); | |
| 7248 | + }); | |
| 7249 | + if (filters.refetchType === "none") { | |
| 7250 | + return Promise.resolve(); | |
| 7251 | + } | |
| 7252 | + const refetchFilters = { | |
| 7253 | + ...filters, | |
| 7254 | + type: filters.refetchType ?? filters.type ?? "active" | |
| 7255 | + }; | |
| 7256 | + return this.refetchQueries(refetchFilters, options); | |
| 7257 | + }); | |
| 7258 | + } | |
| 7259 | + refetchQueries(filters = {}, options) { | |
| 7260 | + const fetchOptions = { | |
| 7261 | + ...options, | |
| 7262 | + cancelRefetch: options?.cancelRefetch ?? true | |
| 7263 | + }; | |
| 7264 | + const promises = import_notifyManager.notifyManager.batch( | |
| 7265 | + () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => { | |
| 7266 | + let promise = query.fetch(void 0, fetchOptions); | |
| 7267 | + if (!fetchOptions.throwOnError) { | |
| 7268 | + promise = promise.catch(import_utils.noop); | |
| 7269 | + } | |
| 7270 | + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise; | |
| 7271 | + }) | |
| 7272 | + ); | |
| 7273 | + return Promise.all(promises).then(import_utils.noop); | |
| 7274 | + } | |
| 7275 | + fetchQuery(options) { | |
| 7276 | + const defaultedOptions = this.defaultQueryOptions(options); | |
| 7277 | + if (defaultedOptions.retry === void 0) { | |
| 7278 | + defaultedOptions.retry = false; | |
| 7279 | + } | |
| 7280 | + const query = this.#queryCache.build(this, defaultedOptions); | |
| 7281 | + return query.isStaleByTime( | |
| 7282 | + (0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query) | |
| 7283 | + ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data); | |
| 7284 | + } | |
| 7285 | + prefetchQuery(options) { | |
| 7286 | + return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 7287 | + } | |
| 7288 | + fetchInfiniteQuery(options) { | |
| 7289 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages); | |
| 7290 | + return this.fetchQuery(options); | |
| 7291 | + } | |
| 7292 | + prefetchInfiniteQuery(options) { | |
| 7293 | + return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 7294 | + } | |
| 7295 | + resumePausedMutations() { | |
| 7296 | + if (import_onlineManager.onlineManager.isOnline()) { | |
| 7297 | + return this.#mutationCache.resumePausedMutations(); | |
| 7298 | + } | |
| 7299 | + return Promise.resolve(); | |
| 7300 | + } | |
| 7301 | + getQueryCache() { | |
| 7302 | + return this.#queryCache; | |
| 7303 | + } | |
| 7304 | + getMutationCache() { | |
| 7305 | + return this.#mutationCache; | |
| 7306 | + } | |
| 7307 | + getDefaultOptions() { | |
| 7308 | + return this.#defaultOptions; | |
| 7309 | + } | |
| 7310 | + setDefaultOptions(options) { | |
| 7311 | + this.#defaultOptions = options; | |
| 7312 | + } | |
| 7313 | + setQueryDefaults(queryKey, options) { | |
| 7314 | + this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), { | |
| 7315 | + queryKey, | |
| 7316 | + defaultOptions: options | |
| 7317 | + }); | |
| 7318 | + } | |
| 7319 | + getQueryDefaults(queryKey) { | |
| 7320 | + const defaults = [...this.#queryDefaults.values()]; | |
| 7321 | + let result = {}; | |
| 7322 | + defaults.forEach((queryDefault) => { | |
| 7323 | + if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) { | |
| 7324 | + result = { ...result, ...queryDefault.defaultOptions }; | |
| 7325 | + } | |
| 7326 | + }); | |
| 7327 | + return result; | |
| 7328 | + } | |
| 7329 | + setMutationDefaults(mutationKey, options) { | |
| 7330 | + this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), { | |
| 7331 | + mutationKey, | |
| 7332 | + defaultOptions: options | |
| 7333 | + }); | |
| 7334 | + } | |
| 7335 | + getMutationDefaults(mutationKey) { | |
| 7336 | + const defaults = [...this.#mutationDefaults.values()]; | |
| 7337 | + let result = {}; | |
| 7338 | + defaults.forEach((queryDefault) => { | |
| 7339 | + if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) { | |
| 7340 | + result = { ...result, ...queryDefault.defaultOptions }; | |
| 7341 | + } | |
| 7342 | + }); | |
| 7343 | + return result; | |
| 7344 | + } | |
| 7345 | + defaultQueryOptions(options) { | |
| 7346 | + if (options._defaulted) { | |
| 7347 | + return options; | |
| 7348 | + } | |
| 7349 | + const defaultedOptions = { | |
| 7350 | + ...this.#defaultOptions.queries, | |
| 7351 | + ...this.getQueryDefaults(options.queryKey), | |
| 7352 | + ...options, | |
| 7353 | + _defaulted: true | |
| 7354 | + }; | |
| 7355 | + if (!defaultedOptions.queryHash) { | |
| 7356 | + defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)( | |
| 7357 | + defaultedOptions.queryKey, | |
| 7358 | + defaultedOptions | |
| 7359 | + ); | |
| 7360 | + } | |
| 7361 | + if (defaultedOptions.refetchOnReconnect === void 0) { | |
| 7362 | + defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always"; | |
| 7363 | + } | |
| 7364 | + if (defaultedOptions.throwOnError === void 0) { | |
| 7365 | + defaultedOptions.throwOnError = !!defaultedOptions.suspense; | |
| 7366 | + } | |
| 7367 | + if (!defaultedOptions.networkMode && defaultedOptions.persister) { | |
| 7368 | + defaultedOptions.networkMode = "offlineFirst"; | |
| 7369 | + } | |
| 7370 | + if (defaultedOptions.enabled !== true && defaultedOptions.queryFn === import_utils.skipToken) { | |
| 7371 | + defaultedOptions.enabled = false; | |
| 7372 | + } | |
| 7373 | + return defaultedOptions; | |
| 7374 | + } | |
| 7375 | + defaultMutationOptions(options) { | |
| 7376 | + if (options?._defaulted) { | |
| 7377 | + return options; | |
| 7378 | + } | |
| 7379 | + return { | |
| 7380 | + ...this.#defaultOptions.mutations, | |
| 7381 | + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey), | |
| 7382 | + ...options, | |
| 7383 | + _defaulted: true | |
| 7384 | + }; | |
| 7385 | + } | |
| 7386 | + clear() { | |
| 7387 | + this.#queryCache.clear(); | |
| 7388 | + this.#mutationCache.clear(); | |
| 7389 | + } | |
| 7390 | +}; | |
| 7391 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7392 | +0 && (0); | |
| 7393 | +//# sourceMappingURL=queryClient.cjs.map | |
| 7394 | + | |
| 7395 | +/***/ }), | |
| 7396 | + | |
| 7397 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs": | |
| 7398 | +/*!***************************************************************************!*\ | |
| 7399 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***! | |
| 7400 | + \***************************************************************************/ | |
| 7401 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7402 | + | |
| 7403 | +"use strict"; | |
| 7404 | + | |
| 7405 | +var __defProp = Object.defineProperty; | |
| 7406 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7407 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7408 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7409 | +var __export = (target, all) => { | |
| 7410 | + for (var name in all) | |
| 7411 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7412 | +}; | |
| 7413 | +var __copyProps = (to, from, except, desc) => { | |
| 7414 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7415 | + for (let key of __getOwnPropNames(from)) | |
| 7416 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7417 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7418 | + } | |
| 7419 | + return to; | |
| 7420 | +}; | |
| 7421 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7422 | + | |
| 7423 | +// src/queryObserver.ts | |
| 7424 | +var queryObserver_exports = {}; | |
| 7425 | +__export(queryObserver_exports, { | |
| 7426 | + QueryObserver: () => QueryObserver | |
| 7427 | +}); | |
| 7428 | +module.exports = __toCommonJS(queryObserver_exports); | |
| 7429 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7430 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 7431 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 7432 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 7433 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 7434 | +var QueryObserver = class extends import_subscribable.Subscribable { | |
| 7435 | + constructor(client, options) { | |
| 7436 | + super(); | |
| 7437 | + this.options = options; | |
| 7438 | + this.#client = client; | |
| 7439 | + this.#selectError = null; | |
| 7440 | + this.bindMethods(); | |
| 7441 | + this.setOptions(options); | |
| 7442 | + } | |
| 7443 | + #client; | |
| 7444 | + #currentQuery = void 0; | |
| 7445 | + #currentQueryInitialState = void 0; | |
| 7446 | + #currentResult = void 0; | |
| 7447 | + #currentResultState; | |
| 7448 | + #currentResultOptions; | |
| 7449 | + #selectError; | |
| 7450 | + #selectFn; | |
| 7451 | + #selectResult; | |
| 7452 | + // This property keeps track of the last query with defined data. | |
| 7453 | + // It will be used to pass the previous data and query to the placeholder function between renders. | |
| 7454 | + #lastQueryWithDefinedData; | |
| 7455 | + #staleTimeoutId; | |
| 7456 | + #refetchIntervalId; | |
| 7457 | + #currentRefetchInterval; | |
| 7458 | + #trackedProps = /* @__PURE__ */ new Set(); | |
| 7459 | + bindMethods() { | |
| 7460 | + this.refetch = this.refetch.bind(this); | |
| 7461 | + } | |
| 7462 | + onSubscribe() { | |
| 7463 | + if (this.listeners.size === 1) { | |
| 7464 | + this.#currentQuery.addObserver(this); | |
| 7465 | + if (shouldFetchOnMount(this.#currentQuery, this.options)) { | |
| 7466 | + this.#executeFetch(); | |
| 7467 | + } else { | |
| 7468 | + this.updateResult(); | |
| 7469 | + } | |
| 7470 | + this.#updateTimers(); | |
| 7471 | + } | |
| 7472 | + } | |
| 7473 | + onUnsubscribe() { | |
| 7474 | + if (!this.hasListeners()) { | |
| 7475 | + this.destroy(); | |
| 7476 | + } | |
| 7477 | + } | |
| 7478 | + shouldFetchOnReconnect() { | |
| 7479 | + return shouldFetchOn( | |
| 7480 | + this.#currentQuery, | |
| 7481 | + this.options, | |
| 7482 | + this.options.refetchOnReconnect | |
| 7483 | + ); | |
| 7484 | + } | |
| 7485 | + shouldFetchOnWindowFocus() { | |
| 7486 | + return shouldFetchOn( | |
| 7487 | + this.#currentQuery, | |
| 7488 | + this.options, | |
| 7489 | + this.options.refetchOnWindowFocus | |
| 7490 | + ); | |
| 7491 | + } | |
| 7492 | + destroy() { | |
| 7493 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 7494 | + this.#clearStaleTimeout(); | |
| 7495 | + this.#clearRefetchInterval(); | |
| 7496 | + this.#currentQuery.removeObserver(this); | |
| 7497 | + } | |
| 7498 | + setOptions(options, notifyOptions) { | |
| 7499 | + const prevOptions = this.options; | |
| 7500 | + const prevQuery = this.#currentQuery; | |
| 7501 | + this.options = this.#client.defaultQueryOptions(options); | |
| 7502 | + if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") { | |
| 7503 | + throw new Error( | |
| 7504 | + "Expected enabled to be a boolean or a callback that returns a boolean" | |
| 7505 | + ); | |
| 7506 | + } | |
| 7507 | + this.#updateQuery(); | |
| 7508 | + this.#currentQuery.setOptions(this.options); | |
| 7509 | + if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) { | |
| 7510 | + this.#client.getQueryCache().notify({ | |
| 7511 | + type: "observerOptionsUpdated", | |
| 7512 | + query: this.#currentQuery, | |
| 7513 | + observer: this | |
| 7514 | + }); | |
| 7515 | + } | |
| 7516 | + const mounted = this.hasListeners(); | |
| 7517 | + if (mounted && shouldFetchOptionally( | |
| 7518 | + this.#currentQuery, | |
| 7519 | + prevQuery, | |
| 7520 | + this.options, | |
| 7521 | + prevOptions | |
| 7522 | + )) { | |
| 7523 | + this.#executeFetch(); | |
| 7524 | + } | |
| 7525 | + this.updateResult(notifyOptions); | |
| 7526 | + if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0, import_utils.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0, import_utils.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) { | |
| 7527 | + this.#updateStaleTimeout(); | |
| 7528 | + } | |
| 7529 | + const nextRefetchInterval = this.#computeRefetchInterval(); | |
| 7530 | + if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) { | |
| 7531 | + this.#updateRefetchInterval(nextRefetchInterval); | |
| 7532 | + } | |
| 7533 | + } | |
| 7534 | + getOptimisticResult(options) { | |
| 7535 | + const query = this.#client.getQueryCache().build(this.#client, options); | |
| 7536 | + const result = this.createResult(query, options); | |
| 7537 | + if (shouldAssignObserverCurrentProperties(this, result)) { | |
| 7538 | + this.#currentResult = result; | |
| 7539 | + this.#currentResultOptions = this.options; | |
| 7540 | + this.#currentResultState = this.#currentQuery.state; | |
| 7541 | + } | |
| 7542 | + return result; | |
| 7543 | + } | |
| 7544 | + getCurrentResult() { | |
| 7545 | + return this.#currentResult; | |
| 7546 | + } | |
| 7547 | + trackResult(result, onPropTracked) { | |
| 7548 | + const trackedResult = {}; | |
| 7549 | + Object.keys(result).forEach((key) => { | |
| 7550 | + Object.defineProperty(trackedResult, key, { | |
| 7551 | + configurable: false, | |
| 7552 | + enumerable: true, | |
| 7553 | + get: () => { | |
| 7554 | + this.trackProp(key); | |
| 7555 | + onPropTracked?.(key); | |
| 7556 | + return result[key]; | |
| 7557 | + } | |
| 7558 | + }); | |
| 7559 | + }); | |
| 7560 | + return trackedResult; | |
| 7561 | + } | |
| 7562 | + trackProp(key) { | |
| 7563 | + this.#trackedProps.add(key); | |
| 7564 | + } | |
| 7565 | + getCurrentQuery() { | |
| 7566 | + return this.#currentQuery; | |
| 7567 | + } | |
| 7568 | + refetch({ ...options } = {}) { | |
| 7569 | + return this.fetch({ | |
| 7570 | + ...options | |
| 7571 | + }); | |
| 7572 | + } | |
| 7573 | + fetchOptimistic(options) { | |
| 7574 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 7575 | + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions); | |
| 7576 | + query.isFetchingOptimistic = true; | |
| 7577 | + return query.fetch().then(() => this.createResult(query, defaultedOptions)); | |
| 7578 | + } | |
| 7579 | + fetch(fetchOptions) { | |
| 7580 | + return this.#executeFetch({ | |
| 7581 | + ...fetchOptions, | |
| 7582 | + cancelRefetch: fetchOptions.cancelRefetch ?? true | |
| 7583 | + }).then(() => { | |
| 7584 | + this.updateResult(); | |
| 7585 | + return this.#currentResult; | |
| 7586 | + }); | |
| 7587 | + } | |
| 7588 | + #executeFetch(fetchOptions) { | |
| 7589 | + this.#updateQuery(); | |
| 7590 | + let promise = this.#currentQuery.fetch( | |
| 7591 | + this.options, | |
| 7592 | + fetchOptions | |
| 7593 | + ); | |
| 7594 | + if (!fetchOptions?.throwOnError) { | |
| 7595 | + promise = promise.catch(import_utils.noop); | |
| 7596 | + } | |
| 7597 | + return promise; | |
| 7598 | + } | |
| 7599 | + #updateStaleTimeout() { | |
| 7600 | + this.#clearStaleTimeout(); | |
| 7601 | + const staleTime = (0, import_utils.resolveStaleTime)( | |
| 7602 | + this.options.staleTime, | |
| 7603 | + this.#currentQuery | |
| 7604 | + ); | |
| 7605 | + if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) { | |
| 7606 | + return; | |
| 7607 | + } | |
| 7608 | + const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime); | |
| 7609 | + const timeout = time + 1; | |
| 7610 | + this.#staleTimeoutId = setTimeout(() => { | |
| 7611 | + if (!this.#currentResult.isStale) { | |
| 7612 | + this.updateResult(); | |
| 7613 | + } | |
| 7614 | + }, timeout); | |
| 7615 | + } | |
| 7616 | + #computeRefetchInterval() { | |
| 7617 | + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false; | |
| 7618 | + } | |
| 7619 | + #updateRefetchInterval(nextInterval) { | |
| 7620 | + this.#clearRefetchInterval(); | |
| 7621 | + this.#currentRefetchInterval = nextInterval; | |
| 7622 | + if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) { | |
| 7623 | + return; | |
| 7624 | + } | |
| 7625 | + this.#refetchIntervalId = setInterval(() => { | |
| 7626 | + if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) { | |
| 7627 | + this.#executeFetch(); | |
| 7628 | + } | |
| 7629 | + }, this.#currentRefetchInterval); | |
| 7630 | + } | |
| 7631 | + #updateTimers() { | |
| 7632 | + this.#updateStaleTimeout(); | |
| 7633 | + this.#updateRefetchInterval(this.#computeRefetchInterval()); | |
| 7634 | + } | |
| 7635 | + #clearStaleTimeout() { | |
| 7636 | + if (this.#staleTimeoutId) { | |
| 7637 | + clearTimeout(this.#staleTimeoutId); | |
| 7638 | + this.#staleTimeoutId = void 0; | |
| 7639 | + } | |
| 7640 | + } | |
| 7641 | + #clearRefetchInterval() { | |
| 7642 | + if (this.#refetchIntervalId) { | |
| 7643 | + clearInterval(this.#refetchIntervalId); | |
| 7644 | + this.#refetchIntervalId = void 0; | |
| 7645 | + } | |
| 7646 | + } | |
| 7647 | + createResult(query, options) { | |
| 7648 | + const prevQuery = this.#currentQuery; | |
| 7649 | + const prevOptions = this.options; | |
| 7650 | + const prevResult = this.#currentResult; | |
| 7651 | + const prevResultState = this.#currentResultState; | |
| 7652 | + const prevResultOptions = this.#currentResultOptions; | |
| 7653 | + const queryChange = query !== prevQuery; | |
| 7654 | + const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState; | |
| 7655 | + const { state } = query; | |
| 7656 | + let newState = { ...state }; | |
| 7657 | + let isPlaceholderData = false; | |
| 7658 | + let data; | |
| 7659 | + if (options._optimisticResults) { | |
| 7660 | + const mounted = this.hasListeners(); | |
| 7661 | + const fetchOnMount = !mounted && shouldFetchOnMount(query, options); | |
| 7662 | + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions); | |
| 7663 | + if (fetchOnMount || fetchOptionally) { | |
| 7664 | + newState = { | |
| 7665 | + ...newState, | |
| 7666 | + ...(0, import_query.fetchState)(state.data, query.options) | |
| 7667 | + }; | |
| 7668 | + } | |
| 7669 | + if (options._optimisticResults === "isRestoring") { | |
| 7670 | + newState.fetchStatus = "idle"; | |
| 7671 | + } | |
| 7672 | + } | |
| 7673 | + let { error, errorUpdatedAt, status } = newState; | |
| 7674 | + if (options.select && newState.data !== void 0) { | |
| 7675 | + if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) { | |
| 7676 | + data = this.#selectResult; | |
| 7677 | + } else { | |
| 7678 | + try { | |
| 7679 | + this.#selectFn = options.select; | |
| 7680 | + data = options.select(newState.data); | |
| 7681 | + data = (0, import_utils.replaceData)(prevResult?.data, data, options); | |
| 7682 | + this.#selectResult = data; | |
| 7683 | + this.#selectError = null; | |
| 7684 | + } catch (selectError) { | |
| 7685 | + this.#selectError = selectError; | |
| 7686 | + } | |
| 7687 | + } | |
| 7688 | + } else { | |
| 7689 | + data = newState.data; | |
| 7690 | + } | |
| 7691 | + if (options.placeholderData !== void 0 && data === void 0 && status === "pending") { | |
| 7692 | + let placeholderData; | |
| 7693 | + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) { | |
| 7694 | + placeholderData = prevResult.data; | |
| 7695 | + } else { | |
| 7696 | + placeholderData = typeof options.placeholderData === "function" ? options.placeholderData( | |
| 7697 | + this.#lastQueryWithDefinedData?.state.data, | |
| 7698 | + this.#lastQueryWithDefinedData | |
| 7699 | + ) : options.placeholderData; | |
| 7700 | + if (options.select && placeholderData !== void 0) { | |
| 7701 | + try { | |
| 7702 | + placeholderData = options.select(placeholderData); | |
| 7703 | + this.#selectError = null; | |
| 7704 | + } catch (selectError) { | |
| 7705 | + this.#selectError = selectError; | |
| 7706 | + } | |
| 7707 | + } | |
| 7708 | + } | |
| 7709 | + if (placeholderData !== void 0) { | |
| 7710 | + status = "success"; | |
| 7711 | + data = (0, import_utils.replaceData)( | |
| 7712 | + prevResult?.data, | |
| 7713 | + placeholderData, | |
| 7714 | + options | |
| 7715 | + ); | |
| 7716 | + isPlaceholderData = true; | |
| 7717 | + } | |
| 7718 | + } | |
| 7719 | + if (this.#selectError) { | |
| 7720 | + error = this.#selectError; | |
| 7721 | + data = this.#selectResult; | |
| 7722 | + errorUpdatedAt = Date.now(); | |
| 7723 | + status = "error"; | |
| 7724 | + } | |
| 7725 | + const isFetching = newState.fetchStatus === "fetching"; | |
| 7726 | + const isPending = status === "pending"; | |
| 7727 | + const isError = status === "error"; | |
| 7728 | + const isLoading = isPending && isFetching; | |
| 7729 | + const hasData = data !== void 0; | |
| 7730 | + const result = { | |
| 7731 | + status, | |
| 7732 | + fetchStatus: newState.fetchStatus, | |
| 7733 | + isPending, | |
| 7734 | + isSuccess: status === "success", | |
| 7735 | + isError, | |
| 7736 | + isInitialLoading: isLoading, | |
| 7737 | + isLoading, | |
| 7738 | + data, | |
| 7739 | + dataUpdatedAt: newState.dataUpdatedAt, | |
| 7740 | + error, | |
| 7741 | + errorUpdatedAt, | |
| 7742 | + failureCount: newState.fetchFailureCount, | |
| 7743 | + failureReason: newState.fetchFailureReason, | |
| 7744 | + errorUpdateCount: newState.errorUpdateCount, | |
| 7745 | + isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0, | |
| 7746 | + isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount, | |
| 7747 | + isFetching, | |
| 7748 | + isRefetching: isFetching && !isPending, | |
| 7749 | + isLoadingError: isError && !hasData, | |
| 7750 | + isPaused: newState.fetchStatus === "paused", | |
| 7751 | + isPlaceholderData, | |
| 7752 | + isRefetchError: isError && hasData, | |
| 7753 | + isStale: isStale(query, options), | |
| 7754 | + refetch: this.refetch | |
| 7755 | + }; | |
| 7756 | + return result; | |
| 7757 | + } | |
| 7758 | + updateResult(notifyOptions) { | |
| 7759 | + const prevResult = this.#currentResult; | |
| 7760 | + const nextResult = this.createResult(this.#currentQuery, this.options); | |
| 7761 | + this.#currentResultState = this.#currentQuery.state; | |
| 7762 | + this.#currentResultOptions = this.options; | |
| 7763 | + if (this.#currentResultState.data !== void 0) { | |
| 7764 | + this.#lastQueryWithDefinedData = this.#currentQuery; | |
| 7765 | + } | |
| 7766 | + if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) { | |
| 7767 | + return; | |
| 7768 | + } | |
| 7769 | + this.#currentResult = nextResult; | |
| 7770 | + const defaultNotifyOptions = {}; | |
| 7771 | + const shouldNotifyListeners = () => { | |
| 7772 | + if (!prevResult) { | |
| 7773 | + return true; | |
| 7774 | + } | |
| 7775 | + const { notifyOnChangeProps } = this.options; | |
| 7776 | + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; | |
| 7777 | + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) { | |
| 7778 | + return true; | |
| 7779 | + } | |
| 7780 | + const includedProps = new Set( | |
| 7781 | + notifyOnChangePropsValue ?? this.#trackedProps | |
| 7782 | + ); | |
| 7783 | + if (this.options.throwOnError) { | |
| 7784 | + includedProps.add("error"); | |
| 7785 | + } | |
| 7786 | + return Object.keys(this.#currentResult).some((key) => { | |
| 7787 | + const typedKey = key; | |
| 7788 | + const changed = this.#currentResult[typedKey] !== prevResult[typedKey]; | |
| 7789 | + return changed && includedProps.has(typedKey); | |
| 7790 | + }); | |
| 7791 | + }; | |
| 7792 | + if (notifyOptions?.listeners !== false && shouldNotifyListeners()) { | |
| 7793 | + defaultNotifyOptions.listeners = true; | |
| 7794 | + } | |
| 7795 | + this.#notify({ ...defaultNotifyOptions, ...notifyOptions }); | |
| 7796 | + } | |
| 7797 | + #updateQuery() { | |
| 7798 | + const query = this.#client.getQueryCache().build(this.#client, this.options); | |
| 7799 | + if (query === this.#currentQuery) { | |
| 7800 | + return; | |
| 7801 | + } | |
| 7802 | + const prevQuery = this.#currentQuery; | |
| 7803 | + this.#currentQuery = query; | |
| 7804 | + this.#currentQueryInitialState = query.state; | |
| 7805 | + if (this.hasListeners()) { | |
| 7806 | + prevQuery?.removeObserver(this); | |
| 7807 | + query.addObserver(this); | |
| 7808 | + } | |
| 7809 | + } | |
| 7810 | + onQueryUpdate() { | |
| 7811 | + this.updateResult(); | |
| 7812 | + if (this.hasListeners()) { | |
| 7813 | + this.#updateTimers(); | |
| 7814 | + } | |
| 7815 | + } | |
| 7816 | + #notify(notifyOptions) { | |
| 7817 | + import_notifyManager.notifyManager.batch(() => { | |
| 7818 | + if (notifyOptions.listeners) { | |
| 7819 | + this.listeners.forEach((listener) => { | |
| 7820 | + listener(this.#currentResult); | |
| 7821 | + }); | |
| 7822 | + } | |
| 7823 | + this.#client.getQueryCache().notify({ | |
| 7824 | + query: this.#currentQuery, | |
| 7825 | + type: "observerResultsUpdated" | |
| 7826 | + }); | |
| 7827 | + }); | |
| 7828 | + } | |
| 7829 | +}; | |
| 7830 | +function shouldLoadOnMount(query, options) { | |
| 7831 | + return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false); | |
| 7832 | +} | |
| 7833 | +function shouldFetchOnMount(query, options) { | |
| 7834 | + return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount); | |
| 7835 | +} | |
| 7836 | +function shouldFetchOn(query, options, field) { | |
| 7837 | + if ((0, import_utils.resolveEnabled)(options.enabled, query) !== false) { | |
| 7838 | + const value = typeof field === "function" ? field(query) : field; | |
| 7839 | + return value === "always" || value !== false && isStale(query, options); | |
| 7840 | + } | |
| 7841 | + return false; | |
| 7842 | +} | |
| 7843 | +function shouldFetchOptionally(query, prevQuery, options, prevOptions) { | |
| 7844 | + return (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options); | |
| 7845 | +} | |
| 7846 | +function isStale(query, options) { | |
| 7847 | + return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query)); | |
| 7848 | +} | |
| 7849 | +function shouldAssignObserverCurrentProperties(observer, optimisticResult) { | |
| 7850 | + if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) { | |
| 7851 | + return true; | |
| 7852 | + } | |
| 7853 | + return false; | |
| 7854 | +} | |
| 7855 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7856 | +0 && (0); | |
| 7857 | +//# sourceMappingURL=queryObserver.cjs.map | |
| 7858 | + | |
| 7859 | +/***/ }), | |
| 7860 | + | |
| 7861 | +/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs": | |
| 7862 | +/*!***********************************************************************!*\ | |
| 7863 | + !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***! | |
| 7864 | + \***********************************************************************/ | |
| 7865 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7866 | + | |
| 7867 | +"use strict"; | |
| 7868 | + | |
| 7869 | +var __defProp = Object.defineProperty; | |
| 7870 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7871 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7872 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7873 | +var __export = (target, all) => { | |
| 7874 | + for (var name in all) | |
| 7875 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7876 | +}; | |
| 7877 | +var __copyProps = (to, from, except, desc) => { | |
| 7878 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7879 | + for (let key of __getOwnPropNames(from)) | |
| 7880 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7881 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7882 | + } | |
| 7883 | + return to; | |
| 7884 | +}; | |
| 7885 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7886 | + | |
| 7887 | +// src/removable.ts | |
| 7888 | +var removable_exports = {}; | |
| 7889 | +__export(removable_exports, { | |
| 7890 | + Removable: () => Removable | |
| 7891 | +}); | |
| 7892 | +module.exports = __toCommonJS(removable_exports); | |
| 7893 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7894 | +var Removable = class { | |
| 7895 | + #gcTimeout; | |
| 7896 | + destroy() { | |
| 7897 | + this.clearGcTimeout(); | |
| 7898 | + } | |
| 7899 | + scheduleGc() { | |
| 7900 | + this.clearGcTimeout(); | |
| 7901 | + if ((0, import_utils.isValidTimeout)(this.gcTime)) { | |
| 7902 | + this.#gcTimeout = setTimeout(() => { | |
| 7903 | + this.optionalRemove(); | |
| 7904 | + }, this.gcTime); | |
| 7905 | + } | |
| 7906 | + } | |
| 7907 | + updateGcTime(newGcTime) { | |
| 7908 | + this.gcTime = Math.max( | |
| 7909 | + this.gcTime || 0, | |
| 7910 | + newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3) | |
| 7911 | + ); | |
| 7912 | + } | |
| 7913 | + clearGcTimeout() { | |
| 7914 | + if (this.#gcTimeout) { | |
| 7915 | + clearTimeout(this.#gcTimeout); | |
| 7916 | + this.#gcTimeout = void 0; | |
| 7917 | + } | |
| 7918 | + } | |
| 7919 | +}; | |
| 7920 | +// Annotate the CommonJS export names for ESM import in node: | |
| 7921 | +0 && (0); | |
| 7922 | +//# sourceMappingURL=removable.cjs.map | |
| 7923 | + | |
| 7924 | +/***/ }), | |
| 7925 | + | |
| 7926 | +/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs": | |
| 7927 | +/*!*********************************************************************!*\ | |
| 7928 | + !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***! | |
| 7929 | + \*********************************************************************/ | |
| 7930 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 7931 | + | |
| 7932 | +"use strict"; | |
| 7933 | + | |
| 7934 | +var __defProp = Object.defineProperty; | |
| 7935 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 7936 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 7937 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 7938 | +var __export = (target, all) => { | |
| 7939 | + for (var name in all) | |
| 7940 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 7941 | +}; | |
| 7942 | +var __copyProps = (to, from, except, desc) => { | |
| 7943 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 7944 | + for (let key of __getOwnPropNames(from)) | |
| 7945 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 7946 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 7947 | + } | |
| 7948 | + return to; | |
| 7949 | +}; | |
| 7950 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 7951 | + | |
| 7952 | +// src/retryer.ts | |
| 7953 | +var retryer_exports = {}; | |
| 7954 | +__export(retryer_exports, { | |
| 7955 | + CancelledError: () => CancelledError, | |
| 7956 | + canFetch: () => canFetch, | |
| 7957 | + createRetryer: () => createRetryer, | |
| 7958 | + isCancelledError: () => isCancelledError | |
| 7959 | +}); | |
| 7960 | +module.exports = __toCommonJS(retryer_exports); | |
| 7961 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 7962 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 7963 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 7964 | +function defaultRetryDelay(failureCount) { | |
| 7965 | + return Math.min(1e3 * 2 ** failureCount, 3e4); | |
| 7966 | +} | |
| 7967 | +function canFetch(networkMode) { | |
| 7968 | + return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true; | |
| 7969 | +} | |
| 7970 | +var CancelledError = class { | |
| 7971 | + constructor(options) { | |
| 7972 | + this.revert = options?.revert; | |
| 7973 | + this.silent = options?.silent; | |
| 7974 | + } | |
| 7975 | +}; | |
| 7976 | +function isCancelledError(value) { | |
| 7977 | + return value instanceof CancelledError; | |
| 7978 | +} | |
| 7979 | +function createRetryer(config) { | |
| 7980 | + let isRetryCancelled = false; | |
| 7981 | + let failureCount = 0; | |
| 7982 | + let isResolved = false; | |
| 7983 | + let continueFn; | |
| 7984 | + let promiseResolve; | |
| 7985 | + let promiseReject; | |
| 7986 | + const promise = new Promise((outerResolve, outerReject) => { | |
| 7987 | + promiseResolve = outerResolve; | |
| 7988 | + promiseReject = outerReject; | |
| 7989 | + }); | |
| 7990 | + const cancel = (cancelOptions) => { | |
| 7991 | + if (!isResolved) { | |
| 7992 | + reject(new CancelledError(cancelOptions)); | |
| 7993 | + config.abort?.(); | |
| 7994 | + } | |
| 7995 | + }; | |
| 7996 | + const cancelRetry = () => { | |
| 7997 | + isRetryCancelled = true; | |
| 7998 | + }; | |
| 7999 | + const continueRetry = () => { | |
| 8000 | + isRetryCancelled = false; | |
| 8001 | + }; | |
| 8002 | + const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun(); | |
| 8003 | + const canStart = () => canFetch(config.networkMode) && config.canRun(); | |
| 8004 | + const resolve = (value) => { | |
| 8005 | + if (!isResolved) { | |
| 8006 | + isResolved = true; | |
| 8007 | + config.onSuccess?.(value); | |
| 8008 | + continueFn?.(); | |
| 8009 | + promiseResolve(value); | |
| 8010 | + } | |
| 8011 | + }; | |
| 8012 | + const reject = (value) => { | |
| 8013 | + if (!isResolved) { | |
| 8014 | + isResolved = true; | |
| 8015 | + config.onError?.(value); | |
| 8016 | + continueFn?.(); | |
| 8017 | + promiseReject(value); | |
| 8018 | + } | |
| 8019 | + }; | |
| 8020 | + const pause = () => { | |
| 8021 | + return new Promise((continueResolve) => { | |
| 8022 | + continueFn = (value) => { | |
| 8023 | + if (isResolved || canContinue()) { | |
| 8024 | + continueResolve(value); | |
| 8025 | + } | |
| 8026 | + }; | |
| 8027 | + config.onPause?.(); | |
| 8028 | + }).then(() => { | |
| 8029 | + continueFn = void 0; | |
| 8030 | + if (!isResolved) { | |
| 8031 | + config.onContinue?.(); | |
| 8032 | + } | |
| 8033 | + }); | |
| 8034 | + }; | |
| 8035 | + const run = () => { | |
| 8036 | + if (isResolved) { | |
| 8037 | + return; | |
| 8038 | + } | |
| 8039 | + let promiseOrValue; | |
| 8040 | + const initialPromise = failureCount === 0 ? config.initialPromise : void 0; | |
| 8041 | + try { | |
| 8042 | + promiseOrValue = initialPromise ?? config.fn(); | |
| 8043 | + } catch (error) { | |
| 8044 | + promiseOrValue = Promise.reject(error); | |
| 8045 | + } | |
| 8046 | + Promise.resolve(promiseOrValue).then(resolve).catch((error) => { | |
| 8047 | + if (isResolved) { | |
| 8048 | + return; | |
| 8049 | + } | |
| 8050 | + const retry = config.retry ?? (import_utils.isServer ? 0 : 3); | |
| 8051 | + const retryDelay = config.retryDelay ?? defaultRetryDelay; | |
| 8052 | + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; | |
| 8053 | + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error); | |
| 8054 | + if (isRetryCancelled || !shouldRetry) { | |
| 8055 | + reject(error); | |
| 8056 | + return; | |
| 8057 | + } | |
| 8058 | + failureCount++; | |
| 8059 | + config.onFail?.(failureCount, error); | |
| 8060 | + (0, import_utils.sleep)(delay).then(() => { | |
| 8061 | + return canContinue() ? void 0 : pause(); | |
| 8062 | + }).then(() => { | |
| 8063 | + if (isRetryCancelled) { | |
| 8064 | + reject(error); | |
| 8065 | + } else { | |
| 8066 | + run(); | |
| 8067 | + } | |
| 8068 | + }); | |
| 8069 | + }); | |
| 8070 | + }; | |
| 8071 | + return { | |
| 8072 | + promise, | |
| 8073 | + cancel, | |
| 8074 | + continue: () => { | |
| 8075 | + continueFn?.(); | |
| 8076 | + return promise; | |
| 8077 | + }, | |
| 8078 | + cancelRetry, | |
| 8079 | + continueRetry, | |
| 8080 | + canStart, | |
| 8081 | + start: () => { | |
| 8082 | + if (canStart()) { | |
| 8083 | + run(); | |
| 8084 | + } else { | |
| 8085 | + pause().then(run); | |
| 8086 | + } | |
| 8087 | + return promise; | |
| 8088 | + } | |
| 8089 | + }; | |
| 8090 | +} | |
| 8091 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8092 | +0 && (0); | |
| 8093 | +//# sourceMappingURL=retryer.cjs.map | |
| 8094 | + | |
| 8095 | +/***/ }), | |
| 8096 | + | |
| 8097 | +/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs": | |
| 8098 | +/*!**************************************************************************!*\ | |
| 8099 | + !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***! | |
| 8100 | + \**************************************************************************/ | |
| 8101 | +/***/ ((module) => { | |
| 8102 | + | |
| 8103 | +"use strict"; | |
| 8104 | + | |
| 8105 | +var __defProp = Object.defineProperty; | |
| 8106 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8107 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8108 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8109 | +var __export = (target, all) => { | |
| 8110 | + for (var name in all) | |
| 8111 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8112 | +}; | |
| 8113 | +var __copyProps = (to, from, except, desc) => { | |
| 8114 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8115 | + for (let key of __getOwnPropNames(from)) | |
| 8116 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8117 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8118 | + } | |
| 8119 | + return to; | |
| 8120 | +}; | |
| 8121 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8122 | + | |
| 8123 | +// src/subscribable.ts | |
| 8124 | +var subscribable_exports = {}; | |
| 8125 | +__export(subscribable_exports, { | |
| 8126 | + Subscribable: () => Subscribable | |
| 8127 | +}); | |
| 8128 | +module.exports = __toCommonJS(subscribable_exports); | |
| 8129 | +var Subscribable = class { | |
| 8130 | + constructor() { | |
| 8131 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 8132 | + this.subscribe = this.subscribe.bind(this); | |
| 8133 | + } | |
| 8134 | + subscribe(listener) { | |
| 8135 | + this.listeners.add(listener); | |
| 8136 | + this.onSubscribe(); | |
| 8137 | + return () => { | |
| 8138 | + this.listeners.delete(listener); | |
| 8139 | + this.onUnsubscribe(); | |
| 8140 | + }; | |
| 8141 | + } | |
| 8142 | + hasListeners() { | |
| 8143 | + return this.listeners.size > 0; | |
| 8144 | + } | |
| 8145 | + onSubscribe() { | |
| 8146 | + } | |
| 8147 | + onUnsubscribe() { | |
| 8148 | + } | |
| 8149 | +}; | |
| 8150 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8151 | +0 && (0); | |
| 8152 | +//# sourceMappingURL=subscribable.cjs.map | |
| 8153 | + | |
| 8154 | +/***/ }), | |
| 8155 | + | |
| 8156 | +/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs": | |
| 8157 | +/*!*******************************************************************!*\ | |
| 8158 | + !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***! | |
| 8159 | + \*******************************************************************/ | |
| 8160 | +/***/ ((module) => { | |
| 8161 | + | |
| 8162 | +"use strict"; | |
| 8163 | + | |
| 8164 | +var __defProp = Object.defineProperty; | |
| 8165 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8166 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8167 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8168 | +var __copyProps = (to, from, except, desc) => { | |
| 8169 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8170 | + for (let key of __getOwnPropNames(from)) | |
| 8171 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8172 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8173 | + } | |
| 8174 | + return to; | |
| 8175 | +}; | |
| 8176 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8177 | + | |
| 8178 | +// src/types.ts | |
| 8179 | +var types_exports = {}; | |
| 8180 | +module.exports = __toCommonJS(types_exports); | |
| 8181 | +//# sourceMappingURL=types.cjs.map | |
| 8182 | + | |
| 8183 | +/***/ }), | |
| 8184 | + | |
| 8185 | +/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs": | |
| 8186 | +/*!*******************************************************************!*\ | |
| 8187 | + !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***! | |
| 8188 | + \*******************************************************************/ | |
| 8189 | +/***/ ((module) => { | |
| 8190 | + | |
| 8191 | +"use strict"; | |
| 8192 | + | |
| 8193 | +var __defProp = Object.defineProperty; | |
| 8194 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8195 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8196 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8197 | +var __export = (target, all) => { | |
| 8198 | + for (var name in all) | |
| 8199 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8200 | +}; | |
| 8201 | +var __copyProps = (to, from, except, desc) => { | |
| 8202 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8203 | + for (let key of __getOwnPropNames(from)) | |
| 8204 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8205 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8206 | + } | |
| 8207 | + return to; | |
| 8208 | +}; | |
| 8209 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8210 | + | |
| 8211 | +// src/utils.ts | |
| 8212 | +var utils_exports = {}; | |
| 8213 | +__export(utils_exports, { | |
| 8214 | + addToEnd: () => addToEnd, | |
| 8215 | + addToStart: () => addToStart, | |
| 8216 | + ensureQueryFn: () => ensureQueryFn, | |
| 8217 | + functionalUpdate: () => functionalUpdate, | |
| 8218 | + hashKey: () => hashKey, | |
| 8219 | + hashQueryKeyByOptions: () => hashQueryKeyByOptions, | |
| 8220 | + isPlainArray: () => isPlainArray, | |
| 8221 | + isPlainObject: () => isPlainObject, | |
| 8222 | + isServer: () => isServer, | |
| 8223 | + isValidTimeout: () => isValidTimeout, | |
| 8224 | + keepPreviousData: () => keepPreviousData, | |
| 8225 | + matchMutation: () => matchMutation, | |
| 8226 | + matchQuery: () => matchQuery, | |
| 8227 | + noop: () => noop, | |
| 8228 | + partialMatchKey: () => partialMatchKey, | |
| 8229 | + replaceData: () => replaceData, | |
| 8230 | + replaceEqualDeep: () => replaceEqualDeep, | |
| 8231 | + resolveEnabled: () => resolveEnabled, | |
| 8232 | + resolveStaleTime: () => resolveStaleTime, | |
| 8233 | + shallowEqualObjects: () => shallowEqualObjects, | |
| 8234 | + skipToken: () => skipToken, | |
| 8235 | + sleep: () => sleep, | |
| 8236 | + timeUntilStale: () => timeUntilStale | |
| 8237 | +}); | |
| 8238 | +module.exports = __toCommonJS(utils_exports); | |
| 8239 | +var isServer = typeof window === "undefined" || "Deno" in globalThis; | |
| 8240 | +function noop() { | |
| 8241 | + return void 0; | |
| 8242 | +} | |
| 8243 | +function functionalUpdate(updater, input) { | |
| 8244 | + return typeof updater === "function" ? updater(input) : updater; | |
| 8245 | +} | |
| 8246 | +function isValidTimeout(value) { | |
| 8247 | + return typeof value === "number" && value >= 0 && value !== Infinity; | |
| 8248 | +} | |
| 8249 | +function timeUntilStale(updatedAt, staleTime) { | |
| 8250 | + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0); | |
| 8251 | +} | |
| 8252 | +function resolveStaleTime(staleTime, query) { | |
| 8253 | + return typeof staleTime === "function" ? staleTime(query) : staleTime; | |
| 8254 | +} | |
| 8255 | +function resolveEnabled(enabled, query) { | |
| 8256 | + return typeof enabled === "function" ? enabled(query) : enabled; | |
| 8257 | +} | |
| 8258 | +function matchQuery(filters, query) { | |
| 8259 | + const { | |
| 8260 | + type = "all", | |
| 8261 | + exact, | |
| 8262 | + fetchStatus, | |
| 8263 | + predicate, | |
| 8264 | + queryKey, | |
| 8265 | + stale | |
| 8266 | + } = filters; | |
| 8267 | + if (queryKey) { | |
| 8268 | + if (exact) { | |
| 8269 | + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) { | |
| 8270 | + return false; | |
| 8271 | + } | |
| 8272 | + } else if (!partialMatchKey(query.queryKey, queryKey)) { | |
| 8273 | + return false; | |
| 8274 | + } | |
| 8275 | + } | |
| 8276 | + if (type !== "all") { | |
| 8277 | + const isActive = query.isActive(); | |
| 8278 | + if (type === "active" && !isActive) { | |
| 8279 | + return false; | |
| 8280 | + } | |
| 8281 | + if (type === "inactive" && isActive) { | |
| 8282 | + return false; | |
| 8283 | + } | |
| 8284 | + } | |
| 8285 | + if (typeof stale === "boolean" && query.isStale() !== stale) { | |
| 8286 | + return false; | |
| 8287 | + } | |
| 8288 | + if (fetchStatus && fetchStatus !== query.state.fetchStatus) { | |
| 8289 | + return false; | |
| 8290 | + } | |
| 8291 | + if (predicate && !predicate(query)) { | |
| 8292 | + return false; | |
| 8293 | + } | |
| 8294 | + return true; | |
| 8295 | +} | |
| 8296 | +function matchMutation(filters, mutation) { | |
| 8297 | + const { exact, status, predicate, mutationKey } = filters; | |
| 8298 | + if (mutationKey) { | |
| 8299 | + if (!mutation.options.mutationKey) { | |
| 8300 | + return false; | |
| 8301 | + } | |
| 8302 | + if (exact) { | |
| 8303 | + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) { | |
| 8304 | + return false; | |
| 8305 | + } | |
| 8306 | + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) { | |
| 8307 | + return false; | |
| 8308 | + } | |
| 8309 | + } | |
| 8310 | + if (status && mutation.state.status !== status) { | |
| 8311 | + return false; | |
| 8312 | + } | |
| 8313 | + if (predicate && !predicate(mutation)) { | |
| 8314 | + return false; | |
| 8315 | + } | |
| 8316 | + return true; | |
| 8317 | +} | |
| 8318 | +function hashQueryKeyByOptions(queryKey, options) { | |
| 8319 | + const hashFn = options?.queryKeyHashFn || hashKey; | |
| 8320 | + return hashFn(queryKey); | |
| 8321 | +} | |
| 8322 | +function hashKey(queryKey) { | |
| 8323 | + return JSON.stringify( | |
| 8324 | + queryKey, | |
| 8325 | + (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => { | |
| 8326 | + result[key] = val[key]; | |
| 8327 | + return result; | |
| 8328 | + }, {}) : val | |
| 8329 | + ); | |
| 8330 | +} | |
| 8331 | +function partialMatchKey(a, b) { | |
| 8332 | + if (a === b) { | |
| 8333 | + return true; | |
| 8334 | + } | |
| 8335 | + if (typeof a !== typeof b) { | |
| 8336 | + return false; | |
| 8337 | + } | |
| 8338 | + if (a && b && typeof a === "object" && typeof b === "object") { | |
| 8339 | + return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key])); | |
| 8340 | + } | |
| 8341 | + return false; | |
| 8342 | +} | |
| 8343 | +function replaceEqualDeep(a, b) { | |
| 8344 | + if (a === b) { | |
| 8345 | + return a; | |
| 8346 | + } | |
| 8347 | + const array = isPlainArray(a) && isPlainArray(b); | |
| 8348 | + if (array || isPlainObject(a) && isPlainObject(b)) { | |
| 8349 | + const aItems = array ? a : Object.keys(a); | |
| 8350 | + const aSize = aItems.length; | |
| 8351 | + const bItems = array ? b : Object.keys(b); | |
| 8352 | + const bSize = bItems.length; | |
| 8353 | + const copy = array ? [] : {}; | |
| 8354 | + let equalItems = 0; | |
| 8355 | + for (let i = 0; i < bSize; i++) { | |
| 8356 | + const key = array ? i : bItems[i]; | |
| 8357 | + if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) { | |
| 8358 | + copy[key] = void 0; | |
| 8359 | + equalItems++; | |
| 8360 | + } else { | |
| 8361 | + copy[key] = replaceEqualDeep(a[key], b[key]); | |
| 8362 | + if (copy[key] === a[key] && a[key] !== void 0) { | |
| 8363 | + equalItems++; | |
| 8364 | + } | |
| 8365 | + } | |
| 8366 | + } | |
| 8367 | + return aSize === bSize && equalItems === aSize ? a : copy; | |
| 8368 | + } | |
| 8369 | + return b; | |
| 8370 | +} | |
| 8371 | +function shallowEqualObjects(a, b) { | |
| 8372 | + if (!b || Object.keys(a).length !== Object.keys(b).length) { | |
| 8373 | + return false; | |
| 8374 | + } | |
| 8375 | + for (const key in a) { | |
| 8376 | + if (a[key] !== b[key]) { | |
| 8377 | + return false; | |
| 8378 | + } | |
| 8379 | + } | |
| 8380 | + return true; | |
| 8381 | +} | |
| 8382 | +function isPlainArray(value) { | |
| 8383 | + return Array.isArray(value) && value.length === Object.keys(value).length; | |
| 8384 | +} | |
| 8385 | +function isPlainObject(o) { | |
| 8386 | + if (!hasObjectPrototype(o)) { | |
| 8387 | + return false; | |
| 8388 | + } | |
| 8389 | + const ctor = o.constructor; | |
| 8390 | + if (ctor === void 0) { | |
| 8391 | + return true; | |
| 8392 | + } | |
| 8393 | + const prot = ctor.prototype; | |
| 8394 | + if (!hasObjectPrototype(prot)) { | |
| 8395 | + return false; | |
| 8396 | + } | |
| 8397 | + if (!prot.hasOwnProperty("isPrototypeOf")) { | |
| 8398 | + return false; | |
| 8399 | + } | |
| 8400 | + if (Object.getPrototypeOf(o) !== Object.prototype) { | |
| 8401 | + return false; | |
| 8402 | + } | |
| 8403 | + return true; | |
| 8404 | +} | |
| 8405 | +function hasObjectPrototype(o) { | |
| 8406 | + return Object.prototype.toString.call(o) === "[object Object]"; | |
| 8407 | +} | |
| 8408 | +function sleep(ms) { | |
| 8409 | + return new Promise((resolve) => { | |
| 8410 | + setTimeout(resolve, ms); | |
| 8411 | + }); | |
| 8412 | +} | |
| 8413 | +function replaceData(prevData, data, options) { | |
| 8414 | + if (typeof options.structuralSharing === "function") { | |
| 8415 | + return options.structuralSharing(prevData, data); | |
| 8416 | + } else if (options.structuralSharing !== false) { | |
| 8417 | + return replaceEqualDeep(prevData, data); | |
| 8418 | + } | |
| 8419 | + return data; | |
| 8420 | +} | |
| 8421 | +function keepPreviousData(previousData) { | |
| 8422 | + return previousData; | |
| 8423 | +} | |
| 8424 | +function addToEnd(items, item, max = 0) { | |
| 8425 | + const newItems = [...items, item]; | |
| 8426 | + return max && newItems.length > max ? newItems.slice(1) : newItems; | |
| 8427 | +} | |
| 8428 | +function addToStart(items, item, max = 0) { | |
| 8429 | + const newItems = [item, ...items]; | |
| 8430 | + return max && newItems.length > max ? newItems.slice(0, -1) : newItems; | |
| 8431 | +} | |
| 8432 | +var skipToken = Symbol(); | |
| 8433 | +var ensureQueryFn = (options, fetchOptions) => { | |
| 8434 | + if (true) { | |
| 8435 | + if (options.queryFn === skipToken) { | |
| 8436 | + console.error( | |
| 8437 | + `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'` | |
| 8438 | + ); | |
| 8439 | + } | |
| 8440 | + } | |
| 8441 | + if (!options.queryFn && fetchOptions?.initialPromise) { | |
| 8442 | + return () => fetchOptions.initialPromise; | |
| 8443 | + } | |
| 8444 | + if (!options.queryFn || options.queryFn === skipToken) { | |
| 8445 | + return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`)); | |
| 8446 | + } | |
| 8447 | + return options.queryFn; | |
| 8448 | +}; | |
| 8449 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8450 | +0 && (0); | |
| 8451 | +//# sourceMappingURL=utils.cjs.map | |
| 8452 | + | |
| 8453 | +/***/ }), | |
| 8454 | + | |
| 8455 | +/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs": | |
| 8456 | +/*!********************************************************************************!*\ | |
| 8457 | + !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***! | |
| 8458 | + \********************************************************************************/ | |
| 8459 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8460 | + | |
| 8461 | +"use strict"; | |
| 8462 | + | |
| 8463 | +"use client"; | |
| 8464 | +var __create = Object.create; | |
| 8465 | +var __defProp = Object.defineProperty; | |
| 8466 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8467 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8468 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8469 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8470 | +var __export = (target, all) => { | |
| 8471 | + for (var name in all) | |
| 8472 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8473 | +}; | |
| 8474 | +var __copyProps = (to, from, except, desc) => { | |
| 8475 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8476 | + for (let key of __getOwnPropNames(from)) | |
| 8477 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8478 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8479 | + } | |
| 8480 | + return to; | |
| 8481 | +}; | |
| 8482 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8483 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8484 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8485 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8486 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8487 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8488 | + mod | |
| 8489 | +)); | |
| 8490 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8491 | + | |
| 8492 | +// src/HydrationBoundary.tsx | |
| 8493 | +var HydrationBoundary_exports = {}; | |
| 8494 | +__export(HydrationBoundary_exports, { | |
| 8495 | + HydrationBoundary: () => HydrationBoundary | |
| 8496 | +}); | |
| 8497 | +module.exports = __toCommonJS(HydrationBoundary_exports); | |
| 8498 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8499 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 8500 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 8501 | +var HydrationBoundary = ({ | |
| 8502 | + children, | |
| 8503 | + options = {}, | |
| 8504 | + state, | |
| 8505 | + queryClient | |
| 8506 | +}) => { | |
| 8507 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 8508 | + const [hydrationQueue, setHydrationQueue] = React.useState(); | |
| 8509 | + const optionsRef = React.useRef(options); | |
| 8510 | + optionsRef.current = options; | |
| 8511 | + React.useMemo(() => { | |
| 8512 | + if (state) { | |
| 8513 | + if (typeof state !== "object") { | |
| 8514 | + return; | |
| 8515 | + } | |
| 8516 | + const queryCache = client.getQueryCache(); | |
| 8517 | + const queries = state.queries || []; | |
| 8518 | + const newQueries = []; | |
| 8519 | + const existingQueries = []; | |
| 8520 | + for (const dehydratedQuery of queries) { | |
| 8521 | + const existingQuery = queryCache.get(dehydratedQuery.queryHash); | |
| 8522 | + if (!existingQuery) { | |
| 8523 | + newQueries.push(dehydratedQuery); | |
| 8524 | + } else { | |
| 8525 | + const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt; | |
| 8526 | + const queryAlreadyQueued = hydrationQueue?.find( | |
| 8527 | + (query) => query.queryHash === dehydratedQuery.queryHash | |
| 8528 | + ); | |
| 8529 | + if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) { | |
| 8530 | + existingQueries.push(dehydratedQuery); | |
| 8531 | + } | |
| 8532 | + } | |
| 8533 | + } | |
| 8534 | + if (newQueries.length > 0) { | |
| 8535 | + (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current); | |
| 8536 | + } | |
| 8537 | + if (existingQueries.length > 0) { | |
| 8538 | + setHydrationQueue( | |
| 8539 | + (prev) => prev ? [...prev, ...existingQueries] : existingQueries | |
| 8540 | + ); | |
| 8541 | + } | |
| 8542 | + } | |
| 8543 | + }, [client, hydrationQueue, state]); | |
| 8544 | + React.useEffect(() => { | |
| 8545 | + if (hydrationQueue) { | |
| 8546 | + (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current); | |
| 8547 | + setHydrationQueue(void 0); | |
| 8548 | + } | |
| 8549 | + }, [client, hydrationQueue]); | |
| 8550 | + return children; | |
| 8551 | +}; | |
| 8552 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8553 | +0 && (0); | |
| 8554 | +//# sourceMappingURL=HydrationBoundary.cjs.map | |
| 8555 | + | |
| 8556 | +/***/ }), | |
| 8557 | + | |
| 8558 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs": | |
| 8559 | +/*!**********************************************************************************!*\ | |
| 8560 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***! | |
| 8561 | + \**********************************************************************************/ | |
| 8562 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8563 | + | |
| 8564 | +"use strict"; | |
| 8565 | + | |
| 8566 | +"use client"; | |
| 8567 | +var __create = Object.create; | |
| 8568 | +var __defProp = Object.defineProperty; | |
| 8569 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8570 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8571 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8572 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8573 | +var __export = (target, all) => { | |
| 8574 | + for (var name in all) | |
| 8575 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8576 | +}; | |
| 8577 | +var __copyProps = (to, from, except, desc) => { | |
| 8578 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8579 | + for (let key of __getOwnPropNames(from)) | |
| 8580 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8581 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8582 | + } | |
| 8583 | + return to; | |
| 8584 | +}; | |
| 8585 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8586 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8587 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8588 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8589 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8590 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8591 | + mod | |
| 8592 | +)); | |
| 8593 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8594 | + | |
| 8595 | +// src/QueryClientProvider.tsx | |
| 8596 | +var QueryClientProvider_exports = {}; | |
| 8597 | +__export(QueryClientProvider_exports, { | |
| 8598 | + QueryClientContext: () => QueryClientContext, | |
| 8599 | + QueryClientProvider: () => QueryClientProvider, | |
| 8600 | + useQueryClient: () => useQueryClient | |
| 8601 | +}); | |
| 8602 | +module.exports = __toCommonJS(QueryClientProvider_exports); | |
| 8603 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8604 | +var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js"); | |
| 8605 | +var QueryClientContext = React.createContext( | |
| 8606 | + void 0 | |
| 8607 | +); | |
| 8608 | +var useQueryClient = (queryClient) => { | |
| 8609 | + const client = React.useContext(QueryClientContext); | |
| 8610 | + if (queryClient) { | |
| 8611 | + return queryClient; | |
| 8612 | + } | |
| 8613 | + if (!client) { | |
| 8614 | + throw new Error("No QueryClient set, use QueryClientProvider to set one"); | |
| 8615 | + } | |
| 8616 | + return client; | |
| 8617 | +}; | |
| 8618 | +var QueryClientProvider = ({ | |
| 8619 | + client, | |
| 8620 | + children | |
| 8621 | +}) => { | |
| 8622 | + React.useEffect(() => { | |
| 8623 | + client.mount(); | |
| 8624 | + return () => { | |
| 8625 | + client.unmount(); | |
| 8626 | + }; | |
| 8627 | + }, [client]); | |
| 8628 | + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children }); | |
| 8629 | +}; | |
| 8630 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8631 | +0 && (0); | |
| 8632 | +//# sourceMappingURL=QueryClientProvider.cjs.map | |
| 8633 | + | |
| 8634 | +/***/ }), | |
| 8635 | + | |
| 8636 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs": | |
| 8637 | +/*!**************************************************************************************!*\ | |
| 8638 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***! | |
| 8639 | + \**************************************************************************************/ | |
| 8640 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8641 | + | |
| 8642 | +"use strict"; | |
| 8643 | + | |
| 8644 | +"use client"; | |
| 8645 | +var __create = Object.create; | |
| 8646 | +var __defProp = Object.defineProperty; | |
| 8647 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8648 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8649 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8650 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8651 | +var __export = (target, all) => { | |
| 8652 | + for (var name in all) | |
| 8653 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8654 | +}; | |
| 8655 | +var __copyProps = (to, from, except, desc) => { | |
| 8656 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8657 | + for (let key of __getOwnPropNames(from)) | |
| 8658 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8659 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8660 | + } | |
| 8661 | + return to; | |
| 8662 | +}; | |
| 8663 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8664 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8665 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8666 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8667 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8668 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8669 | + mod | |
| 8670 | +)); | |
| 8671 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8672 | + | |
| 8673 | +// src/QueryErrorResetBoundary.tsx | |
| 8674 | +var QueryErrorResetBoundary_exports = {}; | |
| 8675 | +__export(QueryErrorResetBoundary_exports, { | |
| 8676 | + QueryErrorResetBoundary: () => QueryErrorResetBoundary, | |
| 8677 | + useQueryErrorResetBoundary: () => useQueryErrorResetBoundary | |
| 8678 | +}); | |
| 8679 | +module.exports = __toCommonJS(QueryErrorResetBoundary_exports); | |
| 8680 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8681 | +var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js"); | |
| 8682 | +function createValue() { | |
| 8683 | + let isReset = false; | |
| 8684 | + return { | |
| 8685 | + clearReset: () => { | |
| 8686 | + isReset = false; | |
| 8687 | + }, | |
| 8688 | + reset: () => { | |
| 8689 | + isReset = true; | |
| 8690 | + }, | |
| 8691 | + isReset: () => { | |
| 8692 | + return isReset; | |
| 8693 | + } | |
| 8694 | + }; | |
| 8695 | +} | |
| 8696 | +var QueryErrorResetBoundaryContext = React.createContext(createValue()); | |
| 8697 | +var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext); | |
| 8698 | +var QueryErrorResetBoundary = ({ | |
| 8699 | + children | |
| 8700 | +}) => { | |
| 8701 | + const [value] = React.useState(() => createValue()); | |
| 8702 | + return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children }); | |
| 8703 | +}; | |
| 8704 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8705 | +0 && (0); | |
| 8706 | +//# sourceMappingURL=QueryErrorResetBoundary.cjs.map | |
| 8707 | + | |
| 8708 | +/***/ }), | |
| 8709 | + | |
| 8710 | +/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs": | |
| 8711 | +/*!*********************************************************************************!*\ | |
| 8712 | + !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***! | |
| 8713 | + \*********************************************************************************/ | |
| 8714 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8715 | + | |
| 8716 | +"use strict"; | |
| 8717 | + | |
| 8718 | +"use client"; | |
| 8719 | +var __create = Object.create; | |
| 8720 | +var __defProp = Object.defineProperty; | |
| 8721 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8722 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8723 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8724 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8725 | +var __export = (target, all) => { | |
| 8726 | + for (var name in all) | |
| 8727 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8728 | +}; | |
| 8729 | +var __copyProps = (to, from, except, desc) => { | |
| 8730 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8731 | + for (let key of __getOwnPropNames(from)) | |
| 8732 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8733 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8734 | + } | |
| 8735 | + return to; | |
| 8736 | +}; | |
| 8737 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8738 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8739 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8740 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8741 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8742 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8743 | + mod | |
| 8744 | +)); | |
| 8745 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8746 | + | |
| 8747 | +// src/errorBoundaryUtils.ts | |
| 8748 | +var errorBoundaryUtils_exports = {}; | |
| 8749 | +__export(errorBoundaryUtils_exports, { | |
| 8750 | + ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry, | |
| 8751 | + getHasError: () => getHasError, | |
| 8752 | + useClearResetErrorBoundary: () => useClearResetErrorBoundary | |
| 8753 | +}); | |
| 8754 | +module.exports = __toCommonJS(errorBoundaryUtils_exports); | |
| 8755 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8756 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 8757 | +var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => { | |
| 8758 | + if (options.suspense || options.throwOnError) { | |
| 8759 | + if (!errorResetBoundary.isReset()) { | |
| 8760 | + options.retryOnMount = false; | |
| 8761 | + } | |
| 8762 | + } | |
| 8763 | +}; | |
| 8764 | +var useClearResetErrorBoundary = (errorResetBoundary) => { | |
| 8765 | + React.useEffect(() => { | |
| 8766 | + errorResetBoundary.clearReset(); | |
| 8767 | + }, [errorResetBoundary]); | |
| 8768 | +}; | |
| 8769 | +var getHasError = ({ | |
| 8770 | + result, | |
| 8771 | + errorResetBoundary, | |
| 8772 | + throwOnError, | |
| 8773 | + query | |
| 8774 | +}) => { | |
| 8775 | + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]); | |
| 8776 | +}; | |
| 8777 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8778 | +0 && (0); | |
| 8779 | +//# sourceMappingURL=errorBoundaryUtils.cjs.map | |
| 8780 | + | |
| 8781 | +/***/ }), | |
| 8782 | + | |
| 8783 | +/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs": | |
| 8784 | +/*!********************************************************************!*\ | |
| 8785 | + !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***! | |
| 8786 | + \********************************************************************/ | |
| 8787 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8788 | + | |
| 8789 | +"use strict"; | |
| 8790 | + | |
| 8791 | +var __defProp = Object.defineProperty; | |
| 8792 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8793 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8794 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8795 | +var __export = (target, all) => { | |
| 8796 | + for (var name in all) | |
| 8797 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8798 | +}; | |
| 8799 | +var __copyProps = (to, from, except, desc) => { | |
| 8800 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8801 | + for (let key of __getOwnPropNames(from)) | |
| 8802 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8803 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8804 | + } | |
| 8805 | + return to; | |
| 8806 | +}; | |
| 8807 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 8808 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8809 | + | |
| 8810 | +// src/index.ts | |
| 8811 | +var src_exports = {}; | |
| 8812 | +__export(src_exports, { | |
| 8813 | + HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary, | |
| 8814 | + IsRestoringProvider: () => import_isRestoring.IsRestoringProvider, | |
| 8815 | + QueryClientContext: () => import_QueryClientProvider.QueryClientContext, | |
| 8816 | + QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider, | |
| 8817 | + QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary, | |
| 8818 | + infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions, | |
| 8819 | + queryOptions: () => import_queryOptions.queryOptions, | |
| 8820 | + useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery, | |
| 8821 | + useIsFetching: () => import_useIsFetching.useIsFetching, | |
| 8822 | + useIsMutating: () => import_useMutationState.useIsMutating, | |
| 8823 | + useIsRestoring: () => import_isRestoring.useIsRestoring, | |
| 8824 | + useMutation: () => import_useMutation.useMutation, | |
| 8825 | + useMutationState: () => import_useMutationState.useMutationState, | |
| 8826 | + usePrefetchInfiniteQuery: () => import_prefetch.usePrefetchInfiniteQuery, | |
| 8827 | + usePrefetchQuery: () => import_prefetch.usePrefetchQuery, | |
| 8828 | + useQueries: () => import_useQueries.useQueries, | |
| 8829 | + useQuery: () => import_useQuery.useQuery, | |
| 8830 | + useQueryClient: () => import_QueryClientProvider.useQueryClient, | |
| 8831 | + useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary, | |
| 8832 | + useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery, | |
| 8833 | + useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries, | |
| 8834 | + useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery | |
| 8835 | +}); | |
| 8836 | +module.exports = __toCommonJS(src_exports); | |
| 8837 | +__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports); | |
| 8838 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports); | |
| 8839 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 8840 | +var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"); | |
| 8841 | +var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs"); | |
| 8842 | +var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs"); | |
| 8843 | +var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs"); | |
| 8844 | +var import_prefetch = __webpack_require__(/*! ./prefetch.cjs */ "../node_modules/@tanstack/react-query/build/modern/prefetch.cjs"); | |
| 8845 | +var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs"); | |
| 8846 | +var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs"); | |
| 8847 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 8848 | +var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs"); | |
| 8849 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 8850 | +var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs"); | |
| 8851 | +var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs"); | |
| 8852 | +var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"); | |
| 8853 | +var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs"); | |
| 8854 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 8855 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8856 | +0 && (0); | |
| 8857 | +//# sourceMappingURL=index.cjs.map | |
| 8858 | + | |
| 8859 | +/***/ }), | |
| 8860 | + | |
| 8861 | +/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs": | |
| 8862 | +/*!***********************************************************************************!*\ | |
| 8863 | + !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***! | |
| 8864 | + \***********************************************************************************/ | |
| 8865 | +/***/ ((module) => { | |
| 8866 | + | |
| 8867 | +"use strict"; | |
| 8868 | + | |
| 8869 | +var __defProp = Object.defineProperty; | |
| 8870 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8871 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8872 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8873 | +var __export = (target, all) => { | |
| 8874 | + for (var name in all) | |
| 8875 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8876 | +}; | |
| 8877 | +var __copyProps = (to, from, except, desc) => { | |
| 8878 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8879 | + for (let key of __getOwnPropNames(from)) | |
| 8880 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8881 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8882 | + } | |
| 8883 | + return to; | |
| 8884 | +}; | |
| 8885 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8886 | + | |
| 8887 | +// src/infiniteQueryOptions.ts | |
| 8888 | +var infiniteQueryOptions_exports = {}; | |
| 8889 | +__export(infiniteQueryOptions_exports, { | |
| 8890 | + infiniteQueryOptions: () => infiniteQueryOptions | |
| 8891 | +}); | |
| 8892 | +module.exports = __toCommonJS(infiniteQueryOptions_exports); | |
| 8893 | +function infiniteQueryOptions(options) { | |
| 8894 | + return options; | |
| 8895 | +} | |
| 8896 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8897 | +0 && (0); | |
| 8898 | +//# sourceMappingURL=infiniteQueryOptions.cjs.map | |
| 8899 | + | |
| 8900 | +/***/ }), | |
| 8901 | + | |
| 8902 | +/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs": | |
| 8903 | +/*!**************************************************************************!*\ | |
| 8904 | + !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***! | |
| 8905 | + \**************************************************************************/ | |
| 8906 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8907 | + | |
| 8908 | +"use strict"; | |
| 8909 | + | |
| 8910 | +"use client"; | |
| 8911 | +var __create = Object.create; | |
| 8912 | +var __defProp = Object.defineProperty; | |
| 8913 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8914 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8915 | +var __getProtoOf = Object.getPrototypeOf; | |
| 8916 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8917 | +var __export = (target, all) => { | |
| 8918 | + for (var name in all) | |
| 8919 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8920 | +}; | |
| 8921 | +var __copyProps = (to, from, except, desc) => { | |
| 8922 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8923 | + for (let key of __getOwnPropNames(from)) | |
| 8924 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8925 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8926 | + } | |
| 8927 | + return to; | |
| 8928 | +}; | |
| 8929 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 8930 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 8931 | + // file that has been converted to a CommonJS file using a Babel- | |
| 8932 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 8933 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 8934 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 8935 | + mod | |
| 8936 | +)); | |
| 8937 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8938 | + | |
| 8939 | +// src/isRestoring.ts | |
| 8940 | +var isRestoring_exports = {}; | |
| 8941 | +__export(isRestoring_exports, { | |
| 8942 | + IsRestoringProvider: () => IsRestoringProvider, | |
| 8943 | + useIsRestoring: () => useIsRestoring | |
| 8944 | +}); | |
| 8945 | +module.exports = __toCommonJS(isRestoring_exports); | |
| 8946 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 8947 | +var IsRestoringContext = React.createContext(false); | |
| 8948 | +var useIsRestoring = () => React.useContext(IsRestoringContext); | |
| 8949 | +var IsRestoringProvider = IsRestoringContext.Provider; | |
| 8950 | +// Annotate the CommonJS export names for ESM import in node: | |
| 8951 | +0 && (0); | |
| 8952 | +//# sourceMappingURL=isRestoring.cjs.map | |
| 8953 | + | |
| 8954 | +/***/ }), | |
| 8955 | + | |
| 8956 | +/***/ "../node_modules/@tanstack/react-query/build/modern/prefetch.cjs": | |
| 8957 | +/*!***********************************************************************!*\ | |
| 8958 | + !*** ../node_modules/@tanstack/react-query/build/modern/prefetch.cjs ***! | |
| 8959 | + \***********************************************************************/ | |
| 8960 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 8961 | + | |
| 8962 | +"use strict"; | |
| 8963 | + | |
| 8964 | +var __defProp = Object.defineProperty; | |
| 8965 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 8966 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 8967 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 8968 | +var __export = (target, all) => { | |
| 8969 | + for (var name in all) | |
| 8970 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 8971 | +}; | |
| 8972 | +var __copyProps = (to, from, except, desc) => { | |
| 8973 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 8974 | + for (let key of __getOwnPropNames(from)) | |
| 8975 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 8976 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 8977 | + } | |
| 8978 | + return to; | |
| 8979 | +}; | |
| 8980 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 8981 | + | |
| 8982 | +// src/prefetch.ts | |
| 8983 | +var prefetch_exports = {}; | |
| 8984 | +__export(prefetch_exports, { | |
| 8985 | + usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery, | |
| 8986 | + usePrefetchQuery: () => usePrefetchQuery | |
| 8987 | +}); | |
| 8988 | +module.exports = __toCommonJS(prefetch_exports); | |
| 8989 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 8990 | +function usePrefetchQuery(options) { | |
| 8991 | + const queryClient = (0, import_QueryClientProvider.useQueryClient)(); | |
| 8992 | + if (!queryClient.getQueryState(options.queryKey)) { | |
| 8993 | + queryClient.prefetchQuery(options); | |
| 8994 | + } | |
| 8995 | +} | |
| 8996 | +function usePrefetchInfiniteQuery(options) { | |
| 8997 | + const queryClient = (0, import_QueryClientProvider.useQueryClient)(); | |
| 8998 | + if (!queryClient.getQueryState(options.queryKey)) { | |
| 8999 | + queryClient.prefetchInfiniteQuery(options); | |
| 9000 | + } | |
| 9001 | +} | |
| 9002 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9003 | +0 && (0); | |
| 9004 | +//# sourceMappingURL=prefetch.cjs.map | |
| 9005 | + | |
| 9006 | +/***/ }), | |
| 9007 | + | |
| 9008 | +/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs": | |
| 9009 | +/*!***************************************************************************!*\ | |
| 9010 | + !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***! | |
| 9011 | + \***************************************************************************/ | |
| 9012 | +/***/ ((module) => { | |
| 9013 | + | |
| 9014 | +"use strict"; | |
| 9015 | + | |
| 9016 | +var __defProp = Object.defineProperty; | |
| 9017 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9018 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9019 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9020 | +var __export = (target, all) => { | |
| 9021 | + for (var name in all) | |
| 9022 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9023 | +}; | |
| 9024 | +var __copyProps = (to, from, except, desc) => { | |
| 9025 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9026 | + for (let key of __getOwnPropNames(from)) | |
| 9027 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9028 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9029 | + } | |
| 9030 | + return to; | |
| 9031 | +}; | |
| 9032 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9033 | + | |
| 9034 | +// src/queryOptions.ts | |
| 9035 | +var queryOptions_exports = {}; | |
| 9036 | +__export(queryOptions_exports, { | |
| 9037 | + queryOptions: () => queryOptions | |
| 9038 | +}); | |
| 9039 | +module.exports = __toCommonJS(queryOptions_exports); | |
| 9040 | +function queryOptions(options) { | |
| 9041 | + return options; | |
| 9042 | +} | |
| 9043 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9044 | +0 && (0); | |
| 9045 | +//# sourceMappingURL=queryOptions.cjs.map | |
| 9046 | + | |
| 9047 | +/***/ }), | |
| 9048 | + | |
| 9049 | +/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs": | |
| 9050 | +/*!***********************************************************************!*\ | |
| 9051 | + !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***! | |
| 9052 | + \***********************************************************************/ | |
| 9053 | +/***/ ((module) => { | |
| 9054 | + | |
| 9055 | +"use strict"; | |
| 9056 | + | |
| 9057 | +var __defProp = Object.defineProperty; | |
| 9058 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9059 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9060 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9061 | +var __export = (target, all) => { | |
| 9062 | + for (var name in all) | |
| 9063 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9064 | +}; | |
| 9065 | +var __copyProps = (to, from, except, desc) => { | |
| 9066 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9067 | + for (let key of __getOwnPropNames(from)) | |
| 9068 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9069 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9070 | + } | |
| 9071 | + return to; | |
| 9072 | +}; | |
| 9073 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9074 | + | |
| 9075 | +// src/suspense.ts | |
| 9076 | +var suspense_exports = {}; | |
| 9077 | +__export(suspense_exports, { | |
| 9078 | + defaultThrowOnError: () => defaultThrowOnError, | |
| 9079 | + ensureStaleTime: () => ensureStaleTime, | |
| 9080 | + fetchOptimistic: () => fetchOptimistic, | |
| 9081 | + shouldSuspend: () => shouldSuspend, | |
| 9082 | + willFetch: () => willFetch | |
| 9083 | +}); | |
| 9084 | +module.exports = __toCommonJS(suspense_exports); | |
| 9085 | +var defaultThrowOnError = (_error, query) => query.state.data === void 0; | |
| 9086 | +var ensureStaleTime = (defaultedOptions) => { | |
| 9087 | + if (defaultedOptions.suspense) { | |
| 9088 | + if (typeof defaultedOptions.staleTime !== "number") { | |
| 9089 | + defaultedOptions.staleTime = 1e3; | |
| 9090 | + } | |
| 9091 | + } | |
| 9092 | +}; | |
| 9093 | +var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring; | |
| 9094 | +var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending; | |
| 9095 | +var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => { | |
| 9096 | + errorResetBoundary.clearReset(); | |
| 9097 | +}); | |
| 9098 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9099 | +0 && (0); | |
| 9100 | +//# sourceMappingURL=suspense.cjs.map | |
| 9101 | + | |
| 9102 | +/***/ }), | |
| 9103 | + | |
| 9104 | +/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs": | |
| 9105 | +/*!********************************************************************!*\ | |
| 9106 | + !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***! | |
| 9107 | + \********************************************************************/ | |
| 9108 | +/***/ ((module) => { | |
| 9109 | + | |
| 9110 | +"use strict"; | |
| 9111 | + | |
| 9112 | +var __defProp = Object.defineProperty; | |
| 9113 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9114 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9115 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9116 | +var __copyProps = (to, from, except, desc) => { | |
| 9117 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9118 | + for (let key of __getOwnPropNames(from)) | |
| 9119 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9120 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9121 | + } | |
| 9122 | + return to; | |
| 9123 | +}; | |
| 9124 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9125 | + | |
| 9126 | +// src/types.ts | |
| 9127 | +var types_exports = {}; | |
| 9128 | +module.exports = __toCommonJS(types_exports); | |
| 9129 | +//# sourceMappingURL=types.cjs.map | |
| 9130 | + | |
| 9131 | +/***/ }), | |
| 9132 | + | |
| 9133 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs": | |
| 9134 | +/*!***************************************************************************!*\ | |
| 9135 | + !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***! | |
| 9136 | + \***************************************************************************/ | |
| 9137 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9138 | + | |
| 9139 | +"use strict"; | |
| 9140 | + | |
| 9141 | +"use client"; | |
| 9142 | +var __create = Object.create; | |
| 9143 | +var __defProp = Object.defineProperty; | |
| 9144 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9145 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9146 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9147 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9148 | +var __export = (target, all) => { | |
| 9149 | + for (var name in all) | |
| 9150 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9151 | +}; | |
| 9152 | +var __copyProps = (to, from, except, desc) => { | |
| 9153 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9154 | + for (let key of __getOwnPropNames(from)) | |
| 9155 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9156 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9157 | + } | |
| 9158 | + return to; | |
| 9159 | +}; | |
| 9160 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9161 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9162 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9163 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9164 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9165 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9166 | + mod | |
| 9167 | +)); | |
| 9168 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9169 | + | |
| 9170 | +// src/useBaseQuery.ts | |
| 9171 | +var useBaseQuery_exports = {}; | |
| 9172 | +__export(useBaseQuery_exports, { | |
| 9173 | + useBaseQuery: () => useBaseQuery | |
| 9174 | +}); | |
| 9175 | +module.exports = __toCommonJS(useBaseQuery_exports); | |
| 9176 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9177 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9178 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 9179 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9180 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 9181 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 9182 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9183 | +function useBaseQuery(options, Observer, queryClient) { | |
| 9184 | + if (true) { | |
| 9185 | + if (typeof options !== "object" || Array.isArray(options)) { | |
| 9186 | + throw new Error( | |
| 9187 | + 'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object' | |
| 9188 | + ); | |
| 9189 | + } | |
| 9190 | + } | |
| 9191 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9192 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 9193 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 9194 | + const defaultedOptions = client.defaultQueryOptions(options); | |
| 9195 | + client.getDefaultOptions().queries?._experimental_beforeQuery?.( | |
| 9196 | + defaultedOptions | |
| 9197 | + ); | |
| 9198 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 9199 | + (0, import_suspense.ensureStaleTime)(defaultedOptions); | |
| 9200 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary); | |
| 9201 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 9202 | + const [observer] = React.useState( | |
| 9203 | + () => new Observer( | |
| 9204 | + client, | |
| 9205 | + defaultedOptions | |
| 9206 | + ) | |
| 9207 | + ); | |
| 9208 | + const result = observer.getOptimisticResult(defaultedOptions); | |
| 9209 | + React.useSyncExternalStore( | |
| 9210 | + React.useCallback( | |
| 9211 | + (onStoreChange) => { | |
| 9212 | + const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)); | |
| 9213 | + observer.updateResult(); | |
| 9214 | + return unsubscribe; | |
| 9215 | + }, | |
| 9216 | + [observer, isRestoring] | |
| 9217 | + ), | |
| 9218 | + () => observer.getCurrentResult(), | |
| 9219 | + () => observer.getCurrentResult() | |
| 9220 | + ); | |
| 9221 | + React.useEffect(() => { | |
| 9222 | + observer.setOptions(defaultedOptions, { listeners: false }); | |
| 9223 | + }, [defaultedOptions, observer]); | |
| 9224 | + if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) { | |
| 9225 | + throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary); | |
| 9226 | + } | |
| 9227 | + if ((0, import_errorBoundaryUtils.getHasError)({ | |
| 9228 | + result, | |
| 9229 | + errorResetBoundary, | |
| 9230 | + throwOnError: defaultedOptions.throwOnError, | |
| 9231 | + query: client.getQueryCache().get(defaultedOptions.queryHash) | |
| 9232 | + })) { | |
| 9233 | + throw result.error; | |
| 9234 | + } | |
| 9235 | + ; | |
| 9236 | + client.getDefaultOptions().queries?._experimental_afterQuery?.( | |
| 9237 | + defaultedOptions, | |
| 9238 | + result | |
| 9239 | + ); | |
| 9240 | + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result; | |
| 9241 | +} | |
| 9242 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9243 | +0 && (0); | |
| 9244 | +//# sourceMappingURL=useBaseQuery.cjs.map | |
| 9245 | + | |
| 9246 | +/***/ }), | |
| 9247 | + | |
| 9248 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs": | |
| 9249 | +/*!*******************************************************************************!*\ | |
| 9250 | + !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***! | |
| 9251 | + \*******************************************************************************/ | |
| 9252 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9253 | + | |
| 9254 | +"use strict"; | |
| 9255 | + | |
| 9256 | +"use client"; | |
| 9257 | +var __defProp = Object.defineProperty; | |
| 9258 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9259 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9260 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9261 | +var __export = (target, all) => { | |
| 9262 | + for (var name in all) | |
| 9263 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9264 | +}; | |
| 9265 | +var __copyProps = (to, from, except, desc) => { | |
| 9266 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9267 | + for (let key of __getOwnPropNames(from)) | |
| 9268 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9269 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9270 | + } | |
| 9271 | + return to; | |
| 9272 | +}; | |
| 9273 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9274 | + | |
| 9275 | +// src/useInfiniteQuery.ts | |
| 9276 | +var useInfiniteQuery_exports = {}; | |
| 9277 | +__export(useInfiniteQuery_exports, { | |
| 9278 | + useInfiniteQuery: () => useInfiniteQuery | |
| 9279 | +}); | |
| 9280 | +module.exports = __toCommonJS(useInfiniteQuery_exports); | |
| 9281 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9282 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9283 | +function useInfiniteQuery(options, queryClient) { | |
| 9284 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 9285 | + options, | |
| 9286 | + import_query_core.InfiniteQueryObserver, | |
| 9287 | + queryClient | |
| 9288 | + ); | |
| 9289 | +} | |
| 9290 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9291 | +0 && (0); | |
| 9292 | +//# sourceMappingURL=useInfiniteQuery.cjs.map | |
| 9293 | + | |
| 9294 | +/***/ }), | |
| 9295 | + | |
| 9296 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs": | |
| 9297 | +/*!****************************************************************************!*\ | |
| 9298 | + !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***! | |
| 9299 | + \****************************************************************************/ | |
| 9300 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9301 | + | |
| 9302 | +"use strict"; | |
| 9303 | + | |
| 9304 | +"use client"; | |
| 9305 | +var __create = Object.create; | |
| 9306 | +var __defProp = Object.defineProperty; | |
| 9307 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9308 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9309 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9310 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9311 | +var __export = (target, all) => { | |
| 9312 | + for (var name in all) | |
| 9313 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9314 | +}; | |
| 9315 | +var __copyProps = (to, from, except, desc) => { | |
| 9316 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9317 | + for (let key of __getOwnPropNames(from)) | |
| 9318 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9319 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9320 | + } | |
| 9321 | + return to; | |
| 9322 | +}; | |
| 9323 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9324 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9325 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9326 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9327 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9328 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9329 | + mod | |
| 9330 | +)); | |
| 9331 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9332 | + | |
| 9333 | +// src/useIsFetching.ts | |
| 9334 | +var useIsFetching_exports = {}; | |
| 9335 | +__export(useIsFetching_exports, { | |
| 9336 | + useIsFetching: () => useIsFetching | |
| 9337 | +}); | |
| 9338 | +module.exports = __toCommonJS(useIsFetching_exports); | |
| 9339 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9340 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9341 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9342 | +function useIsFetching(filters, queryClient) { | |
| 9343 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9344 | + const queryCache = client.getQueryCache(); | |
| 9345 | + return React.useSyncExternalStore( | |
| 9346 | + React.useCallback( | |
| 9347 | + (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9348 | + [queryCache] | |
| 9349 | + ), | |
| 9350 | + () => client.isFetching(filters), | |
| 9351 | + () => client.isFetching(filters) | |
| 9352 | + ); | |
| 9353 | +} | |
| 9354 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9355 | +0 && (0); | |
| 9356 | +//# sourceMappingURL=useIsFetching.cjs.map | |
| 9357 | + | |
| 9358 | +/***/ }), | |
| 9359 | + | |
| 9360 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs": | |
| 9361 | +/*!**************************************************************************!*\ | |
| 9362 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***! | |
| 9363 | + \**************************************************************************/ | |
| 9364 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9365 | + | |
| 9366 | +"use strict"; | |
| 9367 | + | |
| 9368 | +"use client"; | |
| 9369 | +var __create = Object.create; | |
| 9370 | +var __defProp = Object.defineProperty; | |
| 9371 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9372 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9373 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9374 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9375 | +var __export = (target, all) => { | |
| 9376 | + for (var name in all) | |
| 9377 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9378 | +}; | |
| 9379 | +var __copyProps = (to, from, except, desc) => { | |
| 9380 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9381 | + for (let key of __getOwnPropNames(from)) | |
| 9382 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9383 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9384 | + } | |
| 9385 | + return to; | |
| 9386 | +}; | |
| 9387 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9388 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9389 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9390 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9391 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9392 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9393 | + mod | |
| 9394 | +)); | |
| 9395 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9396 | + | |
| 9397 | +// src/useMutation.ts | |
| 9398 | +var useMutation_exports = {}; | |
| 9399 | +__export(useMutation_exports, { | |
| 9400 | + useMutation: () => useMutation | |
| 9401 | +}); | |
| 9402 | +module.exports = __toCommonJS(useMutation_exports); | |
| 9403 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9404 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9405 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9406 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 9407 | +function useMutation(options, queryClient) { | |
| 9408 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9409 | + const [observer] = React.useState( | |
| 9410 | + () => new import_query_core.MutationObserver( | |
| 9411 | + client, | |
| 9412 | + options | |
| 9413 | + ) | |
| 9414 | + ); | |
| 9415 | + React.useEffect(() => { | |
| 9416 | + observer.setOptions(options); | |
| 9417 | + }, [observer, options]); | |
| 9418 | + const result = React.useSyncExternalStore( | |
| 9419 | + React.useCallback( | |
| 9420 | + (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9421 | + [observer] | |
| 9422 | + ), | |
| 9423 | + () => observer.getCurrentResult(), | |
| 9424 | + () => observer.getCurrentResult() | |
| 9425 | + ); | |
| 9426 | + const mutate = React.useCallback( | |
| 9427 | + (variables, mutateOptions) => { | |
| 9428 | + observer.mutate(variables, mutateOptions).catch(import_utils.noop); | |
| 9429 | + }, | |
| 9430 | + [observer] | |
| 9431 | + ); | |
| 9432 | + if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) { | |
| 9433 | + throw result.error; | |
| 9434 | + } | |
| 9435 | + return { ...result, mutate, mutateAsync: result.mutate }; | |
| 9436 | +} | |
| 9437 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9438 | +0 && (0); | |
| 9439 | +//# sourceMappingURL=useMutation.cjs.map | |
| 9440 | + | |
| 9441 | +/***/ }), | |
| 9442 | + | |
| 9443 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs": | |
| 9444 | +/*!*******************************************************************************!*\ | |
| 9445 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***! | |
| 9446 | + \*******************************************************************************/ | |
| 9447 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9448 | + | |
| 9449 | +"use strict"; | |
| 9450 | + | |
| 9451 | +"use client"; | |
| 9452 | +var __create = Object.create; | |
| 9453 | +var __defProp = Object.defineProperty; | |
| 9454 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9455 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9456 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9457 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9458 | +var __export = (target, all) => { | |
| 9459 | + for (var name in all) | |
| 9460 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9461 | +}; | |
| 9462 | +var __copyProps = (to, from, except, desc) => { | |
| 9463 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9464 | + for (let key of __getOwnPropNames(from)) | |
| 9465 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9466 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9467 | + } | |
| 9468 | + return to; | |
| 9469 | +}; | |
| 9470 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9471 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9472 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9473 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9474 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9475 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9476 | + mod | |
| 9477 | +)); | |
| 9478 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9479 | + | |
| 9480 | +// src/useMutationState.ts | |
| 9481 | +var useMutationState_exports = {}; | |
| 9482 | +__export(useMutationState_exports, { | |
| 9483 | + useIsMutating: () => useIsMutating, | |
| 9484 | + useMutationState: () => useMutationState | |
| 9485 | +}); | |
| 9486 | +module.exports = __toCommonJS(useMutationState_exports); | |
| 9487 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9488 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9489 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9490 | +function useIsMutating(filters, queryClient) { | |
| 9491 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9492 | + return useMutationState( | |
| 9493 | + { filters: { ...filters, status: "pending" } }, | |
| 9494 | + client | |
| 9495 | + ).length; | |
| 9496 | +} | |
| 9497 | +function getResult(mutationCache, options) { | |
| 9498 | + return mutationCache.findAll(options.filters).map( | |
| 9499 | + (mutation) => options.select ? options.select(mutation) : mutation.state | |
| 9500 | + ); | |
| 9501 | +} | |
| 9502 | +function useMutationState(options = {}, queryClient) { | |
| 9503 | + const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache(); | |
| 9504 | + const optionsRef = React.useRef(options); | |
| 9505 | + const result = React.useRef(null); | |
| 9506 | + if (!result.current) { | |
| 9507 | + result.current = getResult(mutationCache, options); | |
| 9508 | + } | |
| 9509 | + React.useEffect(() => { | |
| 9510 | + optionsRef.current = options; | |
| 9511 | + }); | |
| 9512 | + return React.useSyncExternalStore( | |
| 9513 | + React.useCallback( | |
| 9514 | + (onStoreChange) => mutationCache.subscribe(() => { | |
| 9515 | + const nextResult = (0, import_query_core.replaceEqualDeep)( | |
| 9516 | + result.current, | |
| 9517 | + getResult(mutationCache, optionsRef.current) | |
| 9518 | + ); | |
| 9519 | + if (result.current !== nextResult) { | |
| 9520 | + result.current = nextResult; | |
| 9521 | + import_query_core.notifyManager.schedule(onStoreChange); | |
| 9522 | + } | |
| 9523 | + }), | |
| 9524 | + [mutationCache] | |
| 9525 | + ), | |
| 9526 | + () => result.current, | |
| 9527 | + () => result.current | |
| 9528 | + ); | |
| 9529 | +} | |
| 9530 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9531 | +0 && (0); | |
| 9532 | +//# sourceMappingURL=useMutationState.cjs.map | |
| 9533 | + | |
| 9534 | +/***/ }), | |
| 9535 | + | |
| 9536 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs": | |
| 9537 | +/*!*************************************************************************!*\ | |
| 9538 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***! | |
| 9539 | + \*************************************************************************/ | |
| 9540 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9541 | + | |
| 9542 | +"use strict"; | |
| 9543 | + | |
| 9544 | +"use client"; | |
| 9545 | +var __create = Object.create; | |
| 9546 | +var __defProp = Object.defineProperty; | |
| 9547 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9548 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9549 | +var __getProtoOf = Object.getPrototypeOf; | |
| 9550 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9551 | +var __export = (target, all) => { | |
| 9552 | + for (var name in all) | |
| 9553 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9554 | +}; | |
| 9555 | +var __copyProps = (to, from, except, desc) => { | |
| 9556 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9557 | + for (let key of __getOwnPropNames(from)) | |
| 9558 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9559 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9560 | + } | |
| 9561 | + return to; | |
| 9562 | +}; | |
| 9563 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 9564 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 9565 | + // file that has been converted to a CommonJS file using a Babel- | |
| 9566 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 9567 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 9568 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 9569 | + mod | |
| 9570 | +)); | |
| 9571 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9572 | + | |
| 9573 | +// src/useQueries.ts | |
| 9574 | +var useQueries_exports = {}; | |
| 9575 | +__export(useQueries_exports, { | |
| 9576 | + useQueries: () => useQueries | |
| 9577 | +}); | |
| 9578 | +module.exports = __toCommonJS(useQueries_exports); | |
| 9579 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 9580 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9581 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 9582 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 9583 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 9584 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 9585 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9586 | +function useQueries({ | |
| 9587 | + queries, | |
| 9588 | + ...options | |
| 9589 | +}, queryClient) { | |
| 9590 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 9591 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 9592 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 9593 | + const defaultedQueries = React.useMemo( | |
| 9594 | + () => queries.map((opts) => { | |
| 9595 | + const defaultedOptions = client.defaultQueryOptions( | |
| 9596 | + opts | |
| 9597 | + ); | |
| 9598 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 9599 | + return defaultedOptions; | |
| 9600 | + }), | |
| 9601 | + [queries, client, isRestoring] | |
| 9602 | + ); | |
| 9603 | + defaultedQueries.forEach((query) => { | |
| 9604 | + (0, import_suspense.ensureStaleTime)(query); | |
| 9605 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary); | |
| 9606 | + }); | |
| 9607 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 9608 | + const [observer] = React.useState( | |
| 9609 | + () => new import_query_core.QueriesObserver( | |
| 9610 | + client, | |
| 9611 | + defaultedQueries, | |
| 9612 | + options | |
| 9613 | + ) | |
| 9614 | + ); | |
| 9615 | + const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult( | |
| 9616 | + defaultedQueries, | |
| 9617 | + options.combine | |
| 9618 | + ); | |
| 9619 | + React.useSyncExternalStore( | |
| 9620 | + React.useCallback( | |
| 9621 | + (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 9622 | + [observer, isRestoring] | |
| 9623 | + ), | |
| 9624 | + () => observer.getCurrentResult(), | |
| 9625 | + () => observer.getCurrentResult() | |
| 9626 | + ); | |
| 9627 | + React.useEffect(() => { | |
| 9628 | + observer.setQueries( | |
| 9629 | + defaultedQueries, | |
| 9630 | + options, | |
| 9631 | + { | |
| 9632 | + listeners: false | |
| 9633 | + } | |
| 9634 | + ); | |
| 9635 | + }, [defaultedQueries, options, observer]); | |
| 9636 | + const shouldAtLeastOneSuspend = optimisticResult.some( | |
| 9637 | + (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result) | |
| 9638 | + ); | |
| 9639 | + const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => { | |
| 9640 | + const opts = defaultedQueries[index]; | |
| 9641 | + if (opts) { | |
| 9642 | + const queryObserver = new import_query_core.QueryObserver(client, opts); | |
| 9643 | + if ((0, import_suspense.shouldSuspend)(opts, result)) { | |
| 9644 | + return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 9645 | + } else if ((0, import_suspense.willFetch)(result, isRestoring)) { | |
| 9646 | + void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 9647 | + } | |
| 9648 | + } | |
| 9649 | + return []; | |
| 9650 | + }) : []; | |
| 9651 | + if (suspensePromises.length > 0) { | |
| 9652 | + throw Promise.all(suspensePromises); | |
| 9653 | + } | |
| 9654 | + const firstSingleResultWhichShouldThrow = optimisticResult.find( | |
| 9655 | + (result, index) => { | |
| 9656 | + const query = defaultedQueries[index]; | |
| 9657 | + return query && (0, import_errorBoundaryUtils.getHasError)({ | |
| 9658 | + result, | |
| 9659 | + errorResetBoundary, | |
| 9660 | + throwOnError: query.throwOnError, | |
| 9661 | + query: client.getQueryCache().get(query.queryHash) | |
| 9662 | + }); | |
| 9663 | + } | |
| 9664 | + ); | |
| 9665 | + if (firstSingleResultWhichShouldThrow?.error) { | |
| 9666 | + throw firstSingleResultWhichShouldThrow.error; | |
| 9667 | + } | |
| 9668 | + return getCombinedResult(trackResult()); | |
| 9669 | +} | |
| 9670 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9671 | +0 && (0); | |
| 9672 | +//# sourceMappingURL=useQueries.cjs.map | |
| 9673 | + | |
| 9674 | +/***/ }), | |
| 9675 | + | |
| 9676 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs": | |
| 9677 | +/*!***********************************************************************!*\ | |
| 9678 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***! | |
| 9679 | + \***********************************************************************/ | |
| 9680 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9681 | + | |
| 9682 | +"use strict"; | |
| 9683 | + | |
| 9684 | +"use client"; | |
| 9685 | +var __defProp = Object.defineProperty; | |
| 9686 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9687 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9688 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9689 | +var __export = (target, all) => { | |
| 9690 | + for (var name in all) | |
| 9691 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9692 | +}; | |
| 9693 | +var __copyProps = (to, from, except, desc) => { | |
| 9694 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9695 | + for (let key of __getOwnPropNames(from)) | |
| 9696 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9697 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9698 | + } | |
| 9699 | + return to; | |
| 9700 | +}; | |
| 9701 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9702 | + | |
| 9703 | +// src/useQuery.ts | |
| 9704 | +var useQuery_exports = {}; | |
| 9705 | +__export(useQuery_exports, { | |
| 9706 | + useQuery: () => useQuery | |
| 9707 | +}); | |
| 9708 | +module.exports = __toCommonJS(useQuery_exports); | |
| 9709 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9710 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9711 | +function useQuery(options, queryClient) { | |
| 9712 | + return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient); | |
| 9713 | +} | |
| 9714 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9715 | +0 && (0); | |
| 9716 | +//# sourceMappingURL=useQuery.cjs.map | |
| 9717 | + | |
| 9718 | +/***/ }), | |
| 9719 | + | |
| 9720 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs": | |
| 9721 | +/*!***************************************************************************************!*\ | |
| 9722 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***! | |
| 9723 | + \***************************************************************************************/ | |
| 9724 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9725 | + | |
| 9726 | +"use strict"; | |
| 9727 | + | |
| 9728 | +"use client"; | |
| 9729 | +var __defProp = Object.defineProperty; | |
| 9730 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9731 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9732 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9733 | +var __export = (target, all) => { | |
| 9734 | + for (var name in all) | |
| 9735 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9736 | +}; | |
| 9737 | +var __copyProps = (to, from, except, desc) => { | |
| 9738 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9739 | + for (let key of __getOwnPropNames(from)) | |
| 9740 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9741 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9742 | + } | |
| 9743 | + return to; | |
| 9744 | +}; | |
| 9745 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9746 | + | |
| 9747 | +// src/useSuspenseInfiniteQuery.ts | |
| 9748 | +var useSuspenseInfiniteQuery_exports = {}; | |
| 9749 | +__export(useSuspenseInfiniteQuery_exports, { | |
| 9750 | + useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery | |
| 9751 | +}); | |
| 9752 | +module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports); | |
| 9753 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9754 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9755 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9756 | +function useSuspenseInfiniteQuery(options, queryClient) { | |
| 9757 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 9758 | + { | |
| 9759 | + ...options, | |
| 9760 | + enabled: true, | |
| 9761 | + suspense: true, | |
| 9762 | + throwOnError: import_suspense.defaultThrowOnError | |
| 9763 | + }, | |
| 9764 | + import_query_core.InfiniteQueryObserver, | |
| 9765 | + queryClient | |
| 9766 | + ); | |
| 9767 | +} | |
| 9768 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9769 | +0 && (0); | |
| 9770 | +//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map | |
| 9771 | + | |
| 9772 | +/***/ }), | |
| 9773 | + | |
| 9774 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs": | |
| 9775 | +/*!*********************************************************************************!*\ | |
| 9776 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***! | |
| 9777 | + \*********************************************************************************/ | |
| 9778 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9779 | + | |
| 9780 | +"use strict"; | |
| 9781 | + | |
| 9782 | +"use client"; | |
| 9783 | +var __defProp = Object.defineProperty; | |
| 9784 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9785 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9786 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9787 | +var __export = (target, all) => { | |
| 9788 | + for (var name in all) | |
| 9789 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9790 | +}; | |
| 9791 | +var __copyProps = (to, from, except, desc) => { | |
| 9792 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9793 | + for (let key of __getOwnPropNames(from)) | |
| 9794 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9795 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9796 | + } | |
| 9797 | + return to; | |
| 9798 | +}; | |
| 9799 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9800 | + | |
| 9801 | +// src/useSuspenseQueries.ts | |
| 9802 | +var useSuspenseQueries_exports = {}; | |
| 9803 | +__export(useSuspenseQueries_exports, { | |
| 9804 | + useSuspenseQueries: () => useSuspenseQueries | |
| 9805 | +}); | |
| 9806 | +module.exports = __toCommonJS(useSuspenseQueries_exports); | |
| 9807 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 9808 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9809 | +function useSuspenseQueries(options, queryClient) { | |
| 9810 | + return (0, import_useQueries.useQueries)( | |
| 9811 | + { | |
| 9812 | + ...options, | |
| 9813 | + queries: options.queries.map((query) => ({ | |
| 9814 | + ...query, | |
| 9815 | + suspense: true, | |
| 9816 | + throwOnError: import_suspense.defaultThrowOnError, | |
| 9817 | + enabled: true, | |
| 9818 | + placeholderData: void 0 | |
| 9819 | + })) | |
| 9820 | + }, | |
| 9821 | + queryClient | |
| 9822 | + ); | |
| 9823 | +} | |
| 9824 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9825 | +0 && (0); | |
| 9826 | +//# sourceMappingURL=useSuspenseQueries.cjs.map | |
| 9827 | + | |
| 9828 | +/***/ }), | |
| 9829 | + | |
| 9830 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs": | |
| 9831 | +/*!*******************************************************************************!*\ | |
| 9832 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***! | |
| 9833 | + \*******************************************************************************/ | |
| 9834 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 9835 | + | |
| 9836 | +"use strict"; | |
| 9837 | + | |
| 9838 | +"use client"; | |
| 9839 | +var __defProp = Object.defineProperty; | |
| 9840 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9841 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9842 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9843 | +var __export = (target, all) => { | |
| 9844 | + for (var name in all) | |
| 9845 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9846 | +}; | |
| 9847 | +var __copyProps = (to, from, except, desc) => { | |
| 9848 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9849 | + for (let key of __getOwnPropNames(from)) | |
| 9850 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9851 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9852 | + } | |
| 9853 | + return to; | |
| 9854 | +}; | |
| 9855 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9856 | + | |
| 9857 | +// src/useSuspenseQuery.ts | |
| 9858 | +var useSuspenseQuery_exports = {}; | |
| 9859 | +__export(useSuspenseQuery_exports, { | |
| 9860 | + useSuspenseQuery: () => useSuspenseQuery | |
| 9861 | +}); | |
| 9862 | +module.exports = __toCommonJS(useSuspenseQuery_exports); | |
| 9863 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 9864 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 9865 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 9866 | +function useSuspenseQuery(options, queryClient) { | |
| 9867 | + if (true) { | |
| 9868 | + if (options.queryFn === import_query_core.skipToken) { | |
| 9869 | + console.error("skipToken is not allowed for useSuspenseQuery"); | |
| 9870 | + } | |
| 9871 | + } | |
| 9872 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 9873 | + { | |
| 9874 | + ...options, | |
| 9875 | + enabled: true, | |
| 9876 | + suspense: true, | |
| 9877 | + throwOnError: import_suspense.defaultThrowOnError, | |
| 9878 | + placeholderData: void 0 | |
| 9879 | + }, | |
| 9880 | + import_query_core.QueryObserver, | |
| 9881 | + queryClient | |
| 9882 | + ); | |
| 9883 | +} | |
| 9884 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9885 | +0 && (0); | |
| 9886 | +//# sourceMappingURL=useSuspenseQuery.cjs.map | |
| 9887 | + | |
| 9888 | +/***/ }), | |
| 9889 | + | |
| 9890 | +/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs": | |
| 9891 | +/*!********************************************************************!*\ | |
| 9892 | + !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***! | |
| 9893 | + \********************************************************************/ | |
| 9894 | +/***/ ((module) => { | |
| 9895 | + | |
| 9896 | +"use strict"; | |
| 9897 | + | |
| 9898 | +var __defProp = Object.defineProperty; | |
| 9899 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 9900 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 9901 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 9902 | +var __export = (target, all) => { | |
| 9903 | + for (var name in all) | |
| 9904 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 9905 | +}; | |
| 9906 | +var __copyProps = (to, from, except, desc) => { | |
| 9907 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 9908 | + for (let key of __getOwnPropNames(from)) | |
| 9909 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 9910 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 9911 | + } | |
| 9912 | + return to; | |
| 9913 | +}; | |
| 9914 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 9915 | + | |
| 9916 | +// src/utils.ts | |
| 9917 | +var utils_exports = {}; | |
| 9918 | +__export(utils_exports, { | |
| 9919 | + noop: () => noop, | |
| 9920 | + shouldThrowError: () => shouldThrowError | |
| 9921 | +}); | |
| 9922 | +module.exports = __toCommonJS(utils_exports); | |
| 9923 | +function shouldThrowError(throwError, params) { | |
| 9924 | + if (typeof throwError === "function") { | |
| 9925 | + return throwError(...params); | |
| 9926 | + } | |
| 9927 | + return !!throwError; | |
| 9928 | +} | |
| 9929 | +function noop() { | |
| 9930 | +} | |
| 9931 | +// Annotate the CommonJS export names for ESM import in node: | |
| 9932 | +0 && (0); | |
| 9933 | +//# sourceMappingURL=utils.cjs.map | |
| 9934 | + | |
| 9935 | +/***/ }) | |
| 9936 | + | |
| 9937 | +/******/ }); | |
| 9938 | +/************************************************************************/ | |
| 9939 | +/******/ // The module cache | |
| 9940 | +/******/ var __webpack_module_cache__ = {}; | |
| 9941 | +/******/ | |
| 9942 | +/******/ // The require function | |
| 9943 | +/******/ function __webpack_require__(moduleId) { | |
| 9944 | +/******/ // Check if module is in cache | |
| 9945 | +/******/ var cachedModule = __webpack_module_cache__[moduleId]; | |
| 9946 | +/******/ if (cachedModule !== undefined) { | |
| 9947 | +/******/ return cachedModule.exports; | |
| 9948 | +/******/ } | |
| 9949 | +/******/ // Create a new module (and put it into the cache) | |
| 9950 | +/******/ var module = __webpack_module_cache__[moduleId] = { | |
| 9951 | +/******/ // no module.id needed | |
| 9952 | +/******/ // no module.loaded needed | |
| 9953 | +/******/ exports: {} | |
| 9954 | +/******/ }; | |
| 9955 | +/******/ | |
| 9956 | +/******/ // Execute the module function | |
| 9957 | +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); | |
| 9958 | +/******/ | |
| 9959 | +/******/ // Return the exports of the module | |
| 9960 | +/******/ return module.exports; | |
| 9961 | +/******/ } | |
| 9962 | +/******/ | |
| 9963 | +/************************************************************************/ | |
| 9964 | +var __webpack_exports__ = {}; | |
| 9965 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 9966 | +(() => { | |
| 9967 | +"use strict"; | |
| 9968 | +/*!************************************************!*\ | |
| 9969 | + !*** ../modules/checklist/assets/js/editor.js ***! | |
| 9970 | + \************************************************/ | |
| 9971 | + | |
| 9972 | + | |
| 9973 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 9974 | +var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js")); | |
| 9975 | +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js")); | |
| 9976 | +var _editorV = __webpack_require__(/*! ./editor-v-2 */ "../modules/checklist/assets/js/editor-v-2.js"); | |
| 9977 | +var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/checklist/assets/js/component.js")); | |
| 9978 | +var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js"); | |
| 9979 | +var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js"); | |
| 9980 | +$e.components.register(new _component.default()); | |
| 9981 | +(0, _editorV.editorV2)(); | |
| 9982 | +elementorCommon.elements.$window.on('elementor:loaded', elementorLoaded); | |
| 9983 | +function elementorLoaded() { | |
| 9984 | + elementor.on('document:loaded', checklistStartup); | |
| 9985 | + elementorCommon.elements.$window.off('elementor:loaded', elementorLoaded); | |
| 9986 | +} | |
| 9987 | +function checklistStartup() { | |
| 9988 | + return _checklistStartup.apply(this, arguments); | |
| 9989 | +} | |
| 9990 | +function _checklistStartup() { | |
| 9991 | + _checklistStartup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() { | |
| 9992 | + var shouldHide, userProgress; | |
| 9993 | + return _regenerator.default.wrap(function _callee$(_context) { | |
| 9994 | + while (1) switch (_context.prev = _context.next) { | |
| 9995 | + case 0: | |
| 9996 | + shouldHide = 'yes' !== elementor.getPreferences('show_launchpad_checklist'); | |
| 9997 | + if (!shouldHide) { | |
| 9998 | + _context.next = 5; | |
| 9999 | + break; | |
| 10000 | + } | |
| 10001 | + $e.commands.run('checklist/toggle-icon', false); | |
| 10002 | + _context.next = 9; | |
| 10003 | + break; | |
| 10004 | + case 5: | |
| 10005 | + _context.next = 7; | |
| 10006 | + return (0, _functions.fetchUserProgress)(); | |
| 10007 | + case 7: | |
| 10008 | + userProgress = _context.sent; | |
| 10009 | + if (userProgress !== null && userProgress !== void 0 && userProgress[_consts.USER_PROGRESS.SHOULD_OPEN_IN_EDITOR]) { | |
| 10010 | + (0, _functions.toggleChecklistPopup)(); | |
| 10011 | + (0, _functions.dispatchChecklistOpenEvent)(); | |
| 10012 | + } | |
| 10013 | + case 9: | |
| 10014 | + elementor.off('document:loaded', checklistStartup); | |
| 10015 | + case 10: | |
| 10016 | + case "end": | |
| 10017 | + return _context.stop(); | |
| 10018 | + } | |
| 10019 | + }, _callee); | |
| 10020 | + })); | |
| 10021 | + return _checklistStartup.apply(this, arguments); | |
| 10022 | +} | |
| 10023 | +})(); | |
| 10024 | + | |
| 10025 | +/******/ })() | |
| 10026 | +; | |
| 2459 | 10027 | //# sourceMappingURL=checklist.js.map |