1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6589],{20063:(t,e,r)=>{var s=r(47260);r.o(s,"redirect")&&r.d(e,{redirect:function(){return s.redirect}}),r.o(s,"useParams")&&r.d(e,{useParams:function(){return s.useParams}}),r.o(s,"usePathname")&&r.d(e,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(e,{useRouter:function(){return s.useRouter}}),r.o(s,"useSearchParams")&&r.d(e,{useSearchParams:function(){return s.useSearchParams}})},31668:(t,e,r)=>{r.d(e,{X:()=>u,k:()=>o});var s=r(34049),i=r(74268),n=r(93049),a=r(69781),u=class extends a.k{#t;#e;#r;#s;#i;#n;#a;constructor(t){super(),this.#a=!1,this.#n=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#r=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=c(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(t){if(this.options={...this.#n,...t},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=c(this.options);void 0!==t.data&&(this.setState(l(t.data,t.dataUpdatedAt)),this.#t=t)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#r.remove(this)}setData(t,e){let r=(0,s.pl)(this.state.data,t,this.options);return this.#u({data:r,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),r}setState(t,e){this.#u({type:"setState",state:t,setStateOptions:e})}cancel(t){let e=this.#i?.promise;return this.#i?.cancel(t),e?e.then(s.lQ).catch(s.lQ):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#t)}isActive(){return this.observers.some(t=>!1!==(0,s.Eh)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===s.hT||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,s.d2)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(t=0){return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,s.j3)(this.state.dataUpdatedAt,t))}onFocus(){let t=this.observers.find(t=>t.shouldFetchOnWindowFocus());t?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){let t=this.observers.find(t=>t.shouldFetchOnReconnect());t?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#r.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.#i&&(this.#a?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#u({type:"invalidate"})}async fetch(t,e){if("idle"!==this.state.fetchStatus&&this.#i?.status()!=="rejected"){if(void 0!==this.state.data&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let r=new AbortController,i=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},a=()=>{let t=(0,s.ZM)(this.options,e),r=(()=>{let t={client:this.#s,queryKey:this.queryKey,meta:this.meta};return i(t),t})();return(this.#a=!1,this.options.persister)?this.options.persister(t,r,this):t(r)},u=(()=>{let t={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:a};return i(t),t})();this.options.behavior?.onFetch(u,this),this.#e=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#u({type:"fetch",meta:u.fetchOptions?.meta}),this.#i=(0,n.II)({initialPromise:e?.initialPromise,fn:u.fetchFn,onCancel:t=>{t instanceof n.cc&&t.revert&&this.setState({...this.#e,fetchStatus:"idle"}),r.abort()},onFail:(t,e)=>{this.#u({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#u({type:"pause"})},onContinue:()=>{this.#u({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{let t=await this.#i.start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),this.#r.config.onSuccess?.(t,this),this.#r.config.onSettled?.(t,this.state.error,this),t}catch(t){if(t instanceof n.cc){if(t.silent)return this.#i.promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw this.#u({type:"error",error:t}),this.#r.config.onError?.(t,this),this.#r.config.onSettled?.(this.state.data,t,this),t}finally{this.scheduleGc()}}#u(t){let e=e=>{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,...o(e.data,this.options),fetchMeta:t.meta??null};case"success":let r={...e,...l(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#e=t.manual?r:void 0,r;case"error":let s=t.error;
1return{...e,error:s,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),i.jG.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:t})})}};function o(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,n.v_)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function l(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function c(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,r=void 0!==e,s=r?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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"}}},34049:(t,e,r)=>{r.d(e,{BH:()=>m,Cp:()=>y,EN:()=>p,Eh:()=>c,F$:()=>f,GU:()=>j,MK:()=>h,S$:()=>i,ZM:()=>x,ZZ:()=>S,Zw:()=>a,d2:()=>l,f8:()=>b,gn:()=>u,hT:()=>C,j3:()=>o,lQ:()=>n,nJ:()=>d,pl:()=>P,y9:()=>w,yy:()=>Q});var s=r(37126),i="undefined"==typeof window||"Deno"in globalThis;function n(){}function a(t,e){return"function"==typeof t?t(e):t}function u(t){return"number"==typeof t&&t>=0&&t!==1/0}function o(t,e){return Math.max(t+(e||0)-Date.now(),0)}function l(t,e){return"function"==typeof t?t(e):t}function c(t,e){return"function"==typeof t?t(e):t}function h(t,e){let{type:r="all",exact:s,fetchStatus:i,predicate:n,queryKey:a,stale:u}=t;if(a){if(s){if(e.queryHash!==f(a,e.options))return!1}else if(!y(e.queryKey,a))return!1}if("all"!==r){let t=e.isActive();if("active"===r&&!t||"inactive"===r&&t)return!1}return("boolean"!=typeof u||e.isStale()===u)&&(!i||i===e.state.fetchStatus)&&(!n||!!n(e))}function d(t,e){let{exact:r,status:s,predicate:i,mutationKey:n}=t;if(n){if(!e.options.mutationKey)return!1;if(r){if(p(e.options.mutationKey)!==p(n))return!1}else if(!y(e.options.mutationKey,n))return!1}return(!s||e.state.status===s)&&(!i||!!i(e))}function f(t,e){return(e?.queryKeyHashFn||p)(t)}function p(t){return JSON.stringify(t,(t,e)=>O(e)?Object.keys(e).sort().reduce((t,r)=>(t[r]=e[r],t),{}):e)}function y(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(r=>y(t[r],e[r]))}var v=Object.prototype.hasOwnProperty;function m(t,e){if(t===e)return t;let r=g(t)&&g(e);if(!r&&!(O(t)&&O(e)))return e;let s=(r?t:Object.keys(t)).length,i=r?e:Object.keys(e),n=i.length,a=r?Array(n):{},u=0;for(let o=0;o<n;o++){let n=r?o:i[o],l=t[n],c=e[n];if(l===c){a[n]=l,(r?o<s:v.call(t,n))&&u++;continue}if(null===l||null===c||"object"!=typeof l||"object"!=typeof c){a[n]=c;continue}let h=m(l,c);a[n]=h,h===l&&u++}return s===n&&u===s?t:a}function b(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let r in t)if(t[r]!==e[r])return!1;return!0}function g(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function O(t){if(!R(t))return!1;let e=t.constructor;if(void 0===e)return!0;let r=e.prototype;return!!R(r)&&!!r.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function R(t){return"[object Object]"===Object.prototype.toString.call(t)}function Q(t){return new Promise(e=>{s.zs.setTimeout(e,t)})}function P(t,e,r){return"function"==typeof r.structuralSharing?r.structuralSharing(t,e):!1!==r.structuralSharing?m(t,e):e}function w(t,e,r=0){let s=[...t,e];return r&&s.length>r?s.slice(1):s}function S(t,e,r=0){let s=[e,...t];return r&&s.length>r?s.slice(0,-1):s}var C=Symbol();function x(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:t.queryFn&&t.queryFn!==C?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))}function j(t,e){return"function"==typeof t?t(...e):!!t}},37126:(t,e,r)=>{r.d(e,{Zq:()=>n,zs:()=>i});var s={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},i=new class{#o=s;#l=!1;setTimeoutProvider(t){this.#o=t}setTimeout(t,e){return this.#o.setTimeout(t,e)}clearTimeout(t){this.#o.clearTimeout(t)}setInterval(t,e){return this.#o.setInterval(t,e)}clearInterval(t){this.#o.clearInterval(t)}};function n(t){setTimeout(t,0)}},38445:(t,e,r)=>{r.d(e,{Q:()=>s});var s=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},38559:(t,e,r)=>{r.d(e,{$:()=>u,s:()=>a});var s=r(74268),i=r(69781),n=r(93049),a=class extends i.k{#s;#c;#h;#i;constructor(t){super(),this.#s=t.client,this.mutationId=t.mutationId,this.#h=t.mutationCache,this.#c=[],this.state=t.state||u(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#c.includes(t)||(this.#c.push(t),this.clearGcTimeout(),this.#h.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#c=this.#c.filter(e=>e!==t),this.scheduleGc(),this.#h.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#c.length||("pending"===this.state.status?this.scheduleGc():this.#h.remove(this))}continue(){return this.#i?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#u({type:"continue"})},r={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#i=(0,n.II)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#u({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#u({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#h.canRun(this)});let s="pending"===this.state.status,i=!this.#i.canStart();try{if(s)e();else{this.#u({type:"pending",variables:t,isPaused:i}),await this.#h.config.onMutate?.(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#u({type:"pending",context:e,variables:t,isPaused:i})}let n=await this.#i.start();return await this.#h.config.onSuccess?.(n,t,this.state.context,this,r),await this.options.onSuccess?.(n,t,this.state.context,r),await this.#h.config.onSettled?.(n,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(n,null,t,this.state.context,r),this.#u({type:"success",data:n}),n}catch(e){try{throw await this.#h.config.onError?.(e,t,this.state.context,this,r),await this.options.onError?.(e,t,this.state.context,r),await this.#h.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,e,t,this.state.context,r),e}finally{this.#u({type:"error",error:e})}}finally{this.#h.runNext(this)}}#u(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};
1case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};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"}}})(this.state),s.jG.batch(()=>{this.#c.forEach(e=>{e.onMutationUpdate(t)}),this.#h.notify({mutation:this,type:"updated",action:t})})}};function u(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},56195:(t,e,r)=>{r.d(e,{m:()=>n});var s=r(38445),i=r(34049),n=new class extends s.Q{#d;#f;#p;constructor(){super(),this.#p=t=>{if(!i.S$&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#f||this.setEventListener(this.#p)}onUnsubscribe(){this.hasListeners()||(this.#f?.(),this.#f=void 0)}setEventListener(t){this.#p=t,this.#f?.(),this.#f=t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()})}setFocused(t){this.#d!==t&&(this.#d=t,this.onFocus())}onFocus(){let t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return"boolean"==typeof this.#d?this.#d:globalThis.document?.visibilityState!=="hidden"}}},63122:(t,e,r)=>{r.d(e,{t:()=>n});var s=r(38445),i=r(34049),n=new class extends s.Q{#y=!0;#f;#p;constructor(){super(),this.#p=t=>{if(!i.S$&&window.addEventListener){let e=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#f||this.setEventListener(this.#p)}onUnsubscribe(){this.hasListeners()||(this.#f?.(),this.#f=void 0)}setEventListener(t){this.#p=t,this.#f?.(),this.#f=t(this.setOnline.bind(this))}setOnline(t){this.#y!==t&&(this.#y=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#y}}},66902:(t,e,r)=>{r.d(e,{PL:()=>i,RQ:()=>o,rB:()=>u});var s=r(34049);function i(t){return{onFetch:(e,r)=>{let i=e.options,u=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],l=e.state.data?.pageParams||[],c={pages:[],pageParams:[]},h=0,d=async()=>{let r=!1,d=(0,s.ZM)(e.options,e.fetchOptions),f=async(t,i,n)=>{if(r)return Promise.reject();if(null==i&&t.pages.length)return Promise.resolve(t);let a=(()=>{let t={client:e.client,queryKey:e.queryKey,pageParam:i,direction:n?"backward":"forward",meta:e.options.meta};return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(e.signal.aborted?r=!0:e.signal.addEventListener("abort",()=>{r=!0}),e.signal)}),t})(),u=await d(a),{maxPages:o}=e.options,l=n?s.ZZ:s.y9;return{pages:l(t.pages,u,o),pageParams:l(t.pageParams,i,o)}};if(u&&o.length){let t="backward"===u,e={pages:o,pageParams:l},r=(t?a:n)(i,e);c=await f(e,r,t)}else{let e=t??o.length;do{let t=0===h?l[0]??i.initialPageParam:n(i,c);if(h>0&&null==t)break;c=await f(c,t),h++}while(h<e)}return c};e.options.persister?e.fetchFn=()=>e.options.persister?.(d,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r):e.fetchFn=d}}}function n(t,{pages:e,pageParams:r}){let s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,r[s],r):void 0}function a(t,{pages:e,pageParams:r}){return e.length>0?t.getPreviousPageParam?.(e[0],e,r[0],r):void 0}function u(t,e){return!!e&&null!=n(t,e)}function o(t,e){return!!e&&!!t.getPreviousPageParam&&null!=a(t,e)}},69781:(t,e,r)=>{r.d(e,{k:()=>n});var s=r(37126),i=r(34049),n=class{#v;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.gn)(this.gcTime)&&(this.#v=s.zs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(i.S$?1/0:3e5))}clearGcTimeout(){this.#v&&(s.zs.clearTimeout(this.#v),this.#v=void 0)}}},74268:(t,e,r)=>{r.d(e,{jG:()=>i});var s=r(37126).Zq,i=function(){let t=[],e=0,r=t=>{t()},i=t=>{t()},n=s,a=s=>{e?t.push(s):n(()=>{r(s)})};return{batch:s=>{let a;e++;try{a=s()}finally{--e||(()=>{let e=t;t=[],e.length&&n(()=>{i(()=>{e.forEach(t=>{r(t)})})})})()}return a},batchCalls:t=>(...e)=>{a(()=>{t(...e)})},schedule:a,setNotifyFunction:t=>{r=t},setBatchNotifyFunction:t=>{i=t},setScheduler:t=>{n=t}}}()},83515:(t,e,r)=>{r.d(e,{T:()=>s});function s(){let t,e,r=new Promise((r,s)=>{t=r,e=s});function s(t){Object.assign(r,t),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=e=>{s({status:"fulfilled",value:e}),t(e)},r.reject=t=>{s({status:"rejected",reason:t}),e(t)},r}},93049:(t,e,r)=>{r.d(e,{II:()=>c,cc:()=>l,v_:()=>
1o});var s=r(56195),i=r(63122),n=r(83515),a=r(34049);function u(t){return Math.min(1e3*2**t,3e4)}function o(t){return(t??"online")!=="online"||i.t.isOnline()}var l=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function c(t){let e,r=!1,c=0,h=(0,n.T)(),d=()=>s.m.isFocused()&&("always"===t.networkMode||i.t.isOnline())&&t.canRun(),f=()=>o(t.networkMode)&&t.canRun(),p=t=>{"pending"===h.status&&(e?.(),h.resolve(t))},y=t=>{"pending"===h.status&&(e?.(),h.reject(t))},v=()=>new Promise(r=>{e=t=>{("pending"!==h.status||d())&&r(t)},t.onPause?.()}).then(()=>{e=void 0,"pending"===h.status&&t.onContinue?.()}),m=()=>{let e;if("pending"!==h.status)return;let s=0===c?t.initialPromise:void 0;try{e=s??t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(p).catch(e=>{if("pending"!==h.status)return;let s=t.retry??3*!a.S$,i=t.retryDelay??u,n="function"==typeof i?i(c,e):i,o=!0===s||"number"==typeof s&&c<s||"function"==typeof s&&s(c,e);if(r||!o)return void y(e);c++,t.onFail?.(c,e),(0,a.yy)(n).then(()=>d()?void 0:v()).then(()=>{r?y(e):m()})})};return{promise:h,status:()=>h.status,cancel:e=>{if("pending"===h.status){let r=new l(e);y(r),t.onCancel?.(r)}},continue:()=>(e?.(),h),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:f,start:()=>(f()?m():v().then(m),h)}}},99776:(t,e,r)=>{r.d(e,{Ht:()=>u,jE:()=>a});var s=r(12115),i=r(95155),n=s.createContext(void 0),a=t=>{let e=s.useContext(n);if(t)return t;if(!e)throw Error("No QueryClient set, use QueryClientProvider to set one");return e},u=t=>{let{client:e,children:r}=t;return s.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,i.jsx)(n.Provider,{value:e,children:r})}},99914:(t,e,r)=>{r.d(e,{pY:()=>tQ});var s,i=r(34049),n=r(29702),a=Object.create,u=Object.defineProperty,o=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyNames,c=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty,d=(t,e)=>function(){return e||(0,t[l(t)[0]])((e={exports:{}}).exports,e),e.exports},f=(t,e,r)=>(r=null!=t?a(c(t)):{},((t,e,r,s)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var i,n=l(e),a=0,c=n.length;a<c;a++)i=n[a],h.call(t,i)||i===r||u(t,i,{get:(t=>e[t]).bind(null,i),enumerable:!(s=o(e,i))||s.enumerable});return t})(!e&&t&&t.__esModule?r:u(r,"default",{value:t,enumerable:!0}),t)),p=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(t,e){e.exports=function(t,e){if(null==t)return{};var r={};for(var s in t)if(({}).hasOwnProperty.call(t,s)){if(e.includes(s))continue;r[s]=t[s]}return r},e.exports.__esModule=!0,e.exports.default=e.exports}}),y=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(t,e){var r=p();e.exports=function(t,e){if(null==t)return{};var s,i,n=r(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)s=a[i],e.includes(s)||({}).propertyIsEnumerable.call(t,s)&&(n[s]=t[s])}return n},e.exports.__esModule=!0,e.exports.default=e.exports}}),v=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,e){function r(t){return e.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),m=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,e){var r=v().default;e.exports=function(t,e){if("object"!=r(t)||!t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var i=s.call(t,e||"default");if("object"!=r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)},e.exports.__esModule=!0,e.exports.default=e.exports}}),b=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,e){var r=v().default,s=m();e.exports=function(t){var e=s(t,"string");return"symbol"==r(e)?e:e+""},e.exports.__esModule=!0,e.exports.default=e.exports}}),g=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/
1defineProperty.js"(t,e){var r=b();e.exports=function(t,e,s){return(e=r(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t},e.exports.__esModule=!0,e.exports.default=e.exports}}),O=d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,e){var r=g();function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,s)}return r}e.exports=function(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach(function(e){r(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t},e.exports.__esModule=!0,e.exports.default=e.exports}}),R=f(y(),1),Q=f(O(),1);let P=["cursor","direction"];function w(t,e,r){let s=t.flatMap(t=>t.split("."));if(!e&&(!r||"any"===r))return s.length?[s]:[];if("infinite"===r&&(0,n.Gv)(e)&&("direction"in e||"cursor"in e)){let{cursor:t,direction:r}=e;return[s,{input:(0,R.default)(e,P),type:"infinite"}]}return[s,(0,Q.default)((0,Q.default)({},void 0!==e&&e!==i.hT&&{input:e}),r&&"any"!==r&&{type:r})]}function S(t){return w(t,void 0,"any")}var C=r(8813),x=r(56195),j=r(74268),E=r(31668),q=r(38445),M=r(83515),D=r(37126),I=class extends q.Q{constructor(t,e){super(),this.options=e,this.#s=t,this.#m=null,this.#b=(0,M.T)(),this.bindMethods(),this.setOptions(e)}#s;#g=void 0;#O=void 0;#R=void 0;#Q;#P;#b;#m;#w;#S;#C;#x;#j;#E;#q=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#g.addObserver(this),T(this.#g,this.options)?this.#M():this.updateResult(),this.#D())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return F(this.#g,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return F(this.#g,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#I(),this.#T(),this.#g.removeObserver(this)}setOptions(t){let e=this.options,r=this.#g;if(this.options=this.#s.defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,i.Eh)(this.options.enabled,this.#g))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#F(),this.#g.setOptions(this.options),e._defaulted&&!(0,i.f8)(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#g,observer:this});let s=this.hasListeners();s&&U(this.#g,r,this.options,e)&&this.#M(),this.updateResult(),s&&(this.#g!==r||(0,i.Eh)(this.options.enabled,this.#g)!==(0,i.Eh)(e.enabled,this.#g)||(0,i.d2)(this.options.staleTime,this.#g)!==(0,i.d2)(e.staleTime,this.#g))&&this.#U();let n=this.#k();s&&(this.#g!==r||(0,i.Eh)(this.options.enabled,this.#g)!==(0,i.Eh)(e.enabled,this.#g)||n!==this.#E)&&this.#_(n)}getOptimisticResult(t){var e,r;let s=this.#s.getQueryCache().build(this.#s,t),n=this.createResult(s,t);return e=this,r=n,(0,i.f8)(e.getCurrentResult(),r)||(this.#R=n,this.#P=this.options,this.#Q=this.#g.state),n}getCurrentResult(){return this.#R}trackResult(t,e){return new Proxy(t,{get:(t,r)=>(this.trackProp(r),e?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#b.status||this.#b.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,r))})}trackProp(t){this.#q.add(t)}getCurrentQuery(){return this.#g}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){let e=this.#s.defaultQueryOptions(t),r=this.#s.getQueryCache().build(this.#s,e);return r.fetch().then(()=>this.createResult(r,e))}fetch(t){return this.#M({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#R))}#M(t){this.#F();let e=this.#g.fetch(this.options,t);return t?.throwOnError||(e=e.catch(i.lQ)),e}#U(){this.#I();let t=(0,i.d2)(this.options.staleTime,this.#g);if(i.S$||this.#R.isStale||!(0,i.gn)(t))return;let e=(0,i.j3)(this.#R.dataUpdatedAt,t);this.#x=D.zs.setTimeout(()=>{this.#R.isStale||this.updateResult()},e+1)}#k(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#g):this.options.refetchInterval)??!1}#_(t){this.#T(),this.#E=t,!i.S$&&!1!==(0,i.Eh)(this.options.enabled,this.#g)&&(0,i.gn)(this.#E)&&0!==this.#E&&(this.#j=D.zs.setInterval(()=>
1{(this.options.refetchIntervalInBackground||x.m.isFocused())&&this.#M()},this.#E))}#D(){this.#U(),this.#_(this.#k())}#I(){this.#x&&(D.zs.clearTimeout(this.#x),this.#x=void 0)}#T(){this.#j&&(D.zs.clearInterval(this.#j),this.#j=void 0)}createResult(t,e){let r,s=this.#g,n=this.options,a=this.#R,u=this.#Q,o=this.#P,l=t!==s?t.state:this.#O,{state:c}=t,h={...c},d=!1;if(e._optimisticResults){let r=this.hasListeners(),i=!r&&T(t,e),a=r&&U(t,s,e,n);(i||a)&&(h={...h,...(0,E.k)(c.data,t.options)}),"isRestoring"===e._optimisticResults&&(h.fetchStatus="idle")}let{error:f,errorUpdatedAt:p,status:y}=h;r=h.data;let v=!1;if(void 0!==e.placeholderData&&void 0===r&&"pending"===y){let t;a?.isPlaceholderData&&e.placeholderData===o?.placeholderData?(t=a.data,v=!0):t="function"==typeof e.placeholderData?e.placeholderData(this.#C?.state.data,this.#C):e.placeholderData,void 0!==t&&(y="success",r=(0,i.pl)(a?.data,t,e),d=!0)}if(e.select&&void 0!==r&&!v)if(a&&r===u?.data&&e.select===this.#w)r=this.#S;else try{this.#w=e.select,r=e.select(r),r=(0,i.pl)(a?.data,r,e),this.#S=r,this.#m=null}catch(t){this.#m=t}this.#m&&(f=this.#m,r=this.#S,p=Date.now(),y="error");let m="fetching"===h.fetchStatus,b="pending"===y,g="error"===y,O=b&&m,R=void 0!==r,Q={status:y,fetchStatus:h.fetchStatus,isPending:b,isSuccess:"success"===y,isError:g,isInitialLoading:O,isLoading:O,data:r,dataUpdatedAt:h.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>l.dataUpdateCount||h.errorUpdateCount>l.errorUpdateCount,isFetching:m,isRefetching:m&&!b,isLoadingError:g&&!R,isPaused:"paused"===h.fetchStatus,isPlaceholderData:d,isRefetchError:g&&R,isStale:k(t,e),refetch:this.refetch,promise:this.#b,isEnabled:!1!==(0,i.Eh)(e.enabled,t)};if(this.options.experimental_prefetchInRender){let e=t=>{"error"===Q.status?t.reject(Q.error):void 0!==Q.data&&t.resolve(Q.data)},r=()=>{e(this.#b=Q.promise=(0,M.T)())},i=this.#b;switch(i.status){case"pending":t.queryHash===s.queryHash&&e(i);break;case"fulfilled":("error"===Q.status||Q.data!==i.value)&&r();break;case"rejected":("error"!==Q.status||Q.error!==i.reason)&&r()}}return Q}updateResult(){let t=this.#R,e=this.createResult(this.#g,this.options);if(this.#Q=this.#g.state,this.#P=this.options,void 0!==this.#Q.data&&(this.#C=this.#g),(0,i.f8)(e,t))return;this.#R=e;let r=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,r="function"==typeof e?e():e;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.#R).some(e=>this.#R[e]!==t[e]&&s.has(e))};this.#K({listeners:r()})}#F(){let t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#g)return;let e=this.#g;this.#g=t,this.#O=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#D()}#K(t){j.jG.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t(this.#R)}),this.#s.getQueryCache().notify({query:this.#g,type:"observerResultsUpdated"})})}};function T(t,e){return!1!==(0,i.Eh)(e.enabled,t)&&void 0===t.state.data&&("error"!==t.state.status||!1!==e.retryOnMount)||void 0!==t.state.data&&F(t,e,e.refetchOnMount)}function F(t,e,r){if(!1!==(0,i.Eh)(e.enabled,t)&&"static"!==(0,i.d2)(e.staleTime,t)){let s="function"==typeof r?r(t):r;return"always"===s||!1!==s&&k(t,e)}return!1}function U(t,e,r,s){return(t!==e||!1===(0,i.Eh)(s.enabled,t))&&(!r.suspense||"error"!==t.state.status)&&k(t,r)}function k(t,e){return!1!==(0,i.Eh)(e.enabled,t)&&t.isStaleByTime((0,i.d2)(e.staleTime,t))}var _=r(12115),K=r.t(_,2),L=r(99776),A=r(95155),G=_.createContext(function(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}()),N=()=>_.useContext(G),H=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&!e.isReset()&&(t.retryOnMount=!1)},z=t=>{_.useEffect(()=>{t.clearReset()},[t])},$=t=>{let{result:e,errorResetBoundary:r,throwOnError:s,query:n,suspense:a}=t;return e.isError&&!r.isReset()&&!e.isFetching&&n&&(a&&void 0===e.data||(0,i.GU)(s,[e.error,n]))},Z=_.createContext(!1),W=()=>_.useContext(Z);Z.Provider;var B=(t,e)=>void 0===e.state.data,X=t=>{if(t.suspense){let e=t=>"static"===t?t:Math.max(t??1e3,1e3),r=t.staleTime;t.staleTime="function"==typeof r?(...t)=>e(r(...t)):e(r),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3))}},J=(t,e)=>t.isLoading&&t.isFetching&&!e,Y=(t,e)=>t?.suspense&&e.isPending,V=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function tt(t,e,r){var s,n,a,u,o;let l=W(),c=N(),h=(0,L.jE)(r),d=h.defaultQueryOptions(t);null==(n=h.getDefaultOptions().queries)||null==(s=n._experimental_beforeQuery)||s.call(n,d),d._optimisticResults=l?"isRestoring":"optimistic",X(d),H(d,c),z(c);let f=!h.getQueryCache().get(d.queryHash),[p]=_.useState(()=>new e(h,d)),y=p.getOptimisticResult(d),v=!l&&!1!==t.subscribed;if(_.useSyncExternalStore(_.useCallback(t=>{let e=v?p.subscribe(j.jG.batchCalls(t)):i.lQ;return p.updateResult(),e},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setOptions(d)},[d,p]),Y(d,y))throw V(d,p,c);if($({result:y,errorResetBoundary:c,throwOnError:d.throwOnError,query:h.getQueryCache().get(d.queryHash),suspense:d.suspense}))throw y.error;if(null==(u=h.getDefaultOptions().queries)||null==(a=u._experimental_afterQuery)||a.call(u,d,y),d.experimental_prefetchInRender&&!i.S$&&J(y,l)){let t=f?V(d,p,c):null==(o=h.getQueryCache().get(d.queryHash))?void 0:o.promise;null==t||t.catch(i.lQ).finally(()=>{p.updateResult()})}return d.notifyOnChangeProps?y:p.trackResult(y)}var te=r(38559),tr=class extends q.Q{#s;#R=void 0;#L;#A;constructor(t,e){super(),this.#s=t,this.setOptions(e),this.bindMethods(),this.#G()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){let e=this.options;this.options=this.#s.defaultMutationOptions(t),(0,i.f8)(this.options,e)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#L,observer:this}),e?.mutationKey&&this.options.mutationKey&&(0,i.EN)(e.mutationKey)!==(0,i.EN)(this.options.mutationKey)?this.reset():this.#L?.state.status==="pending"&&this.#L.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#L?.removeObserver(this)}onMutationUpdate(t){this.#G(),this.#K(t)}getCurrentResult(){return this.#R}reset(){this.#L?.removeObserver(this),this.#L=void 0,this.#G(),this.#K()}mutate(t,e){return this.#A=e,this.#L?.removeObserver(this),this.#L=this.#s.getMutationCache().build(this.#s,this.options),this.#L.addObserver(this),this.#L.execute(t)}#G(){let t=this.#L?.state??(0,te.$)();this.#R={...t,isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}}#K(t){j.jG.batch(()=>
1{if(this.#A&&this.hasListeners()){let e=this.#R.variables,r=this.#R.context,s={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#A.onSuccess?.(t.data,e,r,s),this.#A.onSettled?.(t.data,null,e,r,s)):t?.type==="error"&&(this.#A.onError?.(t.error,e,r,s),this.#A.onSettled?.(void 0,t.error,e,r,s))}this.listeners.forEach(t=>{t(this.#R)})})}},ts=r(66902),ti=class extends I{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){super.setOptions({...t,behavior:(0,ts.PL)()})}getOptimisticResult(t){return t.behavior=(0,ts.PL)(),super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){let{state:r}=t,s=super.createResult(t,e),{isFetching:i,isRefetching:n,isError:a,isRefetchError:u}=s,o=r.fetchMeta?.fetchMore?.direction,l=a&&"forward"===o,c=i&&"forward"===o,h=a&&"backward"===o,d=i&&"backward"===o;return{...s,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,ts.rB)(e,r.data),hasPreviousPage:(0,ts.RQ)(e,r.data),isFetchNextPageError:l,isFetchingNextPage:c,isFetchPreviousPageError:h,isFetchingPreviousPage:d,isRefetchError:u&&!l&&!h,isRefetching:n&&!c&&!d}}};function tn(t,e){let r=new Set(e);return t.filter(t=>!r.has(t))}var ta=class extends q.Q{#s;#N;#H;#z;#c;#$;#Z;#W;#B=[];constructor(t,e,r){super(),this.#s=t,this.#z=r,this.#H=[],this.#c=[],this.#N=[],this.setQueries(e)}onSubscribe(){1===this.listeners.size&&this.#c.forEach(t=>{t.subscribe(e=>{this.#X(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#c.forEach(t=>{t.destroy()})}setQueries(t,e){this.#H=t,this.#z=e,j.jG.batch(()=>{let t=this.#c,e=this.#J(this.#H);this.#B=e,e.forEach(t=>t.observer.setOptions(t.defaultedQueryOptions));let r=e.map(t=>t.observer),s=r.map(t=>t.getCurrentResult()),n=t.length!==r.length,a=r.some((e,r)=>e!==t[r]),u=n||a,o=!!u||s.some((t,e)=>{let r=this.#N[e];return!r||!(0,i.f8)(t,r)});(u||o)&&(u&&(this.#c=r),this.#N=s,this.hasListeners()&&(u&&(tn(t,r).forEach(t=>{t.destroy()}),tn(r,t).forEach(t=>{t.subscribe(e=>{this.#X(t,e)})})),this.#K()))})}getCurrentResult(){return this.#N}getQueries(){return this.#c.map(t=>t.getCurrentQuery())}getObservers(){return this.#c}getOptimisticResult(t,e){let r=this.#J(t),s=r.map(t=>t.observer.getOptimisticResult(t.defaultedQueryOptions));return[s,t=>this.#Y(t??s,e),()=>this.#V(s,r)]}#V(t,e){return e.map((r,s)=>{let i=t[s];return r.defaultedQueryOptions.notifyOnChangeProps?i:r.observer.trackResult(i,t=>{e.forEach(e=>{e.observer.trackProp(t)})})})}#Y(t,e){return e?(this.#$&&this.#N===this.#W&&e===this.#Z||(this.#Z=e,this.#W=this.#N,this.#$=(0,i.BH)(this.#$,e(t))),this.#$):t}#J(t){let e=new Map(this.#c.map(t=>[t.options.queryHash,t])),r=[];return t.forEach(t=>{let s=this.#s.defaultQueryOptions(t),i=e.get(s.queryHash);i?r.push({defaultedQueryOptions:s,observer:i}):r.push({defaultedQueryOptions:s,observer:new I(this.#s,s)})}),r}#X(t,e){let r=this.#c.indexOf(t);-1!==r&&(this.#N=function(t,e,r){let s=t.slice(0);return s[e]=r,s}(this.#N,r,e),this.#K())}#K(){if(this.hasListeners()){let t=this.#$,e=this.#V(this.#N,this.#B);t!==this.#Y(e,this.#z?.combine)&&j.jG.batch(()=>{this.listeners.forEach(t=>{t(this.#N)})})}}};function tu(t,e){let{queries:r,...s}=t,n=(0,L.jE)(e),a=W(),u=N(),o=_.useMemo(()=>r.map(t=>{let e=n.defaultQueryOptions(t);return e._optimisticResults=a?"isRestoring":"optimistic",e}),[r,n,a]);o.forEach(t=>{X(t),H(t,u)}),z(u);let[l]=_.useState(()=>new ta(n,o,s)),[c,h,d]=l.getOptimisticResult(o,s.combine),f=!a&&!1!==s.subscribed;_.useSyncExternalStore(_.useCallback(t=>f?l.subscribe(j.jG.batchCalls(t)):i.lQ,[l,f]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),_.useEffect(()=>{l.setQueries(o,s)},[o,s,l]);let p=c.some((t,e)=>Y(o[e],t))?c.flatMap((t,e)=>{let r=o[e];if(r){let e=new I(n,r);if(Y(r,t))return V(r,e,u);J(t,a)&&V(r,e,u)}return[]}):[];if(p.length>0)throw Promise.all(p);let y=c.find((t,e)=>{let r=o[e];return r&&$({result:t,errorResetBoundary:u,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense})});if(null==y?void 0:y.error)throw y.error;return h(d())}var to=r(46171);let tl=["client","ssrContext","ssrState","abortOnUnmount"],tc=null==(s=_.createContext)?void 0:s.call(K,null);var th=f(O(),1);function td(t){let e=t instanceof C.Ke?t:(0,C.n2)(t);return(0,to.vX)(t=>{let r=t.path,s=r.join("."),[i,n]=t.args;return(0,th.default)({queryKey:w(r,i,"query"),queryFn:()=>e.query(s,i,null==n?void 0:n.trpc)},n)})}var tf=f(O(),1);function tp(t,e,r){var s,i;let n=t[0],a=null==(s=t[1])?void 0:s.input;return r&&(a=(0,tf.default)((0,tf.default)((0,tf.default)({},null!=(i=a)?i:{}),r.pageParam?{cursor:r.pageParam}:{}),{},{direction:r.direction})),[n.join("."),a,null==e?void 0:e.trpc]}var ty=f(d({"../../node_modules/.pnpm/@[email protected]/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,e){function r(t){function e(t){if(Object(t)!==t)return Promise.reject(TypeError(t+" is not an object."));var e=t.done;return Promise.resolve(t.value).then(function(t){return{value:t,done:e}})}return(r=function(t){this.s=t,this.n=t.next}).prototype={s:null,n:null,next:function(){return e(this.n.apply(this.s,arguments))},return:function(t){var r=this.s.return;return void 0===r?Promise.resolve({value:t,done:!0}):e(r.apply(this.s,arguments))},throw:function(t){var r=this.s.return;return void 0===r?Promise.reject(t):e(r.apply(this.s,arguments))}},new r(t)}e.exports=function(t){var e,s,i,n=2;
1for("undefined"!=typeof Symbol&&(s=Symbol.asyncIterator,i=Symbol.iterator);n--;){if(s&&null!=(e=t[s]))return e.call(t);if(i&&null!=(e=t[i]))return new r(e.call(t));s="@@asyncIterator",i="@@iterator"}throw TypeError("Object is not async iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}})(),1);function tv(t){return{path:t.path.join(".")}}function tm(t){let e=tv(t);return _.useMemo(()=>e,[e])}async function tb(t,e,r){let s=e.getQueryCache().build(e,{queryKey:r});s.setState({data:[],status:"success"});let i=[];var n=!1,a=!1;try{for(var u,o,l=(0,ty.default)(t);n=!(o=await l.next()).done;n=!1){let t=o.value;i.push(t),s.setState({data:[...i]})}}catch(t){a=!0,u=t}finally{try{n&&null!=l.return&&await l.return()}finally{if(a)throw u}}return i}var tg=f(O(),1),tO=f(O());let tR=(t,e)=>new Proxy(t,{get:(t,r)=>(e(r),t[r])});function tQ(t){return function(t){let e=(0,to.vX)(({path:e,args:r})=>{var s;let i=[...e],n=i.pop();if("useMutation"===n)return t[n](i,...r);if("_def"===n)return{path:i};let[a,...u]=r,o=null!=(s=u[0])?s:{};return t[n](i,a,o)});return(0,to.U6)(r=>"useContext"===r||"useUtils"===r?()=>{let e=t.useUtils();return _.useMemo(()=>(function(t){let e=(0,C.Xq)(t.client),r=(0,to.vX)(e=>{let r=[...e.path],s=r.pop(),i=[...e.args],n=i.shift(),a=w(r,n,(t=>{switch(t){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}})(s));return({infiniteQueryOptions:()=>t.infiniteQueryOptions(r,a,i[0]),queryOptions:()=>t.queryOptions(r,a,...i),fetch:()=>t.fetchQuery(a,...i),fetchInfinite:()=>t.fetchInfiniteQuery(a,i[0]),prefetch:()=>t.prefetchQuery(a,...i),prefetchInfinite:()=>t.prefetchInfiniteQuery(a,i[0]),ensureData:()=>t.ensureQueryData(a,...i),invalidate:()=>t.invalidateQueries(a,...i),reset:()=>t.resetQueries(a,...i),refetch:()=>t.refetchQueries(a,...i),cancel:()=>t.cancelQuery(a,...i),setData:()=>{t.setQueryData(a,i[0],i[1])},setQueriesData:()=>t.setQueriesData(a,i[0],i[1],i[2]),setInfiniteData:()=>{t.setInfiniteQueryData(a,i[0],i[1])},getData:()=>t.getQueryData(a),getInfiniteData:()=>t.getInfiniteQueryData(a),setMutationDefaults:()=>t.setMutationDefaults(S(r),n),getMutationDefaults:()=>t.getMutationDefaults(S(r)),isMutating:()=>t.isMutating({mutationKey:S(r)})})[s]()});return(0,to.U6)(s=>"client"===s?e:tl.includes(s)?t[s]:r[s])})(e),[e])}:t.hasOwnProperty(r)?t[r]:e[r])}(function(t){var e,r,s;let a=null!=(e=null==t||null==(r=t.overrides)||null==(r=r.useMutation)?void 0:r.onSuccess)?e:t=>t.originalFn(),u=null!=(s=null==t?void 0:t.context)?s:tc,o=C.XT;function l(){let t=_.useContext(u);if(!t)throw Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return t}function c(t,e){var r;let{queryClient:s,ssrState:i}=l();return i&&"mounted"!==i&&(null==(r=s.getQueryCache().find({queryKey:t}))?void 0:r.state.status)==="error"?(0,tO.default)({retryOnMount:!1},e):e}let h={data:void 0,error:null,status:"idle"},d={data:void 0,error:null,status:"connecting"};return{Provider:t=>{var e;let{abortOnUnmount:r=!1,queryClient:s,ssrContext:a}=t,[o,l]=_.useState(null!=(e=t.ssrState)&&e),c=t.client instanceof C.Ke?t.client:(0,C.n2)(t.client),h=_.useMemo(()=>(function(t){let{client:e,queryClient:r}=t,s=e instanceof C.Ke?e:(0,C.n2)(e);return{infiniteQueryOptions:(t,e,r)=>{var n,a;let u=(null==(n=e[1])?void 0:n.input)===i.hT,o=async t=>{var i;let n=(0,tg.default)((0,tg.default)({},r),{},{trpc:(0,tg.default)((0,tg.default)({},null==r?void 0:r.trpc),(null==r||null==(i=r.trpc)?void 0:i.abortOnUnmount)?{signal:t.signal}:{signal:null})});return await s.query(...tp(e,n,{direction:t.direction,pageParam:t.pageParam}))};return Object.assign((0,tg.default)((0,tg.default)({},r),{},{initialData:null==r?void 0:r.initialData,queryKey:e,queryFn:u?i.hT:o,initialPageParam:null!=(a=null==r?void 0:r.initialCursor)?a:null}),{trpc:tv({path:t})})},queryOptions:(t,e,a)=>{var u;let o=(null==(u=e[1])?void 0:u.input)===i.hT,l=async t=>{var i;let u=(0,tg.default)((0,tg.default)({},a),{},{trpc:(0,tg.default)((0,tg.default)({},null==a?void 0:a.trpc),(null==a||null==(i=a.trpc)?void 0:i.abortOnUnmount)?{signal:t.signal}:{signal:null})}),o=await s.query(...tp(e,u));return(0,n.Td)(o)?tb(o,r,e):o};return Object.assign((0,tg.default)((0,tg.default)({},a),{},{initialData:null==a?void 0:a.initialData,queryKey:e,queryFn:o?i.hT:l}),{trpc:tv({path:t})})},fetchQuery:(t,e)=>r.fetchQuery((0,tg.default)((0,tg.default)({},e),{},{queryKey:t,queryFn:()=>s.query(...tp(t,e))})),fetchInfiniteQuery:(t,e)=>{var i;return r.fetchInfiniteQuery((0,tg.default)((0,tg.default)({},e),{},{queryKey:t,queryFn:({pageParam:r,direction:i})=>s.query(...tp(t,e,{pageParam:r,direction:i})),initialPageParam:null!=(i=null==e?void 0:e.initialCursor)?i:null}))},prefetchQuery:(t,e)=>r.prefetchQuery((0,tg.default)((0,tg.default)({},e),{},{queryKey:t,queryFn:()=>s.query(...tp(t,e))})),prefetchInfiniteQuery:(t,e)=>{var i;return r.prefetchInfiniteQuery((0,tg.default)((0,tg.default)({},e),{},{queryKey:t,queryFn:({pageParam:r,direction:i})=>s.query(...tp(t,e,{pageParam:r,direction:i})),initialPageParam:null!=(i=null==e?void 0:e.initialCursor)?i:null}))},ensureQueryData:(t,e)=>r.ensureQueryData((0,tg.default)((0,tg.default)({},e),{},{queryKey:t,queryFn:()=>s.query(...tp(t,e))})),invalidateQueries:(t,e,s)=>
1r.invalidateQueries((0,tg.default)((0,tg.default)({},e),{},{queryKey:t}),s),resetQueries:(t,e,s)=>r.resetQueries((0,tg.default)((0,tg.default)({},e),{},{queryKey:t}),s),refetchQueries:(t,e,s)=>r.refetchQueries((0,tg.default)((0,tg.default)({},e),{},{queryKey:t}),s),cancelQuery:(t,e)=>r.cancelQueries({queryKey:t},e),setQueryData:(t,e,s)=>r.setQueryData(t,e,s),setQueriesData:(t,e,s,i)=>r.setQueriesData((0,tg.default)((0,tg.default)({},e),{},{queryKey:t}),s,i),getQueryData:t=>r.getQueryData(t),setInfiniteQueryData:(t,e,s)=>r.setQueryData(t,e,s),getInfiniteQueryData:t=>r.getQueryData(t),setMutationDefaults:(e,i)=>{let n=e[0];return r.setMutationDefaults(e,"function"==typeof i?i({canonicalMutationFn:e=>s.mutation(...tp([n,{input:e}],t))}):i)},getMutationDefaults:t=>r.getMutationDefaults(t),isMutating:t=>r.isMutating((0,tg.default)((0,tg.default)({},t),{},{exact:!0}))}})({client:c,queryClient:s}),[c,s]),d=_.useMemo(()=>(0,tO.default)({abortOnUnmount:r,queryClient:s,client:c,ssrContext:null!=a?a:null,ssrState:o},h),[r,c,h,s,a,o]);return _.useEffect(()=>{l(t=>!!t&&"mounted")},[]),(0,A.jsx)(u.Provider,{value:d,children:t.children})},createClient:o,useContext:l,useUtils:l,useQuery:function(e,r,s){var a,u,o,h,d;let{abortOnUnmount:f,client:p,ssrState:y,queryClient:v,prefetchQuery:m}=l(),b=w(e,r,"query"),g=v.getQueryDefaults(b),O=r===i.hT;"undefined"!=typeof window||"prepass"!==y||(null==s||null==(a=s.trpc)?void 0:a.ssr)===!1||(null!=(u=null==s?void 0:s.enabled)?u:null==g?void 0:g.enabled)===!1||O||v.getQueryCache().find({queryKey:b})||m(b,s);let R=c(b,(0,tO.default)((0,tO.default)({},g),s)),Q=null!=(o=null!=(h=null==s||null==(d=s.trpc)?void 0:d.abortOnUnmount)?h:null==t?void 0:t.abortOnUnmount)?o:f,P=tt((0,tO.default)((0,tO.default)({},R),{},{queryKey:b,queryFn:O?r:async t=>{let e=(0,tO.default)((0,tO.default)({},R),{},{trpc:(0,tO.default)((0,tO.default)({},null==R?void 0:R.trpc),Q?{signal:t.signal}:{signal:null})}),r=await p.query(...tp(b,e));return(0,n.Td)(r)?tb(r,v,b):r}}),I,v);return P.trpc=tm({path:e}),P},usePrefetchQuery:function(e,r,s){var n,a,u;let o=l(),c=w(e,r,"query"),h=r===i.hT,d=null!=(n=null!=(a=null==s||null==(u=s.trpc)?void 0:u.abortOnUnmount)?a:null==t?void 0:t.abortOnUnmount)?n:o.abortOnUnmount;!function(t,e){let r=(0,L.jE)(void 0);r.getQueryState(t.queryKey)||r.prefetchQuery(t)}((0,tO.default)((0,tO.default)({},s),{},{queryKey:c,queryFn:h?r:t=>{let e={trpc:(0,tO.default)((0,tO.default)({},null==s?void 0:s.trpc),d?{signal:t.signal}:{})};return o.client.query(...tp(c,e))}}))},useSuspenseQuery:function(e,r,s){var i,n,a,u,o;let c=l(),h=w(e,r,"query"),d=null!=(i=null!=(n=null==s||null==(a=s.trpc)?void 0:a.abortOnUnmount)?n:null==t?void 0:t.abortOnUnmount)?i:c.abortOnUnmount,f=(u=(0,tO.default)((0,tO.default)({},s),{},{queryKey:h,queryFn:t=>{let e=(0,tO.default)((0,tO.default)({},s),{},{trpc:(0,tO.default)((0,tO.default)({},null==s?void 0:s.trpc),d?{signal:t.signal}:{signal:null})});return c.client.query(...tp(h,e))}}),o=c.queryClient,tt({...u,enabled:!0,suspense:!0,throwOnError:B,placeholderData:void 0},I,o));return f.trpc=tm({path:e}),[f.data,f]},useQueries:(t,e)=>{let{ssrState:r,queryClient:s,prefetchQuery:i,client:n}=l(),a=t(td(n));if("undefined"==typeof window&&"prepass"===r)for(let t of a){var u;(null==(u=t.trpc)?void 0:u.ssr)===!1||s.getQueryCache().find({queryKey:t.queryKey})||i(t.queryKey,t)}return tu({queries:a.map(t=>(0,tO.default)((0,tO.default)({},t),{},{queryKey:t.queryKey})),combine:null==e?void 0:e.combine},s)},useSuspenseQueries:t=>{var e;let{queryClient:r,client:s}=l(),i=(e={queries:t(td(s)).map(t=>(0,tO.default)((0,tO.default)({},t),{},{queryFn:t.queryFn,queryKey:t.queryKey}))},tu({...e,queries:e.queries.map(t=>({...t,suspense:!0,throwOnError:B,enabled:!0,placeholderData:void 0}))},r));return[i.map(t=>t.data),i]},useMutation:function(t,e){let{client:r,queryClient:s}=l(),n=S(t),u=s.defaultMutationOptions(s.getMutationDefaults(n)),o=function(t,e){let r=(0,L.jE)(e),[s]=_.useState(()=>new tr(r,t));_.useEffect(()=>{s.setOptions(t)},[s,t]);let n=_.useSyncExternalStore(_.useCallback(t=>s.subscribe(j.jG.batchCalls(t)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),a=_.useCallback((t,e)=>{s.mutate(t,e).catch(i.lQ)},[s]);if(n.error&&(0,i.GU)(s.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}((0,tO.default)((0,tO.default)({},e),{},{mutationKey:n,mutationFn:s=>
1r.mutation(...tp([t,{input:s}],e)),onSuccess(...t){var r,i;return a({originalFn:()=>{var r,s,i;return null!=(r=null==e||null==(s=e.onSuccess)?void 0:s.call(e,...t))?r:null==u||null==(i=u.onSuccess)?void 0:i.call(u,...t)},queryClient:s,meta:null!=(r=null!=(i=null==e?void 0:e.meta)?i:null==u?void 0:u.meta)?r:{}})}}),s);return o.trpc=tm({path:t}),o},useSubscription:function(t,e,r){var s;let n=null!=(s=null==r?void 0:r.enabled)?s:e!==i.hT,a=(0,i.EN)(w(t,e,"any")),{client:u}=l(),o=_.useRef(r);_.useEffect(()=>{o.current=r});let[c]=_.useState(new Set([])),f=_.useCallback(t=>{c.add(t)},[c]),p=_.useRef(null),y=_.useCallback(t=>{let e=m.current,r=m.current=t(e),s=!1;for(let t of c)if(e[t]!==r[t]){s=!0;break}s&&g(tR(r,f))},[f,c]),v=_.useCallback(()=>{var r;if(null==(r=p.current)||r.unsubscribe(),!n)return void y(()=>(0,tO.default)((0,tO.default)({},h),{},{reset:v}));y(()=>(0,tO.default)((0,tO.default)({},d),{},{reset:v})),p.current=u.subscription(t.join("."),null!=e?e:void 0,{onStarted:()=>{var t,e;null==(t=(e=o.current).onStarted)||t.call(e),y(t=>(0,tO.default)((0,tO.default)({},t),{},{status:"pending",error:null}))},onData:t=>{var e,r;null==(e=(r=o.current).onData)||e.call(r,t),y(e=>(0,tO.default)((0,tO.default)({},e),{},{status:"pending",data:t,error:null}))},onError:t=>{var e,r;null==(e=(r=o.current).onError)||e.call(r,t),y(e=>(0,tO.default)((0,tO.default)({},e),{},{status:"error",error:t}))},onConnectionStateChange:t=>{y(e=>{switch(t.state){case"idle":return(0,tO.default)((0,tO.default)({},e),{},{status:t.state,error:null,data:void 0});case"connecting":return(0,tO.default)((0,tO.default)({},e),{},{error:t.error,status:t.state});case"pending":return e}})},onComplete:()=>{var t,e;null==(t=(e=o.current).onComplete)||t.call(e),y(t=>(0,tO.default)((0,tO.default)({},t),{},{status:"idle",error:null,data:void 0}))}})},[u,a,n,y]);_.useEffect(()=>(v(),()=>{var t;null==(t=p.current)||t.unsubscribe()}),[v]);let m=_.useRef(n?(0,tO.default)((0,tO.default)({},d),{},{reset:v}):(0,tO.default)((0,tO.default)({},h),{},{reset:v})),[b,g]=_.useState(tR(m.current,f));return b},useInfiniteQuery:function(t,e,r){var s,n,a,u,o;let{client:h,ssrState:d,prefetchInfiniteQuery:f,queryClient:p,abortOnUnmount:y}=l(),v=w(t,e,"infinite"),m=p.getQueryDefaults(v),b=e===i.hT;"undefined"!=typeof window||"prepass"!==d||(null==r||null==(s=r.trpc)?void 0:s.ssr)===!1||(null!=(n=null==r?void 0:r.enabled)?n:null==m?void 0:m.enabled)===!1||b||p.getQueryCache().find({queryKey:v})||f(v,(0,tO.default)((0,tO.default)({},m),r));let g=c(v,(0,tO.default)((0,tO.default)({},m),r)),O=null!=(a=null==r||null==(u=r.trpc)?void 0:u.abortOnUnmount)?a:y,R=tt((0,tO.default)((0,tO.default)({},g),{},{initialPageParam:null!=(o=r.initialCursor)?o:null,persister:r.persister,queryKey:v,queryFn:b?e:t=>{var e;let s=(0,tO.default)((0,tO.default)({},g),{},{trpc:(0,tO.default)((0,tO.default)({},null==g?void 0:g.trpc),O?{signal:t.signal}:{signal:null})});return h.query(...tp(v,s,{pageParam:null!=(e=t.pageParam)?e:r.initialCursor,direction:t.direction}))}}),ti,p);return R.trpc=tm({path:t}),R},usePrefetchInfiniteQuery:function(t,e,r){var s,n,a;let u=l(),o=w(t,e,"infinite"),h=u.queryClient.getQueryDefaults(o),d=e===i.hT,f=c(o,(0,tO.default)((0,tO.default)({},h),r)),p=null!=(s=null==r||null==(n=r.trpc)?void 0:n.abortOnUnmount)?s:u.abortOnUnmount;!function(t,e){let r=(0,L.jE)(void 0);r.getQueryState(t.queryKey)||r.prefetchInfiniteQuery(t)}((0,tO.default)((0,tO.default)({},r),{},{initialPageParam:null!=(a=r.initialCursor)?a:null,queryKey:o,queryFn:d?e:t=>{var e;let s=(0,tO.default)((0,tO.default)({},f),{},{trpc:(0,tO.default)((0,tO.default)({},null==f?void 0:f.trpc),p?{signal:t.signal}:{})});return u.client.query(...tp(o,s,{pageParam:null!=(e=t.pageParam)?e:r.initialCursor,direction:t.direction}))}}))},useSuspenseInfiniteQuery:function(t,e,r){var s,i,n,a,u;let o=l(),h=w(t,e,"infinite"),d=o.queryClient.getQueryDefaults(h),f=c(h,(0,tO.default)((0,tO.default)({},d),r)),p=null!=(s=null==r||null==(i=r.trpc)?void 0:i.abortOnUnmount)?s:o.abortOnUnmount,y=(a=(0,tO.default)((0,tO.default)({},r),{},{initialPageParam:null!=(n=r.initialCursor)?n:null,queryKey:h,queryFn:t=>{var e;let s=(0,tO.default)((0,tO.default)({},f),{},{trpc:(0,tO.default)((0,tO.default)({},null==f?void 0:f.trpc),p?{signal:t.signal}:{})});return o.client.query(...tp(h,s,{pageParam:null!=(e=t.pageParam)?e:r.initialCursor,direction:t.direction}))}}),u=o.queryClient,tt({...a,enabled:!0,suspense:!0,throwOnError:B},ti,u));return y.trpc=tm({path:t}),[y.data,y]}}}(t))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.