PluginProbe
Elementor Website Builder – more than just a page builder / 3.30.1
Elementor Website Builder – more than just a page builder v3.30.1
4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 4.1.0-beta1 All 453 releases
elementor / assets / js / editor-notifications.js

editor-notifications.js in Elementor Website Builder – more than just a page builder 3.30.1, at assets/js/editor-notifications.js

8,743 lines 318.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /*! elementor - v3.30.0 - 07-07-2025 */
2 /******/ (() => { // webpackBootstrap
3 /******/ var __webpack_modules__ = ({
4
5 /***/ "../node_modules/@elementor/query/dist/index.js":
6 /*!******************************************************!*\
7 !*** ../node_modules/@elementor/query/dist/index.js ***!
8 \******************************************************/
9 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
10
11 "use strict";
12
13 var __defProp = Object.defineProperty;
14 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
15 var __getOwnPropNames = Object.getOwnPropertyNames;
16 var __hasOwnProp = Object.prototype.hasOwnProperty;
17 var __export = (target, all) => {
18 for (var name in all)
19 __defProp(target, name, { get: all[name], enumerable: true });
20 };
21 var __copyProps = (to, from, except, desc) => {
22 if (from && typeof from === "object" || typeof from === "function") {
23 for (let key of __getOwnPropNames(from))
24 if (!__hasOwnProp.call(to, key) && key !== except)
25 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
26 }
27 return to;
28 };
29 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
31 // src/index.ts
32 var src_exports = {};
33 __export(src_exports, {
34 QueryClient: () => import_react_query2.QueryClient,
35 QueryClientProvider: () => import_react_query2.QueryClientProvider,
36 createQueryClient: () => createQueryClient,
37 useInfiniteQuery: () => import_react_query2.useInfiniteQuery,
38 useMutation: () => import_react_query2.useMutation,
39 useQuery: () => import_react_query2.useQuery,
40 useQueryClient: () => import_react_query2.useQueryClient
41 });
42 module.exports = __toCommonJS(src_exports);
43 var import_react_query = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
44 var import_react_query2 = __webpack_require__(/*! @tanstack/react-query */ "../node_modules/@tanstack/react-query/build/modern/index.cjs");
45 function createQueryClient() {
46 return new import_react_query.QueryClient({
47 defaultOptions: {
48 queries: {
49 refetchOnWindowFocus: false,
50 refetchOnReconnect: false
51 }
52 }
53 });
54 }
55 // Annotate the CommonJS export names for ESM import in node:
56 0 && (0);
57 //# sourceMappingURL=index.js.map
58
59 /***/ }),
60
61 /***/ "../assets/dev/js/utils/react.js":
62 /*!***************************************!*\
63 !*** ../assets/dev/js/utils/react.js ***!
64 \***************************************/
65 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
66
67 "use strict";
68
69
70 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
71 Object.defineProperty(exports, "__esModule", ({
72 value: true
73 }));
74 exports["default"] = void 0;
75 var React = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
76 var ReactDOM = _interopRequireWildcard(__webpack_require__(/*! react-dom */ "react-dom"));
77 var _client = __webpack_require__(/*! react-dom/client */ "../node_modules/react-dom/client.js");
78 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
79 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
80 /**
81 * Support conditional rendering of a React App to the DOM, based on the React version.
82 * We use `createRoot` when available, but fallback to `ReactDOM.render` for older versions.
83 *
84 * @param { React.ReactElement } app The app to render.
85 * @param { HTMLElement } domElement The DOM element to render the app into.
86 *
87 * @return {{ unmount: () => void }} The unmount function.
88 */
89 function render(app, domElement) {
90 var unmountFunction;
91 try {
92 var root = (0, _client.createRoot)(domElement);
93 root.render(app);
94 unmountFunction = function unmountFunction() {
95 root.unmount();
96 };
97 } catch (e) {
98 // eslint-disable-next-line react/no-deprecated
99 ReactDOM.render(app, domElement);
100 unmountFunction = function unmountFunction() {
101 // eslint-disable-next-line react/no-deprecated
102 ReactDOM.unmountComponentAtNode(domElement);
103 };
104 }
105 return {
106 unmount: unmountFunction
107 };
108 }
109 var _default = exports["default"] = {
110 render: render
111 };
112
113 /***/ }),
114
115 /***/ "../modules/notifications/assets/js/api/index.js":
116 /*!*******************************************************!*\
117 !*** ../modules/notifications/assets/js/api/index.js ***!
118 \*******************************************************/
119 /***/ ((__unused_webpack_module, exports) => {
120
121 "use strict";
122
123
124 Object.defineProperty(exports, "__esModule", ({
125 value: true
126 }));
127 exports.getNotifications = void 0;
128 var request = function request(endpoint) {
129 var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
130 return new Promise(function (resolve, reject) {
131 elementorCommon.ajax.addRequest(endpoint, {
132 success: resolve,
133 error: reject,
134 data: data
135 });
136 });
137 };
138 var getNotifications = exports.getNotifications = function getNotifications() {
139 return request('notifications_get');
140 };
141
142 /***/ }),
143
144 /***/ "../modules/notifications/assets/js/components/editor-app-bar-link.js":
145 /*!****************************************************************************!*\
146 !*** ../modules/notifications/assets/js/components/editor-app-bar-link.js ***!
147 \****************************************************************************/
148 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
149
150 "use strict";
151 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
152
153
154 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
155 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
156 Object.defineProperty(exports, "__esModule", ({
157 value: true
158 }));
159 exports.editorAppBarLink = void 0;
160 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
161 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
162 var EditorAppBar = _interopRequireWildcard(__webpack_require__(/*! @elementor/editor-app-bar */ "@elementor/editor-app-bar"));
163 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
164 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
165 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
166 var _SpeakerphoneIcon = _interopRequireDefault(__webpack_require__(/*! @elementor/icons/SpeakerphoneIcon */ "@elementor/icons/SpeakerphoneIcon"));
167 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
168 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
169 var IconWithBadge = function IconWithBadge(_ref) {
170 var invisible = _ref.invisible;
171 return /*#__PURE__*/_react.default.createElement(_ui.Badge, {
172 color: "primary",
173 variant: "dot",
174 invisible: invisible
175 }, /*#__PURE__*/_react.default.createElement(_SpeakerphoneIcon.default, null));
176 };
177 IconWithBadge.propTypes = {
178 invisible: PropTypes.bool
179 };
180 var editorAppBarLink = exports.editorAppBarLink = function editorAppBarLink() {
181 var utilitiesMenu = EditorAppBar.utilitiesMenu;
182 utilitiesMenu.registerLink({
183 id: 'app-bar-menu-item-whats-new',
184 priority: 10,
185 useProps: function useProps() {
186 var _useState = (0, _react.useState)(!elementorNotifications.is_unread),
187 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
188 isRead = _useState2[0],
189 setIsRead = _useState2[1];
190 return {
191 title: (0, _i18n.__)("What's New", 'elementor'),
192 icon: function icon() {
193 return /*#__PURE__*/_react.default.createElement(IconWithBadge, {
194 invisible: isRead
195 });
196 },
197 onClick: function onClick() {
198 elementor.editorEvents.dispatchEvent(elementor.editorEvents.config.names.topBar.whatsNew, {
199 location: elementor.editorEvents.config.locations.topBar,
200 secondaryLocation: elementor.editorEvents.config.secondaryLocations['whats-new'],
201 trigger: elementor.editorEvents.config.triggers.click,
202 element: elementor.editorEvents.config.elements.buttonIcon
203 });
204 setIsRead(true);
205 elementorNotifications.is_unread = false;
206 (0, _editorOnButtonClicked.editorOnButtonClicked)('right');
207 }
208 };
209 }
210 });
211 };
212
213 /***/ }),
214
215 /***/ "../modules/notifications/assets/js/components/editor-drawer.js":
216 /*!**********************************************************************!*\
217 !*** ../modules/notifications/assets/js/components/editor-drawer.js ***!
218 \**********************************************************************/
219 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
220
221 "use strict";
222 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
223
224
225 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
226 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
227 Object.defineProperty(exports, "__esModule", ({
228 value: true
229 }));
230 exports.EditorDrawer = void 0;
231 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
232 var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "../node_modules/@babel/runtime/helpers/slicedToArray.js"));
233 var _whatsNew = __webpack_require__(/*! ./whats-new */ "../modules/notifications/assets/js/components/whats-new.js");
234 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
235 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
236 var EditorDrawer = exports.EditorDrawer = function EditorDrawer(_ref) {
237 var _ref$anchorPosition = _ref.anchorPosition,
238 anchorPosition = _ref$anchorPosition === void 0 ? 'left' : _ref$anchorPosition;
239 var _useState = (0, _react.useState)(true),
240 _useState2 = (0, _slicedToArray2.default)(_useState, 2),
241 isOpen = _useState2[0],
242 setIsOpen = _useState2[1];
243 (0, _react.useEffect)(function () {
244 elementor.on('elementor/editor/panel/whats-new/clicked', function () {
245 return setIsOpen(true);
246 });
247 }, []);
248 return /*#__PURE__*/_react.default.createElement(_whatsNew.WhatsNew, {
249 isOpen: isOpen,
250 setIsOpen: setIsOpen,
251 setIsRead: function setIsRead() {
252 return document.body.classList.remove('e-has-notification');
253 },
254 anchorPosition: anchorPosition
255 });
256 };
257 EditorDrawer.propTypes = {
258 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
259 };
260
261 /***/ }),
262
263 /***/ "../modules/notifications/assets/js/components/editor-on-button-clicked.js":
264 /*!*********************************************************************************!*\
265 !*** ../modules/notifications/assets/js/components/editor-on-button-clicked.js ***!
266 \*********************************************************************************/
267 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
268
269 "use strict";
270
271
272 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
273 Object.defineProperty(exports, "__esModule", ({
274 value: true
275 }));
276 exports.editorOnButtonClicked = void 0;
277 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
278 var _react2 = _interopRequireDefault(__webpack_require__(/*! elementor-utils/react */ "../assets/dev/js/utils/react.js"));
279 var _editorDrawer = __webpack_require__(/*! ./editor-drawer */ "../modules/notifications/assets/js/components/editor-drawer.js");
280 var isRendered = false;
281 var editorOnButtonClicked = exports.editorOnButtonClicked = function editorOnButtonClicked() {
282 var anchorPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'left';
283 if (!isRendered) {
284 isRendered = true;
285 var container = document.createElement('div');
286 document.body.append(container);
287 _react2.default.render(/*#__PURE__*/_react.default.createElement(_editorDrawer.EditorDrawer, {
288 anchorPosition: anchorPosition
289 }), container);
290 return;
291 }
292 elementor.trigger('elementor/editor/panel/whats-new/clicked');
293 };
294
295 /***/ }),
296
297 /***/ "../modules/notifications/assets/js/components/editor-v1.js":
298 /*!******************************************************************!*\
299 !*** ../modules/notifications/assets/js/components/editor-v1.js ***!
300 \******************************************************************/
301 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
302
303 "use strict";
304 /* provided dependency */ var __ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n")["__"];
305
306
307 Object.defineProperty(exports, "__esModule", ({
308 value: true
309 }));
310 exports.editorV1 = void 0;
311 var _editorOnButtonClicked = __webpack_require__(/*! ./editor-on-button-clicked */ "../modules/notifications/assets/js/components/editor-on-button-clicked.js");
312 var editorV1 = exports.editorV1 = function editorV1() {
313 elementor.on('panel:init', function () {
314 if (elementorNotifications.is_unread) {
315 document.body.classList.add('e-has-notification');
316 }
317 elementor.getPanelView().getPages('menu').view.addItem({
318 name: 'notification-center',
319 icon: 'eicon-speakerphone',
320 title: __('What\'s New', 'elementor'),
321 callback: _editorOnButtonClicked.editorOnButtonClicked
322 }, 'navigate_from_page', 'view-page');
323 });
324 };
325
326 /***/ }),
327
328 /***/ "../modules/notifications/assets/js/components/whats-new-drawer-content.js":
329 /*!*********************************************************************************!*\
330 !*** ../modules/notifications/assets/js/components/whats-new-drawer-content.js ***!
331 \*********************************************************************************/
332 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
333
334 "use strict";
335 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
336
337
338 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
339 Object.defineProperty(exports, "__esModule", ({
340 value: true
341 }));
342 exports.WhatsNewDrawerContent = void 0;
343 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
344 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
345 var _api = __webpack_require__(/*! ../api */ "../modules/notifications/assets/js/api/index.js");
346 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
347 var _whatsNewItem = __webpack_require__(/*! ./whats-new-item */ "../modules/notifications/assets/js/components/whats-new-item.js");
348 var WhatsNewDrawerContent = exports.WhatsNewDrawerContent = function WhatsNewDrawerContent(_ref) {
349 var setIsOpen = _ref.setIsOpen;
350 var _useQuery = (0, _query.useQuery)({
351 queryKey: ['e-notifications'],
352 queryFn: _api.getNotifications
353 }),
354 isPending = _useQuery.isPending,
355 error = _useQuery.error,
356 items = _useQuery.data;
357 if (isPending) {
358 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, /*#__PURE__*/_react.default.createElement(_ui.LinearProgress, {
359 color: "secondary"
360 }));
361 }
362 if (error) {
363 return /*#__PURE__*/_react.default.createElement(_ui.Box, null, "An error has occurred: ", error);
364 }
365 return items.map(function (item, itemIndex) {
366 return /*#__PURE__*/_react.default.createElement(_whatsNewItem.WhatsNewItem, {
367 key: itemIndex,
368 item: item,
369 itemIndex: itemIndex,
370 itemsLength: items.length,
371 setIsOpen: setIsOpen
372 });
373 });
374 };
375 WhatsNewDrawerContent.propTypes = {
376 setIsOpen: PropTypes.func.isRequired
377 };
378
379 /***/ }),
380
381 /***/ "../modules/notifications/assets/js/components/whats-new-item-chips.js":
382 /*!*****************************************************************************!*\
383 !*** ../modules/notifications/assets/js/components/whats-new-item-chips.js ***!
384 \*****************************************************************************/
385 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
386
387 "use strict";
388 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
389
390
391 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
392 Object.defineProperty(exports, "__esModule", ({
393 value: true
394 }));
395 exports.WhatsNewItemChips = void 0;
396 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
397 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
398 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
399 var WhatsNewItemChips = exports.WhatsNewItemChips = function WhatsNewItemChips(_ref) {
400 var chipPlan = _ref.chipPlan,
401 chipTags = _ref.chipTags,
402 itemIndex = _ref.itemIndex;
403 var chips = [];
404 if (chipPlan) {
405 chips.push({
406 color: 'promotion',
407 size: 'small',
408 label: chipPlan
409 });
410 }
411 if (chipTags) {
412 chipTags.forEach(function (chipTag) {
413 chips.push({
414 variant: 'outlined',
415 size: 'small',
416 label: chipTag
417 });
418 });
419 }
420 if (!chips.length) {
421 return null;
422 }
423 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
424 direction: "row",
425 flexWrap: "wrap",
426 gap: 1,
427 sx: {
428 pb: 1
429 }
430 }, chips.map(function (chip, chipIndex) {
431 return /*#__PURE__*/_react.default.createElement(_ui.Chip, (0, _extends2.default)({
432 key: "chip-".concat(itemIndex).concat(chipIndex)
433 }, chip));
434 }));
435 };
436 WhatsNewItemChips.propTypes = {
437 chipPlan: PropTypes.string,
438 chipTags: PropTypes.array,
439 itemIndex: PropTypes.number.isRequired
440 };
441
442 /***/ }),
443
444 /***/ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js":
445 /*!*********************************************************************************!*\
446 !*** ../modules/notifications/assets/js/components/whats-new-item-thumbnail.js ***!
447 \*********************************************************************************/
448 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
449
450 "use strict";
451 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
452
453
454 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
455 Object.defineProperty(exports, "__esModule", ({
456 value: true
457 }));
458 exports.WhatsNewItemThumbnail = void 0;
459 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
460 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
461 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
462 var WhatsNewItemThumbnail = exports.WhatsNewItemThumbnail = function WhatsNewItemThumbnail(_ref) {
463 var imageSrc = _ref.imageSrc,
464 title = _ref.title,
465 link = _ref.link;
466 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
467 sx: {
468 pb: 2
469 }
470 }, /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
471 link: link
472 }, /*#__PURE__*/_react.default.createElement("img", {
473 src: imageSrc,
474 alt: title,
475 style: {
476 maxWidth: '100%'
477 }
478 })));
479 };
480 WhatsNewItemThumbnail.propTypes = {
481 imageSrc: PropTypes.string.isRequired,
482 title: PropTypes.string.isRequired,
483 link: PropTypes.string
484 };
485
486 /***/ }),
487
488 /***/ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js":
489 /*!**********************************************************************************!*\
490 !*** ../modules/notifications/assets/js/components/whats-new-item-topic-line.js ***!
491 \**********************************************************************************/
492 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
493
494 "use strict";
495 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
496
497
498 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
499 Object.defineProperty(exports, "__esModule", ({
500 value: true
501 }));
502 exports.WhatsNewItemTopicLine = void 0;
503 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
504 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
505 var WhatsNewItemTopicLine = exports.WhatsNewItemTopicLine = function WhatsNewItemTopicLine(_ref) {
506 var topic = _ref.topic,
507 date = _ref.date;
508 return /*#__PURE__*/_react.default.createElement(_ui.Stack, {
509 direction: "row",
510 divider: /*#__PURE__*/_react.default.createElement(_ui.Divider, {
511 orientation: "vertical",
512 flexItem: true
513 }),
514 spacing: 1,
515 color: "text.tertiary",
516 sx: {
517 pb: 1
518 }
519 }, topic && /*#__PURE__*/_react.default.createElement(_ui.Box, null, topic), date && /*#__PURE__*/_react.default.createElement(_ui.Box, null, date));
520 };
521 WhatsNewItemTopicLine.propTypes = {
522 topic: PropTypes.string,
523 date: PropTypes.string
524 };
525
526 /***/ }),
527
528 /***/ "../modules/notifications/assets/js/components/whats-new-item.js":
529 /*!***********************************************************************!*\
530 !*** ../modules/notifications/assets/js/components/whats-new-item.js ***!
531 \***********************************************************************/
532 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
533
534 "use strict";
535 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
536
537
538 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
539 Object.defineProperty(exports, "__esModule", ({
540 value: true
541 }));
542 exports.WhatsNewItem = void 0;
543 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
544 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
545 var _whatsNewItemTopicLine = __webpack_require__(/*! ./whats-new-item-topic-line */ "../modules/notifications/assets/js/components/whats-new-item-topic-line.js");
546 var _wrapperWithLink = __webpack_require__(/*! ./wrapper-with-link */ "../modules/notifications/assets/js/components/wrapper-with-link.js");
547 var _whatsNewItemThumbnail = __webpack_require__(/*! ./whats-new-item-thumbnail */ "../modules/notifications/assets/js/components/whats-new-item-thumbnail.js");
548 var _whatsNewItemChips = __webpack_require__(/*! ./whats-new-item-chips */ "../modules/notifications/assets/js/components/whats-new-item-chips.js");
549 var WhatsNewItem = exports.WhatsNewItem = function WhatsNewItem(_ref) {
550 var item = _ref.item,
551 itemIndex = _ref.itemIndex,
552 itemsLength = _ref.itemsLength,
553 setIsOpen = _ref.setIsOpen;
554 return /*#__PURE__*/_react.default.createElement(_ui.Box, {
555 key: itemIndex,
556 display: "flex",
557 flexDirection: "column",
558 sx: {
559 pt: 2
560 }
561 }, (item.topic || item.date) && /*#__PURE__*/_react.default.createElement(_whatsNewItemTopicLine.WhatsNewItemTopicLine, {
562 topic: item.topic,
563 date: item.date
564 }), /*#__PURE__*/_react.default.createElement(_wrapperWithLink.WrapperWithLink, {
565 link: item.link
566 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
567 variant: "subtitle1",
568 sx: {
569 pb: 2
570 }
571 }, item.title)), item.imageSrc && /*#__PURE__*/_react.default.createElement(_whatsNewItemThumbnail.WhatsNewItemThumbnail, {
572 imageSrc: item.imageSrc,
573 link: item.link,
574 title: item.title
575 }), /*#__PURE__*/_react.default.createElement(_whatsNewItemChips.WhatsNewItemChips, {
576 chipPlan: item.chipPlan,
577 chipTags: item.chipTags,
578 itemIndex: itemIndex
579 }), item.description && /*#__PURE__*/_react.default.createElement(_ui.Typography, {
580 variant: "body2",
581 color: "text.secondary",
582 sx: {
583 pb: 2
584 }
585 }, item.description, item.readMoreText && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ' ', /*#__PURE__*/_react.default.createElement(_ui.Link, {
586 href: item.link,
587 color: "info.main",
588 target: "_blank"
589 }, item.readMoreText))), item.cta && item.ctaLink && /*#__PURE__*/_react.default.createElement(_ui.Box, {
590 sx: {
591 pb: 2
592 }
593 }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
594 href: item.ctaLink,
595 target: item.ctaLink.startsWith('#') ? '_self' : '_blank',
596 variant: "contained",
597 size: "small",
598 color: "promotion",
599 onClick: item.ctaLink.startsWith('#') ? function () {
600 return setIsOpen(false);
601 } : function () {}
602 }, item.cta)), itemIndex !== itemsLength - 1 && /*#__PURE__*/_react.default.createElement(_ui.Divider, {
603 sx: {
604 my: 1
605 }
606 }));
607 };
608 WhatsNewItem.propTypes = {
609 item: PropTypes.object.isRequired,
610 itemIndex: PropTypes.number.isRequired,
611 itemsLength: PropTypes.number.isRequired,
612 setIsOpen: PropTypes.func.isRequired
613 };
614
615 /***/ }),
616
617 /***/ "../modules/notifications/assets/js/components/whats-new-top-bar.js":
618 /*!**************************************************************************!*\
619 !*** ../modules/notifications/assets/js/components/whats-new-top-bar.js ***!
620 \**************************************************************************/
621 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
622
623 "use strict";
624 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
625
626
627 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
628 Object.defineProperty(exports, "__esModule", ({
629 value: true
630 }));
631 exports.WhatsNewTopBar = void 0;
632 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
633 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
634 var _i18n = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
635 var _xIcon = __webpack_require__(/*! ../icons/x-icon */ "../modules/notifications/assets/js/icons/x-icon.js");
636 var WhatsNewTopBar = exports.WhatsNewTopBar = function WhatsNewTopBar(props) {
637 var setIsOpen = props.setIsOpen;
638 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.AppBar, {
639 elevation: 0,
640 position: "sticky",
641 sx: {
642 backgroundColor: 'background.default'
643 }
644 }, /*#__PURE__*/_react.default.createElement(_ui.Toolbar, {
645 variant: "dense"
646 }, /*#__PURE__*/_react.default.createElement(_ui.Typography, {
647 variant: "overline",
648 sx: {
649 flexGrow: 1
650 }
651 }, (0, _i18n.__)('What\'s New', 'elementor')), /*#__PURE__*/_react.default.createElement(_ui.IconButton, {
652 "aria-label": 'close',
653 size: "small",
654 onClick: function onClick() {
655 return setIsOpen(false);
656 }
657 }, /*#__PURE__*/_react.default.createElement(_xIcon.XIcon, null)))), /*#__PURE__*/_react.default.createElement(_ui.Divider, null));
658 };
659 WhatsNewTopBar.propTypes = {
660 setIsOpen: PropTypes.func.isRequired
661 };
662
663 /***/ }),
664
665 /***/ "../modules/notifications/assets/js/components/whats-new.js":
666 /*!******************************************************************!*\
667 !*** ../modules/notifications/assets/js/components/whats-new.js ***!
668 \******************************************************************/
669 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
670
671 "use strict";
672 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
673
674
675 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
676 Object.defineProperty(exports, "__esModule", ({
677 value: true
678 }));
679 exports.WhatsNew = void 0;
680 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
681 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
682 var _query = __webpack_require__(/*! @elementor/query */ "../node_modules/@elementor/query/dist/index.js");
683 var _whatsNewTopBar = __webpack_require__(/*! ./whats-new-top-bar */ "../modules/notifications/assets/js/components/whats-new-top-bar.js");
684 var _whatsNewDrawerContent = __webpack_require__(/*! ./whats-new-drawer-content */ "../modules/notifications/assets/js/components/whats-new-drawer-content.js");
685 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
686 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
687 var queryClient = new _query.QueryClient({
688 defaultOptions: {
689 queries: {
690 refetchOnWindowFocus: false,
691 retry: false,
692 staleTime: 1000 * 60 * 30 // 30 minutes
693 }
694 }
695 });
696 var WhatsNew = exports.WhatsNew = function WhatsNew(props) {
697 var _window$elementor, _window$elementor$get;
698 var isOpen = props.isOpen,
699 setIsOpen = props.setIsOpen,
700 setIsRead = props.setIsRead,
701 _props$anchorPosition = props.anchorPosition,
702 anchorPosition = _props$anchorPosition === void 0 ? 'right' : _props$anchorPosition;
703 (0, _react.useEffect)(function () {
704 if (!isOpen) {
705 return;
706 }
707 setIsRead(true);
708 }, [isOpen, setIsRead]);
709 return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_query.QueryClientProvider, {
710 client: queryClient
711 }, /*#__PURE__*/_react.default.createElement(_ui.DirectionProvider, {
712 rtl: elementorCommon.config.isRTL
713 }, /*#__PURE__*/_react.default.createElement(_ui.ThemeProvider, {
714 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'
715 }, /*#__PURE__*/_react.default.createElement(_ui.Drawer, {
716 anchor: anchorPosition,
717 open: isOpen,
718 onClose: function onClose() {
719 return setIsOpen(false);
720 },
721 ModalProps: {
722 style: {
723 // Above the WordPress Admin Top Bar.
724 zIndex: 999999
725 }
726 }
727 }, /*#__PURE__*/_react.default.createElement(_ui.Box, {
728 sx: {
729 width: 320,
730 backgroundColor: 'background.default'
731 },
732 role: "presentation"
733 }, /*#__PURE__*/_react.default.createElement(_whatsNewTopBar.WhatsNewTopBar, {
734 setIsOpen: setIsOpen
735 }), /*#__PURE__*/_react.default.createElement(_ui.Box, {
736 sx: {
737 padding: '16px'
738 }
739 }, /*#__PURE__*/_react.default.createElement(_whatsNewDrawerContent.WhatsNewDrawerContent, {
740 setIsOpen: setIsOpen
741 }))))))));
742 };
743 WhatsNew.propTypes = {
744 isOpen: PropTypes.bool.isRequired,
745 setIsOpen: PropTypes.func.isRequired,
746 setIsRead: PropTypes.func.isRequired,
747 anchorPosition: PropTypes.oneOf(['left', 'top', 'right', 'bottom'])
748 };
749
750 /***/ }),
751
752 /***/ "../modules/notifications/assets/js/components/wrapper-with-link.js":
753 /*!**************************************************************************!*\
754 !*** ../modules/notifications/assets/js/components/wrapper-with-link.js ***!
755 \**************************************************************************/
756 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
757
758 "use strict";
759 /* provided dependency */ var PropTypes = __webpack_require__(/*! prop-types */ "../node_modules/prop-types/index.js");
760
761
762 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
763 Object.defineProperty(exports, "__esModule", ({
764 value: true
765 }));
766 exports.WrapperWithLink = void 0;
767 var _react = _interopRequireDefault(__webpack_require__(/*! react */ "react"));
768 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
769 var WrapperWithLink = exports.WrapperWithLink = function WrapperWithLink(props) {
770 var link = props.link,
771 children = props.children;
772 if (!link) {
773 return children;
774 }
775 return /*#__PURE__*/_react.default.createElement(_ui.Link, {
776 href: link,
777 target: "_blank",
778 underline: "none",
779 color: "inherit",
780 sx: {
781 '&:hover': {
782 color: 'inherit'
783 }
784 }
785 }, children);
786 };
787 WrapperWithLink.propTypes = {
788 link: PropTypes.string,
789 children: PropTypes.any.isRequired
790 };
791
792 /***/ }),
793
794 /***/ "../modules/notifications/assets/js/icons/x-icon.js":
795 /*!**********************************************************!*\
796 !*** ../modules/notifications/assets/js/icons/x-icon.js ***!
797 \**********************************************************/
798 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
799
800 "use strict";
801
802
803 var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
804 var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "../node_modules/@babel/runtime/helpers/typeof.js");
805 Object.defineProperty(exports, "__esModule", ({
806 value: true
807 }));
808 exports.XIcon = void 0;
809 var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "react"));
810 var _extends2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/extends */ "../node_modules/@babel/runtime/helpers/extends.js"));
811 var _ui = __webpack_require__(/*! @elementor/ui */ "@elementor/ui");
812 function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
813 function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
814 var XIcon = exports.XIcon = (0, _react.forwardRef)(function (props, ref) {
815 return /*#__PURE__*/_react.default.createElement(_ui.SvgIcon, (0, _extends2.default)({
816 viewBox: "0 0 24 24"
817 }, props, {
818 ref: ref
819 }), /*#__PURE__*/_react.default.createElement("path", {
820 fillRule: "evenodd",
821 clipRule: "evenodd",
822 d: "M18.5303 5.46967C18.8232 5.76256 18.8232 6.23744 18.5303 6.53033L6.53033 18.5303C6.23744 18.8232 5.76256 18.8232 5.46967 18.5303C5.17678 18.2374 5.17678 17.7626 5.46967 17.4697L17.4697 5.46967C17.7626 5.17678 18.2374 5.17678 18.5303 5.46967Z"
823 }), /*#__PURE__*/_react.default.createElement("path", {
824 fillRule: "evenodd",
825 clipRule: "evenodd",
826 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"
827 }));
828 });
829
830 /***/ }),
831
832 /***/ "../node_modules/object-assign/index.js":
833 /*!**********************************************!*\
834 !*** ../node_modules/object-assign/index.js ***!
835 \**********************************************/
836 /***/ ((module) => {
837
838 "use strict";
839 /*
840 object-assign
841 (c) Sindre Sorhus
842 @license MIT
843 */
844
845
846 /* eslint-disable no-unused-vars */
847 var getOwnPropertySymbols = Object.getOwnPropertySymbols;
848 var hasOwnProperty = Object.prototype.hasOwnProperty;
849 var propIsEnumerable = Object.prototype.propertyIsEnumerable;
850
851 function toObject(val) {
852 if (val === null || val === undefined) {
853 throw new TypeError('Object.assign cannot be called with null or undefined');
854 }
855
856 return Object(val);
857 }
858
859 function shouldUseNative() {
860 try {
861 if (!Object.assign) {
862 return false;
863 }
864
865 // Detect buggy property enumeration order in older V8 versions.
866
867 // https://bugs.chromium.org/p/v8/issues/detail?id=4118
868 var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
869 test1[5] = 'de';
870 if (Object.getOwnPropertyNames(test1)[0] === '5') {
871 return false;
872 }
873
874 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
875 var test2 = {};
876 for (var i = 0; i < 10; i++) {
877 test2['_' + String.fromCharCode(i)] = i;
878 }
879 var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
880 return test2[n];
881 });
882 if (order2.join('') !== '0123456789') {
883 return false;
884 }
885
886 // https://bugs.chromium.org/p/v8/issues/detail?id=3056
887 var test3 = {};
888 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
889 test3[letter] = letter;
890 });
891 if (Object.keys(Object.assign({}, test3)).join('') !==
892 'abcdefghijklmnopqrst') {
893 return false;
894 }
895
896 return true;
897 } catch (err) {
898 // We don't expect any of the above to throw, but better to be safe.
899 return false;
900 }
901 }
902
903 module.exports = shouldUseNative() ? Object.assign : function (target, source) {
904 var from;
905 var to = toObject(target);
906 var symbols;
907
908 for (var s = 1; s < arguments.length; s++) {
909 from = Object(arguments[s]);
910
911 for (var key in from) {
912 if (hasOwnProperty.call(from, key)) {
913 to[key] = from[key];
914 }
915 }
916
917 if (getOwnPropertySymbols) {
918 symbols = getOwnPropertySymbols(from);
919 for (var i = 0; i < symbols.length; i++) {
920 if (propIsEnumerable.call(from, symbols[i])) {
921 to[symbols[i]] = from[symbols[i]];
922 }
923 }
924 }
925 }
926
927 return to;
928 };
929
930
931 /***/ }),
932
933 /***/ "../node_modules/prop-types/checkPropTypes.js":
934 /*!****************************************************!*\
935 !*** ../node_modules/prop-types/checkPropTypes.js ***!
936 \****************************************************/
937 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
938
939 "use strict";
940 /**
941 * Copyright (c) 2013-present, Facebook, Inc.
942 *
943 * This source code is licensed under the MIT license found in the
944 * LICENSE file in the root directory of this source tree.
945 */
946
947
948
949 var printWarning = function() {};
950
951 if (true) {
952 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
953 var loggedTypeFailures = {};
954 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
955
956 printWarning = function(text) {
957 var message = 'Warning: ' + text;
958 if (typeof console !== 'undefined') {
959 console.error(message);
960 }
961 try {
962 // --- Welcome to debugging React ---
963 // This error was thrown as a convenience so that you can use this stack
964 // to find the callsite that caused this warning to fire.
965 throw new Error(message);
966 } catch (x) { /**/ }
967 };
968 }
969
970 /**
971 * Assert that the values match with the type specs.
972 * Error messages are memorized and will only be shown once.
973 *
974 * @param {object} typeSpecs Map of name to a ReactPropType
975 * @param {object} values Runtime values that need to be type-checked
976 * @param {string} location e.g. "prop", "context", "child context"
977 * @param {string} componentName Name of the component for error messages.
978 * @param {?Function} getStack Returns the component stack.
979 * @private
980 */
981 function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
982 if (true) {
983 for (var typeSpecName in typeSpecs) {
984 if (has(typeSpecs, typeSpecName)) {
985 var error;
986 // Prop type validation may throw. In case they do, we don't want to
987 // fail the render phase where it didn't fail before. So we log it.
988 // After these have been cleaned up, we'll let them throw.
989 try {
990 // This is intentionally an invariant that gets caught. It's the same
991 // behavior as without this statement except with a better message.
992 if (typeof typeSpecs[typeSpecName] !== 'function') {
993 var err = Error(
994 (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
995 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
996 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
997 );
998 err.name = 'Invariant Violation';
999 throw err;
1000 }
1001 error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1002 } catch (ex) {
1003 error = ex;
1004 }
1005 if (error && !(error instanceof Error)) {
1006 printWarning(
1007 (componentName || 'React class') + ': type specification of ' +
1008 location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1009 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1010 'You may have forgotten to pass an argument to the type checker ' +
1011 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1012 'shape all require an argument).'
1013 );
1014 }
1015 if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1016 // Only monitor this failure once because there tends to be a lot of the
1017 // same error.
1018 loggedTypeFailures[error.message] = true;
1019
1020 var stack = getStack ? getStack() : '';
1021
1022 printWarning(
1023 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1024 );
1025 }
1026 }
1027 }
1028 }
1029 }
1030
1031 /**
1032 * Resets warning cache when testing.
1033 *
1034 * @private
1035 */
1036 checkPropTypes.resetWarningCache = function() {
1037 if (true) {
1038 loggedTypeFailures = {};
1039 }
1040 }
1041
1042 module.exports = checkPropTypes;
1043
1044
1045 /***/ }),
1046
1047 /***/ "../node_modules/prop-types/factoryWithTypeCheckers.js":
1048 /*!*************************************************************!*\
1049 !*** ../node_modules/prop-types/factoryWithTypeCheckers.js ***!
1050 \*************************************************************/
1051 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1052
1053 "use strict";
1054 /**
1055 * Copyright (c) 2013-present, Facebook, Inc.
1056 *
1057 * This source code is licensed under the MIT license found in the
1058 * LICENSE file in the root directory of this source tree.
1059 */
1060
1061
1062
1063 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1064 var assign = __webpack_require__(/*! object-assign */ "../node_modules/object-assign/index.js");
1065
1066 var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "../node_modules/prop-types/lib/ReactPropTypesSecret.js");
1067 var has = __webpack_require__(/*! ./lib/has */ "../node_modules/prop-types/lib/has.js");
1068 var checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ "../node_modules/prop-types/checkPropTypes.js");
1069
1070 var printWarning = function() {};
1071
1072 if (true) {
1073 printWarning = function(text) {
1074 var message = 'Warning: ' + text;
1075 if (typeof console !== 'undefined') {
1076 console.error(message);
1077 }
1078 try {
1079 // --- Welcome to debugging React ---
1080 // This error was thrown as a convenience so that you can use this stack
1081 // to find the callsite that caused this warning to fire.
1082 throw new Error(message);
1083 } catch (x) {}
1084 };
1085 }
1086
1087 function emptyFunctionThatReturnsNull() {
1088 return null;
1089 }
1090
1091 module.exports = function(isValidElement, throwOnDirectAccess) {
1092 /* global Symbol */
1093 var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1094 var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1095
1096 /**
1097 * Returns the iterator method function contained on the iterable object.
1098 *
1099 * Be sure to invoke the function with the iterable as context:
1100 *
1101 * var iteratorFn = getIteratorFn(myIterable);
1102 * if (iteratorFn) {
1103 * var iterator = iteratorFn.call(myIterable);
1104 * ...
1105 * }
1106 *
1107 * @param {?object} maybeIterable
1108 * @return {?function}
1109 */
1110 function getIteratorFn(maybeIterable) {
1111 var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1112 if (typeof iteratorFn === 'function') {
1113 return iteratorFn;
1114 }
1115 }
1116
1117 /**
1118 * Collection of methods that allow declaration and validation of props that are
1119 * supplied to React components. Example usage:
1120 *
1121 * var Props = require('ReactPropTypes');
1122 * var MyArticle = React.createClass({
1123 * propTypes: {
1124 * // An optional string prop named "description".
1125 * description: Props.string,
1126 *
1127 * // A required enum prop named "category".
1128 * category: Props.oneOf(['News','Photos']).isRequired,
1129 *
1130 * // A prop named "dialog" that requires an instance of Dialog.
1131 * dialog: Props.instanceOf(Dialog).isRequired
1132 * },
1133 * render: function() { ... }
1134 * });
1135 *
1136 * A more formal specification of how these methods are used:
1137 *
1138 * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1139 * decl := ReactPropTypes.{type}(.isRequired)?
1140 *
1141 * Each and every declaration produces a function with the same signature. This
1142 * allows the creation of custom validation functions. For example:
1143 *
1144 * var MyLink = React.createClass({
1145 * propTypes: {
1146 * // An optional string or URI prop named "href".
1147 * href: function(props, propName, componentName) {
1148 * var propValue = props[propName];
1149 * if (propValue != null && typeof propValue !== 'string' &&
1150 * !(propValue instanceof URI)) {
1151 * return new Error(
1152 * 'Expected a string or an URI for ' + propName + ' in ' +
1153 * componentName
1154 * );
1155 * }
1156 * }
1157 * },
1158 * render: function() {...}
1159 * });
1160 *
1161 * @internal
1162 */
1163
1164 var ANONYMOUS = '<<anonymous>>';
1165
1166 // Important!
1167 // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1168 var ReactPropTypes = {
1169 array: createPrimitiveTypeChecker('array'),
1170 bigint: createPrimitiveTypeChecker('bigint'),
1171 bool: createPrimitiveTypeChecker('boolean'),
1172 func: createPrimitiveTypeChecker('function'),
1173 number: createPrimitiveTypeChecker('number'),
1174 object: createPrimitiveTypeChecker('object'),
1175 string: createPrimitiveTypeChecker('string'),
1176 symbol: createPrimitiveTypeChecker('symbol'),
1177
1178 any: createAnyTypeChecker(),
1179 arrayOf: createArrayOfTypeChecker,
1180 element: createElementTypeChecker(),
1181 elementType: createElementTypeTypeChecker(),
1182 instanceOf: createInstanceTypeChecker,
1183 node: createNodeChecker(),
1184 objectOf: createObjectOfTypeChecker,
1185 oneOf: createEnumTypeChecker,
1186 oneOfType: createUnionTypeChecker,
1187 shape: createShapeTypeChecker,
1188 exact: createStrictShapeTypeChecker,
1189 };
1190
1191 /**
1192 * inlined Object.is polyfill to avoid requiring consumers ship their own
1193 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1194 */
1195 /*eslint-disable no-self-compare*/
1196 function is(x, y) {
1197 // SameValue algorithm
1198 if (x === y) {
1199 // Steps 1-5, 7-10
1200 // Steps 6.b-6.e: +0 != -0
1201 return x !== 0 || 1 / x === 1 / y;
1202 } else {
1203 // Step 6.a: NaN == NaN
1204 return x !== x && y !== y;
1205 }
1206 }
1207 /*eslint-enable no-self-compare*/
1208
1209 /**
1210 * We use an Error-like object for backward compatibility as people may call
1211 * PropTypes directly and inspect their output. However, we don't use real
1212 * Errors anymore. We don't inspect their stack anyway, and creating them
1213 * is prohibitively expensive if they are created too often, such as what
1214 * happens in oneOfType() for any type before the one that matched.
1215 */
1216 function PropTypeError(message, data) {
1217 this.message = message;
1218 this.data = data && typeof data === 'object' ? data: {};
1219 this.stack = '';
1220 }
1221 // Make `instanceof Error` still work for returned errors.
1222 PropTypeError.prototype = Error.prototype;
1223
1224 function createChainableTypeChecker(validate) {
1225 if (true) {
1226 var manualPropTypeCallCache = {};
1227 var manualPropTypeWarningCount = 0;
1228 }
1229 function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1230 componentName = componentName || ANONYMOUS;
1231 propFullName = propFullName || propName;
1232
1233 if (secret !== ReactPropTypesSecret) {
1234 if (throwOnDirectAccess) {
1235 // New behavior only for users of `prop-types` package
1236 var err = new Error(
1237 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1238 'Use `PropTypes.checkPropTypes()` to call them. ' +
1239 'Read more at http://fb.me/use-check-prop-types'
1240 );
1241 err.name = 'Invariant Violation';
1242 throw err;
1243 } else if ( true && typeof console !== 'undefined') {
1244 // Old behavior for people using React.PropTypes
1245 var cacheKey = componentName + ':' + propName;
1246 if (
1247 !manualPropTypeCallCache[cacheKey] &&
1248 // Avoid spamming the console because they are often not actionable except for lib authors
1249 manualPropTypeWarningCount < 3
1250 ) {
1251 printWarning(
1252 'You are manually calling a React.PropTypes validation ' +
1253 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1254 'and will throw in the standalone `prop-types` package. ' +
1255 'You may be seeing this warning due to a third-party PropTypes ' +
1256 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1257 );
1258 manualPropTypeCallCache[cacheKey] = true;
1259 manualPropTypeWarningCount++;
1260 }
1261 }
1262 }
1263 if (props[propName] == null) {
1264 if (isRequired) {
1265 if (props[propName] === null) {
1266 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1267 }
1268 return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1269 }
1270 return null;
1271 } else {
1272 return validate(props, propName, componentName, location, propFullName);
1273 }
1274 }
1275
1276 var chainedCheckType = checkType.bind(null, false);
1277 chainedCheckType.isRequired = checkType.bind(null, true);
1278
1279 return chainedCheckType;
1280 }
1281
1282 function createPrimitiveTypeChecker(expectedType) {
1283 function validate(props, propName, componentName, location, propFullName, secret) {
1284 var propValue = props[propName];
1285 var propType = getPropType(propValue);
1286 if (propType !== expectedType) {
1287 // `propValue` being instance of, say, date/regexp, pass the 'object'
1288 // check, but we can offer a more precise error message here rather than
1289 // 'of type `object`'.
1290 var preciseType = getPreciseType(propValue);
1291
1292 return new PropTypeError(
1293 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1294 {expectedType: expectedType}
1295 );
1296 }
1297 return null;
1298 }
1299 return createChainableTypeChecker(validate);
1300 }
1301
1302 function createAnyTypeChecker() {
1303 return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1304 }
1305
1306 function createArrayOfTypeChecker(typeChecker) {
1307 function validate(props, propName, componentName, location, propFullName) {
1308 if (typeof typeChecker !== 'function') {
1309 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1310 }
1311 var propValue = props[propName];
1312 if (!Array.isArray(propValue)) {
1313 var propType = getPropType(propValue);
1314 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1315 }
1316 for (var i = 0; i < propValue.length; i++) {
1317 var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1318 if (error instanceof Error) {
1319 return error;
1320 }
1321 }
1322 return null;
1323 }
1324 return createChainableTypeChecker(validate);
1325 }
1326
1327 function createElementTypeChecker() {
1328 function validate(props, propName, componentName, location, propFullName) {
1329 var propValue = props[propName];
1330 if (!isValidElement(propValue)) {
1331 var propType = getPropType(propValue);
1332 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1333 }
1334 return null;
1335 }
1336 return createChainableTypeChecker(validate);
1337 }
1338
1339 function createElementTypeTypeChecker() {
1340 function validate(props, propName, componentName, location, propFullName) {
1341 var propValue = props[propName];
1342 if (!ReactIs.isValidElementType(propValue)) {
1343 var propType = getPropType(propValue);
1344 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1345 }
1346 return null;
1347 }
1348 return createChainableTypeChecker(validate);
1349 }
1350
1351 function createInstanceTypeChecker(expectedClass) {
1352 function validate(props, propName, componentName, location, propFullName) {
1353 if (!(props[propName] instanceof expectedClass)) {
1354 var expectedClassName = expectedClass.name || ANONYMOUS;
1355 var actualClassName = getClassName(props[propName]);
1356 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1357 }
1358 return null;
1359 }
1360 return createChainableTypeChecker(validate);
1361 }
1362
1363 function createEnumTypeChecker(expectedValues) {
1364 if (!Array.isArray(expectedValues)) {
1365 if (true) {
1366 if (arguments.length > 1) {
1367 printWarning(
1368 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1369 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1370 );
1371 } else {
1372 printWarning('Invalid argument supplied to oneOf, expected an array.');
1373 }
1374 }
1375 return emptyFunctionThatReturnsNull;
1376 }
1377
1378 function validate(props, propName, componentName, location, propFullName) {
1379 var propValue = props[propName];
1380 for (var i = 0; i < expectedValues.length; i++) {
1381 if (is(propValue, expectedValues[i])) {
1382 return null;
1383 }
1384 }
1385
1386 var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1387 var type = getPreciseType(value);
1388 if (type === 'symbol') {
1389 return String(value);
1390 }
1391 return value;
1392 });
1393 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1394 }
1395 return createChainableTypeChecker(validate);
1396 }
1397
1398 function createObjectOfTypeChecker(typeChecker) {
1399 function validate(props, propName, componentName, location, propFullName) {
1400 if (typeof typeChecker !== 'function') {
1401 return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1402 }
1403 var propValue = props[propName];
1404 var propType = getPropType(propValue);
1405 if (propType !== 'object') {
1406 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1407 }
1408 for (var key in propValue) {
1409 if (has(propValue, key)) {
1410 var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1411 if (error instanceof Error) {
1412 return error;
1413 }
1414 }
1415 }
1416 return null;
1417 }
1418 return createChainableTypeChecker(validate);
1419 }
1420
1421 function createUnionTypeChecker(arrayOfTypeCheckers) {
1422 if (!Array.isArray(arrayOfTypeCheckers)) {
1423 true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;
1424 return emptyFunctionThatReturnsNull;
1425 }
1426
1427 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1428 var checker = arrayOfTypeCheckers[i];
1429 if (typeof checker !== 'function') {
1430 printWarning(
1431 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1432 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1433 );
1434 return emptyFunctionThatReturnsNull;
1435 }
1436 }
1437
1438 function validate(props, propName, componentName, location, propFullName) {
1439 var expectedTypes = [];
1440 for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1441 var checker = arrayOfTypeCheckers[i];
1442 var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1443 if (checkerResult == null) {
1444 return null;
1445 }
1446 if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1447 expectedTypes.push(checkerResult.data.expectedType);
1448 }
1449 }
1450 var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1451 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1452 }
1453 return createChainableTypeChecker(validate);
1454 }
1455
1456 function createNodeChecker() {
1457 function validate(props, propName, componentName, location, propFullName) {
1458 if (!isNode(props[propName])) {
1459 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1460 }
1461 return null;
1462 }
1463 return createChainableTypeChecker(validate);
1464 }
1465
1466 function invalidValidatorError(componentName, location, propFullName, key, type) {
1467 return new PropTypeError(
1468 (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1469 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1470 );
1471 }
1472
1473 function createShapeTypeChecker(shapeTypes) {
1474 function validate(props, propName, componentName, location, propFullName) {
1475 var propValue = props[propName];
1476 var propType = getPropType(propValue);
1477 if (propType !== 'object') {
1478 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1479 }
1480 for (var key in shapeTypes) {
1481 var checker = shapeTypes[key];
1482 if (typeof checker !== 'function') {
1483 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1484 }
1485 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1486 if (error) {
1487 return error;
1488 }
1489 }
1490 return null;
1491 }
1492 return createChainableTypeChecker(validate);
1493 }
1494
1495 function createStrictShapeTypeChecker(shapeTypes) {
1496 function validate(props, propName, componentName, location, propFullName) {
1497 var propValue = props[propName];
1498 var propType = getPropType(propValue);
1499 if (propType !== 'object') {
1500 return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1501 }
1502 // We need to check all keys in case some are required but missing from props.
1503 var allKeys = assign({}, props[propName], shapeTypes);
1504 for (var key in allKeys) {
1505 var checker = shapeTypes[key];
1506 if (has(shapeTypes, key) && typeof checker !== 'function') {
1507 return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1508 }
1509 if (!checker) {
1510 return new PropTypeError(
1511 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1512 '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1513 '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1514 );
1515 }
1516 var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1517 if (error) {
1518 return error;
1519 }
1520 }
1521 return null;
1522 }
1523
1524 return createChainableTypeChecker(validate);
1525 }
1526
1527 function isNode(propValue) {
1528 switch (typeof propValue) {
1529 case 'number':
1530 case 'string':
1531 case 'undefined':
1532 return true;
1533 case 'boolean':
1534 return !propValue;
1535 case 'object':
1536 if (Array.isArray(propValue)) {
1537 return propValue.every(isNode);
1538 }
1539 if (propValue === null || isValidElement(propValue)) {
1540 return true;
1541 }
1542
1543 var iteratorFn = getIteratorFn(propValue);
1544 if (iteratorFn) {
1545 var iterator = iteratorFn.call(propValue);
1546 var step;
1547 if (iteratorFn !== propValue.entries) {
1548 while (!(step = iterator.next()).done) {
1549 if (!isNode(step.value)) {
1550 return false;
1551 }
1552 }
1553 } else {
1554 // Iterator will provide entry [k,v] tuples rather than values.
1555 while (!(step = iterator.next()).done) {
1556 var entry = step.value;
1557 if (entry) {
1558 if (!isNode(entry[1])) {
1559 return false;
1560 }
1561 }
1562 }
1563 }
1564 } else {
1565 return false;
1566 }
1567
1568 return true;
1569 default:
1570 return false;
1571 }
1572 }
1573
1574 function isSymbol(propType, propValue) {
1575 // Native Symbol.
1576 if (propType === 'symbol') {
1577 return true;
1578 }
1579
1580 // falsy value can't be a Symbol
1581 if (!propValue) {
1582 return false;
1583 }
1584
1585 // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1586 if (propValue['@@toStringTag'] === 'Symbol') {
1587 return true;
1588 }
1589
1590 // Fallback for non-spec compliant Symbols which are polyfilled.
1591 if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1592 return true;
1593 }
1594
1595 return false;
1596 }
1597
1598 // Equivalent of `typeof` but with special handling for array and regexp.
1599 function getPropType(propValue) {
1600 var propType = typeof propValue;
1601 if (Array.isArray(propValue)) {
1602 return 'array';
1603 }
1604 if (propValue instanceof RegExp) {
1605 // Old webkits (at least until Android 4.0) return 'function' rather than
1606 // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1607 // passes PropTypes.object.
1608 return 'object';
1609 }
1610 if (isSymbol(propType, propValue)) {
1611 return 'symbol';
1612 }
1613 return propType;
1614 }
1615
1616 // This handles more types than `getPropType`. Only used for error messages.
1617 // See `createPrimitiveTypeChecker`.
1618 function getPreciseType(propValue) {
1619 if (typeof propValue === 'undefined' || propValue === null) {
1620 return '' + propValue;
1621 }
1622 var propType = getPropType(propValue);
1623 if (propType === 'object') {
1624 if (propValue instanceof Date) {
1625 return 'date';
1626 } else if (propValue instanceof RegExp) {
1627 return 'regexp';
1628 }
1629 }
1630 return propType;
1631 }
1632
1633 // Returns a string that is postfixed to a warning about an invalid type.
1634 // For example, "undefined" or "of type array"
1635 function getPostfixForTypeWarning(value) {
1636 var type = getPreciseType(value);
1637 switch (type) {
1638 case 'array':
1639 case 'object':
1640 return 'an ' + type;
1641 case 'boolean':
1642 case 'date':
1643 case 'regexp':
1644 return 'a ' + type;
1645 default:
1646 return type;
1647 }
1648 }
1649
1650 // Returns class name of the object, if any.
1651 function getClassName(propValue) {
1652 if (!propValue.constructor || !propValue.constructor.name) {
1653 return ANONYMOUS;
1654 }
1655 return propValue.constructor.name;
1656 }
1657
1658 ReactPropTypes.checkPropTypes = checkPropTypes;
1659 ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1660 ReactPropTypes.PropTypes = ReactPropTypes;
1661
1662 return ReactPropTypes;
1663 };
1664
1665
1666 /***/ }),
1667
1668 /***/ "../node_modules/prop-types/index.js":
1669 /*!*******************************************!*\
1670 !*** ../node_modules/prop-types/index.js ***!
1671 \*******************************************/
1672 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1673
1674 /**
1675 * Copyright (c) 2013-present, Facebook, Inc.
1676 *
1677 * This source code is licensed under the MIT license found in the
1678 * LICENSE file in the root directory of this source tree.
1679 */
1680
1681 if (true) {
1682 var ReactIs = __webpack_require__(/*! react-is */ "../node_modules/prop-types/node_modules/react-is/index.js");
1683
1684 // By explicitly using `prop-types` you are opting into new development behavior.
1685 // http://fb.me/prop-types-in-prod
1686 var throwOnDirectAccess = true;
1687 module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ "../node_modules/prop-types/factoryWithTypeCheckers.js")(ReactIs.isElement, throwOnDirectAccess);
1688 } else {}
1689
1690
1691 /***/ }),
1692
1693 /***/ "../node_modules/prop-types/lib/ReactPropTypesSecret.js":
1694 /*!**************************************************************!*\
1695 !*** ../node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
1696 \**************************************************************/
1697 /***/ ((module) => {
1698
1699 "use strict";
1700 /**
1701 * Copyright (c) 2013-present, Facebook, Inc.
1702 *
1703 * This source code is licensed under the MIT license found in the
1704 * LICENSE file in the root directory of this source tree.
1705 */
1706
1707
1708
1709 var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1710
1711 module.exports = ReactPropTypesSecret;
1712
1713
1714 /***/ }),
1715
1716 /***/ "../node_modules/prop-types/lib/has.js":
1717 /*!*********************************************!*\
1718 !*** ../node_modules/prop-types/lib/has.js ***!
1719 \*********************************************/
1720 /***/ ((module) => {
1721
1722 module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
1723
1724
1725 /***/ }),
1726
1727 /***/ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js":
1728 /*!************************************************************************************!*\
1729 !*** ../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js ***!
1730 \************************************************************************************/
1731 /***/ ((__unused_webpack_module, exports) => {
1732
1733 "use strict";
1734 /** @license React v16.13.1
1735 * react-is.development.js
1736 *
1737 * Copyright (c) Facebook, Inc. and its affiliates.
1738 *
1739 * This source code is licensed under the MIT license found in the
1740 * LICENSE file in the root directory of this source tree.
1741 */
1742
1743
1744
1745
1746
1747 if (true) {
1748 (function() {
1749 'use strict';
1750
1751 // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
1752 // nor polyfill, then a plain number is used for performance.
1753 var hasSymbol = typeof Symbol === 'function' && Symbol.for;
1754 var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
1755 var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
1756 var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
1757 var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
1758 var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
1759 var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
1760 var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
1761 // (unstable) APIs that have been removed. Can we remove the symbols?
1762
1763 var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
1764 var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
1765 var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
1766 var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
1767 var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
1768 var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
1769 var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
1770 var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
1771 var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
1772 var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
1773 var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
1774
1775 function isValidElementType(type) {
1776 return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1777 type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
1778 }
1779
1780 function typeOf(object) {
1781 if (typeof object === 'object' && object !== null) {
1782 var $$typeof = object.$$typeof;
1783
1784 switch ($$typeof) {
1785 case REACT_ELEMENT_TYPE:
1786 var type = object.type;
1787
1788 switch (type) {
1789 case REACT_ASYNC_MODE_TYPE:
1790 case REACT_CONCURRENT_MODE_TYPE:
1791 case REACT_FRAGMENT_TYPE:
1792 case REACT_PROFILER_TYPE:
1793 case REACT_STRICT_MODE_TYPE:
1794 case REACT_SUSPENSE_TYPE:
1795 return type;
1796
1797 default:
1798 var $$typeofType = type && type.$$typeof;
1799
1800 switch ($$typeofType) {
1801 case REACT_CONTEXT_TYPE:
1802 case REACT_FORWARD_REF_TYPE:
1803 case REACT_LAZY_TYPE:
1804 case REACT_MEMO_TYPE:
1805 case REACT_PROVIDER_TYPE:
1806 return $$typeofType;
1807
1808 default:
1809 return $$typeof;
1810 }
1811
1812 }
1813
1814 case REACT_PORTAL_TYPE:
1815 return $$typeof;
1816 }
1817 }
1818
1819 return undefined;
1820 } // AsyncMode is deprecated along with isAsyncMode
1821
1822 var AsyncMode = REACT_ASYNC_MODE_TYPE;
1823 var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
1824 var ContextConsumer = REACT_CONTEXT_TYPE;
1825 var ContextProvider = REACT_PROVIDER_TYPE;
1826 var Element = REACT_ELEMENT_TYPE;
1827 var ForwardRef = REACT_FORWARD_REF_TYPE;
1828 var Fragment = REACT_FRAGMENT_TYPE;
1829 var Lazy = REACT_LAZY_TYPE;
1830 var Memo = REACT_MEMO_TYPE;
1831 var Portal = REACT_PORTAL_TYPE;
1832 var Profiler = REACT_PROFILER_TYPE;
1833 var StrictMode = REACT_STRICT_MODE_TYPE;
1834 var Suspense = REACT_SUSPENSE_TYPE;
1835 var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
1836
1837 function isAsyncMode(object) {
1838 {
1839 if (!hasWarnedAboutDeprecatedIsAsyncMode) {
1840 hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
1841
1842 console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
1843 }
1844 }
1845
1846 return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
1847 }
1848 function isConcurrentMode(object) {
1849 return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
1850 }
1851 function isContextConsumer(object) {
1852 return typeOf(object) === REACT_CONTEXT_TYPE;
1853 }
1854 function isContextProvider(object) {
1855 return typeOf(object) === REACT_PROVIDER_TYPE;
1856 }
1857 function isElement(object) {
1858 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1859 }
1860 function isForwardRef(object) {
1861 return typeOf(object) === REACT_FORWARD_REF_TYPE;
1862 }
1863 function isFragment(object) {
1864 return typeOf(object) === REACT_FRAGMENT_TYPE;
1865 }
1866 function isLazy(object) {
1867 return typeOf(object) === REACT_LAZY_TYPE;
1868 }
1869 function isMemo(object) {
1870 return typeOf(object) === REACT_MEMO_TYPE;
1871 }
1872 function isPortal(object) {
1873 return typeOf(object) === REACT_PORTAL_TYPE;
1874 }
1875 function isProfiler(object) {
1876 return typeOf(object) === REACT_PROFILER_TYPE;
1877 }
1878 function isStrictMode(object) {
1879 return typeOf(object) === REACT_STRICT_MODE_TYPE;
1880 }
1881 function isSuspense(object) {
1882 return typeOf(object) === REACT_SUSPENSE_TYPE;
1883 }
1884
1885 exports.AsyncMode = AsyncMode;
1886 exports.ConcurrentMode = ConcurrentMode;
1887 exports.ContextConsumer = ContextConsumer;
1888 exports.ContextProvider = ContextProvider;
1889 exports.Element = Element;
1890 exports.ForwardRef = ForwardRef;
1891 exports.Fragment = Fragment;
1892 exports.Lazy = Lazy;
1893 exports.Memo = Memo;
1894 exports.Portal = Portal;
1895 exports.Profiler = Profiler;
1896 exports.StrictMode = StrictMode;
1897 exports.Suspense = Suspense;
1898 exports.isAsyncMode = isAsyncMode;
1899 exports.isConcurrentMode = isConcurrentMode;
1900 exports.isContextConsumer = isContextConsumer;
1901 exports.isContextProvider = isContextProvider;
1902 exports.isElement = isElement;
1903 exports.isForwardRef = isForwardRef;
1904 exports.isFragment = isFragment;
1905 exports.isLazy = isLazy;
1906 exports.isMemo = isMemo;
1907 exports.isPortal = isPortal;
1908 exports.isProfiler = isProfiler;
1909 exports.isStrictMode = isStrictMode;
1910 exports.isSuspense = isSuspense;
1911 exports.isValidElementType = isValidElementType;
1912 exports.typeOf = typeOf;
1913 })();
1914 }
1915
1916
1917 /***/ }),
1918
1919 /***/ "../node_modules/prop-types/node_modules/react-is/index.js":
1920 /*!*****************************************************************!*\
1921 !*** ../node_modules/prop-types/node_modules/react-is/index.js ***!
1922 \*****************************************************************/
1923 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1924
1925 "use strict";
1926
1927
1928 if (false) {} else {
1929 module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ "../node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js");
1930 }
1931
1932
1933 /***/ }),
1934
1935 /***/ "../node_modules/react-dom/client.js":
1936 /*!*******************************************!*\
1937 !*** ../node_modules/react-dom/client.js ***!
1938 \*******************************************/
1939 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1940
1941 "use strict";
1942
1943
1944 var m = __webpack_require__(/*! react-dom */ "react-dom");
1945 if (false) {} else {
1946 var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1947 exports.createRoot = function(c, o) {
1948 i.usingClientEntryPoint = true;
1949 try {
1950 return m.createRoot(c, o);
1951 } finally {
1952 i.usingClientEntryPoint = false;
1953 }
1954 };
1955 exports.hydrateRoot = function(c, h, o) {
1956 i.usingClientEntryPoint = true;
1957 try {
1958 return m.hydrateRoot(c, h, o);
1959 } finally {
1960 i.usingClientEntryPoint = false;
1961 }
1962 };
1963 }
1964
1965
1966 /***/ }),
1967
1968 /***/ "../node_modules/react/cjs/react-jsx-runtime.development.js":
1969 /*!******************************************************************!*\
1970 !*** ../node_modules/react/cjs/react-jsx-runtime.development.js ***!
1971 \******************************************************************/
1972 /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1973
1974 "use strict";
1975 /**
1976 * @license React
1977 * react-jsx-runtime.development.js
1978 *
1979 * Copyright (c) Facebook, Inc. and its affiliates.
1980 *
1981 * This source code is licensed under the MIT license found in the
1982 * LICENSE file in the root directory of this source tree.
1983 */
1984
1985
1986
1987 if (true) {
1988 (function() {
1989 'use strict';
1990
1991 var React = __webpack_require__(/*! react */ "react");
1992
1993 // ATTENTION
1994 // When adding new symbols to this file,
1995 // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
1996 // The Symbol used to tag the ReactElement-like types.
1997 var REACT_ELEMENT_TYPE = Symbol.for('react.element');
1998 var REACT_PORTAL_TYPE = Symbol.for('react.portal');
1999 var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
2000 var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
2001 var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
2002 var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
2003 var REACT_CONTEXT_TYPE = Symbol.for('react.context');
2004 var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
2005 var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
2006 var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
2007 var REACT_MEMO_TYPE = Symbol.for('react.memo');
2008 var REACT_LAZY_TYPE = Symbol.for('react.lazy');
2009 var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
2010 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
2011 var FAUX_ITERATOR_SYMBOL = '@@iterator';
2012 function getIteratorFn(maybeIterable) {
2013 if (maybeIterable === null || typeof maybeIterable !== 'object') {
2014 return null;
2015 }
2016
2017 var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
2018
2019 if (typeof maybeIterator === 'function') {
2020 return maybeIterator;
2021 }
2022
2023 return null;
2024 }
2025
2026 var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
2027
2028 function error(format) {
2029 {
2030 {
2031 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2032 args[_key2 - 1] = arguments[_key2];
2033 }
2034
2035 printWarning('error', format, args);
2036 }
2037 }
2038 }
2039
2040 function printWarning(level, format, args) {
2041 // When changing this logic, you might want to also
2042 // update consoleWithStackDev.www.js as well.
2043 {
2044 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2045 var stack = ReactDebugCurrentFrame.getStackAddendum();
2046
2047 if (stack !== '') {
2048 format += '%s';
2049 args = args.concat([stack]);
2050 } // eslint-disable-next-line react-internal/safe-string-coercion
2051
2052
2053 var argsWithFormat = args.map(function (item) {
2054 return String(item);
2055 }); // Careful: RN currently depends on this prefix
2056
2057 argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
2058 // breaks IE9: https://github.com/facebook/react/issues/13610
2059 // eslint-disable-next-line react-internal/no-production-logging
2060
2061 Function.prototype.apply.call(console[level], console, argsWithFormat);
2062 }
2063 }
2064
2065 // -----------------------------------------------------------------------------
2066
2067 var enableScopeAPI = false; // Experimental Create Event Handle API.
2068 var enableCacheElement = false;
2069 var enableTransitionTracing = false; // No known bugs, but needs performance testing
2070
2071 var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
2072 // stuff. Intended to enable React core members to more easily debug scheduling
2073 // issues in DEV builds.
2074
2075 var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
2076
2077 var REACT_MODULE_REFERENCE;
2078
2079 {
2080 REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
2081 }
2082
2083 function isValidElementType(type) {
2084 if (typeof type === 'string' || typeof type === 'function') {
2085 return true;
2086 } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
2087
2088
2089 if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
2090 return true;
2091 }
2092
2093 if (typeof type === 'object' && type !== null) {
2094 if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
2095 // types supported by any Flight configuration anywhere since
2096 // we don't know which Flight build this will end up being used
2097 // with.
2098 type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
2099 return true;
2100 }
2101 }
2102
2103 return false;
2104 }
2105
2106 function getWrappedName(outerType, innerType, wrapperName) {
2107 var displayName = outerType.displayName;
2108
2109 if (displayName) {
2110 return displayName;
2111 }
2112
2113 var functionName = innerType.displayName || innerType.name || '';
2114 return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
2115 } // Keep in sync with react-reconciler/getComponentNameFromFiber
2116
2117
2118 function getContextName(type) {
2119 return type.displayName || 'Context';
2120 } // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
2121
2122
2123 function getComponentNameFromType(type) {
2124 if (type == null) {
2125 // Host root, text node or just invalid type.
2126 return null;
2127 }
2128
2129 {
2130 if (typeof type.tag === 'number') {
2131 error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
2132 }
2133 }
2134
2135 if (typeof type === 'function') {
2136 return type.displayName || type.name || null;
2137 }
2138
2139 if (typeof type === 'string') {
2140 return type;
2141 }
2142
2143 switch (type) {
2144 case REACT_FRAGMENT_TYPE:
2145 return 'Fragment';
2146
2147 case REACT_PORTAL_TYPE:
2148 return 'Portal';
2149
2150 case REACT_PROFILER_TYPE:
2151 return 'Profiler';
2152
2153 case REACT_STRICT_MODE_TYPE:
2154 return 'StrictMode';
2155
2156 case REACT_SUSPENSE_TYPE:
2157 return 'Suspense';
2158
2159 case REACT_SUSPENSE_LIST_TYPE:
2160 return 'SuspenseList';
2161
2162 }
2163
2164 if (typeof type === 'object') {
2165 switch (type.$$typeof) {
2166 case REACT_CONTEXT_TYPE:
2167 var context = type;
2168 return getContextName(context) + '.Consumer';
2169
2170 case REACT_PROVIDER_TYPE:
2171 var provider = type;
2172 return getContextName(provider._context) + '.Provider';
2173
2174 case REACT_FORWARD_REF_TYPE:
2175 return getWrappedName(type, type.render, 'ForwardRef');
2176
2177 case REACT_MEMO_TYPE:
2178 var outerName = type.displayName || null;
2179
2180 if (outerName !== null) {
2181 return outerName;
2182 }
2183
2184 return getComponentNameFromType(type.type) || 'Memo';
2185
2186 case REACT_LAZY_TYPE:
2187 {
2188 var lazyComponent = type;
2189 var payload = lazyComponent._payload;
2190 var init = lazyComponent._init;
2191
2192 try {
2193 return getComponentNameFromType(init(payload));
2194 } catch (x) {
2195 return null;
2196 }
2197 }
2198
2199 // eslint-disable-next-line no-fallthrough
2200 }
2201 }
2202
2203 return null;
2204 }
2205
2206 var assign = Object.assign;
2207
2208 // Helpers to patch console.logs to avoid logging during side-effect free
2209 // replaying on render function. This currently only patches the object
2210 // lazily which won't cover if the log function was extracted eagerly.
2211 // We could also eagerly patch the method.
2212 var disabledDepth = 0;
2213 var prevLog;
2214 var prevInfo;
2215 var prevWarn;
2216 var prevError;
2217 var prevGroup;
2218 var prevGroupCollapsed;
2219 var prevGroupEnd;
2220
2221 function disabledLog() {}
2222
2223 disabledLog.__reactDisabledLog = true;
2224 function disableLogs() {
2225 {
2226 if (disabledDepth === 0) {
2227 /* eslint-disable react-internal/no-production-logging */
2228 prevLog = console.log;
2229 prevInfo = console.info;
2230 prevWarn = console.warn;
2231 prevError = console.error;
2232 prevGroup = console.group;
2233 prevGroupCollapsed = console.groupCollapsed;
2234 prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
2235
2236 var props = {
2237 configurable: true,
2238 enumerable: true,
2239 value: disabledLog,
2240 writable: true
2241 }; // $FlowFixMe Flow thinks console is immutable.
2242
2243 Object.defineProperties(console, {
2244 info: props,
2245 log: props,
2246 warn: props,
2247 error: props,
2248 group: props,
2249 groupCollapsed: props,
2250 groupEnd: props
2251 });
2252 /* eslint-enable react-internal/no-production-logging */
2253 }
2254
2255 disabledDepth++;
2256 }
2257 }
2258 function reenableLogs() {
2259 {
2260 disabledDepth--;
2261
2262 if (disabledDepth === 0) {
2263 /* eslint-disable react-internal/no-production-logging */
2264 var props = {
2265 configurable: true,
2266 enumerable: true,
2267 writable: true
2268 }; // $FlowFixMe Flow thinks console is immutable.
2269
2270 Object.defineProperties(console, {
2271 log: assign({}, props, {
2272 value: prevLog
2273 }),
2274 info: assign({}, props, {
2275 value: prevInfo
2276 }),
2277 warn: assign({}, props, {
2278 value: prevWarn
2279 }),
2280 error: assign({}, props, {
2281 value: prevError
2282 }),
2283 group: assign({}, props, {
2284 value: prevGroup
2285 }),
2286 groupCollapsed: assign({}, props, {
2287 value: prevGroupCollapsed
2288 }),
2289 groupEnd: assign({}, props, {
2290 value: prevGroupEnd
2291 })
2292 });
2293 /* eslint-enable react-internal/no-production-logging */
2294 }
2295
2296 if (disabledDepth < 0) {
2297 error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
2298 }
2299 }
2300 }
2301
2302 var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2303 var prefix;
2304 function describeBuiltInComponentFrame(name, source, ownerFn) {
2305 {
2306 if (prefix === undefined) {
2307 // Extract the VM specific prefix used by each line.
2308 try {
2309 throw Error();
2310 } catch (x) {
2311 var match = x.stack.trim().match(/\n( *(at )?)/);
2312 prefix = match && match[1] || '';
2313 }
2314 } // We use the prefix to ensure our stacks line up with native stack frames.
2315
2316
2317 return '\n' + prefix + name;
2318 }
2319 }
2320 var reentry = false;
2321 var componentFrameCache;
2322
2323 {
2324 var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
2325 componentFrameCache = new PossiblyWeakMap();
2326 }
2327
2328 function describeNativeComponentFrame(fn, construct) {
2329 // If something asked for a stack inside a fake render, it should get ignored.
2330 if ( !fn || reentry) {
2331 return '';
2332 }
2333
2334 {
2335 var frame = componentFrameCache.get(fn);
2336
2337 if (frame !== undefined) {
2338 return frame;
2339 }
2340 }
2341
2342 var control;
2343 reentry = true;
2344 var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
2345
2346 Error.prepareStackTrace = undefined;
2347 var previousDispatcher;
2348
2349 {
2350 previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
2351 // for warnings.
2352
2353 ReactCurrentDispatcher.current = null;
2354 disableLogs();
2355 }
2356
2357 try {
2358 // This should throw.
2359 if (construct) {
2360 // Something should be setting the props in the constructor.
2361 var Fake = function () {
2362 throw Error();
2363 }; // $FlowFixMe
2364
2365
2366 Object.defineProperty(Fake.prototype, 'props', {
2367 set: function () {
2368 // We use a throwing setter instead of frozen or non-writable props
2369 // because that won't throw in a non-strict mode function.
2370 throw Error();
2371 }
2372 });
2373
2374 if (typeof Reflect === 'object' && Reflect.construct) {
2375 // We construct a different control for this case to include any extra
2376 // frames added by the construct call.
2377 try {
2378 Reflect.construct(Fake, []);
2379 } catch (x) {
2380 control = x;
2381 }
2382
2383 Reflect.construct(fn, [], Fake);
2384 } else {
2385 try {
2386 Fake.call();
2387 } catch (x) {
2388 control = x;
2389 }
2390
2391 fn.call(Fake.prototype);
2392 }
2393 } else {
2394 try {
2395 throw Error();
2396 } catch (x) {
2397 control = x;
2398 }
2399
2400 fn();
2401 }
2402 } catch (sample) {
2403 // This is inlined manually because closure doesn't do it for us.
2404 if (sample && control && typeof sample.stack === 'string') {
2405 // This extracts the first frame from the sample that isn't also in the control.
2406 // Skipping one frame that we assume is the frame that calls the two.
2407 var sampleLines = sample.stack.split('\n');
2408 var controlLines = control.stack.split('\n');
2409 var s = sampleLines.length - 1;
2410 var c = controlLines.length - 1;
2411
2412 while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2413 // We expect at least one stack frame to be shared.
2414 // Typically this will be the root most one. However, stack frames may be
2415 // cut off due to maximum stack limits. In this case, one maybe cut off
2416 // earlier than the other. We assume that the sample is longer or the same
2417 // and there for cut off earlier. So we should find the root most frame in
2418 // the sample somewhere in the control.
2419 c--;
2420 }
2421
2422 for (; s >= 1 && c >= 0; s--, c--) {
2423 // Next we find the first one that isn't the same which should be the
2424 // frame that called our sample function and the control.
2425 if (sampleLines[s] !== controlLines[c]) {
2426 // In V8, the first line is describing the message but other VMs don't.
2427 // If we're about to return the first line, and the control is also on the same
2428 // line, that's a pretty good indicator that our sample threw at same line as
2429 // the control. I.e. before we entered the sample frame. So we ignore this result.
2430 // This can happen if you passed a class to function component, or non-function.
2431 if (s !== 1 || c !== 1) {
2432 do {
2433 s--;
2434 c--; // We may still have similar intermediate frames from the construct call.
2435 // The next one that isn't the same should be our match though.
2436
2437 if (c < 0 || sampleLines[s] !== controlLines[c]) {
2438 // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
2439 var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
2440 // but we have a user-provided "displayName"
2441 // splice it in to make the stack more readable.
2442
2443
2444 if (fn.displayName && _frame.includes('<anonymous>')) {
2445 _frame = _frame.replace('<anonymous>', fn.displayName);
2446 }
2447
2448 {
2449 if (typeof fn === 'function') {
2450 componentFrameCache.set(fn, _frame);
2451 }
2452 } // Return the line we found.
2453
2454
2455 return _frame;
2456 }
2457 } while (s >= 1 && c >= 0);
2458 }
2459
2460 break;
2461 }
2462 }
2463 }
2464 } finally {
2465 reentry = false;
2466
2467 {
2468 ReactCurrentDispatcher.current = previousDispatcher;
2469 reenableLogs();
2470 }
2471
2472 Error.prepareStackTrace = previousPrepareStackTrace;
2473 } // Fallback to just using the name if we couldn't make it throw.
2474
2475
2476 var name = fn ? fn.displayName || fn.name : '';
2477 var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
2478
2479 {
2480 if (typeof fn === 'function') {
2481 componentFrameCache.set(fn, syntheticFrame);
2482 }
2483 }
2484
2485 return syntheticFrame;
2486 }
2487 function describeFunctionComponentFrame(fn, source, ownerFn) {
2488 {
2489 return describeNativeComponentFrame(fn, false);
2490 }
2491 }
2492
2493 function shouldConstruct(Component) {
2494 var prototype = Component.prototype;
2495 return !!(prototype && prototype.isReactComponent);
2496 }
2497
2498 function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2499
2500 if (type == null) {
2501 return '';
2502 }
2503
2504 if (typeof type === 'function') {
2505 {
2506 return describeNativeComponentFrame(type, shouldConstruct(type));
2507 }
2508 }
2509
2510 if (typeof type === 'string') {
2511 return describeBuiltInComponentFrame(type);
2512 }
2513
2514 switch (type) {
2515 case REACT_SUSPENSE_TYPE:
2516 return describeBuiltInComponentFrame('Suspense');
2517
2518 case REACT_SUSPENSE_LIST_TYPE:
2519 return describeBuiltInComponentFrame('SuspenseList');
2520 }
2521
2522 if (typeof type === 'object') {
2523 switch (type.$$typeof) {
2524 case REACT_FORWARD_REF_TYPE:
2525 return describeFunctionComponentFrame(type.render);
2526
2527 case REACT_MEMO_TYPE:
2528 // Memo may contain any component type so we recursively resolve it.
2529 return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2530
2531 case REACT_LAZY_TYPE:
2532 {
2533 var lazyComponent = type;
2534 var payload = lazyComponent._payload;
2535 var init = lazyComponent._init;
2536
2537 try {
2538 // Lazy may contain any component type so we recursively resolve it.
2539 return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2540 } catch (x) {}
2541 }
2542 }
2543 }
2544
2545 return '';
2546 }
2547
2548 var hasOwnProperty = Object.prototype.hasOwnProperty;
2549
2550 var loggedTypeFailures = {};
2551 var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2552
2553 function setCurrentlyValidatingElement(element) {
2554 {
2555 if (element) {
2556 var owner = element._owner;
2557 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2558 ReactDebugCurrentFrame.setExtraStackFrame(stack);
2559 } else {
2560 ReactDebugCurrentFrame.setExtraStackFrame(null);
2561 }
2562 }
2563 }
2564
2565 function checkPropTypes(typeSpecs, values, location, componentName, element) {
2566 {
2567 // $FlowFixMe This is okay but Flow doesn't know it.
2568 var has = Function.call.bind(hasOwnProperty);
2569
2570 for (var typeSpecName in typeSpecs) {
2571 if (has(typeSpecs, typeSpecName)) {
2572 var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
2573 // fail the render phase where it didn't fail before. So we log it.
2574 // After these have been cleaned up, we'll let them throw.
2575
2576 try {
2577 // This is intentionally an invariant that gets caught. It's the same
2578 // behavior as without this statement except with a better message.
2579 if (typeof typeSpecs[typeSpecName] !== 'function') {
2580 // eslint-disable-next-line react-internal/prod-error-codes
2581 var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
2582 err.name = 'Invariant Violation';
2583 throw err;
2584 }
2585
2586 error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
2587 } catch (ex) {
2588 error$1 = ex;
2589 }
2590
2591 if (error$1 && !(error$1 instanceof Error)) {
2592 setCurrentlyValidatingElement(element);
2593
2594 error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
2595
2596 setCurrentlyValidatingElement(null);
2597 }
2598
2599 if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2600 // Only monitor this failure once because there tends to be a lot of the
2601 // same error.
2602 loggedTypeFailures[error$1.message] = true;
2603 setCurrentlyValidatingElement(element);
2604
2605 error('Failed %s type: %s', location, error$1.message);
2606
2607 setCurrentlyValidatingElement(null);
2608 }
2609 }
2610 }
2611 }
2612 }
2613
2614 var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
2615
2616 function isArray(a) {
2617 return isArrayImpl(a);
2618 }
2619
2620 /*
2621 * The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
2622 * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
2623 *
2624 * The functions in this module will throw an easier-to-understand,
2625 * easier-to-debug exception with a clear errors message message explaining the
2626 * problem. (Instead of a confusing exception thrown inside the implementation
2627 * of the `value` object).
2628 */
2629 // $FlowFixMe only called in DEV, so void return is not possible.
2630 function typeName(value) {
2631 {
2632 // toStringTag is needed for namespaced types like Temporal.Instant
2633 var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
2634 var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
2635 return type;
2636 }
2637 } // $FlowFixMe only called in DEV, so void return is not possible.
2638
2639
2640 function willCoercionThrow(value) {
2641 {
2642 try {
2643 testStringCoercion(value);
2644 return false;
2645 } catch (e) {
2646 return true;
2647 }
2648 }
2649 }
2650
2651 function testStringCoercion(value) {
2652 // If you ended up here by following an exception call stack, here's what's
2653 // happened: you supplied an object or symbol value to React (as a prop, key,
2654 // DOM attribute, CSS property, string ref, etc.) and when React tried to
2655 // coerce it to a string using `'' + value`, an exception was thrown.
2656 //
2657 // The most common types that will cause this exception are `Symbol` instances
2658 // and Temporal objects like `Temporal.Instant`. But any object that has a
2659 // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
2660 // exception. (Library authors do this to prevent users from using built-in
2661 // numeric operators like `+` or comparison operators like `>=` because custom
2662 // methods are needed to perform accurate arithmetic or comparison.)
2663 //
2664 // To fix the problem, coerce this object or symbol value to a string before
2665 // passing it to React. The most reliable way is usually `String(value)`.
2666 //
2667 // To find which value is throwing, check the browser or debugger console.
2668 // Before this exception was thrown, there should be `console.error` output
2669 // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
2670 // problem and how that type was used: key, atrribute, input value prop, etc.
2671 // In most cases, this console output also shows the component and its
2672 // ancestor components where the exception happened.
2673 //
2674 // eslint-disable-next-line react-internal/safe-string-coercion
2675 return '' + value;
2676 }
2677 function checkKeyStringCoercion(value) {
2678 {
2679 if (willCoercionThrow(value)) {
2680 error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
2681
2682 return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
2683 }
2684 }
2685 }
2686
2687 var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2688 var RESERVED_PROPS = {
2689 key: true,
2690 ref: true,
2691 __self: true,
2692 __source: true
2693 };
2694 var specialPropKeyWarningShown;
2695 var specialPropRefWarningShown;
2696 var didWarnAboutStringRefs;
2697
2698 {
2699 didWarnAboutStringRefs = {};
2700 }
2701
2702 function hasValidRef(config) {
2703 {
2704 if (hasOwnProperty.call(config, 'ref')) {
2705 var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
2706
2707 if (getter && getter.isReactWarning) {
2708 return false;
2709 }
2710 }
2711 }
2712
2713 return config.ref !== undefined;
2714 }
2715
2716 function hasValidKey(config) {
2717 {
2718 if (hasOwnProperty.call(config, 'key')) {
2719 var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
2720
2721 if (getter && getter.isReactWarning) {
2722 return false;
2723 }
2724 }
2725 }
2726
2727 return config.key !== undefined;
2728 }
2729
2730 function warnIfStringRefCannotBeAutoConverted(config, self) {
2731 {
2732 if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2733 var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2734
2735 if (!didWarnAboutStringRefs[componentName]) {
2736 error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2737
2738 didWarnAboutStringRefs[componentName] = true;
2739 }
2740 }
2741 }
2742 }
2743
2744 function defineKeyPropWarningGetter(props, displayName) {
2745 {
2746 var warnAboutAccessingKey = function () {
2747 if (!specialPropKeyWarningShown) {
2748 specialPropKeyWarningShown = true;
2749
2750 error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2751 }
2752 };
2753
2754 warnAboutAccessingKey.isReactWarning = true;
2755 Object.defineProperty(props, 'key', {
2756 get: warnAboutAccessingKey,
2757 configurable: true
2758 });
2759 }
2760 }
2761
2762 function defineRefPropWarningGetter(props, displayName) {
2763 {
2764 var warnAboutAccessingRef = function () {
2765 if (!specialPropRefWarningShown) {
2766 specialPropRefWarningShown = true;
2767
2768 error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
2769 }
2770 };
2771
2772 warnAboutAccessingRef.isReactWarning = true;
2773 Object.defineProperty(props, 'ref', {
2774 get: warnAboutAccessingRef,
2775 configurable: true
2776 });
2777 }
2778 }
2779 /**
2780 * Factory method to create a new React element. This no longer adheres to
2781 * the class pattern, so do not use new to call it. Also, instanceof check
2782 * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
2783 * if something is a React Element.
2784 *
2785 * @param {*} type
2786 * @param {*} props
2787 * @param {*} key
2788 * @param {string|object} ref
2789 * @param {*} owner
2790 * @param {*} self A *temporary* helper to detect places where `this` is
2791 * different from the `owner` when React.createElement is called, so that we
2792 * can warn. We want to get rid of owner and replace string `ref`s with arrow
2793 * functions, and as long as `this` and owner are the same, there will be no
2794 * change in behavior.
2795 * @param {*} source An annotation object (added by a transpiler or otherwise)
2796 * indicating filename, line number, and/or other information.
2797 * @internal
2798 */
2799
2800
2801 var ReactElement = function (type, key, ref, self, source, owner, props) {
2802 var element = {
2803 // This tag allows us to uniquely identify this as a React Element
2804 $$typeof: REACT_ELEMENT_TYPE,
2805 // Built-in properties that belong on the element
2806 type: type,
2807 key: key,
2808 ref: ref,
2809 props: props,
2810 // Record the component responsible for creating this element.
2811 _owner: owner
2812 };
2813
2814 {
2815 // The validation flag is currently mutative. We put it on
2816 // an external backing store so that we can freeze the whole object.
2817 // This can be replaced with a WeakMap once they are implemented in
2818 // commonly used development environments.
2819 element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
2820 // the validation flag non-enumerable (where possible, which should
2821 // include every environment we run tests in), so the test framework
2822 // ignores it.
2823
2824 Object.defineProperty(element._store, 'validated', {
2825 configurable: false,
2826 enumerable: false,
2827 writable: true,
2828 value: false
2829 }); // self and source are DEV only properties.
2830
2831 Object.defineProperty(element, '_self', {
2832 configurable: false,
2833 enumerable: false,
2834 writable: false,
2835 value: self
2836 }); // Two elements created in two different places should be considered
2837 // equal for testing purposes and therefore we hide it from enumeration.
2838
2839 Object.defineProperty(element, '_source', {
2840 configurable: false,
2841 enumerable: false,
2842 writable: false,
2843 value: source
2844 });
2845
2846 if (Object.freeze) {
2847 Object.freeze(element.props);
2848 Object.freeze(element);
2849 }
2850 }
2851
2852 return element;
2853 };
2854 /**
2855 * https://github.com/reactjs/rfcs/pull/107
2856 * @param {*} type
2857 * @param {object} props
2858 * @param {string} key
2859 */
2860
2861 function jsxDEV(type, config, maybeKey, source, self) {
2862 {
2863 var propName; // Reserved names are extracted
2864
2865 var props = {};
2866 var key = null;
2867 var ref = null; // Currently, key can be spread in as a prop. This causes a potential
2868 // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
2869 // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
2870 // but as an intermediary step, we will use jsxDEV for everything except
2871 // <div {...props} key="Hi" />, because we aren't currently able to tell if
2872 // key is explicitly declared to be undefined or not.
2873
2874 if (maybeKey !== undefined) {
2875 {
2876 checkKeyStringCoercion(maybeKey);
2877 }
2878
2879 key = '' + maybeKey;
2880 }
2881
2882 if (hasValidKey(config)) {
2883 {
2884 checkKeyStringCoercion(config.key);
2885 }
2886
2887 key = '' + config.key;
2888 }
2889
2890 if (hasValidRef(config)) {
2891 ref = config.ref;
2892 warnIfStringRefCannotBeAutoConverted(config, self);
2893 } // Remaining properties are added to a new props object
2894
2895
2896 for (propName in config) {
2897 if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2898 props[propName] = config[propName];
2899 }
2900 } // Resolve default props
2901
2902
2903 if (type && type.defaultProps) {
2904 var defaultProps = type.defaultProps;
2905
2906 for (propName in defaultProps) {
2907 if (props[propName] === undefined) {
2908 props[propName] = defaultProps[propName];
2909 }
2910 }
2911 }
2912
2913 if (key || ref) {
2914 var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
2915
2916 if (key) {
2917 defineKeyPropWarningGetter(props, displayName);
2918 }
2919
2920 if (ref) {
2921 defineRefPropWarningGetter(props, displayName);
2922 }
2923 }
2924
2925 return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2926 }
2927 }
2928
2929 var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2930 var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2931
2932 function setCurrentlyValidatingElement$1(element) {
2933 {
2934 if (element) {
2935 var owner = element._owner;
2936 var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2937 ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2938 } else {
2939 ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2940 }
2941 }
2942 }
2943
2944 var propTypesMisspellWarningShown;
2945
2946 {
2947 propTypesMisspellWarningShown = false;
2948 }
2949 /**
2950 * Verifies the object is a ReactElement.
2951 * See https://reactjs.org/docs/react-api.html#isvalidelement
2952 * @param {?object} object
2953 * @return {boolean} True if `object` is a ReactElement.
2954 * @final
2955 */
2956
2957
2958 function isValidElement(object) {
2959 {
2960 return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2961 }
2962 }
2963
2964 function getDeclarationErrorAddendum() {
2965 {
2966 if (ReactCurrentOwner$1.current) {
2967 var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2968
2969 if (name) {
2970 return '\n\nCheck the render method of `' + name + '`.';
2971 }
2972 }
2973
2974 return '';
2975 }
2976 }
2977
2978 function getSourceInfoErrorAddendum(source) {
2979 {
2980 if (source !== undefined) {
2981 var fileName = source.fileName.replace(/^.*[\\\/]/, '');
2982 var lineNumber = source.lineNumber;
2983 return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
2984 }
2985
2986 return '';
2987 }
2988 }
2989 /**
2990 * Warn if there's no key explicitly set on dynamic arrays of children or
2991 * object keys are not valid. This allows us to keep track of children between
2992 * updates.
2993 */
2994
2995
2996 var ownerHasKeyUseWarning = {};
2997
2998 function getCurrentComponentErrorInfo(parentType) {
2999 {
3000 var info = getDeclarationErrorAddendum();
3001
3002 if (!info) {
3003 var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
3004
3005 if (parentName) {
3006 info = "\n\nCheck the top-level render call using <" + parentName + ">.";
3007 }
3008 }
3009
3010 return info;
3011 }
3012 }
3013 /**
3014 * Warn if the element doesn't have an explicit key assigned to it.
3015 * This element is in an array. The array could grow and shrink or be
3016 * reordered. All children that haven't already been validated are required to
3017 * have a "key" property assigned to it. Error statuses are cached so a warning
3018 * will only be shown once.
3019 *
3020 * @internal
3021 * @param {ReactElement} element Element that requires a key.
3022 * @param {*} parentType element's parent's type.
3023 */
3024
3025
3026 function validateExplicitKey(element, parentType) {
3027 {
3028 if (!element._store || element._store.validated || element.key != null) {
3029 return;
3030 }
3031
3032 element._store.validated = true;
3033 var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
3034
3035 if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
3036 return;
3037 }
3038
3039 ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
3040 // property, it may be the creator of the child that's responsible for
3041 // assigning it a key.
3042
3043 var childOwner = '';
3044
3045 if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
3046 // Give the component that originally created this child.
3047 childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
3048 }
3049
3050 setCurrentlyValidatingElement$1(element);
3051
3052 error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
3053
3054 setCurrentlyValidatingElement$1(null);
3055 }
3056 }
3057 /**
3058 * Ensure that every element either is passed in a static location, in an
3059 * array with an explicit keys property defined, or in an object literal
3060 * with valid key property.
3061 *
3062 * @internal
3063 * @param {ReactNode} node Statically passed child of any type.
3064 * @param {*} parentType node's parent's type.
3065 */
3066
3067
3068 function validateChildKeys(node, parentType) {
3069 {
3070 if (typeof node !== 'object') {
3071 return;
3072 }
3073
3074 if (isArray(node)) {
3075 for (var i = 0; i < node.length; i++) {
3076 var child = node[i];
3077
3078 if (isValidElement(child)) {
3079 validateExplicitKey(child, parentType);
3080 }
3081 }
3082 } else if (isValidElement(node)) {
3083 // This element was passed in a valid location.
3084 if (node._store) {
3085 node._store.validated = true;
3086 }
3087 } else if (node) {
3088 var iteratorFn = getIteratorFn(node);
3089
3090 if (typeof iteratorFn === 'function') {
3091 // Entry iterators used to provide implicit keys,
3092 // but now we print a separate warning for them later.
3093 if (iteratorFn !== node.entries) {
3094 var iterator = iteratorFn.call(node);
3095 var step;
3096
3097 while (!(step = iterator.next()).done) {
3098 if (isValidElement(step.value)) {
3099 validateExplicitKey(step.value, parentType);
3100 }
3101 }
3102 }
3103 }
3104 }
3105 }
3106 }
3107 /**
3108 * Given an element, validate that its props follow the propTypes definition,
3109 * provided by the type.
3110 *
3111 * @param {ReactElement} element
3112 */
3113
3114
3115 function validatePropTypes(element) {
3116 {
3117 var type = element.type;
3118
3119 if (type === null || type === undefined || typeof type === 'string') {
3120 return;
3121 }
3122
3123 var propTypes;
3124
3125 if (typeof type === 'function') {
3126 propTypes = type.propTypes;
3127 } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
3128 // Inner props are checked in the reconciler.
3129 type.$$typeof === REACT_MEMO_TYPE)) {
3130 propTypes = type.propTypes;
3131 } else {
3132 return;
3133 }
3134
3135 if (propTypes) {
3136 // Intentionally inside to avoid triggering lazy initializers:
3137 var name = getComponentNameFromType(type);
3138 checkPropTypes(propTypes, element.props, 'prop', name, element);
3139 } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
3140 propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
3141
3142 var _name = getComponentNameFromType(type);
3143
3144 error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
3145 }
3146
3147 if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
3148 error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
3149 }
3150 }
3151 }
3152 /**
3153 * Given a fragment, validate that it can only be provided with fragment props
3154 * @param {ReactElement} fragment
3155 */
3156
3157
3158 function validateFragmentProps(fragment) {
3159 {
3160 var keys = Object.keys(fragment.props);
3161
3162 for (var i = 0; i < keys.length; i++) {
3163 var key = keys[i];
3164
3165 if (key !== 'children' && key !== 'key') {
3166 setCurrentlyValidatingElement$1(fragment);
3167
3168 error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
3169
3170 setCurrentlyValidatingElement$1(null);
3171 break;
3172 }
3173 }
3174
3175 if (fragment.ref !== null) {
3176 setCurrentlyValidatingElement$1(fragment);
3177
3178 error('Invalid attribute `ref` supplied to `React.Fragment`.');
3179
3180 setCurrentlyValidatingElement$1(null);
3181 }
3182 }
3183 }
3184
3185 var didWarnAboutKeySpread = {};
3186 function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
3187 {
3188 var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
3189 // succeed and there will likely be errors in render.
3190
3191 if (!validType) {
3192 var info = '';
3193
3194 if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
3195 info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
3196 }
3197
3198 var sourceInfo = getSourceInfoErrorAddendum(source);
3199
3200 if (sourceInfo) {
3201 info += sourceInfo;
3202 } else {
3203 info += getDeclarationErrorAddendum();
3204 }
3205
3206 var typeString;
3207
3208 if (type === null) {
3209 typeString = 'null';
3210 } else if (isArray(type)) {
3211 typeString = 'array';
3212 } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
3213 typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
3214 info = ' Did you accidentally export a JSX literal instead of a component?';
3215 } else {
3216 typeString = typeof type;
3217 }
3218
3219 error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
3220 }
3221
3222 var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
3223 // TODO: Drop this when these are no longer allowed as the type argument.
3224
3225 if (element == null) {
3226 return element;
3227 } // Skip key warning if the type isn't valid since our key validation logic
3228 // doesn't expect a non-string/function type and can throw confusing errors.
3229 // We don't want exception behavior to differ between dev and prod.
3230 // (Rendering will throw with a helpful message and as soon as the type is
3231 // fixed, the key warnings will appear.)
3232
3233
3234 if (validType) {
3235 var children = props.children;
3236
3237 if (children !== undefined) {
3238 if (isStaticChildren) {
3239 if (isArray(children)) {
3240 for (var i = 0; i < children.length; i++) {
3241 validateChildKeys(children[i], type);
3242 }
3243
3244 if (Object.freeze) {
3245 Object.freeze(children);
3246 }
3247 } else {
3248 error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
3249 }
3250 } else {
3251 validateChildKeys(children, type);
3252 }
3253 }
3254 }
3255
3256 {
3257 if (hasOwnProperty.call(props, 'key')) {
3258 var componentName = getComponentNameFromType(type);
3259 var keys = Object.keys(props).filter(function (k) {
3260 return k !== 'key';
3261 });
3262 var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
3263
3264 if (!didWarnAboutKeySpread[componentName + beforeExample]) {
3265 var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
3266
3267 error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
3268
3269 didWarnAboutKeySpread[componentName + beforeExample] = true;
3270 }
3271 }
3272 }
3273
3274 if (type === REACT_FRAGMENT_TYPE) {
3275 validateFragmentProps(element);
3276 } else {
3277 validatePropTypes(element);
3278 }
3279
3280 return element;
3281 }
3282 } // These two functions exist to still get child warnings in dev
3283 // even with the prod transform. This means that jsxDEV is purely
3284 // opt-in behavior for better messages but that we won't stop
3285 // giving you warnings if you use production apis.
3286
3287 function jsxWithValidationStatic(type, props, key) {
3288 {
3289 return jsxWithValidation(type, props, key, true);
3290 }
3291 }
3292 function jsxWithValidationDynamic(type, props, key) {
3293 {
3294 return jsxWithValidation(type, props, key, false);
3295 }
3296 }
3297
3298 var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
3299 // for now we can ship identical prod functions
3300
3301 var jsxs = jsxWithValidationStatic ;
3302
3303 exports.Fragment = REACT_FRAGMENT_TYPE;
3304 exports.jsx = jsx;
3305 exports.jsxs = jsxs;
3306 })();
3307 }
3308
3309
3310 /***/ }),
3311
3312 /***/ "../node_modules/react/jsx-runtime.js":
3313 /*!********************************************!*\
3314 !*** ../node_modules/react/jsx-runtime.js ***!
3315 \********************************************/
3316 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3317
3318 "use strict";
3319
3320
3321 if (false) {} else {
3322 module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js");
3323 }
3324
3325
3326 /***/ }),
3327
3328 /***/ "react":
3329 /*!************************!*\
3330 !*** external "React" ***!
3331 \************************/
3332 /***/ ((module) => {
3333
3334 "use strict";
3335 module.exports = React;
3336
3337 /***/ }),
3338
3339 /***/ "react-dom":
3340 /*!***************************!*\
3341 !*** external "ReactDOM" ***!
3342 \***************************/
3343 /***/ ((module) => {
3344
3345 "use strict";
3346 module.exports = ReactDOM;
3347
3348 /***/ }),
3349
3350 /***/ "@elementor/editor-app-bar":
3351 /*!*******************************************!*\
3352 !*** external "elementorV2.editorAppBar" ***!
3353 \*******************************************/
3354 /***/ ((module) => {
3355
3356 "use strict";
3357 module.exports = elementorV2.editorAppBar;
3358
3359 /***/ }),
3360
3361 /***/ "@elementor/icons/SpeakerphoneIcon":
3362 /*!********************************************************!*\
3363 !*** external "elementorV2.icons['SpeakerphoneIcon']" ***!
3364 \********************************************************/
3365 /***/ ((module) => {
3366
3367 "use strict";
3368 module.exports = elementorV2.icons['SpeakerphoneIcon'];
3369
3370 /***/ }),
3371
3372 /***/ "@elementor/ui":
3373 /*!*********************************!*\
3374 !*** external "elementorV2.ui" ***!
3375 \*********************************/
3376 /***/ ((module) => {
3377
3378 "use strict";
3379 module.exports = elementorV2.ui;
3380
3381 /***/ }),
3382
3383 /***/ "@wordpress/i18n":
3384 /*!**************************!*\
3385 !*** external "wp.i18n" ***!
3386 \**************************/
3387 /***/ ((module) => {
3388
3389 "use strict";
3390 module.exports = wp.i18n;
3391
3392 /***/ }),
3393
3394 /***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
3395 /*!******************************************************************!*\
3396 !*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
3397 \******************************************************************/
3398 /***/ ((module) => {
3399
3400 function _arrayLikeToArray(r, a) {
3401 (null == a || a > r.length) && (a = r.length);
3402 for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
3403 return n;
3404 }
3405 module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3406
3407 /***/ }),
3408
3409 /***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
3410 /*!****************************************************************!*\
3411 !*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
3412 \****************************************************************/
3413 /***/ ((module) => {
3414
3415 function _arrayWithHoles(r) {
3416 if (Array.isArray(r)) return r;
3417 }
3418 module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
3419
3420 /***/ }),
3421
3422 /***/ "../node_modules/@babel/runtime/helpers/extends.js":
3423 /*!*********************************************************!*\
3424 !*** ../node_modules/@babel/runtime/helpers/extends.js ***!
3425 \*********************************************************/
3426 /***/ ((module) => {
3427
3428 function _extends() {
3429 return module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {
3430 for (var e = 1; e < arguments.length; e++) {
3431 var t = arguments[e];
3432 for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
3433 }
3434 return n;
3435 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends.apply(null, arguments);
3436 }
3437 module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
3438
3439 /***/ }),
3440
3441 /***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
3442 /*!***********************************************************************!*\
3443 !*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
3444 \***********************************************************************/
3445 /***/ ((module) => {
3446
3447 function _interopRequireDefault(e) {
3448 return e && e.__esModule ? e : {
3449 "default": e
3450 };
3451 }
3452 module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
3453
3454 /***/ }),
3455
3456 /***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
3457 /*!**********************************************************************!*\
3458 !*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
3459 \**********************************************************************/
3460 /***/ ((module) => {
3461
3462 function _iterableToArrayLimit(r, l) {
3463 var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
3464 if (null != t) {
3465 var e,
3466 n,
3467 i,
3468 u,
3469 a = [],
3470 f = !0,
3471 o = !1;
3472 try {
3473 if (i = (t = t.call(r)).next, 0 === l) {
3474 if (Object(t) !== t) return;
3475 f = !1;
3476 } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
3477 } catch (r) {
3478 o = !0, n = r;
3479 } finally {
3480 try {
3481 if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
3482 } finally {
3483 if (o) throw n;
3484 }
3485 }
3486 return a;
3487 }
3488 }
3489 module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
3490
3491 /***/ }),
3492
3493 /***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
3494 /*!*****************************************************************!*\
3495 !*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
3496 \*****************************************************************/
3497 /***/ ((module) => {
3498
3499 function _nonIterableRest() {
3500 throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3501 }
3502 module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
3503
3504 /***/ }),
3505
3506 /***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
3507 /*!***************************************************************!*\
3508 !*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
3509 \***************************************************************/
3510 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3511
3512 var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
3513 var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
3514 var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
3515 var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
3516 function _slicedToArray(r, e) {
3517 return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
3518 }
3519 module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3520
3521 /***/ }),
3522
3523 /***/ "../node_modules/@babel/runtime/helpers/typeof.js":
3524 /*!********************************************************!*\
3525 !*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
3526 \********************************************************/
3527 /***/ ((module) => {
3528
3529 function _typeof(o) {
3530 "@babel/helpers - typeof";
3531
3532 return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
3533 return typeof o;
3534 } : function (o) {
3535 return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
3536 }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
3537 }
3538 module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
3539
3540 /***/ }),
3541
3542 /***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
3543 /*!****************************************************************************!*\
3544 !*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
3545 \****************************************************************************/
3546 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3547
3548 var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
3549 function _unsupportedIterableToArray(r, a) {
3550 if (r) {
3551 if ("string" == typeof r) return arrayLikeToArray(r, a);
3552 var t = {}.toString.call(r).slice(8, -1);
3553 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;
3554 }
3555 }
3556 module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
3557
3558 /***/ }),
3559
3560 /***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
3561 /*!**************************************************************************!*\
3562 !*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
3563 \**************************************************************************/
3564 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3565
3566 "use strict";
3567
3568 var __defProp = Object.defineProperty;
3569 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3570 var __getOwnPropNames = Object.getOwnPropertyNames;
3571 var __hasOwnProp = Object.prototype.hasOwnProperty;
3572 var __export = (target, all) => {
3573 for (var name in all)
3574 __defProp(target, name, { get: all[name], enumerable: true });
3575 };
3576 var __copyProps = (to, from, except, desc) => {
3577 if (from && typeof from === "object" || typeof from === "function") {
3578 for (let key of __getOwnPropNames(from))
3579 if (!__hasOwnProp.call(to, key) && key !== except)
3580 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3581 }
3582 return to;
3583 };
3584 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3585
3586 // src/focusManager.ts
3587 var focusManager_exports = {};
3588 __export(focusManager_exports, {
3589 FocusManager: () => FocusManager,
3590 focusManager: () => focusManager
3591 });
3592 module.exports = __toCommonJS(focusManager_exports);
3593 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
3594 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3595 var FocusManager = class extends import_subscribable.Subscribable {
3596 #focused;
3597 #cleanup;
3598 #setup;
3599 constructor() {
3600 super();
3601 this.#setup = (onFocus) => {
3602 if (!import_utils.isServer && window.addEventListener) {
3603 const listener = () => onFocus();
3604 window.addEventListener("visibilitychange", listener, false);
3605 return () => {
3606 window.removeEventListener("visibilitychange", listener);
3607 };
3608 }
3609 return;
3610 };
3611 }
3612 onSubscribe() {
3613 if (!this.#cleanup) {
3614 this.setEventListener(this.#setup);
3615 }
3616 }
3617 onUnsubscribe() {
3618 if (!this.hasListeners()) {
3619 this.#cleanup?.();
3620 this.#cleanup = void 0;
3621 }
3622 }
3623 setEventListener(setup) {
3624 this.#setup = setup;
3625 this.#cleanup?.();
3626 this.#cleanup = setup((focused) => {
3627 if (typeof focused === "boolean") {
3628 this.setFocused(focused);
3629 } else {
3630 this.onFocus();
3631 }
3632 });
3633 }
3634 setFocused(focused) {
3635 const changed = this.#focused !== focused;
3636 if (changed) {
3637 this.#focused = focused;
3638 this.onFocus();
3639 }
3640 }
3641 onFocus() {
3642 const isFocused = this.isFocused();
3643 this.listeners.forEach((listener) => {
3644 listener(isFocused);
3645 });
3646 }
3647 isFocused() {
3648 if (typeof this.#focused === "boolean") {
3649 return this.#focused;
3650 }
3651 return globalThis.document?.visibilityState !== "hidden";
3652 }
3653 };
3654 var focusManager = new FocusManager();
3655 // Annotate the CommonJS export names for ESM import in node:
3656 0 && (0);
3657 //# sourceMappingURL=focusManager.cjs.map
3658
3659 /***/ }),
3660
3661 /***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
3662 /*!***********************************************************************!*\
3663 !*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
3664 \***********************************************************************/
3665 /***/ ((module) => {
3666
3667 "use strict";
3668
3669 var __defProp = Object.defineProperty;
3670 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3671 var __getOwnPropNames = Object.getOwnPropertyNames;
3672 var __hasOwnProp = Object.prototype.hasOwnProperty;
3673 var __export = (target, all) => {
3674 for (var name in all)
3675 __defProp(target, name, { get: all[name], enumerable: true });
3676 };
3677 var __copyProps = (to, from, except, desc) => {
3678 if (from && typeof from === "object" || typeof from === "function") {
3679 for (let key of __getOwnPropNames(from))
3680 if (!__hasOwnProp.call(to, key) && key !== except)
3681 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3682 }
3683 return to;
3684 };
3685 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3686
3687 // src/hydration.ts
3688 var hydration_exports = {};
3689 __export(hydration_exports, {
3690 defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
3691 defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
3692 dehydrate: () => dehydrate,
3693 hydrate: () => hydrate
3694 });
3695 module.exports = __toCommonJS(hydration_exports);
3696 function defaultTransformerFn(data) {
3697 return data;
3698 }
3699 function dehydrateMutation(mutation) {
3700 return {
3701 mutationKey: mutation.options.mutationKey,
3702 state: mutation.state,
3703 ...mutation.options.scope && { scope: mutation.options.scope },
3704 ...mutation.meta && { meta: mutation.meta }
3705 };
3706 }
3707 function dehydrateQuery(query, serializeData) {
3708 return {
3709 state: {
3710 ...query.state,
3711 ...query.state.data !== void 0 && {
3712 data: serializeData(query.state.data)
3713 }
3714 },
3715 queryKey: query.queryKey,
3716 queryHash: query.queryHash,
3717 ...query.state.status === "pending" && {
3718 promise: query.promise?.then(serializeData).catch((error) => {
3719 if (true) {
3720 console.error(
3721 `A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
3722 );
3723 }
3724 return Promise.reject(new Error("redacted"));
3725 })
3726 },
3727 ...query.meta && { meta: query.meta }
3728 };
3729 }
3730 function defaultShouldDehydrateMutation(mutation) {
3731 return mutation.state.isPaused;
3732 }
3733 function defaultShouldDehydrateQuery(query) {
3734 return query.state.status === "success";
3735 }
3736 function dehydrate(client, options = {}) {
3737 const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
3738 const mutations = client.getMutationCache().getAll().flatMap(
3739 (mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
3740 );
3741 const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
3742 const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;
3743 const queries = client.getQueryCache().getAll().flatMap(
3744 (query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []
3745 );
3746 return { mutations, queries };
3747 }
3748 function hydrate(client, dehydratedState, options) {
3749 if (typeof dehydratedState !== "object" || dehydratedState === null) {
3750 return;
3751 }
3752 const mutationCache = client.getMutationCache();
3753 const queryCache = client.getQueryCache();
3754 const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;
3755 const mutations = dehydratedState.mutations || [];
3756 const queries = dehydratedState.queries || [];
3757 mutations.forEach(({ state, ...mutationOptions }) => {
3758 mutationCache.build(
3759 client,
3760 {
3761 ...client.getDefaultOptions().hydrate?.mutations,
3762 ...options?.defaultOptions?.mutations,
3763 ...mutationOptions
3764 },
3765 state
3766 );
3767 });
3768 queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {
3769 let query = queryCache.get(queryHash);
3770 const data = state.data === void 0 ? state.data : deserializeData(state.data);
3771 if (query) {
3772 if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
3773 const { fetchStatus: _ignored, ...serializedState } = state;
3774 query.setState({
3775 ...serializedState,
3776 data
3777 });
3778 }
3779 } else {
3780 query = queryCache.build(
3781 client,
3782 {
3783 ...client.getDefaultOptions().hydrate?.queries,
3784 ...options?.defaultOptions?.queries,
3785 queryKey,
3786 queryHash,
3787 meta
3788 },
3789 // Reset fetch status to idle to avoid
3790 // query being stuck in fetching state upon hydration
3791 {
3792 ...state,
3793 data,
3794 fetchStatus: "idle"
3795 }
3796 );
3797 }
3798 if (promise) {
3799 const initialPromise = Promise.resolve(promise).then(deserializeData);
3800 void query.fetch(void 0, { initialPromise });
3801 }
3802 });
3803 }
3804 // Annotate the CommonJS export names for ESM import in node:
3805 0 && (0);
3806 //# sourceMappingURL=hydration.cjs.map
3807
3808 /***/ }),
3809
3810 /***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
3811 /*!*******************************************************************!*\
3812 !*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
3813 \*******************************************************************/
3814 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3815
3816 "use strict";
3817
3818 var __defProp = Object.defineProperty;
3819 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3820 var __getOwnPropNames = Object.getOwnPropertyNames;
3821 var __hasOwnProp = Object.prototype.hasOwnProperty;
3822 var __export = (target, all) => {
3823 for (var name in all)
3824 __defProp(target, name, { get: all[name], enumerable: true });
3825 };
3826 var __copyProps = (to, from, except, desc) => {
3827 if (from && typeof from === "object" || typeof from === "function") {
3828 for (let key of __getOwnPropNames(from))
3829 if (!__hasOwnProp.call(to, key) && key !== except)
3830 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3831 }
3832 return to;
3833 };
3834 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
3835 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3836
3837 // src/index.ts
3838 var src_exports = {};
3839 __export(src_exports, {
3840 CancelledError: () => import_retryer.CancelledError,
3841 InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
3842 Mutation: () => import_mutation.Mutation,
3843 MutationCache: () => import_mutationCache.MutationCache,
3844 MutationObserver: () => import_mutationObserver.MutationObserver,
3845 QueriesObserver: () => import_queriesObserver.QueriesObserver,
3846 Query: () => import_query.Query,
3847 QueryCache: () => import_queryCache.QueryCache,
3848 QueryClient: () => import_queryClient.QueryClient,
3849 QueryObserver: () => import_queryObserver.QueryObserver,
3850 defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
3851 defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
3852 dehydrate: () => import_hydration.dehydrate,
3853 focusManager: () => import_focusManager.focusManager,
3854 hashKey: () => import_utils.hashKey,
3855 hydrate: () => import_hydration.hydrate,
3856 isCancelledError: () => import_retryer2.isCancelledError,
3857 isServer: () => import_utils.isServer,
3858 keepPreviousData: () => import_utils.keepPreviousData,
3859 matchMutation: () => import_utils.matchMutation,
3860 matchQuery: () => import_utils.matchQuery,
3861 notifyManager: () => import_notifyManager.notifyManager,
3862 onlineManager: () => import_onlineManager.onlineManager,
3863 replaceEqualDeep: () => import_utils.replaceEqualDeep,
3864 skipToken: () => import_utils.skipToken
3865 });
3866 module.exports = __toCommonJS(src_exports);
3867 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3868 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
3869 var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
3870 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
3871 var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
3872 var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
3873 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
3874 var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
3875 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
3876 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
3877 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
3878 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3879 var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
3880 var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
3881 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
3882 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
3883 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
3884 // Annotate the CommonJS export names for ESM import in node:
3885 0 && (0);
3886 //# sourceMappingURL=index.cjs.map
3887
3888 /***/ }),
3889
3890 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
3891 /*!***********************************************************************************!*\
3892 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
3893 \***********************************************************************************/
3894 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
3895
3896 "use strict";
3897
3898 var __defProp = Object.defineProperty;
3899 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3900 var __getOwnPropNames = Object.getOwnPropertyNames;
3901 var __hasOwnProp = Object.prototype.hasOwnProperty;
3902 var __export = (target, all) => {
3903 for (var name in all)
3904 __defProp(target, name, { get: all[name], enumerable: true });
3905 };
3906 var __copyProps = (to, from, except, desc) => {
3907 if (from && typeof from === "object" || typeof from === "function") {
3908 for (let key of __getOwnPropNames(from))
3909 if (!__hasOwnProp.call(to, key) && key !== except)
3910 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
3911 }
3912 return to;
3913 };
3914 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
3915
3916 // src/infiniteQueryBehavior.ts
3917 var infiniteQueryBehavior_exports = {};
3918 __export(infiniteQueryBehavior_exports, {
3919 hasNextPage: () => hasNextPage,
3920 hasPreviousPage: () => hasPreviousPage,
3921 infiniteQueryBehavior: () => infiniteQueryBehavior
3922 });
3923 module.exports = __toCommonJS(infiniteQueryBehavior_exports);
3924 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
3925 function infiniteQueryBehavior(pages) {
3926 return {
3927 onFetch: (context, query) => {
3928 const options = context.options;
3929 const direction = context.fetchOptions?.meta?.fetchMore?.direction;
3930 const oldPages = context.state.data?.pages || [];
3931 const oldPageParams = context.state.data?.pageParams || [];
3932 let result = { pages: [], pageParams: [] };
3933 let currentPage = 0;
3934 const fetchFn = async () => {
3935 let cancelled = false;
3936 const addSignalProperty = (object) => {
3937 Object.defineProperty(object, "signal", {
3938 enumerable: true,
3939 get: () => {
3940 if (context.signal.aborted) {
3941 cancelled = true;
3942 } else {
3943 context.signal.addEventListener("abort", () => {
3944 cancelled = true;
3945 });
3946 }
3947 return context.signal;
3948 }
3949 });
3950 };
3951 const queryFn = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions);
3952 const fetchPage = async (data, param, previous) => {
3953 if (cancelled) {
3954 return Promise.reject();
3955 }
3956 if (param == null && data.pages.length) {
3957 return Promise.resolve(data);
3958 }
3959 const queryFnContext = {
3960 queryKey: context.queryKey,
3961 pageParam: param,
3962 direction: previous ? "backward" : "forward",
3963 meta: context.options.meta
3964 };
3965 addSignalProperty(queryFnContext);
3966 const page = await queryFn(
3967 queryFnContext
3968 );
3969 const { maxPages } = context.options;
3970 const addTo = previous ? import_utils.addToStart : import_utils.addToEnd;
3971 return {
3972 pages: addTo(data.pages, page, maxPages),
3973 pageParams: addTo(data.pageParams, param, maxPages)
3974 };
3975 };
3976 if (direction && oldPages.length) {
3977 const previous = direction === "backward";
3978 const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
3979 const oldData = {
3980 pages: oldPages,
3981 pageParams: oldPageParams
3982 };
3983 const param = pageParamFn(options, oldData);
3984 result = await fetchPage(oldData, param, previous);
3985 } else {
3986 const remainingPages = pages ?? oldPages.length;
3987 do {
3988 const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
3989 if (currentPage > 0 && param == null) {
3990 break;
3991 }
3992 result = await fetchPage(result, param);
3993 currentPage++;
3994 } while (currentPage < remainingPages);
3995 }
3996 return result;
3997 };
3998 if (context.options.persister) {
3999 context.fetchFn = () => {
4000 return context.options.persister?.(
4001 fetchFn,
4002 {
4003 queryKey: context.queryKey,
4004 meta: context.options.meta,
4005 signal: context.signal
4006 },
4007 query
4008 );
4009 };
4010 } else {
4011 context.fetchFn = fetchFn;
4012 }
4013 }
4014 };
4015 }
4016 function getNextPageParam(options, { pages, pageParams }) {
4017 const lastIndex = pages.length - 1;
4018 return pages.length > 0 ? options.getNextPageParam(
4019 pages[lastIndex],
4020 pages,
4021 pageParams[lastIndex],
4022 pageParams
4023 ) : void 0;
4024 }
4025 function getPreviousPageParam(options, { pages, pageParams }) {
4026 return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
4027 }
4028 function hasNextPage(options, data) {
4029 if (!data)
4030 return false;
4031 return getNextPageParam(options, data) != null;
4032 }
4033 function hasPreviousPage(options, data) {
4034 if (!data || !options.getPreviousPageParam)
4035 return false;
4036 return getPreviousPageParam(options, data) != null;
4037 }
4038 // Annotate the CommonJS export names for ESM import in node:
4039 0 && (0);
4040 //# sourceMappingURL=infiniteQueryBehavior.cjs.map
4041
4042 /***/ }),
4043
4044 /***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
4045 /*!***********************************************************************************!*\
4046 !*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
4047 \***********************************************************************************/
4048 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4049
4050 "use strict";
4051
4052 var __defProp = Object.defineProperty;
4053 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4054 var __getOwnPropNames = Object.getOwnPropertyNames;
4055 var __hasOwnProp = Object.prototype.hasOwnProperty;
4056 var __export = (target, all) => {
4057 for (var name in all)
4058 __defProp(target, name, { get: all[name], enumerable: true });
4059 };
4060 var __copyProps = (to, from, except, desc) => {
4061 if (from && typeof from === "object" || typeof from === "function") {
4062 for (let key of __getOwnPropNames(from))
4063 if (!__hasOwnProp.call(to, key) && key !== except)
4064 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4065 }
4066 return to;
4067 };
4068 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4069
4070 // src/infiniteQueryObserver.ts
4071 var infiniteQueryObserver_exports = {};
4072 __export(infiniteQueryObserver_exports, {
4073 InfiniteQueryObserver: () => InfiniteQueryObserver
4074 });
4075 module.exports = __toCommonJS(infiniteQueryObserver_exports);
4076 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
4077 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
4078 var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
4079 constructor(client, options) {
4080 super(client, options);
4081 }
4082 bindMethods() {
4083 super.bindMethods();
4084 this.fetchNextPage = this.fetchNextPage.bind(this);
4085 this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
4086 }
4087 setOptions(options, notifyOptions) {
4088 super.setOptions(
4089 {
4090 ...options,
4091 behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
4092 },
4093 notifyOptions
4094 );
4095 }
4096 getOptimisticResult(options) {
4097 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
4098 return super.getOptimisticResult(options);
4099 }
4100 fetchNextPage(options) {
4101 return this.fetch({
4102 ...options,
4103 meta: {
4104 fetchMore: { direction: "forward" }
4105 }
4106 });
4107 }
4108 fetchPreviousPage(options) {
4109 return this.fetch({
4110 ...options,
4111 meta: {
4112 fetchMore: { direction: "backward" }
4113 }
4114 });
4115 }
4116 createResult(query, options) {
4117 const { state } = query;
4118 const parentResult = super.createResult(query, options);
4119 const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
4120 const fetchDirection = state.fetchMeta?.fetchMore?.direction;
4121 const isFetchNextPageError = isError && fetchDirection === "forward";
4122 const isFetchingNextPage = isFetching && fetchDirection === "forward";
4123 const isFetchPreviousPageError = isError && fetchDirection === "backward";
4124 const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
4125 const result = {
4126 ...parentResult,
4127 fetchNextPage: this.fetchNextPage,
4128 fetchPreviousPage: this.fetchPreviousPage,
4129 hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
4130 hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
4131 isFetchNextPageError,
4132 isFetchingNextPage,
4133 isFetchPreviousPageError,
4134 isFetchingPreviousPage,
4135 isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
4136 isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
4137 };
4138 return result;
4139 }
4140 };
4141 // Annotate the CommonJS export names for ESM import in node:
4142 0 && (0);
4143 //# sourceMappingURL=infiniteQueryObserver.cjs.map
4144
4145 /***/ }),
4146
4147 /***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
4148 /*!**********************************************************************!*\
4149 !*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
4150 \**********************************************************************/
4151 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4152
4153 "use strict";
4154
4155 var __defProp = Object.defineProperty;
4156 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4157 var __getOwnPropNames = Object.getOwnPropertyNames;
4158 var __hasOwnProp = Object.prototype.hasOwnProperty;
4159 var __export = (target, all) => {
4160 for (var name in all)
4161 __defProp(target, name, { get: all[name], enumerable: true });
4162 };
4163 var __copyProps = (to, from, except, desc) => {
4164 if (from && typeof from === "object" || typeof from === "function") {
4165 for (let key of __getOwnPropNames(from))
4166 if (!__hasOwnProp.call(to, key) && key !== except)
4167 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4168 }
4169 return to;
4170 };
4171 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4172
4173 // src/mutation.ts
4174 var mutation_exports = {};
4175 __export(mutation_exports, {
4176 Mutation: () => Mutation,
4177 getDefaultState: () => getDefaultState
4178 });
4179 module.exports = __toCommonJS(mutation_exports);
4180 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4181 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
4182 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
4183 var Mutation = class extends import_removable.Removable {
4184 #observers;
4185 #mutationCache;
4186 #retryer;
4187 constructor(config) {
4188 super();
4189 this.mutationId = config.mutationId;
4190 this.#mutationCache = config.mutationCache;
4191 this.#observers = [];
4192 this.state = config.state || getDefaultState();
4193 this.setOptions(config.options);
4194 this.scheduleGc();
4195 }
4196 setOptions(options) {
4197 this.options = options;
4198 this.updateGcTime(this.options.gcTime);
4199 }
4200 get meta() {
4201 return this.options.meta;
4202 }
4203 addObserver(observer) {
4204 if (!this.#observers.includes(observer)) {
4205 this.#observers.push(observer);
4206 this.clearGcTimeout();
4207 this.#mutationCache.notify({
4208 type: "observerAdded",
4209 mutation: this,
4210 observer
4211 });
4212 }
4213 }
4214 removeObserver(observer) {
4215 this.#observers = this.#observers.filter((x) => x !== observer);
4216 this.scheduleGc();
4217 this.#mutationCache.notify({
4218 type: "observerRemoved",
4219 mutation: this,
4220 observer
4221 });
4222 }
4223 optionalRemove() {
4224 if (!this.#observers.length) {
4225 if (this.state.status === "pending") {
4226 this.scheduleGc();
4227 } else {
4228 this.#mutationCache.remove(this);
4229 }
4230 }
4231 }
4232 continue() {
4233 return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
4234 this.execute(this.state.variables);
4235 }
4236 async execute(variables) {
4237 this.#retryer = (0, import_retryer.createRetryer)({
4238 fn: () => {
4239 if (!this.options.mutationFn) {
4240 return Promise.reject(new Error("No mutationFn found"));
4241 }
4242 return this.options.mutationFn(variables);
4243 },
4244 onFail: (failureCount, error) => {
4245 this.#dispatch({ type: "failed", failureCount, error });
4246 },
4247 onPause: () => {
4248 this.#dispatch({ type: "pause" });
4249 },
4250 onContinue: () => {
4251 this.#dispatch({ type: "continue" });
4252 },
4253 retry: this.options.retry ?? 0,
4254 retryDelay: this.options.retryDelay,
4255 networkMode: this.options.networkMode,
4256 canRun: () => this.#mutationCache.canRun(this)
4257 });
4258 const restored = this.state.status === "pending";
4259 const isPaused = !this.#retryer.canStart();
4260 try {
4261 if (!restored) {
4262 this.#dispatch({ type: "pending", variables, isPaused });
4263 await this.#mutationCache.config.onMutate?.(
4264 variables,
4265 this
4266 );
4267 const context = await this.options.onMutate?.(variables);
4268 if (context !== this.state.context) {
4269 this.#dispatch({
4270 type: "pending",
4271 context,
4272 variables,
4273 isPaused
4274 });
4275 }
4276 }
4277 const data = await this.#retryer.start();
4278 await this.#mutationCache.config.onSuccess?.(
4279 data,
4280 variables,
4281 this.state.context,
4282 this
4283 );
4284 await this.options.onSuccess?.(data, variables, this.state.context);
4285 await this.#mutationCache.config.onSettled?.(
4286 data,
4287 null,
4288 this.state.variables,
4289 this.state.context,
4290 this
4291 );
4292 await this.options.onSettled?.(data, null, variables, this.state.context);
4293 this.#dispatch({ type: "success", data });
4294 return data;
4295 } catch (error) {
4296 try {
4297 await this.#mutationCache.config.onError?.(
4298 error,
4299 variables,
4300 this.state.context,
4301 this
4302 );
4303 await this.options.onError?.(
4304 error,
4305 variables,
4306 this.state.context
4307 );
4308 await this.#mutationCache.config.onSettled?.(
4309 void 0,
4310 error,
4311 this.state.variables,
4312 this.state.context,
4313 this
4314 );
4315 await this.options.onSettled?.(
4316 void 0,
4317 error,
4318 variables,
4319 this.state.context
4320 );
4321 throw error;
4322 } finally {
4323 this.#dispatch({ type: "error", error });
4324 }
4325 } finally {
4326 this.#mutationCache.runNext(this);
4327 }
4328 }
4329 #dispatch(action) {
4330 const reducer = (state) => {
4331 switch (action.type) {
4332 case "failed":
4333 return {
4334 ...state,
4335 failureCount: action.failureCount,
4336 failureReason: action.error
4337 };
4338 case "pause":
4339 return {
4340 ...state,
4341 isPaused: true
4342 };
4343 case "continue":
4344 return {
4345 ...state,
4346 isPaused: false
4347 };
4348 case "pending":
4349 return {
4350 ...state,
4351 context: action.context,
4352 data: void 0,
4353 failureCount: 0,
4354 failureReason: null,
4355 error: null,
4356 isPaused: action.isPaused,
4357 status: "pending",
4358 variables: action.variables,
4359 submittedAt: Date.now()
4360 };
4361 case "success":
4362 return {
4363 ...state,
4364 data: action.data,
4365 failureCount: 0,
4366 failureReason: null,
4367 error: null,
4368 status: "success",
4369 isPaused: false
4370 };
4371 case "error":
4372 return {
4373 ...state,
4374 data: void 0,
4375 error: action.error,
4376 failureCount: state.failureCount + 1,
4377 failureReason: action.error,
4378 isPaused: false,
4379 status: "error"
4380 };
4381 }
4382 };
4383 this.state = reducer(this.state);
4384 import_notifyManager.notifyManager.batch(() => {
4385 this.#observers.forEach((observer) => {
4386 observer.onMutationUpdate(action);
4387 });
4388 this.#mutationCache.notify({
4389 mutation: this,
4390 type: "updated",
4391 action
4392 });
4393 });
4394 }
4395 };
4396 function getDefaultState() {
4397 return {
4398 context: void 0,
4399 data: void 0,
4400 error: null,
4401 failureCount: 0,
4402 failureReason: null,
4403 isPaused: false,
4404 status: "idle",
4405 variables: void 0,
4406 submittedAt: 0
4407 };
4408 }
4409 // Annotate the CommonJS export names for ESM import in node:
4410 0 && (0);
4411 //# sourceMappingURL=mutation.cjs.map
4412
4413 /***/ }),
4414
4415 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
4416 /*!***************************************************************************!*\
4417 !*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
4418 \***************************************************************************/
4419 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4420
4421 "use strict";
4422
4423 var __defProp = Object.defineProperty;
4424 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4425 var __getOwnPropNames = Object.getOwnPropertyNames;
4426 var __hasOwnProp = Object.prototype.hasOwnProperty;
4427 var __export = (target, all) => {
4428 for (var name in all)
4429 __defProp(target, name, { get: all[name], enumerable: true });
4430 };
4431 var __copyProps = (to, from, except, desc) => {
4432 if (from && typeof from === "object" || typeof from === "function") {
4433 for (let key of __getOwnPropNames(from))
4434 if (!__hasOwnProp.call(to, key) && key !== except)
4435 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4436 }
4437 return to;
4438 };
4439 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4440
4441 // src/mutationCache.ts
4442 var mutationCache_exports = {};
4443 __export(mutationCache_exports, {
4444 MutationCache: () => MutationCache
4445 });
4446 module.exports = __toCommonJS(mutationCache_exports);
4447 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4448 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4449 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4450 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4451 var MutationCache = class extends import_subscribable.Subscribable {
4452 constructor(config = {}) {
4453 super();
4454 this.config = config;
4455 this.#mutations = /* @__PURE__ */ new Map();
4456 this.#mutationId = Date.now();
4457 }
4458 #mutations;
4459 #mutationId;
4460 build(client, options, state) {
4461 const mutation = new import_mutation.Mutation({
4462 mutationCache: this,
4463 mutationId: ++this.#mutationId,
4464 options: client.defaultMutationOptions(options),
4465 state
4466 });
4467 this.add(mutation);
4468 return mutation;
4469 }
4470 add(mutation) {
4471 const scope = scopeFor(mutation);
4472 const mutations = this.#mutations.get(scope) ?? [];
4473 mutations.push(mutation);
4474 this.#mutations.set(scope, mutations);
4475 this.notify({ type: "added", mutation });
4476 }
4477 remove(mutation) {
4478 const scope = scopeFor(mutation);
4479 if (this.#mutations.has(scope)) {
4480 const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);
4481 if (mutations) {
4482 if (mutations.length === 0) {
4483 this.#mutations.delete(scope);
4484 } else {
4485 this.#mutations.set(scope, mutations);
4486 }
4487 }
4488 }
4489 this.notify({ type: "removed", mutation });
4490 }
4491 canRun(mutation) {
4492 const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending");
4493 return !firstPendingMutation || firstPendingMutation === mutation;
4494 }
4495 runNext(mutation) {
4496 const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);
4497 return foundMutation?.continue() ?? Promise.resolve();
4498 }
4499 clear() {
4500 import_notifyManager.notifyManager.batch(() => {
4501 this.getAll().forEach((mutation) => {
4502 this.remove(mutation);
4503 });
4504 });
4505 }
4506 getAll() {
4507 return [...this.#mutations.values()].flat();
4508 }
4509 find(filters) {
4510 const defaultedFilters = { exact: true, ...filters };
4511 return this.getAll().find(
4512 (mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
4513 );
4514 }
4515 findAll(filters = {}) {
4516 return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation));
4517 }
4518 notify(event) {
4519 import_notifyManager.notifyManager.batch(() => {
4520 this.listeners.forEach((listener) => {
4521 listener(event);
4522 });
4523 });
4524 }
4525 resumePausedMutations() {
4526 const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
4527 return import_notifyManager.notifyManager.batch(
4528 () => Promise.all(
4529 pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop))
4530 )
4531 );
4532 }
4533 };
4534 function scopeFor(mutation) {
4535 return mutation.options.scope?.id ?? String(mutation.mutationId);
4536 }
4537 // Annotate the CommonJS export names for ESM import in node:
4538 0 && (0);
4539 //# sourceMappingURL=mutationCache.cjs.map
4540
4541 /***/ }),
4542
4543 /***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
4544 /*!******************************************************************************!*\
4545 !*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
4546 \******************************************************************************/
4547 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4548
4549 "use strict";
4550
4551 var __defProp = Object.defineProperty;
4552 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4553 var __getOwnPropNames = Object.getOwnPropertyNames;
4554 var __hasOwnProp = Object.prototype.hasOwnProperty;
4555 var __export = (target, all) => {
4556 for (var name in all)
4557 __defProp(target, name, { get: all[name], enumerable: true });
4558 };
4559 var __copyProps = (to, from, except, desc) => {
4560 if (from && typeof from === "object" || typeof from === "function") {
4561 for (let key of __getOwnPropNames(from))
4562 if (!__hasOwnProp.call(to, key) && key !== except)
4563 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4564 }
4565 return to;
4566 };
4567 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4568
4569 // src/mutationObserver.ts
4570 var mutationObserver_exports = {};
4571 __export(mutationObserver_exports, {
4572 MutationObserver: () => MutationObserver
4573 });
4574 module.exports = __toCommonJS(mutationObserver_exports);
4575 var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
4576 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4577 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4578 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4579 var MutationObserver = class extends import_subscribable.Subscribable {
4580 #client;
4581 #currentResult = void 0;
4582 #currentMutation;
4583 #mutateOptions;
4584 constructor(client, options) {
4585 super();
4586 this.#client = client;
4587 this.setOptions(options);
4588 this.bindMethods();
4589 this.#updateResult();
4590 }
4591 bindMethods() {
4592 this.mutate = this.mutate.bind(this);
4593 this.reset = this.reset.bind(this);
4594 }
4595 setOptions(options) {
4596 const prevOptions = this.options;
4597 this.options = this.#client.defaultMutationOptions(options);
4598 if (!(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
4599 this.#client.getMutationCache().notify({
4600 type: "observerOptionsUpdated",
4601 mutation: this.#currentMutation,
4602 observer: this
4603 });
4604 }
4605 if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) {
4606 this.reset();
4607 } else if (this.#currentMutation?.state.status === "pending") {
4608 this.#currentMutation.setOptions(this.options);
4609 }
4610 }
4611 onUnsubscribe() {
4612 if (!this.hasListeners()) {
4613 this.#currentMutation?.removeObserver(this);
4614 }
4615 }
4616 onMutationUpdate(action) {
4617 this.#updateResult();
4618 this.#notify(action);
4619 }
4620 getCurrentResult() {
4621 return this.#currentResult;
4622 }
4623 reset() {
4624 this.#currentMutation?.removeObserver(this);
4625 this.#currentMutation = void 0;
4626 this.#updateResult();
4627 this.#notify();
4628 }
4629 mutate(variables, options) {
4630 this.#mutateOptions = options;
4631 this.#currentMutation?.removeObserver(this);
4632 this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
4633 this.#currentMutation.addObserver(this);
4634 return this.#currentMutation.execute(variables);
4635 }
4636 #updateResult() {
4637 const state = this.#currentMutation?.state ?? (0, import_mutation.getDefaultState)();
4638 this.#currentResult = {
4639 ...state,
4640 isPending: state.status === "pending",
4641 isSuccess: state.status === "success",
4642 isError: state.status === "error",
4643 isIdle: state.status === "idle",
4644 mutate: this.mutate,
4645 reset: this.reset
4646 };
4647 }
4648 #notify(action) {
4649 import_notifyManager.notifyManager.batch(() => {
4650 if (this.#mutateOptions && this.hasListeners()) {
4651 const variables = this.#currentResult.variables;
4652 const context = this.#currentResult.context;
4653 if (action?.type === "success") {
4654 this.#mutateOptions.onSuccess?.(action.data, variables, context);
4655 this.#mutateOptions.onSettled?.(action.data, null, variables, context);
4656 } else if (action?.type === "error") {
4657 this.#mutateOptions.onError?.(action.error, variables, context);
4658 this.#mutateOptions.onSettled?.(
4659 void 0,
4660 action.error,
4661 variables,
4662 context
4663 );
4664 }
4665 }
4666 this.listeners.forEach((listener) => {
4667 listener(this.#currentResult);
4668 });
4669 });
4670 }
4671 };
4672 // Annotate the CommonJS export names for ESM import in node:
4673 0 && (0);
4674 //# sourceMappingURL=mutationObserver.cjs.map
4675
4676 /***/ }),
4677
4678 /***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
4679 /*!***************************************************************************!*\
4680 !*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
4681 \***************************************************************************/
4682 /***/ ((module) => {
4683
4684 "use strict";
4685
4686 var __defProp = Object.defineProperty;
4687 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4688 var __getOwnPropNames = Object.getOwnPropertyNames;
4689 var __hasOwnProp = Object.prototype.hasOwnProperty;
4690 var __export = (target, all) => {
4691 for (var name in all)
4692 __defProp(target, name, { get: all[name], enumerable: true });
4693 };
4694 var __copyProps = (to, from, except, desc) => {
4695 if (from && typeof from === "object" || typeof from === "function") {
4696 for (let key of __getOwnPropNames(from))
4697 if (!__hasOwnProp.call(to, key) && key !== except)
4698 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4699 }
4700 return to;
4701 };
4702 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4703
4704 // src/notifyManager.ts
4705 var notifyManager_exports = {};
4706 __export(notifyManager_exports, {
4707 createNotifyManager: () => createNotifyManager,
4708 notifyManager: () => notifyManager
4709 });
4710 module.exports = __toCommonJS(notifyManager_exports);
4711 function createNotifyManager() {
4712 let queue = [];
4713 let transactions = 0;
4714 let notifyFn = (callback) => {
4715 callback();
4716 };
4717 let batchNotifyFn = (callback) => {
4718 callback();
4719 };
4720 let scheduleFn = (cb) => setTimeout(cb, 0);
4721 const schedule = (callback) => {
4722 if (transactions) {
4723 queue.push(callback);
4724 } else {
4725 scheduleFn(() => {
4726 notifyFn(callback);
4727 });
4728 }
4729 };
4730 const flush = () => {
4731 const originalQueue = queue;
4732 queue = [];
4733 if (originalQueue.length) {
4734 scheduleFn(() => {
4735 batchNotifyFn(() => {
4736 originalQueue.forEach((callback) => {
4737 notifyFn(callback);
4738 });
4739 });
4740 });
4741 }
4742 };
4743 return {
4744 batch: (callback) => {
4745 let result;
4746 transactions++;
4747 try {
4748 result = callback();
4749 } finally {
4750 transactions--;
4751 if (!transactions) {
4752 flush();
4753 }
4754 }
4755 return result;
4756 },
4757 /**
4758 * All calls to the wrapped function will be batched.
4759 */
4760 batchCalls: (callback) => {
4761 return (...args) => {
4762 schedule(() => {
4763 callback(...args);
4764 });
4765 };
4766 },
4767 schedule,
4768 /**
4769 * Use this method to set a custom notify function.
4770 * This can be used to for example wrap notifications with `React.act` while running tests.
4771 */
4772 setNotifyFunction: (fn) => {
4773 notifyFn = fn;
4774 },
4775 /**
4776 * Use this method to set a custom function to batch notifications together into a single tick.
4777 * By default React Query will use the batch function provided by ReactDOM or React Native.
4778 */
4779 setBatchNotifyFunction: (fn) => {
4780 batchNotifyFn = fn;
4781 },
4782 setScheduler: (fn) => {
4783 scheduleFn = fn;
4784 }
4785 };
4786 }
4787 var notifyManager = createNotifyManager();
4788 // Annotate the CommonJS export names for ESM import in node:
4789 0 && (0);
4790 //# sourceMappingURL=notifyManager.cjs.map
4791
4792 /***/ }),
4793
4794 /***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
4795 /*!***************************************************************************!*\
4796 !*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
4797 \***************************************************************************/
4798 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4799
4800 "use strict";
4801
4802 var __defProp = Object.defineProperty;
4803 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4804 var __getOwnPropNames = Object.getOwnPropertyNames;
4805 var __hasOwnProp = Object.prototype.hasOwnProperty;
4806 var __export = (target, all) => {
4807 for (var name in all)
4808 __defProp(target, name, { get: all[name], enumerable: true });
4809 };
4810 var __copyProps = (to, from, except, desc) => {
4811 if (from && typeof from === "object" || typeof from === "function") {
4812 for (let key of __getOwnPropNames(from))
4813 if (!__hasOwnProp.call(to, key) && key !== except)
4814 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4815 }
4816 return to;
4817 };
4818 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4819
4820 // src/onlineManager.ts
4821 var onlineManager_exports = {};
4822 __export(onlineManager_exports, {
4823 OnlineManager: () => OnlineManager,
4824 onlineManager: () => onlineManager
4825 });
4826 module.exports = __toCommonJS(onlineManager_exports);
4827 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4828 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4829 var OnlineManager = class extends import_subscribable.Subscribable {
4830 #online = true;
4831 #cleanup;
4832 #setup;
4833 constructor() {
4834 super();
4835 this.#setup = (onOnline) => {
4836 if (!import_utils.isServer && window.addEventListener) {
4837 const onlineListener = () => onOnline(true);
4838 const offlineListener = () => onOnline(false);
4839 window.addEventListener("online", onlineListener, false);
4840 window.addEventListener("offline", offlineListener, false);
4841 return () => {
4842 window.removeEventListener("online", onlineListener);
4843 window.removeEventListener("offline", offlineListener);
4844 };
4845 }
4846 return;
4847 };
4848 }
4849 onSubscribe() {
4850 if (!this.#cleanup) {
4851 this.setEventListener(this.#setup);
4852 }
4853 }
4854 onUnsubscribe() {
4855 if (!this.hasListeners()) {
4856 this.#cleanup?.();
4857 this.#cleanup = void 0;
4858 }
4859 }
4860 setEventListener(setup) {
4861 this.#setup = setup;
4862 this.#cleanup?.();
4863 this.#cleanup = setup(this.setOnline.bind(this));
4864 }
4865 setOnline(online) {
4866 const changed = this.#online !== online;
4867 if (changed) {
4868 this.#online = online;
4869 this.listeners.forEach((listener) => {
4870 listener(online);
4871 });
4872 }
4873 }
4874 isOnline() {
4875 return this.#online;
4876 }
4877 };
4878 var onlineManager = new OnlineManager();
4879 // Annotate the CommonJS export names for ESM import in node:
4880 0 && (0);
4881 //# sourceMappingURL=onlineManager.cjs.map
4882
4883 /***/ }),
4884
4885 /***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
4886 /*!*****************************************************************************!*\
4887 !*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
4888 \*****************************************************************************/
4889 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
4890
4891 "use strict";
4892
4893 var __defProp = Object.defineProperty;
4894 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4895 var __getOwnPropNames = Object.getOwnPropertyNames;
4896 var __hasOwnProp = Object.prototype.hasOwnProperty;
4897 var __export = (target, all) => {
4898 for (var name in all)
4899 __defProp(target, name, { get: all[name], enumerable: true });
4900 };
4901 var __copyProps = (to, from, except, desc) => {
4902 if (from && typeof from === "object" || typeof from === "function") {
4903 for (let key of __getOwnPropNames(from))
4904 if (!__hasOwnProp.call(to, key) && key !== except)
4905 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
4906 }
4907 return to;
4908 };
4909 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
4910
4911 // src/queriesObserver.ts
4912 var queriesObserver_exports = {};
4913 __export(queriesObserver_exports, {
4914 QueriesObserver: () => QueriesObserver
4915 });
4916 module.exports = __toCommonJS(queriesObserver_exports);
4917 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
4918 var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
4919 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
4920 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
4921 function difference(array1, array2) {
4922 return array1.filter((x) => !array2.includes(x));
4923 }
4924 function replaceAt(array, index, value) {
4925 const copy = array.slice(0);
4926 copy[index] = value;
4927 return copy;
4928 }
4929 var QueriesObserver = class extends import_subscribable.Subscribable {
4930 #client;
4931 #result;
4932 #queries;
4933 #options;
4934 #observers;
4935 #combinedResult;
4936 #lastCombine;
4937 #lastResult;
4938 constructor(client, queries, options) {
4939 super();
4940 this.#client = client;
4941 this.#options = options;
4942 this.#queries = [];
4943 this.#observers = [];
4944 this.#result = [];
4945 this.setQueries(queries);
4946 }
4947 onSubscribe() {
4948 if (this.listeners.size === 1) {
4949 this.#observers.forEach((observer) => {
4950 observer.subscribe((result) => {
4951 this.#onUpdate(observer, result);
4952 });
4953 });
4954 }
4955 }
4956 onUnsubscribe() {
4957 if (!this.listeners.size) {
4958 this.destroy();
4959 }
4960 }
4961 destroy() {
4962 this.listeners = /* @__PURE__ */ new Set();
4963 this.#observers.forEach((observer) => {
4964 observer.destroy();
4965 });
4966 }
4967 setQueries(queries, options, notifyOptions) {
4968 this.#queries = queries;
4969 this.#options = options;
4970 if (true) {
4971 const queryHashes = queries.map((query) => query.queryHash);
4972 if (new Set(queryHashes).size !== queryHashes.length) {
4973 console.warn(
4974 "[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
4975 );
4976 }
4977 }
4978 import_notifyManager.notifyManager.batch(() => {
4979 const prevObservers = this.#observers;
4980 const newObserverMatches = this.#findMatchingObservers(this.#queries);
4981 newObserverMatches.forEach(
4982 (match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
4983 );
4984 const newObservers = newObserverMatches.map((match) => match.observer);
4985 const newResult = newObservers.map(
4986 (observer) => observer.getCurrentResult()
4987 );
4988 const hasIndexChange = newObservers.some(
4989 (observer, index) => observer !== prevObservers[index]
4990 );
4991 if (prevObservers.length === newObservers.length && !hasIndexChange) {
4992 return;
4993 }
4994 this.#observers = newObservers;
4995 this.#result = newResult;
4996 if (!this.hasListeners()) {
4997 return;
4998 }
4999 difference(prevObservers, newObservers).forEach((observer) => {
5000 observer.destroy();
5001 });
5002 difference(newObservers, prevObservers).forEach((observer) => {
5003 observer.subscribe((result) => {
5004 this.#onUpdate(observer, result);
5005 });
5006 });
5007 this.#notify();
5008 });
5009 }
5010 getCurrentResult() {
5011 return this.#result;
5012 }
5013 getQueries() {
5014 return this.#observers.map((observer) => observer.getCurrentQuery());
5015 }
5016 getObservers() {
5017 return this.#observers;
5018 }
5019 getOptimisticResult(queries, combine) {
5020 const matches = this.#findMatchingObservers(queries);
5021 const result = matches.map(
5022 (match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
5023 );
5024 return [
5025 result,
5026 (r) => {
5027 return this.#combineResult(r ?? result, combine);
5028 },
5029 () => {
5030 return this.#trackResult(result, queries);
5031 }
5032 ];
5033 }
5034 #trackResult(result, queries) {
5035 const matches = this.#findMatchingObservers(queries);
5036 return matches.map((match, index) => {
5037 const observerResult = result[index];
5038 return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {
5039 matches.forEach((m) => {
5040 m.observer.trackProp(accessedProp);
5041 });
5042 }) : observerResult;
5043 });
5044 }
5045 #combineResult(input, combine) {
5046 if (combine) {
5047 if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) {
5048 this.#lastCombine = combine;
5049 this.#lastResult = this.#result;
5050 this.#combinedResult = (0, import_utils.replaceEqualDeep)(
5051 this.#combinedResult,
5052 combine(input)
5053 );
5054 }
5055 return this.#combinedResult;
5056 }
5057 return input;
5058 }
5059 #findMatchingObservers(queries) {
5060 const prevObserversMap = new Map(
5061 this.#observers.map((observer) => [observer.options.queryHash, observer])
5062 );
5063 const observers = [];
5064 queries.forEach((options) => {
5065 const defaultedOptions = this.#client.defaultQueryOptions(options);
5066 const match = prevObserversMap.get(defaultedOptions.queryHash);
5067 if (match) {
5068 observers.push({
5069 defaultedQueryOptions: defaultedOptions,
5070 observer: match
5071 });
5072 } else {
5073 observers.push({
5074 defaultedQueryOptions: defaultedOptions,
5075 observer: new import_queryObserver.QueryObserver(this.#client, defaultedOptions)
5076 });
5077 }
5078 });
5079 return observers;
5080 }
5081 #onUpdate(observer, result) {
5082 const index = this.#observers.indexOf(observer);
5083 if (index !== -1) {
5084 this.#result = replaceAt(this.#result, index, result);
5085 this.#notify();
5086 }
5087 }
5088 #notify() {
5089 if (this.hasListeners()) {
5090 const previousResult = this.#combinedResult;
5091 const newResult = this.#combineResult(
5092 this.#trackResult(this.#result, this.#queries),
5093 this.#options?.combine
5094 );
5095 if (previousResult !== newResult) {
5096 import_notifyManager.notifyManager.batch(() => {
5097 this.listeners.forEach((listener) => {
5098 listener(this.#result);
5099 });
5100 });
5101 }
5102 }
5103 }
5104 };
5105 // Annotate the CommonJS export names for ESM import in node:
5106 0 && (0);
5107 //# sourceMappingURL=queriesObserver.cjs.map
5108
5109 /***/ }),
5110
5111 /***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
5112 /*!*******************************************************************!*\
5113 !*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
5114 \*******************************************************************/
5115 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5116
5117 "use strict";
5118
5119 var __defProp = Object.defineProperty;
5120 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5121 var __getOwnPropNames = Object.getOwnPropertyNames;
5122 var __hasOwnProp = Object.prototype.hasOwnProperty;
5123 var __export = (target, all) => {
5124 for (var name in all)
5125 __defProp(target, name, { get: all[name], enumerable: true });
5126 };
5127 var __copyProps = (to, from, except, desc) => {
5128 if (from && typeof from === "object" || typeof from === "function") {
5129 for (let key of __getOwnPropNames(from))
5130 if (!__hasOwnProp.call(to, key) && key !== except)
5131 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5132 }
5133 return to;
5134 };
5135 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5136
5137 // src/query.ts
5138 var query_exports = {};
5139 __export(query_exports, {
5140 Query: () => Query,
5141 fetchState: () => fetchState
5142 });
5143 module.exports = __toCommonJS(query_exports);
5144 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5145 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5146 var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
5147 var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
5148 var Query = class extends import_removable.Removable {
5149 #initialState;
5150 #revertState;
5151 #cache;
5152 #retryer;
5153 #defaultOptions;
5154 #abortSignalConsumed;
5155 constructor(config) {
5156 super();
5157 this.#abortSignalConsumed = false;
5158 this.#defaultOptions = config.defaultOptions;
5159 this.setOptions(config.options);
5160 this.observers = [];
5161 this.#cache = config.cache;
5162 this.queryKey = config.queryKey;
5163 this.queryHash = config.queryHash;
5164 this.#initialState = getDefaultState(this.options);
5165 this.state = config.state ?? this.#initialState;
5166 this.scheduleGc();
5167 }
5168 get meta() {
5169 return this.options.meta;
5170 }
5171 get promise() {
5172 return this.#retryer?.promise;
5173 }
5174 setOptions(options) {
5175 this.options = { ...this.#defaultOptions, ...options };
5176 this.updateGcTime(this.options.gcTime);
5177 }
5178 optionalRemove() {
5179 if (!this.observers.length && this.state.fetchStatus === "idle") {
5180 this.#cache.remove(this);
5181 }
5182 }
5183 setData(newData, options) {
5184 const data = (0, import_utils.replaceData)(this.state.data, newData, this.options);
5185 this.#dispatch({
5186 data,
5187 type: "success",
5188 dataUpdatedAt: options?.updatedAt,
5189 manual: options?.manual
5190 });
5191 return data;
5192 }
5193 setState(state, setStateOptions) {
5194 this.#dispatch({ type: "setState", state, setStateOptions });
5195 }
5196 cancel(options) {
5197 const promise = this.#retryer?.promise;
5198 this.#retryer?.cancel(options);
5199 return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
5200 }
5201 destroy() {
5202 super.destroy();
5203 this.cancel({ silent: true });
5204 }
5205 reset() {
5206 this.destroy();
5207 this.setState(this.#initialState);
5208 }
5209 isActive() {
5210 return this.observers.some(
5211 (observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false
5212 );
5213 }
5214 isDisabled() {
5215 if (this.getObserversCount() > 0) {
5216 return !this.isActive();
5217 }
5218 return this.options.queryFn === import_utils.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
5219 }
5220 isStale() {
5221 if (this.state.isInvalidated) {
5222 return true;
5223 }
5224 if (this.getObserversCount() > 0) {
5225 return this.observers.some(
5226 (observer) => observer.getCurrentResult().isStale
5227 );
5228 }
5229 return this.state.data === void 0;
5230 }
5231 isStaleByTime(staleTime = 0) {
5232 return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
5233 }
5234 onFocus() {
5235 const observer = this.observers.find((x) => x.shouldFetchOnWindowFocus());
5236 observer?.refetch({ cancelRefetch: false });
5237 this.#retryer?.continue();
5238 }
5239 onOnline() {
5240 const observer = this.observers.find((x) => x.shouldFetchOnReconnect());
5241 observer?.refetch({ cancelRefetch: false });
5242 this.#retryer?.continue();
5243 }
5244 addObserver(observer) {
5245 if (!this.observers.includes(observer)) {
5246 this.observers.push(observer);
5247 this.clearGcTimeout();
5248 this.#cache.notify({ type: "observerAdded", query: this, observer });
5249 }
5250 }
5251 removeObserver(observer) {
5252 if (this.observers.includes(observer)) {
5253 this.observers = this.observers.filter((x) => x !== observer);
5254 if (!this.observers.length) {
5255 if (this.#retryer) {
5256 if (this.#abortSignalConsumed) {
5257 this.#retryer.cancel({ revert: true });
5258 } else {
5259 this.#retryer.cancelRetry();
5260 }
5261 }
5262 this.scheduleGc();
5263 }
5264 this.#cache.notify({ type: "observerRemoved", query: this, observer });
5265 }
5266 }
5267 getObserversCount() {
5268 return this.observers.length;
5269 }
5270 invalidate() {
5271 if (!this.state.isInvalidated) {
5272 this.#dispatch({ type: "invalidate" });
5273 }
5274 }
5275 fetch(options, fetchOptions) {
5276 if (this.state.fetchStatus !== "idle") {
5277 if (this.state.data !== void 0 && fetchOptions?.cancelRefetch) {
5278 this.cancel({ silent: true });
5279 } else if (this.#retryer) {
5280 this.#retryer.continueRetry();
5281 return this.#retryer.promise;
5282 }
5283 }
5284 if (options) {
5285 this.setOptions(options);
5286 }
5287 if (!this.options.queryFn) {
5288 const observer = this.observers.find((x) => x.options.queryFn);
5289 if (observer) {
5290 this.setOptions(observer.options);
5291 }
5292 }
5293 if (true) {
5294 if (!Array.isArray(this.options.queryKey)) {
5295 console.error(
5296 `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']`
5297 );
5298 }
5299 }
5300 const abortController = new AbortController();
5301 const addSignalProperty = (object) => {
5302 Object.defineProperty(object, "signal", {
5303 enumerable: true,
5304 get: () => {
5305 this.#abortSignalConsumed = true;
5306 return abortController.signal;
5307 }
5308 });
5309 };
5310 const fetchFn = () => {
5311 const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions);
5312 const queryFnContext = {
5313 queryKey: this.queryKey,
5314 meta: this.meta
5315 };
5316 addSignalProperty(queryFnContext);
5317 this.#abortSignalConsumed = false;
5318 if (this.options.persister) {
5319 return this.options.persister(
5320 queryFn,
5321 queryFnContext,
5322 this
5323 );
5324 }
5325 return queryFn(queryFnContext);
5326 };
5327 const context = {
5328 fetchOptions,
5329 options: this.options,
5330 queryKey: this.queryKey,
5331 state: this.state,
5332 fetchFn
5333 };
5334 addSignalProperty(context);
5335 this.options.behavior?.onFetch(
5336 context,
5337 this
5338 );
5339 this.#revertState = this.state;
5340 if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
5341 this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
5342 }
5343 const onError = (error) => {
5344 if (!((0, import_retryer.isCancelledError)(error) && error.silent)) {
5345 this.#dispatch({
5346 type: "error",
5347 error
5348 });
5349 }
5350 if (!(0, import_retryer.isCancelledError)(error)) {
5351 this.#cache.config.onError?.(
5352 error,
5353 this
5354 );
5355 this.#cache.config.onSettled?.(
5356 this.state.data,
5357 error,
5358 this
5359 );
5360 }
5361 this.scheduleGc();
5362 };
5363 this.#retryer = (0, import_retryer.createRetryer)({
5364 initialPromise: fetchOptions?.initialPromise,
5365 fn: context.fetchFn,
5366 abort: abortController.abort.bind(abortController),
5367 onSuccess: (data) => {
5368 if (data === void 0) {
5369 if (true) {
5370 console.error(
5371 `Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
5372 );
5373 }
5374 onError(new Error(`${this.queryHash} data is undefined`));
5375 return;
5376 }
5377 try {
5378 this.setData(data);
5379 } catch (error) {
5380 onError(error);
5381 return;
5382 }
5383 this.#cache.config.onSuccess?.(data, this);
5384 this.#cache.config.onSettled?.(
5385 data,
5386 this.state.error,
5387 this
5388 );
5389 this.scheduleGc();
5390 },
5391 onError,
5392 onFail: (failureCount, error) => {
5393 this.#dispatch({ type: "failed", failureCount, error });
5394 },
5395 onPause: () => {
5396 this.#dispatch({ type: "pause" });
5397 },
5398 onContinue: () => {
5399 this.#dispatch({ type: "continue" });
5400 },
5401 retry: context.options.retry,
5402 retryDelay: context.options.retryDelay,
5403 networkMode: context.options.networkMode,
5404 canRun: () => true
5405 });
5406 return this.#retryer.start();
5407 }
5408 #dispatch(action) {
5409 const reducer = (state) => {
5410 switch (action.type) {
5411 case "failed":
5412 return {
5413 ...state,
5414 fetchFailureCount: action.failureCount,
5415 fetchFailureReason: action.error
5416 };
5417 case "pause":
5418 return {
5419 ...state,
5420 fetchStatus: "paused"
5421 };
5422 case "continue":
5423 return {
5424 ...state,
5425 fetchStatus: "fetching"
5426 };
5427 case "fetch":
5428 return {
5429 ...state,
5430 ...fetchState(state.data, this.options),
5431 fetchMeta: action.meta ?? null
5432 };
5433 case "success":
5434 return {
5435 ...state,
5436 data: action.data,
5437 dataUpdateCount: state.dataUpdateCount + 1,
5438 dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
5439 error: null,
5440 isInvalidated: false,
5441 status: "success",
5442 ...!action.manual && {
5443 fetchStatus: "idle",
5444 fetchFailureCount: 0,
5445 fetchFailureReason: null
5446 }
5447 };
5448 case "error":
5449 const error = action.error;
5450 if ((0, import_retryer.isCancelledError)(error) && error.revert && this.#revertState) {
5451 return { ...this.#revertState, fetchStatus: "idle" };
5452 }
5453 return {
5454 ...state,
5455 error,
5456 errorUpdateCount: state.errorUpdateCount + 1,
5457 errorUpdatedAt: Date.now(),
5458 fetchFailureCount: state.fetchFailureCount + 1,
5459 fetchFailureReason: error,
5460 fetchStatus: "idle",
5461 status: "error"
5462 };
5463 case "invalidate":
5464 return {
5465 ...state,
5466 isInvalidated: true
5467 };
5468 case "setState":
5469 return {
5470 ...state,
5471 ...action.state
5472 };
5473 }
5474 };
5475 this.state = reducer(this.state);
5476 import_notifyManager.notifyManager.batch(() => {
5477 this.observers.forEach((observer) => {
5478 observer.onQueryUpdate();
5479 });
5480 this.#cache.notify({ query: this, type: "updated", action });
5481 });
5482 }
5483 };
5484 function fetchState(data, options) {
5485 return {
5486 fetchFailureCount: 0,
5487 fetchFailureReason: null,
5488 fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused",
5489 ...data === void 0 && {
5490 error: null,
5491 status: "pending"
5492 }
5493 };
5494 }
5495 function getDefaultState(options) {
5496 const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
5497 const hasData = data !== void 0;
5498 const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
5499 return {
5500 data,
5501 dataUpdateCount: 0,
5502 dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
5503 error: null,
5504 errorUpdateCount: 0,
5505 errorUpdatedAt: 0,
5506 fetchFailureCount: 0,
5507 fetchFailureReason: null,
5508 fetchMeta: null,
5509 isInvalidated: false,
5510 status: hasData ? "success" : "pending",
5511 fetchStatus: "idle"
5512 };
5513 }
5514 // Annotate the CommonJS export names for ESM import in node:
5515 0 && (0);
5516 //# sourceMappingURL=query.cjs.map
5517
5518 /***/ }),
5519
5520 /***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
5521 /*!************************************************************************!*\
5522 !*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
5523 \************************************************************************/
5524 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5525
5526 "use strict";
5527
5528 var __defProp = Object.defineProperty;
5529 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5530 var __getOwnPropNames = Object.getOwnPropertyNames;
5531 var __hasOwnProp = Object.prototype.hasOwnProperty;
5532 var __export = (target, all) => {
5533 for (var name in all)
5534 __defProp(target, name, { get: all[name], enumerable: true });
5535 };
5536 var __copyProps = (to, from, except, desc) => {
5537 if (from && typeof from === "object" || typeof from === "function") {
5538 for (let key of __getOwnPropNames(from))
5539 if (!__hasOwnProp.call(to, key) && key !== except)
5540 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5541 }
5542 return to;
5543 };
5544 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5545
5546 // src/queryCache.ts
5547 var queryCache_exports = {};
5548 __export(queryCache_exports, {
5549 QueryCache: () => QueryCache
5550 });
5551 module.exports = __toCommonJS(queryCache_exports);
5552 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5553 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
5554 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5555 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
5556 var QueryCache = class extends import_subscribable.Subscribable {
5557 constructor(config = {}) {
5558 super();
5559 this.config = config;
5560 this.#queries = /* @__PURE__ */ new Map();
5561 }
5562 #queries;
5563 build(client, options, state) {
5564 const queryKey = options.queryKey;
5565 const queryHash = options.queryHash ?? (0, import_utils.hashQueryKeyByOptions)(queryKey, options);
5566 let query = this.get(queryHash);
5567 if (!query) {
5568 query = new import_query.Query({
5569 cache: this,
5570 queryKey,
5571 queryHash,
5572 options: client.defaultQueryOptions(options),
5573 state,
5574 defaultOptions: client.getQueryDefaults(queryKey)
5575 });
5576 this.add(query);
5577 }
5578 return query;
5579 }
5580 add(query) {
5581 if (!this.#queries.has(query.queryHash)) {
5582 this.#queries.set(query.queryHash, query);
5583 this.notify({
5584 type: "added",
5585 query
5586 });
5587 }
5588 }
5589 remove(query) {
5590 const queryInMap = this.#queries.get(query.queryHash);
5591 if (queryInMap) {
5592 query.destroy();
5593 if (queryInMap === query) {
5594 this.#queries.delete(query.queryHash);
5595 }
5596 this.notify({ type: "removed", query });
5597 }
5598 }
5599 clear() {
5600 import_notifyManager.notifyManager.batch(() => {
5601 this.getAll().forEach((query) => {
5602 this.remove(query);
5603 });
5604 });
5605 }
5606 get(queryHash) {
5607 return this.#queries.get(queryHash);
5608 }
5609 getAll() {
5610 return [...this.#queries.values()];
5611 }
5612 find(filters) {
5613 const defaultedFilters = { exact: true, ...filters };
5614 return this.getAll().find(
5615 (query) => (0, import_utils.matchQuery)(defaultedFilters, query)
5616 );
5617 }
5618 findAll(filters = {}) {
5619 const queries = this.getAll();
5620 return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
5621 }
5622 notify(event) {
5623 import_notifyManager.notifyManager.batch(() => {
5624 this.listeners.forEach((listener) => {
5625 listener(event);
5626 });
5627 });
5628 }
5629 onFocus() {
5630 import_notifyManager.notifyManager.batch(() => {
5631 this.getAll().forEach((query) => {
5632 query.onFocus();
5633 });
5634 });
5635 }
5636 onOnline() {
5637 import_notifyManager.notifyManager.batch(() => {
5638 this.getAll().forEach((query) => {
5639 query.onOnline();
5640 });
5641 });
5642 }
5643 };
5644 // Annotate the CommonJS export names for ESM import in node:
5645 0 && (0);
5646 //# sourceMappingURL=queryCache.cjs.map
5647
5648 /***/ }),
5649
5650 /***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
5651 /*!*************************************************************************!*\
5652 !*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
5653 \*************************************************************************/
5654 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5655
5656 "use strict";
5657
5658 var __defProp = Object.defineProperty;
5659 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5660 var __getOwnPropNames = Object.getOwnPropertyNames;
5661 var __hasOwnProp = Object.prototype.hasOwnProperty;
5662 var __export = (target, all) => {
5663 for (var name in all)
5664 __defProp(target, name, { get: all[name], enumerable: true });
5665 };
5666 var __copyProps = (to, from, except, desc) => {
5667 if (from && typeof from === "object" || typeof from === "function") {
5668 for (let key of __getOwnPropNames(from))
5669 if (!__hasOwnProp.call(to, key) && key !== except)
5670 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5671 }
5672 return to;
5673 };
5674 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5675
5676 // src/queryClient.ts
5677 var queryClient_exports = {};
5678 __export(queryClient_exports, {
5679 QueryClient: () => QueryClient
5680 });
5681 module.exports = __toCommonJS(queryClient_exports);
5682 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
5683 var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
5684 var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
5685 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
5686 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
5687 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
5688 var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
5689 var QueryClient = class {
5690 #queryCache;
5691 #mutationCache;
5692 #defaultOptions;
5693 #queryDefaults;
5694 #mutationDefaults;
5695 #mountCount;
5696 #unsubscribeFocus;
5697 #unsubscribeOnline;
5698 constructor(config = {}) {
5699 this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
5700 this.#mutationCache = config.mutationCache || new import_mutationCache.MutationCache();
5701 this.#defaultOptions = config.defaultOptions || {};
5702 this.#queryDefaults = /* @__PURE__ */ new Map();
5703 this.#mutationDefaults = /* @__PURE__ */ new Map();
5704 this.#mountCount = 0;
5705 }
5706 mount() {
5707 this.#mountCount++;
5708 if (this.#mountCount !== 1)
5709 return;
5710 this.#unsubscribeFocus = import_focusManager.focusManager.subscribe(async (focused) => {
5711 if (focused) {
5712 await this.resumePausedMutations();
5713 this.#queryCache.onFocus();
5714 }
5715 });
5716 this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => {
5717 if (online) {
5718 await this.resumePausedMutations();
5719 this.#queryCache.onOnline();
5720 }
5721 });
5722 }
5723 unmount() {
5724 this.#mountCount--;
5725 if (this.#mountCount !== 0)
5726 return;
5727 this.#unsubscribeFocus?.();
5728 this.#unsubscribeFocus = void 0;
5729 this.#unsubscribeOnline?.();
5730 this.#unsubscribeOnline = void 0;
5731 }
5732 isFetching(filters) {
5733 return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
5734 }
5735 isMutating(filters) {
5736 return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
5737 }
5738 getQueryData(queryKey) {
5739 const options = this.defaultQueryOptions({ queryKey });
5740 return this.#queryCache.get(options.queryHash)?.state.data;
5741 }
5742 ensureQueryData(options) {
5743 const defaultedOptions = this.defaultQueryOptions(options);
5744 const query = this.#queryCache.build(this, defaultedOptions);
5745 const cachedData = query.state.data;
5746 if (cachedData === void 0) {
5747 return this.fetchQuery(options);
5748 }
5749 if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) {
5750 void this.prefetchQuery(defaultedOptions);
5751 }
5752 return Promise.resolve(cachedData);
5753 }
5754 getQueriesData(filters) {
5755 return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
5756 const data = state.data;
5757 return [queryKey, data];
5758 });
5759 }
5760 setQueryData(queryKey, updater, options) {
5761 const defaultedOptions = this.defaultQueryOptions({ queryKey });
5762 const query = this.#queryCache.get(
5763 defaultedOptions.queryHash
5764 );
5765 const prevData = query?.state.data;
5766 const data = (0, import_utils.functionalUpdate)(updater, prevData);
5767 if (data === void 0) {
5768 return void 0;
5769 }
5770 return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
5771 }
5772 setQueriesData(filters, updater, options) {
5773 return import_notifyManager.notifyManager.batch(
5774 () => this.#queryCache.findAll(filters).map(({ queryKey }) => [
5775 queryKey,
5776 this.setQueryData(queryKey, updater, options)
5777 ])
5778 );
5779 }
5780 getQueryState(queryKey) {
5781 const options = this.defaultQueryOptions({ queryKey });
5782 return this.#queryCache.get(
5783 options.queryHash
5784 )?.state;
5785 }
5786 removeQueries(filters) {
5787 const queryCache = this.#queryCache;
5788 import_notifyManager.notifyManager.batch(() => {
5789 queryCache.findAll(filters).forEach((query) => {
5790 queryCache.remove(query);
5791 });
5792 });
5793 }
5794 resetQueries(filters, options) {
5795 const queryCache = this.#queryCache;
5796 const refetchFilters = {
5797 type: "active",
5798 ...filters
5799 };
5800 return import_notifyManager.notifyManager.batch(() => {
5801 queryCache.findAll(filters).forEach((query) => {
5802 query.reset();
5803 });
5804 return this.refetchQueries(refetchFilters, options);
5805 });
5806 }
5807 cancelQueries(filters, cancelOptions = {}) {
5808 const defaultedCancelOptions = { revert: true, ...cancelOptions };
5809 const promises = import_notifyManager.notifyManager.batch(
5810 () => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
5811 );
5812 return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
5813 }
5814 invalidateQueries(filters, options = {}) {
5815 return import_notifyManager.notifyManager.batch(() => {
5816 this.#queryCache.findAll(filters).forEach((query) => {
5817 query.invalidate();
5818 });
5819 if (filters?.refetchType === "none") {
5820 return Promise.resolve();
5821 }
5822 const refetchFilters = {
5823 ...filters,
5824 type: filters?.refetchType ?? filters?.type ?? "active"
5825 };
5826 return this.refetchQueries(refetchFilters, options);
5827 });
5828 }
5829 refetchQueries(filters, options = {}) {
5830 const fetchOptions = {
5831 ...options,
5832 cancelRefetch: options.cancelRefetch ?? true
5833 };
5834 const promises = import_notifyManager.notifyManager.batch(
5835 () => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
5836 let promise = query.fetch(void 0, fetchOptions);
5837 if (!fetchOptions.throwOnError) {
5838 promise = promise.catch(import_utils.noop);
5839 }
5840 return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
5841 })
5842 );
5843 return Promise.all(promises).then(import_utils.noop);
5844 }
5845 fetchQuery(options) {
5846 const defaultedOptions = this.defaultQueryOptions(options);
5847 if (defaultedOptions.retry === void 0) {
5848 defaultedOptions.retry = false;
5849 }
5850 const query = this.#queryCache.build(this, defaultedOptions);
5851 return query.isStaleByTime(
5852 (0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query)
5853 ) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
5854 }
5855 prefetchQuery(options) {
5856 return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
5857 }
5858 fetchInfiniteQuery(options) {
5859 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5860 return this.fetchQuery(options);
5861 }
5862 prefetchInfiniteQuery(options) {
5863 return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
5864 }
5865 ensureInfiniteQueryData(options) {
5866 options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
5867 return this.ensureQueryData(options);
5868 }
5869 resumePausedMutations() {
5870 if (import_onlineManager.onlineManager.isOnline()) {
5871 return this.#mutationCache.resumePausedMutations();
5872 }
5873 return Promise.resolve();
5874 }
5875 getQueryCache() {
5876 return this.#queryCache;
5877 }
5878 getMutationCache() {
5879 return this.#mutationCache;
5880 }
5881 getDefaultOptions() {
5882 return this.#defaultOptions;
5883 }
5884 setDefaultOptions(options) {
5885 this.#defaultOptions = options;
5886 }
5887 setQueryDefaults(queryKey, options) {
5888 this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
5889 queryKey,
5890 defaultOptions: options
5891 });
5892 }
5893 getQueryDefaults(queryKey) {
5894 const defaults = [...this.#queryDefaults.values()];
5895 const result = {};
5896 defaults.forEach((queryDefault) => {
5897 if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
5898 Object.assign(result, queryDefault.defaultOptions);
5899 }
5900 });
5901 return result;
5902 }
5903 setMutationDefaults(mutationKey, options) {
5904 this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
5905 mutationKey,
5906 defaultOptions: options
5907 });
5908 }
5909 getMutationDefaults(mutationKey) {
5910 const defaults = [...this.#mutationDefaults.values()];
5911 let result = {};
5912 defaults.forEach((queryDefault) => {
5913 if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
5914 result = { ...result, ...queryDefault.defaultOptions };
5915 }
5916 });
5917 return result;
5918 }
5919 defaultQueryOptions(options) {
5920 if (options._defaulted) {
5921 return options;
5922 }
5923 const defaultedOptions = {
5924 ...this.#defaultOptions.queries,
5925 ...this.getQueryDefaults(options.queryKey),
5926 ...options,
5927 _defaulted: true
5928 };
5929 if (!defaultedOptions.queryHash) {
5930 defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
5931 defaultedOptions.queryKey,
5932 defaultedOptions
5933 );
5934 }
5935 if (defaultedOptions.refetchOnReconnect === void 0) {
5936 defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
5937 }
5938 if (defaultedOptions.throwOnError === void 0) {
5939 defaultedOptions.throwOnError = !!defaultedOptions.suspense;
5940 }
5941 if (!defaultedOptions.networkMode && defaultedOptions.persister) {
5942 defaultedOptions.networkMode = "offlineFirst";
5943 }
5944 if (defaultedOptions.queryFn === import_utils.skipToken) {
5945 defaultedOptions.enabled = false;
5946 }
5947 return defaultedOptions;
5948 }
5949 defaultMutationOptions(options) {
5950 if (options?._defaulted) {
5951 return options;
5952 }
5953 return {
5954 ...this.#defaultOptions.mutations,
5955 ...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
5956 ...options,
5957 _defaulted: true
5958 };
5959 }
5960 clear() {
5961 this.#queryCache.clear();
5962 this.#mutationCache.clear();
5963 }
5964 };
5965 // Annotate the CommonJS export names for ESM import in node:
5966 0 && (0);
5967 //# sourceMappingURL=queryClient.cjs.map
5968
5969 /***/ }),
5970
5971 /***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
5972 /*!***************************************************************************!*\
5973 !*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
5974 \***************************************************************************/
5975 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
5976
5977 "use strict";
5978
5979 var __defProp = Object.defineProperty;
5980 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5981 var __getOwnPropNames = Object.getOwnPropertyNames;
5982 var __hasOwnProp = Object.prototype.hasOwnProperty;
5983 var __export = (target, all) => {
5984 for (var name in all)
5985 __defProp(target, name, { get: all[name], enumerable: true });
5986 };
5987 var __copyProps = (to, from, except, desc) => {
5988 if (from && typeof from === "object" || typeof from === "function") {
5989 for (let key of __getOwnPropNames(from))
5990 if (!__hasOwnProp.call(to, key) && key !== except)
5991 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
5992 }
5993 return to;
5994 };
5995 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
5996
5997 // src/queryObserver.ts
5998 var queryObserver_exports = {};
5999 __export(queryObserver_exports, {
6000 QueryObserver: () => QueryObserver
6001 });
6002 module.exports = __toCommonJS(queryObserver_exports);
6003 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
6004 var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
6005 var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
6006 var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
6007 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
6008 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6009 var QueryObserver = class extends import_subscribable.Subscribable {
6010 constructor(client, options) {
6011 super();
6012 this.options = options;
6013 this.#client = client;
6014 this.#selectError = null;
6015 this.#currentThenable = (0, import_thenable.pendingThenable)();
6016 if (!this.options.experimental_prefetchInRender) {
6017 this.#currentThenable.reject(
6018 new Error("experimental_prefetchInRender feature flag is not enabled")
6019 );
6020 }
6021 this.bindMethods();
6022 this.setOptions(options);
6023 }
6024 #client;
6025 #currentQuery = void 0;
6026 #currentQueryInitialState = void 0;
6027 #currentResult = void 0;
6028 #currentResultState;
6029 #currentResultOptions;
6030 #currentThenable;
6031 #selectError;
6032 #selectFn;
6033 #selectResult;
6034 // This property keeps track of the last query with defined data.
6035 // It will be used to pass the previous data and query to the placeholder function between renders.
6036 #lastQueryWithDefinedData;
6037 #staleTimeoutId;
6038 #refetchIntervalId;
6039 #currentRefetchInterval;
6040 #trackedProps = /* @__PURE__ */ new Set();
6041 bindMethods() {
6042 this.refetch = this.refetch.bind(this);
6043 }
6044 onSubscribe() {
6045 if (this.listeners.size === 1) {
6046 this.#currentQuery.addObserver(this);
6047 if (shouldFetchOnMount(this.#currentQuery, this.options)) {
6048 this.#executeFetch();
6049 } else {
6050 this.updateResult();
6051 }
6052 this.#updateTimers();
6053 }
6054 }
6055 onUnsubscribe() {
6056 if (!this.hasListeners()) {
6057 this.destroy();
6058 }
6059 }
6060 shouldFetchOnReconnect() {
6061 return shouldFetchOn(
6062 this.#currentQuery,
6063 this.options,
6064 this.options.refetchOnReconnect
6065 );
6066 }
6067 shouldFetchOnWindowFocus() {
6068 return shouldFetchOn(
6069 this.#currentQuery,
6070 this.options,
6071 this.options.refetchOnWindowFocus
6072 );
6073 }
6074 destroy() {
6075 this.listeners = /* @__PURE__ */ new Set();
6076 this.#clearStaleTimeout();
6077 this.#clearRefetchInterval();
6078 this.#currentQuery.removeObserver(this);
6079 }
6080 setOptions(options, notifyOptions) {
6081 const prevOptions = this.options;
6082 const prevQuery = this.#currentQuery;
6083 this.options = this.#client.defaultQueryOptions(options);
6084 if (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") {
6085 throw new Error(
6086 "Expected enabled to be a boolean or a callback that returns a boolean"
6087 );
6088 }
6089 this.#updateQuery();
6090 this.#currentQuery.setOptions(this.options);
6091 if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
6092 this.#client.getQueryCache().notify({
6093 type: "observerOptionsUpdated",
6094 query: this.#currentQuery,
6095 observer: this
6096 });
6097 }
6098 const mounted = this.hasListeners();
6099 if (mounted && shouldFetchOptionally(
6100 this.#currentQuery,
6101 prevQuery,
6102 this.options,
6103 prevOptions
6104 )) {
6105 this.#executeFetch();
6106 }
6107 this.updateResult(notifyOptions);
6108 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0, import_utils.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0, import_utils.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) {
6109 this.#updateStaleTimeout();
6110 }
6111 const nextRefetchInterval = this.#computeRefetchInterval();
6112 if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
6113 this.#updateRefetchInterval(nextRefetchInterval);
6114 }
6115 }
6116 getOptimisticResult(options) {
6117 const query = this.#client.getQueryCache().build(this.#client, options);
6118 const result = this.createResult(query, options);
6119 if (shouldAssignObserverCurrentProperties(this, result)) {
6120 this.#currentResult = result;
6121 this.#currentResultOptions = this.options;
6122 this.#currentResultState = this.#currentQuery.state;
6123 }
6124 return result;
6125 }
6126 getCurrentResult() {
6127 return this.#currentResult;
6128 }
6129 trackResult(result, onPropTracked) {
6130 const trackedResult = {};
6131 Object.keys(result).forEach((key) => {
6132 Object.defineProperty(trackedResult, key, {
6133 configurable: false,
6134 enumerable: true,
6135 get: () => {
6136 this.trackProp(key);
6137 onPropTracked?.(key);
6138 return result[key];
6139 }
6140 });
6141 });
6142 return trackedResult;
6143 }
6144 trackProp(key) {
6145 this.#trackedProps.add(key);
6146 }
6147 getCurrentQuery() {
6148 return this.#currentQuery;
6149 }
6150 refetch({ ...options } = {}) {
6151 return this.fetch({
6152 ...options
6153 });
6154 }
6155 fetchOptimistic(options) {
6156 const defaultedOptions = this.#client.defaultQueryOptions(options);
6157 const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
6158 return query.fetch().then(() => this.createResult(query, defaultedOptions));
6159 }
6160 fetch(fetchOptions) {
6161 return this.#executeFetch({
6162 ...fetchOptions,
6163 cancelRefetch: fetchOptions.cancelRefetch ?? true
6164 }).then(() => {
6165 this.updateResult();
6166 return this.#currentResult;
6167 });
6168 }
6169 #executeFetch(fetchOptions) {
6170 this.#updateQuery();
6171 let promise = this.#currentQuery.fetch(
6172 this.options,
6173 fetchOptions
6174 );
6175 if (!fetchOptions?.throwOnError) {
6176 promise = promise.catch(import_utils.noop);
6177 }
6178 return promise;
6179 }
6180 #updateStaleTimeout() {
6181 this.#clearStaleTimeout();
6182 const staleTime = (0, import_utils.resolveStaleTime)(
6183 this.options.staleTime,
6184 this.#currentQuery
6185 );
6186 if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) {
6187 return;
6188 }
6189 const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, staleTime);
6190 const timeout = time + 1;
6191 this.#staleTimeoutId = setTimeout(() => {
6192 if (!this.#currentResult.isStale) {
6193 this.updateResult();
6194 }
6195 }, timeout);
6196 }
6197 #computeRefetchInterval() {
6198 return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
6199 }
6200 #updateRefetchInterval(nextInterval) {
6201 this.#clearRefetchInterval();
6202 this.#currentRefetchInterval = nextInterval;
6203 if (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
6204 return;
6205 }
6206 this.#refetchIntervalId = setInterval(() => {
6207 if (this.options.refetchIntervalInBackground || import_focusManager.focusManager.isFocused()) {
6208 this.#executeFetch();
6209 }
6210 }, this.#currentRefetchInterval);
6211 }
6212 #updateTimers() {
6213 this.#updateStaleTimeout();
6214 this.#updateRefetchInterval(this.#computeRefetchInterval());
6215 }
6216 #clearStaleTimeout() {
6217 if (this.#staleTimeoutId) {
6218 clearTimeout(this.#staleTimeoutId);
6219 this.#staleTimeoutId = void 0;
6220 }
6221 }
6222 #clearRefetchInterval() {
6223 if (this.#refetchIntervalId) {
6224 clearInterval(this.#refetchIntervalId);
6225 this.#refetchIntervalId = void 0;
6226 }
6227 }
6228 createResult(query, options) {
6229 const prevQuery = this.#currentQuery;
6230 const prevOptions = this.options;
6231 const prevResult = this.#currentResult;
6232 const prevResultState = this.#currentResultState;
6233 const prevResultOptions = this.#currentResultOptions;
6234 const queryChange = query !== prevQuery;
6235 const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
6236 const { state } = query;
6237 let newState = { ...state };
6238 let isPlaceholderData = false;
6239 let data;
6240 if (options._optimisticResults) {
6241 const mounted = this.hasListeners();
6242 const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
6243 const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
6244 if (fetchOnMount || fetchOptionally) {
6245 newState = {
6246 ...newState,
6247 ...(0, import_query.fetchState)(state.data, query.options)
6248 };
6249 }
6250 if (options._optimisticResults === "isRestoring") {
6251 newState.fetchStatus = "idle";
6252 }
6253 }
6254 let { error, errorUpdatedAt, status } = newState;
6255 if (options.select && newState.data !== void 0) {
6256 if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {
6257 data = this.#selectResult;
6258 } else {
6259 try {
6260 this.#selectFn = options.select;
6261 data = options.select(newState.data);
6262 data = (0, import_utils.replaceData)(prevResult?.data, data, options);
6263 this.#selectResult = data;
6264 this.#selectError = null;
6265 } catch (selectError) {
6266 this.#selectError = selectError;
6267 }
6268 }
6269 } else {
6270 data = newState.data;
6271 }
6272 if (options.placeholderData !== void 0 && data === void 0 && status === "pending") {
6273 let placeholderData;
6274 if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
6275 placeholderData = prevResult.data;
6276 } else {
6277 placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
6278 this.#lastQueryWithDefinedData?.state.data,
6279 this.#lastQueryWithDefinedData
6280 ) : options.placeholderData;
6281 if (options.select && placeholderData !== void 0) {
6282 try {
6283 placeholderData = options.select(placeholderData);
6284 this.#selectError = null;
6285 } catch (selectError) {
6286 this.#selectError = selectError;
6287 }
6288 }
6289 }
6290 if (placeholderData !== void 0) {
6291 status = "success";
6292 data = (0, import_utils.replaceData)(
6293 prevResult?.data,
6294 placeholderData,
6295 options
6296 );
6297 isPlaceholderData = true;
6298 }
6299 }
6300 if (this.#selectError) {
6301 error = this.#selectError;
6302 data = this.#selectResult;
6303 errorUpdatedAt = Date.now();
6304 status = "error";
6305 }
6306 const isFetching = newState.fetchStatus === "fetching";
6307 const isPending = status === "pending";
6308 const isError = status === "error";
6309 const isLoading = isPending && isFetching;
6310 const hasData = data !== void 0;
6311 const result = {
6312 status,
6313 fetchStatus: newState.fetchStatus,
6314 isPending,
6315 isSuccess: status === "success",
6316 isError,
6317 isInitialLoading: isLoading,
6318 isLoading,
6319 data,
6320 dataUpdatedAt: newState.dataUpdatedAt,
6321 error,
6322 errorUpdatedAt,
6323 failureCount: newState.fetchFailureCount,
6324 failureReason: newState.fetchFailureReason,
6325 errorUpdateCount: newState.errorUpdateCount,
6326 isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
6327 isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
6328 isFetching,
6329 isRefetching: isFetching && !isPending,
6330 isLoadingError: isError && !hasData,
6331 isPaused: newState.fetchStatus === "paused",
6332 isPlaceholderData,
6333 isRefetchError: isError && hasData,
6334 isStale: isStale(query, options),
6335 refetch: this.refetch,
6336 promise: this.#currentThenable
6337 };
6338 const nextResult = result;
6339 if (this.options.experimental_prefetchInRender) {
6340 const finalizeThenableIfPossible = (thenable) => {
6341 if (nextResult.status === "error") {
6342 thenable.reject(nextResult.error);
6343 } else if (nextResult.data !== void 0) {
6344 thenable.resolve(nextResult.data);
6345 }
6346 };
6347 const recreateThenable = () => {
6348 const pending = this.#currentThenable = nextResult.promise = (0, import_thenable.pendingThenable)();
6349 finalizeThenableIfPossible(pending);
6350 };
6351 const prevThenable = this.#currentThenable;
6352 switch (prevThenable.status) {
6353 case "pending":
6354 if (query.queryHash === prevQuery.queryHash) {
6355 finalizeThenableIfPossible(prevThenable);
6356 }
6357 break;
6358 case "fulfilled":
6359 if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
6360 recreateThenable();
6361 }
6362 break;
6363 case "rejected":
6364 if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
6365 recreateThenable();
6366 }
6367 break;
6368 }
6369 }
6370 return nextResult;
6371 }
6372 updateResult(notifyOptions) {
6373 const prevResult = this.#currentResult;
6374 const nextResult = this.createResult(this.#currentQuery, this.options);
6375 this.#currentResultState = this.#currentQuery.state;
6376 this.#currentResultOptions = this.options;
6377 if (this.#currentResultState.data !== void 0) {
6378 this.#lastQueryWithDefinedData = this.#currentQuery;
6379 }
6380 if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
6381 return;
6382 }
6383 this.#currentResult = nextResult;
6384 const defaultNotifyOptions = {};
6385 const shouldNotifyListeners = () => {
6386 if (!prevResult) {
6387 return true;
6388 }
6389 const { notifyOnChangeProps } = this.options;
6390 const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
6391 if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
6392 return true;
6393 }
6394 const includedProps = new Set(
6395 notifyOnChangePropsValue ?? this.#trackedProps
6396 );
6397 if (this.options.throwOnError) {
6398 includedProps.add("error");
6399 }
6400 return Object.keys(this.#currentResult).some((key) => {
6401 const typedKey = key;
6402 const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
6403 return changed && includedProps.has(typedKey);
6404 });
6405 };
6406 if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
6407 defaultNotifyOptions.listeners = true;
6408 }
6409 this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
6410 }
6411 #updateQuery() {
6412 const query = this.#client.getQueryCache().build(this.#client, this.options);
6413 if (query === this.#currentQuery) {
6414 return;
6415 }
6416 const prevQuery = this.#currentQuery;
6417 this.#currentQuery = query;
6418 this.#currentQueryInitialState = query.state;
6419 if (this.hasListeners()) {
6420 prevQuery?.removeObserver(this);
6421 query.addObserver(this);
6422 }
6423 }
6424 onQueryUpdate() {
6425 this.updateResult();
6426 if (this.hasListeners()) {
6427 this.#updateTimers();
6428 }
6429 }
6430 #notify(notifyOptions) {
6431 import_notifyManager.notifyManager.batch(() => {
6432 if (notifyOptions.listeners) {
6433 this.listeners.forEach((listener) => {
6434 listener(this.#currentResult);
6435 });
6436 }
6437 this.#client.getQueryCache().notify({
6438 query: this.#currentQuery,
6439 type: "observerResultsUpdated"
6440 });
6441 });
6442 }
6443 };
6444 function shouldLoadOnMount(query, options) {
6445 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
6446 }
6447 function shouldFetchOnMount(query, options) {
6448 return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
6449 }
6450 function shouldFetchOn(query, options, field) {
6451 if ((0, import_utils.resolveEnabled)(options.enabled, query) !== false) {
6452 const value = typeof field === "function" ? field(query) : field;
6453 return value === "always" || value !== false && isStale(query, options);
6454 }
6455 return false;
6456 }
6457 function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
6458 return (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
6459 }
6460 function isStale(query, options) {
6461 return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query));
6462 }
6463 function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
6464 if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
6465 return true;
6466 }
6467 return false;
6468 }
6469 // Annotate the CommonJS export names for ESM import in node:
6470 0 && (0);
6471 //# sourceMappingURL=queryObserver.cjs.map
6472
6473 /***/ }),
6474
6475 /***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
6476 /*!***********************************************************************!*\
6477 !*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
6478 \***********************************************************************/
6479 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6480
6481 "use strict";
6482
6483 var __defProp = Object.defineProperty;
6484 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6485 var __getOwnPropNames = Object.getOwnPropertyNames;
6486 var __hasOwnProp = Object.prototype.hasOwnProperty;
6487 var __export = (target, all) => {
6488 for (var name in all)
6489 __defProp(target, name, { get: all[name], enumerable: true });
6490 };
6491 var __copyProps = (to, from, except, desc) => {
6492 if (from && typeof from === "object" || typeof from === "function") {
6493 for (let key of __getOwnPropNames(from))
6494 if (!__hasOwnProp.call(to, key) && key !== except)
6495 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6496 }
6497 return to;
6498 };
6499 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6500
6501 // src/removable.ts
6502 var removable_exports = {};
6503 __export(removable_exports, {
6504 Removable: () => Removable
6505 });
6506 module.exports = __toCommonJS(removable_exports);
6507 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6508 var Removable = class {
6509 #gcTimeout;
6510 destroy() {
6511 this.clearGcTimeout();
6512 }
6513 scheduleGc() {
6514 this.clearGcTimeout();
6515 if ((0, import_utils.isValidTimeout)(this.gcTime)) {
6516 this.#gcTimeout = setTimeout(() => {
6517 this.optionalRemove();
6518 }, this.gcTime);
6519 }
6520 }
6521 updateGcTime(newGcTime) {
6522 this.gcTime = Math.max(
6523 this.gcTime || 0,
6524 newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
6525 );
6526 }
6527 clearGcTimeout() {
6528 if (this.#gcTimeout) {
6529 clearTimeout(this.#gcTimeout);
6530 this.#gcTimeout = void 0;
6531 }
6532 }
6533 };
6534 // Annotate the CommonJS export names for ESM import in node:
6535 0 && (0);
6536 //# sourceMappingURL=removable.cjs.map
6537
6538 /***/ }),
6539
6540 /***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
6541 /*!*********************************************************************!*\
6542 !*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
6543 \*********************************************************************/
6544 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
6545
6546 "use strict";
6547
6548 var __defProp = Object.defineProperty;
6549 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6550 var __getOwnPropNames = Object.getOwnPropertyNames;
6551 var __hasOwnProp = Object.prototype.hasOwnProperty;
6552 var __export = (target, all) => {
6553 for (var name in all)
6554 __defProp(target, name, { get: all[name], enumerable: true });
6555 };
6556 var __copyProps = (to, from, except, desc) => {
6557 if (from && typeof from === "object" || typeof from === "function") {
6558 for (let key of __getOwnPropNames(from))
6559 if (!__hasOwnProp.call(to, key) && key !== except)
6560 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6561 }
6562 return to;
6563 };
6564 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6565
6566 // src/retryer.ts
6567 var retryer_exports = {};
6568 __export(retryer_exports, {
6569 CancelledError: () => CancelledError,
6570 canFetch: () => canFetch,
6571 createRetryer: () => createRetryer,
6572 isCancelledError: () => isCancelledError
6573 });
6574 module.exports = __toCommonJS(retryer_exports);
6575 var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
6576 var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
6577 var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
6578 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
6579 function defaultRetryDelay(failureCount) {
6580 return Math.min(1e3 * 2 ** failureCount, 3e4);
6581 }
6582 function canFetch(networkMode) {
6583 return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
6584 }
6585 var CancelledError = class extends Error {
6586 constructor(options) {
6587 super("CancelledError");
6588 this.revert = options?.revert;
6589 this.silent = options?.silent;
6590 }
6591 };
6592 function isCancelledError(value) {
6593 return value instanceof CancelledError;
6594 }
6595 function createRetryer(config) {
6596 let isRetryCancelled = false;
6597 let failureCount = 0;
6598 let isResolved = false;
6599 let continueFn;
6600 const thenable = (0, import_thenable.pendingThenable)();
6601 const cancel = (cancelOptions) => {
6602 if (!isResolved) {
6603 reject(new CancelledError(cancelOptions));
6604 config.abort?.();
6605 }
6606 };
6607 const cancelRetry = () => {
6608 isRetryCancelled = true;
6609 };
6610 const continueRetry = () => {
6611 isRetryCancelled = false;
6612 };
6613 const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun();
6614 const canStart = () => canFetch(config.networkMode) && config.canRun();
6615 const resolve = (value) => {
6616 if (!isResolved) {
6617 isResolved = true;
6618 config.onSuccess?.(value);
6619 continueFn?.();
6620 thenable.resolve(value);
6621 }
6622 };
6623 const reject = (value) => {
6624 if (!isResolved) {
6625 isResolved = true;
6626 config.onError?.(value);
6627 continueFn?.();
6628 thenable.reject(value);
6629 }
6630 };
6631 const pause = () => {
6632 return new Promise((continueResolve) => {
6633 continueFn = (value) => {
6634 if (isResolved || canContinue()) {
6635 continueResolve(value);
6636 }
6637 };
6638 config.onPause?.();
6639 }).then(() => {
6640 continueFn = void 0;
6641 if (!isResolved) {
6642 config.onContinue?.();
6643 }
6644 });
6645 };
6646 const run = () => {
6647 if (isResolved) {
6648 return;
6649 }
6650 let promiseOrValue;
6651 const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
6652 try {
6653 promiseOrValue = initialPromise ?? config.fn();
6654 } catch (error) {
6655 promiseOrValue = Promise.reject(error);
6656 }
6657 Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
6658 if (isResolved) {
6659 return;
6660 }
6661 const retry = config.retry ?? (import_utils.isServer ? 0 : 3);
6662 const retryDelay = config.retryDelay ?? defaultRetryDelay;
6663 const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
6664 const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
6665 if (isRetryCancelled || !shouldRetry) {
6666 reject(error);
6667 return;
6668 }
6669 failureCount++;
6670 config.onFail?.(failureCount, error);
6671 (0, import_utils.sleep)(delay).then(() => {
6672 return canContinue() ? void 0 : pause();
6673 }).then(() => {
6674 if (isRetryCancelled) {
6675 reject(error);
6676 } else {
6677 run();
6678 }
6679 });
6680 });
6681 };
6682 return {
6683 promise: thenable,
6684 cancel,
6685 continue: () => {
6686 continueFn?.();
6687 return thenable;
6688 },
6689 cancelRetry,
6690 continueRetry,
6691 canStart,
6692 start: () => {
6693 if (canStart()) {
6694 run();
6695 } else {
6696 pause().then(run);
6697 }
6698 return thenable;
6699 }
6700 };
6701 }
6702 // Annotate the CommonJS export names for ESM import in node:
6703 0 && (0);
6704 //# sourceMappingURL=retryer.cjs.map
6705
6706 /***/ }),
6707
6708 /***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
6709 /*!**************************************************************************!*\
6710 !*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
6711 \**************************************************************************/
6712 /***/ ((module) => {
6713
6714 "use strict";
6715
6716 var __defProp = Object.defineProperty;
6717 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6718 var __getOwnPropNames = Object.getOwnPropertyNames;
6719 var __hasOwnProp = Object.prototype.hasOwnProperty;
6720 var __export = (target, all) => {
6721 for (var name in all)
6722 __defProp(target, name, { get: all[name], enumerable: true });
6723 };
6724 var __copyProps = (to, from, except, desc) => {
6725 if (from && typeof from === "object" || typeof from === "function") {
6726 for (let key of __getOwnPropNames(from))
6727 if (!__hasOwnProp.call(to, key) && key !== except)
6728 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6729 }
6730 return to;
6731 };
6732 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6733
6734 // src/subscribable.ts
6735 var subscribable_exports = {};
6736 __export(subscribable_exports, {
6737 Subscribable: () => Subscribable
6738 });
6739 module.exports = __toCommonJS(subscribable_exports);
6740 var Subscribable = class {
6741 constructor() {
6742 this.listeners = /* @__PURE__ */ new Set();
6743 this.subscribe = this.subscribe.bind(this);
6744 }
6745 subscribe(listener) {
6746 this.listeners.add(listener);
6747 this.onSubscribe();
6748 return () => {
6749 this.listeners.delete(listener);
6750 this.onUnsubscribe();
6751 };
6752 }
6753 hasListeners() {
6754 return this.listeners.size > 0;
6755 }
6756 onSubscribe() {
6757 }
6758 onUnsubscribe() {
6759 }
6760 };
6761 // Annotate the CommonJS export names for ESM import in node:
6762 0 && (0);
6763 //# sourceMappingURL=subscribable.cjs.map
6764
6765 /***/ }),
6766
6767 /***/ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs":
6768 /*!**********************************************************************!*\
6769 !*** ../node_modules/@tanstack/query-core/build/modern/thenable.cjs ***!
6770 \**********************************************************************/
6771 /***/ ((module) => {
6772
6773 "use strict";
6774
6775 var __defProp = Object.defineProperty;
6776 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6777 var __getOwnPropNames = Object.getOwnPropertyNames;
6778 var __hasOwnProp = Object.prototype.hasOwnProperty;
6779 var __export = (target, all) => {
6780 for (var name in all)
6781 __defProp(target, name, { get: all[name], enumerable: true });
6782 };
6783 var __copyProps = (to, from, except, desc) => {
6784 if (from && typeof from === "object" || typeof from === "function") {
6785 for (let key of __getOwnPropNames(from))
6786 if (!__hasOwnProp.call(to, key) && key !== except)
6787 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6788 }
6789 return to;
6790 };
6791 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6792
6793 // src/thenable.ts
6794 var thenable_exports = {};
6795 __export(thenable_exports, {
6796 pendingThenable: () => pendingThenable
6797 });
6798 module.exports = __toCommonJS(thenable_exports);
6799 function pendingThenable() {
6800 let resolve;
6801 let reject;
6802 const thenable = new Promise((_resolve, _reject) => {
6803 resolve = _resolve;
6804 reject = _reject;
6805 });
6806 thenable.status = "pending";
6807 thenable.catch(() => {
6808 });
6809 function finalize(data) {
6810 Object.assign(thenable, data);
6811 delete thenable.resolve;
6812 delete thenable.reject;
6813 }
6814 thenable.resolve = (value) => {
6815 finalize({
6816 status: "fulfilled",
6817 value
6818 });
6819 resolve(value);
6820 };
6821 thenable.reject = (reason) => {
6822 finalize({
6823 status: "rejected",
6824 reason
6825 });
6826 reject(reason);
6827 };
6828 return thenable;
6829 }
6830 // Annotate the CommonJS export names for ESM import in node:
6831 0 && (0);
6832 //# sourceMappingURL=thenable.cjs.map
6833
6834 /***/ }),
6835
6836 /***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
6837 /*!*******************************************************************!*\
6838 !*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
6839 \*******************************************************************/
6840 /***/ ((module) => {
6841
6842 "use strict";
6843
6844 var __defProp = Object.defineProperty;
6845 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6846 var __getOwnPropNames = Object.getOwnPropertyNames;
6847 var __hasOwnProp = Object.prototype.hasOwnProperty;
6848 var __copyProps = (to, from, except, desc) => {
6849 if (from && typeof from === "object" || typeof from === "function") {
6850 for (let key of __getOwnPropNames(from))
6851 if (!__hasOwnProp.call(to, key) && key !== except)
6852 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6853 }
6854 return to;
6855 };
6856 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6857
6858 // src/types.ts
6859 var types_exports = {};
6860 module.exports = __toCommonJS(types_exports);
6861 //# sourceMappingURL=types.cjs.map
6862
6863 /***/ }),
6864
6865 /***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
6866 /*!*******************************************************************!*\
6867 !*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
6868 \*******************************************************************/
6869 /***/ ((module) => {
6870
6871 "use strict";
6872
6873 var __defProp = Object.defineProperty;
6874 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6875 var __getOwnPropNames = Object.getOwnPropertyNames;
6876 var __hasOwnProp = Object.prototype.hasOwnProperty;
6877 var __export = (target, all) => {
6878 for (var name in all)
6879 __defProp(target, name, { get: all[name], enumerable: true });
6880 };
6881 var __copyProps = (to, from, except, desc) => {
6882 if (from && typeof from === "object" || typeof from === "function") {
6883 for (let key of __getOwnPropNames(from))
6884 if (!__hasOwnProp.call(to, key) && key !== except)
6885 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
6886 }
6887 return to;
6888 };
6889 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
6890
6891 // src/utils.ts
6892 var utils_exports = {};
6893 __export(utils_exports, {
6894 addToEnd: () => addToEnd,
6895 addToStart: () => addToStart,
6896 ensureQueryFn: () => ensureQueryFn,
6897 functionalUpdate: () => functionalUpdate,
6898 hashKey: () => hashKey,
6899 hashQueryKeyByOptions: () => hashQueryKeyByOptions,
6900 isPlainArray: () => isPlainArray,
6901 isPlainObject: () => isPlainObject,
6902 isServer: () => isServer,
6903 isValidTimeout: () => isValidTimeout,
6904 keepPreviousData: () => keepPreviousData,
6905 matchMutation: () => matchMutation,
6906 matchQuery: () => matchQuery,
6907 noop: () => noop,
6908 partialMatchKey: () => partialMatchKey,
6909 replaceData: () => replaceData,
6910 replaceEqualDeep: () => replaceEqualDeep,
6911 resolveEnabled: () => resolveEnabled,
6912 resolveStaleTime: () => resolveStaleTime,
6913 shallowEqualObjects: () => shallowEqualObjects,
6914 skipToken: () => skipToken,
6915 sleep: () => sleep,
6916 timeUntilStale: () => timeUntilStale
6917 });
6918 module.exports = __toCommonJS(utils_exports);
6919 var isServer = typeof window === "undefined" || "Deno" in globalThis;
6920 function noop() {
6921 }
6922 function functionalUpdate(updater, input) {
6923 return typeof updater === "function" ? updater(input) : updater;
6924 }
6925 function isValidTimeout(value) {
6926 return typeof value === "number" && value >= 0 && value !== Infinity;
6927 }
6928 function timeUntilStale(updatedAt, staleTime) {
6929 return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
6930 }
6931 function resolveStaleTime(staleTime, query) {
6932 return typeof staleTime === "function" ? staleTime(query) : staleTime;
6933 }
6934 function resolveEnabled(enabled, query) {
6935 return typeof enabled === "function" ? enabled(query) : enabled;
6936 }
6937 function matchQuery(filters, query) {
6938 const {
6939 type = "all",
6940 exact,
6941 fetchStatus,
6942 predicate,
6943 queryKey,
6944 stale
6945 } = filters;
6946 if (queryKey) {
6947 if (exact) {
6948 if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
6949 return false;
6950 }
6951 } else if (!partialMatchKey(query.queryKey, queryKey)) {
6952 return false;
6953 }
6954 }
6955 if (type !== "all") {
6956 const isActive = query.isActive();
6957 if (type === "active" && !isActive) {
6958 return false;
6959 }
6960 if (type === "inactive" && isActive) {
6961 return false;
6962 }
6963 }
6964 if (typeof stale === "boolean" && query.isStale() !== stale) {
6965 return false;
6966 }
6967 if (fetchStatus && fetchStatus !== query.state.fetchStatus) {
6968 return false;
6969 }
6970 if (predicate && !predicate(query)) {
6971 return false;
6972 }
6973 return true;
6974 }
6975 function matchMutation(filters, mutation) {
6976 const { exact, status, predicate, mutationKey } = filters;
6977 if (mutationKey) {
6978 if (!mutation.options.mutationKey) {
6979 return false;
6980 }
6981 if (exact) {
6982 if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
6983 return false;
6984 }
6985 } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
6986 return false;
6987 }
6988 }
6989 if (status && mutation.state.status !== status) {
6990 return false;
6991 }
6992 if (predicate && !predicate(mutation)) {
6993 return false;
6994 }
6995 return true;
6996 }
6997 function hashQueryKeyByOptions(queryKey, options) {
6998 const hashFn = options?.queryKeyHashFn || hashKey;
6999 return hashFn(queryKey);
7000 }
7001 function hashKey(queryKey) {
7002 return JSON.stringify(
7003 queryKey,
7004 (_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
7005 result[key] = val[key];
7006 return result;
7007 }, {}) : val
7008 );
7009 }
7010 function partialMatchKey(a, b) {
7011 if (a === b) {
7012 return true;
7013 }
7014 if (typeof a !== typeof b) {
7015 return false;
7016 }
7017 if (a && b && typeof a === "object" && typeof b === "object") {
7018 return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
7019 }
7020 return false;
7021 }
7022 function replaceEqualDeep(a, b) {
7023 if (a === b) {
7024 return a;
7025 }
7026 const array = isPlainArray(a) && isPlainArray(b);
7027 if (array || isPlainObject(a) && isPlainObject(b)) {
7028 const aItems = array ? a : Object.keys(a);
7029 const aSize = aItems.length;
7030 const bItems = array ? b : Object.keys(b);
7031 const bSize = bItems.length;
7032 const copy = array ? [] : {};
7033 let equalItems = 0;
7034 for (let i = 0; i < bSize; i++) {
7035 const key = array ? i : bItems[i];
7036 if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) {
7037 copy[key] = void 0;
7038 equalItems++;
7039 } else {
7040 copy[key] = replaceEqualDeep(a[key], b[key]);
7041 if (copy[key] === a[key] && a[key] !== void 0) {
7042 equalItems++;
7043 }
7044 }
7045 }
7046 return aSize === bSize && equalItems === aSize ? a : copy;
7047 }
7048 return b;
7049 }
7050 function shallowEqualObjects(a, b) {
7051 if (!b || Object.keys(a).length !== Object.keys(b).length) {
7052 return false;
7053 }
7054 for (const key in a) {
7055 if (a[key] !== b[key]) {
7056 return false;
7057 }
7058 }
7059 return true;
7060 }
7061 function isPlainArray(value) {
7062 return Array.isArray(value) && value.length === Object.keys(value).length;
7063 }
7064 function isPlainObject(o) {
7065 if (!hasObjectPrototype(o)) {
7066 return false;
7067 }
7068 const ctor = o.constructor;
7069 if (ctor === void 0) {
7070 return true;
7071 }
7072 const prot = ctor.prototype;
7073 if (!hasObjectPrototype(prot)) {
7074 return false;
7075 }
7076 if (!prot.hasOwnProperty("isPrototypeOf")) {
7077 return false;
7078 }
7079 if (Object.getPrototypeOf(o) !== Object.prototype) {
7080 return false;
7081 }
7082 return true;
7083 }
7084 function hasObjectPrototype(o) {
7085 return Object.prototype.toString.call(o) === "[object Object]";
7086 }
7087 function sleep(timeout) {
7088 return new Promise((resolve) => {
7089 setTimeout(resolve, timeout);
7090 });
7091 }
7092 function replaceData(prevData, data, options) {
7093 if (typeof options.structuralSharing === "function") {
7094 return options.structuralSharing(prevData, data);
7095 } else if (options.structuralSharing !== false) {
7096 if (true) {
7097 try {
7098 return replaceEqualDeep(prevData, data);
7099 } catch (error) {
7100 console.error(
7101 `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
7102 );
7103 }
7104 }
7105 return replaceEqualDeep(prevData, data);
7106 }
7107 return data;
7108 }
7109 function keepPreviousData(previousData) {
7110 return previousData;
7111 }
7112 function addToEnd(items, item, max = 0) {
7113 const newItems = [...items, item];
7114 return max && newItems.length > max ? newItems.slice(1) : newItems;
7115 }
7116 function addToStart(items, item, max = 0) {
7117 const newItems = [item, ...items];
7118 return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
7119 }
7120 var skipToken = Symbol();
7121 function ensureQueryFn(options, fetchOptions) {
7122 if (true) {
7123 if (options.queryFn === skipToken) {
7124 console.error(
7125 `Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
7126 );
7127 }
7128 }
7129 if (!options.queryFn && fetchOptions?.initialPromise) {
7130 return () => fetchOptions.initialPromise;
7131 }
7132 if (!options.queryFn || options.queryFn === skipToken) {
7133 return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
7134 }
7135 return options.queryFn;
7136 }
7137 // Annotate the CommonJS export names for ESM import in node:
7138 0 && (0);
7139 //# sourceMappingURL=utils.cjs.map
7140
7141 /***/ }),
7142
7143 /***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
7144 /*!********************************************************************************!*\
7145 !*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
7146 \********************************************************************************/
7147 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7148
7149 "use strict";
7150
7151 "use client";
7152 var __create = Object.create;
7153 var __defProp = Object.defineProperty;
7154 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7155 var __getOwnPropNames = Object.getOwnPropertyNames;
7156 var __getProtoOf = Object.getPrototypeOf;
7157 var __hasOwnProp = Object.prototype.hasOwnProperty;
7158 var __export = (target, all) => {
7159 for (var name in all)
7160 __defProp(target, name, { get: all[name], enumerable: true });
7161 };
7162 var __copyProps = (to, from, except, desc) => {
7163 if (from && typeof from === "object" || typeof from === "function") {
7164 for (let key of __getOwnPropNames(from))
7165 if (!__hasOwnProp.call(to, key) && key !== except)
7166 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7167 }
7168 return to;
7169 };
7170 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7171 // If the importer is in node compatibility mode or this is not an ESM
7172 // file that has been converted to a CommonJS file using a Babel-
7173 // compatible transform (i.e. "__esModule" has not been set), then set
7174 // "default" to the CommonJS "module.exports" for node compatibility.
7175 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7176 mod
7177 ));
7178 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7179
7180 // src/HydrationBoundary.tsx
7181 var HydrationBoundary_exports = {};
7182 __export(HydrationBoundary_exports, {
7183 HydrationBoundary: () => HydrationBoundary
7184 });
7185 module.exports = __toCommonJS(HydrationBoundary_exports);
7186 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7187 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7188 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7189 var HydrationBoundary = ({
7190 children,
7191 options = {},
7192 state,
7193 queryClient
7194 }) => {
7195 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7196 const [hydrationQueue, setHydrationQueue] = React.useState();
7197 const optionsRef = React.useRef(options);
7198 optionsRef.current = options;
7199 React.useMemo(() => {
7200 if (state) {
7201 if (typeof state !== "object") {
7202 return;
7203 }
7204 const queryCache = client.getQueryCache();
7205 const queries = state.queries || [];
7206 const newQueries = [];
7207 const existingQueries = [];
7208 for (const dehydratedQuery of queries) {
7209 const existingQuery = queryCache.get(dehydratedQuery.queryHash);
7210 if (!existingQuery) {
7211 newQueries.push(dehydratedQuery);
7212 } else {
7213 const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
7214 const queryAlreadyQueued = hydrationQueue?.find(
7215 (query) => query.queryHash === dehydratedQuery.queryHash
7216 );
7217 if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
7218 existingQueries.push(dehydratedQuery);
7219 }
7220 }
7221 }
7222 if (newQueries.length > 0) {
7223 (0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
7224 }
7225 if (existingQueries.length > 0) {
7226 setHydrationQueue(
7227 (prev) => prev ? [...prev, ...existingQueries] : existingQueries
7228 );
7229 }
7230 }
7231 }, [client, hydrationQueue, state]);
7232 React.useEffect(() => {
7233 if (hydrationQueue) {
7234 (0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
7235 setHydrationQueue(void 0);
7236 }
7237 }, [client, hydrationQueue]);
7238 return children;
7239 };
7240 // Annotate the CommonJS export names for ESM import in node:
7241 0 && (0);
7242 //# sourceMappingURL=HydrationBoundary.cjs.map
7243
7244 /***/ }),
7245
7246 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
7247 /*!**********************************************************************************!*\
7248 !*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
7249 \**********************************************************************************/
7250 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7251
7252 "use strict";
7253
7254 "use client";
7255 var __create = Object.create;
7256 var __defProp = Object.defineProperty;
7257 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7258 var __getOwnPropNames = Object.getOwnPropertyNames;
7259 var __getProtoOf = Object.getPrototypeOf;
7260 var __hasOwnProp = Object.prototype.hasOwnProperty;
7261 var __export = (target, all) => {
7262 for (var name in all)
7263 __defProp(target, name, { get: all[name], enumerable: true });
7264 };
7265 var __copyProps = (to, from, except, desc) => {
7266 if (from && typeof from === "object" || typeof from === "function") {
7267 for (let key of __getOwnPropNames(from))
7268 if (!__hasOwnProp.call(to, key) && key !== except)
7269 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7270 }
7271 return to;
7272 };
7273 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7274 // If the importer is in node compatibility mode or this is not an ESM
7275 // file that has been converted to a CommonJS file using a Babel-
7276 // compatible transform (i.e. "__esModule" has not been set), then set
7277 // "default" to the CommonJS "module.exports" for node compatibility.
7278 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7279 mod
7280 ));
7281 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7282
7283 // src/QueryClientProvider.tsx
7284 var QueryClientProvider_exports = {};
7285 __export(QueryClientProvider_exports, {
7286 QueryClientContext: () => QueryClientContext,
7287 QueryClientProvider: () => QueryClientProvider,
7288 useQueryClient: () => useQueryClient
7289 });
7290 module.exports = __toCommonJS(QueryClientProvider_exports);
7291 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7292 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7293 var QueryClientContext = React.createContext(
7294 void 0
7295 );
7296 var useQueryClient = (queryClient) => {
7297 const client = React.useContext(QueryClientContext);
7298 if (queryClient) {
7299 return queryClient;
7300 }
7301 if (!client) {
7302 throw new Error("No QueryClient set, use QueryClientProvider to set one");
7303 }
7304 return client;
7305 };
7306 var QueryClientProvider = ({
7307 client,
7308 children
7309 }) => {
7310 React.useEffect(() => {
7311 client.mount();
7312 return () => {
7313 client.unmount();
7314 };
7315 }, [client]);
7316 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
7317 };
7318 // Annotate the CommonJS export names for ESM import in node:
7319 0 && (0);
7320 //# sourceMappingURL=QueryClientProvider.cjs.map
7321
7322 /***/ }),
7323
7324 /***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
7325 /*!**************************************************************************************!*\
7326 !*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
7327 \**************************************************************************************/
7328 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7329
7330 "use strict";
7331
7332 "use client";
7333 var __create = Object.create;
7334 var __defProp = Object.defineProperty;
7335 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7336 var __getOwnPropNames = Object.getOwnPropertyNames;
7337 var __getProtoOf = Object.getPrototypeOf;
7338 var __hasOwnProp = Object.prototype.hasOwnProperty;
7339 var __export = (target, all) => {
7340 for (var name in all)
7341 __defProp(target, name, { get: all[name], enumerable: true });
7342 };
7343 var __copyProps = (to, from, except, desc) => {
7344 if (from && typeof from === "object" || typeof from === "function") {
7345 for (let key of __getOwnPropNames(from))
7346 if (!__hasOwnProp.call(to, key) && key !== except)
7347 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7348 }
7349 return to;
7350 };
7351 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7352 // If the importer is in node compatibility mode or this is not an ESM
7353 // file that has been converted to a CommonJS file using a Babel-
7354 // compatible transform (i.e. "__esModule" has not been set), then set
7355 // "default" to the CommonJS "module.exports" for node compatibility.
7356 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7357 mod
7358 ));
7359 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7360
7361 // src/QueryErrorResetBoundary.tsx
7362 var QueryErrorResetBoundary_exports = {};
7363 __export(QueryErrorResetBoundary_exports, {
7364 QueryErrorResetBoundary: () => QueryErrorResetBoundary,
7365 useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
7366 });
7367 module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
7368 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7369 var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
7370 function createValue() {
7371 let isReset = false;
7372 return {
7373 clearReset: () => {
7374 isReset = false;
7375 },
7376 reset: () => {
7377 isReset = true;
7378 },
7379 isReset: () => {
7380 return isReset;
7381 }
7382 };
7383 }
7384 var QueryErrorResetBoundaryContext = React.createContext(createValue());
7385 var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
7386 var QueryErrorResetBoundary = ({
7387 children
7388 }) => {
7389 const [value] = React.useState(() => createValue());
7390 return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
7391 };
7392 // Annotate the CommonJS export names for ESM import in node:
7393 0 && (0);
7394 //# sourceMappingURL=QueryErrorResetBoundary.cjs.map
7395
7396 /***/ }),
7397
7398 /***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
7399 /*!*********************************************************************************!*\
7400 !*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
7401 \*********************************************************************************/
7402 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7403
7404 "use strict";
7405
7406 "use client";
7407 var __create = Object.create;
7408 var __defProp = Object.defineProperty;
7409 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7410 var __getOwnPropNames = Object.getOwnPropertyNames;
7411 var __getProtoOf = Object.getPrototypeOf;
7412 var __hasOwnProp = Object.prototype.hasOwnProperty;
7413 var __export = (target, all) => {
7414 for (var name in all)
7415 __defProp(target, name, { get: all[name], enumerable: true });
7416 };
7417 var __copyProps = (to, from, except, desc) => {
7418 if (from && typeof from === "object" || typeof from === "function") {
7419 for (let key of __getOwnPropNames(from))
7420 if (!__hasOwnProp.call(to, key) && key !== except)
7421 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7422 }
7423 return to;
7424 };
7425 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7426 // If the importer is in node compatibility mode or this is not an ESM
7427 // file that has been converted to a CommonJS file using a Babel-
7428 // compatible transform (i.e. "__esModule" has not been set), then set
7429 // "default" to the CommonJS "module.exports" for node compatibility.
7430 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7431 mod
7432 ));
7433 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7434
7435 // src/errorBoundaryUtils.ts
7436 var errorBoundaryUtils_exports = {};
7437 __export(errorBoundaryUtils_exports, {
7438 ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
7439 getHasError: () => getHasError,
7440 useClearResetErrorBoundary: () => useClearResetErrorBoundary
7441 });
7442 module.exports = __toCommonJS(errorBoundaryUtils_exports);
7443 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7444 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7445 var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
7446 if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
7447 if (!errorResetBoundary.isReset()) {
7448 options.retryOnMount = false;
7449 }
7450 }
7451 };
7452 var useClearResetErrorBoundary = (errorResetBoundary) => {
7453 React.useEffect(() => {
7454 errorResetBoundary.clearReset();
7455 }, [errorResetBoundary]);
7456 };
7457 var getHasError = ({
7458 result,
7459 errorResetBoundary,
7460 throwOnError,
7461 query
7462 }) => {
7463 return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
7464 };
7465 // Annotate the CommonJS export names for ESM import in node:
7466 0 && (0);
7467 //# sourceMappingURL=errorBoundaryUtils.cjs.map
7468
7469 /***/ }),
7470
7471 /***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
7472 /*!********************************************************************!*\
7473 !*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
7474 \********************************************************************/
7475 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7476
7477 "use strict";
7478
7479 var __defProp = Object.defineProperty;
7480 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7481 var __getOwnPropNames = Object.getOwnPropertyNames;
7482 var __hasOwnProp = Object.prototype.hasOwnProperty;
7483 var __export = (target, all) => {
7484 for (var name in all)
7485 __defProp(target, name, { get: all[name], enumerable: true });
7486 };
7487 var __copyProps = (to, from, except, desc) => {
7488 if (from && typeof from === "object" || typeof from === "function") {
7489 for (let key of __getOwnPropNames(from))
7490 if (!__hasOwnProp.call(to, key) && key !== except)
7491 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7492 }
7493 return to;
7494 };
7495 var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
7496 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7497
7498 // src/index.ts
7499 var src_exports = {};
7500 __export(src_exports, {
7501 HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
7502 IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
7503 QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
7504 QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
7505 QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
7506 infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
7507 queryOptions: () => import_queryOptions.queryOptions,
7508 useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
7509 useIsFetching: () => import_useIsFetching.useIsFetching,
7510 useIsMutating: () => import_useMutationState.useIsMutating,
7511 useIsRestoring: () => import_isRestoring.useIsRestoring,
7512 useMutation: () => import_useMutation.useMutation,
7513 useMutationState: () => import_useMutationState.useMutationState,
7514 usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery,
7515 usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery,
7516 useQueries: () => import_useQueries.useQueries,
7517 useQuery: () => import_useQuery.useQuery,
7518 useQueryClient: () => import_QueryClientProvider.useQueryClient,
7519 useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
7520 useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
7521 useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
7522 useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
7523 });
7524 module.exports = __toCommonJS(src_exports);
7525 __reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
7526 __reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
7527 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
7528 var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
7529 var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
7530 var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
7531 var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
7532 var import_usePrefetchQuery = __webpack_require__(/*! ./usePrefetchQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs");
7533 var import_usePrefetchInfiniteQuery = __webpack_require__(/*! ./usePrefetchInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs");
7534 var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
7535 var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
7536 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7537 var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
7538 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7539 var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
7540 var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
7541 var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
7542 var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
7543 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7544 // Annotate the CommonJS export names for ESM import in node:
7545 0 && (0);
7546 //# sourceMappingURL=index.cjs.map
7547
7548 /***/ }),
7549
7550 /***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
7551 /*!***********************************************************************************!*\
7552 !*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
7553 \***********************************************************************************/
7554 /***/ ((module) => {
7555
7556 "use strict";
7557
7558 var __defProp = Object.defineProperty;
7559 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7560 var __getOwnPropNames = Object.getOwnPropertyNames;
7561 var __hasOwnProp = Object.prototype.hasOwnProperty;
7562 var __export = (target, all) => {
7563 for (var name in all)
7564 __defProp(target, name, { get: all[name], enumerable: true });
7565 };
7566 var __copyProps = (to, from, except, desc) => {
7567 if (from && typeof from === "object" || typeof from === "function") {
7568 for (let key of __getOwnPropNames(from))
7569 if (!__hasOwnProp.call(to, key) && key !== except)
7570 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7571 }
7572 return to;
7573 };
7574 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7575
7576 // src/infiniteQueryOptions.ts
7577 var infiniteQueryOptions_exports = {};
7578 __export(infiniteQueryOptions_exports, {
7579 infiniteQueryOptions: () => infiniteQueryOptions
7580 });
7581 module.exports = __toCommonJS(infiniteQueryOptions_exports);
7582 function infiniteQueryOptions(options) {
7583 return options;
7584 }
7585 // Annotate the CommonJS export names for ESM import in node:
7586 0 && (0);
7587 //# sourceMappingURL=infiniteQueryOptions.cjs.map
7588
7589 /***/ }),
7590
7591 /***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
7592 /*!**************************************************************************!*\
7593 !*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
7594 \**************************************************************************/
7595 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7596
7597 "use strict";
7598
7599 "use client";
7600 var __create = Object.create;
7601 var __defProp = Object.defineProperty;
7602 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7603 var __getOwnPropNames = Object.getOwnPropertyNames;
7604 var __getProtoOf = Object.getPrototypeOf;
7605 var __hasOwnProp = Object.prototype.hasOwnProperty;
7606 var __export = (target, all) => {
7607 for (var name in all)
7608 __defProp(target, name, { get: all[name], enumerable: true });
7609 };
7610 var __copyProps = (to, from, except, desc) => {
7611 if (from && typeof from === "object" || typeof from === "function") {
7612 for (let key of __getOwnPropNames(from))
7613 if (!__hasOwnProp.call(to, key) && key !== except)
7614 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7615 }
7616 return to;
7617 };
7618 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7619 // If the importer is in node compatibility mode or this is not an ESM
7620 // file that has been converted to a CommonJS file using a Babel-
7621 // compatible transform (i.e. "__esModule" has not been set), then set
7622 // "default" to the CommonJS "module.exports" for node compatibility.
7623 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7624 mod
7625 ));
7626 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7627
7628 // src/isRestoring.ts
7629 var isRestoring_exports = {};
7630 __export(isRestoring_exports, {
7631 IsRestoringProvider: () => IsRestoringProvider,
7632 useIsRestoring: () => useIsRestoring
7633 });
7634 module.exports = __toCommonJS(isRestoring_exports);
7635 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7636 var IsRestoringContext = React.createContext(false);
7637 var useIsRestoring = () => React.useContext(IsRestoringContext);
7638 var IsRestoringProvider = IsRestoringContext.Provider;
7639 // Annotate the CommonJS export names for ESM import in node:
7640 0 && (0);
7641 //# sourceMappingURL=isRestoring.cjs.map
7642
7643 /***/ }),
7644
7645 /***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
7646 /*!***************************************************************************!*\
7647 !*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
7648 \***************************************************************************/
7649 /***/ ((module) => {
7650
7651 "use strict";
7652
7653 var __defProp = Object.defineProperty;
7654 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7655 var __getOwnPropNames = Object.getOwnPropertyNames;
7656 var __hasOwnProp = Object.prototype.hasOwnProperty;
7657 var __export = (target, all) => {
7658 for (var name in all)
7659 __defProp(target, name, { get: all[name], enumerable: true });
7660 };
7661 var __copyProps = (to, from, except, desc) => {
7662 if (from && typeof from === "object" || typeof from === "function") {
7663 for (let key of __getOwnPropNames(from))
7664 if (!__hasOwnProp.call(to, key) && key !== except)
7665 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7666 }
7667 return to;
7668 };
7669 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7670
7671 // src/queryOptions.ts
7672 var queryOptions_exports = {};
7673 __export(queryOptions_exports, {
7674 queryOptions: () => queryOptions
7675 });
7676 module.exports = __toCommonJS(queryOptions_exports);
7677 function queryOptions(options) {
7678 return options;
7679 }
7680 // Annotate the CommonJS export names for ESM import in node:
7681 0 && (0);
7682 //# sourceMappingURL=queryOptions.cjs.map
7683
7684 /***/ }),
7685
7686 /***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
7687 /*!***********************************************************************!*\
7688 !*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
7689 \***********************************************************************/
7690 /***/ ((module) => {
7691
7692 "use strict";
7693
7694 var __defProp = Object.defineProperty;
7695 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7696 var __getOwnPropNames = Object.getOwnPropertyNames;
7697 var __hasOwnProp = Object.prototype.hasOwnProperty;
7698 var __export = (target, all) => {
7699 for (var name in all)
7700 __defProp(target, name, { get: all[name], enumerable: true });
7701 };
7702 var __copyProps = (to, from, except, desc) => {
7703 if (from && typeof from === "object" || typeof from === "function") {
7704 for (let key of __getOwnPropNames(from))
7705 if (!__hasOwnProp.call(to, key) && key !== except)
7706 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7707 }
7708 return to;
7709 };
7710 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7711
7712 // src/suspense.ts
7713 var suspense_exports = {};
7714 __export(suspense_exports, {
7715 defaultThrowOnError: () => defaultThrowOnError,
7716 ensureSuspenseTimers: () => ensureSuspenseTimers,
7717 fetchOptimistic: () => fetchOptimistic,
7718 shouldSuspend: () => shouldSuspend,
7719 willFetch: () => willFetch
7720 });
7721 module.exports = __toCommonJS(suspense_exports);
7722 var defaultThrowOnError = (_error, query) => query.state.data === void 0;
7723 var ensureSuspenseTimers = (defaultedOptions) => {
7724 if (defaultedOptions.suspense) {
7725 if (defaultedOptions.staleTime === void 0) {
7726 defaultedOptions.staleTime = 1e3;
7727 }
7728 if (typeof defaultedOptions.gcTime === "number") {
7729 defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
7730 }
7731 }
7732 };
7733 var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
7734 var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
7735 var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
7736 errorResetBoundary.clearReset();
7737 });
7738 // Annotate the CommonJS export names for ESM import in node:
7739 0 && (0);
7740 //# sourceMappingURL=suspense.cjs.map
7741
7742 /***/ }),
7743
7744 /***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
7745 /*!********************************************************************!*\
7746 !*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
7747 \********************************************************************/
7748 /***/ ((module) => {
7749
7750 "use strict";
7751
7752 var __defProp = Object.defineProperty;
7753 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7754 var __getOwnPropNames = Object.getOwnPropertyNames;
7755 var __hasOwnProp = Object.prototype.hasOwnProperty;
7756 var __copyProps = (to, from, except, desc) => {
7757 if (from && typeof from === "object" || typeof from === "function") {
7758 for (let key of __getOwnPropNames(from))
7759 if (!__hasOwnProp.call(to, key) && key !== except)
7760 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7761 }
7762 return to;
7763 };
7764 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7765
7766 // src/types.ts
7767 var types_exports = {};
7768 module.exports = __toCommonJS(types_exports);
7769 //# sourceMappingURL=types.cjs.map
7770
7771 /***/ }),
7772
7773 /***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
7774 /*!***************************************************************************!*\
7775 !*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
7776 \***************************************************************************/
7777 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7778
7779 "use strict";
7780
7781 "use client";
7782 var __create = Object.create;
7783 var __defProp = Object.defineProperty;
7784 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7785 var __getOwnPropNames = Object.getOwnPropertyNames;
7786 var __getProtoOf = Object.getPrototypeOf;
7787 var __hasOwnProp = Object.prototype.hasOwnProperty;
7788 var __export = (target, all) => {
7789 for (var name in all)
7790 __defProp(target, name, { get: all[name], enumerable: true });
7791 };
7792 var __copyProps = (to, from, except, desc) => {
7793 if (from && typeof from === "object" || typeof from === "function") {
7794 for (let key of __getOwnPropNames(from))
7795 if (!__hasOwnProp.call(to, key) && key !== except)
7796 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7797 }
7798 return to;
7799 };
7800 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7801 // If the importer is in node compatibility mode or this is not an ESM
7802 // file that has been converted to a CommonJS file using a Babel-
7803 // compatible transform (i.e. "__esModule" has not been set), then set
7804 // "default" to the CommonJS "module.exports" for node compatibility.
7805 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7806 mod
7807 ));
7808 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7809
7810 // src/useBaseQuery.ts
7811 var useBaseQuery_exports = {};
7812 __export(useBaseQuery_exports, {
7813 useBaseQuery: () => useBaseQuery
7814 });
7815 module.exports = __toCommonJS(useBaseQuery_exports);
7816 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7817 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7818 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7819 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
7820 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
7821 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
7822 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
7823 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
7824 function useBaseQuery(options, Observer, queryClient) {
7825 if (true) {
7826 if (typeof options !== "object" || Array.isArray(options)) {
7827 throw new Error(
7828 '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'
7829 );
7830 }
7831 }
7832 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7833 const isRestoring = (0, import_isRestoring.useIsRestoring)();
7834 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
7835 const defaultedOptions = client.defaultQueryOptions(options);
7836 client.getDefaultOptions().queries?._experimental_beforeQuery?.(
7837 defaultedOptions
7838 );
7839 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
7840 (0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
7841 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
7842 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
7843 const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
7844 const [observer] = React.useState(
7845 () => new Observer(
7846 client,
7847 defaultedOptions
7848 )
7849 );
7850 const result = observer.getOptimisticResult(defaultedOptions);
7851 React.useSyncExternalStore(
7852 React.useCallback(
7853 (onStoreChange) => {
7854 const unsubscribe = isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
7855 observer.updateResult();
7856 return unsubscribe;
7857 },
7858 [observer, isRestoring]
7859 ),
7860 () => observer.getCurrentResult(),
7861 () => observer.getCurrentResult()
7862 );
7863 React.useEffect(() => {
7864 observer.setOptions(defaultedOptions, { listeners: false });
7865 }, [defaultedOptions, observer]);
7866 if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
7867 throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
7868 }
7869 if ((0, import_errorBoundaryUtils.getHasError)({
7870 result,
7871 errorResetBoundary,
7872 throwOnError: defaultedOptions.throwOnError,
7873 query: client.getQueryCache().get(defaultedOptions.queryHash)
7874 })) {
7875 throw result.error;
7876 }
7877 ;
7878 client.getDefaultOptions().queries?._experimental_afterQuery?.(
7879 defaultedOptions,
7880 result
7881 );
7882 if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) {
7883 const promise = isNewCacheEntry ? (
7884 // Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
7885 (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
7886 ) : (
7887 // subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
7888 client.getQueryCache().get(defaultedOptions.queryHash)?.promise
7889 );
7890 promise?.catch(import_utils.noop).finally(() => {
7891 observer.updateResult();
7892 });
7893 }
7894 return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
7895 }
7896 // Annotate the CommonJS export names for ESM import in node:
7897 0 && (0);
7898 //# sourceMappingURL=useBaseQuery.cjs.map
7899
7900 /***/ }),
7901
7902 /***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
7903 /*!*******************************************************************************!*\
7904 !*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
7905 \*******************************************************************************/
7906 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7907
7908 "use strict";
7909
7910 "use client";
7911 var __defProp = Object.defineProperty;
7912 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7913 var __getOwnPropNames = Object.getOwnPropertyNames;
7914 var __hasOwnProp = Object.prototype.hasOwnProperty;
7915 var __export = (target, all) => {
7916 for (var name in all)
7917 __defProp(target, name, { get: all[name], enumerable: true });
7918 };
7919 var __copyProps = (to, from, except, desc) => {
7920 if (from && typeof from === "object" || typeof from === "function") {
7921 for (let key of __getOwnPropNames(from))
7922 if (!__hasOwnProp.call(to, key) && key !== except)
7923 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7924 }
7925 return to;
7926 };
7927 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7928
7929 // src/useInfiniteQuery.ts
7930 var useInfiniteQuery_exports = {};
7931 __export(useInfiniteQuery_exports, {
7932 useInfiniteQuery: () => useInfiniteQuery
7933 });
7934 module.exports = __toCommonJS(useInfiniteQuery_exports);
7935 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7936 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
7937 function useInfiniteQuery(options, queryClient) {
7938 return (0, import_useBaseQuery.useBaseQuery)(
7939 options,
7940 import_query_core.InfiniteQueryObserver,
7941 queryClient
7942 );
7943 }
7944 // Annotate the CommonJS export names for ESM import in node:
7945 0 && (0);
7946 //# sourceMappingURL=useInfiniteQuery.cjs.map
7947
7948 /***/ }),
7949
7950 /***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
7951 /*!****************************************************************************!*\
7952 !*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
7953 \****************************************************************************/
7954 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
7955
7956 "use strict";
7957
7958 "use client";
7959 var __create = Object.create;
7960 var __defProp = Object.defineProperty;
7961 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7962 var __getOwnPropNames = Object.getOwnPropertyNames;
7963 var __getProtoOf = Object.getPrototypeOf;
7964 var __hasOwnProp = Object.prototype.hasOwnProperty;
7965 var __export = (target, all) => {
7966 for (var name in all)
7967 __defProp(target, name, { get: all[name], enumerable: true });
7968 };
7969 var __copyProps = (to, from, except, desc) => {
7970 if (from && typeof from === "object" || typeof from === "function") {
7971 for (let key of __getOwnPropNames(from))
7972 if (!__hasOwnProp.call(to, key) && key !== except)
7973 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
7974 }
7975 return to;
7976 };
7977 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
7978 // If the importer is in node compatibility mode or this is not an ESM
7979 // file that has been converted to a CommonJS file using a Babel-
7980 // compatible transform (i.e. "__esModule" has not been set), then set
7981 // "default" to the CommonJS "module.exports" for node compatibility.
7982 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
7983 mod
7984 ));
7985 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
7986
7987 // src/useIsFetching.ts
7988 var useIsFetching_exports = {};
7989 __export(useIsFetching_exports, {
7990 useIsFetching: () => useIsFetching
7991 });
7992 module.exports = __toCommonJS(useIsFetching_exports);
7993 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
7994 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
7995 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
7996 function useIsFetching(filters, queryClient) {
7997 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
7998 const queryCache = client.getQueryCache();
7999 return React.useSyncExternalStore(
8000 React.useCallback(
8001 (onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8002 [queryCache]
8003 ),
8004 () => client.isFetching(filters),
8005 () => client.isFetching(filters)
8006 );
8007 }
8008 // Annotate the CommonJS export names for ESM import in node:
8009 0 && (0);
8010 //# sourceMappingURL=useIsFetching.cjs.map
8011
8012 /***/ }),
8013
8014 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
8015 /*!**************************************************************************!*\
8016 !*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
8017 \**************************************************************************/
8018 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8019
8020 "use strict";
8021
8022 "use client";
8023 var __create = Object.create;
8024 var __defProp = Object.defineProperty;
8025 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8026 var __getOwnPropNames = Object.getOwnPropertyNames;
8027 var __getProtoOf = Object.getPrototypeOf;
8028 var __hasOwnProp = Object.prototype.hasOwnProperty;
8029 var __export = (target, all) => {
8030 for (var name in all)
8031 __defProp(target, name, { get: all[name], enumerable: true });
8032 };
8033 var __copyProps = (to, from, except, desc) => {
8034 if (from && typeof from === "object" || typeof from === "function") {
8035 for (let key of __getOwnPropNames(from))
8036 if (!__hasOwnProp.call(to, key) && key !== except)
8037 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8038 }
8039 return to;
8040 };
8041 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8042 // If the importer is in node compatibility mode or this is not an ESM
8043 // file that has been converted to a CommonJS file using a Babel-
8044 // compatible transform (i.e. "__esModule" has not been set), then set
8045 // "default" to the CommonJS "module.exports" for node compatibility.
8046 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8047 mod
8048 ));
8049 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8050
8051 // src/useMutation.ts
8052 var useMutation_exports = {};
8053 __export(useMutation_exports, {
8054 useMutation: () => useMutation
8055 });
8056 module.exports = __toCommonJS(useMutation_exports);
8057 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8058 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8059 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8060 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
8061 function useMutation(options, queryClient) {
8062 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8063 const [observer] = React.useState(
8064 () => new import_query_core.MutationObserver(
8065 client,
8066 options
8067 )
8068 );
8069 React.useEffect(() => {
8070 observer.setOptions(options);
8071 }, [observer, options]);
8072 const result = React.useSyncExternalStore(
8073 React.useCallback(
8074 (onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8075 [observer]
8076 ),
8077 () => observer.getCurrentResult(),
8078 () => observer.getCurrentResult()
8079 );
8080 const mutate = React.useCallback(
8081 (variables, mutateOptions) => {
8082 observer.mutate(variables, mutateOptions).catch(import_utils.noop);
8083 },
8084 [observer]
8085 );
8086 if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
8087 throw result.error;
8088 }
8089 return { ...result, mutate, mutateAsync: result.mutate };
8090 }
8091 // Annotate the CommonJS export names for ESM import in node:
8092 0 && (0);
8093 //# sourceMappingURL=useMutation.cjs.map
8094
8095 /***/ }),
8096
8097 /***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
8098 /*!*******************************************************************************!*\
8099 !*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
8100 \*******************************************************************************/
8101 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8102
8103 "use strict";
8104
8105 "use client";
8106 var __create = Object.create;
8107 var __defProp = Object.defineProperty;
8108 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8109 var __getOwnPropNames = Object.getOwnPropertyNames;
8110 var __getProtoOf = Object.getPrototypeOf;
8111 var __hasOwnProp = Object.prototype.hasOwnProperty;
8112 var __export = (target, all) => {
8113 for (var name in all)
8114 __defProp(target, name, { get: all[name], enumerable: true });
8115 };
8116 var __copyProps = (to, from, except, desc) => {
8117 if (from && typeof from === "object" || typeof from === "function") {
8118 for (let key of __getOwnPropNames(from))
8119 if (!__hasOwnProp.call(to, key) && key !== except)
8120 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8121 }
8122 return to;
8123 };
8124 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8125 // If the importer is in node compatibility mode or this is not an ESM
8126 // file that has been converted to a CommonJS file using a Babel-
8127 // compatible transform (i.e. "__esModule" has not been set), then set
8128 // "default" to the CommonJS "module.exports" for node compatibility.
8129 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8130 mod
8131 ));
8132 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8133
8134 // src/useMutationState.ts
8135 var useMutationState_exports = {};
8136 __export(useMutationState_exports, {
8137 useIsMutating: () => useIsMutating,
8138 useMutationState: () => useMutationState
8139 });
8140 module.exports = __toCommonJS(useMutationState_exports);
8141 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8142 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8143 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8144 function useIsMutating(filters, queryClient) {
8145 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8146 return useMutationState(
8147 { filters: { ...filters, status: "pending" } },
8148 client
8149 ).length;
8150 }
8151 function getResult(mutationCache, options) {
8152 return mutationCache.findAll(options.filters).map(
8153 (mutation) => options.select ? options.select(mutation) : mutation.state
8154 );
8155 }
8156 function useMutationState(options = {}, queryClient) {
8157 const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
8158 const optionsRef = React.useRef(options);
8159 const result = React.useRef(null);
8160 if (!result.current) {
8161 result.current = getResult(mutationCache, options);
8162 }
8163 React.useEffect(() => {
8164 optionsRef.current = options;
8165 });
8166 return React.useSyncExternalStore(
8167 React.useCallback(
8168 (onStoreChange) => mutationCache.subscribe(() => {
8169 const nextResult = (0, import_query_core.replaceEqualDeep)(
8170 result.current,
8171 getResult(mutationCache, optionsRef.current)
8172 );
8173 if (result.current !== nextResult) {
8174 result.current = nextResult;
8175 import_query_core.notifyManager.schedule(onStoreChange);
8176 }
8177 }),
8178 [mutationCache]
8179 ),
8180 () => result.current,
8181 () => result.current
8182 );
8183 }
8184 // Annotate the CommonJS export names for ESM import in node:
8185 0 && (0);
8186 //# sourceMappingURL=useMutationState.cjs.map
8187
8188 /***/ }),
8189
8190 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs":
8191 /*!***************************************************************************************!*\
8192 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs ***!
8193 \***************************************************************************************/
8194 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8195
8196 "use strict";
8197
8198 var __defProp = Object.defineProperty;
8199 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8200 var __getOwnPropNames = Object.getOwnPropertyNames;
8201 var __hasOwnProp = Object.prototype.hasOwnProperty;
8202 var __export = (target, all) => {
8203 for (var name in all)
8204 __defProp(target, name, { get: all[name], enumerable: true });
8205 };
8206 var __copyProps = (to, from, except, desc) => {
8207 if (from && typeof from === "object" || typeof from === "function") {
8208 for (let key of __getOwnPropNames(from))
8209 if (!__hasOwnProp.call(to, key) && key !== except)
8210 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8211 }
8212 return to;
8213 };
8214 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8215
8216 // src/usePrefetchInfiniteQuery.tsx
8217 var usePrefetchInfiniteQuery_exports = {};
8218 __export(usePrefetchInfiniteQuery_exports, {
8219 usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery
8220 });
8221 module.exports = __toCommonJS(usePrefetchInfiniteQuery_exports);
8222 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8223 function usePrefetchInfiniteQuery(options, queryClient) {
8224 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8225 if (!client.getQueryState(options.queryKey)) {
8226 client.prefetchInfiniteQuery(options);
8227 }
8228 }
8229 // Annotate the CommonJS export names for ESM import in node:
8230 0 && (0);
8231 //# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map
8232
8233 /***/ }),
8234
8235 /***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs":
8236 /*!*******************************************************************************!*\
8237 !*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs ***!
8238 \*******************************************************************************/
8239 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8240
8241 "use strict";
8242
8243 var __defProp = Object.defineProperty;
8244 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8245 var __getOwnPropNames = Object.getOwnPropertyNames;
8246 var __hasOwnProp = Object.prototype.hasOwnProperty;
8247 var __export = (target, all) => {
8248 for (var name in all)
8249 __defProp(target, name, { get: all[name], enumerable: true });
8250 };
8251 var __copyProps = (to, from, except, desc) => {
8252 if (from && typeof from === "object" || typeof from === "function") {
8253 for (let key of __getOwnPropNames(from))
8254 if (!__hasOwnProp.call(to, key) && key !== except)
8255 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8256 }
8257 return to;
8258 };
8259 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8260
8261 // src/usePrefetchQuery.tsx
8262 var usePrefetchQuery_exports = {};
8263 __export(usePrefetchQuery_exports, {
8264 usePrefetchQuery: () => usePrefetchQuery
8265 });
8266 module.exports = __toCommonJS(usePrefetchQuery_exports);
8267 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8268 function usePrefetchQuery(options, queryClient) {
8269 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8270 if (!client.getQueryState(options.queryKey)) {
8271 client.prefetchQuery(options);
8272 }
8273 }
8274 // Annotate the CommonJS export names for ESM import in node:
8275 0 && (0);
8276 //# sourceMappingURL=usePrefetchQuery.cjs.map
8277
8278 /***/ }),
8279
8280 /***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
8281 /*!*************************************************************************!*\
8282 !*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
8283 \*************************************************************************/
8284 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8285
8286 "use strict";
8287
8288 "use client";
8289 var __create = Object.create;
8290 var __defProp = Object.defineProperty;
8291 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8292 var __getOwnPropNames = Object.getOwnPropertyNames;
8293 var __getProtoOf = Object.getPrototypeOf;
8294 var __hasOwnProp = Object.prototype.hasOwnProperty;
8295 var __export = (target, all) => {
8296 for (var name in all)
8297 __defProp(target, name, { get: all[name], enumerable: true });
8298 };
8299 var __copyProps = (to, from, except, desc) => {
8300 if (from && typeof from === "object" || typeof from === "function") {
8301 for (let key of __getOwnPropNames(from))
8302 if (!__hasOwnProp.call(to, key) && key !== except)
8303 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8304 }
8305 return to;
8306 };
8307 var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
8308 // If the importer is in node compatibility mode or this is not an ESM
8309 // file that has been converted to a CommonJS file using a Babel-
8310 // compatible transform (i.e. "__esModule" has not been set), then set
8311 // "default" to the CommonJS "module.exports" for node compatibility.
8312 isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
8313 mod
8314 ));
8315 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8316
8317 // src/useQueries.ts
8318 var useQueries_exports = {};
8319 __export(useQueries_exports, {
8320 useQueries: () => useQueries
8321 });
8322 module.exports = __toCommonJS(useQueries_exports);
8323 var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
8324 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8325 var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
8326 var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
8327 var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
8328 var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
8329 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8330 var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
8331 function useQueries({
8332 queries,
8333 ...options
8334 }, queryClient) {
8335 const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
8336 const isRestoring = (0, import_isRestoring.useIsRestoring)();
8337 const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
8338 const defaultedQueries = React.useMemo(
8339 () => queries.map((opts) => {
8340 const defaultedOptions = client.defaultQueryOptions(
8341 opts
8342 );
8343 defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
8344 return defaultedOptions;
8345 }),
8346 [queries, client, isRestoring]
8347 );
8348 defaultedQueries.forEach((query) => {
8349 (0, import_suspense.ensureSuspenseTimers)(query);
8350 (0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
8351 });
8352 (0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
8353 const [observer] = React.useState(
8354 () => new import_query_core.QueriesObserver(
8355 client,
8356 defaultedQueries,
8357 options
8358 )
8359 );
8360 const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(
8361 defaultedQueries,
8362 options.combine
8363 );
8364 React.useSyncExternalStore(
8365 React.useCallback(
8366 (onStoreChange) => isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
8367 [observer, isRestoring]
8368 ),
8369 () => observer.getCurrentResult(),
8370 () => observer.getCurrentResult()
8371 );
8372 React.useEffect(() => {
8373 observer.setQueries(
8374 defaultedQueries,
8375 options,
8376 {
8377 listeners: false
8378 }
8379 );
8380 }, [defaultedQueries, options, observer]);
8381 const shouldAtLeastOneSuspend = optimisticResult.some(
8382 (result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result)
8383 );
8384 const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
8385 const opts = defaultedQueries[index];
8386 if (opts) {
8387 const queryObserver = new import_query_core.QueryObserver(client, opts);
8388 if ((0, import_suspense.shouldSuspend)(opts, result)) {
8389 return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8390 } else if ((0, import_suspense.willFetch)(result, isRestoring)) {
8391 void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
8392 }
8393 }
8394 return [];
8395 }) : [];
8396 if (suspensePromises.length > 0) {
8397 throw Promise.all(suspensePromises);
8398 }
8399 const firstSingleResultWhichShouldThrow = optimisticResult.find(
8400 (result, index) => {
8401 const query = defaultedQueries[index];
8402 return query && (0, import_errorBoundaryUtils.getHasError)({
8403 result,
8404 errorResetBoundary,
8405 throwOnError: query.throwOnError,
8406 query: client.getQueryCache().get(query.queryHash)
8407 });
8408 }
8409 );
8410 if (firstSingleResultWhichShouldThrow?.error) {
8411 throw firstSingleResultWhichShouldThrow.error;
8412 }
8413 return getCombinedResult(trackResult());
8414 }
8415 // Annotate the CommonJS export names for ESM import in node:
8416 0 && (0);
8417 //# sourceMappingURL=useQueries.cjs.map
8418
8419 /***/ }),
8420
8421 /***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
8422 /*!***********************************************************************!*\
8423 !*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
8424 \***********************************************************************/
8425 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8426
8427 "use strict";
8428
8429 "use client";
8430 var __defProp = Object.defineProperty;
8431 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8432 var __getOwnPropNames = Object.getOwnPropertyNames;
8433 var __hasOwnProp = Object.prototype.hasOwnProperty;
8434 var __export = (target, all) => {
8435 for (var name in all)
8436 __defProp(target, name, { get: all[name], enumerable: true });
8437 };
8438 var __copyProps = (to, from, except, desc) => {
8439 if (from && typeof from === "object" || typeof from === "function") {
8440 for (let key of __getOwnPropNames(from))
8441 if (!__hasOwnProp.call(to, key) && key !== except)
8442 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8443 }
8444 return to;
8445 };
8446 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8447
8448 // src/useQuery.ts
8449 var useQuery_exports = {};
8450 __export(useQuery_exports, {
8451 useQuery: () => useQuery
8452 });
8453 module.exports = __toCommonJS(useQuery_exports);
8454 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8455 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8456 function useQuery(options, queryClient) {
8457 return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
8458 }
8459 // Annotate the CommonJS export names for ESM import in node:
8460 0 && (0);
8461 //# sourceMappingURL=useQuery.cjs.map
8462
8463 /***/ }),
8464
8465 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
8466 /*!***************************************************************************************!*\
8467 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
8468 \***************************************************************************************/
8469 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8470
8471 "use strict";
8472
8473 "use client";
8474 var __defProp = Object.defineProperty;
8475 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8476 var __getOwnPropNames = Object.getOwnPropertyNames;
8477 var __hasOwnProp = Object.prototype.hasOwnProperty;
8478 var __export = (target, all) => {
8479 for (var name in all)
8480 __defProp(target, name, { get: all[name], enumerable: true });
8481 };
8482 var __copyProps = (to, from, except, desc) => {
8483 if (from && typeof from === "object" || typeof from === "function") {
8484 for (let key of __getOwnPropNames(from))
8485 if (!__hasOwnProp.call(to, key) && key !== except)
8486 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8487 }
8488 return to;
8489 };
8490 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8491
8492 // src/useSuspenseInfiniteQuery.ts
8493 var useSuspenseInfiniteQuery_exports = {};
8494 __export(useSuspenseInfiniteQuery_exports, {
8495 useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
8496 });
8497 module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
8498 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8499 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8500 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8501 function useSuspenseInfiniteQuery(options, queryClient) {
8502 if (true) {
8503 if (options.queryFn === import_query_core.skipToken) {
8504 console.error("skipToken is not allowed for useSuspenseInfiniteQuery");
8505 }
8506 }
8507 return (0, import_useBaseQuery.useBaseQuery)(
8508 {
8509 ...options,
8510 enabled: true,
8511 suspense: true,
8512 throwOnError: import_suspense.defaultThrowOnError
8513 },
8514 import_query_core.InfiniteQueryObserver,
8515 queryClient
8516 );
8517 }
8518 // Annotate the CommonJS export names for ESM import in node:
8519 0 && (0);
8520 //# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
8521
8522 /***/ }),
8523
8524 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
8525 /*!*********************************************************************************!*\
8526 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
8527 \*********************************************************************************/
8528 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8529
8530 "use strict";
8531
8532 "use client";
8533 var __defProp = Object.defineProperty;
8534 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8535 var __getOwnPropNames = Object.getOwnPropertyNames;
8536 var __hasOwnProp = Object.prototype.hasOwnProperty;
8537 var __export = (target, all) => {
8538 for (var name in all)
8539 __defProp(target, name, { get: all[name], enumerable: true });
8540 };
8541 var __copyProps = (to, from, except, desc) => {
8542 if (from && typeof from === "object" || typeof from === "function") {
8543 for (let key of __getOwnPropNames(from))
8544 if (!__hasOwnProp.call(to, key) && key !== except)
8545 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8546 }
8547 return to;
8548 };
8549 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8550
8551 // src/useSuspenseQueries.ts
8552 var useSuspenseQueries_exports = {};
8553 __export(useSuspenseQueries_exports, {
8554 useSuspenseQueries: () => useSuspenseQueries
8555 });
8556 module.exports = __toCommonJS(useSuspenseQueries_exports);
8557 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8558 var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
8559 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8560 function useSuspenseQueries(options, queryClient) {
8561 return (0, import_useQueries.useQueries)(
8562 {
8563 ...options,
8564 queries: options.queries.map((query) => {
8565 if (true) {
8566 if (query.queryFn === import_query_core.skipToken) {
8567 console.error("skipToken is not allowed for useSuspenseQueries");
8568 }
8569 }
8570 return {
8571 ...query,
8572 suspense: true,
8573 throwOnError: import_suspense.defaultThrowOnError,
8574 enabled: true,
8575 placeholderData: void 0
8576 };
8577 })
8578 },
8579 queryClient
8580 );
8581 }
8582 // Annotate the CommonJS export names for ESM import in node:
8583 0 && (0);
8584 //# sourceMappingURL=useSuspenseQueries.cjs.map
8585
8586 /***/ }),
8587
8588 /***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
8589 /*!*******************************************************************************!*\
8590 !*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
8591 \*******************************************************************************/
8592 /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
8593
8594 "use strict";
8595
8596 "use client";
8597 var __defProp = Object.defineProperty;
8598 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8599 var __getOwnPropNames = Object.getOwnPropertyNames;
8600 var __hasOwnProp = Object.prototype.hasOwnProperty;
8601 var __export = (target, all) => {
8602 for (var name in all)
8603 __defProp(target, name, { get: all[name], enumerable: true });
8604 };
8605 var __copyProps = (to, from, except, desc) => {
8606 if (from && typeof from === "object" || typeof from === "function") {
8607 for (let key of __getOwnPropNames(from))
8608 if (!__hasOwnProp.call(to, key) && key !== except)
8609 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8610 }
8611 return to;
8612 };
8613 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8614
8615 // src/useSuspenseQuery.ts
8616 var useSuspenseQuery_exports = {};
8617 __export(useSuspenseQuery_exports, {
8618 useSuspenseQuery: () => useSuspenseQuery
8619 });
8620 module.exports = __toCommonJS(useSuspenseQuery_exports);
8621 var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
8622 var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
8623 var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
8624 function useSuspenseQuery(options, queryClient) {
8625 if (true) {
8626 if (options.queryFn === import_query_core.skipToken) {
8627 console.error("skipToken is not allowed for useSuspenseQuery");
8628 }
8629 }
8630 return (0, import_useBaseQuery.useBaseQuery)(
8631 {
8632 ...options,
8633 enabled: true,
8634 suspense: true,
8635 throwOnError: import_suspense.defaultThrowOnError,
8636 placeholderData: void 0
8637 },
8638 import_query_core.QueryObserver,
8639 queryClient
8640 );
8641 }
8642 // Annotate the CommonJS export names for ESM import in node:
8643 0 && (0);
8644 //# sourceMappingURL=useSuspenseQuery.cjs.map
8645
8646 /***/ }),
8647
8648 /***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
8649 /*!********************************************************************!*\
8650 !*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
8651 \********************************************************************/
8652 /***/ ((module) => {
8653
8654 "use strict";
8655
8656 var __defProp = Object.defineProperty;
8657 var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8658 var __getOwnPropNames = Object.getOwnPropertyNames;
8659 var __hasOwnProp = Object.prototype.hasOwnProperty;
8660 var __export = (target, all) => {
8661 for (var name in all)
8662 __defProp(target, name, { get: all[name], enumerable: true });
8663 };
8664 var __copyProps = (to, from, except, desc) => {
8665 if (from && typeof from === "object" || typeof from === "function") {
8666 for (let key of __getOwnPropNames(from))
8667 if (!__hasOwnProp.call(to, key) && key !== except)
8668 __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
8669 }
8670 return to;
8671 };
8672 var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
8673
8674 // src/utils.ts
8675 var utils_exports = {};
8676 __export(utils_exports, {
8677 noop: () => noop,
8678 shouldThrowError: () => shouldThrowError
8679 });
8680 module.exports = __toCommonJS(utils_exports);
8681 function shouldThrowError(throwError, params) {
8682 if (typeof throwError === "function") {
8683 return throwError(...params);
8684 }
8685 return !!throwError;
8686 }
8687 function noop() {
8688 }
8689 // Annotate the CommonJS export names for ESM import in node:
8690 0 && (0);
8691 //# sourceMappingURL=utils.cjs.map
8692
8693 /***/ })
8694
8695 /******/ });
8696 /************************************************************************/
8697 /******/ // The module cache
8698 /******/ var __webpack_module_cache__ = {};
8699 /******/
8700 /******/ // The require function
8701 /******/ function __webpack_require__(moduleId) {
8702 /******/ // Check if module is in cache
8703 /******/ var cachedModule = __webpack_module_cache__[moduleId];
8704 /******/ if (cachedModule !== undefined) {
8705 /******/ return cachedModule.exports;
8706 /******/ }
8707 /******/ // Create a new module (and put it into the cache)
8708 /******/ var module = __webpack_module_cache__[moduleId] = {
8709 /******/ // no module.id needed
8710 /******/ // no module.loaded needed
8711 /******/ exports: {}
8712 /******/ };
8713 /******/
8714 /******/ // Execute the module function
8715 /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
8716 /******/
8717 /******/ // Return the exports of the module
8718 /******/ return module.exports;
8719 /******/ }
8720 /******/
8721 /************************************************************************/
8722 var __webpack_exports__ = {};
8723 // This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
8724 (() => {
8725 "use strict";
8726 /*!****************************************************!*\
8727 !*** ../modules/notifications/assets/js/editor.js ***!
8728 \****************************************************/
8729
8730
8731 var _editorV = __webpack_require__(/*! ./components/editor-v1 */ "../modules/notifications/assets/js/components/editor-v1.js");
8732 var _editorAppBarLink = __webpack_require__(/*! ./components/editor-app-bar-link */ "../modules/notifications/assets/js/components/editor-app-bar-link.js");
8733 var _window;
8734 if ((_window = window) !== null && _window !== void 0 && (_window = _window.elementorV2) !== null && _window !== void 0 && _window.editorAppBar) {
8735 (0, _editorAppBarLink.editorAppBarLink)();
8736 } else {
8737 (0, _editorV.editorV1)();
8738 }
8739 })();
8740
8741 /******/ })()
8742 ;
8743 //# sourceMappingURL=editor-notifications.js.map