PluginProbe
Elementor Website Builder – more than just a page builder / 3.17.2
Elementor Website Builder – more than just a page builder v3.17.2
4.3.1 4.3.0 4.3.0-beta3 4.3.0-beta2 4.3.0-beta1 4.2.4 4.2.3 4.2.2 4.2.1 4.2.0 4.1.5 4.2.0-beta2 4.2.0-dev2 4.2.0-beta1 4.1.4 4.1.3 4.1.2 4.1.1 4.1.0 4.1.0-beta3 4.1.0-dev3 4.0.9 4.1.0-beta2 4.1.0-dev2 4.0.8 All 454 releases
← All changes | assets/js/packages/query/query.min.js +2 -10 4.3.0 → 3.17.2 View file →
@@ -1,10 +1,2 @@
1 -/**
2 -* @license React
3 -* react-jsx-runtime.production.min.js
4 -*
5 -* Copyright (c) Facebook, Inc. and its affiliates.
6 -*
7 -* This source code is licensed under the MIT license found in the
8 -* LICENSE file in the root directory of this source tree.
9 -*/
10 -(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__copyProps=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},__toESM=(n,r,a)=>(a=n==null?{}:e(i(n)),__copyProps(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),o=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{Subscribable:()=>Subscribable}),t.exports=__toCommonJS(o);var Subscribable=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};0&&(t.exports={Subscribable})})),s=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{TimeoutManager:()=>TimeoutManager,defaultTimeoutProvider:()=>s,systemSetTimeoutZero:()=>systemSetTimeoutZero,timeoutManager:()=>c}),t.exports=__toCommonJS(o);var s={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TimeoutManager=class{#e=s;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},c=new TimeoutManager;function systemSetTimeoutZero(e){setTimeout(e,0)}0&&(t.exports={TimeoutManager,defaultTimeoutProvider:s,systemSetTimeoutZero,timeoutManager:c})})),c=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{addConsumeAwareSignal:()=>addConsumeAwareSignal,addToEnd:()=>addToEnd,addToStart:()=>addToStart,ensureQueryFn:()=>ensureQueryFn,functionalUpdate:()=>functionalUpdate,hashKey:()=>hashKey,hashQueryKeyByOptions:()=>hashQueryKeyByOptions,isPlainArray:()=>isPlainArray,isPlainObject:()=>isPlainObject,isServer:()=>l,isValidTimeout:()=>isValidTimeout,keepPreviousData:()=>keepPreviousData,matchMutation:()=>matchMutation,matchQuery:()=>matchQuery,noop:()=>noop,partialMatchKey:()=>partialMatchKey,replaceData:()=>replaceData,replaceEqualDeep:()=>replaceEqualDeep,resolveEnabled:()=>resolveEnabled,resolveStaleTime:()=>resolveStaleTime,shallowEqualObjects:()=>shallowEqualObjects,shouldThrowError:()=>shouldThrowError,skipToken:()=>d,sleep:()=>sleep,timeUntilStale:()=>timeUntilStale}),t.exports=__toCommonJS(o);var c=s(),l=typeof window>`u`||`Deno`in globalThis;function noop(){}function functionalUpdate(e,t){return typeof e==`function`?e(t):e}function isValidTimeout(e){return typeof e==`number`&&e>=0&&e!==1/0}function timeUntilStale(e,t){return Math.max(e+(t||0)-Date.now(),0)}function resolveStaleTime(e,t){return typeof e==`function`?e(t):e}function resolveEnabled(e,t){return typeof e==`function`?e(t):e}function matchQuery(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==hashQueryKeyByOptions(o,t.options))return!1}else if(!partialMatchKey(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function matchMutation(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(hashKey(t.options.mutationKey)!==hashKey(a))return!1}else if(!partialMatchKey(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function hashQueryKeyByOptions(e,t){return(t?.queryKeyHashFn||hashKey)(e)}function hashKey(e){return JSON.stringify(e,(e,t)=>isPlainObject(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function partialMatchKey(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>partialMatchKey(e[n],t[n])):!1}var u=Object.prototype.hasOwnProperty;function replaceEqualDeep(e,t){if(e===t)return e;let n=isPlainArray(e)&&isPlainArray(t);if(!n&&!(isPlainObject(e)&&isPlainObject(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),a=i.length,o=n?Array(a):{},s=0;for(let c=0;c<a;c++){let a=n?c:i[c],l=e[a],d=t[a];if(l===d){o[a]=l,(n?c<r:u.call(e,a))&&s++;continue}if(l===null||d===null||typeof l!=`object`||typeof d!=`object`){o[a]=d;continue}let f=replaceEqualDeep(l,d);o[a]=f,f===l&&s++}return r===a&&s===r?e:o}function shallowEqualObjects(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function isPlainArray(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function isPlainObject(e){if(!hasObjectPrototype(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!hasObjectPrototype(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function hasObjectPrototype(e){return Object.prototype.toString.call(e)===`[object Object]`}function sleep(e){return new Promise(t=>{c.timeoutManager.setTimeout(t,e)})}function replaceData(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:replaceEqualDeep(e,t)}function keepPreviousData(e){return e}function addToEnd(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function addToStart(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var d=Symbol();function ensureQueryFn(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===d?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function shouldThrowError(e,t){return typeof e==`function`?e(...t):!!e}function addConsumeAwareSignal(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}0&&(t.exports={addConsumeAwareSignal,addToEnd,addToStart,ensureQueryFn,functionalUpdate,hashKey,hashQueryKeyByOptions,isPlainArray,isPlainObject,isServer:l,isValidTimeout,keepPreviousData,matchMutation,matchQuery,noop,partialMatchKey,replaceData,replaceEqualDeep,resolveEnabled,resolveStaleTime,shallowEqualObjects,shouldThrowError,skipToken:d,sleep,timeUntilStale})})),l=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{FocusManager:()=>FocusManager,focusManager:()=>d}),t.exports=__toCommonJS(s);var l=o(),u=c(),FocusManager=class extends l.Subscribable{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!u.isServer&&window.addEventListener){let listener=()=>e();return window.addEventListener(`visibilitychange`,listener,!1),()=>{window.removeEventListener(`visibilitychange`,listener)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},d=new FocusManager;0&&(t.exports={FocusManager,focusManager:d})})),u=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{pendingThenable:()=>pendingThenable,tryResolveSync:()=>tryResolveSync}),t.exports=__toCommonJS(o);var s=c();function pendingThenable(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function finalize(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{finalize({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{finalize({status:`rejected`,reason:e}),t(e)},n}function tryResolveSync(e){let t;if(e.then(e=>(t=e,e),s.noop)?.catch(s.noop),t!==void 0)return{data:t}}0&&(t.exports={pendingThenable,tryResolveSync})})),d=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{defaultShouldDehydrateMutation:()=>defaultShouldDehydrateMutation,defaultShouldDehydrateQuery:()=>defaultShouldDehydrateQuery,dehydrate:()=>dehydrate,hydrate:()=>hydrate}),t.exports=__toCommonJS(o);var s=u(),l=c();function defaultTransformerFn(e){return e}function dehydrateMutation(e){return{mutationKey:e.options.mutationKey,state:e.state,...e.options.scope&&{scope:e.options.scope},...e.meta&&{meta:e.meta}}}function dehydrateQuery(e,t,n){let dehydratePromise=()=>{let r=e.promise?.then(t).catch(e=>n(e)?Promise.reject(Error(`redacted`)):Promise.reject(e));return r?.catch(l.noop),r};return{dehydratedAt:Date.now(),state:{...e.state,...e.state.data!==void 0&&{data:t(e.state.data)}},queryKey:e.queryKey,queryHash:e.queryHash,...e.state.status===`pending`&&{promise:dehydratePromise()},...e.meta&&{meta:e.meta}}}function defaultShouldDehydrateMutation(e){return e.state.isPaused}function defaultShouldDehydrateQuery(e){return e.state.status===`success`}function defaultShouldRedactErrors(e){return!0}function dehydrate(e,t={}){let n=t.shouldDehydrateMutation??e.getDefaultOptions().dehydrate?.shouldDehydrateMutation??defaultShouldDehydrateMutation,r=e.getMutationCache().getAll().flatMap(e=>n(e)?[dehydrateMutation(e)]:[]),i=t.shouldDehydrateQuery??e.getDefaultOptions().dehydrate?.shouldDehydrateQuery??defaultShouldDehydrateQuery,a=t.shouldRedactErrors??e.getDefaultOptions().dehydrate?.shouldRedactErrors??defaultShouldRedactErrors,o=t.serializeData??e.getDefaultOptions().dehydrate?.serializeData??defaultTransformerFn;return{mutations:r,queries:e.getQueryCache().getAll().flatMap(e=>i(e)?[dehydrateQuery(e,o,a)]:[])}}function hydrate(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??defaultTransformerFn,o=t.mutations||[],c=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),c.forEach(({queryKey:t,state:r,queryHash:o,meta:c,promise:u,dehydratedAt:d})=>{let f=u?(0,s.tryResolveSync)(u):void 0,p=r.data===void 0?f?.data:r.data,m=p===void 0?p:a(p),h=i.get(o),g=h?.state.status===`pending`,_=h?.state.fetchStatus===`fetching`;if(h){let e=f&&d!==void 0&&d>h.state.dataUpdatedAt;if(r.dataUpdatedAt>h.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;h.setState({...t,data:m})}}else h=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:c},{...r,data:m,fetchStatus:`idle`,status:m===void 0?r.status:`success`});u&&!g&&!_&&(d===void 0||d>h.state.dataUpdatedAt)&&h.fetch(void 0,{initialPromise:Promise.resolve(u).then(a)}).catch(l.noop)})}0&&(t.exports={defaultShouldDehydrateMutation,defaultShouldDehydrateQuery,dehydrate,hydrate})})),f=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{createNotifyManager:()=>createNotifyManager,defaultScheduler:()=>c,notifyManager:()=>l}),t.exports=__toCommonJS(o);var c=s().systemSetTimeoutZero;function createNotifyManager(){let e=[],t=0,notifyFn=e=>{e()},batchNotifyFn=e=>{e()},n=c,schedule=r=>{t?e.push(r):n(()=>{notifyFn(r)})},flush=()=>{let t=e;e=[],t.length&&n(()=>{batchNotifyFn(()=>{t.forEach(e=>{notifyFn(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||flush()}return n},batchCalls:e=>(...t)=>{schedule(()=>{e(...t)})},schedule,setNotifyFunction:e=>{notifyFn=e},setBatchNotifyFunction:e=>{batchNotifyFn=e},setScheduler:e=>{n=e}}}var l=createNotifyManager();0&&(t.exports={createNotifyManager,defaultScheduler:c,notifyManager:l})})),p=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{OnlineManager:()=>OnlineManager,onlineManager:()=>d}),t.exports=__toCommonJS(s);var l=o(),u=c(),OnlineManager=class extends l.Subscribable{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!u.isServer&&window.addEventListener){let onlineListener=()=>e(!0),offlineListener=()=>e(!1);return window.addEventListener(`online`,onlineListener,!1),window.addEventListener(`offline`,offlineListener,!1),()=>{window.removeEventListener(`online`,onlineListener),window.removeEventListener(`offline`,offlineListener)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}},d=new OnlineManager;0&&(t.exports={OnlineManager,onlineManager:d})})),m=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{CancelledError:()=>CancelledError,canFetch:()=>canFetch,createRetryer:()=>createRetryer,isCancelledError:()=>isCancelledError}),t.exports=__toCommonJS(o);var s=l(),d=p(),f=u(),m=c();function defaultRetryDelay(e){return Math.min(1e3*2**e,3e4)}function canFetch(e){return(e??`online`)!==`online`||d.onlineManager.isOnline()}var CancelledError=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function isCancelledError(e){return e instanceof CancelledError}function createRetryer(e){let t=!1,n=0,continueFn,r=(0,f.pendingThenable)(),isResolved=()=>r.status!==`pending`,cancel=t=>{if(!isResolved()){let n=new CancelledError(t);reject(n),e.onCancel?.(n)}},cancelRetry=()=>{t=!0},continueRetry=()=>{t=!1},canContinue=()=>s.focusManager.isFocused()&&(e.networkMode===`always`||d.onlineManager.isOnline())&&e.canRun(),canStart=()=>canFetch(e.networkMode)&&e.canRun(),resolve=e=>{isResolved()||(continueFn?.(),r.resolve(e))},reject=e=>{isResolved()||(continueFn?.(),r.reject(e))},pause=()=>new Promise(t=>{continueFn=e=>{(isResolved()||canContinue())&&t(e)},e.onPause?.()}).then(()=>{continueFn=void 0,isResolved()||e.onContinue?.()}),run=()=>{if(isResolved())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(resolve).catch(r=>{if(isResolved())return;let i=e.retry??(m.isServer?0:3),a=e.retryDelay??defaultRetryDelay,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){reject(r);return}n++,e.onFail?.(n,r),(0,m.sleep)(o).then(()=>canContinue()?void 0:pause()).then(()=>{t?reject(r):run()})})};return{promise:r,status:()=>r.status,cancel,continue:()=>(continueFn?.(),r),cancelRetry,continueRetry,canStart,start:()=>(canStart()?run():pause().then(run),r)}}0&&(t.exports={CancelledError,canFetch,createRetryer,isCancelledError})})),h=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{Removable:()=>Removable}),t.exports=__toCommonJS(o);var l=s(),u=c(),Removable=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,u.isValidTimeout)(this.gcTime)&&(this.#e=l.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(u.isServer?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(l.timeoutManager.clearTimeout(this.#e),void 0)}};0&&(t.exports={Removable})})),g=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{Query:()=>Query,fetchState:()=>fetchState}),t.exports=__toCommonJS(o);var s=c(),l=f(),u=m(),d=h(),Query=class extends d.Removable{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=getDefaultState(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=getDefaultState(this.options);e.data!==void 0&&(this.setState(successState(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=(0,s.replaceData)(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(s.noop).catch(s.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>(0,s.resolveEnabled)(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===s.skipToken||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>(0,s.resolveStaleTime)(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!(0,s.timeUntilStale)(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,addSignalProperty=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},fetchFn=()=>{let e=(0,s.ensureQueryFn)(this.options,t),createQueryFnContext=()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return addSignalProperty(e),e},n=createQueryFnContext();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},createFetchContext=()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn};return addSignalProperty(e),e},r=createFetchContext();this.options.behavior?.onFetch(r,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==r.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:r.fetchOptions?.meta}),this.#i=(0,u.createRetryer)({initialPromise:t?.initialPromise,fn:r.fetchFn,onCancel:e=>{e instanceof u.CancelledError&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof u.CancelledError){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let reducer=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...fetchState(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...successState(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=reducer(this.state),l.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function fetchState(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,u.canFetch)(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function successState(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function getDefaultState(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}0&&(t.exports={Query,fetchState})})),_=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),d={};__export(d,{QueryObserver:()=>QueryObserver}),t.exports=__toCommonJS(d);var p=l(),m=f(),h=g(),_=o(),v=u(),y=c(),b=s(),QueryObserver=class extends _.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=(0,v.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),shouldFetchOnMount(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return shouldFetchOn(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return shouldFetchOn(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof(0,y.resolveEnabled)(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!(0,y.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&shouldFetchOptionally(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||(0,y.resolveEnabled)(this.options.enabled,this.#t)!==(0,y.resolveEnabled)(t.enabled,this.#t)||(0,y.resolveStaleTime)(this.options.staleTime,this.#t)!==(0,y.resolveStaleTime)(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||(0,y.resolveEnabled)(this.options.enabled,this.#t)!==(0,y.resolveEnabled)(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return shouldAssignObserverCurrentProperties(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(y.noop)),t}#g(){this.#b();let e=(0,y.resolveStaleTime)(this.options.staleTime,this.#t);if(y.isServer||this.#r.isStale||!(0,y.isValidTimeout)(e))return;let t=(0,y.timeUntilStale)(this.#r.dataUpdatedAt,e)+1;this.#d=b.timeoutManager.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(y.isServer||(0,y.resolveEnabled)(this.options.enabled,this.#t)===!1||!(0,y.isValidTimeout)(this.#p)||this.#p===0)&&(this.#f=b.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||p.focusManager.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(b.timeoutManager.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(b.timeoutManager.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&shouldFetchOnMount(e,t),o=i&&shouldFetchOptionally(e,n,t,r);(a||o)&&(l={...l,...(0,h.fetchState)(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let g=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,g=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=(0,y.replaceData)(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!g)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=(0,y.replaceData)(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let _=l.fetchStatus===`fetching`,b=m===`pending`,x=m===`error`,S=b&&_,C=d!==void 0,w={status:m,fetchStatus:l.fetchStatus,isPending:b,isSuccess:m===`success`,isError:x,isInitialLoading:S,isLoading:S,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:_,isRefetching:_&&!b,isLoadingError:x&&!C,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:x&&C,isStale:isStale(e,t),refetch:this.refetch,promise:this.#o,isEnabled:(0,y.resolveEnabled)(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let finalizeThenableIfPossible=e=>{w.status===`error`?e.reject(w.error):w.data!==void 0&&e.resolve(w.data)},recreateThenable=()=>{let e=this.#o=w.promise=(0,v.pendingThenable)();finalizeThenableIfPossible(e)},t=this.#o;switch(t.status){case`pending`:e.queryHash===n.queryHash&&finalizeThenableIfPossible(t);break;case`fulfilled`:(w.status===`error`||w.data!==t.value)&&recreateThenable();break;case`rejected`:(w.status!==`error`||w.error!==t.reason)&&recreateThenable();break}}return w}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),(0,y.shallowEqualObjects)(t,e))return;this.#r=t;let shouldNotifyListeners=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})};this.#C({listeners:shouldNotifyListeners()})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){m.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function shouldLoadOnMount(e,t){return(0,y.resolveEnabled)(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||t.retryOnMount!==!1)}function shouldFetchOnMount(e,t){return shouldLoadOnMount(e,t)||e.state.data!==void 0&&shouldFetchOn(e,t,t.refetchOnMount)}function shouldFetchOn(e,t,n){if((0,y.resolveEnabled)(t.enabled,e)!==!1&&(0,y.resolveStaleTime)(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&isStale(e,t)}return!1}function shouldFetchOptionally(e,t,n,r){return(e!==t||(0,y.resolveEnabled)(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&isStale(e,n)}function isStale(e,t){return(0,y.resolveEnabled)(t.enabled,e)!==!1&&e.isStaleByTime((0,y.resolveStaleTime)(t.staleTime,e))}function shouldAssignObserverCurrentProperties(e,t){return!(0,y.shallowEqualObjects)(e.getCurrentResult(),t)}0&&(t.exports={QueryObserver})})),v=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{hasNextPage:()=>hasNextPage,hasPreviousPage:()=>hasPreviousPage,infiniteQueryBehavior:()=>infiniteQueryBehavior}),t.exports=__toCommonJS(o);var s=c();function infiniteQueryBehavior(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],c={pages:[],pageParams:[]},l=0,fetchFn=async()=>{let n=!1,addSignalProperty=e=>{(0,s.addConsumeAwareSignal)(e,()=>t.signal,()=>n=!0)},u=(0,s.ensureQueryFn)(t.options,t.fetchOptions),fetchPage=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let createQueryFnContext=()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return addSignalProperty(e),e},a=createQueryFnContext(),o=await u(a),{maxPages:c}=t.options,l=i?s.addToStart:s.addToEnd;return{pages:l(e.pages,o,c),pageParams:l(e.pageParams,r,c)}};if(i&&a.length){let e=i===`backward`,t=e?getPreviousPageParam:getNextPageParam,n={pages:a,pageParams:o};c=await fetchPage(n,t(r,n),e)}else{let t=e??a.length;do{let e=l===0?o[0]??r.initialPageParam:getNextPageParam(r,c);if(l>0&&e==null)break;c=await fetchPage(c,e),l++}while(l<t)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(fetchFn,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=fetchFn}}}function getNextPageParam(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function getPreviousPageParam(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function hasNextPage(e,t){return t?getNextPageParam(e,t)!=null:!1}function hasPreviousPage(e,t){return!t||!e.getPreviousPageParam?!1:getPreviousPageParam(e,t)!=null}0&&(t.exports={hasNextPage,hasPreviousPage,infiniteQueryBehavior})})),y=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{InfiniteQueryObserver:()=>InfiniteQueryObserver}),t.exports=__toCommonJS(o);var s=_(),c=v(),InfiniteQueryObserver=class extends s.QueryObserver{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:(0,c.infiniteQueryBehavior)()})}getOptimisticResult(e){return e.behavior=(0,c.infiniteQueryBehavior)(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,l=n.fetchMeta?.fetchMore?.direction,u=o&&l===`forward`,d=i&&l===`forward`,f=o&&l===`backward`,p=i&&l===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,c.hasNextPage)(t,n.data),hasPreviousPage:(0,c.hasPreviousPage)(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:s&&!u&&!f,isRefetching:a&&!d&&!p}}};0&&(t.exports={InfiniteQueryObserver})})),b=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{Mutation:()=>Mutation,getDefaultState:()=>getDefaultState}),t.exports=__toCommonJS(o);var s=f(),c=h(),l=m(),Mutation=class extends c.Removable{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||getDefaultState(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let onContinue=()=>{this.#i({type:`continue`})},t={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=(0,l.createRetryer)({fn:()=>this.options.mutationFn?this.options.mutationFn(e,t):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let n=this.state.status===`pending`,r=!this.#r.canStart();try{if(n)onContinue();else{this.#i({type:`pending`,variables:e,isPaused:r}),await this.#n.config.onMutate?.(e,this,t);let n=await this.options.onMutate?.(e,t);n!==this.state.context&&this.#i({type:`pending`,context:n,variables:e,isPaused:r})}let i=await this.#r.start();return await this.#n.config.onSuccess?.(i,e,this.state.context,this,t),await this.options.onSuccess?.(i,e,this.state.context,t),await this.#n.config.onSettled?.(i,null,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(i,null,e,this.state.context,t),this.#i({type:`success`,data:i}),i}catch(n){try{throw await this.#n.config.onError?.(n,e,this.state.context,this,t),await this.options.onError?.(n,e,this.state.context,t),await this.#n.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,t),await this.options.onSettled?.(void 0,n,e,this.state.context,t),n}finally{this.#i({type:`error`,error:n})}}finally{this.#n.runNext(this)}}#i(e){let reducer=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=reducer(this.state),s.notifyManager.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function getDefaultState(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}0&&(t.exports={Mutation,getDefaultState})})),x=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{MutationCache:()=>MutationCache}),t.exports=__toCommonJS(s);var l=f(),u=b(),d=c(),p=o(),MutationCache=class extends p.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new u.Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=scopeFor(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=scopeFor(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=scopeFor(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=scopeFor(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){l.notifyManager.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,d.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,d.matchMutation)(e,t))}notify(e){l.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return l.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(d.noop))))}};function scopeFor(e){return e.options.scope?.id}0&&(t.exports={MutationCache})})),S=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{MutationObserver:()=>MutationObserver}),t.exports=__toCommonJS(s);var l=b(),u=f(),d=o(),p=c(),MutationObserver=class extends d.Subscribable{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,p.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,p.hashKey)(t.mutationKey)!==(0,p.hashKey)(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,l.getDefaultState)();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){u.notifyManager.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type===`success`?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type===`error`&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}};0&&(t.exports={MutationObserver})})),C=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{QueriesObserver:()=>QueriesObserver}),t.exports=__toCommonJS(s);var l=f(),u=_(),d=o(),p=c();function difference(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}function replaceAt(e,t,n){let r=e.slice(0);return r[t]=n,r}var QueriesObserver=class extends d.Subscribable{#e;#t;#n;#r;#i;#a;#o;#s;#c=[];constructor(e,t,n){super(),this.#e=e,this.#r=n,this.#n=[],this.#i=[],this.#t=[],this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.#i.forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#i.forEach(e=>{e.destroy()})}setQueries(e,t){this.#n=e,this.#r=t,l.notifyManager.batch(()=>{let e=this.#i,t=this.#d(this.#n);this.#c=t,t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=e.length!==n.length,a=n.some((t,n)=>t!==e[n]),o=i||a,s=o?!0:r.some((e,t)=>{let n=this.#t[t];return!n||!(0,p.shallowEqualObjects)(e,n)});!o&&!s||(o&&(this.#i=n),this.#t=r,this.hasListeners()&&(o&&(difference(e,n).forEach(e=>{e.destroy()}),difference(n,e).forEach(e=>{e.subscribe(t=>{this.#f(e,t)})})),this.#p()))})}getCurrentResult(){return this.#t}getQueries(){return this.#i.map(e=>e.getCurrentQuery())}getObservers(){return this.#i}getOptimisticResult(e,t){let n=this.#d(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[r,e=>this.#u(e??r,t),()=>this.#l(r,n)]}#l(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}#u(e,t){return t?((!this.#a||this.#t!==this.#s||t!==this.#o)&&(this.#o=t,this.#s=this.#t,this.#a=(0,p.replaceEqualDeep)(this.#a,t(e))),this.#a):e}#d(e){let t=new Map;this.#i.forEach(e=>{let n=e.options.queryHash;if(!n)return;let r=t.get(n);r?r.push(e):t.set(n,[e])});let n=[];return e.forEach(e=>{let r=this.#e.defaultQueryOptions(e),i=t.get(r.queryHash)?.shift()??new u.QueryObserver(this.#e,r);n.push({defaultedQueryOptions:r,observer:i})}),n}#f(e,t){let n=this.#i.indexOf(e);n!==-1&&(this.#t=replaceAt(this.#t,n,t),this.#p())}#p(){if(this.hasListeners()){let e=this.#a,t=this.#l(this.#t,this.#c);e!==this.#u(t,this.#r?.combine)&&l.notifyManager.batch(()=>{this.listeners.forEach(e=>{e(this.#t)})})}}};0&&(t.exports={QueriesObserver})})),w=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),s={};__export(s,{QueryCache:()=>QueryCache}),t.exports=__toCommonJS(s);var l=c(),u=g(),d=f(),p=o(),QueryCache=class extends p.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??(0,l.hashQueryKeyByOptions)(r,t),a=this.get(i);return a||(a=new u.Query({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,l.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,l.matchQuery)(e,t)):t}notify(e){d.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){d.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};0&&(t.exports={QueryCache})})),T=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{QueryClient:()=>QueryClient}),t.exports=__toCommonJS(o);var s=c(),u=w(),d=x(),m=l(),h=p(),g=f(),_=v(),QueryClient=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new u.QueryCache,this.#t=e.mutationCache||new d.MutationCache,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=m.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=h.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,s.resolveStaleTime)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=(0,s.functionalUpdate)(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return g.notifyManager.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;g.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return g.notifyManager.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=g.notifyManager.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(s.noop).catch(s.noop)}invalidateQueries(e,t={}){return g.notifyManager.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=g.notifyManager.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(s.noop)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(s.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime((0,s.resolveStaleTime)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(s.noop).catch(s.noop)}fetchInfiniteQuery(e){return e.behavior=(0,_.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(s.noop).catch(s.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,_.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.onlineManager.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set((0,s.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{(0,s.partialMatchKey)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set((0,s.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{(0,s.partialMatchKey)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=(0,s.hashQueryKeyByOptions)(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===s.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};0&&(t.exports={QueryClient})})),E=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{streamedQuery:()=>streamedQuery}),t.exports=__toCommonJS(o);var s=c();function streamedQuery({streamFn:e,refetchMode:t=`reset`,reducer:n=(e,t)=>(0,s.addToEnd)(e,t),initialValue:r=[]}){return async i=>{let a=i.client.getQueryCache().find({queryKey:i.queryKey,exact:!0}),o=!!a&&a.state.data!==void 0;o&&t===`reset`&&a.setState({status:`pending`,data:void 0,error:null,fetchStatus:`fetching`});let c=r,l=!1,u=await e((0,s.addConsumeAwareSignal)({client:i.client,meta:i.meta,queryKey:i.queryKey,pageParam:i.pageParam,direction:i.direction},()=>i.signal,()=>l=!0)),d=o&&t===`replace`;for await(let e of u){if(l)break;d?c=n(c,e):i.client.setQueryData(i.queryKey,t=>n(t===void 0?r:t,e))}return d&&!l&&i.client.setQueryData(i.queryKey,c),i.client.getQueryData(i.queryKey)??r}}0&&(t.exports={streamedQuery})})),D=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{dataTagErrorSymbol:()=>c,dataTagSymbol:()=>s,unsetMarker:()=>l}),t.exports=__toCommonJS(o);var s=Symbol(`dataTagSymbol`),c=Symbol(`dataTagErrorSymbol`),l=Symbol(`unsetMarker`);0&&(t.exports={dataTagErrorSymbol:c,dataTagSymbol:s,unsetMarker:l})})),O=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{CancelledError:()=>I.CancelledError,InfiniteQueryObserver:()=>v.InfiniteQueryObserver,Mutation:()=>B.Mutation,MutationCache:()=>O.MutationCache,MutationObserver:()=>k.MutationObserver,QueriesObserver:()=>M.QueriesObserver,Query:()=>V.Query,QueryCache:()=>N.QueryCache,QueryClient:()=>P.QueryClient,QueryObserver:()=>F.QueryObserver,defaultScheduler:()=>A.defaultScheduler,defaultShouldDehydrateMutation:()=>h.defaultShouldDehydrateMutation,defaultShouldDehydrateQuery:()=>h.defaultShouldDehydrateQuery,dehydrate:()=>h.dehydrate,experimental_streamedQuery:()=>z.streamedQuery,focusManager:()=>u.focusManager,hashKey:()=>R.hashKey,hydrate:()=>h.hydrate,isCancelledError:()=>I.isCancelledError,isServer:()=>R.isServer,keepPreviousData:()=>R.keepPreviousData,matchMutation:()=>R.matchMutation,matchQuery:()=>R.matchQuery,noop:()=>R.noop,notifyManager:()=>A.notifyManager,onlineManager:()=>j.onlineManager,partialMatchKey:()=>R.partialMatchKey,replaceEqualDeep:()=>R.replaceEqualDeep,shouldThrowError:()=>R.shouldThrowError,skipToken:()=>R.skipToken,timeoutManager:()=>L.timeoutManager}),t.exports=__toCommonJS(o);var u=l(),h=d(),v=y(),O=x(),k=S(),A=f(),j=p(),M=C(),N=w(),P=T(),F=_(),I=m(),L=s(),R=c(),z=E(),B=b(),V=g();__reExport(o,D(),t.exports),0&&(t.exports={CancelledError,InfiniteQueryObserver,Mutation,MutationCache,MutationObserver,QueriesObserver,Query,QueryCache,QueryClient,QueryObserver,defaultScheduler,defaultShouldDehydrateMutation,defaultShouldDehydrateQuery,dehydrate,experimental_streamedQuery,focusManager,hashKey,hydrate,isCancelledError,isServer,keepPreviousData,matchMutation,matchQuery,noop,notifyManager,onlineManager,partialMatchKey,replaceEqualDeep,shouldThrowError,skipToken,timeoutManager,...D()})})),k=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e);t.exports=__toCommonJS({})})),A=__commonJSMin((e=>{var t=globalThis.React,n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function q(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=q,e.jsxs=q})),j=__commonJSMin(((e,t)=>{t.exports=A()})),M=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{QueryClientContext:()=>d,QueryClientProvider:()=>QueryClientProvider,useQueryClient:()=>useQueryClient}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=j(),d=l.createContext(void 0),useQueryClient=e=>{let t=l.useContext(d);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},QueryClientProvider=({client:e,children:t})=>(l.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,u.jsx)(d.Provider,{value:e,children:t}));0&&(t.exports={QueryClientContext:d,QueryClientProvider,useQueryClient})})),N=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{IsRestoringProvider:()=>d,useIsRestoring:()=>useIsRestoring}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=l.createContext(!1),useIsRestoring=()=>l.useContext(u),d=u.Provider;0&&(t.exports={IsRestoringProvider:d,useIsRestoring})})),P=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{QueryErrorResetBoundary:()=>QueryErrorResetBoundary,useQueryErrorResetBoundary:()=>useQueryErrorResetBoundary}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=j();function createValue(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var d=l.createContext(createValue()),useQueryErrorResetBoundary=()=>l.useContext(d),QueryErrorResetBoundary=({children:e})=>{let[t]=l.useState(()=>createValue());return(0,u.jsx)(d.Provider,{value:t,children:typeof e==`function`?e(t):e})};0&&(t.exports={QueryErrorResetBoundary,useQueryErrorResetBoundary})})),F=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{ensurePreventErrorBoundaryRetry:()=>ensurePreventErrorBoundaryRetry,getHasError:()=>getHasError,useClearResetErrorBoundary:()=>useClearResetErrorBoundary}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),ensurePreventErrorBoundaryRetry=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},useClearResetErrorBoundary=e=>{l.useEffect(()=>{e.clearReset()},[e])},getHasError=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||(0,u.shouldThrowError)(n,[e.error,r]));0&&(t.exports={ensurePreventErrorBoundaryRetry,getHasError,useClearResetErrorBoundary})})),I=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{defaultThrowOnError:()=>defaultThrowOnError,ensureSuspenseTimers:()=>ensureSuspenseTimers,fetchOptimistic:()=>fetchOptimistic,shouldSuspend:()=>shouldSuspend,willFetch:()=>willFetch}),t.exports=__toCommonJS(o);var defaultThrowOnError=(e,t)=>t.state.data===void 0,ensureSuspenseTimers=e=>{if(e.suspense){let t=1e3,clamp=e=>e===`static`?e:Math.max(e??t,t),n=e.staleTime;e.staleTime=typeof n==`function`?(...e)=>clamp(n(...e)):clamp(n),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},willFetch=(e,t)=>e.isLoading&&e.isFetching&&!t,shouldSuspend=(e,t)=>e?.suspense&&t.isPending,fetchOptimistic=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});0&&(t.exports={defaultThrowOnError,ensureSuspenseTimers,fetchOptimistic,shouldSuspend,willFetch})})),L=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{useQueries:()=>useQueries}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M(),f=N(),p=P(),m=F(),h=I();function useQueries({queries:e,...t},n){let r=(0,d.useQueryClient)(n),i=(0,f.useIsRestoring)(),a=(0,p.useQueryErrorResetBoundary)(),o=l.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=i?`isRestoring`:`optimistic`,t}),[e,r,i]);o.forEach(e=>{(0,h.ensureSuspenseTimers)(e),(0,m.ensurePreventErrorBoundaryRetry)(e,a)}),(0,m.useClearResetErrorBoundary)(a);let[s]=l.useState(()=>new u.QueriesObserver(r,o,t)),[c,g,_]=s.getOptimisticResult(o,t.combine),v=!i&&t.subscribed!==!1;l.useSyncExternalStore(l.useCallback(e=>v?s.subscribe(u.notifyManager.batchCalls(e)):u.noop,[s,v]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l.useEffect(()=>{s.setQueries(o,t)},[o,t,s]);let y=c.some((e,t)=>(0,h.shouldSuspend)(o[t],e))?c.flatMap((e,t)=>{let n=o[t];if(n){let t=new u.QueryObserver(r,n);if((0,h.shouldSuspend)(n,e))return(0,h.fetchOptimistic)(n,t,a);(0,h.willFetch)(e,i)&&(0,h.fetchOptimistic)(n,t,a)}return[]}):[];if(y.length>0)throw Promise.all(y);let b=c.find((e,t)=>{let n=o[t];return n&&(0,m.getHasError)({result:e,errorResetBoundary:a,throwOnError:n.throwOnError,query:r.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(b?.error)throw b.error;return g(_())}0&&(t.exports={useQueries})})),R=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{useBaseQuery:()=>useBaseQuery}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M(),f=P(),p=F(),m=N(),h=I();function useBaseQuery(e,t,n){let r=(0,m.useIsRestoring)(),i=(0,f.useQueryErrorResetBoundary)(),a=(0,d.useQueryClient)(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=r?`isRestoring`:`optimistic`,(0,h.ensureSuspenseTimers)(o),(0,p.ensurePreventErrorBoundaryRetry)(o,i),(0,p.useClearResetErrorBoundary)(i);let s=!a.getQueryCache().get(o.queryHash),[c]=l.useState(()=>new t(a,o)),g=c.getOptimisticResult(o),_=!r&&e.subscribed!==!1;if(l.useSyncExternalStore(l.useCallback(e=>{let t=_?c.subscribe(u.notifyManager.batchCalls(e)):u.noop;return c.updateResult(),t},[c,_]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),l.useEffect(()=>{c.setOptions(o)},[o,c]),(0,h.shouldSuspend)(o,g))throw(0,h.fetchOptimistic)(o,c,i);if((0,p.getHasError)({result:g,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw g.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,g),o.experimental_prefetchInRender&&!u.isServer&&(0,h.willFetch)(g,r)&&(s?(0,h.fetchOptimistic)(o,c,i):a.getQueryCache().get(o.queryHash)?.promise)?.catch(u.noop).finally(()=>{c.updateResult()}),o.notifyOnChangeProps?g:c.trackResult(g)}0&&(t.exports={useBaseQuery})})),z=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{useQuery:()=>useQuery}),t.exports=__toCommonJS(o);var s=O(),c=R();function useQuery(e,t){return(0,c.useBaseQuery)(e,s.QueryObserver,t)}0&&(t.exports={useQuery})})),B=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{useSuspenseQuery:()=>useSuspenseQuery}),t.exports=__toCommonJS(o);var s=O(),c=R(),l=I();function useSuspenseQuery(e,t){return(0,c.useBaseQuery)({...e,enabled:!0,suspense:!0,throwOnError:l.defaultThrowOnError,placeholderData:void 0},s.QueryObserver,t)}0&&(t.exports={useSuspenseQuery})})),V=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{useSuspenseInfiniteQuery:()=>useSuspenseInfiniteQuery}),t.exports=__toCommonJS(o);var s=O(),c=R(),l=I();function useSuspenseInfiniteQuery(e,t){return(0,c.useBaseQuery)({...e,enabled:!0,suspense:!0,throwOnError:l.defaultThrowOnError},s.InfiniteQueryObserver,t)}0&&(t.exports={useSuspenseInfiniteQuery})})),H=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{useSuspenseQueries:()=>useSuspenseQueries}),t.exports=__toCommonJS(o),O();var s=L(),c=I();function useSuspenseQueries(e,t){return(0,s.useQueries)({...e,queries:e.queries.map(e=>({...e,suspense:!0,throwOnError:c.defaultThrowOnError,enabled:!0,placeholderData:void 0}))},t)}0&&(t.exports={useSuspenseQueries})})),U=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{usePrefetchQuery:()=>usePrefetchQuery}),t.exports=__toCommonJS(o);var s=M();function usePrefetchQuery(e,t){let n=(0,s.useQueryClient)(t);n.getQueryState(e.queryKey)||n.prefetchQuery(e)}0&&(t.exports={usePrefetchQuery})})),W=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{usePrefetchInfiniteQuery:()=>usePrefetchInfiniteQuery}),t.exports=__toCommonJS(o);var s=M();function usePrefetchInfiniteQuery(e,t){let n=(0,s.useQueryClient)(t);n.getQueryState(e.queryKey)||n.prefetchInfiniteQuery(e)}0&&(t.exports={usePrefetchInfiniteQuery})})),G=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{queryOptions:()=>queryOptions}),t.exports=__toCommonJS(o);function queryOptions(e){return e}0&&(t.exports={queryOptions})})),K=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{infiniteQueryOptions:()=>infiniteQueryOptions}),t.exports=__toCommonJS(o);function infiniteQueryOptions(e){return e}0&&(t.exports={infiniteQueryOptions})})),J=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{HydrationBoundary:()=>HydrationBoundary}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M(),HydrationBoundary=({children:e,options:t={},state:n,queryClient:r})=>{let i=(0,d.useQueryClient)(r),a=l.useRef(t);l.useEffect(()=>{a.current=t});let o=l.useMemo(()=>{if(n){if(typeof n!=`object`)return;let e=i.getQueryCache(),t=n.queries||[],r=[],o=[];for(let n of t){let t=e.get(n.queryHash);t?(n.state.dataUpdatedAt>t.state.dataUpdatedAt||n.promise&&t.state.status!==`pending`&&t.state.fetchStatus!==`fetching`&&n.dehydratedAt!==void 0&&n.dehydratedAt>t.state.dataUpdatedAt)&&o.push(n):r.push(n)}if(r.length>0&&(0,u.hydrate)(i,{queries:r},a.current),o.length>0)return o}},[i,n]);return l.useEffect(()=>{o&&(0,u.hydrate)(i,{queries:o},a.current)},[i,o]),e};0&&(t.exports={HydrationBoundary})})),Y=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{useIsFetching:()=>useIsFetching}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M();function useIsFetching(e,t){let n=(0,d.useQueryClient)(t),r=n.getQueryCache();return l.useSyncExternalStore(l.useCallback(e=>r.subscribe(u.notifyManager.batchCalls(e)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}0&&(t.exports={useIsFetching})})),X=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{useIsMutating:()=>useIsMutating,useMutationState:()=>useMutationState}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M();function useIsMutating(e,t){let n=(0,d.useQueryClient)(t);return useMutationState({filters:{...e,status:`pending`}},n).length}function getResult(e,t){return e.findAll(t.filters).map(e=>t.select?t.select(e):e.state)}function useMutationState(e={},t){let n=(0,d.useQueryClient)(t).getMutationCache(),r=l.useRef(e),i=l.useRef(null);return i.current===null&&(i.current=getResult(n,e)),l.useEffect(()=>{r.current=e}),l.useSyncExternalStore(l.useCallback(e=>n.subscribe(()=>{let t=(0,u.replaceEqualDeep)(i.current,getResult(n,r.current));i.current!==t&&(i.current=t,u.notifyManager.schedule(e))}),[n]),()=>i.current,()=>i.current)}0&&(t.exports={useIsMutating,useMutationState})})),Z=__commonJSMin(((e,t)=>{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},__copyProps=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},__toESM=(e,t,i)=>(i=e==null?{}:n(o(e)),__copyProps(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),__toCommonJS=e=>__copyProps(r({},`__esModule`,{value:!0}),e),c={};__export(c,{useMutation:()=>useMutation}),t.exports=__toCommonJS(c);var l=__toESM(globalThis.React,1),u=O(),d=M();function useMutation(e,t){let n=(0,d.useQueryClient)(t),[r]=l.useState(()=>new u.MutationObserver(n,e));l.useEffect(()=>{r.setOptions(e)},[r,e]);let i=l.useSyncExternalStore(l.useCallback(e=>r.subscribe(u.notifyManager.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=l.useCallback((e,t)=>{r.mutate(e,t).catch(u.noop)},[r]);if(i.error&&(0,u.shouldThrowError)(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}0&&(t.exports={useMutation})})),Q=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{mutationOptions:()=>mutationOptions}),t.exports=__toCommonJS(o);function mutationOptions(e){return e}0&&(t.exports={mutationOptions})})),ee=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{useInfiniteQuery:()=>useInfiniteQuery}),t.exports=__toCommonJS(o);var s=O(),c=R();function useInfiniteQuery(e,t){return(0,c.useBaseQuery)(e,s.InfiniteQueryObserver,t)}0&&(t.exports={useInfiniteQuery})})),$=__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__reExport=(e,t,n)=>(__copyProps(e,t,`default`),n&&__copyProps(n,t,`default`)),__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{HydrationBoundary:()=>_.HydrationBoundary,IsRestoringProvider:()=>w.IsRestoringProvider,QueryClientContext:()=>g.QueryClientContext,QueryClientProvider:()=>g.QueryClientProvider,QueryErrorResetBoundary:()=>v.QueryErrorResetBoundary,infiniteQueryOptions:()=>h.infiniteQueryOptions,mutationOptions:()=>S.mutationOptions,queryOptions:()=>m.queryOptions,useInfiniteQuery:()=>C.useInfiniteQuery,useIsFetching:()=>y.useIsFetching,useIsMutating:()=>b.useIsMutating,useIsRestoring:()=>w.useIsRestoring,useMutation:()=>x.useMutation,useMutationState:()=>b.useMutationState,usePrefetchInfiniteQuery:()=>p.usePrefetchInfiniteQuery,usePrefetchQuery:()=>f.usePrefetchQuery,useQueries:()=>s.useQueries,useQuery:()=>c.useQuery,useQueryClient:()=>g.useQueryClient,useQueryErrorResetBoundary:()=>v.useQueryErrorResetBoundary,useSuspenseInfiniteQuery:()=>u.useSuspenseInfiniteQuery,useSuspenseQueries:()=>d.useSuspenseQueries,useSuspenseQuery:()=>l.useSuspenseQuery}),t.exports=__toCommonJS(o),__reExport(o,O(),t.exports),__reExport(o,k(),t.exports);var s=L(),c=z(),l=B(),u=V(),d=H(),f=U(),p=W(),m=G(),h=K(),g=M(),_=J(),v=P(),y=Y(),b=X(),x=Z(),S=Q(),C=ee(),w=N();0&&(t.exports={HydrationBoundary,IsRestoringProvider,QueryClientContext,QueryClientProvider,QueryErrorResetBoundary,infiniteQueryOptions,mutationOptions,queryOptions,useInfiniteQuery,useIsFetching,useIsMutating,useIsRestoring,useMutation,useMutationState,usePrefetchInfiniteQuery,usePrefetchQuery,useQueries,useQuery,useQueryClient,useQueryErrorResetBoundary,useSuspenseInfiniteQuery,useSuspenseQueries,useSuspenseQuery,...O(),...k()})})),te=__toESM(__commonJSMin(((e,t)=>{var n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,__export=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},__copyProps=(e,t,o,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of i(t))!a.call(e,c)&&c!==o&&n(e,c,{get:()=>t[c],enumerable:!(s=r(t,c))||s.enumerable});return e},__toCommonJS=e=>__copyProps(n({},`__esModule`,{value:!0}),e),o={};__export(o,{QueryClient:()=>c.QueryClient,QueryClientProvider:()=>c.QueryClientProvider,createQueryClient:()=>createQueryClient,getQueryClient:()=>getQueryClient,useInfiniteQuery:()=>c.useInfiniteQuery,useIsMutating:()=>c.useIsMutating,useMutation:()=>c.useMutation,useQuery:()=>c.useQuery,useQueryClient:()=>c.useQueryClient}),t.exports=__toCommonJS(o);var s=$(),c=$(),l;function getQueryClient(){if(!l)throw Error(`Query client is not created yet.`);return l}function createQueryClient(){if(l)throw Error(`Query client is already created.`);return l=new s.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}}),l}0&&(t.exports={QueryClient,QueryClientProvider,createQueryClient,getQueryClient,useInfiniteQuery,useIsMutating,useMutation,useQuery,useQueryClient})}))());(window.elementorV2=window.elementorV2||{}).query=te})(),window.elementorV2.query?.init?.();
1 +/*! For license information please see query.min.js.LICENSE.txt */
2 +!function(){"use strict";var t={250:function(t,e,s){var i=s(403),r="function"==typeof Object.is?Object.is:function(t,e){return t===e&&(0!==t||1/t==1/e)||t!=t&&e!=e},n=i.useState,o=i.useEffect,a=i.useLayoutEffect,u=i.useDebugValue;function c(t){var e=t.getSnapshot;t=t.value;try{var s=e();return!r(t,s)}catch(t){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(t,e){return e()}:function(t,e){var s=e(),i=n({inst:{value:s,getSnapshot:e}}),r=i[0].inst,l=i[1];return a((function(){r.value=s,r.getSnapshot=e,c(r)&&l({inst:r})}),[t,s,e]),o((function(){return c(r)&&l({inst:r}),t((function(){c(r)&&l({inst:r})}))}),[t]),u(s),s};e.useSyncExternalStore=void 0!==i.useSyncExternalStore?i.useSyncExternalStore:l},688:function(t,e,s){t.exports=s(250)},403:function(t){t.exports=window.React}},e={};function s(i){var r=e[i];if(void 0!==r)return r.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.d=function(t,e){for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},s.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};!function(){s.r(i),s.d(i,{QueryClient:function(){return j},QueryClientProvider:function(){return W},createQueryClient:function(){return pt},useMutation:function(){return X},useQuery:function(){return ft},useQueryClient:function(){return N}});const t="undefined"==typeof window||"Deno"in window;function e(){}function r(t){return"number"==typeof t&&t>=0&&t!==1/0}function n(t,e){return Math.max(t+(e||0)-Date.now(),0)}function o(t,e,s){return g(t)?"function"==typeof e?{...s,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function a(t,e,s){return g(t)?[{...e,queryKey:t},s]:[t||{},e]}function u(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:n,queryKey:o,stale:a}=t;if(g(o))if(i){if(e.queryHash!==l(o,e.options))return!1}else if(!d(e.queryKey,o))return!1;if("all"!==s){const t=e.isActive();if("active"===s&&!t)return!1;if("inactive"===s&&t)return!1}return!("boolean"==typeof a&&e.isStale()!==a||void 0!==r&&r!==e.state.fetchStatus||n&&!n(e))}function c(t,e){const{exact:s,fetching:i,predicate:r,mutationKey:n}=t;if(g(n)){if(!e.options.mutationKey)return!1;if(s){if(h(e.options.mutationKey)!==h(n))return!1}else if(!d(e.options.mutationKey,n))return!1}return!("boolean"==typeof i&&"loading"===e.state.status!==i||r&&!r(e))}function l(t,e){return((null==e?void 0:e.queryKeyHashFn)||h)(t)}function h(t){return JSON.stringify(t,((t,e)=>m(e)?Object.keys(e).sort().reduce(((t,s)=>(t[s]=e[s],t)),{}):e))}function d(t,e){return f(t,e)}function f(t,e){return t===e||typeof t==typeof e&&!(!t||!e||"object"!=typeof t||"object"!=typeof e)&&!Object.keys(e).some((s=>!f(t[s],e[s])))}function p(t,e){if(t===e)return t;const s=v(t)&&v(e);if(s||m(t)&&m(e)){const i=s?t.length:Object.keys(t).length,r=s?e:Object.keys(e),n=r.length,o=s?[]:{};let a=0;for(let i=0;i<n;i++){const n=s?i:r[i];o[n]=p(t[n],e[n]),o[n]===t[n]&&a++}return i===n&&a===i?t:o}return e}function y(t,e){if(t&&!e||e&&!t)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function v(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function m(t){if(!b(t))return!1;const e=t.constructor;if(void 0===e)return!0;const s=e.prototype;return!!b(s)&&!!s.hasOwnProperty("isPrototypeOf")}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function g(t){return Array.isArray(t)}function C(t){return new Promise((e=>{setTimeout(e,t)}))}function O(t){C(0).then(t)}function R(t,e,s){return null!=s.isDataEqual&&s.isDataEqual(t,e)?t:"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?p(t,e):e}const S=console,w=function(){let t=[],e=0,s=t=>{t()},i=t=>{t()};const r=i=>{e?t.push(i):O((()=>{s(i)}))};return{batch:r=>{let n;e++;try{n=r()}finally{e--,e||(()=>{const e=t;t=[],e.length&&O((()=>{i((()=>{e.forEach((t=>{s(t)}))}))}))})()}return n},batchCalls:t=>(...e)=>{r((()=>{t(...e)}))},schedule:r,setNotifyFunction:t=>{s=t},setBatchNotifyFunction:t=>{i=t}}}();class q{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const e={listener:t};return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const E=new class extends q{constructor(){super(),this.setup=e=>{if(!t&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t((t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()}))}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach((({listener:t})=>{t()}))}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},P=["online","offline"],Q=new class extends q{constructor(){super(),this.setup=e=>{if(!t&&window.addEventListener){const t=()=>e();return P.forEach((e=>{window.addEventListener(e,t,!1)})),()=>{P.forEach((e=>{window.removeEventListener(e,t)}))}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){var t;this.hasListeners()||(null==(t=this.cleanup)||t.call(this),this.cleanup=void 0)}setEventListener(t){var e;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t((t=>{"boolean"==typeof t?this.setOnline(t):this.onOnline()}))}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach((({listener:t})=>{t()}))}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function F(t){return Math.min(1e3*2**t,3e4)}function x(t){return"online"!==(null!=t?t:"online")||Q.isOnline()}class M{constructor(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}}function D(t){return t instanceof M}function A(t){let e,s,i,r=!1,n=0,o=!1;const a=new Promise(((t,e)=>{s=t,i=e})),u=()=>!E.isFocused()||"always"!==t.networkMode&&!Q.isOnline(),c=i=>{o||(o=!0,null==t.onSuccess||t.onSuccess(i),null==e||e(),s(i))},l=s=>{o||(o=!0,null==t.onError||t.onError(s),null==e||e(),i(s))},h=()=>new Promise((s=>{e=t=>{const e=o||!u();return e&&s(t),e},null==t.onPause||t.onPause()})).then((()=>{e=void 0,o||null==t.onContinue||t.onContinue()})),d=()=>{if(o)return;let e;try{e=t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(c).catch((e=>{var s,i;if(o)return;const a=null!=(s=t.retry)?s:3,c=null!=(i=t.retryDelay)?i:F,f="function"==typeof c?c(n,e):c,p=!0===a||"number"==typeof a&&n<a||"function"==typeof a&&a(n,e);!r&&p?(n++,null==t.onFail||t.onFail(n,e),C(f).then((()=>{if(u())return h()})).then((()=>{r?l(e):d()}))):l(e)}))};return x(t.networkMode)?d():h().then(d),{promise:a,cancel:e=>{o||(l(new M(e)),null==t.abort||t.abort())},continue:()=>(null==e?void 0:e())?a:Promise.resolve(),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1}}}class U{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),r(this.cacheTime)&&(this.gcTimeout=setTimeout((()=>{this.optionalRemove()}),this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:t?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class I extends U{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||S,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||function(t){const e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?null!=i?i:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(t,e){const s=R(this.state.data,t,this.options);return this.dispatch({data:s,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),s}setState(t,e){this.dispatch({type:"setState",state:t,setStateOptions:e})}cancel(t){var s;const i=this.promise;return null==(s=this.retryer)||s.cancel(t),i?i.then(e).catch(e):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some((t=>!1!==t.options.enabled))}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some((t=>t.getCurrentResult().isStale))}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!n(this.state.dataUpdatedAt,t)}onFocus(){var t;const e=this.observers.find((t=>t.shouldFetchOnWindowFocus()));e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}onOnline(){var t;const e=this.observers.find((t=>t.shouldFetchOnReconnect()));e&&e.refetch({cancelRefetch:!1}),null==(t=this.retryer)||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter((e=>e!==t)),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,e){var s,i;if("idle"!==this.state.fetchStatus)if(this.state.dataUpdatedAt&&null!=e&&e.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var r;return null==(r=this.retryer)||r.continueRetry(),this.promise}if(t&&this.setOptions(t),!this.options.queryFn){const t=this.observers.find((t=>t.options.queryFn));t&&this.setOptions(t.options)}Array.isArray(this.options.queryKey);const n=function(){if("function"==typeof AbortController)return new AbortController}(),o={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},a=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{if(n)return this.abortSignalConsumed=!0,n.signal}})};a(o);const u={fetchOptions:e,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(o)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'")};var c;a(u),null==(s=this.options.behavior)||s.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(i=u.fetchOptions)?void 0:i.meta))&&this.dispatch({type:"fetch",meta:null==(c=u.fetchOptions)?void 0:c.meta});const l=t=>{var e,s,i,r;D(t)&&t.silent||this.dispatch({type:"error",error:t}),D(t)||(null==(e=(s=this.cache.config).onError)||e.call(s,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,this.state.data,t,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=A({fn:u.fetchFn,abort:null==n?void 0:n.abort.bind(n),onSuccess:t=>{var e,s,i,r;void 0!==t?(this.setData(t),null==(e=(s=this.cache.config).onSuccess)||e.call(s,t,this),null==(i=(r=this.cache.config).onSettled)||i.call(r,t,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1):l(new Error(this.queryHash+" data is undefined"))},onError:l,onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){this.state=(e=>{var s,i;switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":return{...e,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(s=t.meta)?s:null,fetchStatus:x(this.options.networkMode)?"fetching":"paused",...!e.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...e,data:t.data,dataUpdateCount:e.dataUpdateCount+1,dataUpdatedAt:null!=(i=t.dataUpdatedAt)?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return D(r)&&r.revert&&this.revertState?{...this.revertState}:{...e,error:r,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}})(this.state),w.batch((()=>{this.observers.forEach((e=>{e.onQueryUpdate(t)})),this.cache.notify({query:this,type:"updated",action:t})}))}}class T extends q{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,e,s){var i;const r=e.queryKey,n=null!=(i=e.queryHash)?i:l(r,e);let o=this.get(n);return o||(o=new I({cache:this,logger:t.getLogger(),queryKey:r,queryHash:n,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(o)),o}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const e=this.queriesMap[t.queryHash];e&&(t.destroy(),this.queries=this.queries.filter((e=>e!==t)),e===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){w.batch((()=>{this.queries.forEach((t=>{this.remove(t)}))}))}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,e){const[s]=a(t,e);return void 0===s.exact&&(s.exact=!0),this.queries.find((t=>u(s,t)))}findAll(t,e){const[s]=a(t,e);return Object.keys(s).length>0?this.queries.filter((t=>u(s,t))):this.queries}notify(t){w.batch((()=>{this.listeners.forEach((({listener:e})=>{e(t)}))}))}onFocus(){w.batch((()=>{this.queries.forEach((t=>{t.onFocus()}))}))}onOnline(){w.batch((()=>{this.queries.forEach((t=>{t.onOnline()}))}))}}class K extends U{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||S,this.observers=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter((e=>e!==t)),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,e;return null!=(t=null==(e=this.retryer)?void 0:e.continue())?t:this.execute()}async execute(){const t=()=>{var t;return this.retryer=A({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(t,e)=>{this.dispatch({type:"failed",failureCount:t,error:e})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},e="loading"===this.state.status;try{var s,i,r,n,o,a,u,c;if(!e){var l,h,d,f;this.dispatch({type:"loading",variables:this.options.variables}),await(null==(l=(h=this.mutationCache.config).onMutate)?void 0:l.call(h,this.state.variables,this));const t=await(null==(d=(f=this.options).onMutate)?void 0:d.call(f,this.state.variables));t!==this.state.context&&this.dispatch({type:"loading",context:t,variables:this.state.variables})}const p=await t();return await(null==(s=(i=this.mutationCache.config).onSuccess)?void 0:s.call(i,p,this.state.variables,this.state.context,this)),await(null==(r=(n=this.options).onSuccess)?void 0:r.call(n,p,this.state.variables,this.state.context)),await(null==(o=(a=this.mutationCache.config).onSettled)?void 0:o.call(a,p,null,this.state.variables,this.state.context,this)),await(null==(u=(c=this.options).onSettled)?void 0:u.call(c,p,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:p}),p}catch(t){try{var p,y,v,m,b,g,C,O;throw await(null==(p=(y=this.mutationCache.config).onError)?void 0:p.call(y,t,this.state.variables,this.state.context,this)),await(null==(v=(m=this.options).onError)?void 0:v.call(m,t,this.state.variables,this.state.context)),await(null==(b=(g=this.mutationCache.config).onSettled)?void 0:b.call(g,void 0,t,this.state.variables,this.state.context,this)),await(null==(C=(O=this.options).onSettled)?void 0:C.call(O,void 0,t,this.state.variables,this.state.context)),t}finally{this.dispatch({type:"error",error:t})}}}dispatch(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"loading":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!x(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...e,...t.state}}})(this.state),w.batch((()=>{this.observers.forEach((e=>{e.onMutationUpdate(t)})),this.mutationCache.notify({mutation:this,type:"updated",action:t})}))}}class L extends q{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,e,s){const i=new K({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(e),state:s,defaultOptions:e.mutationKey?t.getMutationDefaults(e.mutationKey):void 0});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter((e=>e!==t)),this.notify({type:"removed",mutation:t})}clear(){w.batch((()=>{this.mutations.forEach((t=>{this.remove(t)}))}))}getAll(){return this.mutations}find(t){return void 0===t.exact&&(t.exact=!0),this.mutations.find((e=>c(t,e)))}findAll(t){return this.mutations.filter((e=>c(t,e)))}notify(t){w.batch((()=>{this.listeners.forEach((({listener:e})=>{e(t)}))}))}resumePausedMutations(){var t;return this.resuming=(null!=(t=this.resuming)?t:Promise.resolve()).then((()=>{const t=this.mutations.filter((t=>t.state.isPaused));return w.batch((()=>t.reduce(((t,s)=>t.then((()=>s.continue().catch(e)))),Promise.resolve())))})).then((()=>{this.resuming=void 0})),this.resuming}}function k(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}class j{constructor(t={}){this.queryCache=t.queryCache||new T,this.mutationCache=t.mutationCache||new L,this.logger=t.logger||S,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=E.subscribe((()=>{E.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=Q.subscribe((()=>{Q.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var t,e;this.mountCount--,0===this.mountCount&&(null==(t=this.unsubscribeFocus)||t.call(this),this.unsubscribeFocus=void 0,null==(e=this.unsubscribeOnline)||e.call(this),this.unsubscribeOnline=void 0)}isFetching(t,e){const[s]=a(t,e);return s.fetchStatus="fetching",this.queryCache.findAll(s).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,e){var s;return null==(s=this.queryCache.find(t,e))?void 0:s.state.data}ensureQueryData(t,e,s){const i=o(t,e,s),r=this.getQueryData(i.queryKey);return r?Promise.resolve(r):this.fetchQuery(i)}getQueriesData(t){return this.getQueryCache().findAll(t).map((({queryKey:t,state:e})=>[t,e.data]))}setQueryData(t,e,s){const i=this.queryCache.find(t),r=function(t,e){return"function"==typeof t?t(e):t}(e,null==i?void 0:i.state.data);if(void 0===r)return;const n=o(t),a=this.defaultQueryOptions(n);return this.queryCache.build(this,a).setData(r,{...s,manual:!0})}setQueriesData(t,e,s){return w.batch((()=>this.getQueryCache().findAll(t).map((({queryKey:t})=>[t,this.setQueryData(t,e,s)]))))}getQueryState(t,e){var s;return null==(s=this.queryCache.find(t,e))?void 0:s.state}removeQueries(t,e){const[s]=a(t,e),i=this.queryCache;w.batch((()=>{i.findAll(s).forEach((t=>{i.remove(t)}))}))}resetQueries(t,e,s){const[i,r]=a(t,e,s),n=this.queryCache,o={type:"active",...i};return w.batch((()=>(n.findAll(i).forEach((t=>{t.reset()})),this.refetchQueries(o,r))))}cancelQueries(t,s,i){const[r,n={}]=a(t,s,i);void 0===n.revert&&(n.revert=!0);const o=w.batch((()=>this.queryCache.findAll(r).map((t=>t.cancel(n)))));return Promise.all(o).then(e).catch(e)}invalidateQueries(t,e,s){const[i,r]=a(t,e,s);return w.batch((()=>{var t,e;if(this.queryCache.findAll(i).forEach((t=>{t.invalidate()})),"none"===i.refetchType)return Promise.resolve();const s={...i,type:null!=(t=null!=(e=i.refetchType)?e:i.type)?t:"active"};return this.refetchQueries(s,r)}))}refetchQueries(t,s,i){const[r,n]=a(t,s,i),o=w.batch((()=>this.queryCache.findAll(r).filter((t=>!t.isDisabled())).map((t=>{var e;return t.fetch(void 0,{...n,cancelRefetch:null==(e=null==n?void 0:n.cancelRefetch)||e,meta:{refetchPage:r.refetchPage}})}))));let u=Promise.all(o).then(e);return null!=n&&n.throwOnError||(u=u.catch(e)),u}fetchQuery(t,e,s){const i=o(t,e,s),r=this.defaultQueryOptions(i);void 0===r.retry&&(r.retry=!1);const n=this.queryCache.build(this,r);return n.isStaleByTime(r.staleTime)?n.fetch(r):Promise.resolve(n.state.data)}prefetchQuery(t,s,i){return this.fetchQuery(t,s,i).then(e).catch(e)}fetchInfiniteQuery(t,e,s){const i=o(t,e,s);return i.behavior={onFetch:t=>{t.fetchFn=()=>{var e,s,i,r,n,o;const a=null==(e=t.fetchOptions)||null==(s=e.meta)?void 0:s.refetchPage,u=null==(i=t.fetchOptions)||null==(r=i.meta)?void 0:r.fetchMore,c=null==u?void 0:u.pageParam,l="forward"===(null==u?void 0:u.direction),h="backward"===(null==u?void 0:u.direction),d=(null==(n=t.state.data)?void 0:n.pages)||[],f=(null==(o=t.state.data)?void 0:o.pageParams)||[];let p=f,y=!1;const v=t.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+t.options.queryHash+"'")),m=(t,e,s,i)=>(p=i?[e,...p]:[...p,e],i?[s,...t]:[...t,s]),b=(e,s,i,r)=>{if(y)return Promise.reject("Cancelled");if(void 0===i&&!s&&e.length)return Promise.resolve(e);const n={queryKey:t.queryKey,pageParam:i,meta:t.options.meta};var o;o=n,Object.defineProperty(o,"signal",{enumerable:!0,get:()=>{var e,s;return null!=(e=t.signal)&&e.aborted?y=!0:null==(s=t.signal)||s.addEventListener("abort",(()=>{y=!0})),t.signal}});const a=v(n);return Promise.resolve(a).then((t=>m(e,i,t,r)))};let g;if(d.length)if(l){const e=void 0!==c,s=e?c:k(t.options,d);g=b(d,e,s)}else if(h){const e=void 0!==c,s=e?c:(C=t.options,O=d,null==C.getPreviousPageParam?void 0:C.getPreviousPageParam(O[0],O));g=b(d,e,s,!0)}else{p=[];const e=void 0===t.options.getNextPageParam;g=a&&d[0]&&!a(d[0],0,d)?Promise.resolve(m([],f[0],d[0])):b([],e,f[0]);for(let s=1;s<d.length;s++)g=g.then((i=>{if(!a||!d[s]||a(d[s],s,d)){const r=e?f[s]:k(t.options,i);return b(i,e,r)}return Promise.resolve(m(i,f[s],d[s]))}))}else g=b([]);var C,O;return g.then((t=>({pages:t,pageParams:p})))}}},this.fetchQuery(i)}prefetchInfiniteQuery(t,s,i){return this.fetchInfiniteQuery(t,s,i).then(e).catch(e)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,e){const s=this.queryDefaults.find((e=>h(t)===h(e.queryKey)));s?s.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})}getQueryDefaults(t){if(!t)return;const e=this.queryDefaults.find((e=>d(t,e.queryKey)));return null==e?void 0:e.defaultOptions}setMutationDefaults(t,e){const s=this.mutationDefaults.find((e=>h(t)===h(e.mutationKey)));s?s.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})}getMutationDefaults(t){if(!t)return;const e=this.mutationDefaults.find((e=>d(t,e.mutationKey)));return null==e?void 0:e.defaultOptions}defaultQueryOptions(t){if(null!=t&&t._defaulted)return t;const e={...this.defaultOptions.queries,...this.getQueryDefaults(null==t?void 0:t.queryKey),...t,_defaulted:!0};return!e.queryHash&&e.queryKey&&(e.queryHash=l(e.queryKey,e)),void 0===e.refetchOnReconnect&&(e.refetchOnReconnect="always"!==e.networkMode),void 0===e.useErrorBoundary&&(e.useErrorBoundary=!!e.suspense),e}defaultMutationOptions(t){return null!=t&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==t?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}var B=s(403);const H=B.createContext(void 0),G=B.createContext(!1);function _(t,e){return t||(e&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=H),window.ReactQueryClientContext):H)}const N=({context:t}={})=>{const e=B.useContext(_(t,B.useContext(G)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},W=({client:t,children:e,context:s,contextSharing:i=!1})=>{B.useEffect((()=>(t.mount(),()=>{t.unmount()})),[t]);const r=_(s,i);return B.createElement(G.Provider,{value:!s&&i},B.createElement(r.Provider,{value:t},e))};class z extends q{constructor(t,e){super(),this.client=t,this.setOptions(e),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var e;const s=this.options;this.options=this.client.defaultMutationOptions(t),y(s,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(e=this.currentMutation)||e.setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||null==(t=this.currentMutation)||t.removeObserver(this)}onMutationUpdate(t){this.updateResult();const e={listeners:!0};"success"===t.type?e.onSuccess=!0:"error"===t.type&&(e.onError=!0),this.notify(e)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,e){return this.mutateOptions=e,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==t?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0},e={...t,isLoading:"loading"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset};this.currentResult=e}notify(t){w.batch((()=>{var e,s,i,r;if(this.mutateOptions&&this.hasListeners())if(t.onSuccess)null==(e=(s=this.mutateOptions).onSuccess)||e.call(s,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(i=(r=this.mutateOptions).onSettled)||i.call(r,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context);else if(t.onError){var n,o,a,u;null==(n=(o=this.mutateOptions).onError)||n.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(u=this.mutateOptions).onSettled)||a.call(u,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}t.listeners&&this.listeners.forEach((({listener:t})=>{t(this.currentResult)}))}))}}const V=s(688).useSyncExternalStore;function J(t,e){return"function"==typeof t?t(...e):!!t}function X(t,e,s){const i=function(t,e,s){return g(t)?"function"==typeof e?{...s,mutationKey:t,mutationFn:e}:{...e,mutationKey:t}:"function"==typeof t?{...e,mutationFn:t}:{...t}}(t,e,s),r=N({context:i.context}),[n]=B.useState((()=>new z(r,i)));B.useEffect((()=>{n.setOptions(i)}),[n,i]);const o=V(B.useCallback((t=>n.subscribe(w.batchCalls(t))),[n]),(()=>n.getCurrentResult()),(()=>n.getCurrentResult())),a=B.useCallback(((t,e)=>{n.mutate(t,e).catch(Y)}),[n]);if(o.error&&J(n.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function Y(){}class Z extends q{constructor(t,e){super(),this.client=t,this.options=e,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),$(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return tt(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return tt(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,e){const s=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),y(s,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=s.queryKey),this.updateQuery();const r=this.hasListeners();r&&et(this.currentQuery,i,this.options,s)&&this.executeFetch(),this.updateResult(e),!r||this.currentQuery===i&&this.options.enabled===s.enabled&&this.options.staleTime===s.staleTime||this.updateStaleTimeout();const n=this.computeRefetchInterval();!r||this.currentQuery===i&&this.options.enabled===s.enabled&&n===this.currentRefetchInterval||this.updateRefetchInterval(n)}getOptimisticResult(t){const e=this.client.getQueryCache().build(this.client,t),s=this.createResult(e,t);return function(t,e,s){return!s.keepPreviousData&&(void 0!==s.placeholderData?e.isPlaceholderData:t.getCurrentResult()!==e)}(this,s,t)&&(this.currentResult=s,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),s}getCurrentResult(){return this.currentResult}trackResult(t){const e={};return Object.keys(t).forEach((s=>{Object.defineProperty(e,s,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(s),t[s])})})),e}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...e}={}){return this.fetch({...e,meta:{refetchPage:t}})}fetchOptimistic(t){const e=this.client.defaultQueryOptions(t),s=this.client.getQueryCache().build(this.client,e);return s.isFetchingOptimistic=!0,s.fetch().then((()=>this.createResult(s,e)))}fetch(t){var e;return this.executeFetch({...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then((()=>(this.updateResult(),this.currentResult)))}executeFetch(t){this.updateQuery();let s=this.currentQuery.fetch(this.options,t);return null!=t&&t.throwOnError||(s=s.catch(e)),s}updateStaleTimeout(){if(this.clearStaleTimeout(),t||this.currentResult.isStale||!r(this.options.staleTime))return;const e=n(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout((()=>{this.currentResult.isStale||this.updateResult()}),e)}computeRefetchInterval(){var t;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(t=this.options.refetchInterval)&&t}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!t&&!1!==this.options.enabled&&r(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval((()=>{(this.options.refetchIntervalInBackground||E.isFocused())&&this.executeFetch()}),this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,e){const s=this.currentQuery,i=this.options,r=this.currentResult,n=this.currentResultState,o=this.currentResultOptions,a=t!==s,u=a?t.state:this.currentQueryInitialState,c=a?this.currentResult:this.previousQueryResult,{state:l}=t;let h,{dataUpdatedAt:d,error:f,errorUpdatedAt:p,fetchStatus:y,status:v}=l,m=!1,b=!1;if(e._optimisticResults){const r=this.hasListeners(),n=!r&&$(t,e),o=r&&et(t,s,e,i);(n||o)&&(y=x(t.options.networkMode)?"fetching":"paused",d||(v="loading")),"isRestoring"===e._optimisticResults&&(y="idle")}if(e.keepPreviousData&&!l.dataUpdatedAt&&null!=c&&c.isSuccess&&"error"!==v)h=c.data,d=c.dataUpdatedAt,v=c.status,m=!0;else if(e.select&&void 0!==l.data)if(r&&l.data===(null==n?void 0:n.data)&&e.select===this.selectFn)h=this.selectResult;else try{this.selectFn=e.select,h=e.select(l.data),h=R(null==r?void 0:r.data,h,e),this.selectResult=h,this.selectError=null}catch(t){this.selectError=t}else h=l.data;if(void 0!==e.placeholderData&&void 0===h&&"loading"===v){let t;if(null!=r&&r.isPlaceholderData&&e.placeholderData===(null==o?void 0:o.placeholderData))t=r.data;else if(t="function"==typeof e.placeholderData?e.placeholderData():e.placeholderData,e.select&&void 0!==t)try{t=e.select(t),this.selectError=null}catch(t){this.selectError=t}void 0!==t&&(v="success",h=R(null==r?void 0:r.data,t,e),b=!0)}this.selectError&&(f=this.selectError,h=this.selectResult,p=Date.now(),v="error");const g="fetching"===y,C="loading"===v,O="error"===v;return{status:v,fetchStatus:y,isLoading:C,isSuccess:"success"===v,isError:O,isInitialLoading:C&&g,data:h,dataUpdatedAt:d,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!C,isLoadingError:O&&0===l.dataUpdatedAt,isPaused:"paused"===y,isPlaceholderData:b,isPreviousData:m,isRefetchError:O&&0!==l.dataUpdatedAt,isStale:st(t,e),refetch:this.refetch,remove:this.remove}}updateResult(t){const e=this.currentResult,s=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,y(s,e))return;this.currentResult=s;const i={cache:!0};!1!==(null==t?void 0:t.listeners)&&(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.trackedProps.size)return!0;const i=new Set(null!=s?s:this.trackedProps);return this.options.useErrorBoundary&&i.add("error"),Object.keys(this.currentResult).some((t=>{const s=t;return this.currentResult[s]!==e[s]&&i.has(s)}))})()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const e=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const e={};"success"===t.type?e.onSuccess=!t.manual:"error"!==t.type||D(t.error)||(e.onError=!0),this.updateResult(e),this.hasListeners()&&this.updateTimers()}notify(t){w.batch((()=>{var e,s,i,r;if(t.onSuccess)null==(e=(s=this.options).onSuccess)||e.call(s,this.currentResult.data),null==(i=(r=this.options).onSettled)||i.call(r,this.currentResult.data,null);else if(t.onError){var n,o,a,u;null==(n=(o=this.options).onError)||n.call(o,this.currentResult.error),null==(a=(u=this.options).onSettled)||a.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach((({listener:t})=>{t(this.currentResult)})),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})}))}}function $(t,e){return function(t,e){return!(!1===e.enabled||t.state.dataUpdatedAt||"error"===t.state.status&&!1===e.retryOnMount)}(t,e)||t.state.dataUpdatedAt>0&&tt(t,e,e.refetchOnMount)}function tt(t,e,s){if(!1!==e.enabled){const i="function"==typeof s?s(t):s;return"always"===i||!1!==i&&st(t,e)}return!1}function et(t,e,s,i){return!1!==s.enabled&&(t!==e||!1===i.enabled)&&(!s.suspense||"error"!==t.state.status)&&st(t,s)}function st(t,e){return t.isStaleByTime(e.staleTime)}const it=B.createContext(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),rt=()=>B.useContext(it),nt=B.createContext(!1),ot=()=>B.useContext(nt),at=(nt.Provider,(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))}),ut=t=>{B.useEffect((()=>{t.clearReset()}),[t])},ct=({result:t,errorResetBoundary:e,useErrorBoundary:s,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&J(s,[t.error,i]),lt=t=>{t.suspense&&"number"!=typeof t.staleTime&&(t.staleTime=1e3)},ht=(t,e,s)=>(null==t?void 0:t.suspense)&&((t,e)=>t.isLoading&&t.isFetching&&!e)(e,s),dt=(t,e,s)=>e.fetchOptimistic(t).then((({data:e})=>{null==t.onSuccess||t.onSuccess(e),null==t.onSettled||t.onSettled(e,null)})).catch((e=>{s.clearReset(),null==t.onError||t.onError(e),null==t.onSettled||t.onSettled(void 0,e)}));function ft(t,e,s){return function(t,e){const s=N({context:t.context}),i=ot(),r=rt(),n=s.defaultQueryOptions(t);n._optimisticResults=i?"isRestoring":"optimistic",n.onError&&(n.onError=w.batchCalls(n.onError)),n.onSuccess&&(n.onSuccess=w.batchCalls(n.onSuccess)),n.onSettled&&(n.onSettled=w.batchCalls(n.onSettled)),lt(n),at(n,r),ut(r);const[o]=B.useState((()=>new e(s,n))),a=o.getOptimisticResult(n);if(V(B.useCallback((t=>{const e=i?()=>{}:o.subscribe(w.batchCalls(t));return o.updateResult(),e}),[o,i]),(()=>o.getCurrentResult()),(()=>o.getCurrentResult())),B.useEffect((()=>{o.setOptions(n,{listeners:!1})}),[n,o]),ht(n,a,i))throw dt(n,o,r);if(ct({result:a,errorResetBoundary:r,useErrorBoundary:n.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return n.notifyOnChangeProps?a:o.trackResult(a)}(o(t,e,s),Z)}function pt(){return new j({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1}}})}}(),(window.elementorV2=window.elementorV2||{}).query=i}();