PluginProbe
Elementor Website Builder – more than just a page builder / 3.26.3
Elementor Website Builder – more than just a page builder v3.26.3
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 4.1.0-dev1 All 452 releases
elementor / assets / js / admin-notifications.js

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

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