var Cb=Object.defineProperty;var gv=a=>{throw TypeError(a)};var Rb=(a,i,c)=>i in a?Cb(a,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):a[i]=c;var Yf=(a,i,c)=>Rb(a,typeof i!="symbol"?i+"":i,c),Gf=(a,i,c)=>i.has(a)||gv("Cannot "+c);var C=(a,i,c)=>(Gf(a,i,"read from private field"),c?c.call(a):i.get(a)),ct=(a,i,c)=>i.has(a)?gv("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(a):i.set(a,c),W=(a,i,c,r)=>(Gf(a,i,"write to private field"),r?r.call(a,c):i.set(a,c),c),Ct=(a,i,c)=>(Gf(a,i,"access private method"),c);var Uc=(a,i,c,r)=>({set _(o){W(a,i,o,c)},get _(){return C(a,i,r)}});(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const h of o)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&r(m)}).observe(document,{childList:!0,subtree:!0});function c(o){const h={};return o.integrity&&(h.integrity=o.integrity),o.referrerPolicy&&(h.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?h.credentials="include":o.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function r(o){if(o.ep)return;o.ep=!0;const h=c(o);fetch(o.href,h)}})();function Ab(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Vf={exports:{}},Lu={};/** * @license React * react-jsx-runtime.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Sv;function zb(){if(Sv)return Lu;Sv=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function c(r,o,h){var m=null;if(h!==void 0&&(m=""+h),o.key!==void 0&&(m=""+o.key),"key"in o){h={};for(var d in o)d!=="key"&&(h[d]=o[d])}else h=o;return o=h.ref,{$$typeof:a,type:r,key:m,ref:o!==void 0?o:null,props:h}}return Lu.Fragment=i,Lu.jsx=c,Lu.jsxs=c,Lu}var pv;function Nb(){return pv||(pv=1,Vf.exports=zb()),Vf.exports}var H=Nb(),Xf={exports:{}},dt={};/** * @license React * react.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var bv;function Db(){if(bv)return dt;bv=1;var a=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),p=Symbol.for("react.view_transition"),_=Symbol.iterator;function E(R){return R===null||typeof R!="object"?null:(R=_&&R[_]||R["@@iterator"],typeof R=="function"?R:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,K={};function w(R,J,it){this.props=R,this.context=J,this.refs=K,this.updater=it||D}w.prototype.isReactComponent={},w.prototype.setState=function(R,J){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,J,"setState")},w.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function L(){}L.prototype=w.prototype;function X(R,J,it){this.props=R,this.context=J,this.refs=K,this.updater=it||D}var Y=X.prototype=new L;Y.constructor=X,M(Y,w.prototype),Y.isPureReactComponent=!0;var G=Array.isArray;function V(){}var F={H:null,A:null,T:null,S:null},Q=Object.prototype.hasOwnProperty;function k(R,J,it){var I=it.ref;return{$$typeof:a,type:R,key:J,ref:I!==void 0?I:null,props:it}}function rt(R,J){return k(R.type,J,R.props)}function ft(R){return typeof R=="object"&&R!==null&&R.$$typeof===a}function bt(R){var J={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(it){return J[it]})}var mt=/\/+/g;function st(R,J){return typeof R=="object"&&R!==null&&R.key!=null?bt(""+R.key):J.toString(36)}function Z(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(V,V):(R.status="pending",R.then(function(J){R.status==="pending"&&(R.status="fulfilled",R.value=J)},function(J){R.status==="pending"&&(R.status="rejected",R.reason=J)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function $(R,J,it,I,yt){var Rt=typeof R;(Rt==="undefined"||Rt==="boolean")&&(R=null);var At=!1;if(R===null)At=!0;else switch(Rt){case"bigint":case"string":case"number":At=!0;break;case"object":switch(R.$$typeof){case a:case i:At=!0;break;case b:return At=R._init,$(At(R._payload),J,it,I,yt)}}if(At)return yt=yt(R),At=I===""?"."+st(R,0):I,G(yt)?(it="",At!=null&&(it=At.replace(mt,"$&/")+"/"),$(yt,J,it,"",function(Mn){return Mn})):yt!=null&&(ft(yt)&&(yt=rt(yt,it+(yt.key==null||R&&R.key===yt.key?"":(""+yt.key).replace(mt,"$&/")+"/")+At)),J.push(yt)),1;At=0;var at=I===""?".":I+":";if(G(R))for(var ht=0;ht{const i=tt.useContext(Og);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},Mb=({client:a,children:i})=>(tt.useEffect(()=>(a.mount(),()=>{a.unmount()}),[a]),H.jsx(Og.Provider,{value:a,children:i})),xb={setTimeout:(a,i)=>setTimeout(a,i),clearTimeout:a=>clearTimeout(a),setInterval:(a,i)=>setInterval(a,i),clearInterval:a=>clearInterval(a)};var Ml,Ah,mg,Ub=(mg=class{constructor(){ct(this,Ml,xb);ct(this,Ah,!1)}setTimeoutProvider(a){W(this,Ml,a)}setTimeout(a,i){return C(this,Ml).setTimeout(a,i)}clearTimeout(a){C(this,Ml).clearTimeout(a)}setInterval(a,i){return C(this,Ml).setInterval(a,i)}clearInterval(a){C(this,Ml).clearInterval(a)}},Ml=new WeakMap,Ah=new WeakMap,mg);const da=new Ub;function wb(a){setTimeout(a,0)}const jb=typeof window>"u"||"Deno"in globalThis;function Ue(){}function Hb(a,i){return typeof a=="function"?a(i):a}function Rg(a){return typeof a=="number"&&a>=0&&a!==1/0}function Ag(a,i){return Math.max(a+(i||0)-Date.now(),0)}function Xt(a,i){return typeof a=="function"?a(i):a}function Tv(a,i){const{type:c="all",exact:r,fetchStatus:o,predicate:h,queryKey:m,stale:d}=a;if(m){if(r){if(i.queryHash!==zh(m,i.options))return!1}else if(!Qi(i.queryKey,m))return!1}if(c!=="all"){const v=i.isActive();if(c==="active"&&!v||c==="inactive"&&v)return!1}return!(typeof d=="boolean"&&i.isStale()!==d||o&&o!==i.state.fetchStatus||h&&!h(i))}function Ev(a,i){const{exact:c,status:r,predicate:o,mutationKey:h}=a;if(h){if(!i.options.mutationKey)return!1;if(c){if(Xu(i.options.mutationKey)!==Xu(h))return!1}else if(!Qi(i.options.mutationKey,h))return!1}return!(r&&i.state.status!==r||o&&!o(i))}function zh(a,i){return((i==null?void 0:i.queryKeyHashFn)||Xu)(a)}function Xu(a){return JSON.stringify(a,(i,c)=>uh(c)?Object.keys(c).sort().reduce((r,o)=>(r[o]=c[o],r),{}):c)}function Qi(a,i){if(a===i)return!0;if(typeof a!=typeof i)return!1;if(a&&i&&typeof a=="object"&&typeof i=="object"){if(Array.isArray(a)&&Array.isArray(i)){if(i.length>a.length)return!1;for(let r=0;r500)return i;const r=Ov(a)&&Ov(i);if(!r&&!(uh(a)&&uh(i)))return i;const o=(r?a:Object.keys(a)).length,h=r?i:Object.keys(i),m=h.length,d=r?new Array(m):{};let v=0;for(let S=0;S{da.setTimeout(i,a)})}function sh(a,i,c){return typeof c.structuralSharing=="function"?c.structuralSharing(a,i):c.structuralSharing!==!1?zg(a,i):i}function qb(a,i,c=0){const r=[...a,i];return c&&r.length>c?r.slice(1):r}function Qb(a,i,c=0){const r=[i,...a];return c&&r.length>c?r.slice(0,-1):r}const Nh=Symbol();function Ng(a,i){return!a.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!a.queryFn||a.queryFn===Nh?()=>Promise.reject(new Error(`Missing queryFn: '${a.queryHash}'`)):a.queryFn}function Dg(a,i){return typeof a=="function"?a(...i):!!a}function Yb(a,i,c){let r=!1,o;return Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(o??(o=i()),r||(r=!0,o.aborted?c():o.addEventListener("abort",c,{once:!0})),o)}),a}let Gb=()=>jb;const Dh=()=>Gb();var ns=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(a){return this.listeners.add(a),this.onSubscribe(),()=>{this.listeners.delete(a),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ya,xl,Ai,yg,Vb=(yg=class extends ns{constructor(){super();ct(this,ya);ct(this,xl);ct(this,Ai);W(this,Ai,i=>{if(typeof window<"u"&&window.addEventListener){const c=()=>i();return window.addEventListener("visibilitychange",c,!1),()=>{window.removeEventListener("visibilitychange",c)}}})}onSubscribe(){C(this,xl)||this.setEventListener(C(this,Ai))}onUnsubscribe(){var i;this.hasListeners()||((i=C(this,xl))==null||i.call(this),W(this,xl,void 0))}setEventListener(i){var c;W(this,Ai,i),(c=C(this,xl))==null||c.call(this),W(this,xl,i(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(i){C(this,ya)!==i&&(W(this,ya,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(c=>{c(i)})}isFocused(){var i;return typeof C(this,ya)=="boolean"?C(this,ya):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},ya=new WeakMap,xl=new WeakMap,Ai=new WeakMap,yg);const Mh=new Vb,Xb=wb;function Kb(){let a=[],i=0,c=d=>{d()},r=d=>{d()},o=Xb;const h=d=>{i?a.push(d):o(()=>{c(d)})},m=()=>{const d=a;a=[],d.length&&o(()=>{r(()=>{d.forEach(v=>{c(v)})})})};return{batch:d=>{let v;i++;try{v=d()}finally{i--,i||m()}return v},batchCalls:d=>(...v)=>{h(()=>{d(...v)})},schedule:h,setNotifyFunction:d=>{c=d},setBatchNotifyFunction:d=>{r=d},setScheduler:d=>{o=d}}}const ye=Kb();var zi,Ul,Ni,vg,Zb=(vg=class extends ns{constructor(){super();ct(this,zi,!0);ct(this,Ul);ct(this,Ni);W(this,Ni,i=>{if(typeof window<"u"&&window.addEventListener){const c=()=>i(!0),r=()=>i(!1);return window.addEventListener("online",c,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",c),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Ul)||this.setEventListener(C(this,Ni))}onUnsubscribe(){var i;this.hasListeners()||((i=C(this,Ul))==null||i.call(this),W(this,Ul,void 0))}setEventListener(i){var c;W(this,Ni,i),(c=C(this,Ul))==null||c.call(this),W(this,Ul,i(this.setOnline.bind(this)))}setOnline(i){C(this,zi)!==i&&(W(this,zi,i),this.listeners.forEach(c=>{c(i)}))}isOnline(){return C(this,zi)}},zi=new WeakMap,Ul=new WeakMap,Ni=new WeakMap,vg);const Zc=new Zb;function Jb(a){return Math.min(1e3*2**a,3e4)}function Mg(a){return(a??"online")==="online"?Zc.isOnline():!0}var ch=class extends Error{constructor(a){super("CancelledError"),this.revert=a==null?void 0:a.revert,this.silent=a==null?void 0:a.silent}};function xg(a){let i=!1,c=0,r,o="pending",h,m;const d=new Promise((w,L)=>{h=w,m=L});d.catch(Ue);const v=()=>o!=="pending",S=w=>{var L;if(!v()){const X=new ch(w);D(X),(L=a.onCancel)==null||L.call(a,X)}},b=()=>{i=!0},y=()=>{i=!1},p=()=>Mh.isFocused()&&(a.networkMode==="always"||Zc.isOnline())&&a.canRun(),_=()=>Mg(a.networkMode)&&a.canRun(),E=w=>{v()||(r==null||r(),o="resolved",h(w))},D=w=>{v()||(r==null||r(),o="rejected",m(w))},M=()=>new Promise(w=>{var L;r=X=>{(v()||p())&&w(X)},(L=a.onPause)==null||L.call(a)}).then(()=>{var w;r=void 0,v()||(w=a.onContinue)==null||w.call(a)}),K=()=>{if(v())return;let w;const L=c===0?a.initialPromise:void 0;try{w=L??a.fn()}catch(X){w=Promise.reject(X)}Promise.resolve(w).then(E).catch(X=>{var Q;if(v())return;const Y=a.retry??(Dh()?0:3),G=a.retryDelay??Jb,V=typeof G=="function"?G(c,X):G,F=Y===!0||typeof Y=="number"&&cp()?void 0:M()).then(()=>{i?D(X):K()})})};return{promise:d,status:()=>o,cancel:S,continue:()=>(r==null||r(),d),cancelRetry:b,continueRetry:y,canStart:_,start:()=>(_()?K():M().then(K),d)}}var va,gg,Ug=(gg=class{constructor(){ct(this,va)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rg(this.gcTime)&&W(this,va,da.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(a){this.gcTime=Math.max(this.gcTime||0,a??(Dh()?1/0:3e5))}clearGcTimeout(){C(this,va)!==void 0&&(da.clearTimeout(C(this,va)),W(this,va,void 0))}},va=new WeakMap,gg);function Fb(a){return{onFetch:(i,c)=>{var b,y,p,_,E;const r=i.options,o=(p=(y=(b=i.fetchOptions)==null?void 0:b.meta)==null?void 0:y.fetchMore)==null?void 0:p.direction,h=((_=i.state.data)==null?void 0:_.pages)||[],m=((E=i.state.data)==null?void 0:E.pageParams)||[];let d={pages:[],pageParams:[]},v=0;const S=async()=>{let D=!1;const M=L=>{Yb(L,()=>i.signal,()=>D=!0)},K=Ng(i.options,i.fetchOptions),w=async(L,X,Y)=>{if(D)return Promise.reject(i.signal.reason);if(X==null&&L.pages.length)return Promise.resolve(L);const V=(()=>{const rt={client:i.client,queryKey:i.queryKey,pageParam:X,direction:Y?"backward":"forward",meta:i.options.meta};return M(rt),rt})(),F=await K(V),{maxPages:Q}=i.options,k=Y?Qb:qb;return{pages:k(L.pages,F,Q),pageParams:k(L.pageParams,X,Q)}};if(o&&h.length){const L=o==="backward",X=L?kb:Rv,Y={pages:h,pageParams:m};d=await w(Y,X(r,Y),L)}else{const L=a??h.length;do{const X=v===0?m[0]??r.initialPageParam:Rv(r,d);if(v>0&&X==null)break;d=await w(d,X),v++}while(v{var D,M;return(M=(D=i.options).persister)==null?void 0:M.call(D,S,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},c)}:i.fetchFn=S}}}function Rv(a,{pages:i,pageParams:c}){const r=i.length-1;return i.length>0?a.getNextPageParam(i[r],i,c[r],c):void 0}function kb(a,{pages:i,pageParams:c}){var r;return i.length>0?(r=a.getPreviousPageParam)==null?void 0:r.call(a,i[0],i,c[0],c):void 0}var Di,ga,Mi,en,Sa,ee,Iu,pa,rn,Fn,Sg,Ib=(Sg=class extends Ug{constructor(i){super();ct(this,rn);ct(this,Di);ct(this,ga);ct(this,Mi);ct(this,en);ct(this,Sa);ct(this,ee);ct(this,Iu);ct(this,pa);W(this,pa,!1),W(this,Iu,i.defaultOptions),this.setOptions(i.options),this.observers=[],W(this,Sa,i.client),W(this,en,C(this,Sa).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,W(this,ga,zv(this.options)),this.state=i.state??C(this,ga),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return C(this,Di)}get promise(){var i;return(i=C(this,ee))==null?void 0:i.promise}setOptions(i){if(this.options={...C(this,Iu),...i},i!=null&&i._type&&W(this,Di,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const c=zv(this.options);c.data!==void 0&&(this.setState(Av(c.data,c.dataUpdatedAt)),W(this,ga,c))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,en).remove(this)}setData(i,c){const r=sh(this.state.data,i,this.options);return Ct(this,rn,Fn).call(this,{data:r,type:"success",dataUpdatedAt:c==null?void 0:c.updatedAt,manual:c==null?void 0:c.manual}),r}setState(i){Ct(this,rn,Fn).call(this,{type:"setState",state:i})}cancel(i){var r,o;const c=(r=C(this,ee))==null?void 0:r.promise;return(o=C(this,ee))==null||o.cancel(i),c?c.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return C(this,ga)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>Xt(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>Xt(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!Ag(this.state.dataUpdatedAt,i)}onFocus(){var i,c;(i=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(c=C(this,ee))==null||c.continue()}onOnline(){var i,c;(i=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(c=C(this,ee))==null||c.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),C(this,en).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const c=this.observers.indexOf(i);c!==-1&&(this.observers.splice(c,1),this.observers.length||(C(this,ee)&&(C(this,pa)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?C(this,ee).cancel({revert:!0}):C(this,ee).cancelRetry()),this.scheduleGc()),C(this,en).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ct(this,rn,Fn).call(this,{type:"invalidate"})}async fetch(i,c){var S,b,y,p,_,E,D,M,K,w,L,X;if(this.state.fetchStatus!=="idle"&&((S=C(this,ee))==null?void 0:S.status())!=="rejected"){if(this.state.data!==void 0&&(c!=null&&c.cancelRefetch))this.cancel({silent:!0});else if(C(this,ee))return C(this,ee).continueRetry(),C(this,ee).promise}if(i&&this.setOptions(i),!this.options.queryFn){const Y=this.observers.find(G=>G.options.queryFn);Y&&this.setOptions(Y.options)}const r=new AbortController,o=Y=>{Object.defineProperty(Y,"signal",{enumerable:!0,get:()=>(W(this,pa,!0),r.signal)})},h=()=>{const Y=Ng(this.options,c),V=(()=>{const F={client:C(this,Sa),queryKey:this.queryKey,meta:this.meta};return o(F),F})();return W(this,pa,!1),this.options.persister?this.options.persister(Y,V,this):Y(V)},d=(()=>{const Y={fetchOptions:c,options:this.options,queryKey:this.queryKey,client:C(this,Sa),state:this.state,fetchFn:h};return o(Y),Y})();(b=C(this,Di)==="infinite"?Fb(this.options.pages):this.options.behavior)==null||b.onFetch(d,this),W(this,Mi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=d.fetchOptions)==null?void 0:y.meta))&&Ct(this,rn,Fn).call(this,{type:"fetch",meta:(p=d.fetchOptions)==null?void 0:p.meta});const v=W(this,ee,xg({initialPromise:c==null?void 0:c.initialPromise,fn:d.fetchFn,onCancel:Y=>{Y instanceof ch&&Y.revert&&this.setState({...C(this,Mi),fetchStatus:"idle"}),r.abort()},onFail:(Y,G)=>{Ct(this,rn,Fn).call(this,{type:"failed",failureCount:Y,error:G})},onPause:()=>{Ct(this,rn,Fn).call(this,{type:"pause"})},onContinue:()=>{Ct(this,rn,Fn).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const Y=await v.start();if(Y===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(Y),(E=(_=C(this,en).config).onSuccess)==null||E.call(_,Y,this),(M=(D=C(this,en).config).onSettled)==null||M.call(D,Y,this.state.error,this),Y}catch(Y){if(Y instanceof ch){if(Y.silent)return C(this,ee).promise;if(Y.revert){if(this.state.data===void 0)throw Y;return this.state.data}}throw Ct(this,rn,Fn).call(this,{type:"error",error:Y}),(w=(K=C(this,en).config).onError)==null||w.call(K,Y,this),(X=(L=C(this,en).config).onSettled)==null||X.call(L,this.state.data,Y,this),Y}finally{C(this,ee)===v&&W(this,ee,void 0),this.scheduleGc()}}},Di=new WeakMap,ga=new WeakMap,Mi=new WeakMap,en=new WeakMap,Sa=new WeakMap,ee=new WeakMap,Iu=new WeakMap,pa=new WeakMap,rn=new WeakSet,Fn=function(i){const c=r=>{switch(i.type){case"failed":return{...r,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wg(r.data,this.options),fetchMeta:i.meta??null};case"success":const o={...r,...Av(i.data,i.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return W(this,Mi,i.manual?o:void 0),o;case"error":const h=i.error;return{...r,error:h,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:h,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...i.state}}};this.state=c(this.state),ye.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),C(this,en).notify({query:this,type:"updated",action:i})})},Sg);function wg(a,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mg(i.networkMode)?"fetching":"paused",...a===void 0&&{error:null,status:"pending"}}}function Av(a,i){return{data:a,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zv(a){const i=typeof a.initialData=="function"?a.initialData():a.initialData,c=i!==void 0,r=c?typeof a.initialDataUpdatedAt=="function"?a.initialDataUpdatedAt():a.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:c?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:c?"success":"pending",fetchStatus:"idle"}}var Ee,zt,Pu,Oe,ba,xi,kn,$u,Ui,wi,_a,Ta,wl,ji,Ut,Yu,rh,oh,fh,hh,dh,mh,yh,vh,pg,Pb=(pg=class extends ns{constructor(i,c){super();ct(this,Ut);ct(this,Ee);ct(this,zt);ct(this,Pu);ct(this,Oe);ct(this,ba);ct(this,xi);ct(this,kn);ct(this,$u);ct(this,Ui);ct(this,wi);ct(this,_a);ct(this,Ta);ct(this,wl);ct(this,ji,new Set);this.options=c,W(this,Ee,i),W(this,kn,null),this.bindMethods(),this.setOptions(c)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,zt).addObserver(this),Nv(C(this,zt),this.options)?Ct(this,Ut,Yu).call(this):this.updateResult(),Ct(this,Ut,dh).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return gh(C(this,zt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return gh(C(this,zt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ct(this,Ut,mh).call(this),Ct(this,Ut,yh).call(this),C(this,zt).removeObserver(this)}setOptions(i){const c=this.options,r=C(this,zt);if(this.options=C(this,Ee).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xt(this.options.enabled,C(this,zt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ct(this,Ut,vh).call(this),C(this,zt).setOptions(this.options),c._defaulted&&!Kf(this.options,c)&&C(this,Ee).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,zt),observer:this});const o=this.hasListeners();o&&Dv(C(this,zt),r,this.options,c)&&Ct(this,Ut,Yu).call(this),this.updateResult(),o&&(C(this,zt)!==r||Xt(this.options.enabled,C(this,zt))!==Xt(c.enabled,C(this,zt))||Xt(this.options.staleTime,C(this,zt))!==Xt(c.staleTime,C(this,zt)))&&Ct(this,Ut,oh).call(this);const h=Ct(this,Ut,fh).call(this);o&&(C(this,zt)!==r||Xt(this.options.enabled,C(this,zt))!==Xt(c.enabled,C(this,zt))||h!==C(this,wl))&&Ct(this,Ut,hh).call(this,h)}getOptimisticResult(i){const c=C(this,Ee).getQueryCache().build(C(this,Ee),i),r=this.createResult(c,i);return Kf(this.getCurrentResult(),r)||(W(this,Oe,r),W(this,xi,this.options),W(this,ba,C(this,zt).state)),r}getCurrentResult(){return C(this,Oe)}trackResult(i,c){return new Proxy(i,{get:(r,o)=>(this.trackProp(o),c==null||c(o),Reflect.get(r,o))})}trackProp(i){C(this,ji).add(i)}getCurrentQuery(){return C(this,zt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const c=C(this,Ee).defaultQueryOptions(i),r=C(this,Ee).getQueryCache().build(C(this,Ee),c);let o=()=>{},h;const m=new Promise(d=>{h=d,o=C(this,Ee).getQueryCache().subscribe(v=>{v.type==="updated"&&v.query.queryHash===r.queryHash&&r.state.data!==void 0&&(o(),d(this.createResult(r,c)))})});return Promise.race([r.fetch().then(()=>{const d=this.createResult(r,c);return h==null||h(d),d}).finally(()=>{o()}),m])}fetch(i){return Ct(this,Ut,Yu).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Oe)))}createResult(i,c){var G;const r=C(this,zt),o=this.options,h=C(this,Oe),m=C(this,ba),d=C(this,xi),v=i!==r?i.state:C(this,Pu),{state:S}=i;let b={...S},y=!1,p;if(c._optimisticResults){const V=this.hasListeners(),F=!V&&Nv(i,c),Q=V&&Dv(i,r,c,o);(F||Q)&&(b={...b,...wg(S.data,i.options)}),c._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:_,errorUpdatedAt:E,status:D}=b;p=b.data;let M=!1;if(c.placeholderData!==void 0&&p===void 0&&D==="pending"){let V;h!=null&&h.isPlaceholderData&&c.placeholderData===(d==null?void 0:d.placeholderData)?(V=h.data,M=!0):V=typeof c.placeholderData=="function"?c.placeholderData((G=C(this,wi))==null?void 0:G.state.data,C(this,wi)):c.placeholderData,V!==void 0&&(D="success",p=sh(h==null?void 0:h.data,V,c),y=!0)}if(c.select&&p!==void 0&&!M)if(h&&p===(m==null?void 0:m.data)&&c.select===C(this,$u))p=C(this,Ui);else try{W(this,$u,c.select),p=c.select(p),p=sh(h==null?void 0:h.data,p,c),W(this,Ui,p),W(this,kn,null)}catch(V){W(this,kn,V)}else p===void 0&&W(this,kn,null);C(this,kn)&&(_=C(this,kn),p=C(this,Ui),E=Date.now(),D="error",y=!1);const K=b.fetchStatus==="fetching",w=D==="pending",L=D==="error",X=w&&K,Y=p!==void 0;return{status:D,fetchStatus:b.fetchStatus,isPending:w,isSuccess:D==="success",isError:L,isInitialLoading:X,isLoading:X,data:p,dataUpdatedAt:b.dataUpdatedAt,error:_,errorUpdatedAt:E,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:b.dataUpdateCount>v.dataUpdateCount||b.errorUpdateCount>v.errorUpdateCount,isFetching:K,isRefetching:K&&!w,isLoadingError:L&&!Y,isPaused:b.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:L&&Y,isStale:xh(i,c),refetch:this.refetch,isEnabled:Xt(c.enabled,i)!==!1}}updateResult(){const i=C(this,Oe),c=this.createResult(C(this,zt),this.options);if(W(this,ba,C(this,zt).state),W(this,xi,this.options),C(this,ba).data!==void 0&&W(this,wi,C(this,zt)),Kf(c,i))return;W(this,Oe,c);const o=(()=>{if(!i)return!0;const{notifyOnChangeProps:h}=this.options,m=typeof h=="function"?h():h;if(m==="all"||!m&&!C(this,ji).size)return!0;const d=new Set(m??C(this,ji));return this.options.throwOnError&&d.add("error"),Object.keys(C(this,Oe)).some(v=>{const S=v;return C(this,Oe)[S]!==i[S]&&d.has(S)})})();ye.batch(()=>{o&&this.listeners.forEach(h=>{h(C(this,Oe))}),C(this,Ee).getQueryCache().notify({query:C(this,zt),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ct(this,Ut,dh).call(this)}},Ee=new WeakMap,zt=new WeakMap,Pu=new WeakMap,Oe=new WeakMap,ba=new WeakMap,xi=new WeakMap,kn=new WeakMap,$u=new WeakMap,Ui=new WeakMap,wi=new WeakMap,_a=new WeakMap,Ta=new WeakMap,wl=new WeakMap,ji=new WeakMap,Ut=new WeakSet,Yu=function(i){Ct(this,Ut,vh).call(this);let c=C(this,zt).fetch(this.options,i);return i!=null&&i.throwOnError||(c=c.catch(Ue)),c},rh=function(i){return!Dh()&&Xt(this.options.enabled,C(this,zt))!==!1&&Rg(i)},oh=function(){Ct(this,Ut,mh).call(this);const i=Xt(this.options.staleTime,C(this,zt));if(C(this,Oe).isStale||!Ct(this,Ut,rh).call(this,i))return;const c=Ag(C(this,Oe).dataUpdatedAt,i)+1;W(this,_a,da.setTimeout(()=>{C(this,Oe).isStale||this.updateResult()},c))},fh=function(){return Xt(this.options.refetchInterval,C(this,zt))??!1},hh=function(i){Ct(this,Ut,yh).call(this),W(this,wl,i),!(C(this,wl)===0||!Ct(this,Ut,rh).call(this,C(this,wl)))&&W(this,Ta,da.setInterval(()=>{(this.options.refetchIntervalInBackground||Mh.isFocused())&&Ct(this,Ut,Yu).call(this)},C(this,wl)))},dh=function(){Ct(this,Ut,oh).call(this),Ct(this,Ut,hh).call(this,Ct(this,Ut,fh).call(this))},mh=function(){C(this,_a)!==void 0&&(da.clearTimeout(C(this,_a)),W(this,_a,void 0))},yh=function(){C(this,Ta)!==void 0&&(da.clearInterval(C(this,Ta)),W(this,Ta,void 0))},vh=function(){const i=C(this,Ee).getQueryCache().build(C(this,Ee),this.options);if(i===C(this,zt))return;const c=C(this,zt);W(this,zt,i),W(this,Pu,i.state),this.hasListeners()&&(c==null||c.removeObserver(this),i.addObserver(this))},pg);function $b(a,i){return Xt(i.enabled,a)!==!1&&a.state.data===void 0&&!(a.state.status==="error"&&Xt(i.retryOnMount,a)===!1)}function Nv(a,i){return $b(a,i)||a.state.data!==void 0&&gh(a,i,i.refetchOnMount)}function gh(a,i,c){if(Xt(i.enabled,a)!==!1&&Xt(i.staleTime,a)!=="static"){const r=Xt(c,a);return r==="always"||r!==!1&&xh(a,i)}return!1}function Dv(a,i,c,r){return(a!==i||Xt(r.enabled,a)===!1)&&(!c.suspense||a.state.status!=="error")&&xh(a,c)}function xh(a,i){return Xt(i.enabled,a)!==!1&&a.isStaleByTime(Xt(i.staleTime,a))}var Wu,Cn,ge,Ea,Rn,Nl,bg,Wb=(bg=class extends Ug{constructor(i){super();ct(this,Rn);ct(this,Wu);ct(this,Cn);ct(this,ge);ct(this,Ea);W(this,Wu,i.client),this.mutationId=i.mutationId,W(this,ge,i.mutationCache),W(this,Cn,[]),this.state=i.state||t_(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){C(this,Cn).includes(i)||(C(this,Cn).push(i),this.clearGcTimeout(),C(this,ge).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){W(this,Cn,C(this,Cn).filter(c=>c!==i)),this.scheduleGc(),C(this,ge).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){C(this,Cn).length||(this.state.status==="pending"?this.scheduleGc():C(this,ge).remove(this))}continue(){var i;return((i=C(this,Ea))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var d,v,S,b,y,p,_,E,D,M,K,w,L,X,Y,G,V,F;const c=()=>{Ct(this,Rn,Nl).call(this,{type:"continue"})},r={client:C(this,Wu),meta:this.options.meta,mutationKey:this.options.mutationKey},o=W(this,Ea,xg({fn:()=>this.options.mutationFn?this.options.mutationFn(i,r):Promise.reject(new Error("No mutationFn found")),onFail:(Q,k)=>{Ct(this,Rn,Nl).call(this,{type:"failed",failureCount:Q,error:k})},onPause:()=>{Ct(this,Rn,Nl).call(this,{type:"pause"})},onContinue:c,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,ge).canRun(this)})),h=this.state.status==="pending",m=!o.canStart();try{if(h)c();else{Ct(this,Rn,Nl).call(this,{type:"pending",variables:i,isPaused:m}),C(this,ge).config.onMutate&&await C(this,ge).config.onMutate(i,this,r);const k=await((v=(d=this.options).onMutate)==null?void 0:v.call(d,i,r));k!==this.state.context&&Ct(this,Rn,Nl).call(this,{type:"pending",context:k,variables:i,isPaused:m})}const Q=await o.start();return await((b=(S=C(this,ge).config).onSuccess)==null?void 0:b.call(S,Q,i,this.state.context,this,r)),await((p=(y=this.options).onSuccess)==null?void 0:p.call(y,Q,i,this.state.context,r)),await((E=(_=C(this,ge).config).onSettled)==null?void 0:E.call(_,Q,null,this.state.variables,this.state.context,this,r)),await((M=(D=this.options).onSettled)==null?void 0:M.call(D,Q,null,i,this.state.context,r)),Ct(this,Rn,Nl).call(this,{type:"success",data:Q}),Q}catch(Q){try{await((w=(K=C(this,ge).config).onError)==null?void 0:w.call(K,Q,i,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((X=(L=this.options).onError)==null?void 0:X.call(L,Q,i,this.state.context,r))}catch(k){Promise.reject(k)}try{await((G=(Y=C(this,ge).config).onSettled)==null?void 0:G.call(Y,void 0,Q,this.state.variables,this.state.context,this,r))}catch(k){Promise.reject(k)}try{await((F=(V=this.options).onSettled)==null?void 0:F.call(V,void 0,Q,i,this.state.context,r))}catch(k){Promise.reject(k)}throw Ct(this,Rn,Nl).call(this,{type:"error",error:Q}),Q}finally{C(this,Ea)===o&&W(this,Ea,void 0),C(this,ge).runNext(this)}}},Wu=new WeakMap,Cn=new WeakMap,ge=new WeakMap,Ea=new WeakMap,Rn=new WeakSet,Nl=function(i){const c=r=>{switch(i.type){case"failed":return{...r,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...r,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:i.error,failureCount:r.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=c(this.state),ye.batch(()=>{C(this,Cn).forEach(r=>{r.onMutationUpdate(i)}),C(this,ge).notify({mutation:this,type:"updated",action:i})})},bg);function t_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var In,on,ts,_g,e_=(_g=class extends ns{constructor(i={}){super();ct(this,In);ct(this,on);ct(this,ts);this.config=i,W(this,In,new Set),W(this,on,new Map),W(this,ts,0)}build(i,c,r){const o=new Wb({client:i,mutationCache:this,mutationId:++Uc(this,ts)._,options:i.defaultMutationOptions(c),state:r});return this.add(o),o}add(i){C(this,In).add(i);const c=wc(i);if(typeof c=="string"){const r=C(this,on).get(c);r?r.push(i):C(this,on).set(c,[i])}this.notify({type:"added",mutation:i})}remove(i){if(C(this,In).delete(i)){const c=wc(i);if(typeof c=="string"){const r=C(this,on).get(c);if(r)if(r.length>1){const o=r.indexOf(i);o!==-1&&r.splice(o,1)}else r[0]===i&&C(this,on).delete(c)}}this.notify({type:"removed",mutation:i})}canRun(i){var r;const c=wc(i);if(typeof c=="string"){const o=(r=C(this,on).get(c))==null?void 0:r.find(h=>h.state.status==="pending");return!o||o===i}else return!0}runNext(i){var r,o;const c=wc(i);return typeof c=="string"?((o=(r=C(this,on).get(c))==null?void 0:r.find(h=>h!==i&&h.state.isPaused))==null?void 0:o.continue())??Promise.resolve():Promise.resolve()}clear(){ye.batch(()=>{C(this,In).forEach(i=>{this.notify({type:"removed",mutation:i})}),C(this,In).clear(),C(this,on).clear()})}getAll(){return Array.from(C(this,In))}find(i){const c={exact:!0,...i};return this.getAll().find(r=>Ev(c,r))}findAll(i={}){return this.getAll().filter(c=>Ev(i,c))}notify(i){ye.batch(()=>{this.listeners.forEach(c=>{c(i)})})}resumePausedMutations(){const i=this.getAll().filter(c=>c.state.isPaused);return ye.batch(()=>Promise.all(i.map(c=>c.continue().catch(Ue))))}},In=new WeakMap,on=new WeakMap,ts=new WeakMap,_g);function wc(a){var i;return(i=a.options.scope)==null?void 0:i.id}var An,Tg,n_=(Tg=class extends ns{constructor(i={}){super();ct(this,An);this.config=i,W(this,An,new Map)}build(i,c,r){const o=c.queryKey,h=c.queryHash??zh(o,c);let m=this.get(h);return m||(m=new Ib({client:i,queryKey:o,queryHash:h,options:i.defaultQueryOptions(c),state:r,defaultOptions:i.getQueryDefaults(o)}),this.add(m)),m}add(i){C(this,An).has(i.queryHash)||(C(this,An).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const c=C(this,An).get(i.queryHash);c&&(i.destroy(),c===i&&C(this,An).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){ye.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return C(this,An).get(i)}getAll(){return[...C(this,An).values()]}find(i){const c={exact:!0,...i};return this.getAll().find(r=>Tv(c,r))}findAll(i={}){const c=this.getAll();return Object.keys(i).length>0?c.filter(r=>Tv(i,r)):c}notify(i){ye.batch(()=>{this.listeners.forEach(c=>{c(i)})})}onFocus(){ye.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){ye.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},An=new WeakMap,Tg),Zt,jl,Hl,Hi,Li,Ll,Bi,qi,Eg,l_=(Eg=class{constructor(a={}){ct(this,Zt);ct(this,jl);ct(this,Hl);ct(this,Hi);ct(this,Li);ct(this,Ll);ct(this,Bi);ct(this,qi);W(this,Zt,a.queryCache||new n_),W(this,jl,a.mutationCache||new e_),W(this,Hl,a.defaultOptions||{}),W(this,Hi,new Map),W(this,Li,new Map),W(this,Ll,0)}mount(){Uc(this,Ll)._++,C(this,Ll)===1&&(W(this,Bi,Mh.subscribe(async a=>{a&&(await this.resumePausedMutations(),C(this,Zt).onFocus())})),W(this,qi,Zc.subscribe(async a=>{a&&(await this.resumePausedMutations(),C(this,Zt).onOnline())})))}unmount(){var a,i;Uc(this,Ll)._--,C(this,Ll)===0&&((a=C(this,Bi))==null||a.call(this),W(this,Bi,void 0),(i=C(this,qi))==null||i.call(this),W(this,qi,void 0))}isFetching(a){return C(this,Zt).findAll({...a,fetchStatus:"fetching"}).length}isMutating(a){return C(this,jl).findAll({...a,status:"pending"}).length}getQueryData(a){var c;const i=this.defaultQueryOptions({queryKey:a});return(c=C(this,Zt).get(i.queryHash))==null?void 0:c.state.data}ensureQueryData(a){const i=this.defaultQueryOptions(a),c=C(this,Zt).build(this,i),r=c.state.data;return r===void 0?this.fetchQuery(a):(a.revalidateIfStale&&c.isStaleByTime(Xt(i.staleTime,c))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(a){return C(this,Zt).findAll(a).map(({queryKey:i,state:c})=>[i,c.data])}setQueryData(a,i,c){var m;const r=this.defaultQueryOptions({queryKey:a}),o=(m=C(this,Zt).get(r.queryHash))==null?void 0:m.state.data,h=Hb(i,o);if(h!==void 0)return C(this,Zt).build(this,r).setData(h,{...c,manual:!0})}setQueriesData(a,i,c){return ye.batch(()=>C(this,Zt).findAll(a).map(({queryKey:r})=>[r,this.setQueryData(r,i,c)]))}getQueryState(a){var c;const i=this.defaultQueryOptions({queryKey:a});return(c=C(this,Zt).get(i.queryHash))==null?void 0:c.state}removeQueries(a){const i=C(this,Zt);ye.batch(()=>{i.findAll(a).forEach(c=>{i.remove(c)})})}resetQueries(a,i){const c=C(this,Zt);return ye.batch(()=>{const r=c.findAll(a),o=new Set(r);return r.forEach(h=>{h.reset()}),this.refetchQueries({type:"active",predicate:h=>o.has(h)},i)})}cancelQueries(a,i={}){const c={revert:!0,...i},r=ye.batch(()=>C(this,Zt).findAll(a).map(o=>o.cancel(c)));return Promise.all(r).then(Ue).catch(Ue)}invalidateQueries(a,i={}){return ye.batch(()=>(C(this,Zt).findAll(a).forEach(c=>{c.invalidate()}),(a==null?void 0:a.refetchType)==="none"?Promise.resolve():this.refetchQueries({...a,type:(a==null?void 0:a.refetchType)??(a==null?void 0:a.type)??"active"},i)))}refetchQueries(a,i={}){const c={...i,cancelRefetch:i.cancelRefetch??!0},r=ye.batch(()=>C(this,Zt).findAll(a).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let h=o.fetch(void 0,c);return c.throwOnError||(h=h.catch(Ue)),o.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(r).then(Ue)}async query(a){const i=this.defaultQueryOptions(a);i.retry===void 0&&(i.retry=!1);const c=C(this,Zt).build(this,i),r=c.isStaleByTime(Xt(i.staleTime,c))?await c.fetch(i):c.state.data,o=i.select;return o?o(r):r}fetchQuery(a){const i=this.defaultQueryOptions(a);i.retry===void 0&&(i.retry=!1);const c=C(this,Zt).build(this,i);return c.isStaleByTime(Xt(i.staleTime,c))?c.fetch(i):Promise.resolve(c.state.data)}prefetchQuery(a){return this.fetchQuery(a).then(Ue).catch(Ue)}infiniteQuery(a){return a._type="infinite",this.query(a)}fetchInfiniteQuery(a){return a._type="infinite",this.fetchQuery(a)}prefetchInfiniteQuery(a){return this.fetchInfiniteQuery(a).then(Ue).catch(Ue)}ensureInfiniteQueryData(a){return a._type="infinite",this.ensureQueryData(a)}resumePausedMutations(){return Zc.isOnline()?C(this,jl).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Zt)}getMutationCache(){return C(this,jl)}getDefaultOptions(){return C(this,Hl)}setDefaultOptions(a){W(this,Hl,a)}setQueryDefaults(a,i){C(this,Hi).set(Xu(a),{queryKey:a,defaultOptions:i})}getQueryDefaults(a){const i=[...C(this,Hi).values()],c={};return i.forEach(r=>{Qi(a,r.queryKey)&&Object.assign(c,r.defaultOptions)}),c}setMutationDefaults(a,i){C(this,Li).set(Xu(a),{mutationKey:a,defaultOptions:i})}getMutationDefaults(a){const i=[...C(this,Li).values()],c={};return i.forEach(r=>{Qi(a,r.mutationKey)&&Object.assign(c,r.defaultOptions)}),c}defaultQueryOptions(a){if(a._defaulted)return a;const i={...C(this,Hl).queries,...this.getQueryDefaults(a.queryKey),...a,_defaulted:!0};return i.queryHash||(i.queryHash=zh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Nh&&(i.enabled=!1),i}defaultMutationOptions(a){return a!=null&&a._defaulted?a:{...C(this,Hl).mutations,...(a==null?void 0:a.mutationKey)&&this.getMutationDefaults(a.mutationKey),...a,_defaulted:!0}}clear(){C(this,Zt).clear(),C(this,jl).clear()}},Zt=new WeakMap,jl=new WeakMap,Hl=new WeakMap,Hi=new WeakMap,Li=new WeakMap,Ll=new WeakMap,Bi=new WeakMap,qi=new WeakMap,Eg);const jg=tt.createContext(!1),a_=()=>tt.useContext(jg);jg.Provider;function i_(){let a=!1;return{clearReset:()=>{a=!1},reset:()=>{a=!0},isReset:()=>a}}const u_=tt.createContext(i_()),s_=()=>tt.useContext(u_),c_=(a,i,c)=>{const r=c!=null&&c.state.error&&typeof a.throwOnError=="function"?Dg(a.throwOnError,[c.state.error,c]):a.throwOnError;(a.suspense||r)&&(i.isReset()||(a.retryOnMount=!1))},r_=a=>{tt.useEffect(()=>{a.clearReset()},[a])},o_=({result:a,errorResetBoundary:i,throwOnError:c,query:r,suspense:o})=>a.isError&&!i.isReset()&&!a.isFetching&&r&&(o&&a.data===void 0||Dg(c,[a.error,r])),f_=a=>{if(a.suspense){const c=o=>o==="static"?o:Math.max(o??1e3,1e3),r=a.staleTime;a.staleTime=typeof r=="function"?(...o)=>c(r(...o)):c(r),typeof a.gcTime=="number"&&(a.gcTime=Math.max(a.gcTime,1e3))}},h_=(a,i)=>(a==null?void 0:a.suspense)&&i.isPending,d_=(a,i,c)=>i.fetchOptimistic(a).catch(()=>{c.clearReset()});function m_(a,i,c){const r=a_(),o=s_(),h=Cg(),m=h.defaultQueryOptions(a),d=h.getQueryCache().get(m.queryHash),v=a.subscribed!==!1;m._optimisticResults=r?"isRestoring":v?"optimistic":void 0,f_(m),c_(m,o,d),r_(o);const[S]=tt.useState(()=>new i(h,m)),b=S.getOptimisticResult(m),y=!r&&v;if(tt.useSyncExternalStore(tt.useCallback(p=>{const _=y?S.subscribe(ye.batchCalls(p)):Ue;return S.updateResult(),_},[S,y]),()=>S.getCurrentResult(),()=>S.getCurrentResult()),tt.useEffect(()=>{S.setOptions(m)},[m,S]),h_(m,b))throw d_(m,S,o);if(o_({result:b,errorResetBoundary:o,throwOnError:m.throwOnError,query:d,suspense:m.suspense}))throw b.error;return m.notifyOnChangeProps?b:S.trackResult(b)}function Uh(a,i){return m_(a,Pb)}const Mv=!1;var Hg=tt.useLayoutEffect;function Yl(a){return a[a.length-1]}function Lg(a,i){return typeof a=="function"?a(i):a}const wh=Object.prototype.hasOwnProperty;function Bg(a){for(const i in a)if(wh.call(a,i))return!0;return!1}const Yc=()=>Object.create(null),pi=(a,i)=>ql(a,i,!0);function ql(a,i,c,r=0){if(a===i)return a;if(r++>500)return i;const o=Array.isArray(a)&&Array.isArray(i);if(!o&&!(Jc(a)&&Jc(i)))return i;const h=Object.keys(a),m=h.length,d=Object.keys(i),v=d.length;if(o?m!==a.length||v!==i.length||m&&Yl(h)!==`${m-1}`||v&&Yl(d)!==`${v-1}`:m!==Object.getOwnPropertyNames(a).length||v!==Object.getOwnPropertyNames(i).length||Object.getOwnPropertySymbols(i).length)return i;let S=0,b,y,p;if(o){for(;SS&&(b=i[p],b=y===b?y:typeof y=="object"?ql(y,b,c,r):b),_[p]=E`{}]/g;function v_(a){return a.replace(y_,i=>"%"+i.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function xv(a){let i;try{i=decodeURI(a)}catch{i=a.replaceAll(/%[0-9A-F]{2}/gi,c=>{try{return decodeURI(c)}catch{return c}})}return v_(i)}const g_=["http:","https:","mailto:","tel:"];function Ku(a){var i,c;if(a[0]!=="/"&&a.includes(":"))return(c=(i=/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(a))==null?void 0:i[1])==null?void 0:c.replace(/[\t\n\r]/g,"").toLowerCase()}const qg=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Qg(a,i){if(!a)return!1;if(qg.test(a))return!0;const c=Ku(a);return c?!i.has(c):!1}function Bu(a){if(!a)return a;let i=a;if(/[%\\\x00-\x1f\x7f]/.test(a)){const c=/%25|%5C/gi;let r=0,o;for(i="";(o=c.exec(a))!==null;)i+=xv(a.slice(r,o.index))+o[0],r=c.lastIndex;i+=xv(r?a.slice(r):a)}return i}function S_(a){return/[\s\u0080-\uFFFF]/.test(a)?a.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):a}function p_(a,i){if(a===i)return!0;if(a.length!==i.length)return!1;for(let c=0;c1&&a[i-1]==="/"?a.replace(/\/+$/,""):a}function Gg(a){return zn(Yg(a))}function Uv(a,i){return a!=null&&a.endsWith("/")&&a!=="/"&&a!==`${i}/`?a.slice(0,-1):a}function wv(a,i,c="never",r){if(i.includes("//")&&(i=Ei(i)),i.startsWith("/"))return i.length===1||c==="preserve"?i:c==="always"?i.endsWith("/")?i:`${i}/`:i.endsWith("/")?i.slice(0,-1):i;const o=i===".";let h;if(r){h=o?a:a+"\0"+i;const S=r.get(h);if(S)return S}let m;if(o)m=a.split("/");else{for(a.includes("//")&&(a=Ei(a)),m=a.split("/");m.length>1&&Yl(m)==="";)m.pop();const S=i.split("/");for(let b=0,y=S.length;b1?m.pop():m=[""]:p==="."||m.push(p)}}m.length>1&&(Yl(m)===""?c==="never"&&m.pop():c==="always"&&m.push(""));const d=m.join("/"),v=(o?Ei(d):d)||"/";return h&&r&&r.set(h,v),v}function b_(a){const i=new Map(a.map(r=>[encodeURIComponent(r),r])),c=new RegExp([...i.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(c,o=>i.get(o)??o)}function __(a){return a==null||a===""}function T_(a,i,c){if(typeof i!="string")return""+(i??void 0);const r=a==="_splat";if(r&&(!i||/^[a-zA-Z0-9\-._~!/]*$/.test(i)))return i;let o=encodeURIComponent(i);return r&&(o=o.replaceAll("%2F","/")),c?c(o):o}function jv(a,i,c,r,o){const h=a.endsWith("/")?"/":"";let m="";for(const d of i){if(typeof d=="string"){m+=d;continue}const[v,S,b,y]=d,p=v===2,_=p&&y!==void 0?y+h:y;let E=c[S];if(!(v===3&&E==null)){if(o&&(o[S]=E,p&&(o["*"]=E)),p&&__(E)){if(b==="/"&&!_)continue;E=""}m+=b+T_(S,E,r)+(_||"")}}return m+h||"/"}function Yi(a){return(a==null?void 0:a.isNotFound)===!0}function E_(){try{return sessionStorage}catch{return}}const O_="tsr-scroll-restoration-v1_3",Oi=E_();function C_(){try{return JSON.parse((Oi==null?void 0:Oi.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function R_(){try{Oi==null||Oi.setItem(O_,JSON.stringify(Dl))}catch{}}const Dl=C_(),Hv="data-scroll-restoration-id",A_=a=>a.state.__TSR_key||a.href;function z_(a){const i=a.getAttribute(Hv);if(i)return`[${Hv}="${i}"]`;let c="",r=a,o;for(;o=r.parentNode;){let h=1,m=r;for(;m=m.previousElementSibling;)h++;const d=`${r.localName}:nth-child(${h})`;c=c?`${d} > ${c}`:d,r=o}return c}let jc=!1;const Gc="window";function Sh(a){try{return typeof a=="function"?a():document.querySelector(a)}catch{}}function Lv(a){const i=new Set;for(const c of a){if(c===Gc)continue;const r=Sh(c);r&&i.add(r)}return i}function N_(a,i){const c=a.options.scrollRestoration,r=a._scroll;c&&(r.restoring=!0);const o=a.options.getScrollRestorationKey||A_,h=new Set,m=d=>{const v=Dl[d]||(Dl[d]={});for(const S of h)S===document?v[Gc]={scrollX,scrollY}:S.isConnected&&(v[z_(S)]={scrollX:S.scrollLeft,scrollY:S.scrollTop})};c&&!r.restoration&&(r.restoration=!0,jc=!1,history.scrollRestoration="manual",document.addEventListener("scroll",d=>{jc||h.add(d.target)},!0),a.subscribe("onBeforeLoad",d=>{d.fromLocation&&m(o(d.fromLocation)),h.clear()}),addEventListener("pagehide",()=>{m(o(a.stores.resolvedLocation.get()??a.stores.location.get())),R_()})),!r.reset&&(r.reset=!0,a.subscribe("onRendered",d=>{var D;const v=a.options.scrollRestorationBehavior,S=a.options.scrollToTopSelectors,b=r.next,y=r.hash;let p;if(h.clear(),r.next=!0,r.hash=!1,typeof a.options.scrollRestoration=="function"&&!a.options.scrollRestoration({location:a.latestLocation}))return;const _=o(d.toLocation),E=d.fromLocation&&o(d.fromLocation);if(r.restoring&&E&&E!==_){const M=Dl[E];if(M){let K=Dl[_];for(const w in M){if(w===Gc){if(b)continue}else{const L=Sh(w);if(!L||b&&S&&(p??(p=Lv(S)),p.has(L)))continue}K||(K=Dl[_]={}),K[w]??(K[w]=M[w])}}}jc=!0;try{const M=d.toLocation.hash,K=d.toLocation.state.__hashScrollIntoViewOptions??!0;let w=!1;if(b){!M&&S&&(p??(p=Lv(S)));const L=M&&K&&y,X=r.restoring?Dl[_]:void 0;if(X)for(const Y in X){const{scrollX:G,scrollY:V}=X[Y];if(Y===Gc){if(L)continue;scrollTo({top:V,left:G,behavior:v}),w=!0}else{const F=Sh(Y);F&&(F.scrollLeft=G,F.scrollTop=V,p==null||p.delete(F))}}if(!M){const Y={top:0,left:0,behavior:v};if(w||scrollTo(Y),p)for(const G of p)G.scrollTo(Y)}}!w&&M&&K&&((D=document.getElementById(M))==null||D.scrollIntoView(K))}finally{jc=!1}}))}function D_(a,i=String){let c;for(const r in a){const o=a[r];o!==void 0&&(c||(c=new URLSearchParams)).set(r,i(o))}return c?c.toString():""}function Zf(a){return a?a==="false"?!1:a==="true"?!0:+a*0===0&&+a+""===a?+a:a:""}function M_(a){const i=new URLSearchParams(a),c=Object.create(null);for(const[r,o]of i.entries()){const h=c[r];h==null?c[r]=Zf(o):Array.isArray(h)?h.push(Zf(o)):c[r]=[h,Zf(o)]}return c}const Vg=/^(?:\s|["[{\d-]|fa|nu|tr)/,x_=w_(JSON.parse),U_=j_(JSON.stringify,JSON.parse);function w_(a){const i=a===JSON.parse;return c=>{c[0]==="?"&&(c=c.substring(1));const r=M_(c);for(const o in r){const h=r[o];if(typeof h=="string"){if(i&&!Vg.test(h))continue;try{r[o]=a(h)}catch{}}}return r}}function j_(a,i){const c=i===JSON.parse;function r(o){if(o&&typeof o=="object")try{return a(o)}catch{}else if(i&&typeof o=="string"){if(c&&!Vg.test(o))return o;try{return i(o),a(o)}catch{}}return o}return o=>{const h=D_(o,r);return h?`?${h}`:""}}const Ci="__root__";function H_(a){a.statusCode=a.statusCode||a.code||307;const i=new Headers(a.headers);a.href&&i.get("Location")===null&&i.set("Location",a.href);const c=new Response(null,{status:a.statusCode,headers:i});if(c.options=a,a.throw)throw c;return c}function Xg(a){return a instanceof Response&&!!a.options}function Fc(a){const i=new Map;let c,r;return{get(o){const h=i.get(o);if(h)return h.visited=!0,h.value},set(o,h){const m=i.get(o);if(m){m.value=h;return}if(i.size>=a){let v=c==null?void 0:c.next().value;for(;!v||v.visited;)v?v.visited=!1:c=i.values(),v=c.next().value;v===r&&(c=void 0),i.delete(v.key)}const d={key:o,value:h,visited:!1};r=d,i.set(o,d)},clear(){i.clear(),c=void 0,r=void 0}}}const Bl=4,Kg=5;function L_(a){const i=a.names;if(i)return i;const c=[];for(const r of a)typeof r!="string"&&c.push(r[1]);return a.names=c}function B_(a,i,c){const r=a.substring(i,c);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.substring(1),"",""];const o=r.indexOf("{");if(o>=0){const h=r.indexOf("}",o),m=r.charCodeAt(o+1)===45,d=o+(m?3:2);if(h>=0&&r.charCodeAt(d-1)===36&&(!m||d!mt.parse&&mt.caseSensitive===rt&&mt.prefix===Q&&mt.suffix===k);if(bt)V=bt;else{const mt=ma(r,F,rt,Q,k);V=mt,ft.push(mt),ft.length===2&&(o==null||o.push(ft))}}r=V}_&&E=0;G--){const V=y.wildcard[G],{prefix:F,suffix:Q}=V;if(!(F&&(L||!(V.caseSensitive?X:Y??(Y=X.toLowerCase())).startsWith(F)))){if(Q){if(L)continue;const k=i.slice(p).join("/"),rt=k.slice(-Q.length);if((V.caseSensitive?rt:rt.toLowerCase())!==Q||k.length-Q.length=0;V--){const F=y.optional[V];d.push({node:F,index:p,skipped:G,statics:E,dynamics:D,optionals:M,extract:K,rawParams:w})}if(!L)for(let V=y.optional.length-1;V>=0;V--){const F=y.optional[V],{prefix:Q,suffix:k}=F;if(Q||k){const rt=F.caseSensitive?X:Y??(Y=X.toLowerCase());if(Q&&!rt.startsWith(Q)||k&&rt.indexOf(k,rt.length-k.length)=0;G--){const V=y.dynamic[G],{prefix:F,suffix:Q}=V;if(F||Q){const k=V.caseSensitive?X:Y??(Y=X.toLowerCase());if(F&&!k.startsWith(F)||Q&&k.indexOf(Q,k.length-Q.length)=0;G--){const V=y.pathless[G];d.push({node:V,index:p,skipped:_,statics:E,dynamics:D,optionals:M,extract:K,rawParams:w})}}if(S)return S;if(r&&v){let b=v.index;for(let p=0;pa.statics||i.statics===a.statics&&(i.dynamics>a.dynamics||i.dynamics===a.dynamics&&(i.optionals>a.optionals||i.optionals===a.optionals&&((i.node.kind===Bl)>(a.node.kind===Bl)||i.node.kind===Bl==(a.node.kind===Bl)&&i.node.depth>a.node.depth))):!0}function J_(a,i,c){const r=Gg(a),o=`/${r}`,h=i?o:o.toLowerCase(),m=`${h}/`,d={input:({url:v})=>{const S=i?v.pathname:v.pathname.toLowerCase();return S===h?v.pathname="/":S.startsWith(m)&&(v.pathname=v.pathname.slice(o.length)),v},output:({url:v})=>(v.pathname=Ei(`/${r}${v.pathname}`),v)};return c?{input:({url:v})=>ph(c,d.input({url:v})),output:({url:v})=>d.output({url:kg(c,v)})}:d}function ph(a,i){var r;const c=(r=a==null?void 0:a.input)==null?void 0:r.call(a,{url:i});if(c){if(typeof c=="string")return new URL(c);if(c instanceof URL)return c}return i}function kg(a,i){var r;const c=(r=a==null?void 0:a.output)==null?void 0:r.call(a,{url:i});if(c){if(typeof c=="string")return new URL(c);if(c instanceof URL)return c}return i}function F_(a,i){const{createMutableStore:c,createReadonlyStore:r,batch:o}=i,h=new Map,m=c("idle"),d=c(a),v=c(void 0),S=c([]),b=r(()=>S.get().map(D=>h.get(D).get())),y=r(()=>({status:m.get(),isLoading:m.get()==="pending",matches:b.get(),location:d.get(),resolvedLocation:v.get()}));function p(D){let M=h.get(D);return M||(M=c(void 0),h.set(D,M)),M}const _={status:m,location:d,resolvedLocation:v,ids:S,matches:b,byRoute:h,__store:y,getMatchStore:p,setMatches:E};function E(D){const M=S.get(),K=D.map(w=>w.routeId);o(()=>{p_(M,K)||S.set(K);for(const w of M)K.includes(w)||h.get(w).set(()=>{});for(const w of D){const L=p(w.routeId);L.get()!==w&&L.set(w)}})}return _}var Ql="__TSR_index",qv="popstate",Qv="beforeunload",k_=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Vc(a){const i=k_.exec(a);return i?"/"+a.slice(i[0].length):a}function Ig(a){return/[\x00-\x1f\x7f]/.test(a)&&(a=a.replace(/[\x00-\x1f\x7f]/g,i=>` \r`.includes(i)?"":encodeURIComponent(i))),Vc(a)}function I_(a){let i=a.getLocation();const c=new Set,r=m=>{i=a.getLocation(),c.forEach(d=>d({location:i,action:m}))},o=m=>{a.notifyOnIndexChange??!0?r(m):i=a.getLocation()},h=async({task:m,navigateOpts:d,...v})=>{var y,p;if((d==null?void 0:d.ignoreBlocker)??!1){m();return}const S=((y=a.getBlockers)==null?void 0:y.call(a))??[],b=v.type==="PUSH"||v.type==="REPLACE";if(typeof document<"u"&&S.length&&b)for(const _ of S){const E=kc(v.path,v.state);if(await _.blockerFn({currentLocation:i,nextLocation:E,action:v.type})){(p=a.onBlocked)==null||p.call(a);return}}m()};return{get location(){return i},get length(){return a.getLength()},subscribers:c,subscribe:m=>(c.add(m),()=>{c.delete(m)}),push:(m,d,v)=>{const S=i.state[Ql];d=Yv(S+1,d),h({task:()=>{a.pushState(m,d),r({type:"PUSH"})},navigateOpts:v,type:"PUSH",path:m,state:d})},replace:(m,d,v)=>{const S=i.state[Ql];d=Yv(S,d),h({task:()=>{a.replaceState(m,d),r({type:"REPLACE"})},navigateOpts:v,type:"REPLACE",path:m,state:d})},go:(m,d)=>{h({task:()=>{a.go(m,(d==null?void 0:d.ignoreBlocker)??!1),o({type:"GO",index:m})},navigateOpts:d,type:"GO"})},back:m=>{h({task:()=>{a.back((m==null?void 0:m.ignoreBlocker)??!1),o({type:"BACK"})},navigateOpts:m,type:"BACK"})},forward:m=>{h({task:()=>{a.forward((m==null?void 0:m.ignoreBlocker)??!1),o({type:"FORWARD"})},navigateOpts:m,type:"FORWARD"})},canGoBack:()=>i.state[Ql]!==0,createHref:m=>a.createHref(m),block:m=>{var v;if(!a.setBlockers)return()=>{};const d=((v=a.getBlockers)==null?void 0:v.call(a))??[];return a.setBlockers([...d,m]),()=>{var b,y;const S=((b=a.getBlockers)==null?void 0:b.call(a))??[];(y=a.setBlockers)==null||y.call(a,S.filter(p=>p!==m))}},flush:()=>{var m;return(m=a.flush)==null?void 0:m.call(a)},destroy:()=>{var m;return(m=a.destroy)==null?void 0:m.call(a)},notify:r,_getBlockers:()=>{var m;return((m=a.getBlockers)==null?void 0:m.call(a))??[]}}}function Yv(a,i){const c=Lh();return{...i,key:c,__TSR_key:c,[Ql]:a}}function P_(a){var V,F;const i=typeof document<"u"?window:void 0,c=i.history.pushState,r=i.history.replaceState;let o=[];const h=()=>o,m=Q=>o=Q,d=Q=>Ig(Q),v=(()=>kc(`${i.location.pathname}${i.location.search}${i.location.hash}`,i.history.state));if(!((V=i.history.state)!=null&&V.__TSR_key)&&!((F=i.history.state)!=null&&F.key)){const Q=Lh();i.history.replaceState({[Ql]:0,key:Q,__TSR_key:Q},"")}let S=v(),b,y=!1,p=!1,_=!1,E=!1;const D=()=>S;let M;const K=()=>{M&&(G._ignoreSubscribers=!0,(M[2]?i.history.pushState:i.history.replaceState)(M[1],"",M[0]),G._ignoreSubscribers=!1,M=void 0,b=void 0)},w=(Q,k,rt)=>{const ft=!!M;ft||(b=S),S=kc(k,rt),M=[S.href,rt,(M==null?void 0:M[2])||Q],ft||queueMicrotask(()=>K())},L=Q=>{S=v(),G.notify({type:Q})},X=async()=>{if(E=!1,p){p=!1;return}const Q=v(),k=Q.state[Ql]-S.state[Ql],rt=k===1,ft=k===-1,bt=!rt&&!ft||y;y=!1;const mt=bt?"GO":ft?"BACK":"FORWARD",st=bt?{type:"GO",index:k}:{type:ft?"BACK":"FORWARD"};if(_)_=!1;else{const Z=h();if(typeof document<"u"&&Z.length){for(const $ of Z)if(await $.blockerFn({currentLocation:S,nextLocation:Q,action:mt})){p=!0,i.history.go(-k),G.notify(st);return}}}S=v(),G.notify(st)},Y=Q=>{if(E){E=!1;return}let k=!1;const rt=h();if(typeof document<"u"&&rt.length)for(const ft of rt){const bt=ft.enableBeforeUnload??!0;if(bt===!0){k=!0;break}if(typeof bt=="function"&&bt()===!0){k=!0;break}}if(k)return Q.preventDefault(),Q.returnValue=""},G=I_({getLocation:D,getLength:()=>i.history.length,pushState:(Q,k)=>w(!0,Q,k),replaceState:(Q,k)=>w(!1,Q,k),back:Q=>(Q&&(_=!0,E=!0),i.history.back()),forward:Q=>{Q&&(_=!0,E=!0),i.history.forward()},go:(Q,k)=>{y=!0,k&&(_=!0,E=!0),i.history.go(Q)},createHref:Q=>d(Q),flush:K,destroy:()=>{i.history.pushState=c,i.history.replaceState=r,i.removeEventListener(Qv,Y,{capture:!0}),i.removeEventListener(qv,X)},onBlocked:()=>{b&&S!==b&&(S=b)},getBlockers:h,setBlockers:m,notifyOnIndexChange:!1});return G._ignoreNextBeforeUnload=Q=>{E=!1;try{Q=new URL(Q,i.document.baseURI).href,E=/^https?:/.test(Q)&&(!Q.includes("#")||Q.split("#")[0]!==i.location.href.split("#")[0])}catch{}},i.addEventListener(Qv,Y,{capture:!0}),i.addEventListener(qv,X),i.history.pushState=function(...Q){const k=c.apply(i.history,Q);return G._ignoreSubscribers||L("PUSH"),k},i.history.replaceState=function(...Q){const k=r.apply(i.history,Q);return G._ignoreSubscribers||L("REPLACE"),k},G}function kc(a,i){const c=Ig(a),r=c.indexOf("#"),o=c.indexOf("?");if(!i){const h=Lh();i={[Ql]:0,key:h,__TSR_key:h}}return{href:c,pathname:c.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:c.length),hash:r>-1?c.substring(r):"",search:o>-1?c.slice(o,r===-1?void 0:r):"",state:i}}function Lh(){return(Math.random()+1).toString(36).substring(7)}function Jf(a,i){return a.protocol!=="http:"&&a.protocol!=="https:"||a.origin!==i||!!a.username||!!a.password}function Ff(a){return a.pathname+a.search+a.hash}function Gv(a){var i,c;return a.options.loader||a.options.beforeLoad||a.lazyFn||((i=a.options.component)==null?void 0:i.preload)||((c=a.options.pendingComponent)==null?void 0:c.preload)}function Wc(a,i){return{fromLocation:i,toLocation:a,pathChanged:(i==null?void 0:i.pathname)!==a.pathname,hrefChanged:(i==null?void 0:i.href)!==a.href,hashChanged:(i==null?void 0:i.hash)!==a.hash}}function Vv({key:a,__TSR_key:i,__TSR_index:c,__hashScrollIntoViewOptions:r,...o}){return o}function $_(a){return a.findIndex(i=>i.status==="error"||i.status==="notFound"||i._notFound)+1}function W_(a,i,c,r,o,h){var m,d,v,S;r&&(i=i.slice(0,r)),o&&(c=c.slice(0,o));for(const b of i){if(h&&a._tx!==h)return;c.some(y=>y.routeId===b.routeId)||(d=(m=a.routesById[b.routeId].options).onLeave)==null||d.call(m,b)}for(const b of c){if(h&&a._tx!==h)return;(S=(v=a.routesById[b.routeId].options)[i.some(y=>y.routeId===b.routeId)?"onStay":"onEnter"])==null||S.call(v,b)}}var tT=class{constructor(a,i){var c;this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async r=>(r(),!1),this.update=r=>{const o=this.options;this.options={...o,...r},this.isServer=this.options.isServer??Mv??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=P_()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const h=this.options.basepath??"/",m=this.options.rewrite,d=this.basepath!==h||(o==null?void 0:o.rewrite)!==m||(o==null?void 0:o.caseSensitive)!==this.options.caseSensitive;if(d&&(this.basepath=h,this.rewrite=h!=="/"&&Gg(h)?J_(h,this.options.caseSensitive,m):m),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Mv){this.routeTree=this.options.routeTree;let v;v=this.buildRouteTree(),this.setRoutes(v)}if(this.stores)d&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=F_(this.latestLocation,v),N_(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const r=V_(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&q_(this.options.routeMasks,r.processedTree),{...r,resolvePathCache:Fc(1e3)}},this.subscribe=(r,o)=>{const h={eventType:r,fn:o};return this.subscribers.add(h),()=>{this.subscribers.delete(h)}},this.emit=r=>{for(const o of this.subscribers)if(o.eventType===r.type)try{o.fn(r)}catch(h){console.error(h)}},this.parseLocation=(r,o)=>{const h=({pathname:S,search:b,hash:y,href:p},_)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(S)){const K=this.options.parseSearch(b),w=this.options.stringifySearch(K);return{href:S+w+y,publicHref:S+w+y,pathname:Bu(S),external:!1,searchStr:w,search:pi(o==null?void 0:o.search,K),hash:Bu(y.slice(1)),state:ql(o==null?void 0:o.state,_)}}const E=ph(this.rewrite,new URL(p,this.origin)),D=this.options.parseSearch(E.search),M=this.options.stringifySearch(D);return E.search=M,{href:E.href.replace(E.origin,""),publicHref:p,pathname:Bu(Vc(E.pathname)),external:!!this.rewrite&&Jf(E,this.origin),searchStr:M,search:pi(o==null?void 0:o.search,D),hash:Bu(E.hash.slice(1)),state:ql(o==null?void 0:o.state,_)}},m=h(r,r.state),{__tempLocation:d,__tempKey:v}=m.state;if(d&&(!v||v===this.tempLocationKey)){const S=h(d,{...d.state,__tempLocation:void 0,key:m.state.key,__TSR_key:m.state.__TSR_key});return S.maskedLocation=m,S}return m},this.matchRoutes=(r,o,h)=>typeof r=="string"?this.matchRoutesInternal({pathname:r,search:o},h):this.matchRoutesInternal(r,o),this.getMatchedRoutes=r=>{const o=Object.create(null),h=G_(zn(r),this.processedTree,!0);return h&&Object.assign(o,h.rawParams),[(h==null?void 0:h.branch)||[this.routesById.__root__],o,h==null?void 0:h.route]},this.buildLocation=r=>{{const d=this.staticLocations.get(r);if(d)return d}let o=!1;const h=(d={})=>{var st;if(d.href){const Z=kc(d.href,{});d={...d,to:ph(this.rewrite,new URL(Z.pathname,this.origin)).pathname,search:this.options.parseSearch(Z.search),hash:Z.hash.slice(1)}}const v=d._fromLocation||this._pendingLocation||this.latestLocation;let S;const b=()=>(o=!0,v),y=()=>(o=!0,S??(S=this.matchRoutesLightweight(v))),p=d.to?`${d.to}`:".",_=wv(p[0]==="/"?"":d.unsafeRelative==="path"?b().pathname:d.from??y()[1],p,this.options.trailingSlash,this.resolvePathCache),E=this.routesByPath[zn(_)],D=_.includes("$");let M;if(E)M=E._branch??(E._branch=Fg(E));else if(D)M=[];else{const[Z,$,et]=this.getMatchedRoutes(_);M=Z,this.options.notFoundRoute&&(!et||et.path!=="/"&&$["**"])&&(M=[...M,this.options.notFoundRoute])}const K=D?(E==null?void 0:E._interpolation)??Zu(!1,{fullPath:_},0):void 0;let w;for(const Z of M){const $=((st=Z.options.params)==null?void 0:st.stringify)??Z.options.stringifyParams;if($){const et=y()[3];if(w??(w=kf(d.params,et)),!Bg(w))break;w===et&&(w=Object.assign(Yc(),w));try{Object.assign(w,$(w))}catch{}}}w??(w=kf(d.params,nT(d.params,K)?y()[3]:If));const L=r.leaveParams?_:Vc(Bu(K?jv(_,K,w,this.pathParamsDecoder):_)),X=lT(M,r._includeValidateSearch),Y=()=>{var $;let Z=y()[2];if(r._includeValidateSearch&&(($=this.options.search)!=null&&$.strict)){const et={};M.forEach(Dt=>{if(Dt.options.validateSearch)try{Object.assign(et,Xc(Dt.options.validateSearch,{...et,...Z}))}catch{}}),Z=et}return Z},G=X.length?aT(X,Y(),d):d.search===!0?Y():typeof d.search=="function"?d.search(Y()):d.search||If,V=this.options.stringifySearch(G),F=d.hash===!0?b().hash:typeof d.hash=="function"?d.hash(b().hash):d.hash||void 0,Q=F?`#${F}`:"",k=d.state?d.state===!0?b().state:typeof d.state=="function"?d.state(b().state):d.state:If,rt=`${L}${V}${Q}`;let ft,bt,mt=!1;if(this.rewrite){const Z=new URL(rt,this.origin),$=Z.origin,et=kg(this.rewrite,Z);ft=Ff(Z),Jf(et,$)?(bt=et.href,mt=!0):bt=Vc(Ff(et))}else ft=S_(rt),bt=ft;return{publicHref:bt,href:ft,pathname:L,search:G,searchStr:V,state:k,hash:F??"",external:mt,unmaskOnReload:d.unmaskOnReload}},m=h(r);if(r.mask)m.maskedLocation=h({from:r.from,...r.mask});else if(this.options.routeMasks){const d=Q_(m.pathname,this.processedTree);if(d){const v=Object.assign(Yc(),d.rawParams),{from:S,params:b,...y}=d.route,p=kf(b,v);m.maskedLocation=h({from:r.from,...y,params:p})}}return!o&&r._fromLocation&&!m.maskedLocation&&this.staticLocations.set(r,m),m},this.commitLocation=async({viewTransition:r,ignoreBlocker:o,...h})=>{const m=h.maskedLocation??h;if(m.external)return Xv(this,m.publicHref,{replace:h.replace,ignoreBlocker:o});let d;const v=zn(this.latestLocation.href)===zn(h.href)&&$n(Vv(h.state),Vv(this.latestLocation.state)),S=this._commitPromise;let b;const y=new Promise(p=>{b=p});if(y.resolve=()=>{b(),S==null||S.resolve()},this._commitPromise=y,v)this.load();else{let{maskedLocation:p,hashScrollIntoView:_,...E}=h;p&&(E={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...E,search:E.searchStr,state:{...E.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(E.unmaskOnReload??this.options.unmaskOnReload??!1)&&(E.state.__tempKey=this.tempLocationKey)),E.state={...E.state,__hashScrollIntoViewOptions:_??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=r,d=h.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](E.publicHref,E.state,{ignoreBlocker:o}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.next=h.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:r,resetScroll:o,hashScrollIntoView:h,viewTransition:m,ignoreBlocker:d,...v}={})=>{const S=this.buildLocation({...v,_includeValidateSearch:!0});this._pendingLocation=S;const b=this.commitLocation({...S,viewTransition:m,replace:r,resetScroll:o,hashScrollIntoView:h,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===S&&(this._pendingLocation=void 0)}),b},this.navigate=async({to:r,reloadDocument:o,href:h,publicHref:m,...d})=>{const v=h?Ku(h):void 0;if(v||o){if(r!==void 0||!h){const b=this.buildLocation({to:r,...d}),y=b.maskedLocation??b;h??(h=y.publicHref),m??(m=y.publicHref)}return Xv(this,!v&&m?m:h,d)}return this.buildAndCommitLocation({...d,href:h,to:r,_isNavigate:!0})},this.load=async r=>{this.updateLatestLocation(),r!=null&&r.action&&(this._scroll.hash=r.action.type==="PUSH"||r.action.type==="REPLACE"),await dT(this,r)},this.startViewTransition=r=>{var h,m;const o=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,o&&typeof document.startViewTransition=="function"){let d;if(typeof o=="object"&&((m=(h=window.CSS)==null?void 0:h.supports)!=null&&m.call(h,"selector(:active-view-transition-type(a))"))){const v=this.latestLocation,S=this.stores.resolvedLocation.get(),b=typeof o.types=="function"?o.types(Wc(v,S)):o.types;if(b===!1)return r();d={update:r,types:b}}else d=r;return document.startViewTransition(d).updateCallbackDone}return r()},this.invalidate=r=>{var y,p;const o=this._committed,h=r==null?void 0:r.filter,m=this._preloads,d=new Set,v=_=>{(!h||h(_))&&d.add(_.id)};o.forEach(v),this._cache.forEach(v),m==null||m.forEach(_=>_.forEach(v)),(y=this._tx)==null||y[3].forEach(v);const S=[];for(const[_,E]of m??[])E.some(D=>d.has(D.id))&&(m.delete(_),S.push(_));const b=_=>{if(d.has(_.id)){const E=this.routesById[_.routeId],D={..._,invalid:!0,...(r!=null&&r.forcePending||_.status==="error"||_.status==="notFound")&&Gv(E)?{status:"pending",error:void 0}:void 0};return _._flight=void 0,D}return _};this._committed=o.map(b);for(const[_,E]of this._cache)d.has(_)&&(E.invalid=!0,r!=null&&r.forcePending&&(E.status="pending"));for(const _ of d)(p=this._flights)==null||p.delete(_);for(const _ of S)_.abort();return this.shouldViewTransition=!1,this.load({sync:r==null?void 0:r.sync})},this.resolveRedirect=r=>{const o=r.options;let h=r.headers.get("Location")||o.href;if(!h){const d=this.buildLocation(o);h=(d.maskedLocation??d).publicHref||"/"}let m;if(qg.test(h)||(m=Ku(h))&&!this.protocolAllowlist.has(m))throw new Error("Redirect blocked: unsafe protocol");if(m==="http:"||m==="https:"){const d=new URL(h);d.pathname.startsWith("//")?h=d.href:Jf(d,this.origin)||(h=Ff(d),m=void 0)}return m&&(o.reloadDocument=!0),o.href=h,r.headers.set("Location",h),r},this.clearCache=r=>{var b;const o=this._cache,h=this._preloads,m=r==null?void 0:r.filter,d=[],v=[];for(const[y,p]of o)(!m||m(p))&&(v.push(y),d.push(p));const S=[];for(const[y,p]of h??[])(!m||p.some(m))&&(S.push(y),d.push(...p));for(const y of v)o.delete(y);for(const y of S)h.delete(y);for(const y of d){const p=y._flight;y._flight=void 0,p&&!--p[2]&&(((b=this._flights)==null?void 0:b.get(y.id))===p&&this._flights.delete(y.id),S.push(p[1]))}for(const y of S)y.abort()},this.loadRouteChunk=Ri,this.preloadRoute=r=>mT(this,r),this.matchRoute=(r,o)=>{const h={...r,to:r.to?wv(r.from||"",r.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:r.params||{},leaveParams:!0},m=this.buildLocation(h),d=this.stores.status.get()==="pending";if(o!=null&&o.pending&&!d)return!1;const v=(o==null?void 0:o.pending)??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),S=Y_(m.pathname,(o==null?void 0:o.caseSensitive)??!1,(o==null?void 0:o.fuzzy)??!1,v.pathname,this.processedTree);return!S||r.params&&!$n(S.rawParams,r.params,!0)?!1:(o==null?void 0:o.includeSearch)??!0?$n(v.search,m.search,!0)?S.rawParams:!1:S.rawParams},this.getStoreConfig=i,(c=a.pathParamsAllowedCharacters)!=null&&c.length&&(this.pathParamsDecoder=b_(a.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...a,caseSensitive:a.caseSensitive??!1,notFoundMode:a.notFoundMode??"fuzzy",stringifySearch:a.stringifySearch??U_,parseSearch:a.parseSearch??x_,protocolAllowlist:a.protocolAllowlist??g_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(a){Object.assign(this,a),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const i=this.options.notFoundRoute;i&&(i.init(99999999999),this.routesById[i.id]!==i&&(i._interpolation=Zu(!1,i,0)),this.routesById[i.id]=i)}matchRoutesInternal(a,i){var p,_;const[c,r,o]=this.getMatchedRoutes(a.pathname);let h=c,m=!1;(o?o.path!=="/"&&r["**"]:zn(a.pathname))&&(this.options.notFoundRoute?h=[...h,this.options.notFoundRoute]:m=!0);const d=m?iT(this.options.notFoundMode,h):void 0,v=new Array(h.length),S=this._committed,b=(E,D)=>{const M=S[D];return(M==null?void 0:M.routeId)===E.id?M:E===this.options.notFoundRoute?S.find(K=>K.routeId===E.id):void 0};let y;for(let E=0;Etypeof c!="string"&&!wh.call(a,c[1]))}const If=Object.freeze({});function lT(a,i){var r;const c=[];for(let o=0;o{const b=S(h.preSearchFilters?h.preSearchFilters.reduce((y,p)=>p(y),v):v);return h.postSearchFilters?h.postSearchFilters.reduce((y,p)=>p(y),b):b};c.push(d)}const m=h.validateSearch;if(i&&m){const d=({search:v,next:S,meta:b})=>{const y=S(v);try{const p=Xc(m,y);if(b&&p)for(const _ in p)_ in y||(b.defaulted||(b.defaulted=new Map)).set(_,p[_]);return{...y,...p}}catch{}return y};c.push(d)}}return c}function aT(a,i,c){const r=(o,h,m)=>{if(o>=a.length){if(!c.search)return{};if(c.search===!0)return h;const v=Lg(c.search,h);return m&&(m.explicit=v),v}const d=(v,S)=>{if(S){const b=m||{};return{search:r(o+1,v,b),meta:b}}return r(o+1,v,m)};return a[o]({search:h,next:d,meta:m})};return r(0,i)}function iT(a,i){if(a!=="root"){let c;for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.options.notFoundComponent)return o.id;c||(c=o.children&&o.id)}if(c)return c}return Ci}function Kv(a,i){var r;const c=((r=a.options.params)==null?void 0:r.parse)??a.options.parseParams;c&&Object.assign(i,c(i))}function bh(a,i){var c,r;return(r=(c=a.options[i])==null?void 0:c.preload)==null?void 0:r.call(c)}function uT(a,i){const c=bh(a,"component");let r=bh(a,"pendingComponent");return i&&(r?r=r.then(i):i()),c&&r?Promise.all([c,r]).then(()=>{}):c??r}function Ri(a,i,c){const r=()=>i===!1?void 0:i?bh(a,i):uT(a,c),o=a._lazy;if(o)return o===!0?r():o.then(r);if(!a.lazyFn)return r();const h=a.lazyFn().then(m=>{{const{id:d,...v}=m.options;Object.assign(a.options,v),a._lazy=!0}},m=>{throw a._lazy=void 0,m});return a._lazy=h,h.then(r)}function Bh(a){const i=a.findIndex(c=>c.status!=="success"||c._notFound)+1;return i&&i{const o=()=>r(i);i.addEventListener("abort",o,{once:!0}),Promise.resolve(a).then(c,r).then(()=>i.removeEventListener("abort",o))})}function Ra(a,i){return a.routesById[i.routeId]}function Fu(a,i,c){return Xg(a)?[Ce,a]:Yi(a)?(a.routeId||(a.routeId=c),[tr,a]):i?(typeof(a==null?void 0:a.then)=="function"&&(a=new Error("A Promise was thrown",{cause:a})),[Wn,a]):[Nn,a]}function qh(a,i){var r,o;let c=Fu(i,!0,a.id);if(c[0]!==Wn)return c;try{(o=(r=a.options).onError)==null||o.call(r,c[1])}catch(h){c=Fu(h,!0,a.id)}return c}function Gu(a,i,c,r,o){return o[0].signal.aborted?Gl:Gh(a,i,c,qh(c,r),o)}async function sT(a,i,c,r,o,h){var b,y;const[m,d]=i,v=c[0].signal,S=!!c[3];for(let p=c[6]??0;pa.navigate({...X,_fromLocation:m}),buildLocation:a.buildLocation,cause:S?"preload":_.cause,abortController:c[0],preload:S,matches:d,routeId:E.id};try{const X=_._ctx||(_._ctx=E.options.context?E.options.context({...M,deps:_.loaderDeps,context:D})||{}:void 0);_.context={...D,...X}}catch(X){return Pn(a,_),[p,Gu(a,i,E,X,c)]}if(v.aborted)return[p,Gl];const K=_.paramsError??_.searchError;if(K!==void 0)return Pn(a,_),[p,Gu(a,i,E,K,c)];const w=E.options.beforeLoad;if(!w)continue;const L=_.status;p>=h&&(_.status="pending",(y=c[7])==null||y.call(c));try{ku(a,_,"beforeLoad",c[0]);const X=w({...M,search:_.search,context:_.context,...a.options.additionalContext}),Y=await(typeof(X==null?void 0:X.then)=="function"?Ca(X,v):X);if(v.aborted)return[p,Gl];const G=Gh(a,i,E,Fu(Y,!1,E.id),c);if(G[0]!==Nn)return Pn(a,_),[p,G];_.context={..._.context,...Y}}catch(X){return Pn(a,_),[p,Gu(a,i,E,X,c)]}finally{_.status=L,ku(a,_,!1,c[0])}}o()}function Qh(a,i,c){var r;if(!(!c||--c[2])){if(((r=a._flights)==null?void 0:r.get(i.id))===c){const o=a._tx;if(o&&!o[0].signal.aborted&&!o[3].includes(i)&&o[3].some(h=>h.id===i.id)&&o[3].some(h=>h.isFetching==="beforeLoad"))return;a._flights.delete(i.id)}return c[1]}}function Pn(a,i){var r;const c=i._flight;i._flight=void 0,(r=Qh(a,i,c))==null||r.abort()}function we(a,i,c,r){var h;const o=[];for(const m of i)if(!(c!=null&&c.includes(m))){const d=m._flight;if(m._flight=void 0,r&&(d==null?void 0:d[2])===1&&((h=a._flights)==null?void 0:h.get(m.id))===d&&(c!=null&&c.some(v=>v.id===m.id)))d[2]=0;else{const v=Qh(a,m,d);v&&o.push(v)}}for(const m of o)m.abort()}function Yh(a){for(const i of a){const c=i._flight;c&&c[2]++}}function ku(a,i,c,r){var m;if(i.isFetching=c,r&&((m=a._tx)==null?void 0:m[0])!==r)return;const o=a.stores.byRoute.get(i.routeId),h=o==null?void 0:o.get();(h==null?void 0:h.id)===i.id&&o.set({...h,isFetching:c})}function Pg(a,i,c,r,o,h,m){const d=i[0];return{params:c.params,location:d,navigate:v=>a.navigate({...v,_fromLocation:d}),cause:m?"preload":c.cause,abortController:o,preload:m,deps:c.loaderDeps,parentMatchPromise:h,context:c.context,route:r,...a.options.additionalContext}}async function Zv(a,i,c,r,o,h,m){const d=m[0],v=d.signal;if(v.aborted)return Gl;if(!o)return[Nn,void 0];let S=c._flight;ku(a,c,"loader",d);try{if(!S){const b=new AbortController;S=[Promise.resolve().then(()=>o(Pg(a,i,c,r,b,h,!!m[3]))).then(y=>Fu(y,!1,r.id),y=>Fu(y,!0,r.id)).then(y=>{var p;return y[0]!==Nn&&((p=a._flights)==null?void 0:p.get(c.id))===S&&(a._flights.delete(c.id),S[2]||b.abort()),y[0]===Wn&&S[2]?qh(r,y[1]):y}),b,1],(a._flights??(a._flights=new Map)).set(c.id,S)}return c._flight=S,c.abortController=S[1],Gh(a,i,r,await Ca(S[0],v),m)}catch(b){if(b!==v||!v.aborted)throw b;return Pn(a,c),Gl}finally{ku(a,c,!1,d)}}function Jv(a,i,c){i[0]!==Ce&&(a.status="success",a.error=void 0,i[0]===Nn?(a.loaderData=i[1],a.invalid=!1,a.updatedAt=Date.now(),a.preload=c):a.invalid=!0)}function cT(a,i,c){const r=a._cache.get(i.id);if(r!==c||a._committed.some(h=>h.id===i.id&&h._flight===i._flight))return;const o={...i,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,a._cache.set(i.id,o),r&&Pn(a,r)}function Fv(a,i){return i[0]===Wn||i[0]===tr?{...a,status:i[0]===Wn?"error":"notFound",error:i[1],_flight:void 0}:a}function rT(a,i,c,r,o,h,m){var ft,bt;const d=i[1][c],v=Ra(a,d),S=!!h[3],b=a._cache.get(d.id);let y,p=!1,_;try{if(d.status==="success"&&(y=v.options.shouldReload,typeof y=="function"&&(y=y(Pg(a,i,d,v,h[0],o,S))),h[0].signal.aborted&&(_=Gl)),!_)if(d.status!=="success")p=!0;else{const mt=S||d.preload?v.options.preloadStaleTime??a.options.defaultPreloadStaleTime??3e4:v.options.staleTime??a.options.defaultStaleTime??0;p=!!(d.invalid||y||y===void 0&&Date.now()-d.updatedAt>=mt&&(h[5]||d.cause==="enter"||h[2].some(st=>st.routeId===d.routeId&&st.id!==d.id)))}}catch(mt){d.invalid=!0,Pn(a,d),_=Gu(a,i,v,mt,h)}const E=v.options.loader,D=typeof E=="function",M=D?E:E==null?void 0:E.handler,K=!S||v.options.preload!==!1;let w=K&&E?(ft=a._flights)==null?void 0:ft.get(d.id):void 0;w===d._flight||_?w=void 0:w&&!p&&!S&&y===void 0?p=!0:p||(w=void 0);const L=!!(E&&p&&d.status==="success"&&!S&&!h[4]&&((D?void 0:E.staleReloadMode)??a.options.defaultStaleReloadMode)!=="blocking"),X=p&&K,Y=X&&!L&&(d.status!=="success"||!!E),G=c>=m?h[7]:void 0,V=v.lazyFn&&v._lazy!==!0?G:void 0;if(X&&!E&&(d.invalid=!1,d.updatedAt=Date.now()),w&&w[2]++,Y){const mt=d._flight;d._flight=w,(bt=Qh(a,d,mt))==null||bt.abort(),c>=m&&(d.status="pending"),G==null||G()}X||(d.isFetching=!1);const F=!_&&Y?Zv(a,i,d,v,M,o,h).then(mt=>(Jv(d,mt,S),mt[0]===Nn&&(E&&!h[0].signal.aborted&&cT(a,d,b),c>=m&&(d.status="pending")),mt)):Promise.resolve(_??[Nn,d.loaderData]),Q=(async()=>{try{const st=Ri(v,void 0,V);st&&await Ca(st,h[0].signal)}catch(st){if(!i[1].some((Z,$)=>$<=c&&(Z.status==="error"||Z.status==="notFound"||Z._notFound)))return[c,Gu(a,i,v,st,h)]}const mt=await F;Y&&mt[0]===Nn&&d.status==="pending"&&!h[0].signal.aborted&&(d.status="success",G==null||G())})();if(r.push([c,F,Q]),!L)return F.then(mt=>Fv(d,mt));const k={...d,status:"pending",preload:!1,_flight:w};d.invalid=!1,d.isFetching="loader";const rt=Zv(a,i,k,v,M,o,h).then(mt=>(d.isFetching=!1,Jv(k,mt,!1),mt));return(i[2]??(i[2]=[])).push([c,rt,Q,k]),rt.then(mt=>Fv(k,mt))}async function _h(a,i,c,r,o=0){const h=c==null?void 0:c[1][1];let m=h!=null&&h.routeId?i.findIndex(d=>d.routeId===h.routeId):(c==null?void 0:c[0])??i.length-1;m<0&&(m=0);for(let d=m;d>=0;d--){const v=Ra(a,i[d]);try{const S=Ri(v,!1);S&&await Ca(S,r)}catch(S){if(S===r&&r.aborted)throw S}if(v.options.notFoundComponent)return d}return h!=null&&h.routeId?m:o}function Oa(a,i){i[2]&&(we(a,i[2].map(c=>c[3])),i[2]=void 0)}async function kv(a,i,c,r){let o;try{await Promise.all(a.map(h=>h[1].then(async m=>{const d=h[0];if(!(r&&d>=await r)){if(m[0]>=Ce)throw[d,m];!o&&m[0]!==Nn&&(o=[d,m],await Promise.all((c??[]).map(v=>{if(!(v[0]<=d))return v[1].then(S=>{if(S[0]===Ce)throw[v[0],S]})})))}})))}catch(h){return h}return i??o}function Gh(a,i,c,r,o,h){for(;r[0]===Ce;){const m=r[1],d=m.options;try{if((d.href||m.headers.has("Location"))&&(a.resolveRedirect(m),d.reloadDocument)||(d.reloadDocument?o[3]:o[1]>=20))return r;const v=a.buildLocation({...d,_fromLocation:i[0],_includeValidateSearch:!0}),S=v.maskedLocation??v;if(S.external){const b=m.clone();return b.options={...d},b.headers.set("Location",S.publicHref),a.resolveRedirect(b),o[3]?[Ce,b]:[Ce,b,S]}return[Ce,m,v]}catch(v){r=h?[Wn,v]:qh(c,v),h=!0}}return r}async function $g(a,i,c,r,o,h){const m=i[1];let d=await o,v=!1;const S=m.findIndex(_=>_._notFound),b=_=>_[1][0]===tr?_h(a,m,_,r.signal):_[0];let y=S<0?m.length:S;if(((d==null?void 0:d[1][0])??0)>=Ce)y=0;else if(d){y=d[2]??(d[2]=await b(d));for(const _ of c){if(_[0]>=y)break;const E=await _[1];if(E[0]!==Nn&&E[0]=y)break;const E=await _[2];if(E){d=E;break}}if(((d==null?void 0:d[1][0])??0)>=Ce){const _=d[1];if(_[0]!==Ce||_[1].options.reloadDocument||_[2])return Oa(a,i),_;v=!0,d=[0,[Wn,new Error("Too many redirects")]]}const p=d?d[2]??await b(d):S;if(p>=0){const _=d==null?void 0:d[1],E=_==null?void 0:_[0],D=m[p],M=_==null?void 0:_[1],K=()=>{_&&(D._notFound=void 0,E===Wn?D.status="error":(M.routeId=D.routeId,D.routeId===a.routeTree.id?(D.status="success",D._notFound=!0):D.status="notFound"),D.error=M,D.isFetching=!1)};K(),_||h==null||h();const w=Ra(a,D);try{await Ca(_?Promise.resolve().then(()=>Ri(w,E===Wn?"errorComponent":"notFoundComponent")):Promise.all([Ri(w),Ri(w,"notFoundComponent")]),r.signal)}catch(L){if(L===r.signal&&r.signal.aborted)return Oa(a,i),Gl}_?v&&(r.abort(),await Promise.all([...c.map(L=>L[1]),...c.map(L=>L[2]),...(i[2]??[]).map(L=>L[1])]),Oa(a,i),we(a,m),K()):D.status="success"}return i}async function Wg(a,i,c,r=0,o=i[1].length){var m,d;const h=i[1];for(let v=r;vw._notFound);if(a.options.notFoundMode!=="root"&&S>=0){const w=await _h(a,c,void 0,h,S);c[S]._notFound=void 0,c[w]._notFound=!0,S=w}let b=S<0?c.length:S+1,y=0;for(;y{for(let w=_;w=Ce&&(b=0);D()}if(!h.aborted&&!r[3]){const w=[];for(const[L,X]of a._flights??[])X[2]||(a._flights.delete(L),w.push(X[1]));for(const L of w)L.abort()}const K=$g(a,o,p,r[0],kv(p,M,o[2]),r[7]);(d=o[2])!=null&&d.length&&(o[3]=kv(o[2],void 0,void 0,K.then(w=>Ju(w)?0:Bh(c).length,()=>0))),m=await K}catch(v){if(Oa(a,o),v===h&&h.aborted)return Gl;throw v}return Ju(m)?m:Wg(a,m,h,r[6]===c.length?r[6]:0)}function Th(a,i){var h,m;if(a._tx!==i)return;const c=i[3],r=a.stores.matches.get();let o=a._pending;for(let d=0;d0){o[3]=setTimeout(()=>Th(a,i),w);return}o[2]=0}const M=c.map(w=>({...w,_flight:void 0}));M[d].status="pending";const K=o[4]=a.startTransition(()=>a.stores.setMatches(M),M).then(w=>(w&&a._pending===o&&o[4]===K&&!o[2]&&(o[2]=Date.now()+E),w));return}}function qu(a,i){var r;const c=a._pending;(a._tx===i||!((r=a._tx)!=null&&r[3].some(o=>o.id===(c==null?void 0:c[1]))))&&(clearTimeout(c==null?void 0:c[3]),a._pending=void 0)}async function Iv(a,i){const c=a._pending;if(!c)return;clearTimeout(c[3]);const r=c[2]-Date.now();if(!c[4]||r<=0||!Bh(i[3]).some(h=>h.id===c[1]))return;let o;try{await Ca(new Promise(h=>{o=setTimeout(h,r)}),i[0].signal)}catch{}clearTimeout(o)}function eS(a,i){a._committed=i,a.stores.setMatches(i)}function oT(a,i,c,r){const o=a._committed,h=a._lifecycleEnd,m=a._cache;for(const b of c)b.preload=!1,r&&(b._assetEnd=void 0);const d=Bh(c).length,v=new Map;{const b=Date.now(),y=new Set;for(let p=0;p=(p.preload?_.options.preloadGcTime??a.options.defaultPreloadGcTime??3e5:_.options.gcTime??a.options.defaultGcTime??3e5)||v.set(p.id,m.get(p.id)===p?p:{...p,_flight:void 0,isFetching:!1,context:{}})}}i[3]=[],a._cache=v;const S=a._lifecycleEnd=$_(c);eS(a,c),we(a,[...m.values(),...o].filter(b=>b._flight&&v.get(b.id)!==b),c),W_(a,o,c,h,S,i)}async function Bc(a,i){let c=a._tx;for(;c&&c!==i;)i=c,await c[5],c=a._tx}function nS(a,i,c){const r=c[1].options,o=c[2];if(!o)return a.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return a.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=i[1]+1,a._pendingLocation=o;const h=a.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{a._pendingLocation===o&&(a._pendingLocation=void 0)}),h}async function fT(a,i,c,r,o){const h=c.map(v=>({...v}));Yh(h);for(const v of r)Pn(a,h[v[0]]),h[v[0]]=v[3];const m=[i[2],h];let d;try{d=await $g(a,m,r,i[0],o)}catch(v){throw we(a,h),v}if(Ju(d)){we(a,h),d[0]===Ce&&a._tx===i&&a._committed===c&&await nS(a,i,d);return}if(await Wg(a,d,i[0].signal),a._tx!==i||a._committed!==c){we(a,h);return}for(const v of h){const S=a._cache.get(v.id);S!=null&&S._flight&&S._flight===v._flight&&(a._cache.delete(v.id),Pn(a,S))}eS(a,h),we(a,c,h)}async function hT(a,i,c,r,o,h){const m=await tS(a,i[2],i[3],[i[0],i[1],a._committed,void 0,o,c,h,r]);if(Ju(m)){const y=m[0]===Ce&&a._tx===i;if((!y||m[1].options.reloadDocument)&&qu(a,i),we(a,i[3]),i[3]=[],!y)return;if(a._tx!==i){qu(a,i);return}await nS(a,i,m);return}const d=m[1];if(a._tx===i&&await Iv(a,i),a._tx!==i){qu(a,i),we(a,d),Oa(a,m);return}const v=i[2],S=Wc(v,a.stores.resolvedLocation.get()),b=m[2];await a.startViewTransition(async()=>{var _;if(a._tx===i&&await Iv(a,i),a._tx!==i){qu(a,i),we(a,d),Oa(a,m);return}const y=()=>{qu(a,i),oT(a,i,d,h),a._tx===i&&(a.emit({type:"onLoad",...S}),a._tx===i&&a.emit({type:"onBeforeRouteMount",...S}))},p=await a.startTransition(y,d);if(a._tx!==i){Oa(a,m);return}b!=null&&b.length&&fT(a,i,d,b,m[3]).catch(console.error),a.batch(()=>{a.stores.resolvedLocation.set(v),a.stores.status.set("idle"),a._tx===i&&a.emit({type:"onResolved",...S}),p&&a._tx===i&&a.emit({type:"onRendered",...S})}),a._tx===i&&((_=a._commitPromise)==null||_.resolve(),a._commitPromise=void 0)})}async function dT(a,i){var X;const c=a._tx,r=a.stores.resolvedLocation.get(),o=r??a.stores.location.get(),h=a.latestLocation,m=a._pendingLocation,d=(m==null?void 0:m.href)===h.href?m._redirects??0:0,v=a._handoff,S=v==null?void 0:v[0](),b=new AbortController,y=a._preflight;if(a._preflight=b,S||v==null||v[1](),y==null||y.abort(),!b.signal.aborted){const Y=Wc(h,r);a.emit({type:"onBeforeNavigate",...Y}),b.signal.aborted||a.emit({type:"onBeforeLoad",...Y})}if(b.signal.aborted){await Bc(a,c);return}const p=o.href===h.href;let _=b;const E=a.matchRoutes(h,{_controller:b});Yh(E);const D=S?v[1](E):void 0;if(D?_=S:S==null||S.abort(),b.signal.aborted){we(a,E),await Bc(a,c);return}a._preflight=void 0;let M;const K=()=>hT(a,L,p,()=>Th(a,L),i==null?void 0:i.sync,D),w=i!=null&&i.sync?new Promise(Y=>M=Y):Promise.resolve().then(K),L=[_,d,h,E,Date.now(),w.then(()=>Bc(a,L))];if(a._tx=L,c){for(const Y of a.stores.matches.get()){if(a._tx!==L)break;Y.isFetching&&ku(a,Y,!1)}c[0].abort(),we(a,c[3],L[3],!0)}if(a._tx!==L){we(a,L[3]),L[3]=[],M==null||M(),await Bc(a,L);return}a.batch(()=>{a.stores.status.set("pending"),a.stores.location.set(h)}),(D||!a._committed.length&&((X=E[0])==null?void 0:X.status)!=="success"&&!E.some(Y=>Y._notFound))&&Th(a,L),M==null||M(K()),await L[5]}async function mT(a,i){let c=a.buildLocation(i);for(let r=0;;r++){const o=a._committed,h=new AbortController;let m,d,v;try{try{m=a.matchRoutes(c,{_controller:h}),Yh(m),d=(a._preloads??(a._preloads=new Map)).set(h,m),v=await tS(a,c,m,[h,r,o,!0])}finally{d&&(d=d.delete(h),we(a,m)),h.abort()}if(!Ju(v))return v[1];if(!d||v.length<3)return;c=v[2]}catch(S){Yi(S)||console.error(S);return}}}const yT="Error preloading route! ☝️";var lS=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(a){if(this.init=i=>{var v,S;this.originalIndex=i,this._branch=void 0;const c=this.options,r=!(c!=null&&c.path)&&!(c!=null&&c.id);this.parentRoute=(S=(v=this.options).getParentRoute)==null?void 0:S.call(v),r?this._path=Ci:this.parentRoute||jh();let o=r?Ci:c==null?void 0:c.path;o&&o!=="/"&&(o=Yg(o));const h=(c==null?void 0:c.id)||o,m=r?Ci:Ei((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(h??""));o==="__root__"&&(o="/");const d=m==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Ei(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=m,this._fullPath=d,this._to=zn(d)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>H_({from:this.fullPath,...i}),this.options=a||{},this.isRoot=!(a!=null&&a.getParentRoute),a!=null&&a.id&&(a!=null&&a.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},vT=class extends lS{constructor(a){super(a)}},Vh=class extends tt.Component{constructor(...a){super(...a),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(a,i){const c=a.getResetKey();return i.error&&i.resetKey!==c?{resetKey:c,error:0}:{resetKey:c}}static getDerivedStateFromError(a){return{error:[a]}}componentDidCatch(a,i){var c,r;(r=(c=this.props).onCatch)==null||r.call(c,a,i)}render(){const a=this.state.error;return a?tt.createElement(this.props.errorComponent??gT,{error:a[0],reset:this.reset}):this.props.children}};function gT({error:a}){const[i,c]=tt.useState(!1);return H.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[H.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[H.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),H.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>c(r=>!r),children:i?"Hide Error":"Show Error"})]}),H.jsx("div",{style:{height:".25rem"}}),i?H.jsx("div",{children:H.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:a!=null&&a.message?H.jsx("code",{children:a.message}):null})}):null]})}var ST=()=>!0,pT=()=>!1;function bT({children:a,fallback:i=null}){return H.jsx($c.Fragment,{children:aS()?a:i})}function aS(){return $c.useSyncExternalStore(_T,ST,pT)}function _T(){return()=>{}}var iS=tt.createContext(null);function Dn(a){return tt.useContext(iS)}var er=tt.createContext(void 0),TT=tt.createContext(void 0);function ET({update:a,notify:i,unwatched:c}){return{link:r,unlink:o,propagate:h,checkDirty:m,shallowPropagate:d};function r(S,b,y){const p=b.depsTail;if(p!==void 0&&p.dep===S)return;const _=p!==void 0?p.nextDep:b.deps;if(_!==void 0&&_.dep===S){_.version=y,b.depsTail=_;return}const E=S.subsTail;if(E!==void 0&&E.version===y&&E.sub===b)return;const D=b.depsTail=S.subsTail={version:y,dep:S,sub:b,prevDep:p,nextDep:_,prevSub:E,nextSub:void 0};_!==void 0&&(_.prevDep=D),p!==void 0?p.nextDep=D:b.deps=D,E!==void 0?E.nextSub=D:S.subs=D}function o(S,b=S.sub){const y=S.dep,p=S.prevDep,_=S.nextDep,E=S.nextSub,D=S.prevSub;return _!==void 0?_.prevDep=p:b.depsTail=p,p!==void 0?p.nextDep=_:b.deps=_,E!==void 0?E.prevSub=D:y.subsTail=D,D!==void 0?D.nextSub=E:(y.subs=E)===void 0&&c(y),_}function h(S){let b=S.nextSub,y;t:do{const p=S.sub;let _=p.flags;if(_&60?_&12?_&4?!(_&48)&&v(S,p)?(p.flags=_|40,_&=1):_=0:p.flags=_&-9|32:_=0:p.flags=_|32,_&2&&i(p),_&1){const E=p.subs;if(E!==void 0){const D=(S=E).nextSub;D!==void 0&&(y={value:b,prev:y},b=D);continue}}if((S=b)!==void 0){b=S.nextSub;continue}for(;y!==void 0;)if(S=y.value,y=y.prev,S!==void 0){b=S.nextSub;continue t}break}while(!0)}function m(S,b){let y,p=0,_=!1;t:do{const E=S.dep,D=E.flags;if(b.flags&16)_=!0;else if((D&17)===17){if(a(E)){const M=E.subs;M.nextSub!==void 0&&d(M),_=!0}}else if((D&33)===33){(S.nextSub!==void 0||S.prevSub!==void 0)&&(y={value:S,prev:y}),S=E.deps,b=E,++p;continue}if(!_){const M=S.nextDep;if(M!==void 0){S=M;continue}}for(;p--;){const M=b.subs,K=M.nextSub!==void 0;if(K?(S=y.value,y=y.prev):S=M,_){if(a(b)){K&&d(M),b=S.sub;continue}_=!1}else b.flags&=-33;b=S.sub;const w=S.nextDep;if(w!==void 0){S=w;continue t}}return _}while(!0)}function d(S){do{const b=S.sub,y=b.flags;(y&48)===32&&(b.flags=y|16,(y&6)===2&&i(b))}while((S=S.nextSub)!==void 0)}function v(S,b){let y=b.depsTail;for(;y!==void 0;){if(y===S)return!0;y=y.prevDep}return!1}}function OT(a,i,c){var h,m,d;const r=typeof a=="object",o=r?a:void 0;return{next:(h=r?a.next:a)==null?void 0:h.bind(o),error:(m=r?a.error:i)==null?void 0:m.bind(o),complete:(d=r?a.complete:c)==null?void 0:d.bind(o)}}const Eh=[];let Kc=0;const{link:Pv,unlink:CT,propagate:RT,checkDirty:uS,shallowPropagate:$v}=ET({update(a){return a._update()},notify(a){Eh[Oh++]=a,a.flags&=-3},unwatched(a){a.depsTail!==void 0&&(a.depsTail=void 0,a.flags=17,Pc(a))}});let qc=0,Oh=0,On,Ch=0;function AT(a){try{++Ch,a()}finally{--Ch||sS()}}function Pc(a){const i=a.depsTail;let c=i!==void 0?i.nextDep:a.deps;for(;c!==void 0;)c=CT(c,a)}function sS(){if(!(Ch>0)){for(;qc{var S;o.get(),d.current?(S=m.next)==null||S.call(m,o._snapshot):d.current=!0});return{unsubscribe:()=>{v.stop()}}},_update(h){const m=On,d=(i==null?void 0:i.compare)??Object.is;if(c)On=o,++Kc,o.depsTail=void 0;else if(h===void 0)return!1;c&&(o.flags=5);try{const v=o._snapshot,S=typeof h=="function"?h(v):h===void 0&&c?r(v):h;return v===void 0||!d(v,S)?(o._snapshot=S,!0):!1}finally{On=m,c&&(o.flags&=-5),Pc(o)}}};return c?(o.flags=17,o.get=function(){const h=o.flags;if(h&16||h&32&&uS(o.deps,o)){if(o._update()){const m=o.subs;m!==void 0&&$v(m)}}else h&32&&(o.flags=h&-33);return On!==void 0&&Pv(o,On,Kc),o._snapshot}):o.set=function(h){if(o._update(h)){const m=o.subs;m!==void 0&&(RT(m),$v(m),sS())}},o}function zT(a){const i=()=>{const r=On;On=c,++Kc,c.depsTail=void 0,c.flags=6;try{return a()}finally{On=r,c.flags&=-5,Pc(c)}},c={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&uS(this.deps,this)?i():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,Pc(this)}};return i(),c}var Pf={exports:{}},$f={},Wf={exports:{}},th={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var tg;function NT(){if(tg)return th;tg=1;var a=es();function i(y,p){return y===p&&(y!==0||1/y===1/p)||y!==y&&p!==p}var c=typeof Object.is=="function"?Object.is:i,r=a.useState,o=a.useEffect,h=a.useLayoutEffect,m=a.useDebugValue;function d(y,p){var _=p(),E=r({inst:{value:_,getSnapshot:p}}),D=E[0].inst,M=E[1];return h(function(){D.value=_,D.getSnapshot=p,v(D)&&M({inst:D})},[y,_,p]),o(function(){return v(D)&&M({inst:D}),y(function(){v(D)&&M({inst:D})})},[y]),m(_),_}function v(y){var p=y.getSnapshot;y=y.value;try{var _=p();return!c(y,_)}catch{return!0}}function S(y,p){return p()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?S:d;return th.useSyncExternalStore=a.useSyncExternalStore!==void 0?a.useSyncExternalStore:b,th}var eg;function DT(){return eg||(eg=1,Wf.exports=NT()),Wf.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ng;function MT(){if(ng)return $f;ng=1;var a=es(),i=DT();function c(S,b){return S===b&&(S!==0||1/S===1/b)||S!==S&&b!==b}var r=typeof Object.is=="function"?Object.is:c,o=i.useSyncExternalStore,h=a.useRef,m=a.useEffect,d=a.useMemo,v=a.useDebugValue;return $f.useSyncExternalStoreWithSelector=function(S,b,y,p,_){var E=h(null);if(E.current===null){var D={hasValue:!1,value:null};E.current=D}else D=E.current;E=d(function(){function K(G){if(!w){if(w=!0,L=G,G=p(G),_!==void 0&&D.hasValue){var V=D.value;if(_(V,G))return X=V}return X=G}if(V=X,r(L,G))return V;var F=p(G);return _!==void 0&&_(V,F)?(L=G,V):(L=G,X=F)}var w=!1,L,X,Y=y===void 0?null:y;return[function(){return K(b())},Y===null?void 0:function(){return K(Y())}]},[b,y,p,_]);var M=o(S,E[0],E[1]);return m(function(){D.hasValue=!0,D.value=M},[M]),v(M),M},$f}var lg;function xT(){return lg||(lg=1,Pf.exports=MT()),Pf.exports}var UT=xT();function wT(a,i){return a===i}function Vl(a,i=r=>r,c){const r=(c==null?void 0:c.compare)??wT,o=tt.useCallback(m=>{const{unsubscribe:d}=a.subscribe(m);return d},[a]),h=tt.useCallback(()=>a.get(),[a]);return UT.useSyncExternalStoreWithSelector(o,h,h,i,r)}var ag={};function jT(a,i){const c=tt.useRef();return r=>{const o=a!=null&&a.select?a.select(r):r;return(a==null?void 0:a.structuralSharing)??i.options.defaultStructuralSharing?c.current=ql(c.current,o):o}}function Aa(a){const i=Dn(),c=tt.useContext(a.from?TT:er),r=a.from??c,o=i.stores.getMatchStore(r),h=jT(a,i),m=Vl(o,d=>d?h(d):ag);if(m!==ag)return m;(a.shouldThrow??!0)&&jh()}function cS(a){return Aa({from:a.from,strict:a.strict,structuralSharing:a.structuralSharing,select:i=>a.select?a.select(i.loaderData):i.loaderData})}function rS(a){const{select:i,...c}=a;return Aa({...c,select:r=>i?i(r.loaderDeps):r.loaderDeps})}function oS(a){return Aa({from:a.from,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,strict:a.strict,select:i=>{const c=a.strict===!1?i.params:i._strictParams;return a.select?a.select(c):c}})}function fS(a){return Aa({from:a.from,strict:a.strict,shouldThrow:a.shouldThrow,structuralSharing:a.structuralSharing,select:i=>a.select?a.select(i.search):i.search})}function hS(a){const i=Dn();return tt.useCallback(c=>i.navigate({...c,from:c.from??(a==null?void 0:a.from)}),[a==null?void 0:a.from,i])}function dS(a){return Aa({...a,select:i=>a.select?a.select(i.context):i.context})}function HT(...a){const i=tt.useRef(a),c=i.current;return a.forEach((r,o)=>{$n(c[o],r,!1,!0)||(c[o]=r)}),i.current}function Qc(a,i){a.preloadRoute(i).catch(c=>{console.warn(c),console.warn(yT)})}var LT={compare:(a,i)=>a[0]===i[0]&&a[1]===i[1]};function BT(a,i){const c=typeof a=="string"&&Ku(a);if(c)return i.has(c)?a:null}function qT(a,i,c,r,o){const h=Uv(a.pathname,r),m=Uv(i.pathname,r);return(c!=null&&c.exact?h!==m:!(h.startsWith(m)&&(h.length===m.length||h[m.length]==="/")))||((c==null?void 0:c.includeSearch)??!0)&&!$n(a.search,i.search,!(c!=null&&c.exact),c==null?void 0:c.explicitUndefined)?!1:c!=null&&c.includeHash?o&&a.hash===i.hash:!0}function QT(a,i,c){const r=Dn(),o=tt.useRef(null),h=tt.useCallback(I=>{if(o.current=I,typeof i=="function")return i(I);i&&(i.current=I)},[i]),{activeOptions:m,to:d,preload:v,preloadDelay:S,hashScrollIntoView:b,replace:y,startTransition:p,resetScroll:_,viewTransition:E,ignoreBlocker:D,disabled:M,target:K,onClick:w,onBlur:L,onFocus:X,onMouseEnter:Y,onMouseLeave:G,onTouchStart:V}=a,F=aS(),[Q,k,rt]=HT(a.search,a.params,m),[ft,bt]=tt.useMemo(()=>[a,{...a}],[r,a.from,a._fromLocation,a.hash,a.to,Q,k,a.state,a.mask,a.unsafeRelative]),mt=tt.useCallback(I=>{const yt=BT(d,r.protocolAllowlist);if(yt!==void 0)return[yt??void 0];ft._fromLocation||(bt._fromLocation=I);const Rt=r.buildLocation(bt),At=KT(Rt,r,M);return[At,!M&&(!At||Ku(At))?void 0:qT(I,Rt,rt,r.basepath,F)]},[rt,M,F,ft,bt,r,d]),[st,Z]=Vl(r.stores.location,mt,LT),$=Z===void 0?st:void 0,et=M||st===void 0,Dt=tt.useRef(!1),pt=a.reloadDocument||$||et?!1:v??r.options.defaultPreload,Se=S??r.options.defaultPreloadDelay??0,Re=tt.useCallback(I=>{const yt=I==null?void 0:I.isIntersecting;if(!(yt??pt==="intent")){yt===!1&&eh(o);return}if(!Se){Qc(r,ft);return}Vu.has(o)||Vu.set(o,setTimeout(()=>{Vu.delete(o),Qc(r,ft)},Se))},[r,ft,o,pt,Se]);tt.useEffect(()=>{pt==="render"&&!Dt.current&&(Dt.current=!0,Qc(r,ft));let I;return pt==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(I=new IntersectionObserver(yt=>Re(yt.pop()),{rootMargin:"100px"}),I.observe(o.current)),()=>{I==null||I.disconnect(),eh(o)}},[r,ft,pt,Re,o]);const ne=VT(a,c);if(ne.ref=i?h:o,$)return ne.href=$,ne;const R=I=>{const yt=K??I.currentTarget.getAttribute("target");!et&&!(I.metaKey||I.altKey||I.ctrlKey||I.shiftKey)&&!I.defaultPrevented&&(!yt||yt==="_self")&&I.button===0&&(I.preventDefault(),r.navigate({...ft,replace:y,resetScroll:_,hashScrollIntoView:b,startTransition:p,viewTransition:E,ignoreBlocker:D}))},J=()=>{pt==="intent"&&Qc(r,ft)},it=()=>{pt==="intent"&&eh(o)};return ne.onClick=bi(w,R),ne.onBlur=bi(L,it),ne.onFocus=bi(X,Re),ne.onMouseEnter=bi(Y,Re),ne.onMouseLeave=bi(G,it),ne.onTouchStart=bi(V,J),XT(ne,a,Z,st,et,c)}var YT={},GT={className:"active"},mS=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","_fromLocation","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function VT(a,i){const c={};for(const r in a)mS.has(r)||r==="type"&&i!==void 0||r==="disabled"&&i==="a"||(c[r]=a[r]);return c}function XT(a,i,c,r,o,h){const{activeProps:m,inactiveProps:d,className:v,style:S,target:b}=i,y=Lg(c?m:d,{})??(c?GT:YT);Object.assign(a,y),a.href=r,h!=="a"&&(a.disabled=o),a.target=b;const p=y.style;(S||p)&&(a.style=S&&p?{...S,...p}:S||p);const _=y.className;return(v||_)&&(a.className=v?_?`${v} ${_}`:v:_),o&&(a.role="link",a["aria-disabled"]=!0),c&&(a["data-status"]="active",a["aria-current"]="page"),a}var Vu=new WeakMap,eh=a=>{clearTimeout(Vu.get(a)),Vu.delete(a)},bi=(a,i)=>a?c=>c.defaultPrevented||(a(c),c.defaultPrevented||i(c)):i;function KT(a,i,c){if(c)return;const r=a.maskedLocation??a,o=r.external?r.publicHref:i.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Qg(o,i.protocolAllowlist)))return o}var Ti=tt.memo(tt.forwardRef((a,i)=>{const c=a._asChild||"a",r=QT(a,i,c),o=typeof a.children=="function"?a.children({isActive:r["data-status"]==="active"}):a.children;return tt.createElement(c,r,o)}),ZT);function ZT(a,i){let c=0;for(const r in i)if(c++,a[r]!==i[r]&&(!mS.has(r)||!$n(a[r],i[r],!1,!0)))return!1;for(const r in a)c--;return c===0}var JT=class extends lS{constructor(a){super(a),this.useMatch=i=>Aa({...i,from:this.id}),this.useRouteContext=i=>dS({...i,from:this.id}),this.useSearch=i=>fS({...i,from:this.id}),this.useParams=i=>oS({...i,from:this.id}),this.useLoaderDeps=i=>rS({...i,from:this.id}),this.useLoaderData=i=>cS({...i,from:this.id}),this.useNavigate=()=>hS({from:this.fullPath}),this.Link=$c.forwardRef((i,c)=>H.jsx(Ti,{ref:c,from:this.fullPath,...i}))}};function Xh(a){return new JT(a)}var FT=class extends vT{constructor(a){super(a),this.useMatch=i=>Aa({...i,from:this.id}),this.useRouteContext=i=>dS({...i,from:this.id}),this.useSearch=i=>fS({...i,from:this.id}),this.useParams=i=>oS({...i,from:this.id}),this.useLoaderDeps=i=>rS({...i,from:this.id}),this.useLoaderData=i=>cS({...i,from:this.id}),this.useNavigate=()=>hS({from:this.fullPath}),this.Link=$c.forwardRef((i,c)=>H.jsx(Ti,{ref:c,from:this.fullPath,...i}))}};function kT(a){return new FT(a)}function IT(a){const i=Dn(),c=`not-found-${Vl(i.stores.location,r=>r.pathname)}-${Vl(i.stores.status)}`;return H.jsx(Vh,{getResetKey:()=>c,onCatch:(r,o)=>{var h;if(Yi(r))(h=a.onCatch)==null||h.call(a,r,o);else throw r},errorComponent:({error:r})=>{var o;if(Yi(r))return(o=a.fallback)==null?void 0:o.call(a,r);throw r},children:a.children})}function PT(){return H.jsx("p",{children:"Not Found"})}function _i(a){return H.jsx(H.Fragment,{children:a.children})}function yS(a,i,c){return i.options.notFoundComponent?H.jsx(i.options.notFoundComponent,{...c}):a.options.defaultNotFoundComponent?H.jsx(a.options.defaultNotFoundComponent,{...c}):H.jsx(PT,{})}function nr(a,i){const c=(i==null?void 0:i.options.pendingComponent)??a.options.defaultPendingComponent;return c?H.jsx(c,{}):null}var $T=(a,i)=>a[0]===i[0]&&a[1]===i[1],vS=(a,i,c)=>!i.isRoot||i.options.shellComponent||i.options.wrapInSuspense||c===!1||c==="data-only"||!a.ssr,gS=tt.memo(function({routeId:i}){const c=Dn();return H.jsx(WT,{router:c,match:Vl(c.stores.getMatchStore(i))})});function WT({router:a,match:i}){var y,p;const c=a.routesById[i.routeId],r=nr(a,c),o=c.options.errorComponent??a.options.defaultErrorComponent,h=c.options.onCatch??a.options.defaultOnCatch,m=c.isRoot?c.options.notFoundComponent??((y=a.options.notFoundRoute)==null?void 0:y.options.component):c.options.notFoundComponent,d=i.ssr===!1||i.ssr==="data-only",v=vS(a,c,i.ssr)&&(c.options.wrapInSuspense??r??(((p=c.options.errorComponent)==null?void 0:p.preload)||d))?tt.Suspense:_i,S=o?Vh:_i,b=m?IT:_i;return H.jsxs(c.isRoot?c.options.shellComponent??_i:_i,{children:[H.jsx(er.Provider,{value:i.routeId,children:H.jsx(v,{fallback:r,children:H.jsx(S,{getResetKey:()=>i,errorComponent:o,onCatch:(_,E)=>{if(Yi(_))throw _.routeId??(_.routeId=i.routeId),_;h==null||h(_,E)},children:H.jsx(b,{fallback:_=>{if(_.routeId??(_.routeId=i.routeId),_.routeId!==i.routeId)throw _;return tt.createElement(m,_)},children:d?H.jsx(bT,{fallback:r,children:H.jsx(ig,{match:i})}):H.jsx(ig,{match:i})})})})}),null]})}var ig=tt.memo(function({match:i}){const c=Dn(),r=i.routeId,o=c.routesById[r],h=tt.useMemo(()=>{var v;const d=(v=o.options.remountDeps??c.options.defaultRemountDeps)==null?void 0:v({routeId:r,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return d?JSON.stringify(d):void 0},[r,i.loaderDeps,i._strictParams,i._strictSearch,o.options.remountDeps,c.options.defaultRemountDeps]),m=tt.useMemo(()=>{const d=o.options.component??c.options.defaultComponent;return d?H.jsx(d,{},h):H.jsx(SS,{})},[h,o.options.component,c.options.defaultComponent]);if(i.status==="pending"){if(c.ssr&&!vS(c,o,i.ssr))return m;if(c._tx)throw c._tx[5];return nr(c,o)}if(i.status==="notFound")return yS(c,o,i.error);if(i.status==="error")throw i.error;return m}),SS=tt.memo(function(){const i=Dn(),c=tt.useContext(er);let r,o,h;{const d=i.stores.getMatchStore(c);[r,o]=Vl(d,v=>[!!v._notFound,v.error],{compare:$T}),h=Vl(i.stores.ids,v=>v[v.indexOf(c)+1])}if(r)return yS(i,i.routesById[c],o);if(!h)return null;const m=H.jsx(gS,{routeId:h});return c===Ci?H.jsx(tt.Suspense,{fallback:nr(i),children:m}):m});function pS(a,i){const c=a[1];a.length=0,c==null||c(i)}function tE({t:a}){const i=Dn(),c=i._rendered??(i._rendered=[]);return i.startTransition=(r,o)=>new Promise(h=>{pS(c,!1),c.push(o,h),a(i),tt.startTransition(r)}),Hg(()=>{const r=i.history.subscribe(i.load);i.updateLatestLocation();const o=i.latestLocation,h=i.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(zn(o.publicHref)!==zn(h.publicHref))return i.commitLocation({...h,replace:!0,ignoreBlocker:!0}),r;const m=i.stores.resolvedLocation.get();return(m==null?void 0:m.href)===o.href&&m.state.__TSR_key===o.state.__TSR_key?c.push(i.stores.matches.get(),d=>{d&&i.emit({type:"onRendered",...Wc(m,m)})}):i._tx||i.load({sync:!0}).catch(console.error),r},[i,i.history]),null}function eE(){const a=Dn(),i=a.routesById[Ci],c=nr(a,i),r=a.ssr?_i:tt.Suspense,o=H.jsxs(H.Fragment,{children:[H.jsx(tE,{t:tt.useState()[1]}),H.jsx(r,{fallback:c,children:H.jsx(nE,{})})]});return a.options.InnerWrap?H.jsx(a.options.InnerWrap,{children:o}):o}function nE(){const a=Dn(),i=a._rendered,c=Vl(a.stores.matches,m=>i[0]??m),r=c[0],o=r==null?void 0:r.routeId;Hg(()=>{i[0]===c&&pS(i,!0)},[i,c]);const h=o?H.jsx(gS,{routeId:o}):null;return H.jsx(er.Provider,{value:o,children:a.options.disableGlobalCatchBoundary?h:H.jsx(Vh,{getResetKey:()=>r,onCatch:void 0,children:h})})}var lE=a=>({createMutableStore:Wv,createReadonlyStore:Wv,batch:AT}),aE=a=>new iE(a),iE=class extends tT{constructor(a){super(a,lE)}};function uE({router:a,children:i,...c}){Bg(c)&&a.update({...a.options,...c,context:{...a.options.context,...c.context}});const r=H.jsx(iS.Provider,{value:a,children:i});return a.options.Wrap?H.jsx(a.options.Wrap,{children:r}):r}function sE({router:a,...i}){return H.jsx(uE,{router:a,...i,children:H.jsx(eE,{})})}var nh={exports:{}},Qu={},lh={exports:{}},ah={};/** * @license React * scheduler.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ug;function cE(){return ug||(ug=1,(function(a){function i(Z,$){var et=Z.length;Z.push($);t:for(;0>>1,pt=Z[Dt];if(0>>1;Dto(ne,et))Ro(J,ne)?(Z[Dt]=J,Z[R]=et,Dt=R):(Z[Dt]=ne,Z[Re]=et,Dt=Re);else if(Ro(J,et))Z[Dt]=J,Z[R]=et,Dt=R;else break t}}return $}function o(Z,$){var et=Z.sortIndex-$.sortIndex;return et!==0?et:Z.id-$.id}if(a.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;a.unstable_now=function(){return h.now()}}else{var m=Date,d=m.now();a.unstable_now=function(){return m.now()-d}}var v=[],S=[],b=1,y=null,p=3,_=!1,E=!1,D=!1,M=!1,K=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function X(Z){for(var $=c(S);$!==null;){if($.callback===null)r(S);else if($.startTime<=Z)r(S),$.sortIndex=$.expirationTime,i(v,$);else break;$=c(S)}}function Y(Z){if(D=!1,X(Z),!E)if(c(v)!==null)E=!0,G||(G=!0,ft());else{var $=c(S);$!==null&&st(Y,$.startTime-Z)}}var G=!1,V=-1,F=5,Q=-1;function k(){return M?!0:!(a.unstable_now()-QZ&&k());){var Dt=y.callback;if(typeof Dt=="function"){y.callback=null,p=y.priorityLevel;var pt=Dt(y.expirationTime<=Z);if(Z=a.unstable_now(),typeof pt=="function"){y.callback=pt,X(Z),$=!0;break e}y===c(v)&&r(v),X(Z)}else r(v);y=c(v)}if(y!==null)$=!0;else{var Se=c(S);Se!==null&&st(Y,Se.startTime-Z),$=!1}}break t}finally{y=null,p=et,_=!1}$=void 0}}finally{$?ft():G=!1}}}var ft;if(typeof L=="function")ft=function(){L(rt)};else if(typeof MessageChannel<"u"){var bt=new MessageChannel,mt=bt.port2;bt.port1.onmessage=rt,ft=function(){mt.postMessage(null)}}else ft=function(){K(rt,0)};function st(Z,$){V=K(function(){Z(a.unstable_now())},$)}a.unstable_IdlePriority=5,a.unstable_ImmediatePriority=1,a.unstable_LowPriority=4,a.unstable_NormalPriority=3,a.unstable_Profiling=null,a.unstable_UserBlockingPriority=2,a.unstable_cancelCallback=function(Z){Z.callback=null},a.unstable_forceFrameRate=function(Z){0>Z||125Dt?(Z.sortIndex=et,i(S,Z),c(v)===null&&Z===c(S)&&(D?(w(V),V=-1):D=!0,st(Y,et-Dt))):(Z.sortIndex=pt,i(v,Z),E||_||(E=!0,G||(G=!0,ft()))),Z},a.unstable_shouldYield=k,a.unstable_wrapCallback=function(Z){var $=p;return function(){var et=p;p=$;try{return Z.apply(this,arguments)}finally{p=et}}}})(ah)),ah}var sg;function rE(){return sg||(sg=1,lh.exports=cE()),lh.exports}var ih={exports:{}},me={};/** * @license React * react-dom.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var cg;function oE(){if(cg)return me;cg=1;var a=es();function i(b){var y="https://react.dev/errors/"+b;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),ih.exports=oE(),ih.exports}/** * @license React * react-dom-client.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var og;function hE(){if(og)return Qu;og=1;var a=rE(),i=es(),c=fE();function r(t){var e="https://react.dev/errors/"+t;if(1za||(t.current=ar[za],ar[za]=null,za--)}function Qt(t,e){za++,ar[za]=t.current,t.current=e}var hn=fn(null),Vi=fn(null),tl=fn(null),ls=fn(null);function as(t,e){switch(Qt(tl,e),Qt(Vi,t),Qt(hn,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?R0(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=R0(e),t=A0(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}se(hn),Qt(hn,t)}function Na(){se(hn),se(Vi),se(tl)}function ir(t){var e=t.memoizedState;e!==null&&(vi._currentValue=e.memoizedState,Qt(ls,t)),e=hn.current;var n=A0(e,t.type);e!==n&&(Qt(Vi,t),Qt(hn,n))}function is(t){Vi.current===t&&(se(hn),se(Vi)),ls.current===t&&(se(ls),vi._currentValue=Mn)}var ur,Jh;function el(t){if(ur===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ur=e&&e[1]||"",Jh=-1)":-1u||T[l]!==N[u]){var j=` `+T[l].replace(" at new "," at ");return t.displayName&&j.includes("")&&(j=j.replace("",t.displayName)),j}while(1<=l&&0<=u);break}}}finally{sr=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?el(n):""}function NS(t,e){switch(t.tag){case 26:case 27:case 5:return el(t.type);case 16:return el("Lazy");case 13:return t.child!==e&&e!==null?el("Suspense Fallback"):el("Suspense");case 19:return el("SuspenseList");case 0:case 15:return cr(t.type,!1);case 11:return cr(t.type.render,!1);case 1:return cr(t.type,!0);case 31:return el("Activity");case 30:return el("ViewTransition");default:return""}}function Fh(t){try{var e="",n=null;do e+=NS(t,n),n=t,t=t.return;while(t);return e}catch(l){return` Error generating stack: `+l.message+` `+l.stack}}var rr=Object.prototype.hasOwnProperty,or=a.unstable_scheduleCallback,fr=a.unstable_cancelCallback,DS=a.unstable_shouldYield,MS=a.unstable_requestPaint,je=a.unstable_now,xS=a.unstable_getCurrentPriorityLevel,kh=a.unstable_ImmediatePriority,Ih=a.unstable_UserBlockingPriority,us=a.unstable_NormalPriority,US=a.unstable_LowPriority,Ph=a.unstable_IdlePriority,wS=a.log,jS=a.unstable_setDisableYieldValue,Xi=null,He=null;function nl(t){if(typeof wS=="function"&&jS(t),He&&typeof He.setStrictMode=="function")try{He.setStrictMode(Xi,t)}catch{}}var Le=Math.clz32?Math.clz32:BS,HS=Math.log,LS=Math.LN2;function BS(t){return t>>>=0,t===0?32:31-(HS(t)/LS|0)|0}var ss=256,cs=262144,rs=4194304;function Xl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function os(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var u=0,s=t.suspendedLanes,f=t.pingedLanes;t=t.warmLanes;var g=l&134217727;return g!==0?(l=g&~s,l!==0?u=Xl(l):(f&=g,f!==0?u=Xl(f):n||(n=g&~t,n!==0&&(u=Xl(n))))):(g=l&~s,g!==0?u=Xl(g):f!==0?u=Xl(f):n||(n=l&~t,n!==0&&(u=Xl(n)))),u===0?0:e!==0&&e!==u&&(e&s)===0&&(s=u&-u,n=e&-e,s>=n||s===32&&(n&4194048)!==0)?e:u}function Ki(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function $h(t,e){(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0n;n++)e.push(t);return e}function Zi(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function QS(t,e,n,l,u,s){var f=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var g=t.entanglements,T=t.expirationTimes,N=t.hiddenUpdates;for(n=f&~n;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tr=!1;if(wn)try{var Ii={};Object.defineProperty(Ii,"passive",{get:function(){Tr=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{Tr=!1}var ll=null,Er=null,vs=null;function Td(){if(vs)return vs;var t,e=Er,n=e.length,l,u="value"in ll?ll.value:ll.textContent,s=u.length;for(t=0;t=Wi),zd=" ",Nd=!1;function Dd(t,e){switch(t){case"keyup":return T1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Md(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ba=!1;function O1(t,e){switch(t){case"compositionend":return Md(e);case"keypress":return e.which!==32?null:(Nd=!0,zd);case"textInput":return t=e.data,t===zd&&Nd?null:t;default:return null}}function C1(t,e){if(Ba)return t==="compositionend"||!zr&&Dd(t,e)?(t=Td(),vs=Er=ll=null,Ba=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function qd(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Qd(t,e){var n=qd(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=qd(n)}}function Yd(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Yd(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Gd(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Mr(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Mr(t.document)}return e}function xr(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var U1=wn&&"documentMode"in document&&11>=document.documentMode,qa=null,Ur=null,lu=null,wr=!1;function Vd(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||qa==null||qa!==Mr(l)||(l=qa,"selectionStart"in l&&xr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),lu&&nu(lu,l)||(lu=l,l=_c(Ur,"onSelect"),0>=f,u-=f,mn=1<<32-Le(e)+u|n<ot?(Wt=ut,ut=null):Wt=ut.sibling;var Nt=A(z,ut,x[ot],B);if(Nt===null){ut===null&&(ut=Wt);break}t&&ut&&Nt.alternate===null&&e(z,ut),O=s(Nt,O,ot),Ot===null?nt=Nt:Ot.sibling=Nt,Ot=Nt,ut=Wt}if(ot===x.length)return n(z,ut),St&&Bn(z,ot),nt;if(ut===null){for(;otot?(Wt=ut,ut=null):Wt=ut.sibling;var zl=A(z,ut,Nt.value,B);if(zl===null){ut===null&&(ut=Wt);break}t&&ut&&zl.alternate===null&&e(z,ut),O=s(zl,O,ot),Ot===null?nt=zl:Ot.sibling=zl,Ot=zl,ut=Wt}if(Nt.done)return n(z,ut),St&&Bn(z,ot),nt;if(ut===null){for(;!Nt.done;ot++,Nt=x.next())Nt=q(z,Nt.value,B),Nt!==null&&(O=s(Nt,O,ot),Ot===null?nt=Nt:Ot.sibling=Nt,Ot=Nt);return St&&Bn(z,ot),nt}for(ut=l(ut);!Nt.done;ot++,Nt=x.next())Nt=U(ut,z,ot,Nt.value,B),Nt!==null&&(t&&(Wt=Nt.alternate,Wt!==null&&ut.delete(Wt.key===null?ot:Wt.key)),O=s(Nt,O,ot),Ot===null?nt=Nt:Ot.sibling=Nt,Ot=Nt);return t&&ut.forEach(function(Ob){return e(z,Ob)}),St&&Bn(z,ot),nt}function gt(z,O,x,B){if(typeof x=="object"&&x!==null&&x.type===rt&&x.key===null&&x.props.ref===void 0&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Q:t:{for(var nt=x.key;O!==null;){if(O.key===nt){if(nt=x.type,nt===rt){if(O.tag===7){n(z,O.sibling),B=u(O,x.props.children),rl(B,x),B.return=z,z=B;break t}}else if(O.elementType===nt||typeof nt=="object"&&nt!==null&&nt.$$typeof===pt&&la(nt)===O.type){n(z,O.sibling),B=u(O,x.props),rl(B,x),B.return=z,z=B;break t}n(z,O);break}else e(z,O);O=O.sibling}x.type===rt?(B=Il(x.props.children,z.mode,B,x.key),rl(B,x),B.return=z,z=B):(B=Rs(x.type,x.key,x.props,null,z.mode,B),rl(B,x),B.return=z,z=B)}return f(z);case k:t:{for(nt=x.key;O!==null;){if(O.key===nt)if(O.tag===4&&O.stateNode.containerInfo===x.containerInfo&&O.stateNode.implementation===x.implementation){n(z,O.sibling),B=u(O,x.children||[]),B.return=z,z=B;break t}else{n(z,O);break}else e(z,O);O=O.sibling}B=Yr(x,z.mode,B),B.return=z,z=B}return f(z);case pt:return x=la(x),gt(z,O,x,B)}if(At(x))return P(z,O,x,B);if(I(x)){if(nt=I(x),typeof nt!="function")throw Error(r(150));return x=nt.call(x),lt(z,O,x,B)}if(typeof x.then=="function")return gt(z,O,Hs(x),B);if(x.$$typeof===st)return gt(z,O,xs(z,x),B);Ls(z,x)}return typeof x=="string"&&x!==""||typeof x=="number"||typeof x=="bigint"?(x=""+x,O!==null&&O.tag===6?(n(z,O.sibling),B=u(O,x),B.return=z,z=B):(n(z,O),B=Qr(x,z.mode,B),B.return=z,z=B),f(z)):n(z,O)}return function(z,O,x,B){try{ru=0;var nt=gt(z,O,x,B);return Fa=null,nt}catch(ut){if(ut===Ja||ut===ws)throw ut;var Ot=ze(29,ut,null,z.mode);return Ot.lanes=B,Ot.return=z,Ot}finally{}}}var ia=dm(!0),mm=dm(!1),ol=!1;function Pr(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $r(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function fl(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function hl(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(xt&2)!==0){var u=l.pending;return u===null?e.next=e:(e.next=u.next,u.next=e),l.pending=e,e=Cs(t),Pd(t,null,n),e}return Os(t,l,e,n),Cs(t)}function ou(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ed(t,n)}}function Wr(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var u=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var f={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?u=s=f:s=s.next=f,n=n.next}while(n!==null);s===null?u=s=e:s=s.next=e}else u=s=e;n={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:s,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var to=!1;function fu(){if(to){var t=Za;if(t!==null)throw t}}function hu(t,e,n,l){to=!1;var u=t.updateQueue;ol=!1;var s=u.firstBaseUpdate,f=u.lastBaseUpdate,g=u.shared.pending;if(g!==null){u.shared.pending=null;var T=g,N=T.next;T.next=null,f===null?s=N:f.next=N,f=T;var j=t.alternate;j!==null&&(j=j.updateQueue,g=j.lastBaseUpdate,g!==f&&(g===null?j.firstBaseUpdate=N:g.next=N,j.lastBaseUpdate=T))}if(s!==null){var q=u.baseState;f=0,j=N=T=null,g=s;do{var A=g.lane&-536870913,U=A!==g.lane;if(U?(Et&A)===A:(l&A)===A){A!==0&&A===ea&&(to=!0),j!==null&&(j=j.next={lane:0,tag:g.tag,payload:g.payload,callback:null,next:null});t:{var P=t,lt=g;A=e;var gt=n;switch(lt.tag){case 1:if(P=lt.payload,typeof P=="function"){q=P.call(gt,q,A);break t}q=P;break t;case 3:P.flags=P.flags&-65537|128;case 0:if(P=lt.payload,A=typeof P=="function"?P.call(gt,q,A):P,A==null)break t;q=V({},q,A);break t;case 2:ol=!0}}A=g.callback,A!==null&&(t.flags|=64,U&&(t.flags|=8192),U=u.callbacks,U===null?u.callbacks=[A]:U.push(A))}else U={lane:A,tag:g.tag,payload:g.payload,callback:g.callback,next:null},j===null?(N=j=U,T=q):j=j.next=U,f|=A;if(g=g.next,g===null){if(g=u.shared.pending,g===null)break;U=g,g=U.next,U.next=null,u.lastBaseUpdate=U,u.shared.pending=null}}while(!0);j===null&&(T=q),u.baseState=T,u.firstBaseUpdate=N,u.lastBaseUpdate=j,s===null&&(u.shared.lanes=0),pl|=f,t.lanes=f,t.memoizedState=q}}function ym(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function vm(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;ts?s:8;var f=at.T,g={};g.types=f!==null?f.types:null,at.T=g,_o(t,!1,e,n);try{var T=u(),N=at.S;if(N!==null&&N(g,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var j=X1(T,l);vu(t,e,j,Xe(t))}else vu(t,e,l,Xe(t))}catch(q){vu(t,e,{then:function(){},status:"rejected",reason:q},Xe())}finally{ht.p=s,f!==null&&g.types!==null&&(f.types=g.types),at.T=f}}function I1(){}function po(t,e,n,l){if(t.tag!==5)throw Error(r(476));var u=Fm(t).queue;Jm(t,u,e,Mn,n===null?I1:function(){return km(t),n(l)})}function Fm(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Mn,baseState:Mn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:Mn},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function km(t){var e=Fm(t);e.next===null&&(e=t.alternate.memoizedState),vu(t,e.next.queue,{},Xe())}function bo(){return re(vi)}function Im(){return kt().memoizedState}function Pm(){return kt().memoizedState}function P1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=Xe();t=fl(n);var l=hl(e,t,n);l!==null&&(xe(l,e,n),ou(l,e,n)),e={cache:Jr()},t.payload=e;return}e=e.return}}function $1(t,e,n){var l=Xe();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Js(t)?Wm(e,n):(n=Br(t,e,n,l),n!==null&&(xe(n,t,l),ty(n,e,l)))}function $m(t,e,n){var l=Xe();vu(t,e,n,l)}function vu(t,e,n,l){var u={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Js(t))Wm(e,u);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var f=e.lastRenderedState,g=s(f,n);if(u.hasEagerState=!0,u.eagerState=g,qe(g,f))return Os(t,e,u,0),qt===null&&Es(),!1}catch{}finally{}if(n=Br(t,e,u,l),n!==null)return xe(n,t,l),ty(n,e,l),!0}return!1}function _o(t,e,n,l){if(l={lane:2,revertLane:hf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Js(t)){if(e)throw Error(r(479))}else e=Br(t,n,l,2),e!==null&&xe(e,t,2)}function Js(t){var e=t.alternate;return t===vt||e!==null&&e===vt}function Wm(t,e){ka=Qs=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function ty(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ed(t,n)}}var Fs={readContext:re,use:Vs,useCallback:Jt,useContext:Jt,useEffect:Jt,useImperativeHandle:Jt,useLayoutEffect:Jt,useInsertionEffect:Jt,useMemo:Jt,useReducer:Jt,useRef:Jt,useState:Jt,useDebugValue:Jt,useDeferredValue:Jt,useTransition:Jt,useSyncExternalStore:Jt,useId:Jt,useHostTransitionStatus:Jt,useFormState:Jt,useActionState:Jt,useOptimistic:Jt,useMemoCache:Jt,useCacheRefresh:Jt,useEffectEvent:Jt},ey={readContext:re,use:Vs,useCallback:function(t,e){return be().memoizedState=[t,e===void 0?null:e],t},useContext:re,useEffect:Bm,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Ks(4194308,4,Gm.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Ks(4194308,4,t,e)},useInsertionEffect:function(t,e){Ks(4,2,t,e)},useMemo:function(t,e){var n=be();e=e===void 0?null:e;var l=t();if(ua){nl(!0);try{t()}finally{nl(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=be();if(n!==void 0){var u=n(e);if(ua){nl(!0);try{n(e)}finally{nl(!1)}}}else u=e;return l.memoizedState=l.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},l.queue=t,t=t.dispatch=$1.bind(null,vt,t),[l.memoizedState,t]},useRef:function(t){var e=be();return t={current:t},e.memoizedState=t},useState:function(t){t=mo(t);var e=t.queue,n=$m.bind(null,vt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:go,useDeferredValue:function(t,e){var n=be();return So(n,t,e)},useTransition:function(){var t=mo(!1);return t=Jm.bind(null,vt,t.queue,!0,!1),be().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=vt,u=be();if(St){if(n===void 0)throw Error(r(407));n=n()}else{if(n=e(),qt===null)throw Error(r(349));(Et&127)!==0||Tm(l,e,n)}u.memoizedState=n;var s={value:n,getSnapshot:e};return u.queue=s,Bm(Om.bind(null,l,s,t),[t]),l.flags|=2048,Pa(9,{destroy:void 0},Em.bind(null,l,s,n,e),null),n},useId:function(){var t=be(),e=qt.identifierPrefix;if(St){var n=yn,l=mn;n=(l&~(1<<32-Le(l)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Ys++,0<\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof l.is=="string"?f.createElement("select",{is:l.is}):f.createElement("select"),l.multiple?s.multiple=!0:l.size&&(s.size=l.size);break;default:s=typeof l.is=="string"?f.createElement(u,{is:l.is}):f.createElement(u)}}s[ce]=e,s[Ae]=l;t:for(f=e.child;f!==null;){if(f.tag===5||f.tag===6)s.appendChild(f.stateNode);else if(f.tag!==4&&f.tag!==27&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break t;for(;f.sibling===null;){if(f.return===null||f.return===e)break t;f=f.return}f.sibling.return=f.return,f=f.sibling}e.stateNode=s;t:switch(de(s,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&Xn(e)}}return Gt(e),e.subtreeFlags&=-33554433,wo(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&Xn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(r(166));if(t=tl.current,Ka(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,u=ae,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}t[ce]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||O0(t.nodeValue,n)),t||sl(e,!0)}else t=Nu(t).createTextNode(l),t[ce]=e,e.stateNode=t}return Gt(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(l=Ka(e),n!==null){if(t===null){if(!l)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ce]=e}else Pl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Gt(e),t=!1}else n=Xr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(Qe(e),e):(Qe(e),null);if((e.flags&128)!==0)throw Error(r(558))}return Gt(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=Ka(e),l!==null&&l.dehydrated!==null){if(t===null){if(!u)throw Error(r(318));if(u=e.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[ce]=e}else Pl(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;Gt(e),u=!1}else u=Xr(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return e.flags&256?(Qe(e),e):(Qe(e),null)}return Qe(e),(e.flags&128)!==0?(e.lanes=n,e):(n=l!==null,t=t!==null&&t.memoizedState!==null,n&&(l=e.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==u&&(l.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),tc(e,e.updateQueue),Gt(e),null);case 4:return Na(),t===null&&vf(e.stateNode.containerInfo),e.flags|=67108864,Gt(e),null;case 10:return Qn(e.type),Gt(e),null;case 19:if(ao(e),l=e.memoizedState,l===null)return Gt(e),null;if(u=(e.flags&128)!==0,s=l.rendering,s===null)if(u)Su(l,!1);else{if(Ft!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(s=qs(t),s!==null){for(e.flags|=128,Su(l,!1),t=s.updateQueue,e.updateQueue=t,tc(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)$d(n,t),n=n.sibling;return du(e,fe.current&1|2),St&&Bn(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&je()>hc&&(e.flags|=128,u=!0,Su(l,!1),e.lanes=4194304)}else{if(!u)if(t=qs(s),t!==null){if(e.flags|=128,u=!0,t=t.updateQueue,e.updateQueue=t,tc(e,t),Su(l,!0),l.tail===null&&l.tailMode!=="collapsed"&&l.tailMode!=="visible"&&!s.alternate&&!St)return Gt(e),null}else 2*je()-l.renderingStartTime>hc&&n!==536870912&&(e.flags|=128,u=!0,Su(l,!1),e.lanes=4194304);l.isBackwards?(s.sibling=e.child,e.child=s):(t=l.last,t!==null?t.sibling=s:e.child=s,l.last=s)}if(l.tail!==null){t=l.tail;t:{for(n=t;n!==null;){if(n.alternate!==null){n=!1;break t}n=n.sibling}n=!0}return l.rendering=t,l.tail=t.sibling,l.renderingStartTime=je(),t.sibling=null,s=fe.current,s=u?s&1|2:s&1,l.tailMode==="visible"||l.tailMode==="collapsed"||!n||St?du(e,s):(n=s,Qt(oe,e),Qt(fe,n),ve===null&&(ve=e)),St&&Bn(e,l.treeForkCount),t}return Gt(e),null;case 22:case 23:return Qe(e),no(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&(Gt(e),e.subtreeFlags&6&&(e.flags|=8192)):Gt(e),n=e.updateQueue,n!==null&&tc(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&se(na),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Qn(It),Gt(e),null;case 25:return null;case 30:return e.flags|=33554432,Gt(e),null}throw Error(r(156,e.tag))}function ip(t,e){switch(Gr(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Qn(It),Na(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return is(e),null;case 31:if(e.memoizedState!==null){if(Qe(e),e.alternate===null)throw Error(r(340));Pl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Qe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Pl()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ao(e),t=e.flags,t&65536?(e.flags=t&-65537|128,t=e.memoizedState,t!==null&&(t.rendering=null,t.tail=null),e.flags|=4,e):null;case 4:return Na(),null;case 10:return Qn(e.type),null;case 22:case 23:return Qe(e),no(),t!==null&&se(na),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Qn(It),null;case 25:return null;default:return null}}function Ry(t,e){switch(Gr(e),e.tag){case 3:Qn(It),Na();break;case 26:case 27:case 5:is(e);break;case 4:Na();break;case 31:e.memoizedState!==null&&Qe(e);break;case 13:Qe(e);break;case 19:ao(e);break;case 10:Qn(e.type);break;case 22:case 23:Qe(e),no(),t!==null&&se(na);break;case 24:Qn(It)}}function pu(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var u=l.next;n=u;do{if((n.tag&t)===t){l=void 0;var s=n.create,f=n.inst;l=s(),f.destroy=l}n=n.next}while(n!==u)}}catch(g){Ht(e,e.return,g)}}function vl(t,e,n){try{var l=e.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var s=u.next;l=s;do{if((l.tag&t)===t){var f=l.inst,g=f.destroy;if(g!==void 0){f.destroy=void 0,u=e;var T=n,N=g;try{N()}catch(j){Ht(u,T,j)}}}l=l.next}while(l!==s)}}catch(j){Ht(e,e.return,j)}}function Ay(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{vm(e,n)}catch(l){Ht(t,t.return,l)}}}function zy(t,e,n){n.props=sa(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){Ht(t,e,l)}}function vn(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:var u=t.stateNode,s=jn(t.memoizedProps,u);(u.ref===null||u.ref.name!==s)&&(u.ref=j0(s)),l=u.ref;break;case 7:if(t.stateNode===null){var f=new Ke(t);y(t.child,!1,kp,f,void 0,void 0),t.stateNode=f}l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(g){Ht(t,e,g)}}function he(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(u){Ht(t,e,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(u){Ht(t,e,u)}else n.current=null}function ec(t,e){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&e!==null)for(var n=0;n title"))),de(l,e,n),l[ce]=t,le(l),e=l;break t;case"link":if(s=$0("link","href",u).get(e+(n.href||""))){for(f=0;fgt&&(f=gt,gt=lt,lt=f);var z=Qd(g,lt),O=Qd(g,gt);if(z&&O&&(U.rangeCount!==1||U.anchorNode!==z.node||U.anchorOffset!==z.offset||U.focusNode!==O.node||U.focusOffset!==O.offset)){var x=q.createRange();x.setStart(z.node,z.offset),U.removeAllRanges(),lt>gt?(U.addRange(x),U.extend(O.node,O.offset)):(x.setEnd(O.node,O.offset),U.addRange(x))}}}}for(q=[],U=g;U=U.parentNode;)U.nodeType===1&&q.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof g.focus=="function"&&g.focus(),g=0;gn?32:n,at.T=null,n=ef,ef=null;var s=sn,f=Tn;if(Kt=0,fa=sn=null,Tn=0,(xt&6)!==0)throw Error(r(331));var g=xt;if(xt|=4,Py(s.current),Fy(s,s.current,f,n),xt=g,Ru(0,!1),He&&typeof He.onPostCommitFiberRoot=="function")try{He.onPostCommitFiberRoot(Xi,s)}catch{}return!0}finally{ht.p=u,at.T=l,h0(t,e)}}function d0(t,e,n){e=Fe(n,e),e=Oo(t.stateNode,e,2),t=hl(t,e,2),t!==null&&(Zi(t,2),En(t))}function Ht(t,e,n){if(t.tag===3)d0(t,t,n);else for(;e!==null;){if(e.tag===3){d0(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(bl===null||!bl.has(l))){t=Fe(n,t),n=ry(2),l=hl(e,n,2),l!==null&&(oy(n,l,e,t),Zi(l,2),En(l));break}}e=e.return}}function rf(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new rp;var u=new Set;l.set(e,u)}else u=l.get(e),u===void 0&&(u=new Set,l.set(e,u));u.has(n)||($o=!0,u.add(n),t=gp.bind(null,t,e,n),e.then(t,t))}function gp(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,qt===t&&(Et&n)===n&&((Ft===4||Ft===3&&(Et&62914560)===Et&&300>je()-fc)&&(xt&2)===0?ci(t,0):oc|=n,li===Et&&(li=0)),En(t)}function m0(t,e){e===0&&(e=Wh()),t=kl(t,e),t!==null&&(Zi(t,e),En(t))}function Sp(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),m0(t,n)}function pp(t,e){var n=0;switch(t.tag){case 31:case 13:var l=t.stateNode,u=t.memoizedState;u!==null&&(n=u.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(e),m0(t,n)}function bp(t,e){return or(t,e)}var oi=null,fi=null,of=!1,pc=!1,ff=!1,Tl=0;function En(t){t!==fi&&t.next===null&&(fi===null?oi=fi=t:fi=fi.next=t),pc=!0,of||(of=!0,Tp())}function Ru(t,e){if(!ff&&pc){ff=!0;do for(var n=!1,l=oi;l!==null;){if(t!==0){var u=l.pendingLanes;if(u===0)var s=0;else{var f=l.suspendedLanes,g=l.pingedLanes;s=(1<<31-Le(42|t)+1)-1,s&=u&~(f&~g),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,S0(l,s))}else s=Et,s=os(l,l===qt?s:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(s&3)===0||Ki(l,s)||(n=!0,S0(l,s));l=l.next}while(n);ff=!1}}function _p(){y0()}function y0(){pc=of=!1;var t=0;Tl!==0&&Up()&&(t=Tl);for(var e=je(),n=null,l=oi;l!==null;){var u=l.next,s=v0(l,e);s===0?(l.next=null,n===null?oi=u:n.next=u,u===null&&(fi=n)):(n=l,(t!==0||(s&3)!==0)&&(pc=!0)),l=u}Kt!==0&&Kt!==5||Ru(t),Tl!==0&&(Tl=0)}function v0(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,u=t.expirationTimes,s=t.pendingLanes&-62914561;0g)break;var j=T.transferSize,q=T.initiatorType;j&&C0(q)&&(T=T.responseEnd,f+=j*(TOc){lt.length=P;break}x=new Promise(qp.bind(x)),lt.push(x)}}}if(0"u"?null:document;function F0(t,e,n){var l=di;if(l&&typeof e=="string"&&e){var u=Ze(e);u='link[rel="'+t+'"][href="'+u+'"]',typeof n=="string"&&(u+='[crossorigin="'+n+'"]'),J0.has(u)||(J0.add(u),t={rel:t,crossOrigin:n,href:e},l.querySelector(u)===null&&(e=l.createElement("link"),de(e,"link",t),le(e),l.head.appendChild(e)))}}function ab(t){Zn.D(t),F0("dns-prefetch",t,null)}function ib(t,e){Zn.C(t,e),F0("preconnect",t,e)}function ub(t,e,n){Zn.L(t,e,n);var l=di;if(l&&t&&e){var u='link[rel="preload"][as="'+Ze(e)+'"]';e==="image"&&n&&n.imageSrcSet?(u+='[imagesrcset="'+Ze(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(u+='[imagesizes="'+Ze(n.imageSizes)+'"]')):u+='[href="'+Ze(t)+'"]';var s=u;switch(e){case"style":s=mi(t);break;case"script":s=yi(t)}if(!(tn.has(s)||(t=V({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),tn.set(s,t),l.querySelector(u)!==null||e==="style"&&l.querySelector(Mu(s))||e==="script"&&l.querySelector(xu(s))))){var f=l.createElement("link");de(f,"link",t),e==="style"&&(f[fs]=!0,f.onload=f.onerror=function(){sd(f)}),le(f),l.head.appendChild(f)}}}function sb(t,e){Zn.m(t,e);var n=di;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",u='link[rel="modulepreload"][as="'+Ze(l)+'"][href="'+Ze(t)+'"]',s=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=yi(t)}if(!tn.has(s)&&(t=V({rel:"modulepreload",href:t},e),tn.set(s,t),n.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(xu(s)))return}l=n.createElement("link"),de(l,"link",t),le(l),n.head.appendChild(l)}}}function cb(t,e,n){Zn.S(t,e,n);var l=di;if(l&&t){var u=xa(l).hoistableStyles,s=mi(t);e=e||"default";var f=u.get(s);if(!f){var g={loading:0,preload:null};if(f=l.querySelector(Mu(s)))g.loading=5;else{t=V({rel:"stylesheet",href:t,"data-precedence":e},n),(n=tn.get(s))&&xf(t,n);var T=f=l.createElement("link");le(T),de(T,"link",t),T._p=new Promise(function(N,j){T.onload=N,T.onerror=j}),T.addEventListener("load",function(){g.loading|=1}),T.addEventListener("error",function(){g.loading|=2}),g.loading|=4,Tc(f,e,l)}f={type:"stylesheet",instance:f,count:1,state:g},u.set(s,f)}}}function rb(t,e){Zn.X(t,e);var n=di;if(n&&t){var l=xa(n).hoistableScripts,u=yi(t),s=l.get(u);s||(s=n.querySelector(xu(u)),s||(t=V({src:t,async:!0},e),(e=tn.get(u))&&Uf(t,e),s=n.createElement("script"),le(s),de(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(u,s))}}function ob(t,e){Zn.M(t,e);var n=di;if(n&&t){var l=xa(n).hoistableScripts,u=yi(t),s=l.get(u);s||(s=n.querySelector(xu(u)),s||(t=V({src:t,async:!0,type:"module"},e),(e=tn.get(u))&&Uf(t,e),s=n.createElement("script"),le(s),de(s,"link",t),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},l.set(u,s))}}function k0(t,e,n,l){var u=(u=tl.current)?Du(u):null;if(!u)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=mi(n.href),e=xa(u).hoistableStyles,l=e.get(n),l||(l={type:"style",instance:null,count:0,state:null},e.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=mi(n.href);var s=xa(u).hoistableStyles,f=s.get(t);if(f||(u=u.ownerDocument||u,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(t,f),(s=u.querySelector(Mu(t)))?s._p||(f.instance=s,f.state.loading=5):(s=tn.get(t),s||(s={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},tn.set(t,s)),fb(u,t,s,f.state))),e&&l===null)throw Error(r(528,""));return f}if(e&&l!==null)throw Error(r(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(n=yi(n),e=xa(u).hoistableScripts,l=e.get(n),l||(l={type:"script",instance:null,count:0,state:null},e.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function mi(t){return'href="'+Ze(t)+'"'}function Mu(t){return'link[rel="stylesheet"]['+t+"]"}function I0(t){return V({},t,{"data-precedence":t.precedence,precedence:null})}function fb(t,e,n,l){if(e=t.querySelector('link[rel="preload"][as="style"]['+e+"]")){if(e[fs]!==!0){l.loading=1;return}}else e=t.createElement("link"),e[fs]=!0,e.onload=e.onerror=sd.bind(null,e),de(e,"link",n),le(e),t.head.appendChild(e);l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2})}function yi(t){return'[src="'+Ze(t)+'"]'}function xu(t){return"script[async]"+t}function P0(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+Ze(n.href)+'"]');if(l)return e.instance=l,le(l),l;var u=V({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),le(l),de(l,"style",u),Tc(l,n.precedence,t),e.instance=l;case"stylesheet":u=mi(n.href);var s=t.querySelector(Mu(u));if(s)return e.state.loading|=4,e.instance=s,le(s),s;l=I0(n),(u=tn.get(u))&&xf(l,u),s=(t.ownerDocument||t).createElement("link"),le(s);var f=s;return f._p=new Promise(function(g,T){f.onload=g,f.onerror=T}),de(s,"link",l),e.state.loading|=4,Tc(s,n.precedence,t),e.instance=s;case"script":return s=yi(n.src),(u=t.querySelector(xu(s)))?(e.instance=u,le(u),u):(l=n,(u=tn.get(s))&&(l=V({},n),Uf(l,u)),t=t.ownerDocument||t,u=t.createElement("script"),le(u),de(u,"link",l),t.head.appendChild(u),e.instance=u);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,Tc(l,n.precedence,t));return e.instance}function Tc(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,s=u,f=0;f title"):null)}function hb(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function W0(t,e){return t==="img"&&e.src!=null&&e.src!==""&&e.onLoad==null&&e.loading!=="lazy"}function tv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function ev(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function nv(t,e){typeof e.decode=="function"&&(t.imgCount++,e.complete||(t.imgBytes+=ev(e),t.suspenseyImages.push(e)),t=yb.bind(t),e.decode().then(t,t))}function db(t,e,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var u=mi(l.href),s=e.querySelector(Mu(u));if(s){e=s._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Uu.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=s,le(s);return}s=e.ownerDocument||e,l=I0(l),(u=tn.get(u))&&xf(l,u),s=s.createElement("link"),le(s);var f=s;f._p=new Promise(function(g,T){f.onload=g,f.onerror=T}),de(s,"link",l),n.instance=s}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=Uu.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var Oc=0;function mb(t,e){return t.stylesheets&&t.count===0&&Rc(t,t.stylesheets),0Oc?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function lv(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)Rc(t,t.stylesheets);else if(t.unsuspend){var e=t.unsuspend;t.unsuspend=null,e()}}}function Uu(){this.count--,lv(this)}function yb(){this.imgCount--,lv(this)}var Cc=null;function Rc(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Cc=new Map,e.forEach(vb,t),Cc=null,Uu.call(t))}function vb(t,e){if(!(e.state.loading&4)){var n=Cc.get(t);if(n)var l=n.get(null);else{n=new Map,Cc.set(t,n);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(a)}catch(i){console.error(i)}}return a(),nh.exports=hE(),nh.exports}var mE=dE();class Rh extends Error{constructor(c,r,o){super(r);Yf(this,"status");Yf(this,"body");this.name="ApiError",this.status=c,this.body=o}get isMissingEndpoint(){return this.status===404}}async function bS(a,i){let c;try{c=await fetch(`/api/v1${a}`,{credentials:"same-origin",headers:{Accept:"application/json",...i==null?void 0:i.headers},...i})}catch(h){throw new Rh(0,`Cannot reach the server: ${String(h)}`,null)}const r=await c.text();let o=null;if(r.length>0)try{o=JSON.parse(r)}catch{o=r}if(!c.ok)throw new Rh(c.status,`${c.status} ${c.statusText}`,o);return o}function Kh(a){return bS(a)}function hg(a,i){return bS(a,{method:"POST",headers:i===void 0?{}:{"Content-Type":"application/json"},body:i===void 0?void 0:JSON.stringify(i)})}function yE(){return Kh("/health")}function vE(a=60,i=0){return Kh(`/captures?limit=${a}&offset=${i}`)}const _S=tt.createContext(null);function gE(){return Uh({queryKey:["auth","session"],queryFn:async()=>{try{return await Kh("/auth/session")}catch(a){if(a instanceof Rh&&a.status===401)return null;throw a}},retry:!1,staleTime:6e4})}function SE({children:a}){const i=Cg(),c=gE(),r=tt.useMemo(()=>{var v;return c.isPending?{status:"loading"}:(v=c.error)!=null&&v.isMissingEndpoint?{status:"unavailable"}:c.data?{status:"authenticated",user:c.data}:{status:"anonymous"}},[c.isPending,c.error,c.data]),o=tt.useCallback(async v=>{const S=await hg("/auth/login",v);i.setQueryData(["auth","session"],S)},[i]),h=tt.useCallback(async()=>{await hg("/auth/logout"),i.setQueryData(["auth","session"],null),await i.invalidateQueries()},[i]),m=tt.useCallback((...v)=>r.status==="authenticated"&&v.includes(r.user.role),[r]),d=tt.useMemo(()=>({state:r,signIn:o,signOut:h,can:m}),[r,o,h,m]);return H.jsx(_S,{value:d,children:a})}function pE(){const a=tt.useContext(_S);if(a===null)throw new Error("useAuth must be used inside ");return a}const bE={"app.name":"poorBird","app.tagline":"Gartenvogel-Kamera","nav.gallery":"Galerie","nav.devices":"Geräte","nav.system":"System","common.loading":"Wird geladen…","common.retry":"Erneut versuchen","common.error":"Etwas ist schiefgelaufen","common.notMeasured":"—","common.yes":"Ja","common.no":"Nein","theme.label":"Design","theme.light":"Hell","theme.dark":"Dunkel","theme.blue":"Blau","lang.label":"Sprache","lang.en":"Englisch","lang.de":"Deutsch","auth.notEnforced":"Die Anmeldung ist noch nicht aktiv — die Auth-Endpunkte kommen in Phase 3.","auth.signIn":"Anmelden","auth.username":"Benutzername","auth.password":"Passwort","auth.totp":"Bestätigungscode","auth.totpHint":"Sechs Ziffern aus deiner Authenticator-App","auth.signingIn":"Anmeldung läuft…","auth.failed":"Anmeldung fehlgeschlagen. Benutzername und Passwort prüfen.","auth.unavailable":"Den Anmelde-Endpunkt gibt es noch nicht. Diese Seite ist die Hülle dafür.","gallery.title":"Galerie","gallery.count":"{n} Aufnahmen","gallery.preTrigger":"vor","gallery.preTrigger.hint":"Vor dem Auslöser aufgenommen, aus dem Ringpuffer der Kamera — meist die besseren Bilder, weil der Vogel noch im Anflug ist.","gallery.empty.title":"Noch keine Aufnahmen","gallery.empty.body":"Die Kamera hat noch nichts hochgeladen. Sobald sie sich registriert und ein Bild sendet, erscheint es hier.","devices.title":"Geräte","devices.empty.title":"Keine Geräte registriert","devices.empty.body":"Eine Kamera erscheint hier, sobald sie sich registriert hat. Das kommt in Phase 2.","system.title":"System","system.status":"Status","system.status.ok":"In Ordnung","system.status.degraded":"Eingeschränkt","system.version":"Version","system.uptime":"Laufzeit","system.database":"Datenbank","system.database.ok":"Verbunden","system.database.down":"Nicht erreichbar","system.devices":"Geräte","system.captures":"Aufnahmen","system.lastBackup":"Letzte Sicherung","system.lastBackup.never":"Nie","system.disk":"Bildspeicher","system.disk.free":"{free} frei von {total}","system.disk.unavailable":"Pfad nicht verfügbar","system.enrollSecret":"Registrierungs-Secret","system.enrollSecret.set":"Konfiguriert","system.enrollSecret.unset":"Nicht gesetzt","system.unreachable.title":"Server nicht erreichbar","system.unreachable.body":"Die API hat nicht geantwortet. Läuft sie auf Port 8090?"},_E={"app.name":"poorBird","app.tagline":"Garden bird camera","nav.gallery":"Gallery","nav.devices":"Devices","nav.system":"System","common.loading":"Loading…","common.retry":"Try again","common.error":"Something went wrong","common.notMeasured":"—","common.yes":"Yes","common.no":"No","theme.label":"Theme","theme.light":"Light","theme.dark":"Dark","theme.blue":"Blue","lang.label":"Language","lang.en":"English","lang.de":"German","auth.notEnforced":"Sign-in is not enforced yet — the auth endpoints arrive in Phase 3.","auth.signIn":"Sign in","auth.username":"Username","auth.password":"Password","auth.totp":"Authentication code","auth.totpHint":"Six digits from your authenticator app","auth.signingIn":"Signing in…","auth.failed":"Sign-in failed. Check your username and password.","auth.unavailable":"The sign-in endpoint does not exist yet. This screen is the shell it will use.","gallery.title":"Gallery","gallery.count":"{n} captures","gallery.preTrigger":"pre","gallery.preTrigger.hint":"Captured before the trigger fired, from the camera's ring buffer — usually the better frames, because the bird is still arriving.","gallery.empty.title":"No captures yet","gallery.empty.body":"The camera has not uploaded anything. Once it enrolls and posts a frame, it appears here.","devices.title":"Devices","devices.empty.title":"No devices enrolled","devices.empty.body":"A camera appears here after it enrolls. Enrollment arrives in Phase 2.","system.title":"System","system.status":"Status","system.status.ok":"Healthy","system.status.degraded":"Degraded","system.version":"Version","system.uptime":"Uptime","system.database":"Database","system.database.ok":"Connected","system.database.down":"Unreachable","system.devices":"Devices","system.captures":"Captures","system.lastBackup":"Last backup","system.lastBackup.never":"Never","system.disk":"Image storage","system.disk.free":"{free} free of {total}","system.disk.unavailable":"Path not available","system.enrollSecret":"Enrollment secret","system.enrollSecret.set":"Configured","system.enrollSecret.unset":"Not set","system.unreachable.title":"Cannot reach the server","system.unreachable.body":"The API did not respond. Is it running on port 8090?"},TS=["de","en"],TE={de:bE,en:_E},ES="poorbird.locale",OS=tt.createContext(null);function EE(a){return typeof a=="string"&&TS.includes(a)}function OE(){try{const a=localStorage.getItem(ES);if(EE(a))return a}catch{}return navigator.language.toLowerCase().startsWith("de")?"de":"en"}function CE(a,i){return i?a.replace(/\{(\w+)\}/g,(c,r)=>{const o=i[r];return o===void 0?c:String(o)}):a}function RE({children:a}){const[i,c]=tt.useState(OE);tt.useEffect(()=>{document.documentElement.lang=i;try{localStorage.setItem(ES,i)}catch{}},[i]);const r=tt.useCallback(m=>c(m),[]),o=tt.useCallback((m,d)=>CE(TE[i][m],d),[i]),h=tt.useMemo(()=>({locale:i,setLocale:r,t:o}),[i,r,o]);return H.jsx(OS,{value:h,children:a})}function Zh(){const a=tt.useContext(OS);if(a===null)throw new Error("useI18n must be used inside ");return a}function Gi(){return Zh().t}const AE={de:"lang.de",en:"lang.en"};function zE(){const{locale:a,setLocale:i,t:c}=Zh();return H.jsxs("label",{className:"picker",children:[H.jsx("span",{className:"visually-hidden",children:c("lang.label")}),H.jsx("select",{className:"select",value:a,onChange:r=>i(r.target.value),children:TS.map(r=>H.jsx("option",{value:r,children:c(AE[r])},r))})]})}const CS=["light","dark","blue"],NE="poorbird.theme",RS=tt.createContext(null);function DE(a){return typeof a=="string"&&CS.includes(a)}function ME(){const a=document.documentElement.getAttribute("data-theme");return DE(a)?a:"blue"}function xE({children:a}){const[i,c]=tt.useState(ME);tt.useEffect(()=>{document.documentElement.setAttribute("data-theme",i);try{localStorage.setItem(NE,i)}catch{}},[i]);const r=tt.useCallback(h=>c(h),[]),o=tt.useMemo(()=>({theme:i,setTheme:r}),[i,r]);return H.jsx(RS,{value:o,children:a})}function UE(){const a=tt.useContext(RS);if(a===null)throw new Error("useTheme must be used inside ");return a}const wE={light:"theme.light",dark:"theme.dark",blue:"theme.blue"};function jE(){const a=Gi(),{theme:i,setTheme:c}=UE();return H.jsxs("label",{className:"picker",children:[H.jsx("span",{className:"visually-hidden",children:a("theme.label")}),H.jsx("select",{className:"select",value:i,onChange:r=>c(r.target.value),children:CS.map(r=>H.jsx("option",{value:r,children:a(wE[r])},r))})]})}function HE(){const a=Gi(),{state:i}=pE();return H.jsxs("div",{className:"app",children:[H.jsxs("header",{className:"header",children:[H.jsxs(Ti,{to:"/",className:"brand",children:[H.jsx("span",{className:"brand-mark","aria-hidden":"true"}),H.jsx("span",{className:"brand-name",children:a("app.name")})]}),H.jsxs("nav",{className:"nav",children:[H.jsx(Ti,{to:"/",className:"nav-link",activeProps:{className:"nav-link is-active"},children:a("nav.gallery")}),H.jsx(Ti,{to:"/devices",className:"nav-link",activeProps:{className:"nav-link is-active"},children:a("nav.devices")}),H.jsx(Ti,{to:"/system",className:"nav-link",activeProps:{className:"nav-link is-active"},children:a("nav.system")})]}),H.jsxs("div",{className:"header-tools",children:[H.jsx(zE,{}),H.jsx(jE,{})]})]}),i.status!=="authenticated"&&H.jsx("p",{className:"banner",role:"status",children:a("auth.notEnforced")}),H.jsx("main",{className:"main",children:H.jsx(SS,{})})]})}function AS({title:a,body:i,action:c}){return H.jsxs("div",{className:"empty-state",children:[H.jsx("h2",{className:"empty-title",children:a}),H.jsx("p",{className:"empty-body",children:i}),c]})}function LE(){const a=Gi();return H.jsxs("section",{children:[H.jsx("h1",{className:"page-title",children:a("devices.title")}),H.jsx(AS,{title:a("devices.empty.title"),body:a("devices.empty.body")})]})}function BE({capture:a,locale:i}){const c=Gi(),r=new Date(a.captured_at_device??a.received_at);return H.jsxs("a",{className:"tile",href:a.image_url,target:"_blank",rel:"noreferrer",children:[H.jsxs("div",{className:"tile-frame",children:[a.thumb_url===null?H.jsx("img",{className:"tile-img",src:a.image_url,alt:"",loading:"lazy"}):H.jsx("img",{className:"tile-img",src:a.thumb_url,alt:"",loading:"lazy"}),a.pre_trigger&&H.jsx("span",{className:"tile-badge",title:c("gallery.preTrigger.hint"),children:c("gallery.preTrigger")})]}),H.jsxs("div",{className:"tile-meta",children:[H.jsx("span",{children:r.toLocaleString(i)}),H.jsx("span",{className:"muted",children:a.trigger})]})]})}function qE(){const a=Gi(),{locale:i}=Zh(),{data:c,isPending:r,error:o}=Uh({queryKey:["captures"],queryFn:()=>vE(60),refetchInterval:3e4});return H.jsxs("section",{children:[H.jsx("h1",{className:"page-title",children:a("gallery.title")}),r&&H.jsx("p",{className:"muted",children:a("common.loading")}),o!==null&&!r&&H.jsx("p",{className:"alert alert-danger",children:a("common.error")}),c!==void 0&&(c.items.length===0?H.jsx(AS,{title:a("gallery.empty.title"),body:a("gallery.empty.body")}):H.jsxs(H.Fragment,{children:[H.jsx("p",{className:"muted gallery-count",children:a("gallery.count",{n:c.total})}),H.jsx("div",{className:"grid",children:c.items.map(h=>H.jsx(BE,{capture:h,locale:i},h.id))})]}))]})}function dg(a){if(a===void 0)return"—";const i=["B","KB","MB","GB","TB"];let c=a,r=0;for(;c>=1024&&r0?1:0)} ${i[r]}`}function QE(a){const i=Math.floor(a);if(i<60)return`${i}s`;const c=Math.floor(i/60);if(c<60)return`${c}m ${i%60}s`;const r=Math.floor(c/60);return r<24?`${r}h ${c%60}m`:`${Math.floor(r/24)}d ${r%24}h`}function Jn({label:a,children:i}){return H.jsxs("div",{className:"row",children:[H.jsx("dt",{className:"row-label",children:a}),H.jsx("dd",{className:"row-value",children:i})]})}function YE({health:a,t:i}){const c=a.database.ok;return H.jsxs(H.Fragment,{children:[H.jsx("div",{className:"card",children:H.jsxs("dl",{className:"rows",children:[H.jsx(Jn,{label:i("system.status"),children:H.jsx("span",{className:c?"pill pill-ok":"pill pill-warn",children:a.status==="ok"?i("system.status.ok"):i("system.status.degraded")})}),H.jsx(Jn,{label:i("system.version"),children:H.jsx("code",{children:a.version})}),H.jsx(Jn,{label:i("system.uptime"),children:QE(a.uptime_s)}),H.jsx(Jn,{label:i("system.enrollSecret"),children:a.enroll_secret_configured?i("system.enrollSecret.set"):H.jsx("span",{className:"warn",children:i("system.enrollSecret.unset")})})]})}),H.jsx("div",{className:"card",children:H.jsxs("dl",{className:"rows",children:[H.jsxs(Jn,{label:i("system.database"),children:[H.jsx("span",{className:c?"pill pill-ok":"pill pill-danger",children:i(c?"system.database.ok":"system.database.down")}),a.database.error!==null&&H.jsx("div",{className:"mono-small",children:a.database.error})]}),H.jsx(Jn,{label:i("system.devices"),children:a.database.devices??"—"}),H.jsx(Jn,{label:i("system.captures"),children:a.database.captures??"—"}),H.jsx(Jn,{label:i("system.lastBackup"),children:a.database.last_backup_at?new Date(a.database.last_backup_at).toLocaleString():H.jsx("span",{className:"muted",children:i("system.lastBackup.never")})})]})}),H.jsx("div",{className:"card",children:H.jsx("dl",{className:"rows",children:H.jsx(Jn,{label:i("system.disk"),children:a.disk.available?H.jsxs(H.Fragment,{children:[i("system.disk.free",{free:dg(a.disk.free_bytes),total:dg(a.disk.total_bytes)}),H.jsx("div",{className:"mono-small",children:a.disk.path})]}):H.jsx("span",{className:"warn",children:i("system.disk.unavailable")})})})})]})}function GE(){const a=Gi(),{data:i,error:c,isPending:r,refetch:o}=Uh({queryKey:["health"],queryFn:yE,refetchInterval:15e3,retry:!1});return H.jsxs("section",{children:[H.jsx("h1",{className:"page-title",children:a("system.title")}),r&&H.jsx("p",{className:"muted",children:a("common.loading")}),c!==null&&!r&&H.jsxs("div",{className:"card",children:[H.jsx("h2",{className:"empty-title",children:a("system.unreachable.title")}),H.jsx("p",{className:"empty-body",children:a("system.unreachable.body")}),H.jsx("button",{className:"button",onClick:()=>void o(),children:a("common.retry")})]}),i!==void 0&&H.jsx(YE,{health:i,t:a})]})}const lr=kT({component:HE}),VE=Xh({getParentRoute:()=>lr,path:"/",component:qE}),XE=Xh({getParentRoute:()=>lr,path:"/devices",component:LE}),KE=Xh({getParentRoute:()=>lr,path:"/system",component:GE}),ZE=lr.addChildren([VE,XE,KE]),JE=aE({routeTree:ZE}),FE=new l_({defaultOptions:{queries:{refetchOnWindowFocus:!1,staleTime:3e4,retry:1}}}),zS=document.getElementById("root");if(zS===null)throw new Error("#root is missing from index.html");mE.createRoot(zS).render(H.jsx(tt.StrictMode,{children:H.jsx(Mb,{client:FE,children:H.jsx(RE,{children:H.jsx(xE,{children:H.jsx(SE,{children:H.jsx(sE,{router:JE})})})})})})); //# sourceMappingURL=index-BVNc27iK.js.map