👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
27 KiB

(globalThis.utooChunk_ant_design_pro||(globalThis.utooChunk_ant_design_pro=[])).push(["object"==typeof document?document.currentScript:void 0,82275,537661,606874,239620,610453,531380,e=>{"use strict";var t=e.i(273340),r=e.i(191788),s=e.i(114070),i=e.i(456298),n=e.i(465235),a=e.i(755224),o=e.i(391398);function u(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var l=r.createContext(u()),c=()=>r.useContext(l);e.s(["QueryErrorResetBoundary",0,({children:e})=>{let[t]=r.useState(()=>u());return(0,o.jsx)(l.Provider,{value:t,children:"function"==typeof e?e(t):e})},"useQueryErrorResetBoundary",0,c],537661);var h=(e,t,r)=>{let s=(null==r?void 0:r.state.error)&&"function"==typeof e.throwOnError?(0,i.shouldThrowError)(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&!t.isReset()&&(e.retryOnMount=!1)},d=e=>{r.useEffect(()=>{e.clearReset()},[e])},p=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:n})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(n&&void 0===e.data||(0,i.shouldThrowError)(r,[e.error,s]));e.s(["ensurePreventErrorBoundaryRetry",0,h,"getHasError",0,p,"useClearResetErrorBoundary",0,d],606874);var f=r.createContext(!1),y=()=>r.useContext(f),v=f.Provider;e.s(["IsRestoringProvider",0,v,"useIsRestoring",0,y],239620);var m=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},b=(e,t)=>e.isLoading&&e.isFetching&&!t,g=(e,t)=>(null==e?void 0:e.suspense)&&t.isPending,S=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function R(e,t,o){var u,l,f,v;let R=y(),T=c(),O=(0,a.useQueryClient)(o),Q=O.defaultQueryOptions(e);null==(l=null==(u=O.getDefaultOptions().queries)?void 0:u._experimental_beforeQuery)||l.call(u,Q);let w=O.getQueryCache().get(Q.queryHash);Q._optimisticResults=R?"isRestoring":"optimistic",m(Q),h(Q,T,w),d(T);let C=!O.getQueryCache().get(Q.queryHash),[F]=r.useState(()=>new t(O,Q)),E=F.getOptimisticResult(Q),I=!R&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{let t=I?F.subscribe(n.notifyManager.batchCalls(e)):i.noop;return F.updateResult(),t},[F,I]),()=>F.getCurrentResult(),()=>F.getCurrentResult()),r.useEffect(()=>{F.setOptions(Q)},[Q,F]),g(Q,E))throw S(Q,F,T);if(p({result:E,errorResetBoundary:T,throwOnError:Q.throwOnError,query:w,suspense:Q.suspense}))throw E.error;if(null==(v=null==(f=O.getDefaultOptions().queries)?void 0:f._experimental_afterQuery)||v.call(f,Q,E),Q.experimental_prefetchInRender&&!s.environmentManager.isServer()&&b(E,R)){let e=C?S(Q,F,T):null==w?void 0:w.promise;null==e||e.catch(i.noop).finally(()=>{F.updateResult()})}return Q.notifyOnChangeProps?E:F.trackResult(E)}e.s(["defaultThrowOnError",0,(e,t)=>void 0===t.state.data,"ensureSuspenseTimers",0,m,"fetchOptimistic",0,S,"shouldSuspend",0,g,"willFetch",0,b],610453),e.s(["useBaseQuery",0,R],531380),e.s(["useQuery",0,function(e,r){return R(e,t.QueryObserver,r)}],82275)},84813,351773,e=>{"use strict";var t=e.i(456298),r=e.i(465235),s=e.i(451415),i=e.i(271585);function n(e){return{onFetch:(r,s)=>{let i=r.options,n=r.fetchOptions?.meta?.fetchMore?.direction,u=r.state.data?.pages||[],l=r.state.data?.pageParams||[],c={pages:[],pageParams:[]},h=0,d=async()=>{let s=!1,d=(0,t.ensureQueryFn)(r.options,r.fetchOptions),p=async(e,i,n)=>{let a;if(s)return Promise.reject(r.signal.reason);if(null==i&&e.pages.length)return Promise.resolve(e);let o=(a={client:r.client,queryKey:r.queryKey,pageParam:i,direction:n?"backward":"forward",meta:r.options.meta},(0,t.addConsumeAwareSignal)(a,()=>r.signal,()=>s=!0),a),u=await d(o),{maxPages:l}=r.options,c=n?t.addToStart:t.addToEnd;return{pages:c(e.pages,u,l),pageParams:c(e.pageParams,i,l)}};if(n&&u.length){let e="backward"===n,t={pages:u,pageParams:l},r=(e?o:a)(i,t);c=await p(t,r,e)}else{let t=e??u.length;do{let e=0===h?l[0]??i.initialPageParam:a(i,c);if(h>0&&null==e)break;c=await p(c,e),h++}while(h<t)}return c};r.options.persister?r.fetchFn=()=>r.options.persister?.(d,{client:r.client,queryKey:r.queryKey,meta:r.options.meta,signal:r.signal},s):r.fetchFn=d}}}function a(e,{pages:t,pageParams:r}){let s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,r[s],r):void 0}function o(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}e.s(["hasNextPage",0,function(e,t){return!!t&&null!=a(e,t)},"hasPreviousPage",0,function(e,t){return!!t&&!!e.getPreviousPageParam&&null!=o(e,t)},"infiniteQueryBehavior",0,n],351773);var u=class extends i.Removable{#e;#t;#r;#s;#i;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#s=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=h(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(e){if(this.options={...this.#a,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=h(this.options);void 0!==e.data&&(this.setState(c(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#s.remove(this)}setData(e,r){let s=(0,t.replaceData)(this.state.data,e,this.options);return this.#u({data:s,type:"success",dataUpdatedAt:r?.updatedAt,manual:r?.manual}),s}setState(e){this.#u({type:"setState",state:e})}cancel(e){let r=this.#n?.promise;return this.#n?.cancel(e),r?r.then(t.noop).catch(t.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==(0,t.resolveQueryBoolean)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===t.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,t.resolveStaleTime)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,t.timeUntilStale)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#s.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.#n&&(this.#o||this.#l()?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#s.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#l(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}async fetch(e,r){let i;if("idle"!==this.state.fetchStatus&&this.#n?.status()!=="rejected"){if(void 0!==this.state.data&&r?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let a=new AbortController,o=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#o=!0,a.signal)})},u=()=>{let e,s=(0,t.ensureQueryFn)(this.options,r),i=(o(e={client:this.#i,queryKey:this.queryKey,meta:this.meta}),e);return(this.#o=!1,this.options.persister)?this.options.persister(s,i,this):s(i)},l=(o(i={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:u}),i),c="infinite"===this.#e?n(this.options.pages):this.options.behavior;c?.onFetch(l,this),this.#r=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==l.fetchOptions?.meta)&&this.#u({type:"fetch",meta:l.fetchOptions?.meta}),this.#n=(0,s.createRetryer)({initialPromise:r?.initialPromise,fn:l.fetchFn,onCancel:e=>{e instanceof s.CancelledError&&e.revert&&this.setState({...this.#r,fetchStatus:"idle"}),a.abort()},onFail:(e,t)=>{this.#u({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0});try{let e=await this.#n.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#s.config.onSuccess?.(e,this),this.#s.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s.CancelledError){if(e.silent)return this.#n.promise;else if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#u({type:"error",error:e}),this.#s.config.onError?.(e,this),this.#s.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#u(e){let t=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,...l(t.data,this.options),fetchMeta:e.meta??null};case"success":let r={...t,...c(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#r=e.manual?r:void 0,r;case"error":let s=e.error;return{...t,error:s,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}};this.state=t(this.state),r.notifyManager.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:e})})}};function l(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.canFetch)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function c(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function h(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,s=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}e.s(["Query",0,u,"fetchState",0,l],84813)},114070,e=>{"use strict";let t;var r=e.i(456298),s=(t=()=>r.isServer,{isServer:()=>t(),setIsServer(e){t=e}});e.s(["environmentManager",0,s])},271585,e=>{"use strict";var t=e.i(974233),r=e.i(114070),s=e.i(456298),i=class{#c;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,s.isValidTimeout)(this.gcTime)&&(this.#c=t.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(r.environmentManager.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#c&&(t.timeoutManager.clearTimeout(this.#c),this.#c=void 0)}};e.s(["Removable",0,i])},273340,e=>{"use strict";var t=e.i(879971),r=e.i(114070),s=e.i(465235),i=e.i(84813),n=e.i(895564),a=e.i(492363),o=e.i(456298),u=e.i(974233),l=class extends n.Subscribable{constructor(e,t){super(),this.options=t,this.#i=e,this.#h=null,this.#d=(0,a.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#i;#p=void 0;#f=void 0;#y=void 0;#v;#m;#d;#h;#b;#g;#S;#R;#T;#O;#Q=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#p.addObserver(this),c(this.#p,this.options)?this.#w():this.updateResult(),this.#C())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#p,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#p,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#F(),this.#E(),this.#p.removeObserver(this)}setOptions(e){let t=this.options,r=this.#p;if(this.options=this.#i.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#p))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#I(),this.#p.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#i.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#p,observer:this});let s=this.hasListeners();s&&d(this.#p,r,this.options,t)&&this.#w(),this.updateResult(),s&&(this.#p!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#p)!==(0,o.resolveQueryBoolean)(t.enabled,this.#p)||(0,o.resolveStaleTime)(this.options.staleTime,this.#p)!==(0,o.resolveStaleTime)(t.staleTime,this.#p))&&this.#P();let i=this.#M();s&&(this.#p!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#p)!==(0,o.resolveQueryBoolean)(t.enabled,this.#p)||i!==this.#O)&&this.#q(i)}getOptimisticResult(e){var t,r;let s=this.#i.getQueryCache().build(this.#i,e),i=this.createResult(s,e);return t=this,r=i,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#y=i,this.#m=this.options,this.#v=this.#p.state),i}getCurrentResult(){return this.#y}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#d.status||this.#d.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#Q.add(e)}getCurrentQuery(){return this.#p}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#i.defaultQueryOptions(e),r=this.#i.getQueryCache().build(this.#i,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#w({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#y))}#w(e){this.#I();let t=this.#p.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#P(){this.#F();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#p);if(r.environmentManager.isServer()||this.#y.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#y.dataUpdatedAt,e);this.#R=u.timeoutManager.setTimeout(()=>{this.#y.isStale||this.updateResult()},t+1)}#M(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#p):this.options.refetchInterval)??!1}#q(e){this.#E(),this.#O=e,!r.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#p)&&(0,o.isValidTimeout)(this.#O)&&0!==this.#O&&(this.#T=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#w()},this.#O))}#C(){this.#P(),this.#q(this.#M())}#F(){void 0!==this.#R&&(u.timeoutManager.clearTimeout(this.#R),this.#R=void 0)}#E(){void 0!==this.#T&&(u.timeoutManager.clearInterval(this.#T),this.#T=void 0)}createResult(e,t){let r,s=this.#p,n=this.options,u=this.#y,l=this.#v,h=this.#m,f=e!==s?e.state:this.#f,{state:y}=e,v={...y},m=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&c(e,t),o=r&&d(e,s,t,n);(a||o)&&(v={...v,...(0,i.fetchState)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:S}=v;r=v.data;let R=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===S){let e;u?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=u.data,R=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#S?.state.data,this.#S):t.placeholderData,void 0!==e&&(S="success",r=(0,o.replaceData)(u?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!R)if(u&&r===l?.data&&t.select===this.#b)r=this.#g;else try{this.#b=t.select,r=t.select(r),r=(0,o.replaceData)(u?.data,r,t),this.#g=r,this.#h=null}catch(e){this.#h=e}this.#h&&(b=this.#h,r=this.#g,g=Date.now(),S="error");let T="fetching"===v.fetchStatus,O="pending"===S,Q="error"===S,w=O&&T,C=void 0!==r,F={status:S,fetchStatus:v.fetchStatus,isPending:O,isSuccess:"success"===S,isError:Q,isInitialLoading:w,isLoading:w,data:r,dataUpdatedAt:v.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:v.dataUpdateCount>f.dataUpdateCount||v.errorUpdateCount>f.errorUpdateCount,isFetching:T,isRefetching:T&&!O,isLoadingError:Q&&!C,isPaused:"paused"===v.fetchStatus,isPlaceholderData:m,isRefetchError:Q&&C,isStale:p(e,t),refetch:this.refetch,promise:this.#d,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==F.data,r="error"===F.status&&!t,i=e=>{r?e.reject(F.error):t&&e.resolve(F.data)},n=()=>{i(this.#d=F.promise=(0,a.pendingThenable)())},o=this.#d;switch(o.status){case"pending":e.queryHash===s.queryHash&&i(o);break;case"fulfilled":(r||F.data!==o.value)&&n();break;case"rejected":r&&F.error===o.reason||n()}}return F}updateResult(){let e=this.#y,t=this.createResult(this.#p,this.options);if(this.#v=this.#p.state,this.#m=this.options,void 0!==this.#v.data&&(this.#S=this.#p),(0,o.shallowEqualObjects)(t,e))return;this.#y=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#Q.size)return!0;let s=new Set(r??this.#Q);return this.options.throwOnError&&s.add("error"),Object.keys(this.#y).some(t=>this.#y[t]!==e[t]&&s.has(t))};this.#U({listeners:r()})}#I(){let e=this.#i.getQueryCache().build(this.#i,this.options);if(e===this.#p)return;let t=this.#p;this.#p=e,this.#f=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#C()}#U(e){s.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#y)}),this.#i.getQueryCache().notify({query:this.#p,type:"observerResultsUpdated"})})}};function c(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&p(e,t)}return!1}function d(e,t,r,s){return(e!==t||!1===(0,o.resolveQueryBoolean)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.s(["QueryObserver",0,l])},451415,e=>{"use strict";var t=e.i(879971),r=e.i(490140),s=e.i(492363),i=e.i(114070),n=e.i(456298);function a(e){return Math.min(1e3*2**e,3e4)}function o(e){return(e??"online")!=="online"||r.onlineManager.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};e.s(["CancelledError",0,u,"canFetch",0,o,"createRetryer",0,function(e){let l,c=!1,h=0,d=(0,s.pendingThenable)(),p=()=>t.focusManager.isFocused()&&("always"===e.networkMode||r.onlineManager.isOnline())&&e.canRun(),f=()=>o(e.networkMode)&&e.canRun(),y=e=>{"pending"===d.status&&(l?.(),d.resolve(e))},v=e=>{"pending"===d.status&&(l?.(),d.reject(e))},m=()=>new Promise(t=>{l=e=>{("pending"!==d.status||p())&&t(e)},e.onPause?.()}).then(()=>{l=void 0,"pending"===d.status&&e.onContinue?.()}),b=()=>{let t;if("pending"!==d.status)return;let r=0===h?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(y).catch(t=>{if("pending"!==d.status)return;let r=e.retry??3*!i.environmentManager.isServer(),s=e.retryDelay??a,o="function"==typeof s?s(h,t):s,u=!0===r||"number"==typeof r&&h<r||"function"==typeof r&&r(h,t);c||!u?v(t):(h++,e.onFail?.(h,t),(0,n.sleep)(o).then(()=>p()?void 0:m()).then(()=>{c?v(t):b()}))})};return{promise:d,status:()=>d.status,cancel:t=>{if("pending"===d.status){let r=new u(t);v(r),e.onCancel?.(r)}},continue:()=>(l?.(),d),cancelRetry:()=>{c=!0},continueRetry:()=>{c=!1},canStart:f,start:()=>(f()?b():m().then(b),d)}}])},456298,e=>{"use strict";e.i(495059);var t=e.i(974233),r="u"<typeof window||"Deno"in globalThis;function s(e,t){return(t?.queryKeyHashFn||i)(e)}function i(e){return JSON.stringify(e,(e,t)=>l(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function n(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>n(e[r],t[r]))}var a=Object.prototype.hasOwnProperty;function o(e,t,r=0){if(e===t)return e;if(r>500)return t;let s=u(e)&&u(t);if(!s&&!(l(e)&&l(t)))return t;let i=(s?e:Object.keys(e)).length,n=s?t:Object.keys(t),c=n.length,h=s?Array(c):{},d=0;for(let u=0;u<c;u++){let l=s?u:n[u],c=e[l],p=t[l];if(c===p){h[l]=c,(s?u<i:a.call(e,l))&&d++;continue}if(null===c||null===p||"object"!=typeof c||"object"!=typeof p){h[l]=p;continue}let f=o(c,p,r+1);h[l]=f,f===c&&d++}return i===c&&d===i?e:h}function u(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function l(e){if(!c(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!c(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype}function c(e){return"[object Object]"===Object.prototype.toString.call(e)}var h=Symbol();e.s(["addConsumeAwareSignal",0,function(e,t,r){let s,i=!1;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?r():s.addEventListener("abort",r,{once:!0})),s)}),e},"addToEnd",0,function(e,t,r=0){let s=[...e,t];return r&&s.length>r?s.slice(1):s},"addToStart",0,function(e,t,r=0){let s=[t,...e];return r&&s.length>r?s.slice(0,-1):s},"ensureQueryFn",0,function(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==h?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))},"functionalUpdate",0,function(e,t){return"function"==typeof e?e(t):e},"hashKey",0,i,"hashQueryKeyByOptions",0,s,"isServer",0,r,"isValidTimeout",0,function(e){return"number"==typeof e&&e>=0&&e!==1/0},"matchMutation",0,function(e,t){let{exact:r,status:s,predicate:a,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(r){if(i(t.options.mutationKey)!==i(o))return!1}else if(!n(t.options.mutationKey,o))return!1}return(!s||t.state.status===s)&&(!a||!!a(t))},"matchQuery",0,function(e,t){let{type:r="all",exact:i,fetchStatus:a,predicate:o,queryKey:u,stale:l}=e;if(u){if(i){if(t.queryHash!==s(u,t.options))return!1}else if(!n(t.queryKey,u))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof l||t.isStale()===l)&&(!a||a===t.state.fetchStatus)&&(!o||!!o(t))},"noop",0,function(){},"partialMatchKey",0,n,"replaceData",0,function(e,t,r){return"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?o(e,t):t},"replaceEqualDeep",0,o,"resolveQueryBoolean",0,function(e,t){return"function"==typeof e?e(t):e},"resolveStaleTime",0,function(e,t){return"function"==typeof e?e(t):e},"shallowEqualObjects",0,function(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0},"shouldThrowError",0,function(e,t){return"function"==typeof e?e(...t):!!e},"skipToken",0,h,"sleep",0,function(e){return new Promise(r=>{t.timeoutManager.setTimeout(r,e)})},"timeUntilStale",0,function(e,t){return Math.max(e+(t||0)-Date.now(),0)}])},465235,e=>{"use strict";let t,r,s,i,n,a;var o=e.i(974233).systemSetTimeoutZero,u=(t=[],r=0,s=e=>{e()},i=e=>{e()},n=o,{batch:e=>{let a;r++;try{a=e()}finally{let e;--r||(e=t,t=[],e.length&&n(()=>{i(()=>{e.forEach(e=>{s(e)})})}))}return a},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a=e=>{r?t.push(e):n(()=>{s(e)})},setNotifyFunction:e=>{s=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{n=e}});e.s(["notifyManager",0,u])},490140,492363,e=>{"use strict";var t=e.i(895564),r=new class extends t.Subscribable{#D=!0;#j;#k;constructor(){super(),this.#k=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#j||this.setEventListener(this.#k)}onUnsubscribe(){this.hasListeners()||(this.#j?.(),this.#j=void 0)}setEventListener(e){this.#k=e,this.#j?.(),this.#j=e(this.setOnline.bind(this))}setOnline(e){this.#D!==e&&(this.#D=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#D}};e.s(["onlineManager",0,r],490140),e.i(456298),e.s(["pendingThenable",0,function(){let e,t,r=new Promise((r,s)=>{e=r,t=s});function s(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{s({status:"fulfilled",value:t}),e(t)},r.reject=e=>{s({status:"rejected",reason:e}),t(e)},r}],492363)},755224,e=>{"use strict";var t=e.i(191788),r=e.i(391398),s=t.createContext(void 0);e.s(["QueryClientProvider",0,({client:e,children:i})=>(t.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,r.jsx)(s.Provider,{value:e,children:i})),"useQueryClient",0,e=>{let r=t.useContext(s);if(e)return e;if(!r)throw Error("No QueryClient set, use QueryClientProvider to set one");return r}])},879971,895564,e=>{"use strict";var t=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(){}};e.s(["Subscribable",0,t],895564);var r=new class extends t{#x;#j;#k;constructor(){super(),this.#k=e=>{if("u">typeof window&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#j||this.setEventListener(this.#k)}onUnsubscribe(){this.hasListeners()||(this.#j?.(),this.#j=void 0)}setEventListener(e){this.#k=e,this.#j?.(),this.#j=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#x!==e&&(this.#x=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#x?this.#x:globalThis.document?.visibilityState!=="hidden"}};e.s(["focusManager",0,r],879971)},974233,e=>{"use strict";e.i(495059);var t={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},r=new class{#A=t;#B=!1;setTimeoutProvider(e){this.#A=e}setTimeout(e,t){return this.#A.setTimeout(e,t)}clearTimeout(e){this.#A.clearTimeout(e)}setInterval(e,t){return this.#A.setInterval(e,t)}clearInterval(e){this.#A.clearInterval(e)}};e.s(["systemSetTimeoutZero",0,function(e){setTimeout(e,0)},"timeoutManager",0,r])}]);