| @@ -1,57 +1,60 @@ | ||
| 1 | +/*! elementor - v3.19.0 - 07-02-2024 */ | |
| 1 | 2 | /******/ (() => { // webpackBootstrap |
| 2 | 3 | /******/ var __webpack_modules__ = ({ |
| 3 | 4 | |
| 4 | -/***/ "../assets/dev/js/utils/react.js": | |
| 5 | -/*!***************************************!*\ | |
| 6 | - !*** ../assets/dev/js/utils/react.js ***! | |
| 7 | - \***************************************/ | |
| 8 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 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__) => { | |
| 9 | 10 | |
| 10 | 11 | "use strict"; |
| 11 | 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); | |
| 12 | 30 | |
| 13 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 14 | -Object.defineProperty(exports, "__esModule", ({ | |
| 15 | - value: true | |
| 16 | -})); | |
| 17 | -exports["default"] = void 0; | |
| 18 | -var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 19 | -var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom")); | |
| 20 | -var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js"); | |
| 21 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 22 | -/** | |
| 23 | - * Support conditional rendering of a React App to the DOM, based on the React version. | |
| 24 | - * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions. | |
| 25 | - * | |
| 26 | - * @param { React.ReactElement } app The app to render. | |
| 27 | - * @param { HTMLElement } domElement The DOM element to render the app into. | |
| 28 | - * | |
| 29 | - * @return {{ unmount: () => void }} The unmount function. | |
| 30 | - */ | |
| 31 | -function render(app, domElement) { | |
| 32 | - var unmountFunction; | |
| 33 | - try { | |
| 34 | - var root = (0, _client.createRoot)(domElement); | |
| 35 | - root.render(app); | |
| 36 | - unmountFunction = function unmountFunction() { | |
| 37 | - root.unmount(); | |
| 38 | - }; | |
| 39 | - } catch (e) { | |
| 40 | - // eslint-disable-next-line react/no-deprecated | |
| 41 | - ReactDOM.render(app, domElement); | |
| 42 | - unmountFunction = function unmountFunction() { | |
| 43 | - // eslint-disable-next-line react/no-deprecated | |
| 44 | - ReactDOM.unmountComponentAtNode(domElement); | |
| 45 | - }; | |
| 46 | - } | |
| 47 | - return { | |
| 48 | - unmount: unmountFunction | |
| 49 | - }; | |
| 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 | + useMutation: () => import_react_query2.useMutation, | |
| 38 | + useQuery: () => import_react_query2.useQuery, | |
| 39 | + useQueryClient: () => import_react_query2.useQueryClient | |
| 40 | +}); | |
| 41 | +module.exports = __toCommonJS(src_exports); | |
| 42 | +var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 43 | +var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs"); | |
| 44 | +function createQueryClient() { | |
| 45 | + return new import_react_query.QueryClient({ | |
| 46 | + defaultOptions: { | |
| 47 | + queries: { | |
| 48 | + refetchOnWindowFocus: false, | |
| 49 | + refetchOnReconnect: false | |
| 50 | + } | |
| 51 | + } | |
| 52 | + }); | |
| 50 | 53 | } |
| 51 | -var _default = exports["default"] = { | |
| 52 | - render: render | |
| 53 | -}; | |
| 54 | +// Annotate the CommonJS export names for ESM import in node: | |
| 55 | +0 && (0); | |
| 56 | +//# sourceMappingURL=index.js.map | |
| 54 | 57 | |
| 55 | 58 | /***/ }), |
| 56 | 59 | |
| 57 | 60 | /***/ "../modules/notifications/assets/js/api/index.js": |
| @@ -76,22 +79,22 @@ | ||
| 76 | 79 | data: data |
| 77 | 80 | }); |
| 78 | 81 | }); |
| 79 | 82 | }; |
| 80 | -var getNotifications = exports.getNotifications = function getNotifications() { | |
| 83 | +var getNotifications = function getNotifications() { | |
| 81 | 84 | return request('notifications_get'); |
| 82 | 85 | }; |
| 86 | +exports.getNotifications = getNotifications; | |
| 83 | 87 | |
| 84 | 88 | /***/ }), |
| 85 | 89 | |
| 86 | -/***/ "../modules/notifications/assets/js/components/editor-app-bar-link.js": | |
| 87 | -/*!****************************************************************************!*\ | |
| 88 | - !*** ../modules/notifications/assets/js/components/editor-app-bar-link.js ***! | |
| 89 | - \****************************************************************************/ | |
| 90 | +/***/ "../modules/notifications/assets/js/components/editor-v1.js": | |
| 91 | +/*!******************************************************************!*\ | |
| 92 | + !*** ../modules/notifications/assets/js/components/editor-v1.js ***! | |
| 93 | + \******************************************************************/ | |
| 90 | 94 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 91 | 95 | |
| 92 | 96 | "use strict"; |
| 93 | -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); | |
| 94 | 97 | |
| 95 | 98 | |
| 96 | 99 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 97 | 100 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| @@ -97,175 +100,42 @@ | ||
| 97 | 100 | var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); |
| 98 | 101 | Object.defineProperty(exports, "__esModule", ({ |
| 99 | 102 | value: true |
| 100 | 103 | })); |
| 101 | -exports.editorAppBarLink = void 0; | |
| 104 | +exports.EditorV1 = void 0; | |
| 102 | 105 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 103 | 106 | var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); |
| 104 | -var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar")); | |
| 105 | -var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js"); | |
| 106 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 107 | -var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); | |
| 108 | -var _SpeakerphoneIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/SpeakerphoneIcon */ "@elementor/icons/SpeakerphoneIcon")); | |
| 109 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 110 | -var IconWithBadge = function IconWithBadge(_ref) { | |
| 111 | - var invisible = _ref.invisible; | |
| 112 | - return /*#__PURE__*/_react.default.createElement(_ui.Badge, { | |
| 113 | - color: "primary", | |
| 114 | - variant: "dot", | |
| 115 | - invisible: invisible | |
| 116 | - }, /*#__PURE__*/_react.default.createElement(_SpeakerphoneIcon.default, null)); | |
| 117 | -}; | |
| 118 | -IconWithBadge.propTypes = { | |
| 119 | - invisible: PropTypes.bool | |
| 120 | -}; | |
| 121 | -var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() { | |
| 122 | - var utilitiesMenu = EditorAppBar.utilitiesMenu; | |
| 123 | - utilitiesMenu.registerLink({ | |
| 124 | - id: 'app-bar-menu-item-whats-new', | |
| 125 | - priority: 10, | |
| 126 | - useProps: function useProps() { | |
| 127 | - var _useState = (0, _react.useState)(!elementorNotifications.is_unread), | |
| 128 | - _useState2 = (0, _slicedToArray2.default)(_useState, 2), | |
| 129 | - isRead = _useState2[0], | |
| 130 | - setIsRead = _useState2[1]; | |
| 131 | - return { | |
| 132 | - title: (0, _i18n.__)("What's New", 'elementor'), | |
| 133 | - icon: function icon() { | |
| 134 | - return /*#__PURE__*/_react.default.createElement(IconWithBadge, { | |
| 135 | - invisible: isRead | |
| 136 | - }); | |
| 137 | - }, | |
| 138 | - onClick: function onClick() { | |
| 139 | - elementorCommon.eventsManager.dispatchEvent(elementorCommon.eventsManager.config.names.topBar.whatsNew, { | |
| 140 | - location: elementorCommon.eventsManager.config.locations.topBar, | |
| 141 | - secondaryLocation: elementorCommon.eventsManager.config.secondaryLocations['whats-new'], | |
| 142 | - trigger: elementorCommon.eventsManager.config.triggers.click, | |
| 143 | - element: elementorCommon.eventsManager.config.elements.buttonIcon | |
| 144 | - }); | |
| 145 | - setIsRead(true); | |
| 146 | - elementorNotifications.is_unread = false; | |
| 147 | - (0, _editorOnButtonClicked.editorOnButtonClicked)('right'); | |
| 148 | - } | |
| 149 | - }; | |
| 150 | - } | |
| 151 | - }); | |
| 152 | -}; | |
| 153 | - | |
| 154 | -/***/ }), | |
| 155 | - | |
| 156 | -/***/ "../modules/notifications/assets/js/components/editor-drawer.js": | |
| 157 | -/*!**********************************************************************!*\ | |
| 158 | - !*** ../modules/notifications/assets/js/components/editor-drawer.js ***! | |
| 159 | - \**********************************************************************/ | |
| 160 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 161 | - | |
| 162 | -"use strict"; | |
| 163 | -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); | |
| 164 | - | |
| 165 | - | |
| 166 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 167 | -var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js"); | |
| 168 | -Object.defineProperty(exports, "__esModule", ({ | |
| 169 | - value: true | |
| 170 | -})); | |
| 171 | -exports.EditorDrawer = void 0; | |
| 172 | -var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); | |
| 173 | -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js")); | |
| 174 | 107 | var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js"); |
| 175 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 176 | -var EditorDrawer = exports.EditorDrawer = function EditorDrawer(_ref) { | |
| 177 | - var _ref$anchorPosition = _ref.anchorPosition, | |
| 178 | - anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition; | |
| 108 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 109 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 110 | +var EditorV1 = function EditorV1() { | |
| 179 | 111 | var _useState = (0, _react.useState)(true), |
| 180 | 112 | _useState2 = (0, _slicedToArray2.default)(_useState, 2), |
| 181 | 113 | isOpen = _useState2[0], |
| 182 | 114 | setIsOpen = _useState2[1]; |
| 115 | + var _useState3 = (0, _react.useState)(false), | |
| 116 | + _useState4 = (0, _slicedToArray2.default)(_useState3, 2), | |
| 117 | + isRead = _useState4[0], | |
| 118 | + setIsRead = _useState4[1]; | |
| 183 | 119 | (0, _react.useEffect)(function () { |
| 184 | 120 | elementor.on('elementor/editor/panel/whats-new/clicked', function () { |
| 185 | 121 | return setIsOpen(true); |
| 186 | 122 | }); |
| 187 | 123 | }, []); |
| 124 | + (0, _react.useEffect)(function () { | |
| 125 | + document.body.classList.remove('e-has-notification'); | |
| 126 | + }, [isRead]); | |
| 188 | 127 | return /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, { |
| 189 | 128 | isOpen: isOpen, |
| 190 | 129 | setIsOpen: setIsOpen, |
| 191 | - setIsRead: function setIsRead() { | |
| 192 | - return document.body.classList.remove('e-has-notification'); | |
| 193 | - }, | |
| 194 | - anchorPosition: anchorPosition | |
| 130 | + setIsRead: setIsRead, | |
| 131 | + anchorPosition: "left" | |
| 195 | 132 | }); |
| 196 | 133 | }; |
| 197 | -EditorDrawer.propTypes = { | |
| 198 | - anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom']) | |
| 199 | -}; | |
| 134 | +exports.EditorV1 = EditorV1; | |
| 200 | 135 | |
| 201 | 136 | /***/ }), |
| 202 | 137 | |
| 203 | -/***/ "../modules/notifications/assets/js/components/editor-on-button-clicked.js": | |
| 204 | -/*!*********************************************************************************!*\ | |
| 205 | - !*** ../modules/notifications/assets/js/components/editor-on-button-clicked.js ***! | |
| 206 | - \*********************************************************************************/ | |
| 207 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 208 | - | |
| 209 | -"use strict"; | |
| 210 | - | |
| 211 | - | |
| 212 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 213 | -Object.defineProperty(exports, "__esModule", ({ | |
| 214 | - value: true | |
| 215 | -})); | |
| 216 | -exports.editorOnButtonClicked = void 0; | |
| 217 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 218 | -var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js")); | |
| 219 | -var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js"); | |
| 220 | -var isRendered = false; | |
| 221 | -var editorOnButtonClicked = exports.editorOnButtonClicked = function editorOnButtonClicked() { | |
| 222 | - var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left'; | |
| 223 | - if (!isRendered) { | |
| 224 | - isRendered = true; | |
| 225 | - var container = document.createElement('div'); | |
| 226 | - document.body.append(container); | |
| 227 | - _react2.default.render(/*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, { | |
| 228 | - anchorPosition: anchorPosition | |
| 229 | - }), container); | |
| 230 | - return; | |
| 231 | - } | |
| 232 | - elementor.trigger('elementor/editor/panel/whats-new/clicked'); | |
| 233 | -}; | |
| 234 | - | |
| 235 | -/***/ }), | |
| 236 | - | |
| 237 | -/***/ "../modules/notifications/assets/js/components/editor-v1.js": | |
| 238 | -/*!******************************************************************!*\ | |
| 239 | - !*** ../modules/notifications/assets/js/components/editor-v1.js ***! | |
| 240 | - \******************************************************************/ | |
| 241 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 242 | - | |
| 243 | -"use strict"; | |
| 244 | -/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 245 | - | |
| 246 | - | |
| 247 | -Object.defineProperty(exports, "__esModule", ({ | |
| 248 | - value: true | |
| 249 | -})); | |
| 250 | -exports.editorV1 = void 0; | |
| 251 | -var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js"); | |
| 252 | -var editorV1 = exports.editorV1 = function editorV1() { | |
| 253 | - elementor.on('panel:init', function () { | |
| 254 | - if (elementorNotifications.is_unread) { | |
| 255 | - document.body.classList.add('e-has-notification'); | |
| 256 | - } | |
| 257 | - elementor.getPanelView().getPages('menu').view.addItem({ | |
| 258 | - name: 'notification-center', | |
| 259 | - icon: 'eicon-speakerphone', | |
| 260 | - title: __('What\'s New', 'elementor'), | |
| 261 | - callback: _editorOnButtonClicked.editorOnButtonClicked | |
| 262 | - }, 'navigate_from_page', 'view-page'); | |
| 263 | - }); | |
| 264 | -}; | |
| 265 | - | |
| 266 | -/***/ }), | |
| 267 | - | |
| 268 | 138 | /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js": |
| 269 | 139 | /*!*********************************************************************************!*\ |
| 270 | 140 | !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***! |
| 271 | 141 | \*********************************************************************************/ |
| @@ -271,9 +141,8 @@ | ||
| 271 | 141 | \*********************************************************************************/ |
| 272 | 142 | /***/ ((__unused_webpack_module, exports, __webpack_require__) => { |
| 273 | 143 | |
| 274 | 144 | "use strict"; |
| 275 | -/* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js"); | |
| 276 | 145 | |
| 277 | 146 | |
| 278 | 147 | var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); |
| 279 | 148 | Object.defineProperty(exports, "__esModule", ({ |
| @@ -280,14 +149,13 @@ | ||
| 280 | 149 | value: true |
| 281 | 150 | })); |
| 282 | 151 | exports.WhatsNewDrawerContent = void 0; |
| 283 | 152 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 284 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 153 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 285 | 154 | var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js"); |
| 286 | 155 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 287 | 156 | var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js"); |
| 288 | -var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) { | |
| 289 | - var setIsOpen = _ref.setIsOpen; | |
| 157 | +var WhatsNewDrawerContent = function WhatsNewDrawerContent() { | |
| 290 | 158 | var _useQuery = (0, _query.useQuery)({ |
| 291 | 159 | queryKey: ['e-notifications'], |
| 292 | 160 | queryFn: _api.getNotifications |
| 293 | 161 | }), |
| @@ -306,16 +174,13 @@ | ||
| 306 | 174 | return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, { |
| 307 | 175 | key: itemIndex, |
| 308 | 176 | item: item, |
| 309 | 177 | itemIndex: itemIndex, |
| 310 | - itemsLength: items.length, | |
| 311 | - setIsOpen: setIsOpen | |
| 178 | + itemsLength: items.length | |
| 312 | 179 | }); |
| 313 | 180 | }); |
| 314 | 181 | }; |
| 315 | -WhatsNewDrawerContent.propTypes = { | |
| 316 | - setIsOpen: PropTypes.func.isRequired | |
| 317 | -}; | |
| 182 | +exports.WhatsNewDrawerContent = WhatsNewDrawerContent; | |
| 318 | 183 | |
| 319 | 184 | /***/ }), |
| 320 | 185 | |
| 321 | 186 | /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js": |
| @@ -335,9 +200,9 @@ | ||
| 335 | 200 | exports.WhatsNewItemChips = void 0; |
| 336 | 201 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 337 | 202 | var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); |
| 338 | 203 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 339 | -var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) { | |
| 204 | +var WhatsNewItemChips = function WhatsNewItemChips(_ref) { | |
| 340 | 205 | var chipPlan = _ref.chipPlan, |
| 341 | 206 | chipTags = _ref.chipTags, |
| 342 | 207 | itemIndex = _ref.itemIndex; |
| 343 | 208 | var chips = []; |
| @@ -372,8 +237,9 @@ | ||
| 372 | 237 | key: "chip-".concat(itemIndex).concat(chipIndex) |
| 373 | 238 | }, chip)); |
| 374 | 239 | })); |
| 375 | 240 | }; |
| 241 | +exports.WhatsNewItemChips = WhatsNewItemChips; | |
| 376 | 242 | WhatsNewItemChips.propTypes = { |
| 377 | 243 | chipPlan: PropTypes.string, |
| 378 | 244 | chipTags: PropTypes.array, |
| 379 | 245 | itemIndex: PropTypes.number.isRequired |
| @@ -380,64 +246,8 @@ | ||
| 380 | 246 | }; |
| 381 | 247 | |
| 382 | 248 | /***/ }), |
| 383 | 249 | |
| 384 | -/***/ "../modules/notifications/assets/js/components/whats-new-item-media.js": | |
| 385 | -/*!*****************************************************************************!*\ | |
| 386 | - !*** ../modules/notifications/assets/js/components/whats-new-item-media.js ***! | |
| 387 | - \*****************************************************************************/ | |
| 388 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 389 | - | |
| 390 | -"use strict"; | |
| 391 | - | |
| 392 | - | |
| 393 | -var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 394 | -Object.defineProperty(exports, "__esModule", ({ | |
| 395 | - value: true | |
| 396 | -})); | |
| 397 | -exports.WhatsNewItemMedia = void 0; | |
| 398 | -var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 399 | -var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); | |
| 400 | -var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js"); | |
| 401 | -/* eslint-disable react/prop-types */ | |
| 402 | - | |
| 403 | -var WhatsNewItemMedia = exports.WhatsNewItemMedia = function WhatsNewItemMedia(_ref) { | |
| 404 | - var item = _ref.item; | |
| 405 | - if (item.youtubeEmbedId) { | |
| 406 | - var videoId = item.youtubeEmbedId.split('?')[0]; | |
| 407 | - var src = "https://www.youtube.com/embed/".concat(videoId).concat(item.youtubeAutoplay ? '?autoplay=1&mute=1' : ''); | |
| 408 | - var allow = "encrypted-media; picture-in-picture".concat(item.youtubeAutoplay ? '; autoplay' : ''); | |
| 409 | - return /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 410 | - sx: { | |
| 411 | - pb: 2 | |
| 412 | - } | |
| 413 | - }, /*#__PURE__*/_react.default.createElement(_ui.Box, { | |
| 414 | - component: "iframe", | |
| 415 | - src: src, | |
| 416 | - title: item.title, | |
| 417 | - allow: allow, | |
| 418 | - allowFullScreen: true, | |
| 419 | - sx: { | |
| 420 | - aspectRatio: '16/9', | |
| 421 | - width: '100%', | |
| 422 | - display: 'block', | |
| 423 | - border: 'none' | |
| 424 | - } | |
| 425 | - })); | |
| 426 | - } | |
| 427 | - var mediaSrc = item.gifSrc || item.imageSrc; | |
| 428 | - if (!mediaSrc) { | |
| 429 | - return null; | |
| 430 | - } | |
| 431 | - return /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, { | |
| 432 | - imageSrc: mediaSrc, | |
| 433 | - link: item.link, | |
| 434 | - title: item.title | |
| 435 | - }); | |
| 436 | -}; | |
| 437 | - | |
| 438 | -/***/ }), | |
| 439 | - | |
| 440 | 250 | /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js": |
| 441 | 251 | /*!*********************************************************************************!*\ |
| 442 | 252 | !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***! |
| 443 | 253 | \*********************************************************************************/ |
| @@ -454,9 +264,9 @@ | ||
| 454 | 264 | exports.WhatsNewItemThumbnail = void 0; |
| 455 | 265 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 456 | 266 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 457 | 267 | var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js"); |
| 458 | -var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) { | |
| 268 | +var WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) { | |
| 459 | 269 | var imageSrc = _ref.imageSrc, |
| 460 | 270 | title = _ref.title, |
| 461 | 271 | link = _ref.link; |
| 462 | 272 | return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| @@ -472,8 +282,9 @@ | ||
| 472 | 282 | maxWidth: '100%' |
| 473 | 283 | } |
| 474 | 284 | }))); |
| 475 | 285 | }; |
| 286 | +exports.WhatsNewItemThumbnail = WhatsNewItemThumbnail; | |
| 476 | 287 | WhatsNewItemThumbnail.propTypes = { |
| 477 | 288 | imageSrc: PropTypes.string.isRequired, |
| 478 | 289 | title: PropTypes.string.isRequired, |
| 479 | 290 | link: PropTypes.string |
| @@ -497,9 +308,9 @@ | ||
| 497 | 308 | })); |
| 498 | 309 | exports.WhatsNewItemTopicLine = void 0; |
| 499 | 310 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 500 | 311 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 501 | -var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) { | |
| 312 | +var WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) { | |
| 502 | 313 | var topic = _ref.topic, |
| 503 | 314 | date = _ref.date; |
| 504 | 315 | return /*#__PURE__*/_react.default.createElement(_ui.Stack, { |
| 505 | 316 | direction: "row", |
| @@ -513,8 +324,9 @@ | ||
| 513 | 324 | pb: 1 |
| 514 | 325 | } |
| 515 | 326 | }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date)); |
| 516 | 327 | }; |
| 328 | +exports.WhatsNewItemTopicLine = WhatsNewItemTopicLine; | |
| 517 | 329 | WhatsNewItemTopicLine.propTypes = { |
| 518 | 330 | topic: PropTypes.string, |
| 519 | 331 | date: PropTypes.string |
| 520 | 332 | }; |
| @@ -539,15 +351,14 @@ | ||
| 539 | 351 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 540 | 352 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 541 | 353 | var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js"); |
| 542 | 354 | var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js"); |
| 543 | -var _whatsNewItemMedia = __webpack_require__(/*! ./whats-new-item-media */ "../modules/notifications/assets/js/components/whats-new-item-media.js"); | |
| 355 | +var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js"); | |
| 544 | 356 | var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js"); |
| 545 | -var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) { | |
| 357 | +var WhatsNewItem = function WhatsNewItem(_ref) { | |
| 546 | 358 | var item = _ref.item, |
| 547 | 359 | itemIndex = _ref.itemIndex, |
| 548 | - itemsLength = _ref.itemsLength, | |
| 549 | - setIsOpen = _ref.setIsOpen; | |
| 360 | + itemsLength = _ref.itemsLength; | |
| 550 | 361 | return /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 551 | 362 | key: itemIndex, |
| 552 | 363 | display: "flex", |
| 553 | 364 | flexDirection: "column", |
| @@ -563,10 +374,12 @@ | ||
| 563 | 374 | variant: "subtitle1", |
| 564 | 375 | sx: { |
| 565 | 376 | pb: 2 |
| 566 | 377 | } |
| 567 | - }, item.title)), /*#__PURE__*/_react.default.createElement(_whatsNewItemMedia.WhatsNewItemMedia, { | |
| 568 | - item: item | |
| 378 | + }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, { | |
| 379 | + imageSrc: item.imageSrc, | |
| 380 | + link: item.link, | |
| 381 | + title: item.title | |
| 569 | 382 | }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, { |
| 570 | 383 | chipPlan: item.chipPlan, |
| 571 | 384 | chipTags: item.chipTags, |
| 572 | 385 | itemIndex: itemIndex |
| @@ -585,15 +398,12 @@ | ||
| 585 | 398 | pb: 2 |
| 586 | 399 | } |
| 587 | 400 | }, /*#__PURE__*/_react.default.createElement(_ui.Button, { |
| 588 | 401 | href: item.ctaLink, |
| 589 | - target: item.ctaLink.startsWith('#') ? '_self' : '_blank', | |
| 402 | + target: "_blank", | |
| 590 | 403 | variant: "contained", |
| 591 | 404 | size: "small", |
| 592 | - color: "promotion", | |
| 593 | - onClick: item.ctaLink.startsWith('#') ? function () { | |
| 594 | - return setIsOpen(false); | |
| 595 | - } : function () {} | |
| 405 | + color: "promotion" | |
| 596 | 406 | }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, { |
| 597 | 407 | sx: { |
| 598 | 408 | my: 1 |
| 599 | 409 | } |
| @@ -598,13 +408,13 @@ | ||
| 598 | 408 | my: 1 |
| 599 | 409 | } |
| 600 | 410 | })); |
| 601 | 411 | }; |
| 412 | +exports.WhatsNewItem = WhatsNewItem; | |
| 602 | 413 | WhatsNewItem.propTypes = { |
| 603 | 414 | item: PropTypes.object.isRequired, |
| 604 | 415 | itemIndex: PropTypes.number.isRequired, |
| 605 | - itemsLength: PropTypes.number.isRequired, | |
| 606 | - setIsOpen: PropTypes.func.isRequired | |
| 416 | + itemsLength: PropTypes.number.isRequired | |
| 607 | 417 | }; |
| 608 | 418 | |
| 609 | 419 | /***/ }), |
| 610 | 420 | |
| @@ -626,9 +436,9 @@ | ||
| 626 | 436 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 627 | 437 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 628 | 438 | var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); |
| 629 | 439 | var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js"); |
| 630 | -var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) { | |
| 440 | +var WhatsNewTopBar = function WhatsNewTopBar(props) { | |
| 631 | 441 | var setIsOpen = props.setIsOpen; |
| 632 | 442 | return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, { |
| 633 | 443 | elevation: 0, |
| 634 | 444 | position: "sticky", |
| @@ -649,8 +459,9 @@ | ||
| 649 | 459 | return setIsOpen(false); |
| 650 | 460 | } |
| 651 | 461 | }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null)); |
| 652 | 462 | }; |
| 463 | +exports.WhatsNewTopBar = WhatsNewTopBar; | |
| 653 | 464 | WhatsNewTopBar.propTypes = { |
| 654 | 465 | setIsOpen: PropTypes.func.isRequired |
| 655 | 466 | }; |
| 656 | 467 | |
| @@ -672,12 +483,13 @@ | ||
| 672 | 483 | })); |
| 673 | 484 | exports.WhatsNew = void 0; |
| 674 | 485 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 675 | 486 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 676 | -var _query = __webpack_require__(/*! @elementor/query */ "@elementor/query"); | |
| 487 | +var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js"); | |
| 677 | 488 | var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js"); |
| 678 | 489 | var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js"); |
| 679 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 490 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 491 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 680 | 492 | var queryClient = new _query.QueryClient({ |
| 681 | 493 | defaultOptions: { |
| 682 | 494 | queries: { |
| 683 | 495 | refetchOnWindowFocus: false, |
| @@ -685,10 +497,10 @@ | ||
| 685 | 497 | staleTime: 1000 * 60 * 30 // 30 minutes |
| 686 | 498 | } |
| 687 | 499 | } |
| 688 | 500 | }); |
| 689 | -var WhatsNew = exports.WhatsNew = function WhatsNew(props) { | |
| 690 | - var _window$elementor, _window$elementor$get; | |
| 501 | + | |
| 502 | +var WhatsNew = function WhatsNew(props) { | |
| 691 | 503 | var isOpen = props.isOpen, |
| 692 | 504 | setIsOpen = props.setIsOpen, |
| 693 | 505 | setIsRead = props.setIsRead, |
| 694 | 506 | _props$anchorPosition = props.anchorPosition, |
| @@ -700,12 +512,10 @@ | ||
| 700 | 512 | setIsRead(true); |
| 701 | 513 | }, [isOpen, setIsRead]); |
| 702 | 514 | return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, { |
| 703 | 515 | client: queryClient |
| 704 | - }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, { | |
| 705 | - rtl: elementorCommon.config.isRTL | |
| 706 | 516 | }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, { |
| 707 | - colorScheme: ((_window$elementor = window.elementor) === null || _window$elementor === void 0 || (_window$elementor$get = _window$elementor.getPreferences) === null || _window$elementor$get === void 0 ? void 0 : _window$elementor$get.call(_window$elementor, 'ui_theme')) || 'auto' | |
| 517 | + colorScheme: "auto" | |
| 708 | 518 | }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, { |
| 709 | 519 | anchor: anchorPosition, |
| 710 | 520 | open: isOpen, |
| 711 | 521 | onClose: function onClose() { |
| @@ -728,12 +538,11 @@ | ||
| 728 | 538 | }), /*#__PURE__*/_react.default.createElement(_ui.Box, { |
| 729 | 539 | sx: { |
| 730 | 540 | padding: '16px' |
| 731 | 541 | } |
| 732 | - }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, { | |
| 733 | - setIsOpen: setIsOpen | |
| 734 | - })))))))); | |
| 542 | + }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, null))))))); | |
| 735 | 543 | }; |
| 544 | +exports.WhatsNew = WhatsNew; | |
| 736 | 545 | WhatsNew.propTypes = { |
| 737 | 546 | isOpen: PropTypes.bool.isRequired, |
| 738 | 547 | setIsOpen: PropTypes.func.isRequired, |
| 739 | 548 | setIsRead: PropTypes.func.isRequired, |
| @@ -758,9 +567,9 @@ | ||
| 758 | 567 | })); |
| 759 | 568 | exports.WrapperWithLink = void 0; |
| 760 | 569 | var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); |
| 761 | 570 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 762 | -var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) { | |
| 571 | +var WrapperWithLink = function WrapperWithLink(props) { | |
| 763 | 572 | var link = props.link, |
| 764 | 573 | children = props.children; |
| 765 | 574 | if (!link) { |
| 766 | 575 | return children; |
| @@ -776,8 +585,9 @@ | ||
| 776 | 585 | } |
| 777 | 586 | } |
| 778 | 587 | }, children); |
| 779 | 588 | }; |
| 589 | +exports.WrapperWithLink = WrapperWithLink; | |
| 780 | 590 | WrapperWithLink.propTypes = { |
| 781 | 591 | link: PropTypes.string, |
| 782 | 592 | children: PropTypes.any.isRequired |
| 783 | 593 | }; |
| @@ -801,10 +611,11 @@ | ||
| 801 | 611 | exports.XIcon = void 0; |
| 802 | 612 | var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react")); |
| 803 | 613 | var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js")); |
| 804 | 614 | var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui"); |
| 805 | -function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } | |
| 806 | -var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) { | |
| 615 | +function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | |
| 616 | +function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | |
| 617 | +var XIcon = (0, _react.forwardRef)(function (props, ref) { | |
| 807 | 618 | return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({ |
| 808 | 619 | viewBox: "0 0 24 24" |
| 809 | 620 | }, props, { |
| 810 | 621 | ref: ref |
| @@ -817,177 +628,12 @@ | ||
| 817 | 628 | clipRule: "evenodd", |
| 818 | 629 | d: "M5.46967 5.46967C5.76256 5.17678 6.23744 5.17678 6.53033 5.46967L18.5303 17.4697C18.8232 17.7626 18.8232 18.2374 18.5303 18.5303C18.2374 18.8232 17.7626 18.8232 17.4697 18.5303L5.46967 6.53033C5.17678 6.23744 5.17678 5.76256 5.46967 5.46967Z" |
| 819 | 630 | })); |
| 820 | 631 | }); |
| 632 | +exports.XIcon = XIcon; | |
| 821 | 633 | |
| 822 | 634 | /***/ }), |
| 823 | 635 | |
| 824 | -/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 825 | -/*!******************************************************************!*\ | |
| 826 | - !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 827 | - \******************************************************************/ | |
| 828 | -/***/ ((module) => { | |
| 829 | - | |
| 830 | -function _arrayLikeToArray(r, a) { | |
| 831 | - (null == a || a > r.length) && (a = r.length); | |
| 832 | - for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; | |
| 833 | - return n; | |
| 834 | -} | |
| 835 | -module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 836 | - | |
| 837 | -/***/ }), | |
| 838 | - | |
| 839 | -/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 840 | -/*!****************************************************************!*\ | |
| 841 | - !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 842 | - \****************************************************************/ | |
| 843 | -/***/ ((module) => { | |
| 844 | - | |
| 845 | -function _arrayWithHoles(r) { | |
| 846 | - if (Array.isArray(r)) return r; | |
| 847 | -} | |
| 848 | -module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 849 | - | |
| 850 | -/***/ }), | |
| 851 | - | |
| 852 | -/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 853 | -/*!*********************************************************!*\ | |
| 854 | - !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 855 | - \*********************************************************/ | |
| 856 | -/***/ ((module) => { | |
| 857 | - | |
| 858 | -function _extends() { | |
| 859 | - return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) { | |
| 860 | - for (var e = 1; e < arguments.length; e++) { | |
| 861 | - var t = arguments[e]; | |
| 862 | - for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); | |
| 863 | - } | |
| 864 | - return n; | |
| 865 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments); | |
| 866 | -} | |
| 867 | -module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 868 | - | |
| 869 | -/***/ }), | |
| 870 | - | |
| 871 | -/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 872 | -/*!***********************************************************************!*\ | |
| 873 | - !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 874 | - \***********************************************************************/ | |
| 875 | -/***/ ((module) => { | |
| 876 | - | |
| 877 | -function _interopRequireDefault(e) { | |
| 878 | - return e && e.__esModule ? e : { | |
| 879 | - "default": e | |
| 880 | - }; | |
| 881 | -} | |
| 882 | -module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 883 | - | |
| 884 | -/***/ }), | |
| 885 | - | |
| 886 | -/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 887 | -/*!**********************************************************************!*\ | |
| 888 | - !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 889 | - \**********************************************************************/ | |
| 890 | -/***/ ((module) => { | |
| 891 | - | |
| 892 | -function _iterableToArrayLimit(r, l) { | |
| 893 | - var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 894 | - if (null != t) { | |
| 895 | - var e, | |
| 896 | - n, | |
| 897 | - i, | |
| 898 | - u, | |
| 899 | - a = [], | |
| 900 | - f = !0, | |
| 901 | - o = !1; | |
| 902 | - try { | |
| 903 | - if (i = (t = t.call(r)).next, 0 === l) { | |
| 904 | - if (Object(t) !== t) return; | |
| 905 | - f = !1; | |
| 906 | - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 907 | - } catch (r) { | |
| 908 | - o = !0, n = r; | |
| 909 | - } finally { | |
| 910 | - try { | |
| 911 | - if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 912 | - } finally { | |
| 913 | - if (o) throw n; | |
| 914 | - } | |
| 915 | - } | |
| 916 | - return a; | |
| 917 | - } | |
| 918 | -} | |
| 919 | -module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 920 | - | |
| 921 | -/***/ }), | |
| 922 | - | |
| 923 | -/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 924 | -/*!*****************************************************************!*\ | |
| 925 | - !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 926 | - \*****************************************************************/ | |
| 927 | -/***/ ((module) => { | |
| 928 | - | |
| 929 | -function _nonIterableRest() { | |
| 930 | - throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 931 | -} | |
| 932 | -module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 933 | - | |
| 934 | -/***/ }), | |
| 935 | - | |
| 936 | -/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 937 | -/*!***************************************************************!*\ | |
| 938 | - !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 939 | - \***************************************************************/ | |
| 940 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 941 | - | |
| 942 | -var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 943 | -var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 944 | -var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 945 | -var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 946 | -function _slicedToArray(r, e) { | |
| 947 | - return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest(); | |
| 948 | -} | |
| 949 | -module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 950 | - | |
| 951 | -/***/ }), | |
| 952 | - | |
| 953 | -/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 954 | -/*!********************************************************!*\ | |
| 955 | - !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 956 | - \********************************************************/ | |
| 957 | -/***/ ((module) => { | |
| 958 | - | |
| 959 | -function _typeof(o) { | |
| 960 | - "@babel/helpers - typeof"; | |
| 961 | - | |
| 962 | - return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 963 | - return typeof o; | |
| 964 | - } : function (o) { | |
| 965 | - return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 966 | - }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o); | |
| 967 | -} | |
| 968 | -module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 969 | - | |
| 970 | -/***/ }), | |
| 971 | - | |
| 972 | -/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 973 | -/*!****************************************************************************!*\ | |
| 974 | - !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 975 | - \****************************************************************************/ | |
| 976 | -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 977 | - | |
| 978 | -var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 979 | -function _unsupportedIterableToArray(r, a) { | |
| 980 | - if (r) { | |
| 981 | - if ("string" == typeof r) return arrayLikeToArray(r, a); | |
| 982 | - var t = {}.toString.call(r).slice(8, -1); | |
| 983 | - 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; | |
| 984 | - } | |
| 985 | -} | |
| 986 | -module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 987 | - | |
| 988 | -/***/ }), | |
| 989 | - | |
| 990 | 636 | /***/ "../node_modules/object-assign/index.js": |
| 991 | 637 | /*!**********************************************!*\ |
| 992 | 638 | !*** ../node_modules/object-assign/index.js ***! |
| 993 | 639 | \**********************************************/ |
| @@ -1842,10 +1488,9 @@ | ||
| 1842 | 1488 | // By explicitly using `prop-types` you are opting into new development behavior. |
| 1843 | 1489 | // http://fb.me/prop-types-in-prod |
| 1844 | 1490 | var throwOnDirectAccess = true; |
| 1845 | 1491 | module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess); |
| 1846 | -} else // removed by dead control flow | |
| 1847 | -{} | |
| 1492 | +} else {} | |
| 1848 | 1493 | |
| 1849 | 1494 | |
| 1850 | 1495 | /***/ }), |
| 1851 | 1496 | |
| @@ -2083,10 +1728,9 @@ | ||
| 2083 | 1728 | |
| 2084 | 1729 | "use strict"; |
| 2085 | 1730 | |
| 2086 | 1731 | |
| 2087 | -if (false) // removed by dead control flow | |
| 2088 | -{} else { | |
| 1732 | +if (false) {} else { | |
| 2089 | 1733 | module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js"); |
| 2090 | 1734 | } |
| 2091 | 1735 | |
| 2092 | 1736 | |
| @@ -2091,117 +1735,4950 @@ | ||
| 2091 | 1735 | |
| 2092 | 1736 | |
| 2093 | 1737 | /***/ }), |
| 2094 | 1738 | |
| 2095 | -/***/ "../node_modules/react-dom/client.js": | |
| 2096 | -/*!*******************************************!*\ | |
| 2097 | - !*** ../node_modules/react-dom/client.js ***! | |
| 2098 | - \*******************************************/ | |
| 2099 | -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | |
| 1739 | +/***/ "react": | |
| 1740 | +/*!************************!*\ | |
| 1741 | + !*** external "React" ***! | |
| 1742 | + \************************/ | |
| 1743 | +/***/ ((module) => { | |
| 2100 | 1744 | |
| 2101 | 1745 | "use strict"; |
| 1746 | +module.exports = React; | |
| 2102 | 1747 | |
| 1748 | +/***/ }), | |
| 2103 | 1749 | |
| 2104 | -var m = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 2105 | -if (false) // removed by dead control flow | |
| 2106 | -{} else { | |
| 2107 | - var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | |
| 2108 | - exports.createRoot = function(c, o) { | |
| 2109 | - i.usingClientEntryPoint = true; | |
| 1750 | +/***/ "react-dom": | |
| 1751 | +/*!***************************!*\ | |
| 1752 | + !*** external "ReactDOM" ***! | |
| 1753 | + \***************************/ | |
| 1754 | +/***/ ((module) => { | |
| 1755 | + | |
| 1756 | +"use strict"; | |
| 1757 | +module.exports = ReactDOM; | |
| 1758 | + | |
| 1759 | +/***/ }), | |
| 1760 | + | |
| 1761 | +/***/ "@elementor/ui": | |
| 1762 | +/*!*********************************!*\ | |
| 1763 | + !*** external "elementorV2.ui" ***! | |
| 1764 | + \*********************************/ | |
| 1765 | +/***/ ((module) => { | |
| 1766 | + | |
| 1767 | +"use strict"; | |
| 1768 | +module.exports = elementorV2.ui; | |
| 1769 | + | |
| 1770 | +/***/ }), | |
| 1771 | + | |
| 1772 | +/***/ "@wordpress/i18n": | |
| 1773 | +/*!**************************!*\ | |
| 1774 | + !*** external "wp.i18n" ***! | |
| 1775 | + \**************************/ | |
| 1776 | +/***/ ((module) => { | |
| 1777 | + | |
| 1778 | +"use strict"; | |
| 1779 | +module.exports = wp.i18n; | |
| 1780 | + | |
| 1781 | +/***/ }), | |
| 1782 | + | |
| 1783 | +/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js": | |
| 1784 | +/*!******************************************************************!*\ | |
| 1785 | + !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! | |
| 1786 | + \******************************************************************/ | |
| 1787 | +/***/ ((module) => { | |
| 1788 | + | |
| 1789 | +function _arrayLikeToArray(arr, len) { | |
| 1790 | + if (len == null || len > arr.length) len = arr.length; | |
| 1791 | + for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; | |
| 1792 | + return arr2; | |
| 1793 | +} | |
| 1794 | +module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1795 | + | |
| 1796 | +/***/ }), | |
| 1797 | + | |
| 1798 | +/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js": | |
| 1799 | +/*!****************************************************************!*\ | |
| 1800 | + !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! | |
| 1801 | + \****************************************************************/ | |
| 1802 | +/***/ ((module) => { | |
| 1803 | + | |
| 1804 | +function _arrayWithHoles(arr) { | |
| 1805 | + if (Array.isArray(arr)) return arr; | |
| 1806 | +} | |
| 1807 | +module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1808 | + | |
| 1809 | +/***/ }), | |
| 1810 | + | |
| 1811 | +/***/ "../node_modules/@babel/runtime/helpers/extends.js": | |
| 1812 | +/*!*********************************************************!*\ | |
| 1813 | + !*** ../node_modules/@babel/runtime/helpers/extends.js ***! | |
| 1814 | + \*********************************************************/ | |
| 1815 | +/***/ ((module) => { | |
| 1816 | + | |
| 1817 | +function _extends() { | |
| 1818 | + module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) { | |
| 1819 | + for (var i = 1; i < arguments.length; i++) { | |
| 1820 | + var source = arguments[i]; | |
| 1821 | + for (var key in source) { | |
| 1822 | + if (Object.prototype.hasOwnProperty.call(source, key)) { | |
| 1823 | + target[key] = source[key]; | |
| 1824 | + } | |
| 1825 | + } | |
| 1826 | + } | |
| 1827 | + return target; | |
| 1828 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1829 | + return _extends.apply(this, arguments); | |
| 1830 | +} | |
| 1831 | +module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1832 | + | |
| 1833 | +/***/ }), | |
| 1834 | + | |
| 1835 | +/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js": | |
| 1836 | +/*!***********************************************************************!*\ | |
| 1837 | + !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! | |
| 1838 | + \***********************************************************************/ | |
| 1839 | +/***/ ((module) => { | |
| 1840 | + | |
| 1841 | +function _interopRequireDefault(obj) { | |
| 1842 | + return obj && obj.__esModule ? obj : { | |
| 1843 | + "default": obj | |
| 1844 | + }; | |
| 1845 | +} | |
| 1846 | +module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1847 | + | |
| 1848 | +/***/ }), | |
| 1849 | + | |
| 1850 | +/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": | |
| 1851 | +/*!**********************************************************************!*\ | |
| 1852 | + !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! | |
| 1853 | + \**********************************************************************/ | |
| 1854 | +/***/ ((module) => { | |
| 1855 | + | |
| 1856 | +function _iterableToArrayLimit(r, l) { | |
| 1857 | + var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; | |
| 1858 | + if (null != t) { | |
| 1859 | + var e, | |
| 1860 | + n, | |
| 1861 | + i, | |
| 1862 | + u, | |
| 1863 | + a = [], | |
| 1864 | + f = !0, | |
| 1865 | + o = !1; | |
| 2110 | 1866 | try { |
| 2111 | - return m.createRoot(c, o); | |
| 1867 | + if (i = (t = t.call(r)).next, 0 === l) { | |
| 1868 | + if (Object(t) !== t) return; | |
| 1869 | + f = !1; | |
| 1870 | + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); | |
| 1871 | + } catch (r) { | |
| 1872 | + o = !0, n = r; | |
| 2112 | 1873 | } finally { |
| 2113 | - i.usingClientEntryPoint = false; | |
| 1874 | + try { | |
| 1875 | + if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; | |
| 1876 | + } finally { | |
| 1877 | + if (o) throw n; | |
| 1878 | + } | |
| 2114 | 1879 | } |
| 1880 | + return a; | |
| 1881 | + } | |
| 1882 | +} | |
| 1883 | +module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1884 | + | |
| 1885 | +/***/ }), | |
| 1886 | + | |
| 1887 | +/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js": | |
| 1888 | +/*!*****************************************************************!*\ | |
| 1889 | + !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***! | |
| 1890 | + \*****************************************************************/ | |
| 1891 | +/***/ ((module) => { | |
| 1892 | + | |
| 1893 | +function _nonIterableRest() { | |
| 1894 | + throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); | |
| 1895 | +} | |
| 1896 | +module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1897 | + | |
| 1898 | +/***/ }), | |
| 1899 | + | |
| 1900 | +/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js": | |
| 1901 | +/*!***************************************************************!*\ | |
| 1902 | + !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***! | |
| 1903 | + \***************************************************************/ | |
| 1904 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1905 | + | |
| 1906 | +var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js"); | |
| 1907 | +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"); | |
| 1908 | +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"); | |
| 1909 | +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js"); | |
| 1910 | +function _slicedToArray(arr, i) { | |
| 1911 | + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); | |
| 1912 | +} | |
| 1913 | +module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1914 | + | |
| 1915 | +/***/ }), | |
| 1916 | + | |
| 1917 | +/***/ "../node_modules/@babel/runtime/helpers/typeof.js": | |
| 1918 | +/*!********************************************************!*\ | |
| 1919 | + !*** ../node_modules/@babel/runtime/helpers/typeof.js ***! | |
| 1920 | + \********************************************************/ | |
| 1921 | +/***/ ((module) => { | |
| 1922 | + | |
| 1923 | +function _typeof(o) { | |
| 1924 | + "@babel/helpers - typeof"; | |
| 1925 | + | |
| 1926 | + return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { | |
| 1927 | + return typeof o; | |
| 1928 | + } : function (o) { | |
| 1929 | + return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; | |
| 1930 | + }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o); | |
| 1931 | +} | |
| 1932 | +module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1933 | + | |
| 1934 | +/***/ }), | |
| 1935 | + | |
| 1936 | +/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": | |
| 1937 | +/*!****************************************************************************!*\ | |
| 1938 | + !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! | |
| 1939 | + \****************************************************************************/ | |
| 1940 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1941 | + | |
| 1942 | +var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js"); | |
| 1943 | +function _unsupportedIterableToArray(o, minLen) { | |
| 1944 | + if (!o) return; | |
| 1945 | + if (typeof o === "string") return arrayLikeToArray(o, minLen); | |
| 1946 | + var n = Object.prototype.toString.call(o).slice(8, -1); | |
| 1947 | + if (n === "Object" && o.constructor) n = o.constructor.name; | |
| 1948 | + if (n === "Map" || n === "Set") return Array.from(o); | |
| 1949 | + if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen); | |
| 1950 | +} | |
| 1951 | +module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports; | |
| 1952 | + | |
| 1953 | +/***/ }), | |
| 1954 | + | |
| 1955 | +/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs": | |
| 1956 | +/*!**************************************************************************!*\ | |
| 1957 | + !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***! | |
| 1958 | + \**************************************************************************/ | |
| 1959 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 1960 | + | |
| 1961 | +"use strict"; | |
| 1962 | + | |
| 1963 | +var __defProp = Object.defineProperty; | |
| 1964 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 1965 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 1966 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 1967 | +var __export = (target, all) => { | |
| 1968 | + for (var name in all) | |
| 1969 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 1970 | +}; | |
| 1971 | +var __copyProps = (to, from, except, desc) => { | |
| 1972 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 1973 | + for (let key of __getOwnPropNames(from)) | |
| 1974 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 1975 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 1976 | + } | |
| 1977 | + return to; | |
| 1978 | +}; | |
| 1979 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 1980 | + | |
| 1981 | +// src/focusManager.ts | |
| 1982 | +var focusManager_exports = {}; | |
| 1983 | +__export(focusManager_exports, { | |
| 1984 | + FocusManager: () => FocusManager, | |
| 1985 | + focusManager: () => focusManager | |
| 1986 | +}); | |
| 1987 | +module.exports = __toCommonJS(focusManager_exports); | |
| 1988 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 1989 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 1990 | +var FocusManager = class extends import_subscribable.Subscribable { | |
| 1991 | + #focused; | |
| 1992 | + #cleanup; | |
| 1993 | + #setup; | |
| 1994 | + constructor() { | |
| 1995 | + super(); | |
| 1996 | + this.#setup = (onFocus) => { | |
| 1997 | + if (!import_utils.isServer && window.addEventListener) { | |
| 1998 | + const listener = () => onFocus(); | |
| 1999 | + window.addEventListener("visibilitychange", listener, false); | |
| 2000 | + return () => { | |
| 2001 | + window.removeEventListener("visibilitychange", listener); | |
| 2002 | + }; | |
| 2003 | + } | |
| 2004 | + return; | |
| 2005 | + }; | |
| 2006 | + } | |
| 2007 | + onSubscribe() { | |
| 2008 | + if (!this.#cleanup) { | |
| 2009 | + this.setEventListener(this.#setup); | |
| 2010 | + } | |
| 2011 | + } | |
| 2012 | + onUnsubscribe() { | |
| 2013 | + if (!this.hasListeners()) { | |
| 2014 | + this.#cleanup?.(); | |
| 2015 | + this.#cleanup = void 0; | |
| 2016 | + } | |
| 2017 | + } | |
| 2018 | + setEventListener(setup) { | |
| 2019 | + this.#setup = setup; | |
| 2020 | + this.#cleanup?.(); | |
| 2021 | + this.#cleanup = setup((focused) => { | |
| 2022 | + if (typeof focused === "boolean") { | |
| 2023 | + this.setFocused(focused); | |
| 2024 | + } else { | |
| 2025 | + this.onFocus(); | |
| 2026 | + } | |
| 2027 | + }); | |
| 2028 | + } | |
| 2029 | + setFocused(focused) { | |
| 2030 | + const changed = this.#focused !== focused; | |
| 2031 | + if (changed) { | |
| 2032 | + this.#focused = focused; | |
| 2033 | + this.onFocus(); | |
| 2034 | + } | |
| 2035 | + } | |
| 2036 | + onFocus() { | |
| 2037 | + this.listeners.forEach((listener) => { | |
| 2038 | + listener(); | |
| 2039 | + }); | |
| 2040 | + } | |
| 2041 | + isFocused() { | |
| 2042 | + if (typeof this.#focused === "boolean") { | |
| 2043 | + return this.#focused; | |
| 2044 | + } | |
| 2045 | + return globalThis.document?.visibilityState !== "hidden"; | |
| 2046 | + } | |
| 2047 | +}; | |
| 2048 | +var focusManager = new FocusManager(); | |
| 2049 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2050 | +0 && (0); | |
| 2051 | +//# sourceMappingURL=focusManager.cjs.map | |
| 2052 | + | |
| 2053 | +/***/ }), | |
| 2054 | + | |
| 2055 | +/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs": | |
| 2056 | +/*!***********************************************************************!*\ | |
| 2057 | + !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***! | |
| 2058 | + \***********************************************************************/ | |
| 2059 | +/***/ ((module) => { | |
| 2060 | + | |
| 2061 | +"use strict"; | |
| 2062 | + | |
| 2063 | +var __defProp = Object.defineProperty; | |
| 2064 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2065 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2066 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2067 | +var __export = (target, all) => { | |
| 2068 | + for (var name in all) | |
| 2069 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2070 | +}; | |
| 2071 | +var __copyProps = (to, from, except, desc) => { | |
| 2072 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2073 | + for (let key of __getOwnPropNames(from)) | |
| 2074 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2075 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2076 | + } | |
| 2077 | + return to; | |
| 2078 | +}; | |
| 2079 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2080 | + | |
| 2081 | +// src/hydration.ts | |
| 2082 | +var hydration_exports = {}; | |
| 2083 | +__export(hydration_exports, { | |
| 2084 | + defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation, | |
| 2085 | + defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery, | |
| 2086 | + dehydrate: () => dehydrate, | |
| 2087 | + hydrate: () => hydrate | |
| 2088 | +}); | |
| 2089 | +module.exports = __toCommonJS(hydration_exports); | |
| 2090 | +function dehydrateMutation(mutation) { | |
| 2091 | + return { | |
| 2092 | + mutationKey: mutation.options.mutationKey, | |
| 2093 | + state: mutation.state, | |
| 2094 | + ...mutation.meta && { meta: mutation.meta } | |
| 2115 | 2095 | }; |
| 2116 | - exports.hydrateRoot = function(c, h, o) { | |
| 2117 | - i.usingClientEntryPoint = true; | |
| 2096 | +} | |
| 2097 | +function dehydrateQuery(query) { | |
| 2098 | + return { | |
| 2099 | + state: query.state, | |
| 2100 | + queryKey: query.queryKey, | |
| 2101 | + queryHash: query.queryHash, | |
| 2102 | + ...query.meta && { meta: query.meta } | |
| 2103 | + }; | |
| 2104 | +} | |
| 2105 | +function defaultShouldDehydrateMutation(mutation) { | |
| 2106 | + return mutation.state.isPaused; | |
| 2107 | +} | |
| 2108 | +function defaultShouldDehydrateQuery(query) { | |
| 2109 | + return query.state.status === "success"; | |
| 2110 | +} | |
| 2111 | +function dehydrate(client, options = {}) { | |
| 2112 | + const filterMutation = options.shouldDehydrateMutation ?? defaultShouldDehydrateMutation; | |
| 2113 | + const mutations = client.getMutationCache().getAll().flatMap( | |
| 2114 | + (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : [] | |
| 2115 | + ); | |
| 2116 | + const filterQuery = options.shouldDehydrateQuery ?? defaultShouldDehydrateQuery; | |
| 2117 | + const queries = client.getQueryCache().getAll().flatMap((query) => filterQuery(query) ? [dehydrateQuery(query)] : []); | |
| 2118 | + return { mutations, queries }; | |
| 2119 | +} | |
| 2120 | +function hydrate(client, dehydratedState, options) { | |
| 2121 | + if (typeof dehydratedState !== "object" || dehydratedState === null) { | |
| 2122 | + return; | |
| 2123 | + } | |
| 2124 | + const mutationCache = client.getMutationCache(); | |
| 2125 | + const queryCache = client.getQueryCache(); | |
| 2126 | + const mutations = dehydratedState.mutations || []; | |
| 2127 | + const queries = dehydratedState.queries || []; | |
| 2128 | + mutations.forEach((dehydratedMutation) => { | |
| 2129 | + mutationCache.build( | |
| 2130 | + client, | |
| 2131 | + { | |
| 2132 | + ...options?.defaultOptions?.mutations, | |
| 2133 | + mutationKey: dehydratedMutation.mutationKey, | |
| 2134 | + meta: dehydratedMutation.meta | |
| 2135 | + }, | |
| 2136 | + dehydratedMutation.state | |
| 2137 | + ); | |
| 2138 | + }); | |
| 2139 | + queries.forEach(({ queryKey, state, queryHash, meta }) => { | |
| 2140 | + const query = queryCache.get(queryHash); | |
| 2141 | + if (query) { | |
| 2142 | + if (query.state.dataUpdatedAt < state.dataUpdatedAt) { | |
| 2143 | + const { fetchStatus: _ignored, ...dehydratedQueryState } = state; | |
| 2144 | + query.setState(dehydratedQueryState); | |
| 2145 | + } | |
| 2146 | + return; | |
| 2147 | + } | |
| 2148 | + queryCache.build( | |
| 2149 | + client, | |
| 2150 | + { | |
| 2151 | + ...options?.defaultOptions?.queries, | |
| 2152 | + queryKey, | |
| 2153 | + queryHash, | |
| 2154 | + meta | |
| 2155 | + }, | |
| 2156 | + // Reset fetch status to idle to avoid | |
| 2157 | + // query being stuck in fetching state upon hydration | |
| 2158 | + { | |
| 2159 | + ...state, | |
| 2160 | + fetchStatus: "idle" | |
| 2161 | + } | |
| 2162 | + ); | |
| 2163 | + }); | |
| 2164 | +} | |
| 2165 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2166 | +0 && (0); | |
| 2167 | +//# sourceMappingURL=hydration.cjs.map | |
| 2168 | + | |
| 2169 | +/***/ }), | |
| 2170 | + | |
| 2171 | +/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs": | |
| 2172 | +/*!*******************************************************************!*\ | |
| 2173 | + !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***! | |
| 2174 | + \*******************************************************************/ | |
| 2175 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2176 | + | |
| 2177 | +"use strict"; | |
| 2178 | + | |
| 2179 | +var __defProp = Object.defineProperty; | |
| 2180 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2181 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2182 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2183 | +var __export = (target, all) => { | |
| 2184 | + for (var name in all) | |
| 2185 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2186 | +}; | |
| 2187 | +var __copyProps = (to, from, except, desc) => { | |
| 2188 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2189 | + for (let key of __getOwnPropNames(from)) | |
| 2190 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2191 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2192 | + } | |
| 2193 | + return to; | |
| 2194 | +}; | |
| 2195 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 2196 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2197 | + | |
| 2198 | +// src/index.ts | |
| 2199 | +var src_exports = {}; | |
| 2200 | +__export(src_exports, { | |
| 2201 | + CancelledError: () => import_retryer.CancelledError, | |
| 2202 | + InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver, | |
| 2203 | + MutationCache: () => import_mutationCache.MutationCache, | |
| 2204 | + MutationObserver: () => import_mutationObserver.MutationObserver, | |
| 2205 | + QueriesObserver: () => import_queriesObserver.QueriesObserver, | |
| 2206 | + Query: () => import_query.Query, | |
| 2207 | + QueryCache: () => import_queryCache.QueryCache, | |
| 2208 | + QueryClient: () => import_queryClient.QueryClient, | |
| 2209 | + QueryObserver: () => import_queryObserver.QueryObserver, | |
| 2210 | + defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation, | |
| 2211 | + defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery, | |
| 2212 | + dehydrate: () => import_hydration.dehydrate, | |
| 2213 | + focusManager: () => import_focusManager.focusManager, | |
| 2214 | + hashKey: () => import_utils.hashKey, | |
| 2215 | + hydrate: () => import_hydration.hydrate, | |
| 2216 | + isCancelledError: () => import_retryer2.isCancelledError, | |
| 2217 | + isServer: () => import_utils.isServer, | |
| 2218 | + keepPreviousData: () => import_utils.keepPreviousData, | |
| 2219 | + matchQuery: () => import_utils.matchQuery, | |
| 2220 | + notifyManager: () => import_notifyManager.notifyManager, | |
| 2221 | + onlineManager: () => import_onlineManager.onlineManager, | |
| 2222 | + replaceEqualDeep: () => import_utils.replaceEqualDeep | |
| 2223 | +}); | |
| 2224 | +module.exports = __toCommonJS(src_exports); | |
| 2225 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 2226 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 2227 | +var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs"); | |
| 2228 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 2229 | +var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs"); | |
| 2230 | +var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs"); | |
| 2231 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 2232 | +var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs"); | |
| 2233 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 2234 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 2235 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 2236 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 2237 | +var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 2238 | +var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs"); | |
| 2239 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports); | |
| 2240 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 2241 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2242 | +0 && (0); | |
| 2243 | +//# sourceMappingURL=index.cjs.map | |
| 2244 | + | |
| 2245 | +/***/ }), | |
| 2246 | + | |
| 2247 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs": | |
| 2248 | +/*!***********************************************************************************!*\ | |
| 2249 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***! | |
| 2250 | + \***********************************************************************************/ | |
| 2251 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2252 | + | |
| 2253 | +"use strict"; | |
| 2254 | + | |
| 2255 | +var __defProp = Object.defineProperty; | |
| 2256 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2257 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2258 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2259 | +var __export = (target, all) => { | |
| 2260 | + for (var name in all) | |
| 2261 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2262 | +}; | |
| 2263 | +var __copyProps = (to, from, except, desc) => { | |
| 2264 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2265 | + for (let key of __getOwnPropNames(from)) | |
| 2266 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2267 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2268 | + } | |
| 2269 | + return to; | |
| 2270 | +}; | |
| 2271 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2272 | + | |
| 2273 | +// src/infiniteQueryBehavior.ts | |
| 2274 | +var infiniteQueryBehavior_exports = {}; | |
| 2275 | +__export(infiniteQueryBehavior_exports, { | |
| 2276 | + hasNextPage: () => hasNextPage, | |
| 2277 | + hasPreviousPage: () => hasPreviousPage, | |
| 2278 | + infiniteQueryBehavior: () => infiniteQueryBehavior | |
| 2279 | +}); | |
| 2280 | +module.exports = __toCommonJS(infiniteQueryBehavior_exports); | |
| 2281 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 2282 | +function infiniteQueryBehavior(pages) { | |
| 2283 | + return { | |
| 2284 | + onFetch: (context, query) => { | |
| 2285 | + const fetchFn = async () => { | |
| 2286 | + const options = context.options; | |
| 2287 | + const direction = context.fetchOptions?.meta?.fetchMore?.direction; | |
| 2288 | + const oldPages = context.state.data?.pages || []; | |
| 2289 | + const oldPageParams = context.state.data?.pageParams || []; | |
| 2290 | + const empty = { pages: [], pageParams: [] }; | |
| 2291 | + let cancelled = false; | |
| 2292 | + const addSignalProperty = (object) => { | |
| 2293 | + Object.defineProperty(object, "signal", { | |
| 2294 | + enumerable: true, | |
| 2295 | + get: () => { | |
| 2296 | + if (context.signal.aborted) { | |
| 2297 | + cancelled = true; | |
| 2298 | + } else { | |
| 2299 | + context.signal.addEventListener("abort", () => { | |
| 2300 | + cancelled = true; | |
| 2301 | + }); | |
| 2302 | + } | |
| 2303 | + return context.signal; | |
| 2304 | + } | |
| 2305 | + }); | |
| 2306 | + }; | |
| 2307 | + const queryFn = context.options.queryFn || (() => Promise.reject( | |
| 2308 | + new Error(`Missing queryFn: '${context.options.queryHash}'`) | |
| 2309 | + )); | |
| 2310 | + const fetchPage = async (data, param, previous) => { | |
| 2311 | + if (cancelled) { | |
| 2312 | + return Promise.reject(); | |
| 2313 | + } | |
| 2314 | + if (param == null && data.pages.length) { | |
| 2315 | + return Promise.resolve(data); | |
| 2316 | + } | |
| 2317 | + const queryFnContext = { | |
| 2318 | + queryKey: context.queryKey, | |
| 2319 | + pageParam: param, | |
| 2320 | + direction: previous ? "backward" : "forward", | |
| 2321 | + meta: context.options.meta | |
| 2322 | + }; | |
| 2323 | + addSignalProperty(queryFnContext); | |
| 2324 | + const page = await queryFn( | |
| 2325 | + queryFnContext | |
| 2326 | + ); | |
| 2327 | + const { maxPages } = context.options; | |
| 2328 | + const addTo = previous ? import_utils.addToStart : import_utils.addToEnd; | |
| 2329 | + return { | |
| 2330 | + pages: addTo(data.pages, page, maxPages), | |
| 2331 | + pageParams: addTo(data.pageParams, param, maxPages) | |
| 2332 | + }; | |
| 2333 | + }; | |
| 2334 | + let result; | |
| 2335 | + if (direction && oldPages.length) { | |
| 2336 | + const previous = direction === "backward"; | |
| 2337 | + const pageParamFn = previous ? getPreviousPageParam : getNextPageParam; | |
| 2338 | + const oldData = { | |
| 2339 | + pages: oldPages, | |
| 2340 | + pageParams: oldPageParams | |
| 2341 | + }; | |
| 2342 | + const param = pageParamFn(options, oldData); | |
| 2343 | + result = await fetchPage(oldData, param, previous); | |
| 2344 | + } else { | |
| 2345 | + result = await fetchPage( | |
| 2346 | + empty, | |
| 2347 | + oldPageParams[0] ?? options.initialPageParam | |
| 2348 | + ); | |
| 2349 | + const remainingPages = pages ?? oldPages.length; | |
| 2350 | + for (let i = 1; i < remainingPages; i++) { | |
| 2351 | + const param = getNextPageParam(options, result); | |
| 2352 | + result = await fetchPage(result, param); | |
| 2353 | + } | |
| 2354 | + } | |
| 2355 | + return result; | |
| 2356 | + }; | |
| 2357 | + if (context.options.persister) { | |
| 2358 | + context.fetchFn = () => { | |
| 2359 | + return context.options.persister?.( | |
| 2360 | + fetchFn, | |
| 2361 | + { | |
| 2362 | + queryKey: context.queryKey, | |
| 2363 | + meta: context.options.meta, | |
| 2364 | + signal: context.signal | |
| 2365 | + }, | |
| 2366 | + query | |
| 2367 | + ); | |
| 2368 | + }; | |
| 2369 | + } else { | |
| 2370 | + context.fetchFn = fetchFn; | |
| 2371 | + } | |
| 2372 | + } | |
| 2373 | + }; | |
| 2374 | +} | |
| 2375 | +function getNextPageParam(options, { pages, pageParams }) { | |
| 2376 | + const lastIndex = pages.length - 1; | |
| 2377 | + return options.getNextPageParam( | |
| 2378 | + pages[lastIndex], | |
| 2379 | + pages, | |
| 2380 | + pageParams[lastIndex], | |
| 2381 | + pageParams | |
| 2382 | + ); | |
| 2383 | +} | |
| 2384 | +function getPreviousPageParam(options, { pages, pageParams }) { | |
| 2385 | + return options.getPreviousPageParam?.( | |
| 2386 | + pages[0], | |
| 2387 | + pages, | |
| 2388 | + pageParams[0], | |
| 2389 | + pageParams | |
| 2390 | + ); | |
| 2391 | +} | |
| 2392 | +function hasNextPage(options, data) { | |
| 2393 | + if (!data) | |
| 2394 | + return false; | |
| 2395 | + return getNextPageParam(options, data) != null; | |
| 2396 | +} | |
| 2397 | +function hasPreviousPage(options, data) { | |
| 2398 | + if (!data || !options.getPreviousPageParam) | |
| 2399 | + return false; | |
| 2400 | + return getPreviousPageParam(options, data) != null; | |
| 2401 | +} | |
| 2402 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2403 | +0 && (0); | |
| 2404 | +//# sourceMappingURL=infiniteQueryBehavior.cjs.map | |
| 2405 | + | |
| 2406 | +/***/ }), | |
| 2407 | + | |
| 2408 | +/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs": | |
| 2409 | +/*!***********************************************************************************!*\ | |
| 2410 | + !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***! | |
| 2411 | + \***********************************************************************************/ | |
| 2412 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2413 | + | |
| 2414 | +"use strict"; | |
| 2415 | + | |
| 2416 | +var __defProp = Object.defineProperty; | |
| 2417 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2418 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2419 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2420 | +var __export = (target, all) => { | |
| 2421 | + for (var name in all) | |
| 2422 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2423 | +}; | |
| 2424 | +var __copyProps = (to, from, except, desc) => { | |
| 2425 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2426 | + for (let key of __getOwnPropNames(from)) | |
| 2427 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2428 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2429 | + } | |
| 2430 | + return to; | |
| 2431 | +}; | |
| 2432 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2433 | + | |
| 2434 | +// src/infiniteQueryObserver.ts | |
| 2435 | +var infiniteQueryObserver_exports = {}; | |
| 2436 | +__export(infiniteQueryObserver_exports, { | |
| 2437 | + InfiniteQueryObserver: () => InfiniteQueryObserver | |
| 2438 | +}); | |
| 2439 | +module.exports = __toCommonJS(infiniteQueryObserver_exports); | |
| 2440 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 2441 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 2442 | +var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver { | |
| 2443 | + // eslint-disable-next-line @typescript-eslint/no-useless-constructor | |
| 2444 | + constructor(client, options) { | |
| 2445 | + super(client, options); | |
| 2446 | + } | |
| 2447 | + bindMethods() { | |
| 2448 | + super.bindMethods(); | |
| 2449 | + this.fetchNextPage = this.fetchNextPage.bind(this); | |
| 2450 | + this.fetchPreviousPage = this.fetchPreviousPage.bind(this); | |
| 2451 | + } | |
| 2452 | + setOptions(options, notifyOptions) { | |
| 2453 | + super.setOptions( | |
| 2454 | + { | |
| 2455 | + ...options, | |
| 2456 | + behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)() | |
| 2457 | + }, | |
| 2458 | + notifyOptions | |
| 2459 | + ); | |
| 2460 | + } | |
| 2461 | + getOptimisticResult(options) { | |
| 2462 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(); | |
| 2463 | + return super.getOptimisticResult(options); | |
| 2464 | + } | |
| 2465 | + fetchNextPage(options) { | |
| 2466 | + return this.fetch({ | |
| 2467 | + ...options, | |
| 2468 | + meta: { | |
| 2469 | + fetchMore: { direction: "forward" } | |
| 2470 | + } | |
| 2471 | + }); | |
| 2472 | + } | |
| 2473 | + fetchPreviousPage(options) { | |
| 2474 | + return this.fetch({ | |
| 2475 | + ...options, | |
| 2476 | + meta: { | |
| 2477 | + fetchMore: { direction: "backward" } | |
| 2478 | + } | |
| 2479 | + }); | |
| 2480 | + } | |
| 2481 | + createResult(query, options) { | |
| 2482 | + const { state } = query; | |
| 2483 | + const result = super.createResult(query, options); | |
| 2484 | + const { isFetching, isRefetching } = result; | |
| 2485 | + const isFetchingNextPage = isFetching && state.fetchMeta?.fetchMore?.direction === "forward"; | |
| 2486 | + const isFetchingPreviousPage = isFetching && state.fetchMeta?.fetchMore?.direction === "backward"; | |
| 2487 | + return { | |
| 2488 | + ...result, | |
| 2489 | + fetchNextPage: this.fetchNextPage, | |
| 2490 | + fetchPreviousPage: this.fetchPreviousPage, | |
| 2491 | + hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data), | |
| 2492 | + hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data), | |
| 2493 | + isFetchingNextPage, | |
| 2494 | + isFetchingPreviousPage, | |
| 2495 | + isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage | |
| 2496 | + }; | |
| 2497 | + } | |
| 2498 | +}; | |
| 2499 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2500 | +0 && (0); | |
| 2501 | +//# sourceMappingURL=infiniteQueryObserver.cjs.map | |
| 2502 | + | |
| 2503 | +/***/ }), | |
| 2504 | + | |
| 2505 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs": | |
| 2506 | +/*!**********************************************************************!*\ | |
| 2507 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***! | |
| 2508 | + \**********************************************************************/ | |
| 2509 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2510 | + | |
| 2511 | +"use strict"; | |
| 2512 | + | |
| 2513 | +var __defProp = Object.defineProperty; | |
| 2514 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2515 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2516 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2517 | +var __export = (target, all) => { | |
| 2518 | + for (var name in all) | |
| 2519 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2520 | +}; | |
| 2521 | +var __copyProps = (to, from, except, desc) => { | |
| 2522 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2523 | + for (let key of __getOwnPropNames(from)) | |
| 2524 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2525 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2526 | + } | |
| 2527 | + return to; | |
| 2528 | +}; | |
| 2529 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2530 | + | |
| 2531 | +// src/mutation.ts | |
| 2532 | +var mutation_exports = {}; | |
| 2533 | +__export(mutation_exports, { | |
| 2534 | + Mutation: () => Mutation, | |
| 2535 | + getDefaultState: () => getDefaultState | |
| 2536 | +}); | |
| 2537 | +module.exports = __toCommonJS(mutation_exports); | |
| 2538 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 2539 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 2540 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 2541 | +var Mutation = class extends import_removable.Removable { | |
| 2542 | + constructor(config) { | |
| 2543 | + super(); | |
| 2544 | + this.mutationId = config.mutationId; | |
| 2545 | + this.#defaultOptions = config.defaultOptions; | |
| 2546 | + this.#mutationCache = config.mutationCache; | |
| 2547 | + this.#observers = []; | |
| 2548 | + this.state = config.state || getDefaultState(); | |
| 2549 | + this.setOptions(config.options); | |
| 2550 | + this.scheduleGc(); | |
| 2551 | + } | |
| 2552 | + #observers; | |
| 2553 | + #defaultOptions; | |
| 2554 | + #mutationCache; | |
| 2555 | + #retryer; | |
| 2556 | + setOptions(options) { | |
| 2557 | + this.options = { ...this.#defaultOptions, ...options }; | |
| 2558 | + this.updateGcTime(this.options.gcTime); | |
| 2559 | + } | |
| 2560 | + get meta() { | |
| 2561 | + return this.options.meta; | |
| 2562 | + } | |
| 2563 | + addObserver(observer) { | |
| 2564 | + if (!this.#observers.includes(observer)) { | |
| 2565 | + this.#observers.push(observer); | |
| 2566 | + this.clearGcTimeout(); | |
| 2567 | + this.#mutationCache.notify({ | |
| 2568 | + type: "observerAdded", | |
| 2569 | + mutation: this, | |
| 2570 | + observer | |
| 2571 | + }); | |
| 2572 | + } | |
| 2573 | + } | |
| 2574 | + removeObserver(observer) { | |
| 2575 | + this.#observers = this.#observers.filter((x) => x !== observer); | |
| 2576 | + this.scheduleGc(); | |
| 2577 | + this.#mutationCache.notify({ | |
| 2578 | + type: "observerRemoved", | |
| 2579 | + mutation: this, | |
| 2580 | + observer | |
| 2581 | + }); | |
| 2582 | + } | |
| 2583 | + optionalRemove() { | |
| 2584 | + if (!this.#observers.length) { | |
| 2585 | + if (this.state.status === "pending") { | |
| 2586 | + this.scheduleGc(); | |
| 2587 | + } else { | |
| 2588 | + this.#mutationCache.remove(this); | |
| 2589 | + } | |
| 2590 | + } | |
| 2591 | + } | |
| 2592 | + continue() { | |
| 2593 | + return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before | |
| 2594 | + this.execute(this.state.variables); | |
| 2595 | + } | |
| 2596 | + async execute(variables) { | |
| 2597 | + const executeMutation = () => { | |
| 2598 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 2599 | + fn: () => { | |
| 2600 | + if (!this.options.mutationFn) { | |
| 2601 | + return Promise.reject(new Error("No mutationFn found")); | |
| 2602 | + } | |
| 2603 | + return this.options.mutationFn(variables); | |
| 2604 | + }, | |
| 2605 | + onFail: (failureCount, error) => { | |
| 2606 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 2607 | + }, | |
| 2608 | + onPause: () => { | |
| 2609 | + this.#dispatch({ type: "pause" }); | |
| 2610 | + }, | |
| 2611 | + onContinue: () => { | |
| 2612 | + this.#dispatch({ type: "continue" }); | |
| 2613 | + }, | |
| 2614 | + retry: this.options.retry ?? 0, | |
| 2615 | + retryDelay: this.options.retryDelay, | |
| 2616 | + networkMode: this.options.networkMode | |
| 2617 | + }); | |
| 2618 | + return this.#retryer.promise; | |
| 2619 | + }; | |
| 2620 | + const restored = this.state.status === "pending"; | |
| 2118 | 2621 | try { |
| 2119 | - return m.hydrateRoot(c, h, o); | |
| 2622 | + if (!restored) { | |
| 2623 | + this.#dispatch({ type: "pending", variables }); | |
| 2624 | + await this.#mutationCache.config.onMutate?.( | |
| 2625 | + variables, | |
| 2626 | + this | |
| 2627 | + ); | |
| 2628 | + const context = await this.options.onMutate?.(variables); | |
| 2629 | + if (context !== this.state.context) { | |
| 2630 | + this.#dispatch({ | |
| 2631 | + type: "pending", | |
| 2632 | + context, | |
| 2633 | + variables | |
| 2634 | + }); | |
| 2635 | + } | |
| 2636 | + } | |
| 2637 | + const data = await executeMutation(); | |
| 2638 | + await this.#mutationCache.config.onSuccess?.( | |
| 2639 | + data, | |
| 2640 | + variables, | |
| 2641 | + this.state.context, | |
| 2642 | + this | |
| 2643 | + ); | |
| 2644 | + await this.options.onSuccess?.(data, variables, this.state.context); | |
| 2645 | + await this.#mutationCache.config.onSettled?.( | |
| 2646 | + data, | |
| 2647 | + null, | |
| 2648 | + this.state.variables, | |
| 2649 | + this.state.context, | |
| 2650 | + this | |
| 2651 | + ); | |
| 2652 | + await this.options.onSettled?.(data, null, variables, this.state.context); | |
| 2653 | + this.#dispatch({ type: "success", data }); | |
| 2654 | + return data; | |
| 2655 | + } catch (error) { | |
| 2656 | + try { | |
| 2657 | + await this.#mutationCache.config.onError?.( | |
| 2658 | + error, | |
| 2659 | + variables, | |
| 2660 | + this.state.context, | |
| 2661 | + this | |
| 2662 | + ); | |
| 2663 | + await this.options.onError?.( | |
| 2664 | + error, | |
| 2665 | + variables, | |
| 2666 | + this.state.context | |
| 2667 | + ); | |
| 2668 | + await this.#mutationCache.config.onSettled?.( | |
| 2669 | + void 0, | |
| 2670 | + error, | |
| 2671 | + this.state.variables, | |
| 2672 | + this.state.context, | |
| 2673 | + this | |
| 2674 | + ); | |
| 2675 | + await this.options.onSettled?.( | |
| 2676 | + void 0, | |
| 2677 | + error, | |
| 2678 | + variables, | |
| 2679 | + this.state.context | |
| 2680 | + ); | |
| 2681 | + throw error; | |
| 2682 | + } finally { | |
| 2683 | + this.#dispatch({ type: "error", error }); | |
| 2684 | + } | |
| 2685 | + } | |
| 2686 | + } | |
| 2687 | + #dispatch(action) { | |
| 2688 | + const reducer = (state) => { | |
| 2689 | + switch (action.type) { | |
| 2690 | + case "failed": | |
| 2691 | + return { | |
| 2692 | + ...state, | |
| 2693 | + failureCount: action.failureCount, | |
| 2694 | + failureReason: action.error | |
| 2695 | + }; | |
| 2696 | + case "pause": | |
| 2697 | + return { | |
| 2698 | + ...state, | |
| 2699 | + isPaused: true | |
| 2700 | + }; | |
| 2701 | + case "continue": | |
| 2702 | + return { | |
| 2703 | + ...state, | |
| 2704 | + isPaused: false | |
| 2705 | + }; | |
| 2706 | + case "pending": | |
| 2707 | + return { | |
| 2708 | + ...state, | |
| 2709 | + context: action.context, | |
| 2710 | + data: void 0, | |
| 2711 | + failureCount: 0, | |
| 2712 | + failureReason: null, | |
| 2713 | + error: null, | |
| 2714 | + isPaused: !(0, import_retryer.canFetch)(this.options.networkMode), | |
| 2715 | + status: "pending", | |
| 2716 | + variables: action.variables, | |
| 2717 | + submittedAt: Date.now() | |
| 2718 | + }; | |
| 2719 | + case "success": | |
| 2720 | + return { | |
| 2721 | + ...state, | |
| 2722 | + data: action.data, | |
| 2723 | + failureCount: 0, | |
| 2724 | + failureReason: null, | |
| 2725 | + error: null, | |
| 2726 | + status: "success", | |
| 2727 | + isPaused: false | |
| 2728 | + }; | |
| 2729 | + case "error": | |
| 2730 | + return { | |
| 2731 | + ...state, | |
| 2732 | + data: void 0, | |
| 2733 | + error: action.error, | |
| 2734 | + failureCount: state.failureCount + 1, | |
| 2735 | + failureReason: action.error, | |
| 2736 | + isPaused: false, | |
| 2737 | + status: "error" | |
| 2738 | + }; | |
| 2739 | + } | |
| 2740 | + }; | |
| 2741 | + this.state = reducer(this.state); | |
| 2742 | + import_notifyManager.notifyManager.batch(() => { | |
| 2743 | + this.#observers.forEach((observer) => { | |
| 2744 | + observer.onMutationUpdate(action); | |
| 2745 | + }); | |
| 2746 | + this.#mutationCache.notify({ | |
| 2747 | + mutation: this, | |
| 2748 | + type: "updated", | |
| 2749 | + action | |
| 2750 | + }); | |
| 2751 | + }); | |
| 2752 | + } | |
| 2753 | +}; | |
| 2754 | +function getDefaultState() { | |
| 2755 | + return { | |
| 2756 | + context: void 0, | |
| 2757 | + data: void 0, | |
| 2758 | + error: null, | |
| 2759 | + failureCount: 0, | |
| 2760 | + failureReason: null, | |
| 2761 | + isPaused: false, | |
| 2762 | + status: "idle", | |
| 2763 | + variables: void 0, | |
| 2764 | + submittedAt: 0 | |
| 2765 | + }; | |
| 2766 | +} | |
| 2767 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2768 | +0 && (0); | |
| 2769 | +//# sourceMappingURL=mutation.cjs.map | |
| 2770 | + | |
| 2771 | +/***/ }), | |
| 2772 | + | |
| 2773 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs": | |
| 2774 | +/*!***************************************************************************!*\ | |
| 2775 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***! | |
| 2776 | + \***************************************************************************/ | |
| 2777 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2778 | + | |
| 2779 | +"use strict"; | |
| 2780 | + | |
| 2781 | +var __defProp = Object.defineProperty; | |
| 2782 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2783 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2784 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2785 | +var __export = (target, all) => { | |
| 2786 | + for (var name in all) | |
| 2787 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2788 | +}; | |
| 2789 | +var __copyProps = (to, from, except, desc) => { | |
| 2790 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2791 | + for (let key of __getOwnPropNames(from)) | |
| 2792 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2793 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2794 | + } | |
| 2795 | + return to; | |
| 2796 | +}; | |
| 2797 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2798 | + | |
| 2799 | +// src/mutationCache.ts | |
| 2800 | +var mutationCache_exports = {}; | |
| 2801 | +__export(mutationCache_exports, { | |
| 2802 | + MutationCache: () => MutationCache | |
| 2803 | +}); | |
| 2804 | +module.exports = __toCommonJS(mutationCache_exports); | |
| 2805 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 2806 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 2807 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 2808 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 2809 | +var MutationCache = class extends import_subscribable.Subscribable { | |
| 2810 | + constructor(config = {}) { | |
| 2811 | + super(); | |
| 2812 | + this.config = config; | |
| 2813 | + this.#mutations = []; | |
| 2814 | + this.#mutationId = 0; | |
| 2815 | + } | |
| 2816 | + #mutations; | |
| 2817 | + #mutationId; | |
| 2818 | + #resuming; | |
| 2819 | + build(client, options, state) { | |
| 2820 | + const mutation = new import_mutation.Mutation({ | |
| 2821 | + mutationCache: this, | |
| 2822 | + mutationId: ++this.#mutationId, | |
| 2823 | + options: client.defaultMutationOptions(options), | |
| 2824 | + state | |
| 2825 | + }); | |
| 2826 | + this.add(mutation); | |
| 2827 | + return mutation; | |
| 2828 | + } | |
| 2829 | + add(mutation) { | |
| 2830 | + this.#mutations.push(mutation); | |
| 2831 | + this.notify({ type: "added", mutation }); | |
| 2832 | + } | |
| 2833 | + remove(mutation) { | |
| 2834 | + this.#mutations = this.#mutations.filter((x) => x !== mutation); | |
| 2835 | + this.notify({ type: "removed", mutation }); | |
| 2836 | + } | |
| 2837 | + clear() { | |
| 2838 | + import_notifyManager.notifyManager.batch(() => { | |
| 2839 | + this.#mutations.forEach((mutation) => { | |
| 2840 | + this.remove(mutation); | |
| 2841 | + }); | |
| 2842 | + }); | |
| 2843 | + } | |
| 2844 | + getAll() { | |
| 2845 | + return this.#mutations; | |
| 2846 | + } | |
| 2847 | + find(filters) { | |
| 2848 | + const defaultedFilters = { exact: true, ...filters }; | |
| 2849 | + return this.#mutations.find( | |
| 2850 | + (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation) | |
| 2851 | + ); | |
| 2852 | + } | |
| 2853 | + findAll(filters = {}) { | |
| 2854 | + return this.#mutations.filter( | |
| 2855 | + (mutation) => (0, import_utils.matchMutation)(filters, mutation) | |
| 2856 | + ); | |
| 2857 | + } | |
| 2858 | + notify(event) { | |
| 2859 | + import_notifyManager.notifyManager.batch(() => { | |
| 2860 | + this.listeners.forEach((listener) => { | |
| 2861 | + listener(event); | |
| 2862 | + }); | |
| 2863 | + }); | |
| 2864 | + } | |
| 2865 | + resumePausedMutations() { | |
| 2866 | + this.#resuming = (this.#resuming ?? Promise.resolve()).then(() => { | |
| 2867 | + const pausedMutations = this.#mutations.filter((x) => x.state.isPaused); | |
| 2868 | + return import_notifyManager.notifyManager.batch( | |
| 2869 | + () => pausedMutations.reduce( | |
| 2870 | + (promise, mutation) => promise.then(() => mutation.continue().catch(import_utils.noop)), | |
| 2871 | + Promise.resolve() | |
| 2872 | + ) | |
| 2873 | + ); | |
| 2874 | + }).then(() => { | |
| 2875 | + this.#resuming = void 0; | |
| 2876 | + }); | |
| 2877 | + return this.#resuming; | |
| 2878 | + } | |
| 2879 | +}; | |
| 2880 | +// Annotate the CommonJS export names for ESM import in node: | |
| 2881 | +0 && (0); | |
| 2882 | +//# sourceMappingURL=mutationCache.cjs.map | |
| 2883 | + | |
| 2884 | +/***/ }), | |
| 2885 | + | |
| 2886 | +/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs": | |
| 2887 | +/*!******************************************************************************!*\ | |
| 2888 | + !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***! | |
| 2889 | + \******************************************************************************/ | |
| 2890 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 2891 | + | |
| 2892 | +"use strict"; | |
| 2893 | + | |
| 2894 | +var __defProp = Object.defineProperty; | |
| 2895 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 2896 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 2897 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 2898 | +var __export = (target, all) => { | |
| 2899 | + for (var name in all) | |
| 2900 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 2901 | +}; | |
| 2902 | +var __copyProps = (to, from, except, desc) => { | |
| 2903 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 2904 | + for (let key of __getOwnPropNames(from)) | |
| 2905 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 2906 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 2907 | + } | |
| 2908 | + return to; | |
| 2909 | +}; | |
| 2910 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 2911 | + | |
| 2912 | +// src/mutationObserver.ts | |
| 2913 | +var mutationObserver_exports = {}; | |
| 2914 | +__export(mutationObserver_exports, { | |
| 2915 | + MutationObserver: () => MutationObserver | |
| 2916 | +}); | |
| 2917 | +module.exports = __toCommonJS(mutationObserver_exports); | |
| 2918 | +var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs"); | |
| 2919 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 2920 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 2921 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 2922 | +var MutationObserver = class extends import_subscribable.Subscribable { | |
| 2923 | + constructor(client, options) { | |
| 2924 | + super(); | |
| 2925 | + this.#currentResult = void 0; | |
| 2926 | + this.#client = client; | |
| 2927 | + this.setOptions(options); | |
| 2928 | + this.bindMethods(); | |
| 2929 | + this.#updateResult(); | |
| 2930 | + } | |
| 2931 | + #client; | |
| 2932 | + #currentResult; | |
| 2933 | + #currentMutation; | |
| 2934 | + #mutateOptions; | |
| 2935 | + bindMethods() { | |
| 2936 | + this.mutate = this.mutate.bind(this); | |
| 2937 | + this.reset = this.reset.bind(this); | |
| 2938 | + } | |
| 2939 | + setOptions(options) { | |
| 2940 | + const prevOptions = this.options; | |
| 2941 | + this.options = this.#client.defaultMutationOptions(options); | |
| 2942 | + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) { | |
| 2943 | + this.#client.getMutationCache().notify({ | |
| 2944 | + type: "observerOptionsUpdated", | |
| 2945 | + mutation: this.#currentMutation, | |
| 2946 | + observer: this | |
| 2947 | + }); | |
| 2948 | + } | |
| 2949 | + this.#currentMutation?.setOptions(this.options); | |
| 2950 | + } | |
| 2951 | + onUnsubscribe() { | |
| 2952 | + if (!this.hasListeners()) { | |
| 2953 | + this.#currentMutation?.removeObserver(this); | |
| 2954 | + } | |
| 2955 | + } | |
| 2956 | + onMutationUpdate(action) { | |
| 2957 | + this.#updateResult(); | |
| 2958 | + this.#notify(action); | |
| 2959 | + } | |
| 2960 | + getCurrentResult() { | |
| 2961 | + return this.#currentResult; | |
| 2962 | + } | |
| 2963 | + reset() { | |
| 2964 | + this.#currentMutation = void 0; | |
| 2965 | + this.#updateResult(); | |
| 2966 | + this.#notify(); | |
| 2967 | + } | |
| 2968 | + mutate(variables, options) { | |
| 2969 | + this.#mutateOptions = options; | |
| 2970 | + this.#currentMutation?.removeObserver(this); | |
| 2971 | + this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options); | |
| 2972 | + this.#currentMutation.addObserver(this); | |
| 2973 | + return this.#currentMutation.execute(variables); | |
| 2974 | + } | |
| 2975 | + #updateResult() { | |
| 2976 | + const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)(); | |
| 2977 | + this.#currentResult = { | |
| 2978 | + ...state, | |
| 2979 | + isPending: state.status === "pending", | |
| 2980 | + isSuccess: state.status === "success", | |
| 2981 | + isError: state.status === "error", | |
| 2982 | + isIdle: state.status === "idle", | |
| 2983 | + mutate: this.mutate, | |
| 2984 | + reset: this.reset | |
| 2985 | + }; | |
| 2986 | + } | |
| 2987 | + #notify(action) { | |
| 2988 | + import_notifyManager.notifyManager.batch(() => { | |
| 2989 | + if (this.#mutateOptions && this.hasListeners()) { | |
| 2990 | + if (action?.type === "success") { | |
| 2991 | + this.#mutateOptions.onSuccess?.( | |
| 2992 | + action.data, | |
| 2993 | + this.#currentResult.variables, | |
| 2994 | + this.#currentResult.context | |
| 2995 | + ); | |
| 2996 | + this.#mutateOptions.onSettled?.( | |
| 2997 | + action.data, | |
| 2998 | + null, | |
| 2999 | + this.#currentResult.variables, | |
| 3000 | + this.#currentResult.context | |
| 3001 | + ); | |
| 3002 | + } else if (action?.type === "error") { | |
| 3003 | + this.#mutateOptions.onError?.( | |
| 3004 | + action.error, | |
| 3005 | + this.#currentResult.variables, | |
| 3006 | + this.#currentResult.context | |
| 3007 | + ); | |
| 3008 | + this.#mutateOptions.onSettled?.( | |
| 3009 | + void 0, | |
| 3010 | + action.error, | |
| 3011 | + this.#currentResult.variables, | |
| 3012 | + this.#currentResult.context | |
| 3013 | + ); | |
| 3014 | + } | |
| 3015 | + } | |
| 3016 | + this.listeners.forEach((listener) => { | |
| 3017 | + listener(this.#currentResult); | |
| 3018 | + }); | |
| 3019 | + }); | |
| 3020 | + } | |
| 3021 | +}; | |
| 3022 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3023 | +0 && (0); | |
| 3024 | +//# sourceMappingURL=mutationObserver.cjs.map | |
| 3025 | + | |
| 3026 | +/***/ }), | |
| 3027 | + | |
| 3028 | +/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs": | |
| 3029 | +/*!***************************************************************************!*\ | |
| 3030 | + !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***! | |
| 3031 | + \***************************************************************************/ | |
| 3032 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3033 | + | |
| 3034 | +"use strict"; | |
| 3035 | + | |
| 3036 | +var __defProp = Object.defineProperty; | |
| 3037 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3038 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3039 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3040 | +var __export = (target, all) => { | |
| 3041 | + for (var name in all) | |
| 3042 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3043 | +}; | |
| 3044 | +var __copyProps = (to, from, except, desc) => { | |
| 3045 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3046 | + for (let key of __getOwnPropNames(from)) | |
| 3047 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3048 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3049 | + } | |
| 3050 | + return to; | |
| 3051 | +}; | |
| 3052 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3053 | + | |
| 3054 | +// src/notifyManager.ts | |
| 3055 | +var notifyManager_exports = {}; | |
| 3056 | +__export(notifyManager_exports, { | |
| 3057 | + createNotifyManager: () => createNotifyManager, | |
| 3058 | + notifyManager: () => notifyManager | |
| 3059 | +}); | |
| 3060 | +module.exports = __toCommonJS(notifyManager_exports); | |
| 3061 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3062 | +function createNotifyManager() { | |
| 3063 | + let queue = []; | |
| 3064 | + let transactions = 0; | |
| 3065 | + let notifyFn = (callback) => { | |
| 3066 | + callback(); | |
| 3067 | + }; | |
| 3068 | + let batchNotifyFn = (callback) => { | |
| 3069 | + callback(); | |
| 3070 | + }; | |
| 3071 | + const batch = (callback) => { | |
| 3072 | + let result; | |
| 3073 | + transactions++; | |
| 3074 | + try { | |
| 3075 | + result = callback(); | |
| 2120 | 3076 | } finally { |
| 2121 | - i.usingClientEntryPoint = false; | |
| 3077 | + transactions--; | |
| 3078 | + if (!transactions) { | |
| 3079 | + flush(); | |
| 3080 | + } | |
| 2122 | 3081 | } |
| 3082 | + return result; | |
| 2123 | 3083 | }; |
| 3084 | + const schedule = (callback) => { | |
| 3085 | + if (transactions) { | |
| 3086 | + queue.push(callback); | |
| 3087 | + } else { | |
| 3088 | + (0, import_utils.scheduleMicrotask)(() => { | |
| 3089 | + notifyFn(callback); | |
| 3090 | + }); | |
| 3091 | + } | |
| 3092 | + }; | |
| 3093 | + const batchCalls = (callback) => { | |
| 3094 | + return (...args) => { | |
| 3095 | + schedule(() => { | |
| 3096 | + callback(...args); | |
| 3097 | + }); | |
| 3098 | + }; | |
| 3099 | + }; | |
| 3100 | + const flush = () => { | |
| 3101 | + const originalQueue = queue; | |
| 3102 | + queue = []; | |
| 3103 | + if (originalQueue.length) { | |
| 3104 | + (0, import_utils.scheduleMicrotask)(() => { | |
| 3105 | + batchNotifyFn(() => { | |
| 3106 | + originalQueue.forEach((callback) => { | |
| 3107 | + notifyFn(callback); | |
| 3108 | + }); | |
| 3109 | + }); | |
| 3110 | + }); | |
| 3111 | + } | |
| 3112 | + }; | |
| 3113 | + const setNotifyFunction = (fn) => { | |
| 3114 | + notifyFn = fn; | |
| 3115 | + }; | |
| 3116 | + const setBatchNotifyFunction = (fn) => { | |
| 3117 | + batchNotifyFn = fn; | |
| 3118 | + }; | |
| 3119 | + return { | |
| 3120 | + batch, | |
| 3121 | + batchCalls, | |
| 3122 | + schedule, | |
| 3123 | + setNotifyFunction, | |
| 3124 | + setBatchNotifyFunction | |
| 3125 | + }; | |
| 2124 | 3126 | } |
| 3127 | +var notifyManager = createNotifyManager(); | |
| 3128 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3129 | +0 && (0); | |
| 3130 | +//# sourceMappingURL=notifyManager.cjs.map | |
| 2125 | 3131 | |
| 3132 | +/***/ }), | |
| 2126 | 3133 | |
| 3134 | +/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs": | |
| 3135 | +/*!***************************************************************************!*\ | |
| 3136 | + !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***! | |
| 3137 | + \***************************************************************************/ | |
| 3138 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3139 | + | |
| 3140 | +"use strict"; | |
| 3141 | + | |
| 3142 | +var __defProp = Object.defineProperty; | |
| 3143 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3144 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3145 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3146 | +var __export = (target, all) => { | |
| 3147 | + for (var name in all) | |
| 3148 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3149 | +}; | |
| 3150 | +var __copyProps = (to, from, except, desc) => { | |
| 3151 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3152 | + for (let key of __getOwnPropNames(from)) | |
| 3153 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3154 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3155 | + } | |
| 3156 | + return to; | |
| 3157 | +}; | |
| 3158 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3159 | + | |
| 3160 | +// src/onlineManager.ts | |
| 3161 | +var onlineManager_exports = {}; | |
| 3162 | +__export(onlineManager_exports, { | |
| 3163 | + OnlineManager: () => OnlineManager, | |
| 3164 | + onlineManager: () => onlineManager | |
| 3165 | +}); | |
| 3166 | +module.exports = __toCommonJS(onlineManager_exports); | |
| 3167 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 3168 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3169 | +var OnlineManager = class extends import_subscribable.Subscribable { | |
| 3170 | + #online = true; | |
| 3171 | + #cleanup; | |
| 3172 | + #setup; | |
| 3173 | + constructor() { | |
| 3174 | + super(); | |
| 3175 | + this.#setup = (onOnline) => { | |
| 3176 | + if (!import_utils.isServer && window.addEventListener) { | |
| 3177 | + const onlineListener = () => onOnline(true); | |
| 3178 | + const offlineListener = () => onOnline(false); | |
| 3179 | + window.addEventListener("online", onlineListener, false); | |
| 3180 | + window.addEventListener("offline", offlineListener, false); | |
| 3181 | + return () => { | |
| 3182 | + window.removeEventListener("online", onlineListener); | |
| 3183 | + window.removeEventListener("offline", offlineListener); | |
| 3184 | + }; | |
| 3185 | + } | |
| 3186 | + return; | |
| 3187 | + }; | |
| 3188 | + } | |
| 3189 | + onSubscribe() { | |
| 3190 | + if (!this.#cleanup) { | |
| 3191 | + this.setEventListener(this.#setup); | |
| 3192 | + } | |
| 3193 | + } | |
| 3194 | + onUnsubscribe() { | |
| 3195 | + if (!this.hasListeners()) { | |
| 3196 | + this.#cleanup?.(); | |
| 3197 | + this.#cleanup = void 0; | |
| 3198 | + } | |
| 3199 | + } | |
| 3200 | + setEventListener(setup) { | |
| 3201 | + this.#setup = setup; | |
| 3202 | + this.#cleanup?.(); | |
| 3203 | + this.#cleanup = setup(this.setOnline.bind(this)); | |
| 3204 | + } | |
| 3205 | + setOnline(online) { | |
| 3206 | + const changed = this.#online !== online; | |
| 3207 | + if (changed) { | |
| 3208 | + this.#online = online; | |
| 3209 | + this.listeners.forEach((listener) => { | |
| 3210 | + listener(online); | |
| 3211 | + }); | |
| 3212 | + } | |
| 3213 | + } | |
| 3214 | + isOnline() { | |
| 3215 | + return this.#online; | |
| 3216 | + } | |
| 3217 | +}; | |
| 3218 | +var onlineManager = new OnlineManager(); | |
| 3219 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3220 | +0 && (0); | |
| 3221 | +//# sourceMappingURL=onlineManager.cjs.map | |
| 3222 | + | |
| 2127 | 3223 | /***/ }), |
| 2128 | 3224 | |
| 2129 | -/***/ "@elementor/editor-app-bar": | |
| 2130 | -/*!*******************************************!*\ | |
| 2131 | - !*** external "elementorV2.editorAppBar" ***! | |
| 2132 | - \*******************************************/ | |
| 3225 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs": | |
| 3226 | +/*!*****************************************************************************!*\ | |
| 3227 | + !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***! | |
| 3228 | + \*****************************************************************************/ | |
| 3229 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3230 | + | |
| 3231 | +"use strict"; | |
| 3232 | + | |
| 3233 | +var __defProp = Object.defineProperty; | |
| 3234 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3235 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3236 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3237 | +var __export = (target, all) => { | |
| 3238 | + for (var name in all) | |
| 3239 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3240 | +}; | |
| 3241 | +var __copyProps = (to, from, except, desc) => { | |
| 3242 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3243 | + for (let key of __getOwnPropNames(from)) | |
| 3244 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3245 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3246 | + } | |
| 3247 | + return to; | |
| 3248 | +}; | |
| 3249 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3250 | + | |
| 3251 | +// src/queriesObserver.ts | |
| 3252 | +var queriesObserver_exports = {}; | |
| 3253 | +__export(queriesObserver_exports, { | |
| 3254 | + QueriesObserver: () => QueriesObserver | |
| 3255 | +}); | |
| 3256 | +module.exports = __toCommonJS(queriesObserver_exports); | |
| 3257 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 3258 | +var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs"); | |
| 3259 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 3260 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3261 | +function difference(array1, array2) { | |
| 3262 | + return array1.filter((x) => !array2.includes(x)); | |
| 3263 | +} | |
| 3264 | +function replaceAt(array, index, value) { | |
| 3265 | + const copy = array.slice(0); | |
| 3266 | + copy[index] = value; | |
| 3267 | + return copy; | |
| 3268 | +} | |
| 3269 | +var QueriesObserver = class extends import_subscribable.Subscribable { | |
| 3270 | + #client; | |
| 3271 | + #result; | |
| 3272 | + #queries; | |
| 3273 | + #observers; | |
| 3274 | + #options; | |
| 3275 | + #combinedResult; | |
| 3276 | + constructor(client, queries, options) { | |
| 3277 | + super(); | |
| 3278 | + this.#client = client; | |
| 3279 | + this.#queries = []; | |
| 3280 | + this.#observers = []; | |
| 3281 | + this.#setResult([]); | |
| 3282 | + this.setQueries(queries, options); | |
| 3283 | + } | |
| 3284 | + #setResult(value) { | |
| 3285 | + this.#result = value; | |
| 3286 | + this.#combinedResult = this.#combineResult(value); | |
| 3287 | + } | |
| 3288 | + onSubscribe() { | |
| 3289 | + if (this.listeners.size === 1) { | |
| 3290 | + this.#observers.forEach((observer) => { | |
| 3291 | + observer.subscribe((result) => { | |
| 3292 | + this.#onUpdate(observer, result); | |
| 3293 | + }); | |
| 3294 | + }); | |
| 3295 | + } | |
| 3296 | + } | |
| 3297 | + onUnsubscribe() { | |
| 3298 | + if (!this.listeners.size) { | |
| 3299 | + this.destroy(); | |
| 3300 | + } | |
| 3301 | + } | |
| 3302 | + destroy() { | |
| 3303 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 3304 | + this.#observers.forEach((observer) => { | |
| 3305 | + observer.destroy(); | |
| 3306 | + }); | |
| 3307 | + } | |
| 3308 | + setQueries(queries, options, notifyOptions) { | |
| 3309 | + this.#queries = queries; | |
| 3310 | + this.#options = options; | |
| 3311 | + import_notifyManager.notifyManager.batch(() => { | |
| 3312 | + const prevObservers = this.#observers; | |
| 3313 | + const newObserverMatches = this.#findMatchingObservers(this.#queries); | |
| 3314 | + newObserverMatches.forEach( | |
| 3315 | + (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions) | |
| 3316 | + ); | |
| 3317 | + const newObservers = newObserverMatches.map((match) => match.observer); | |
| 3318 | + const newResult = newObservers.map( | |
| 3319 | + (observer) => observer.getCurrentResult() | |
| 3320 | + ); | |
| 3321 | + const hasIndexChange = newObservers.some( | |
| 3322 | + (observer, index) => observer !== prevObservers[index] | |
| 3323 | + ); | |
| 3324 | + if (prevObservers.length === newObservers.length && !hasIndexChange) { | |
| 3325 | + return; | |
| 3326 | + } | |
| 3327 | + this.#observers = newObservers; | |
| 3328 | + this.#setResult(newResult); | |
| 3329 | + if (!this.hasListeners()) { | |
| 3330 | + return; | |
| 3331 | + } | |
| 3332 | + difference(prevObservers, newObservers).forEach((observer) => { | |
| 3333 | + observer.destroy(); | |
| 3334 | + }); | |
| 3335 | + difference(newObservers, prevObservers).forEach((observer) => { | |
| 3336 | + observer.subscribe((result) => { | |
| 3337 | + this.#onUpdate(observer, result); | |
| 3338 | + }); | |
| 3339 | + }); | |
| 3340 | + this.#notify(); | |
| 3341 | + }); | |
| 3342 | + } | |
| 3343 | + getCurrentResult() { | |
| 3344 | + return this.#combinedResult; | |
| 3345 | + } | |
| 3346 | + getQueries() { | |
| 3347 | + return this.#observers.map((observer) => observer.getCurrentQuery()); | |
| 3348 | + } | |
| 3349 | + getObservers() { | |
| 3350 | + return this.#observers; | |
| 3351 | + } | |
| 3352 | + getOptimisticResult(queries) { | |
| 3353 | + const matches = this.#findMatchingObservers(queries); | |
| 3354 | + const result = matches.map( | |
| 3355 | + (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions) | |
| 3356 | + ); | |
| 3357 | + return [ | |
| 3358 | + result, | |
| 3359 | + (r) => { | |
| 3360 | + return this.#combineResult(r ?? result); | |
| 3361 | + }, | |
| 3362 | + () => { | |
| 3363 | + return matches.map((match, index) => { | |
| 3364 | + const observerResult = result[index]; | |
| 3365 | + return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult) : observerResult; | |
| 3366 | + }); | |
| 3367 | + } | |
| 3368 | + ]; | |
| 3369 | + } | |
| 3370 | + #combineResult(input) { | |
| 3371 | + const combine = this.#options?.combine; | |
| 3372 | + if (combine) { | |
| 3373 | + return (0, import_utils.replaceEqualDeep)(this.#combinedResult, combine(input)); | |
| 3374 | + } | |
| 3375 | + return input; | |
| 3376 | + } | |
| 3377 | + #findMatchingObservers(queries) { | |
| 3378 | + const prevObservers = this.#observers; | |
| 3379 | + const prevObserversMap = new Map( | |
| 3380 | + prevObservers.map((observer) => [observer.options.queryHash, observer]) | |
| 3381 | + ); | |
| 3382 | + const defaultedQueryOptions = queries.map( | |
| 3383 | + (options) => this.#client.defaultQueryOptions(options) | |
| 3384 | + ); | |
| 3385 | + const matchingObservers = defaultedQueryOptions.flatMap((defaultedOptions) => { | |
| 3386 | + const match = prevObserversMap.get(defaultedOptions.queryHash); | |
| 3387 | + if (match != null) { | |
| 3388 | + return [{ defaultedQueryOptions: defaultedOptions, observer: match }]; | |
| 3389 | + } | |
| 3390 | + return []; | |
| 3391 | + }); | |
| 3392 | + const matchedQueryHashes = new Set( | |
| 3393 | + matchingObservers.map((match) => match.defaultedQueryOptions.queryHash) | |
| 3394 | + ); | |
| 3395 | + const unmatchedQueries = defaultedQueryOptions.filter( | |
| 3396 | + (defaultedOptions) => !matchedQueryHashes.has(defaultedOptions.queryHash) | |
| 3397 | + ); | |
| 3398 | + const getObserver = (options) => { | |
| 3399 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 3400 | + const currentObserver = this.#observers.find( | |
| 3401 | + (o) => o.options.queryHash === defaultedOptions.queryHash | |
| 3402 | + ); | |
| 3403 | + return currentObserver ?? new import_queryObserver.QueryObserver(this.#client, defaultedOptions); | |
| 3404 | + }; | |
| 3405 | + const newOrReusedObservers = unmatchedQueries.map((options) => { | |
| 3406 | + return { | |
| 3407 | + defaultedQueryOptions: options, | |
| 3408 | + observer: getObserver(options) | |
| 3409 | + }; | |
| 3410 | + }); | |
| 3411 | + const sortMatchesByOrderOfQueries = (a, b) => defaultedQueryOptions.indexOf(a.defaultedQueryOptions) - defaultedQueryOptions.indexOf(b.defaultedQueryOptions); | |
| 3412 | + return matchingObservers.concat(newOrReusedObservers).sort(sortMatchesByOrderOfQueries); | |
| 3413 | + } | |
| 3414 | + #onUpdate(observer, result) { | |
| 3415 | + const index = this.#observers.indexOf(observer); | |
| 3416 | + if (index !== -1) { | |
| 3417 | + this.#setResult(replaceAt(this.#result, index, result)); | |
| 3418 | + this.#notify(); | |
| 3419 | + } | |
| 3420 | + } | |
| 3421 | + #notify() { | |
| 3422 | + import_notifyManager.notifyManager.batch(() => { | |
| 3423 | + this.listeners.forEach((listener) => { | |
| 3424 | + listener(this.#result); | |
| 3425 | + }); | |
| 3426 | + }); | |
| 3427 | + } | |
| 3428 | +}; | |
| 3429 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3430 | +0 && (0); | |
| 3431 | +//# sourceMappingURL=queriesObserver.cjs.map | |
| 3432 | + | |
| 3433 | +/***/ }), | |
| 3434 | + | |
| 3435 | +/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs": | |
| 3436 | +/*!*******************************************************************!*\ | |
| 3437 | + !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***! | |
| 3438 | + \*******************************************************************/ | |
| 3439 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3440 | + | |
| 3441 | +"use strict"; | |
| 3442 | + | |
| 3443 | +var __defProp = Object.defineProperty; | |
| 3444 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3445 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3446 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3447 | +var __export = (target, all) => { | |
| 3448 | + for (var name in all) | |
| 3449 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3450 | +}; | |
| 3451 | +var __copyProps = (to, from, except, desc) => { | |
| 3452 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3453 | + for (let key of __getOwnPropNames(from)) | |
| 3454 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3455 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3456 | + } | |
| 3457 | + return to; | |
| 3458 | +}; | |
| 3459 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3460 | + | |
| 3461 | +// src/query.ts | |
| 3462 | +var query_exports = {}; | |
| 3463 | +__export(query_exports, { | |
| 3464 | + Query: () => Query | |
| 3465 | +}); | |
| 3466 | +module.exports = __toCommonJS(query_exports); | |
| 3467 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3468 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 3469 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 3470 | +var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs"); | |
| 3471 | +var Query = class extends import_removable.Removable { | |
| 3472 | + constructor(config) { | |
| 3473 | + super(); | |
| 3474 | + this.#abortSignalConsumed = false; | |
| 3475 | + this.#defaultOptions = config.defaultOptions; | |
| 3476 | + this.#setOptions(config.options); | |
| 3477 | + this.#observers = []; | |
| 3478 | + this.#cache = config.cache; | |
| 3479 | + this.queryKey = config.queryKey; | |
| 3480 | + this.queryHash = config.queryHash; | |
| 3481 | + this.#initialState = config.state || getDefaultState(this.options); | |
| 3482 | + this.state = this.#initialState; | |
| 3483 | + this.scheduleGc(); | |
| 3484 | + } | |
| 3485 | + #initialState; | |
| 3486 | + #revertState; | |
| 3487 | + #cache; | |
| 3488 | + #promise; | |
| 3489 | + #retryer; | |
| 3490 | + #observers; | |
| 3491 | + #defaultOptions; | |
| 3492 | + #abortSignalConsumed; | |
| 3493 | + get meta() { | |
| 3494 | + return this.options.meta; | |
| 3495 | + } | |
| 3496 | + #setOptions(options) { | |
| 3497 | + this.options = { ...this.#defaultOptions, ...options }; | |
| 3498 | + this.updateGcTime(this.options.gcTime); | |
| 3499 | + } | |
| 3500 | + optionalRemove() { | |
| 3501 | + if (!this.#observers.length && this.state.fetchStatus === "idle") { | |
| 3502 | + this.#cache.remove(this); | |
| 3503 | + } | |
| 3504 | + } | |
| 3505 | + setData(newData, options) { | |
| 3506 | + const data = (0, import_utils.replaceData)(this.state.data, newData, this.options); | |
| 3507 | + this.#dispatch({ | |
| 3508 | + data, | |
| 3509 | + type: "success", | |
| 3510 | + dataUpdatedAt: options?.updatedAt, | |
| 3511 | + manual: options?.manual | |
| 3512 | + }); | |
| 3513 | + return data; | |
| 3514 | + } | |
| 3515 | + setState(state, setStateOptions) { | |
| 3516 | + this.#dispatch({ type: "setState", state, setStateOptions }); | |
| 3517 | + } | |
| 3518 | + cancel(options) { | |
| 3519 | + const promise = this.#promise; | |
| 3520 | + this.#retryer?.cancel(options); | |
| 3521 | + return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve(); | |
| 3522 | + } | |
| 3523 | + destroy() { | |
| 3524 | + super.destroy(); | |
| 3525 | + this.cancel({ silent: true }); | |
| 3526 | + } | |
| 3527 | + reset() { | |
| 3528 | + this.destroy(); | |
| 3529 | + this.setState(this.#initialState); | |
| 3530 | + } | |
| 3531 | + isActive() { | |
| 3532 | + return this.#observers.some( | |
| 3533 | + (observer) => observer.options.enabled !== false | |
| 3534 | + ); | |
| 3535 | + } | |
| 3536 | + isDisabled() { | |
| 3537 | + return this.getObserversCount() > 0 && !this.isActive(); | |
| 3538 | + } | |
| 3539 | + isStale() { | |
| 3540 | + return this.state.isInvalidated || !this.state.dataUpdatedAt || this.#observers.some((observer) => observer.getCurrentResult().isStale); | |
| 3541 | + } | |
| 3542 | + isStaleByTime(staleTime = 0) { | |
| 3543 | + return this.state.isInvalidated || !this.state.dataUpdatedAt || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime); | |
| 3544 | + } | |
| 3545 | + onFocus() { | |
| 3546 | + const observer = this.#observers.find((x) => x.shouldFetchOnWindowFocus()); | |
| 3547 | + observer?.refetch({ cancelRefetch: false }); | |
| 3548 | + this.#retryer?.continue(); | |
| 3549 | + } | |
| 3550 | + onOnline() { | |
| 3551 | + const observer = this.#observers.find((x) => x.shouldFetchOnReconnect()); | |
| 3552 | + observer?.refetch({ cancelRefetch: false }); | |
| 3553 | + this.#retryer?.continue(); | |
| 3554 | + } | |
| 3555 | + addObserver(observer) { | |
| 3556 | + if (!this.#observers.includes(observer)) { | |
| 3557 | + this.#observers.push(observer); | |
| 3558 | + this.clearGcTimeout(); | |
| 3559 | + this.#cache.notify({ type: "observerAdded", query: this, observer }); | |
| 3560 | + } | |
| 3561 | + } | |
| 3562 | + removeObserver(observer) { | |
| 3563 | + if (this.#observers.includes(observer)) { | |
| 3564 | + this.#observers = this.#observers.filter((x) => x !== observer); | |
| 3565 | + if (!this.#observers.length) { | |
| 3566 | + if (this.#retryer) { | |
| 3567 | + if (this.#abortSignalConsumed) { | |
| 3568 | + this.#retryer.cancel({ revert: true }); | |
| 3569 | + } else { | |
| 3570 | + this.#retryer.cancelRetry(); | |
| 3571 | + } | |
| 3572 | + } | |
| 3573 | + this.scheduleGc(); | |
| 3574 | + } | |
| 3575 | + this.#cache.notify({ type: "observerRemoved", query: this, observer }); | |
| 3576 | + } | |
| 3577 | + } | |
| 3578 | + getObserversCount() { | |
| 3579 | + return this.#observers.length; | |
| 3580 | + } | |
| 3581 | + invalidate() { | |
| 3582 | + if (!this.state.isInvalidated) { | |
| 3583 | + this.#dispatch({ type: "invalidate" }); | |
| 3584 | + } | |
| 3585 | + } | |
| 3586 | + fetch(options, fetchOptions) { | |
| 3587 | + if (this.state.fetchStatus !== "idle") { | |
| 3588 | + if (this.state.dataUpdatedAt && fetchOptions?.cancelRefetch) { | |
| 3589 | + this.cancel({ silent: true }); | |
| 3590 | + } else if (this.#promise) { | |
| 3591 | + this.#retryer?.continueRetry(); | |
| 3592 | + return this.#promise; | |
| 3593 | + } | |
| 3594 | + } | |
| 3595 | + if (options) { | |
| 3596 | + this.#setOptions(options); | |
| 3597 | + } | |
| 3598 | + if (!this.options.queryFn) { | |
| 3599 | + const observer = this.#observers.find((x) => x.options.queryFn); | |
| 3600 | + if (observer) { | |
| 3601 | + this.#setOptions(observer.options); | |
| 3602 | + } | |
| 3603 | + } | |
| 3604 | + if (true) { | |
| 3605 | + if (!Array.isArray(this.options.queryKey)) { | |
| 3606 | + console.error( | |
| 3607 | + `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']` | |
| 3608 | + ); | |
| 3609 | + } | |
| 3610 | + } | |
| 3611 | + const abortController = new AbortController(); | |
| 3612 | + const queryFnContext = { | |
| 3613 | + queryKey: this.queryKey, | |
| 3614 | + meta: this.meta | |
| 3615 | + }; | |
| 3616 | + const addSignalProperty = (object) => { | |
| 3617 | + Object.defineProperty(object, "signal", { | |
| 3618 | + enumerable: true, | |
| 3619 | + get: () => { | |
| 3620 | + this.#abortSignalConsumed = true; | |
| 3621 | + return abortController.signal; | |
| 3622 | + } | |
| 3623 | + }); | |
| 3624 | + }; | |
| 3625 | + addSignalProperty(queryFnContext); | |
| 3626 | + const fetchFn = () => { | |
| 3627 | + if (!this.options.queryFn) { | |
| 3628 | + return Promise.reject( | |
| 3629 | + new Error(`Missing queryFn: '${this.options.queryHash}'`) | |
| 3630 | + ); | |
| 3631 | + } | |
| 3632 | + this.#abortSignalConsumed = false; | |
| 3633 | + if (this.options.persister) { | |
| 3634 | + return this.options.persister( | |
| 3635 | + this.options.queryFn, | |
| 3636 | + queryFnContext, | |
| 3637 | + this | |
| 3638 | + ); | |
| 3639 | + } | |
| 3640 | + return this.options.queryFn( | |
| 3641 | + queryFnContext | |
| 3642 | + ); | |
| 3643 | + }; | |
| 3644 | + const context = { | |
| 3645 | + fetchOptions, | |
| 3646 | + options: this.options, | |
| 3647 | + queryKey: this.queryKey, | |
| 3648 | + state: this.state, | |
| 3649 | + fetchFn | |
| 3650 | + }; | |
| 3651 | + addSignalProperty(context); | |
| 3652 | + this.options.behavior?.onFetch( | |
| 3653 | + context, | |
| 3654 | + this | |
| 3655 | + ); | |
| 3656 | + this.#revertState = this.state; | |
| 3657 | + if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) { | |
| 3658 | + this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta }); | |
| 3659 | + } | |
| 3660 | + const onError = (error) => { | |
| 3661 | + if (!((0, import_retryer.isCancelledError)(error) && error.silent)) { | |
| 3662 | + this.#dispatch({ | |
| 3663 | + type: "error", | |
| 3664 | + error | |
| 3665 | + }); | |
| 3666 | + } | |
| 3667 | + if (!(0, import_retryer.isCancelledError)(error)) { | |
| 3668 | + this.#cache.config.onError?.( | |
| 3669 | + error, | |
| 3670 | + this | |
| 3671 | + ); | |
| 3672 | + this.#cache.config.onSettled?.( | |
| 3673 | + this.state.data, | |
| 3674 | + error, | |
| 3675 | + this | |
| 3676 | + ); | |
| 3677 | + } | |
| 3678 | + if (!this.isFetchingOptimistic) { | |
| 3679 | + this.scheduleGc(); | |
| 3680 | + } | |
| 3681 | + this.isFetchingOptimistic = false; | |
| 3682 | + }; | |
| 3683 | + this.#retryer = (0, import_retryer.createRetryer)({ | |
| 3684 | + fn: context.fetchFn, | |
| 3685 | + abort: abortController.abort.bind(abortController), | |
| 3686 | + onSuccess: (data) => { | |
| 3687 | + if (typeof data === "undefined") { | |
| 3688 | + if (true) { | |
| 3689 | + console.error( | |
| 3690 | + `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}` | |
| 3691 | + ); | |
| 3692 | + } | |
| 3693 | + onError(new Error(`${this.queryHash} data is undefined`)); | |
| 3694 | + return; | |
| 3695 | + } | |
| 3696 | + this.setData(data); | |
| 3697 | + this.#cache.config.onSuccess?.(data, this); | |
| 3698 | + this.#cache.config.onSettled?.( | |
| 3699 | + data, | |
| 3700 | + this.state.error, | |
| 3701 | + this | |
| 3702 | + ); | |
| 3703 | + if (!this.isFetchingOptimistic) { | |
| 3704 | + this.scheduleGc(); | |
| 3705 | + } | |
| 3706 | + this.isFetchingOptimistic = false; | |
| 3707 | + }, | |
| 3708 | + onError, | |
| 3709 | + onFail: (failureCount, error) => { | |
| 3710 | + this.#dispatch({ type: "failed", failureCount, error }); | |
| 3711 | + }, | |
| 3712 | + onPause: () => { | |
| 3713 | + this.#dispatch({ type: "pause" }); | |
| 3714 | + }, | |
| 3715 | + onContinue: () => { | |
| 3716 | + this.#dispatch({ type: "continue" }); | |
| 3717 | + }, | |
| 3718 | + retry: context.options.retry, | |
| 3719 | + retryDelay: context.options.retryDelay, | |
| 3720 | + networkMode: context.options.networkMode | |
| 3721 | + }); | |
| 3722 | + this.#promise = this.#retryer.promise; | |
| 3723 | + return this.#promise; | |
| 3724 | + } | |
| 3725 | + #dispatch(action) { | |
| 3726 | + const reducer = (state) => { | |
| 3727 | + switch (action.type) { | |
| 3728 | + case "failed": | |
| 3729 | + return { | |
| 3730 | + ...state, | |
| 3731 | + fetchFailureCount: action.failureCount, | |
| 3732 | + fetchFailureReason: action.error | |
| 3733 | + }; | |
| 3734 | + case "pause": | |
| 3735 | + return { | |
| 3736 | + ...state, | |
| 3737 | + fetchStatus: "paused" | |
| 3738 | + }; | |
| 3739 | + case "continue": | |
| 3740 | + return { | |
| 3741 | + ...state, | |
| 3742 | + fetchStatus: "fetching" | |
| 3743 | + }; | |
| 3744 | + case "fetch": | |
| 3745 | + return { | |
| 3746 | + ...state, | |
| 3747 | + fetchFailureCount: 0, | |
| 3748 | + fetchFailureReason: null, | |
| 3749 | + fetchMeta: action.meta ?? null, | |
| 3750 | + fetchStatus: (0, import_retryer.canFetch)(this.options.networkMode) ? "fetching" : "paused", | |
| 3751 | + ...!state.dataUpdatedAt && { | |
| 3752 | + error: null, | |
| 3753 | + status: "pending" | |
| 3754 | + } | |
| 3755 | + }; | |
| 3756 | + case "success": | |
| 3757 | + return { | |
| 3758 | + ...state, | |
| 3759 | + data: action.data, | |
| 3760 | + dataUpdateCount: state.dataUpdateCount + 1, | |
| 3761 | + dataUpdatedAt: action.dataUpdatedAt ?? Date.now(), | |
| 3762 | + error: null, | |
| 3763 | + isInvalidated: false, | |
| 3764 | + status: "success", | |
| 3765 | + ...!action.manual && { | |
| 3766 | + fetchStatus: "idle", | |
| 3767 | + fetchFailureCount: 0, | |
| 3768 | + fetchFailureReason: null | |
| 3769 | + } | |
| 3770 | + }; | |
| 3771 | + case "error": | |
| 3772 | + const error = action.error; | |
| 3773 | + if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) { | |
| 3774 | + return { ...this.#revertState, fetchStatus: "idle" }; | |
| 3775 | + } | |
| 3776 | + return { | |
| 3777 | + ...state, | |
| 3778 | + error, | |
| 3779 | + errorUpdateCount: state.errorUpdateCount + 1, | |
| 3780 | + errorUpdatedAt: Date.now(), | |
| 3781 | + fetchFailureCount: state.fetchFailureCount + 1, | |
| 3782 | + fetchFailureReason: error, | |
| 3783 | + fetchStatus: "idle", | |
| 3784 | + status: "error" | |
| 3785 | + }; | |
| 3786 | + case "invalidate": | |
| 3787 | + return { | |
| 3788 | + ...state, | |
| 3789 | + isInvalidated: true | |
| 3790 | + }; | |
| 3791 | + case "setState": | |
| 3792 | + return { | |
| 3793 | + ...state, | |
| 3794 | + ...action.state | |
| 3795 | + }; | |
| 3796 | + } | |
| 3797 | + }; | |
| 3798 | + this.state = reducer(this.state); | |
| 3799 | + import_notifyManager.notifyManager.batch(() => { | |
| 3800 | + this.#observers.forEach((observer) => { | |
| 3801 | + observer.onQueryUpdate(); | |
| 3802 | + }); | |
| 3803 | + this.#cache.notify({ query: this, type: "updated", action }); | |
| 3804 | + }); | |
| 3805 | + } | |
| 3806 | +}; | |
| 3807 | +function getDefaultState(options) { | |
| 3808 | + const data = typeof options.initialData === "function" ? options.initialData() : options.initialData; | |
| 3809 | + const hasData = typeof data !== "undefined"; | |
| 3810 | + const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0; | |
| 3811 | + return { | |
| 3812 | + data, | |
| 3813 | + dataUpdateCount: 0, | |
| 3814 | + dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0, | |
| 3815 | + error: null, | |
| 3816 | + errorUpdateCount: 0, | |
| 3817 | + errorUpdatedAt: 0, | |
| 3818 | + fetchFailureCount: 0, | |
| 3819 | + fetchFailureReason: null, | |
| 3820 | + fetchMeta: null, | |
| 3821 | + isInvalidated: false, | |
| 3822 | + status: hasData ? "success" : "pending", | |
| 3823 | + fetchStatus: "idle" | |
| 3824 | + }; | |
| 3825 | +} | |
| 3826 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3827 | +0 && (0); | |
| 3828 | +//# sourceMappingURL=query.cjs.map | |
| 3829 | + | |
| 3830 | +/***/ }), | |
| 3831 | + | |
| 3832 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs": | |
| 3833 | +/*!************************************************************************!*\ | |
| 3834 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***! | |
| 3835 | + \************************************************************************/ | |
| 3836 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3837 | + | |
| 3838 | +"use strict"; | |
| 3839 | + | |
| 3840 | +var __defProp = Object.defineProperty; | |
| 3841 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3842 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3843 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3844 | +var __export = (target, all) => { | |
| 3845 | + for (var name in all) | |
| 3846 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3847 | +}; | |
| 3848 | +var __copyProps = (to, from, except, desc) => { | |
| 3849 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3850 | + for (let key of __getOwnPropNames(from)) | |
| 3851 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3852 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3853 | + } | |
| 3854 | + return to; | |
| 3855 | +}; | |
| 3856 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3857 | + | |
| 3858 | +// src/queryCache.ts | |
| 3859 | +var queryCache_exports = {}; | |
| 3860 | +__export(queryCache_exports, { | |
| 3861 | + QueryCache: () => QueryCache | |
| 3862 | +}); | |
| 3863 | +module.exports = __toCommonJS(queryCache_exports); | |
| 3864 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3865 | +var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs"); | |
| 3866 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 3867 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 3868 | +var QueryCache = class extends import_subscribable.Subscribable { | |
| 3869 | + constructor(config = {}) { | |
| 3870 | + super(); | |
| 3871 | + this.config = config; | |
| 3872 | + this.#queries = /* @__PURE__ */ new Map(); | |
| 3873 | + } | |
| 3874 | + #queries; | |
| 3875 | + build(client, options, state) { | |
| 3876 | + const queryKey = options.queryKey; | |
| 3877 | + const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options); | |
| 3878 | + let query = this.get(queryHash); | |
| 3879 | + if (!query) { | |
| 3880 | + query = new import_query.Query({ | |
| 3881 | + cache: this, | |
| 3882 | + queryKey, | |
| 3883 | + queryHash, | |
| 3884 | + options: client.defaultQueryOptions(options), | |
| 3885 | + state, | |
| 3886 | + defaultOptions: client.getQueryDefaults(queryKey) | |
| 3887 | + }); | |
| 3888 | + this.add(query); | |
| 3889 | + } | |
| 3890 | + return query; | |
| 3891 | + } | |
| 3892 | + add(query) { | |
| 3893 | + if (!this.#queries.has(query.queryHash)) { | |
| 3894 | + this.#queries.set(query.queryHash, query); | |
| 3895 | + this.notify({ | |
| 3896 | + type: "added", | |
| 3897 | + query | |
| 3898 | + }); | |
| 3899 | + } | |
| 3900 | + } | |
| 3901 | + remove(query) { | |
| 3902 | + const queryInMap = this.#queries.get(query.queryHash); | |
| 3903 | + if (queryInMap) { | |
| 3904 | + query.destroy(); | |
| 3905 | + if (queryInMap === query) { | |
| 3906 | + this.#queries.delete(query.queryHash); | |
| 3907 | + } | |
| 3908 | + this.notify({ type: "removed", query }); | |
| 3909 | + } | |
| 3910 | + } | |
| 3911 | + clear() { | |
| 3912 | + import_notifyManager.notifyManager.batch(() => { | |
| 3913 | + this.getAll().forEach((query) => { | |
| 3914 | + this.remove(query); | |
| 3915 | + }); | |
| 3916 | + }); | |
| 3917 | + } | |
| 3918 | + get(queryHash) { | |
| 3919 | + return this.#queries.get(queryHash); | |
| 3920 | + } | |
| 3921 | + getAll() { | |
| 3922 | + return [...this.#queries.values()]; | |
| 3923 | + } | |
| 3924 | + find(filters) { | |
| 3925 | + const defaultedFilters = { exact: true, ...filters }; | |
| 3926 | + return this.getAll().find( | |
| 3927 | + (query) => (0, import_utils.matchQuery)(defaultedFilters, query) | |
| 3928 | + ); | |
| 3929 | + } | |
| 3930 | + findAll(filters = {}) { | |
| 3931 | + const queries = this.getAll(); | |
| 3932 | + return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries; | |
| 3933 | + } | |
| 3934 | + notify(event) { | |
| 3935 | + import_notifyManager.notifyManager.batch(() => { | |
| 3936 | + this.listeners.forEach((listener) => { | |
| 3937 | + listener(event); | |
| 3938 | + }); | |
| 3939 | + }); | |
| 3940 | + } | |
| 3941 | + onFocus() { | |
| 3942 | + import_notifyManager.notifyManager.batch(() => { | |
| 3943 | + this.getAll().forEach((query) => { | |
| 3944 | + query.onFocus(); | |
| 3945 | + }); | |
| 3946 | + }); | |
| 3947 | + } | |
| 3948 | + onOnline() { | |
| 3949 | + import_notifyManager.notifyManager.batch(() => { | |
| 3950 | + this.getAll().forEach((query) => { | |
| 3951 | + query.onOnline(); | |
| 3952 | + }); | |
| 3953 | + }); | |
| 3954 | + } | |
| 3955 | +}; | |
| 3956 | +// Annotate the CommonJS export names for ESM import in node: | |
| 3957 | +0 && (0); | |
| 3958 | +//# sourceMappingURL=queryCache.cjs.map | |
| 3959 | + | |
| 3960 | +/***/ }), | |
| 3961 | + | |
| 3962 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs": | |
| 3963 | +/*!*************************************************************************!*\ | |
| 3964 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***! | |
| 3965 | + \*************************************************************************/ | |
| 3966 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 3967 | + | |
| 3968 | +"use strict"; | |
| 3969 | + | |
| 3970 | +var __defProp = Object.defineProperty; | |
| 3971 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 3972 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 3973 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 3974 | +var __export = (target, all) => { | |
| 3975 | + for (var name in all) | |
| 3976 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 3977 | +}; | |
| 3978 | +var __copyProps = (to, from, except, desc) => { | |
| 3979 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 3980 | + for (let key of __getOwnPropNames(from)) | |
| 3981 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 3982 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 3983 | + } | |
| 3984 | + return to; | |
| 3985 | +}; | |
| 3986 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 3987 | + | |
| 3988 | +// src/queryClient.ts | |
| 3989 | +var queryClient_exports = {}; | |
| 3990 | +__export(queryClient_exports, { | |
| 3991 | + QueryClient: () => QueryClient | |
| 3992 | +}); | |
| 3993 | +module.exports = __toCommonJS(queryClient_exports); | |
| 3994 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 3995 | +var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs"); | |
| 3996 | +var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs"); | |
| 3997 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 3998 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 3999 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 4000 | +var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs"); | |
| 4001 | +var QueryClient = class { | |
| 4002 | + #queryCache; | |
| 4003 | + #mutationCache; | |
| 4004 | + #defaultOptions; | |
| 4005 | + #queryDefaults; | |
| 4006 | + #mutationDefaults; | |
| 4007 | + #mountCount; | |
| 4008 | + #unsubscribeFocus; | |
| 4009 | + #unsubscribeOnline; | |
| 4010 | + constructor(config = {}) { | |
| 4011 | + this.#queryCache = config.queryCache || new import_queryCache.QueryCache(); | |
| 4012 | + this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache(); | |
| 4013 | + this.#defaultOptions = config.defaultOptions || {}; | |
| 4014 | + this.#queryDefaults = /* @__PURE__ */ new Map(); | |
| 4015 | + this.#mutationDefaults = /* @__PURE__ */ new Map(); | |
| 4016 | + this.#mountCount = 0; | |
| 4017 | + } | |
| 4018 | + mount() { | |
| 4019 | + this.#mountCount++; | |
| 4020 | + if (this.#mountCount !== 1) | |
| 4021 | + return; | |
| 4022 | + this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(() => { | |
| 4023 | + if (import_focusManager.focusManager.isFocused()) { | |
| 4024 | + this.resumePausedMutations(); | |
| 4025 | + this.#queryCache.onFocus(); | |
| 4026 | + } | |
| 4027 | + }); | |
| 4028 | + this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(() => { | |
| 4029 | + if (import_onlineManager.onlineManager.isOnline()) { | |
| 4030 | + this.resumePausedMutations(); | |
| 4031 | + this.#queryCache.onOnline(); | |
| 4032 | + } | |
| 4033 | + }); | |
| 4034 | + } | |
| 4035 | + unmount() { | |
| 4036 | + this.#mountCount--; | |
| 4037 | + if (this.#mountCount !== 0) | |
| 4038 | + return; | |
| 4039 | + this.#unsubscribeFocus?.(); | |
| 4040 | + this.#unsubscribeFocus = void 0; | |
| 4041 | + this.#unsubscribeOnline?.(); | |
| 4042 | + this.#unsubscribeOnline = void 0; | |
| 4043 | + } | |
| 4044 | + isFetching(filters) { | |
| 4045 | + return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length; | |
| 4046 | + } | |
| 4047 | + isMutating(filters) { | |
| 4048 | + return this.#mutationCache.findAll({ ...filters, status: "pending" }).length; | |
| 4049 | + } | |
| 4050 | + getQueryData(queryKey) { | |
| 4051 | + return this.#queryCache.find({ queryKey })?.state.data; | |
| 4052 | + } | |
| 4053 | + ensureQueryData(options) { | |
| 4054 | + const cachedData = this.getQueryData(options.queryKey); | |
| 4055 | + return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options); | |
| 4056 | + } | |
| 4057 | + getQueriesData(filters) { | |
| 4058 | + return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => { | |
| 4059 | + const data = state.data; | |
| 4060 | + return [queryKey, data]; | |
| 4061 | + }); | |
| 4062 | + } | |
| 4063 | + setQueryData(queryKey, updater, options) { | |
| 4064 | + const query = this.#queryCache.find({ queryKey }); | |
| 4065 | + const prevData = query?.state.data; | |
| 4066 | + const data = (0, import_utils.functionalUpdate)(updater, prevData); | |
| 4067 | + if (typeof data === "undefined") { | |
| 4068 | + return void 0; | |
| 4069 | + } | |
| 4070 | + const defaultedOptions = this.defaultQueryOptions({ queryKey }); | |
| 4071 | + return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true }); | |
| 4072 | + } | |
| 4073 | + setQueriesData(filters, updater, options) { | |
| 4074 | + return import_notifyManager.notifyManager.batch( | |
| 4075 | + () => this.getQueryCache().findAll(filters).map(({ queryKey }) => [ | |
| 4076 | + queryKey, | |
| 4077 | + this.setQueryData(queryKey, updater, options) | |
| 4078 | + ]) | |
| 4079 | + ); | |
| 4080 | + } | |
| 4081 | + getQueryState(queryKey) { | |
| 4082 | + return this.#queryCache.find({ queryKey })?.state; | |
| 4083 | + } | |
| 4084 | + removeQueries(filters) { | |
| 4085 | + const queryCache = this.#queryCache; | |
| 4086 | + import_notifyManager.notifyManager.batch(() => { | |
| 4087 | + queryCache.findAll(filters).forEach((query) => { | |
| 4088 | + queryCache.remove(query); | |
| 4089 | + }); | |
| 4090 | + }); | |
| 4091 | + } | |
| 4092 | + resetQueries(filters, options) { | |
| 4093 | + const queryCache = this.#queryCache; | |
| 4094 | + const refetchFilters = { | |
| 4095 | + type: "active", | |
| 4096 | + ...filters | |
| 4097 | + }; | |
| 4098 | + return import_notifyManager.notifyManager.batch(() => { | |
| 4099 | + queryCache.findAll(filters).forEach((query) => { | |
| 4100 | + query.reset(); | |
| 4101 | + }); | |
| 4102 | + return this.refetchQueries(refetchFilters, options); | |
| 4103 | + }); | |
| 4104 | + } | |
| 4105 | + cancelQueries(filters = {}, cancelOptions = {}) { | |
| 4106 | + const defaultedCancelOptions = { revert: true, ...cancelOptions }; | |
| 4107 | + const promises = import_notifyManager.notifyManager.batch( | |
| 4108 | + () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions)) | |
| 4109 | + ); | |
| 4110 | + return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop); | |
| 4111 | + } | |
| 4112 | + invalidateQueries(filters = {}, options = {}) { | |
| 4113 | + return import_notifyManager.notifyManager.batch(() => { | |
| 4114 | + this.#queryCache.findAll(filters).forEach((query) => { | |
| 4115 | + query.invalidate(); | |
| 4116 | + }); | |
| 4117 | + if (filters.refetchType === "none") { | |
| 4118 | + return Promise.resolve(); | |
| 4119 | + } | |
| 4120 | + const refetchFilters = { | |
| 4121 | + ...filters, | |
| 4122 | + type: filters.refetchType ?? filters.type ?? "active" | |
| 4123 | + }; | |
| 4124 | + return this.refetchQueries(refetchFilters, options); | |
| 4125 | + }); | |
| 4126 | + } | |
| 4127 | + refetchQueries(filters = {}, options) { | |
| 4128 | + const fetchOptions = { | |
| 4129 | + ...options, | |
| 4130 | + cancelRefetch: options?.cancelRefetch ?? true | |
| 4131 | + }; | |
| 4132 | + const promises = import_notifyManager.notifyManager.batch( | |
| 4133 | + () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => { | |
| 4134 | + let promise = query.fetch(void 0, fetchOptions); | |
| 4135 | + if (!fetchOptions.throwOnError) { | |
| 4136 | + promise = promise.catch(import_utils.noop); | |
| 4137 | + } | |
| 4138 | + return query.state.fetchStatus === "paused" ? Promise.resolve() : promise; | |
| 4139 | + }) | |
| 4140 | + ); | |
| 4141 | + return Promise.all(promises).then(import_utils.noop); | |
| 4142 | + } | |
| 4143 | + fetchQuery(options) { | |
| 4144 | + const defaultedOptions = this.defaultQueryOptions(options); | |
| 4145 | + if (typeof defaultedOptions.retry === "undefined") { | |
| 4146 | + defaultedOptions.retry = false; | |
| 4147 | + } | |
| 4148 | + const query = this.#queryCache.build(this, defaultedOptions); | |
| 4149 | + return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data); | |
| 4150 | + } | |
| 4151 | + prefetchQuery(options) { | |
| 4152 | + return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 4153 | + } | |
| 4154 | + fetchInfiniteQuery(options) { | |
| 4155 | + options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages); | |
| 4156 | + return this.fetchQuery(options); | |
| 4157 | + } | |
| 4158 | + prefetchInfiniteQuery(options) { | |
| 4159 | + return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop); | |
| 4160 | + } | |
| 4161 | + resumePausedMutations() { | |
| 4162 | + return this.#mutationCache.resumePausedMutations(); | |
| 4163 | + } | |
| 4164 | + getQueryCache() { | |
| 4165 | + return this.#queryCache; | |
| 4166 | + } | |
| 4167 | + getMutationCache() { | |
| 4168 | + return this.#mutationCache; | |
| 4169 | + } | |
| 4170 | + getDefaultOptions() { | |
| 4171 | + return this.#defaultOptions; | |
| 4172 | + } | |
| 4173 | + setDefaultOptions(options) { | |
| 4174 | + this.#defaultOptions = options; | |
| 4175 | + } | |
| 4176 | + setQueryDefaults(queryKey, options) { | |
| 4177 | + this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), { | |
| 4178 | + queryKey, | |
| 4179 | + defaultOptions: options | |
| 4180 | + }); | |
| 4181 | + } | |
| 4182 | + getQueryDefaults(queryKey) { | |
| 4183 | + const defaults = [...this.#queryDefaults.values()]; | |
| 4184 | + let result = {}; | |
| 4185 | + defaults.forEach((queryDefault) => { | |
| 4186 | + if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) { | |
| 4187 | + result = { ...result, ...queryDefault.defaultOptions }; | |
| 4188 | + } | |
| 4189 | + }); | |
| 4190 | + return result; | |
| 4191 | + } | |
| 4192 | + setMutationDefaults(mutationKey, options) { | |
| 4193 | + this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), { | |
| 4194 | + mutationKey, | |
| 4195 | + defaultOptions: options | |
| 4196 | + }); | |
| 4197 | + } | |
| 4198 | + getMutationDefaults(mutationKey) { | |
| 4199 | + const defaults = [...this.#mutationDefaults.values()]; | |
| 4200 | + let result = {}; | |
| 4201 | + defaults.forEach((queryDefault) => { | |
| 4202 | + if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) { | |
| 4203 | + result = { ...result, ...queryDefault.defaultOptions }; | |
| 4204 | + } | |
| 4205 | + }); | |
| 4206 | + return result; | |
| 4207 | + } | |
| 4208 | + defaultQueryOptions(options) { | |
| 4209 | + if (options?._defaulted) { | |
| 4210 | + return options; | |
| 4211 | + } | |
| 4212 | + const defaultedOptions = { | |
| 4213 | + ...this.#defaultOptions.queries, | |
| 4214 | + ...options?.queryKey && this.getQueryDefaults(options.queryKey), | |
| 4215 | + ...options, | |
| 4216 | + _defaulted: true | |
| 4217 | + }; | |
| 4218 | + if (!defaultedOptions.queryHash) { | |
| 4219 | + defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)( | |
| 4220 | + defaultedOptions.queryKey, | |
| 4221 | + defaultedOptions | |
| 4222 | + ); | |
| 4223 | + } | |
| 4224 | + if (typeof defaultedOptions.refetchOnReconnect === "undefined") { | |
| 4225 | + defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always"; | |
| 4226 | + } | |
| 4227 | + if (typeof defaultedOptions.throwOnError === "undefined") { | |
| 4228 | + defaultedOptions.throwOnError = !!defaultedOptions.suspense; | |
| 4229 | + } | |
| 4230 | + if (typeof defaultedOptions.networkMode === "undefined" && defaultedOptions.persister) { | |
| 4231 | + defaultedOptions.networkMode = "offlineFirst"; | |
| 4232 | + } | |
| 4233 | + return defaultedOptions; | |
| 4234 | + } | |
| 4235 | + defaultMutationOptions(options) { | |
| 4236 | + if (options?._defaulted) { | |
| 4237 | + return options; | |
| 4238 | + } | |
| 4239 | + return { | |
| 4240 | + ...this.#defaultOptions.mutations, | |
| 4241 | + ...options?.mutationKey && this.getMutationDefaults(options.mutationKey), | |
| 4242 | + ...options, | |
| 4243 | + _defaulted: true | |
| 4244 | + }; | |
| 4245 | + } | |
| 4246 | + clear() { | |
| 4247 | + this.#queryCache.clear(); | |
| 4248 | + this.#mutationCache.clear(); | |
| 4249 | + } | |
| 4250 | +}; | |
| 4251 | +// Annotate the CommonJS export names for ESM import in node: | |
| 4252 | +0 && (0); | |
| 4253 | +//# sourceMappingURL=queryClient.cjs.map | |
| 4254 | + | |
| 4255 | +/***/ }), | |
| 4256 | + | |
| 4257 | +/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs": | |
| 4258 | +/*!***************************************************************************!*\ | |
| 4259 | + !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***! | |
| 4260 | + \***************************************************************************/ | |
| 4261 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4262 | + | |
| 4263 | +"use strict"; | |
| 4264 | + | |
| 4265 | +var __defProp = Object.defineProperty; | |
| 4266 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 4267 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 4268 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 4269 | +var __export = (target, all) => { | |
| 4270 | + for (var name in all) | |
| 4271 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 4272 | +}; | |
| 4273 | +var __copyProps = (to, from, except, desc) => { | |
| 4274 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 4275 | + for (let key of __getOwnPropNames(from)) | |
| 4276 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 4277 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 4278 | + } | |
| 4279 | + return to; | |
| 4280 | +}; | |
| 4281 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 4282 | + | |
| 4283 | +// src/queryObserver.ts | |
| 4284 | +var queryObserver_exports = {}; | |
| 4285 | +__export(queryObserver_exports, { | |
| 4286 | + QueryObserver: () => QueryObserver | |
| 4287 | +}); | |
| 4288 | +module.exports = __toCommonJS(queryObserver_exports); | |
| 4289 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 4290 | +var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs"); | |
| 4291 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 4292 | +var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs"); | |
| 4293 | +var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs"); | |
| 4294 | +var QueryObserver = class extends import_subscribable.Subscribable { | |
| 4295 | + constructor(client, options) { | |
| 4296 | + super(); | |
| 4297 | + this.#currentQuery = void 0; | |
| 4298 | + this.#currentQueryInitialState = void 0; | |
| 4299 | + this.#currentResult = void 0; | |
| 4300 | + this.#trackedProps = /* @__PURE__ */ new Set(); | |
| 4301 | + this.#client = client; | |
| 4302 | + this.options = options; | |
| 4303 | + this.#selectError = null; | |
| 4304 | + this.bindMethods(); | |
| 4305 | + this.setOptions(options); | |
| 4306 | + } | |
| 4307 | + #client; | |
| 4308 | + #currentQuery; | |
| 4309 | + #currentQueryInitialState; | |
| 4310 | + #currentResult; | |
| 4311 | + #currentResultState; | |
| 4312 | + #currentResultOptions; | |
| 4313 | + #selectError; | |
| 4314 | + #selectFn; | |
| 4315 | + #selectResult; | |
| 4316 | + // This property keeps track of the last query with defined data. | |
| 4317 | + // It will be used to pass the previous data and query to the placeholder function between renders. | |
| 4318 | + #lastQueryWithDefinedData; | |
| 4319 | + #staleTimeoutId; | |
| 4320 | + #refetchIntervalId; | |
| 4321 | + #currentRefetchInterval; | |
| 4322 | + #trackedProps; | |
| 4323 | + bindMethods() { | |
| 4324 | + this.refetch = this.refetch.bind(this); | |
| 4325 | + } | |
| 4326 | + onSubscribe() { | |
| 4327 | + if (this.listeners.size === 1) { | |
| 4328 | + this.#currentQuery.addObserver(this); | |
| 4329 | + if (shouldFetchOnMount(this.#currentQuery, this.options)) { | |
| 4330 | + this.#executeFetch(); | |
| 4331 | + } | |
| 4332 | + this.#updateTimers(); | |
| 4333 | + } | |
| 4334 | + } | |
| 4335 | + onUnsubscribe() { | |
| 4336 | + if (!this.hasListeners()) { | |
| 4337 | + this.destroy(); | |
| 4338 | + } | |
| 4339 | + } | |
| 4340 | + shouldFetchOnReconnect() { | |
| 4341 | + return shouldFetchOn( | |
| 4342 | + this.#currentQuery, | |
| 4343 | + this.options, | |
| 4344 | + this.options.refetchOnReconnect | |
| 4345 | + ); | |
| 4346 | + } | |
| 4347 | + shouldFetchOnWindowFocus() { | |
| 4348 | + return shouldFetchOn( | |
| 4349 | + this.#currentQuery, | |
| 4350 | + this.options, | |
| 4351 | + this.options.refetchOnWindowFocus | |
| 4352 | + ); | |
| 4353 | + } | |
| 4354 | + destroy() { | |
| 4355 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 4356 | + this.#clearStaleTimeout(); | |
| 4357 | + this.#clearRefetchInterval(); | |
| 4358 | + this.#currentQuery.removeObserver(this); | |
| 4359 | + } | |
| 4360 | + setOptions(options, notifyOptions) { | |
| 4361 | + const prevOptions = this.options; | |
| 4362 | + const prevQuery = this.#currentQuery; | |
| 4363 | + this.options = this.#client.defaultQueryOptions(options); | |
| 4364 | + if (!(0, import_utils.shallowEqualObjects)(prevOptions, this.options)) { | |
| 4365 | + this.#client.getQueryCache().notify({ | |
| 4366 | + type: "observerOptionsUpdated", | |
| 4367 | + query: this.#currentQuery, | |
| 4368 | + observer: this | |
| 4369 | + }); | |
| 4370 | + } | |
| 4371 | + if (typeof this.options.enabled !== "undefined" && typeof this.options.enabled !== "boolean") { | |
| 4372 | + throw new Error("Expected enabled to be a boolean"); | |
| 4373 | + } | |
| 4374 | + if (!this.options.queryKey) { | |
| 4375 | + this.options.queryKey = prevOptions.queryKey; | |
| 4376 | + } | |
| 4377 | + this.#updateQuery(); | |
| 4378 | + const mounted = this.hasListeners(); | |
| 4379 | + if (mounted && shouldFetchOptionally( | |
| 4380 | + this.#currentQuery, | |
| 4381 | + prevQuery, | |
| 4382 | + this.options, | |
| 4383 | + prevOptions | |
| 4384 | + )) { | |
| 4385 | + this.#executeFetch(); | |
| 4386 | + } | |
| 4387 | + this.updateResult(notifyOptions); | |
| 4388 | + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) { | |
| 4389 | + this.#updateStaleTimeout(); | |
| 4390 | + } | |
| 4391 | + const nextRefetchInterval = this.#computeRefetchInterval(); | |
| 4392 | + if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.#currentRefetchInterval)) { | |
| 4393 | + this.#updateRefetchInterval(nextRefetchInterval); | |
| 4394 | + } | |
| 4395 | + } | |
| 4396 | + getOptimisticResult(options) { | |
| 4397 | + const query = this.#client.getQueryCache().build(this.#client, options); | |
| 4398 | + const result = this.createResult(query, options); | |
| 4399 | + if (shouldAssignObserverCurrentProperties(this, result)) { | |
| 4400 | + this.#currentResult = result; | |
| 4401 | + this.#currentResultOptions = this.options; | |
| 4402 | + this.#currentResultState = this.#currentQuery.state; | |
| 4403 | + } | |
| 4404 | + return result; | |
| 4405 | + } | |
| 4406 | + getCurrentResult() { | |
| 4407 | + return this.#currentResult; | |
| 4408 | + } | |
| 4409 | + trackResult(result) { | |
| 4410 | + const trackedResult = {}; | |
| 4411 | + Object.keys(result).forEach((key) => { | |
| 4412 | + Object.defineProperty(trackedResult, key, { | |
| 4413 | + configurable: false, | |
| 4414 | + enumerable: true, | |
| 4415 | + get: () => { | |
| 4416 | + this.#trackedProps.add(key); | |
| 4417 | + return result[key]; | |
| 4418 | + } | |
| 4419 | + }); | |
| 4420 | + }); | |
| 4421 | + return trackedResult; | |
| 4422 | + } | |
| 4423 | + getCurrentQuery() { | |
| 4424 | + return this.#currentQuery; | |
| 4425 | + } | |
| 4426 | + refetch({ ...options } = {}) { | |
| 4427 | + return this.fetch({ | |
| 4428 | + ...options | |
| 4429 | + }); | |
| 4430 | + } | |
| 4431 | + fetchOptimistic(options) { | |
| 4432 | + const defaultedOptions = this.#client.defaultQueryOptions(options); | |
| 4433 | + const query = this.#client.getQueryCache().build(this.#client, defaultedOptions); | |
| 4434 | + query.isFetchingOptimistic = true; | |
| 4435 | + return query.fetch().then(() => this.createResult(query, defaultedOptions)); | |
| 4436 | + } | |
| 4437 | + fetch(fetchOptions) { | |
| 4438 | + return this.#executeFetch({ | |
| 4439 | + ...fetchOptions, | |
| 4440 | + cancelRefetch: fetchOptions.cancelRefetch ?? true | |
| 4441 | + }).then(() => { | |
| 4442 | + this.updateResult(); | |
| 4443 | + return this.#currentResult; | |
| 4444 | + }); | |
| 4445 | + } | |
| 4446 | + #executeFetch(fetchOptions) { | |
| 4447 | + this.#updateQuery(); | |
| 4448 | + let promise = this.#currentQuery.fetch( | |
| 4449 | + this.options, | |
| 4450 | + fetchOptions | |
| 4451 | + ); | |
| 4452 | + if (!fetchOptions?.throwOnError) { | |
| 4453 | + promise = promise.catch(import_utils.noop); | |
| 4454 | + } | |
| 4455 | + return promise; | |
| 4456 | + } | |
| 4457 | + #updateStaleTimeout() { | |
| 4458 | + this.#clearStaleTimeout(); | |
| 4459 | + if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(this.options.staleTime)) { | |
| 4460 | + return; | |
| 4461 | + } | |
| 4462 | + const time = (0, import_utils.timeUntilStale)( | |
| 4463 | + this.#currentResult.dataUpdatedAt, | |
| 4464 | + this.options.staleTime | |
| 4465 | + ); | |
| 4466 | + const timeout = time + 1; | |
| 4467 | + this.#staleTimeoutId = setTimeout(() => { | |
| 4468 | + if (!this.#currentResult.isStale) { | |
| 4469 | + this.updateResult(); | |
| 4470 | + } | |
| 4471 | + }, timeout); | |
| 4472 | + } | |
| 4473 | + #computeRefetchInterval() { | |
| 4474 | + return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false; | |
| 4475 | + } | |
| 4476 | + #updateRefetchInterval(nextInterval) { | |
| 4477 | + this.#clearRefetchInterval(); | |
| 4478 | + this.#currentRefetchInterval = nextInterval; | |
| 4479 | + if (import_utils.isServer || this.options.enabled === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) { | |
| 4480 | + return; | |
| 4481 | + } | |
| 4482 | + this.#refetchIntervalId = setInterval(() => { | |
| 4483 | + if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) { | |
| 4484 | + this.#executeFetch(); | |
| 4485 | + } | |
| 4486 | + }, this.#currentRefetchInterval); | |
| 4487 | + } | |
| 4488 | + #updateTimers() { | |
| 4489 | + this.#updateStaleTimeout(); | |
| 4490 | + this.#updateRefetchInterval(this.#computeRefetchInterval()); | |
| 4491 | + } | |
| 4492 | + #clearStaleTimeout() { | |
| 4493 | + if (this.#staleTimeoutId) { | |
| 4494 | + clearTimeout(this.#staleTimeoutId); | |
| 4495 | + this.#staleTimeoutId = void 0; | |
| 4496 | + } | |
| 4497 | + } | |
| 4498 | + #clearRefetchInterval() { | |
| 4499 | + if (this.#refetchIntervalId) { | |
| 4500 | + clearInterval(this.#refetchIntervalId); | |
| 4501 | + this.#refetchIntervalId = void 0; | |
| 4502 | + } | |
| 4503 | + } | |
| 4504 | + createResult(query, options) { | |
| 4505 | + const prevQuery = this.#currentQuery; | |
| 4506 | + const prevOptions = this.options; | |
| 4507 | + const prevResult = this.#currentResult; | |
| 4508 | + const prevResultState = this.#currentResultState; | |
| 4509 | + const prevResultOptions = this.#currentResultOptions; | |
| 4510 | + const queryChange = query !== prevQuery; | |
| 4511 | + const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState; | |
| 4512 | + const { state } = query; | |
| 4513 | + let { error, errorUpdatedAt, fetchStatus, status } = state; | |
| 4514 | + let isPlaceholderData = false; | |
| 4515 | + let data; | |
| 4516 | + if (options._optimisticResults) { | |
| 4517 | + const mounted = this.hasListeners(); | |
| 4518 | + const fetchOnMount = !mounted && shouldFetchOnMount(query, options); | |
| 4519 | + const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions); | |
| 4520 | + if (fetchOnMount || fetchOptionally) { | |
| 4521 | + fetchStatus = (0, import_retryer.canFetch)(query.options.networkMode) ? "fetching" : "paused"; | |
| 4522 | + if (!state.dataUpdatedAt) { | |
| 4523 | + status = "pending"; | |
| 4524 | + } | |
| 4525 | + } | |
| 4526 | + if (options._optimisticResults === "isRestoring") { | |
| 4527 | + fetchStatus = "idle"; | |
| 4528 | + } | |
| 4529 | + } | |
| 4530 | + if (options.select && typeof state.data !== "undefined") { | |
| 4531 | + if (prevResult && state.data === prevResultState?.data && options.select === this.#selectFn) { | |
| 4532 | + data = this.#selectResult; | |
| 4533 | + } else { | |
| 4534 | + try { | |
| 4535 | + this.#selectFn = options.select; | |
| 4536 | + data = options.select(state.data); | |
| 4537 | + data = (0, import_utils.replaceData)(prevResult?.data, data, options); | |
| 4538 | + this.#selectResult = data; | |
| 4539 | + this.#selectError = null; | |
| 4540 | + } catch (selectError) { | |
| 4541 | + this.#selectError = selectError; | |
| 4542 | + } | |
| 4543 | + } | |
| 4544 | + } else { | |
| 4545 | + data = state.data; | |
| 4546 | + } | |
| 4547 | + if (typeof options.placeholderData !== "undefined" && typeof data === "undefined" && status === "pending") { | |
| 4548 | + let placeholderData; | |
| 4549 | + if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) { | |
| 4550 | + placeholderData = prevResult.data; | |
| 4551 | + } else { | |
| 4552 | + placeholderData = typeof options.placeholderData === "function" ? options.placeholderData( | |
| 4553 | + this.#lastQueryWithDefinedData?.state.data, | |
| 4554 | + this.#lastQueryWithDefinedData | |
| 4555 | + ) : options.placeholderData; | |
| 4556 | + if (options.select && typeof placeholderData !== "undefined") { | |
| 4557 | + try { | |
| 4558 | + placeholderData = options.select(placeholderData); | |
| 4559 | + this.#selectError = null; | |
| 4560 | + } catch (selectError) { | |
| 4561 | + this.#selectError = selectError; | |
| 4562 | + } | |
| 4563 | + } | |
| 4564 | + } | |
| 4565 | + if (typeof placeholderData !== "undefined") { | |
| 4566 | + status = "success"; | |
| 4567 | + data = (0, import_utils.replaceData)( | |
| 4568 | + prevResult?.data, | |
| 4569 | + placeholderData, | |
| 4570 | + options | |
| 4571 | + ); | |
| 4572 | + isPlaceholderData = true; | |
| 4573 | + } | |
| 4574 | + } | |
| 4575 | + if (this.#selectError) { | |
| 4576 | + error = this.#selectError; | |
| 4577 | + data = this.#selectResult; | |
| 4578 | + errorUpdatedAt = Date.now(); | |
| 4579 | + status = "error"; | |
| 4580 | + } | |
| 4581 | + const isFetching = fetchStatus === "fetching"; | |
| 4582 | + const isPending = status === "pending"; | |
| 4583 | + const isError = status === "error"; | |
| 4584 | + const isLoading = isPending && isFetching; | |
| 4585 | + const result = { | |
| 4586 | + status, | |
| 4587 | + fetchStatus, | |
| 4588 | + isPending, | |
| 4589 | + isSuccess: status === "success", | |
| 4590 | + isError, | |
| 4591 | + isInitialLoading: isLoading, | |
| 4592 | + isLoading, | |
| 4593 | + data, | |
| 4594 | + dataUpdatedAt: state.dataUpdatedAt, | |
| 4595 | + error, | |
| 4596 | + errorUpdatedAt, | |
| 4597 | + failureCount: state.fetchFailureCount, | |
| 4598 | + failureReason: state.fetchFailureReason, | |
| 4599 | + errorUpdateCount: state.errorUpdateCount, | |
| 4600 | + isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0, | |
| 4601 | + isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount, | |
| 4602 | + isFetching, | |
| 4603 | + isRefetching: isFetching && !isPending, | |
| 4604 | + isLoadingError: isError && state.dataUpdatedAt === 0, | |
| 4605 | + isPaused: fetchStatus === "paused", | |
| 4606 | + isPlaceholderData, | |
| 4607 | + isRefetchError: isError && state.dataUpdatedAt !== 0, | |
| 4608 | + isStale: isStale(query, options), | |
| 4609 | + refetch: this.refetch | |
| 4610 | + }; | |
| 4611 | + return result; | |
| 4612 | + } | |
| 4613 | + updateResult(notifyOptions) { | |
| 4614 | + const prevResult = this.#currentResult; | |
| 4615 | + const nextResult = this.createResult(this.#currentQuery, this.options); | |
| 4616 | + this.#currentResultState = this.#currentQuery.state; | |
| 4617 | + this.#currentResultOptions = this.options; | |
| 4618 | + if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) { | |
| 4619 | + return; | |
| 4620 | + } | |
| 4621 | + if (this.#currentResultState.data !== void 0) { | |
| 4622 | + this.#lastQueryWithDefinedData = this.#currentQuery; | |
| 4623 | + } | |
| 4624 | + this.#currentResult = nextResult; | |
| 4625 | + const defaultNotifyOptions = {}; | |
| 4626 | + const shouldNotifyListeners = () => { | |
| 4627 | + if (!prevResult) { | |
| 4628 | + return true; | |
| 4629 | + } | |
| 4630 | + const { notifyOnChangeProps } = this.options; | |
| 4631 | + const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps; | |
| 4632 | + if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) { | |
| 4633 | + return true; | |
| 4634 | + } | |
| 4635 | + const includedProps = new Set( | |
| 4636 | + notifyOnChangePropsValue ?? this.#trackedProps | |
| 4637 | + ); | |
| 4638 | + if (this.options.throwOnError) { | |
| 4639 | + includedProps.add("error"); | |
| 4640 | + } | |
| 4641 | + return Object.keys(this.#currentResult).some((key) => { | |
| 4642 | + const typedKey = key; | |
| 4643 | + const changed = this.#currentResult[typedKey] !== prevResult[typedKey]; | |
| 4644 | + return changed && includedProps.has(typedKey); | |
| 4645 | + }); | |
| 4646 | + }; | |
| 4647 | + if (notifyOptions?.listeners !== false && shouldNotifyListeners()) { | |
| 4648 | + defaultNotifyOptions.listeners = true; | |
| 4649 | + } | |
| 4650 | + this.#notify({ ...defaultNotifyOptions, ...notifyOptions }); | |
| 4651 | + } | |
| 4652 | + #updateQuery() { | |
| 4653 | + const query = this.#client.getQueryCache().build(this.#client, this.options); | |
| 4654 | + if (query === this.#currentQuery) { | |
| 4655 | + return; | |
| 4656 | + } | |
| 4657 | + const prevQuery = this.#currentQuery; | |
| 4658 | + this.#currentQuery = query; | |
| 4659 | + this.#currentQueryInitialState = query.state; | |
| 4660 | + if (this.hasListeners()) { | |
| 4661 | + prevQuery?.removeObserver(this); | |
| 4662 | + query.addObserver(this); | |
| 4663 | + } | |
| 4664 | + } | |
| 4665 | + onQueryUpdate() { | |
| 4666 | + this.updateResult(); | |
| 4667 | + if (this.hasListeners()) { | |
| 4668 | + this.#updateTimers(); | |
| 4669 | + } | |
| 4670 | + } | |
| 4671 | + #notify(notifyOptions) { | |
| 4672 | + import_notifyManager.notifyManager.batch(() => { | |
| 4673 | + if (notifyOptions.listeners) { | |
| 4674 | + this.listeners.forEach((listener) => { | |
| 4675 | + listener(this.#currentResult); | |
| 4676 | + }); | |
| 4677 | + } | |
| 4678 | + this.#client.getQueryCache().notify({ | |
| 4679 | + query: this.#currentQuery, | |
| 4680 | + type: "observerResultsUpdated" | |
| 4681 | + }); | |
| 4682 | + }); | |
| 4683 | + } | |
| 4684 | +}; | |
| 4685 | +function shouldLoadOnMount(query, options) { | |
| 4686 | + return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === "error" && options.retryOnMount === false); | |
| 4687 | +} | |
| 4688 | +function shouldFetchOnMount(query, options) { | |
| 4689 | + return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount); | |
| 4690 | +} | |
| 4691 | +function shouldFetchOn(query, options, field) { | |
| 4692 | + if (options.enabled !== false) { | |
| 4693 | + const value = typeof field === "function" ? field(query) : field; | |
| 4694 | + return value === "always" || value !== false && isStale(query, options); | |
| 4695 | + } | |
| 4696 | + return false; | |
| 4697 | +} | |
| 4698 | +function shouldFetchOptionally(query, prevQuery, options, prevOptions) { | |
| 4699 | + return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options); | |
| 4700 | +} | |
| 4701 | +function isStale(query, options) { | |
| 4702 | + return query.isStaleByTime(options.staleTime); | |
| 4703 | +} | |
| 4704 | +function shouldAssignObserverCurrentProperties(observer, optimisticResult) { | |
| 4705 | + if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) { | |
| 4706 | + return true; | |
| 4707 | + } | |
| 4708 | + return false; | |
| 4709 | +} | |
| 4710 | +// Annotate the CommonJS export names for ESM import in node: | |
| 4711 | +0 && (0); | |
| 4712 | +//# sourceMappingURL=queryObserver.cjs.map | |
| 4713 | + | |
| 4714 | +/***/ }), | |
| 4715 | + | |
| 4716 | +/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs": | |
| 4717 | +/*!***********************************************************************!*\ | |
| 4718 | + !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***! | |
| 4719 | + \***********************************************************************/ | |
| 4720 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4721 | + | |
| 4722 | +"use strict"; | |
| 4723 | + | |
| 4724 | +var __defProp = Object.defineProperty; | |
| 4725 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 4726 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 4727 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 4728 | +var __export = (target, all) => { | |
| 4729 | + for (var name in all) | |
| 4730 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 4731 | +}; | |
| 4732 | +var __copyProps = (to, from, except, desc) => { | |
| 4733 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 4734 | + for (let key of __getOwnPropNames(from)) | |
| 4735 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 4736 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 4737 | + } | |
| 4738 | + return to; | |
| 4739 | +}; | |
| 4740 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 4741 | + | |
| 4742 | +// src/removable.ts | |
| 4743 | +var removable_exports = {}; | |
| 4744 | +__export(removable_exports, { | |
| 4745 | + Removable: () => Removable | |
| 4746 | +}); | |
| 4747 | +module.exports = __toCommonJS(removable_exports); | |
| 4748 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 4749 | +var Removable = class { | |
| 4750 | + #gcTimeout; | |
| 4751 | + destroy() { | |
| 4752 | + this.clearGcTimeout(); | |
| 4753 | + } | |
| 4754 | + scheduleGc() { | |
| 4755 | + this.clearGcTimeout(); | |
| 4756 | + if ((0, import_utils.isValidTimeout)(this.gcTime)) { | |
| 4757 | + this.#gcTimeout = setTimeout(() => { | |
| 4758 | + this.optionalRemove(); | |
| 4759 | + }, this.gcTime); | |
| 4760 | + } | |
| 4761 | + } | |
| 4762 | + updateGcTime(newGcTime) { | |
| 4763 | + this.gcTime = Math.max( | |
| 4764 | + this.gcTime || 0, | |
| 4765 | + newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3) | |
| 4766 | + ); | |
| 4767 | + } | |
| 4768 | + clearGcTimeout() { | |
| 4769 | + if (this.#gcTimeout) { | |
| 4770 | + clearTimeout(this.#gcTimeout); | |
| 4771 | + this.#gcTimeout = void 0; | |
| 4772 | + } | |
| 4773 | + } | |
| 4774 | +}; | |
| 4775 | +// Annotate the CommonJS export names for ESM import in node: | |
| 4776 | +0 && (0); | |
| 4777 | +//# sourceMappingURL=removable.cjs.map | |
| 4778 | + | |
| 4779 | +/***/ }), | |
| 4780 | + | |
| 4781 | +/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs": | |
| 4782 | +/*!*********************************************************************!*\ | |
| 4783 | + !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***! | |
| 4784 | + \*********************************************************************/ | |
| 4785 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 4786 | + | |
| 4787 | +"use strict"; | |
| 4788 | + | |
| 4789 | +var __defProp = Object.defineProperty; | |
| 4790 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 4791 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 4792 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 4793 | +var __export = (target, all) => { | |
| 4794 | + for (var name in all) | |
| 4795 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 4796 | +}; | |
| 4797 | +var __copyProps = (to, from, except, desc) => { | |
| 4798 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 4799 | + for (let key of __getOwnPropNames(from)) | |
| 4800 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 4801 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 4802 | + } | |
| 4803 | + return to; | |
| 4804 | +}; | |
| 4805 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 4806 | + | |
| 4807 | +// src/retryer.ts | |
| 4808 | +var retryer_exports = {}; | |
| 4809 | +__export(retryer_exports, { | |
| 4810 | + CancelledError: () => CancelledError, | |
| 4811 | + canFetch: () => canFetch, | |
| 4812 | + createRetryer: () => createRetryer, | |
| 4813 | + isCancelledError: () => isCancelledError | |
| 4814 | +}); | |
| 4815 | +module.exports = __toCommonJS(retryer_exports); | |
| 4816 | +var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs"); | |
| 4817 | +var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs"); | |
| 4818 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs"); | |
| 4819 | +function defaultRetryDelay(failureCount) { | |
| 4820 | + return Math.min(1e3 * 2 ** failureCount, 3e4); | |
| 4821 | +} | |
| 4822 | +function canFetch(networkMode) { | |
| 4823 | + return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true; | |
| 4824 | +} | |
| 4825 | +var CancelledError = class { | |
| 4826 | + constructor(options) { | |
| 4827 | + this.revert = options?.revert; | |
| 4828 | + this.silent = options?.silent; | |
| 4829 | + } | |
| 4830 | +}; | |
| 4831 | +function isCancelledError(value) { | |
| 4832 | + return value instanceof CancelledError; | |
| 4833 | +} | |
| 4834 | +function createRetryer(config) { | |
| 4835 | + let isRetryCancelled = false; | |
| 4836 | + let failureCount = 0; | |
| 4837 | + let isResolved = false; | |
| 4838 | + let continueFn; | |
| 4839 | + let promiseResolve; | |
| 4840 | + let promiseReject; | |
| 4841 | + const promise = new Promise((outerResolve, outerReject) => { | |
| 4842 | + promiseResolve = outerResolve; | |
| 4843 | + promiseReject = outerReject; | |
| 4844 | + }); | |
| 4845 | + const cancel = (cancelOptions) => { | |
| 4846 | + if (!isResolved) { | |
| 4847 | + reject(new CancelledError(cancelOptions)); | |
| 4848 | + config.abort?.(); | |
| 4849 | + } | |
| 4850 | + }; | |
| 4851 | + const cancelRetry = () => { | |
| 4852 | + isRetryCancelled = true; | |
| 4853 | + }; | |
| 4854 | + const continueRetry = () => { | |
| 4855 | + isRetryCancelled = false; | |
| 4856 | + }; | |
| 4857 | + const shouldPause = () => !import_focusManager.focusManager.isFocused() || config.networkMode !== "always" && !import_onlineManager.onlineManager.isOnline(); | |
| 4858 | + const resolve = (value) => { | |
| 4859 | + if (!isResolved) { | |
| 4860 | + isResolved = true; | |
| 4861 | + config.onSuccess?.(value); | |
| 4862 | + continueFn?.(); | |
| 4863 | + promiseResolve(value); | |
| 4864 | + } | |
| 4865 | + }; | |
| 4866 | + const reject = (value) => { | |
| 4867 | + if (!isResolved) { | |
| 4868 | + isResolved = true; | |
| 4869 | + config.onError?.(value); | |
| 4870 | + continueFn?.(); | |
| 4871 | + promiseReject(value); | |
| 4872 | + } | |
| 4873 | + }; | |
| 4874 | + const pause = () => { | |
| 4875 | + return new Promise((continueResolve) => { | |
| 4876 | + continueFn = (value) => { | |
| 4877 | + const canContinue = isResolved || !shouldPause(); | |
| 4878 | + if (canContinue) { | |
| 4879 | + continueResolve(value); | |
| 4880 | + } | |
| 4881 | + return canContinue; | |
| 4882 | + }; | |
| 4883 | + config.onPause?.(); | |
| 4884 | + }).then(() => { | |
| 4885 | + continueFn = void 0; | |
| 4886 | + if (!isResolved) { | |
| 4887 | + config.onContinue?.(); | |
| 4888 | + } | |
| 4889 | + }); | |
| 4890 | + }; | |
| 4891 | + const run = () => { | |
| 4892 | + if (isResolved) { | |
| 4893 | + return; | |
| 4894 | + } | |
| 4895 | + let promiseOrValue; | |
| 4896 | + try { | |
| 4897 | + promiseOrValue = config.fn(); | |
| 4898 | + } catch (error) { | |
| 4899 | + promiseOrValue = Promise.reject(error); | |
| 4900 | + } | |
| 4901 | + Promise.resolve(promiseOrValue).then(resolve).catch((error) => { | |
| 4902 | + if (isResolved) { | |
| 4903 | + return; | |
| 4904 | + } | |
| 4905 | + const retry = config.retry ?? (import_utils.isServer ? 0 : 3); | |
| 4906 | + const retryDelay = config.retryDelay ?? defaultRetryDelay; | |
| 4907 | + const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay; | |
| 4908 | + const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error); | |
| 4909 | + if (isRetryCancelled || !shouldRetry) { | |
| 4910 | + reject(error); | |
| 4911 | + return; | |
| 4912 | + } | |
| 4913 | + failureCount++; | |
| 4914 | + config.onFail?.(failureCount, error); | |
| 4915 | + (0, import_utils.sleep)(delay).then(() => { | |
| 4916 | + if (shouldPause()) { | |
| 4917 | + return pause(); | |
| 4918 | + } | |
| 4919 | + return; | |
| 4920 | + }).then(() => { | |
| 4921 | + if (isRetryCancelled) { | |
| 4922 | + reject(error); | |
| 4923 | + } else { | |
| 4924 | + run(); | |
| 4925 | + } | |
| 4926 | + }); | |
| 4927 | + }); | |
| 4928 | + }; | |
| 4929 | + if (canFetch(config.networkMode)) { | |
| 4930 | + run(); | |
| 4931 | + } else { | |
| 4932 | + pause().then(run); | |
| 4933 | + } | |
| 4934 | + return { | |
| 4935 | + promise, | |
| 4936 | + cancel, | |
| 4937 | + continue: () => { | |
| 4938 | + const didContinue = continueFn?.(); | |
| 4939 | + return didContinue ? promise : Promise.resolve(); | |
| 4940 | + }, | |
| 4941 | + cancelRetry, | |
| 4942 | + continueRetry | |
| 4943 | + }; | |
| 4944 | +} | |
| 4945 | +// Annotate the CommonJS export names for ESM import in node: | |
| 4946 | +0 && (0); | |
| 4947 | +//# sourceMappingURL=retryer.cjs.map | |
| 4948 | + | |
| 4949 | +/***/ }), | |
| 4950 | + | |
| 4951 | +/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs": | |
| 4952 | +/*!**************************************************************************!*\ | |
| 4953 | + !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***! | |
| 4954 | + \**************************************************************************/ | |
| 2133 | 4955 | /***/ ((module) => { |
| 2134 | 4956 | |
| 2135 | 4957 | "use strict"; |
| 2136 | -module.exports = elementorV2.editorAppBar; | |
| 2137 | 4958 | |
| 4959 | +var __defProp = Object.defineProperty; | |
| 4960 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 4961 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 4962 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 4963 | +var __export = (target, all) => { | |
| 4964 | + for (var name in all) | |
| 4965 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 4966 | +}; | |
| 4967 | +var __copyProps = (to, from, except, desc) => { | |
| 4968 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 4969 | + for (let key of __getOwnPropNames(from)) | |
| 4970 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 4971 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 4972 | + } | |
| 4973 | + return to; | |
| 4974 | +}; | |
| 4975 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 4976 | + | |
| 4977 | +// src/subscribable.ts | |
| 4978 | +var subscribable_exports = {}; | |
| 4979 | +__export(subscribable_exports, { | |
| 4980 | + Subscribable: () => Subscribable | |
| 4981 | +}); | |
| 4982 | +module.exports = __toCommonJS(subscribable_exports); | |
| 4983 | +var Subscribable = class { | |
| 4984 | + constructor() { | |
| 4985 | + this.listeners = /* @__PURE__ */ new Set(); | |
| 4986 | + this.subscribe = this.subscribe.bind(this); | |
| 4987 | + } | |
| 4988 | + subscribe(listener) { | |
| 4989 | + this.listeners.add(listener); | |
| 4990 | + this.onSubscribe(); | |
| 4991 | + return () => { | |
| 4992 | + this.listeners.delete(listener); | |
| 4993 | + this.onUnsubscribe(); | |
| 4994 | + }; | |
| 4995 | + } | |
| 4996 | + hasListeners() { | |
| 4997 | + return this.listeners.size > 0; | |
| 4998 | + } | |
| 4999 | + onSubscribe() { | |
| 5000 | + } | |
| 5001 | + onUnsubscribe() { | |
| 5002 | + } | |
| 5003 | +}; | |
| 5004 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5005 | +0 && (0); | |
| 5006 | +//# sourceMappingURL=subscribable.cjs.map | |
| 5007 | + | |
| 2138 | 5008 | /***/ }), |
| 2139 | 5009 | |
| 2140 | -/***/ "@elementor/icons/SpeakerphoneIcon": | |
| 2141 | -/*!********************************************************!*\ | |
| 2142 | - !*** external "elementorV2.icons['SpeakerphoneIcon']" ***! | |
| 2143 | - \********************************************************/ | |
| 5010 | +/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs": | |
| 5011 | +/*!*******************************************************************!*\ | |
| 5012 | + !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***! | |
| 5013 | + \*******************************************************************/ | |
| 2144 | 5014 | /***/ ((module) => { |
| 2145 | 5015 | |
| 2146 | 5016 | "use strict"; |
| 2147 | -module.exports = elementorV2.icons['SpeakerphoneIcon']; | |
| 2148 | 5017 | |
| 5018 | +var __defProp = Object.defineProperty; | |
| 5019 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5020 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5021 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5022 | +var __copyProps = (to, from, except, desc) => { | |
| 5023 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5024 | + for (let key of __getOwnPropNames(from)) | |
| 5025 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5026 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5027 | + } | |
| 5028 | + return to; | |
| 5029 | +}; | |
| 5030 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5031 | + | |
| 5032 | +// src/types.ts | |
| 5033 | +var types_exports = {}; | |
| 5034 | +module.exports = __toCommonJS(types_exports); | |
| 5035 | +//# sourceMappingURL=types.cjs.map | |
| 5036 | + | |
| 2149 | 5037 | /***/ }), |
| 2150 | 5038 | |
| 2151 | -/***/ "@elementor/query": | |
| 2152 | -/*!************************************!*\ | |
| 2153 | - !*** external "elementorV2.query" ***! | |
| 2154 | - \************************************/ | |
| 5039 | +/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs": | |
| 5040 | +/*!*******************************************************************!*\ | |
| 5041 | + !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***! | |
| 5042 | + \*******************************************************************/ | |
| 2155 | 5043 | /***/ ((module) => { |
| 2156 | 5044 | |
| 2157 | 5045 | "use strict"; |
| 2158 | -module.exports = elementorV2.query; | |
| 2159 | 5046 | |
| 5047 | +var __defProp = Object.defineProperty; | |
| 5048 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5049 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5050 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5051 | +var __export = (target, all) => { | |
| 5052 | + for (var name in all) | |
| 5053 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5054 | +}; | |
| 5055 | +var __copyProps = (to, from, except, desc) => { | |
| 5056 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5057 | + for (let key of __getOwnPropNames(from)) | |
| 5058 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5059 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5060 | + } | |
| 5061 | + return to; | |
| 5062 | +}; | |
| 5063 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5064 | + | |
| 5065 | +// src/utils.ts | |
| 5066 | +var utils_exports = {}; | |
| 5067 | +__export(utils_exports, { | |
| 5068 | + addToEnd: () => addToEnd, | |
| 5069 | + addToStart: () => addToStart, | |
| 5070 | + functionalUpdate: () => functionalUpdate, | |
| 5071 | + hashKey: () => hashKey, | |
| 5072 | + hashQueryKeyByOptions: () => hashQueryKeyByOptions, | |
| 5073 | + isPlainArray: () => isPlainArray, | |
| 5074 | + isPlainObject: () => isPlainObject, | |
| 5075 | + isServer: () => isServer, | |
| 5076 | + isValidTimeout: () => isValidTimeout, | |
| 5077 | + keepPreviousData: () => keepPreviousData, | |
| 5078 | + matchMutation: () => matchMutation, | |
| 5079 | + matchQuery: () => matchQuery, | |
| 5080 | + noop: () => noop, | |
| 5081 | + partialMatchKey: () => partialMatchKey, | |
| 5082 | + replaceData: () => replaceData, | |
| 5083 | + replaceEqualDeep: () => replaceEqualDeep, | |
| 5084 | + scheduleMicrotask: () => scheduleMicrotask, | |
| 5085 | + shallowEqualObjects: () => shallowEqualObjects, | |
| 5086 | + sleep: () => sleep, | |
| 5087 | + timeUntilStale: () => timeUntilStale | |
| 5088 | +}); | |
| 5089 | +module.exports = __toCommonJS(utils_exports); | |
| 5090 | +var isServer = typeof window === "undefined" || "Deno" in window; | |
| 5091 | +function noop() { | |
| 5092 | + return void 0; | |
| 5093 | +} | |
| 5094 | +function functionalUpdate(updater, input) { | |
| 5095 | + return typeof updater === "function" ? updater(input) : updater; | |
| 5096 | +} | |
| 5097 | +function isValidTimeout(value) { | |
| 5098 | + return typeof value === "number" && value >= 0 && value !== Infinity; | |
| 5099 | +} | |
| 5100 | +function timeUntilStale(updatedAt, staleTime) { | |
| 5101 | + return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0); | |
| 5102 | +} | |
| 5103 | +function matchQuery(filters, query) { | |
| 5104 | + const { | |
| 5105 | + type = "all", | |
| 5106 | + exact, | |
| 5107 | + fetchStatus, | |
| 5108 | + predicate, | |
| 5109 | + queryKey, | |
| 5110 | + stale | |
| 5111 | + } = filters; | |
| 5112 | + if (queryKey) { | |
| 5113 | + if (exact) { | |
| 5114 | + if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) { | |
| 5115 | + return false; | |
| 5116 | + } | |
| 5117 | + } else if (!partialMatchKey(query.queryKey, queryKey)) { | |
| 5118 | + return false; | |
| 5119 | + } | |
| 5120 | + } | |
| 5121 | + if (type !== "all") { | |
| 5122 | + const isActive = query.isActive(); | |
| 5123 | + if (type === "active" && !isActive) { | |
| 5124 | + return false; | |
| 5125 | + } | |
| 5126 | + if (type === "inactive" && isActive) { | |
| 5127 | + return false; | |
| 5128 | + } | |
| 5129 | + } | |
| 5130 | + if (typeof stale === "boolean" && query.isStale() !== stale) { | |
| 5131 | + return false; | |
| 5132 | + } | |
| 5133 | + if (typeof fetchStatus !== "undefined" && fetchStatus !== query.state.fetchStatus) { | |
| 5134 | + return false; | |
| 5135 | + } | |
| 5136 | + if (predicate && !predicate(query)) { | |
| 5137 | + return false; | |
| 5138 | + } | |
| 5139 | + return true; | |
| 5140 | +} | |
| 5141 | +function matchMutation(filters, mutation) { | |
| 5142 | + const { exact, status, predicate, mutationKey } = filters; | |
| 5143 | + if (mutationKey) { | |
| 5144 | + if (!mutation.options.mutationKey) { | |
| 5145 | + return false; | |
| 5146 | + } | |
| 5147 | + if (exact) { | |
| 5148 | + if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) { | |
| 5149 | + return false; | |
| 5150 | + } | |
| 5151 | + } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) { | |
| 5152 | + return false; | |
| 5153 | + } | |
| 5154 | + } | |
| 5155 | + if (status && mutation.state.status !== status) { | |
| 5156 | + return false; | |
| 5157 | + } | |
| 5158 | + if (predicate && !predicate(mutation)) { | |
| 5159 | + return false; | |
| 5160 | + } | |
| 5161 | + return true; | |
| 5162 | +} | |
| 5163 | +function hashQueryKeyByOptions(queryKey, options) { | |
| 5164 | + const hashFn = options?.queryKeyHashFn || hashKey; | |
| 5165 | + return hashFn(queryKey); | |
| 5166 | +} | |
| 5167 | +function hashKey(queryKey) { | |
| 5168 | + return JSON.stringify( | |
| 5169 | + queryKey, | |
| 5170 | + (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => { | |
| 5171 | + result[key] = val[key]; | |
| 5172 | + return result; | |
| 5173 | + }, {}) : val | |
| 5174 | + ); | |
| 5175 | +} | |
| 5176 | +function partialMatchKey(a, b) { | |
| 5177 | + if (a === b) { | |
| 5178 | + return true; | |
| 5179 | + } | |
| 5180 | + if (typeof a !== typeof b) { | |
| 5181 | + return false; | |
| 5182 | + } | |
| 5183 | + if (a && b && typeof a === "object" && typeof b === "object") { | |
| 5184 | + return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key])); | |
| 5185 | + } | |
| 5186 | + return false; | |
| 5187 | +} | |
| 5188 | +function replaceEqualDeep(a, b) { | |
| 5189 | + if (a === b) { | |
| 5190 | + return a; | |
| 5191 | + } | |
| 5192 | + const array = isPlainArray(a) && isPlainArray(b); | |
| 5193 | + if (array || isPlainObject(a) && isPlainObject(b)) { | |
| 5194 | + const aSize = array ? a.length : Object.keys(a).length; | |
| 5195 | + const bItems = array ? b : Object.keys(b); | |
| 5196 | + const bSize = bItems.length; | |
| 5197 | + const copy = array ? [] : {}; | |
| 5198 | + let equalItems = 0; | |
| 5199 | + for (let i = 0; i < bSize; i++) { | |
| 5200 | + const key = array ? i : bItems[i]; | |
| 5201 | + copy[key] = replaceEqualDeep(a[key], b[key]); | |
| 5202 | + if (copy[key] === a[key]) { | |
| 5203 | + equalItems++; | |
| 5204 | + } | |
| 5205 | + } | |
| 5206 | + return aSize === bSize && equalItems === aSize ? a : copy; | |
| 5207 | + } | |
| 5208 | + return b; | |
| 5209 | +} | |
| 5210 | +function shallowEqualObjects(a, b) { | |
| 5211 | + if (a && !b || b && !a) { | |
| 5212 | + return false; | |
| 5213 | + } | |
| 5214 | + for (const key in a) { | |
| 5215 | + if (a[key] !== b[key]) { | |
| 5216 | + return false; | |
| 5217 | + } | |
| 5218 | + } | |
| 5219 | + return true; | |
| 5220 | +} | |
| 5221 | +function isPlainArray(value) { | |
| 5222 | + return Array.isArray(value) && value.length === Object.keys(value).length; | |
| 5223 | +} | |
| 5224 | +function isPlainObject(o) { | |
| 5225 | + if (!hasObjectPrototype(o)) { | |
| 5226 | + return false; | |
| 5227 | + } | |
| 5228 | + const ctor = o.constructor; | |
| 5229 | + if (typeof ctor === "undefined") { | |
| 5230 | + return true; | |
| 5231 | + } | |
| 5232 | + const prot = ctor.prototype; | |
| 5233 | + if (!hasObjectPrototype(prot)) { | |
| 5234 | + return false; | |
| 5235 | + } | |
| 5236 | + if (!prot.hasOwnProperty("isPrototypeOf")) { | |
| 5237 | + return false; | |
| 5238 | + } | |
| 5239 | + return true; | |
| 5240 | +} | |
| 5241 | +function hasObjectPrototype(o) { | |
| 5242 | + return Object.prototype.toString.call(o) === "[object Object]"; | |
| 5243 | +} | |
| 5244 | +function sleep(timeout) { | |
| 5245 | + return new Promise((resolve) => { | |
| 5246 | + setTimeout(resolve, timeout); | |
| 5247 | + }); | |
| 5248 | +} | |
| 5249 | +function scheduleMicrotask(callback) { | |
| 5250 | + sleep(0).then(callback); | |
| 5251 | +} | |
| 5252 | +function replaceData(prevData, data, options) { | |
| 5253 | + if (typeof options.structuralSharing === "function") { | |
| 5254 | + return options.structuralSharing(prevData, data); | |
| 5255 | + } else if (options.structuralSharing !== false) { | |
| 5256 | + return replaceEqualDeep(prevData, data); | |
| 5257 | + } | |
| 5258 | + return data; | |
| 5259 | +} | |
| 5260 | +function keepPreviousData(previousData) { | |
| 5261 | + return previousData; | |
| 5262 | +} | |
| 5263 | +function addToEnd(items, item, max = 0) { | |
| 5264 | + const newItems = [...items, item]; | |
| 5265 | + return max && newItems.length > max ? newItems.slice(1) : newItems; | |
| 5266 | +} | |
| 5267 | +function addToStart(items, item, max = 0) { | |
| 5268 | + const newItems = [item, ...items]; | |
| 5269 | + return max && newItems.length > max ? newItems.slice(0, -1) : newItems; | |
| 5270 | +} | |
| 5271 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5272 | +0 && (0); | |
| 5273 | +//# sourceMappingURL=utils.cjs.map | |
| 5274 | + | |
| 2160 | 5275 | /***/ }), |
| 2161 | 5276 | |
| 2162 | -/***/ "@elementor/ui": | |
| 2163 | -/*!*********************************!*\ | |
| 2164 | - !*** external "elementorV2.ui" ***! | |
| 2165 | - \*********************************/ | |
| 5277 | +/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs": | |
| 5278 | +/*!********************************************************************************!*\ | |
| 5279 | + !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***! | |
| 5280 | + \********************************************************************************/ | |
| 5281 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5282 | + | |
| 5283 | +"use strict"; | |
| 5284 | + | |
| 5285 | +"use client"; | |
| 5286 | +var __create = Object.create; | |
| 5287 | +var __defProp = Object.defineProperty; | |
| 5288 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5289 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5290 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5291 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5292 | +var __export = (target, all) => { | |
| 5293 | + for (var name in all) | |
| 5294 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5295 | +}; | |
| 5296 | +var __copyProps = (to, from, except, desc) => { | |
| 5297 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5298 | + for (let key of __getOwnPropNames(from)) | |
| 5299 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5300 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5301 | + } | |
| 5302 | + return to; | |
| 5303 | +}; | |
| 5304 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5305 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5306 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5307 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5308 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5309 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5310 | + mod | |
| 5311 | +)); | |
| 5312 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5313 | + | |
| 5314 | +// src/HydrationBoundary.tsx | |
| 5315 | +var HydrationBoundary_exports = {}; | |
| 5316 | +__export(HydrationBoundary_exports, { | |
| 5317 | + HydrationBoundary: () => HydrationBoundary | |
| 5318 | +}); | |
| 5319 | +module.exports = __toCommonJS(HydrationBoundary_exports); | |
| 5320 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5321 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 5322 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 5323 | +var HydrationBoundary = ({ | |
| 5324 | + children, | |
| 5325 | + options = {}, | |
| 5326 | + state, | |
| 5327 | + queryClient | |
| 5328 | +}) => { | |
| 5329 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 5330 | + const [hydrationQueue, setHydrationQueue] = React.useState(); | |
| 5331 | + const optionsRef = React.useRef(options); | |
| 5332 | + optionsRef.current = options; | |
| 5333 | + React.useMemo(() => { | |
| 5334 | + if (state) { | |
| 5335 | + if (typeof state !== "object") { | |
| 5336 | + return; | |
| 5337 | + } | |
| 5338 | + const queryCache = client.getQueryCache(); | |
| 5339 | + const queries = state.queries || []; | |
| 5340 | + const newQueries = []; | |
| 5341 | + const existingQueries = []; | |
| 5342 | + for (const dehydratedQuery of queries) { | |
| 5343 | + const existingQuery = queryCache.get(dehydratedQuery.queryHash); | |
| 5344 | + if (!existingQuery) { | |
| 5345 | + newQueries.push(dehydratedQuery); | |
| 5346 | + } else { | |
| 5347 | + const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt; | |
| 5348 | + const queryAlreadyQueued = hydrationQueue?.find( | |
| 5349 | + (query) => query.queryHash === dehydratedQuery.queryHash | |
| 5350 | + ); | |
| 5351 | + if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) { | |
| 5352 | + existingQueries.push(dehydratedQuery); | |
| 5353 | + } | |
| 5354 | + } | |
| 5355 | + } | |
| 5356 | + if (newQueries.length > 0) { | |
| 5357 | + (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current); | |
| 5358 | + } | |
| 5359 | + if (existingQueries.length > 0) { | |
| 5360 | + setHydrationQueue( | |
| 5361 | + (prev) => prev ? [...prev, ...existingQueries] : existingQueries | |
| 5362 | + ); | |
| 5363 | + } | |
| 5364 | + } | |
| 5365 | + }, [client, hydrationQueue, state]); | |
| 5366 | + React.useEffect(() => { | |
| 5367 | + if (hydrationQueue) { | |
| 5368 | + (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current); | |
| 5369 | + setHydrationQueue(void 0); | |
| 5370 | + } | |
| 5371 | + }, [client, hydrationQueue]); | |
| 5372 | + return children; | |
| 5373 | +}; | |
| 5374 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5375 | +0 && (0); | |
| 5376 | +//# sourceMappingURL=HydrationBoundary.cjs.map | |
| 5377 | + | |
| 5378 | +/***/ }), | |
| 5379 | + | |
| 5380 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs": | |
| 5381 | +/*!**********************************************************************************!*\ | |
| 5382 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***! | |
| 5383 | + \**********************************************************************************/ | |
| 5384 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5385 | + | |
| 5386 | +"use strict"; | |
| 5387 | + | |
| 5388 | +"use client"; | |
| 5389 | +var __create = Object.create; | |
| 5390 | +var __defProp = Object.defineProperty; | |
| 5391 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5392 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5393 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5394 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5395 | +var __export = (target, all) => { | |
| 5396 | + for (var name in all) | |
| 5397 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5398 | +}; | |
| 5399 | +var __copyProps = (to, from, except, desc) => { | |
| 5400 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5401 | + for (let key of __getOwnPropNames(from)) | |
| 5402 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5403 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5404 | + } | |
| 5405 | + return to; | |
| 5406 | +}; | |
| 5407 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5408 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5409 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5410 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5411 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5412 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5413 | + mod | |
| 5414 | +)); | |
| 5415 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5416 | + | |
| 5417 | +// src/QueryClientProvider.tsx | |
| 5418 | +var QueryClientProvider_exports = {}; | |
| 5419 | +__export(QueryClientProvider_exports, { | |
| 5420 | + QueryClientContext: () => QueryClientContext, | |
| 5421 | + QueryClientProvider: () => QueryClientProvider, | |
| 5422 | + useQueryClient: () => useQueryClient | |
| 5423 | +}); | |
| 5424 | +module.exports = __toCommonJS(QueryClientProvider_exports); | |
| 5425 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5426 | +var QueryClientContext = React.createContext( | |
| 5427 | + void 0 | |
| 5428 | +); | |
| 5429 | +var useQueryClient = (queryClient) => { | |
| 5430 | + const client = React.useContext(QueryClientContext); | |
| 5431 | + if (queryClient) { | |
| 5432 | + return queryClient; | |
| 5433 | + } | |
| 5434 | + if (!client) { | |
| 5435 | + throw new Error("No QueryClient set, use QueryClientProvider to set one"); | |
| 5436 | + } | |
| 5437 | + return client; | |
| 5438 | +}; | |
| 5439 | +var QueryClientProvider = ({ | |
| 5440 | + client, | |
| 5441 | + children | |
| 5442 | +}) => { | |
| 5443 | + React.useEffect(() => { | |
| 5444 | + client.mount(); | |
| 5445 | + return () => { | |
| 5446 | + client.unmount(); | |
| 5447 | + }; | |
| 5448 | + }, [client]); | |
| 5449 | + return /* @__PURE__ */ React.createElement(QueryClientContext.Provider, { value: client }, children); | |
| 5450 | +}; | |
| 5451 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5452 | +0 && (0); | |
| 5453 | +//# sourceMappingURL=QueryClientProvider.cjs.map | |
| 5454 | + | |
| 5455 | +/***/ }), | |
| 5456 | + | |
| 5457 | +/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs": | |
| 5458 | +/*!**************************************************************************************!*\ | |
| 5459 | + !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***! | |
| 5460 | + \**************************************************************************************/ | |
| 5461 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5462 | + | |
| 5463 | +"use strict"; | |
| 5464 | + | |
| 5465 | +"use client"; | |
| 5466 | +var __create = Object.create; | |
| 5467 | +var __defProp = Object.defineProperty; | |
| 5468 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5469 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5470 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5471 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5472 | +var __export = (target, all) => { | |
| 5473 | + for (var name in all) | |
| 5474 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5475 | +}; | |
| 5476 | +var __copyProps = (to, from, except, desc) => { | |
| 5477 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5478 | + for (let key of __getOwnPropNames(from)) | |
| 5479 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5480 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5481 | + } | |
| 5482 | + return to; | |
| 5483 | +}; | |
| 5484 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5485 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5486 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5487 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5488 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5489 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5490 | + mod | |
| 5491 | +)); | |
| 5492 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5493 | + | |
| 5494 | +// src/QueryErrorResetBoundary.tsx | |
| 5495 | +var QueryErrorResetBoundary_exports = {}; | |
| 5496 | +__export(QueryErrorResetBoundary_exports, { | |
| 5497 | + QueryErrorResetBoundary: () => QueryErrorResetBoundary, | |
| 5498 | + useQueryErrorResetBoundary: () => useQueryErrorResetBoundary | |
| 5499 | +}); | |
| 5500 | +module.exports = __toCommonJS(QueryErrorResetBoundary_exports); | |
| 5501 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5502 | +function createValue() { | |
| 5503 | + let isReset = false; | |
| 5504 | + return { | |
| 5505 | + clearReset: () => { | |
| 5506 | + isReset = false; | |
| 5507 | + }, | |
| 5508 | + reset: () => { | |
| 5509 | + isReset = true; | |
| 5510 | + }, | |
| 5511 | + isReset: () => { | |
| 5512 | + return isReset; | |
| 5513 | + } | |
| 5514 | + }; | |
| 5515 | +} | |
| 5516 | +var QueryErrorResetBoundaryContext = React.createContext(createValue()); | |
| 5517 | +var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext); | |
| 5518 | +var QueryErrorResetBoundary = ({ | |
| 5519 | + children | |
| 5520 | +}) => { | |
| 5521 | + const [value] = React.useState(() => createValue()); | |
| 5522 | + return /* @__PURE__ */ React.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children); | |
| 5523 | +}; | |
| 5524 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5525 | +0 && (0); | |
| 5526 | +//# sourceMappingURL=QueryErrorResetBoundary.cjs.map | |
| 5527 | + | |
| 5528 | +/***/ }), | |
| 5529 | + | |
| 5530 | +/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs": | |
| 5531 | +/*!*********************************************************************************!*\ | |
| 5532 | + !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***! | |
| 5533 | + \*********************************************************************************/ | |
| 5534 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5535 | + | |
| 5536 | +"use strict"; | |
| 5537 | + | |
| 5538 | +"use client"; | |
| 5539 | +var __create = Object.create; | |
| 5540 | +var __defProp = Object.defineProperty; | |
| 5541 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5542 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5543 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5544 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5545 | +var __export = (target, all) => { | |
| 5546 | + for (var name in all) | |
| 5547 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5548 | +}; | |
| 5549 | +var __copyProps = (to, from, except, desc) => { | |
| 5550 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5551 | + for (let key of __getOwnPropNames(from)) | |
| 5552 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5553 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5554 | + } | |
| 5555 | + return to; | |
| 5556 | +}; | |
| 5557 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5558 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5559 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5560 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5561 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5562 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5563 | + mod | |
| 5564 | +)); | |
| 5565 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5566 | + | |
| 5567 | +// src/errorBoundaryUtils.ts | |
| 5568 | +var errorBoundaryUtils_exports = {}; | |
| 5569 | +__export(errorBoundaryUtils_exports, { | |
| 5570 | + ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry, | |
| 5571 | + getHasError: () => getHasError, | |
| 5572 | + useClearResetErrorBoundary: () => useClearResetErrorBoundary | |
| 5573 | +}); | |
| 5574 | +module.exports = __toCommonJS(errorBoundaryUtils_exports); | |
| 5575 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5576 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 5577 | +var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => { | |
| 5578 | + if (options.suspense || options.throwOnError) { | |
| 5579 | + if (!errorResetBoundary.isReset()) { | |
| 5580 | + options.retryOnMount = false; | |
| 5581 | + } | |
| 5582 | + } | |
| 5583 | +}; | |
| 5584 | +var useClearResetErrorBoundary = (errorResetBoundary) => { | |
| 5585 | + React.useEffect(() => { | |
| 5586 | + errorResetBoundary.clearReset(); | |
| 5587 | + }, [errorResetBoundary]); | |
| 5588 | +}; | |
| 5589 | +var getHasError = ({ | |
| 5590 | + result, | |
| 5591 | + errorResetBoundary, | |
| 5592 | + throwOnError, | |
| 5593 | + query | |
| 5594 | +}) => { | |
| 5595 | + return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]); | |
| 5596 | +}; | |
| 5597 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5598 | +0 && (0); | |
| 5599 | +//# sourceMappingURL=errorBoundaryUtils.cjs.map | |
| 5600 | + | |
| 5601 | +/***/ }), | |
| 5602 | + | |
| 5603 | +/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs": | |
| 5604 | +/*!********************************************************************!*\ | |
| 5605 | + !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***! | |
| 5606 | + \********************************************************************/ | |
| 5607 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5608 | + | |
| 5609 | +"use strict"; | |
| 5610 | + | |
| 5611 | +var __defProp = Object.defineProperty; | |
| 5612 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5613 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5614 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5615 | +var __export = (target, all) => { | |
| 5616 | + for (var name in all) | |
| 5617 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5618 | +}; | |
| 5619 | +var __copyProps = (to, from, except, desc) => { | |
| 5620 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5621 | + for (let key of __getOwnPropNames(from)) | |
| 5622 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5623 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5624 | + } | |
| 5625 | + return to; | |
| 5626 | +}; | |
| 5627 | +var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default")); | |
| 5628 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5629 | + | |
| 5630 | +// src/index.ts | |
| 5631 | +var src_exports = {}; | |
| 5632 | +__export(src_exports, { | |
| 5633 | + HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary, | |
| 5634 | + IsRestoringProvider: () => import_isRestoring.IsRestoringProvider, | |
| 5635 | + QueryClientContext: () => import_QueryClientProvider.QueryClientContext, | |
| 5636 | + QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider, | |
| 5637 | + QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary, | |
| 5638 | + infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions, | |
| 5639 | + queryOptions: () => import_queryOptions.queryOptions, | |
| 5640 | + useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery, | |
| 5641 | + useIsFetching: () => import_useIsFetching.useIsFetching, | |
| 5642 | + useIsMutating: () => import_useMutationState.useIsMutating, | |
| 5643 | + useIsRestoring: () => import_isRestoring.useIsRestoring, | |
| 5644 | + useMutation: () => import_useMutation.useMutation, | |
| 5645 | + useMutationState: () => import_useMutationState.useMutationState, | |
| 5646 | + useQueries: () => import_useQueries.useQueries, | |
| 5647 | + useQuery: () => import_useQuery.useQuery, | |
| 5648 | + useQueryClient: () => import_QueryClientProvider.useQueryClient, | |
| 5649 | + useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary, | |
| 5650 | + useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery, | |
| 5651 | + useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries, | |
| 5652 | + useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery | |
| 5653 | +}); | |
| 5654 | +module.exports = __toCommonJS(src_exports); | |
| 5655 | +__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports); | |
| 5656 | +__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports); | |
| 5657 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 5658 | +var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs"); | |
| 5659 | +var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs"); | |
| 5660 | +var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs"); | |
| 5661 | +var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs"); | |
| 5662 | +var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs"); | |
| 5663 | +var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs"); | |
| 5664 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 5665 | +var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs"); | |
| 5666 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 5667 | +var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs"); | |
| 5668 | +var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs"); | |
| 5669 | +var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs"); | |
| 5670 | +var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs"); | |
| 5671 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 5672 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5673 | +0 && (0); | |
| 5674 | +//# sourceMappingURL=index.cjs.map | |
| 5675 | + | |
| 5676 | +/***/ }), | |
| 5677 | + | |
| 5678 | +/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs": | |
| 5679 | +/*!***********************************************************************************!*\ | |
| 5680 | + !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***! | |
| 5681 | + \***********************************************************************************/ | |
| 2166 | 5682 | /***/ ((module) => { |
| 2167 | 5683 | |
| 2168 | 5684 | "use strict"; |
| 2169 | -module.exports = elementorV2.ui; | |
| 2170 | 5685 | |
| 5686 | +var __defProp = Object.defineProperty; | |
| 5687 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5688 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5689 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5690 | +var __export = (target, all) => { | |
| 5691 | + for (var name in all) | |
| 5692 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5693 | +}; | |
| 5694 | +var __copyProps = (to, from, except, desc) => { | |
| 5695 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5696 | + for (let key of __getOwnPropNames(from)) | |
| 5697 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5698 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5699 | + } | |
| 5700 | + return to; | |
| 5701 | +}; | |
| 5702 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5703 | + | |
| 5704 | +// src/infiniteQueryOptions.ts | |
| 5705 | +var infiniteQueryOptions_exports = {}; | |
| 5706 | +__export(infiniteQueryOptions_exports, { | |
| 5707 | + infiniteQueryOptions: () => infiniteQueryOptions | |
| 5708 | +}); | |
| 5709 | +module.exports = __toCommonJS(infiniteQueryOptions_exports); | |
| 5710 | +function infiniteQueryOptions(options) { | |
| 5711 | + return options; | |
| 5712 | +} | |
| 5713 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5714 | +0 && (0); | |
| 5715 | +//# sourceMappingURL=infiniteQueryOptions.cjs.map | |
| 5716 | + | |
| 2171 | 5717 | /***/ }), |
| 2172 | 5718 | |
| 2173 | -/***/ "@wordpress/i18n": | |
| 2174 | -/*!**************************!*\ | |
| 2175 | - !*** external "wp.i18n" ***! | |
| 2176 | - \**************************/ | |
| 5719 | +/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs": | |
| 5720 | +/*!**************************************************************************!*\ | |
| 5721 | + !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***! | |
| 5722 | + \**************************************************************************/ | |
| 5723 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5724 | + | |
| 5725 | +"use strict"; | |
| 5726 | + | |
| 5727 | +"use client"; | |
| 5728 | +var __create = Object.create; | |
| 5729 | +var __defProp = Object.defineProperty; | |
| 5730 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5731 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5732 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5733 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5734 | +var __export = (target, all) => { | |
| 5735 | + for (var name in all) | |
| 5736 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5737 | +}; | |
| 5738 | +var __copyProps = (to, from, except, desc) => { | |
| 5739 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5740 | + for (let key of __getOwnPropNames(from)) | |
| 5741 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5742 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5743 | + } | |
| 5744 | + return to; | |
| 5745 | +}; | |
| 5746 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5747 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5748 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5749 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5750 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5751 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5752 | + mod | |
| 5753 | +)); | |
| 5754 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5755 | + | |
| 5756 | +// src/isRestoring.ts | |
| 5757 | +var isRestoring_exports = {}; | |
| 5758 | +__export(isRestoring_exports, { | |
| 5759 | + IsRestoringProvider: () => IsRestoringProvider, | |
| 5760 | + useIsRestoring: () => useIsRestoring | |
| 5761 | +}); | |
| 5762 | +module.exports = __toCommonJS(isRestoring_exports); | |
| 5763 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5764 | +var IsRestoringContext = React.createContext(false); | |
| 5765 | +var useIsRestoring = () => React.useContext(IsRestoringContext); | |
| 5766 | +var IsRestoringProvider = IsRestoringContext.Provider; | |
| 5767 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5768 | +0 && (0); | |
| 5769 | +//# sourceMappingURL=isRestoring.cjs.map | |
| 5770 | + | |
| 5771 | +/***/ }), | |
| 5772 | + | |
| 5773 | +/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs": | |
| 5774 | +/*!***************************************************************************!*\ | |
| 5775 | + !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***! | |
| 5776 | + \***************************************************************************/ | |
| 2177 | 5777 | /***/ ((module) => { |
| 2178 | 5778 | |
| 2179 | 5779 | "use strict"; |
| 2180 | -module.exports = wp.i18n; | |
| 2181 | 5780 | |
| 5781 | +var __defProp = Object.defineProperty; | |
| 5782 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5783 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5784 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5785 | +var __export = (target, all) => { | |
| 5786 | + for (var name in all) | |
| 5787 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5788 | +}; | |
| 5789 | +var __copyProps = (to, from, except, desc) => { | |
| 5790 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5791 | + for (let key of __getOwnPropNames(from)) | |
| 5792 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5793 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5794 | + } | |
| 5795 | + return to; | |
| 5796 | +}; | |
| 5797 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5798 | + | |
| 5799 | +// src/queryOptions.ts | |
| 5800 | +var queryOptions_exports = {}; | |
| 5801 | +__export(queryOptions_exports, { | |
| 5802 | + queryOptions: () => queryOptions | |
| 5803 | +}); | |
| 5804 | +module.exports = __toCommonJS(queryOptions_exports); | |
| 5805 | +function queryOptions(options) { | |
| 5806 | + return options; | |
| 5807 | +} | |
| 5808 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5809 | +0 && (0); | |
| 5810 | +//# sourceMappingURL=queryOptions.cjs.map | |
| 5811 | + | |
| 2182 | 5812 | /***/ }), |
| 2183 | 5813 | |
| 2184 | -/***/ "react": | |
| 2185 | -/*!************************!*\ | |
| 2186 | - !*** external "React" ***! | |
| 2187 | - \************************/ | |
| 5814 | +/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs": | |
| 5815 | +/*!***********************************************************************!*\ | |
| 5816 | + !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***! | |
| 5817 | + \***********************************************************************/ | |
| 2188 | 5818 | /***/ ((module) => { |
| 2189 | 5819 | |
| 2190 | 5820 | "use strict"; |
| 2191 | -module.exports = React; | |
| 2192 | 5821 | |
| 5822 | +var __defProp = Object.defineProperty; | |
| 5823 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5824 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5825 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5826 | +var __export = (target, all) => { | |
| 5827 | + for (var name in all) | |
| 5828 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5829 | +}; | |
| 5830 | +var __copyProps = (to, from, except, desc) => { | |
| 5831 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5832 | + for (let key of __getOwnPropNames(from)) | |
| 5833 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5834 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5835 | + } | |
| 5836 | + return to; | |
| 5837 | +}; | |
| 5838 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5839 | + | |
| 5840 | +// src/suspense.ts | |
| 5841 | +var suspense_exports = {}; | |
| 5842 | +__export(suspense_exports, { | |
| 5843 | + defaultThrowOnError: () => defaultThrowOnError, | |
| 5844 | + ensureStaleTime: () => ensureStaleTime, | |
| 5845 | + fetchOptimistic: () => fetchOptimistic, | |
| 5846 | + shouldSuspend: () => shouldSuspend, | |
| 5847 | + willFetch: () => willFetch | |
| 5848 | +}); | |
| 5849 | +module.exports = __toCommonJS(suspense_exports); | |
| 5850 | +var defaultThrowOnError = (_error, query) => typeof query.state.data === "undefined"; | |
| 5851 | +var ensureStaleTime = (defaultedOptions) => { | |
| 5852 | + if (defaultedOptions.suspense) { | |
| 5853 | + if (typeof defaultedOptions.staleTime !== "number") { | |
| 5854 | + defaultedOptions.staleTime = 1e3; | |
| 5855 | + } | |
| 5856 | + } | |
| 5857 | +}; | |
| 5858 | +var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring; | |
| 5859 | +var shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring); | |
| 5860 | +var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => { | |
| 5861 | + errorResetBoundary.clearReset(); | |
| 5862 | +}); | |
| 5863 | +// Annotate the CommonJS export names for ESM import in node: | |
| 5864 | +0 && (0); | |
| 5865 | +//# sourceMappingURL=suspense.cjs.map | |
| 5866 | + | |
| 2193 | 5867 | /***/ }), |
| 2194 | 5868 | |
| 2195 | -/***/ "react-dom": | |
| 2196 | -/*!***************************!*\ | |
| 2197 | - !*** external "ReactDOM" ***! | |
| 2198 | - \***************************/ | |
| 5869 | +/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs": | |
| 5870 | +/*!********************************************************************!*\ | |
| 5871 | + !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***! | |
| 5872 | + \********************************************************************/ | |
| 2199 | 5873 | /***/ ((module) => { |
| 2200 | 5874 | |
| 2201 | 5875 | "use strict"; |
| 2202 | -module.exports = ReactDOM; | |
| 2203 | 5876 | |
| 5877 | +var __defProp = Object.defineProperty; | |
| 5878 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5879 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5880 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5881 | +var __copyProps = (to, from, except, desc) => { | |
| 5882 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5883 | + for (let key of __getOwnPropNames(from)) | |
| 5884 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5885 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5886 | + } | |
| 5887 | + return to; | |
| 5888 | +}; | |
| 5889 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5890 | + | |
| 5891 | +// src/types.ts | |
| 5892 | +var types_exports = {}; | |
| 5893 | +module.exports = __toCommonJS(types_exports); | |
| 5894 | +//# sourceMappingURL=types.cjs.map | |
| 5895 | + | |
| 5896 | +/***/ }), | |
| 5897 | + | |
| 5898 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs": | |
| 5899 | +/*!***************************************************************************!*\ | |
| 5900 | + !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***! | |
| 5901 | + \***************************************************************************/ | |
| 5902 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 5903 | + | |
| 5904 | +"use strict"; | |
| 5905 | + | |
| 5906 | +"use client"; | |
| 5907 | +var __create = Object.create; | |
| 5908 | +var __defProp = Object.defineProperty; | |
| 5909 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 5910 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 5911 | +var __getProtoOf = Object.getPrototypeOf; | |
| 5912 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 5913 | +var __export = (target, all) => { | |
| 5914 | + for (var name in all) | |
| 5915 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 5916 | +}; | |
| 5917 | +var __copyProps = (to, from, except, desc) => { | |
| 5918 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 5919 | + for (let key of __getOwnPropNames(from)) | |
| 5920 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 5921 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 5922 | + } | |
| 5923 | + return to; | |
| 5924 | +}; | |
| 5925 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 5926 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 5927 | + // file that has been converted to a CommonJS file using a Babel- | |
| 5928 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 5929 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 5930 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 5931 | + mod | |
| 5932 | +)); | |
| 5933 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 5934 | + | |
| 5935 | +// src/useBaseQuery.ts | |
| 5936 | +var useBaseQuery_exports = {}; | |
| 5937 | +__export(useBaseQuery_exports, { | |
| 5938 | + useBaseQuery: () => useBaseQuery | |
| 5939 | +}); | |
| 5940 | +module.exports = __toCommonJS(useBaseQuery_exports); | |
| 5941 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 5942 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 5943 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 5944 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 5945 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 5946 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 5947 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 5948 | +function useBaseQuery(options, Observer, queryClient) { | |
| 5949 | + if (true) { | |
| 5950 | + if (typeof options !== "object" || Array.isArray(options)) { | |
| 5951 | + throw new Error( | |
| 5952 | + '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' | |
| 5953 | + ); | |
| 5954 | + } | |
| 5955 | + } | |
| 5956 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 5957 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 5958 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 5959 | + const defaultedOptions = client.defaultQueryOptions(options); | |
| 5960 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 5961 | + (0, import_suspense.ensureStaleTime)(defaultedOptions); | |
| 5962 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary); | |
| 5963 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 5964 | + const [observer] = React.useState( | |
| 5965 | + () => new Observer( | |
| 5966 | + client, | |
| 5967 | + defaultedOptions | |
| 5968 | + ) | |
| 5969 | + ); | |
| 5970 | + const result = observer.getOptimisticResult(defaultedOptions); | |
| 5971 | + React.useSyncExternalStore( | |
| 5972 | + React.useCallback( | |
| 5973 | + (onStoreChange) => { | |
| 5974 | + const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)); | |
| 5975 | + observer.updateResult(); | |
| 5976 | + return unsubscribe; | |
| 5977 | + }, | |
| 5978 | + [observer, isRestoring] | |
| 5979 | + ), | |
| 5980 | + () => observer.getCurrentResult(), | |
| 5981 | + () => observer.getCurrentResult() | |
| 5982 | + ); | |
| 5983 | + React.useEffect(() => { | |
| 5984 | + observer.setOptions(defaultedOptions, { listeners: false }); | |
| 5985 | + }, [defaultedOptions, observer]); | |
| 5986 | + if ((0, import_suspense.shouldSuspend)(defaultedOptions, result, isRestoring)) { | |
| 5987 | + throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary); | |
| 5988 | + } | |
| 5989 | + if ((0, import_errorBoundaryUtils.getHasError)({ | |
| 5990 | + result, | |
| 5991 | + errorResetBoundary, | |
| 5992 | + throwOnError: defaultedOptions.throwOnError, | |
| 5993 | + query: observer.getCurrentQuery() | |
| 5994 | + })) { | |
| 5995 | + throw result.error; | |
| 5996 | + } | |
| 5997 | + return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result; | |
| 5998 | +} | |
| 5999 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6000 | +0 && (0); | |
| 6001 | +//# sourceMappingURL=useBaseQuery.cjs.map | |
| 6002 | + | |
| 6003 | +/***/ }), | |
| 6004 | + | |
| 6005 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs": | |
| 6006 | +/*!*******************************************************************************!*\ | |
| 6007 | + !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***! | |
| 6008 | + \*******************************************************************************/ | |
| 6009 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6010 | + | |
| 6011 | +"use strict"; | |
| 6012 | + | |
| 6013 | +"use client"; | |
| 6014 | +var __defProp = Object.defineProperty; | |
| 6015 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6016 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6017 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6018 | +var __export = (target, all) => { | |
| 6019 | + for (var name in all) | |
| 6020 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6021 | +}; | |
| 6022 | +var __copyProps = (to, from, except, desc) => { | |
| 6023 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6024 | + for (let key of __getOwnPropNames(from)) | |
| 6025 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6026 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6027 | + } | |
| 6028 | + return to; | |
| 6029 | +}; | |
| 6030 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6031 | + | |
| 6032 | +// src/useInfiniteQuery.ts | |
| 6033 | +var useInfiniteQuery_exports = {}; | |
| 6034 | +__export(useInfiniteQuery_exports, { | |
| 6035 | + useInfiniteQuery: () => useInfiniteQuery | |
| 6036 | +}); | |
| 6037 | +module.exports = __toCommonJS(useInfiniteQuery_exports); | |
| 6038 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6039 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 6040 | +function useInfiniteQuery(options, queryClient) { | |
| 6041 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 6042 | + options, | |
| 6043 | + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | |
| 6044 | + import_query_core.InfiniteQueryObserver, | |
| 6045 | + queryClient | |
| 6046 | + ); | |
| 6047 | +} | |
| 6048 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6049 | +0 && (0); | |
| 6050 | +//# sourceMappingURL=useInfiniteQuery.cjs.map | |
| 6051 | + | |
| 6052 | +/***/ }), | |
| 6053 | + | |
| 6054 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs": | |
| 6055 | +/*!****************************************************************************!*\ | |
| 6056 | + !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***! | |
| 6057 | + \****************************************************************************/ | |
| 6058 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6059 | + | |
| 6060 | +"use strict"; | |
| 6061 | + | |
| 6062 | +"use client"; | |
| 6063 | +var __create = Object.create; | |
| 6064 | +var __defProp = Object.defineProperty; | |
| 6065 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6066 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6067 | +var __getProtoOf = Object.getPrototypeOf; | |
| 6068 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6069 | +var __export = (target, all) => { | |
| 6070 | + for (var name in all) | |
| 6071 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6072 | +}; | |
| 6073 | +var __copyProps = (to, from, except, desc) => { | |
| 6074 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6075 | + for (let key of __getOwnPropNames(from)) | |
| 6076 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6077 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6078 | + } | |
| 6079 | + return to; | |
| 6080 | +}; | |
| 6081 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 6082 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 6083 | + // file that has been converted to a CommonJS file using a Babel- | |
| 6084 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 6085 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 6086 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 6087 | + mod | |
| 6088 | +)); | |
| 6089 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6090 | + | |
| 6091 | +// src/useIsFetching.ts | |
| 6092 | +var useIsFetching_exports = {}; | |
| 6093 | +__export(useIsFetching_exports, { | |
| 6094 | + useIsFetching: () => useIsFetching | |
| 6095 | +}); | |
| 6096 | +module.exports = __toCommonJS(useIsFetching_exports); | |
| 6097 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 6098 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6099 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 6100 | +function useIsFetching(filters, queryClient) { | |
| 6101 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 6102 | + const queryCache = client.getQueryCache(); | |
| 6103 | + return React.useSyncExternalStore( | |
| 6104 | + React.useCallback( | |
| 6105 | + (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 6106 | + [queryCache] | |
| 6107 | + ), | |
| 6108 | + () => client.isFetching(filters), | |
| 6109 | + () => client.isFetching(filters) | |
| 6110 | + ); | |
| 6111 | +} | |
| 6112 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6113 | +0 && (0); | |
| 6114 | +//# sourceMappingURL=useIsFetching.cjs.map | |
| 6115 | + | |
| 6116 | +/***/ }), | |
| 6117 | + | |
| 6118 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs": | |
| 6119 | +/*!**************************************************************************!*\ | |
| 6120 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***! | |
| 6121 | + \**************************************************************************/ | |
| 6122 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6123 | + | |
| 6124 | +"use strict"; | |
| 6125 | + | |
| 6126 | +"use client"; | |
| 6127 | +var __create = Object.create; | |
| 6128 | +var __defProp = Object.defineProperty; | |
| 6129 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6130 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6131 | +var __getProtoOf = Object.getPrototypeOf; | |
| 6132 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6133 | +var __export = (target, all) => { | |
| 6134 | + for (var name in all) | |
| 6135 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6136 | +}; | |
| 6137 | +var __copyProps = (to, from, except, desc) => { | |
| 6138 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6139 | + for (let key of __getOwnPropNames(from)) | |
| 6140 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6141 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6142 | + } | |
| 6143 | + return to; | |
| 6144 | +}; | |
| 6145 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 6146 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 6147 | + // file that has been converted to a CommonJS file using a Babel- | |
| 6148 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 6149 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 6150 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 6151 | + mod | |
| 6152 | +)); | |
| 6153 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6154 | + | |
| 6155 | +// src/useMutation.ts | |
| 6156 | +var useMutation_exports = {}; | |
| 6157 | +__export(useMutation_exports, { | |
| 6158 | + useMutation: () => useMutation | |
| 6159 | +}); | |
| 6160 | +module.exports = __toCommonJS(useMutation_exports); | |
| 6161 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 6162 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6163 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 6164 | +var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs"); | |
| 6165 | +function useMutation(options, queryClient) { | |
| 6166 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 6167 | + const [observer] = React.useState( | |
| 6168 | + () => new import_query_core.MutationObserver( | |
| 6169 | + client, | |
| 6170 | + options | |
| 6171 | + ) | |
| 6172 | + ); | |
| 6173 | + React.useEffect(() => { | |
| 6174 | + observer.setOptions(options); | |
| 6175 | + }, [observer, options]); | |
| 6176 | + const result = React.useSyncExternalStore( | |
| 6177 | + React.useCallback( | |
| 6178 | + (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 6179 | + [observer] | |
| 6180 | + ), | |
| 6181 | + () => observer.getCurrentResult(), | |
| 6182 | + () => observer.getCurrentResult() | |
| 6183 | + ); | |
| 6184 | + const mutate = React.useCallback( | |
| 6185 | + (variables, mutateOptions) => { | |
| 6186 | + observer.mutate(variables, mutateOptions).catch(noop); | |
| 6187 | + }, | |
| 6188 | + [observer] | |
| 6189 | + ); | |
| 6190 | + if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) { | |
| 6191 | + throw result.error; | |
| 6192 | + } | |
| 6193 | + return { ...result, mutate, mutateAsync: result.mutate }; | |
| 6194 | +} | |
| 6195 | +function noop() { | |
| 6196 | +} | |
| 6197 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6198 | +0 && (0); | |
| 6199 | +//# sourceMappingURL=useMutation.cjs.map | |
| 6200 | + | |
| 6201 | +/***/ }), | |
| 6202 | + | |
| 6203 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs": | |
| 6204 | +/*!*******************************************************************************!*\ | |
| 6205 | + !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***! | |
| 6206 | + \*******************************************************************************/ | |
| 6207 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6208 | + | |
| 6209 | +"use strict"; | |
| 6210 | + | |
| 6211 | +"use client"; | |
| 6212 | +var __create = Object.create; | |
| 6213 | +var __defProp = Object.defineProperty; | |
| 6214 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6215 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6216 | +var __getProtoOf = Object.getPrototypeOf; | |
| 6217 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6218 | +var __export = (target, all) => { | |
| 6219 | + for (var name in all) | |
| 6220 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6221 | +}; | |
| 6222 | +var __copyProps = (to, from, except, desc) => { | |
| 6223 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6224 | + for (let key of __getOwnPropNames(from)) | |
| 6225 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6226 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6227 | + } | |
| 6228 | + return to; | |
| 6229 | +}; | |
| 6230 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 6231 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 6232 | + // file that has been converted to a CommonJS file using a Babel- | |
| 6233 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 6234 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 6235 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 6236 | + mod | |
| 6237 | +)); | |
| 6238 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6239 | + | |
| 6240 | +// src/useMutationState.ts | |
| 6241 | +var useMutationState_exports = {}; | |
| 6242 | +__export(useMutationState_exports, { | |
| 6243 | + useIsMutating: () => useIsMutating, | |
| 6244 | + useMutationState: () => useMutationState | |
| 6245 | +}); | |
| 6246 | +module.exports = __toCommonJS(useMutationState_exports); | |
| 6247 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 6248 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6249 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 6250 | +function useIsMutating(filters, queryClient) { | |
| 6251 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 6252 | + return useMutationState( | |
| 6253 | + { filters: { ...filters, status: "pending" } }, | |
| 6254 | + client | |
| 6255 | + ).length; | |
| 6256 | +} | |
| 6257 | +function getResult(mutationCache, options) { | |
| 6258 | + return mutationCache.findAll(options.filters).map( | |
| 6259 | + (mutation) => options.select ? options.select( | |
| 6260 | + mutation | |
| 6261 | + ) : mutation.state | |
| 6262 | + ); | |
| 6263 | +} | |
| 6264 | +function useMutationState(options = {}, queryClient) { | |
| 6265 | + const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache(); | |
| 6266 | + const optionsRef = React.useRef(options); | |
| 6267 | + const result = React.useRef(); | |
| 6268 | + if (!result.current) { | |
| 6269 | + result.current = getResult(mutationCache, options); | |
| 6270 | + } | |
| 6271 | + React.useEffect(() => { | |
| 6272 | + optionsRef.current = options; | |
| 6273 | + }); | |
| 6274 | + return React.useSyncExternalStore( | |
| 6275 | + React.useCallback( | |
| 6276 | + (onStoreChange) => mutationCache.subscribe(() => { | |
| 6277 | + const nextResult = (0, import_query_core.replaceEqualDeep)( | |
| 6278 | + result.current, | |
| 6279 | + getResult(mutationCache, optionsRef.current) | |
| 6280 | + ); | |
| 6281 | + if (result.current !== nextResult) { | |
| 6282 | + result.current = nextResult; | |
| 6283 | + import_query_core.notifyManager.schedule(onStoreChange); | |
| 6284 | + } | |
| 6285 | + }), | |
| 6286 | + [mutationCache] | |
| 6287 | + ), | |
| 6288 | + () => result.current, | |
| 6289 | + () => result.current | |
| 6290 | + ); | |
| 6291 | +} | |
| 6292 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6293 | +0 && (0); | |
| 6294 | +//# sourceMappingURL=useMutationState.cjs.map | |
| 6295 | + | |
| 6296 | +/***/ }), | |
| 6297 | + | |
| 6298 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs": | |
| 6299 | +/*!*************************************************************************!*\ | |
| 6300 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***! | |
| 6301 | + \*************************************************************************/ | |
| 6302 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6303 | + | |
| 6304 | +"use strict"; | |
| 6305 | + | |
| 6306 | +"use client"; | |
| 6307 | +var __create = Object.create; | |
| 6308 | +var __defProp = Object.defineProperty; | |
| 6309 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6310 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6311 | +var __getProtoOf = Object.getPrototypeOf; | |
| 6312 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6313 | +var __export = (target, all) => { | |
| 6314 | + for (var name in all) | |
| 6315 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6316 | +}; | |
| 6317 | +var __copyProps = (to, from, except, desc) => { | |
| 6318 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6319 | + for (let key of __getOwnPropNames(from)) | |
| 6320 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6321 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6322 | + } | |
| 6323 | + return to; | |
| 6324 | +}; | |
| 6325 | +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 6326 | + // If the importer is in node compatibility mode or this is not an ESM | |
| 6327 | + // file that has been converted to a CommonJS file using a Babel- | |
| 6328 | + // compatible transform (i.e. "__esModule" has not been set), then set | |
| 6329 | + // "default" to the CommonJS "module.exports" for node compatibility. | |
| 6330 | + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 6331 | + mod | |
| 6332 | +)); | |
| 6333 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6334 | + | |
| 6335 | +// src/useQueries.ts | |
| 6336 | +var useQueries_exports = {}; | |
| 6337 | +__export(useQueries_exports, { | |
| 6338 | + useQueries: () => useQueries | |
| 6339 | +}); | |
| 6340 | +module.exports = __toCommonJS(useQueries_exports); | |
| 6341 | +var React = __toESM(__webpack_require__(/*! react */ "react"), 1); | |
| 6342 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6343 | +var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs"); | |
| 6344 | +var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs"); | |
| 6345 | +var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs"); | |
| 6346 | +var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs"); | |
| 6347 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 6348 | +function useQueries({ | |
| 6349 | + queries, | |
| 6350 | + ...options | |
| 6351 | +}, queryClient) { | |
| 6352 | + const client = (0, import_QueryClientProvider.useQueryClient)(queryClient); | |
| 6353 | + const isRestoring = (0, import_isRestoring.useIsRestoring)(); | |
| 6354 | + const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)(); | |
| 6355 | + const defaultedQueries = React.useMemo( | |
| 6356 | + () => queries.map((opts) => { | |
| 6357 | + const defaultedOptions = client.defaultQueryOptions(opts); | |
| 6358 | + defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic"; | |
| 6359 | + return defaultedOptions; | |
| 6360 | + }), | |
| 6361 | + [queries, client, isRestoring] | |
| 6362 | + ); | |
| 6363 | + defaultedQueries.forEach((query) => { | |
| 6364 | + (0, import_suspense.ensureStaleTime)(query); | |
| 6365 | + (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary); | |
| 6366 | + }); | |
| 6367 | + (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary); | |
| 6368 | + const [observer] = React.useState( | |
| 6369 | + () => new import_query_core.QueriesObserver( | |
| 6370 | + client, | |
| 6371 | + defaultedQueries, | |
| 6372 | + options | |
| 6373 | + ) | |
| 6374 | + ); | |
| 6375 | + const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries); | |
| 6376 | + React.useSyncExternalStore( | |
| 6377 | + React.useCallback( | |
| 6378 | + (onStoreChange) => isRestoring ? () => void 0 : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)), | |
| 6379 | + [observer, isRestoring] | |
| 6380 | + ), | |
| 6381 | + () => observer.getCurrentResult(), | |
| 6382 | + () => observer.getCurrentResult() | |
| 6383 | + ); | |
| 6384 | + React.useEffect(() => { | |
| 6385 | + observer.setQueries( | |
| 6386 | + defaultedQueries, | |
| 6387 | + options, | |
| 6388 | + { | |
| 6389 | + listeners: false | |
| 6390 | + } | |
| 6391 | + ); | |
| 6392 | + }, [defaultedQueries, options, observer]); | |
| 6393 | + const shouldAtLeastOneSuspend = optimisticResult.some( | |
| 6394 | + (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result, isRestoring) | |
| 6395 | + ); | |
| 6396 | + const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => { | |
| 6397 | + const opts = defaultedQueries[index]; | |
| 6398 | + if (opts) { | |
| 6399 | + const queryObserver = new import_query_core.QueryObserver(client, opts); | |
| 6400 | + if ((0, import_suspense.shouldSuspend)(opts, result, isRestoring)) { | |
| 6401 | + return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 6402 | + } else if ((0, import_suspense.willFetch)(result, isRestoring)) { | |
| 6403 | + void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary); | |
| 6404 | + } | |
| 6405 | + } | |
| 6406 | + return []; | |
| 6407 | + }) : []; | |
| 6408 | + if (suspensePromises.length > 0) { | |
| 6409 | + throw Promise.all(suspensePromises); | |
| 6410 | + } | |
| 6411 | + const observerQueries = observer.getQueries(); | |
| 6412 | + const firstSingleResultWhichShouldThrow = optimisticResult.find( | |
| 6413 | + (result, index) => (0, import_errorBoundaryUtils.getHasError)({ | |
| 6414 | + result, | |
| 6415 | + errorResetBoundary, | |
| 6416 | + throwOnError: defaultedQueries[index]?.throwOnError ?? false, | |
| 6417 | + query: observerQueries[index] | |
| 6418 | + }) | |
| 6419 | + ); | |
| 6420 | + if (firstSingleResultWhichShouldThrow?.error) { | |
| 6421 | + throw firstSingleResultWhichShouldThrow.error; | |
| 6422 | + } | |
| 6423 | + return getCombinedResult(trackResult()); | |
| 6424 | +} | |
| 6425 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6426 | +0 && (0); | |
| 6427 | +//# sourceMappingURL=useQueries.cjs.map | |
| 6428 | + | |
| 6429 | +/***/ }), | |
| 6430 | + | |
| 6431 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs": | |
| 6432 | +/*!***********************************************************************!*\ | |
| 6433 | + !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***! | |
| 6434 | + \***********************************************************************/ | |
| 6435 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6436 | + | |
| 6437 | +"use strict"; | |
| 6438 | + | |
| 6439 | +"use client"; | |
| 6440 | +var __defProp = Object.defineProperty; | |
| 6441 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6442 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6443 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6444 | +var __export = (target, all) => { | |
| 6445 | + for (var name in all) | |
| 6446 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6447 | +}; | |
| 6448 | +var __copyProps = (to, from, except, desc) => { | |
| 6449 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6450 | + for (let key of __getOwnPropNames(from)) | |
| 6451 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6452 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6453 | + } | |
| 6454 | + return to; | |
| 6455 | +}; | |
| 6456 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6457 | + | |
| 6458 | +// src/useQuery.ts | |
| 6459 | +var useQuery_exports = {}; | |
| 6460 | +__export(useQuery_exports, { | |
| 6461 | + useQuery: () => useQuery | |
| 6462 | +}); | |
| 6463 | +module.exports = __toCommonJS(useQuery_exports); | |
| 6464 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6465 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 6466 | +function useQuery(options, queryClient) { | |
| 6467 | + return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient); | |
| 6468 | +} | |
| 6469 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6470 | +0 && (0); | |
| 6471 | +//# sourceMappingURL=useQuery.cjs.map | |
| 6472 | + | |
| 6473 | +/***/ }), | |
| 6474 | + | |
| 6475 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs": | |
| 6476 | +/*!***************************************************************************************!*\ | |
| 6477 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***! | |
| 6478 | + \***************************************************************************************/ | |
| 6479 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6480 | + | |
| 6481 | +"use strict"; | |
| 6482 | + | |
| 6483 | +"use client"; | |
| 6484 | +var __defProp = Object.defineProperty; | |
| 6485 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6486 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6487 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6488 | +var __export = (target, all) => { | |
| 6489 | + for (var name in all) | |
| 6490 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6491 | +}; | |
| 6492 | +var __copyProps = (to, from, except, desc) => { | |
| 6493 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6494 | + for (let key of __getOwnPropNames(from)) | |
| 6495 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6496 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6497 | + } | |
| 6498 | + return to; | |
| 6499 | +}; | |
| 6500 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6501 | + | |
| 6502 | +// src/useSuspenseInfiniteQuery.ts | |
| 6503 | +var useSuspenseInfiniteQuery_exports = {}; | |
| 6504 | +__export(useSuspenseInfiniteQuery_exports, { | |
| 6505 | + useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery | |
| 6506 | +}); | |
| 6507 | +module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports); | |
| 6508 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6509 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 6510 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 6511 | +function useSuspenseInfiniteQuery(options, queryClient) { | |
| 6512 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 6513 | + { | |
| 6514 | + ...options, | |
| 6515 | + enabled: true, | |
| 6516 | + suspense: true, | |
| 6517 | + throwOnError: import_suspense.defaultThrowOnError | |
| 6518 | + }, | |
| 6519 | + // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion | |
| 6520 | + import_query_core.InfiniteQueryObserver, | |
| 6521 | + queryClient | |
| 6522 | + ); | |
| 6523 | +} | |
| 6524 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6525 | +0 && (0); | |
| 6526 | +//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map | |
| 6527 | + | |
| 6528 | +/***/ }), | |
| 6529 | + | |
| 6530 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs": | |
| 6531 | +/*!*********************************************************************************!*\ | |
| 6532 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***! | |
| 6533 | + \*********************************************************************************/ | |
| 6534 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6535 | + | |
| 6536 | +"use strict"; | |
| 6537 | + | |
| 6538 | +"use client"; | |
| 6539 | +var __defProp = Object.defineProperty; | |
| 6540 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6541 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6542 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6543 | +var __export = (target, all) => { | |
| 6544 | + for (var name in all) | |
| 6545 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6546 | +}; | |
| 6547 | +var __copyProps = (to, from, except, desc) => { | |
| 6548 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6549 | + for (let key of __getOwnPropNames(from)) | |
| 6550 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6551 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6552 | + } | |
| 6553 | + return to; | |
| 6554 | +}; | |
| 6555 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6556 | + | |
| 6557 | +// src/useSuspenseQueries.ts | |
| 6558 | +var useSuspenseQueries_exports = {}; | |
| 6559 | +__export(useSuspenseQueries_exports, { | |
| 6560 | + useSuspenseQueries: () => useSuspenseQueries | |
| 6561 | +}); | |
| 6562 | +module.exports = __toCommonJS(useSuspenseQueries_exports); | |
| 6563 | +var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs"); | |
| 6564 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 6565 | +function useSuspenseQueries(options, queryClient) { | |
| 6566 | + return (0, import_useQueries.useQueries)( | |
| 6567 | + { | |
| 6568 | + ...options, | |
| 6569 | + queries: options.queries.map((query) => ({ | |
| 6570 | + ...query, | |
| 6571 | + suspense: true, | |
| 6572 | + throwOnError: import_suspense.defaultThrowOnError, | |
| 6573 | + enabled: true | |
| 6574 | + })) | |
| 6575 | + }, | |
| 6576 | + queryClient | |
| 6577 | + ); | |
| 6578 | +} | |
| 6579 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6580 | +0 && (0); | |
| 6581 | +//# sourceMappingURL=useSuspenseQueries.cjs.map | |
| 6582 | + | |
| 6583 | +/***/ }), | |
| 6584 | + | |
| 6585 | +/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs": | |
| 6586 | +/*!*******************************************************************************!*\ | |
| 6587 | + !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***! | |
| 6588 | + \*******************************************************************************/ | |
| 6589 | +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { | |
| 6590 | + | |
| 6591 | +"use strict"; | |
| 6592 | + | |
| 6593 | +"use client"; | |
| 6594 | +var __defProp = Object.defineProperty; | |
| 6595 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6596 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6597 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6598 | +var __export = (target, all) => { | |
| 6599 | + for (var name in all) | |
| 6600 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6601 | +}; | |
| 6602 | +var __copyProps = (to, from, except, desc) => { | |
| 6603 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6604 | + for (let key of __getOwnPropNames(from)) | |
| 6605 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6606 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6607 | + } | |
| 6608 | + return to; | |
| 6609 | +}; | |
| 6610 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6611 | + | |
| 6612 | +// src/useSuspenseQuery.ts | |
| 6613 | +var useSuspenseQuery_exports = {}; | |
| 6614 | +__export(useSuspenseQuery_exports, { | |
| 6615 | + useSuspenseQuery: () => useSuspenseQuery | |
| 6616 | +}); | |
| 6617 | +module.exports = __toCommonJS(useSuspenseQuery_exports); | |
| 6618 | +var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"); | |
| 6619 | +var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs"); | |
| 6620 | +var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs"); | |
| 6621 | +function useSuspenseQuery(options, queryClient) { | |
| 6622 | + return (0, import_useBaseQuery.useBaseQuery)( | |
| 6623 | + { | |
| 6624 | + ...options, | |
| 6625 | + enabled: true, | |
| 6626 | + suspense: true, | |
| 6627 | + throwOnError: import_suspense.defaultThrowOnError | |
| 6628 | + }, | |
| 6629 | + import_query_core.QueryObserver, | |
| 6630 | + queryClient | |
| 6631 | + ); | |
| 6632 | +} | |
| 6633 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6634 | +0 && (0); | |
| 6635 | +//# sourceMappingURL=useSuspenseQuery.cjs.map | |
| 6636 | + | |
| 6637 | +/***/ }), | |
| 6638 | + | |
| 6639 | +/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs": | |
| 6640 | +/*!********************************************************************!*\ | |
| 6641 | + !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***! | |
| 6642 | + \********************************************************************/ | |
| 6643 | +/***/ ((module) => { | |
| 6644 | + | |
| 6645 | +"use strict"; | |
| 6646 | + | |
| 6647 | +var __defProp = Object.defineProperty; | |
| 6648 | +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 6649 | +var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 6650 | +var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 6651 | +var __export = (target, all) => { | |
| 6652 | + for (var name in all) | |
| 6653 | + __defProp(target, name, { get: all[name], enumerable: true }); | |
| 6654 | +}; | |
| 6655 | +var __copyProps = (to, from, except, desc) => { | |
| 6656 | + if (from && typeof from === "object" || typeof from === "function") { | |
| 6657 | + for (let key of __getOwnPropNames(from)) | |
| 6658 | + if (!__hasOwnProp.call(to, key) && key !== except) | |
| 6659 | + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 6660 | + } | |
| 6661 | + return to; | |
| 6662 | +}; | |
| 6663 | +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | |
| 6664 | + | |
| 6665 | +// src/utils.ts | |
| 6666 | +var utils_exports = {}; | |
| 6667 | +__export(utils_exports, { | |
| 6668 | + shouldThrowError: () => shouldThrowError | |
| 6669 | +}); | |
| 6670 | +module.exports = __toCommonJS(utils_exports); | |
| 6671 | +function shouldThrowError(throwError, params) { | |
| 6672 | + if (typeof throwError === "function") { | |
| 6673 | + return throwError(...params); | |
| 6674 | + } | |
| 6675 | + return !!throwError; | |
| 6676 | +} | |
| 6677 | +// Annotate the CommonJS export names for ESM import in node: | |
| 6678 | +0 && (0); | |
| 6679 | +//# sourceMappingURL=utils.cjs.map | |
| 6680 | + | |
| 2204 | 6681 | /***/ }) |
| 2205 | 6682 | |
| 2206 | 6683 | /******/ }); |
| 2207 | 6684 | /************************************************************************/ |
| @@ -2230,25 +6707,44 @@ | ||
| 2230 | 6707 | /******/ } |
| 2231 | 6708 | /******/ |
| 2232 | 6709 | /************************************************************************/ |
| 2233 | 6710 | var __webpack_exports__ = {}; |
| 2234 | -// This entry needs to be wrapped in an IIFE because it needs to be in strict mode. | |
| 6711 | +// This entry need to be wrapped in an IIFE because it need to be in strict mode. | |
| 2235 | 6712 | (() => { |
| 2236 | 6713 | "use strict"; |
| 2237 | 6714 | /*!****************************************************!*\ |
| 2238 | 6715 | !*** ../modules/notifications/assets/js/editor.js ***! |
| 2239 | 6716 | \****************************************************/ |
| 6717 | +/* provided dependency */ var ReactDOM = __webpack_require__(/*! react-dom */ "react-dom"); | |
| 6718 | +/* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"]; | |
| 2240 | 6719 | |
| 2241 | 6720 | |
| 6721 | +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js"); | |
| 6722 | +var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react")); | |
| 2242 | 6723 | var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js"); |
| 2243 | -var _editorAppBarLink = __webpack_require__(/*! ./components/editor-app-bar-link */ "../modules/notifications/assets/js/components/editor-app-bar-link.js"); | |
| 2244 | -var _window; | |
| 2245 | -if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) { | |
| 2246 | - (0, _editorAppBarLink.editorAppBarLink)(); | |
| 2247 | -} else { | |
| 2248 | - (0, _editorV.editorV1)(); | |
| 2249 | -} | |
| 6724 | +var isRendered = false; | |
| 6725 | +var onButtonClicked = function onButtonClicked() { | |
| 6726 | + if (!isRendered) { | |
| 6727 | + isRendered = true; | |
| 6728 | + var container = document.createElement('div'); | |
| 6729 | + document.body.append(container); | |
| 6730 | + ReactDOM.render( /*#__PURE__*/_react.default.createElement(_editorV.EditorV1, null), container); | |
| 6731 | + return; | |
| 6732 | + } | |
| 6733 | + elementor.trigger('elementor/editor/panel/whats-new/clicked'); | |
| 6734 | +}; | |
| 6735 | +elementor.on('panel:init', function () { | |
| 6736 | + if (elementorNotifications.is_unread) { | |
| 6737 | + document.body.classList.add('e-has-notification'); | |
| 6738 | + } | |
| 6739 | + elementor.getPanelView().getPages('menu').view.addItem({ | |
| 6740 | + name: 'notification-center', | |
| 6741 | + icon: 'eicon-notification', | |
| 6742 | + title: __('What\'s New', 'elementor'), | |
| 6743 | + callback: onButtonClicked | |
| 6744 | + }, 'navigate_from_page', 'view-page'); | |
| 6745 | +}); | |
| 2250 | 6746 | })(); |
| 2251 | 6747 | |
| 2252 | 6748 | /******/ })() |
| 2253 | 6749 | ; |
| 2254 | 6750 | //# sourceMappingURL=editor-notifications.js.map |