2993 lines
107 KiB
JavaScript
2993 lines
107 KiB
JavaScript
|
/******/ (function() { // webpackBootstrap
|
||
|
/******/ "use strict";
|
||
|
/******/ var __webpack_modules__ = ({
|
||
|
|
||
|
/***/ "react":
|
||
|
/*!**************************!*\
|
||
|
!*** external ["React"] ***!
|
||
|
\**************************/
|
||
|
/***/ (function(module) {
|
||
|
|
||
|
module.exports = window["React"];
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/focusManager.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/focusManager.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ FocusManager: function() { return /* binding */ FocusManager; },
|
||
|
/* harmony export */ focusManager: function() { return /* binding */ focusManager; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/focusManager.ts
|
||
|
|
||
|
|
||
|
var FocusManager = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
#focused;
|
||
|
#cleanup;
|
||
|
#setup;
|
||
|
constructor() {
|
||
|
super();
|
||
|
this.#setup = (onFocus) => {
|
||
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer && window.addEventListener) {
|
||
|
const listener = () => onFocus();
|
||
|
window.addEventListener("visibilitychange", listener, false);
|
||
|
return () => {
|
||
|
window.removeEventListener("visibilitychange", listener);
|
||
|
};
|
||
|
}
|
||
|
return;
|
||
|
};
|
||
|
}
|
||
|
onSubscribe() {
|
||
|
if (!this.#cleanup) {
|
||
|
this.setEventListener(this.#setup);
|
||
|
}
|
||
|
}
|
||
|
onUnsubscribe() {
|
||
|
if (!this.hasListeners()) {
|
||
|
this.#cleanup?.();
|
||
|
this.#cleanup = void 0;
|
||
|
}
|
||
|
}
|
||
|
setEventListener(setup) {
|
||
|
this.#setup = setup;
|
||
|
this.#cleanup?.();
|
||
|
this.#cleanup = setup((focused) => {
|
||
|
if (typeof focused === "boolean") {
|
||
|
this.setFocused(focused);
|
||
|
} else {
|
||
|
this.onFocus();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
setFocused(focused) {
|
||
|
const changed = this.#focused !== focused;
|
||
|
if (changed) {
|
||
|
this.#focused = focused;
|
||
|
this.onFocus();
|
||
|
}
|
||
|
}
|
||
|
onFocus() {
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener();
|
||
|
});
|
||
|
}
|
||
|
isFocused() {
|
||
|
if (typeof this.#focused === "boolean") {
|
||
|
return this.#focused;
|
||
|
}
|
||
|
return globalThis.document?.visibilityState !== "hidden";
|
||
|
}
|
||
|
};
|
||
|
var focusManager = new FocusManager();
|
||
|
|
||
|
//# sourceMappingURL=focusManager.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js":
|
||
|
/*!*********************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js ***!
|
||
|
\*********************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ hasNextPage: function() { return /* binding */ hasNextPage; },
|
||
|
/* harmony export */ hasPreviousPage: function() { return /* binding */ hasPreviousPage; },
|
||
|
/* harmony export */ infiniteQueryBehavior: function() { return /* binding */ infiniteQueryBehavior; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/infiniteQueryBehavior.ts
|
||
|
|
||
|
function infiniteQueryBehavior(pages) {
|
||
|
return {
|
||
|
onFetch: (context, query) => {
|
||
|
const fetchFn = async () => {
|
||
|
const options = context.options;
|
||
|
const direction = context.fetchOptions?.meta?.fetchMore?.direction;
|
||
|
const oldPages = context.state.data?.pages || [];
|
||
|
const oldPageParams = context.state.data?.pageParams || [];
|
||
|
const empty = { pages: [], pageParams: [] };
|
||
|
let cancelled = false;
|
||
|
const addSignalProperty = (object) => {
|
||
|
Object.defineProperty(object, "signal", {
|
||
|
enumerable: true,
|
||
|
get: () => {
|
||
|
if (context.signal.aborted) {
|
||
|
cancelled = true;
|
||
|
} else {
|
||
|
context.signal.addEventListener("abort", () => {
|
||
|
cancelled = true;
|
||
|
});
|
||
|
}
|
||
|
return context.signal;
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
const queryFn = context.options.queryFn || (() => Promise.reject(
|
||
|
new Error(`Missing queryFn: '${context.options.queryHash}'`)
|
||
|
));
|
||
|
const fetchPage = async (data, param, previous) => {
|
||
|
if (cancelled) {
|
||
|
return Promise.reject();
|
||
|
}
|
||
|
if (param == null && data.pages.length) {
|
||
|
return Promise.resolve(data);
|
||
|
}
|
||
|
const queryFnContext = {
|
||
|
queryKey: context.queryKey,
|
||
|
pageParam: param,
|
||
|
direction: previous ? "backward" : "forward",
|
||
|
meta: context.options.meta
|
||
|
};
|
||
|
addSignalProperty(queryFnContext);
|
||
|
const page = await queryFn(
|
||
|
queryFnContext
|
||
|
);
|
||
|
const { maxPages } = context.options;
|
||
|
const addTo = previous ? _utils_js__WEBPACK_IMPORTED_MODULE_0__.addToStart : _utils_js__WEBPACK_IMPORTED_MODULE_0__.addToEnd;
|
||
|
return {
|
||
|
pages: addTo(data.pages, page, maxPages),
|
||
|
pageParams: addTo(data.pageParams, param, maxPages)
|
||
|
};
|
||
|
};
|
||
|
let result;
|
||
|
if (direction && oldPages.length) {
|
||
|
const previous = direction === "backward";
|
||
|
const pageParamFn = previous ? getPreviousPageParam : getNextPageParam;
|
||
|
const oldData = {
|
||
|
pages: oldPages,
|
||
|
pageParams: oldPageParams
|
||
|
};
|
||
|
const param = pageParamFn(options, oldData);
|
||
|
result = await fetchPage(oldData, param, previous);
|
||
|
} else {
|
||
|
result = await fetchPage(
|
||
|
empty,
|
||
|
oldPageParams[0] ?? options.initialPageParam
|
||
|
);
|
||
|
const remainingPages = pages ?? oldPages.length;
|
||
|
for (let i = 1; i < remainingPages; i++) {
|
||
|
const param = getNextPageParam(options, result);
|
||
|
result = await fetchPage(result, param);
|
||
|
}
|
||
|
}
|
||
|
return result;
|
||
|
};
|
||
|
if (context.options.persister) {
|
||
|
context.fetchFn = () => {
|
||
|
return context.options.persister?.(
|
||
|
fetchFn,
|
||
|
{
|
||
|
queryKey: context.queryKey,
|
||
|
meta: context.options.meta,
|
||
|
signal: context.signal
|
||
|
},
|
||
|
query
|
||
|
);
|
||
|
};
|
||
|
} else {
|
||
|
context.fetchFn = fetchFn;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
function getNextPageParam(options, { pages, pageParams }) {
|
||
|
const lastIndex = pages.length - 1;
|
||
|
return options.getNextPageParam(
|
||
|
pages[lastIndex],
|
||
|
pages,
|
||
|
pageParams[lastIndex],
|
||
|
pageParams
|
||
|
);
|
||
|
}
|
||
|
function getPreviousPageParam(options, { pages, pageParams }) {
|
||
|
return options.getPreviousPageParam?.(
|
||
|
pages[0],
|
||
|
pages,
|
||
|
pageParams[0],
|
||
|
pageParams
|
||
|
);
|
||
|
}
|
||
|
function hasNextPage(options, data) {
|
||
|
if (!data)
|
||
|
return false;
|
||
|
return getNextPageParam(options, data) != null;
|
||
|
}
|
||
|
function hasPreviousPage(options, data) {
|
||
|
if (!data || !options.getPreviousPageParam)
|
||
|
return false;
|
||
|
return getPreviousPageParam(options, data) != null;
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=infiniteQueryBehavior.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/mutation.js":
|
||
|
/*!********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/mutation.js ***!
|
||
|
\********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Mutation: function() { return /* binding */ Mutation; },
|
||
|
/* harmony export */ getDefaultState: function() { return /* binding */ getDefaultState; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _removable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./removable.js */ "./node_modules/@tanstack/query-core/build/modern/removable.js");
|
||
|
/* harmony import */ var _retryer_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./retryer.js */ "./node_modules/@tanstack/query-core/build/modern/retryer.js");
|
||
|
// src/mutation.ts
|
||
|
|
||
|
|
||
|
|
||
|
var Mutation = class extends _removable_js__WEBPACK_IMPORTED_MODULE_0__.Removable {
|
||
|
constructor(config) {
|
||
|
super();
|
||
|
this.mutationId = config.mutationId;
|
||
|
this.#defaultOptions = config.defaultOptions;
|
||
|
this.#mutationCache = config.mutationCache;
|
||
|
this.#observers = [];
|
||
|
this.state = config.state || getDefaultState();
|
||
|
this.setOptions(config.options);
|
||
|
this.scheduleGc();
|
||
|
}
|
||
|
#observers;
|
||
|
#defaultOptions;
|
||
|
#mutationCache;
|
||
|
#retryer;
|
||
|
setOptions(options) {
|
||
|
this.options = { ...this.#defaultOptions, ...options };
|
||
|
this.updateGcTime(this.options.gcTime);
|
||
|
}
|
||
|
get meta() {
|
||
|
return this.options.meta;
|
||
|
}
|
||
|
addObserver(observer) {
|
||
|
if (!this.#observers.includes(observer)) {
|
||
|
this.#observers.push(observer);
|
||
|
this.clearGcTimeout();
|
||
|
this.#mutationCache.notify({
|
||
|
type: "observerAdded",
|
||
|
mutation: this,
|
||
|
observer
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
removeObserver(observer) {
|
||
|
this.#observers = this.#observers.filter((x) => x !== observer);
|
||
|
this.scheduleGc();
|
||
|
this.#mutationCache.notify({
|
||
|
type: "observerRemoved",
|
||
|
mutation: this,
|
||
|
observer
|
||
|
});
|
||
|
}
|
||
|
optionalRemove() {
|
||
|
if (!this.#observers.length) {
|
||
|
if (this.state.status === "pending") {
|
||
|
this.scheduleGc();
|
||
|
} else {
|
||
|
this.#mutationCache.remove(this);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
continue() {
|
||
|
return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before
|
||
|
this.execute(this.state.variables);
|
||
|
}
|
||
|
async execute(variables) {
|
||
|
const executeMutation = () => {
|
||
|
this.#retryer = (0,_retryer_js__WEBPACK_IMPORTED_MODULE_1__.createRetryer)({
|
||
|
fn: () => {
|
||
|
if (!this.options.mutationFn) {
|
||
|
return Promise.reject(new Error("No mutationFn found"));
|
||
|
}
|
||
|
return this.options.mutationFn(variables);
|
||
|
},
|
||
|
onFail: (failureCount, error) => {
|
||
|
this.#dispatch({ type: "failed", failureCount, error });
|
||
|
},
|
||
|
onPause: () => {
|
||
|
this.#dispatch({ type: "pause" });
|
||
|
},
|
||
|
onContinue: () => {
|
||
|
this.#dispatch({ type: "continue" });
|
||
|
},
|
||
|
retry: this.options.retry ?? 0,
|
||
|
retryDelay: this.options.retryDelay,
|
||
|
networkMode: this.options.networkMode
|
||
|
});
|
||
|
return this.#retryer.promise;
|
||
|
};
|
||
|
const restored = this.state.status === "pending";
|
||
|
try {
|
||
|
if (!restored) {
|
||
|
this.#dispatch({ type: "pending", variables });
|
||
|
await this.#mutationCache.config.onMutate?.(
|
||
|
variables,
|
||
|
this
|
||
|
);
|
||
|
const context = await this.options.onMutate?.(variables);
|
||
|
if (context !== this.state.context) {
|
||
|
this.#dispatch({
|
||
|
type: "pending",
|
||
|
context,
|
||
|
variables
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
const data = await executeMutation();
|
||
|
await this.#mutationCache.config.onSuccess?.(
|
||
|
data,
|
||
|
variables,
|
||
|
this.state.context,
|
||
|
this
|
||
|
);
|
||
|
await this.options.onSuccess?.(data, variables, this.state.context);
|
||
|
await this.#mutationCache.config.onSettled?.(
|
||
|
data,
|
||
|
null,
|
||
|
this.state.variables,
|
||
|
this.state.context,
|
||
|
this
|
||
|
);
|
||
|
await this.options.onSettled?.(data, null, variables, this.state.context);
|
||
|
this.#dispatch({ type: "success", data });
|
||
|
return data;
|
||
|
} catch (error) {
|
||
|
try {
|
||
|
await this.#mutationCache.config.onError?.(
|
||
|
error,
|
||
|
variables,
|
||
|
this.state.context,
|
||
|
this
|
||
|
);
|
||
|
await this.options.onError?.(
|
||
|
error,
|
||
|
variables,
|
||
|
this.state.context
|
||
|
);
|
||
|
await this.#mutationCache.config.onSettled?.(
|
||
|
void 0,
|
||
|
error,
|
||
|
this.state.variables,
|
||
|
this.state.context,
|
||
|
this
|
||
|
);
|
||
|
await this.options.onSettled?.(
|
||
|
void 0,
|
||
|
error,
|
||
|
variables,
|
||
|
this.state.context
|
||
|
);
|
||
|
throw error;
|
||
|
} finally {
|
||
|
this.#dispatch({ type: "error", error });
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
#dispatch(action) {
|
||
|
const reducer = (state) => {
|
||
|
switch (action.type) {
|
||
|
case "failed":
|
||
|
return {
|
||
|
...state,
|
||
|
failureCount: action.failureCount,
|
||
|
failureReason: action.error
|
||
|
};
|
||
|
case "pause":
|
||
|
return {
|
||
|
...state,
|
||
|
isPaused: true
|
||
|
};
|
||
|
case "continue":
|
||
|
return {
|
||
|
...state,
|
||
|
isPaused: false
|
||
|
};
|
||
|
case "pending":
|
||
|
return {
|
||
|
...state,
|
||
|
context: action.context,
|
||
|
data: void 0,
|
||
|
failureCount: 0,
|
||
|
failureReason: null,
|
||
|
error: null,
|
||
|
isPaused: !(0,_retryer_js__WEBPACK_IMPORTED_MODULE_1__.canFetch)(this.options.networkMode),
|
||
|
status: "pending",
|
||
|
variables: action.variables,
|
||
|
submittedAt: Date.now()
|
||
|
};
|
||
|
case "success":
|
||
|
return {
|
||
|
...state,
|
||
|
data: action.data,
|
||
|
failureCount: 0,
|
||
|
failureReason: null,
|
||
|
error: null,
|
||
|
status: "success",
|
||
|
isPaused: false
|
||
|
};
|
||
|
case "error":
|
||
|
return {
|
||
|
...state,
|
||
|
data: void 0,
|
||
|
error: action.error,
|
||
|
failureCount: state.failureCount + 1,
|
||
|
failureReason: action.error,
|
||
|
isPaused: false,
|
||
|
status: "error"
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
this.state = reducer(this.state);
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
|
||
|
this.#observers.forEach((observer) => {
|
||
|
observer.onMutationUpdate(action);
|
||
|
});
|
||
|
this.#mutationCache.notify({
|
||
|
mutation: this,
|
||
|
type: "updated",
|
||
|
action
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
function getDefaultState() {
|
||
|
return {
|
||
|
context: void 0,
|
||
|
data: void 0,
|
||
|
error: null,
|
||
|
failureCount: 0,
|
||
|
failureReason: null,
|
||
|
isPaused: false,
|
||
|
status: "idle",
|
||
|
variables: void 0,
|
||
|
submittedAt: 0
|
||
|
};
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=mutation.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/mutationCache.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/mutationCache.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ MutationCache: function() { return /* binding */ MutationCache; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _mutation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mutation.js */ "./node_modules/@tanstack/query-core/build/modern/mutation.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
// src/mutationCache.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var MutationCache = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
constructor(config = {}) {
|
||
|
super();
|
||
|
this.config = config;
|
||
|
this.#mutations = [];
|
||
|
this.#mutationId = 0;
|
||
|
}
|
||
|
#mutations;
|
||
|
#mutationId;
|
||
|
#resuming;
|
||
|
build(client, options, state) {
|
||
|
const mutation = new _mutation_js__WEBPACK_IMPORTED_MODULE_1__.Mutation({
|
||
|
mutationCache: this,
|
||
|
mutationId: ++this.#mutationId,
|
||
|
options: client.defaultMutationOptions(options),
|
||
|
state
|
||
|
});
|
||
|
this.add(mutation);
|
||
|
return mutation;
|
||
|
}
|
||
|
add(mutation) {
|
||
|
this.#mutations.push(mutation);
|
||
|
this.notify({ type: "added", mutation });
|
||
|
}
|
||
|
remove(mutation) {
|
||
|
this.#mutations = this.#mutations.filter((x) => x !== mutation);
|
||
|
this.notify({ type: "removed", mutation });
|
||
|
}
|
||
|
clear() {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
|
||
|
this.#mutations.forEach((mutation) => {
|
||
|
this.remove(mutation);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
getAll() {
|
||
|
return this.#mutations;
|
||
|
}
|
||
|
find(filters) {
|
||
|
const defaultedFilters = { exact: true, ...filters };
|
||
|
return this.#mutations.find(
|
||
|
(mutation) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.matchMutation)(defaultedFilters, mutation)
|
||
|
);
|
||
|
}
|
||
|
findAll(filters = {}) {
|
||
|
return this.#mutations.filter(
|
||
|
(mutation) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.matchMutation)(filters, mutation)
|
||
|
);
|
||
|
}
|
||
|
notify(event) {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(() => {
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener(event);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
resumePausedMutations() {
|
||
|
this.#resuming = (this.#resuming ?? Promise.resolve()).then(() => {
|
||
|
const pausedMutations = this.#mutations.filter((x) => x.state.isPaused);
|
||
|
return _notifyManager_js__WEBPACK_IMPORTED_MODULE_2__.notifyManager.batch(
|
||
|
() => pausedMutations.reduce(
|
||
|
(promise, mutation) => promise.then(() => mutation.continue().catch(_utils_js__WEBPACK_IMPORTED_MODULE_3__.noop)),
|
||
|
Promise.resolve()
|
||
|
)
|
||
|
);
|
||
|
}).then(() => {
|
||
|
this.#resuming = void 0;
|
||
|
});
|
||
|
return this.#resuming;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=mutationCache.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/mutationObserver.js":
|
||
|
/*!****************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/mutationObserver.js ***!
|
||
|
\****************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ MutationObserver: function() { return /* binding */ MutationObserver; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _mutation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mutation.js */ "./node_modules/@tanstack/query-core/build/modern/mutation.js");
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/mutationObserver.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var MutationObserver = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
constructor(client, options) {
|
||
|
super();
|
||
|
this.#currentResult = void 0;
|
||
|
this.#client = client;
|
||
|
this.setOptions(options);
|
||
|
this.bindMethods();
|
||
|
this.#updateResult();
|
||
|
}
|
||
|
#client;
|
||
|
#currentResult;
|
||
|
#currentMutation;
|
||
|
#mutateOptions;
|
||
|
bindMethods() {
|
||
|
this.mutate = this.mutate.bind(this);
|
||
|
this.reset = this.reset.bind(this);
|
||
|
}
|
||
|
setOptions(options) {
|
||
|
const prevOptions = this.options;
|
||
|
this.options = this.#client.defaultMutationOptions(options);
|
||
|
if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.shallowEqualObjects)(prevOptions, this.options)) {
|
||
|
this.#client.getMutationCache().notify({
|
||
|
type: "observerOptionsUpdated",
|
||
|
mutation: this.#currentMutation,
|
||
|
observer: this
|
||
|
});
|
||
|
}
|
||
|
this.#currentMutation?.setOptions(this.options);
|
||
|
}
|
||
|
onUnsubscribe() {
|
||
|
if (!this.hasListeners()) {
|
||
|
this.#currentMutation?.removeObserver(this);
|
||
|
}
|
||
|
}
|
||
|
onMutationUpdate(action) {
|
||
|
this.#updateResult();
|
||
|
this.#notify(action);
|
||
|
}
|
||
|
getCurrentResult() {
|
||
|
return this.#currentResult;
|
||
|
}
|
||
|
reset() {
|
||
|
this.#currentMutation = void 0;
|
||
|
this.#updateResult();
|
||
|
this.#notify();
|
||
|
}
|
||
|
mutate(variables, options) {
|
||
|
this.#mutateOptions = options;
|
||
|
this.#currentMutation?.removeObserver(this);
|
||
|
this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);
|
||
|
this.#currentMutation.addObserver(this);
|
||
|
return this.#currentMutation.execute(variables);
|
||
|
}
|
||
|
#updateResult() {
|
||
|
const state = this.#currentMutation?.state ?? (0,_mutation_js__WEBPACK_IMPORTED_MODULE_2__.getDefaultState)();
|
||
|
this.#currentResult = {
|
||
|
...state,
|
||
|
isPending: state.status === "pending",
|
||
|
isSuccess: state.status === "success",
|
||
|
isError: state.status === "error",
|
||
|
isIdle: state.status === "idle",
|
||
|
mutate: this.mutate,
|
||
|
reset: this.reset
|
||
|
};
|
||
|
}
|
||
|
#notify(action) {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
if (this.#mutateOptions && this.hasListeners()) {
|
||
|
if (action?.type === "success") {
|
||
|
this.#mutateOptions.onSuccess?.(
|
||
|
action.data,
|
||
|
this.#currentResult.variables,
|
||
|
this.#currentResult.context
|
||
|
);
|
||
|
this.#mutateOptions.onSettled?.(
|
||
|
action.data,
|
||
|
null,
|
||
|
this.#currentResult.variables,
|
||
|
this.#currentResult.context
|
||
|
);
|
||
|
} else if (action?.type === "error") {
|
||
|
this.#mutateOptions.onError?.(
|
||
|
action.error,
|
||
|
this.#currentResult.variables,
|
||
|
this.#currentResult.context
|
||
|
);
|
||
|
this.#mutateOptions.onSettled?.(
|
||
|
void 0,
|
||
|
action.error,
|
||
|
this.#currentResult.variables,
|
||
|
this.#currentResult.context
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener(this.#currentResult);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=mutationObserver.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/notifyManager.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ createNotifyManager: function() { return /* binding */ createNotifyManager; },
|
||
|
/* harmony export */ notifyManager: function() { return /* binding */ notifyManager; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/notifyManager.ts
|
||
|
|
||
|
function createNotifyManager() {
|
||
|
let queue = [];
|
||
|
let transactions = 0;
|
||
|
let notifyFn = (callback) => {
|
||
|
callback();
|
||
|
};
|
||
|
let batchNotifyFn = (callback) => {
|
||
|
callback();
|
||
|
};
|
||
|
const batch = (callback) => {
|
||
|
let result;
|
||
|
transactions++;
|
||
|
try {
|
||
|
result = callback();
|
||
|
} finally {
|
||
|
transactions--;
|
||
|
if (!transactions) {
|
||
|
flush();
|
||
|
}
|
||
|
}
|
||
|
return result;
|
||
|
};
|
||
|
const schedule = (callback) => {
|
||
|
if (transactions) {
|
||
|
queue.push(callback);
|
||
|
} else {
|
||
|
(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.scheduleMicrotask)(() => {
|
||
|
notifyFn(callback);
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
const batchCalls = (callback) => {
|
||
|
return (...args) => {
|
||
|
schedule(() => {
|
||
|
callback(...args);
|
||
|
});
|
||
|
};
|
||
|
};
|
||
|
const flush = () => {
|
||
|
const originalQueue = queue;
|
||
|
queue = [];
|
||
|
if (originalQueue.length) {
|
||
|
(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.scheduleMicrotask)(() => {
|
||
|
batchNotifyFn(() => {
|
||
|
originalQueue.forEach((callback) => {
|
||
|
notifyFn(callback);
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
const setNotifyFunction = (fn) => {
|
||
|
notifyFn = fn;
|
||
|
};
|
||
|
const setBatchNotifyFunction = (fn) => {
|
||
|
batchNotifyFn = fn;
|
||
|
};
|
||
|
return {
|
||
|
batch,
|
||
|
batchCalls,
|
||
|
schedule,
|
||
|
setNotifyFunction,
|
||
|
setBatchNotifyFunction
|
||
|
};
|
||
|
}
|
||
|
var notifyManager = createNotifyManager();
|
||
|
|
||
|
//# sourceMappingURL=notifyManager.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/onlineManager.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ OnlineManager: function() { return /* binding */ OnlineManager; },
|
||
|
/* harmony export */ onlineManager: function() { return /* binding */ onlineManager; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/onlineManager.ts
|
||
|
|
||
|
|
||
|
var OnlineManager = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
#online = true;
|
||
|
#cleanup;
|
||
|
#setup;
|
||
|
constructor() {
|
||
|
super();
|
||
|
this.#setup = (onOnline) => {
|
||
|
if (!_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer && window.addEventListener) {
|
||
|
const onlineListener = () => onOnline(true);
|
||
|
const offlineListener = () => onOnline(false);
|
||
|
window.addEventListener("online", onlineListener, false);
|
||
|
window.addEventListener("offline", offlineListener, false);
|
||
|
return () => {
|
||
|
window.removeEventListener("online", onlineListener);
|
||
|
window.removeEventListener("offline", offlineListener);
|
||
|
};
|
||
|
}
|
||
|
return;
|
||
|
};
|
||
|
}
|
||
|
onSubscribe() {
|
||
|
if (!this.#cleanup) {
|
||
|
this.setEventListener(this.#setup);
|
||
|
}
|
||
|
}
|
||
|
onUnsubscribe() {
|
||
|
if (!this.hasListeners()) {
|
||
|
this.#cleanup?.();
|
||
|
this.#cleanup = void 0;
|
||
|
}
|
||
|
}
|
||
|
setEventListener(setup) {
|
||
|
this.#setup = setup;
|
||
|
this.#cleanup?.();
|
||
|
this.#cleanup = setup(this.setOnline.bind(this));
|
||
|
}
|
||
|
setOnline(online) {
|
||
|
const changed = this.#online !== online;
|
||
|
if (changed) {
|
||
|
this.#online = online;
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener(online);
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
isOnline() {
|
||
|
return this.#online;
|
||
|
}
|
||
|
};
|
||
|
var onlineManager = new OnlineManager();
|
||
|
|
||
|
//# sourceMappingURL=onlineManager.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/query.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/query.js ***!
|
||
|
\*****************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Query: function() { return /* binding */ Query; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _retryer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./retryer.js */ "./node_modules/@tanstack/query-core/build/modern/retryer.js");
|
||
|
/* harmony import */ var _removable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./removable.js */ "./node_modules/@tanstack/query-core/build/modern/removable.js");
|
||
|
// src/query.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var Query = class extends _removable_js__WEBPACK_IMPORTED_MODULE_0__.Removable {
|
||
|
constructor(config) {
|
||
|
super();
|
||
|
this.#abortSignalConsumed = false;
|
||
|
this.#defaultOptions = config.defaultOptions;
|
||
|
this.#setOptions(config.options);
|
||
|
this.#observers = [];
|
||
|
this.#cache = config.cache;
|
||
|
this.queryKey = config.queryKey;
|
||
|
this.queryHash = config.queryHash;
|
||
|
this.#initialState = config.state || getDefaultState(this.options);
|
||
|
this.state = this.#initialState;
|
||
|
this.scheduleGc();
|
||
|
}
|
||
|
#initialState;
|
||
|
#revertState;
|
||
|
#cache;
|
||
|
#promise;
|
||
|
#retryer;
|
||
|
#observers;
|
||
|
#defaultOptions;
|
||
|
#abortSignalConsumed;
|
||
|
get meta() {
|
||
|
return this.options.meta;
|
||
|
}
|
||
|
#setOptions(options) {
|
||
|
this.options = { ...this.#defaultOptions, ...options };
|
||
|
this.updateGcTime(this.options.gcTime);
|
||
|
}
|
||
|
optionalRemove() {
|
||
|
if (!this.#observers.length && this.state.fetchStatus === "idle") {
|
||
|
this.#cache.remove(this);
|
||
|
}
|
||
|
}
|
||
|
setData(newData, options) {
|
||
|
const data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.replaceData)(this.state.data, newData, this.options);
|
||
|
this.#dispatch({
|
||
|
data,
|
||
|
type: "success",
|
||
|
dataUpdatedAt: options?.updatedAt,
|
||
|
manual: options?.manual
|
||
|
});
|
||
|
return data;
|
||
|
}
|
||
|
setState(state, setStateOptions) {
|
||
|
this.#dispatch({ type: "setState", state, setStateOptions });
|
||
|
}
|
||
|
cancel(options) {
|
||
|
const promise = this.#promise;
|
||
|
this.#retryer?.cancel(options);
|
||
|
return promise ? promise.then(_utils_js__WEBPACK_IMPORTED_MODULE_1__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_1__.noop) : Promise.resolve();
|
||
|
}
|
||
|
destroy() {
|
||
|
super.destroy();
|
||
|
this.cancel({ silent: true });
|
||
|
}
|
||
|
reset() {
|
||
|
this.destroy();
|
||
|
this.setState(this.#initialState);
|
||
|
}
|
||
|
isActive() {
|
||
|
return this.#observers.some(
|
||
|
(observer) => observer.options.enabled !== false
|
||
|
);
|
||
|
}
|
||
|
isDisabled() {
|
||
|
return this.getObserversCount() > 0 && !this.isActive();
|
||
|
}
|
||
|
isStale() {
|
||
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || this.#observers.some((observer) => observer.getCurrentResult().isStale);
|
||
|
}
|
||
|
isStaleByTime(staleTime = 0) {
|
||
|
return this.state.isInvalidated || !this.state.dataUpdatedAt || !(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.timeUntilStale)(this.state.dataUpdatedAt, staleTime);
|
||
|
}
|
||
|
onFocus() {
|
||
|
const observer = this.#observers.find((x) => x.shouldFetchOnWindowFocus());
|
||
|
observer?.refetch({ cancelRefetch: false });
|
||
|
this.#retryer?.continue();
|
||
|
}
|
||
|
onOnline() {
|
||
|
const observer = this.#observers.find((x) => x.shouldFetchOnReconnect());
|
||
|
observer?.refetch({ cancelRefetch: false });
|
||
|
this.#retryer?.continue();
|
||
|
}
|
||
|
addObserver(observer) {
|
||
|
if (!this.#observers.includes(observer)) {
|
||
|
this.#observers.push(observer);
|
||
|
this.clearGcTimeout();
|
||
|
this.#cache.notify({ type: "observerAdded", query: this, observer });
|
||
|
}
|
||
|
}
|
||
|
removeObserver(observer) {
|
||
|
if (this.#observers.includes(observer)) {
|
||
|
this.#observers = this.#observers.filter((x) => x !== observer);
|
||
|
if (!this.#observers.length) {
|
||
|
if (this.#retryer) {
|
||
|
if (this.#abortSignalConsumed) {
|
||
|
this.#retryer.cancel({ revert: true });
|
||
|
} else {
|
||
|
this.#retryer.cancelRetry();
|
||
|
}
|
||
|
}
|
||
|
this.scheduleGc();
|
||
|
}
|
||
|
this.#cache.notify({ type: "observerRemoved", query: this, observer });
|
||
|
}
|
||
|
}
|
||
|
getObserversCount() {
|
||
|
return this.#observers.length;
|
||
|
}
|
||
|
invalidate() {
|
||
|
if (!this.state.isInvalidated) {
|
||
|
this.#dispatch({ type: "invalidate" });
|
||
|
}
|
||
|
}
|
||
|
fetch(options, fetchOptions) {
|
||
|
if (this.state.fetchStatus !== "idle") {
|
||
|
if (this.state.dataUpdatedAt && fetchOptions?.cancelRefetch) {
|
||
|
this.cancel({ silent: true });
|
||
|
} else if (this.#promise) {
|
||
|
this.#retryer?.continueRetry();
|
||
|
return this.#promise;
|
||
|
}
|
||
|
}
|
||
|
if (options) {
|
||
|
this.#setOptions(options);
|
||
|
}
|
||
|
if (!this.options.queryFn) {
|
||
|
const observer = this.#observers.find((x) => x.options.queryFn);
|
||
|
if (observer) {
|
||
|
this.#setOptions(observer.options);
|
||
|
}
|
||
|
}
|
||
|
if (true) {
|
||
|
if (!Array.isArray(this.options.queryKey)) {
|
||
|
console.error(
|
||
|
`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']`
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
const abortController = new AbortController();
|
||
|
const queryFnContext = {
|
||
|
queryKey: this.queryKey,
|
||
|
meta: this.meta
|
||
|
};
|
||
|
const addSignalProperty = (object) => {
|
||
|
Object.defineProperty(object, "signal", {
|
||
|
enumerable: true,
|
||
|
get: () => {
|
||
|
this.#abortSignalConsumed = true;
|
||
|
return abortController.signal;
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
addSignalProperty(queryFnContext);
|
||
|
const fetchFn = () => {
|
||
|
if (!this.options.queryFn) {
|
||
|
return Promise.reject(
|
||
|
new Error(`Missing queryFn: '${this.options.queryHash}'`)
|
||
|
);
|
||
|
}
|
||
|
this.#abortSignalConsumed = false;
|
||
|
if (this.options.persister) {
|
||
|
return this.options.persister(
|
||
|
this.options.queryFn,
|
||
|
queryFnContext,
|
||
|
this
|
||
|
);
|
||
|
}
|
||
|
return this.options.queryFn(
|
||
|
queryFnContext
|
||
|
);
|
||
|
};
|
||
|
const context = {
|
||
|
fetchOptions,
|
||
|
options: this.options,
|
||
|
queryKey: this.queryKey,
|
||
|
state: this.state,
|
||
|
fetchFn
|
||
|
};
|
||
|
addSignalProperty(context);
|
||
|
this.options.behavior?.onFetch(
|
||
|
context,
|
||
|
this
|
||
|
);
|
||
|
this.#revertState = this.state;
|
||
|
if (this.state.fetchStatus === "idle" || this.state.fetchMeta !== context.fetchOptions?.meta) {
|
||
|
this.#dispatch({ type: "fetch", meta: context.fetchOptions?.meta });
|
||
|
}
|
||
|
const onError = (error) => {
|
||
|
if (!((0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.isCancelledError)(error) && error.silent)) {
|
||
|
this.#dispatch({
|
||
|
type: "error",
|
||
|
error
|
||
|
});
|
||
|
}
|
||
|
if (!(0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.isCancelledError)(error)) {
|
||
|
this.#cache.config.onError?.(
|
||
|
error,
|
||
|
this
|
||
|
);
|
||
|
this.#cache.config.onSettled?.(
|
||
|
this.state.data,
|
||
|
error,
|
||
|
this
|
||
|
);
|
||
|
}
|
||
|
if (!this.isFetchingOptimistic) {
|
||
|
this.scheduleGc();
|
||
|
}
|
||
|
this.isFetchingOptimistic = false;
|
||
|
};
|
||
|
this.#retryer = (0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.createRetryer)({
|
||
|
fn: context.fetchFn,
|
||
|
abort: abortController.abort.bind(abortController),
|
||
|
onSuccess: (data) => {
|
||
|
if (typeof data === "undefined") {
|
||
|
if (true) {
|
||
|
console.error(
|
||
|
`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`
|
||
|
);
|
||
|
}
|
||
|
onError(new Error(`${this.queryHash} data is undefined`));
|
||
|
return;
|
||
|
}
|
||
|
this.setData(data);
|
||
|
this.#cache.config.onSuccess?.(data, this);
|
||
|
this.#cache.config.onSettled?.(
|
||
|
data,
|
||
|
this.state.error,
|
||
|
this
|
||
|
);
|
||
|
if (!this.isFetchingOptimistic) {
|
||
|
this.scheduleGc();
|
||
|
}
|
||
|
this.isFetchingOptimistic = false;
|
||
|
},
|
||
|
onError,
|
||
|
onFail: (failureCount, error) => {
|
||
|
this.#dispatch({ type: "failed", failureCount, error });
|
||
|
},
|
||
|
onPause: () => {
|
||
|
this.#dispatch({ type: "pause" });
|
||
|
},
|
||
|
onContinue: () => {
|
||
|
this.#dispatch({ type: "continue" });
|
||
|
},
|
||
|
retry: context.options.retry,
|
||
|
retryDelay: context.options.retryDelay,
|
||
|
networkMode: context.options.networkMode
|
||
|
});
|
||
|
this.#promise = this.#retryer.promise;
|
||
|
return this.#promise;
|
||
|
}
|
||
|
#dispatch(action) {
|
||
|
const reducer = (state) => {
|
||
|
switch (action.type) {
|
||
|
case "failed":
|
||
|
return {
|
||
|
...state,
|
||
|
fetchFailureCount: action.failureCount,
|
||
|
fetchFailureReason: action.error
|
||
|
};
|
||
|
case "pause":
|
||
|
return {
|
||
|
...state,
|
||
|
fetchStatus: "paused"
|
||
|
};
|
||
|
case "continue":
|
||
|
return {
|
||
|
...state,
|
||
|
fetchStatus: "fetching"
|
||
|
};
|
||
|
case "fetch":
|
||
|
return {
|
||
|
...state,
|
||
|
fetchFailureCount: 0,
|
||
|
fetchFailureReason: null,
|
||
|
fetchMeta: action.meta ?? null,
|
||
|
fetchStatus: (0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.canFetch)(this.options.networkMode) ? "fetching" : "paused",
|
||
|
...!state.dataUpdatedAt && {
|
||
|
error: null,
|
||
|
status: "pending"
|
||
|
}
|
||
|
};
|
||
|
case "success":
|
||
|
return {
|
||
|
...state,
|
||
|
data: action.data,
|
||
|
dataUpdateCount: state.dataUpdateCount + 1,
|
||
|
dataUpdatedAt: action.dataUpdatedAt ?? Date.now(),
|
||
|
error: null,
|
||
|
isInvalidated: false,
|
||
|
status: "success",
|
||
|
...!action.manual && {
|
||
|
fetchStatus: "idle",
|
||
|
fetchFailureCount: 0,
|
||
|
fetchFailureReason: null
|
||
|
}
|
||
|
};
|
||
|
case "error":
|
||
|
const error = action.error;
|
||
|
if ((0,_retryer_js__WEBPACK_IMPORTED_MODULE_2__.isCancelledError)(error) && error.revert && this.#revertState) {
|
||
|
return { ...this.#revertState, fetchStatus: "idle" };
|
||
|
}
|
||
|
return {
|
||
|
...state,
|
||
|
error,
|
||
|
errorUpdateCount: state.errorUpdateCount + 1,
|
||
|
errorUpdatedAt: Date.now(),
|
||
|
fetchFailureCount: state.fetchFailureCount + 1,
|
||
|
fetchFailureReason: error,
|
||
|
fetchStatus: "idle",
|
||
|
status: "error"
|
||
|
};
|
||
|
case "invalidate":
|
||
|
return {
|
||
|
...state,
|
||
|
isInvalidated: true
|
||
|
};
|
||
|
case "setState":
|
||
|
return {
|
||
|
...state,
|
||
|
...action.state
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
this.state = reducer(this.state);
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
this.#observers.forEach((observer) => {
|
||
|
observer.onQueryUpdate();
|
||
|
});
|
||
|
this.#cache.notify({ query: this, type: "updated", action });
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
function getDefaultState(options) {
|
||
|
const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
|
||
|
const hasData = typeof data !== "undefined";
|
||
|
const initialDataUpdatedAt = hasData ? typeof options.initialDataUpdatedAt === "function" ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;
|
||
|
return {
|
||
|
data,
|
||
|
dataUpdateCount: 0,
|
||
|
dataUpdatedAt: hasData ? initialDataUpdatedAt ?? Date.now() : 0,
|
||
|
error: null,
|
||
|
errorUpdateCount: 0,
|
||
|
errorUpdatedAt: 0,
|
||
|
fetchFailureCount: 0,
|
||
|
fetchFailureReason: null,
|
||
|
fetchMeta: null,
|
||
|
isInvalidated: false,
|
||
|
status: hasData ? "success" : "pending",
|
||
|
fetchStatus: "idle"
|
||
|
};
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=query.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/queryCache.js":
|
||
|
/*!**********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/queryCache.js ***!
|
||
|
\**********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryCache: function() { return /* binding */ QueryCache; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
/* harmony import */ var _query_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./query.js */ "./node_modules/@tanstack/query-core/build/modern/query.js");
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
// src/queryCache.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var QueryCache = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
constructor(config = {}) {
|
||
|
super();
|
||
|
this.config = config;
|
||
|
this.#queries = /* @__PURE__ */ new Map();
|
||
|
}
|
||
|
#queries;
|
||
|
build(client, options, state) {
|
||
|
const queryKey = options.queryKey;
|
||
|
const queryHash = options.queryHash ?? (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.hashQueryKeyByOptions)(queryKey, options);
|
||
|
let query = this.get(queryHash);
|
||
|
if (!query) {
|
||
|
query = new _query_js__WEBPACK_IMPORTED_MODULE_2__.Query({
|
||
|
cache: this,
|
||
|
queryKey,
|
||
|
queryHash,
|
||
|
options: client.defaultQueryOptions(options),
|
||
|
state,
|
||
|
defaultOptions: client.getQueryDefaults(queryKey)
|
||
|
});
|
||
|
this.add(query);
|
||
|
}
|
||
|
return query;
|
||
|
}
|
||
|
add(query) {
|
||
|
if (!this.#queries.has(query.queryHash)) {
|
||
|
this.#queries.set(query.queryHash, query);
|
||
|
this.notify({
|
||
|
type: "added",
|
||
|
query
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
remove(query) {
|
||
|
const queryInMap = this.#queries.get(query.queryHash);
|
||
|
if (queryInMap) {
|
||
|
query.destroy();
|
||
|
if (queryInMap === query) {
|
||
|
this.#queries.delete(query.queryHash);
|
||
|
}
|
||
|
this.notify({ type: "removed", query });
|
||
|
}
|
||
|
}
|
||
|
clear() {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
this.getAll().forEach((query) => {
|
||
|
this.remove(query);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
get(queryHash) {
|
||
|
return this.#queries.get(queryHash);
|
||
|
}
|
||
|
getAll() {
|
||
|
return [...this.#queries.values()];
|
||
|
}
|
||
|
find(filters) {
|
||
|
const defaultedFilters = { exact: true, ...filters };
|
||
|
return this.getAll().find(
|
||
|
(query) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.matchQuery)(defaultedFilters, query)
|
||
|
);
|
||
|
}
|
||
|
findAll(filters = {}) {
|
||
|
const queries = this.getAll();
|
||
|
return Object.keys(filters).length > 0 ? queries.filter((query) => (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.matchQuery)(filters, query)) : queries;
|
||
|
}
|
||
|
notify(event) {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener(event);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
onFocus() {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
this.getAll().forEach((query) => {
|
||
|
query.onFocus();
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
onOnline() {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batch(() => {
|
||
|
this.getAll().forEach((query) => {
|
||
|
query.onOnline();
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=queryCache.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/queryClient.js":
|
||
|
/*!***********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/queryClient.js ***!
|
||
|
\***********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryClient: function() { return /* binding */ QueryClient; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
/* harmony import */ var _queryCache_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./queryCache.js */ "./node_modules/@tanstack/query-core/build/modern/queryCache.js");
|
||
|
/* harmony import */ var _mutationCache_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mutationCache.js */ "./node_modules/@tanstack/query-core/build/modern/mutationCache.js");
|
||
|
/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
|
||
|
/* harmony import */ var _onlineManager_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./onlineManager.js */ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js");
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./infiniteQueryBehavior.js */ "./node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js");
|
||
|
// src/queryClient.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var QueryClient = class {
|
||
|
#queryCache;
|
||
|
#mutationCache;
|
||
|
#defaultOptions;
|
||
|
#queryDefaults;
|
||
|
#mutationDefaults;
|
||
|
#mountCount;
|
||
|
#unsubscribeFocus;
|
||
|
#unsubscribeOnline;
|
||
|
constructor(config = {}) {
|
||
|
this.#queryCache = config.queryCache || new _queryCache_js__WEBPACK_IMPORTED_MODULE_0__.QueryCache();
|
||
|
this.#mutationCache = config.mutationCache || new _mutationCache_js__WEBPACK_IMPORTED_MODULE_1__.MutationCache();
|
||
|
this.#defaultOptions = config.defaultOptions || {};
|
||
|
this.#queryDefaults = /* @__PURE__ */ new Map();
|
||
|
this.#mutationDefaults = /* @__PURE__ */ new Map();
|
||
|
this.#mountCount = 0;
|
||
|
}
|
||
|
mount() {
|
||
|
this.#mountCount++;
|
||
|
if (this.#mountCount !== 1)
|
||
|
return;
|
||
|
this.#unsubscribeFocus = _focusManager_js__WEBPACK_IMPORTED_MODULE_2__.focusManager.subscribe(() => {
|
||
|
if (_focusManager_js__WEBPACK_IMPORTED_MODULE_2__.focusManager.isFocused()) {
|
||
|
this.resumePausedMutations();
|
||
|
this.#queryCache.onFocus();
|
||
|
}
|
||
|
});
|
||
|
this.#unsubscribeOnline = _onlineManager_js__WEBPACK_IMPORTED_MODULE_3__.onlineManager.subscribe(() => {
|
||
|
if (_onlineManager_js__WEBPACK_IMPORTED_MODULE_3__.onlineManager.isOnline()) {
|
||
|
this.resumePausedMutations();
|
||
|
this.#queryCache.onOnline();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
unmount() {
|
||
|
this.#mountCount--;
|
||
|
if (this.#mountCount !== 0)
|
||
|
return;
|
||
|
this.#unsubscribeFocus?.();
|
||
|
this.#unsubscribeFocus = void 0;
|
||
|
this.#unsubscribeOnline?.();
|
||
|
this.#unsubscribeOnline = void 0;
|
||
|
}
|
||
|
isFetching(filters) {
|
||
|
return this.#queryCache.findAll({ ...filters, fetchStatus: "fetching" }).length;
|
||
|
}
|
||
|
isMutating(filters) {
|
||
|
return this.#mutationCache.findAll({ ...filters, status: "pending" }).length;
|
||
|
}
|
||
|
getQueryData(queryKey) {
|
||
|
return this.#queryCache.find({ queryKey })?.state.data;
|
||
|
}
|
||
|
ensureQueryData(options) {
|
||
|
const cachedData = this.getQueryData(options.queryKey);
|
||
|
return cachedData !== void 0 ? Promise.resolve(cachedData) : this.fetchQuery(options);
|
||
|
}
|
||
|
getQueriesData(filters) {
|
||
|
return this.getQueryCache().findAll(filters).map(({ queryKey, state }) => {
|
||
|
const data = state.data;
|
||
|
return [queryKey, data];
|
||
|
});
|
||
|
}
|
||
|
setQueryData(queryKey, updater, options) {
|
||
|
const query = this.#queryCache.find({ queryKey });
|
||
|
const prevData = query?.state.data;
|
||
|
const data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.functionalUpdate)(updater, prevData);
|
||
|
if (typeof data === "undefined") {
|
||
|
return void 0;
|
||
|
}
|
||
|
const defaultedOptions = this.defaultQueryOptions({ queryKey });
|
||
|
return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
|
||
|
}
|
||
|
setQueriesData(filters, updater, options) {
|
||
|
return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
|
||
|
() => this.getQueryCache().findAll(filters).map(({ queryKey }) => [
|
||
|
queryKey,
|
||
|
this.setQueryData(queryKey, updater, options)
|
||
|
])
|
||
|
);
|
||
|
}
|
||
|
getQueryState(queryKey) {
|
||
|
return this.#queryCache.find({ queryKey })?.state;
|
||
|
}
|
||
|
removeQueries(filters) {
|
||
|
const queryCache = this.#queryCache;
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
|
||
|
queryCache.findAll(filters).forEach((query) => {
|
||
|
queryCache.remove(query);
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
resetQueries(filters, options) {
|
||
|
const queryCache = this.#queryCache;
|
||
|
const refetchFilters = {
|
||
|
type: "active",
|
||
|
...filters
|
||
|
};
|
||
|
return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
|
||
|
queryCache.findAll(filters).forEach((query) => {
|
||
|
query.reset();
|
||
|
});
|
||
|
return this.refetchQueries(refetchFilters, options);
|
||
|
});
|
||
|
}
|
||
|
cancelQueries(filters = {}, cancelOptions = {}) {
|
||
|
const defaultedCancelOptions = { revert: true, ...cancelOptions };
|
||
|
const promises = _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
|
||
|
() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
|
||
|
);
|
||
|
return Promise.all(promises).then(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop);
|
||
|
}
|
||
|
invalidateQueries(filters = {}, options = {}) {
|
||
|
return _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(() => {
|
||
|
this.#queryCache.findAll(filters).forEach((query) => {
|
||
|
query.invalidate();
|
||
|
});
|
||
|
if (filters.refetchType === "none") {
|
||
|
return Promise.resolve();
|
||
|
}
|
||
|
const refetchFilters = {
|
||
|
...filters,
|
||
|
type: filters.refetchType ?? filters.type ?? "active"
|
||
|
};
|
||
|
return this.refetchQueries(refetchFilters, options);
|
||
|
});
|
||
|
}
|
||
|
refetchQueries(filters = {}, options) {
|
||
|
const fetchOptions = {
|
||
|
...options,
|
||
|
cancelRefetch: options?.cancelRefetch ?? true
|
||
|
};
|
||
|
const promises = _notifyManager_js__WEBPACK_IMPORTED_MODULE_5__.notifyManager.batch(
|
||
|
() => this.#queryCache.findAll(filters).filter((query) => !query.isDisabled()).map((query) => {
|
||
|
let promise = query.fetch(void 0, fetchOptions);
|
||
|
if (!fetchOptions.throwOnError) {
|
||
|
promise = promise.catch(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop);
|
||
|
}
|
||
|
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
|
||
|
})
|
||
|
);
|
||
|
return Promise.all(promises).then(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop);
|
||
|
}
|
||
|
fetchQuery(options) {
|
||
|
const defaultedOptions = this.defaultQueryOptions(options);
|
||
|
if (typeof defaultedOptions.retry === "undefined") {
|
||
|
defaultedOptions.retry = false;
|
||
|
}
|
||
|
const query = this.#queryCache.build(this, defaultedOptions);
|
||
|
return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
|
||
|
}
|
||
|
prefetchQuery(options) {
|
||
|
return this.fetchQuery(options).then(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop);
|
||
|
}
|
||
|
fetchInfiniteQuery(options) {
|
||
|
options.behavior = (0,_infiniteQueryBehavior_js__WEBPACK_IMPORTED_MODULE_6__.infiniteQueryBehavior)(options.pages);
|
||
|
return this.fetchQuery(options);
|
||
|
}
|
||
|
prefetchInfiniteQuery(options) {
|
||
|
return this.fetchInfiniteQuery(options).then(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop).catch(_utils_js__WEBPACK_IMPORTED_MODULE_4__.noop);
|
||
|
}
|
||
|
resumePausedMutations() {
|
||
|
return this.#mutationCache.resumePausedMutations();
|
||
|
}
|
||
|
getQueryCache() {
|
||
|
return this.#queryCache;
|
||
|
}
|
||
|
getMutationCache() {
|
||
|
return this.#mutationCache;
|
||
|
}
|
||
|
getDefaultOptions() {
|
||
|
return this.#defaultOptions;
|
||
|
}
|
||
|
setDefaultOptions(options) {
|
||
|
this.#defaultOptions = options;
|
||
|
}
|
||
|
setQueryDefaults(queryKey, options) {
|
||
|
this.#queryDefaults.set((0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.hashKey)(queryKey), {
|
||
|
queryKey,
|
||
|
defaultOptions: options
|
||
|
});
|
||
|
}
|
||
|
getQueryDefaults(queryKey) {
|
||
|
const defaults = [...this.#queryDefaults.values()];
|
||
|
let result = {};
|
||
|
defaults.forEach((queryDefault) => {
|
||
|
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.partialMatchKey)(queryKey, queryDefault.queryKey)) {
|
||
|
result = { ...result, ...queryDefault.defaultOptions };
|
||
|
}
|
||
|
});
|
||
|
return result;
|
||
|
}
|
||
|
setMutationDefaults(mutationKey, options) {
|
||
|
this.#mutationDefaults.set((0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.hashKey)(mutationKey), {
|
||
|
mutationKey,
|
||
|
defaultOptions: options
|
||
|
});
|
||
|
}
|
||
|
getMutationDefaults(mutationKey) {
|
||
|
const defaults = [...this.#mutationDefaults.values()];
|
||
|
let result = {};
|
||
|
defaults.forEach((queryDefault) => {
|
||
|
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
|
||
|
result = { ...result, ...queryDefault.defaultOptions };
|
||
|
}
|
||
|
});
|
||
|
return result;
|
||
|
}
|
||
|
defaultQueryOptions(options) {
|
||
|
if (options?._defaulted) {
|
||
|
return options;
|
||
|
}
|
||
|
const defaultedOptions = {
|
||
|
...this.#defaultOptions.queries,
|
||
|
...options?.queryKey && this.getQueryDefaults(options.queryKey),
|
||
|
...options,
|
||
|
_defaulted: true
|
||
|
};
|
||
|
if (!defaultedOptions.queryHash) {
|
||
|
defaultedOptions.queryHash = (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.hashQueryKeyByOptions)(
|
||
|
defaultedOptions.queryKey,
|
||
|
defaultedOptions
|
||
|
);
|
||
|
}
|
||
|
if (typeof defaultedOptions.refetchOnReconnect === "undefined") {
|
||
|
defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
|
||
|
}
|
||
|
if (typeof defaultedOptions.throwOnError === "undefined") {
|
||
|
defaultedOptions.throwOnError = !!defaultedOptions.suspense;
|
||
|
}
|
||
|
if (typeof defaultedOptions.networkMode === "undefined" && defaultedOptions.persister) {
|
||
|
defaultedOptions.networkMode = "offlineFirst";
|
||
|
}
|
||
|
return defaultedOptions;
|
||
|
}
|
||
|
defaultMutationOptions(options) {
|
||
|
if (options?._defaulted) {
|
||
|
return options;
|
||
|
}
|
||
|
return {
|
||
|
...this.#defaultOptions.mutations,
|
||
|
...options?.mutationKey && this.getMutationDefaults(options.mutationKey),
|
||
|
...options,
|
||
|
_defaulted: true
|
||
|
};
|
||
|
}
|
||
|
clear() {
|
||
|
this.#queryCache.clear();
|
||
|
this.#mutationCache.clear();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=queryClient.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/queryObserver.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/queryObserver.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryObserver: function() { return /* binding */ QueryObserver; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
/* harmony import */ var _notifyManager_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./notifyManager.js */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
|
||
|
/* harmony import */ var _subscribable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./subscribable.js */ "./node_modules/@tanstack/query-core/build/modern/subscribable.js");
|
||
|
/* harmony import */ var _retryer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./retryer.js */ "./node_modules/@tanstack/query-core/build/modern/retryer.js");
|
||
|
// src/queryObserver.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var QueryObserver = class extends _subscribable_js__WEBPACK_IMPORTED_MODULE_0__.Subscribable {
|
||
|
constructor(client, options) {
|
||
|
super();
|
||
|
this.#currentQuery = void 0;
|
||
|
this.#currentQueryInitialState = void 0;
|
||
|
this.#currentResult = void 0;
|
||
|
this.#trackedProps = /* @__PURE__ */ new Set();
|
||
|
this.#client = client;
|
||
|
this.options = options;
|
||
|
this.#selectError = null;
|
||
|
this.bindMethods();
|
||
|
this.setOptions(options);
|
||
|
}
|
||
|
#client;
|
||
|
#currentQuery;
|
||
|
#currentQueryInitialState;
|
||
|
#currentResult;
|
||
|
#currentResultState;
|
||
|
#currentResultOptions;
|
||
|
#selectError;
|
||
|
#selectFn;
|
||
|
#selectResult;
|
||
|
// This property keeps track of the last query with defined data.
|
||
|
// It will be used to pass the previous data and query to the placeholder function between renders.
|
||
|
#lastQueryWithDefinedData;
|
||
|
#staleTimeoutId;
|
||
|
#refetchIntervalId;
|
||
|
#currentRefetchInterval;
|
||
|
#trackedProps;
|
||
|
bindMethods() {
|
||
|
this.refetch = this.refetch.bind(this);
|
||
|
}
|
||
|
onSubscribe() {
|
||
|
if (this.listeners.size === 1) {
|
||
|
this.#currentQuery.addObserver(this);
|
||
|
if (shouldFetchOnMount(this.#currentQuery, this.options)) {
|
||
|
this.#executeFetch();
|
||
|
}
|
||
|
this.#updateTimers();
|
||
|
}
|
||
|
}
|
||
|
onUnsubscribe() {
|
||
|
if (!this.hasListeners()) {
|
||
|
this.destroy();
|
||
|
}
|
||
|
}
|
||
|
shouldFetchOnReconnect() {
|
||
|
return shouldFetchOn(
|
||
|
this.#currentQuery,
|
||
|
this.options,
|
||
|
this.options.refetchOnReconnect
|
||
|
);
|
||
|
}
|
||
|
shouldFetchOnWindowFocus() {
|
||
|
return shouldFetchOn(
|
||
|
this.#currentQuery,
|
||
|
this.options,
|
||
|
this.options.refetchOnWindowFocus
|
||
|
);
|
||
|
}
|
||
|
destroy() {
|
||
|
this.listeners = /* @__PURE__ */ new Set();
|
||
|
this.#clearStaleTimeout();
|
||
|
this.#clearRefetchInterval();
|
||
|
this.#currentQuery.removeObserver(this);
|
||
|
}
|
||
|
setOptions(options, notifyOptions) {
|
||
|
const prevOptions = this.options;
|
||
|
const prevQuery = this.#currentQuery;
|
||
|
this.options = this.#client.defaultQueryOptions(options);
|
||
|
if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.shallowEqualObjects)(prevOptions, this.options)) {
|
||
|
this.#client.getQueryCache().notify({
|
||
|
type: "observerOptionsUpdated",
|
||
|
query: this.#currentQuery,
|
||
|
observer: this
|
||
|
});
|
||
|
}
|
||
|
if (typeof this.options.enabled !== "undefined" && typeof this.options.enabled !== "boolean") {
|
||
|
throw new Error("Expected enabled to be a boolean");
|
||
|
}
|
||
|
if (!this.options.queryKey) {
|
||
|
this.options.queryKey = prevOptions.queryKey;
|
||
|
}
|
||
|
this.#updateQuery();
|
||
|
const mounted = this.hasListeners();
|
||
|
if (mounted && shouldFetchOptionally(
|
||
|
this.#currentQuery,
|
||
|
prevQuery,
|
||
|
this.options,
|
||
|
prevOptions
|
||
|
)) {
|
||
|
this.#executeFetch();
|
||
|
}
|
||
|
this.updateResult(notifyOptions);
|
||
|
if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {
|
||
|
this.#updateStaleTimeout();
|
||
|
}
|
||
|
const nextRefetchInterval = this.#computeRefetchInterval();
|
||
|
if (mounted && (this.#currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.#currentRefetchInterval)) {
|
||
|
this.#updateRefetchInterval(nextRefetchInterval);
|
||
|
}
|
||
|
}
|
||
|
getOptimisticResult(options) {
|
||
|
const query = this.#client.getQueryCache().build(this.#client, options);
|
||
|
const result = this.createResult(query, options);
|
||
|
if (shouldAssignObserverCurrentProperties(this, result)) {
|
||
|
this.#currentResult = result;
|
||
|
this.#currentResultOptions = this.options;
|
||
|
this.#currentResultState = this.#currentQuery.state;
|
||
|
}
|
||
|
return result;
|
||
|
}
|
||
|
getCurrentResult() {
|
||
|
return this.#currentResult;
|
||
|
}
|
||
|
trackResult(result) {
|
||
|
const trackedResult = {};
|
||
|
Object.keys(result).forEach((key) => {
|
||
|
Object.defineProperty(trackedResult, key, {
|
||
|
configurable: false,
|
||
|
enumerable: true,
|
||
|
get: () => {
|
||
|
this.#trackedProps.add(key);
|
||
|
return result[key];
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
return trackedResult;
|
||
|
}
|
||
|
getCurrentQuery() {
|
||
|
return this.#currentQuery;
|
||
|
}
|
||
|
refetch({ ...options } = {}) {
|
||
|
return this.fetch({
|
||
|
...options
|
||
|
});
|
||
|
}
|
||
|
fetchOptimistic(options) {
|
||
|
const defaultedOptions = this.#client.defaultQueryOptions(options);
|
||
|
const query = this.#client.getQueryCache().build(this.#client, defaultedOptions);
|
||
|
query.isFetchingOptimistic = true;
|
||
|
return query.fetch().then(() => this.createResult(query, defaultedOptions));
|
||
|
}
|
||
|
fetch(fetchOptions) {
|
||
|
return this.#executeFetch({
|
||
|
...fetchOptions,
|
||
|
cancelRefetch: fetchOptions.cancelRefetch ?? true
|
||
|
}).then(() => {
|
||
|
this.updateResult();
|
||
|
return this.#currentResult;
|
||
|
});
|
||
|
}
|
||
|
#executeFetch(fetchOptions) {
|
||
|
this.#updateQuery();
|
||
|
let promise = this.#currentQuery.fetch(
|
||
|
this.options,
|
||
|
fetchOptions
|
||
|
);
|
||
|
if (!fetchOptions?.throwOnError) {
|
||
|
promise = promise.catch(_utils_js__WEBPACK_IMPORTED_MODULE_1__.noop);
|
||
|
}
|
||
|
return promise;
|
||
|
}
|
||
|
#updateStaleTimeout() {
|
||
|
this.#clearStaleTimeout();
|
||
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer || this.#currentResult.isStale || !(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isValidTimeout)(this.options.staleTime)) {
|
||
|
return;
|
||
|
}
|
||
|
const time = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.timeUntilStale)(
|
||
|
this.#currentResult.dataUpdatedAt,
|
||
|
this.options.staleTime
|
||
|
);
|
||
|
const timeout = time + 1;
|
||
|
this.#staleTimeoutId = setTimeout(() => {
|
||
|
if (!this.#currentResult.isStale) {
|
||
|
this.updateResult();
|
||
|
}
|
||
|
}, timeout);
|
||
|
}
|
||
|
#computeRefetchInterval() {
|
||
|
return (typeof this.options.refetchInterval === "function" ? this.options.refetchInterval(this.#currentQuery) : this.options.refetchInterval) ?? false;
|
||
|
}
|
||
|
#updateRefetchInterval(nextInterval) {
|
||
|
this.#clearRefetchInterval();
|
||
|
this.#currentRefetchInterval = nextInterval;
|
||
|
if (_utils_js__WEBPACK_IMPORTED_MODULE_1__.isServer || this.options.enabled === false || !(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
|
||
|
return;
|
||
|
}
|
||
|
this.#refetchIntervalId = setInterval(() => {
|
||
|
if (this.options.refetchIntervalInBackground || _focusManager_js__WEBPACK_IMPORTED_MODULE_2__.focusManager.isFocused()) {
|
||
|
this.#executeFetch();
|
||
|
}
|
||
|
}, this.#currentRefetchInterval);
|
||
|
}
|
||
|
#updateTimers() {
|
||
|
this.#updateStaleTimeout();
|
||
|
this.#updateRefetchInterval(this.#computeRefetchInterval());
|
||
|
}
|
||
|
#clearStaleTimeout() {
|
||
|
if (this.#staleTimeoutId) {
|
||
|
clearTimeout(this.#staleTimeoutId);
|
||
|
this.#staleTimeoutId = void 0;
|
||
|
}
|
||
|
}
|
||
|
#clearRefetchInterval() {
|
||
|
if (this.#refetchIntervalId) {
|
||
|
clearInterval(this.#refetchIntervalId);
|
||
|
this.#refetchIntervalId = void 0;
|
||
|
}
|
||
|
}
|
||
|
createResult(query, options) {
|
||
|
const prevQuery = this.#currentQuery;
|
||
|
const prevOptions = this.options;
|
||
|
const prevResult = this.#currentResult;
|
||
|
const prevResultState = this.#currentResultState;
|
||
|
const prevResultOptions = this.#currentResultOptions;
|
||
|
const queryChange = query !== prevQuery;
|
||
|
const queryInitialState = queryChange ? query.state : this.#currentQueryInitialState;
|
||
|
const { state } = query;
|
||
|
let { error, errorUpdatedAt, fetchStatus, status } = state;
|
||
|
let isPlaceholderData = false;
|
||
|
let data;
|
||
|
if (options._optimisticResults) {
|
||
|
const mounted = this.hasListeners();
|
||
|
const fetchOnMount = !mounted && shouldFetchOnMount(query, options);
|
||
|
const fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);
|
||
|
if (fetchOnMount || fetchOptionally) {
|
||
|
fetchStatus = (0,_retryer_js__WEBPACK_IMPORTED_MODULE_3__.canFetch)(query.options.networkMode) ? "fetching" : "paused";
|
||
|
if (!state.dataUpdatedAt) {
|
||
|
status = "pending";
|
||
|
}
|
||
|
}
|
||
|
if (options._optimisticResults === "isRestoring") {
|
||
|
fetchStatus = "idle";
|
||
|
}
|
||
|
}
|
||
|
if (options.select && typeof state.data !== "undefined") {
|
||
|
if (prevResult && state.data === prevResultState?.data && options.select === this.#selectFn) {
|
||
|
data = this.#selectResult;
|
||
|
} else {
|
||
|
try {
|
||
|
this.#selectFn = options.select;
|
||
|
data = options.select(state.data);
|
||
|
data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.replaceData)(prevResult?.data, data, options);
|
||
|
this.#selectResult = data;
|
||
|
this.#selectError = null;
|
||
|
} catch (selectError) {
|
||
|
this.#selectError = selectError;
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
data = state.data;
|
||
|
}
|
||
|
if (typeof options.placeholderData !== "undefined" && typeof data === "undefined" && status === "pending") {
|
||
|
let placeholderData;
|
||
|
if (prevResult?.isPlaceholderData && options.placeholderData === prevResultOptions?.placeholderData) {
|
||
|
placeholderData = prevResult.data;
|
||
|
} else {
|
||
|
placeholderData = typeof options.placeholderData === "function" ? options.placeholderData(
|
||
|
this.#lastQueryWithDefinedData?.state.data,
|
||
|
this.#lastQueryWithDefinedData
|
||
|
) : options.placeholderData;
|
||
|
if (options.select && typeof placeholderData !== "undefined") {
|
||
|
try {
|
||
|
placeholderData = options.select(placeholderData);
|
||
|
this.#selectError = null;
|
||
|
} catch (selectError) {
|
||
|
this.#selectError = selectError;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
if (typeof placeholderData !== "undefined") {
|
||
|
status = "success";
|
||
|
data = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.replaceData)(
|
||
|
prevResult?.data,
|
||
|
placeholderData,
|
||
|
options
|
||
|
);
|
||
|
isPlaceholderData = true;
|
||
|
}
|
||
|
}
|
||
|
if (this.#selectError) {
|
||
|
error = this.#selectError;
|
||
|
data = this.#selectResult;
|
||
|
errorUpdatedAt = Date.now();
|
||
|
status = "error";
|
||
|
}
|
||
|
const isFetching = fetchStatus === "fetching";
|
||
|
const isPending = status === "pending";
|
||
|
const isError = status === "error";
|
||
|
const isLoading = isPending && isFetching;
|
||
|
const result = {
|
||
|
status,
|
||
|
fetchStatus,
|
||
|
isPending,
|
||
|
isSuccess: status === "success",
|
||
|
isError,
|
||
|
isInitialLoading: isLoading,
|
||
|
isLoading,
|
||
|
data,
|
||
|
dataUpdatedAt: state.dataUpdatedAt,
|
||
|
error,
|
||
|
errorUpdatedAt,
|
||
|
failureCount: state.fetchFailureCount,
|
||
|
failureReason: state.fetchFailureReason,
|
||
|
errorUpdateCount: state.errorUpdateCount,
|
||
|
isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,
|
||
|
isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,
|
||
|
isFetching,
|
||
|
isRefetching: isFetching && !isPending,
|
||
|
isLoadingError: isError && state.dataUpdatedAt === 0,
|
||
|
isPaused: fetchStatus === "paused",
|
||
|
isPlaceholderData,
|
||
|
isRefetchError: isError && state.dataUpdatedAt !== 0,
|
||
|
isStale: isStale(query, options),
|
||
|
refetch: this.refetch
|
||
|
};
|
||
|
return result;
|
||
|
}
|
||
|
updateResult(notifyOptions) {
|
||
|
const prevResult = this.#currentResult;
|
||
|
const nextResult = this.createResult(this.#currentQuery, this.options);
|
||
|
this.#currentResultState = this.#currentQuery.state;
|
||
|
this.#currentResultOptions = this.options;
|
||
|
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.shallowEqualObjects)(nextResult, prevResult)) {
|
||
|
return;
|
||
|
}
|
||
|
if (this.#currentResultState.data !== void 0) {
|
||
|
this.#lastQueryWithDefinedData = this.#currentQuery;
|
||
|
}
|
||
|
this.#currentResult = nextResult;
|
||
|
const defaultNotifyOptions = {};
|
||
|
const shouldNotifyListeners = () => {
|
||
|
if (!prevResult) {
|
||
|
return true;
|
||
|
}
|
||
|
const { notifyOnChangeProps } = this.options;
|
||
|
const notifyOnChangePropsValue = typeof notifyOnChangeProps === "function" ? notifyOnChangeProps() : notifyOnChangeProps;
|
||
|
if (notifyOnChangePropsValue === "all" || !notifyOnChangePropsValue && !this.#trackedProps.size) {
|
||
|
return true;
|
||
|
}
|
||
|
const includedProps = new Set(
|
||
|
notifyOnChangePropsValue ?? this.#trackedProps
|
||
|
);
|
||
|
if (this.options.throwOnError) {
|
||
|
includedProps.add("error");
|
||
|
}
|
||
|
return Object.keys(this.#currentResult).some((key) => {
|
||
|
const typedKey = key;
|
||
|
const changed = this.#currentResult[typedKey] !== prevResult[typedKey];
|
||
|
return changed && includedProps.has(typedKey);
|
||
|
});
|
||
|
};
|
||
|
if (notifyOptions?.listeners !== false && shouldNotifyListeners()) {
|
||
|
defaultNotifyOptions.listeners = true;
|
||
|
}
|
||
|
this.#notify({ ...defaultNotifyOptions, ...notifyOptions });
|
||
|
}
|
||
|
#updateQuery() {
|
||
|
const query = this.#client.getQueryCache().build(this.#client, this.options);
|
||
|
if (query === this.#currentQuery) {
|
||
|
return;
|
||
|
}
|
||
|
const prevQuery = this.#currentQuery;
|
||
|
this.#currentQuery = query;
|
||
|
this.#currentQueryInitialState = query.state;
|
||
|
if (this.hasListeners()) {
|
||
|
prevQuery?.removeObserver(this);
|
||
|
query.addObserver(this);
|
||
|
}
|
||
|
}
|
||
|
onQueryUpdate() {
|
||
|
this.updateResult();
|
||
|
if (this.hasListeners()) {
|
||
|
this.#updateTimers();
|
||
|
}
|
||
|
}
|
||
|
#notify(notifyOptions) {
|
||
|
_notifyManager_js__WEBPACK_IMPORTED_MODULE_4__.notifyManager.batch(() => {
|
||
|
if (notifyOptions.listeners) {
|
||
|
this.listeners.forEach((listener) => {
|
||
|
listener(this.#currentResult);
|
||
|
});
|
||
|
}
|
||
|
this.#client.getQueryCache().notify({
|
||
|
query: this.#currentQuery,
|
||
|
type: "observerResultsUpdated"
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
};
|
||
|
function shouldLoadOnMount(query, options) {
|
||
|
return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === "error" && options.retryOnMount === false);
|
||
|
}
|
||
|
function shouldFetchOnMount(query, options) {
|
||
|
return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);
|
||
|
}
|
||
|
function shouldFetchOn(query, options, field) {
|
||
|
if (options.enabled !== false) {
|
||
|
const value = typeof field === "function" ? field(query) : field;
|
||
|
return value === "always" || value !== false && isStale(query, options);
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function shouldFetchOptionally(query, prevQuery, options, prevOptions) {
|
||
|
return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
|
||
|
}
|
||
|
function isStale(query, options) {
|
||
|
return query.isStaleByTime(options.staleTime);
|
||
|
}
|
||
|
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
|
||
|
if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=queryObserver.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/removable.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/removable.js ***!
|
||
|
\*********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Removable: function() { return /* binding */ Removable; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/removable.ts
|
||
|
|
||
|
var Removable = class {
|
||
|
#gcTimeout;
|
||
|
destroy() {
|
||
|
this.clearGcTimeout();
|
||
|
}
|
||
|
scheduleGc() {
|
||
|
this.clearGcTimeout();
|
||
|
if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isValidTimeout)(this.gcTime)) {
|
||
|
this.#gcTimeout = setTimeout(() => {
|
||
|
this.optionalRemove();
|
||
|
}, this.gcTime);
|
||
|
}
|
||
|
}
|
||
|
updateGcTime(newGcTime) {
|
||
|
this.gcTime = Math.max(
|
||
|
this.gcTime || 0,
|
||
|
newGcTime ?? (_utils_js__WEBPACK_IMPORTED_MODULE_0__.isServer ? Infinity : 5 * 60 * 1e3)
|
||
|
);
|
||
|
}
|
||
|
clearGcTimeout() {
|
||
|
if (this.#gcTimeout) {
|
||
|
clearTimeout(this.#gcTimeout);
|
||
|
this.#gcTimeout = void 0;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=removable.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/retryer.js":
|
||
|
/*!*******************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/retryer.js ***!
|
||
|
\*******************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ CancelledError: function() { return /* binding */ CancelledError; },
|
||
|
/* harmony export */ canFetch: function() { return /* binding */ canFetch; },
|
||
|
/* harmony export */ createRetryer: function() { return /* binding */ createRetryer; },
|
||
|
/* harmony export */ isCancelledError: function() { return /* binding */ isCancelledError; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _focusManager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./focusManager.js */ "./node_modules/@tanstack/query-core/build/modern/focusManager.js");
|
||
|
/* harmony import */ var _onlineManager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./onlineManager.js */ "./node_modules/@tanstack/query-core/build/modern/onlineManager.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/query-core/build/modern/utils.js");
|
||
|
// src/retryer.ts
|
||
|
|
||
|
|
||
|
|
||
|
function defaultRetryDelay(failureCount) {
|
||
|
return Math.min(1e3 * 2 ** failureCount, 3e4);
|
||
|
}
|
||
|
function canFetch(networkMode) {
|
||
|
return (networkMode ?? "online") === "online" ? _onlineManager_js__WEBPACK_IMPORTED_MODULE_0__.onlineManager.isOnline() : true;
|
||
|
}
|
||
|
var CancelledError = class {
|
||
|
constructor(options) {
|
||
|
this.revert = options?.revert;
|
||
|
this.silent = options?.silent;
|
||
|
}
|
||
|
};
|
||
|
function isCancelledError(value) {
|
||
|
return value instanceof CancelledError;
|
||
|
}
|
||
|
function createRetryer(config) {
|
||
|
let isRetryCancelled = false;
|
||
|
let failureCount = 0;
|
||
|
let isResolved = false;
|
||
|
let continueFn;
|
||
|
let promiseResolve;
|
||
|
let promiseReject;
|
||
|
const promise = new Promise((outerResolve, outerReject) => {
|
||
|
promiseResolve = outerResolve;
|
||
|
promiseReject = outerReject;
|
||
|
});
|
||
|
const cancel = (cancelOptions) => {
|
||
|
if (!isResolved) {
|
||
|
reject(new CancelledError(cancelOptions));
|
||
|
config.abort?.();
|
||
|
}
|
||
|
};
|
||
|
const cancelRetry = () => {
|
||
|
isRetryCancelled = true;
|
||
|
};
|
||
|
const continueRetry = () => {
|
||
|
isRetryCancelled = false;
|
||
|
};
|
||
|
const shouldPause = () => !_focusManager_js__WEBPACK_IMPORTED_MODULE_1__.focusManager.isFocused() || config.networkMode !== "always" && !_onlineManager_js__WEBPACK_IMPORTED_MODULE_0__.onlineManager.isOnline();
|
||
|
const resolve = (value) => {
|
||
|
if (!isResolved) {
|
||
|
isResolved = true;
|
||
|
config.onSuccess?.(value);
|
||
|
continueFn?.();
|
||
|
promiseResolve(value);
|
||
|
}
|
||
|
};
|
||
|
const reject = (value) => {
|
||
|
if (!isResolved) {
|
||
|
isResolved = true;
|
||
|
config.onError?.(value);
|
||
|
continueFn?.();
|
||
|
promiseReject(value);
|
||
|
}
|
||
|
};
|
||
|
const pause = () => {
|
||
|
return new Promise((continueResolve) => {
|
||
|
continueFn = (value) => {
|
||
|
const canContinue = isResolved || !shouldPause();
|
||
|
if (canContinue) {
|
||
|
continueResolve(value);
|
||
|
}
|
||
|
return canContinue;
|
||
|
};
|
||
|
config.onPause?.();
|
||
|
}).then(() => {
|
||
|
continueFn = void 0;
|
||
|
if (!isResolved) {
|
||
|
config.onContinue?.();
|
||
|
}
|
||
|
});
|
||
|
};
|
||
|
const run = () => {
|
||
|
if (isResolved) {
|
||
|
return;
|
||
|
}
|
||
|
let promiseOrValue;
|
||
|
try {
|
||
|
promiseOrValue = config.fn();
|
||
|
} catch (error) {
|
||
|
promiseOrValue = Promise.reject(error);
|
||
|
}
|
||
|
Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
|
||
|
if (isResolved) {
|
||
|
return;
|
||
|
}
|
||
|
const retry = config.retry ?? (_utils_js__WEBPACK_IMPORTED_MODULE_2__.isServer ? 0 : 3);
|
||
|
const retryDelay = config.retryDelay ?? defaultRetryDelay;
|
||
|
const delay = typeof retryDelay === "function" ? retryDelay(failureCount, error) : retryDelay;
|
||
|
const shouldRetry = retry === true || typeof retry === "number" && failureCount < retry || typeof retry === "function" && retry(failureCount, error);
|
||
|
if (isRetryCancelled || !shouldRetry) {
|
||
|
reject(error);
|
||
|
return;
|
||
|
}
|
||
|
failureCount++;
|
||
|
config.onFail?.(failureCount, error);
|
||
|
(0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.sleep)(delay).then(() => {
|
||
|
if (shouldPause()) {
|
||
|
return pause();
|
||
|
}
|
||
|
return;
|
||
|
}).then(() => {
|
||
|
if (isRetryCancelled) {
|
||
|
reject(error);
|
||
|
} else {
|
||
|
run();
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
};
|
||
|
if (canFetch(config.networkMode)) {
|
||
|
run();
|
||
|
} else {
|
||
|
pause().then(run);
|
||
|
}
|
||
|
return {
|
||
|
promise,
|
||
|
cancel,
|
||
|
continue: () => {
|
||
|
const didContinue = continueFn?.();
|
||
|
return didContinue ? promise : Promise.resolve();
|
||
|
},
|
||
|
cancelRetry,
|
||
|
continueRetry
|
||
|
};
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=retryer.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/subscribable.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/subscribable.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ Subscribable: function() { return /* binding */ Subscribable; }
|
||
|
/* harmony export */ });
|
||
|
// src/subscribable.ts
|
||
|
var Subscribable = class {
|
||
|
constructor() {
|
||
|
this.listeners = /* @__PURE__ */ new Set();
|
||
|
this.subscribe = this.subscribe.bind(this);
|
||
|
}
|
||
|
subscribe(listener) {
|
||
|
this.listeners.add(listener);
|
||
|
this.onSubscribe();
|
||
|
return () => {
|
||
|
this.listeners.delete(listener);
|
||
|
this.onUnsubscribe();
|
||
|
};
|
||
|
}
|
||
|
hasListeners() {
|
||
|
return this.listeners.size > 0;
|
||
|
}
|
||
|
onSubscribe() {
|
||
|
}
|
||
|
onUnsubscribe() {
|
||
|
}
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=subscribable.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/query-core/build/modern/utils.js":
|
||
|
/*!*****************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/query-core/build/modern/utils.js ***!
|
||
|
\*****************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ addToEnd: function() { return /* binding */ addToEnd; },
|
||
|
/* harmony export */ addToStart: function() { return /* binding */ addToStart; },
|
||
|
/* harmony export */ functionalUpdate: function() { return /* binding */ functionalUpdate; },
|
||
|
/* harmony export */ hashKey: function() { return /* binding */ hashKey; },
|
||
|
/* harmony export */ hashQueryKeyByOptions: function() { return /* binding */ hashQueryKeyByOptions; },
|
||
|
/* harmony export */ isPlainArray: function() { return /* binding */ isPlainArray; },
|
||
|
/* harmony export */ isPlainObject: function() { return /* binding */ isPlainObject; },
|
||
|
/* harmony export */ isServer: function() { return /* binding */ isServer; },
|
||
|
/* harmony export */ isValidTimeout: function() { return /* binding */ isValidTimeout; },
|
||
|
/* harmony export */ keepPreviousData: function() { return /* binding */ keepPreviousData; },
|
||
|
/* harmony export */ matchMutation: function() { return /* binding */ matchMutation; },
|
||
|
/* harmony export */ matchQuery: function() { return /* binding */ matchQuery; },
|
||
|
/* harmony export */ noop: function() { return /* binding */ noop; },
|
||
|
/* harmony export */ partialMatchKey: function() { return /* binding */ partialMatchKey; },
|
||
|
/* harmony export */ replaceData: function() { return /* binding */ replaceData; },
|
||
|
/* harmony export */ replaceEqualDeep: function() { return /* binding */ replaceEqualDeep; },
|
||
|
/* harmony export */ scheduleMicrotask: function() { return /* binding */ scheduleMicrotask; },
|
||
|
/* harmony export */ shallowEqualObjects: function() { return /* binding */ shallowEqualObjects; },
|
||
|
/* harmony export */ sleep: function() { return /* binding */ sleep; },
|
||
|
/* harmony export */ timeUntilStale: function() { return /* binding */ timeUntilStale; }
|
||
|
/* harmony export */ });
|
||
|
// src/utils.ts
|
||
|
var isServer = typeof window === "undefined" || "Deno" in window;
|
||
|
function noop() {
|
||
|
return void 0;
|
||
|
}
|
||
|
function functionalUpdate(updater, input) {
|
||
|
return typeof updater === "function" ? updater(input) : updater;
|
||
|
}
|
||
|
function isValidTimeout(value) {
|
||
|
return typeof value === "number" && value >= 0 && value !== Infinity;
|
||
|
}
|
||
|
function timeUntilStale(updatedAt, staleTime) {
|
||
|
return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);
|
||
|
}
|
||
|
function matchQuery(filters, query) {
|
||
|
const {
|
||
|
type = "all",
|
||
|
exact,
|
||
|
fetchStatus,
|
||
|
predicate,
|
||
|
queryKey,
|
||
|
stale
|
||
|
} = filters;
|
||
|
if (queryKey) {
|
||
|
if (exact) {
|
||
|
if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {
|
||
|
return false;
|
||
|
}
|
||
|
} else if (!partialMatchKey(query.queryKey, queryKey)) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
if (type !== "all") {
|
||
|
const isActive = query.isActive();
|
||
|
if (type === "active" && !isActive) {
|
||
|
return false;
|
||
|
}
|
||
|
if (type === "inactive" && isActive) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
if (typeof stale === "boolean" && query.isStale() !== stale) {
|
||
|
return false;
|
||
|
}
|
||
|
if (typeof fetchStatus !== "undefined" && fetchStatus !== query.state.fetchStatus) {
|
||
|
return false;
|
||
|
}
|
||
|
if (predicate && !predicate(query)) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function matchMutation(filters, mutation) {
|
||
|
const { exact, status, predicate, mutationKey } = filters;
|
||
|
if (mutationKey) {
|
||
|
if (!mutation.options.mutationKey) {
|
||
|
return false;
|
||
|
}
|
||
|
if (exact) {
|
||
|
if (hashKey(mutation.options.mutationKey) !== hashKey(mutationKey)) {
|
||
|
return false;
|
||
|
}
|
||
|
} else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
if (status && mutation.state.status !== status) {
|
||
|
return false;
|
||
|
}
|
||
|
if (predicate && !predicate(mutation)) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function hashQueryKeyByOptions(queryKey, options) {
|
||
|
const hashFn = options?.queryKeyHashFn || hashKey;
|
||
|
return hashFn(queryKey);
|
||
|
}
|
||
|
function hashKey(queryKey) {
|
||
|
return JSON.stringify(
|
||
|
queryKey,
|
||
|
(_, val) => isPlainObject(val) ? Object.keys(val).sort().reduce((result, key) => {
|
||
|
result[key] = val[key];
|
||
|
return result;
|
||
|
}, {}) : val
|
||
|
);
|
||
|
}
|
||
|
function partialMatchKey(a, b) {
|
||
|
if (a === b) {
|
||
|
return true;
|
||
|
}
|
||
|
if (typeof a !== typeof b) {
|
||
|
return false;
|
||
|
}
|
||
|
if (a && b && typeof a === "object" && typeof b === "object") {
|
||
|
return !Object.keys(b).some((key) => !partialMatchKey(a[key], b[key]));
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
function replaceEqualDeep(a, b) {
|
||
|
if (a === b) {
|
||
|
return a;
|
||
|
}
|
||
|
const array = isPlainArray(a) && isPlainArray(b);
|
||
|
if (array || isPlainObject(a) && isPlainObject(b)) {
|
||
|
const aSize = array ? a.length : Object.keys(a).length;
|
||
|
const bItems = array ? b : Object.keys(b);
|
||
|
const bSize = bItems.length;
|
||
|
const copy = array ? [] : {};
|
||
|
let equalItems = 0;
|
||
|
for (let i = 0; i < bSize; i++) {
|
||
|
const key = array ? i : bItems[i];
|
||
|
copy[key] = replaceEqualDeep(a[key], b[key]);
|
||
|
if (copy[key] === a[key]) {
|
||
|
equalItems++;
|
||
|
}
|
||
|
}
|
||
|
return aSize === bSize && equalItems === aSize ? a : copy;
|
||
|
}
|
||
|
return b;
|
||
|
}
|
||
|
function shallowEqualObjects(a, b) {
|
||
|
if (a && !b || b && !a) {
|
||
|
return false;
|
||
|
}
|
||
|
for (const key in a) {
|
||
|
if (a[key] !== b[key]) {
|
||
|
return false;
|
||
|
}
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function isPlainArray(value) {
|
||
|
return Array.isArray(value) && value.length === Object.keys(value).length;
|
||
|
}
|
||
|
function isPlainObject(o) {
|
||
|
if (!hasObjectPrototype(o)) {
|
||
|
return false;
|
||
|
}
|
||
|
const ctor = o.constructor;
|
||
|
if (typeof ctor === "undefined") {
|
||
|
return true;
|
||
|
}
|
||
|
const prot = ctor.prototype;
|
||
|
if (!hasObjectPrototype(prot)) {
|
||
|
return false;
|
||
|
}
|
||
|
if (!prot.hasOwnProperty("isPrototypeOf")) {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
function hasObjectPrototype(o) {
|
||
|
return Object.prototype.toString.call(o) === "[object Object]";
|
||
|
}
|
||
|
function sleep(timeout) {
|
||
|
return new Promise((resolve) => {
|
||
|
setTimeout(resolve, timeout);
|
||
|
});
|
||
|
}
|
||
|
function scheduleMicrotask(callback) {
|
||
|
sleep(0).then(callback);
|
||
|
}
|
||
|
function replaceData(prevData, data, options) {
|
||
|
if (typeof options.structuralSharing === "function") {
|
||
|
return options.structuralSharing(prevData, data);
|
||
|
} else if (options.structuralSharing !== false) {
|
||
|
return replaceEqualDeep(prevData, data);
|
||
|
}
|
||
|
return data;
|
||
|
}
|
||
|
function keepPreviousData(previousData) {
|
||
|
return previousData;
|
||
|
}
|
||
|
function addToEnd(items, item, max = 0) {
|
||
|
const newItems = [...items, item];
|
||
|
return max && newItems.length > max ? newItems.slice(1) : newItems;
|
||
|
}
|
||
|
function addToStart(items, item, max = 0) {
|
||
|
const newItems = [item, ...items];
|
||
|
return max && newItems.length > max ? newItems.slice(0, -1) : newItems;
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=utils.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js":
|
||
|
/*!********************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js ***!
|
||
|
\********************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryClientContext: function() { return /* binding */ QueryClientContext; },
|
||
|
/* harmony export */ QueryClientProvider: function() { return /* binding */ QueryClientProvider; },
|
||
|
/* harmony export */ useQueryClient: function() { return /* binding */ useQueryClient; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
"use client";
|
||
|
|
||
|
// src/QueryClientProvider.tsx
|
||
|
|
||
|
var QueryClientContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(
|
||
|
void 0
|
||
|
);
|
||
|
var useQueryClient = (queryClient) => {
|
||
|
const client = react__WEBPACK_IMPORTED_MODULE_0__.useContext(QueryClientContext);
|
||
|
if (queryClient) {
|
||
|
return queryClient;
|
||
|
}
|
||
|
if (!client) {
|
||
|
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
||
|
}
|
||
|
return client;
|
||
|
};
|
||
|
var QueryClientProvider = ({
|
||
|
client,
|
||
|
children
|
||
|
}) => {
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
||
|
client.mount();
|
||
|
return () => {
|
||
|
client.unmount();
|
||
|
};
|
||
|
}, [client]);
|
||
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(QueryClientContext.Provider, { value: client }, children);
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=QueryClientProvider.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js":
|
||
|
/*!************************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js ***!
|
||
|
\************************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryErrorResetBoundary: function() { return /* binding */ QueryErrorResetBoundary; },
|
||
|
/* harmony export */ useQueryErrorResetBoundary: function() { return /* binding */ useQueryErrorResetBoundary; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
"use client";
|
||
|
|
||
|
// src/QueryErrorResetBoundary.tsx
|
||
|
|
||
|
function createValue() {
|
||
|
let isReset = false;
|
||
|
return {
|
||
|
clearReset: () => {
|
||
|
isReset = false;
|
||
|
},
|
||
|
reset: () => {
|
||
|
isReset = true;
|
||
|
},
|
||
|
isReset: () => {
|
||
|
return isReset;
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
var QueryErrorResetBoundaryContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(createValue());
|
||
|
var useQueryErrorResetBoundary = () => react__WEBPACK_IMPORTED_MODULE_0__.useContext(QueryErrorResetBoundaryContext);
|
||
|
var QueryErrorResetBoundary = ({
|
||
|
children
|
||
|
}) => {
|
||
|
const [value] = react__WEBPACK_IMPORTED_MODULE_0__.useState(() => createValue());
|
||
|
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(QueryErrorResetBoundaryContext.Provider, { value }, typeof children === "function" ? children(value) : children);
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=QueryErrorResetBoundary.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js":
|
||
|
/*!*******************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js ***!
|
||
|
\*******************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ ensurePreventErrorBoundaryRetry: function() { return /* binding */ ensurePreventErrorBoundaryRetry; },
|
||
|
/* harmony export */ getHasError: function() { return /* binding */ getHasError; },
|
||
|
/* harmony export */ useClearResetErrorBoundary: function() { return /* binding */ useClearResetErrorBoundary; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/react-query/build/modern/utils.js");
|
||
|
"use client";
|
||
|
|
||
|
// src/errorBoundaryUtils.ts
|
||
|
|
||
|
|
||
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
|
||
|
if (options.suspense || options.throwOnError) {
|
||
|
if (!errorResetBoundary.isReset()) {
|
||
|
options.retryOnMount = false;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
var useClearResetErrorBoundary = (errorResetBoundary) => {
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
||
|
errorResetBoundary.clearReset();
|
||
|
}, [errorResetBoundary]);
|
||
|
};
|
||
|
var getHasError = ({
|
||
|
result,
|
||
|
errorResetBoundary,
|
||
|
throwOnError,
|
||
|
query
|
||
|
}) => {
|
||
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.shouldThrowError)(throwOnError, [result.error, query]);
|
||
|
};
|
||
|
|
||
|
//# sourceMappingURL=errorBoundaryUtils.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/isRestoring.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/isRestoring.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ IsRestoringProvider: function() { return /* binding */ IsRestoringProvider; },
|
||
|
/* harmony export */ useIsRestoring: function() { return /* binding */ useIsRestoring; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
"use client";
|
||
|
|
||
|
// src/isRestoring.ts
|
||
|
|
||
|
var IsRestoringContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(false);
|
||
|
var useIsRestoring = () => react__WEBPACK_IMPORTED_MODULE_0__.useContext(IsRestoringContext);
|
||
|
var IsRestoringProvider = IsRestoringContext.Provider;
|
||
|
|
||
|
//# sourceMappingURL=isRestoring.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/suspense.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/suspense.js ***!
|
||
|
\*********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ defaultThrowOnError: function() { return /* binding */ defaultThrowOnError; },
|
||
|
/* harmony export */ ensureStaleTime: function() { return /* binding */ ensureStaleTime; },
|
||
|
/* harmony export */ fetchOptimistic: function() { return /* binding */ fetchOptimistic; },
|
||
|
/* harmony export */ shouldSuspend: function() { return /* binding */ shouldSuspend; },
|
||
|
/* harmony export */ willFetch: function() { return /* binding */ willFetch; }
|
||
|
/* harmony export */ });
|
||
|
// src/suspense.ts
|
||
|
var defaultThrowOnError = (_error, query) => typeof query.state.data === "undefined";
|
||
|
var ensureStaleTime = (defaultedOptions) => {
|
||
|
if (defaultedOptions.suspense) {
|
||
|
if (typeof defaultedOptions.staleTime !== "number") {
|
||
|
defaultedOptions.staleTime = 1e3;
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
||
|
var shouldSuspend = (defaultedOptions, result, isRestoring) => defaultedOptions?.suspense && willFetch(result, isRestoring);
|
||
|
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
||
|
errorResetBoundary.clearReset();
|
||
|
});
|
||
|
|
||
|
//# sourceMappingURL=suspense.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js":
|
||
|
/*!*************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js ***!
|
||
|
\*************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ useBaseQuery: function() { return /* binding */ useBaseQuery; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _QueryErrorResetBoundary_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./QueryErrorResetBoundary.js */ "./node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js");
|
||
|
/* harmony import */ var _QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueryClientProvider.js */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
|
||
|
/* harmony import */ var _isRestoring_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./isRestoring.js */ "./node_modules/@tanstack/react-query/build/modern/isRestoring.js");
|
||
|
/* harmony import */ var _errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./errorBoundaryUtils.js */ "./node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js");
|
||
|
/* harmony import */ var _suspense_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./suspense.js */ "./node_modules/@tanstack/react-query/build/modern/suspense.js");
|
||
|
"use client";
|
||
|
|
||
|
// src/useBaseQuery.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function useBaseQuery(options, Observer, queryClient) {
|
||
|
if (true) {
|
||
|
if (typeof options !== "object" || Array.isArray(options)) {
|
||
|
throw new Error(
|
||
|
'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'
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
const client = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_1__.useQueryClient)(queryClient);
|
||
|
const isRestoring = (0,_isRestoring_js__WEBPACK_IMPORTED_MODULE_2__.useIsRestoring)();
|
||
|
const errorResetBoundary = (0,_QueryErrorResetBoundary_js__WEBPACK_IMPORTED_MODULE_3__.useQueryErrorResetBoundary)();
|
||
|
const defaultedOptions = client.defaultQueryOptions(options);
|
||
|
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
|
||
|
(0,_suspense_js__WEBPACK_IMPORTED_MODULE_4__.ensureStaleTime)(defaultedOptions);
|
||
|
(0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
|
||
|
(0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.useClearResetErrorBoundary)(errorResetBoundary);
|
||
|
const [observer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(
|
||
|
() => new Observer(
|
||
|
client,
|
||
|
defaultedOptions
|
||
|
)
|
||
|
);
|
||
|
const result = observer.getOptimisticResult(defaultedOptions);
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore(
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
|
||
|
(onStoreChange) => {
|
||
|
const unsubscribe = isRestoring ? () => void 0 : observer.subscribe(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_6__.notifyManager.batchCalls(onStoreChange));
|
||
|
observer.updateResult();
|
||
|
return unsubscribe;
|
||
|
},
|
||
|
[observer, isRestoring]
|
||
|
),
|
||
|
() => observer.getCurrentResult(),
|
||
|
() => observer.getCurrentResult()
|
||
|
);
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
||
|
observer.setOptions(defaultedOptions, { listeners: false });
|
||
|
}, [defaultedOptions, observer]);
|
||
|
if ((0,_suspense_js__WEBPACK_IMPORTED_MODULE_4__.shouldSuspend)(defaultedOptions, result, isRestoring)) {
|
||
|
throw (0,_suspense_js__WEBPACK_IMPORTED_MODULE_4__.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
|
||
|
}
|
||
|
if ((0,_errorBoundaryUtils_js__WEBPACK_IMPORTED_MODULE_5__.getHasError)({
|
||
|
result,
|
||
|
errorResetBoundary,
|
||
|
throwOnError: defaultedOptions.throwOnError,
|
||
|
query: observer.getCurrentQuery()
|
||
|
})) {
|
||
|
throw result.error;
|
||
|
}
|
||
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=useBaseQuery.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/useMutation.js":
|
||
|
/*!************************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/useMutation.js ***!
|
||
|
\************************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ useMutation: function() { return /* binding */ useMutation; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
||
|
/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/mutationObserver.js");
|
||
|
/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/notifyManager.js");
|
||
|
/* harmony import */ var _QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QueryClientProvider.js */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
|
||
|
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils.js */ "./node_modules/@tanstack/react-query/build/modern/utils.js");
|
||
|
"use client";
|
||
|
|
||
|
// src/useMutation.ts
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
function useMutation(options, queryClient) {
|
||
|
const client = (0,_QueryClientProvider_js__WEBPACK_IMPORTED_MODULE_1__.useQueryClient)(queryClient);
|
||
|
const [observer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(
|
||
|
() => new _tanstack_query_core__WEBPACK_IMPORTED_MODULE_2__.MutationObserver(
|
||
|
client,
|
||
|
options
|
||
|
)
|
||
|
);
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
|
||
|
observer.setOptions(options);
|
||
|
}, [observer, options]);
|
||
|
const result = react__WEBPACK_IMPORTED_MODULE_0__.useSyncExternalStore(
|
||
|
react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
|
||
|
(onStoreChange) => observer.subscribe(_tanstack_query_core__WEBPACK_IMPORTED_MODULE_3__.notifyManager.batchCalls(onStoreChange)),
|
||
|
[observer]
|
||
|
),
|
||
|
() => observer.getCurrentResult(),
|
||
|
() => observer.getCurrentResult()
|
||
|
);
|
||
|
const mutate = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(
|
||
|
(variables, mutateOptions) => {
|
||
|
observer.mutate(variables, mutateOptions).catch(noop);
|
||
|
},
|
||
|
[observer]
|
||
|
);
|
||
|
if (result.error && (0,_utils_js__WEBPACK_IMPORTED_MODULE_4__.shouldThrowError)(observer.options.throwOnError, [result.error])) {
|
||
|
throw result.error;
|
||
|
}
|
||
|
return { ...result, mutate, mutateAsync: result.mutate };
|
||
|
}
|
||
|
function noop() {
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=useMutation.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/useQuery.js":
|
||
|
/*!*********************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/useQuery.js ***!
|
||
|
\*********************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ useQuery: function() { return /* binding */ useQuery; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/query-core */ "./node_modules/@tanstack/query-core/build/modern/queryObserver.js");
|
||
|
/* harmony import */ var _useBaseQuery_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./useBaseQuery.js */ "./node_modules/@tanstack/react-query/build/modern/useBaseQuery.js");
|
||
|
"use client";
|
||
|
|
||
|
// src/useQuery.ts
|
||
|
|
||
|
|
||
|
function useQuery(options, queryClient) {
|
||
|
return (0,_useBaseQuery_js__WEBPACK_IMPORTED_MODULE_0__.useBaseQuery)(options, _tanstack_query_core__WEBPACK_IMPORTED_MODULE_1__.QueryObserver, queryClient);
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=useQuery.js.map
|
||
|
|
||
|
/***/ }),
|
||
|
|
||
|
/***/ "./node_modules/@tanstack/react-query/build/modern/utils.js":
|
||
|
/*!******************************************************************!*\
|
||
|
!*** ./node_modules/@tanstack/react-query/build/modern/utils.js ***!
|
||
|
\******************************************************************/
|
||
|
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
||
|
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ shouldThrowError: function() { return /* binding */ shouldThrowError; }
|
||
|
/* harmony export */ });
|
||
|
// src/utils.ts
|
||
|
function shouldThrowError(throwError, params) {
|
||
|
if (typeof throwError === "function") {
|
||
|
return throwError(...params);
|
||
|
}
|
||
|
return !!throwError;
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=utils.js.map
|
||
|
|
||
|
/***/ })
|
||
|
|
||
|
/******/ });
|
||
|
/************************************************************************/
|
||
|
/******/ // The module cache
|
||
|
/******/ var __webpack_module_cache__ = {};
|
||
|
/******/
|
||
|
/******/ // The require function
|
||
|
/******/ function __webpack_require__(moduleId) {
|
||
|
/******/ // Check if module is in cache
|
||
|
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
||
|
/******/ if (cachedModule !== undefined) {
|
||
|
/******/ return cachedModule.exports;
|
||
|
/******/ }
|
||
|
/******/ // Create a new module (and put it into the cache)
|
||
|
/******/ var module = __webpack_module_cache__[moduleId] = {
|
||
|
/******/ // no module.id needed
|
||
|
/******/ // no module.loaded needed
|
||
|
/******/ exports: {}
|
||
|
/******/ };
|
||
|
/******/
|
||
|
/******/ // Execute the module function
|
||
|
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
||
|
/******/
|
||
|
/******/ // Return the exports of the module
|
||
|
/******/ return module.exports;
|
||
|
/******/ }
|
||
|
/******/
|
||
|
/************************************************************************/
|
||
|
/******/ /* webpack/runtime/define property getters */
|
||
|
/******/ !function() {
|
||
|
/******/ // define getter functions for harmony exports
|
||
|
/******/ __webpack_require__.d = function(exports, definition) {
|
||
|
/******/ for(var key in definition) {
|
||
|
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
||
|
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
||
|
/******/ }
|
||
|
/******/ }
|
||
|
/******/ };
|
||
|
/******/ }();
|
||
|
/******/
|
||
|
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
||
|
/******/ !function() {
|
||
|
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
||
|
/******/ }();
|
||
|
/******/
|
||
|
/******/ /* webpack/runtime/make namespace object */
|
||
|
/******/ !function() {
|
||
|
/******/ // define __esModule on exports
|
||
|
/******/ __webpack_require__.r = function(exports) {
|
||
|
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||
|
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||
|
/******/ }
|
||
|
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||
|
/******/ };
|
||
|
/******/ }();
|
||
|
/******/
|
||
|
/************************************************************************/
|
||
|
var __webpack_exports__ = {};
|
||
|
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
||
|
!function() {
|
||
|
/*!******************************************************!*\
|
||
|
!*** ./node_modules/@elementor/query/dist/index.mjs ***!
|
||
|
\******************************************************/
|
||
|
__webpack_require__.r(__webpack_exports__);
|
||
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||
|
/* harmony export */ QueryClient: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.QueryClient; },
|
||
|
/* harmony export */ QueryClientProvider: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__.QueryClientProvider; },
|
||
|
/* harmony export */ createQueryClient: function() { return /* binding */ createQueryClient; },
|
||
|
/* harmony export */ useMutation: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_2__.useMutation; },
|
||
|
/* harmony export */ useQuery: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_3__.useQuery; },
|
||
|
/* harmony export */ useQueryClient: function() { return /* reexport safe */ _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__.useQueryClient; }
|
||
|
/* harmony export */ });
|
||
|
/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/query-core/build/modern/queryClient.js");
|
||
|
/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js");
|
||
|
/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useMutation.js");
|
||
|
/* harmony import */ var _tanstack_react_query__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tanstack/react-query */ "./node_modules/@tanstack/react-query/build/modern/useQuery.js");
|
||
|
// src/index.ts
|
||
|
|
||
|
|
||
|
function createQueryClient() {
|
||
|
return new _tanstack_react_query__WEBPACK_IMPORTED_MODULE_0__.QueryClient({
|
||
|
defaultOptions: {
|
||
|
queries: {
|
||
|
refetchOnWindowFocus: false,
|
||
|
refetchOnReconnect: false
|
||
|
}
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//# sourceMappingURL=index.mjs.map
|
||
|
}();
|
||
|
(window.elementorV2 = window.elementorV2 || {}).query = __webpack_exports__;
|
||
|
/******/ })()
|
||
|
;
|