). We want to deprecate key spread,
// but as an intermediary step, we will use jsxDEV for everything except
//
, because we aren't currently able to tell if
// key is explicitly declared to be undefined or not.
if (maybeKey !== undefined) {
{
checkKeyStringCoercion(maybeKey);
}
key = '' + maybeKey;
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key = '' + config.key;
}
if (hasValidRef(config)) {
ref = config.ref;
warnIfStringRefCannotBeAutoConverted(config, self);
} // Remaining properties are added to a new props object
for (propName in config) {
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
} // Resolve default props
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === undefined) {
props[propName] = defaultProps[propName];
}
}
}
if (key || ref) {
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
if (key) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
}
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
var propTypesMisspellWarningShown;
{
propTypesMisspellWarningShown = false;
}
/**
* Verifies the object is a ReactElement.
* See https://reactjs.org/docs/react-api.html#isvalidelement
* @param {?object} object
* @return {boolean} True if `object` is a ReactElement.
* @final
*/
function isValidElement(object) {
{
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
}
function getDeclarationErrorAddendum() {
{
if (ReactCurrentOwner$1.current) {
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
if (name) {
return '\n\nCheck the render method of `' + name + '`.';
}
}
return '';
}
}
function getSourceInfoErrorAddendum(source) {
{
if (source !== undefined) {
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
var lineNumber = source.lineNumber;
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
}
return '';
}
}
/**
* Warn if there's no key explicitly set on dynamic arrays of children or
* object keys are not valid. This allows us to keep track of children between
* updates.
*/
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
{
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
}
}
return info;
}
}
/**
* Warn if the element doesn't have an explicit key assigned to it.
* This element is in an array. The array could grow and shrink or be
* reordered. All children that haven't already been validated are required to
* have a "key" property assigned to it. Error statuses are cached so a warning
* will only be shown once.
*
* @internal
* @param {ReactElement} element Element that requires a key.
* @param {*} parentType element's parent's type.
*/
function validateExplicitKey(element, parentType) {
{
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
return;
}
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
// property, it may be the creator of the child that's responsible for
// assigning it a key.
var childOwner = '';
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
// Give the component that originally created this child.
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
}
setCurrentlyValidatingElement$1(element);
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
setCurrentlyValidatingElement$1(null);
}
}
/**
* Ensure that every element either is passed in a static location, in an
* array with an explicit keys property defined, or in an object literal
* with valid key property.
*
* @internal
* @param {ReactNode} node Statically passed child of any type.
* @param {*} parentType node's parent's type.
*/
function validateChildKeys(node, parentType) {
{
if (typeof node !== 'object') {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (isValidElement(node)) {
// This element was passed in a valid location.
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (typeof iteratorFn === 'function') {
// Entry iterators used to provide implicit keys,
// but now we print a separate warning for them later.
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
}
/**
* Given an element, validate that its props follow the propTypes definition,
* provided by the type.
*
* @param {ReactElement} element
*/
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === undefined || typeof type === 'string') {
return;
}
var propTypes;
if (typeof type === 'function') {
propTypes = type.propTypes;
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
type.$$typeof === REACT_MEMO_TYPE)) {
propTypes = type.propTypes;
} else {
return;
}
if (propTypes) {
// Intentionally inside to avoid triggering lazy initializers:
var name = getComponentNameFromType(type);
checkPropTypes(propTypes, element.props, 'prop', name, element);
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
var _name = getComponentNameFromType(type);
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
}
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
}
}
}
/**
* Given a fragment, validate that it can only be provided with fragment props
* @param {ReactElement} fragment
*/
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (key !== 'children' && key !== 'key') {
setCurrentlyValidatingElement$1(fragment);
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
setCurrentlyValidatingElement$1(null);
break;
}
}
if (fragment.ref !== null) {
setCurrentlyValidatingElement$1(fragment);
error('Invalid attribute `ref` supplied to `React.Fragment`.');
setCurrentlyValidatingElement$1(null);
}
}
}
var didWarnAboutKeySpread = {};
function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
{
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
if (!validType) {
var info = '';
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
}
var sourceInfo = getSourceInfoErrorAddendum(source);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
var typeString;
if (type === null) {
typeString = 'null';
} else if (isArray(type)) {
typeString = 'array';
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
info = ' Did you accidentally export a JSX literal instead of a component?';
} else {
typeString = typeof type;
}
error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
}
var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
// TODO: Drop this when these are no longer allowed as the type argument.
if (element == null) {
return element;
} // Skip key warning if the type isn't valid since our key validation logic
// doesn't expect a non-string/function type and can throw confusing errors.
// We don't want exception behavior to differ between dev and prod.
// (Rendering will throw with a helpful message and as soon as the type is
// fixed, the key warnings will appear.)
if (validType) {
var children = props.children;
if (children !== undefined) {
if (isStaticChildren) {
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
validateChildKeys(children[i], type);
}
if (Object.freeze) {
Object.freeze(children);
}
} else {
error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
}
} else {
validateChildKeys(children, type);
}
}
}
{
if (hasOwnProperty.call(props, 'key')) {
var componentName = getComponentNameFromType(type);
var keys = Object.keys(props).filter(function (k) {
return k !== 'key';
});
var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
didWarnAboutKeySpread[componentName + beforeExample] = true;
}
}
}
if (type === REACT_FRAGMENT_TYPE) {
validateFragmentProps(element);
} else {
validatePropTypes(element);
}
return element;
}
} // These two functions exist to still get child warnings in dev
// even with the prod transform. This means that jsxDEV is purely
// opt-in behavior for better messages but that we won't stop
// giving you warnings if you use production apis.
function jsxWithValidationStatic(type, props, key) {
{
return jsxWithValidation(type, props, key, true);
}
}
function jsxWithValidationDynamic(type, props, key) {
{
return jsxWithValidation(type, props, key, false);
}
}
var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
// for now we can ship identical prod functions
var jsxs = jsxWithValidationStatic ;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsx;
exports.jsxs = jsxs;
})();
}
/***/ }),
/***/ "../node_modules/react/jsx-runtime.js":
/*!********************************************!*\
!*** ../node_modules/react/jsx-runtime.js ***!
\********************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
if (false) {} else {
module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ "../node_modules/react/cjs/react-jsx-runtime.development.js");
}
/***/ }),
/***/ "react":
/*!************************!*\
!*** external "React" ***!
\************************/
/***/ ((module) => {
"use strict";
module.exports = React;
/***/ }),
/***/ "react-dom":
/*!***************************!*\
!*** external "ReactDOM" ***!
\***************************/
/***/ ((module) => {
"use strict";
module.exports = ReactDOM;
/***/ }),
/***/ "@elementor/editor-app-bar":
/*!*******************************************!*\
!*** external "elementorV2.editorAppBar" ***!
\*******************************************/
/***/ ((module) => {
"use strict";
module.exports = elementorV2.editorAppBar;
/***/ }),
/***/ "@elementor/editor-v1-adapters":
/*!***********************************************!*\
!*** external "elementorV2.editorV1Adapters" ***!
\***********************************************/
/***/ ((module) => {
"use strict";
module.exports = elementorV2.editorV1Adapters;
/***/ }),
/***/ "@elementor/icons":
/*!************************************!*\
!*** external "elementorV2.icons" ***!
\************************************/
/***/ ((module) => {
"use strict";
module.exports = elementorV2.icons;
/***/ }),
/***/ "@elementor/icons/RocketIcon":
/*!**************************************************!*\
!*** external "elementorV2.icons['RocketIcon']" ***!
\**************************************************/
/***/ ((module) => {
"use strict";
module.exports = elementorV2.icons['RocketIcon'];
/***/ }),
/***/ "@elementor/ui":
/*!*********************************!*\
!*** external "elementorV2.ui" ***!
\*********************************/
/***/ ((module) => {
"use strict";
module.exports = elementorV2.ui;
/***/ }),
/***/ "@wordpress/i18n":
/*!**************************!*\
!*** external "wp.i18n" ***!
\**************************/
/***/ ((module) => {
"use strict";
module.exports = wp.i18n;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
/*!******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
\******************************************************************/
/***/ ((module) => {
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
\****************************************************************/
/***/ ((module) => {
function _arrayWithHoles(r) {
if (Array.isArray(r)) return r;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
/*!*******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return arrayLikeToArray(r);
}
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js":
/*!***********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
\***********************************************************************/
/***/ ((module) => {
function _assertThisInitialized(e) {
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return e;
}
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js":
/*!******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
\******************************************************************/
/***/ ((module) => {
function asyncGeneratorStep(n, t, e, r, o, a, c) {
try {
var i = n[a](c),
u = i.value;
} catch (n) {
return void e(n);
}
i.done ? t(u) : Promise.resolve(u).then(r, o);
}
function _asyncToGenerator(n) {
return function () {
var t = this,
e = arguments;
return new Promise(function (r, o) {
var a = n.apply(t, e);
function _next(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
}
function _throw(n) {
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
}
_next(void 0);
});
};
}
module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/classCallCheck.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/classCallCheck.js ***!
\****************************************************************/
/***/ ((module) => {
function _classCallCheck(a, n) {
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
}
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/createClass.js":
/*!*************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/createClass.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
function _defineProperties(e, r) {
for (var t = 0; t < r.length; t++) {
var o = r[t];
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
}
}
function _createClass(e, r, t) {
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
writable: !1
}), e;
}
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/defineProperty.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/defineProperty.js ***!
\****************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "../node_modules/@babel/runtime/helpers/toPropertyKey.js");
function _defineProperty(e, r, t) {
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/getPrototypeOf.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
\****************************************************************/
/***/ ((module) => {
function _getPrototypeOf(t) {
return module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {
return t.__proto__ || Object.getPrototypeOf(t);
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _getPrototypeOf(t);
}
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/inherits.js":
/*!**********************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/inherits.js ***!
\**********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js");
function _inherits(t, e) {
if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function");
t.prototype = Object.create(e && e.prototype, {
constructor: {
value: t,
writable: !0,
configurable: !0
}
}), Object.defineProperty(t, "prototype", {
writable: !1
}), e && setPrototypeOf(t, e);
}
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js":
/*!***********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
\***********************************************************************/
/***/ ((module) => {
function _interopRequireDefault(e) {
return e && e.__esModule ? e : {
"default": e
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/iterableToArray.js":
/*!*****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/iterableToArray.js ***!
\*****************************************************************/
/***/ ((module) => {
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
/*!**********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
\**********************************************************************/
/***/ ((module) => {
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/nonIterableRest.js":
/*!*****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
\*****************************************************************/
/***/ ((module) => {
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js":
/*!*******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
\*******************************************************************/
/***/ ((module) => {
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
/*!***************************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "../node_modules/@babel/runtime/helpers/assertThisInitialized.js");
function _possibleConstructorReturn(t, e) {
if (e && ("object" == _typeof(e) || "function" == typeof e)) return e;
if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined");
return assertThisInitialized(t);
}
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js":
/*!********************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
function _regeneratorRuntime() {
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
return e;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
var t,
e = {},
r = Object.prototype,
n = r.hasOwnProperty,
o = Object.defineProperty || function (t, e, r) {
t[e] = r.value;
},
i = "function" == typeof Symbol ? Symbol : {},
a = i.iterator || "@@iterator",
c = i.asyncIterator || "@@asyncIterator",
u = i.toStringTag || "@@toStringTag";
function define(t, e, r) {
return Object.defineProperty(t, e, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}), t[e];
}
try {
define({}, "");
} catch (t) {
define = function define(t, e, r) {
return t[e] = r;
};
}
function wrap(t, e, r, n) {
var i = e && e.prototype instanceof Generator ? e : Generator,
a = Object.create(i.prototype),
c = new Context(n || []);
return o(a, "_invoke", {
value: makeInvokeMethod(t, r, c)
}), a;
}
function tryCatch(t, e, r) {
try {
return {
type: "normal",
arg: t.call(e, r)
};
} catch (t) {
return {
type: "throw",
arg: t
};
}
}
e.wrap = wrap;
var h = "suspendedStart",
l = "suspendedYield",
f = "executing",
s = "completed",
y = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var p = {};
define(p, a, function () {
return this;
});
var d = Object.getPrototypeOf,
v = d && d(d(values([])));
v && v !== r && n.call(v, a) && (p = v);
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
function defineIteratorMethods(t) {
["next", "throw", "return"].forEach(function (e) {
define(t, e, function (t) {
return this._invoke(e, t);
});
});
}
function AsyncIterator(t, e) {
function invoke(r, o, i, a) {
var c = tryCatch(t[r], t, o);
if ("throw" !== c.type) {
var u = c.arg,
h = u.value;
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
invoke("next", t, i, a);
}, function (t) {
invoke("throw", t, i, a);
}) : e.resolve(h).then(function (t) {
u.value = t, i(u);
}, function (t) {
return invoke("throw", t, i, a);
});
}
a(c.arg);
}
var r;
o(this, "_invoke", {
value: function value(t, n) {
function callInvokeWithMethodAndArg() {
return new e(function (e, r) {
invoke(t, n, e, r);
});
}
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
});
}
function makeInvokeMethod(e, r, n) {
var o = h;
return function (i, a) {
if (o === f) throw Error("Generator is already running");
if (o === s) {
if ("throw" === i) throw a;
return {
value: t,
done: !0
};
}
for (n.method = i, n.arg = a;;) {
var c = n.delegate;
if (c) {
var u = maybeInvokeDelegate(c, n);
if (u) {
if (u === y) continue;
return u;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
if (o === h) throw o = s, n.arg;
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
o = f;
var p = tryCatch(e, r, n);
if ("normal" === p.type) {
if (o = n.done ? s : l, p.arg === y) continue;
return {
value: p.arg,
done: n.done
};
}
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
}
};
}
function maybeInvokeDelegate(e, r) {
var n = r.method,
o = e.iterator[n];
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
var i = tryCatch(o, e.iterator, r.arg);
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
var a = i.arg;
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
}
function pushTryEntry(t) {
var e = {
tryLoc: t[0]
};
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
}
function resetTryEntry(t) {
var e = t.completion || {};
e.type = "normal", delete e.arg, t.completion = e;
}
function Context(t) {
this.tryEntries = [{
tryLoc: "root"
}], t.forEach(pushTryEntry, this), this.reset(!0);
}
function values(e) {
if (e || "" === e) {
var r = e[a];
if (r) return r.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var o = -1,
i = function next() {
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
return next.value = t, next.done = !0, next;
};
return i.next = i;
}
}
throw new TypeError(_typeof(e) + " is not iterable");
}
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
value: GeneratorFunctionPrototype,
configurable: !0
}), o(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: !0
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
var e = "function" == typeof t && t.constructor;
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
}, e.mark = function (t) {
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
}, e.awrap = function (t) {
return {
__await: t
};
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
return this;
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
void 0 === i && (i = Promise);
var a = new AsyncIterator(wrap(t, r, n, o), i);
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
return t.done ? t.value : a.next();
});
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
return this;
}), define(g, "toString", function () {
return "[object Generator]";
}), e.keys = function (t) {
var e = Object(t),
r = [];
for (var n in e) r.push(n);
return r.reverse(), function next() {
for (; r.length;) {
var t = r.pop();
if (t in e) return next.value = t, next.done = !1, next;
}
return next.done = !0, next;
};
}, e.values = values, Context.prototype = {
constructor: Context,
reset: function reset(e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
},
stop: function stop() {
this.done = !0;
var t = this.tryEntries[0].completion;
if ("throw" === t.type) throw t.arg;
return this.rval;
},
dispatchException: function dispatchException(e) {
if (this.done) throw e;
var r = this;
function handle(n, o) {
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
}
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
var i = this.tryEntries[o],
a = i.completion;
if ("root" === i.tryLoc) return handle("end");
if (i.tryLoc <= this.prev) {
var c = n.call(i, "catchLoc"),
u = n.call(i, "finallyLoc");
if (c && u) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
} else if (c) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
} else {
if (!u) throw Error("try statement without catch or finally");
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
}
}
}
},
abrupt: function abrupt(t, e) {
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var o = this.tryEntries[r];
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
var i = o;
break;
}
}
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
var a = i ? i.completion : {};
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
},
complete: function complete(t, e) {
if ("throw" === t.type) throw t.arg;
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
},
finish: function finish(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
}
},
"catch": function _catch(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.tryLoc === t) {
var n = r.completion;
if ("throw" === n.type) {
var o = n.arg;
resetTryEntry(r);
}
return o;
}
}
throw Error("illegal catch attempt");
},
delegateYield: function delegateYield(e, r, n) {
return this.delegate = {
iterator: values(e),
resultName: r,
nextLoc: n
}, "next" === this.method && (this.arg = t), y;
}
}, e;
}
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/setPrototypeOf.js":
/*!****************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
\****************************************************************/
/***/ ((module) => {
function _setPrototypeOf(t, e) {
return module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
return t.__proto__ = e, t;
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _setPrototypeOf(t, e);
}
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/slicedToArray.js":
/*!***************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/slicedToArray.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithHoles.js");
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "../node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "../node_modules/@babel/runtime/helpers/nonIterableRest.js");
function _slicedToArray(r, e) {
return arrayWithHoles(r) || iterableToArrayLimit(r, e) || unsupportedIterableToArray(r, e) || nonIterableRest();
}
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/toConsumableArray.js":
/*!*******************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "../node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "../node_modules/@babel/runtime/helpers/iterableToArray.js");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "../node_modules/@babel/runtime/helpers/nonIterableSpread.js");
function _toConsumableArray(r) {
return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
}
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/toPrimitive.js":
/*!*************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/toPrimitive.js ***!
\*************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
function toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/toPropertyKey.js":
/*!***************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
\***************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var _typeof = (__webpack_require__(/*! ./typeof.js */ "../node_modules/@babel/runtime/helpers/typeof.js")["default"]);
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "../node_modules/@babel/runtime/helpers/toPrimitive.js");
function toPropertyKey(t) {
var i = toPrimitive(t, "string");
return "symbol" == _typeof(i) ? i : i + "";
}
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/typeof.js":
/*!********************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/typeof.js ***!
\********************************************************/
/***/ ((module) => {
function _typeof(o) {
"@babel/helpers - typeof";
return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
/*!****************************************************************************!*\
!*** ../node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
\****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "../node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
}
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "../node_modules/@babel/runtime/regenerator/index.js":
/*!***********************************************************!*\
!*** ../node_modules/@babel/runtime/regenerator/index.js ***!
\***********************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
// TODO(Babel 8): Remove this file.
var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "../node_modules/@babel/runtime/helpers/regeneratorRuntime.js")();
module.exports = runtime;
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
if (typeof globalThis === "object") {
globalThis.regeneratorRuntime = runtime;
} else {
Function("r", "regeneratorRuntime = r")(runtime);
}
}
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs":
/*!**************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/focusManager.cjs ***!
\**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/focusManager.ts
var focusManager_exports = {};
__export(focusManager_exports, {
FocusManager: () => FocusManager,
focusManager: () => focusManager
});
module.exports = __toCommonJS(focusManager_exports);
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var FocusManager = class extends import_subscribable.Subscribable {
#focused;
#cleanup;
#setup;
constructor() {
super();
this.#setup = (onFocus) => {
if (!import_utils.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() {
const isFocused = this.isFocused();
this.listeners.forEach((listener) => {
listener(isFocused);
});
}
isFocused() {
if (typeof this.#focused === "boolean") {
return this.#focused;
}
return globalThis.document?.visibilityState !== "hidden";
}
};
var focusManager = new FocusManager();
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=focusManager.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs":
/*!***********************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/hydration.cjs ***!
\***********************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/hydration.ts
var hydration_exports = {};
__export(hydration_exports, {
defaultShouldDehydrateMutation: () => defaultShouldDehydrateMutation,
defaultShouldDehydrateQuery: () => defaultShouldDehydrateQuery,
dehydrate: () => dehydrate,
hydrate: () => hydrate
});
module.exports = __toCommonJS(hydration_exports);
function defaultTransformerFn(data) {
return data;
}
function dehydrateMutation(mutation) {
return {
mutationKey: mutation.options.mutationKey,
state: mutation.state,
...mutation.options.scope && { scope: mutation.options.scope },
...mutation.meta && { meta: mutation.meta }
};
}
function dehydrateQuery(query, serializeData) {
return {
state: {
...query.state,
...query.state.data !== void 0 && {
data: serializeData(query.state.data)
}
},
queryKey: query.queryKey,
queryHash: query.queryHash,
...query.state.status === "pending" && {
promise: query.promise?.then(serializeData).catch((error) => {
if (true) {
console.error(
`A query that was dehydrated as pending ended up rejecting. [${query.queryHash}]: ${error}; The error will be redacted in production builds`
);
}
return Promise.reject(new Error("redacted"));
})
},
...query.meta && { meta: query.meta }
};
}
function defaultShouldDehydrateMutation(mutation) {
return mutation.state.isPaused;
}
function defaultShouldDehydrateQuery(query) {
return query.state.status === "success";
}
function dehydrate(client, options = {}) {
const filterMutation = options.shouldDehydrateMutation ?? client.getDefaultOptions().dehydrate?.shouldDehydrateMutation ?? defaultShouldDehydrateMutation;
const mutations = client.getMutationCache().getAll().flatMap(
(mutation) => filterMutation(mutation) ? [dehydrateMutation(mutation)] : []
);
const filterQuery = options.shouldDehydrateQuery ?? client.getDefaultOptions().dehydrate?.shouldDehydrateQuery ?? defaultShouldDehydrateQuery;
const serializeData = options.serializeData ?? client.getDefaultOptions().dehydrate?.serializeData ?? defaultTransformerFn;
const queries = client.getQueryCache().getAll().flatMap(
(query) => filterQuery(query) ? [dehydrateQuery(query, serializeData)] : []
);
return { mutations, queries };
}
function hydrate(client, dehydratedState, options) {
if (typeof dehydratedState !== "object" || dehydratedState === null) {
return;
}
const mutationCache = client.getMutationCache();
const queryCache = client.getQueryCache();
const deserializeData = options?.defaultOptions?.deserializeData ?? client.getDefaultOptions().hydrate?.deserializeData ?? defaultTransformerFn;
const mutations = dehydratedState.mutations || [];
const queries = dehydratedState.queries || [];
mutations.forEach(({ state, ...mutationOptions }) => {
mutationCache.build(
client,
{
...client.getDefaultOptions().hydrate?.mutations,
...options?.defaultOptions?.mutations,
...mutationOptions
},
state
);
});
queries.forEach(({ queryKey, state, queryHash, meta, promise }) => {
let query = queryCache.get(queryHash);
const data = state.data === void 0 ? state.data : deserializeData(state.data);
if (query) {
if (query.state.dataUpdatedAt < state.dataUpdatedAt) {
const { fetchStatus: _ignored, ...serializedState } = state;
query.setState({
...serializedState,
data
});
}
} else {
query = queryCache.build(
client,
{
...client.getDefaultOptions().hydrate?.queries,
...options?.defaultOptions?.queries,
queryKey,
queryHash,
meta
},
// Reset fetch status to idle to avoid
// query being stuck in fetching state upon hydration
{
...state,
data,
fetchStatus: "idle"
}
);
}
if (promise) {
const initialPromise = Promise.resolve(promise).then(deserializeData);
void query.fetch(void 0, { initialPromise });
}
});
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=hydration.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/index.cjs":
/*!*******************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/index.cjs ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
CancelledError: () => import_retryer.CancelledError,
InfiniteQueryObserver: () => import_infiniteQueryObserver.InfiniteQueryObserver,
Mutation: () => import_mutation.Mutation,
MutationCache: () => import_mutationCache.MutationCache,
MutationObserver: () => import_mutationObserver.MutationObserver,
QueriesObserver: () => import_queriesObserver.QueriesObserver,
Query: () => import_query.Query,
QueryCache: () => import_queryCache.QueryCache,
QueryClient: () => import_queryClient.QueryClient,
QueryObserver: () => import_queryObserver.QueryObserver,
defaultShouldDehydrateMutation: () => import_hydration.defaultShouldDehydrateMutation,
defaultShouldDehydrateQuery: () => import_hydration.defaultShouldDehydrateQuery,
dehydrate: () => import_hydration.dehydrate,
focusManager: () => import_focusManager.focusManager,
hashKey: () => import_utils.hashKey,
hydrate: () => import_hydration.hydrate,
isCancelledError: () => import_retryer2.isCancelledError,
isServer: () => import_utils.isServer,
keepPreviousData: () => import_utils.keepPreviousData,
matchMutation: () => import_utils.matchMutation,
matchQuery: () => import_utils.matchQuery,
notifyManager: () => import_notifyManager.notifyManager,
onlineManager: () => import_onlineManager.onlineManager,
replaceEqualDeep: () => import_utils.replaceEqualDeep,
skipToken: () => import_utils.skipToken
});
module.exports = __toCommonJS(src_exports);
var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
var import_queryClient = __webpack_require__(/*! ./queryClient.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs");
var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
var import_queriesObserver = __webpack_require__(/*! ./queriesObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs");
var import_infiniteQueryObserver = __webpack_require__(/*! ./infiniteQueryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs");
var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
var import_mutationObserver = __webpack_require__(/*! ./mutationObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var import_retryer2 = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
var import_hydration = __webpack_require__(/*! ./hydration.cjs */ "../node_modules/@tanstack/query-core/build/modern/hydration.cjs");
__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/query-core/build/modern/types.cjs"), module.exports);
var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=index.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs":
/*!***********************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs ***!
\***********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/infiniteQueryBehavior.ts
var infiniteQueryBehavior_exports = {};
__export(infiniteQueryBehavior_exports, {
hasNextPage: () => hasNextPage,
hasPreviousPage: () => hasPreviousPage,
infiniteQueryBehavior: () => infiniteQueryBehavior
});
module.exports = __toCommonJS(infiniteQueryBehavior_exports);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
function infiniteQueryBehavior(pages) {
return {
onFetch: (context, query) => {
const options = context.options;
const direction = context.fetchOptions?.meta?.fetchMore?.direction;
const oldPages = context.state.data?.pages || [];
const oldPageParams = context.state.data?.pageParams || [];
let result = { pages: [], pageParams: [] };
let currentPage = 0;
const fetchFn = async () => {
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 = (0, import_utils.ensureQueryFn)(context.options, context.fetchOptions);
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 ? import_utils.addToStart : import_utils.addToEnd;
return {
pages: addTo(data.pages, page, maxPages),
pageParams: addTo(data.pageParams, param, maxPages)
};
};
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 {
const remainingPages = pages ?? oldPages.length;
do {
const param = currentPage === 0 ? oldPageParams[0] ?? options.initialPageParam : getNextPageParam(options, result);
if (currentPage > 0 && param == null) {
break;
}
result = await fetchPage(result, param);
currentPage++;
} while (currentPage < remainingPages);
}
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 pages.length > 0 ? options.getNextPageParam(
pages[lastIndex],
pages,
pageParams[lastIndex],
pageParams
) : void 0;
}
function getPreviousPageParam(options, { pages, pageParams }) {
return pages.length > 0 ? options.getPreviousPageParam?.(pages[0], pages, pageParams[0], pageParams) : void 0;
}
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;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=infiniteQueryBehavior.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs":
/*!***********************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.cjs ***!
\***********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/infiniteQueryObserver.ts
var infiniteQueryObserver_exports = {};
__export(infiniteQueryObserver_exports, {
InfiniteQueryObserver: () => InfiniteQueryObserver
});
module.exports = __toCommonJS(infiniteQueryObserver_exports);
var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
var InfiniteQueryObserver = class extends import_queryObserver.QueryObserver {
constructor(client, options) {
super(client, options);
}
bindMethods() {
super.bindMethods();
this.fetchNextPage = this.fetchNextPage.bind(this);
this.fetchPreviousPage = this.fetchPreviousPage.bind(this);
}
setOptions(options, notifyOptions) {
super.setOptions(
{
...options,
behavior: (0, import_infiniteQueryBehavior.infiniteQueryBehavior)()
},
notifyOptions
);
}
getOptimisticResult(options) {
options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)();
return super.getOptimisticResult(options);
}
fetchNextPage(options) {
return this.fetch({
...options,
meta: {
fetchMore: { direction: "forward" }
}
});
}
fetchPreviousPage(options) {
return this.fetch({
...options,
meta: {
fetchMore: { direction: "backward" }
}
});
}
createResult(query, options) {
const { state } = query;
const parentResult = super.createResult(query, options);
const { isFetching, isRefetching, isError, isRefetchError } = parentResult;
const fetchDirection = state.fetchMeta?.fetchMore?.direction;
const isFetchNextPageError = isError && fetchDirection === "forward";
const isFetchingNextPage = isFetching && fetchDirection === "forward";
const isFetchPreviousPageError = isError && fetchDirection === "backward";
const isFetchingPreviousPage = isFetching && fetchDirection === "backward";
const result = {
...parentResult,
fetchNextPage: this.fetchNextPage,
fetchPreviousPage: this.fetchPreviousPage,
hasNextPage: (0, import_infiniteQueryBehavior.hasNextPage)(options, state.data),
hasPreviousPage: (0, import_infiniteQueryBehavior.hasPreviousPage)(options, state.data),
isFetchNextPageError,
isFetchingNextPage,
isFetchPreviousPageError,
isFetchingPreviousPage,
isRefetchError: isRefetchError && !isFetchNextPageError && !isFetchPreviousPageError,
isRefetching: isRefetching && !isFetchingNextPage && !isFetchingPreviousPage
};
return result;
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=infiniteQueryObserver.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs":
/*!**********************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/mutation.cjs ***!
\**********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/mutation.ts
var mutation_exports = {};
__export(mutation_exports, {
Mutation: () => Mutation,
getDefaultState: () => getDefaultState
});
module.exports = __toCommonJS(mutation_exports);
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
var Mutation = class extends import_removable.Removable {
#observers;
#mutationCache;
#retryer;
constructor(config) {
super();
this.mutationId = config.mutationId;
this.#mutationCache = config.mutationCache;
this.#observers = [];
this.state = config.state || getDefaultState();
this.setOptions(config.options);
this.scheduleGc();
}
setOptions(options) {
this.options = 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) {
this.#retryer = (0, import_retryer.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,
canRun: () => this.#mutationCache.canRun(this)
});
const restored = this.state.status === "pending";
const isPaused = !this.#retryer.canStart();
try {
if (!restored) {
this.#dispatch({ type: "pending", variables, isPaused });
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,
isPaused
});
}
}
const data = await this.#retryer.start();
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 });
}
} finally {
this.#mutationCache.runNext(this);
}
}
#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: action.isPaused,
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);
import_notifyManager.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
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=mutation.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/mutationCache.ts
var mutationCache_exports = {};
__export(mutationCache_exports, {
MutationCache: () => MutationCache
});
module.exports = __toCommonJS(mutationCache_exports);
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var MutationCache = class extends import_subscribable.Subscribable {
constructor(config = {}) {
super();
this.config = config;
this.#mutations = /* @__PURE__ */ new Map();
this.#mutationId = Date.now();
}
#mutations;
#mutationId;
build(client, options, state) {
const mutation = new import_mutation.Mutation({
mutationCache: this,
mutationId: ++this.#mutationId,
options: client.defaultMutationOptions(options),
state
});
this.add(mutation);
return mutation;
}
add(mutation) {
const scope = scopeFor(mutation);
const mutations = this.#mutations.get(scope) ?? [];
mutations.push(mutation);
this.#mutations.set(scope, mutations);
this.notify({ type: "added", mutation });
}
remove(mutation) {
const scope = scopeFor(mutation);
if (this.#mutations.has(scope)) {
const mutations = this.#mutations.get(scope)?.filter((x) => x !== mutation);
if (mutations) {
if (mutations.length === 0) {
this.#mutations.delete(scope);
} else {
this.#mutations.set(scope, mutations);
}
}
}
this.notify({ type: "removed", mutation });
}
canRun(mutation) {
const firstPendingMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m.state.status === "pending");
return !firstPendingMutation || firstPendingMutation === mutation;
}
runNext(mutation) {
const foundMutation = this.#mutations.get(scopeFor(mutation))?.find((m) => m !== mutation && m.state.isPaused);
return foundMutation?.continue() ?? Promise.resolve();
}
clear() {
import_notifyManager.notifyManager.batch(() => {
this.getAll().forEach((mutation) => {
this.remove(mutation);
});
});
}
getAll() {
return [...this.#mutations.values()].flat();
}
find(filters) {
const defaultedFilters = { exact: true, ...filters };
return this.getAll().find(
(mutation) => (0, import_utils.matchMutation)(defaultedFilters, mutation)
);
}
findAll(filters = {}) {
return this.getAll().filter((mutation) => (0, import_utils.matchMutation)(filters, mutation));
}
notify(event) {
import_notifyManager.notifyManager.batch(() => {
this.listeners.forEach((listener) => {
listener(event);
});
});
}
resumePausedMutations() {
const pausedMutations = this.getAll().filter((x) => x.state.isPaused);
return import_notifyManager.notifyManager.batch(
() => Promise.all(
pausedMutations.map((mutation) => mutation.continue().catch(import_utils.noop))
)
);
}
};
function scopeFor(mutation) {
return mutation.options.scope?.id ?? String(mutation.mutationId);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=mutationCache.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs":
/*!******************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/mutationObserver.cjs ***!
\******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/mutationObserver.ts
var mutationObserver_exports = {};
__export(mutationObserver_exports, {
MutationObserver: () => MutationObserver
});
module.exports = __toCommonJS(mutationObserver_exports);
var import_mutation = __webpack_require__(/*! ./mutation.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutation.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var MutationObserver = class extends import_subscribable.Subscribable {
#client;
#currentResult = void 0;
#currentMutation;
#mutateOptions;
constructor(client, options) {
super();
this.#client = client;
this.setOptions(options);
this.bindMethods();
this.#updateResult();
}
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, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
this.#client.getMutationCache().notify({
type: "observerOptionsUpdated",
mutation: this.#currentMutation,
observer: this
});
}
if (prevOptions?.mutationKey && this.options.mutationKey && (0, import_utils.hashKey)(prevOptions.mutationKey) !== (0, import_utils.hashKey)(this.options.mutationKey)) {
this.reset();
} else if (this.#currentMutation?.state.status === "pending") {
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?.removeObserver(this);
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, import_mutation.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) {
import_notifyManager.notifyManager.batch(() => {
if (this.#mutateOptions && this.hasListeners()) {
const variables = this.#currentResult.variables;
const context = this.#currentResult.context;
if (action?.type === "success") {
this.#mutateOptions.onSuccess?.(action.data, variables, context);
this.#mutateOptions.onSettled?.(action.data, null, variables, context);
} else if (action?.type === "error") {
this.#mutateOptions.onError?.(action.error, variables, context);
this.#mutateOptions.onSettled?.(
void 0,
action.error,
variables,
context
);
}
}
this.listeners.forEach((listener) => {
listener(this.#currentResult);
});
});
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=mutationObserver.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs ***!
\***************************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/notifyManager.ts
var notifyManager_exports = {};
__export(notifyManager_exports, {
createNotifyManager: () => createNotifyManager,
notifyManager: () => notifyManager
});
module.exports = __toCommonJS(notifyManager_exports);
function createNotifyManager() {
let queue = [];
let transactions = 0;
let notifyFn = (callback) => {
callback();
};
let batchNotifyFn = (callback) => {
callback();
};
let scheduleFn = (cb) => setTimeout(cb, 0);
const schedule = (callback) => {
if (transactions) {
queue.push(callback);
} else {
scheduleFn(() => {
notifyFn(callback);
});
}
};
const flush = () => {
const originalQueue = queue;
queue = [];
if (originalQueue.length) {
scheduleFn(() => {
batchNotifyFn(() => {
originalQueue.forEach((callback) => {
notifyFn(callback);
});
});
});
}
};
return {
batch: (callback) => {
let result;
transactions++;
try {
result = callback();
} finally {
transactions--;
if (!transactions) {
flush();
}
}
return result;
},
/**
* All calls to the wrapped function will be batched.
*/
batchCalls: (callback) => {
return (...args) => {
schedule(() => {
callback(...args);
});
};
},
schedule,
/**
* Use this method to set a custom notify function.
* This can be used to for example wrap notifications with `React.act` while running tests.
*/
setNotifyFunction: (fn) => {
notifyFn = fn;
},
/**
* Use this method to set a custom function to batch notifications together into a single tick.
* By default React Query will use the batch function provided by ReactDOM or React Native.
*/
setBatchNotifyFunction: (fn) => {
batchNotifyFn = fn;
},
setScheduler: (fn) => {
scheduleFn = fn;
}
};
}
var notifyManager = createNotifyManager();
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=notifyManager.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/onlineManager.ts
var onlineManager_exports = {};
__export(onlineManager_exports, {
OnlineManager: () => OnlineManager,
onlineManager: () => onlineManager
});
module.exports = __toCommonJS(onlineManager_exports);
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var OnlineManager = class extends import_subscribable.Subscribable {
#online = true;
#cleanup;
#setup;
constructor() {
super();
this.#setup = (onOnline) => {
if (!import_utils.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();
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=onlineManager.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs":
/*!*****************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/queriesObserver.cjs ***!
\*****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queriesObserver.ts
var queriesObserver_exports = {};
__export(queriesObserver_exports, {
QueriesObserver: () => QueriesObserver
});
module.exports = __toCommonJS(queriesObserver_exports);
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_queryObserver = __webpack_require__(/*! ./queryObserver.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs");
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
function difference(array1, array2) {
return array1.filter((x) => !array2.includes(x));
}
function replaceAt(array, index, value) {
const copy = array.slice(0);
copy[index] = value;
return copy;
}
var QueriesObserver = class extends import_subscribable.Subscribable {
#client;
#result;
#queries;
#options;
#observers;
#combinedResult;
#lastCombine;
#lastResult;
constructor(client, queries, options) {
super();
this.#client = client;
this.#options = options;
this.#queries = [];
this.#observers = [];
this.#result = [];
this.setQueries(queries);
}
onSubscribe() {
if (this.listeners.size === 1) {
this.#observers.forEach((observer) => {
observer.subscribe((result) => {
this.#onUpdate(observer, result);
});
});
}
}
onUnsubscribe() {
if (!this.listeners.size) {
this.destroy();
}
}
destroy() {
this.listeners = /* @__PURE__ */ new Set();
this.#observers.forEach((observer) => {
observer.destroy();
});
}
setQueries(queries, options, notifyOptions) {
this.#queries = queries;
this.#options = options;
if (true) {
const queryHashes = queries.map((query) => query.queryHash);
if (new Set(queryHashes).size !== queryHashes.length) {
console.warn(
"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior."
);
}
}
import_notifyManager.notifyManager.batch(() => {
const prevObservers = this.#observers;
const newObserverMatches = this.#findMatchingObservers(this.#queries);
newObserverMatches.forEach(
(match) => match.observer.setOptions(match.defaultedQueryOptions, notifyOptions)
);
const newObservers = newObserverMatches.map((match) => match.observer);
const newResult = newObservers.map(
(observer) => observer.getCurrentResult()
);
const hasIndexChange = newObservers.some(
(observer, index) => observer !== prevObservers[index]
);
if (prevObservers.length === newObservers.length && !hasIndexChange) {
return;
}
this.#observers = newObservers;
this.#result = newResult;
if (!this.hasListeners()) {
return;
}
difference(prevObservers, newObservers).forEach((observer) => {
observer.destroy();
});
difference(newObservers, prevObservers).forEach((observer) => {
observer.subscribe((result) => {
this.#onUpdate(observer, result);
});
});
this.#notify();
});
}
getCurrentResult() {
return this.#result;
}
getQueries() {
return this.#observers.map((observer) => observer.getCurrentQuery());
}
getObservers() {
return this.#observers;
}
getOptimisticResult(queries, combine) {
const matches = this.#findMatchingObservers(queries);
const result = matches.map(
(match) => match.observer.getOptimisticResult(match.defaultedQueryOptions)
);
return [
result,
(r) => {
return this.#combineResult(r ?? result, combine);
},
() => {
return this.#trackResult(result, queries);
}
];
}
#trackResult(result, queries) {
const matches = this.#findMatchingObservers(queries);
return matches.map((match, index) => {
const observerResult = result[index];
return !match.defaultedQueryOptions.notifyOnChangeProps ? match.observer.trackResult(observerResult, (accessedProp) => {
matches.forEach((m) => {
m.observer.trackProp(accessedProp);
});
}) : observerResult;
});
}
#combineResult(input, combine) {
if (combine) {
if (!this.#combinedResult || this.#result !== this.#lastResult || combine !== this.#lastCombine) {
this.#lastCombine = combine;
this.#lastResult = this.#result;
this.#combinedResult = (0, import_utils.replaceEqualDeep)(
this.#combinedResult,
combine(input)
);
}
return this.#combinedResult;
}
return input;
}
#findMatchingObservers(queries) {
const prevObserversMap = new Map(
this.#observers.map((observer) => [observer.options.queryHash, observer])
);
const observers = [];
queries.forEach((options) => {
const defaultedOptions = this.#client.defaultQueryOptions(options);
const match = prevObserversMap.get(defaultedOptions.queryHash);
if (match) {
observers.push({
defaultedQueryOptions: defaultedOptions,
observer: match
});
} else {
observers.push({
defaultedQueryOptions: defaultedOptions,
observer: new import_queryObserver.QueryObserver(this.#client, defaultedOptions)
});
}
});
return observers;
}
#onUpdate(observer, result) {
const index = this.#observers.indexOf(observer);
if (index !== -1) {
this.#result = replaceAt(this.#result, index, result);
this.#notify();
}
}
#notify() {
if (this.hasListeners()) {
const previousResult = this.#combinedResult;
const newResult = this.#combineResult(
this.#trackResult(this.#result, this.#queries),
this.#options?.combine
);
if (previousResult !== newResult) {
import_notifyManager.notifyManager.batch(() => {
this.listeners.forEach((listener) => {
listener(this.#result);
});
});
}
}
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=queriesObserver.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/query.cjs":
/*!*******************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/query.cjs ***!
\*******************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/query.ts
var query_exports = {};
__export(query_exports, {
Query: () => Query,
fetchState: () => fetchState
});
module.exports = __toCommonJS(query_exports);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_retryer = __webpack_require__(/*! ./retryer.cjs */ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs");
var import_removable = __webpack_require__(/*! ./removable.cjs */ "../node_modules/@tanstack/query-core/build/modern/removable.cjs");
var Query = class extends import_removable.Removable {
#initialState;
#revertState;
#cache;
#retryer;
#defaultOptions;
#abortSignalConsumed;
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 = getDefaultState(this.options);
this.state = config.state ?? this.#initialState;
this.scheduleGc();
}
get meta() {
return this.options.meta;
}
get promise() {
return this.#retryer?.promise;
}
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, import_utils.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.#retryer?.promise;
this.#retryer?.cancel(options);
return promise ? promise.then(import_utils.noop).catch(import_utils.noop) : Promise.resolve();
}
destroy() {
super.destroy();
this.cancel({ silent: true });
}
reset() {
this.destroy();
this.setState(this.#initialState);
}
isActive() {
return this.observers.some(
(observer) => (0, import_utils.resolveEnabled)(observer.options.enabled, this) !== false
);
}
isDisabled() {
if (this.getObserversCount() > 0) {
return !this.isActive();
}
return this.options.queryFn === import_utils.skipToken || this.state.dataUpdateCount + this.state.errorUpdateCount === 0;
}
isStale() {
if (this.state.isInvalidated) {
return true;
}
if (this.getObserversCount() > 0) {
return this.observers.some(
(observer) => observer.getCurrentResult().isStale
);
}
return this.state.data === void 0;
}
isStaleByTime(staleTime = 0) {
return this.state.isInvalidated || this.state.data === void 0 || !(0, import_utils.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.data !== void 0 && fetchOptions?.cancelRefetch) {
this.cancel({ silent: true });
} else if (this.#retryer) {
this.#retryer.continueRetry();
return this.#retryer.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 addSignalProperty = (object) => {
Object.defineProperty(object, "signal", {
enumerable: true,
get: () => {
this.#abortSignalConsumed = true;
return abortController.signal;
}
});
};
const fetchFn = () => {
const queryFn = (0, import_utils.ensureQueryFn)(this.options, fetchOptions);
const queryFnContext = {
queryKey: this.queryKey,
meta: this.meta
};
addSignalProperty(queryFnContext);
this.#abortSignalConsumed = false;
if (this.options.persister) {
return this.options.persister(
queryFn,
queryFnContext,
this
);
}
return 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, import_retryer.isCancelledError)(error) && error.silent)) {
this.#dispatch({
type: "error",
error
});
}
if (!(0, import_retryer.isCancelledError)(error)) {
this.#cache.config.onError?.(
error,
this
);
this.#cache.config.onSettled?.(
this.state.data,
error,
this
);
}
this.scheduleGc();
};
this.#retryer = (0, import_retryer.createRetryer)({
initialPromise: fetchOptions?.initialPromise,
fn: context.fetchFn,
abort: abortController.abort.bind(abortController),
onSuccess: (data) => {
if (data === void 0) {
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;
}
try {
this.setData(data);
} catch (error) {
onError(error);
return;
}
this.#cache.config.onSuccess?.(data, this);
this.#cache.config.onSettled?.(
data,
this.state.error,
this
);
this.scheduleGc();
},
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,
canRun: () => true
});
return this.#retryer.start();
}
#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,
...fetchState(state.data, this.options),
fetchMeta: action.meta ?? null
};
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, import_retryer.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);
import_notifyManager.notifyManager.batch(() => {
this.observers.forEach((observer) => {
observer.onQueryUpdate();
});
this.#cache.notify({ query: this, type: "updated", action });
});
}
};
function fetchState(data, options) {
return {
fetchFailureCount: 0,
fetchFailureReason: null,
fetchStatus: (0, import_retryer.canFetch)(options.networkMode) ? "fetching" : "paused",
...data === void 0 && {
error: null,
status: "pending"
}
};
}
function getDefaultState(options) {
const data = typeof options.initialData === "function" ? options.initialData() : options.initialData;
const hasData = data !== void 0;
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"
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=query.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs":
/*!************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/queryCache.cjs ***!
\************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queryCache.ts
var queryCache_exports = {};
__export(queryCache_exports, {
QueryCache: () => QueryCache
});
module.exports = __toCommonJS(queryCache_exports);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var QueryCache = class extends import_subscribable.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, import_utils.hashQueryKeyByOptions)(queryKey, options);
let query = this.get(queryHash);
if (!query) {
query = new import_query.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() {
import_notifyManager.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, import_utils.matchQuery)(defaultedFilters, query)
);
}
findAll(filters = {}) {
const queries = this.getAll();
return Object.keys(filters).length > 0 ? queries.filter((query) => (0, import_utils.matchQuery)(filters, query)) : queries;
}
notify(event) {
import_notifyManager.notifyManager.batch(() => {
this.listeners.forEach((listener) => {
listener(event);
});
});
}
onFocus() {
import_notifyManager.notifyManager.batch(() => {
this.getAll().forEach((query) => {
query.onFocus();
});
});
}
onOnline() {
import_notifyManager.notifyManager.batch(() => {
this.getAll().forEach((query) => {
query.onOnline();
});
});
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=queryCache.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/queryClient.cjs":
/*!*************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/queryClient.cjs ***!
\*************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queryClient.ts
var queryClient_exports = {};
__export(queryClient_exports, {
QueryClient: () => QueryClient
});
module.exports = __toCommonJS(queryClient_exports);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var import_queryCache = __webpack_require__(/*! ./queryCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/queryCache.cjs");
var import_mutationCache = __webpack_require__(/*! ./mutationCache.cjs */ "../node_modules/@tanstack/query-core/build/modern/mutationCache.cjs");
var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_infiniteQueryBehavior = __webpack_require__(/*! ./infiniteQueryBehavior.cjs */ "../node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.cjs");
var QueryClient = class {
#queryCache;
#mutationCache;
#defaultOptions;
#queryDefaults;
#mutationDefaults;
#mountCount;
#unsubscribeFocus;
#unsubscribeOnline;
constructor(config = {}) {
this.#queryCache = config.queryCache || new import_queryCache.QueryCache();
this.#mutationCache = config.mutationCache || new import_mutationCache.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 = import_focusManager.focusManager.subscribe(async (focused) => {
if (focused) {
await this.resumePausedMutations();
this.#queryCache.onFocus();
}
});
this.#unsubscribeOnline = import_onlineManager.onlineManager.subscribe(async (online) => {
if (online) {
await 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) {
const options = this.defaultQueryOptions({ queryKey });
return this.#queryCache.get(options.queryHash)?.state.data;
}
ensureQueryData(options) {
const defaultedOptions = this.defaultQueryOptions(options);
const query = this.#queryCache.build(this, defaultedOptions);
const cachedData = query.state.data;
if (cachedData === void 0) {
return this.fetchQuery(options);
}
if (options.revalidateIfStale && query.isStaleByTime((0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query))) {
void this.prefetchQuery(defaultedOptions);
}
return Promise.resolve(cachedData);
}
getQueriesData(filters) {
return this.#queryCache.findAll(filters).map(({ queryKey, state }) => {
const data = state.data;
return [queryKey, data];
});
}
setQueryData(queryKey, updater, options) {
const defaultedOptions = this.defaultQueryOptions({ queryKey });
const query = this.#queryCache.get(
defaultedOptions.queryHash
);
const prevData = query?.state.data;
const data = (0, import_utils.functionalUpdate)(updater, prevData);
if (data === void 0) {
return void 0;
}
return this.#queryCache.build(this, defaultedOptions).setData(data, { ...options, manual: true });
}
setQueriesData(filters, updater, options) {
return import_notifyManager.notifyManager.batch(
() => this.#queryCache.findAll(filters).map(({ queryKey }) => [
queryKey,
this.setQueryData(queryKey, updater, options)
])
);
}
getQueryState(queryKey) {
const options = this.defaultQueryOptions({ queryKey });
return this.#queryCache.get(
options.queryHash
)?.state;
}
removeQueries(filters) {
const queryCache = this.#queryCache;
import_notifyManager.notifyManager.batch(() => {
queryCache.findAll(filters).forEach((query) => {
queryCache.remove(query);
});
});
}
resetQueries(filters, options) {
const queryCache = this.#queryCache;
const refetchFilters = {
type: "active",
...filters
};
return import_notifyManager.notifyManager.batch(() => {
queryCache.findAll(filters).forEach((query) => {
query.reset();
});
return this.refetchQueries(refetchFilters, options);
});
}
cancelQueries(filters, cancelOptions = {}) {
const defaultedCancelOptions = { revert: true, ...cancelOptions };
const promises = import_notifyManager.notifyManager.batch(
() => this.#queryCache.findAll(filters).map((query) => query.cancel(defaultedCancelOptions))
);
return Promise.all(promises).then(import_utils.noop).catch(import_utils.noop);
}
invalidateQueries(filters, options = {}) {
return import_notifyManager.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 = import_notifyManager.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(import_utils.noop);
}
return query.state.fetchStatus === "paused" ? Promise.resolve() : promise;
})
);
return Promise.all(promises).then(import_utils.noop);
}
fetchQuery(options) {
const defaultedOptions = this.defaultQueryOptions(options);
if (defaultedOptions.retry === void 0) {
defaultedOptions.retry = false;
}
const query = this.#queryCache.build(this, defaultedOptions);
return query.isStaleByTime(
(0, import_utils.resolveStaleTime)(defaultedOptions.staleTime, query)
) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);
}
prefetchQuery(options) {
return this.fetchQuery(options).then(import_utils.noop).catch(import_utils.noop);
}
fetchInfiniteQuery(options) {
options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
return this.fetchQuery(options);
}
prefetchInfiniteQuery(options) {
return this.fetchInfiniteQuery(options).then(import_utils.noop).catch(import_utils.noop);
}
ensureInfiniteQueryData(options) {
options.behavior = (0, import_infiniteQueryBehavior.infiniteQueryBehavior)(options.pages);
return this.ensureQueryData(options);
}
resumePausedMutations() {
if (import_onlineManager.onlineManager.isOnline()) {
return this.#mutationCache.resumePausedMutations();
}
return Promise.resolve();
}
getQueryCache() {
return this.#queryCache;
}
getMutationCache() {
return this.#mutationCache;
}
getDefaultOptions() {
return this.#defaultOptions;
}
setDefaultOptions(options) {
this.#defaultOptions = options;
}
setQueryDefaults(queryKey, options) {
this.#queryDefaults.set((0, import_utils.hashKey)(queryKey), {
queryKey,
defaultOptions: options
});
}
getQueryDefaults(queryKey) {
const defaults = [...this.#queryDefaults.values()];
const result = {};
defaults.forEach((queryDefault) => {
if ((0, import_utils.partialMatchKey)(queryKey, queryDefault.queryKey)) {
Object.assign(result, queryDefault.defaultOptions);
}
});
return result;
}
setMutationDefaults(mutationKey, options) {
this.#mutationDefaults.set((0, import_utils.hashKey)(mutationKey), {
mutationKey,
defaultOptions: options
});
}
getMutationDefaults(mutationKey) {
const defaults = [...this.#mutationDefaults.values()];
let result = {};
defaults.forEach((queryDefault) => {
if ((0, import_utils.partialMatchKey)(mutationKey, queryDefault.mutationKey)) {
result = { ...result, ...queryDefault.defaultOptions };
}
});
return result;
}
defaultQueryOptions(options) {
if (options._defaulted) {
return options;
}
const defaultedOptions = {
...this.#defaultOptions.queries,
...this.getQueryDefaults(options.queryKey),
...options,
_defaulted: true
};
if (!defaultedOptions.queryHash) {
defaultedOptions.queryHash = (0, import_utils.hashQueryKeyByOptions)(
defaultedOptions.queryKey,
defaultedOptions
);
}
if (defaultedOptions.refetchOnReconnect === void 0) {
defaultedOptions.refetchOnReconnect = defaultedOptions.networkMode !== "always";
}
if (defaultedOptions.throwOnError === void 0) {
defaultedOptions.throwOnError = !!defaultedOptions.suspense;
}
if (!defaultedOptions.networkMode && defaultedOptions.persister) {
defaultedOptions.networkMode = "offlineFirst";
}
if (defaultedOptions.queryFn === import_utils.skipToken) {
defaultedOptions.enabled = false;
}
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();
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=queryClient.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/queryObserver.cjs ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queryObserver.ts
var queryObserver_exports = {};
__export(queryObserver_exports, {
QueryObserver: () => QueryObserver
});
module.exports = __toCommonJS(queryObserver_exports);
var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
var import_notifyManager = __webpack_require__(/*! ./notifyManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/notifyManager.cjs");
var import_query = __webpack_require__(/*! ./query.cjs */ "../node_modules/@tanstack/query-core/build/modern/query.cjs");
var import_subscribable = __webpack_require__(/*! ./subscribable.cjs */ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs");
var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var QueryObserver = class extends import_subscribable.Subscribable {
constructor(client, options) {
super();
this.options = options;
this.#client = client;
this.#selectError = null;
this.#currentThenable = (0, import_thenable.pendingThenable)();
if (!this.options.experimental_prefetchInRender) {
this.#currentThenable.reject(
new Error("experimental_prefetchInRender feature flag is not enabled")
);
}
this.bindMethods();
this.setOptions(options);
}
#client;
#currentQuery = void 0;
#currentQueryInitialState = void 0;
#currentResult = void 0;
#currentResultState;
#currentResultOptions;
#currentThenable;
#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 = /* @__PURE__ */ new Set();
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();
} else {
this.updateResult();
}
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 (this.options.enabled !== void 0 && typeof this.options.enabled !== "boolean" && typeof this.options.enabled !== "function" && typeof (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== "boolean") {
throw new Error(
"Expected enabled to be a boolean or a callback that returns a boolean"
);
}
this.#updateQuery();
this.#currentQuery.setOptions(this.options);
if (prevOptions._defaulted && !(0, import_utils.shallowEqualObjects)(this.options, prevOptions)) {
this.#client.getQueryCache().notify({
type: "observerOptionsUpdated",
query: this.#currentQuery,
observer: this
});
}
const mounted = this.hasListeners();
if (mounted && shouldFetchOptionally(
this.#currentQuery,
prevQuery,
this.options,
prevOptions
)) {
this.#executeFetch();
}
this.updateResult(notifyOptions);
if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || (0, import_utils.resolveStaleTime)(this.options.staleTime, this.#currentQuery) !== (0, import_utils.resolveStaleTime)(prevOptions.staleTime, this.#currentQuery))) {
this.#updateStaleTimeout();
}
const nextRefetchInterval = this.#computeRefetchInterval();
if (mounted && (this.#currentQuery !== prevQuery || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) !== (0, import_utils.resolveEnabled)(prevOptions.enabled, this.#currentQuery) || nextRefetchInterval !== this.#currentRefetchInterval)) {
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, onPropTracked) {
const trackedResult = {};
Object.keys(result).forEach((key) => {
Object.defineProperty(trackedResult, key, {
configurable: false,
enumerable: true,
get: () => {
this.trackProp(key);
onPropTracked?.(key);
return result[key];
}
});
});
return trackedResult;
}
trackProp(key) {
this.#trackedProps.add(key);
}
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);
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(import_utils.noop);
}
return promise;
}
#updateStaleTimeout() {
this.#clearStaleTimeout();
const staleTime = (0, import_utils.resolveStaleTime)(
this.options.staleTime,
this.#currentQuery
);
if (import_utils.isServer || this.#currentResult.isStale || !(0, import_utils.isValidTimeout)(staleTime)) {
return;
}
const time = (0, import_utils.timeUntilStale)(this.#currentResult.dataUpdatedAt, 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 (import_utils.isServer || (0, import_utils.resolveEnabled)(this.options.enabled, this.#currentQuery) === false || !(0, import_utils.isValidTimeout)(this.#currentRefetchInterval) || this.#currentRefetchInterval === 0) {
return;
}
this.#refetchIntervalId = setInterval(() => {
if (this.options.refetchIntervalInBackground || import_focusManager.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 newState = { ...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) {
newState = {
...newState,
...(0, import_query.fetchState)(state.data, query.options)
};
}
if (options._optimisticResults === "isRestoring") {
newState.fetchStatus = "idle";
}
}
let { error, errorUpdatedAt, status } = newState;
if (options.select && newState.data !== void 0) {
if (prevResult && newState.data === prevResultState?.data && options.select === this.#selectFn) {
data = this.#selectResult;
} else {
try {
this.#selectFn = options.select;
data = options.select(newState.data);
data = (0, import_utils.replaceData)(prevResult?.data, data, options);
this.#selectResult = data;
this.#selectError = null;
} catch (selectError) {
this.#selectError = selectError;
}
}
} else {
data = newState.data;
}
if (options.placeholderData !== void 0 && data === void 0 && 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 && placeholderData !== void 0) {
try {
placeholderData = options.select(placeholderData);
this.#selectError = null;
} catch (selectError) {
this.#selectError = selectError;
}
}
}
if (placeholderData !== void 0) {
status = "success";
data = (0, import_utils.replaceData)(
prevResult?.data,
placeholderData,
options
);
isPlaceholderData = true;
}
}
if (this.#selectError) {
error = this.#selectError;
data = this.#selectResult;
errorUpdatedAt = Date.now();
status = "error";
}
const isFetching = newState.fetchStatus === "fetching";
const isPending = status === "pending";
const isError = status === "error";
const isLoading = isPending && isFetching;
const hasData = data !== void 0;
const result = {
status,
fetchStatus: newState.fetchStatus,
isPending,
isSuccess: status === "success",
isError,
isInitialLoading: isLoading,
isLoading,
data,
dataUpdatedAt: newState.dataUpdatedAt,
error,
errorUpdatedAt,
failureCount: newState.fetchFailureCount,
failureReason: newState.fetchFailureReason,
errorUpdateCount: newState.errorUpdateCount,
isFetched: newState.dataUpdateCount > 0 || newState.errorUpdateCount > 0,
isFetchedAfterMount: newState.dataUpdateCount > queryInitialState.dataUpdateCount || newState.errorUpdateCount > queryInitialState.errorUpdateCount,
isFetching,
isRefetching: isFetching && !isPending,
isLoadingError: isError && !hasData,
isPaused: newState.fetchStatus === "paused",
isPlaceholderData,
isRefetchError: isError && hasData,
isStale: isStale(query, options),
refetch: this.refetch,
promise: this.#currentThenable
};
const nextResult = result;
if (this.options.experimental_prefetchInRender) {
const finalizeThenableIfPossible = (thenable) => {
if (nextResult.status === "error") {
thenable.reject(nextResult.error);
} else if (nextResult.data !== void 0) {
thenable.resolve(nextResult.data);
}
};
const recreateThenable = () => {
const pending = this.#currentThenable = nextResult.promise = (0, import_thenable.pendingThenable)();
finalizeThenableIfPossible(pending);
};
const prevThenable = this.#currentThenable;
switch (prevThenable.status) {
case "pending":
if (query.queryHash === prevQuery.queryHash) {
finalizeThenableIfPossible(prevThenable);
}
break;
case "fulfilled":
if (nextResult.status === "error" || nextResult.data !== prevThenable.value) {
recreateThenable();
}
break;
case "rejected":
if (nextResult.status !== "error" || nextResult.error !== prevThenable.reason) {
recreateThenable();
}
break;
}
}
return nextResult;
}
updateResult(notifyOptions) {
const prevResult = this.#currentResult;
const nextResult = this.createResult(this.#currentQuery, this.options);
this.#currentResultState = this.#currentQuery.state;
this.#currentResultOptions = this.options;
if (this.#currentResultState.data !== void 0) {
this.#lastQueryWithDefinedData = this.#currentQuery;
}
if ((0, import_utils.shallowEqualObjects)(nextResult, prevResult)) {
return;
}
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) {
import_notifyManager.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 (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.state.data === void 0 && !(query.state.status === "error" && options.retryOnMount === false);
}
function shouldFetchOnMount(query, options) {
return shouldLoadOnMount(query, options) || query.state.data !== void 0 && shouldFetchOn(query, options, options.refetchOnMount);
}
function shouldFetchOn(query, options, field) {
if ((0, import_utils.resolveEnabled)(options.enabled, query) !== 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 (query !== prevQuery || (0, import_utils.resolveEnabled)(prevOptions.enabled, query) === false) && (!options.suspense || query.state.status !== "error") && isStale(query, options);
}
function isStale(query, options) {
return (0, import_utils.resolveEnabled)(options.enabled, query) !== false && query.isStaleByTime((0, import_utils.resolveStaleTime)(options.staleTime, query));
}
function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
if (!(0, import_utils.shallowEqualObjects)(observer.getCurrentResult(), optimisticResult)) {
return true;
}
return false;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=queryObserver.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/removable.cjs":
/*!***********************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/removable.cjs ***!
\***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/removable.ts
var removable_exports = {};
__export(removable_exports, {
Removable: () => Removable
});
module.exports = __toCommonJS(removable_exports);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
var Removable = class {
#gcTimeout;
destroy() {
this.clearGcTimeout();
}
scheduleGc() {
this.clearGcTimeout();
if ((0, import_utils.isValidTimeout)(this.gcTime)) {
this.#gcTimeout = setTimeout(() => {
this.optionalRemove();
}, this.gcTime);
}
}
updateGcTime(newGcTime) {
this.gcTime = Math.max(
this.gcTime || 0,
newGcTime ?? (import_utils.isServer ? Infinity : 5 * 60 * 1e3)
);
}
clearGcTimeout() {
if (this.#gcTimeout) {
clearTimeout(this.#gcTimeout);
this.#gcTimeout = void 0;
}
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=removable.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/retryer.cjs":
/*!*********************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/retryer.cjs ***!
\*********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/retryer.ts
var retryer_exports = {};
__export(retryer_exports, {
CancelledError: () => CancelledError,
canFetch: () => canFetch,
createRetryer: () => createRetryer,
isCancelledError: () => isCancelledError
});
module.exports = __toCommonJS(retryer_exports);
var import_focusManager = __webpack_require__(/*! ./focusManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/focusManager.cjs");
var import_onlineManager = __webpack_require__(/*! ./onlineManager.cjs */ "../node_modules/@tanstack/query-core/build/modern/onlineManager.cjs");
var import_thenable = __webpack_require__(/*! ./thenable.cjs */ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/query-core/build/modern/utils.cjs");
function defaultRetryDelay(failureCount) {
return Math.min(1e3 * 2 ** failureCount, 3e4);
}
function canFetch(networkMode) {
return (networkMode ?? "online") === "online" ? import_onlineManager.onlineManager.isOnline() : true;
}
var CancelledError = class extends Error {
constructor(options) {
super("CancelledError");
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;
const thenable = (0, import_thenable.pendingThenable)();
const cancel = (cancelOptions) => {
if (!isResolved) {
reject(new CancelledError(cancelOptions));
config.abort?.();
}
};
const cancelRetry = () => {
isRetryCancelled = true;
};
const continueRetry = () => {
isRetryCancelled = false;
};
const canContinue = () => import_focusManager.focusManager.isFocused() && (config.networkMode === "always" || import_onlineManager.onlineManager.isOnline()) && config.canRun();
const canStart = () => canFetch(config.networkMode) && config.canRun();
const resolve = (value) => {
if (!isResolved) {
isResolved = true;
config.onSuccess?.(value);
continueFn?.();
thenable.resolve(value);
}
};
const reject = (value) => {
if (!isResolved) {
isResolved = true;
config.onError?.(value);
continueFn?.();
thenable.reject(value);
}
};
const pause = () => {
return new Promise((continueResolve) => {
continueFn = (value) => {
if (isResolved || canContinue()) {
continueResolve(value);
}
};
config.onPause?.();
}).then(() => {
continueFn = void 0;
if (!isResolved) {
config.onContinue?.();
}
});
};
const run = () => {
if (isResolved) {
return;
}
let promiseOrValue;
const initialPromise = failureCount === 0 ? config.initialPromise : void 0;
try {
promiseOrValue = initialPromise ?? config.fn();
} catch (error) {
promiseOrValue = Promise.reject(error);
}
Promise.resolve(promiseOrValue).then(resolve).catch((error) => {
if (isResolved) {
return;
}
const retry = config.retry ?? (import_utils.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, import_utils.sleep)(delay).then(() => {
return canContinue() ? void 0 : pause();
}).then(() => {
if (isRetryCancelled) {
reject(error);
} else {
run();
}
});
});
};
return {
promise: thenable,
cancel,
continue: () => {
continueFn?.();
return thenable;
},
cancelRetry,
continueRetry,
canStart,
start: () => {
if (canStart()) {
run();
} else {
pause().then(run);
}
return thenable;
}
};
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=retryer.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/subscribable.cjs":
/*!**************************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/subscribable.cjs ***!
\**************************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/subscribable.ts
var subscribable_exports = {};
__export(subscribable_exports, {
Subscribable: () => Subscribable
});
module.exports = __toCommonJS(subscribable_exports);
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() {
}
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=subscribable.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/thenable.cjs":
/*!**********************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/thenable.cjs ***!
\**********************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/thenable.ts
var thenable_exports = {};
__export(thenable_exports, {
pendingThenable: () => pendingThenable
});
module.exports = __toCommonJS(thenable_exports);
function pendingThenable() {
let resolve;
let reject;
const thenable = new Promise((_resolve, _reject) => {
resolve = _resolve;
reject = _reject;
});
thenable.status = "pending";
thenable.catch(() => {
});
function finalize(data) {
Object.assign(thenable, data);
delete thenable.resolve;
delete thenable.reject;
}
thenable.resolve = (value) => {
finalize({
status: "fulfilled",
value
});
resolve(value);
};
thenable.reject = (reason) => {
finalize({
status: "rejected",
reason
});
reject(reason);
};
return thenable;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=thenable.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/types.cjs":
/*!*******************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/types.cjs ***!
\*******************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/types.ts
var types_exports = {};
module.exports = __toCommonJS(types_exports);
//# sourceMappingURL=types.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/query-core/build/modern/utils.cjs":
/*!*******************************************************************!*\
!*** ../node_modules/@tanstack/query-core/build/modern/utils.cjs ***!
\*******************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils.ts
var utils_exports = {};
__export(utils_exports, {
addToEnd: () => addToEnd,
addToStart: () => addToStart,
ensureQueryFn: () => ensureQueryFn,
functionalUpdate: () => functionalUpdate,
hashKey: () => hashKey,
hashQueryKeyByOptions: () => hashQueryKeyByOptions,
isPlainArray: () => isPlainArray,
isPlainObject: () => isPlainObject,
isServer: () => isServer,
isValidTimeout: () => isValidTimeout,
keepPreviousData: () => keepPreviousData,
matchMutation: () => matchMutation,
matchQuery: () => matchQuery,
noop: () => noop,
partialMatchKey: () => partialMatchKey,
replaceData: () => replaceData,
replaceEqualDeep: () => replaceEqualDeep,
resolveEnabled: () => resolveEnabled,
resolveStaleTime: () => resolveStaleTime,
shallowEqualObjects: () => shallowEqualObjects,
skipToken: () => skipToken,
sleep: () => sleep,
timeUntilStale: () => timeUntilStale
});
module.exports = __toCommonJS(utils_exports);
var isServer = typeof window === "undefined" || "Deno" in globalThis;
function noop() {
}
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 resolveStaleTime(staleTime, query) {
return typeof staleTime === "function" ? staleTime(query) : staleTime;
}
function resolveEnabled(enabled, query) {
return typeof enabled === "function" ? enabled(query) : enabled;
}
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 (fetchStatus && 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 aItems = array ? a : Object.keys(a);
const aSize = aItems.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];
if ((!array && aItems.includes(key) || array) && a[key] === void 0 && b[key] === void 0) {
copy[key] = void 0;
equalItems++;
} else {
copy[key] = replaceEqualDeep(a[key], b[key]);
if (copy[key] === a[key] && a[key] !== void 0) {
equalItems++;
}
}
}
return aSize === bSize && equalItems === aSize ? a : copy;
}
return b;
}
function shallowEqualObjects(a, b) {
if (!b || Object.keys(a).length !== Object.keys(b).length) {
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 (ctor === void 0) {
return true;
}
const prot = ctor.prototype;
if (!hasObjectPrototype(prot)) {
return false;
}
if (!prot.hasOwnProperty("isPrototypeOf")) {
return false;
}
if (Object.getPrototypeOf(o) !== Object.prototype) {
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 replaceData(prevData, data, options) {
if (typeof options.structuralSharing === "function") {
return options.structuralSharing(prevData, data);
} else if (options.structuralSharing !== false) {
if (true) {
try {
return replaceEqualDeep(prevData, data);
} catch (error) {
console.error(
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${options.queryHash}]: ${error}`
);
}
}
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;
}
var skipToken = Symbol();
function ensureQueryFn(options, fetchOptions) {
if (true) {
if (options.queryFn === skipToken) {
console.error(
`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${options.queryHash}'`
);
}
}
if (!options.queryFn && fetchOptions?.initialPromise) {
return () => fetchOptions.initialPromise;
}
if (!options.queryFn || options.queryFn === skipToken) {
return () => Promise.reject(new Error(`Missing queryFn: '${options.queryHash}'`));
}
return options.queryFn;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=utils.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs":
/*!********************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs ***!
\********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/HydrationBoundary.tsx
var HydrationBoundary_exports = {};
__export(HydrationBoundary_exports, {
HydrationBoundary: () => HydrationBoundary
});
module.exports = __toCommonJS(HydrationBoundary_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
var HydrationBoundary = ({
children,
options = {},
state,
queryClient
}) => {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const [hydrationQueue, setHydrationQueue] = React.useState();
const optionsRef = React.useRef(options);
optionsRef.current = options;
React.useMemo(() => {
if (state) {
if (typeof state !== "object") {
return;
}
const queryCache = client.getQueryCache();
const queries = state.queries || [];
const newQueries = [];
const existingQueries = [];
for (const dehydratedQuery of queries) {
const existingQuery = queryCache.get(dehydratedQuery.queryHash);
if (!existingQuery) {
newQueries.push(dehydratedQuery);
} else {
const hydrationIsNewer = dehydratedQuery.state.dataUpdatedAt > existingQuery.state.dataUpdatedAt;
const queryAlreadyQueued = hydrationQueue?.find(
(query) => query.queryHash === dehydratedQuery.queryHash
);
if (hydrationIsNewer && (!queryAlreadyQueued || dehydratedQuery.state.dataUpdatedAt > queryAlreadyQueued.state.dataUpdatedAt)) {
existingQueries.push(dehydratedQuery);
}
}
}
if (newQueries.length > 0) {
(0, import_query_core.hydrate)(client, { queries: newQueries }, optionsRef.current);
}
if (existingQueries.length > 0) {
setHydrationQueue(
(prev) => prev ? [...prev, ...existingQueries] : existingQueries
);
}
}
}, [client, hydrationQueue, state]);
React.useEffect(() => {
if (hydrationQueue) {
(0, import_query_core.hydrate)(client, { queries: hydrationQueue }, optionsRef.current);
setHydrationQueue(void 0);
}
}, [client, hydrationQueue]);
return children;
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=HydrationBoundary.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs":
/*!**********************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs ***!
\**********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryClientProvider.tsx
var QueryClientProvider_exports = {};
__export(QueryClientProvider_exports, {
QueryClientContext: () => QueryClientContext,
QueryClientProvider: () => QueryClientProvider,
useQueryClient: () => useQueryClient
});
module.exports = __toCommonJS(QueryClientProvider_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
var QueryClientContext = React.createContext(
void 0
);
var useQueryClient = (queryClient) => {
const client = React.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.useEffect(() => {
client.mount();
return () => {
client.unmount();
};
}, [client]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryClientContext.Provider, { value: client, children });
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=QueryClientProvider.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs":
/*!**************************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs ***!
\**************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/QueryErrorResetBoundary.tsx
var QueryErrorResetBoundary_exports = {};
__export(QueryErrorResetBoundary_exports, {
QueryErrorResetBoundary: () => QueryErrorResetBoundary,
useQueryErrorResetBoundary: () => useQueryErrorResetBoundary
});
module.exports = __toCommonJS(QueryErrorResetBoundary_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_jsx_runtime = __webpack_require__(/*! react/jsx-runtime */ "../node_modules/react/jsx-runtime.js");
function createValue() {
let isReset = false;
return {
clearReset: () => {
isReset = false;
},
reset: () => {
isReset = true;
},
isReset: () => {
return isReset;
}
};
}
var QueryErrorResetBoundaryContext = React.createContext(createValue());
var useQueryErrorResetBoundary = () => React.useContext(QueryErrorResetBoundaryContext);
var QueryErrorResetBoundary = ({
children
}) => {
const [value] = React.useState(() => createValue());
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(QueryErrorResetBoundaryContext.Provider, { value, children: typeof children === "function" ? children(value) : children });
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=QueryErrorResetBoundary.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs":
/*!*********************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs ***!
\*********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/errorBoundaryUtils.ts
var errorBoundaryUtils_exports = {};
__export(errorBoundaryUtils_exports, {
ensurePreventErrorBoundaryRetry: () => ensurePreventErrorBoundaryRetry,
getHasError: () => getHasError,
useClearResetErrorBoundary: () => useClearResetErrorBoundary
});
module.exports = __toCommonJS(errorBoundaryUtils_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary) => {
if (options.suspense || options.throwOnError || options.experimental_prefetchInRender) {
if (!errorResetBoundary.isReset()) {
options.retryOnMount = false;
}
}
};
var useClearResetErrorBoundary = (errorResetBoundary) => {
React.useEffect(() => {
errorResetBoundary.clearReset();
}, [errorResetBoundary]);
};
var getHasError = ({
result,
errorResetBoundary,
throwOnError,
query
}) => {
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (0, import_utils.shouldThrowError)(throwOnError, [result.error, query]);
};
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=errorBoundaryUtils.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/index.cjs":
/*!********************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/index.cjs ***!
\********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
HydrationBoundary: () => import_HydrationBoundary.HydrationBoundary,
IsRestoringProvider: () => import_isRestoring.IsRestoringProvider,
QueryClientContext: () => import_QueryClientProvider.QueryClientContext,
QueryClientProvider: () => import_QueryClientProvider.QueryClientProvider,
QueryErrorResetBoundary: () => import_QueryErrorResetBoundary.QueryErrorResetBoundary,
infiniteQueryOptions: () => import_infiniteQueryOptions.infiniteQueryOptions,
queryOptions: () => import_queryOptions.queryOptions,
useInfiniteQuery: () => import_useInfiniteQuery.useInfiniteQuery,
useIsFetching: () => import_useIsFetching.useIsFetching,
useIsMutating: () => import_useMutationState.useIsMutating,
useIsRestoring: () => import_isRestoring.useIsRestoring,
useMutation: () => import_useMutation.useMutation,
useMutationState: () => import_useMutationState.useMutationState,
usePrefetchInfiniteQuery: () => import_usePrefetchInfiniteQuery.usePrefetchInfiniteQuery,
usePrefetchQuery: () => import_usePrefetchQuery.usePrefetchQuery,
useQueries: () => import_useQueries.useQueries,
useQuery: () => import_useQuery.useQuery,
useQueryClient: () => import_QueryClientProvider.useQueryClient,
useQueryErrorResetBoundary: () => import_QueryErrorResetBoundary.useQueryErrorResetBoundary,
useSuspenseInfiniteQuery: () => import_useSuspenseInfiniteQuery.useSuspenseInfiniteQuery,
useSuspenseQueries: () => import_useSuspenseQueries.useSuspenseQueries,
useSuspenseQuery: () => import_useSuspenseQuery.useSuspenseQuery
});
module.exports = __toCommonJS(src_exports);
__reExport(src_exports, __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs"), module.exports);
__reExport(src_exports, __webpack_require__(/*! ./types.cjs */ "../node_modules/@tanstack/react-query/build/modern/types.cjs"), module.exports);
var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
var import_useQuery = __webpack_require__(/*! ./useQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs");
var import_useSuspenseQuery = __webpack_require__(/*! ./useSuspenseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs");
var import_useSuspenseInfiniteQuery = __webpack_require__(/*! ./useSuspenseInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs");
var import_useSuspenseQueries = __webpack_require__(/*! ./useSuspenseQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs");
var import_usePrefetchQuery = __webpack_require__(/*! ./usePrefetchQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs");
var import_usePrefetchInfiniteQuery = __webpack_require__(/*! ./usePrefetchInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs");
var import_queryOptions = __webpack_require__(/*! ./queryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs");
var import_infiniteQueryOptions = __webpack_require__(/*! ./infiniteQueryOptions.cjs */ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
var import_HydrationBoundary = __webpack_require__(/*! ./HydrationBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/HydrationBoundary.cjs");
var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
var import_useIsFetching = __webpack_require__(/*! ./useIsFetching.cjs */ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs");
var import_useMutationState = __webpack_require__(/*! ./useMutationState.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs");
var import_useMutation = __webpack_require__(/*! ./useMutation.cjs */ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs");
var import_useInfiniteQuery = __webpack_require__(/*! ./useInfiniteQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs");
var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=index.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs":
/*!***********************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.cjs ***!
\***********************************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/infiniteQueryOptions.ts
var infiniteQueryOptions_exports = {};
__export(infiniteQueryOptions_exports, {
infiniteQueryOptions: () => infiniteQueryOptions
});
module.exports = __toCommonJS(infiniteQueryOptions_exports);
function infiniteQueryOptions(options) {
return options;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=infiniteQueryOptions.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs":
/*!**************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs ***!
\**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/isRestoring.ts
var isRestoring_exports = {};
__export(isRestoring_exports, {
IsRestoringProvider: () => IsRestoringProvider,
useIsRestoring: () => useIsRestoring
});
module.exports = __toCommonJS(isRestoring_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var IsRestoringContext = React.createContext(false);
var useIsRestoring = () => React.useContext(IsRestoringContext);
var IsRestoringProvider = IsRestoringContext.Provider;
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=isRestoring.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/queryOptions.cjs ***!
\***************************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/queryOptions.ts
var queryOptions_exports = {};
__export(queryOptions_exports, {
queryOptions: () => queryOptions
});
module.exports = __toCommonJS(queryOptions_exports);
function queryOptions(options) {
return options;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=queryOptions.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs":
/*!***********************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/suspense.cjs ***!
\***********************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/suspense.ts
var suspense_exports = {};
__export(suspense_exports, {
defaultThrowOnError: () => defaultThrowOnError,
ensureSuspenseTimers: () => ensureSuspenseTimers,
fetchOptimistic: () => fetchOptimistic,
shouldSuspend: () => shouldSuspend,
willFetch: () => willFetch
});
module.exports = __toCommonJS(suspense_exports);
var defaultThrowOnError = (_error, query) => query.state.data === void 0;
var ensureSuspenseTimers = (defaultedOptions) => {
if (defaultedOptions.suspense) {
if (defaultedOptions.staleTime === void 0) {
defaultedOptions.staleTime = 1e3;
}
if (typeof defaultedOptions.gcTime === "number") {
defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, 1e3);
}
}
};
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
errorResetBoundary.clearReset();
});
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=suspense.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/types.cjs":
/*!********************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/types.cjs ***!
\********************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/types.ts
var types_exports = {};
module.exports = __toCommonJS(types_exports);
//# sourceMappingURL=types.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs":
/*!***************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs ***!
\***************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useBaseQuery.ts
var useBaseQuery_exports = {};
__export(useBaseQuery_exports, {
useBaseQuery: () => useBaseQuery
});
module.exports = __toCommonJS(useBaseQuery_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
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, import_QueryClientProvider.useQueryClient)(queryClient);
const isRestoring = (0, import_isRestoring.useIsRestoring)();
const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
const defaultedOptions = client.defaultQueryOptions(options);
client.getDefaultOptions().queries?._experimental_beforeQuery?.(
defaultedOptions
);
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
(0, import_suspense.ensureSuspenseTimers)(defaultedOptions);
(0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(defaultedOptions, errorResetBoundary);
(0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
const [observer] = React.useState(
() => new Observer(
client,
defaultedOptions
)
);
const result = observer.getOptimisticResult(defaultedOptions);
React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => {
const unsubscribe = isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange));
observer.updateResult();
return unsubscribe;
},
[observer, isRestoring]
),
() => observer.getCurrentResult(),
() => observer.getCurrentResult()
);
React.useEffect(() => {
observer.setOptions(defaultedOptions, { listeners: false });
}, [defaultedOptions, observer]);
if ((0, import_suspense.shouldSuspend)(defaultedOptions, result)) {
throw (0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary);
}
if ((0, import_errorBoundaryUtils.getHasError)({
result,
errorResetBoundary,
throwOnError: defaultedOptions.throwOnError,
query: client.getQueryCache().get(defaultedOptions.queryHash)
})) {
throw result.error;
}
;
client.getDefaultOptions().queries?._experimental_afterQuery?.(
defaultedOptions,
result
);
if (defaultedOptions.experimental_prefetchInRender && !import_query_core.isServer && (0, import_suspense.willFetch)(result, isRestoring)) {
const promise = isNewCacheEntry ? (
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
(0, import_suspense.fetchOptimistic)(defaultedOptions, observer, errorResetBoundary)
) : (
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
client.getQueryCache().get(defaultedOptions.queryHash)?.promise
);
promise?.catch(import_utils.noop).finally(() => {
observer.updateResult();
});
}
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useBaseQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs":
/*!*******************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.cjs ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useInfiniteQuery.ts
var useInfiniteQuery_exports = {};
__export(useInfiniteQuery_exports, {
useInfiniteQuery: () => useInfiniteQuery
});
module.exports = __toCommonJS(useInfiniteQuery_exports);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
function useInfiniteQuery(options, queryClient) {
return (0, import_useBaseQuery.useBaseQuery)(
options,
import_query_core.InfiniteQueryObserver,
queryClient
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useInfiniteQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs":
/*!****************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useIsFetching.cjs ***!
\****************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useIsFetching.ts
var useIsFetching_exports = {};
__export(useIsFetching_exports, {
useIsFetching: () => useIsFetching
});
module.exports = __toCommonJS(useIsFetching_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
function useIsFetching(filters, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const queryCache = client.getQueryCache();
return React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => queryCache.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
[queryCache]
),
() => client.isFetching(filters),
() => client.isFetching(filters)
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useIsFetching.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useMutation.cjs":
/*!**************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useMutation.cjs ***!
\**************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useMutation.ts
var useMutation_exports = {};
__export(useMutation_exports, {
useMutation: () => useMutation
});
module.exports = __toCommonJS(useMutation_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
function useMutation(options, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const [observer] = React.useState(
() => new import_query_core.MutationObserver(
client,
options
)
);
React.useEffect(() => {
observer.setOptions(options);
}, [observer, options]);
const result = React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
[observer]
),
() => observer.getCurrentResult(),
() => observer.getCurrentResult()
);
const mutate = React.useCallback(
(variables, mutateOptions) => {
observer.mutate(variables, mutateOptions).catch(import_utils.noop);
},
[observer]
);
if (result.error && (0, import_utils.shouldThrowError)(observer.options.throwOnError, [result.error])) {
throw result.error;
}
return { ...result, mutate, mutateAsync: result.mutate };
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useMutation.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs":
/*!*******************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useMutationState.cjs ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useMutationState.ts
var useMutationState_exports = {};
__export(useMutationState_exports, {
useIsMutating: () => useIsMutating,
useMutationState: () => useMutationState
});
module.exports = __toCommonJS(useMutationState_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
function useIsMutating(filters, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
return useMutationState(
{ filters: { ...filters, status: "pending" } },
client
).length;
}
function getResult(mutationCache, options) {
return mutationCache.findAll(options.filters).map(
(mutation) => options.select ? options.select(mutation) : mutation.state
);
}
function useMutationState(options = {}, queryClient) {
const mutationCache = (0, import_QueryClientProvider.useQueryClient)(queryClient).getMutationCache();
const optionsRef = React.useRef(options);
const result = React.useRef(null);
if (!result.current) {
result.current = getResult(mutationCache, options);
}
React.useEffect(() => {
optionsRef.current = options;
});
return React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => mutationCache.subscribe(() => {
const nextResult = (0, import_query_core.replaceEqualDeep)(
result.current,
getResult(mutationCache, optionsRef.current)
);
if (result.current !== nextResult) {
result.current = nextResult;
import_query_core.notifyManager.schedule(onStoreChange);
}
}),
[mutationCache]
),
() => result.current,
() => result.current
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useMutationState.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs":
/*!***************************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchInfiniteQuery.cjs ***!
\***************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/usePrefetchInfiniteQuery.tsx
var usePrefetchInfiniteQuery_exports = {};
__export(usePrefetchInfiniteQuery_exports, {
usePrefetchInfiniteQuery: () => usePrefetchInfiniteQuery
});
module.exports = __toCommonJS(usePrefetchInfiniteQuery_exports);
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
function usePrefetchInfiniteQuery(options, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
if (!client.getQueryState(options.queryKey)) {
client.prefetchInfiniteQuery(options);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=usePrefetchInfiniteQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs":
/*!*******************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/usePrefetchQuery.cjs ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/usePrefetchQuery.tsx
var usePrefetchQuery_exports = {};
__export(usePrefetchQuery_exports, {
usePrefetchQuery: () => usePrefetchQuery
});
module.exports = __toCommonJS(usePrefetchQuery_exports);
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
function usePrefetchQuery(options, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
if (!client.getQueryState(options.queryKey)) {
client.prefetchQuery(options);
}
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=usePrefetchQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs":
/*!*************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useQueries.cjs ***!
\*************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useQueries.ts
var useQueries_exports = {};
__export(useQueries_exports, {
useQueries: () => useQueries
});
module.exports = __toCommonJS(useQueries_exports);
var React = __toESM(__webpack_require__(/*! react */ "react"), 1);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_QueryClientProvider = __webpack_require__(/*! ./QueryClientProvider.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.cjs");
var import_isRestoring = __webpack_require__(/*! ./isRestoring.cjs */ "../node_modules/@tanstack/react-query/build/modern/isRestoring.cjs");
var import_QueryErrorResetBoundary = __webpack_require__(/*! ./QueryErrorResetBoundary.cjs */ "../node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.cjs");
var import_errorBoundaryUtils = __webpack_require__(/*! ./errorBoundaryUtils.cjs */ "../node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.cjs");
var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
var import_utils = __webpack_require__(/*! ./utils.cjs */ "../node_modules/@tanstack/react-query/build/modern/utils.cjs");
function useQueries({
queries,
...options
}, queryClient) {
const client = (0, import_QueryClientProvider.useQueryClient)(queryClient);
const isRestoring = (0, import_isRestoring.useIsRestoring)();
const errorResetBoundary = (0, import_QueryErrorResetBoundary.useQueryErrorResetBoundary)();
const defaultedQueries = React.useMemo(
() => queries.map((opts) => {
const defaultedOptions = client.defaultQueryOptions(
opts
);
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : "optimistic";
return defaultedOptions;
}),
[queries, client, isRestoring]
);
defaultedQueries.forEach((query) => {
(0, import_suspense.ensureSuspenseTimers)(query);
(0, import_errorBoundaryUtils.ensurePreventErrorBoundaryRetry)(query, errorResetBoundary);
});
(0, import_errorBoundaryUtils.useClearResetErrorBoundary)(errorResetBoundary);
const [observer] = React.useState(
() => new import_query_core.QueriesObserver(
client,
defaultedQueries,
options
)
);
const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(
defaultedQueries,
options.combine
);
React.useSyncExternalStore(
React.useCallback(
(onStoreChange) => isRestoring ? import_utils.noop : observer.subscribe(import_query_core.notifyManager.batchCalls(onStoreChange)),
[observer, isRestoring]
),
() => observer.getCurrentResult(),
() => observer.getCurrentResult()
);
React.useEffect(() => {
observer.setQueries(
defaultedQueries,
options,
{
listeners: false
}
);
}, [defaultedQueries, options, observer]);
const shouldAtLeastOneSuspend = optimisticResult.some(
(result, index) => (0, import_suspense.shouldSuspend)(defaultedQueries[index], result)
);
const suspensePromises = shouldAtLeastOneSuspend ? optimisticResult.flatMap((result, index) => {
const opts = defaultedQueries[index];
if (opts) {
const queryObserver = new import_query_core.QueryObserver(client, opts);
if ((0, import_suspense.shouldSuspend)(opts, result)) {
return (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
} else if ((0, import_suspense.willFetch)(result, isRestoring)) {
void (0, import_suspense.fetchOptimistic)(opts, queryObserver, errorResetBoundary);
}
}
return [];
}) : [];
if (suspensePromises.length > 0) {
throw Promise.all(suspensePromises);
}
const firstSingleResultWhichShouldThrow = optimisticResult.find(
(result, index) => {
const query = defaultedQueries[index];
return query && (0, import_errorBoundaryUtils.getHasError)({
result,
errorResetBoundary,
throwOnError: query.throwOnError,
query: client.getQueryCache().get(query.queryHash)
});
}
);
if (firstSingleResultWhichShouldThrow?.error) {
throw firstSingleResultWhichShouldThrow.error;
}
return getCombinedResult(trackResult());
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useQueries.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useQuery.cjs":
/*!***********************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useQuery.cjs ***!
\***********************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useQuery.ts
var useQuery_exports = {};
__export(useQuery_exports, {
useQuery: () => useQuery
});
module.exports = __toCommonJS(useQuery_exports);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
function useQuery(options, queryClient) {
return (0, import_useBaseQuery.useBaseQuery)(options, import_query_core.QueryObserver, queryClient);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs":
/*!***************************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseInfiniteQuery.cjs ***!
\***************************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useSuspenseInfiniteQuery.ts
var useSuspenseInfiniteQuery_exports = {};
__export(useSuspenseInfiniteQuery_exports, {
useSuspenseInfiniteQuery: () => useSuspenseInfiniteQuery
});
module.exports = __toCommonJS(useSuspenseInfiniteQuery_exports);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
function useSuspenseInfiniteQuery(options, queryClient) {
if (true) {
if (options.queryFn === import_query_core.skipToken) {
console.error("skipToken is not allowed for useSuspenseInfiniteQuery");
}
}
return (0, import_useBaseQuery.useBaseQuery)(
{
...options,
enabled: true,
suspense: true,
throwOnError: import_suspense.defaultThrowOnError
},
import_query_core.InfiniteQueryObserver,
queryClient
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useSuspenseInfiniteQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs":
/*!*********************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQueries.cjs ***!
\*********************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useSuspenseQueries.ts
var useSuspenseQueries_exports = {};
__export(useSuspenseQueries_exports, {
useSuspenseQueries: () => useSuspenseQueries
});
module.exports = __toCommonJS(useSuspenseQueries_exports);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_useQueries = __webpack_require__(/*! ./useQueries.cjs */ "../node_modules/@tanstack/react-query/build/modern/useQueries.cjs");
var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
function useSuspenseQueries(options, queryClient) {
return (0, import_useQueries.useQueries)(
{
...options,
queries: options.queries.map((query) => {
if (true) {
if (query.queryFn === import_query_core.skipToken) {
console.error("skipToken is not allowed for useSuspenseQueries");
}
}
return {
...query,
suspense: true,
throwOnError: import_suspense.defaultThrowOnError,
enabled: true,
placeholderData: void 0
};
})
},
queryClient
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useSuspenseQueries.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs":
/*!*******************************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.cjs ***!
\*******************************************************************************/
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
"use strict";
"use client";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/useSuspenseQuery.ts
var useSuspenseQuery_exports = {};
__export(useSuspenseQuery_exports, {
useSuspenseQuery: () => useSuspenseQuery
});
module.exports = __toCommonJS(useSuspenseQuery_exports);
var import_query_core = __webpack_require__(/*! @tanstack/query-core */ "../node_modules/@tanstack/query-core/build/modern/index.cjs");
var import_useBaseQuery = __webpack_require__(/*! ./useBaseQuery.cjs */ "../node_modules/@tanstack/react-query/build/modern/useBaseQuery.cjs");
var import_suspense = __webpack_require__(/*! ./suspense.cjs */ "../node_modules/@tanstack/react-query/build/modern/suspense.cjs");
function useSuspenseQuery(options, queryClient) {
if (true) {
if (options.queryFn === import_query_core.skipToken) {
console.error("skipToken is not allowed for useSuspenseQuery");
}
}
return (0, import_useBaseQuery.useBaseQuery)(
{
...options,
enabled: true,
suspense: true,
throwOnError: import_suspense.defaultThrowOnError,
placeholderData: void 0
},
import_query_core.QueryObserver,
queryClient
);
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=useSuspenseQuery.cjs.map
/***/ }),
/***/ "../node_modules/@tanstack/react-query/build/modern/utils.cjs":
/*!********************************************************************!*\
!*** ../node_modules/@tanstack/react-query/build/modern/utils.cjs ***!
\********************************************************************/
/***/ ((module) => {
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/utils.ts
var utils_exports = {};
__export(utils_exports, {
noop: () => noop,
shouldThrowError: () => shouldThrowError
});
module.exports = __toCommonJS(utils_exports);
function shouldThrowError(throwError, params) {
if (typeof throwError === "function") {
return throwError(...params);
}
return !!throwError;
}
function noop() {
}
// Annotate the CommonJS export names for ESM import in node:
0 && (0);
//# sourceMappingURL=utils.cjs.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;
/******/ }
/******/
/************************************************************************/
var __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
(() => {
"use strict";
/*!************************************************!*\
!*** ../modules/checklist/assets/js/editor.js ***!
\************************************************/
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "../node_modules/@babel/runtime/helpers/interopRequireDefault.js");
var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ "../node_modules/@babel/runtime/regenerator/index.js"));
var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ "../node_modules/@babel/runtime/helpers/asyncToGenerator.js"));
var _editorV = __webpack_require__(/*! ./editor-v-2 */ "../modules/checklist/assets/js/editor-v-2.js");
var _component = _interopRequireDefault(__webpack_require__(/*! ./component */ "../modules/checklist/assets/js/component.js"));
var _consts = __webpack_require__(/*! ./utils/consts */ "../modules/checklist/assets/js/utils/consts.js");
var _functions = __webpack_require__(/*! ./utils/functions */ "../modules/checklist/assets/js/utils/functions.js");
$e.components.register(new _component.default());
(0, _editorV.editorV2)();
elementorCommon.elements.$window.on('elementor:loaded', elementorLoaded);
function elementorLoaded() {
elementor.on('document:loaded', checklistStartup);
elementorCommon.elements.$window.off('elementor:loaded', elementorLoaded);
}
function checklistStartup() {
return _checklistStartup.apply(this, arguments);
}
function _checklistStartup() {
_checklistStartup = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator.default.mark(function _callee() {
var shouldHide, userProgress;
return _regenerator.default.wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
shouldHide = 'yes' !== elementor.getPreferences('show_launchpad_checklist');
if (!shouldHide) {
_context.next = 5;
break;
}
$e.commands.run('checklist/toggle-icon', false);
_context.next = 9;
break;
case 5:
_context.next = 7;
return (0, _functions.fetchUserProgress)();
case 7:
userProgress = _context.sent;
if (userProgress !== null && userProgress !== void 0 && userProgress[_consts.USER_PROGRESS.SHOULD_OPEN_IN_EDITOR]) {
(0, _functions.toggleChecklistPopup)();
(0, _functions.dispatchChecklistOpenEvent)();
}
case 9:
elementor.off('document:loaded', checklistStartup);
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return _checklistStartup.apply(this, arguments);
}
})();
/******/ })()
;
//# sourceMappingURL=checklist.js.map