@hogsend/cli 0.2.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,7 +6,7 @@ var L1=Object.defineProperty;var jg=n=>{throw TypeError(n)};var B1=(n,s,i)=>s in
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Rg;function H1(){if(Rg)return br;Rg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var y in c)y!=="key"&&(d[y]=c[y])}else d=c;return c=d.ref,{$$typeof:n,type:r,key:h,ref:c!==void 0?c:null,props:d}}return br.Fragment=s,br.jsx=i,br.jsxs=i,br}var _g;function Q1(){return _g||(_g=1,rd.exports=H1()),rd.exports}var f=Q1(),ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ks,ns,li,kv,G1=(kv=class extends ji{constructor(){super();de(this,Ks);de(this,ns);de(this,li);ie(this,li,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){T(this,ns)||this.setEventListener(T(this,li))}onUnsubscribe(){var s;this.hasListeners()||((s=T(this,ns))==null||s.call(this),ie(this,ns,void 0))}setEventListener(s){var i;ie(this,li,s),(i=T(this,ns))==null||i.call(this),ie(this,ns,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){T(this,Ks)!==s&&(ie(this,Ks,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof T(this,Ks)=="boolean"?T(this,Ks):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},Ks=new WeakMap,ns=new WeakMap,li=new WeakMap,kv),rh=new G1,V1={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},as,ih,Lv,Y1=(Lv=class{constructor(){de(this,as,V1);de(this,ih,!1)}setTimeoutProvider(n){ie(this,as,n)}setTimeout(n,s){return T(this,as).setTimeout(n,s)}clearTimeout(n){T(this,as).clearTimeout(n)}setInterval(n,s){return T(this,as).setInterval(n,s)}clearInterval(n){T(this,as).clearInterval(n)}},as=new WeakMap,ih=new WeakMap,Lv),Vs=new Y1;function P1(n){setTimeout(n,0)}var K1=typeof window>"u"||"Deno"in globalThis;function Ot(){}function X1(n,s){return typeof n=="function"?n(s):n}function Dd(n){return typeof n=="number"&&n>=0&&n!==1/0}function Xv(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ms(n,s){return typeof n=="function"?n(s):n}function rn(n,s){return typeof n=="function"?n(s):n}function Eg(n,s){const{type:i="all",exact:r,fetchStatus:c,predicate:d,queryKey:h,stale:y}=n;if(h){if(r){if(s.queryHash!==oh(h,s.options))return!1}else if(!Mr(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof y=="boolean"&&s.isStale()!==y||c&&c!==s.state.fetchStatus||d&&!d(s))}function wg(n,s){const{exact:i,status:r,predicate:c,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(sl(s.options.mutationKey)!==sl(d))return!1}else if(!Mr(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||c&&!c(s))}function oh(n,s){return((s==null?void 0:s.queryKeyHashFn)||sl)(n)}function sl(n){return JSON.stringify(n,(s,i)=>Ud(i)?Object.keys(i).sort().reduce((r,c)=>(r[c]=i[c],r),{}):i)}function Mr(n,s){return n===s?!0:typeof n!=typeof s?!1:n&&s&&typeof n=="object"&&typeof s=="object"?Object.keys(s).every(i=>Mr(n[i],s[i])):!1}var Z1=Object.prototype.hasOwnProperty;function Zv(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=Tg(n)&&Tg(s);if(!r&&!(Ud(n)&&Ud(s)))return s;const d=(r?n:Object.keys(n)).length,h=r?s:Object.keys(s),y=h.length,p=r?new Array(y):{};let m=0;for(let b=0;b<y;b++){const v=r?b:h[b],S=n[v],R=s[v];if(S===R){p[v]=S,(r?b<d:Z1.call(n,v))&&m++;continue}if(S===null||R===null||typeof S!="object"||typeof R!="object"){p[v]=R;continue}const _=Zv(S,R,i+1);p[v]=_,_===S&&m++}return d===y&&m===d?n:p}function Ac(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function Tg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!Ng(n))return!1;const s=n.constructor;if(s===void 0)return!0;const i=s.prototype;return!(!Ng(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Ng(n){return Object.prototype.toString.call(n)==="[object Object]"}function J1(n){return new Promise(s=>{Vs.setTimeout(s,n)})}function kd(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Zv(n,s):s}function ch(n){return n}function F1(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function I1(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}var uh=Symbol();function Jv(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===uh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function fh(n,s){return typeof n=="function"?n(...s):!!n}function $1(n,s,i){let r=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=s()),r||(r=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Ar=(()=>{let n=()=>K1;return{isServer(){return n()},setIsServer(s){n=s}}})();function Ld(){let n,s;const i=new Promise((c,d)=>{n=c,s=d});i.status="pending",i.catch(()=>{});function r(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{r({status:"fulfilled",value:c}),n(c)},i.reject=c=>{r({status:"rejected",reason:c}),s(c)},i}var W1=P1;function eS(){let n=[],s=0,i=y=>{y()},r=y=>{y()},c=W1;const d=y=>{s?n.push(y):c(()=>{i(y)})},h=()=>{const y=n;n=[],y.length&&c(()=>{r(()=>{y.forEach(p=>{i(p)})})})};return{batch:y=>{let p;s++;try{p=y()}finally{s--,s||h()}return p},batchCalls:y=>(...p)=>{d(()=>{y(...p)})},schedule:d,setNotifyFunction:y=>{i=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{c=y}}}var mt=eS(),ii,ss,ri,Bv,tS=(Bv=class extends ji{constructor(){super();de(this,ii,!0);de(this,ss);de(this,ri);ie(this,ri,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,ss)||this.setEventListener(T(this,ri))}onUnsubscribe(){var s;this.hasListeners()||((s=T(this,ss))==null||s.call(this),ie(this,ss,void 0))}setEventListener(s){var i;ie(this,ri,s),(i=T(this,ss))==null||i.call(this),ie(this,ss,s(this.setOnline.bind(this)))}setOnline(s){T(this,ii)!==s&&(ie(this,ii,s),this.listeners.forEach(r=>{r(s)}))}isOnline(){return T(this,ii)}},ii=new WeakMap,ss=new WeakMap,ri=new WeakMap,Bv),Oc=new tS;function nS(n){return Math.min(1e3*2**n,3e4)}function Fv(n){return(n??"online")==="online"?Oc.isOnline():!0}var Bd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Iv(n){let s=!1,i=0,r;const c=Ld(),d=()=>c.status!=="pending",h=E=>{var j;if(!d()){const z=new Bd(E);S(z),(j=n.onCancel)==null||j.call(n,z)}},y=()=>{s=!0},p=()=>{s=!1},m=()=>rh.isFocused()&&(n.networkMode==="always"||Oc.isOnline())&&n.canRun(),b=()=>Fv(n.networkMode)&&n.canRun(),v=E=>{d()||(r==null||r(),c.resolve(E))},S=E=>{d()||(r==null||r(),c.reject(E))},R=()=>new Promise(E=>{var j;r=z=>{(d()||m())&&E(z)},(j=n.onPause)==null||j.call(n)}).then(()=>{var E;r=void 0,d()||(E=n.onContinue)==null||E.call(n)}),_=()=>{if(d())return;let E;const j=i===0?n.initialPromise:void 0;try{E=j??n.fn()}catch(z){E=Promise.reject(z)}Promise.resolve(E).then(v).catch(z=>{var k;if(d())return;const A=n.retry??(Ar.isServer()?0:3),B=n.retryDelay??nS,N=typeof B=="function"?B(i,z):B,Q=A===!0||typeof A=="number"&&i<A||typeof A=="function"&&A(i,z);if(s||!Q){S(z);return}i++,(k=n.onFail)==null||k.call(n,i,z),J1(N).then(()=>m()?void 0:R()).then(()=>{s?S(z):_()})})};return{promise:c,status:()=>c.status,cancel:h,continue:()=>(r==null||r(),c),cancelRetry:y,continueRetry:p,canStart:b,start:()=>(b()?_():R().then(_),c)}}var Xs,qv,$v=(qv=class{constructor(){de(this,Xs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dd(this.gcTime)&&ie(this,Xs,Vs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ar.isServer()?1/0:300*1e3))}clearGcTimeout(){T(this,Xs)!==void 0&&(Vs.clearTimeout(T(this,Xs)),ie(this,Xs,void 0))}},Xs=new WeakMap,qv);function aS(n){return{onFetch:(s,i)=>{var b,v,S,R,_;const r=s.options,c=(S=(v=(b=s.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,d=((R=s.state.data)==null?void 0:R.pages)||[],h=((_=s.state.data)==null?void 0:_.pageParams)||[];let y={pages:[],pageParams:[]},p=0;const m=async()=>{let E=!1;const j=B=>{$1(B,()=>s.signal,()=>E=!0)},z=Jv(s.options,s.fetchOptions),A=async(B,N,Q)=>{if(E)return Promise.reject(s.signal.reason);if(N==null&&B.pages.length)return Promise.resolve(B);const D=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:N,direction:Q?"backward":"forward",meta:s.options.meta};return j(W),W})(),O=await z(D),{maxPages:P}=s.options,$=Q?I1:F1;return{pages:$(B.pages,O,P),pageParams:$(B.pageParams,N,P)}};if(c&&d.length){const B=c==="backward",N=B?sS:Cg,Q={pages:d,pageParams:h},k=N(r,Q);y=await A(Q,k,B)}else{const B=n??d.length;do{const N=p===0?h[0]??r.initialPageParam:Cg(r,y);if(p>0&&N==null)break;y=await A(y,N),p++}while(p<B)}return y};s.options.persister?s.fetchFn=()=>{var E,j;return(j=(E=s.options).persister)==null?void 0:j.call(E,m,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=m}}}function Cg(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function sS(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}var oi,Zs,ci,Sn,Js,gt,Br,Fs,ln,Wv,ha,Hv,lS=(Hv=class extends $v{constructor(s){super();de(this,ln);de(this,oi);de(this,Zs);de(this,ci);de(this,Sn);de(this,Js);de(this,gt);de(this,Br);de(this,Fs);ie(this,Fs,!1),ie(this,Br,s.defaultOptions),this.setOptions(s.options),this.observers=[],ie(this,Js,s.client),ie(this,Sn,T(this,Js).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,ie(this,Zs,Ag(this.options)),this.state=s.state??T(this,Zs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return T(this,oi)}get promise(){var s;return(s=T(this,gt))==null?void 0:s.promise}setOptions(s){if(this.options={...T(this,Br),...s},s!=null&&s._type&&ie(this,oi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Ag(this.options);i.data!==void 0&&(this.setState(Mg(i.data,i.dataUpdatedAt)),ie(this,Zs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Sn).remove(this)}setData(s,i){const r=kd(this.state.data,s,this.options);return Se(this,ln,ha).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){Se(this,ln,ha).call(this,{type:"setState",state:s})}cancel(s){var r,c;const i=(r=T(this,gt))==null?void 0:r.promise;return(c=T(this,gt))==null||c.cancel(s),i?i.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return T(this,Zs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>rn(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ms(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Xv(this.state.dataUpdatedAt,s)}onFocus(){var i;const s=this.observers.find(r=>r.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(i=T(this,gt))==null||i.continue()}onOnline(){var i;const s=this.observers.find(r=>r.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(i=T(this,gt))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),T(this,Sn).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(i=>i!==s),this.observers.length||(T(this,gt)&&(T(this,Fs)||Se(this,ln,Wv).call(this)?T(this,gt).cancel({revert:!0}):T(this,gt).cancelRetry()),this.scheduleGc()),T(this,Sn).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,ln,ha).call(this,{type:"invalidate"})}async fetch(s,i){var m,b,v,S,R,_,E,j,z,A,B;if(this.state.fetchStatus!=="idle"&&((m=T(this,gt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(T(this,gt))return T(this,gt).continueRetry(),T(this,gt).promise}if(s&&this.setOptions(s),!this.options.queryFn){const N=this.observers.find(Q=>Q.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,c=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(ie(this,Fs,!0),r.signal)})},d=()=>{const N=Jv(this.options,i),k=(()=>{const D={client:T(this,Js),queryKey:this.queryKey,meta:this.meta};return c(D),D})();return ie(this,Fs,!1),this.options.persister?this.options.persister(N,k,this):N(k)},y=(()=>{const N={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:T(this,Js),state:this.state,fetchFn:d};return c(N),N})(),p=T(this,oi)==="infinite"?aS(this.options.pages):this.options.behavior;p==null||p.onFetch(y,this),ie(this,ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=y.fetchOptions)==null?void 0:b.meta))&&Se(this,ln,ha).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),ie(this,gt,Iv({initialPromise:i==null?void 0:i.initialPromise,fn:y.fetchFn,onCancel:N=>{N instanceof Bd&&N.revert&&this.setState({...T(this,ci),fetchStatus:"idle"}),r.abort()},onFail:(N,Q)=>{Se(this,ln,ha).call(this,{type:"failed",failureCount:N,error:Q})},onPause:()=>{Se(this,ln,ha).call(this,{type:"pause"})},onContinue:()=>{Se(this,ln,ha).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const N=await T(this,gt).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(R=(S=T(this,Sn).config).onSuccess)==null||R.call(S,N,this),(E=(_=T(this,Sn).config).onSettled)==null||E.call(_,N,this.state.error,this),N}catch(N){if(N instanceof Bd){if(N.silent)return T(this,gt).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Se(this,ln,ha).call(this,{type:"error",error:N}),(z=(j=T(this,Sn).config).onError)==null||z.call(j,N,this),(B=(A=T(this,Sn).config).onSettled)==null||B.call(A,this.state.data,N,this),N}finally{this.scheduleGc()}}},oi=new WeakMap,Zs=new WeakMap,ci=new WeakMap,Sn=new WeakMap,Js=new WeakMap,gt=new WeakMap,Br=new WeakMap,Fs=new WeakMap,ln=new WeakSet,Wv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ha=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...e0(r.data,this.options),fetchMeta:s.meta??null};case"success":const c={...r,...Mg(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ie(this,ci,s.manual?c:void 0),c;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Sn).notify({query:this,type:"updated",action:s})})},Hv);function e0(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fv(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Mg(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ag(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Yt,Oe,qr,At,Is,ui,ma,ls,Hr,fi,di,$s,Ws,is,hi,Le,Nr,qd,Hd,Qd,Gd,Vd,Yd,Pd,t0,Qv,iS=(Qv=class extends ji{constructor(s,i){super();de(this,Le);de(this,Yt);de(this,Oe);de(this,qr);de(this,At);de(this,Is);de(this,ui);de(this,ma);de(this,ls);de(this,Hr);de(this,fi);de(this,di);de(this,$s);de(this,Ws);de(this,is);de(this,hi,new Set);this.options=i,ie(this,Yt,s),ie(this,ls,null),ie(this,ma,Ld()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Oe).addObserver(this),Og(T(this,Oe),this.options)?Se(this,Le,Nr).call(this):this.updateResult(),Se(this,Le,Gd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Kd(T(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Kd(T(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Le,Vd).call(this),Se(this,Le,Yd).call(this),T(this,Oe).removeObserver(this)}setOptions(s){const i=this.options,r=T(this,Oe);if(this.options=T(this,Yt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof rn(this.options.enabled,T(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Le,Pd).call(this),T(this,Oe).setOptions(this.options),i._defaulted&&!Ac(this.options,i)&&T(this,Yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Oe),observer:this});const c=this.hasListeners();c&&zg(T(this,Oe),r,this.options,i)&&Se(this,Le,Nr).call(this),this.updateResult(),c&&(T(this,Oe)!==r||rn(this.options.enabled,T(this,Oe))!==rn(i.enabled,T(this,Oe))||ms(this.options.staleTime,T(this,Oe))!==ms(i.staleTime,T(this,Oe)))&&Se(this,Le,qd).call(this);const d=Se(this,Le,Hd).call(this);c&&(T(this,Oe)!==r||rn(this.options.enabled,T(this,Oe))!==rn(i.enabled,T(this,Oe))||d!==T(this,is))&&Se(this,Le,Qd).call(this,d)}getOptimisticResult(s){const i=T(this,Yt).getQueryCache().build(T(this,Yt),s),r=this.createResult(i,s);return oS(this,r)&&(ie(this,At,r),ie(this,ui,this.options),ie(this,Is,T(this,Oe).state)),r}getCurrentResult(){return T(this,At)}trackResult(s,i){return new Proxy(s,{get:(r,c)=>(this.trackProp(c),i==null||i(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&T(this,ma).status==="pending"&&T(this,ma).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,c))})}trackProp(s){T(this,hi).add(s)}getCurrentQuery(){return T(this,Oe)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=T(this,Yt).defaultQueryOptions(s),r=T(this,Yt).getQueryCache().build(T(this,Yt),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(s){return Se(this,Le,Nr).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,At)))}createResult(s,i){var P;const r=T(this,Oe),c=this.options,d=T(this,At),h=T(this,Is),y=T(this,ui),m=s!==r?s.state:T(this,qr),{state:b}=s;let v={...b},S=!1,R;if(i._optimisticResults){const $=this.hasListeners(),W=!$&&Og(s,i),Z=$&&zg(s,r,i,c);(W||Z)&&(v={...v,...e0(b.data,s.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:E,status:j}=v;R=v.data;let z=!1;if(i.placeholderData!==void 0&&R===void 0&&j==="pending"){let $;d!=null&&d.isPlaceholderData&&i.placeholderData===(y==null?void 0:y.placeholderData)?($=d.data,z=!0):$=typeof i.placeholderData=="function"?i.placeholderData((P=T(this,di))==null?void 0:P.state.data,T(this,di)):i.placeholderData,$!==void 0&&(j="success",R=kd(d==null?void 0:d.data,$,i),S=!0)}if(i.select&&R!==void 0&&!z)if(d&&R===(h==null?void 0:h.data)&&i.select===T(this,Hr))R=T(this,fi);else try{ie(this,Hr,i.select),R=i.select(R),R=kd(d==null?void 0:d.data,R,i),ie(this,fi,R),ie(this,ls,null)}catch($){ie(this,ls,$)}T(this,ls)&&(_=T(this,ls),R=T(this,fi),E=Date.now(),j="error");const A=v.fetchStatus==="fetching",B=j==="pending",N=j==="error",Q=B&&A,k=R!==void 0,O={status:j,fetchStatus:v.fetchStatus,isPending:B,isSuccess:j==="success",isError:N,isInitialLoading:Q,isLoading:Q,data:R,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!B,isLoadingError:N&&!k,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:N&&k,isStale:dh(s,i),refetch:this.refetch,promise:T(this,ma),isEnabled:rn(i.enabled,s)!==!1};if(this.options.experimental_prefetchInRender){const $=O.data!==void 0,W=O.status==="error"&&!$,Z=he=>{W?he.reject(O.error):$&&he.resolve(O.data)},te=()=>{const he=ie(this,ma,O.promise=Ld());Z(he)},ee=T(this,ma);switch(ee.status){case"pending":s.queryHash===r.queryHash&&Z(ee);break;case"fulfilled":(W||O.data!==ee.value)&&te();break;case"rejected":(!W||O.error!==ee.reason)&&te();break}}return O}updateResult(){const s=T(this,At),i=this.createResult(T(this,Oe),this.options);if(ie(this,Is,T(this,Oe).state),ie(this,ui,this.options),T(this,Is).data!==void 0&&ie(this,di,T(this,Oe)),Ac(i,s))return;ie(this,At,i);const r=()=>{if(!s)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!T(this,hi).size)return!0;const h=new Set(d??T(this,hi));return this.options.throwOnError&&h.add("error"),Object.keys(T(this,At)).some(y=>{const p=y;return T(this,At)[p]!==s[p]&&h.has(p)})};Se(this,Le,t0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Le,Gd).call(this)}},Yt=new WeakMap,Oe=new WeakMap,qr=new WeakMap,At=new WeakMap,Is=new WeakMap,ui=new WeakMap,ma=new WeakMap,ls=new WeakMap,Hr=new WeakMap,fi=new WeakMap,di=new WeakMap,$s=new WeakMap,Ws=new WeakMap,is=new WeakMap,hi=new WeakMap,Le=new WeakSet,Nr=function(s){Se(this,Le,Pd).call(this);let i=T(this,Oe).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(Ot)),i},qd=function(){Se(this,Le,Vd).call(this);const s=ms(this.options.staleTime,T(this,Oe));if(Ar.isServer()||T(this,At).isStale||!Dd(s))return;const r=Xv(T(this,At).dataUpdatedAt,s)+1;ie(this,$s,Vs.setTimeout(()=>{T(this,At).isStale||this.updateResult()},r))},Hd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Oe)):this.options.refetchInterval)??!1},Qd=function(s){Se(this,Le,Yd).call(this),ie(this,is,s),!(Ar.isServer()||rn(this.options.enabled,T(this,Oe))===!1||!Dd(T(this,is))||T(this,is)===0)&&ie(this,Ws,Vs.setInterval(()=>{(this.options.refetchIntervalInBackground||rh.isFocused())&&Se(this,Le,Nr).call(this)},T(this,is)))},Gd=function(){Se(this,Le,qd).call(this),Se(this,Le,Qd).call(this,Se(this,Le,Hd).call(this))},Vd=function(){T(this,$s)!==void 0&&(Vs.clearTimeout(T(this,$s)),ie(this,$s,void 0))},Yd=function(){T(this,Ws)!==void 0&&(Vs.clearInterval(T(this,Ws)),ie(this,Ws,void 0))},Pd=function(){const s=T(this,Yt).getQueryCache().build(T(this,Yt),this.options);if(s===T(this,Oe))return;const i=T(this,Oe);ie(this,Oe,s),ie(this,qr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},t0=function(s){mt.batch(()=>{s.listeners&&this.listeners.forEach(i=>{i(T(this,At))}),T(this,Yt).getQueryCache().notify({query:T(this,Oe),type:"observerResultsUpdated"})})},Qv);function rS(n,s){return rn(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&rn(s.retryOnMount,n)===!1)}function Og(n,s){return rS(n,s)||n.state.data!==void 0&&Kd(n,s,s.refetchOnMount)}function Kd(n,s,i){if(rn(s.enabled,n)!==!1&&ms(s.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&dh(n,s)}return!1}function zg(n,s,i,r){return(n!==s||rn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&dh(n,i)}function dh(n,s){return rn(s.enabled,n)!==!1&&n.isStaleByTime(ms(s.staleTime,n))}function oS(n,s){return!Ac(n.getCurrentResult(),s)}var Qr,Qn,wt,el,Gn,Wa,Gv,cS=(Gv=class extends $v{constructor(s){super();de(this,Gn);de(this,Qr);de(this,Qn);de(this,wt);de(this,el);ie(this,Qr,s.client),this.mutationId=s.mutationId,ie(this,wt,s.mutationCache),ie(this,Qn,[]),this.state=s.state||n0(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){T(this,Qn).includes(s)||(T(this,Qn).push(s),this.clearGcTimeout(),T(this,wt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){ie(this,Qn,T(this,Qn).filter(i=>i!==s)),this.scheduleGc(),T(this,wt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){T(this,Qn).length||(this.state.status==="pending"?this.scheduleGc():T(this,wt).remove(this))}continue(){var s;return((s=T(this,el))==null?void 0:s.continue())??this.execute(this.state.variables)}async execute(s){var h,y,p,m,b,v,S,R,_,E,j,z,A,B,N,Q,k,D;const i=()=>{Se(this,Gn,Wa).call(this,{type:"continue"})},r={client:T(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey};ie(this,el,Iv({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,P)=>{Se(this,Gn,Wa).call(this,{type:"failed",failureCount:O,error:P})},onPause:()=>{Se(this,Gn,Wa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,wt).canRun(this)}));const c=this.state.status==="pending",d=!T(this,el).canStart();try{if(c)i();else{Se(this,Gn,Wa).call(this,{type:"pending",variables:s,isPaused:d}),T(this,wt).config.onMutate&&await T(this,wt).config.onMutate(s,this,r);const P=await((y=(h=this.options).onMutate)==null?void 0:y.call(h,s,r));P!==this.state.context&&Se(this,Gn,Wa).call(this,{type:"pending",context:P,variables:s,isPaused:d})}const O=await T(this,el).start();return await((m=(p=T(this,wt).config).onSuccess)==null?void 0:m.call(p,O,s,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,O,s,this.state.context,r)),await((R=(S=T(this,wt).config).onSettled)==null?void 0:R.call(S,O,null,this.state.variables,this.state.context,this,r)),await((E=(_=this.options).onSettled)==null?void 0:E.call(_,O,null,s,this.state.context,r)),Se(this,Gn,Wa).call(this,{type:"success",data:O}),O}catch(O){try{await((z=(j=T(this,wt).config).onError)==null?void 0:z.call(j,O,s,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((B=(A=this.options).onError)==null?void 0:B.call(A,O,s,this.state.context,r))}catch(P){Promise.reject(P)}try{await((Q=(N=T(this,wt).config).onSettled)==null?void 0:Q.call(N,void 0,O,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((D=(k=this.options).onSettled)==null?void 0:D.call(k,void 0,O,s,this.state.context,r))}catch(P){Promise.reject(P)}throw Se(this,Gn,Wa).call(this,{type:"error",error:O}),O}finally{T(this,wt).runNext(this)}}},Qr=new WeakMap,Qn=new WeakMap,wt=new WeakMap,el=new WeakMap,Gn=new WeakSet,Wa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),mt.batch(()=>{T(this,Qn).forEach(r=>{r.onMutationUpdate(s)}),T(this,wt).notify({mutation:this,type:"updated",action:s})})},Gv);function n0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ya,Tn,Gr,Vv,uS=(Vv=class extends ji{constructor(s={}){super();de(this,ya);de(this,Tn);de(this,Gr);this.config=s,ie(this,ya,new Set),ie(this,Tn,new Map),ie(this,Gr,0)}build(s,i,r){const c=new cS({client:s,mutationCache:this,mutationId:++uc(this,Gr)._,options:s.defaultMutationOptions(i),state:r});return this.add(c),c}add(s){T(this,ya).add(s);const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i);r?r.push(s):T(this,Tn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(T(this,ya).delete(s)){const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i);if(r)if(r.length>1){const c=r.indexOf(s);c!==-1&&r.splice(c,1)}else r[0]===s&&T(this,Tn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i),c=r==null?void 0:r.find(d=>d.state.status==="pending");return!c||c===s}else return!0}runNext(s){var r;const i=fc(s);if(typeof i=="string"){const c=(r=T(this,Tn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{T(this,ya).forEach(s=>{this.notify({type:"removed",mutation:s})}),T(this,ya).clear(),T(this,Tn).clear()})}getAll(){return Array.from(T(this,ya))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>wg(i,r))}findAll(s={}){return this.getAll().filter(i=>wg(s,i))}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return mt.batch(()=>Promise.all(s.map(i=>i.continue().catch(Ot))))}},ya=new WeakMap,Tn=new WeakMap,Gr=new WeakMap,Vv);function fc(n){var s;return(s=n.options.scope)==null?void 0:s.id}var pa,rs,Pt,ga,xa,jc,Xd,Yv,fS=(Yv=class extends ji{constructor(i,r){super();de(this,xa);de(this,pa);de(this,rs);de(this,Pt);de(this,ga);ie(this,pa,i),this.setOptions(r),this.bindMethods(),Se(this,xa,jc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var c;const r=this.options;this.options=T(this,pa).defaultMutationOptions(i),Ac(this.options,r)||T(this,pa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Pt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&sl(r.mutationKey)!==sl(this.options.mutationKey)?this.reset():((c=T(this,Pt))==null?void 0:c.state.status)==="pending"&&T(this,Pt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=T(this,Pt))==null||i.removeObserver(this)}onMutationUpdate(i){Se(this,xa,jc).call(this),Se(this,xa,Xd).call(this,i)}getCurrentResult(){return T(this,rs)}reset(){var i;(i=T(this,Pt))==null||i.removeObserver(this),ie(this,Pt,void 0),Se(this,xa,jc).call(this),Se(this,xa,Xd).call(this)}mutate(i,r){var c;return ie(this,ga,r),(c=T(this,Pt))==null||c.removeObserver(this),ie(this,Pt,T(this,pa).getMutationCache().build(T(this,pa),this.options)),T(this,Pt).addObserver(this),T(this,Pt).execute(i)}},pa=new WeakMap,rs=new WeakMap,Pt=new WeakMap,ga=new WeakMap,xa=new WeakSet,jc=function(){var r;const i=((r=T(this,Pt))==null?void 0:r.state)??n0();ie(this,rs,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Xd=function(i){mt.batch(()=>{var r,c,d,h,y,p,m,b;if(T(this,ga)&&this.hasListeners()){const v=T(this,rs).variables,S=T(this,rs).context,R={client:T(this,pa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(c=(r=T(this,ga)).onSuccess)==null||c.call(r,i.data,v,S,R)}catch(_){Promise.reject(_)}try{(h=(d=T(this,ga)).onSettled)==null||h.call(d,i.data,null,v,S,R)}catch(_){Promise.reject(_)}}else if((i==null?void 0:i.type)==="error"){try{(p=(y=T(this,ga)).onError)==null||p.call(y,i.error,v,S,R)}catch(_){Promise.reject(_)}try{(b=(m=T(this,ga)).onSettled)==null||b.call(m,void 0,i.error,v,S,R)}catch(_){Promise.reject(_)}}}this.listeners.forEach(v=>{v(T(this,rs))})})},Yv),Vn,Pv,dS=(Pv=class extends ji{constructor(s={}){super();de(this,Vn);this.config=s,ie(this,Vn,new Map)}build(s,i,r){const c=i.queryKey,d=i.queryHash??oh(c,i);let h=this.get(d);return h||(h=new lS({client:s,queryKey:c,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(c)}),this.add(h)),h}add(s){T(this,Vn).has(s.queryHash)||(T(this,Vn).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const i=T(this,Vn).get(s.queryHash);i&&(s.destroy(),i===s&&T(this,Vn).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){mt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return T(this,Vn).get(s)}getAll(){return[...T(this,Vn).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Eg(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>Eg(s,r)):i}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},Vn=new WeakMap,Pv),nt,os,cs,mi,yi,us,pi,gi,Kv,hS=(Kv=class{constructor(n={}){de(this,nt);de(this,os);de(this,cs);de(this,mi);de(this,yi);de(this,us);de(this,pi);de(this,gi);ie(this,nt,n.queryCache||new dS),ie(this,os,n.mutationCache||new uS),ie(this,cs,n.defaultOptions||{}),ie(this,mi,new Map),ie(this,yi,new Map),ie(this,us,0)}mount(){uc(this,us)._++,T(this,us)===1&&(ie(this,pi,rh.subscribe(async n=>{n&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),ie(this,gi,Oc.subscribe(async n=>{n&&(await this.resumePausedMutations(),T(this,nt).onOnline())})))}unmount(){var n,s;uc(this,us)._--,T(this,us)===0&&((n=T(this,pi))==null||n.call(this),ie(this,pi,void 0),(s=T(this,gi))==null||s.call(this),ie(this,gi,void 0))}isFetching(n){return T(this,nt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return T(this,os).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=T(this,nt).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=T(this,nt).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ms(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return T(this,nt).findAll(n).map(({queryKey:s,state:i})=>{const r=i.data;return[s,r]})}setQueryData(n,s,i){const r=this.defaultQueryOptions({queryKey:n}),c=T(this,nt).get(r.queryHash),d=c==null?void 0:c.state.data,h=X1(s,d);if(h!==void 0)return T(this,nt).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,s,i){return mt.batch(()=>T(this,nt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=T(this,nt).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=T(this,nt);mt.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=T(this,nt);return mt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const i={revert:!0,...s},r=mt.batch(()=>T(this,nt).findAll(n).map(c=>c.cancel(i)));return Promise.all(r).then(Ot).catch(Ot)}invalidateQueries(n,s={}){return mt.batch(()=>(T(this,nt).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=mt.batch(()=>T(this,nt).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(Ot)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(Ot)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=T(this,nt).build(this,s);return i.isStaleByTime(ms(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Oc.isOnline()?T(this,os).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,nt)}getMutationCache(){return T(this,os)}getDefaultOptions(){return T(this,cs)}setDefaultOptions(n){ie(this,cs,n)}setQueryDefaults(n,s){T(this,mi).set(sl(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...T(this,mi).values()],i={};return s.forEach(r=>{Mr(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){T(this,yi).set(sl(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...T(this,yi).values()],i={};return s.forEach(r=>{Mr(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...T(this,cs).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=oh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===uh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...T(this,cs).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){T(this,nt).clear(),T(this,os).clear()}},nt=new WeakMap,os=new WeakMap,cs=new WeakMap,mi=new WeakMap,yi=new WeakMap,us=new WeakMap,pi=new WeakMap,gi=new WeakMap,Kv),od={exports:{}},ve={};/**
9
+ */var Rg;function H1(){if(Rg)return br;Rg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(r,c,d){var h=null;if(d!==void 0&&(h=""+d),c.key!==void 0&&(h=""+c.key),"key"in c){d={};for(var y in c)y!=="key"&&(d[y]=c[y])}else d=c;return c=d.ref,{$$typeof:n,type:r,key:h,ref:c!==void 0?c:null,props:d}}return br.Fragment=s,br.jsx=i,br.jsxs=i,br}var _g;function Q1(){return _g||(_g=1,rd.exports=H1()),rd.exports}var f=Q1(),ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ps,ns,li,kv,G1=(kv=class extends ji{constructor(){super();de(this,Ps);de(this,ns);de(this,li);ie(this,li,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}})}onSubscribe(){T(this,ns)||this.setEventListener(T(this,li))}onUnsubscribe(){var s;this.hasListeners()||((s=T(this,ns))==null||s.call(this),ie(this,ns,void 0))}setEventListener(s){var i;ie(this,li,s),(i=T(this,ns))==null||i.call(this),ie(this,ns,s(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(s){T(this,Ps)!==s&&(ie(this,Ps,s),this.onFocus())}onFocus(){const s=this.isFocused();this.listeners.forEach(i=>{i(s)})}isFocused(){var s;return typeof T(this,Ps)=="boolean"?T(this,Ps):((s=globalThis.document)==null?void 0:s.visibilityState)!=="hidden"}},Ps=new WeakMap,ns=new WeakMap,li=new WeakMap,kv),rh=new G1,V1={setTimeout:(n,s)=>setTimeout(n,s),clearTimeout:n=>clearTimeout(n),setInterval:(n,s)=>setInterval(n,s),clearInterval:n=>clearInterval(n)},as,ih,Lv,Y1=(Lv=class{constructor(){de(this,as,V1);de(this,ih,!1)}setTimeoutProvider(n){ie(this,as,n)}setTimeout(n,s){return T(this,as).setTimeout(n,s)}clearTimeout(n){T(this,as).clearTimeout(n)}setInterval(n,s){return T(this,as).setInterval(n,s)}clearInterval(n){T(this,as).clearInterval(n)}},as=new WeakMap,ih=new WeakMap,Lv),Vs=new Y1;function K1(n){setTimeout(n,0)}var P1=typeof window>"u"||"Deno"in globalThis;function Ot(){}function X1(n,s){return typeof n=="function"?n(s):n}function Dd(n){return typeof n=="number"&&n>=0&&n!==1/0}function Xv(n,s){return Math.max(n+(s||0)-Date.now(),0)}function ms(n,s){return typeof n=="function"?n(s):n}function rn(n,s){return typeof n=="function"?n(s):n}function Eg(n,s){const{type:i="all",exact:r,fetchStatus:c,predicate:d,queryKey:h,stale:y}=n;if(h){if(r){if(s.queryHash!==oh(h,s.options))return!1}else if(!Mr(s.queryKey,h))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof y=="boolean"&&s.isStale()!==y||c&&c!==s.state.fetchStatus||d&&!d(s))}function wg(n,s){const{exact:i,status:r,predicate:c,mutationKey:d}=n;if(d){if(!s.options.mutationKey)return!1;if(i){if(sl(s.options.mutationKey)!==sl(d))return!1}else if(!Mr(s.options.mutationKey,d))return!1}return!(r&&s.state.status!==r||c&&!c(s))}function oh(n,s){return((s==null?void 0:s.queryKeyHashFn)||sl)(n)}function sl(n){return JSON.stringify(n,(s,i)=>Ud(i)?Object.keys(i).sort().reduce((r,c)=>(r[c]=i[c],r),{}):i)}function Mr(n,s){return n===s?!0:typeof n!=typeof s?!1:n&&s&&typeof n=="object"&&typeof s=="object"?Object.keys(s).every(i=>Mr(n[i],s[i])):!1}var Z1=Object.prototype.hasOwnProperty;function Zv(n,s,i=0){if(n===s)return n;if(i>500)return s;const r=Tg(n)&&Tg(s);if(!r&&!(Ud(n)&&Ud(s)))return s;const d=(r?n:Object.keys(n)).length,h=r?s:Object.keys(s),y=h.length,p=r?new Array(y):{};let m=0;for(let b=0;b<y;b++){const v=r?b:h[b],S=n[v],R=s[v];if(S===R){p[v]=S,(r?b<d:Z1.call(n,v))&&m++;continue}if(S===null||R===null||typeof S!="object"||typeof R!="object"){p[v]=R;continue}const _=Zv(S,R,i+1);p[v]=_,_===S&&m++}return d===y&&m===d?n:p}function Ac(n,s){if(!s||Object.keys(n).length!==Object.keys(s).length)return!1;for(const i in n)if(n[i]!==s[i])return!1;return!0}function Tg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Ud(n){if(!Ng(n))return!1;const s=n.constructor;if(s===void 0)return!0;const i=s.prototype;return!(!Ng(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function Ng(n){return Object.prototype.toString.call(n)==="[object Object]"}function J1(n){return new Promise(s=>{Vs.setTimeout(s,n)})}function kd(n,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(n,s):i.structuralSharing!==!1?Zv(n,s):s}function ch(n){return n}function F1(n,s,i=0){const r=[...n,s];return i&&r.length>i?r.slice(1):r}function I1(n,s,i=0){const r=[s,...n];return i&&r.length>i?r.slice(0,-1):r}var uh=Symbol();function Jv(n,s){return!n.queryFn&&(s!=null&&s.initialPromise)?()=>s.initialPromise:!n.queryFn||n.queryFn===uh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function fh(n,s){return typeof n=="function"?n(...s):!!n}function $1(n,s,i){let r=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=s()),r||(r=!0,c.aborted?i():c.addEventListener("abort",i,{once:!0})),c)}),n}var Ar=(()=>{let n=()=>P1;return{isServer(){return n()},setIsServer(s){n=s}}})();function Ld(){let n,s;const i=new Promise((c,d)=>{n=c,s=d});i.status="pending",i.catch(()=>{});function r(c){Object.assign(i,c),delete i.resolve,delete i.reject}return i.resolve=c=>{r({status:"fulfilled",value:c}),n(c)},i.reject=c=>{r({status:"rejected",reason:c}),s(c)},i}var W1=K1;function eS(){let n=[],s=0,i=y=>{y()},r=y=>{y()},c=W1;const d=y=>{s?n.push(y):c(()=>{i(y)})},h=()=>{const y=n;n=[],y.length&&c(()=>{r(()=>{y.forEach(p=>{i(p)})})})};return{batch:y=>{let p;s++;try{p=y()}finally{s--,s||h()}return p},batchCalls:y=>(...p)=>{d(()=>{y(...p)})},schedule:d,setNotifyFunction:y=>{i=y},setBatchNotifyFunction:y=>{r=y},setScheduler:y=>{c=y}}}var mt=eS(),ii,ss,ri,Bv,tS=(Bv=class extends ji{constructor(){super();de(this,ii,!0);de(this,ss);de(this,ri);ie(this,ri,s=>{if(typeof window<"u"&&window.addEventListener){const i=()=>s(!0),r=()=>s(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",r)}}})}onSubscribe(){T(this,ss)||this.setEventListener(T(this,ri))}onUnsubscribe(){var s;this.hasListeners()||((s=T(this,ss))==null||s.call(this),ie(this,ss,void 0))}setEventListener(s){var i;ie(this,ri,s),(i=T(this,ss))==null||i.call(this),ie(this,ss,s(this.setOnline.bind(this)))}setOnline(s){T(this,ii)!==s&&(ie(this,ii,s),this.listeners.forEach(r=>{r(s)}))}isOnline(){return T(this,ii)}},ii=new WeakMap,ss=new WeakMap,ri=new WeakMap,Bv),Oc=new tS;function nS(n){return Math.min(1e3*2**n,3e4)}function Fv(n){return(n??"online")==="online"?Oc.isOnline():!0}var Bd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Iv(n){let s=!1,i=0,r;const c=Ld(),d=()=>c.status!=="pending",h=E=>{var j;if(!d()){const z=new Bd(E);S(z),(j=n.onCancel)==null||j.call(n,z)}},y=()=>{s=!0},p=()=>{s=!1},m=()=>rh.isFocused()&&(n.networkMode==="always"||Oc.isOnline())&&n.canRun(),b=()=>Fv(n.networkMode)&&n.canRun(),v=E=>{d()||(r==null||r(),c.resolve(E))},S=E=>{d()||(r==null||r(),c.reject(E))},R=()=>new Promise(E=>{var j;r=z=>{(d()||m())&&E(z)},(j=n.onPause)==null||j.call(n)}).then(()=>{var E;r=void 0,d()||(E=n.onContinue)==null||E.call(n)}),_=()=>{if(d())return;let E;const j=i===0?n.initialPromise:void 0;try{E=j??n.fn()}catch(z){E=Promise.reject(z)}Promise.resolve(E).then(v).catch(z=>{var k;if(d())return;const A=n.retry??(Ar.isServer()?0:3),B=n.retryDelay??nS,N=typeof B=="function"?B(i,z):B,Q=A===!0||typeof A=="number"&&i<A||typeof A=="function"&&A(i,z);if(s||!Q){S(z);return}i++,(k=n.onFail)==null||k.call(n,i,z),J1(N).then(()=>m()?void 0:R()).then(()=>{s?S(z):_()})})};return{promise:c,status:()=>c.status,cancel:h,continue:()=>(r==null||r(),c),cancelRetry:y,continueRetry:p,canStart:b,start:()=>(b()?_():R().then(_),c)}}var Xs,qv,$v=(qv=class{constructor(){de(this,Xs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Dd(this.gcTime)&&ie(this,Xs,Vs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(Ar.isServer()?1/0:300*1e3))}clearGcTimeout(){T(this,Xs)!==void 0&&(Vs.clearTimeout(T(this,Xs)),ie(this,Xs,void 0))}},Xs=new WeakMap,qv);function aS(n){return{onFetch:(s,i)=>{var b,v,S,R,_;const r=s.options,c=(S=(v=(b=s.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,d=((R=s.state.data)==null?void 0:R.pages)||[],h=((_=s.state.data)==null?void 0:_.pageParams)||[];let y={pages:[],pageParams:[]},p=0;const m=async()=>{let E=!1;const j=B=>{$1(B,()=>s.signal,()=>E=!0)},z=Jv(s.options,s.fetchOptions),A=async(B,N,Q)=>{if(E)return Promise.reject(s.signal.reason);if(N==null&&B.pages.length)return Promise.resolve(B);const D=(()=>{const W={client:s.client,queryKey:s.queryKey,pageParam:N,direction:Q?"backward":"forward",meta:s.options.meta};return j(W),W})(),O=await z(D),{maxPages:K}=s.options,$=Q?I1:F1;return{pages:$(B.pages,O,K),pageParams:$(B.pageParams,N,K)}};if(c&&d.length){const B=c==="backward",N=B?sS:Cg,Q={pages:d,pageParams:h},k=N(r,Q);y=await A(Q,k,B)}else{const B=n??d.length;do{const N=p===0?h[0]??r.initialPageParam:Cg(r,y);if(p>0&&N==null)break;y=await A(y,N),p++}while(p<B)}return y};s.options.persister?s.fetchFn=()=>{var E,j;return(j=(E=s.options).persister)==null?void 0:j.call(E,m,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i)}:s.fetchFn=m}}}function Cg(n,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?n.getNextPageParam(s[r],s,i[r],i):void 0}function sS(n,{pages:s,pageParams:i}){var r;return s.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,s[0],s,i[0],i):void 0}var oi,Zs,ci,Sn,Js,gt,Br,Fs,ln,Wv,ha,Hv,lS=(Hv=class extends $v{constructor(s){super();de(this,ln);de(this,oi);de(this,Zs);de(this,ci);de(this,Sn);de(this,Js);de(this,gt);de(this,Br);de(this,Fs);ie(this,Fs,!1),ie(this,Br,s.defaultOptions),this.setOptions(s.options),this.observers=[],ie(this,Js,s.client),ie(this,Sn,T(this,Js).getQueryCache()),this.queryKey=s.queryKey,this.queryHash=s.queryHash,ie(this,Zs,Ag(this.options)),this.state=s.state??T(this,Zs),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return T(this,oi)}get promise(){var s;return(s=T(this,gt))==null?void 0:s.promise}setOptions(s){if(this.options={...T(this,Br),...s},s!=null&&s._type&&ie(this,oi,s._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Ag(this.options);i.data!==void 0&&(this.setState(Mg(i.data,i.dataUpdatedAt)),ie(this,Zs,i))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&T(this,Sn).remove(this)}setData(s,i){const r=kd(this.state.data,s,this.options);return Se(this,ln,ha).call(this,{data:r,type:"success",dataUpdatedAt:i==null?void 0:i.updatedAt,manual:i==null?void 0:i.manual}),r}setState(s){Se(this,ln,ha).call(this,{type:"setState",state:s})}cancel(s){var r,c;const i=(r=T(this,gt))==null?void 0:r.promise;return(c=T(this,gt))==null||c.cancel(s),i?i.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return T(this,Zs)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(s=>rn(s.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===uh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(s=>ms(s.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(s=>s.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(s=0){return this.state.data===void 0?!0:s==="static"?!1:this.state.isInvalidated?!0:!Xv(this.state.dataUpdatedAt,s)}onFocus(){var i;const s=this.observers.find(r=>r.shouldFetchOnWindowFocus());s==null||s.refetch({cancelRefetch:!1}),(i=T(this,gt))==null||i.continue()}onOnline(){var i;const s=this.observers.find(r=>r.shouldFetchOnReconnect());s==null||s.refetch({cancelRefetch:!1}),(i=T(this,gt))==null||i.continue()}addObserver(s){this.observers.includes(s)||(this.observers.push(s),this.clearGcTimeout(),T(this,Sn).notify({type:"observerAdded",query:this,observer:s}))}removeObserver(s){this.observers.includes(s)&&(this.observers=this.observers.filter(i=>i!==s),this.observers.length||(T(this,gt)&&(T(this,Fs)||Se(this,ln,Wv).call(this)?T(this,gt).cancel({revert:!0}):T(this,gt).cancelRetry()),this.scheduleGc()),T(this,Sn).notify({type:"observerRemoved",query:this,observer:s}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Se(this,ln,ha).call(this,{type:"invalidate"})}async fetch(s,i){var m,b,v,S,R,_,E,j,z,A,B;if(this.state.fetchStatus!=="idle"&&((m=T(this,gt))==null?void 0:m.status())!=="rejected"){if(this.state.data!==void 0&&(i!=null&&i.cancelRefetch))this.cancel({silent:!0});else if(T(this,gt))return T(this,gt).continueRetry(),T(this,gt).promise}if(s&&this.setOptions(s),!this.options.queryFn){const N=this.observers.find(Q=>Q.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,c=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(ie(this,Fs,!0),r.signal)})},d=()=>{const N=Jv(this.options,i),k=(()=>{const D={client:T(this,Js),queryKey:this.queryKey,meta:this.meta};return c(D),D})();return ie(this,Fs,!1),this.options.persister?this.options.persister(N,k,this):N(k)},y=(()=>{const N={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:T(this,Js),state:this.state,fetchFn:d};return c(N),N})(),p=T(this,oi)==="infinite"?aS(this.options.pages):this.options.behavior;p==null||p.onFetch(y,this),ie(this,ci,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=y.fetchOptions)==null?void 0:b.meta))&&Se(this,ln,ha).call(this,{type:"fetch",meta:(v=y.fetchOptions)==null?void 0:v.meta}),ie(this,gt,Iv({initialPromise:i==null?void 0:i.initialPromise,fn:y.fetchFn,onCancel:N=>{N instanceof Bd&&N.revert&&this.setState({...T(this,ci),fetchStatus:"idle"}),r.abort()},onFail:(N,Q)=>{Se(this,ln,ha).call(this,{type:"failed",failureCount:N,error:Q})},onPause:()=>{Se(this,ln,ha).call(this,{type:"pause"})},onContinue:()=>{Se(this,ln,ha).call(this,{type:"continue"})},retry:y.options.retry,retryDelay:y.options.retryDelay,networkMode:y.options.networkMode,canRun:()=>!0}));try{const N=await T(this,gt).start();if(N===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(N),(R=(S=T(this,Sn).config).onSuccess)==null||R.call(S,N,this),(E=(_=T(this,Sn).config).onSettled)==null||E.call(_,N,this.state.error,this),N}catch(N){if(N instanceof Bd){if(N.silent)return T(this,gt).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Se(this,ln,ha).call(this,{type:"error",error:N}),(z=(j=T(this,Sn).config).onError)==null||z.call(j,N,this),(B=(A=T(this,Sn).config).onSettled)==null||B.call(A,this.state.data,N,this),N}finally{this.scheduleGc()}}},oi=new WeakMap,Zs=new WeakMap,ci=new WeakMap,Sn=new WeakMap,Js=new WeakMap,gt=new WeakMap,Br=new WeakMap,Fs=new WeakMap,ln=new WeakSet,Wv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ha=function(s){const i=r=>{switch(s.type){case"failed":return{...r,fetchFailureCount:s.failureCount,fetchFailureReason:s.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...e0(r.data,this.options),fetchMeta:s.meta??null};case"success":const c={...r,...Mg(s.data,s.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!s.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ie(this,ci,s.manual?c:void 0),c;case"error":const d=s.error;return{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...s.state}}};this.state=i(this.state),mt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),T(this,Sn).notify({query:this,type:"updated",action:s})})},Hv);function e0(n,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fv(s.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function Mg(n,s){return{data:n,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ag(n){const s=typeof n.initialData=="function"?n.initialData():n.initialData,i=s!==void 0,r=i?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var Yt,Oe,qr,At,Is,ui,ma,ls,Hr,fi,di,$s,Ws,is,hi,Le,Nr,qd,Hd,Qd,Gd,Vd,Yd,Kd,t0,Qv,iS=(Qv=class extends ji{constructor(s,i){super();de(this,Le);de(this,Yt);de(this,Oe);de(this,qr);de(this,At);de(this,Is);de(this,ui);de(this,ma);de(this,ls);de(this,Hr);de(this,fi);de(this,di);de(this,$s);de(this,Ws);de(this,is);de(this,hi,new Set);this.options=i,ie(this,Yt,s),ie(this,ls,null),ie(this,ma,Ld()),this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(T(this,Oe).addObserver(this),Og(T(this,Oe),this.options)?Se(this,Le,Nr).call(this):this.updateResult(),Se(this,Le,Gd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pd(T(this,Oe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pd(T(this,Oe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Se(this,Le,Vd).call(this),Se(this,Le,Yd).call(this),T(this,Oe).removeObserver(this)}setOptions(s){const i=this.options,r=T(this,Oe);if(this.options=T(this,Yt).defaultQueryOptions(s),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof rn(this.options.enabled,T(this,Oe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Se(this,Le,Kd).call(this),T(this,Oe).setOptions(this.options),i._defaulted&&!Ac(this.options,i)&&T(this,Yt).getQueryCache().notify({type:"observerOptionsUpdated",query:T(this,Oe),observer:this});const c=this.hasListeners();c&&zg(T(this,Oe),r,this.options,i)&&Se(this,Le,Nr).call(this),this.updateResult(),c&&(T(this,Oe)!==r||rn(this.options.enabled,T(this,Oe))!==rn(i.enabled,T(this,Oe))||ms(this.options.staleTime,T(this,Oe))!==ms(i.staleTime,T(this,Oe)))&&Se(this,Le,qd).call(this);const d=Se(this,Le,Hd).call(this);c&&(T(this,Oe)!==r||rn(this.options.enabled,T(this,Oe))!==rn(i.enabled,T(this,Oe))||d!==T(this,is))&&Se(this,Le,Qd).call(this,d)}getOptimisticResult(s){const i=T(this,Yt).getQueryCache().build(T(this,Yt),s),r=this.createResult(i,s);return oS(this,r)&&(ie(this,At,r),ie(this,ui,this.options),ie(this,Is,T(this,Oe).state)),r}getCurrentResult(){return T(this,At)}trackResult(s,i){return new Proxy(s,{get:(r,c)=>(this.trackProp(c),i==null||i(c),c==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&T(this,ma).status==="pending"&&T(this,ma).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,c))})}trackProp(s){T(this,hi).add(s)}getCurrentQuery(){return T(this,Oe)}refetch({...s}={}){return this.fetch({...s})}fetchOptimistic(s){const i=T(this,Yt).defaultQueryOptions(s),r=T(this,Yt).getQueryCache().build(T(this,Yt),i);return r.fetch().then(()=>this.createResult(r,i))}fetch(s){return Se(this,Le,Nr).call(this,{...s,cancelRefetch:s.cancelRefetch??!0}).then(()=>(this.updateResult(),T(this,At)))}createResult(s,i){var K;const r=T(this,Oe),c=this.options,d=T(this,At),h=T(this,Is),y=T(this,ui),m=s!==r?s.state:T(this,qr),{state:b}=s;let v={...b},S=!1,R;if(i._optimisticResults){const $=this.hasListeners(),W=!$&&Og(s,i),Z=$&&zg(s,r,i,c);(W||Z)&&(v={...v,...e0(b.data,s.options)}),i._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:_,errorUpdatedAt:E,status:j}=v;R=v.data;let z=!1;if(i.placeholderData!==void 0&&R===void 0&&j==="pending"){let $;d!=null&&d.isPlaceholderData&&i.placeholderData===(y==null?void 0:y.placeholderData)?($=d.data,z=!0):$=typeof i.placeholderData=="function"?i.placeholderData((K=T(this,di))==null?void 0:K.state.data,T(this,di)):i.placeholderData,$!==void 0&&(j="success",R=kd(d==null?void 0:d.data,$,i),S=!0)}if(i.select&&R!==void 0&&!z)if(d&&R===(h==null?void 0:h.data)&&i.select===T(this,Hr))R=T(this,fi);else try{ie(this,Hr,i.select),R=i.select(R),R=kd(d==null?void 0:d.data,R,i),ie(this,fi,R),ie(this,ls,null)}catch($){ie(this,ls,$)}T(this,ls)&&(_=T(this,ls),R=T(this,fi),E=Date.now(),j="error");const A=v.fetchStatus==="fetching",B=j==="pending",N=j==="error",Q=B&&A,k=R!==void 0,O={status:j,fetchStatus:v.fetchStatus,isPending:B,isSuccess:j==="success",isError:N,isInitialLoading:Q,isLoading:Q,data:R,dataUpdatedAt:v.dataUpdatedAt,error:_,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:s.isFetched(),isFetchedAfterMount:v.dataUpdateCount>m.dataUpdateCount||v.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!B,isLoadingError:N&&!k,isPaused:v.fetchStatus==="paused",isPlaceholderData:S,isRefetchError:N&&k,isStale:dh(s,i),refetch:this.refetch,promise:T(this,ma),isEnabled:rn(i.enabled,s)!==!1};if(this.options.experimental_prefetchInRender){const $=O.data!==void 0,W=O.status==="error"&&!$,Z=he=>{W?he.reject(O.error):$&&he.resolve(O.data)},te=()=>{const he=ie(this,ma,O.promise=Ld());Z(he)},ee=T(this,ma);switch(ee.status){case"pending":s.queryHash===r.queryHash&&Z(ee);break;case"fulfilled":(W||O.data!==ee.value)&&te();break;case"rejected":(!W||O.error!==ee.reason)&&te();break}}return O}updateResult(){const s=T(this,At),i=this.createResult(T(this,Oe),this.options);if(ie(this,Is,T(this,Oe).state),ie(this,ui,this.options),T(this,Is).data!==void 0&&ie(this,di,T(this,Oe)),Ac(i,s))return;ie(this,At,i);const r=()=>{if(!s)return!0;const{notifyOnChangeProps:c}=this.options,d=typeof c=="function"?c():c;if(d==="all"||!d&&!T(this,hi).size)return!0;const h=new Set(d??T(this,hi));return this.options.throwOnError&&h.add("error"),Object.keys(T(this,At)).some(y=>{const p=y;return T(this,At)[p]!==s[p]&&h.has(p)})};Se(this,Le,t0).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Se(this,Le,Gd).call(this)}},Yt=new WeakMap,Oe=new WeakMap,qr=new WeakMap,At=new WeakMap,Is=new WeakMap,ui=new WeakMap,ma=new WeakMap,ls=new WeakMap,Hr=new WeakMap,fi=new WeakMap,di=new WeakMap,$s=new WeakMap,Ws=new WeakMap,is=new WeakMap,hi=new WeakMap,Le=new WeakSet,Nr=function(s){Se(this,Le,Kd).call(this);let i=T(this,Oe).fetch(this.options,s);return s!=null&&s.throwOnError||(i=i.catch(Ot)),i},qd=function(){Se(this,Le,Vd).call(this);const s=ms(this.options.staleTime,T(this,Oe));if(Ar.isServer()||T(this,At).isStale||!Dd(s))return;const r=Xv(T(this,At).dataUpdatedAt,s)+1;ie(this,$s,Vs.setTimeout(()=>{T(this,At).isStale||this.updateResult()},r))},Hd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(T(this,Oe)):this.options.refetchInterval)??!1},Qd=function(s){Se(this,Le,Yd).call(this),ie(this,is,s),!(Ar.isServer()||rn(this.options.enabled,T(this,Oe))===!1||!Dd(T(this,is))||T(this,is)===0)&&ie(this,Ws,Vs.setInterval(()=>{(this.options.refetchIntervalInBackground||rh.isFocused())&&Se(this,Le,Nr).call(this)},T(this,is)))},Gd=function(){Se(this,Le,qd).call(this),Se(this,Le,Qd).call(this,Se(this,Le,Hd).call(this))},Vd=function(){T(this,$s)!==void 0&&(Vs.clearTimeout(T(this,$s)),ie(this,$s,void 0))},Yd=function(){T(this,Ws)!==void 0&&(Vs.clearInterval(T(this,Ws)),ie(this,Ws,void 0))},Kd=function(){const s=T(this,Yt).getQueryCache().build(T(this,Yt),this.options);if(s===T(this,Oe))return;const i=T(this,Oe);ie(this,Oe,s),ie(this,qr,s.state),this.hasListeners()&&(i==null||i.removeObserver(this),s.addObserver(this))},t0=function(s){mt.batch(()=>{s.listeners&&this.listeners.forEach(i=>{i(T(this,At))}),T(this,Yt).getQueryCache().notify({query:T(this,Oe),type:"observerResultsUpdated"})})},Qv);function rS(n,s){return rn(s.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&rn(s.retryOnMount,n)===!1)}function Og(n,s){return rS(n,s)||n.state.data!==void 0&&Pd(n,s,s.refetchOnMount)}function Pd(n,s,i){if(rn(s.enabled,n)!==!1&&ms(s.staleTime,n)!=="static"){const r=typeof i=="function"?i(n):i;return r==="always"||r!==!1&&dh(n,s)}return!1}function zg(n,s,i,r){return(n!==s||rn(r.enabled,n)===!1)&&(!i.suspense||n.state.status!=="error")&&dh(n,i)}function dh(n,s){return rn(s.enabled,n)!==!1&&n.isStaleByTime(ms(s.staleTime,n))}function oS(n,s){return!Ac(n.getCurrentResult(),s)}var Qr,Qn,wt,el,Gn,Wa,Gv,cS=(Gv=class extends $v{constructor(s){super();de(this,Gn);de(this,Qr);de(this,Qn);de(this,wt);de(this,el);ie(this,Qr,s.client),this.mutationId=s.mutationId,ie(this,wt,s.mutationCache),ie(this,Qn,[]),this.state=s.state||n0(),this.setOptions(s.options),this.scheduleGc()}setOptions(s){this.options=s,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(s){T(this,Qn).includes(s)||(T(this,Qn).push(s),this.clearGcTimeout(),T(this,wt).notify({type:"observerAdded",mutation:this,observer:s}))}removeObserver(s){ie(this,Qn,T(this,Qn).filter(i=>i!==s)),this.scheduleGc(),T(this,wt).notify({type:"observerRemoved",mutation:this,observer:s})}optionalRemove(){T(this,Qn).length||(this.state.status==="pending"?this.scheduleGc():T(this,wt).remove(this))}continue(){var s;return((s=T(this,el))==null?void 0:s.continue())??this.execute(this.state.variables)}async execute(s){var h,y,p,m,b,v,S,R,_,E,j,z,A,B,N,Q,k,D;const i=()=>{Se(this,Gn,Wa).call(this,{type:"continue"})},r={client:T(this,Qr),meta:this.options.meta,mutationKey:this.options.mutationKey};ie(this,el,Iv({fn:()=>this.options.mutationFn?this.options.mutationFn(s,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,K)=>{Se(this,Gn,Wa).call(this,{type:"failed",failureCount:O,error:K})},onPause:()=>{Se(this,Gn,Wa).call(this,{type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>T(this,wt).canRun(this)}));const c=this.state.status==="pending",d=!T(this,el).canStart();try{if(c)i();else{Se(this,Gn,Wa).call(this,{type:"pending",variables:s,isPaused:d}),T(this,wt).config.onMutate&&await T(this,wt).config.onMutate(s,this,r);const K=await((y=(h=this.options).onMutate)==null?void 0:y.call(h,s,r));K!==this.state.context&&Se(this,Gn,Wa).call(this,{type:"pending",context:K,variables:s,isPaused:d})}const O=await T(this,el).start();return await((m=(p=T(this,wt).config).onSuccess)==null?void 0:m.call(p,O,s,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,O,s,this.state.context,r)),await((R=(S=T(this,wt).config).onSettled)==null?void 0:R.call(S,O,null,this.state.variables,this.state.context,this,r)),await((E=(_=this.options).onSettled)==null?void 0:E.call(_,O,null,s,this.state.context,r)),Se(this,Gn,Wa).call(this,{type:"success",data:O}),O}catch(O){try{await((z=(j=T(this,wt).config).onError)==null?void 0:z.call(j,O,s,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((B=(A=this.options).onError)==null?void 0:B.call(A,O,s,this.state.context,r))}catch(K){Promise.reject(K)}try{await((Q=(N=T(this,wt).config).onSettled)==null?void 0:Q.call(N,void 0,O,this.state.variables,this.state.context,this,r))}catch(K){Promise.reject(K)}try{await((D=(k=this.options).onSettled)==null?void 0:D.call(k,void 0,O,s,this.state.context,r))}catch(K){Promise.reject(K)}throw Se(this,Gn,Wa).call(this,{type:"error",error:O}),O}finally{T(this,wt).runNext(this)}}},Qr=new WeakMap,Qn=new WeakMap,wt=new WeakMap,el=new WeakMap,Gn=new WeakSet,Wa=function(s){const i=r=>{switch(s.type){case"failed":return{...r,failureCount:s.failureCount,failureReason:s.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:s.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:s.isPaused,status:"pending",variables:s.variables,submittedAt:Date.now()};case"success":return{...r,data:s.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:s.error,failureCount:r.failureCount+1,failureReason:s.error,isPaused:!1,status:"error"}}};this.state=i(this.state),mt.batch(()=>{T(this,Qn).forEach(r=>{r.onMutationUpdate(s)}),T(this,wt).notify({mutation:this,type:"updated",action:s})})},Gv);function n0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ya,Tn,Gr,Vv,uS=(Vv=class extends ji{constructor(s={}){super();de(this,ya);de(this,Tn);de(this,Gr);this.config=s,ie(this,ya,new Set),ie(this,Tn,new Map),ie(this,Gr,0)}build(s,i,r){const c=new cS({client:s,mutationCache:this,mutationId:++uc(this,Gr)._,options:s.defaultMutationOptions(i),state:r});return this.add(c),c}add(s){T(this,ya).add(s);const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i);r?r.push(s):T(this,Tn).set(i,[s])}this.notify({type:"added",mutation:s})}remove(s){if(T(this,ya).delete(s)){const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i);if(r)if(r.length>1){const c=r.indexOf(s);c!==-1&&r.splice(c,1)}else r[0]===s&&T(this,Tn).delete(i)}}this.notify({type:"removed",mutation:s})}canRun(s){const i=fc(s);if(typeof i=="string"){const r=T(this,Tn).get(i),c=r==null?void 0:r.find(d=>d.state.status==="pending");return!c||c===s}else return!0}runNext(s){var r;const i=fc(s);if(typeof i=="string"){const c=(r=T(this,Tn).get(i))==null?void 0:r.find(d=>d!==s&&d.state.isPaused);return(c==null?void 0:c.continue())??Promise.resolve()}else return Promise.resolve()}clear(){mt.batch(()=>{T(this,ya).forEach(s=>{this.notify({type:"removed",mutation:s})}),T(this,ya).clear(),T(this,Tn).clear()})}getAll(){return Array.from(T(this,ya))}find(s){const i={exact:!0,...s};return this.getAll().find(r=>wg(i,r))}findAll(s={}){return this.getAll().filter(i=>wg(s,i))}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}resumePausedMutations(){const s=this.getAll().filter(i=>i.state.isPaused);return mt.batch(()=>Promise.all(s.map(i=>i.continue().catch(Ot))))}},ya=new WeakMap,Tn=new WeakMap,Gr=new WeakMap,Vv);function fc(n){var s;return(s=n.options.scope)==null?void 0:s.id}var pa,rs,Kt,ga,xa,jc,Xd,Yv,fS=(Yv=class extends ji{constructor(i,r){super();de(this,xa);de(this,pa);de(this,rs);de(this,Kt);de(this,ga);ie(this,pa,i),this.setOptions(r),this.bindMethods(),Se(this,xa,jc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){var c;const r=this.options;this.options=T(this,pa).defaultMutationOptions(i),Ac(this.options,r)||T(this,pa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:T(this,Kt),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&sl(r.mutationKey)!==sl(this.options.mutationKey)?this.reset():((c=T(this,Kt))==null?void 0:c.state.status)==="pending"&&T(this,Kt).setOptions(this.options)}onUnsubscribe(){var i;this.hasListeners()||(i=T(this,Kt))==null||i.removeObserver(this)}onMutationUpdate(i){Se(this,xa,jc).call(this),Se(this,xa,Xd).call(this,i)}getCurrentResult(){return T(this,rs)}reset(){var i;(i=T(this,Kt))==null||i.removeObserver(this),ie(this,Kt,void 0),Se(this,xa,jc).call(this),Se(this,xa,Xd).call(this)}mutate(i,r){var c;return ie(this,ga,r),(c=T(this,Kt))==null||c.removeObserver(this),ie(this,Kt,T(this,pa).getMutationCache().build(T(this,pa),this.options)),T(this,Kt).addObserver(this),T(this,Kt).execute(i)}},pa=new WeakMap,rs=new WeakMap,Kt=new WeakMap,ga=new WeakMap,xa=new WeakSet,jc=function(){var r;const i=((r=T(this,Kt))==null?void 0:r.state)??n0();ie(this,rs,{...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset})},Xd=function(i){mt.batch(()=>{var r,c,d,h,y,p,m,b;if(T(this,ga)&&this.hasListeners()){const v=T(this,rs).variables,S=T(this,rs).context,R={client:T(this,pa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((i==null?void 0:i.type)==="success"){try{(c=(r=T(this,ga)).onSuccess)==null||c.call(r,i.data,v,S,R)}catch(_){Promise.reject(_)}try{(h=(d=T(this,ga)).onSettled)==null||h.call(d,i.data,null,v,S,R)}catch(_){Promise.reject(_)}}else if((i==null?void 0:i.type)==="error"){try{(p=(y=T(this,ga)).onError)==null||p.call(y,i.error,v,S,R)}catch(_){Promise.reject(_)}try{(b=(m=T(this,ga)).onSettled)==null||b.call(m,void 0,i.error,v,S,R)}catch(_){Promise.reject(_)}}}this.listeners.forEach(v=>{v(T(this,rs))})})},Yv),Vn,Kv,dS=(Kv=class extends ji{constructor(s={}){super();de(this,Vn);this.config=s,ie(this,Vn,new Map)}build(s,i,r){const c=i.queryKey,d=i.queryHash??oh(c,i);let h=this.get(d);return h||(h=new lS({client:s,queryKey:c,queryHash:d,options:s.defaultQueryOptions(i),state:r,defaultOptions:s.getQueryDefaults(c)}),this.add(h)),h}add(s){T(this,Vn).has(s.queryHash)||(T(this,Vn).set(s.queryHash,s),this.notify({type:"added",query:s}))}remove(s){const i=T(this,Vn).get(s.queryHash);i&&(s.destroy(),i===s&&T(this,Vn).delete(s.queryHash),this.notify({type:"removed",query:s}))}clear(){mt.batch(()=>{this.getAll().forEach(s=>{this.remove(s)})})}get(s){return T(this,Vn).get(s)}getAll(){return[...T(this,Vn).values()]}find(s){const i={exact:!0,...s};return this.getAll().find(r=>Eg(i,r))}findAll(s={}){const i=this.getAll();return Object.keys(s).length>0?i.filter(r=>Eg(s,r)):i}notify(s){mt.batch(()=>{this.listeners.forEach(i=>{i(s)})})}onFocus(){mt.batch(()=>{this.getAll().forEach(s=>{s.onFocus()})})}onOnline(){mt.batch(()=>{this.getAll().forEach(s=>{s.onOnline()})})}},Vn=new WeakMap,Kv),nt,os,cs,mi,yi,us,pi,gi,Pv,hS=(Pv=class{constructor(n={}){de(this,nt);de(this,os);de(this,cs);de(this,mi);de(this,yi);de(this,us);de(this,pi);de(this,gi);ie(this,nt,n.queryCache||new dS),ie(this,os,n.mutationCache||new uS),ie(this,cs,n.defaultOptions||{}),ie(this,mi,new Map),ie(this,yi,new Map),ie(this,us,0)}mount(){uc(this,us)._++,T(this,us)===1&&(ie(this,pi,rh.subscribe(async n=>{n&&(await this.resumePausedMutations(),T(this,nt).onFocus())})),ie(this,gi,Oc.subscribe(async n=>{n&&(await this.resumePausedMutations(),T(this,nt).onOnline())})))}unmount(){var n,s;uc(this,us)._--,T(this,us)===0&&((n=T(this,pi))==null||n.call(this),ie(this,pi,void 0),(s=T(this,gi))==null||s.call(this),ie(this,gi,void 0))}isFetching(n){return T(this,nt).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return T(this,os).findAll({...n,status:"pending"}).length}getQueryData(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=T(this,nt).get(s.queryHash))==null?void 0:i.state.data}ensureQueryData(n){const s=this.defaultQueryOptions(n),i=T(this,nt).build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&i.isStaleByTime(ms(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(n){return T(this,nt).findAll(n).map(({queryKey:s,state:i})=>{const r=i.data;return[s,r]})}setQueryData(n,s,i){const r=this.defaultQueryOptions({queryKey:n}),c=T(this,nt).get(r.queryHash),d=c==null?void 0:c.state.data,h=X1(s,d);if(h!==void 0)return T(this,nt).build(this,r).setData(h,{...i,manual:!0})}setQueriesData(n,s,i){return mt.batch(()=>T(this,nt).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(n){var i;const s=this.defaultQueryOptions({queryKey:n});return(i=T(this,nt).get(s.queryHash))==null?void 0:i.state}removeQueries(n){const s=T(this,nt);mt.batch(()=>{s.findAll(n).forEach(i=>{s.remove(i)})})}resetQueries(n,s){const i=T(this,nt);return mt.batch(()=>(i.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},s)))}cancelQueries(n,s={}){const i={revert:!0,...s},r=mt.batch(()=>T(this,nt).findAll(n).map(c=>c.cancel(i)));return Promise.all(r).then(Ot).catch(Ot)}invalidateQueries(n,s={}){return mt.batch(()=>(T(this,nt).findAll(n).forEach(i=>{i.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},s)))}refetchQueries(n,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=mt.batch(()=>T(this,nt).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let d=c.fetch(void 0,i);return i.throwOnError||(d=d.catch(Ot)),c.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(r).then(Ot)}fetchQuery(n){const s=this.defaultQueryOptions(n);s.retry===void 0&&(s.retry=!1);const i=T(this,nt).build(this,s);return i.isStaleByTime(ms(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ot).catch(Ot)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ot).catch(Ot)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Oc.isOnline()?T(this,os).resumePausedMutations():Promise.resolve()}getQueryCache(){return T(this,nt)}getMutationCache(){return T(this,os)}getDefaultOptions(){return T(this,cs)}setDefaultOptions(n){ie(this,cs,n)}setQueryDefaults(n,s){T(this,mi).set(sl(n),{queryKey:n,defaultOptions:s})}getQueryDefaults(n){const s=[...T(this,mi).values()],i={};return s.forEach(r=>{Mr(n,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(n,s){T(this,yi).set(sl(n),{mutationKey:n,defaultOptions:s})}getMutationDefaults(n){const s=[...T(this,yi).values()],i={};return s.forEach(r=>{Mr(n,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(n){if(n._defaulted)return n;const s={...T(this,cs).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return s.queryHash||(s.queryHash=oh(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===uh&&(s.enabled=!1),s}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...T(this,cs).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){T(this,nt).clear(),T(this,os).clear()}},nt=new WeakMap,os=new WeakMap,cs=new WeakMap,mi=new WeakMap,yi=new WeakMap,us=new WeakMap,pi=new WeakMap,gi=new WeakMap,Pv),od={exports:{}},ve={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var L1=Object.defineProperty;var jg=n=>{throw TypeError(n)};var B1=(n,s,i)=>s in
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Dg;function mS(){if(Dg)return ve;Dg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function R(C){return C===null||typeof C!="object"?null:(C=S&&C[S]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,j={};function z(C,F,ae){this.props=C,this.context=F,this.refs=j,this.updater=ae||_}z.prototype.isReactComponent={},z.prototype.setState=function(C,F){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,F,"setState")},z.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=z.prototype;function B(C,F,ae){this.props=C,this.context=F,this.refs=j,this.updater=ae||_}var N=B.prototype=new A;N.constructor=B,E(N,z.prototype),N.isPureReactComponent=!0;var Q=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function P(C,F,ae){var se=ae.ref;return{$$typeof:n,type:C,key:F,ref:se!==void 0?se:null,props:ae}}function $(C,F){return P(C.type,F,C.props)}function W(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Z(C){var F={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ae){return F[ae]})}var te=/\/+/g;function ee(C,F){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):F.toString(36)}function he(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(k,k):(C.status="pending",C.then(function(F){C.status==="pending"&&(C.status="fulfilled",C.value=F)},function(F){C.status==="pending"&&(C.status="rejected",C.reason=F)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,F,ae,se,le){var me=typeof C;(me==="undefined"||me==="boolean")&&(C=null);var Re=!1;if(C===null)Re=!0;else switch(me){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(C.$$typeof){case n:case s:Re=!0;break;case b:return Re=C._init,L(Re(C._payload),F,ae,se,le)}}if(Re)return le=le(C),Re=se===""?"."+ee(C,0):se,Q(le)?(ae="",Re!=null&&(ae=Re.replace(te,"$&/")+"/"),L(le,F,ae,"",function(un){return un})):le!=null&&(W(le)&&(le=$(le,ae+(le.key==null||C&&C.key===le.key?"":(""+le.key).replace(te,"$&/")+"/")+Re)),F.push(le)),1;Re=0;var He=se===""?".":se+":";if(Q(C))for(var ge=0;ge<C.length;ge++)se=C[ge],me=He+ee(se,ge),Re+=L(se,F,ae,me,le);else if(ge=R(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(se=C.next()).done;)se=se.value,me=He+ee(se,ge++),Re+=L(se,F,ae,me,le);else if(me==="object"){if(typeof C.then=="function")return L(he(C),F,ae,se,le);throw F=String(C),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Re}function K(C,F,ae){if(C==null)return C;var se=[],le=0;return L(C,se,"","",function(me){return F.call(ae,me,le++)}),se}function ue(C){if(C._status===-1){var F=C._result;F=F(),F.then(function(ae){(C._status===0||C._status===-1)&&(C._status=1,C._result=ae)},function(ae){(C._status===0||C._status===-1)&&(C._status=2,C._result=ae)}),C._status===-1&&(C._status=0,C._result=F)}if(C._status===1)return C._result.default;throw C._result}var Me=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ne={map:K,forEach:function(C,F,ae){K(C,function(){F.apply(this,arguments)},ae)},count:function(C){var F=0;return K(C,function(){F++}),F},toArray:function(C){return K(C,function(F){return F})||[]},only:function(C){if(!W(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ve.Activity=v,ve.Children=ne,ve.Component=z,ve.Fragment=i,ve.Profiler=c,ve.PureComponent=B,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ve.__COMPILER_RUNTIME={__proto__:null,c:function(C){return D.H.useMemoCache(C)}},ve.cache=function(C){return function(){return C.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(C,F,ae){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var se=E({},C.props),le=C.key;if(F!=null)for(me in F.key!==void 0&&(le=""+F.key),F)!O.call(F,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&F.ref===void 0||(se[me]=F[me]);var me=arguments.length-2;if(me===1)se.children=ae;else if(1<me){for(var Re=Array(me),He=0;He<me;He++)Re[He]=arguments[He+2];se.children=Re}return P(C.type,le,se)},ve.createContext=function(C){return C={$$typeof:h,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},ve.createElement=function(C,F,ae){var se,le={},me=null;if(F!=null)for(se in F.key!==void 0&&(me=""+F.key),F)O.call(F,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(le[se]=F[se]);var Re=arguments.length-2;if(Re===1)le.children=ae;else if(1<Re){for(var He=Array(Re),ge=0;ge<Re;ge++)He[ge]=arguments[ge+2];le.children=He}if(C&&C.defaultProps)for(se in Re=C.defaultProps,Re)le[se]===void 0&&(le[se]=Re[se]);return P(C,me,le)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(C){return{$$typeof:y,render:C}},ve.isValidElement=W,ve.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ue}},ve.memo=function(C,F){return{$$typeof:m,type:C,compare:F===void 0?null:F}},ve.startTransition=function(C){var F=D.T,ae={};D.T=ae;try{var se=C(),le=D.S;le!==null&&le(ae,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(k,Me)}catch(me){Me(me)}finally{F!==null&&ae.types!==null&&(F.types=ae.types),D.T=F}},ve.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ve.use=function(C){return D.H.use(C)},ve.useActionState=function(C,F,ae){return D.H.useActionState(C,F,ae)},ve.useCallback=function(C,F){return D.H.useCallback(C,F)},ve.useContext=function(C){return D.H.useContext(C)},ve.useDebugValue=function(){},ve.useDeferredValue=function(C,F){return D.H.useDeferredValue(C,F)},ve.useEffect=function(C,F){return D.H.useEffect(C,F)},ve.useEffectEvent=function(C){return D.H.useEffectEvent(C)},ve.useId=function(){return D.H.useId()},ve.useImperativeHandle=function(C,F,ae){return D.H.useImperativeHandle(C,F,ae)},ve.useInsertionEffect=function(C,F){return D.H.useInsertionEffect(C,F)},ve.useLayoutEffect=function(C,F){return D.H.useLayoutEffect(C,F)},ve.useMemo=function(C,F){return D.H.useMemo(C,F)},ve.useOptimistic=function(C,F){return D.H.useOptimistic(C,F)},ve.useReducer=function(C,F,ae){return D.H.useReducer(C,F,ae)},ve.useRef=function(C){return D.H.useRef(C)},ve.useState=function(C){return D.H.useState(C)},ve.useSyncExternalStore=function(C,F,ae){return D.H.useSyncExternalStore(C,F,ae)},ve.useTransition=function(){return D.H.useTransition()},ve.version="19.2.6",ve}var Ug;function Vr(){return Ug||(Ug=1,od.exports=mS()),od.exports}var Y=Vr();const Or=q1(Y);var a0=Y.createContext(void 0),ps=n=>{const s=Y.useContext(a0);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},yS=({client:n,children:s})=>(Y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(a0.Provider,{value:n,children:s})),s0=Y.createContext(!1),pS=()=>Y.useContext(s0);s0.Provider;function gS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var vS=Y.createContext(gS()),bS=()=>Y.useContext(vS),xS=(n,s,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?fh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(s.isReset()||(n.retryOnMount=!1))},SS=n=>{Y.useEffect(()=>{n.clearReset()},[n])},jS=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:c})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(c&&n.data===void 0||fh(i,[n.error,r])),RS=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...c)=>i(r(...c)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},_S=(n,s)=>n.isLoading&&n.isFetching&&!s,ES=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,kg=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function wS(n,s,i){var R,_,E,j;const r=pS(),c=bS(),d=ps(),h=d.defaultQueryOptions(n);(_=(R=d.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||_.call(R,h);const y=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,RS(h),xS(h,c,y),SS(c);const m=!d.getQueryCache().get(h.queryHash),[b]=Y.useState(()=>new s(d,h)),v=b.getOptimisticResult(h),S=!r&&p;if(Y.useSyncExternalStore(Y.useCallback(z=>{const A=S?b.subscribe(mt.batchCalls(z)):Ot;return b.updateResult(),A},[b,S]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),Y.useEffect(()=>{b.setOptions(h)},[h,b]),ES(h,v))throw kg(h,b,c);if(jS({result:v,errorResetBoundary:c,throwOnError:h.throwOnError,query:y,suspense:h.suspense}))throw v.error;if((j=(E=d.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||j.call(E,h,v),h.experimental_prefetchInRender&&!Ar.isServer()&&_S(v,r)){const z=m?kg(h,b,c):y==null?void 0:y.promise;z==null||z.catch(Ot).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?v:b.trackResult(v)}function lt(n,s){return wS(n,iS)}function Sa(n,s){const i=ps(),[r]=Y.useState(()=>new fS(i,n));Y.useEffect(()=>{r.setOptions(n)},[r,n]);const c=Y.useSyncExternalStore(Y.useCallback(h=>r.subscribe(mt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=Y.useCallback((h,y)=>{r.mutate(h,y).catch(Ot)},[r]);if(c.error&&fh(r.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}var Cr=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function cd(n){const s=Y.useRef({value:n,prev:null}),i=s.current.value;return n!==i&&(s.current={value:n,prev:i}),s.current.prev}function TS(n,s,i={},r={}){Y.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const c=new IntersectionObserver(([d])=>{s(d)},i);return c.observe(n.current),()=>{c.disconnect()}},[s,i,r.disabled,n])}function NS(n){const s=Y.useRef(null);return Y.useImperativeHandle(n,()=>s.current,[]),s}const l0=!1;function zr(n){return n[n.length-1]}function CS(n){return typeof n=="function"}function Ys(n,s){return CS(n)?n(s):n}const i0=Object.prototype.hasOwnProperty,Lg=Object.prototype.propertyIsEnumerable;function r0(n){for(const s in n)if(i0.call(n,s))return!0;return!1}const MS=()=>Object.create(null),Bs=(n,s)=>fs(n,s,MS);function fs(n,s,i=()=>({}),r=0){if(n===s)return n;if(r>500)return s;const c=s,d=Hg(n)&&Hg(c);if(!d&&!(zc(n)&&zc(c)))return c;const h=d?n:Bg(n);if(!h)return c;const y=d?c:Bg(c);if(!y)return c;const p=h.length,m=y.length,b=d?new Array(m):i();let v=0;for(let S=0;S<m;S++){const R=d?S:y[S],_=n[R],E=c[R];if(_===E){b[R]=_,(d?S<p:i0.call(n,R))&&v++;continue}if(_===null||E===null||typeof _!="object"||typeof E!="object"){b[R]=E;continue}const j=fs(_,E,i,r+1);b[R]=j,j===_&&v++}return p===m&&v===p?n:b}function Bg(n){const s=Object.getOwnPropertyNames(n);for(const c of s)if(!Lg.call(n,c))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return s;const r=s;for(const c of i){if(!Lg.call(n,c))return!1;r.push(c)}return r}function zc(n){if(!qg(n))return!1;const s=n.constructor;if(typeof s>"u")return!0;const i=s.prototype;return!(!qg(i)||!i.hasOwnProperty("isPrototypeOf"))}function qg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Hg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function tl(n,s,i){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(Array.isArray(n)&&Array.isArray(s)){if(n.length!==s.length)return!1;for(let r=0,c=n.length;r<c;r++)if(!tl(n[r],s[r],i))return!1;return!0}if(zc(n)&&zc(s)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in s)if((!r||s[h]!==void 0)&&!tl(n[h],s[h],i))return!1;return!0}let c=0;if(!r)c=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&c++;let d=0;for(const h in s)if((!r||s[h]!==void 0)&&(d++,d>c||!tl(n[h],s[h],i)))return!1;return c===d}return!1}function vi(n){let s,i;const r=new Promise((c,d)=>{s=c,i=d});return r.status="pending",r.resolve=c=>{r.status="resolved",r.value=c,s(c),n==null||n(c)},r.reject=c=>{r.status="rejected",i(c)},r}function Dr(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function AS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Qg(n){let s;try{s=decodeURI(n)}catch{s=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return AS(s)}const OS=["http:","https:","mailto:","tel:"];function Dc(n,s){if(!n)return!1;try{const i=new URL(n);return!s.has(i.protocol)}catch{return!1}}function xr(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const s=/%25|%5C/gi;let i=0,r="",c;for(;(c=s.exec(n))!==null;)r+=Qg(n.slice(i,c.index))+c[0],i=s.lastIndex;r=r+Qg(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function zS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function DS(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}function ba(){throw new Error("Invariant failed")}function Ur(n){const s=new Map;let i,r;const c=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,i=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=s.get(d);if(h)return c(h),h.value},set(d,h){if(s.size>=n&&i){const p=i;s.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const y=s.get(d);if(y)y.value=h,c(y);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),s.set(d,p)}},clear(){s.clear(),i=void 0,r=void 0}}}const ds=4,o0=5;function US(n){const s=n.indexOf("{");if(s===-1)return null;const i=n.indexOf("}",s);return i===-1||s+1>=n.length?null:[s,i]}function c0(n,s,i=new Uint16Array(6)){const r=n.indexOf("/",s),c=r===-1?n.length:r,d=n.substring(s,c);if(!d||!d.includes("$"))return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i;if(d==="$"){const y=n.length;return i[0]=2,i[1]=s,i[2]=s,i[3]=y,i[4]=y,i[5]=y,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=s,i[2]=s+1,i[3]=c,i[4]=c,i[5]=c,i;const h=US(d);if(h){const[y,p]=h,m=d.charCodeAt(y+1);if(m===45){if(y+2<d.length&&d.charCodeAt(y+2)===36){const b=y+3,v=p;if(b<v)return i[0]=3,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=c,i}}else if(m===36){const b=y+1,v=y+2;return v===p?(i[0]=2,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=n.length,i):(i[0]=1,i[1]=s+y,i[2]=s+v,i[3]=s+p,i[4]=s+p+1,i[5]=c,i)}}return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i}function Gc(n,s,i,r,c,d,h){var p,m,b,v,S,R,_,E,j,z;h==null||h(i);let y=r;{const A=i.fullPath??i.from,B=A.length,N=((p=i.options)==null?void 0:p.caseSensitive)??n,Q=((b=(m=i.options)==null?void 0:m.params)==null?void 0:b.parse)??((v=i.options)==null?void 0:v.parseParams);for(;y<B;){const D=c0(A,y,s);let O;const P=y,$=D[5];switch(y=$+1,d++,D[0]){case 0:{const W=A.substring(D[2],D[3]);if(N){const Z=(S=c.static)==null?void 0:S.get(W);if(Z)O=Z;else{c.static??(c.static=new Map);const te=Ps(i.fullPath??i.from);te.parent=c,te.depth=d,O=te,c.static.set(W,te)}}else{const Z=W.toLowerCase(),te=(R=c.staticInsensitive)==null?void 0:R.get(Z);if(te)O=te;else{c.staticInsensitive??(c.staticInsensitive=new Map);const ee=Ps(i.fullPath??i.from);ee.parent=c,ee.depth=d,O=ee,c.staticInsensitive.set(Z,ee)}}break}case 1:{const W=A.substring(P,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((_=c.dynamic)==null?void 0:_.find(K=>!K.parse&&K.caseSensitive===te&&K.prefix===ee&&K.suffix===he));if(L)O=L;else{const K=fd(1,i.fullPath??i.from,te,ee,he);O=K,K.depth=d,K.parent=c,c.dynamic??(c.dynamic=[]),c.dynamic.push(K)}break}case 3:{const W=A.substring(P,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((E=c.optional)==null?void 0:E.find(K=>!K.parse&&K.caseSensitive===te&&K.prefix===ee&&K.suffix===he));if(L)O=L;else{const K=fd(3,i.fullPath??i.from,te,ee,he);O=K,K.parent=c,K.depth=d,c.optional??(c.optional=[]),c.optional.push(K)}break}case 2:{const W=A.substring(P,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=fd(2,i.fullPath??i.from,te,ee,he);O=L,L.parent=c,L.depth=d,c.wildcard??(c.wildcard=[]),c.wildcard.push(L)}}c=O}if(Q&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const D=Ps(i.fullPath??i.from);D.kind=o0,D.parent=c,d++,D.depth=d,c.pathless??(c.pathless=[]),c.pathless.push(D),c=D}const k=(i.path||!i.children)&&!i.isRoot;if(k&&A.endsWith("/")){const D=Ps(i.fullPath??i.from);D.kind=ds,D.parent=c,d++,D.depth=d,c.index=D,c=D}c.parse=Q??null,c.priority=((z=(j=i.options)==null?void 0:j.params)==null?void 0:z.priority)??0,k&&!c.route&&(c.route=i,c.fullPath=i.fullPath??i.from)}if(i.children)for(const A of i.children)Gc(n,s,A,y,c,d,h)}function ud(n,s){if(n.parse&&!s.parse)return-1;if(!n.parse&&s.parse)return 1;if(n.parse&&s.parse&&(n.priority||s.priority))return s.priority-n.priority;if(n.prefix&&s.prefix&&n.prefix!==s.prefix){if(n.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(n.prefix))return 1}if(n.suffix&&s.suffix&&n.suffix!==s.suffix){if(n.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(n.suffix))return 1}return n.prefix&&!s.prefix?-1:!n.prefix&&s.prefix?1:n.suffix&&!s.suffix?-1:!n.suffix&&s.suffix?1:n.caseSensitive&&!s.caseSensitive?-1:!n.caseSensitive&&s.caseSensitive?1:0}function ts(n){var s,i,r;if(n.pathless)for(const c of n.pathless)ts(c);if(n.static)for(const c of n.static.values())ts(c);if(n.staticInsensitive)for(const c of n.staticInsensitive.values())ts(c);if((s=n.dynamic)!=null&&s.length){n.dynamic.sort(ud);for(const c of n.dynamic)ts(c)}if((i=n.optional)!=null&&i.length){n.optional.sort(ud);for(const c of n.optional)ts(c)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(ud);for(const c of n.wildcard)ts(c)}}function Ps(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function fd(n,s,i,r,c){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:s,parent:null,parse:null,priority:0,caseSensitive:i,prefix:r,suffix:c}}function kS(n,s){const i=Ps("/"),r=new Uint16Array(6);for(const c of n)Gc(!1,r,c,1,i,0);ts(i),s.masksTree=i,s.flatCache=Ur(1e3)}function LS(n,s){n||(n="/");const i=s.flatCache.get(n);if(i)return i;const r=hh(n,s.masksTree);return s.flatCache.set(n,r),r}function BS(n,s,i,r,c){n||(n="/"),r||(r="/");const d=s?`case\0${n}`:n;let h=c.singleCache.get(d);return h||(h=Ps("/"),Gc(s,new Uint16Array(6),{from:n},1,h,0),c.singleCache.set(d,h)),hh(r,h,i)}function qS(n,s,i=!1){const r=i?n:`nofuzz\0${n}`,c=s.matchCache.get(r);if(c!==void 0)return c;n||(n="/");let d;try{d=hh(n,s.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=f0(d.route)),s.matchCache.set(r,d),d}function HS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function QS(n,s=!1,i){const r=Ps(n.fullPath),c=new Uint16Array(6),d={},h={};let y=0;return Gc(s,c,n,1,r,0,p=>{if(i==null||i(p,y),p.id in d&&ba(),d[p.id]=p,y!==0&&p.path){const m=HS(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}y++}),ts(r),{processedTree:{segmentTree:r,singleCache:Ur(1e3),matchCache:Ur(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function hh(n,s,i=!1){const r=n.split("/"),c=VS(n,r,s,i);if(!c)return null;const[d]=u0(n,r,c);return{route:c.node.route,rawParams:d}}function u0(n,s,i){var b,v,S,R,_,E,j,z,A,B;const r=GS(i.node);let c=null;const d=Object.create(null);let h=((b=i.extract)==null?void 0:b.part)??0,y=((v=i.extract)==null?void 0:v.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((R=i.extract)==null?void 0:R.segment)??0;for(;y<r.length;h++,y++,p++,m++){const N=r[y];if(N.kind===ds)break;if(N.kind===o0){m--,h--,p--;continue}const Q=s[h],k=p;if(Q&&(p+=Q.length),N.kind===1){c??(c=i.node.fullPath.split("/"));const D=c[m],O=((_=N.prefix)==null?void 0:_.length)??0;if(D.charCodeAt(O)===123){const P=((E=N.suffix)==null?void 0:E.length)??0,$=D.substring(O+2,D.length-P-1),W=Q.substring(O,Q.length-P);d[$]=decodeURIComponent(W)}else{const P=D.substring(1);d[P]=decodeURIComponent(Q)}}else if(N.kind===3){if(i.skipped&1<<y){h--,p=k-1;continue}c??(c=i.node.fullPath.split("/"));const D=c[m],O=((j=N.prefix)==null?void 0:j.length)??0,P=((z=N.suffix)==null?void 0:z.length)??0,$=D.substring(O+3,D.length-P-1),W=N.suffix||N.prefix?Q.substring(O,Q.length-P):Q;W&&(d[$]=decodeURIComponent(W))}else if(N.kind===2){const D=N,O=n.substring(k+(((A=D.prefix)==null?void 0:A.length)??0),n.length-(((B=D.suffix)==null?void 0:B.length)??0)),P=decodeURIComponent(O);d["*"]=P,d._splat=P;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:y,path:p,segment:m}]}function f0(n){const s=[n];for(;n.parentRoute;)n=n.parentRoute,s.push(n);return s.reverse(),s}function GS(n){const s=Array(n.depth+1);do s[n.depth]=n,n=n.parent;while(n);return s}function VS(n,s,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const c=!zr(s),d=c&&n!=="/",h=s.length-(c?1:0),y=[{node:i,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;y.length;){const b=y.pop(),{node:v,index:S,skipped:R,depth:_,statics:E,dynamics:j,optionals:z}=b;let{extract:A,rawParams:B}=b;if(v.kind===2&&v.route&&!hc(m,b))continue;if(v.parse){if(!Gg(n,s,b))continue;B=b.rawParams,A=b.extract}r&&v.route&&v.kind!==ds&&hc(p,b)&&(p=b);const N=S===h;if(N&&(v.route&&(!d||v.kind===ds||v.kind===2)&&hc(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const Q=N?void 0:s[S];let k;if(N&&v.index){const D={node:v.index,index:S,skipped:R,depth:_+1,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B};let O=!0;if(v.index.parse&&(Gg(n,s,D)||(O=!1)),O){if(!j&&!z&&!R&&YS(E,h))return D;hc(m,D)&&(m=D)}}if(v.wildcard)for(let D=v.wildcard.length-1;D>=0;D--){const O=v.wildcard[D],{prefix:P,suffix:$}=O;if(!(P&&(N||!(O.caseSensitive?Q:k??(k=Q.toLowerCase())).startsWith(P)))){if($){if(N)continue;const W=s.slice(S).join("/").slice(-$.length);if((O.caseSensitive?W:W.toLowerCase())!==$)continue}y.push({node:O,index:h,skipped:R,depth:_+1,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}}if(v.optional){const D=R|1<<_,O=_+1;for(let P=v.optional.length-1;P>=0;P--){const $=v.optional[P];y.push({node:$,index:S,skipped:D,depth:O,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}if(!N)for(let P=v.optional.length-1;P>=0;P--){const $=v.optional[P],{prefix:W,suffix:Z}=$;if(W||Z){const te=$.caseSensitive?Q:k??(k=Q.toLowerCase());if(W&&!te.startsWith(W)||Z&&!te.endsWith(Z))continue}y.push({node:$,index:S+1,skipped:R,depth:O,statics:E,dynamics:j,optionals:z+dc(h,S),extract:A,rawParams:B})}}if(!N&&v.dynamic&&Q)for(let D=v.dynamic.length-1;D>=0;D--){const O=v.dynamic[D],{prefix:P,suffix:$}=O;if(P||$){const W=O.caseSensitive?Q:k??(k=Q.toLowerCase());if(P&&!W.startsWith(P)||$&&!W.endsWith($))continue}y.push({node:O,index:S+1,skipped:R,depth:_+1,statics:E,dynamics:j+dc(h,S),optionals:z,extract:A,rawParams:B})}if(!N&&v.staticInsensitive){const D=v.staticInsensitive.get(k??(k=Q.toLowerCase()));D&&y.push({node:D,index:S+1,skipped:R,depth:_+1,statics:E+dc(h,S),dynamics:j,optionals:z,extract:A,rawParams:B})}if(!N&&v.static){const D=v.static.get(Q);D&&y.push({node:D,index:S+1,skipped:R,depth:_+1,statics:E+dc(h,S),dynamics:j,optionals:z,extract:A,rawParams:B})}if(v.pathless){const D=_+1;for(let O=v.pathless.length-1;O>=0;O--){const P=v.pathless[O];y.push({node:P,index:S,skipped:R,depth:D,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}}}if(m)return m;if(r&&p){let b=p.index;for(let S=0;S<p.index;S++)b+=s[S].length;const v=b===n.length?"/":n.slice(b);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function dc(n,s){return 2**(n-s-1)}function YS(n,s){return n===2**(s-1)-1}function Gg(n,s,i){let r,c;try{[r,c]=u0(n,s,i)}catch{return null}if(i.rawParams=r,i.extract=c,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function hc(n,s){return n?s.statics>n.statics||s.statics===n.statics&&(s.dynamics>n.dynamics||s.dynamics===n.dynamics&&(s.optionals>n.optionals||s.optionals===n.optionals&&((s.node.kind===ds)>(n.node.kind===ds)||s.node.kind===ds==(n.node.kind===ds)&&s.depth>n.depth))):!0}function Rc(n){return mh(n.filter(s=>s!==void 0).join("/"))}function mh(n){return n.replace(/\/{2,}/g,"/")}function d0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function va(n){const s=n.length;return s>1&&n[s-1]==="/"?n.replace(/\/{1,}$/,""):n}function h0(n){return va(d0(n))}function Uc(n,s){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${s}/`?n.slice(0,-1):n}function PS(n,s,i){return Uc(n,i)===Uc(s,i)}function KS({base:n,to:s,trailingSlash:i="never",cache:r}){const c=s.startsWith("/"),d=!c&&s===".";let h;if(r){h=c?s:d?n:n+"\0"+s;const m=r.get(h);if(m)return m}let y;if(d)y=n.split("/");else if(c)y=s.split("/");else{for(y=n.split("/");y.length>1&&zr(y)==="";)y.pop();const m=s.split("/");for(let b=0,v=m.length;b<v;b++){const S=m[b];S===""?b?b===v-1&&y.push(S):y=[S]:S===".."?y.pop():S==="."||y.push(S)}}y.length>1&&(zr(y)===""?i==="never"&&y.pop():i==="always"&&y.push(""));const p=mh(y.join("/"))||"/";return h&&r&&r.set(h,p),p}function XS(n){const s=new Map(n.map(c=>[encodeURIComponent(c),c])),i=Array.from(s.keys()).map(c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return c=>c.replace(r,d=>s.get(d)??d)}function dd(n,s,i){const r=s[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(c=>Yg(c,i)).join("/"):Yg(r,i)}function Vg({path:n,params:s,decoder:i,...r}){let c=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:c};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:c};const h=n.length;let y=0,p,m="";for(;y<h;){const b=y;p=c0(n,b,p);const v=p[5];if(y=v+1,b===v)continue;const S=p[0];if(S===0){m+="/"+n.substring(b,v);continue}if(S===2){const R=s._splat;d._splat=R,d["*"]=R;const _=n.substring(b,p[1]),E=n.substring(p[4],v);if(!R){c=!0,(_||E)&&(m+="/"+_+E);continue}const j=dd("_splat",s,i);m+="/"+_+j+E;continue}if(S===1){const R=n.substring(p[2],p[3]);!c&&!(R in s)&&(c=!0),d[R]=s[R];const _=n.substring(b,p[1]),E=n.substring(p[4],v),j=dd(R,s,i)??"undefined";m+="/"+_+j+E;continue}if(S===3){const R=n.substring(p[2],p[3]),_=s[R];if(_==null)continue;d[R]=_;const E=n.substring(b,p[1]),j=n.substring(p[4],v),z=dd(R,s,i)??"";m+="/"+E+z+j;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:c}}function Yg(n,s){const i=encodeURIComponent(n);return(s==null?void 0:s(i))??i}function Nt(n){return(n==null?void 0:n.isNotFound)===!0}function ZS(n,s=String){const i=new URLSearchParams;for(const r in n){const c=n[r];c!==void 0&&i.set(r,s(c))}return i.toString()}function hd(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function JS(n){const s=new URLSearchParams(n),i=Object.create(null);for(const[r,c]of s.entries()){const d=i[r];d==null?i[r]=hd(c):Array.isArray(d)?d.push(hd(c)):i[r]=[d,hd(c)]}return i}const FS=$S(JSON.parse),IS=WS(JSON.stringify,JSON.parse);function $S(n){return s=>{s[0]==="?"&&(s=s.substring(1));const i=JS(s);for(const r in i){const c=i[r];if(typeof c=="string")try{i[r]=n(c)}catch{}}return i}}function WS(n,s){const i=typeof s=="function";function r(c){if(typeof c=="object"&&c!==null)try{return n(c)}catch{}else if(i&&typeof c=="string")try{return s(c),n(c)}catch{}return c}return c=>{const d=ZS(c,r);return d?`?${d}`:""}}const nl="__root__";function ej(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const s=new Headers(n.headers);n.href&&s.get("Location")===null&&s.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:s});if(i.options=n,n.throw)throw i;return i}function Kt(n){return n instanceof Response&&!!n.options}const Zd=n=>{var s;if(!n.rendered)return n.rendered=!0,(s=n.onReady)==null?void 0:s.call(n)},tj=n=>n.stores.matchesId.get().some(s=>{var i;return(i=n.stores.matchStores.get(s))==null?void 0:i.get()._forcePending}),Vc=(n,s)=>!!(n.preload&&!n.router.stores.matchStores.has(s)),al=(n,s,i=!0)=>{const r={...n.router.options.context??{}},c=i?s:s-1;for(let d=0;d<=c;d++){const h=n.matches[d];if(!h)continue;const y=n.router.getMatch(h.id);y&&Object.assign(r,y.__routeContext,y.__beforeLoadContext)}return r},Pg=(n,s)=>{if(!n.matches.length)return;const i=s.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),c=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=c);for(let h=d;h>=0;h--){const y=n.matches[h];if(n.router.looseRoutesById[y.routeId].options.notFoundComponent)return h}return i?d:c},hs=(n,s,i)=>{var r,c,d;if(!(!Kt(i)&&!Nt(i)))throw Kt(i)&&i.redirectHandled&&!i.options.reloadDocument||(s&&((r=s._nonReactive.beforeLoadPromise)==null||r.resolve(),(c=s._nonReactive.loaderPromise)==null||c.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=i,n.updateMatch(s.id,h=>({...h,status:Kt(i)?"redirected":Nt(i)?"notFound":h.status==="pending"?"success":h.status,context:al(n,s.index),isFetching:!1,error:i})),Nt(i)&&!i.routeId&&(i.routeId=s.routeId),(d=s._nonReactive.loadPromise)==null||d.resolve()),Kt(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},m0=(n,s)=>{const i=n.router.getMatch(s);return!!(!i||i._nonReactive.dehydrated)},Kg=(n,s,i)=>{const r=al(n,i);n.updateMatch(s,c=>({...c,context:r}))},Sr=(n,s,i)=>{var h,y;const{id:r,routeId:c}=n.matches[s],d=n.router.looseRoutesById[c];if(i instanceof Promise)throw i;n.firstBadMatchIndex??(n.firstBadMatchIndex=s),hs(n,n.router.getMatch(r),i);try{(y=(h=d.options).onError)==null||y.call(h,i)}catch(p){i=p,hs(n,n.router.getMatch(r),i)}n.updateMatch(r,p=>{var m,b;return(m=p._nonReactive.beforeLoadPromise)==null||m.resolve(),p._nonReactive.beforeLoadPromise=void 0,(b=p._nonReactive.loadPromise)==null||b.resolve(),{...p,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Kt(i)&&!Nt(i)&&(n.serialError??(n.serialError=i))},y0=(n,s,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const c=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Vc(n,s)&&(i.options.loader||i.options.beforeLoad||g0(i))&&typeof c=="number"&&c!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Zd(n)},c);r._nonReactive.pendingTimeout=h}},nj=(n,s,i)=>{const r=n.router.getMatch(s);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;y0(n,s,i,r);const c=()=>{const d=n.router.getMatch(s);d.preload&&(d.status==="redirected"||d.status==="notFound")&&hs(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(c):c()},aj=(n,s,i,r)=>{const c=n.router.getMatch(s);let d=c._nonReactive.loadPromise;c._nonReactive.loadPromise=vi(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:y}=c;h&&Sr(n,i,h),y&&Sr(n,i,y),y0(n,s,r,c);const p=new AbortController;let m=!1;const b=()=>{m||(m=!0,n.updateMatch(s,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:p})))},v=()=>{var N;(N=c._nonReactive.beforeLoadPromise)==null||N.resolve(),c._nonReactive.beforeLoadPromise=void 0,n.updateMatch(s,Q=>({...Q,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{b(),v()});return}c._nonReactive.beforeLoadPromise=vi();const S={...al(n,i,!1),...c.__routeContext},{search:R,params:_,cause:E}=c,j=Vc(n,s),z={search:R,abortController:p,params:_,preload:j,context:S,location:n.location,navigate:N=>n.router.navigate({...N,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:j?"preload":E,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},A=N=>{if(N===void 0){n.router.batch(()=>{b(),v()});return}(Kt(N)||Nt(N))&&(b(),Sr(n,i,N)),n.router.batch(()=>{b(),n.updateMatch(s,Q=>({...Q,__beforeLoadContext:N})),v()})};let B;try{if(B=r.options.beforeLoad(z),Dr(B))return b(),B.catch(N=>{Sr(n,i,N)}).then(A)}catch(N){b(),Sr(n,i,N)}A(B)},sj=(n,s)=>{const{id:i,routeId:r}=n.matches[s],c=n.router.looseRoutesById[r],d=()=>y(),h=()=>aj(n,i,s,c),y=()=>{if(m0(n,i))return;const p=nj(n,i,c);return Dr(p)?p.then(h):h()};return d()},lj=(n,s,i)=>{var d,h,y,p,m,b;const r=n.router.getMatch(s);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const c={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=i.options).head)==null?void 0:h.call(d,c),(p=(y=i.options).scripts)==null?void 0:p.call(y,c),(b=(m=i.options).headers)==null?void 0:b.call(m,c)]).then(([v,S,R])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:R,scripts:S,styles:v==null?void 0:v.styles}))},p0=(n,s,i,r,c)=>{const d=s[r-1],{params:h,loaderDeps:y,abortController:p,cause:m}=n.router.getMatch(i),b=al(n,r),v=Vc(n,i);return{params:h,deps:y,preload:!!v,parentMatchPromise:d,abortController:p,context:b,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:v?"preload":m,route:c,...n.router.options.additionalContext}},Xg=async(n,s,i,r,c)=>{var d,h,y,p,m;try{const b=n.router.getMatch(i);try{(!(l0??n.router.isServer)||b.ssr===!0)&&kr(c);const v=c.options.loader,S=typeof v=="function"?v:v==null?void 0:v.handler,R=S==null?void 0:S(p0(n,s,i,r,c)),_=!!S&&Dr(R);if((_||c._lazyPromise||c._componentsPromise||c.options.head||c.options.scripts||c.options.headers||b._nonReactive.minPendingPromise)&&n.updateMatch(i,j=>({...j,isFetching:"loader"})),S){const j=_?await R:R;hs(n,n.router.getMatch(i),j),j!==void 0&&n.updateMatch(i,z=>({...z,loaderData:j}))}c._lazyPromise&&await c._lazyPromise;const E=b._nonReactive.minPendingPromise;E&&await E,c._componentsPromise&&await c._componentsPromise,n.updateMatch(i,j=>({...j,error:void 0,context:al(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let S=v;if((S==null?void 0:S.name)==="AbortError"){if(b.abortController.signal.aborted){(d=b._nonReactive.loaderPromise)==null||d.resolve(),b._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,_=>({..._,status:_.status==="pending"?"success":_.status,isFetching:!1,context:al(n,r)}));return}const R=b._nonReactive.minPendingPromise;R&&await R,Nt(v)&&await((y=(h=c.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:y.call(h)),hs(n,n.router.getMatch(i),v);try{(m=(p=c.options).onError)==null||m.call(p,v)}catch(_){S=_,hs(n,n.router.getMatch(i),_)}!Kt(S)&&!Nt(S)&&await kr(c,["errorComponent"]),n.updateMatch(i,_=>({..._,error:S,context:al(n,r),status:"error",isFetching:!1}))}}catch(b){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),hs(n,v,b)}},ij=async(n,s,i)=>{var R,_,E,j;async function r(z,A,B,N,Q){const k=Date.now()-A.updatedAt,D=z?Q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Q.options.staleTime??n.router.options.defaultStaleTime??0,O=Q.options.shouldReload,P=typeof O=="function"?O(p0(n,s,c,i,Q)):O,{status:$,invalid:W}=N,Z=k>=D&&(!!n.forceStaleReload||N.cause==="enter"||B!==void 0&&B!==N.id);h=$==="success"&&(W||(P??Z)),z&&Q.options.preload===!1||(h&&!n.sync&&b?(y=!0,(async()=>{var te,ee;try{await Xg(n,s,c,i,Q);const he=n.router.getMatch(c);(te=he._nonReactive.loaderPromise)==null||te.resolve(),(ee=he._nonReactive.loadPromise)==null||ee.resolve(),he._nonReactive.loaderPromise=void 0,he._nonReactive.loadPromise=void 0}catch(he){Kt(he)&&await n.router.navigate(he.options)}})()):$!=="success"||h?await Xg(n,s,c,i,Q):Kg(n,c,i))}const{id:c,routeId:d}=n.matches[i];let h=!1,y=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,b=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(m0(n,c)){if(!n.router.getMatch(c))return n.matches[i];Kg(n,c,i)}else{const z=n.router.getMatch(c),A=n.router.stores.matchesId.get()[i],B=((R=A&&n.router.stores.matchStores.get(A)||null)==null?void 0:R.routeId)===d?A:(_=n.router.stores.matches.get().find(Q=>Q.routeId===d))==null?void 0:_.id,N=Vc(n,c);if(z._nonReactive.loaderPromise){if(z.status==="success"&&!n.sync&&!z.preload&&b)return z;await z._nonReactive.loaderPromise;const Q=n.router.getMatch(c),k=Q._nonReactive.error||Q.error;k&&hs(n,Q,k),Q.status==="pending"&&await r(N,z,B,Q,p)}else{const Q=N&&!n.router.stores.matchStores.has(c),k=n.router.getMatch(c);k._nonReactive.loaderPromise=vi(),Q!==k.preload&&n.updateMatch(c,D=>({...D,preload:Q})),await r(N,z,B,k,p)}}const v=n.router.getMatch(c);y||((E=v._nonReactive.loaderPromise)==null||E.resolve(),(j=v._nonReactive.loadPromise)==null||j.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,y||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const S=y?v.isFetching:!1;return S!==v.isFetching||v.invalid!==!1?(n.updateMatch(c,z=>({...z,isFetching:S,invalid:!1})),n.router.getMatch(c)):v};async function Zg(n){var S,R;const s=n,i=[];tj(s.router)&&Zd(s);let r;for(let _=0;_<s.matches.length;_++){try{const E=sj(s,_);Dr(E)&&await E}catch(E){if(Kt(E))throw E;if(Nt(E))r=E;else if(!s.preload)throw E;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const c=s.firstBadMatchIndex??s.matches.length,d=r&&!s.preload?Pg(s,r):void 0,h=r&&s.preload?0:d!==void 0?Math.min(d+1,c):c;let y,p;for(let _=0;_<h;_++)i.push(ij(s,i,_));try{await Promise.all(i)}catch{const _=await Promise.allSettled(i);for(const E of _){if(E.status!=="rejected")continue;const j=E.reason;if(Kt(j))throw j;Nt(j)?y??(y=j):p??(p=j)}if(p!==void 0)throw p}const m=y??(r&&!s.preload?r:void 0);let b=s.firstBadMatchIndex!==void 0?s.firstBadMatchIndex:s.matches.length-1;if(!m&&r&&s.preload)return s.matches;if(m){const _=Pg(s,m);_===void 0&&ba();const E=s.matches[_],j=s.router.looseRoutesById[E.routeId],z=(S=s.router.options)==null?void 0:S.defaultNotFoundComponent;!j.options.notFoundComponent&&z&&(j.options.notFoundComponent=z),m.routeId=E.routeId;const A=E.routeId===s.router.routeTree.id;s.updateMatch(E.id,B=>({...B,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),b=_,await kr(j,["notFoundComponent"])}else if(!s.preload){const _=s.matches[0];_.globalNotFound||(R=s.router.getMatch(_.id))!=null&&R.globalNotFound&&s.updateMatch(_.id,E=>({...E,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const _=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await kr(_,["errorComponent"])}for(let _=0;_<=b;_++){const{id:E,routeId:j}=s.matches[_],z=s.router.looseRoutesById[j];try{const A=lj(s,E,z);if(A){const B=await A;s.updateMatch(E,N=>({...N,...B}))}}catch(A){console.error(`Error executing head for route ${j}:`,A)}}const v=Zd(s);if(Dr(v)&&await v,m)throw m;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function Jg(n,s){const i=s.map(r=>{var c,d;return(d=(c=n.options[r])==null?void 0:c.preload)==null?void 0:d.call(c)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function kr(n,s=_c){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:c,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:s===_c?(()=>{if(n._componentsPromise===void 0){const r=Jg(n,_c);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Jg(n,s);return n._lazyPromise?n._lazyPromise.then(i):i()}function g0(n){var s;for(const i of _c)if((s=n.options[i])!=null&&s.preload)return!0;return!1}const _c=["component","errorComponent","pendingComponent","notFoundComponent"];function rj(n){return{input:({url:s})=>{for(const i of n)s=Jd(i,s);return s},output:({url:s})=>{for(let i=n.length-1;i>=0;i--)s=v0(n[i],s);return s}}}function oj(n){const s=h0(n.basepath),i=`/${s}`,r=n.caseSensitive?i:i.toLowerCase(),c=`${r}/`;return{input:({url:d})=>{const h=n.caseSensitive?d.pathname:d.pathname.toLowerCase();return h===r?d.pathname="/":h.startsWith(c)&&(d.pathname=d.pathname.slice(i.length)),d},output:({url:d})=>(d.pathname=Rc(["/",s,d.pathname]),d)}}function Jd(n,s){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function v0(n,s){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function cj(n,s){const{createMutableStore:i,createReadonlyStore:r,batch:c,init:d}=s,h=new Map,y=new Map,p=new Map,m=i(n.status),b=i(n.loadedAt),v=i(n.isLoading),S=i(n.isTransitioning),R=i(n.location),_=i(n.resolvedLocation),E=i(n.statusCode),j=i(n.redirect),z=i([]),A=i([]),B=i([]),N=r(()=>md(h,z.get())),Q=r(()=>md(y,A.get())),k=r(()=>md(p,B.get())),D=r(()=>z.get()[0]),O=r(()=>z.get().some(K=>{var ue;return((ue=h.get(K))==null?void 0:ue.get().status)==="pending"})),P=r(()=>{var K;return{locationHref:R.get().href,resolvedLocationHref:(K=_.get())==null?void 0:K.href,status:m.get()}}),$=r(()=>({status:m.get(),loadedAt:b.get(),isLoading:v.get(),isTransitioning:S.get(),matches:N.get(),location:R.get(),resolvedLocation:_.get(),statusCode:E.get(),redirect:j.get()})),W=Ur(64);function Z(K){let ue=W.get(K);return ue||(ue=r(()=>{const Me=z.get();for(const ne of Me){const C=h.get(ne);if(C&&C.routeId===K)return C.get()}}),W.set(K,ue)),ue}const te={status:m,loadedAt:b,isLoading:v,isTransitioning:S,location:R,resolvedLocation:_,statusCode:E,redirect:j,matchesId:z,pendingIds:A,cachedIds:B,matches:N,pendingMatches:Q,cachedMatches:k,firstId:D,hasPending:O,matchRouteDeps:P,matchStores:h,pendingMatchStores:y,cachedMatchStores:p,__store:$,getRouteMatchStore:Z,setMatches:ee,setPending:he,setCached:L};ee(n.matches),d==null||d(te);function ee(K){yd(K,h,z,i,c)}function he(K){yd(K,y,A,i,c)}function L(K){yd(K,p,B,i,c)}return te}function md(n,s){const i=[];for(const r of s){const c=n.get(r);c&&i.push(c.get())}return i}function yd(n,s,i,r,c){const d=n.map(y=>y.id),h=new Set(d);c(()=>{for(const y of s.keys())h.has(y)||s.delete(y);for(const y of n){const p=s.get(y.id);if(!p){const m=r(y);m.routeId=y.routeId,s.set(y.id,m);continue}p.routeId=y.routeId,p.get()!==y&&p.set(y)}DS(i.get(),d)||i.set(d)})}var ys="__TSR_index",Fg="popstate",Ig="beforeunload";function uj(n){let s=n.getLocation();const i=new Set,r=h=>{s=n.getLocation(),i.forEach(y=>y({location:s,action:h}))},c=h=>{n.notifyOnIndexChange??!0?r(h):s=n.getLocation()},d=async({task:h,navigateOpts:y,...p})=>{var v,S;if((y==null?void 0:y.ignoreBlocker)??!1){h();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],b=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&b)for(const R of m){const _=kc(p.path,p.state);if(await R.blockerFn({currentLocation:s,nextLocation:_,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return s},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,y,p)=>{const m=s.state[ys];y=$g(m+1,y),d({task:()=>{n.pushState(h,y),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:y})},replace:(h,y,p)=>{const m=s.state[ys];y=$g(m,y),d({task:()=>{n.replaceState(h,y),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:y})},go:(h,y)=>{d({task:()=>{n.go(h),c({type:"GO",index:h})},navigateOpts:y,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),c({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),c({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>s.state[ys]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const y=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...y,h]),()=>{var b,v;const m=((b=n.getBlockers)==null?void 0:b.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function $g(n,s){s||(s={});const i=yh();return{...s,key:i,__TSR_key:i,[ys]:n}}function fj(n){var O,P;const s=typeof document<"u"?window:void 0,i=s.history.pushState,r=s.history.replaceState;let c=[];const d=()=>c,h=$=>c=$,y=($=>$),p=(()=>kc(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((O=s.history.state)!=null&&O.__TSR_key)&&!((P=s.history.state)!=null&&P.key)){const $=yh();s.history.replaceState({[ys]:0,key:$,__TSR_key:$},"")}let m=p(),b,v=!1,S=!1,R=!1,_=!1;const E=()=>m;let j,z;const A=()=>{j&&(D._ignoreSubscribers=!0,(j.isPush?s.history.pushState:s.history.replaceState)(j.state,"",j.href),D._ignoreSubscribers=!1,j=void 0,z=void 0,b=void 0)},B=($,W,Z)=>{const te=y(W);z||(b=m),m=kc(W,Z),j={href:te,state:Z,isPush:(j==null?void 0:j.isPush)||$==="push"},z||(z=Promise.resolve().then(()=>A()))},N=$=>{m=p(),D.notify({type:$})},Q=async()=>{if(S){S=!1;return}const $=p(),W=$.state[ys]-m.state[ys],Z=W===1,te=W===-1,ee=!Z&&!te||v;v=!1;const he=ee?"GO":te?"BACK":"FORWARD",L=ee?{type:"GO",index:W}:{type:te?"BACK":"FORWARD"};if(R)R=!1;else{const K=d();if(typeof document<"u"&&K.length){for(const ue of K)if(await ue.blockerFn({currentLocation:m,nextLocation:$,action:he})){S=!0,s.history.go(1),D.notify(L);return}}}m=p(),D.notify(L)},k=$=>{if(_){_=!1;return}let W=!1;const Z=d();if(typeof document<"u"&&Z.length)for(const te of Z){const ee=te.enableBeforeUnload??!0;if(ee===!0){W=!0;break}if(typeof ee=="function"&&ee()===!0){W=!0;break}}if(W)return $.preventDefault(),$.returnValue=""},D=uj({getLocation:E,getLength:()=>s.history.length,pushState:($,W)=>B("push",$,W),replaceState:($,W)=>B("replace",$,W),back:$=>($&&(R=!0),_=!0,s.history.back()),forward:$=>{$&&(R=!0),_=!0,s.history.forward()},go:$=>{v=!0,s.history.go($)},createHref:$=>y($),flush:A,destroy:()=>{s.history.pushState=i,s.history.replaceState=r,s.removeEventListener(Ig,k,{capture:!0}),s.removeEventListener(Fg,Q)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return s.addEventListener(Ig,k,{capture:!0}),s.addEventListener(Fg,Q),s.history.pushState=function(...$){const W=i.apply(s.history,$);return D._ignoreSubscribers||N("PUSH"),W},s.history.replaceState=function(...$){const W=r.apply(s.history,$);return D._ignoreSubscribers||N("REPLACE"),W},D}function dj(n){let s=n.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function kc(n,s){const i=dj(n),r=i.indexOf("#"),c=i.indexOf("?"),d=yh();return{href:i,pathname:i.substring(0,r>0?c>0?Math.min(r,c):r:c>0?c:i.length),hash:r>-1?i.substring(r):"",search:c>-1?i.slice(c,r===-1?void 0:r):"",state:s||{[ys]:0,key:d,__TSR_key:d}}}function yh(){return(Math.random()+1).toString(36).substring(7)}function ai(n,s){const i=s,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}const Fd=new WeakMap;var hj=class{constructor(n,s){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=i=>i(),this.update=i=>{var b;const r=this.options,c=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=XS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=fj()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Ur(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=cj(yj(this.latestLocation),v),wj(this)}let y=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||c!==p||h!==m){this.basepath=p;const v=[],S=h0(p);S&&S!=="/"&&v.push(oj({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:rj(v),this.history&&this.updateLatestLocation(),y=!0}y&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((b=window.CSS)==null?void 0:b.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=QS(this.routeTree,this.options.caseSensitive,(r,c)=>{r.init({originalIndex:c})});return this.options.routeMasks&&kS(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const c={eventType:i,fn:r};return this.subscribers.add(c),()=>{this.subscribers.delete(c)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const c=({pathname:p,search:m,hash:b,href:v,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),A=this.options.stringifySearch(z);return{href:p+A+b,publicHref:p+A+b,pathname:xr(p).path,external:!1,searchStr:A,search:Bs(r==null?void 0:r.search,z),hash:xr(b.slice(1)).path,state:fs(r==null?void 0:r.state,S)}}const R=new URL(v,this.origin),_=Jd(this.rewrite,R),E=this.options.parseSearch(_.search),j=this.options.stringifySearch(E);return _.search=j,{href:_.href.replace(_.origin,""),publicHref:v,pathname:xr(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:j,search:Bs(r==null?void 0:r.search,E),hash:xr(_.hash.slice(1)).path,state:fs(r==null?void 0:r.state,S)}},d=c(i),{__tempLocation:h,__tempKey:y}=d.state;if(h&&(!y||y===this.tempLocationKey)){const p=c(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(i,r)=>KS({base:i,to:r.includes("//")?mh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,c)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},c):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>pj({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.get().forEach(i=>{var c;if(this.stores.pendingMatchStores.has(i))return;const r=(c=this.stores.matchStores.get(i))==null?void 0:c.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(d={})=>{var W,Z;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,y=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??y.fullPath,m=d.to?`${d.to}`:void 0,b=y.search,v=Object.assign(Object.create(null),y.params),S=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(p,"."),R=m?this.resolvePathWithBase(S,m):S,_=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?v:Object.assign(v,Ys(d.params,v)),E=this.routesByPath[va(R)];let j;if(E)j=this.getRouteBranch(E);else if(R.includes("$"))j=[];else{const te=this.getMatchedRoutes(R);j=te.matchedRoutes,this.options.notFoundRoute&&(!te.foundRoute||te.foundRoute.path!=="/"&&te.routeParams["**"])&&(j=[...j,this.options.notFoundRoute])}if(j.length&&r0(_))for(const te of j){const ee=((W=te.options.params)==null?void 0:W.stringify)??te.options.stringifyParams;if(ee)try{Object.assign(_,ee(_))}catch{}}const z=i.leaveParams?R:xr(Vg({path:R,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=b;if(i._includeValidateSearch&&((Z=this.options.search)!=null&&Z.strict)){const te={};j.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(te,Ec(ee.options.validateSearch,{...te,...A}))}catch{}}),A=te}A=gj({search:A,dest:d,destRoutes:j,_includeValidateSearch:i._includeValidateSearch}),A=Bs(b,A);const B=this.options.stringifySearch(A),N=d.hash===!0?h.hash:d.hash?Ys(d.hash,h.hash):void 0,Q=N?`#${N}`:"";let k=d.state===!0?h.state:d.state?Ys(d.state,h.state):{};k=fs(h.state,k);const D=`${z}${B}${Q}`;let O,P,$=!1;if(this.rewrite){const te=new URL(D,this.origin),ee=v0(this.rewrite,te);O=te.href.replace(te.origin,""),ee.origin!==this.origin?(P=ee.href,$=!0):P=ee.pathname+ee.search+ee.hash}else O=zS(D),P=O;return{publicHref:P,href:O,pathname:z,search:A,searchStr:B,state:k,hash:N??"",external:$,unmaskOnReload:d.unmaskOnReload}},c=(d={},h)=>{const y=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const b=LS(y.pathname,this.processedTree);if(b){Object.assign(m,b.rawParams);const{from:v,params:S,...R}=b.route,_=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,Ys(S,m));h={from:i.from,...R,params:_},p=r(h)}}}return p&&(y.maskedLocation=p),y};return i.mask?c(i,{from:i.from,...i.mask}):c(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...c})=>{let d;const h=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{c.state[v]=this.latestLocation.state[v]});const b=tl(c.state,this.latestLocation.state);return m.forEach(v=>{delete c.state[v]}),b},y=va(this.latestLocation.href)===va(c.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=vi(()=>{p==null||p.resolve(),p=void 0}),y&&h())this.load();else{let{maskedLocation:m,hashScrollIntoView:b,...v}=c;m&&(v={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=b??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,d=c.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=c.resetScroll??!0,this.history.subscribers.size||this.load(d?{action:{type:d}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:c,viewTransition:d,ignoreBlocker:h,href:y,...p}={})=>{if(y){const v=this.history.location.state.__TSR_index,S=kc(y,{__TSR_index:i?v:v+1}),R=new URL(S.pathname,this.origin);p.to=Jd(this.rewrite,R).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const b=this.commitLocation({...m,viewTransition:d,replace:i,resetScroll:r,hashScrollIntoView:c,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),b},this.navigate=async({to:i,reloadDocument:r,href:c,publicHref:d,...h})=>{var p,m;let y=!1;if(c)try{new URL(`${c}`),y=!0}catch{}if(y&&!r&&(r=!0),r){if(i!==void 0||!c){const v=this.buildLocation({to:i,...h});c=c??v.publicHref,d=d??v.publicHref}const b=!y&&d?d:c;if(Dc(b,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of v)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(b):window.location.href=b,Promise.resolve()}return this.buildAndCommitLocation({...h,href:c,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(c=>!i.some(d=>d.id===c.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(i),this.stores.setCached(r)})},this.load=async i=>{var m;const r=(m=i==null?void 0:i.action)==null?void 0:m.type;let c,d,h;const y=this.stores.resolvedLocation.get()??this.stores.location.get();for(h=new Promise(b=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),r?Fd.set(this.latestLocation,r):Fd.delete(this.latestLocation);const S=this.latestLocation,R=ai(S,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...R}),this.emit({type:"onBeforeLoad",...R}),await Zg({router:this,sync:i==null?void 0:i.sync,forceStaleReload:y.href===S.href,matches:this.stores.pendingMatches.get(),location:S,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,B;let _=null,E=null,j=null,z=null;this.batch(()=>{const N=this.stores.pendingMatches.get(),Q=N.length,k=this.stores.matches.get();_=Q?k.filter(P=>!this.stores.pendingMatchStores.has(P.id)):null;const D=new Set;for(const P of this.stores.pendingMatchStores.values())P.routeId&&D.add(P.routeId);const O=new Set;for(const P of this.stores.matchStores.values())P.routeId&&O.add(P.routeId);E=Q?k.filter(P=>!D.has(P.routeId)):null,j=Q?N.filter(P=>!O.has(P.routeId)):null,z=Q?N.filter(P=>O.has(P.routeId)):k,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),Q&&(this.stores.setMatches(N),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),..._.filter(P=>P.status!=="error"&&P.status!=="notFound"&&P.status!=="redirected")]),this.clearExpiredCache())});for(const[N,Q]of[[E,"onLeave"],[j,"onEnter"],[z,"onStay"]])if(N)for(const k of N)(B=(A=this.looseRoutesById[k.routeId].options)[Q])==null||B.call(A,k)})})}})}catch(S){Kt(S)?(c=S,this.navigate({...c.options,replace:!0,ignoreBlocker:!0})):Nt(S)&&(d=S);const R=c?c.status:d?404:this.stores.matches.get().some(_=>_.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(R),this.stores.redirect.set(c)})}this.latestLoadPromise===h&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),b()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(b=>b.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let c;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(ai(d,h)):r.types;if(y===!1){i();return}c={update:i,types:y}}else c=i;document.startViewTransition(c)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const c=this.stores.pendingMatchStores.get(i);if(c){c.set(r);return}const d=this.stores.matchStores.get(i);if(d){d.set(r);return}const h=this.stores.cachedMatchStores.get(i);if(h){const y=r(h.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(i)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==i)):h.set(y)}})},this.getMatch=i=>{var r,c,d;return((r=this.stores.cachedMatchStores.get(i))==null?void 0:r.get())??((c=this.stores.pendingMatchStores.get(i))==null?void 0:c.get())??((d=this.stores.matchStores.get(i))==null?void 0:d.get())},this.invalidate=i=>{const r=c=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,c))??!0?{...c,invalid:!0,...i!=null&&i.forcePending||c.status==="error"||c.status==="notFound"?{status:"pending",error:void 0}:void 0}:c};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const c=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(c);i.options.href=d,i.headers.set("Location",d)}else if(r)try{const c=new URL(r);if(this.origin&&c.origin===this.origin){const d=c.pathname+c.search+c.hash;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&Dc(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(c=>!r(c))):this.stores.setCached([])},this.clearExpiredCache=()=>{const i=Date.now(),r=c=>{const d=this.looseRoutesById[c.routeId];if(!d.options.loader)return!0;const h=(c.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return c.status==="error"?!0:i-c.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=kr,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let c=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const d=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),h=new Set([...d,...this.stores.cachedIds.get()]),y=c.filter(p=>!h.has(p.id));if(y.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...y])}try{return c=await Zg({router:this,matches:c,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?c=c.map(b=>b.id===p?m(b):b):this.updateMatch(p,m)}}),c}catch(p){if(Kt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});Nt(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const c={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},d=this.buildLocation(c);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),y=BS(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!y||i.params&&!tl(y.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?tl(h.search,d.search,{partial:!0})?y.rawParams:!1:y.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??IS,parseSearch:n.parseSearch??FS,protocolAllowlist:n.protocolAllowlist??OS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:s,processedTree:i}){this.routesById=n,this.routesByPath=s,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(n){let s=this.routeBranchCache.get(n);return s||(s=f0(n),this.routeBranchCache.set(n,s)),s}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,s){var b,v;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:c}=i;let{matchedRoutes:d}=i,h=!1;(r?r.path!=="/"&&c["**"]:va(n.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:h=!0);const y=h?bj(this.options.notFoundMode,d):void 0,p=new Array(d.length),m=new Map;for(const S of this.stores.matchStores.values())S.routeId&&m.set(S.routeId,S.get());for(let S=0;S<d.length;S++){const R=d[S],_=p[S-1];let E,j,z;{const ee=(_==null?void 0:_.search)??n.search,he=(_==null?void 0:_._strictSearch)??void 0;try{const L=Ec(R.options.validateSearch,{...ee})??void 0;E={...ee,...L},j={...he,...L},z=void 0}catch(L){let K=L;if(L instanceof Lc||(K=new Lc(L.message,{cause:L})),s!=null&&s.throwOnError)throw K;E=ee,j={},z=K}}const A=((v=(b=R.options).loaderDeps)==null?void 0:v.call(b,{search:E}))??"",B=A?JSON.stringify(A):"",{interpolatedPath:N,usedParams:Q}=Vg({path:R.fullPath,params:c,decoder:this.pathParamsDecoder,server:this.isServer}),k=R.id+N+B,D=this.getMatch(k),O=m.get(R.id),P=(D==null?void 0:D._strictParams)??Q;let $;if(!D)try{Wg(R,P)}catch(ee){if(Nt(ee)||Kt(ee)?$=ee:$=new mj(ee.message,{cause:ee}),s!=null&&s.throwOnError)throw $}Object.assign(c,P);const W=O?"stay":"enter";let Z;if(D)Z={...D,cause:W,params:(O==null?void 0:O.params)??c,_strictParams:P,search:Bs(O?O.search:D.search,E),_strictSearch:j};else{const ee=R.options.loader||R.options.beforeLoad||R.lazyFn||g0(R)?"pending":"success";Z={id:k,ssr:R.options.ssr,index:S,routeId:R.id,params:(O==null?void 0:O.params)??c,_strictParams:P,pathname:N,updatedAt:Date.now(),search:O?Bs(O.search,E):E,_strictSearch:j,searchError:void 0,status:ee,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:vi()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:O?fs(O.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:R.options.staticData||{},fullPath:R.fullPath}}s!=null&&s.preload||(Z.globalNotFound=y===R.id),Z.searchError=z;const te=this.getParentContext(_);Z.context={...te,...Z.__routeContext,...Z.__beforeLoadContext},p[S]=Z}for(let S=0;S<p.length;S++){const R=p[S],_=this.looseRoutesById[R.routeId],E=this.getMatch(R.id),j=m.get(R.routeId);if(R.params=j?Bs(j.params,c):c,!E){const z=p[S-1],A=this.getParentContext(z);if(_.options.context){const B={deps:R.loaderDeps,params:R.params,context:A??{},location:n,navigate:N=>this.navigate({...N,_fromLocation:n}),buildLocation:this.buildLocation,cause:R.cause,abortController:R.abortController,preload:!!R.preload,matches:p,routeId:_.id};R.__routeContext=_.options.context(B)??void 0}R.context={...A,...R.__routeContext,...R.__beforeLoadContext}}}return p}matchRoutesLightweight(n){var m;const{matchedRoutes:s,routeParams:i}=this.getMatchedRoutes(n.pathname),r=zr(s),c={...n.search};for(const b of s)try{Object.assign(c,Ec(b.options.validateSearch,c))}catch{}const d=zr(this.stores.matchesId.get()),h=d&&((m=this.stores.matchStores.get(d))==null?void 0:m.get()),y=h&&h.routeId===r.id&&h.pathname===n.pathname;let p;if(y)p=h.params;else{const b=Object.assign(Object.create(null),i);for(const v of s)try{Wg(v,b)}catch{}p=b}return{matchedRoutes:s,fullPath:r.fullPath,search:c,params:p}}},Lc=class extends Error{},mj=class extends Error{};function yj(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Ec(n,s){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(s);if(i instanceof Promise)throw new Lc("Async validation not supported");if(i.issues)throw new Lc(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(s):typeof n=="function"?n(s):{}}function pj({pathname:n,routesById:s,processedTree:i}){const r=Object.create(null),c=va(n);let d;const h=qS(c,i,!0);return h&&(d=h.route,Object.assign(r,h.rawParams)),{matchedRoutes:(h==null?void 0:h.branch)||[s.__root__],routeParams:r,foundRoute:d}}function gj({search:n,dest:s,destRoutes:i,_includeValidateSearch:r}){return vj(i)(n,s,r??!1)}function vj(n){var c;const s={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(c=d.options.search)!=null&&c.middlewares&&s.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:y,next:p})=>{let m=y;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((v,S)=>S(v),y));const b=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((v,S)=>S(v),b):b};s.middlewares.push(h)}if(d.options.validateSearch){const h=({search:y,next:p})=>{const m=p(y);if(!s._includeValidateSearch)return m;try{return{...m,...Ec(d.options.validateSearch,m)??void 0}}catch{return m}};s.middlewares.push(h)}}const i=({search:d})=>{const h=s.dest;return h.search?h.search===!0?d:Ys(h.search,d):{}};s.middlewares.push(i);const r=(d,h,y)=>{if(d>=y.length)return h;const p=y[d];return p({search:h,next:b=>r(d+1,b,y)})};return function(h,y,p){return s.dest=y,s._includeValidateSearch=p,r(0,h,s.middlewares)}}function bj(n,s){if(n!=="root")for(let i=s.length-1;i>=0;i--){const r=s[i];if(r.children)return r.id}return nl}function Wg(n,s){var r;const i=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(i){const c=i(s);if(c===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,c)}}function xj(){try{return sessionStorage}catch{return}}const Sj="tsr-scroll-restoration-v1_3",si=xj();function jj(){try{return JSON.parse((si==null?void 0:si.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Rj(){try{si==null||si.setItem(Sj,JSON.stringify(es))}catch{}}const es=jj(),ev="data-scroll-restoration-id",_j=n=>n.state.__TSR_key||n.href;function Ej(n){const s=n.getAttribute(ev);if(s)return`[${ev}="${s}"]`;let i="",r=n,c;for(;c=r.parentNode;){let d=1,h=r;for(;h=h.previousElementSibling;)d++;const y=`${r.localName}:nth-child(${d})`;i=i?`${y} > ${i}`:y,r=c}return i}let mc=!1;const ti="window";function Id(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function tv(n){const s=[];for(const i of n){if(i===ti)continue;const r=Id(i);r&&s.push(r)}return s}function wj(n,s){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,mc=!1;const i=n.options.getScrollRestorationKey||_j,r=new Map,c=(y,p,m)=>{const b=r.get(y)||{};b.scrollX=p,b.scrollY=m,r.set(y,b)};history.scrollRestoration="manual";const d=y=>{if(!(mc||!n.isScrollRestoring))if(y.target===document)c(ti,scrollX,scrollY);else{const p=y.target;c(p,p.scrollLeft,p.scrollTop)}},h=y=>{if(!n.isScrollRestoring)return;const p=es[y]||(es[y]={});for(const[m,b]of r)m===ti?p[ti]=b:m.isConnected&&(p[Ej(m)]=b)};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&h(i(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{h(i(n.stores.resolvedLocation.get()??n.stores.location.get())),Rj()}),n.subscribe("onRendered",y=>{var _;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,b=n.resetNextScroll;let v;if(r.clear(),b||(n.resetNextScroll=!0),typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const S=i(y.toLocation),R=y.fromLocation&&i(y.fromLocation);if(n.isScrollRestoring&&R&&R!==S){const E=es[R];if(E){let j=es[S];for(const z in E){if(z===ti){if(b)continue}else{const A=Id(z);if(!A||b&&m&&(v??(v=tv(m)),v.includes(A)))continue}j||(j=es[S]={}),j[z]??(j[z]=E[z])}}}mc=!0;try{const E=y.toLocation.hash,j=y.toLocation.state.__hashScrollIntoViewOptions??!0;let z=!1;if(b){const A=Fd.get(y.toLocation),B=E&&j&&(A==="PUSH"||A==="REPLACE"),N=n.isScrollRestoring?es[S]:void 0;if(N)for(const Q in N){const{scrollX:k,scrollY:D}=N[Q];if(Q===ti){if(B)continue;scrollTo({top:D,left:k,behavior:p}),z=!0}else{const O=Id(Q);O&&(O.scrollLeft=k,O.scrollTop=D)}}if(!z&&!E){const Q={top:0,left:0,behavior:p};if(scrollTo(Q),m){v??(v=tv(m));for(const k of v)k.scrollTo(Q)}}}!z&&E&&j&&((_=document.getElementById(E))==null||_.scrollIntoView(j))}finally{mc=!1}})}const Tj="Error preloading route! ☝️";var b0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=s=>{var p,m;this.originalIndex=s.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=nl:this.parentRoute||ba();let c=r?nl:i==null?void 0:i.path;c&&c!=="/"&&(c=d0(c));const d=(i==null?void 0:i.id)||c;let h=r?nl:Rc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);c==="__root__"&&(c="/"),h!=="__root__"&&(h=Rc(["/",h]));const y=h==="__root__"?"/":Rc([this.parentRoute.fullPath,c]);this._path=c,this._id=h,this._fullPath=y,this._to=va(y)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>ej({from:this.fullPath,...s}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Nj=class extends b0{constructor(n){super(n)}};function ph(n){const s=n.errorComponent??gh;return f.jsx(Cj,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Y.createElement(s,{error:i,reset:r}):n.children})}var Cj=class extends Y.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,s){const i=n.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,s){this.props.onCatch&&this.props.onCatch(n,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function gh({error:n}){const[s,i]=Y.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:s?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),s?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?f.jsx("code",{children:n.message}):null})}):null]})}function Mj({children:n,fallback:s=null}){return x0()?f.jsx(Or.Fragment,{children:n}):f.jsx(Or.Fragment,{children:s})}function x0(){return Or.useSyncExternalStore(Aj,()=>!0,()=>!1)}function Aj(){return()=>{}}var S0=Y.createContext(null);function cn(n){return Y.useContext(S0)}var Yc=Y.createContext(void 0),Oj=Y.createContext(void 0),We=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(We||{});function zj({update:n,notify:s,unwatched:i}){return{link:r,unlink:c,propagate:d,checkDirty:h,shallowPropagate:y};function r(m,b,v){const S=b.depsTail;if(S!==void 0&&S.dep===m)return;const R=S!==void 0?S.nextDep:b.deps;if(R!==void 0&&R.dep===m){R.version=v,b.depsTail=R;return}const _=m.subsTail;if(_!==void 0&&_.version===v&&_.sub===b)return;const E=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:S,nextDep:R,prevSub:_,nextSub:void 0};R!==void 0&&(R.prevDep=E),S!==void 0?S.nextDep=E:b.deps=E,_!==void 0?_.nextSub=E:m.subs=E}function c(m,b=m.sub){const v=m.dep,S=m.prevDep,R=m.nextDep,_=m.nextSub,E=m.prevSub;return R!==void 0?R.prevDep=S:b.depsTail=S,S!==void 0?S.nextDep=R:b.deps=R,_!==void 0?_.prevSub=E:v.subsTail=E,E!==void 0?E.nextSub=_:(v.subs=_)===void 0&&i(v),R}function d(m){let b=m.nextSub,v;e:do{const S=m.sub;let R=S.flags;if(R&60?R&12?R&4?!(R&48)&&p(m,S)?(S.flags=R|40,R&=1):R=0:S.flags=R&-9|32:R=0:S.flags=R|32,R&2&&s(S),R&1){const _=S.subs;if(_!==void 0){const E=(m=_).nextSub;E!==void 0&&(v={value:b,prev:v},b=E);continue}}if((m=b)!==void 0){b=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){b=m.nextSub;continue e}break}while(!0)}function h(m,b){let v,S=0,R=!1;e:do{const _=m.dep,E=_.flags;if(b.flags&16)R=!0;else if((E&17)===17){if(n(_)){const j=_.subs;j.nextSub!==void 0&&y(j),R=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=_.deps,b=_,++S;continue}if(!R){const j=m.nextDep;if(j!==void 0){m=j;continue}}for(;S--;){const j=b.subs,z=j.nextSub!==void 0;if(z?(m=v.value,v=v.prev):m=j,R){if(n(b)){z&&y(j),b=m.sub;continue}R=!1}else b.flags&=-33;b=m.sub;const A=m.nextDep;if(A!==void 0){m=A;continue e}}return R}while(!0)}function y(m){do{const b=m.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&s(b))}while((m=m.nextSub)!==void 0)}function p(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Dj(n,s,i){var d,h,y;const r=typeof n=="object",c=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(c),error:(h=r?n.error:s)==null?void 0:h.bind(c),complete:(y=r?n.complete:i)==null?void 0:y.bind(c)}}const $d=[];let wc=0;const{link:nv,unlink:Uj,propagate:kj,checkDirty:j0,shallowPropagate:av}=zj({update(n){return n._update()},notify(n){$d[Wd++]=n,n.flags&=~We.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=We.Mutable|We.Dirty,Bc(n))}});let yc=0,Wd=0,qn,eh=0;function R0(n){try{++eh,n()}finally{--eh||_0()}}function Bc(n){const s=n.depsTail;let i=s!==void 0?s.nextDep:n.deps;for(;i!==void 0;)i=Uj(i,n)}function _0(){if(!(eh>0)){for(;yc<Wd;){const n=$d[yc];$d[yc++]=void 0,n.notify()}yc=0,Wd=0}}function sv(n,s){const i=typeof n=="function",r=n,c={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?We.None:We.Mutable,get(){return qn!==void 0&&nv(c,qn,wc),c._snapshot},subscribe(d){const h=Dj(d),y={current:!1},p=Lj(()=>{var m;c.get(),y.current?(m=h.next)==null||m.call(h,c._snapshot):y.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=qn,y=(s==null?void 0:s.compare)??Object.is;if(i)qn=c,++wc,c.depsTail=void 0;else if(d===void 0)return!1;i&&(c.flags=We.Mutable|We.RecursedCheck);try{const p=c._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!y(p,m)?(c._snapshot=m,!0):!1}finally{qn=h,i&&(c.flags&=~We.RecursedCheck),Bc(c)}}};return i?(c.flags=We.Mutable|We.Dirty,c.get=function(){const d=c.flags;if(d&We.Dirty||d&We.Pending&&j0(c.deps,c)){if(c._update()){const h=c.subs;h!==void 0&&av(h)}}else d&We.Pending&&(c.flags=d&~We.Pending);return qn!==void 0&&nv(c,qn,wc),c._snapshot}):c.set=function(d){if(c._update(d)){const h=c.subs;h!==void 0&&(kj(h),av(h),_0())}},c}function Lj(n){const s=()=>{const r=qn;qn=i,++wc,i.depsTail=void 0,i.flags=We.Watching|We.RecursedCheck;try{return n()}finally{qn=r,i.flags&=~We.RecursedCheck,Bc(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:We.Watching|We.RecursedCheck,notify(){const r=this.flags;r&We.Dirty||r&We.Pending&&j0(this.deps,this)?s():this.flags=We.Watching},stop(){this.flags=We.None,this.depsTail=void 0,Bc(this)}};return s(),i}var pd={exports:{}},gd={},vd={exports:{}},bd={};/**
17
+ */var Dg;function mS(){if(Dg)return ve;Dg=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function R(C){return C===null||typeof C!="object"?null:(C=S&&C[S]||C["@@iterator"],typeof C=="function"?C:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,j={};function z(C,F,ae){this.props=C,this.context=F,this.refs=j,this.updater=ae||_}z.prototype.isReactComponent={},z.prototype.setState=function(C,F){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,F,"setState")},z.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=z.prototype;function B(C,F,ae){this.props=C,this.context=F,this.refs=j,this.updater=ae||_}var N=B.prototype=new A;N.constructor=B,E(N,z.prototype),N.isPureReactComponent=!0;var Q=Array.isArray;function k(){}var D={H:null,A:null,T:null,S:null},O=Object.prototype.hasOwnProperty;function K(C,F,ae){var se=ae.ref;return{$$typeof:n,type:C,key:F,ref:se!==void 0?se:null,props:ae}}function $(C,F){return K(C.type,F,C.props)}function W(C){return typeof C=="object"&&C!==null&&C.$$typeof===n}function Z(C){var F={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ae){return F[ae]})}var te=/\/+/g;function ee(C,F){return typeof C=="object"&&C!==null&&C.key!=null?Z(""+C.key):F.toString(36)}function he(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(k,k):(C.status="pending",C.then(function(F){C.status==="pending"&&(C.status="fulfilled",C.value=F)},function(F){C.status==="pending"&&(C.status="rejected",C.reason=F)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function L(C,F,ae,se,le){var me=typeof C;(me==="undefined"||me==="boolean")&&(C=null);var Re=!1;if(C===null)Re=!0;else switch(me){case"bigint":case"string":case"number":Re=!0;break;case"object":switch(C.$$typeof){case n:case s:Re=!0;break;case b:return Re=C._init,L(Re(C._payload),F,ae,se,le)}}if(Re)return le=le(C),Re=se===""?"."+ee(C,0):se,Q(le)?(ae="",Re!=null&&(ae=Re.replace(te,"$&/")+"/"),L(le,F,ae,"",function(un){return un})):le!=null&&(W(le)&&(le=$(le,ae+(le.key==null||C&&C.key===le.key?"":(""+le.key).replace(te,"$&/")+"/")+Re)),F.push(le)),1;Re=0;var He=se===""?".":se+":";if(Q(C))for(var ge=0;ge<C.length;ge++)se=C[ge],me=He+ee(se,ge),Re+=L(se,F,ae,me,le);else if(ge=R(C),typeof ge=="function")for(C=ge.call(C),ge=0;!(se=C.next()).done;)se=se.value,me=He+ee(se,ge++),Re+=L(se,F,ae,me,le);else if(me==="object"){if(typeof C.then=="function")return L(he(C),F,ae,se,le);throw F=String(C),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Re}function P(C,F,ae){if(C==null)return C;var se=[],le=0;return L(C,se,"","",function(me){return F.call(ae,me,le++)}),se}function ue(C){if(C._status===-1){var F=C._result;F=F(),F.then(function(ae){(C._status===0||C._status===-1)&&(C._status=1,C._result=ae)},function(ae){(C._status===0||C._status===-1)&&(C._status=2,C._result=ae)}),C._status===-1&&(C._status=0,C._result=F)}if(C._status===1)return C._result.default;throw C._result}var Me=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ne={map:P,forEach:function(C,F,ae){P(C,function(){F.apply(this,arguments)},ae)},count:function(C){var F=0;return P(C,function(){F++}),F},toArray:function(C){return P(C,function(F){return F})||[]},only:function(C){if(!W(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return ve.Activity=v,ve.Children=ne,ve.Component=z,ve.Fragment=i,ve.Profiler=c,ve.PureComponent=B,ve.StrictMode=r,ve.Suspense=p,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,ve.__COMPILER_RUNTIME={__proto__:null,c:function(C){return D.H.useMemoCache(C)}},ve.cache=function(C){return function(){return C.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(C,F,ae){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var se=E({},C.props),le=C.key;if(F!=null)for(me in F.key!==void 0&&(le=""+F.key),F)!O.call(F,me)||me==="key"||me==="__self"||me==="__source"||me==="ref"&&F.ref===void 0||(se[me]=F[me]);var me=arguments.length-2;if(me===1)se.children=ae;else if(1<me){for(var Re=Array(me),He=0;He<me;He++)Re[He]=arguments[He+2];se.children=Re}return K(C.type,le,se)},ve.createContext=function(C){return C={$$typeof:h,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:d,_context:C},C},ve.createElement=function(C,F,ae){var se,le={},me=null;if(F!=null)for(se in F.key!==void 0&&(me=""+F.key),F)O.call(F,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(le[se]=F[se]);var Re=arguments.length-2;if(Re===1)le.children=ae;else if(1<Re){for(var He=Array(Re),ge=0;ge<Re;ge++)He[ge]=arguments[ge+2];le.children=He}if(C&&C.defaultProps)for(se in Re=C.defaultProps,Re)le[se]===void 0&&(le[se]=Re[se]);return K(C,me,le)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(C){return{$$typeof:y,render:C}},ve.isValidElement=W,ve.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:ue}},ve.memo=function(C,F){return{$$typeof:m,type:C,compare:F===void 0?null:F}},ve.startTransition=function(C){var F=D.T,ae={};D.T=ae;try{var se=C(),le=D.S;le!==null&&le(ae,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(k,Me)}catch(me){Me(me)}finally{F!==null&&ae.types!==null&&(F.types=ae.types),D.T=F}},ve.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},ve.use=function(C){return D.H.use(C)},ve.useActionState=function(C,F,ae){return D.H.useActionState(C,F,ae)},ve.useCallback=function(C,F){return D.H.useCallback(C,F)},ve.useContext=function(C){return D.H.useContext(C)},ve.useDebugValue=function(){},ve.useDeferredValue=function(C,F){return D.H.useDeferredValue(C,F)},ve.useEffect=function(C,F){return D.H.useEffect(C,F)},ve.useEffectEvent=function(C){return D.H.useEffectEvent(C)},ve.useId=function(){return D.H.useId()},ve.useImperativeHandle=function(C,F,ae){return D.H.useImperativeHandle(C,F,ae)},ve.useInsertionEffect=function(C,F){return D.H.useInsertionEffect(C,F)},ve.useLayoutEffect=function(C,F){return D.H.useLayoutEffect(C,F)},ve.useMemo=function(C,F){return D.H.useMemo(C,F)},ve.useOptimistic=function(C,F){return D.H.useOptimistic(C,F)},ve.useReducer=function(C,F,ae){return D.H.useReducer(C,F,ae)},ve.useRef=function(C){return D.H.useRef(C)},ve.useState=function(C){return D.H.useState(C)},ve.useSyncExternalStore=function(C,F,ae){return D.H.useSyncExternalStore(C,F,ae)},ve.useTransition=function(){return D.H.useTransition()},ve.version="19.2.6",ve}var Ug;function Vr(){return Ug||(Ug=1,od.exports=mS()),od.exports}var Y=Vr();const Or=q1(Y);var a0=Y.createContext(void 0),ps=n=>{const s=Y.useContext(a0);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},yS=({client:n,children:s})=>(Y.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(a0.Provider,{value:n,children:s})),s0=Y.createContext(!1),pS=()=>Y.useContext(s0);s0.Provider;function gS(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var vS=Y.createContext(gS()),bS=()=>Y.useContext(vS),xS=(n,s,i)=>{const r=i!=null&&i.state.error&&typeof n.throwOnError=="function"?fh(n.throwOnError,[i.state.error,i]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||r)&&(s.isReset()||(n.retryOnMount=!1))},SS=n=>{Y.useEffect(()=>{n.clearReset()},[n])},jS=({result:n,errorResetBoundary:s,throwOnError:i,query:r,suspense:c})=>n.isError&&!s.isReset()&&!n.isFetching&&r&&(c&&n.data===void 0||fh(i,[n.error,r])),RS=n=>{if(n.suspense){const i=c=>c==="static"?c:Math.max(c??1e3,1e3),r=n.staleTime;n.staleTime=typeof r=="function"?(...c)=>i(r(...c)):i(r),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},_S=(n,s)=>n.isLoading&&n.isFetching&&!s,ES=(n,s)=>(n==null?void 0:n.suspense)&&s.isPending,kg=(n,s,i)=>s.fetchOptimistic(n).catch(()=>{i.clearReset()});function wS(n,s,i){var R,_,E,j;const r=pS(),c=bS(),d=ps(),h=d.defaultQueryOptions(n);(_=(R=d.getDefaultOptions().queries)==null?void 0:R._experimental_beforeQuery)==null||_.call(R,h);const y=d.getQueryCache().get(h.queryHash),p=n.subscribed!==!1;h._optimisticResults=r?"isRestoring":p?"optimistic":void 0,RS(h),xS(h,c,y),SS(c);const m=!d.getQueryCache().get(h.queryHash),[b]=Y.useState(()=>new s(d,h)),v=b.getOptimisticResult(h),S=!r&&p;if(Y.useSyncExternalStore(Y.useCallback(z=>{const A=S?b.subscribe(mt.batchCalls(z)):Ot;return b.updateResult(),A},[b,S]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),Y.useEffect(()=>{b.setOptions(h)},[h,b]),ES(h,v))throw kg(h,b,c);if(jS({result:v,errorResetBoundary:c,throwOnError:h.throwOnError,query:y,suspense:h.suspense}))throw v.error;if((j=(E=d.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||j.call(E,h,v),h.experimental_prefetchInRender&&!Ar.isServer()&&_S(v,r)){const z=m?kg(h,b,c):y==null?void 0:y.promise;z==null||z.catch(Ot).finally(()=>{b.updateResult()})}return h.notifyOnChangeProps?v:b.trackResult(v)}function lt(n,s){return wS(n,iS)}function Sa(n,s){const i=ps(),[r]=Y.useState(()=>new fS(i,n));Y.useEffect(()=>{r.setOptions(n)},[r,n]);const c=Y.useSyncExternalStore(Y.useCallback(h=>r.subscribe(mt.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),d=Y.useCallback((h,y)=>{r.mutate(h,y).catch(Ot)},[r]);if(c.error&&fh(r.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:d,mutateAsync:c.mutate}}var Cr=typeof window<"u"?Y.useLayoutEffect:Y.useEffect;function cd(n){const s=Y.useRef({value:n,prev:null}),i=s.current.value;return n!==i&&(s.current={value:n,prev:i}),s.current.prev}function TS(n,s,i={},r={}){Y.useEffect(()=>{if(!n.current||r.disabled||typeof IntersectionObserver!="function")return;const c=new IntersectionObserver(([d])=>{s(d)},i);return c.observe(n.current),()=>{c.disconnect()}},[s,i,r.disabled,n])}function NS(n){const s=Y.useRef(null);return Y.useImperativeHandle(n,()=>s.current,[]),s}const l0=!1;function zr(n){return n[n.length-1]}function CS(n){return typeof n=="function"}function Ys(n,s){return CS(n)?n(s):n}const i0=Object.prototype.hasOwnProperty,Lg=Object.prototype.propertyIsEnumerable;function r0(n){for(const s in n)if(i0.call(n,s))return!0;return!1}const MS=()=>Object.create(null),Bs=(n,s)=>fs(n,s,MS);function fs(n,s,i=()=>({}),r=0){if(n===s)return n;if(r>500)return s;const c=s,d=Hg(n)&&Hg(c);if(!d&&!(zc(n)&&zc(c)))return c;const h=d?n:Bg(n);if(!h)return c;const y=d?c:Bg(c);if(!y)return c;const p=h.length,m=y.length,b=d?new Array(m):i();let v=0;for(let S=0;S<m;S++){const R=d?S:y[S],_=n[R],E=c[R];if(_===E){b[R]=_,(d?S<p:i0.call(n,R))&&v++;continue}if(_===null||E===null||typeof _!="object"||typeof E!="object"){b[R]=E;continue}const j=fs(_,E,i,r+1);b[R]=j,j===_&&v++}return p===m&&v===p?n:b}function Bg(n){const s=Object.getOwnPropertyNames(n);for(const c of s)if(!Lg.call(n,c))return!1;const i=Object.getOwnPropertySymbols(n);if(i.length===0)return s;const r=s;for(const c of i){if(!Lg.call(n,c))return!1;r.push(c)}return r}function zc(n){if(!qg(n))return!1;const s=n.constructor;if(typeof s>"u")return!0;const i=s.prototype;return!(!qg(i)||!i.hasOwnProperty("isPrototypeOf"))}function qg(n){return Object.prototype.toString.call(n)==="[object Object]"}function Hg(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function tl(n,s,i){if(n===s)return!0;if(typeof n!=typeof s)return!1;if(Array.isArray(n)&&Array.isArray(s)){if(n.length!==s.length)return!1;for(let r=0,c=n.length;r<c;r++)if(!tl(n[r],s[r],i))return!1;return!0}if(zc(n)&&zc(s)){const r=(i==null?void 0:i.ignoreUndefined)??!0;if(i!=null&&i.partial){for(const h in s)if((!r||s[h]!==void 0)&&!tl(n[h],s[h],i))return!1;return!0}let c=0;if(!r)c=Object.keys(n).length;else for(const h in n)n[h]!==void 0&&c++;let d=0;for(const h in s)if((!r||s[h]!==void 0)&&(d++,d>c||!tl(n[h],s[h],i)))return!1;return c===d}return!1}function vi(n){let s,i;const r=new Promise((c,d)=>{s=c,i=d});return r.status="pending",r.resolve=c=>{r.status="resolved",r.value=c,s(c),n==null||n(c)},r.reject=c=>{r.status="rejected",i(c)},r}function Dr(n){return!!(n&&typeof n=="object"&&typeof n.then=="function")}function AS(n){return n.replace(/[\x00-\x1f\x7f]/g,"")}function Qg(n){let s;try{s=decodeURI(n)}catch{s=n.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return AS(s)}const OS=["http:","https:","mailto:","tel:"];function Dc(n,s){if(!n)return!1;try{const i=new URL(n);return!s.has(i.protocol)}catch{return!1}}function xr(n){if(!n)return{path:n,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(n)&&!n.startsWith("//"))return{path:n,handledProtocolRelativeURL:!1};const s=/%25|%5C/gi;let i=0,r="",c;for(;(c=s.exec(n))!==null;)r+=Qg(n.slice(i,c.index))+c[0],i=s.lastIndex;r=r+Qg(i?n.slice(i):n);let d=!1;return r.startsWith("//")&&(d=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:d}}function zS(n){return/\s|[^\u0000-\u007F]/.test(n)?n.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):n}function DS(n,s){if(n===s)return!0;if(n.length!==s.length)return!1;for(let i=0;i<n.length;i++)if(n[i]!==s[i])return!1;return!0}function ba(){throw new Error("Invariant failed")}function Ur(n){const s=new Map;let i,r;const c=d=>{d.next&&(d.prev?(d.prev.next=d.next,d.next.prev=d.prev,d.next=void 0,r&&(r.next=d,d.prev=r)):(d.next.prev=void 0,i=d.next,d.next=void 0,r&&(d.prev=r,r.next=d)),r=d)};return{get(d){const h=s.get(d);if(h)return c(h),h.value},set(d,h){if(s.size>=n&&i){const p=i;s.delete(p.key),p.next&&(i=p.next,p.next.prev=void 0),p===r&&(r=void 0)}const y=s.get(d);if(y)y.value=h,c(y);else{const p={key:d,value:h,prev:r};r&&(r.next=p),r=p,i||(i=p),s.set(d,p)}},clear(){s.clear(),i=void 0,r=void 0}}}const ds=4,o0=5;function US(n){const s=n.indexOf("{");if(s===-1)return null;const i=n.indexOf("}",s);return i===-1||s+1>=n.length?null:[s,i]}function c0(n,s,i=new Uint16Array(6)){const r=n.indexOf("/",s),c=r===-1?n.length:r,d=n.substring(s,c);if(!d||!d.includes("$"))return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i;if(d==="$"){const y=n.length;return i[0]=2,i[1]=s,i[2]=s,i[3]=y,i[4]=y,i[5]=y,i}if(d.charCodeAt(0)===36)return i[0]=1,i[1]=s,i[2]=s+1,i[3]=c,i[4]=c,i[5]=c,i;const h=US(d);if(h){const[y,p]=h,m=d.charCodeAt(y+1);if(m===45){if(y+2<d.length&&d.charCodeAt(y+2)===36){const b=y+3,v=p;if(b<v)return i[0]=3,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=c,i}}else if(m===36){const b=y+1,v=y+2;return v===p?(i[0]=2,i[1]=s+y,i[2]=s+b,i[3]=s+v,i[4]=s+p+1,i[5]=n.length,i):(i[0]=1,i[1]=s+y,i[2]=s+v,i[3]=s+p,i[4]=s+p+1,i[5]=c,i)}}return i[0]=0,i[1]=s,i[2]=s,i[3]=c,i[4]=c,i[5]=c,i}function Gc(n,s,i,r,c,d,h){var p,m,b,v,S,R,_,E,j,z;h==null||h(i);let y=r;{const A=i.fullPath??i.from,B=A.length,N=((p=i.options)==null?void 0:p.caseSensitive)??n,Q=((b=(m=i.options)==null?void 0:m.params)==null?void 0:b.parse)??((v=i.options)==null?void 0:v.parseParams);for(;y<B;){const D=c0(A,y,s);let O;const K=y,$=D[5];switch(y=$+1,d++,D[0]){case 0:{const W=A.substring(D[2],D[3]);if(N){const Z=(S=c.static)==null?void 0:S.get(W);if(Z)O=Z;else{c.static??(c.static=new Map);const te=Ks(i.fullPath??i.from);te.parent=c,te.depth=d,O=te,c.static.set(W,te)}}else{const Z=W.toLowerCase(),te=(R=c.staticInsensitive)==null?void 0:R.get(Z);if(te)O=te;else{c.staticInsensitive??(c.staticInsensitive=new Map);const ee=Ks(i.fullPath??i.from);ee.parent=c,ee.depth=d,O=ee,c.staticInsensitive.set(Z,ee)}}break}case 1:{const W=A.substring(K,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((_=c.dynamic)==null?void 0:_.find(P=>!P.parse&&P.caseSensitive===te&&P.prefix===ee&&P.suffix===he));if(L)O=L;else{const P=fd(1,i.fullPath??i.from,te,ee,he);O=P,P.depth=d,P.parent=c,c.dynamic??(c.dynamic=[]),c.dynamic.push(P)}break}case 3:{const W=A.substring(K,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=!Q&&((E=c.optional)==null?void 0:E.find(P=>!P.parse&&P.caseSensitive===te&&P.prefix===ee&&P.suffix===he));if(L)O=L;else{const P=fd(3,i.fullPath??i.from,te,ee,he);O=P,P.parent=c,P.depth=d,c.optional??(c.optional=[]),c.optional.push(P)}break}case 2:{const W=A.substring(K,D[1]),Z=A.substring(D[4],$),te=N&&!!(W||Z),ee=W?te?W:W.toLowerCase():void 0,he=Z?te?Z:Z.toLowerCase():void 0,L=fd(2,i.fullPath??i.from,te,ee,he);O=L,L.parent=c,L.depth=d,c.wildcard??(c.wildcard=[]),c.wildcard.push(L)}}c=O}if(Q&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const D=Ks(i.fullPath??i.from);D.kind=o0,D.parent=c,d++,D.depth=d,c.pathless??(c.pathless=[]),c.pathless.push(D),c=D}const k=(i.path||!i.children)&&!i.isRoot;if(k&&A.endsWith("/")){const D=Ks(i.fullPath??i.from);D.kind=ds,D.parent=c,d++,D.depth=d,c.index=D,c=D}c.parse=Q??null,c.priority=((z=(j=i.options)==null?void 0:j.params)==null?void 0:z.priority)??0,k&&!c.route&&(c.route=i,c.fullPath=i.fullPath??i.from)}if(i.children)for(const A of i.children)Gc(n,s,A,y,c,d,h)}function ud(n,s){if(n.parse&&!s.parse)return-1;if(!n.parse&&s.parse)return 1;if(n.parse&&s.parse&&(n.priority||s.priority))return s.priority-n.priority;if(n.prefix&&s.prefix&&n.prefix!==s.prefix){if(n.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(n.prefix))return 1}if(n.suffix&&s.suffix&&n.suffix!==s.suffix){if(n.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(n.suffix))return 1}return n.prefix&&!s.prefix?-1:!n.prefix&&s.prefix?1:n.suffix&&!s.suffix?-1:!n.suffix&&s.suffix?1:n.caseSensitive&&!s.caseSensitive?-1:!n.caseSensitive&&s.caseSensitive?1:0}function ts(n){var s,i,r;if(n.pathless)for(const c of n.pathless)ts(c);if(n.static)for(const c of n.static.values())ts(c);if(n.staticInsensitive)for(const c of n.staticInsensitive.values())ts(c);if((s=n.dynamic)!=null&&s.length){n.dynamic.sort(ud);for(const c of n.dynamic)ts(c)}if((i=n.optional)!=null&&i.length){n.optional.sort(ud);for(const c of n.optional)ts(c)}if((r=n.wildcard)!=null&&r.length){n.wildcard.sort(ud);for(const c of n.wildcard)ts(c)}}function Ks(n){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:n,parent:null,parse:null,priority:0}}function fd(n,s,i,r,c){return{kind:n,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:s,parent:null,parse:null,priority:0,caseSensitive:i,prefix:r,suffix:c}}function kS(n,s){const i=Ks("/"),r=new Uint16Array(6);for(const c of n)Gc(!1,r,c,1,i,0);ts(i),s.masksTree=i,s.flatCache=Ur(1e3)}function LS(n,s){n||(n="/");const i=s.flatCache.get(n);if(i)return i;const r=hh(n,s.masksTree);return s.flatCache.set(n,r),r}function BS(n,s,i,r,c){n||(n="/"),r||(r="/");const d=s?`case\0${n}`:n;let h=c.singleCache.get(d);return h||(h=Ks("/"),Gc(s,new Uint16Array(6),{from:n},1,h,0),c.singleCache.set(d,h)),hh(r,h,i)}function qS(n,s,i=!1){const r=i?n:`nofuzz\0${n}`,c=s.matchCache.get(r);if(c!==void 0)return c;n||(n="/");let d;try{d=hh(n,s.segmentTree,i)}catch(h){if(h instanceof URIError)d=null;else throw h}return d&&(d.branch=f0(d.route)),s.matchCache.set(r,d),d}function HS(n){return n==="/"?n:n.replace(/\/{1,}$/,"")}function QS(n,s=!1,i){const r=Ks(n.fullPath),c=new Uint16Array(6),d={},h={};let y=0;return Gc(s,c,n,1,r,0,p=>{if(i==null||i(p,y),p.id in d&&ba(),d[p.id]=p,y!==0&&p.path){const m=HS(p.fullPath);(!h[m]||p.fullPath.endsWith("/"))&&(h[m]=p)}y++}),ts(r),{processedTree:{segmentTree:r,singleCache:Ur(1e3),matchCache:Ur(1e3),flatCache:null,masksTree:null},routesById:d,routesByPath:h}}function hh(n,s,i=!1){const r=n.split("/"),c=VS(n,r,s,i);if(!c)return null;const[d]=u0(n,r,c);return{route:c.node.route,rawParams:d}}function u0(n,s,i){var b,v,S,R,_,E,j,z,A,B;const r=GS(i.node);let c=null;const d=Object.create(null);let h=((b=i.extract)==null?void 0:b.part)??0,y=((v=i.extract)==null?void 0:v.node)??0,p=((S=i.extract)==null?void 0:S.path)??0,m=((R=i.extract)==null?void 0:R.segment)??0;for(;y<r.length;h++,y++,p++,m++){const N=r[y];if(N.kind===ds)break;if(N.kind===o0){m--,h--,p--;continue}const Q=s[h],k=p;if(Q&&(p+=Q.length),N.kind===1){c??(c=i.node.fullPath.split("/"));const D=c[m],O=((_=N.prefix)==null?void 0:_.length)??0;if(D.charCodeAt(O)===123){const K=((E=N.suffix)==null?void 0:E.length)??0,$=D.substring(O+2,D.length-K-1),W=Q.substring(O,Q.length-K);d[$]=decodeURIComponent(W)}else{const K=D.substring(1);d[K]=decodeURIComponent(Q)}}else if(N.kind===3){if(i.skipped&1<<y){h--,p=k-1;continue}c??(c=i.node.fullPath.split("/"));const D=c[m],O=((j=N.prefix)==null?void 0:j.length)??0,K=((z=N.suffix)==null?void 0:z.length)??0,$=D.substring(O+3,D.length-K-1),W=N.suffix||N.prefix?Q.substring(O,Q.length-K):Q;W&&(d[$]=decodeURIComponent(W))}else if(N.kind===2){const D=N,O=n.substring(k+(((A=D.prefix)==null?void 0:A.length)??0),n.length-(((B=D.suffix)==null?void 0:B.length)??0)),K=decodeURIComponent(O);d["*"]=K,d._splat=K;break}}return i.rawParams&&Object.assign(d,i.rawParams),[d,{part:h,node:y,path:p,segment:m}]}function f0(n){const s=[n];for(;n.parentRoute;)n=n.parentRoute,s.push(n);return s.reverse(),s}function GS(n){const s=Array(n.depth+1);do s[n.depth]=n,n=n.parent;while(n);return s}function VS(n,s,i,r){if(n==="/"&&i.index)return{node:i.index,skipped:0};const c=!zr(s),d=c&&n!=="/",h=s.length-(c?1:0),y=[{node:i,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;y.length;){const b=y.pop(),{node:v,index:S,skipped:R,depth:_,statics:E,dynamics:j,optionals:z}=b;let{extract:A,rawParams:B}=b;if(v.kind===2&&v.route&&!hc(m,b))continue;if(v.parse){if(!Gg(n,s,b))continue;B=b.rawParams,A=b.extract}r&&v.route&&v.kind!==ds&&hc(p,b)&&(p=b);const N=S===h;if(N&&(v.route&&(!d||v.kind===ds||v.kind===2)&&hc(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const Q=N?void 0:s[S];let k;if(N&&v.index){const D={node:v.index,index:S,skipped:R,depth:_+1,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B};let O=!0;if(v.index.parse&&(Gg(n,s,D)||(O=!1)),O){if(!j&&!z&&!R&&YS(E,h))return D;hc(m,D)&&(m=D)}}if(v.wildcard)for(let D=v.wildcard.length-1;D>=0;D--){const O=v.wildcard[D],{prefix:K,suffix:$}=O;if(!(K&&(N||!(O.caseSensitive?Q:k??(k=Q.toLowerCase())).startsWith(K)))){if($){if(N)continue;const W=s.slice(S).join("/").slice(-$.length);if((O.caseSensitive?W:W.toLowerCase())!==$)continue}y.push({node:O,index:h,skipped:R,depth:_+1,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}}if(v.optional){const D=R|1<<_,O=_+1;for(let K=v.optional.length-1;K>=0;K--){const $=v.optional[K];y.push({node:$,index:S,skipped:D,depth:O,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}if(!N)for(let K=v.optional.length-1;K>=0;K--){const $=v.optional[K],{prefix:W,suffix:Z}=$;if(W||Z){const te=$.caseSensitive?Q:k??(k=Q.toLowerCase());if(W&&!te.startsWith(W)||Z&&!te.endsWith(Z))continue}y.push({node:$,index:S+1,skipped:R,depth:O,statics:E,dynamics:j,optionals:z+dc(h,S),extract:A,rawParams:B})}}if(!N&&v.dynamic&&Q)for(let D=v.dynamic.length-1;D>=0;D--){const O=v.dynamic[D],{prefix:K,suffix:$}=O;if(K||$){const W=O.caseSensitive?Q:k??(k=Q.toLowerCase());if(K&&!W.startsWith(K)||$&&!W.endsWith($))continue}y.push({node:O,index:S+1,skipped:R,depth:_+1,statics:E,dynamics:j+dc(h,S),optionals:z,extract:A,rawParams:B})}if(!N&&v.staticInsensitive){const D=v.staticInsensitive.get(k??(k=Q.toLowerCase()));D&&y.push({node:D,index:S+1,skipped:R,depth:_+1,statics:E+dc(h,S),dynamics:j,optionals:z,extract:A,rawParams:B})}if(!N&&v.static){const D=v.static.get(Q);D&&y.push({node:D,index:S+1,skipped:R,depth:_+1,statics:E+dc(h,S),dynamics:j,optionals:z,extract:A,rawParams:B})}if(v.pathless){const D=_+1;for(let O=v.pathless.length-1;O>=0;O--){const K=v.pathless[O];y.push({node:K,index:S,skipped:R,depth:D,statics:E,dynamics:j,optionals:z,extract:A,rawParams:B})}}}if(m)return m;if(r&&p){let b=p.index;for(let S=0;S<p.index;S++)b+=s[S].length;const v=b===n.length?"/":n.slice(b);return p.rawParams??(p.rawParams=Object.create(null)),p.rawParams["**"]=decodeURIComponent(v),p}return null}function dc(n,s){return 2**(n-s-1)}function YS(n,s){return n===2**(s-1)-1}function Gg(n,s,i){let r,c;try{[r,c]=u0(n,s,i)}catch{return null}if(i.rawParams=r,i.extract=c,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function hc(n,s){return n?s.statics>n.statics||s.statics===n.statics&&(s.dynamics>n.dynamics||s.dynamics===n.dynamics&&(s.optionals>n.optionals||s.optionals===n.optionals&&((s.node.kind===ds)>(n.node.kind===ds)||s.node.kind===ds==(n.node.kind===ds)&&s.depth>n.depth))):!0}function Rc(n){return mh(n.filter(s=>s!==void 0).join("/"))}function mh(n){return n.replace(/\/{2,}/g,"/")}function d0(n){return n==="/"?n:n.replace(/^\/{1,}/,"")}function va(n){const s=n.length;return s>1&&n[s-1]==="/"?n.replace(/\/{1,}$/,""):n}function h0(n){return va(d0(n))}function Uc(n,s){return n!=null&&n.endsWith("/")&&n!=="/"&&n!==`${s}/`?n.slice(0,-1):n}function KS(n,s,i){return Uc(n,i)===Uc(s,i)}function PS({base:n,to:s,trailingSlash:i="never",cache:r}){const c=s.startsWith("/"),d=!c&&s===".";let h;if(r){h=c?s:d?n:n+"\0"+s;const m=r.get(h);if(m)return m}let y;if(d)y=n.split("/");else if(c)y=s.split("/");else{for(y=n.split("/");y.length>1&&zr(y)==="";)y.pop();const m=s.split("/");for(let b=0,v=m.length;b<v;b++){const S=m[b];S===""?b?b===v-1&&y.push(S):y=[S]:S===".."?y.pop():S==="."||y.push(S)}}y.length>1&&(zr(y)===""?i==="never"&&y.pop():i==="always"&&y.push(""));const p=mh(y.join("/"))||"/";return h&&r&&r.set(h,p),p}function XS(n){const s=new Map(n.map(c=>[encodeURIComponent(c),c])),i=Array.from(s.keys()).map(c=>c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(i,"g");return c=>c.replace(r,d=>s.get(d)??d)}function dd(n,s,i){const r=s[n];return typeof r!="string"?r:n==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(c=>Yg(c,i)).join("/"):Yg(r,i)}function Vg({path:n,params:s,decoder:i,...r}){let c=!1;const d=Object.create(null);if(!n||n==="/")return{interpolatedPath:"/",usedParams:d,isMissingParams:c};if(!n.includes("$"))return{interpolatedPath:n,usedParams:d,isMissingParams:c};const h=n.length;let y=0,p,m="";for(;y<h;){const b=y;p=c0(n,b,p);const v=p[5];if(y=v+1,b===v)continue;const S=p[0];if(S===0){m+="/"+n.substring(b,v);continue}if(S===2){const R=s._splat;d._splat=R,d["*"]=R;const _=n.substring(b,p[1]),E=n.substring(p[4],v);if(!R){c=!0,(_||E)&&(m+="/"+_+E);continue}const j=dd("_splat",s,i);m+="/"+_+j+E;continue}if(S===1){const R=n.substring(p[2],p[3]);!c&&!(R in s)&&(c=!0),d[R]=s[R];const _=n.substring(b,p[1]),E=n.substring(p[4],v),j=dd(R,s,i)??"undefined";m+="/"+_+j+E;continue}if(S===3){const R=n.substring(p[2],p[3]),_=s[R];if(_==null)continue;d[R]=_;const E=n.substring(b,p[1]),j=n.substring(p[4],v),z=dd(R,s,i)??"";m+="/"+E+z+j;continue}}return n.endsWith("/")&&(m+="/"),{usedParams:d,interpolatedPath:m||"/",isMissingParams:c}}function Yg(n,s){const i=encodeURIComponent(n);return(s==null?void 0:s(i))??i}function Nt(n){return(n==null?void 0:n.isNotFound)===!0}function ZS(n,s=String){const i=new URLSearchParams;for(const r in n){const c=n[r];c!==void 0&&i.set(r,s(c))}return i.toString()}function hd(n){return n?n==="false"?!1:n==="true"?!0:+n*0===0&&+n+""===n?+n:n:""}function JS(n){const s=new URLSearchParams(n),i=Object.create(null);for(const[r,c]of s.entries()){const d=i[r];d==null?i[r]=hd(c):Array.isArray(d)?d.push(hd(c)):i[r]=[d,hd(c)]}return i}const FS=$S(JSON.parse),IS=WS(JSON.stringify,JSON.parse);function $S(n){return s=>{s[0]==="?"&&(s=s.substring(1));const i=JS(s);for(const r in i){const c=i[r];if(typeof c=="string")try{i[r]=n(c)}catch{}}return i}}function WS(n,s){const i=typeof s=="function";function r(c){if(typeof c=="object"&&c!==null)try{return n(c)}catch{}else if(i&&typeof c=="string")try{return s(c),n(c)}catch{}return c}return c=>{const d=ZS(c,r);return d?`?${d}`:""}}const nl="__root__";function ej(n){if(n.statusCode=n.statusCode||n.code||307,!n._builtLocation&&!n.reloadDocument&&typeof n.href=="string")try{new URL(n.href),n.reloadDocument=!0}catch{}const s=new Headers(n.headers);n.href&&s.get("Location")===null&&s.set("Location",n.href);const i=new Response(null,{status:n.statusCode,headers:s});if(i.options=n,n.throw)throw i;return i}function Pt(n){return n instanceof Response&&!!n.options}const Zd=n=>{var s;if(!n.rendered)return n.rendered=!0,(s=n.onReady)==null?void 0:s.call(n)},tj=n=>n.stores.matchesId.get().some(s=>{var i;return(i=n.stores.matchStores.get(s))==null?void 0:i.get()._forcePending}),Vc=(n,s)=>!!(n.preload&&!n.router.stores.matchStores.has(s)),al=(n,s,i=!0)=>{const r={...n.router.options.context??{}},c=i?s:s-1;for(let d=0;d<=c;d++){const h=n.matches[d];if(!h)continue;const y=n.router.getMatch(h.id);y&&Object.assign(r,y.__routeContext,y.__beforeLoadContext)}return r},Kg=(n,s)=>{if(!n.matches.length)return;const i=s.routeId,r=n.matches.findIndex(h=>h.routeId===n.router.routeTree.id),c=r>=0?r:0;let d=i?n.matches.findIndex(h=>h.routeId===i):n.firstBadMatchIndex??n.matches.length-1;d<0&&(d=c);for(let h=d;h>=0;h--){const y=n.matches[h];if(n.router.looseRoutesById[y.routeId].options.notFoundComponent)return h}return i?d:c},hs=(n,s,i)=>{var r,c,d;if(!(!Pt(i)&&!Nt(i)))throw Pt(i)&&i.redirectHandled&&!i.options.reloadDocument||(s&&((r=s._nonReactive.beforeLoadPromise)==null||r.resolve(),(c=s._nonReactive.loaderPromise)==null||c.resolve(),s._nonReactive.beforeLoadPromise=void 0,s._nonReactive.loaderPromise=void 0,s._nonReactive.error=i,n.updateMatch(s.id,h=>({...h,status:Pt(i)?"redirected":Nt(i)?"notFound":h.status==="pending"?"success":h.status,context:al(n,s.index),isFetching:!1,error:i})),Nt(i)&&!i.routeId&&(i.routeId=s.routeId),(d=s._nonReactive.loadPromise)==null||d.resolve()),Pt(i)&&(n.rendered=!0,i.options._fromLocation=n.location,i.redirectHandled=!0,i=n.router.resolveRedirect(i))),i},m0=(n,s)=>{const i=n.router.getMatch(s);return!!(!i||i._nonReactive.dehydrated)},Pg=(n,s,i)=>{const r=al(n,i);n.updateMatch(s,c=>({...c,context:r}))},Sr=(n,s,i)=>{var h,y;const{id:r,routeId:c}=n.matches[s],d=n.router.looseRoutesById[c];if(i instanceof Promise)throw i;n.firstBadMatchIndex??(n.firstBadMatchIndex=s),hs(n,n.router.getMatch(r),i);try{(y=(h=d.options).onError)==null||y.call(h,i)}catch(p){i=p,hs(n,n.router.getMatch(r),i)}n.updateMatch(r,p=>{var m,b;return(m=p._nonReactive.beforeLoadPromise)==null||m.resolve(),p._nonReactive.beforeLoadPromise=void 0,(b=p._nonReactive.loadPromise)==null||b.resolve(),{...p,error:i,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!n.preload&&!Pt(i)&&!Nt(i)&&(n.serialError??(n.serialError=i))},y0=(n,s,i,r)=>{var d;if(r._nonReactive.pendingTimeout!==void 0)return;const c=i.options.pendingMs??n.router.options.defaultPendingMs;if(n.onReady&&!Vc(n,s)&&(i.options.loader||i.options.beforeLoad||g0(i))&&typeof c=="number"&&c!==1/0&&(i.options.pendingComponent??((d=n.router.options)==null?void 0:d.defaultPendingComponent))){const h=setTimeout(()=>{Zd(n)},c);r._nonReactive.pendingTimeout=h}},nj=(n,s,i)=>{const r=n.router.getMatch(s);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;y0(n,s,i,r);const c=()=>{const d=n.router.getMatch(s);d.preload&&(d.status==="redirected"||d.status==="notFound")&&hs(n,d,d.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(c):c()},aj=(n,s,i,r)=>{const c=n.router.getMatch(s);let d=c._nonReactive.loadPromise;c._nonReactive.loadPromise=vi(()=>{d==null||d.resolve(),d=void 0});const{paramsError:h,searchError:y}=c;h&&Sr(n,i,h),y&&Sr(n,i,y),y0(n,s,r,c);const p=new AbortController;let m=!1;const b=()=>{m||(m=!0,n.updateMatch(s,N=>({...N,isFetching:"beforeLoad",fetchCount:N.fetchCount+1,abortController:p})))},v=()=>{var N;(N=c._nonReactive.beforeLoadPromise)==null||N.resolve(),c._nonReactive.beforeLoadPromise=void 0,n.updateMatch(s,Q=>({...Q,isFetching:!1}))};if(!r.options.beforeLoad){n.router.batch(()=>{b(),v()});return}c._nonReactive.beforeLoadPromise=vi();const S={...al(n,i,!1),...c.__routeContext},{search:R,params:_,cause:E}=c,j=Vc(n,s),z={search:R,abortController:p,params:_,preload:j,context:S,location:n.location,navigate:N=>n.router.navigate({...N,_fromLocation:n.location}),buildLocation:n.router.buildLocation,cause:j?"preload":E,matches:n.matches,routeId:r.id,...n.router.options.additionalContext},A=N=>{if(N===void 0){n.router.batch(()=>{b(),v()});return}(Pt(N)||Nt(N))&&(b(),Sr(n,i,N)),n.router.batch(()=>{b(),n.updateMatch(s,Q=>({...Q,__beforeLoadContext:N})),v()})};let B;try{if(B=r.options.beforeLoad(z),Dr(B))return b(),B.catch(N=>{Sr(n,i,N)}).then(A)}catch(N){b(),Sr(n,i,N)}A(B)},sj=(n,s)=>{const{id:i,routeId:r}=n.matches[s],c=n.router.looseRoutesById[r],d=()=>y(),h=()=>aj(n,i,s,c),y=()=>{if(m0(n,i))return;const p=nj(n,i,c);return Dr(p)?p.then(h):h()};return d()},lj=(n,s,i)=>{var d,h,y,p,m,b;const r=n.router.getMatch(s);if(!r||!i.options.head&&!i.options.scripts&&!i.options.headers)return;const c={ssr:n.router.options.ssr,matches:n.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(h=(d=i.options).head)==null?void 0:h.call(d,c),(p=(y=i.options).scripts)==null?void 0:p.call(y,c),(b=(m=i.options).headers)==null?void 0:b.call(m,c)]).then(([v,S,R])=>({meta:v==null?void 0:v.meta,links:v==null?void 0:v.links,headScripts:v==null?void 0:v.scripts,headers:R,scripts:S,styles:v==null?void 0:v.styles}))},p0=(n,s,i,r,c)=>{const d=s[r-1],{params:h,loaderDeps:y,abortController:p,cause:m}=n.router.getMatch(i),b=al(n,r),v=Vc(n,i);return{params:h,deps:y,preload:!!v,parentMatchPromise:d,abortController:p,context:b,location:n.location,navigate:S=>n.router.navigate({...S,_fromLocation:n.location}),cause:v?"preload":m,route:c,...n.router.options.additionalContext}},Xg=async(n,s,i,r,c)=>{var d,h,y,p,m;try{const b=n.router.getMatch(i);try{(!(l0??n.router.isServer)||b.ssr===!0)&&kr(c);const v=c.options.loader,S=typeof v=="function"?v:v==null?void 0:v.handler,R=S==null?void 0:S(p0(n,s,i,r,c)),_=!!S&&Dr(R);if((_||c._lazyPromise||c._componentsPromise||c.options.head||c.options.scripts||c.options.headers||b._nonReactive.minPendingPromise)&&n.updateMatch(i,j=>({...j,isFetching:"loader"})),S){const j=_?await R:R;hs(n,n.router.getMatch(i),j),j!==void 0&&n.updateMatch(i,z=>({...z,loaderData:j}))}c._lazyPromise&&await c._lazyPromise;const E=b._nonReactive.minPendingPromise;E&&await E,c._componentsPromise&&await c._componentsPromise,n.updateMatch(i,j=>({...j,error:void 0,context:al(n,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(v){let S=v;if((S==null?void 0:S.name)==="AbortError"){if(b.abortController.signal.aborted){(d=b._nonReactive.loaderPromise)==null||d.resolve(),b._nonReactive.loaderPromise=void 0;return}n.updateMatch(i,_=>({..._,status:_.status==="pending"?"success":_.status,isFetching:!1,context:al(n,r)}));return}const R=b._nonReactive.minPendingPromise;R&&await R,Nt(v)&&await((y=(h=c.options.notFoundComponent)==null?void 0:h.preload)==null?void 0:y.call(h)),hs(n,n.router.getMatch(i),v);try{(m=(p=c.options).onError)==null||m.call(p,v)}catch(_){S=_,hs(n,n.router.getMatch(i),_)}!Pt(S)&&!Nt(S)&&await kr(c,["errorComponent"]),n.updateMatch(i,_=>({..._,error:S,context:al(n,r),status:"error",isFetching:!1}))}}catch(b){const v=n.router.getMatch(i);v&&(v._nonReactive.loaderPromise=void 0),hs(n,v,b)}},ij=async(n,s,i)=>{var R,_,E,j;async function r(z,A,B,N,Q){const k=Date.now()-A.updatedAt,D=z?Q.options.preloadStaleTime??n.router.options.defaultPreloadStaleTime??3e4:Q.options.staleTime??n.router.options.defaultStaleTime??0,O=Q.options.shouldReload,K=typeof O=="function"?O(p0(n,s,c,i,Q)):O,{status:$,invalid:W}=N,Z=k>=D&&(!!n.forceStaleReload||N.cause==="enter"||B!==void 0&&B!==N.id);h=$==="success"&&(W||(K??Z)),z&&Q.options.preload===!1||(h&&!n.sync&&b?(y=!0,(async()=>{var te,ee;try{await Xg(n,s,c,i,Q);const he=n.router.getMatch(c);(te=he._nonReactive.loaderPromise)==null||te.resolve(),(ee=he._nonReactive.loadPromise)==null||ee.resolve(),he._nonReactive.loaderPromise=void 0,he._nonReactive.loadPromise=void 0}catch(he){Pt(he)&&await n.router.navigate(he.options)}})()):$!=="success"||h?await Xg(n,s,c,i,Q):Pg(n,c,i))}const{id:c,routeId:d}=n.matches[i];let h=!1,y=!1;const p=n.router.looseRoutesById[d],m=p.options.loader,b=((typeof m=="function"||m==null?void 0:m.staleReloadMode)??n.router.options.defaultStaleReloadMode)!=="blocking";if(m0(n,c)){if(!n.router.getMatch(c))return n.matches[i];Pg(n,c,i)}else{const z=n.router.getMatch(c),A=n.router.stores.matchesId.get()[i],B=((R=A&&n.router.stores.matchStores.get(A)||null)==null?void 0:R.routeId)===d?A:(_=n.router.stores.matches.get().find(Q=>Q.routeId===d))==null?void 0:_.id,N=Vc(n,c);if(z._nonReactive.loaderPromise){if(z.status==="success"&&!n.sync&&!z.preload&&b)return z;await z._nonReactive.loaderPromise;const Q=n.router.getMatch(c),k=Q._nonReactive.error||Q.error;k&&hs(n,Q,k),Q.status==="pending"&&await r(N,z,B,Q,p)}else{const Q=N&&!n.router.stores.matchStores.has(c),k=n.router.getMatch(c);k._nonReactive.loaderPromise=vi(),Q!==k.preload&&n.updateMatch(c,D=>({...D,preload:Q})),await r(N,z,B,k,p)}}const v=n.router.getMatch(c);y||((E=v._nonReactive.loaderPromise)==null||E.resolve(),(j=v._nonReactive.loadPromise)==null||j.resolve(),v._nonReactive.loadPromise=void 0),clearTimeout(v._nonReactive.pendingTimeout),v._nonReactive.pendingTimeout=void 0,y||(v._nonReactive.loaderPromise=void 0),v._nonReactive.dehydrated=void 0;const S=y?v.isFetching:!1;return S!==v.isFetching||v.invalid!==!1?(n.updateMatch(c,z=>({...z,isFetching:S,invalid:!1})),n.router.getMatch(c)):v};async function Zg(n){var S,R;const s=n,i=[];tj(s.router)&&Zd(s);let r;for(let _=0;_<s.matches.length;_++){try{const E=sj(s,_);Dr(E)&&await E}catch(E){if(Pt(E))throw E;if(Nt(E))r=E;else if(!s.preload)throw E;break}if(s.serialError||s.firstBadMatchIndex!=null)break}const c=s.firstBadMatchIndex??s.matches.length,d=r&&!s.preload?Kg(s,r):void 0,h=r&&s.preload?0:d!==void 0?Math.min(d+1,c):c;let y,p;for(let _=0;_<h;_++)i.push(ij(s,i,_));try{await Promise.all(i)}catch{const _=await Promise.allSettled(i);for(const E of _){if(E.status!=="rejected")continue;const j=E.reason;if(Pt(j))throw j;Nt(j)?y??(y=j):p??(p=j)}if(p!==void 0)throw p}const m=y??(r&&!s.preload?r:void 0);let b=s.firstBadMatchIndex!==void 0?s.firstBadMatchIndex:s.matches.length-1;if(!m&&r&&s.preload)return s.matches;if(m){const _=Kg(s,m);_===void 0&&ba();const E=s.matches[_],j=s.router.looseRoutesById[E.routeId],z=(S=s.router.options)==null?void 0:S.defaultNotFoundComponent;!j.options.notFoundComponent&&z&&(j.options.notFoundComponent=z),m.routeId=E.routeId;const A=E.routeId===s.router.routeTree.id;s.updateMatch(E.id,B=>({...B,...A?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:m},isFetching:!1})),b=_,await kr(j,["notFoundComponent"])}else if(!s.preload){const _=s.matches[0];_.globalNotFound||(R=s.router.getMatch(_.id))!=null&&R.globalNotFound&&s.updateMatch(_.id,E=>({...E,globalNotFound:!1,error:void 0}))}if(s.serialError&&s.firstBadMatchIndex!==void 0){const _=s.router.looseRoutesById[s.matches[s.firstBadMatchIndex].routeId];await kr(_,["errorComponent"])}for(let _=0;_<=b;_++){const{id:E,routeId:j}=s.matches[_],z=s.router.looseRoutesById[j];try{const A=lj(s,E,z);if(A){const B=await A;s.updateMatch(E,N=>({...N,...B}))}}catch(A){console.error(`Error executing head for route ${j}:`,A)}}const v=Zd(s);if(Dr(v)&&await v,m)throw m;if(s.serialError&&!s.preload&&!s.onReady)throw s.serialError;return s.matches}function Jg(n,s){const i=s.map(r=>{var c,d;return(d=(c=n.options[r])==null?void 0:c.preload)==null?void 0:d.call(c)}).filter(Boolean);if(i.length!==0)return Promise.all(i)}function kr(n,s=_c){!n._lazyLoaded&&n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(r=>{const{id:c,...d}=r.options;Object.assign(n.options,d),n._lazyLoaded=!0,n._lazyPromise=void 0}):n._lazyLoaded=!0);const i=()=>n._componentsLoaded?void 0:s===_c?(()=>{if(n._componentsPromise===void 0){const r=Jg(n,_c);r?n._componentsPromise=r.then(()=>{n._componentsLoaded=!0,n._componentsPromise=void 0}):n._componentsLoaded=!0}return n._componentsPromise})():Jg(n,s);return n._lazyPromise?n._lazyPromise.then(i):i()}function g0(n){var s;for(const i of _c)if((s=n.options[i])!=null&&s.preload)return!0;return!1}const _c=["component","errorComponent","pendingComponent","notFoundComponent"];function rj(n){return{input:({url:s})=>{for(const i of n)s=Jd(i,s);return s},output:({url:s})=>{for(let i=n.length-1;i>=0;i--)s=v0(n[i],s);return s}}}function oj(n){const s=h0(n.basepath),i=`/${s}`,r=n.caseSensitive?i:i.toLowerCase(),c=`${r}/`;return{input:({url:d})=>{const h=n.caseSensitive?d.pathname:d.pathname.toLowerCase();return h===r?d.pathname="/":h.startsWith(c)&&(d.pathname=d.pathname.slice(i.length)),d},output:({url:d})=>(d.pathname=Rc(["/",s,d.pathname]),d)}}function Jd(n,s){var r;const i=(r=n==null?void 0:n.input)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function v0(n,s){var r;const i=(r=n==null?void 0:n.output)==null?void 0:r.call(n,{url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function cj(n,s){const{createMutableStore:i,createReadonlyStore:r,batch:c,init:d}=s,h=new Map,y=new Map,p=new Map,m=i(n.status),b=i(n.loadedAt),v=i(n.isLoading),S=i(n.isTransitioning),R=i(n.location),_=i(n.resolvedLocation),E=i(n.statusCode),j=i(n.redirect),z=i([]),A=i([]),B=i([]),N=r(()=>md(h,z.get())),Q=r(()=>md(y,A.get())),k=r(()=>md(p,B.get())),D=r(()=>z.get()[0]),O=r(()=>z.get().some(P=>{var ue;return((ue=h.get(P))==null?void 0:ue.get().status)==="pending"})),K=r(()=>{var P;return{locationHref:R.get().href,resolvedLocationHref:(P=_.get())==null?void 0:P.href,status:m.get()}}),$=r(()=>({status:m.get(),loadedAt:b.get(),isLoading:v.get(),isTransitioning:S.get(),matches:N.get(),location:R.get(),resolvedLocation:_.get(),statusCode:E.get(),redirect:j.get()})),W=Ur(64);function Z(P){let ue=W.get(P);return ue||(ue=r(()=>{const Me=z.get();for(const ne of Me){const C=h.get(ne);if(C&&C.routeId===P)return C.get()}}),W.set(P,ue)),ue}const te={status:m,loadedAt:b,isLoading:v,isTransitioning:S,location:R,resolvedLocation:_,statusCode:E,redirect:j,matchesId:z,pendingIds:A,cachedIds:B,matches:N,pendingMatches:Q,cachedMatches:k,firstId:D,hasPending:O,matchRouteDeps:K,matchStores:h,pendingMatchStores:y,cachedMatchStores:p,__store:$,getRouteMatchStore:Z,setMatches:ee,setPending:he,setCached:L};ee(n.matches),d==null||d(te);function ee(P){yd(P,h,z,i,c)}function he(P){yd(P,y,A,i,c)}function L(P){yd(P,p,B,i,c)}return te}function md(n,s){const i=[];for(const r of s){const c=n.get(r);c&&i.push(c.get())}return i}function yd(n,s,i,r,c){const d=n.map(y=>y.id),h=new Set(d);c(()=>{for(const y of s.keys())h.has(y)||s.delete(y);for(const y of n){const p=s.get(y.id);if(!p){const m=r(y);m.routeId=y.routeId,s.set(y.id,m);continue}p.routeId=y.routeId,p.get()!==y&&p.set(y)}DS(i.get(),d)||i.set(d)})}var ys="__TSR_index",Fg="popstate",Ig="beforeunload";function uj(n){let s=n.getLocation();const i=new Set,r=h=>{s=n.getLocation(),i.forEach(y=>y({location:s,action:h}))},c=h=>{n.notifyOnIndexChange??!0?r(h):s=n.getLocation()},d=async({task:h,navigateOpts:y,...p})=>{var v,S;if((y==null?void 0:y.ignoreBlocker)??!1){h();return}const m=((v=n.getBlockers)==null?void 0:v.call(n))??[],b=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&m.length&&b)for(const R of m){const _=kc(p.path,p.state);if(await R.blockerFn({currentLocation:s,nextLocation:_,action:p.type})){(S=n.onBlocked)==null||S.call(n);return}}h()};return{get location(){return s},get length(){return n.getLength()},subscribers:i,subscribe:h=>(i.add(h),()=>{i.delete(h)}),push:(h,y,p)=>{const m=s.state[ys];y=$g(m+1,y),d({task:()=>{n.pushState(h,y),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:h,state:y})},replace:(h,y,p)=>{const m=s.state[ys];y=$g(m,y),d({task:()=>{n.replaceState(h,y),r({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:h,state:y})},go:(h,y)=>{d({task:()=>{n.go(h),c({type:"GO",index:h})},navigateOpts:y,type:"GO"})},back:h=>{d({task:()=>{n.back((h==null?void 0:h.ignoreBlocker)??!1),c({type:"BACK"})},navigateOpts:h,type:"BACK"})},forward:h=>{d({task:()=>{n.forward((h==null?void 0:h.ignoreBlocker)??!1),c({type:"FORWARD"})},navigateOpts:h,type:"FORWARD"})},canGoBack:()=>s.state[ys]!==0,createHref:h=>n.createHref(h),block:h=>{var p;if(!n.setBlockers)return()=>{};const y=((p=n.getBlockers)==null?void 0:p.call(n))??[];return n.setBlockers([...y,h]),()=>{var b,v;const m=((b=n.getBlockers)==null?void 0:b.call(n))??[];(v=n.setBlockers)==null||v.call(n,m.filter(S=>S!==h))}},flush:()=>{var h;return(h=n.flush)==null?void 0:h.call(n)},destroy:()=>{var h;return(h=n.destroy)==null?void 0:h.call(n)},notify:r}}function $g(n,s){s||(s={});const i=yh();return{...s,key:i,__TSR_key:i,[ys]:n}}function fj(n){var O,K;const s=typeof document<"u"?window:void 0,i=s.history.pushState,r=s.history.replaceState;let c=[];const d=()=>c,h=$=>c=$,y=($=>$),p=(()=>kc(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!((O=s.history.state)!=null&&O.__TSR_key)&&!((K=s.history.state)!=null&&K.key)){const $=yh();s.history.replaceState({[ys]:0,key:$,__TSR_key:$},"")}let m=p(),b,v=!1,S=!1,R=!1,_=!1;const E=()=>m;let j,z;const A=()=>{j&&(D._ignoreSubscribers=!0,(j.isPush?s.history.pushState:s.history.replaceState)(j.state,"",j.href),D._ignoreSubscribers=!1,j=void 0,z=void 0,b=void 0)},B=($,W,Z)=>{const te=y(W);z||(b=m),m=kc(W,Z),j={href:te,state:Z,isPush:(j==null?void 0:j.isPush)||$==="push"},z||(z=Promise.resolve().then(()=>A()))},N=$=>{m=p(),D.notify({type:$})},Q=async()=>{if(S){S=!1;return}const $=p(),W=$.state[ys]-m.state[ys],Z=W===1,te=W===-1,ee=!Z&&!te||v;v=!1;const he=ee?"GO":te?"BACK":"FORWARD",L=ee?{type:"GO",index:W}:{type:te?"BACK":"FORWARD"};if(R)R=!1;else{const P=d();if(typeof document<"u"&&P.length){for(const ue of P)if(await ue.blockerFn({currentLocation:m,nextLocation:$,action:he})){S=!0,s.history.go(1),D.notify(L);return}}}m=p(),D.notify(L)},k=$=>{if(_){_=!1;return}let W=!1;const Z=d();if(typeof document<"u"&&Z.length)for(const te of Z){const ee=te.enableBeforeUnload??!0;if(ee===!0){W=!0;break}if(typeof ee=="function"&&ee()===!0){W=!0;break}}if(W)return $.preventDefault(),$.returnValue=""},D=uj({getLocation:E,getLength:()=>s.history.length,pushState:($,W)=>B("push",$,W),replaceState:($,W)=>B("replace",$,W),back:$=>($&&(R=!0),_=!0,s.history.back()),forward:$=>{$&&(R=!0),_=!0,s.history.forward()},go:$=>{v=!0,s.history.go($)},createHref:$=>y($),flush:A,destroy:()=>{s.history.pushState=i,s.history.replaceState=r,s.removeEventListener(Ig,k,{capture:!0}),s.removeEventListener(Fg,Q)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:d,setBlockers:h,notifyOnIndexChange:!1});return s.addEventListener(Ig,k,{capture:!0}),s.addEventListener(Fg,Q),s.history.pushState=function(...$){const W=i.apply(s.history,$);return D._ignoreSubscribers||N("PUSH"),W},s.history.replaceState=function(...$){const W=r.apply(s.history,$);return D._ignoreSubscribers||N("REPLACE"),W},D}function dj(n){let s=n.replace(/[\x00-\x1f\x7f]/g,"");return s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}function kc(n,s){const i=dj(n),r=i.indexOf("#"),c=i.indexOf("?"),d=yh();return{href:i,pathname:i.substring(0,r>0?c>0?Math.min(r,c):r:c>0?c:i.length),hash:r>-1?i.substring(r):"",search:c>-1?i.slice(c,r===-1?void 0:r):"",state:s||{[ys]:0,key:d,__TSR_key:d}}}function yh(){return(Math.random()+1).toString(36).substring(7)}function ai(n,s){const i=s,r=n;return{fromLocation:i,toLocation:r,pathChanged:(i==null?void 0:i.pathname)!==r.pathname,hrefChanged:(i==null?void 0:i.href)!==r.href,hashChanged:(i==null?void 0:i.hash)!==r.hash}}const Fd=new WeakMap;var hj=class{constructor(n,s){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.routeBranchCache=new WeakMap,this.startTransition=i=>i(),this.update=i=>{var b;const r=this.options,c=this.basepath??(r==null?void 0:r.basepath)??"/",d=this.basepath===void 0,h=r==null?void 0:r.rewrite;if(this.options={...r,...i},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=XS(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=fj()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let v;this.resolvePathCache=Ur(1e3),v=this.buildRouteTree(),this.setRoutes(v)}if(!this.stores&&this.latestLocation){const v=this.getStoreConfig(this);this.batch=v.batch,this.stores=cj(yj(this.latestLocation),v),wj(this)}let y=!1;const p=this.options.basepath??"/",m=this.options.rewrite;if(d||c!==p||h!==m){this.basepath=p;const v=[],S=h0(p);S&&S!=="/"&&v.push(oj({basepath:p})),m&&v.push(m),this.rewrite=v.length===0?void 0:v.length===1?v[0]:rj(v),this.history&&this.updateLatestLocation(),y=!0}y&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((b=window.CSS)==null?void 0:b.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a))"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=QS(this.routeTree,this.options.caseSensitive,(r,c)=>{r.init({originalIndex:c})});return this.options.routeMasks&&kS(this.options.routeMasks,i.processedTree),i},this.subscribe=(i,r)=>{const c={eventType:i,fn:r};return this.subscribers.add(c),()=>{this.subscribers.delete(c)}},this.emit=i=>{this.subscribers.forEach(r=>{r.eventType===i.type&&r.fn(i)})},this.parseLocation=(i,r)=>{const c=({pathname:p,search:m,hash:b,href:v,state:S})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),A=this.options.stringifySearch(z);return{href:p+A+b,publicHref:p+A+b,pathname:xr(p).path,external:!1,searchStr:A,search:Bs(r==null?void 0:r.search,z),hash:xr(b.slice(1)).path,state:fs(r==null?void 0:r.state,S)}}const R=new URL(v,this.origin),_=Jd(this.rewrite,R),E=this.options.parseSearch(_.search),j=this.options.stringifySearch(E);return _.search=j,{href:_.href.replace(_.origin,""),publicHref:v,pathname:xr(_.pathname).path,external:!!this.rewrite&&_.origin!==this.origin,searchStr:j,search:Bs(r==null?void 0:r.search,E),hash:xr(_.hash.slice(1)).path,state:fs(r==null?void 0:r.state,S)}},d=c(i),{__tempLocation:h,__tempKey:y}=d.state;if(h&&(!y||y===this.tempLocationKey)){const p=c(h);return p.state.key=d.state.key,p.state.__TSR_key=d.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:d}}return d},this.resolvePathWithBase=(i,r)=>PS({base:i,to:r.includes("//")?mh(r):r,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(i,r,c)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},c):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>pj({pathname:i,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=i=>{const r=this.getMatch(i);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(i=>{this.cancelMatch(i)}),this.stores.matchesId.get().forEach(i=>{var c;if(this.stores.pendingMatchStores.has(i))return;const r=(c=this.stores.matchStores.get(i))==null?void 0:c.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(i)})},this.buildLocation=i=>{const r=(d={})=>{var W,Z;const h=d._fromLocation||this.pendingBuiltLocation||this.latestLocation,y=this.matchRoutesLightweight(h);d.from;const p=d.unsafeRelative==="path"?h.pathname:d.from??y.fullPath,m=d.to?`${d.to}`:void 0,b=y.search,v=Object.assign(Object.create(null),y.params),S=(m==null?void 0:m.charCodeAt(0))===47?"/":this.resolvePathWithBase(p,"."),R=m?this.resolvePathWithBase(S,m):S,_=d.params===!1||d.params===null?Object.create(null):(d.params??!0)===!0?v:Object.assign(v,Ys(d.params,v)),E=this.routesByPath[va(R)];let j;if(E)j=this.getRouteBranch(E);else if(R.includes("$"))j=[];else{const te=this.getMatchedRoutes(R);j=te.matchedRoutes,this.options.notFoundRoute&&(!te.foundRoute||te.foundRoute.path!=="/"&&te.routeParams["**"])&&(j=[...j,this.options.notFoundRoute])}if(j.length&&r0(_))for(const te of j){const ee=((W=te.options.params)==null?void 0:W.stringify)??te.options.stringifyParams;if(ee)try{Object.assign(_,ee(_))}catch{}}const z=i.leaveParams?R:xr(Vg({path:R,params:_,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let A=b;if(i._includeValidateSearch&&((Z=this.options.search)!=null&&Z.strict)){const te={};j.forEach(ee=>{if(ee.options.validateSearch)try{Object.assign(te,Ec(ee.options.validateSearch,{...te,...A}))}catch{}}),A=te}A=gj({search:A,dest:d,destRoutes:j,_includeValidateSearch:i._includeValidateSearch}),A=Bs(b,A);const B=this.options.stringifySearch(A),N=d.hash===!0?h.hash:d.hash?Ys(d.hash,h.hash):void 0,Q=N?`#${N}`:"";let k=d.state===!0?h.state:d.state?Ys(d.state,h.state):{};k=fs(h.state,k);const D=`${z}${B}${Q}`;let O,K,$=!1;if(this.rewrite){const te=new URL(D,this.origin),ee=v0(this.rewrite,te);O=te.href.replace(te.origin,""),ee.origin!==this.origin?(K=ee.href,$=!0):K=ee.pathname+ee.search+ee.hash}else O=zS(D),K=O;return{publicHref:K,href:O,pathname:z,search:A,searchStr:B,state:k,hash:N??"",external:$,unmaskOnReload:d.unmaskOnReload}},c=(d={},h)=>{const y=r(d);let p=h?r(h):void 0;if(!p){const m=Object.create(null);if(this.options.routeMasks){const b=LS(y.pathname,this.processedTree);if(b){Object.assign(m,b.rawParams);const{from:v,params:S,...R}=b.route,_=S===!1||S===null?Object.create(null):(S??!0)===!0?m:Object.assign(m,Ys(S,m));h={from:i.from,...R,params:_},p=r(h)}}}return p&&(y.maskedLocation=p),y};return i.mask?c(i,{from:i.from,...i.mask}):c(i)},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...c})=>{let d;const h=()=>{const m=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];m.forEach(v=>{c.state[v]=this.latestLocation.state[v]});const b=tl(c.state,this.latestLocation.state);return m.forEach(v=>{delete c.state[v]}),b},y=va(this.latestLocation.href)===va(c.href);let p=this.commitLocationPromise;if(this.commitLocationPromise=vi(()=>{p==null||p.resolve(),p=void 0}),y&&h())this.load();else{let{maskedLocation:m,hashScrollIntoView:b,...v}=c;m&&(v={...m,state:{...m.state,__tempKey:void 0,__tempLocation:{...v,search:v.searchStr,state:{...v.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(v.unmaskOnReload??this.options.unmaskOnReload??!1)&&(v.state.__tempKey=this.tempLocationKey)),v.state.__hashScrollIntoViewOptions=b??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=i,d=c.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](v.publicHref,v.state,{ignoreBlocker:r})}return this.resetNextScroll=c.resetScroll??!0,this.history.subscribers.size||this.load(d?{action:{type:d}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:i,resetScroll:r,hashScrollIntoView:c,viewTransition:d,ignoreBlocker:h,href:y,...p}={})=>{if(y){const v=this.history.location.state.__TSR_index,S=kc(y,{__TSR_index:i?v:v+1}),R=new URL(S.pathname,this.origin);p.to=Jd(this.rewrite,R).pathname,p.search=this.options.parseSearch(S.search),p.hash=S.hash.slice(1)}const m=this.buildLocation({...p,_includeValidateSearch:!0});this.pendingBuiltLocation=m;const b=this.commitLocation({...m,viewTransition:d,replace:i,resetScroll:r,hashScrollIntoView:c,ignoreBlocker:h});return Promise.resolve().then(()=>{this.pendingBuiltLocation===m&&(this.pendingBuiltLocation=void 0)}),b},this.navigate=async({to:i,reloadDocument:r,href:c,publicHref:d,...h})=>{var p,m;let y=!1;if(c)try{new URL(`${c}`),y=!0}catch{}if(y&&!r&&(r=!0),r){if(i!==void 0||!c){const v=this.buildLocation({to:i,...h});c=c??v.publicHref,d=d??v.publicHref}const b=!y&&d?d:c;if(Dc(b,this.protocolAllowlist))return Promise.resolve();if(!h.ignoreBlocker){const v=((m=(p=this.history).getBlockers)==null?void 0:m.call(p))??[];for(const S of v)if(S!=null&&S.blockerFn&&await S.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return h.replace?window.location.replace(b):window.location.href=b,Promise.resolve()}return this.buildAndCommitLocation({...h,href:c,to:i,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const i=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(c=>!i.some(d=>d.id===c.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(i),this.stores.setCached(r)})},this.load=async i=>{var m;const r=(m=i==null?void 0:i.action)==null?void 0:m.type;let c,d,h;const y=this.stores.resolvedLocation.get()??this.stores.location.get();for(h=new Promise(b=>{this.startTransition(async()=>{var v;try{this.beforeLoad(),r?Fd.set(this.latestLocation,r):Fd.delete(this.latestLocation);const S=this.latestLocation,R=ai(S,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...R}),this.emit({type:"onBeforeLoad",...R}),await Zg({router:this,sync:i==null?void 0:i.sync,forceStaleReload:y.href===S.href,matches:this.stores.pendingMatches.get(),location:S,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var A,B;let _=null,E=null,j=null,z=null;this.batch(()=>{const N=this.stores.pendingMatches.get(),Q=N.length,k=this.stores.matches.get();_=Q?k.filter(K=>!this.stores.pendingMatchStores.has(K.id)):null;const D=new Set;for(const K of this.stores.pendingMatchStores.values())K.routeId&&D.add(K.routeId);const O=new Set;for(const K of this.stores.matchStores.values())K.routeId&&O.add(K.routeId);E=Q?k.filter(K=>!D.has(K.routeId)):null,j=Q?N.filter(K=>!O.has(K.routeId)):null,z=Q?N.filter(K=>O.has(K.routeId)):k,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),Q&&(this.stores.setMatches(N),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),..._.filter(K=>K.status!=="error"&&K.status!=="notFound"&&K.status!=="redirected")]),this.clearExpiredCache())});for(const[N,Q]of[[E,"onLeave"],[j,"onEnter"],[z,"onStay"]])if(N)for(const k of N)(B=(A=this.looseRoutesById[k.routeId].options)[Q])==null||B.call(A,k)})})}})}catch(S){Pt(S)?(c=S,this.navigate({...c.options,replace:!0,ignoreBlocker:!0})):Nt(S)&&(d=S);const R=c?c.status:d?404:this.stores.matches.get().some(_=>_.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(R),this.stores.redirect.set(c)})}this.latestLoadPromise===h&&((v=this.commitLocationPromise)==null||v.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),b()})}),this.latestLoadPromise=h,await h;this.latestLoadPromise&&h!==this.latestLoadPromise;)await this.latestLoadPromise;let p;this.hasNotFoundMatch()?p=404:this.stores.matches.get().some(b=>b.status==="error")&&(p=500),p!==void 0&&this.stores.statusCode.set(p)},this.startViewTransition=i=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let c;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const d=this.latestLocation,h=this.stores.resolvedLocation.get(),y=typeof r.types=="function"?r.types(ai(d,h)):r.types;if(y===!1){i();return}c={update:i,types:y}}else c=i;document.startViewTransition(c)}else i()},this.updateMatch=(i,r)=>{this.startTransition(()=>{const c=this.stores.pendingMatchStores.get(i);if(c){c.set(r);return}const d=this.stores.matchStores.get(i);if(d){d.set(r);return}const h=this.stores.cachedMatchStores.get(i);if(h){const y=r(h.get());y.status==="redirected"?this.stores.cachedMatchStores.delete(i)&&this.stores.cachedIds.set(p=>p.filter(m=>m!==i)):h.set(y)}})},this.getMatch=i=>{var r,c,d;return((r=this.stores.cachedMatchStores.get(i))==null?void 0:r.get())??((c=this.stores.pendingMatchStores.get(i))==null?void 0:c.get())??((d=this.stores.matchStores.get(i))==null?void 0:d.get())},this.invalidate=i=>{const r=c=>{var d;return((d=i==null?void 0:i.filter)==null?void 0:d.call(i,c))??!0?{...c,invalid:!0,...i!=null&&i.forcePending||c.status==="error"||c.status==="notFound"?{status:"pending",error:void 0}:void 0}:c};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:i==null?void 0:i.sync})},this.getParsedLocationHref=i=>i.publicHref||"/",this.resolveRedirect=i=>{const r=i.headers.get("Location");if(!i.options.href||i.options._builtLocation){const c=i.options._builtLocation??this.buildLocation(i.options),d=this.getParsedLocationHref(c);i.options.href=d,i.headers.set("Location",d)}else if(r)try{const c=new URL(r);if(this.origin&&c.origin===this.origin){const d=c.pathname+c.search+c.hash;i.options.href=d,i.headers.set("Location",d)}}catch{}if(i.options.href&&!i.options._builtLocation&&Dc(i.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return i.headers.get("Location")||i.headers.set("Location",i.options.href),i},this.clearCache=i=>{const r=i==null?void 0:i.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(c=>!r(c))):this.stores.setCached([])},this.clearExpiredCache=()=>{const i=Date.now(),r=c=>{const d=this.looseRoutesById[c.routeId];if(!d.options.loader)return!0;const h=(c.preload?d.options.preloadGcTime??this.options.defaultPreloadGcTime:d.options.gcTime??this.options.defaultGcTime)??300*1e3;return c.status==="error"?!0:i-c.updatedAt>=h};this.clearCache({filter:r})},this.loadRouteChunk=kr,this.preloadRoute=async i=>{const r=i._builtLocation??this.buildLocation(i);let c=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:i});const d=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),h=new Set([...d,...this.stores.cachedIds.get()]),y=c.filter(p=>!h.has(p.id));if(y.length){const p=this.stores.cachedMatches.get();this.stores.setCached([...p,...y])}try{return c=await Zg({router:this,matches:c,location:r,preload:!0,updateMatch:(p,m)=>{d.has(p)?c=c.map(b=>b.id===p?m(b):b):this.updateMatch(p,m)}}),c}catch(p){if(Pt(p))return p.options.reloadDocument?void 0:await this.preloadRoute({...p.options,_fromLocation:r});Nt(p)||console.error(p);return}},this.matchRoute=(i,r)=>{const c={...i,to:i.to?this.resolvePathWithBase(i.from||"",i.to):void 0,params:i.params||{},leaveParams:!0},d=this.buildLocation(c);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const h=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),y=BS(d.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,h.pathname,this.processedTree);return!y||i.params&&!tl(y.rawParams,i.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?tl(h.search,d.search,{partial:!0})?y.rawParams:!1:y.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(i=>i.status==="notFound"||i.globalNotFound),this.getStoreConfig=s,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...n,caseSensitive:n.caseSensitive??!1,notFoundMode:n.notFoundMode??"fuzzy",stringifySearch:n.stringifySearch??IS,parseSearch:n.parseSearch??FS,protocolAllowlist:n.protocolAllowlist??OS}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:n,routesByPath:s,processedTree:i}){this.routesById=n,this.routesByPath=s,this.processedTree=i;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(n){let s=this.routeBranchCache.get(n);return s||(s=f0(n),this.routeBranchCache.set(n,s)),s}get looseRoutesById(){return this.routesById}getParentContext(n){return n!=null&&n.id?n.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(n,s){var b,v;const i=this.getMatchedRoutes(n.pathname),{foundRoute:r,routeParams:c}=i;let{matchedRoutes:d}=i,h=!1;(r?r.path!=="/"&&c["**"]:va(n.pathname))&&(this.options.notFoundRoute?d=[...d,this.options.notFoundRoute]:h=!0);const y=h?bj(this.options.notFoundMode,d):void 0,p=new Array(d.length),m=new Map;for(const S of this.stores.matchStores.values())S.routeId&&m.set(S.routeId,S.get());for(let S=0;S<d.length;S++){const R=d[S],_=p[S-1];let E,j,z;{const ee=(_==null?void 0:_.search)??n.search,he=(_==null?void 0:_._strictSearch)??void 0;try{const L=Ec(R.options.validateSearch,{...ee})??void 0;E={...ee,...L},j={...he,...L},z=void 0}catch(L){let P=L;if(L instanceof Lc||(P=new Lc(L.message,{cause:L})),s!=null&&s.throwOnError)throw P;E=ee,j={},z=P}}const A=((v=(b=R.options).loaderDeps)==null?void 0:v.call(b,{search:E}))??"",B=A?JSON.stringify(A):"",{interpolatedPath:N,usedParams:Q}=Vg({path:R.fullPath,params:c,decoder:this.pathParamsDecoder,server:this.isServer}),k=R.id+N+B,D=this.getMatch(k),O=m.get(R.id),K=(D==null?void 0:D._strictParams)??Q;let $;if(!D)try{Wg(R,K)}catch(ee){if(Nt(ee)||Pt(ee)?$=ee:$=new mj(ee.message,{cause:ee}),s!=null&&s.throwOnError)throw $}Object.assign(c,K);const W=O?"stay":"enter";let Z;if(D)Z={...D,cause:W,params:(O==null?void 0:O.params)??c,_strictParams:K,search:Bs(O?O.search:D.search,E),_strictSearch:j};else{const ee=R.options.loader||R.options.beforeLoad||R.lazyFn||g0(R)?"pending":"success";Z={id:k,ssr:R.options.ssr,index:S,routeId:R.id,params:(O==null?void 0:O.params)??c,_strictParams:K,pathname:N,updatedAt:Date.now(),search:O?Bs(O.search,E):E,_strictSearch:j,searchError:void 0,status:ee,isFetching:!1,error:void 0,paramsError:$,__routeContext:void 0,_nonReactive:{loadPromise:vi()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:W,loaderDeps:O?fs(O.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:R.options.staticData||{},fullPath:R.fullPath}}s!=null&&s.preload||(Z.globalNotFound=y===R.id),Z.searchError=z;const te=this.getParentContext(_);Z.context={...te,...Z.__routeContext,...Z.__beforeLoadContext},p[S]=Z}for(let S=0;S<p.length;S++){const R=p[S],_=this.looseRoutesById[R.routeId],E=this.getMatch(R.id),j=m.get(R.routeId);if(R.params=j?Bs(j.params,c):c,!E){const z=p[S-1],A=this.getParentContext(z);if(_.options.context){const B={deps:R.loaderDeps,params:R.params,context:A??{},location:n,navigate:N=>this.navigate({...N,_fromLocation:n}),buildLocation:this.buildLocation,cause:R.cause,abortController:R.abortController,preload:!!R.preload,matches:p,routeId:_.id};R.__routeContext=_.options.context(B)??void 0}R.context={...A,...R.__routeContext,...R.__beforeLoadContext}}}return p}matchRoutesLightweight(n){var m;const{matchedRoutes:s,routeParams:i}=this.getMatchedRoutes(n.pathname),r=zr(s),c={...n.search};for(const b of s)try{Object.assign(c,Ec(b.options.validateSearch,c))}catch{}const d=zr(this.stores.matchesId.get()),h=d&&((m=this.stores.matchStores.get(d))==null?void 0:m.get()),y=h&&h.routeId===r.id&&h.pathname===n.pathname;let p;if(y)p=h.params;else{const b=Object.assign(Object.create(null),i);for(const v of s)try{Wg(v,b)}catch{}p=b}return{matchedRoutes:s,fullPath:r.fullPath,search:c,params:p}}},Lc=class extends Error{},mj=class extends Error{};function yj(n){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:n,matches:[],statusCode:200}}function Ec(n,s){if(n==null)return{};if("~standard"in n){const i=n["~standard"].validate(s);if(i instanceof Promise)throw new Lc("Async validation not supported");if(i.issues)throw new Lc(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in n?n.parse(s):typeof n=="function"?n(s):{}}function pj({pathname:n,routesById:s,processedTree:i}){const r=Object.create(null),c=va(n);let d;const h=qS(c,i,!0);return h&&(d=h.route,Object.assign(r,h.rawParams)),{matchedRoutes:(h==null?void 0:h.branch)||[s.__root__],routeParams:r,foundRoute:d}}function gj({search:n,dest:s,destRoutes:i,_includeValidateSearch:r}){return vj(i)(n,s,r??!1)}function vj(n){var c;const s={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const d of n){if("search"in d.options)(c=d.options.search)!=null&&c.middlewares&&s.middlewares.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const h=({search:y,next:p})=>{let m=y;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(m=d.options.preSearchFilters.reduce((v,S)=>S(v),y));const b=p(m);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((v,S)=>S(v),b):b};s.middlewares.push(h)}if(d.options.validateSearch){const h=({search:y,next:p})=>{const m=p(y);if(!s._includeValidateSearch)return m;try{return{...m,...Ec(d.options.validateSearch,m)??void 0}}catch{return m}};s.middlewares.push(h)}}const i=({search:d})=>{const h=s.dest;return h.search?h.search===!0?d:Ys(h.search,d):{}};s.middlewares.push(i);const r=(d,h,y)=>{if(d>=y.length)return h;const p=y[d];return p({search:h,next:b=>r(d+1,b,y)})};return function(h,y,p){return s.dest=y,s._includeValidateSearch=p,r(0,h,s.middlewares)}}function bj(n,s){if(n!=="root")for(let i=s.length-1;i>=0;i--){const r=s[i];if(r.children)return r.id}return nl}function Wg(n,s){var r;const i=((r=n.options.params)==null?void 0:r.parse)??n.options.parseParams;if(i){const c=i(s);if(c===!1)throw new Error("Route params.parse returned false for a matched route");Object.assign(s,c)}}function xj(){try{return sessionStorage}catch{return}}const Sj="tsr-scroll-restoration-v1_3",si=xj();function jj(){try{return JSON.parse((si==null?void 0:si.getItem("tsr-scroll-restoration-v1_3"))||"{}")}catch{return{}}}function Rj(){try{si==null||si.setItem(Sj,JSON.stringify(es))}catch{}}const es=jj(),ev="data-scroll-restoration-id",_j=n=>n.state.__TSR_key||n.href;function Ej(n){const s=n.getAttribute(ev);if(s)return`[${ev}="${s}"]`;let i="",r=n,c;for(;c=r.parentNode;){let d=1,h=r;for(;h=h.previousElementSibling;)d++;const y=`${r.localName}:nth-child(${d})`;i=i?`${y} > ${i}`:y,r=c}return i}let mc=!1;const ti="window";function Id(n){try{return typeof n=="function"?n():document.querySelector(n)}catch{}}function tv(n){const s=[];for(const i of n){if(i===ti)continue;const r=Id(i);r&&s.push(r)}return s}function wj(n,s){if(n.options.scrollRestoration&&(n.isScrollRestoring=!0),n.isScrollRestorationSetup)return;n.isScrollRestorationSetup=!0,mc=!1;const i=n.options.getScrollRestorationKey||_j,r=new Map,c=(y,p,m)=>{const b=r.get(y)||{};b.scrollX=p,b.scrollY=m,r.set(y,b)};history.scrollRestoration="manual";const d=y=>{if(!(mc||!n.isScrollRestoring))if(y.target===document)c(ti,scrollX,scrollY);else{const p=y.target;c(p,p.scrollLeft,p.scrollTop)}},h=y=>{if(!n.isScrollRestoring)return;const p=es[y]||(es[y]={});for(const[m,b]of r)m===ti?p[ti]=b:m.isConnected&&(p[Ej(m)]=b)};document.addEventListener("scroll",d,!0),n.subscribe("onBeforeLoad",y=>{y.fromLocation&&h(i(y.fromLocation)),r.clear()}),addEventListener("pagehide",()=>{h(i(n.stores.resolvedLocation.get()??n.stores.location.get())),Rj()}),n.subscribe("onRendered",y=>{var _;const p=n.options.scrollRestorationBehavior,m=n.options.scrollToTopSelectors,b=n.resetNextScroll;let v;if(r.clear(),b||(n.resetNextScroll=!0),typeof n.options.scrollRestoration=="function"&&!n.options.scrollRestoration({location:n.latestLocation}))return;const S=i(y.toLocation),R=y.fromLocation&&i(y.fromLocation);if(n.isScrollRestoring&&R&&R!==S){const E=es[R];if(E){let j=es[S];for(const z in E){if(z===ti){if(b)continue}else{const A=Id(z);if(!A||b&&m&&(v??(v=tv(m)),v.includes(A)))continue}j||(j=es[S]={}),j[z]??(j[z]=E[z])}}}mc=!0;try{const E=y.toLocation.hash,j=y.toLocation.state.__hashScrollIntoViewOptions??!0;let z=!1;if(b){const A=Fd.get(y.toLocation),B=E&&j&&(A==="PUSH"||A==="REPLACE"),N=n.isScrollRestoring?es[S]:void 0;if(N)for(const Q in N){const{scrollX:k,scrollY:D}=N[Q];if(Q===ti){if(B)continue;scrollTo({top:D,left:k,behavior:p}),z=!0}else{const O=Id(Q);O&&(O.scrollLeft=k,O.scrollTop=D)}}if(!z&&!E){const Q={top:0,left:0,behavior:p};if(scrollTo(Q),m){v??(v=tv(m));for(const k of v)k.scrollTo(Q)}}}!z&&E&&j&&((_=document.getElementById(E))==null||_.scrollIntoView(j))}finally{mc=!1}})}const Tj="Error preloading route! ☝️";var b0=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(n){if(this.init=s=>{var p,m;this.originalIndex=s.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(m=(p=this.options).getParentRoute)==null?void 0:m.call(p),r?this._path=nl:this.parentRoute||ba();let c=r?nl:i==null?void 0:i.path;c&&c!=="/"&&(c=d0(c));const d=(i==null?void 0:i.id)||c;let h=r?nl:Rc([this.parentRoute.id==="__root__"?"":this.parentRoute.id,d]);c==="__root__"&&(c="/"),h!=="__root__"&&(h=Rc(["/",h]));const y=h==="__root__"?"/":Rc([this.parentRoute.fullPath,c]);this._path=c,this._id=h,this._fullPath=y,this._to=va(y)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>ej({from:this.fullPath,...s}),this.options=n||{},this.isRoot=!(n!=null&&n.getParentRoute),n!=null&&n.id&&(n!=null&&n.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},Nj=class extends b0{constructor(n){super(n)}};function ph(n){const s=n.errorComponent??gh;return f.jsx(Cj,{getResetKey:n.getResetKey,onCatch:n.onCatch,children:({error:i,reset:r})=>i?Y.createElement(s,{error:i,reset:r}):n.children})}var Cj=class extends Y.Component{constructor(...n){super(...n),this.state={error:null}}static getDerivedStateFromProps(n,s){const i=n.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:null}:{resetKey:i}}static getDerivedStateFromError(n){return{error:n}}reset(){this.setState({error:null})}componentDidCatch(n,s){this.props.onCatch&&this.props.onCatch(n,s)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function gh({error:n}){const[s,i]=Y.useState(!1);return f.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[f.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[f.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),f.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:s?"Hide Error":"Show Error"})]}),f.jsx("div",{style:{height:".25rem"}}),s?f.jsx("div",{children:f.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:n.message?f.jsx("code",{children:n.message}):null})}):null]})}function Mj({children:n,fallback:s=null}){return x0()?f.jsx(Or.Fragment,{children:n}):f.jsx(Or.Fragment,{children:s})}function x0(){return Or.useSyncExternalStore(Aj,()=>!0,()=>!1)}function Aj(){return()=>{}}var S0=Y.createContext(null);function cn(n){return Y.useContext(S0)}var Yc=Y.createContext(void 0),Oj=Y.createContext(void 0),We=(n=>(n[n.None=0]="None",n[n.Mutable=1]="Mutable",n[n.Watching=2]="Watching",n[n.RecursedCheck=4]="RecursedCheck",n[n.Recursed=8]="Recursed",n[n.Dirty=16]="Dirty",n[n.Pending=32]="Pending",n))(We||{});function zj({update:n,notify:s,unwatched:i}){return{link:r,unlink:c,propagate:d,checkDirty:h,shallowPropagate:y};function r(m,b,v){const S=b.depsTail;if(S!==void 0&&S.dep===m)return;const R=S!==void 0?S.nextDep:b.deps;if(R!==void 0&&R.dep===m){R.version=v,b.depsTail=R;return}const _=m.subsTail;if(_!==void 0&&_.version===v&&_.sub===b)return;const E=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:S,nextDep:R,prevSub:_,nextSub:void 0};R!==void 0&&(R.prevDep=E),S!==void 0?S.nextDep=E:b.deps=E,_!==void 0?_.nextSub=E:m.subs=E}function c(m,b=m.sub){const v=m.dep,S=m.prevDep,R=m.nextDep,_=m.nextSub,E=m.prevSub;return R!==void 0?R.prevDep=S:b.depsTail=S,S!==void 0?S.nextDep=R:b.deps=R,_!==void 0?_.prevSub=E:v.subsTail=E,E!==void 0?E.nextSub=_:(v.subs=_)===void 0&&i(v),R}function d(m){let b=m.nextSub,v;e:do{const S=m.sub;let R=S.flags;if(R&60?R&12?R&4?!(R&48)&&p(m,S)?(S.flags=R|40,R&=1):R=0:S.flags=R&-9|32:R=0:S.flags=R|32,R&2&&s(S),R&1){const _=S.subs;if(_!==void 0){const E=(m=_).nextSub;E!==void 0&&(v={value:b,prev:v},b=E);continue}}if((m=b)!==void 0){b=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){b=m.nextSub;continue e}break}while(!0)}function h(m,b){let v,S=0,R=!1;e:do{const _=m.dep,E=_.flags;if(b.flags&16)R=!0;else if((E&17)===17){if(n(_)){const j=_.subs;j.nextSub!==void 0&&y(j),R=!0}}else if((E&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=_.deps,b=_,++S;continue}if(!R){const j=m.nextDep;if(j!==void 0){m=j;continue}}for(;S--;){const j=b.subs,z=j.nextSub!==void 0;if(z?(m=v.value,v=v.prev):m=j,R){if(n(b)){z&&y(j),b=m.sub;continue}R=!1}else b.flags&=-33;b=m.sub;const A=m.nextDep;if(A!==void 0){m=A;continue e}}return R}while(!0)}function y(m){do{const b=m.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&s(b))}while((m=m.nextSub)!==void 0)}function p(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function Dj(n,s,i){var d,h,y;const r=typeof n=="object",c=r?n:void 0;return{next:(d=r?n.next:n)==null?void 0:d.bind(c),error:(h=r?n.error:s)==null?void 0:h.bind(c),complete:(y=r?n.complete:i)==null?void 0:y.bind(c)}}const $d=[];let wc=0;const{link:nv,unlink:Uj,propagate:kj,checkDirty:j0,shallowPropagate:av}=zj({update(n){return n._update()},notify(n){$d[Wd++]=n,n.flags&=~We.Watching},unwatched(n){n.depsTail!==void 0&&(n.depsTail=void 0,n.flags=We.Mutable|We.Dirty,Bc(n))}});let yc=0,Wd=0,qn,eh=0;function R0(n){try{++eh,n()}finally{--eh||_0()}}function Bc(n){const s=n.depsTail;let i=s!==void 0?s.nextDep:n.deps;for(;i!==void 0;)i=Uj(i,n)}function _0(){if(!(eh>0)){for(;yc<Wd;){const n=$d[yc];$d[yc++]=void 0,n.notify()}yc=0,Wd=0}}function sv(n,s){const i=typeof n=="function",r=n,c={_snapshot:i?void 0:n,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?We.None:We.Mutable,get(){return qn!==void 0&&nv(c,qn,wc),c._snapshot},subscribe(d){const h=Dj(d),y={current:!1},p=Lj(()=>{var m;c.get(),y.current?(m=h.next)==null||m.call(h,c._snapshot):y.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(d){const h=qn,y=(s==null?void 0:s.compare)??Object.is;if(i)qn=c,++wc,c.depsTail=void 0;else if(d===void 0)return!1;i&&(c.flags=We.Mutable|We.RecursedCheck);try{const p=c._snapshot,m=typeof d=="function"?d(p):d===void 0&&i?r(p):d;return p===void 0||!y(p,m)?(c._snapshot=m,!0):!1}finally{qn=h,i&&(c.flags&=~We.RecursedCheck),Bc(c)}}};return i?(c.flags=We.Mutable|We.Dirty,c.get=function(){const d=c.flags;if(d&We.Dirty||d&We.Pending&&j0(c.deps,c)){if(c._update()){const h=c.subs;h!==void 0&&av(h)}}else d&We.Pending&&(c.flags=d&~We.Pending);return qn!==void 0&&nv(c,qn,wc),c._snapshot}):c.set=function(d){if(c._update(d)){const h=c.subs;h!==void 0&&(kj(h),av(h),_0())}},c}function Lj(n){const s=()=>{const r=qn;qn=i,++wc,i.depsTail=void 0,i.flags=We.Watching|We.RecursedCheck;try{return n()}finally{qn=r,i.flags&=~We.RecursedCheck,Bc(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:We.Watching|We.RecursedCheck,notify(){const r=this.flags;r&We.Dirty||r&We.Pending&&j0(this.deps,this)?s():this.flags=We.Watching},stop(){this.flags=We.None,this.depsTail=void 0,Bc(this)}};return s(),i}var pd={exports:{}},gd={},vd={exports:{}},bd={};/**
18
18
  * @license React
19
19
  * use-sync-external-store-shim.production.js
20
20
  *
@@ -38,7 +38,7 @@ var L1=Object.defineProperty;var jg=n=>{throw TypeError(n)};var B1=(n,s,i)=>s in
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var cv;function Pj(){if(cv)return Et;cv=1;var n=Vr();function s(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(p,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:p,containerInfo:m,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Et.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(s(299));return d(p,m,null,b)},Et.flushSync=function(p){var m=h.T,b=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=b,r.d.f()}},Et.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Et.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Et.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,R=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:R}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:S,fetchPriority:R,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Et.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=y(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Et.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Et.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=y(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Et.requestFormReset=function(p){r.d.r(p)},Et.unstable_batchedUpdates=function(p,m){return p(m)},Et.useFormState=function(p,m,b){return h.H.useFormState(p,m,b)},Et.useFormStatus=function(){return h.H.useHostTransitionStatus()},Et.version="19.2.6",Et}var uv;function A0(){if(uv)return xd.exports;uv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),xd.exports=Pj(),xd.exports}var Kj=A0();function Xj(n,s){const i=cn(),r=NS(s),{activeProps:c,inactiveProps:d,activeOptions:h,to:y,preload:p,preloadDelay:m,preloadIntentProximity:b,hashScrollIntoView:v,replace:S,startTransition:R,resetScroll:_,viewTransition:E,children:j,target:z,disabled:A,style:B,className:N,onClick:Q,onBlur:k,onFocus:D,onMouseEnter:O,onMouseLeave:P,onTouchStart:$,ignoreBlocker:W,params:Z,search:te,hash:ee,state:he,mask:L,reloadDocument:K,unsafeRelative:ue,from:Me,_fromLocation:ne,...C}=n,F=x0(),ae=Y.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),se=Zt(i.stores.location,Qe=>Qe,(Qe,vt)=>Qe.href===vt.href),le=Y.useMemo(()=>{const Qe={_fromLocation:se,...ae};return i.buildLocation(Qe)},[i,se,ae]),me=le.maskedLocation?le.maskedLocation.publicHref:le.publicHref,Re=le.maskedLocation?le.maskedLocation.external:le.external,He=Y.useMemo(()=>Wj(me,Re,i.history,A),[A,Re,me,i.history]),ge=Y.useMemo(()=>{if(He!=null&&He.external)return Dc(He.href,i.protocolAllowlist)?void 0:He.href;if(!e2(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Dc(y,i.protocolAllowlist)?void 0:y}catch{}},[y,He,i.protocolAllowlist]),un=Y.useMemo(()=>{if(ge)return!1;if(h!=null&&h.exact){if(!PS(se.pathname,le.pathname,i.basepath))return!1}else{const Qe=Uc(se.pathname,i.basepath),vt=Uc(le.pathname,i.basepath);if(!(Qe.startsWith(vt)&&(Qe.length===vt.length||Qe[vt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!tl(se.search,le.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?F&&se.hash===le.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,se,ge,F,le.hash,le.pathname,le.search,i.basepath]),kt=un?Ys(c,{})??Zj:Sd,Jt=un?Sd:Ys(d,{})??Sd,Kn=[N,kt.className,Jt.className].filter(Boolean).join(" "),Ct=(B||kt.style||Jt.style)&&{...B,...kt.style,...Jt.style},[Ei,dl]=Y.useState(!1),Pr=Y.useRef(!1),Xn=n.reloadDocument||ge?!1:p??i.options.defaultPreload,bs=m??i.options.defaultPreloadDelay??0,jn=Y.useCallback(()=>{i.preloadRoute({...ae,_builtLocation:le}).catch(Qe=>{console.warn(Qe),console.warn(Tj)})},[i,ae,le]);TS(r,Y.useCallback(Qe=>{Qe!=null&&Qe.isIntersecting&&jn()},[jn]),$j,{disabled:!!A||Xn!=="viewport"}),Y.useEffect(()=>{Pr.current||!A&&Xn==="render"&&(jn(),Pr.current=!0)},[A,jn,Xn]);const wi=Qe=>{const vt=Qe.currentTarget.getAttribute("target"),zn=z!==void 0?z:vt;if(!A&&!t2(Qe)&&!Qe.defaultPrevented&&(!zn||zn==="_self")&&Qe.button===0){Qe.preventDefault(),Kj.flushSync(()=>{dl(!0)});const hl=i.subscribe("onResolved",()=>{hl(),dl(!1)});i.navigate({...ae,replace:S,resetScroll:_,hashScrollIntoView:v,startTransition:R,viewTransition:E,ignoreBlocker:W})}};if(ge)return{...C,ref:r,href:ge,...j&&{children:j},...z&&{target:z},...A&&{disabled:A},...B&&{style:B},...N&&{className:N},...Q&&{onClick:Q},...k&&{onBlur:k},...D&&{onFocus:D},...O&&{onMouseEnter:O},...P&&{onMouseLeave:P},...$&&{onTouchStart:$}};const Kr=Qe=>{if(A||Xn!=="intent")return;if(!bs){jn();return}const vt=Qe.currentTarget;if(jr.has(vt))return;const zn=setTimeout(()=>{jr.delete(vt),jn()},bs);jr.set(vt,zn)},Kc=Qe=>{A||Xn!=="intent"||jn()},_t=Qe=>{if(A||!Xn||!bs)return;const vt=Qe.currentTarget,zn=jr.get(vt);zn&&(clearTimeout(zn),jr.delete(vt))};return{...C,...kt,...Jt,href:He==null?void 0:He.href,ref:r,onClick:$l([Q,wi]),onBlur:$l([k,_t]),onFocus:$l([D,Kr]),onMouseEnter:$l([O,Kr]),onMouseLeave:$l([P,_t]),onTouchStart:$l([$,Kc]),disabled:!!A,target:z,...Ct&&{style:Ct},...Kn&&{className:Kn},...A&&Jj,...un&&Fj,...F&&Ei&&Ij}}var Sd={},Zj={className:"active"},Jj={role:"link","aria-disabled":!0},Fj={"data-status":"active","aria-current":"page"},Ij={"data-transitioning":"transitioning"},jr=new WeakMap,$j={rootMargin:"100px"},$l=n=>s=>{for(const i of n)if(i){if(s.defaultPrevented)return;i(s)}};function Wj(n,s,i,r){if(!r)return s?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function e2(n){if(typeof n!="string")return!1;const s=n.charCodeAt(0);return s===47?n.charCodeAt(1)!==47:s===46}var bi=Y.forwardRef((n,s)=>{const{_asChild:i,...r}=n,{type:c,...d}=Xj(r,s),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:y,...p}=d;return Y.createElement("a",p,h)}return Y.createElement(i,d,h)});function t2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var n2=class extends b0{constructor(n){super(n),this.useMatch=s=>il({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>M0({...s,from:this.id}),this.useSearch=s=>N0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>T0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>w0({...s,from:this.id}),this.useLoaderData=s=>E0({...s,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Or.forwardRef((s,i)=>f.jsx(bi,{ref:i,from:this.fullPath,...s}))}};function ja(n){return new n2(n)}var a2=class extends Nj{constructor(n){super(n),this.useMatch=s=>il({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>M0({...s,from:this.id}),this.useSearch=s=>N0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>T0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>w0({...s,from:this.id}),this.useLoaderData=s=>E0({...s,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Or.forwardRef((s,i)=>f.jsx(bi,{ref:i,from:this.fullPath,...s}))}};function s2(n){return new a2(n)}function l2(n){const s=cn(),i=`not-found-${Zt(s.stores.location,r=>r.pathname)}-${Zt(s.stores.status,r=>r)}`;return f.jsx(ph,{getResetKey:()=>i,onCatch:(r,c)=>{var d;if(Nt(r))(d=n.onCatch)==null||d.call(n,r,c);else throw r},errorComponent:({error:r})=>{var c;if(Nt(r))return(c=n.fallback)==null?void 0:c.call(n,r);throw r},children:n.children})}function i2(){return f.jsx("p",{children:"Not Found"})}function ni(n){return f.jsx(f.Fragment,{children:n.children})}function O0(n,s,i){return s.options.notFoundComponent?f.jsx(s.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?f.jsx(n.options.defaultNotFoundComponent,{...i}):f.jsx(i2,{})}function r2(n){return null}function o2(){return r2(cn()),null}var z0=Y.memo(function({matchId:s}){const i=cn(),r=i.stores.matchStores.get(s);r||ba();const c=Zt(i.stores.loadedAt,h=>h),d=Zt(r,h=>h);return f.jsx(c2,{router:i,matchId:s,resetKey:c,matchState:Y.useMemo(()=>{var p;const h=d.routeId,y=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:y}},[d._displayPending,d.routeId,d.ssr,i.routesById])})});function c2({router:n,matchId:s,resetKey:i,matchState:r}){var _,E;const c=n.routesById[r.routeId],d=c.options.pendingComponent??n.options.defaultPendingComponent,h=d?f.jsx(d,{}):null,y=c.options.errorComponent??n.options.defaultErrorComponent,p=c.options.onCatch??n.options.defaultOnCatch,m=c.isRoot?c.options.notFoundComponent??((_=n.options.notFoundRoute)==null?void 0:_.options.component):c.options.notFoundComponent,b=r.ssr===!1||r.ssr==="data-only",v=(!c.isRoot||c.options.wrapInSuspense||b)&&(c.options.wrapInSuspense??d??(((E=c.options.errorComponent)==null?void 0:E.preload)||b))?Y.Suspense:ni,S=y?ph:ni,R=m?l2:ni;return f.jsxs(c.isRoot?c.options.shellComponent??ni:ni,{children:[f.jsx(Yc.Provider,{value:s,children:f.jsx(v,{fallback:h,children:f.jsx(S,{getResetKey:()=>i,errorComponent:y||gh,onCatch:(j,z)=>{if(Nt(j))throw j.routeId??(j.routeId=r.routeId),j;p==null||p(j,z)},children:f.jsx(R,{fallback:j=>{if(j.routeId??(j.routeId=r.routeId),!m||j.routeId&&j.routeId!==r.routeId||!j.routeId&&!c.isRoot)throw j;return Y.createElement(m,j)},children:b||r._displayPending?f.jsx(Mj,{fallback:h,children:f.jsx(fv,{matchId:s})}):f.jsx(fv,{matchId:s})})})})}),r.parentRouteId===nl?f.jsxs(f.Fragment,{children:[f.jsx(u2,{resetKey:i}),n.options.scrollRestoration&&l0?f.jsx(o2,{}):null]}):null]})}function u2({resetKey:n}){const s=cn(),i=Y.useRef(void 0);return Cr(()=>{const r=s.latestLocation.href;(i.current===void 0||i.current!==r)&&(s.emit({type:"onRendered",...ai(s.stores.location.get(),s.stores.resolvedLocation.get())}),i.current=r)},[s.latestLocation.state.__TSR_key,n,s]),null}var fv=Y.memo(function({matchId:s}){const i=cn(),r=(b,v)=>{var S;return((S=i.getMatch(b.id))==null?void 0:S._nonReactive[v])??b._nonReactive[v]},c=i.stores.matchStores.get(s);c||ba();const d=Zt(c,b=>b),h=d.routeId,y=i.routesById[h],p=Y.useMemo(()=>{var v;const b=(v=i.routesById[h].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:v({routeId:h,loaderDeps:d.loaderDeps,params:d._strictParams,search:d._strictSearch});return b?JSON.stringify(b):void 0},[h,d.loaderDeps,d._strictParams,d._strictSearch,i.options.defaultRemountDeps,i.routesById]),m=Y.useMemo(()=>{const b=y.options.component??i.options.defaultComponent;return b?f.jsx(b,{},p):f.jsx(D0,{})},[p,y.options.component,i.options.defaultComponent]);if(d._displayPending)throw r(d,"displayPendingPromise");if(d._forcePending)throw r(d,"minPendingPromise");if(d.status==="pending"){const b=y.options.pendingMinMs??i.options.defaultPendingMinMs;if(b){const v=i.getMatch(d.id);if(v&&!v._nonReactive.minPendingPromise){const S=vi();v._nonReactive.minPendingPromise=S,setTimeout(()=>{S.resolve(),v._nonReactive.minPendingPromise=void 0},b)}}throw r(d,"loadPromise")}if(d.status==="notFound")return Nt(d.error)||ba(),O0(i,y,d.error);if(d.status==="redirected")throw Kt(d.error)||ba(),r(d,"loadPromise");if(d.status==="error")throw d.error;return m}),D0=Y.memo(function(){const s=cn(),i=Y.useContext(Yc);let r,c=!1,d;{const m=i?s.stores.matchStores.get(i):void 0;[r,c]=Zt(m,b=>[b==null?void 0:b.routeId,(b==null?void 0:b.globalNotFound)??!1]),d=Zt(s.stores.matchesId,b=>b[b.findIndex(v=>v===i)+1])}const h=r?s.routesById[r]:void 0,y=s.options.defaultPendingComponent?f.jsx(s.options.defaultPendingComponent,{}):null;if(c)return h||ba(),O0(s,h,void 0);if(!d)return null;const p=f.jsx(z0,{matchId:d});return r===nl?f.jsx(Y.Suspense,{fallback:y,children:p}):p});function f2(){const n=cn(),s=Y.useRef({router:n,mounted:!1}),[i,r]=Y.useState(!1),c=Zt(n.stores.isLoading,v=>v),d=Zt(n.stores.hasPending,v=>v),h=cd(c),y=c||i||d,p=cd(y),m=c||d,b=cd(m);return n.startTransition=v=>{r(!0),Y.startTransition(()=>{v(),r(!1)})},Y.useEffect(()=>{const v=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return va(n.latestLocation.publicHref)!==va(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{v()}},[n,n.history]),Cr(()=>{if(typeof window<"u"&&n.ssr||s.current.router===n&&s.current.mounted)return;s.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),Cr(()=>{h&&!c&&n.emit({type:"onLoad",...ai(n.stores.location.get(),n.stores.resolvedLocation.get())})},[h,n,c]),Cr(()=>{b&&!m&&n.emit({type:"onBeforeRouteMount",...ai(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,b,n]),Cr(()=>{if(p&&!y){const v=ai(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),R0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,p,n]),null}function d2(){const n=cn(),s=n.routesById[nl].options.pendingComponent??n.options.defaultPendingComponent,i=s?f.jsx(s,{}):null,r=f.jsxs(typeof document<"u"&&n.ssr?ni:Y.Suspense,{fallback:i,children:[f.jsx(f2,{}),f.jsx(h2,{})]});return n.options.InnerWrap?f.jsx(n.options.InnerWrap,{children:r}):r}function h2(){const n=cn(),s=Zt(n.stores.firstId,c=>c),i=Zt(n.stores.loadedAt,c=>c),r=s?f.jsx(z0,{matchId:s}):null;return f.jsx(Yc.Provider,{value:s,children:n.options.disableGlobalCatchBoundary?r:f.jsx(ph,{getResetKey:()=>i,errorComponent:gh,onCatch:void 0,children:r})})}var m2=n=>({createMutableStore:sv,createReadonlyStore:sv,batch:R0}),y2=n=>new p2(n),p2=class extends hj{constructor(n){super(n,m2)}};function g2({router:n,children:s,...i}){r0(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=f.jsx(S0.Provider,{value:n,children:s});return n.options.Wrap?f.jsx(n.options.Wrap,{children:r}):r}function v2({router:n,...s}){return f.jsx(g2,{router:n,...s,children:f.jsx(d2,{})})}function b2(n){const s=cn({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||s,r=Y.useRef(void 0);return Zt(i.stores.__store,c=>{if(n!=null&&n.select){if(n.structuralSharing??i.options.defaultStructuralSharing){const d=fs(r.current,n.select(c));return r.current=d,d}return n.select(c)}return c})}var jd={exports:{}},Rr={},Rd={exports:{}},_d={};/**
41
+ */var cv;function Kj(){if(cv)return Et;cv=1;var n=Vr();function s(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(p,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:p,containerInfo:m,implementation:b}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Et.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Et.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(s(299));return d(p,m,null,b)},Et.flushSync=function(p){var m=h.T,b=r.p;try{if(h.T=null,r.p=2,p)return p()}finally{h.T=m,r.p=b,r.d.f()}},Et.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Et.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Et.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,R=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:R}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:S,fetchPriority:R,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Et.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=y(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Et.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=y(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Et.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=y(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Et.requestFormReset=function(p){r.d.r(p)},Et.unstable_batchedUpdates=function(p,m){return p(m)},Et.useFormState=function(p,m,b){return h.H.useFormState(p,m,b)},Et.useFormStatus=function(){return h.H.useHostTransitionStatus()},Et.version="19.2.6",Et}var uv;function A0(){if(uv)return xd.exports;uv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),xd.exports=Kj(),xd.exports}var Pj=A0();function Xj(n,s){const i=cn(),r=NS(s),{activeProps:c,inactiveProps:d,activeOptions:h,to:y,preload:p,preloadDelay:m,preloadIntentProximity:b,hashScrollIntoView:v,replace:S,startTransition:R,resetScroll:_,viewTransition:E,children:j,target:z,disabled:A,style:B,className:N,onClick:Q,onBlur:k,onFocus:D,onMouseEnter:O,onMouseLeave:K,onTouchStart:$,ignoreBlocker:W,params:Z,search:te,hash:ee,state:he,mask:L,reloadDocument:P,unsafeRelative:ue,from:Me,_fromLocation:ne,...C}=n,F=x0(),ae=Y.useMemo(()=>n,[i,n.from,n._fromLocation,n.hash,n.to,n.search,n.params,n.state,n.mask,n.unsafeRelative]),se=Zt(i.stores.location,Qe=>Qe,(Qe,vt)=>Qe.href===vt.href),le=Y.useMemo(()=>{const Qe={_fromLocation:se,...ae};return i.buildLocation(Qe)},[i,se,ae]),me=le.maskedLocation?le.maskedLocation.publicHref:le.publicHref,Re=le.maskedLocation?le.maskedLocation.external:le.external,He=Y.useMemo(()=>Wj(me,Re,i.history,A),[A,Re,me,i.history]),ge=Y.useMemo(()=>{if(He!=null&&He.external)return Dc(He.href,i.protocolAllowlist)?void 0:He.href;if(!e2(y)&&!(typeof y!="string"||y.indexOf(":")===-1))try{return new URL(y),Dc(y,i.protocolAllowlist)?void 0:y}catch{}},[y,He,i.protocolAllowlist]),un=Y.useMemo(()=>{if(ge)return!1;if(h!=null&&h.exact){if(!KS(se.pathname,le.pathname,i.basepath))return!1}else{const Qe=Uc(se.pathname,i.basepath),vt=Uc(le.pathname,i.basepath);if(!(Qe.startsWith(vt)&&(Qe.length===vt.length||Qe[vt.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!tl(se.search,le.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?F&&se.hash===le.hash:!0},[h==null?void 0:h.exact,h==null?void 0:h.explicitUndefined,h==null?void 0:h.includeHash,h==null?void 0:h.includeSearch,se,ge,F,le.hash,le.pathname,le.search,i.basepath]),kt=un?Ys(c,{})??Zj:Sd,Jt=un?Sd:Ys(d,{})??Sd,Pn=[N,kt.className,Jt.className].filter(Boolean).join(" "),Ct=(B||kt.style||Jt.style)&&{...B,...kt.style,...Jt.style},[Ei,dl]=Y.useState(!1),Kr=Y.useRef(!1),Xn=n.reloadDocument||ge?!1:p??i.options.defaultPreload,bs=m??i.options.defaultPreloadDelay??0,jn=Y.useCallback(()=>{i.preloadRoute({...ae,_builtLocation:le}).catch(Qe=>{console.warn(Qe),console.warn(Tj)})},[i,ae,le]);TS(r,Y.useCallback(Qe=>{Qe!=null&&Qe.isIntersecting&&jn()},[jn]),$j,{disabled:!!A||Xn!=="viewport"}),Y.useEffect(()=>{Kr.current||!A&&Xn==="render"&&(jn(),Kr.current=!0)},[A,jn,Xn]);const wi=Qe=>{const vt=Qe.currentTarget.getAttribute("target"),zn=z!==void 0?z:vt;if(!A&&!t2(Qe)&&!Qe.defaultPrevented&&(!zn||zn==="_self")&&Qe.button===0){Qe.preventDefault(),Pj.flushSync(()=>{dl(!0)});const hl=i.subscribe("onResolved",()=>{hl(),dl(!1)});i.navigate({...ae,replace:S,resetScroll:_,hashScrollIntoView:v,startTransition:R,viewTransition:E,ignoreBlocker:W})}};if(ge)return{...C,ref:r,href:ge,...j&&{children:j},...z&&{target:z},...A&&{disabled:A},...B&&{style:B},...N&&{className:N},...Q&&{onClick:Q},...k&&{onBlur:k},...D&&{onFocus:D},...O&&{onMouseEnter:O},...K&&{onMouseLeave:K},...$&&{onTouchStart:$}};const Pr=Qe=>{if(A||Xn!=="intent")return;if(!bs){jn();return}const vt=Qe.currentTarget;if(jr.has(vt))return;const zn=setTimeout(()=>{jr.delete(vt),jn()},bs);jr.set(vt,zn)},Pc=Qe=>{A||Xn!=="intent"||jn()},_t=Qe=>{if(A||!Xn||!bs)return;const vt=Qe.currentTarget,zn=jr.get(vt);zn&&(clearTimeout(zn),jr.delete(vt))};return{...C,...kt,...Jt,href:He==null?void 0:He.href,ref:r,onClick:$l([Q,wi]),onBlur:$l([k,_t]),onFocus:$l([D,Pr]),onMouseEnter:$l([O,Pr]),onMouseLeave:$l([K,_t]),onTouchStart:$l([$,Pc]),disabled:!!A,target:z,...Ct&&{style:Ct},...Pn&&{className:Pn},...A&&Jj,...un&&Fj,...F&&Ei&&Ij}}var Sd={},Zj={className:"active"},Jj={role:"link","aria-disabled":!0},Fj={"data-status":"active","aria-current":"page"},Ij={"data-transitioning":"transitioning"},jr=new WeakMap,$j={rootMargin:"100px"},$l=n=>s=>{for(const i of n)if(i){if(s.defaultPrevented)return;i(s)}};function Wj(n,s,i,r){if(!r)return s?{href:n,external:!0}:{href:i.createHref(n)||"/",external:!1}}function e2(n){if(typeof n!="string")return!1;const s=n.charCodeAt(0);return s===47?n.charCodeAt(1)!==47:s===46}var bi=Y.forwardRef((n,s)=>{const{_asChild:i,...r}=n,{type:c,...d}=Xj(r,s),h=typeof r.children=="function"?r.children({isActive:d["data-status"]==="active"}):r.children;if(!i){const{disabled:y,...p}=d;return Y.createElement("a",p,h)}return Y.createElement(i,d,h)});function t2(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}var n2=class extends b0{constructor(n){super(n),this.useMatch=s=>il({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>M0({...s,from:this.id}),this.useSearch=s=>N0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>T0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>w0({...s,from:this.id}),this.useLoaderData=s=>E0({...s,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Or.forwardRef((s,i)=>f.jsx(bi,{ref:i,from:this.fullPath,...s}))}};function ja(n){return new n2(n)}var a2=class extends Nj{constructor(n){super(n),this.useMatch=s=>il({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>M0({...s,from:this.id}),this.useSearch=s=>N0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>T0({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>w0({...s,from:this.id}),this.useLoaderData=s=>E0({...s,from:this.id}),this.useNavigate=()=>C0({from:this.fullPath}),this.Link=Or.forwardRef((s,i)=>f.jsx(bi,{ref:i,from:this.fullPath,...s}))}};function s2(n){return new a2(n)}function l2(n){const s=cn(),i=`not-found-${Zt(s.stores.location,r=>r.pathname)}-${Zt(s.stores.status,r=>r)}`;return f.jsx(ph,{getResetKey:()=>i,onCatch:(r,c)=>{var d;if(Nt(r))(d=n.onCatch)==null||d.call(n,r,c);else throw r},errorComponent:({error:r})=>{var c;if(Nt(r))return(c=n.fallback)==null?void 0:c.call(n,r);throw r},children:n.children})}function i2(){return f.jsx("p",{children:"Not Found"})}function ni(n){return f.jsx(f.Fragment,{children:n.children})}function O0(n,s,i){return s.options.notFoundComponent?f.jsx(s.options.notFoundComponent,{...i}):n.options.defaultNotFoundComponent?f.jsx(n.options.defaultNotFoundComponent,{...i}):f.jsx(i2,{})}function r2(n){return null}function o2(){return r2(cn()),null}var z0=Y.memo(function({matchId:s}){const i=cn(),r=i.stores.matchStores.get(s);r||ba();const c=Zt(i.stores.loadedAt,h=>h),d=Zt(r,h=>h);return f.jsx(c2,{router:i,matchId:s,resetKey:c,matchState:Y.useMemo(()=>{var p;const h=d.routeId,y=(p=i.routesById[h].parentRoute)==null?void 0:p.id;return{routeId:h,ssr:d.ssr,_displayPending:d._displayPending,parentRouteId:y}},[d._displayPending,d.routeId,d.ssr,i.routesById])})});function c2({router:n,matchId:s,resetKey:i,matchState:r}){var _,E;const c=n.routesById[r.routeId],d=c.options.pendingComponent??n.options.defaultPendingComponent,h=d?f.jsx(d,{}):null,y=c.options.errorComponent??n.options.defaultErrorComponent,p=c.options.onCatch??n.options.defaultOnCatch,m=c.isRoot?c.options.notFoundComponent??((_=n.options.notFoundRoute)==null?void 0:_.options.component):c.options.notFoundComponent,b=r.ssr===!1||r.ssr==="data-only",v=(!c.isRoot||c.options.wrapInSuspense||b)&&(c.options.wrapInSuspense??d??(((E=c.options.errorComponent)==null?void 0:E.preload)||b))?Y.Suspense:ni,S=y?ph:ni,R=m?l2:ni;return f.jsxs(c.isRoot?c.options.shellComponent??ni:ni,{children:[f.jsx(Yc.Provider,{value:s,children:f.jsx(v,{fallback:h,children:f.jsx(S,{getResetKey:()=>i,errorComponent:y||gh,onCatch:(j,z)=>{if(Nt(j))throw j.routeId??(j.routeId=r.routeId),j;p==null||p(j,z)},children:f.jsx(R,{fallback:j=>{if(j.routeId??(j.routeId=r.routeId),!m||j.routeId&&j.routeId!==r.routeId||!j.routeId&&!c.isRoot)throw j;return Y.createElement(m,j)},children:b||r._displayPending?f.jsx(Mj,{fallback:h,children:f.jsx(fv,{matchId:s})}):f.jsx(fv,{matchId:s})})})})}),r.parentRouteId===nl?f.jsxs(f.Fragment,{children:[f.jsx(u2,{resetKey:i}),n.options.scrollRestoration&&l0?f.jsx(o2,{}):null]}):null]})}function u2({resetKey:n}){const s=cn(),i=Y.useRef(void 0);return Cr(()=>{const r=s.latestLocation.href;(i.current===void 0||i.current!==r)&&(s.emit({type:"onRendered",...ai(s.stores.location.get(),s.stores.resolvedLocation.get())}),i.current=r)},[s.latestLocation.state.__TSR_key,n,s]),null}var fv=Y.memo(function({matchId:s}){const i=cn(),r=(b,v)=>{var S;return((S=i.getMatch(b.id))==null?void 0:S._nonReactive[v])??b._nonReactive[v]},c=i.stores.matchStores.get(s);c||ba();const d=Zt(c,b=>b),h=d.routeId,y=i.routesById[h],p=Y.useMemo(()=>{var v;const b=(v=i.routesById[h].options.remountDeps??i.options.defaultRemountDeps)==null?void 0:v({routeId:h,loaderDeps:d.loaderDeps,params:d._strictParams,search:d._strictSearch});return b?JSON.stringify(b):void 0},[h,d.loaderDeps,d._strictParams,d._strictSearch,i.options.defaultRemountDeps,i.routesById]),m=Y.useMemo(()=>{const b=y.options.component??i.options.defaultComponent;return b?f.jsx(b,{},p):f.jsx(D0,{})},[p,y.options.component,i.options.defaultComponent]);if(d._displayPending)throw r(d,"displayPendingPromise");if(d._forcePending)throw r(d,"minPendingPromise");if(d.status==="pending"){const b=y.options.pendingMinMs??i.options.defaultPendingMinMs;if(b){const v=i.getMatch(d.id);if(v&&!v._nonReactive.minPendingPromise){const S=vi();v._nonReactive.minPendingPromise=S,setTimeout(()=>{S.resolve(),v._nonReactive.minPendingPromise=void 0},b)}}throw r(d,"loadPromise")}if(d.status==="notFound")return Nt(d.error)||ba(),O0(i,y,d.error);if(d.status==="redirected")throw Pt(d.error)||ba(),r(d,"loadPromise");if(d.status==="error")throw d.error;return m}),D0=Y.memo(function(){const s=cn(),i=Y.useContext(Yc);let r,c=!1,d;{const m=i?s.stores.matchStores.get(i):void 0;[r,c]=Zt(m,b=>[b==null?void 0:b.routeId,(b==null?void 0:b.globalNotFound)??!1]),d=Zt(s.stores.matchesId,b=>b[b.findIndex(v=>v===i)+1])}const h=r?s.routesById[r]:void 0,y=s.options.defaultPendingComponent?f.jsx(s.options.defaultPendingComponent,{}):null;if(c)return h||ba(),O0(s,h,void 0);if(!d)return null;const p=f.jsx(z0,{matchId:d});return r===nl?f.jsx(Y.Suspense,{fallback:y,children:p}):p});function f2(){const n=cn(),s=Y.useRef({router:n,mounted:!1}),[i,r]=Y.useState(!1),c=Zt(n.stores.isLoading,v=>v),d=Zt(n.stores.hasPending,v=>v),h=cd(c),y=c||i||d,p=cd(y),m=c||d,b=cd(m);return n.startTransition=v=>{r(!0),Y.startTransition(()=>{v(),r(!1)})},Y.useEffect(()=>{const v=n.history.subscribe(n.load),S=n.buildLocation({to:n.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return va(n.latestLocation.publicHref)!==va(S.publicHref)&&n.commitLocation({...S,replace:!0}),()=>{v()}},[n,n.history]),Cr(()=>{if(typeof window<"u"&&n.ssr||s.current.router===n&&s.current.mounted)return;s.current={router:n,mounted:!0},(async()=>{try{await n.load()}catch(S){console.error(S)}})()},[n]),Cr(()=>{h&&!c&&n.emit({type:"onLoad",...ai(n.stores.location.get(),n.stores.resolvedLocation.get())})},[h,n,c]),Cr(()=>{b&&!m&&n.emit({type:"onBeforeRouteMount",...ai(n.stores.location.get(),n.stores.resolvedLocation.get())})},[m,b,n]),Cr(()=>{if(p&&!y){const v=ai(n.stores.location.get(),n.stores.resolvedLocation.get());n.emit({type:"onResolved",...v}),R0(()=>{n.stores.status.set("idle"),n.stores.resolvedLocation.set(n.stores.location.get())})}},[y,p,n]),null}function d2(){const n=cn(),s=n.routesById[nl].options.pendingComponent??n.options.defaultPendingComponent,i=s?f.jsx(s,{}):null,r=f.jsxs(typeof document<"u"&&n.ssr?ni:Y.Suspense,{fallback:i,children:[f.jsx(f2,{}),f.jsx(h2,{})]});return n.options.InnerWrap?f.jsx(n.options.InnerWrap,{children:r}):r}function h2(){const n=cn(),s=Zt(n.stores.firstId,c=>c),i=Zt(n.stores.loadedAt,c=>c),r=s?f.jsx(z0,{matchId:s}):null;return f.jsx(Yc.Provider,{value:s,children:n.options.disableGlobalCatchBoundary?r:f.jsx(ph,{getResetKey:()=>i,errorComponent:gh,onCatch:void 0,children:r})})}var m2=n=>({createMutableStore:sv,createReadonlyStore:sv,batch:R0}),y2=n=>new p2(n),p2=class extends hj{constructor(n){super(n,m2)}};function g2({router:n,children:s,...i}){r0(i)&&n.update({...n.options,...i,context:{...n.options.context,...i.context}});const r=f.jsx(S0.Provider,{value:n,children:s});return n.options.Wrap?f.jsx(n.options.Wrap,{children:r}):r}function v2({router:n,...s}){return f.jsx(g2,{router:n,...s,children:f.jsx(d2,{})})}function b2(n){const s=cn({warn:(n==null?void 0:n.router)===void 0}),i=(n==null?void 0:n.router)||s,r=Y.useRef(void 0);return Zt(i.stores.__store,c=>{if(n!=null&&n.select){if(n.structuralSharing??i.options.defaultStructuralSharing){const d=fs(r.current,n.select(c));return r.current=d,d}return n.select(c)}return c})}var jd={exports:{}},Rr={},Rd={exports:{}},_d={};/**
42
42
  * @license React
43
43
  * scheduler.production.js
44
44
  *
@@ -46,7 +46,7 @@ var L1=Object.defineProperty;var jg=n=>{throw TypeError(n)};var B1=(n,s,i)=>s in
46
46
  *
47
47
  * This source code is licensed under the MIT license found in the
48
48
  * LICENSE file in the root directory of this source tree.
49
- */var dv;function x2(){return dv||(dv=1,(function(n){function s(L,K){var ue=L.length;L.push(K);e:for(;0<ue;){var Me=ue-1>>>1,ne=L[Me];if(0<c(ne,K))L[Me]=K,L[ue]=ne,ue=Me;else break e}}function i(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var K=L[0],ue=L.pop();if(ue!==K){L[0]=ue;e:for(var Me=0,ne=L.length,C=ne>>>1;Me<C;){var F=2*(Me+1)-1,ae=L[F],se=F+1,le=L[se];if(0>c(ae,ue))se<ne&&0>c(le,ae)?(L[Me]=le,L[se]=ue,Me=se):(L[Me]=ae,L[F]=ue,Me=F);else if(se<ne&&0>c(le,ue))L[Me]=le,L[se]=ue,Me=se;else break e}}return K}function c(L,K){var ue=L.sortIndex-K.sortIndex;return ue!==0?ue:L.id-K.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,y=h.now();n.unstable_now=function(){return h.now()-y}}var p=[],m=[],b=1,v=null,S=3,R=!1,_=!1,E=!1,j=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var K=i(m);K!==null;){if(K.callback===null)r(m);else if(K.startTime<=L)r(m),K.sortIndex=K.expirationTime,s(p,K);else break;K=i(m)}}function Q(L){if(E=!1,N(L),!_)if(i(p)!==null)_=!0,k||(k=!0,Z());else{var K=i(m);K!==null&&he(Q,K.startTime-L)}}var k=!1,D=-1,O=5,P=-1;function $(){return j?!0:!(n.unstable_now()-P<O)}function W(){if(j=!1,k){var L=n.unstable_now();P=L;var K=!0;try{e:{_=!1,E&&(E=!1,A(D),D=-1),R=!0;var ue=S;try{t:{for(N(L),v=i(p);v!==null&&!(v.expirationTime>L&&$());){var Me=v.callback;if(typeof Me=="function"){v.callback=null,S=v.priorityLevel;var ne=Me(v.expirationTime<=L);if(L=n.unstable_now(),typeof ne=="function"){v.callback=ne,N(L),K=!0;break t}v===i(p)&&r(p),N(L)}else r(p);v=i(p)}if(v!==null)K=!0;else{var C=i(m);C!==null&&he(Q,C.startTime-L),K=!1}}break e}finally{v=null,S=ue,R=!1}K=void 0}}finally{K?Z():k=!1}}}var Z;if(typeof B=="function")Z=function(){B(W)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ee=te.port2;te.port1.onmessage=W,Z=function(){ee.postMessage(null)}}else Z=function(){z(W,0)};function he(L,K){D=z(function(){L(n.unstable_now())},K)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var K=3;break;default:K=S}var ue=S;S=K;try{return L()}finally{S=ue}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ue=S;S=L;try{return K()}finally{S=ue}},n.unstable_scheduleCallback=function(L,K,ue){var Me=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Me+ue:Me):ue=Me,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ue+ne,L={id:b++,callback:K,priorityLevel:L,startTime:ue,expirationTime:ne,sortIndex:-1},ue>Me?(L.sortIndex=ue,s(m,L),i(p)===null&&L===i(m)&&(E?(A(D),D=-1):E=!0,he(Q,ue-Me))):(L.sortIndex=ne,s(p,L),_||R||(_=!0,k||(k=!0,Z()))),L},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(L){var K=S;return function(){var ue=S;S=K;try{return L.apply(this,arguments)}finally{S=ue}}}})(_d)),_d}var hv;function S2(){return hv||(hv=1,Rd.exports=x2()),Rd.exports}/**
49
+ */var dv;function x2(){return dv||(dv=1,(function(n){function s(L,P){var ue=L.length;L.push(P);e:for(;0<ue;){var Me=ue-1>>>1,ne=L[Me];if(0<c(ne,P))L[Me]=P,L[ue]=ne,ue=Me;else break e}}function i(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var P=L[0],ue=L.pop();if(ue!==P){L[0]=ue;e:for(var Me=0,ne=L.length,C=ne>>>1;Me<C;){var F=2*(Me+1)-1,ae=L[F],se=F+1,le=L[se];if(0>c(ae,ue))se<ne&&0>c(le,ae)?(L[Me]=le,L[se]=ue,Me=se):(L[Me]=ae,L[F]=ue,Me=F);else if(se<ne&&0>c(le,ue))L[Me]=le,L[se]=ue,Me=se;else break e}}return P}function c(L,P){var ue=L.sortIndex-P.sortIndex;return ue!==0?ue:L.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,y=h.now();n.unstable_now=function(){return h.now()-y}}var p=[],m=[],b=1,v=null,S=3,R=!1,_=!1,E=!1,j=!1,z=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function N(L){for(var P=i(m);P!==null;){if(P.callback===null)r(m);else if(P.startTime<=L)r(m),P.sortIndex=P.expirationTime,s(p,P);else break;P=i(m)}}function Q(L){if(E=!1,N(L),!_)if(i(p)!==null)_=!0,k||(k=!0,Z());else{var P=i(m);P!==null&&he(Q,P.startTime-L)}}var k=!1,D=-1,O=5,K=-1;function $(){return j?!0:!(n.unstable_now()-K<O)}function W(){if(j=!1,k){var L=n.unstable_now();K=L;var P=!0;try{e:{_=!1,E&&(E=!1,A(D),D=-1),R=!0;var ue=S;try{t:{for(N(L),v=i(p);v!==null&&!(v.expirationTime>L&&$());){var Me=v.callback;if(typeof Me=="function"){v.callback=null,S=v.priorityLevel;var ne=Me(v.expirationTime<=L);if(L=n.unstable_now(),typeof ne=="function"){v.callback=ne,N(L),P=!0;break t}v===i(p)&&r(p),N(L)}else r(p);v=i(p)}if(v!==null)P=!0;else{var C=i(m);C!==null&&he(Q,C.startTime-L),P=!1}}break e}finally{v=null,S=ue,R=!1}P=void 0}}finally{P?Z():k=!1}}}var Z;if(typeof B=="function")Z=function(){B(W)};else if(typeof MessageChannel<"u"){var te=new MessageChannel,ee=te.port2;te.port1.onmessage=W,Z=function(){ee.postMessage(null)}}else Z=function(){z(W,0)};function he(L,P){D=z(function(){L(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(L){L.callback=null},n.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<L?Math.floor(1e3/L):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(L){switch(S){case 1:case 2:case 3:var P=3;break;default:P=S}var ue=S;S=P;try{return L()}finally{S=ue}},n.unstable_requestPaint=function(){j=!0},n.unstable_runWithPriority=function(L,P){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var ue=S;S=L;try{return P()}finally{S=ue}},n.unstable_scheduleCallback=function(L,P,ue){var Me=n.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Me+ue:Me):ue=Me,L){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=ue+ne,L={id:b++,callback:P,priorityLevel:L,startTime:ue,expirationTime:ne,sortIndex:-1},ue>Me?(L.sortIndex=ue,s(m,L),i(p)===null&&L===i(m)&&(E?(A(D),D=-1):E=!0,he(Q,ue-Me))):(L.sortIndex=ne,s(p,L),_||R||(_=!0,k||(k=!0,Z()))),L},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(L){var P=S;return function(){var ue=S;S=P;try{return L.apply(this,arguments)}finally{S=ue}}}})(_d)),_d}var hv;function S2(){return hv||(hv=1,Rd.exports=x2()),Rd.exports}/**
50
50
  * @license React
51
51
  * react-dom-client.production.js
52
52
  *
@@ -54,15 +54,15 @@ var L1=Object.defineProperty;var jg=n=>{throw TypeError(n)};var B1=(n,s,i)=>s in
54
54
  *
55
55
  * This source code is licensed under the MIT license found in the
56
56
  * LICENSE file in the root directory of this source tree.
57
- */var mv;function j2(){if(mv)return Rr;mv=1;var n=S2(),s=Vr(),i=A0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return p(o),e;if(u===l)return p(o),t;u=u.sibling}throw Error(r(188))}if(a.return!==l.return)a=o,l=u;else{for(var g=!1,x=o.child;x;){if(x===a){g=!0,a=o,l=u;break}if(x===l){g=!0,l=o,a=u;break}x=x.sibling}if(!g){for(x=u.child;x;){if(x===a){g=!0,a=u,l=o;break}if(x===l){g=!0,l=u,a=o;break}x=x.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),B=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case z:return"Profiler";case j:return"StrictMode";case Q:return"Suspense";case k:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case B:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case N:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var he=Array.isArray,L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Me=[],ne=-1;function C(e){return{current:e}}function F(e){0>ne||(e.current=Me[ne],Me[ne]=null,ne--)}function ae(e,t){ne++,Me[ne]=e.current,e.current=t}var se=C(null),le=C(null),me=C(null),Re=C(null);function He(e,t){switch(ae(me,t),ae(le,e),ae(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pp(t),e=Kp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(se),ae(se,e)}function ge(){F(se),F(le),F(me)}function un(e){e.memoizedState!==null&&ae(Re,e);var t=se.current,a=Kp(t,e.type);t!==a&&(ae(le,e),ae(se,a))}function kt(e){le.current===e&&(F(se),F(le)),Re.current===e&&(F(Re),yr._currentValue=ue)}var Jt,Kn;function Ct(e){if(Jt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Jt=t&&t[1]||"",Kn=-1<a.stack.indexOf(`
57
+ */var mv;function j2(){if(mv)return Rr;mv=1;var n=S2(),s=Vr(),i=A0();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(d(e)!==e)throw Error(r(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(r(188));return t!==e?null:e}for(var a=e,l=t;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(l=o.return,l!==null){a=l;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return p(o),e;if(u===l)return p(o),t;u=u.sibling}throw Error(r(188))}if(a.return!==l.return)a=o,l=u;else{for(var g=!1,x=o.child;x;){if(x===a){g=!0,a=o,l=u;break}if(x===l){g=!0,l=o,a=u;break}x=x.sibling}if(!g){for(x=u.child;x;){if(x===a){g=!0,a=u,l=o;break}if(x===l){g=!0,l=u,a=o;break}x=x.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),R=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),B=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),k=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var te=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===te?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case z:return"Profiler";case j:return"StrictMode";case Q:return"Suspense";case k:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case B:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case N:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case D:return t=e.displayName||null,t!==null?t:ee(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var he=Array.isArray,L=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Me=[],ne=-1;function C(e){return{current:e}}function F(e){0>ne||(e.current=Me[ne],Me[ne]=null,ne--)}function ae(e,t){ne++,Me[ne]=e.current,e.current=t}var se=C(null),le=C(null),me=C(null),Re=C(null);function He(e,t){switch(ae(me,t),ae(le,e),ae(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kp(t),e=Pp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(se),ae(se,e)}function ge(){F(se),F(le),F(me)}function un(e){e.memoizedState!==null&&ae(Re,e);var t=se.current,a=Pp(t,e.type);t!==a&&(ae(le,e),ae(se,a))}function kt(e){le.current===e&&(F(se),F(le)),Re.current===e&&(F(Re),yr._currentValue=ue)}var Jt,Pn;function Ct(e){if(Jt===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Jt=t&&t[1]||"",Pn=-1<a.stack.indexOf(`
58
58
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
59
- `+Jt+e+Kn}var Ei=!1;function dl(e,t){if(!e||Ei)return"";Ei=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(V){var G=V}Reflect.construct(e,[],I)}else{try{I.call()}catch(V){G=V}e.call(I.prototype)}}else{try{throw Error()}catch(V){G=V}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(V){if(V&&G&&typeof V.stack=="string")return[V.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),g=u[0],x=u[1];if(g&&x){var w=g.split(`
59
+ `+Jt+e+Pn}var Ei=!1;function dl(e,t){if(!e||Ei)return"";Ei=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(V){var G=V}Reflect.construct(e,[],I)}else{try{I.call()}catch(V){G=V}e.call(I.prototype)}}else{try{throw Error()}catch(V){G=V}(I=e())&&typeof I.catch=="function"&&I.catch(function(){})}}catch(V){if(V&&G&&typeof V.stack=="string")return[V.stack,G.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=l.DetermineComponentFrameRoot(),g=u[0],x=u[1];if(g&&x){var w=g.split(`
60
60
  `),H=x.split(`
61
61
  `);for(o=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(l===w.length||o===H.length)for(l=w.length-1,o=H.length-1;1<=l&&0<=o&&w[l]!==H[o];)o--;for(;1<=l&&0<=o;l--,o--)if(w[l]!==H[o]){if(l!==1||o!==1)do if(l--,o--,0>o||w[l]!==H[o]){var X=`
62
- `+w[l].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=l&&0<=o);break}}}finally{Ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ct(a):""}function Pr(e,t){switch(e.tag){case 26:case 27:case 5:return Ct(e.type);case 16:return Ct("Lazy");case 13:return e.child!==t&&t!==null?Ct("Suspense Fallback"):Ct("Suspense");case 19:return Ct("SuspenseList");case 0:case 15:return dl(e.type,!1);case 11:return dl(e.type.render,!1);case 1:return dl(e.type,!0);case 31:return Ct("Activity");default:return""}}function Xn(e){try{var t="",a=null;do t+=Pr(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
62
+ `+w[l].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=l&&0<=o);break}}}finally{Ei=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ct(a):""}function Kr(e,t){switch(e.tag){case 26:case 27:case 5:return Ct(e.type);case 16:return Ct("Lazy");case 13:return e.child!==t&&t!==null?Ct("Suspense Fallback"):Ct("Suspense");case 19:return Ct("SuspenseList");case 0:case 15:return dl(e.type,!1);case 11:return dl(e.type.render,!1);case 1:return dl(e.type,!0);case 31:return Ct("Activity");default:return""}}function Xn(e){try{var t="",a=null;do t+=Kr(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
63
63
  Error generating stack: `+l.message+`
64
- `+l.stack}}var bs=Object.prototype.hasOwnProperty,jn=n.unstable_scheduleCallback,wi=n.unstable_cancelCallback,Kr=n.unstable_shouldYield,Kc=n.unstable_requestPaint,_t=n.unstable_now,Qe=n.unstable_getCurrentPriorityLevel,vt=n.unstable_ImmediatePriority,zn=n.unstable_UserBlockingPriority,hl=n.unstable_NormalPriority,vb=n.unstable_LowPriority,Eh=n.unstable_IdlePriority,bb=n.log,xb=n.unstable_setDisableYieldValue,Ti=null,Ft=null;function _a(e){if(typeof bb=="function"&&xb(e),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(Ti,e)}catch{}}var It=Math.clz32?Math.clz32:Rb,Sb=Math.log,jb=Math.LN2;function Rb(e){return e>>>=0,e===0?32:31-(Sb(e)/jb|0)|0}var Xr=256,Zr=262144,Jr=4194304;function xs(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fr(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~u,l!==0?o=xs(l):(g&=x,g!==0?o=xs(g):a||(a=x&~e,a!==0&&(o=xs(a))))):(x=l&~u,x!==0?o=xs(x):g!==0?o=xs(g):a||(a=l&~e,a!==0&&(o=xs(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function Ni(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _b(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wh(){var e=Jr;return Jr<<=1,(Jr&62914560)===0&&(Jr=4194304),e}function Xc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ci(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,t,a,l,o,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,w=e.expirationTimes,H=e.hiddenUpdates;for(a=g&~a;0<a;){var X=31-It(a),I=1<<X;x[X]=0,w[X]=-1;var G=H[X];if(G!==null)for(H[X]=null,X=0;X<G.length;X++){var V=G[X];V!==null&&(V.lane&=-536870913)}a&=~I}l!==0&&Th(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Th(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-It(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Nh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-It(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function Ch(e,t){var a=t&-t;return a=(a&42)!==0?1:Zc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Zc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Jc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mh(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:yg(e.type))}function Ah(e,t){var a=K.p;try{return K.p=e,t()}finally{K.p=a}}var Ea=Math.random().toString(36).slice(2),bt="__reactFiber$"+Ea,Lt="__reactProps$"+Ea,ml="__reactContainer$"+Ea,Fc="__reactEvents$"+Ea,wb="__reactListeners$"+Ea,Tb="__reactHandles$"+Ea,Oh="__reactResources$"+Ea,Mi="__reactMarker$"+Ea;function Ic(e){delete e[bt],delete e[Lt],delete e[Fc],delete e[wb],delete e[Tb]}function yl(e){var t=e[bt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ml]||a[bt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Wp(e);e!==null;){if(a=e[bt])return a;e=Wp(e)}return t}e=a,a=e.parentNode}return null}function pl(e){if(e=e[bt]||e[ml]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function gl(e){var t=e[Oh];return t||(t=e[Oh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function yt(e){e[Mi]=!0}var zh=new Set,Dh={};function Ss(e,t){vl(e,t),vl(e+"Capture",t)}function vl(e,t){for(Dh[e]=t,e=0;e<t.length;e++)zh.add(t[e])}var Nb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Uh={},kh={};function Cb(e){return bs.call(kh,e)?!0:bs.call(Uh,e)?!1:Nb.test(e)?kh[e]=!0:(Uh[e]=!0,!1)}function Ir(e,t,a){if(Cb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function $r(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Zn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mb(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){if(!e._valueTracker){var t=Lh(e)?"checked":"value";e._valueTracker=Mb(e,t,""+e[t])}}function Bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Lh(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Wr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ab=/[\n"\\]/g;function dn(e){return e.replace(Ab,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wc(e,t,a,l,o,u,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?eu(e,g,fn(t)):a!=null?eu(e,g,fn(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+fn(x):e.removeAttribute("name")}function qh(e,t,a,l,o,u,g,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){$c(e);return}a=a!=null?""+fn(a):"",t=t!=null?""+fn(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),$c(e)}function eu(e,t,a){t==="number"&&Wr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function bl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+fn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Hh(e,t,a){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+fn(a):""}function Qh(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(he(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=fn(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),$c(e)}function xl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Ob=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Gh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Ob.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Gh(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&Gh(e,u,t[u])}function tu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Db=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function eo(e){return Db.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jn(){}var nu=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sl=null,jl=null;function Yh(e){var t=pl(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Lt]||null;if(!o)throw Error(r(90));Wc(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Bh(l)}break e;case"textarea":Hh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&bl(e,!!a.multiple,t,!1)}}}var su=!1;function Ph(e,t,a){if(su)return e(t,a);su=!0;try{var l=e(t);return l}finally{if(su=!1,(Sl!==null||jl!==null)&&(Go(),Sl&&(t=Sl,e=jl,jl=Sl=null,Yh(t),e)))for(t=0;t<e.length;t++)Yh(e[t])}}function Oi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Lt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lu=!1;if(Fn)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){lu=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{lu=!1}var wa=null,iu=null,to=null;function Kh(){if(to)return to;var e,t=iu,a=t.length,l,o="value"in wa?wa.value:wa.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===o[u-l];l++);return to=o.slice(e,1<l?1-l:void 0)}function no(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ao(){return!0}function Xh(){return!1}function Bt(e){function t(a,l,o,u,g){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ao:Xh,this.isPropagationStopped=Xh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ao)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ao)},persist:function(){},isPersistent:ao}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},so=Bt(js),Di=v({},js,{view:0,detail:0}),Ub=Bt(Di),ru,ou,Ui,lo=v({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ui&&(Ui&&e.type==="mousemove"?(ru=e.screenX-Ui.screenX,ou=e.screenY-Ui.screenY):ou=ru=0,Ui=e),ru)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),Zh=Bt(lo),kb=v({},lo,{dataTransfer:0}),Lb=Bt(kb),Bb=v({},Di,{relatedTarget:0}),cu=Bt(Bb),qb=v({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),Hb=Bt(qb),Qb=v({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gb=Bt(Qb),Vb=v({},js,{data:0}),Jh=Bt(Vb),Yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Kb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kb[e])?!!t[e]:!1}function uu(){return Xb}var Zb=v({},Di,{key:function(e){if(e.key){var t=Yb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jb=Bt(Zb),Fb=v({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fh=Bt(Fb),Ib=v({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),$b=Bt(Ib),Wb=v({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),ex=Bt(Wb),tx=v({},lo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nx=Bt(tx),ax=v({},js,{newState:0,oldState:0}),sx=Bt(ax),lx=[9,13,27,32],fu=Fn&&"CompositionEvent"in window,ki=null;Fn&&"documentMode"in document&&(ki=document.documentMode);var ix=Fn&&"TextEvent"in window&&!ki,Ih=Fn&&(!fu||ki&&8<ki&&11>=ki),$h=" ",Wh=!1;function em(e,t){switch(e){case"keyup":return lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rl=!1;function rx(e,t){switch(e){case"compositionend":return tm(t);case"keypress":return t.which!==32?null:(Wh=!0,$h);case"textInput":return e=t.data,e===$h&&Wh?null:e;default:return null}}function ox(e,t){if(Rl)return e==="compositionend"||!fu&&em(e,t)?(e=Kh(),to=iu=wa=null,Rl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ih&&t.locale!=="ko"?null:t.data;default:return null}}var cx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cx[e.type]:t==="textarea"}function am(e,t,a,l){Sl?jl?jl.push(l):jl=[l]:Sl=l,t=Jo(t,"onChange"),0<t.length&&(a=new so("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Li=null,Bi=null;function ux(e){qp(e,0)}function io(e){var t=Ai(e);if(Bh(t))return e}function sm(e,t){if(e==="change")return t}var lm=!1;if(Fn){var du;if(Fn){var hu="oninput"in document;if(!hu){var im=document.createElement("div");im.setAttribute("oninput","return;"),hu=typeof im.oninput=="function"}du=hu}else du=!1;lm=du&&(!document.documentMode||9<document.documentMode)}function rm(){Li&&(Li.detachEvent("onpropertychange",om),Bi=Li=null)}function om(e){if(e.propertyName==="value"&&io(Bi)){var t=[];am(t,Bi,e,au(e)),Ph(ux,t)}}function fx(e,t,a){e==="focusin"?(rm(),Li=t,Bi=a,Li.attachEvent("onpropertychange",om)):e==="focusout"&&rm()}function dx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return io(Bi)}function hx(e,t){if(e==="click")return io(t)}function mx(e,t){if(e==="input"||e==="change")return io(t)}function yx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:yx;function qi(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!bs.call(t,o)||!$t(e[o],t[o]))return!1}return!0}function cm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function um(e,t){var a=cm(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=cm(a)}}function fm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Wr(e.document)}return t}function mu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var px=Fn&&"documentMode"in document&&11>=document.documentMode,_l=null,yu=null,Hi=null,pu=!1;function hm(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;pu||_l==null||_l!==Wr(l)||(l=_l,"selectionStart"in l&&mu(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}),Hi&&qi(Hi,l)||(Hi=l,l=Jo(yu,"onSelect"),0<l.length&&(t=new so("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=_l)))}function Rs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:Rs("Animation","AnimationEnd"),animationiteration:Rs("Animation","AnimationIteration"),animationstart:Rs("Animation","AnimationStart"),transitionrun:Rs("Transition","TransitionRun"),transitionstart:Rs("Transition","TransitionStart"),transitioncancel:Rs("Transition","TransitionCancel"),transitionend:Rs("Transition","TransitionEnd")},gu={},mm={};Fn&&(mm=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function _s(e){if(gu[e])return gu[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in mm)return gu[e]=t[a];return e}var ym=_s("animationend"),pm=_s("animationiteration"),gm=_s("animationstart"),gx=_s("transitionrun"),vx=_s("transitionstart"),bx=_s("transitioncancel"),vm=_s("transitionend"),bm=new Map,vu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vu.push("scrollEnd");function Rn(e,t){bm.set(e,t),Ss(t,[e])}var ro=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},hn=[],wl=0,bu=0;function oo(){for(var e=wl,t=bu=wl=0;t<e;){var a=hn[t];hn[t++]=null;var l=hn[t];hn[t++]=null;var o=hn[t];hn[t++]=null;var u=hn[t];if(hn[t++]=null,l!==null&&o!==null){var g=l.pending;g===null?o.next=o:(o.next=g.next,g.next=o),l.pending=o}u!==0&&xm(a,o,u)}}function co(e,t,a,l){hn[wl++]=e,hn[wl++]=t,hn[wl++]=a,hn[wl++]=l,bu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function xu(e,t,a,l){return co(e,t,a,l),uo(e)}function Es(e,t){return co(e,null,null,t),uo(e)}function xm(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-It(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function uo(e){if(50<or)throw or=0,Mf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tl={};function xx(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,a,l){return new xx(e,t,a,l)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var a=e.alternate;return a===null?(a=Wt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Sm(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fo(e,t,a,l,o,u){var g=0;if(l=e,typeof e=="function")Su(e)&&(g=1);else if(typeof e=="string")g=E1(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Wt(31,a,t,o),e.elementType=P,e.lanes=u,e;case E:return ws(a.children,o,u,t);case j:g=8,o|=24;break;case z:return e=Wt(12,a,t,o|2),e.elementType=z,e.lanes=u,e;case Q:return e=Wt(13,a,t,o),e.elementType=Q,e.lanes=u,e;case k:return e=Wt(19,a,t,o),e.elementType=k,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:g=10;break e;case A:g=9;break e;case N:g=11;break e;case D:g=14;break e;case O:g=16,l=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Wt(g,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function ws(e,t,a,l){return e=Wt(7,e,l,t),e.lanes=a,e}function ju(e,t,a){return e=Wt(6,e,null,t),e.lanes=a,e}function jm(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function Ru(e,t,a){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Rm=new WeakMap;function mn(e,t){if(typeof e=="object"&&e!==null){var a=Rm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Xn(t)},Rm.set(e,t),t)}return{value:e,source:t,stack:Xn(t)}}var Nl=[],Cl=0,ho=null,Qi=0,yn=[],pn=0,Ta=null,Dn=1,Un="";function $n(e,t){Nl[Cl++]=Qi,Nl[Cl++]=ho,ho=e,Qi=t}function _m(e,t,a){yn[pn++]=Dn,yn[pn++]=Un,yn[pn++]=Ta,Ta=e;var l=Dn;e=Un;var o=32-It(l)-1;l&=~(1<<o),a+=1;var u=32-It(t)+o;if(30<u){var g=o-o%5;u=(l&(1<<g)-1).toString(32),l>>=g,o-=g,Dn=1<<32-It(t)+o|a<<o|l,Un=u+e}else Dn=1<<u|a<<o|l,Un=e}function _u(e){e.return!==null&&($n(e,1),_m(e,1,0))}function Eu(e){for(;e===ho;)ho=Nl[--Cl],Nl[Cl]=null,Qi=Nl[--Cl],Nl[Cl]=null;for(;e===Ta;)Ta=yn[--pn],yn[pn]=null,Un=yn[--pn],yn[pn]=null,Dn=yn[--pn],yn[pn]=null}function Em(e,t){yn[pn++]=Dn,yn[pn++]=Un,yn[pn++]=Ta,Dn=t.id,Un=t.overflow,Ta=e}var xt=null,Fe=null,Ae=!1,Na=null,gn=!1,wu=Error(r(519));function Ca(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(mn(t,e)),wu}function wm(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[bt]=e,t[Lt]=l,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<ur.length;a++)Ee(ur[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),qh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Qh(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Vp(t.textContent,a)?(l.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),l.onScroll!=null&&Ee("scroll",t),l.onScrollEnd!=null&&Ee("scrollend",t),l.onClick!=null&&(t.onclick=Jn),t=!0):t=!1,t||Ca(e,!0)}function Tm(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:xt=xt.return}}function Ml(e){if(e!==xt)return!1;if(!Ae)return Tm(e),Ae=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Pf(e.type,e.memoizedProps)),a=!a),a&&Fe&&Ca(e),Tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=$p(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=$p(e)}else t===27?(t=Fe,Va(e.type)?(e=Ff,Ff=null,Fe=e):Fe=t):Fe=xt?bn(e.stateNode.nextSibling):null;return!0}function Ts(){Fe=xt=null,Ae=!1}function Tu(){var e=Na;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Na=null),e}function Gi(e){Na===null?Na=[e]:Na.push(e)}var Nu=C(null),Ns=null,Wn=null;function Ma(e,t,a){ae(Nu,t._currentValue),t._currentValue=a}function ea(e){e._currentValue=Nu.current,F(Nu)}function Cu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Mu(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var g=o.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=o;for(var w=0;w<t.length;w++)if(x.context===t[w]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),Cu(u.return,a,e),l||(g=null);break e}u=x.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),Cu(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Al(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var x=o.type;$t(o.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(o===Re.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(yr):e=[yr])}o=o.return}e!==null&&Mu(t,e,a,l),t.flags|=262144}function mo(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){Ns=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return Nm(Ns,e)}function yo(e,t){return Ns===null&&Cs(e),Nm(e,t)}function Nm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wn===null){if(e===null)throw Error(r(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return a}var Sx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},jx=n.unstable_scheduleCallback,Rx=n.unstable_NormalPriority,it={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new Sx,data:new Map,refCount:0}}function Vi(e){e.refCount--,e.refCount===0&&jx(Rx,function(){e.controller.abort()})}var Yi=null,Ou=0,Ol=0,zl=null;function _x(e,t){if(Yi===null){var a=Yi=[];Ou=0,Ol=kf(),zl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ou++,t.then(Cm,Cm),t}function Cm(){if(--Ou===0&&Yi!==null){zl!==null&&(zl.status="fulfilled");var e=Yi;Yi=null,Ol=0,zl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ex(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Mm=L.S;L.S=function(e,t){hp=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_x(e,t),Mm!==null&&Mm(e,t)};var Ms=C(null);function zu(){var e=Ms.current;return e!==null?e:Ze.pooledCache}function po(e,t){t===null?ae(Ms,Ms.current):ae(Ms,t.pool)}function Am(){var e=zu();return e===null?null:{parent:it._currentValue,pool:e}}var Dl=Error(r(460)),Du=Error(r(474)),go=Error(r(542)),vo={then:function(){}};function Om(e){return e=e.status,e==="fulfilled"||e==="rejected"}function zm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Jn,Jn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e;default:if(typeof t.status=="string")t.then(Jn,Jn);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e}throw Os=t,Dl}}function As(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Os=a,Dl):a}}var Os=null;function Dm(){if(Os===null)throw Error(r(459));var e=Os;return Os=null,e}function Um(e){if(e===Dl||e===go)throw Error(r(483))}var Ul=null,Pi=0;function bo(e){var t=Pi;return Pi+=1,Ul===null&&(Ul=[]),zm(Ul,e,t)}function Ki(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function xo(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function km(e){function t(U,M){if(e){var q=U.deletions;q===null?(U.deletions=[M],U.flags|=16):q.push(M)}}function a(U,M){if(!e)return null;for(;M!==null;)t(U,M),M=M.sibling;return null}function l(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function o(U,M){return U=In(U,M),U.index=0,U.sibling=null,U}function u(U,M,q){return U.index=q,e?(q=U.alternate,q!==null?(q=q.index,q<M?(U.flags|=67108866,M):q):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function g(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function x(U,M,q,J){return M===null||M.tag!==6?(M=ju(q,U.mode,J),M.return=U,M):(M=o(M,q),M.return=U,M)}function w(U,M,q,J){var ye=q.type;return ye===E?X(U,M,q.props.children,J,q.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&As(ye)===M.type)?(M=o(M,q.props),Ki(M,q),M.return=U,M):(M=fo(q.type,q.key,q.props,null,U.mode,J),Ki(M,q),M.return=U,M)}function H(U,M,q,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==q.containerInfo||M.stateNode.implementation!==q.implementation?(M=Ru(q,U.mode,J),M.return=U,M):(M=o(M,q.children||[]),M.return=U,M)}function X(U,M,q,J,ye){return M===null||M.tag!==7?(M=ws(q,U.mode,J,ye),M.return=U,M):(M=o(M,q),M.return=U,M)}function I(U,M,q){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ju(""+M,U.mode,q),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case R:return q=fo(M.type,M.key,M.props,null,U.mode,q),Ki(q,M),q.return=U,q;case _:return M=Ru(M,U.mode,q),M.return=U,M;case O:return M=As(M),I(U,M,q)}if(he(M)||Z(M))return M=ws(M,U.mode,q,null),M.return=U,M;if(typeof M.then=="function")return I(U,bo(M),q);if(M.$$typeof===B)return I(U,yo(U,M),q);xo(U,M)}return null}function G(U,M,q,J){var ye=M!==null?M.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ye!==null?null:x(U,M,""+q,J);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case R:return q.key===ye?w(U,M,q,J):null;case _:return q.key===ye?H(U,M,q,J):null;case O:return q=As(q),G(U,M,q,J)}if(he(q)||Z(q))return ye!==null?null:X(U,M,q,J,null);if(typeof q.then=="function")return G(U,M,bo(q),J);if(q.$$typeof===B)return G(U,M,yo(U,q),J);xo(U,q)}return null}function V(U,M,q,J,ye){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return U=U.get(q)||null,x(M,U,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return U=U.get(J.key===null?q:J.key)||null,w(M,U,J,ye);case _:return U=U.get(J.key===null?q:J.key)||null,H(M,U,J,ye);case O:return J=As(J),V(U,M,q,J,ye)}if(he(J)||Z(J))return U=U.get(q)||null,X(M,U,J,ye,null);if(typeof J.then=="function")return V(U,M,q,bo(J),ye);if(J.$$typeof===B)return V(U,M,q,yo(M,J),ye);xo(M,J)}return null}function ce(U,M,q,J){for(var ye=null,De=null,fe=M,xe=M=0,Ne=null;fe!==null&&xe<q.length;xe++){fe.index>xe?(Ne=fe,fe=null):Ne=fe.sibling;var Ue=G(U,fe,q[xe],J);if(Ue===null){fe===null&&(fe=Ne);break}e&&fe&&Ue.alternate===null&&t(U,fe),M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue,fe=Ne}if(xe===q.length)return a(U,fe),Ae&&$n(U,xe),ye;if(fe===null){for(;xe<q.length;xe++)fe=I(U,q[xe],J),fe!==null&&(M=u(fe,M,xe),De===null?ye=fe:De.sibling=fe,De=fe);return Ae&&$n(U,xe),ye}for(fe=l(fe);xe<q.length;xe++)Ne=V(fe,U,xe,q[xe],J),Ne!==null&&(e&&Ne.alternate!==null&&fe.delete(Ne.key===null?xe:Ne.key),M=u(Ne,M,xe),De===null?ye=Ne:De.sibling=Ne,De=Ne);return e&&fe.forEach(function(Za){return t(U,Za)}),Ae&&$n(U,xe),ye}function pe(U,M,q,J){if(q==null)throw Error(r(151));for(var ye=null,De=null,fe=M,xe=M=0,Ne=null,Ue=q.next();fe!==null&&!Ue.done;xe++,Ue=q.next()){fe.index>xe?(Ne=fe,fe=null):Ne=fe.sibling;var Za=G(U,fe,Ue.value,J);if(Za===null){fe===null&&(fe=Ne);break}e&&fe&&Za.alternate===null&&t(U,fe),M=u(Za,M,xe),De===null?ye=Za:De.sibling=Za,De=Za,fe=Ne}if(Ue.done)return a(U,fe),Ae&&$n(U,xe),ye;if(fe===null){for(;!Ue.done;xe++,Ue=q.next())Ue=I(U,Ue.value,J),Ue!==null&&(M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue);return Ae&&$n(U,xe),ye}for(fe=l(fe);!Ue.done;xe++,Ue=q.next())Ue=V(fe,U,xe,Ue.value,J),Ue!==null&&(e&&Ue.alternate!==null&&fe.delete(Ue.key===null?xe:Ue.key),M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue);return e&&fe.forEach(function(k1){return t(U,k1)}),Ae&&$n(U,xe),ye}function Ye(U,M,q,J){if(typeof q=="object"&&q!==null&&q.type===E&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case R:e:{for(var ye=q.key;M!==null;){if(M.key===ye){if(ye=q.type,ye===E){if(M.tag===7){a(U,M.sibling),J=o(M,q.props.children),J.return=U,U=J;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&As(ye)===M.type){a(U,M.sibling),J=o(M,q.props),Ki(J,q),J.return=U,U=J;break e}a(U,M);break}else t(U,M);M=M.sibling}q.type===E?(J=ws(q.props.children,U.mode,J,q.key),J.return=U,U=J):(J=fo(q.type,q.key,q.props,null,U.mode,J),Ki(J,q),J.return=U,U=J)}return g(U);case _:e:{for(ye=q.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===q.containerInfo&&M.stateNode.implementation===q.implementation){a(U,M.sibling),J=o(M,q.children||[]),J.return=U,U=J;break e}else{a(U,M);break}else t(U,M);M=M.sibling}J=Ru(q,U.mode,J),J.return=U,U=J}return g(U);case O:return q=As(q),Ye(U,M,q,J)}if(he(q))return ce(U,M,q,J);if(Z(q)){if(ye=Z(q),typeof ye!="function")throw Error(r(150));return q=ye.call(q),pe(U,M,q,J)}if(typeof q.then=="function")return Ye(U,M,bo(q),J);if(q.$$typeof===B)return Ye(U,M,yo(U,q),J);xo(U,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,M!==null&&M.tag===6?(a(U,M.sibling),J=o(M,q),J.return=U,U=J):(a(U,M),J=ju(q,U.mode,J),J.return=U,U=J),g(U)):a(U,M)}return function(U,M,q,J){try{Pi=0;var ye=Ye(U,M,q,J);return Ul=null,ye}catch(fe){if(fe===Dl||fe===go)throw fe;var De=Wt(29,fe,null,U.mode);return De.lanes=J,De.return=U,De}finally{}}}var zs=km(!0),Lm=km(!1),Aa=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ke&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=uo(e),xm(e,null,a),t}return co(e,l,t,a),uo(e)}function Xi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Nh(e,a)}}function Lu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Bu=!1;function Zi(){if(Bu){var e=zl;if(e!==null)throw e}}function Ji(e,t,a,l){Bu=!1;var o=e.updateQueue;Aa=!1;var u=o.firstBaseUpdate,g=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var w=x,H=w.next;w.next=null,g===null?u=H:g.next=H,g=w;var X=e.alternate;X!==null&&(X=X.updateQueue,x=X.lastBaseUpdate,x!==g&&(x===null?X.firstBaseUpdate=H:x.next=H,X.lastBaseUpdate=w))}if(u!==null){var I=o.baseState;g=0,X=H=w=null,x=u;do{var G=x.lane&-536870913,V=G!==x.lane;if(V?(Te&G)===G:(l&G)===G){G!==0&&G===Ol&&(Bu=!0),X!==null&&(X=X.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ce=e,pe=x;G=t;var Ye=a;switch(pe.tag){case 1:if(ce=pe.payload,typeof ce=="function"){I=ce.call(Ye,I,G);break e}I=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=pe.payload,G=typeof ce=="function"?ce.call(Ye,I,G):ce,G==null)break e;I=v({},I,G);break e;case 2:Aa=!0}}G=x.callback,G!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[G]:V.push(G))}else V={lane:G,tag:x.tag,payload:x.payload,callback:x.callback,next:null},X===null?(H=X=V,w=I):X=X.next=V,g|=G;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;V=x,x=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);X===null&&(w=I),o.baseState=w,o.firstBaseUpdate=H,o.lastBaseUpdate=X,u===null&&(o.shared.lanes=0),Ba|=g,e.lanes=g,e.memoizedState=I}}function Bm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function qm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Bm(a[e],t)}var kl=C(null),So=C(0);function Hm(e,t){e=ca,ae(So,e),ae(kl,t),ca=e|t.baseLanes}function qu(){ae(So,ca),ae(kl,kl.current)}function Hu(){ca=So.current,F(kl),F(So)}var en=C(null),vn=null;function Da(e){var t=e.alternate;ae(at,at.current&1),ae(en,e),vn===null&&(t===null||kl.current!==null||t.memoizedState!==null)&&(vn=e)}function Qu(e){ae(at,at.current),ae(en,e),vn===null&&(vn=e)}function Qm(e){e.tag===22?(ae(at,at.current),ae(en,e),vn===null&&(vn=e)):Ua()}function Ua(){ae(at,at.current),ae(en,en.current)}function tn(e){F(en),vn===e&&(vn=null),F(at)}var at=C(0);function jo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zf(a)||Jf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=0,be=null,Ge=null,rt=null,Ro=!1,Ll=!1,Ds=!1,_o=0,Fi=0,Bl=null,wx=0;function et(){throw Error(r(321))}function Gu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!$t(e[a],t[a]))return!1;return!0}function Vu(e,t,a,l,o,u){return ta=u,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?_y:sf,Ds=!1,u=a(l,o),Ds=!1,Ll&&(u=Vm(t,a,l,o)),Gm(e),u}function Gm(e){L.H=Wi;var t=Ge!==null&&Ge.next!==null;if(ta=0,rt=Ge=be=null,Ro=!1,Fi=0,Bl=null,t)throw Error(r(300));e===null||ot||(e=e.dependencies,e!==null&&mo(e)&&(ot=!0))}function Vm(e,t,a,l){be=e;var o=0;do{if(Ll&&(Bl=null),Fi=0,Ll=!1,25<=o)throw Error(r(301));if(o+=1,rt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}L.H=Ey,u=t(a,l)}while(Ll);return u}function Tx(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(be.flags|=1024),t}function Yu(){var e=_o!==0;return _o=0,e}function Pu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ku(e){if(Ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ro=!1}ta=0,rt=Ge=be=null,Ll=!1,Fi=_o=0,Bl=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?be.memoizedState=rt=e:rt=rt.next=e,rt}function st(){if(Ge===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=rt===null?be.memoizedState:rt.next;if(t!==null)rt=t,Ge=e;else{if(e===null)throw be.alternate===null?Error(r(467)):Error(r(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},rt===null?be.memoizedState=rt=e:rt=rt.next=e}return rt}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Fi;return Fi+=1,Bl===null&&(Bl=[]),e=zm(Bl,e,t),t=be,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?_y:sf),e}function wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===B)return St(e)}throw Error(r(438,String(e)))}function Xu(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=$;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function To(e){var t=st();return Zu(t,Ge,e)}function Zu(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var g=o.next;o.next=u.next,u.next=g}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var x=g=null,w=null,H=t,X=!1;do{var I=H.lane&-536870913;if(I!==H.lane?(Te&I)===I:(ta&I)===I){var G=H.revertLane;if(G===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),I===Ol&&(X=!0);else if((ta&G)===G){H=H.next,G===Ol&&(X=!0);continue}else I={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(x=w=I,g=u):w=w.next=I,be.lanes|=G,Ba|=G;I=H.action,Ds&&a(u,I),u=H.hasEagerState?H.eagerState:a(u,I)}else G={lane:I,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(x=w=G,g=u):w=w.next=G,be.lanes|=I,Ba|=I;H=H.next}while(H!==null&&H!==t);if(w===null?g=u:w.next=x,!$t(u,e.memoizedState)&&(ot=!0,X&&(a=zl,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=w,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ju(e){var t=st(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do u=e(u,g.action),g=g.next;while(g!==o);$t(u,t.memoizedState)||(ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Ym(e,t,a){var l=be,o=st(),u=Ae;if(u){if(a===void 0)throw Error(r(407));a=a()}else a=t();var g=!$t((Ge||o).memoizedState,a);if(g&&(o.memoizedState=a,ot=!0),o=o.queue,$u(Xm.bind(null,l,o,e),[e]),o.getSnapshot!==t||g||rt!==null&&rt.memoizedState.tag&1){if(l.flags|=2048,ql(9,{destroy:void 0},Km.bind(null,l,o,a,t),null),Ze===null)throw Error(r(349));u||(ta&127)!==0||Pm(l,t,a)}return a}function Pm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Eo(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Km(e,t,a,l){t.value=a,t.getSnapshot=l,Zm(t)&&Jm(e)}function Xm(e,t,a){return a(function(){Zm(t)&&Jm(e)})}function Zm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!$t(e,a)}catch{return!0}}function Jm(e){var t=Es(e,2);t!==null&&Vt(t,e,2)}function Fu(e){var t=Mt();if(typeof e=="function"){var a=e;if(e=a(),Ds){_a(!0);try{a()}finally{_a(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Fm(e,t,a,l){return e.baseState=a,Zu(e,Ge,typeof l=="function"?l:na)}function Nx(e,t,a,l,o){if(Mo(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};L.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Im(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Im(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=L.T,g={};L.T=g;try{var x=a(o,l),w=L.S;w!==null&&w(g,x),$m(e,t,x)}catch(H){Iu(e,t,H)}finally{u!==null&&g.types!==null&&(u.types=g.types),L.T=u}}else try{u=a(o,l),$m(e,t,u)}catch(H){Iu(e,t,H)}}function $m(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Wm(e,t,l)},function(l){return Iu(e,t,l)}):Wm(e,t,a)}function Wm(e,t,a){t.status="fulfilled",t.value=a,ey(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Im(e,a)))}function Iu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,ey(t),t=t.next;while(t!==l)}e.action=null}function ey(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ty(e,t){return t}function ny(e,t){if(Ae){var a=Ze.formState;if(a!==null){e:{var l=be;if(Ae){if(Fe){t:{for(var o=Fe,u=gn;o.nodeType!==8;){if(!u){o=null;break t}if(o=bn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Fe=bn(o.nextSibling),l=o.data==="F!";break e}}Ca(l)}l=!1}l&&(t=a[0])}}return a=Mt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ty,lastRenderedState:t},a.queue=l,a=Sy.bind(null,be,l),l.dispatch=a,l=Fu(!1),u=af.bind(null,be,!1,l.queue),l=Mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Nx.bind(null,be,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function ay(e){var t=st();return sy(t,Ge,e)}function sy(e,t,a){if(t=Zu(e,t,ty)[0],e=To(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ii(t)}catch(g){throw g===Dl?go:g}else l=t;t=st();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,ql(9,{destroy:void 0},Cx.bind(null,o,a),null)),[l,u,e]}function Cx(e,t){e.action=t}function ly(e){var t=st(),a=Ge;if(a!==null)return sy(t,a,e);st(),t=t.memoizedState,a=st();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ql(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=be.updateQueue,t===null&&(t=Eo(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function iy(){return st().memoizedState}function No(e,t,a,l){var o=Mt();be.flags|=e,o.memoizedState=ql(1|t,{destroy:void 0},a,l===void 0?null:l)}function Co(e,t,a,l){var o=st();l=l===void 0?null:l;var u=o.memoizedState.inst;Ge!==null&&l!==null&&Gu(l,Ge.memoizedState.deps)?o.memoizedState=ql(t,u,a,l):(be.flags|=e,o.memoizedState=ql(1|t,u,a,l))}function ry(e,t){No(8390656,8,e,t)}function $u(e,t){Co(2048,8,e,t)}function Mx(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Eo(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function oy(e){var t=st().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((ke&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function cy(e,t){return Co(4,2,e,t)}function uy(e,t){return Co(4,4,e,t)}function fy(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dy(e,t,a){a=a!=null?a.concat([e]):null,Co(4,4,fy.bind(null,t,e),a)}function Wu(){}function hy(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Gu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function my(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Gu(t,l[1]))return l[0];if(l=e(),Ds){_a(!0);try{e()}finally{_a(!1)}}return a.memoizedState=[l,t],l}function ef(e,t,a){return a===void 0||(ta&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yp(),be.lanes|=e,Ba|=e,a)}function yy(e,t,a,l){return $t(a,t)?a:kl.current!==null?(e=ef(e,a,l),$t(e,t)||(ot=!0),e):(ta&42)===0||(ta&1073741824)!==0&&(Te&261930)===0?(ot=!0,e.memoizedState=a):(e=yp(),be.lanes|=e,Ba|=e,t)}function py(e,t,a,l,o){var u=K.p;K.p=u!==0&&8>u?u:8;var g=L.T,x={};L.T=x,af(e,!1,t,a);try{var w=o(),H=L.S;if(H!==null&&H(x,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var X=Ex(w,l);$i(e,t,X,sn(e))}else $i(e,t,l,sn(e))}catch(I){$i(e,t,{then:function(){},status:"rejected",reason:I},sn())}finally{K.p=u,g!==null&&x.types!==null&&(g.types=x.types),L.T=g}}function Ax(){}function tf(e,t,a,l){if(e.tag!==5)throw Error(r(476));var o=gy(e).queue;py(e,o,t,ue,a===null?Ax:function(){return vy(e),a(l)})}function gy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vy(e){var t=gy(e);t.next===null&&(t=e.alternate.memoizedState),$i(e,t.next.queue,{},sn())}function nf(){return St(yr)}function by(){return st().memoizedState}function xy(){return st().memoizedState}function Ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=sn();e=Oa(a);var l=za(t,e,a);l!==null&&(Vt(l,t,a),Xi(l,t,a)),t={cache:Au()},e.payload=t;return}t=t.return}}function zx(e,t,a){var l=sn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)?jy(t,a):(a=xu(e,t,a,l),a!==null&&(Vt(a,e,l),Ry(a,t,l)))}function Sy(e,t,a){var l=sn();$i(e,t,a,l)}function $i(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))jy(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,x=u(g,a);if(o.hasEagerState=!0,o.eagerState=x,$t(x,g))return co(e,t,o,0),Ze===null&&oo(),!1}catch{}finally{}if(a=xu(e,t,o,l),a!==null)return Vt(a,e,l),Ry(a,t,l),!0}return!1}function af(e,t,a,l){if(l={lane:2,revertLane:kf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(r(479))}else t=xu(e,a,l,2),t!==null&&Vt(t,e,2)}function Mo(e){var t=e.alternate;return e===be||t!==null&&t===be}function jy(e,t){Ll=Ro=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ry(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Nh(e,a)}}var Wi={readContext:St,use:wo,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Wi.useEffectEvent=et;var _y={readContext:St,use:wo,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:ry,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,No(4194308,4,fy.bind(null,t,e),a)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var a=Mt();t=t===void 0?null:t;var l=e();if(Ds){_a(!0);try{e()}finally{_a(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Mt();if(a!==void 0){var o=a(t);if(Ds){_a(!0);try{a(t)}finally{_a(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=zx.bind(null,be,e),[l.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Fu(e);var t=e.queue,a=Sy.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Wu,useDeferredValue:function(e,t){var a=Mt();return ef(a,e,t)},useTransition:function(){var e=Fu(!1);return e=py.bind(null,be,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=be,o=Mt();if(Ae){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ze===null)throw Error(r(349));(Te&127)!==0||Pm(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,ry(Xm.bind(null,l,u,e),[e]),l.flags|=2048,ql(9,{destroy:void 0},Km.bind(null,l,u,a,t),null),a},useId:function(){var e=Mt(),t=Ze.identifierPrefix;if(Ae){var a=Un,l=Dn;a=(l&~(1<<32-It(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=_o++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=wx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nf,useFormState:ny,useActionState:ny,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=af.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xu,useCacheRefresh:function(){return Mt().memoizedState=Ox.bind(null,be)},useEffectEvent:function(e){var t=Mt(),a={impl:e};return t.memoizedState=a,function(){if((ke&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},sf={readContext:St,use:wo,useCallback:hy,useContext:St,useEffect:$u,useImperativeHandle:dy,useInsertionEffect:cy,useLayoutEffect:uy,useMemo:my,useReducer:To,useRef:iy,useState:function(){return To(na)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=st();return yy(a,Ge.memoizedState,e,t)},useTransition:function(){var e=To(na)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Ym,useId:by,useHostTransitionStatus:nf,useFormState:ay,useActionState:ay,useOptimistic:function(e,t){var a=st();return Fm(a,Ge,e,t)},useMemoCache:Xu,useCacheRefresh:xy};sf.useEffectEvent=oy;var Ey={readContext:St,use:wo,useCallback:hy,useContext:St,useEffect:$u,useImperativeHandle:dy,useInsertionEffect:cy,useLayoutEffect:uy,useMemo:my,useReducer:Ju,useRef:iy,useState:function(){return Ju(na)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=st();return Ge===null?ef(a,e,t):yy(a,Ge.memoizedState,e,t)},useTransition:function(){var e=Ju(na)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Ym,useId:by,useHostTransitionStatus:nf,useFormState:ly,useActionState:ly,useOptimistic:function(e,t){var a=st();return Ge!==null?Fm(a,Ge,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:xy};Ey.useEffectEvent=oy;function lf(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rf={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=sn(),o=Oa(l);o.payload=t,a!=null&&(o.callback=a),t=za(e,o,l),t!==null&&(Vt(t,e,l),Xi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=sn(),o=Oa(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=za(e,o,l),t!==null&&(Vt(t,e,l),Xi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=sn(),l=Oa(a);l.tag=2,t!=null&&(l.callback=t),t=za(e,l,a),t!==null&&(Vt(t,e,a),Xi(t,e,a))}};function wy(e,t,a,l,o,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,g):t.prototype&&t.prototype.isPureReactComponent?!qi(a,l)||!qi(o,u):!0}function Ty(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&rf.enqueueReplaceState(t,t.state,null)}function Us(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Ny(e){ro(e)}function Cy(e){console.error(e)}function My(e){ro(e)}function Ao(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ay(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function of(e,t,a){return a=Oa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ao(e,t)},a}function Oy(e){return e=Oa(e),e.tag=3,e}function zy(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){Ay(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Ay(t,a,l),typeof o!="function"&&(qa===null?qa=new Set([this]):qa.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function Dx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Al(t,a,o,!0),a=en.current,a!==null){switch(a.tag){case 31:case 13:return vn===null?Vo():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===vo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),zf(e,l,o)),!1;case 22:return a.flags|=65536,l===vo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),zf(e,l,o)),!1}throw Error(r(435,a.tag))}return zf(e,l,o),Vo(),!1}if(Ae)return t=en.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==wu&&(e=Error(r(422),{cause:l}),Gi(mn(e,a)))):(l!==wu&&(t=Error(r(423),{cause:l}),Gi(mn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=mn(l,a),o=of(e.stateNode,l,o),Lu(e,o),tt!==4&&(tt=2)),!1;var u=Error(r(520),{cause:l});if(u=mn(u,a),rr===null?rr=[u]:rr.push(u),tt!==4&&(tt=2),t===null)return!0;l=mn(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=of(a.stateNode,l,e),Lu(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(qa===null||!qa.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Oy(o),zy(o,e,a,l),Lu(a,o),!1}a=a.return}while(a!==null);return!1}var cf=Error(r(461)),ot=!1;function jt(e,t,a,l){t.child=e===null?Lm(t,null,a,l):zs(t,e.child,a,l)}function Dy(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var g={};for(var x in l)x!=="ref"&&(g[x]=l[x])}else g=l;return Cs(t),l=Vu(e,t,a,g,u,o),x=Yu(),e!==null&&!ot?(Pu(e,t,o),aa(e,t,o)):(Ae&&x&&_u(t),t.flags|=1,jt(e,t,l,o),t.child)}function Uy(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!Su(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,ky(e,t,u,l,o)):(e=fo(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!gf(e,o)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:qi,a(g,l)&&e.ref===t.ref)return aa(e,t,o)}return t.flags|=1,e=In(u,l),e.ref=t.ref,e.return=t,t.child=e}function ky(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(qi(u,l)&&e.ref===t.ref)if(ot=!1,t.pendingProps=l=u,gf(e,o))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,aa(e,t,o)}return uf(e,t,a,l,o)}function Ly(e,t,a,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return By(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&po(t,u!==null?u.cachePool:null),u!==null?Hm(t,u):qu(),Qm(t);else return l=t.lanes=536870912,By(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(po(t,u.cachePool),Hm(t,u),Ua(),t.memoizedState=null):(e!==null&&po(t,null),qu(),Ua());return jt(e,t,o,a),t.child}function er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function By(e,t,a,l,o){var u=zu();return u=u===null?null:{parent:it._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&po(t,null),qu(),Qm(t),e!==null&&Al(e,t,l,!0),t.childLanes=o,null}function Oo(e,t){return t=Do({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qy(e,t,a){return zs(t,e.child,null,a),e=Oo(t,t.pendingProps),e.flags|=2,tn(t),t.memoizedState=null,e}function Ux(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(l.mode==="hidden")return e=Oo(t,l),t.lanes=536870912,er(null,e);if(Qu(t),(e=Fe)?(e=Ip(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Dn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=jm(e),a.return=t,t.child=a,xt=t,Fe=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return Oo(t,l)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Qu(t),o)if(t.flags&256)t.flags&=-257,t=qy(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ot||Al(e,t,a,!1),o=(a&e.childLanes)!==0,ot||o){if(l=Ze,l!==null&&(g=Ch(l,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,Es(e,g),Vt(l,e,g),cf;Vo(),t=qy(e,t,a)}else e=u.treeContext,Fe=bn(g.nextSibling),xt=t,Ae=!0,Na=null,gn=!1,e!==null&&Em(t,e),t=Oo(t,l),t.flags|=4096;return t}return e=In(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function uf(e,t,a,l,o){return Cs(t),a=Vu(e,t,a,l,void 0,o),l=Yu(),e!==null&&!ot?(Pu(e,t,o),aa(e,t,o)):(Ae&&l&&_u(t),t.flags|=1,jt(e,t,a,o),t.child)}function Hy(e,t,a,l,o,u){return Cs(t),t.updateQueue=null,a=Vm(t,l,a,o),Gm(e),l=Yu(),e!==null&&!ot?(Pu(e,t,u),aa(e,t,u)):(Ae&&l&&_u(t),t.flags|=1,jt(e,t,a,u),t.child)}function Qy(e,t,a,l,o){if(Cs(t),t.stateNode===null){var u=Tl,g=a.contextType;typeof g=="object"&&g!==null&&(u=St(g)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=rf,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Uu(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?St(g):Tl,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(lf(t,a,g,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&rf.enqueueReplaceState(u,u.state,null),Ji(t,l,u,o),Zi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,w=Us(a,x);u.props=w;var H=u.context,X=a.contextType;g=Tl,typeof X=="object"&&X!==null&&(g=St(X));var I=a.getDerivedStateFromProps;X=typeof I=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,X||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||H!==g)&&Ty(t,u,l,g),Aa=!1;var G=t.memoizedState;u.state=G,Ji(t,l,u,o),Zi(),H=t.memoizedState,x||G!==H||Aa?(typeof I=="function"&&(lf(t,a,I,l),H=t.memoizedState),(w=Aa||wy(t,a,w,l,G,H,g))?(X||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=H),u.props=l,u.state=H,u.context=g,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,ku(e,t),g=t.memoizedProps,X=Us(a,g),u.props=X,I=t.pendingProps,G=u.context,H=a.contextType,w=Tl,typeof H=="object"&&H!==null&&(w=St(H)),x=a.getDerivedStateFromProps,(H=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==I||G!==w)&&Ty(t,u,l,w),Aa=!1,G=t.memoizedState,u.state=G,Ji(t,l,u,o),Zi();var V=t.memoizedState;g!==I||G!==V||Aa||e!==null&&e.dependencies!==null&&mo(e.dependencies)?(typeof x=="function"&&(lf(t,a,x,l),V=t.memoizedState),(X=Aa||wy(t,a,X,l,G,V,w)||e!==null&&e.dependencies!==null&&mo(e.dependencies))?(H||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,V,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,V,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=V),u.props=l,u.state=V,u.context=w,l=X):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,zo(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=zs(t,e.child,null,o),t.child=zs(t,null,a,o)):jt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=aa(e,t,o),e}function Gy(e,t,a,l){return Ts(),t.flags|=256,jt(e,t,a,l),t.child}var ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function df(e){return{baseLanes:e,cachePool:Am()}}function hf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=an),e}function Vy(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(o?Da(t):Ua(),(e=Fe)?(e=Ip(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Dn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=jm(e),a.return=t,t.child=a,xt=t,Fe=null)):e=null,e===null)throw Ca(t);return Jf(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,o?(Ua(),o=t.mode,x=Do({mode:"hidden",children:x},o),l=ws(l,o,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=df(a),l.childLanes=hf(e,g,a),t.memoizedState=ff,er(null,l)):(Da(t),mf(t,x))}var w=e.memoizedState;if(w!==null&&(x=w.dehydrated,x!==null)){if(u)t.flags&256?(Da(t),t.flags&=-257,t=yf(e,t,a)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),x=l.fallback,o=t.mode,l=Do({mode:"visible",children:l.children},o),x=ws(x,o,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,zs(t,e.child,null,a),l=t.child,l.memoizedState=df(a),l.childLanes=hf(e,g,a),t.memoizedState=ff,t=er(null,l));else if(Da(t),Jf(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var H=g.dgst;g=H,l=Error(r(419)),l.stack="",l.digest=g,Gi({value:l,source:null,stack:null}),t=yf(e,t,a)}else if(ot||Al(e,t,a,!1),g=(a&e.childLanes)!==0,ot||g){if(g=Ze,g!==null&&(l=Ch(g,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,Es(e,l),Vt(g,e,l),cf;Zf(x)||Vo(),t=yf(e,t,a)}else Zf(x)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Fe=bn(x.nextSibling),xt=t,Ae=!0,Na=null,gn=!1,e!==null&&Em(t,e),t=mf(t,l.children),t.flags|=4096);return t}return o?(Ua(),x=l.fallback,o=t.mode,w=e.child,H=w.sibling,l=In(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,H!==null?x=In(H,x):(x=ws(x,o,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,er(null,l),l=t.child,x=e.child.memoizedState,x===null?x=df(a):(o=x.cachePool,o!==null?(w=it._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=Am(),x={baseLanes:x.baseLanes|a,cachePool:o}),l.memoizedState=x,l.childLanes=hf(e,g,a),t.memoizedState=ff,er(e.child,l)):(Da(t),a=e.child,e=a.sibling,a=In(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function mf(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function yf(e,t,a){return zs(t,e.child,null,a),e=mf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yy(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Cu(e.return,t,a)}function pf(e,t,a,l,o,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=o,g.treeForkCount=u)}function Py(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var g=at.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,ae(at,g),jt(e,t,l,a),l=Ae?Qi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yy(e,a,t);else if(e.tag===19)Yy(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&jo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),pf(t,!1,o,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}pf(t,!0,a,null,u,l);break;case"together":pf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ba|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Al(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=In(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=In(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mo(e)))}function kx(e,t,a){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),Ma(t,it,e.memoizedState.cache),Ts();break;case 27:case 5:un(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Da(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Vy(e,t,a):(Da(t),e=aa(e,t,a),e!==null?e.sibling:null);Da(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Al(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Py(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(at,at.current),l)break;return null;case 22:return t.lanes=0,Ly(e,t,a,t.pendingProps);case 24:Ma(t,it,e.memoizedState.cache)}return aa(e,t,a)}function Ky(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!gf(e,a)&&(t.flags&128)===0)return ot=!1,kx(e,t,a);ot=(e.flags&131072)!==0}else ot=!1,Ae&&(t.flags&1048576)!==0&&_m(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")Su(e)?(l=Us(e,l),t.tag=1,t=Qy(null,t,e,l,a)):(t.tag=0,t=uf(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===N){t.tag=11,t=Dy(null,t,e,l,a);break e}else if(o===D){t.tag=14,t=Uy(null,t,e,l,a);break e}}throw t=ee(e)||e,Error(r(306,t,""))}}return t;case 0:return uf(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=Us(l,t.pendingProps),Qy(e,t,l,o,a);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,ku(e,t),Ji(t,l,null,a);var g=t.memoizedState;if(l=g.cache,Ma(t,it,l),l!==u.cache&&Mu(t,[it],a,!0),Zi(),l=g.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Gy(e,t,l,a);break e}else if(l!==o){o=mn(Error(r(424)),t),Gi(o),t=Gy(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=bn(e.firstChild),xt=t,Ae=!0,Na=null,gn=!0,a=Lm(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ts(),l===o){t=aa(e,t,a);break e}jt(e,t,l,a)}t=t.child}return t;case 26:return zo(e,t),e===null?(a=ag(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ae||(a=t.type,e=t.pendingProps,l=Fo(me.current).createElement(a),l[bt]=t,l[Lt]=e,Rt(l,a,e),yt(l),t.stateNode=l):t.memoizedState=ag(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return un(t),e===null&&Ae&&(l=t.stateNode=eg(t.type,t.pendingProps,me.current),xt=t,gn=!0,o=Fe,Va(t.type)?(Ff=o,Fe=bn(l.firstChild)):Fe=o),jt(e,t,t.pendingProps.children,a),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((o=l=Fe)&&(l=d1(l,t.type,t.pendingProps,gn),l!==null?(t.stateNode=l,xt=t,Fe=bn(l.firstChild),gn=!1,o=!0):o=!1),o||Ca(t)),un(t),o=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,l=u.children,Pf(o,u)?l=null:g!==null&&Pf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Vu(e,t,Tx,null,null,a),yr._currentValue=o),zo(e,t),jt(e,t,l,a),t.child;case 6:return e===null&&Ae&&((e=a=Fe)&&(a=h1(a,t.pendingProps,gn),a!==null?(t.stateNode=a,xt=t,Fe=null,e=!0):e=!1),e||Ca(t)),null;case 13:return Vy(e,t,a);case 4:return He(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=zs(t,null,l,a):jt(e,t,l,a),t.child;case 11:return Dy(e,t,t.type,t.pendingProps,a);case 7:return jt(e,t,t.pendingProps,a),t.child;case 8:return jt(e,t,t.pendingProps.children,a),t.child;case 12:return jt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Ma(t,t.type,l.value),jt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Cs(t),o=St(o),l=l(o),t.flags|=1,jt(e,t,l,a),t.child;case 14:return Uy(e,t,t.type,t.pendingProps,a);case 15:return ky(e,t,t.type,t.pendingProps,a);case 19:return Py(e,t,a);case 31:return Ux(e,t,a);case 22:return Ly(e,t,a,t.pendingProps);case 24:return Cs(t),l=St(it),e===null?(o=zu(),o===null&&(o=Ze,u=Au(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},Uu(t),Ma(t,it,o)):((e.lanes&a)!==0&&(ku(e,t),Ji(t,null,null,a),Zi()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ma(t,it,l)):(l=u.cache,Ma(t,it,l),l!==o.cache&&Mu(t,[it],a,!0))),jt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function sa(e){e.flags|=4}function vf(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(bp())e.flags|=8192;else throw Os=vo,Du}else e.flags&=-16777217}function Xy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!og(t))if(bp())e.flags|=8192;else throw Os=vo,Du}function Uo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wh():536870912,e.lanes|=t,Vl|=t)}function tr(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Lx(e,t,a){var l=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ea(it),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Tu())),Ie(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(sa(t),u!==null?(Ie(t),Xy(t,u)):(Ie(t),vf(t,o,null,l,a))):u?u!==e.memoizedState?(sa(t),Ie(t),Xy(t,u)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&sa(t),Ie(t),vf(t,o,e,l,a)),null;case 27:if(kt(t),a=me.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}e=se.current,Ml(t)?wm(t):(e=eg(o,l,a),t.stateNode=e,sa(t))}return Ie(t),null;case 5:if(kt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}if(u=se.current,Ml(t))wm(t);else{var g=Fo(me.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?g.createElement(o,{is:l.is}):g.createElement(o)}}u[bt]=t,u[Lt]=l;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Rt(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&sa(t)}}return Ie(t),vf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Ml(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=xt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[bt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Vp(e.nodeValue,a)),e||Ca(t,!0)}else e=Fo(e).createTextNode(l),e[bt]=t,t.stateNode=e}return Ie(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ml(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[bt]=t}else Ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else a=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(tn(t),t):(tn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ie(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ml(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[bt]=t}else Ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),o=!1}else o=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(tn(t),t):(tn(t),null)}return tn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Uo(t,t.updateQueue),Ie(t),null);case 4:return ge(),e===null&&Hf(t.stateNode.containerInfo),Ie(t),null;case 10:return ea(t.type),Ie(t),null;case 19:if(F(at),l=t.memoizedState,l===null)return Ie(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)tr(l,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=jo(e),u!==null){for(t.flags|=128,tr(l,!1),e=u.updateQueue,t.updateQueue=e,Uo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Sm(a,e),a=a.sibling;return ae(at,at.current&1|2),Ae&&$n(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&_t()>Ho&&(t.flags|=128,o=!0,tr(l,!1),t.lanes=4194304)}else{if(!o)if(e=jo(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Uo(t,e),tr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ae)return Ie(t),null}else 2*_t()-l.renderingStartTime>Ho&&a!==536870912&&(t.flags|=128,o=!0,tr(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=_t(),e.sibling=null,a=at.current,ae(at,o?a&1|2:a&1),Ae&&$n(t,l.treeForkCount),e):(Ie(t),null);case 22:case 23:return tn(t),Hu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),a=t.updateQueue,a!==null&&Uo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&F(Ms),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ea(it),Ie(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Bx(e,t){switch(Eu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(it),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return kt(t),null;case 31:if(t.memoizedState!==null){if(tn(t),t.alternate===null)throw Error(r(340));Ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(at),null;case 4:return ge(),null;case 10:return ea(t.type),null;case 22:case 23:return tn(t),Hu(),e!==null&&F(Ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(it),null;case 25:return null;default:return null}}function Zy(e,t){switch(Eu(t),t.tag){case 3:ea(it),ge();break;case 26:case 27:case 5:kt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&tn(t);break;case 13:tn(t);break;case 19:F(at);break;case 10:ea(t.type);break;case 22:case 23:tn(t),Hu(),e!==null&&F(Ms);break;case 24:ea(it)}}function nr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var u=a.create,g=a.inst;l=u(),g.destroy=l}a=a.next}while(a!==o)}}catch(x){qe(t,t.return,x)}}function ka(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var g=l.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,o=t;var w=a,H=x;try{H()}catch(X){qe(o,w,X)}}}l=l.next}while(l!==u)}}catch(X){qe(t,t.return,X)}}function Jy(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{qm(t,a)}catch(l){qe(e,e.return,l)}}}function Fy(e,t,a){a.props=Us(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){qe(e,t,l)}}function ar(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){qe(e,t,o)}}function kn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){qe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){qe(e,t,o)}else a.current=null}function Iy(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){qe(e,e.return,o)}}function bf(e,t,a){try{var l=e.stateNode;i1(l,e.type,a,t),l[Lt]=t}catch(o){qe(e,e.return,o)}}function $y(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Va(e.type)||e.tag===4}function xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$y(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Va(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Jn));else if(l!==4&&(l===27&&Va(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sf(e,t,a),e=e.sibling;e!==null;)Sf(e,t,a),e=e.sibling}function ko(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Va(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ko(e,t,a),e=e.sibling;e!==null;)ko(e,t,a),e=e.sibling}function Wy(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Rt(t,l,a),t[bt]=e,t[Lt]=a}catch(u){qe(e,e.return,u)}}var la=!1,ct=!1,jf=!1,ep=typeof WeakSet=="function"?WeakSet:Set,pt=null;function qx(e,t){if(e=e.containerInfo,Vf=ac,e=dm(e),mu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,x=-1,w=-1,H=0,X=0,I=e,G=null;t:for(;;){for(var V;I!==a||o!==0&&I.nodeType!==3||(x=g+o),I!==u||l!==0&&I.nodeType!==3||(w=g+l),I.nodeType===3&&(g+=I.nodeValue.length),(V=I.firstChild)!==null;)G=I,I=V;for(;;){if(I===e)break t;if(G===a&&++H===o&&(x=g),G===u&&++X===l&&(w=g),(V=I.nextSibling)!==null)break;I=G,G=I.parentNode}I=V}a=x===-1||w===-1?null:{start:x,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yf={focusedElem:e,selectionRange:a},ac=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ce=Us(a.type,o);e=l.getSnapshotBeforeUpdate(ce,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){qe(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Xf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function tp(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ra(e,a),l&4&&nr(5,a);break;case 1:if(ra(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){qe(a,a.return,g)}else{var o=Us(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){qe(a,a.return,g)}}l&64&&Jy(a),l&512&&ar(a,a.return);break;case 3:if(ra(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{qm(e,t)}catch(g){qe(a,a.return,g)}}break;case 27:t===null&&l&4&&Wy(a);case 26:case 5:ra(e,a),t===null&&l&4&&Iy(a),l&512&&ar(a,a.return);break;case 12:ra(e,a);break;case 31:ra(e,a),l&4&&sp(e,a);break;case 13:ra(e,a),l&4&&lp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Zx.bind(null,a),m1(e,a))));break;case 22:if(l=a.memoizedState!==null||la,!l){t=t!==null&&t.memoizedState!==null||ct,o=la;var u=ct;la=l,(ct=t)&&!u?oa(e,a,(a.subtreeFlags&8772)!==0):ra(e,a),la=o,ct=u}break;case 30:break;default:ra(e,a)}}function np(e){var t=e.alternate;t!==null&&(e.alternate=null,np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ic(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $e=null,qt=!1;function ia(e,t,a){for(a=a.child;a!==null;)ap(e,t,a),a=a.sibling}function ap(e,t,a){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(Ti,a)}catch{}switch(a.tag){case 26:ct||kn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||kn(a,t);var l=$e,o=qt;Va(a.type)&&($e=a.stateNode,qt=!1),ia(e,t,a),dr(a.stateNode),$e=l,qt=o;break;case 5:ct||kn(a,t);case 6:if(l=$e,o=qt,$e=null,ia(e,t,a),$e=l,qt=o,$e!==null)if(qt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(u){qe(a,t,u)}else try{$e.removeChild(a.stateNode)}catch(u){qe(a,t,u)}break;case 18:$e!==null&&(qt?(e=$e,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Il(e)):Jp($e,a.stateNode));break;case 4:l=$e,o=qt,$e=a.stateNode.containerInfo,qt=!0,ia(e,t,a),$e=l,qt=o;break;case 0:case 11:case 14:case 15:ka(2,a,t),ct||ka(4,a,t),ia(e,t,a);break;case 1:ct||(kn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Fy(a,t,l)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:ct=(l=ct)||a.memoizedState!==null,ia(e,t,a),ct=l;break;default:ia(e,t,a)}}function sp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(a){qe(t,t.return,a)}}}function lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(a){qe(t,t.return,a)}}function Hx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ep),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ep),t;default:throw Error(r(435,e.tag))}}function Lo(e,t){var a=Hx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Jx.bind(null,e,l);l.then(o,o)}})}function Ht(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],u=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(Va(x.type)){$e=x.stateNode,qt=!1;break e}break;case 5:$e=x.stateNode,qt=!1;break e;case 3:case 4:$e=x.stateNode.containerInfo,qt=!0;break e}x=x.return}if($e===null)throw Error(r(160));ap(u,g,o),$e=null,qt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ip(t,e),t=t.sibling}var _n=null;function ip(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Qt(e),l&4&&(ka(3,e,e.return),nr(3,e),ka(5,e,e.return));break;case 1:Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),l&64&&la&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=_n;if(Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Mi]||u[bt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),Rt(u,l,a),u[bt]=e,yt(u),l=u;break e;case"link":var g=ig("link","href",o).get(l+(a.href||""));if(g){for(var x=0;x<g.length;x++)if(u=g[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(x,1);break t}}u=o.createElement(l),Rt(u,l,a),o.head.appendChild(u);break;case"meta":if(g=ig("meta","content",o).get(l+(a.content||""))){for(x=0;x<g.length;x++)if(u=g[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(x,1);break t}}u=o.createElement(l),Rt(u,l,a),o.head.appendChild(u);break;default:throw Error(r(468,l))}u[bt]=e,yt(u),l=u}e.stateNode=l}else rg(o,e.type,e.stateNode);else e.stateNode=lg(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?rg(o,e.type,e.stateNode):lg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&bf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),a!==null&&l&4&&bf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),e.flags&32){o=e.stateNode;try{xl(o,"")}catch(ce){qe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,bf(e,o,a!==null?a.memoizedProps:o)),l&1024&&(jf=!0);break;case 6:if(Ht(t,e),Qt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ce){qe(e,e.return,ce)}}break;case 3:if(Wo=null,o=_n,_n=Io(t.containerInfo),Ht(t,e),_n=o,Qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(ce){qe(e,e.return,ce)}jf&&(jf=!1,rp(e));break;case 4:l=_n,_n=Io(e.stateNode.containerInfo),Ht(t,e),Qt(e),_n=l;break;case 12:Ht(t,e),Qt(e);break;case 31:Ht(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 13:Ht(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qo=_t()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,H=la,X=ct;if(la=H||o,ct=X||w,Ht(t,e),ct=X,la=H,Qt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||la||ct||ks(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=w.stateNode;var I=w.memoizedProps.style,G=I!=null&&I.hasOwnProperty("display")?I.display:null;x.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ce){qe(w,w.return,ce)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(ce){qe(w,w.return,ce)}}}else if(t.tag===18){if(a===null){w=t;try{var V=w.stateNode;o?Fp(V,!0):Fp(w.stateNode,!1)}catch(ce){qe(w,w.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Lo(e,a))));break;case 19:Ht(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 30:break;case 21:break;default:Ht(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if($y(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,u=xf(e);ko(e,u,o);break;case 5:var g=a.stateNode;a.flags&32&&(xl(g,""),a.flags&=-33);var x=xf(e);ko(e,x,g);break;case 3:case 4:var w=a.stateNode.containerInfo,H=xf(e);Sf(e,H,w);break;default:throw Error(r(161))}}catch(X){qe(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tp(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ka(4,t,t.return),ks(t);break;case 1:kn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Fy(t,t.return,a),ks(t);break;case 27:dr(t.stateNode);case 26:case 5:kn(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:oa(o,u,a),nr(4,u);break;case 1:if(oa(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){qe(l,l.return,H)}if(l=u,o=l.updateQueue,o!==null){var x=l.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)Bm(w[o],x)}catch(H){qe(l,l.return,H)}}a&&g&64&&Jy(u),ar(u,u.return);break;case 27:Wy(u);case 26:case 5:oa(o,u,a),a&&l===null&&g&4&&Iy(u),ar(u,u.return);break;case 12:oa(o,u,a);break;case 31:oa(o,u,a),a&&g&4&&sp(o,u);break;case 13:oa(o,u,a),a&&g&4&&lp(o,u);break;case 22:u.memoizedState===null&&oa(o,u,a),ar(u,u.return);break;case 30:break;default:oa(o,u,a)}t=t.sibling}}function Rf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Vi(a))}function _f(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vi(e))}function En(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)op(e,t,a,l),t=t.sibling}function op(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,a,l),o&2048&&nr(9,t);break;case 1:En(e,t,a,l);break;case 3:En(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vi(e)));break;case 12:if(o&2048){En(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,x=u.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){qe(t,t.return,w)}}else En(e,t,a,l);break;case 31:En(e,t,a,l);break;case 13:En(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?En(e,t,a,l):sr(e,t):u._visibility&2?En(e,t,a,l):(u._visibility|=2,Hl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Rf(g,t);break;case 24:En(e,t,a,l),o&2048&&_f(t.alternate,t);break;default:En(e,t,a,l)}}function Hl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,x=a,w=l,H=g.flags;switch(g.tag){case 0:case 11:case 15:Hl(u,g,x,w,o),nr(8,g);break;case 23:break;case 22:var X=g.stateNode;g.memoizedState!==null?X._visibility&2?Hl(u,g,x,w,o):sr(u,g):(X._visibility|=2,Hl(u,g,x,w,o)),o&&H&2048&&Rf(g.alternate,g);break;case 24:Hl(u,g,x,w,o),o&&H&2048&&_f(g.alternate,g);break;default:Hl(u,g,x,w,o)}t=t.sibling}}function sr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:sr(a,l),o&2048&&Rf(l.alternate,l);break;case 24:sr(a,l),o&2048&&_f(l.alternate,l);break;default:sr(a,l)}t=t.sibling}}var lr=8192;function Ql(e,t,a){if(e.subtreeFlags&lr)for(e=e.child;e!==null;)cp(e,t,a),e=e.sibling}function cp(e,t,a){switch(e.tag){case 26:Ql(e,t,a),e.flags&lr&&e.memoizedState!==null&&w1(a,_n,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,a);break;case 3:case 4:var l=_n;_n=Io(e.stateNode.containerInfo),Ql(e,t,a),_n=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=lr,lr=16777216,Ql(e,t,a),lr=l):Ql(e,t,a));break;default:Ql(e,t,a)}}function up(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ir(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];pt=l,dp(l,e)}up(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fp(e),e=e.sibling}function fp(e){switch(e.tag){case 0:case 11:case 15:ir(e),e.flags&2048&&ka(9,e,e.return);break;case 3:ir(e);break;case 12:ir(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bo(e)):ir(e);break;default:ir(e)}}function Bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];pt=l,dp(l,e)}up(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ka(8,t,t.return),Bo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Bo(t));break;default:Bo(t)}e=e.sibling}}function dp(e,t){for(;pt!==null;){var a=pt;switch(a.tag){case 0:case 11:case 15:ka(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Vi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,pt=l;else e:for(a=e;pt!==null;){l=pt;var o=l.sibling,u=l.return;if(np(l),l===a){pt=null;break e}if(o!==null){o.return=u,pt=o;break e}pt=u}}}var Qx={getCacheForType:function(e){var t=St(it),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return St(it).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ze=null,_e=null,Te=0,Be=0,nn=null,La=!1,Gl=!1,Ef=!1,ca=0,tt=0,Ba=0,Ls=0,wf=0,an=0,Vl=0,rr=null,Gt=null,Tf=!1,qo=0,hp=0,Ho=1/0,Qo=null,qa=null,dt=0,Ha=null,Yl=null,ua=0,Nf=0,Cf=null,mp=null,or=0,Mf=null;function sn(){return(ke&2)!==0&&Te!==0?Te&-Te:L.T!==null?kf():Mh()}function yp(){if(an===0)if((Te&536870912)===0||Ae){var e=Zr;Zr<<=1,(Zr&3932160)===0&&(Zr=262144),an=e}else an=536870912;return e=en.current,e!==null&&(e.flags|=32),an}function Vt(e,t,a){(e===Ze&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Pl(e,0),Qa(e,Te,an,!1)),Ci(e,a),((ke&2)===0||e!==Ze)&&(e===Ze&&((ke&2)===0&&(Ls|=a),tt===4&&Qa(e,Te,an,!1)),Ln(e))}function pp(e,t,a){if((ke&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ni(e,t),o=l?Px(e,t):Of(e,t,!0),u=l;do{if(o===0){Gl&&!l&&Qa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Vx(a)){o=Of(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;o=rr;var w=x.current.memoizedState.isDehydrated;if(w&&(Pl(x,g).flags|=256),g=Of(x,g,!1),g!==2){if(Ef&&!w){x.errorRecoveryDisabledLanes|=u,Ls|=u,o=4;break e}u=Gt,Gt=o,u!==null&&(Gt===null?Gt=u:Gt.push.apply(Gt,u))}o=g}if(u=!1,o!==2)continue}}if(o===1){Pl(e,0),Qa(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Qa(l,t,an,!La);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=qo+300-_t(),10<o)){if(Qa(l,t,an,!La),Fr(l,0,!0)!==0)break e;ua=t,l.timeoutHandle=Xp(gp.bind(null,l,a,Gt,Qo,Tf,t,an,Ls,Vl,La,u,"Throttled",-0,0),o);break e}gp(l,a,Gt,Qo,Tf,t,an,Ls,Vl,La,u,null,-0,0)}}break}while(!0);Ln(e)}function gp(e,t,a,l,o,u,g,x,w,H,X,I,G,V){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jn},cp(t,u,I);var ce=(u&62914560)===u?qo-_t():(u&4194048)===u?hp-_t():0;if(ce=T1(I,ce),ce!==null){ua=u,e.cancelPendingCommit=ce(Ep.bind(null,e,t,u,a,l,o,g,x,w,X,I,null,G,V)),Qa(e,u,g,!H);return}}Ep(e,t,u,a,l,o,g,x,w)}function Vx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],u=o.getSnapshot;o=o.value;try{if(!$t(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qa(e,t,a,l){t&=~wf,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-It(o),g=1<<u;l[u]=-1,o&=~g}a!==0&&Th(e,a,t)}function Go(){return(ke&6)===0?(cr(0),!1):!0}function Af(){if(_e!==null){if(Be===0)var e=_e.return;else e=_e,Wn=Ns=null,Ku(e),Ul=null,Pi=0,e=_e;for(;e!==null;)Zy(e.alternate,e),e=e.return;_e=null}}function Pl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,c1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ua=0,Af(),Ze=e,_e=a=In(e.current,null),Te=t,Be=0,nn=null,La=!1,Gl=Ni(e,t),Ef=!1,Vl=an=wf=Ls=Ba=tt=0,Gt=rr=null,Tf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-It(l),u=1<<o;t|=e[o],l&=~u}return ca=t,oo(),a}function vp(e,t){be=null,L.H=Wi,t===Dl||t===go?(t=Dm(),Be=3):t===Du?(t=Dm(),Be=4):Be=t===cf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nn=t,_e===null&&(tt=1,Ao(e,mn(t,e.current)))}function bp(){var e=en.current;return e===null?!0:(Te&4194048)===Te?vn===null:(Te&62914560)===Te||(Te&536870912)!==0?e===vn:!1}function xp(){var e=L.H;return L.H=Wi,e===null?Wi:e}function Sp(){var e=L.A;return L.A=Qx,e}function Vo(){tt=4,La||(Te&4194048)!==Te&&en.current!==null||(Gl=!0),(Ba&134217727)===0&&(Ls&134217727)===0||Ze===null||Qa(Ze,Te,an,!1)}function Of(e,t,a){var l=ke;ke|=2;var o=xp(),u=Sp();(Ze!==e||Te!==t)&&(Qo=null,Pl(e,t)),t=!1;var g=tt;e:do try{if(Be!==0&&_e!==null){var x=_e,w=nn;switch(Be){case 8:Af(),g=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(t=!0);var H=Be;if(Be=0,nn=null,Kl(e,x,w,H),a&&Gl){g=0;break e}break;default:H=Be,Be=0,nn=null,Kl(e,x,w,H)}}Yx(),g=tt;break}catch(X){vp(e,X)}while(!0);return t&&e.shellSuspendCounter++,Wn=Ns=null,ke=l,L.H=o,L.A=u,_e===null&&(Ze=null,Te=0,oo()),g}function Yx(){for(;_e!==null;)jp(_e)}function Px(e,t){var a=ke;ke|=2;var l=xp(),o=Sp();Ze!==e||Te!==t?(Qo=null,Ho=_t()+500,Pl(e,t)):Gl=Ni(e,t);e:do try{if(Be!==0&&_e!==null){t=_e;var u=nn;t:switch(Be){case 1:Be=0,nn=null,Kl(e,t,u,1);break;case 2:case 9:if(Om(u)){Be=0,nn=null,Rp(t);break}t=function(){Be!==2&&Be!==9||Ze!==e||(Be=7),Ln(e)},u.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Om(u)?(Be=0,nn=null,Rp(t)):(Be=0,nn=null,Kl(e,t,u,7));break;case 5:var g=null;switch(_e.tag){case 26:g=_e.memoizedState;case 5:case 27:var x=_e;if(g?og(g):x.stateNode.complete){Be=0,nn=null;var w=x.sibling;if(w!==null)_e=w;else{var H=x.return;H!==null?(_e=H,Yo(H)):_e=null}break t}}Be=0,nn=null,Kl(e,t,u,5);break;case 6:Be=0,nn=null,Kl(e,t,u,6);break;case 8:Af(),tt=6;break e;default:throw Error(r(462))}}Kx();break}catch(X){vp(e,X)}while(!0);return Wn=Ns=null,L.H=l,L.A=o,ke=a,_e!==null?0:(Ze=null,Te=0,oo(),tt)}function Kx(){for(;_e!==null&&!Kr();)jp(_e)}function jp(e){var t=Ky(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?Yo(e):_e=t}function Rp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Hy(a,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Hy(a,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:Ku(t);default:Zy(a,t),t=_e=Sm(t,ca),t=Ky(a,t,ca)}e.memoizedProps=e.pendingProps,t===null?Yo(e):_e=t}function Kl(e,t,a,l){Wn=Ns=null,Ku(t),Ul=null,Pi=0;var o=t.return;try{if(Dx(e,o,t,a,Te)){tt=1,Ao(e,mn(a,e.current)),_e=null;return}}catch(u){if(o!==null)throw _e=o,u;tt=1,Ao(e,mn(a,e.current)),_e=null;return}t.flags&32768?(Ae||l===1?e=!0:Gl||(Te&536870912)!==0?e=!1:(La=e=!0,(l===2||l===9||l===3||l===6)&&(l=en.current,l!==null&&l.tag===13&&(l.flags|=16384))),_p(t,e)):Yo(t)}function Yo(e){var t=e;do{if((t.flags&32768)!==0){_p(t,La);return}e=t.return;var a=Lx(t.alternate,t,ca);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);tt===0&&(tt=5)}function _p(e,t){do{var a=Bx(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);tt=6,_e=null}function Ep(e,t,a,l,o,u,g,x,w){e.cancelPendingCommit=null;do Po();while(dt!==0);if((ke&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=bu,Eb(e,a,u,g,x,w),e===Ze&&(_e=Ze=null,Te=0),Yl=t,Ha=e,ua=a,Nf=u,Cf=o,mp=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fx(hl,function(){return Mp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=K.p,K.p=2,g=ke,ke|=4;try{qx(e,t,a)}finally{ke=g,K.p=o,L.T=l}}dt=1,wp(),Tp(),Np()}}function wp(){if(dt===1){dt=0;var e=Ha,t=Yl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=K.p;K.p=2;var o=ke;ke|=4;try{ip(t,e);var u=Yf,g=dm(e.containerInfo),x=u.focusedElem,w=u.selectionRange;if(g!==x&&x&&x.ownerDocument&&fm(x.ownerDocument.documentElement,x)){if(w!==null&&mu(x)){var H=w.start,X=w.end;if(X===void 0&&(X=H),"selectionStart"in x)x.selectionStart=H,x.selectionEnd=Math.min(X,x.value.length);else{var I=x.ownerDocument||document,G=I&&I.defaultView||window;if(G.getSelection){var V=G.getSelection(),ce=x.textContent.length,pe=Math.min(w.start,ce),Ye=w.end===void 0?pe:Math.min(w.end,ce);!V.extend&&pe>Ye&&(g=Ye,Ye=pe,pe=g);var U=um(x,pe),M=um(x,Ye);if(U&&M&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var q=I.createRange();q.setStart(U.node,U.offset),V.removeAllRanges(),pe>Ye?(V.addRange(q),V.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),V.addRange(q))}}}}for(I=[],V=x;V=V.parentNode;)V.nodeType===1&&I.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<I.length;x++){var J=I[x];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}ac=!!Vf,Yf=Vf=null}finally{ke=o,K.p=l,L.T=a}}e.current=t,dt=2}}function Tp(){if(dt===2){dt=0;var e=Ha,t=Yl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=K.p;K.p=2;var o=ke;ke|=4;try{tp(e,t.alternate,t)}finally{ke=o,K.p=l,L.T=a}}dt=3}}function Np(){if(dt===4||dt===3){dt=0,Kc();var e=Ha,t=Yl,a=ua,l=mp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Yl=Ha=null,Cp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(qa=null),Jc(a),t=t.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(Ti,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=K.p,K.p=2,L.T=null;try{for(var u=e.onRecoverableError,g=0;g<l.length;g++){var x=l[g];u(x.value,{componentStack:x.stack})}}finally{L.T=t,K.p=o}}(ua&3)!==0&&Po(),Ln(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Mf?or++:(or=0,Mf=e):or=0,cr(0)}}function Cp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vi(t)))}function Po(){return wp(),Tp(),Np(),Mp()}function Mp(){if(dt!==5)return!1;var e=Ha,t=Nf;Nf=0;var a=Jc(ua),l=L.T,o=K.p;try{K.p=32>a?32:a,L.T=null,a=Cf,Cf=null;var u=Ha,g=ua;if(dt=0,Yl=Ha=null,ua=0,(ke&6)!==0)throw Error(r(331));var x=ke;if(ke|=4,fp(u.current),op(u,u.current,g,a),ke=x,cr(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(Ti,u)}catch{}return!0}finally{K.p=o,L.T=l,Cp(e,t)}}function Ap(e,t,a){t=mn(a,t),t=of(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Ci(e,2),Ln(e))}function qe(e,t,a){if(e.tag===3)Ap(e,e,a);else for(;t!==null;){if(t.tag===3){Ap(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(qa===null||!qa.has(l))){e=mn(a,e),a=Oy(2),l=za(t,a,2),l!==null&&(zy(a,l,t,e),Ci(l,2),Ln(l));break}}t=t.return}}function zf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Gx;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Ef=!0,o.add(a),e=Xx.bind(null,e,t,a),t.then(e,e))}function Xx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ze===e&&(Te&a)===a&&(tt===4||tt===3&&(Te&62914560)===Te&&300>_t()-qo?(ke&2)===0&&Pl(e,0):wf|=a,Vl===Te&&(Vl=0)),Ln(e)}function Op(e,t){t===0&&(t=wh()),e=Es(e,t),e!==null&&(Ci(e,t),Ln(e))}function Zx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Op(e,a)}function Jx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Op(e,a)}function Fx(e,t){return jn(e,t)}var Ko=null,Xl=null,Df=!1,Xo=!1,Uf=!1,Ga=0;function Ln(e){e!==Xl&&e.next===null&&(Xl===null?Ko=Xl=e:Xl=Xl.next=e),Xo=!0,Df||(Df=!0,$x())}function cr(e,t){if(!Uf&&Xo){Uf=!0;do for(var a=!1,l=Ko;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var g=l.suspendedLanes,x=l.pingedLanes;u=(1<<31-It(42|e)+1)-1,u&=o&~(g&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,kp(l,u))}else u=Te,u=Fr(l,l===Ze?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Ni(l,u)||(a=!0,kp(l,u));l=l.next}while(a);Uf=!1}}function Ix(){zp()}function zp(){Xo=Df=!1;var e=0;Ga!==0&&o1()&&(e=Ga);for(var t=_t(),a=null,l=Ko;l!==null;){var o=l.next,u=Dp(l,t);u===0?(l.next=null,a===null?Ko=o:a.next=o,o===null&&(Xl=a)):(a=l,(e!==0||(u&3)!==0)&&(Xo=!0)),l=o}dt!==0&&dt!==5||cr(e),Ga!==0&&(Ga=0)}function Dp(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-It(u),x=1<<g,w=o[g];w===-1?((x&a)===0||(x&l)!==0)&&(o[g]=_b(x,t)):w<=t&&(e.expiredLanes|=x),u&=~x}if(t=Ze,a=Te,a=Fr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&wi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ni(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&wi(l),Jc(a)){case 2:case 8:a=zn;break;case 32:a=hl;break;case 268435456:a=Eh;break;default:a=hl}return l=Up.bind(null,e),a=jn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&wi(l),e.callbackPriority=2,e.callbackNode=null,2}function Up(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Po()&&e.callbackNode!==a)return null;var l=Te;return l=Fr(e,e===Ze?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(pp(e,l,t),Dp(e,_t()),e.callbackNode!=null&&e.callbackNode===a?Up.bind(null,e):null)}function kp(e,t){if(Po())return null;pp(e,t,!0)}function $x(){u1(function(){(ke&6)!==0?jn(vt,Ix):zp()})}function kf(){if(Ga===0){var e=Ol;e===0&&(e=Xr,Xr<<=1,(Xr&261888)===0&&(Xr=256)),Ga=e}return Ga}function Lp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:eo(""+e)}function Bp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Wx(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=Lp((o[Lt]||null).action),g=l.submitter;g&&(t=(t=g[Lt]||null)?Lp(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var x=new so("action","action",null,l,o);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ga!==0){var w=g?Bp(o,g):new FormData(o);tf(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(x.preventDefault(),w=g?Bp(o,g):new FormData(o),tf(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var Lf=0;Lf<vu.length;Lf++){var Bf=vu[Lf],e1=Bf.toLowerCase(),t1=Bf[0].toUpperCase()+Bf.slice(1);Rn(e1,"on"+t1)}Rn(ym,"onAnimationEnd"),Rn(pm,"onAnimationIteration"),Rn(gm,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(gx,"onTransitionRun"),Rn(vx,"onTransitionStart"),Rn(bx,"onTransitionCancel"),Rn(vm,"onTransitionEnd"),vl("onMouseEnter",["mouseout","mouseover"]),vl("onMouseLeave",["mouseout","mouseover"]),vl("onPointerEnter",["pointerout","pointerover"]),vl("onPointerLeave",["pointerout","pointerover"]),Ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ur="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),n1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ur));function qp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var g=l.length-1;0<=g;g--){var x=l[g],w=x.instance,H=x.currentTarget;if(x=x.listener,w!==u&&o.isPropagationStopped())break e;u=x,o.currentTarget=H;try{u(o)}catch(X){ro(X)}o.currentTarget=null,u=w}else for(g=0;g<l.length;g++){if(x=l[g],w=x.instance,H=x.currentTarget,x=x.listener,w!==u&&o.isPropagationStopped())break e;u=x,o.currentTarget=H;try{u(o)}catch(X){ro(X)}o.currentTarget=null,u=w}}}}function Ee(e,t){var a=t[Fc];a===void 0&&(a=t[Fc]=new Set);var l=e+"__bubble";a.has(l)||(Hp(t,e,2,!1),a.add(l))}function qf(e,t,a){var l=0;t&&(l|=4),Hp(a,e,l,t)}var Zo="_reactListening"+Math.random().toString(36).slice(2);function Hf(e){if(!e[Zo]){e[Zo]=!0,zh.forEach(function(a){a!=="selectionchange"&&(n1.has(a)||qf(a,!1,e),qf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zo]||(t[Zo]=!0,qf("selectionchange",!1,t))}}function Hp(e,t,a,l){switch(yg(t)){case 2:var o=M1;break;case 8:o=A1;break;default:o=td}a=o.bind(null,t,a,e),o=void 0,!lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Qf(e,t,a,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var x=l.stateNode.containerInfo;if(x===o)break;if(g===4)for(g=l.return;g!==null;){var w=g.tag;if((w===3||w===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;x!==null;){if(g=yl(x),g===null)return;if(w=g.tag,w===5||w===6||w===26||w===27){l=u=g;continue e}x=x.parentNode}}l=l.return}Ph(function(){var H=u,X=au(a),I=[];e:{var G=bm.get(e);if(G!==void 0){var V=so,ce=e;switch(e){case"keypress":if(no(a)===0)break e;case"keydown":case"keyup":V=Jb;break;case"focusin":ce="focus",V=cu;break;case"focusout":ce="blur",V=cu;break;case"beforeblur":case"afterblur":V=cu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=$b;break;case ym:case pm:case gm:V=Hb;break;case vm:V=ex;break;case"scroll":case"scrollend":V=Ub;break;case"wheel":V=nx;break;case"copy":case"cut":case"paste":V=Gb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Fh;break;case"toggle":case"beforetoggle":V=sx}var pe=(t&4)!==0,Ye=!pe&&(e==="scroll"||e==="scrollend"),U=pe?G!==null?G+"Capture":null:G;pe=[];for(var M=H,q;M!==null;){var J=M;if(q=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||q===null||U===null||(J=Oi(M,U),J!=null&&pe.push(fr(M,J,q))),Ye)break;M=M.return}0<pe.length&&(G=new V(G,ce,null,a,X),I.push({event:G,listeners:pe}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",G&&a!==nu&&(ce=a.relatedTarget||a.fromElement)&&(yl(ce)||ce[ml]))break e;if((V||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,V?(ce=a.relatedTarget||a.toElement,V=H,ce=ce?yl(ce):null,ce!==null&&(Ye=d(ce),pe=ce.tag,ce!==Ye||pe!==5&&pe!==27&&pe!==6)&&(ce=null)):(V=null,ce=H),V!==ce)){if(pe=Zh,J="onMouseLeave",U="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Fh,J="onPointerLeave",U="onPointerEnter",M="pointer"),Ye=V==null?G:Ai(V),q=ce==null?G:Ai(ce),G=new pe(J,M+"leave",V,a,X),G.target=Ye,G.relatedTarget=q,J=null,yl(X)===H&&(pe=new pe(U,M+"enter",ce,a,X),pe.target=q,pe.relatedTarget=Ye,J=pe),Ye=J,V&&ce)t:{for(pe=a1,U=V,M=ce,q=0,J=U;J;J=pe(J))q++;J=0;for(var ye=M;ye;ye=pe(ye))J++;for(;0<q-J;)U=pe(U),q--;for(;0<J-q;)M=pe(M),J--;for(;q--;){if(U===M||M!==null&&U===M.alternate){pe=U;break t}U=pe(U),M=pe(M)}pe=null}else pe=null;V!==null&&Qp(I,G,V,pe,!1),ce!==null&&Ye!==null&&Qp(I,Ye,ce,pe,!0)}}e:{if(G=H?Ai(H):window,V=G.nodeName&&G.nodeName.toLowerCase(),V==="select"||V==="input"&&G.type==="file")var De=sm;else if(nm(G))if(lm)De=mx;else{De=dx;var fe=fx}else V=G.nodeName,!V||V.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&tu(H.elementType)&&(De=sm):De=hx;if(De&&(De=De(e,H))){am(I,De,a,X);break e}fe&&fe(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&eu(G,"number",G.value)}switch(fe=H?Ai(H):window,e){case"focusin":(nm(fe)||fe.contentEditable==="true")&&(_l=fe,yu=H,Hi=null);break;case"focusout":Hi=yu=_l=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,hm(I,a,X);break;case"selectionchange":if(px)break;case"keydown":case"keyup":hm(I,a,X)}var xe;if(fu)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Rl?em(e,a)&&(Ne="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ne="onCompositionStart");Ne&&(Ih&&a.locale!=="ko"&&(Rl||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Rl&&(xe=Kh()):(wa=X,iu="value"in wa?wa.value:wa.textContent,Rl=!0)),fe=Jo(H,Ne),0<fe.length&&(Ne=new Jh(Ne,e,null,a,X),I.push({event:Ne,listeners:fe}),xe?Ne.data=xe:(xe=tm(a),xe!==null&&(Ne.data=xe)))),(xe=ix?rx(e,a):ox(e,a))&&(Ne=Jo(H,"onBeforeInput"),0<Ne.length&&(fe=new Jh("onBeforeInput","beforeinput",null,a,X),I.push({event:fe,listeners:Ne}),fe.data=xe)),Wx(I,e,H,a,X)}qp(I,t)})}function fr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Jo(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Oi(e,a),o!=null&&l.unshift(fr(e,o,u)),o=Oi(e,t),o!=null&&l.push(fr(e,o,u))),e.tag===3)return l;e=e.return}return[]}function a1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qp(e,t,a,l,o){for(var u=t._reactName,g=[];a!==null&&a!==l;){var x=a,w=x.alternate,H=x.stateNode;if(x=x.tag,w!==null&&w===l)break;x!==5&&x!==26&&x!==27||H===null||(w=H,o?(H=Oi(a,u),H!=null&&g.unshift(fr(a,H,w))):o||(H=Oi(a,u),H!=null&&g.push(fr(a,H,w)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var s1=/\r\n?/g,l1=/\u0000|\uFFFD/g;function Gp(e){return(typeof e=="string"?e:""+e).replace(s1,`
65
- `).replace(l1,"")}function Vp(e,t){return t=Gp(t),Gp(e)===t}function Ve(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||xl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&xl(e,""+l);break;case"className":$r(e,"class",l);break;case"tabIndex":$r(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(e,a,l);break;case"style":Vh(e,l,u);break;case"data":if(t!=="object"){$r(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=eo(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=eo(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Jn);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=eo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),Ir(e,"popover",l);break;case"xlinkActuate":Zn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Zn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Zn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Zn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Zn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Zn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ir(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=zb.get(a)||a,Ir(e,a,l))}}function Gf(e,t,a,l,o,u){switch(a){case"style":Vh(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?xl(e,l):(typeof l=="number"||typeof l=="bigint")&&xl(e,""+l);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[Lt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ir(e,a,l)}}}function Rt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var l=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ve(e,t,u,g,a,null)}}o&&Ve(e,t,"srcSet",a.srcSet,a,null),l&&Ve(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var x=u=g=o=null,w=null,H=null;for(l in a)if(a.hasOwnProperty(l)){var X=a[l];if(X!=null)switch(l){case"name":o=X;break;case"type":g=X;break;case"checked":w=X;break;case"defaultChecked":H=X;break;case"value":u=X;break;case"defaultValue":x=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,t));break;default:Ve(e,t,l,X,a,null)}}qh(e,u,x,w,H,g,o,!1);return;case"select":Ee("invalid",e),l=g=u=null;for(o in a)if(a.hasOwnProperty(o)&&(x=a[o],x!=null))switch(o){case"value":u=x;break;case"defaultValue":g=x;break;case"multiple":l=x;default:Ve(e,t,o,x,a,null)}t=u,a=g,e.multiple=!!l,t!=null?bl(e,!!l,t,!1):a!=null&&bl(e,!!l,a,!0);return;case"textarea":Ee("invalid",e),u=o=l=null;for(g in a)if(a.hasOwnProperty(g)&&(x=a[g],x!=null))switch(g){case"value":l=x;break;case"defaultValue":o=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Ve(e,t,g,x,a,null)}Qh(e,l,o,u);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(l=a[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ve(e,t,w,l,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(l=0;l<ur.length;l++)Ee(ur[l],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in a)if(a.hasOwnProperty(H)&&(l=a[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ve(e,t,H,l,a,null)}return;default:if(tu(t)){for(X in a)a.hasOwnProperty(X)&&(l=a[X],l!==void 0&&Gf(e,t,X,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ve(e,t,x,l,a,null))}function i1(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,g=null,x=null,w=null,H=null,X=null;for(V in a){var I=a[V];if(a.hasOwnProperty(V)&&I!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":w=I;default:l.hasOwnProperty(V)||Ve(e,t,V,null,l,I)}}for(var G in l){var V=l[G];if(I=a[G],l.hasOwnProperty(G)&&(V!=null||I!=null))switch(G){case"type":u=V;break;case"name":o=V;break;case"checked":H=V;break;case"defaultChecked":X=V;break;case"value":g=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:V!==I&&Ve(e,t,G,V,l,I)}}Wc(e,g,x,w,H,X,u,o);return;case"select":V=g=x=G=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":V=w;default:l.hasOwnProperty(u)||Ve(e,t,u,null,l,w)}for(o in l)if(u=l[o],w=a[o],l.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":G=u;break;case"defaultValue":x=u;break;case"multiple":g=u;default:u!==w&&Ve(e,t,o,u,l,w)}t=x,a=g,l=V,G!=null?bl(e,!!a,G,!1):!!l!=!!a&&(t!=null?bl(e,!!a,t,!0):bl(e,!!a,a?[]:"",!1));return;case"textarea":V=G=null;for(x in a)if(o=a[x],a.hasOwnProperty(x)&&o!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ve(e,t,x,null,l,o)}for(g in l)if(o=l[g],u=a[g],l.hasOwnProperty(g)&&(o!=null||u!=null))switch(g){case"value":G=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==u&&Ve(e,t,g,o,l,u)}Hh(e,G,V);return;case"option":for(var ce in a)if(G=a[ce],a.hasOwnProperty(ce)&&G!=null&&!l.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Ve(e,t,ce,null,l,G)}for(w in l)if(G=l[w],V=a[w],l.hasOwnProperty(w)&&G!==V&&(G!=null||V!=null))switch(w){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ve(e,t,w,G,l,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in a)G=a[pe],a.hasOwnProperty(pe)&&G!=null&&!l.hasOwnProperty(pe)&&Ve(e,t,pe,null,l,G);for(H in l)if(G=l[H],V=a[H],l.hasOwnProperty(H)&&G!==V&&(G!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ve(e,t,H,G,l,V)}return;default:if(tu(t)){for(var Ye in a)G=a[Ye],a.hasOwnProperty(Ye)&&G!==void 0&&!l.hasOwnProperty(Ye)&&Gf(e,t,Ye,void 0,l,G);for(X in l)G=l[X],V=a[X],!l.hasOwnProperty(X)||G===V||G===void 0&&V===void 0||Gf(e,t,X,G,l,V);return}}for(var U in a)G=a[U],a.hasOwnProperty(U)&&G!=null&&!l.hasOwnProperty(U)&&Ve(e,t,U,null,l,G);for(I in l)G=l[I],V=a[I],!l.hasOwnProperty(I)||G===V||G==null&&V==null||Ve(e,t,I,G,l,V)}function Yp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function r1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],u=o.transferSize,g=o.initiatorType,x=o.duration;if(u&&x&&Yp(g)){for(g=0,x=o.responseEnd,l+=1;l<a.length;l++){var w=a[l],H=w.startTime;if(H>x)break;var X=w.transferSize,I=w.initiatorType;X&&Yp(I)&&(w=w.responseEnd,g+=X*(w<x?1:(x-H)/(w-H)))}if(--l,t+=8*(u+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Vf=null,Yf=null;function Fo(e){return e.nodeType===9?e:e.ownerDocument}function Pp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Pf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Kf=null;function o1(){var e=window.event;return e&&e.type==="popstate"?e===Kf?!1:(Kf=e,!0):(Kf=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,c1=typeof clearTimeout=="function"?clearTimeout:void 0,Zp=typeof Promise=="function"?Promise:void 0,u1=typeof queueMicrotask=="function"?queueMicrotask:typeof Zp<"u"?function(e){return Zp.resolve(null).then(e).catch(f1)}:Xp;function f1(e){setTimeout(function(){throw e})}function Va(e){return e==="head"}function Jp(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Il(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")dr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,dr(a);for(var u=a.firstChild;u;){var g=u.nextSibling,x=u.nodeName;u[Mi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&dr(e.ownerDocument.body);a=o}while(a);Il(t)}function Fp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Xf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Xf(a),Ic(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function d1(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Mi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function h1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=bn(e.nextSibling),e===null))return null;return e}function Ip(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bn(e.nextSibling),e===null))return null;return e}function Zf(e){return e.data==="$?"||e.data==="$~"}function Jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function m1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function bn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ff=null;function $p(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return bn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Wp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function eg(e,t,a){switch(t=Fo(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function dr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ic(e)}var xn=new Map,tg=new Set;function Io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=K.d;K.d={f:y1,r:p1,D:g1,C:v1,L:b1,m:x1,X:j1,S:S1,M:R1};function y1(){var e=fa.f(),t=Go();return e||t}function p1(e){var t=pl(e);t!==null&&t.tag===5&&t.type==="form"?vy(t):fa.r(e)}var Zl=typeof document>"u"?null:document;function ng(e,t,a){var l=Zl;if(l&&typeof t=="string"&&t){var o=dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),tg.has(o)||(tg.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Rt(t,"link",e),yt(t),l.head.appendChild(t)))}}function g1(e){fa.D(e),ng("dns-prefetch",e,null)}function v1(e,t){fa.C(e,t),ng("preconnect",e,t)}function b1(e,t,a){fa.L(e,t,a);var l=Zl;if(l&&e&&t){var o='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+dn(a.imageSizes)+'"]')):o+='[href="'+dn(e)+'"]';var u=o;switch(t){case"style":u=Jl(e);break;case"script":u=Fl(e)}xn.has(u)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),xn.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(hr(u))||t==="script"&&l.querySelector(mr(u))||(t=l.createElement("link"),Rt(t,"link",e),yt(t),l.head.appendChild(t)))}}function x1(e,t){fa.m(e,t);var a=Zl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Fl(e)}if(!xn.has(u)&&(e=v({rel:"modulepreload",href:e},t),xn.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(mr(u)))return}l=a.createElement("link"),Rt(l,"link",e),yt(l),a.head.appendChild(l)}}}function S1(e,t,a){fa.S(e,t,a);var l=Zl;if(l&&e){var o=gl(l).hoistableStyles,u=Jl(e);t=t||"default";var g=o.get(u);if(!g){var x={loading:0,preload:null};if(g=l.querySelector(hr(u)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=xn.get(u))&&If(e,a);var w=g=l.createElement("link");yt(w),Rt(w,"link",e),w._p=new Promise(function(H,X){w.onload=H,w.onerror=X}),w.addEventListener("load",function(){x.loading|=1}),w.addEventListener("error",function(){x.loading|=2}),x.loading|=4,$o(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:x},o.set(u,g)}}}function j1(e,t){fa.X(e,t);var a=Zl;if(a&&e){var l=gl(a).hoistableScripts,o=Fl(e),u=l.get(o);u||(u=a.querySelector(mr(o)),u||(e=v({src:e,async:!0},t),(t=xn.get(o))&&$f(e,t),u=a.createElement("script"),yt(u),Rt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function R1(e,t){fa.M(e,t);var a=Zl;if(a&&e){var l=gl(a).hoistableScripts,o=Fl(e),u=l.get(o);u||(u=a.querySelector(mr(o)),u||(e=v({src:e,async:!0,type:"module"},t),(t=xn.get(o))&&$f(e,t),u=a.createElement("script"),yt(u),Rt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function ag(e,t,a,l){var o=(o=me.current)?Io(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Jl(a.href),a=gl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Jl(a.href);var u=gl(o).hoistableStyles,g=u.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=o.querySelector(hr(e)))&&!u._p&&(g.instance=u,g.state.loading=5),xn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xn.set(e,a),u||_1(o,e,a,g.state))),t&&l===null)throw Error(r(528,""));return g}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fl(a),a=gl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Jl(e){return'href="'+dn(e)+'"'}function hr(e){return'link[rel="stylesheet"]['+e+"]"}function sg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function _1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Rt(t,"link",a),yt(t),e.head.appendChild(t))}function Fl(e){return'[src="'+dn(e)+'"]'}function mr(e){return"script[async]"+e}function lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(a.href)+'"]');if(l)return t.instance=l,yt(l),l;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),yt(l),Rt(l,"style",o),$o(l,a.precedence,e),t.instance=l;case"stylesheet":o=Jl(a.href);var u=e.querySelector(hr(o));if(u)return t.state.loading|=4,t.instance=u,yt(u),u;l=sg(a),(o=xn.get(o))&&If(l,o),u=(e.ownerDocument||e).createElement("link"),yt(u);var g=u;return g._p=new Promise(function(x,w){g.onload=x,g.onerror=w}),Rt(u,"link",l),t.state.loading|=4,$o(u,a.precedence,e),t.instance=u;case"script":return u=Fl(a.src),(o=e.querySelector(mr(u)))?(t.instance=o,yt(o),o):(l=a,(o=xn.get(u))&&(l=v({},a),$f(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),yt(o),Rt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,$o(l,a.precedence,e));return t.instance}function $o(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,g=0;g<l.length;g++){var x=l[g];if(x.dataset.precedence===t)u=x;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wo=null;function ig(e,t,a){if(Wo===null){var l=new Map,o=Wo=new Map;o.set(a,l)}else o=Wo,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Mi]||u[bt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var x=l.get(g);x?x.push(u):l.set(g,[u])}}return l}function rg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function E1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function og(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function w1(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Jl(l.href),u=t.querySelector(hr(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ec.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,yt(u);return}u=t.ownerDocument||t,l=sg(l),(o=xn.get(o))&&If(l,o),u=u.createElement("link"),yt(u);var g=u;g._p=new Promise(function(x,w){g.onload=x,g.onerror=w}),Rt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ec.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Wf=0;function T1(e,t){return e.stylesheets&&e.count===0&&nc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&nc(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Wf===0&&(Wf=62500*r1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&nc(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Wf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tc=null;function nc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tc=new Map,t.forEach(N1,e),tc=null,ec.call(e))}function N1(e,t){if(!(t.state.loading&4)){var a=tc.get(e);if(a)var l=a.get(null);else{a=new Map,tc.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var g=o[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}o=t.instance,g=o.getAttribute("data-precedence"),u=a.get(g)||l,u===l&&a.set(null,o),a.set(g,o),this.count++,l=ec.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var yr={$$typeof:B,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function C1(e,t,a,l,o,u,g,x,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.hiddenUpdates=Xc(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function cg(e,t,a,l,o,u,g,x,w,H,X,I){return e=new C1(e,t,a,g,w,H,X,I,x),t=1,u===!0&&(t|=24),u=Wt(3,null,null,t),e.current=u,u.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Uu(u),e}function ug(e){return e?(e=Tl,e):Tl}function fg(e,t,a,l,o,u){o=ug(o),l.context===null?l.context=o:l.pendingContext=o,l=Oa(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=za(e,l,t),a!==null&&(Vt(a,e,t),Xi(a,e,t))}function dg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ed(e,t){dg(e,t),(e=e.alternate)&&dg(e,t)}function hg(e){if(e.tag===13||e.tag===31){var t=Es(e,67108864);t!==null&&Vt(t,e,67108864),ed(e,67108864)}}function mg(e){if(e.tag===13||e.tag===31){var t=sn();t=Zc(t);var a=Es(e,t);a!==null&&Vt(a,e,t),ed(e,t)}}var ac=!0;function M1(e,t,a,l){var o=L.T;L.T=null;var u=K.p;try{K.p=2,td(e,t,a,l)}finally{K.p=u,L.T=o}}function A1(e,t,a,l){var o=L.T;L.T=null;var u=K.p;try{K.p=8,td(e,t,a,l)}finally{K.p=u,L.T=o}}function td(e,t,a,l){if(ac){var o=nd(l);if(o===null)Qf(e,t,l,sc,a),pg(e,l);else if(z1(o,e,t,a,l))l.stopPropagation();else if(pg(e,l),t&4&&-1<O1.indexOf(e)){for(;o!==null;){var u=pl(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=xs(u.pendingLanes);if(g!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var w=1<<31-It(g);x.entanglements[1]|=w,g&=~w}Ln(u),(ke&6)===0&&(Ho=_t()+500,cr(0))}}break;case 31:case 13:x=Es(u,2),x!==null&&Vt(x,u,2),Go(),ed(u,2)}if(u=nd(l),u===null&&Qf(e,t,l,sc,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else Qf(e,t,l,null,a)}}function nd(e){return e=au(e),ad(e)}var sc=null;function ad(e){if(sc=null,e=yl(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return sc=e,null}function yg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qe()){case vt:return 2;case zn:return 8;case hl:case vb:return 32;case Eh:return 268435456;default:return 32}default:return 32}}var sd=!1,Ya=null,Pa=null,Ka=null,pr=new Map,gr=new Map,Xa=[],O1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function pg(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Pa=null;break;case"mouseover":case"mouseout":Ka=null;break;case"pointerover":case"pointerout":pr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gr.delete(t.pointerId)}}function vr(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=pl(t),t!==null&&hg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function z1(e,t,a,l,o){switch(t){case"focusin":return Ya=vr(Ya,e,t,a,l,o),!0;case"dragenter":return Pa=vr(Pa,e,t,a,l,o),!0;case"mouseover":return Ka=vr(Ka,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return pr.set(u,vr(pr.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,gr.set(u,vr(gr.get(u)||null,e,t,a,l,o)),!0}return!1}function gg(e){var t=yl(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Ah(e.priority,function(){mg(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Ah(e.priority,function(){mg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=nd(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);nu=l,a.target.dispatchEvent(l),nu=null}else return t=pl(a),t!==null&&hg(t),e.blockedOn=a,!1;t.shift()}return!0}function vg(e,t,a){lc(e)&&a.delete(t)}function D1(){sd=!1,Ya!==null&&lc(Ya)&&(Ya=null),Pa!==null&&lc(Pa)&&(Pa=null),Ka!==null&&lc(Ka)&&(Ka=null),pr.forEach(vg),gr.forEach(vg)}function ic(e,t){e.blockedOn===t&&(e.blockedOn=null,sd||(sd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,D1)))}var rc=null;function bg(e){rc!==e&&(rc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){rc===e&&(rc=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(ad(l||a)===null)continue;break}var u=pl(a);u!==null&&(e.splice(t,3),t-=3,tf(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Il(e){function t(w){return ic(w,e)}Ya!==null&&ic(Ya,e),Pa!==null&&ic(Pa,e),Ka!==null&&ic(Ka,e),pr.forEach(t),gr.forEach(t);for(var a=0;a<Xa.length;a++){var l=Xa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Xa.length&&(a=Xa[0],a.blockedOn===null);)gg(a),a.blockedOn===null&&Xa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],g=o[Lt]||null;if(typeof u=="function")g||bg(a);else if(g){var x=null;if(u&&u.hasAttribute("formAction")){if(o=u,g=u[Lt]||null)x=g.formAction;else if(ad(o)!==null)continue}else x=g.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),bg(a)}}}function xg(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ld(e){this._internalRoot=e}oc.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=sn();fg(a,l,e,t,null,null)},oc.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fg(e.current,2,null,e,null,null),Go(),t[ml]=null}};function oc(e){this._internalRoot=e}oc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Xa.length&&t!==0&&t<Xa[a].priority;a++);Xa.splice(a,0,e),a===0&&gg(e)}};var Sg=s.version;if(Sg!=="19.2.6")throw Error(r(527,Sg,"19.2.6"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var U1={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{Ti=cc.inject(U1),Ft=cc}catch{}}return Rr.createRoot=function(e,t){if(!c(e))throw Error(r(299));var a=!1,l="",o=Ny,u=Cy,g=My;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=cg(e,1,!1,null,null,a,l,null,o,u,g,xg),e[ml]=t.current,Hf(e),new ld(t)},Rr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(r(299));var l=!1,o="",u=Ny,g=Cy,x=My,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=cg(e,1,!0,t,a??null,l,o,w,u,g,x,xg),t.context=ug(null),a=t.current,l=sn(),l=Zc(l),o=Oa(l),o.callback=null,za(a,o,l),a=l,t.current.lanes=a,Ci(t,a),Ln(t),e[ml]=t.current,Hf(e),new oc(t)},Rr.version="19.2.6",Rr}var yv;function R2(){if(yv)return jd.exports;yv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),jd.exports=j2(),jd.exports}var _2=R2();function E2(){var n;return typeof window<"u"&&((n=window.__HOGSEND_STUDIO__)!=null&&n.baseUrl)?window.__HOGSEND_STUDIO__.baseUrl.replace(/\/$/,""):typeof window<"u"?window.location.origin:""}const U0={baseUrl:E2()};class Xt extends Error{constructor(i,r,c){super(r);Ja(this,"status");Ja(this,"body");this.name="ApiError",this.status=i,this.body=c}}function w2(n,s){const r=`${U0.baseUrl}${n.startsWith("/")?n:`/${n}`}`;if(!s)return r;const c=new URLSearchParams;for(const[h,y]of Object.entries(s))y!=null&&c.append(h,String(y));const d=c.toString();return d?`${r}?${d}`:r}async function Wl(n,s={}){const{json:i,query:r,headers:c,...d}=s,h={credentials:"include",...d,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...c}};i!==void 0&&(h.body=JSON.stringify(i));const y=await fetch(w2(n,r),h),m=(y.headers.get("content-type")??"").includes("application/json"),b=m?await y.json().catch(()=>null):await y.text().catch(()=>null);if(!y.ok){const v=(m&&b&&typeof b=="object"&&"message"in b&&typeof b.message=="string"?b.message:null)??`Request failed with status ${y.status}`;throw new Xt(y.status,v,b)}return b}const Xe={request:Wl,get:(n,s)=>Wl(n,{...s,method:"GET"}),post:(n,s)=>Wl(n,{...s,method:"POST"}),put:(n,s)=>Wl(n,{...s,method:"PUT"}),patch:(n,s)=>Wl(n,{...s,method:"PATCH"}),delete:(n,s)=>Wl(n,{...s,method:"DELETE"})};function T2(){return Xe.get("/v1/auth/status")}var N2={};const Tc=Object.create(null),_r=n=>{var s;return N2||((s=globalThis.Deno)==null?void 0:s.env.toObject())||globalThis.__env__||(n?Tc:globalThis)},qs=new Proxy(Tc,{get(n,s){return _r()[s]??Tc[s]},has(n,s){return s in _r()||s in Tc},set(n,s,i){const r=_r(!0);return r[s]=i,!0},deleteProperty(n,s){if(!s)return!1;const i=_r(!0);return delete i[s],!0},ownKeys(){const n=_r(!0);return Object.keys(n)}});var Nc=class extends Error{constructor(n,s){super(n,s),this.name="BetterAuthError",this.message=n,this.stack=""}};function C2(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Nc(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function M2(n){try{const s=new URL(n);if(s.protocol!=="http:"&&s.protocol!=="https:")throw new Nc(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(s){throw s instanceof Nc?s:new Nc(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:s})}}function Ed(n,s="/api/auth"){if(M2(n),C2(n))return n;const i=n.replace(/\/+$/,"");return!s||s==="/"?i:(s=s.startsWith("/")?s:`/${s}`,`${i}${s}`)}function A2(n,s,i,r,c){if(n)return Ed(n,s);{const d=qs.BETTER_AUTH_URL||qs.NEXT_PUBLIC_BETTER_AUTH_URL||qs.PUBLIC_BETTER_AUTH_URL||qs.NUXT_PUBLIC_BETTER_AUTH_URL||qs.NUXT_PUBLIC_AUTH_URL||(qs.BASE_URL!=="/"?qs.BASE_URL:void 0);if(d)return Ed(d,s)}if(typeof window<"u"&&window.location)return Ed(window.location.origin,s)}const O2={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},z2=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,pv={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},D2=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function U2(n){return n instanceof Date&&!isNaN(n.getTime())}function k2(n){const s=D2.exec(n);if(!s)return null;const[,i,r,c,d,h,y,p,m,b,v]=s,S=new Date(Date.UTC(parseInt(i,10),parseInt(r,10)-1,parseInt(c,10),parseInt(d,10),parseInt(h,10),parseInt(y,10),p?parseInt(p.padEnd(3,"0"),10):0));if(m){const R=(parseInt(b,10)*60+parseInt(v,10))*(m==="+"?-1:1);S.setUTCMinutes(S.getUTCMinutes()+R)}return U2(S)?S:null}function L2(n,s={}){const{strict:i=!1,warnings:r=!1,reviver:c,parseDates:d=!0}=s;if(typeof n!="string")return n;const h=n.trim();if(h.length>0&&h[0]==='"'&&h.endsWith('"')&&!h.slice(1,-1).includes('"'))return h.slice(1,-1);const y=h.toLowerCase();if(y.length<=9&&y in pv)return pv[y];if(!z2.test(h)){if(i)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(O2).some(([p,m])=>{const b=m.test(h);return b&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${p} pattern`),b})&&i)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(h,(m,b)=>{if(m==="__proto__"||m==="constructor"&&b&&typeof b=="object"&&"prototype"in b){r&&console.warn(`[better-json] Dropping "${m}" key to prevent prototype pollution`);return}if(d&&typeof b=="string"){const v=k2(b);if(v)return v}return c?c(m,b):b})}catch(p){if(i)throw p;return n}}function B2(n,s={strict:!0}){return L2(n,s)}const q2={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var s,i;if((s=n.data)!=null&&s.url&&((i=n.data)!=null&&i.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let wn=[],Fa=0;const pc=4,H2=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),k0=n=>{let s=[],i={get(){return i.lc||i.listen(()=>{})(),i.value},init:n,lc:0,listen(r){return i.lc=s.push(r),()=>{for(let d=Fa+pc;d<wn.length;)wn[d]===r?wn.splice(d,pc):d+=pc;let c=s.indexOf(r);~c&&(s.splice(c,1),--i.lc||i.off())}},notify(r,c){H2.epoch++;let d=!wn.length;for(let h of s)wn.push(h,i.value,r,c);if(d){for(Fa=0;Fa<wn.length;Fa+=pc)wn[Fa](wn[Fa+1],wn[Fa+2],wn[Fa+3]);wn.length=0}},off(){},set(r){let c=i.value;c!==r&&(i.value=r,i.notify(c))},subscribe(r){let c=i.listen(r);return r(i.value),c},value:n};return i},Q2=5,gc=6,vc=10;let G2=(n,s,i,r)=>(n.events=n.events||{},n.events[i+vc]||(n.events[i+vc]=r(c=>{n.events[i].reduceRight((d,h)=>(h(d),d),{shared:{},...c})})),n.events[i]=n.events[i]||[],n.events[i].push(s),()=>{let c=n.events[i],d=c.indexOf(s);c.splice(d,1),c.length||(delete n.events[i],n.events[i+vc](),delete n.events[i+vc])});const V2=1e3;let L0=(n,s)=>G2(n,r=>{let c=s(r);c&&n.events[gc].push(c)},Q2,r=>{let c=n.listen;n.listen=(...h)=>(!n.lc&&!n.active&&(n.active=!0,r()),c(...h));let d=n.off;return n.events[gc]=[],n.off=()=>{d(),setTimeout(()=>{if(n.active&&!n.lc){n.active=!1;for(let h of n.events[gc])h();n.events[gc]=[]}},V2)},()=>{n.listen=c,n.off=d}});function Y2(n,s,i){let r=new Set(s).add(void 0);return n.listen((c,d,h)=>{r.has(h)&&i(c,d,h)})}const P2=()=>typeof window>"u",K2=(n,s,i,r)=>{const c=k0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>d(y)}),d=async y=>new Promise(p=>{const m=typeof r=="function"?r({data:c.get().data,error:c.get().error,isPending:c.get().isPending}):r;i(s,{...m,query:{...m==null?void 0:m.query,...y==null?void 0:y.query},async onSuccess(b){var v;c.set({data:b.data,error:null,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((v=m==null?void 0:m.onSuccess)==null?void 0:v.call(m,b))},async onError(b){var E,j;const{request:v}=b,S=typeof v.retry=="number"?v.retry:(E=v.retry)==null?void 0:E.attempts,R=v.retryAttempt||0;if(S&&R<S)return;const _=b.error.status===401;c.set({error:b.error,data:_?null:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((j=m==null?void 0:m.onError)==null?void 0:j.call(m,b))},async onRequest(b){var S;const v=c.get();c.set({isPending:v.data===null,data:v.data,error:null,isRefetching:!0,refetch:c.value.refetch}),await((S=m==null?void 0:m.onRequest)==null?void 0:S.call(m,b))}}).catch(b=>{c.set({error:b,data:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch})}).finally(()=>{p(void 0)})});n=Array.isArray(n)?n:[n];let h=!1;for(const y of n)y.subscribe(async()=>{P2()||(h?await d():L0(c,()=>{const p=setTimeout(async()=>{h||(h=!0,await d())},0);return()=>{c.off(),y.off(),clearTimeout(p)}}))});return c},wd=Symbol.for("better-auth:broadcast-channel"),X2=()=>Math.floor(Date.now()/1e3);var Z2=class{constructor(n="better-auth.message"){Ja(this,"listeners",new Set);Ja(this,"name");this.name=n}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}post(n){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...n,timestamp:X2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=s=>{if(s.key!==this.name)return;const i=JSON.parse(s.newValue??"{}");(i==null?void 0:i.event)!=="session"||!(i!=null&&i.data)||this.listeners.forEach(r=>r(i))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function Td(n="better-auth.message"){return globalThis[wd]||(globalThis[wd]=new Z2(n)),globalThis[wd]}const Nd=Symbol.for("better-auth:focus-manager");var J2=class{constructor(){Ja(this,"listeners",new Set)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setFocused(n){this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",n,!1),()=>{document.removeEventListener("visibilitychange",n,!1)}}};function gv(){return globalThis[Nd]||(globalThis[Nd]=new J2),globalThis[Nd]}const Cd=Symbol.for("better-auth:online-manager");var F2=class{constructor(){Ja(this,"listeners",new Set);Ja(this,"isOnline",typeof navigator<"u"?navigator.onLine:!0)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setOnline(n){this.isOnline=n,this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>this.setOnline(!0),s=()=>this.setOnline(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n,!1),window.removeEventListener("offline",s,!1)}}};function Md(){return globalThis[Cd]||(globalThis[Cd]=new F2),globalThis[Cd]}const ei=()=>Math.floor(Date.now()/1e3);function vv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const I2=5;function $2(n){var A,B,N;const{sessionAtom:s,sessionSignal:i,$fetch:r,options:c={}}=n,d=((A=c.sessionOptions)==null?void 0:A.refetchInterval)??0,h=((B=c.sessionOptions)==null?void 0:B.refetchOnWindowFocus)??!0,y=((N=c.sessionOptions)==null?void 0:N.refetchWhenOffline)??!1,p={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Md().isOnline,b=Q=>{if(!m())return;if((Q==null?void 0:Q.event)==="storage"){p.lastSync=ei(),i.set(!i.get());return}const k=s.get(),D=()=>{p.lastSessionRequest=ei(),r("/get-session").then(async O=>{let{data:P,error:$}=vv(O);if(P!=null&&P.needsRefresh)try{const Z=await r("/get-session",{method:"POST"});({data:P,error:$}=vv(Z))}catch{}const W=P!=null&&P.session&&(P!=null&&P.user)?P:null;s.set({...k,data:W,error:$}),p.lastSync=ei(),i.set(!i.get())}).catch(()=>{})};if((Q==null?void 0:Q.event)==="poll"){D();return}if((Q==null?void 0:Q.event)==="visibilitychange"){if(ei()-p.lastSessionRequest<I2)return;p.lastSessionRequest=ei()}if((Q==null?void 0:Q.event)==="visibilitychange"){D();return}((k==null?void 0:k.data)===null||(k==null?void 0:k.data)===void 0)&&(p.lastSync=ei(),i.set(!i.get()))},v=Q=>{Td().post({event:"session",data:{trigger:Q},clientId:Math.random().toString(36).substring(7)})},S=()=>{d&&d>0&&(p.pollInterval=setInterval(()=>{var Q;(Q=s.get())!=null&&Q.data&&b({event:"poll"})},d*1e3))},R=()=>{p.unsubscribeBroadcast=Td().subscribe(()=>{b({event:"storage"})})},_=()=>{h&&(p.unsubscribeFocus=gv().subscribe(()=>{b({event:"visibilitychange"})}))},E=()=>{p.unsubscribeOnline=Md().subscribe(Q=>{Q&&b({event:"visibilitychange"})})};return{init:()=>{S(),R(),_(),E(),Td().setup(),gv().setup(),Md().setup()},cleanup:()=>{p.pollInterval&&(clearInterval(p.pollInterval),p.pollInterval=void 0),p.unsubscribeBroadcast&&(p.unsubscribeBroadcast(),p.unsubscribeBroadcast=void 0),p.unsubscribeFocus&&(p.unsubscribeFocus(),p.unsubscribeFocus=void 0),p.unsubscribeOnline&&(p.unsubscribeOnline(),p.unsubscribeOnline=void 0),p.lastSync=0,p.lastSessionRequest=0,p.cachedSession=void 0},triggerRefetch:b,broadcastSessionUpdate:v}}function W2(n,s){const i=k0(!1),r=K2(i,"/get-session",n,{method:"GET"});let c=()=>{};return L0(r,()=>{const d=$2({sessionAtom:r,sessionSignal:i,$fetch:n,options:s});return d.init(),c=d.broadcastSessionUpdate,()=>{d.cleanup()}}),{session:r,$sessionSignal:i,broadcastSessionUpdate:d=>c(d)}}function Ad(n){if(n===null||typeof n!="object")return!1;const s=Object.getPrototypeOf(n);return s!==null&&s!==Object.prototype&&Object.getPrototypeOf(s)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function th(n,s,i=".",r){if(!Ad(s))return th(n,{},i,r);const c={...s};for(const d of Object.keys(n)){if(d==="__proto__"||d==="constructor")continue;const h=n[d];h!=null&&(r&&r(c,d,h,i)||(Array.isArray(h)&&Array.isArray(c[d])?c[d]=[...h,...c[d]]:Ad(h)&&Ad(c[d])?c[d]=th(h,c[d],(i?`${i}.`:"")+d.toString(),r):c[d]=h))}return c}function eR(n){return(...s)=>s.reduce((i,r)=>th(i,r,"",n),{})}const tR=eR();var nR=Object.defineProperty,aR=Object.defineProperties,sR=Object.getOwnPropertyDescriptors,bv=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,xv=(n,s,i)=>s in n?nR(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i,Nn=(n,s)=>{for(var i in s||(s={}))lR.call(s,i)&&xv(n,i,s[i]);if(bv)for(var i of bv(s))iR.call(s,i)&&xv(n,i,s[i]);return n},Hn=(n,s)=>aR(n,sR(s)),rR=class extends Error{constructor(n,s,i){super(s||n.toString(),{cause:i}),this.status=n,this.statusText=s,this.error=i,Error.captureStackTrace(this,this.constructor)}},oR=async(n,s)=>{var i,r,c,d,h,y;let p=s||{};const m={onRequest:[s==null?void 0:s.onRequest],onResponse:[s==null?void 0:s.onResponse],onSuccess:[s==null?void 0:s.onSuccess],onError:[s==null?void 0:s.onError],onRetry:[s==null?void 0:s.onRetry]};if(!s||!(s!=null&&s.plugins))return{url:n,options:p,hooks:m};for(const b of(s==null?void 0:s.plugins)||[]){if(b.init){const v=await((i=b.init)==null?void 0:i.call(b,n.toString(),s));p=v.options||p,n=v.url}m.onRequest.push((r=b.hooks)==null?void 0:r.onRequest),m.onResponse.push((c=b.hooks)==null?void 0:c.onResponse),m.onSuccess.push((d=b.hooks)==null?void 0:d.onSuccess),m.onError.push((h=b.hooks)==null?void 0:h.onError),m.onRetry.push((y=b.hooks)==null?void 0:y.onRetry)}return{url:n,options:p,hooks:m}},Sv=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(){return this.options.delay}},cR=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(n){return Math.min(this.options.maxDelay,this.options.baseDelay*2**n)}};function uR(n){if(typeof n=="number")return new Sv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new Sv(n);case"exponential":return new cR(n);default:throw new Error("Invalid retry strategy")}}var fR=async n=>{const s={},i=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await i(n.auth.token);if(!r)return s;s.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,c]=await Promise.all([i(n.auth.username),i(n.auth.password)]);if(!r||!c)return s;s.authorization=`Basic ${btoa(`${r}:${c}`)}`}else if(n.auth.type==="Custom"){const[r,c]=await Promise.all([i(n.auth.prefix),i(n.auth.value)]);if(!c)return s;s.authorization=`${r??""} ${c}`}}return s},dR=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function hR(n){const s=n.headers.get("content-type"),i=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!s)return"json";const r=s.split(";").shift()||"";return dR.test(r)?"json":i.has(r)||r.startsWith("text/")?"text":"blob"}function mR(n){try{return JSON.parse(n),!0}catch{return!1}}function nh(n){if(n===void 0)return!1;const s=typeof n;return s==="string"||s==="number"||s==="boolean"||s===null?!0:s!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}function jv(n){try{return JSON.parse(n)}catch{return n}}function Rv(n){return typeof n=="function"}function yR(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&Rv(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Rv(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function pR(n){const s=new Headers(n==null?void 0:n.headers),i=await fR(n);for(const[r,c]of Object.entries(i||{}))s.set(r,c);if(!s.has("content-type")){const r=gR(n==null?void 0:n.body);r&&s.set("content-type",r)}return s}function gR(n){return nh(n)?"application/json":null}function vR(n){if(!(n!=null&&n.body))return null;const s=new Headers(n==null?void 0:n.headers);if(nh(n.body)&&!s.has("content-type")){for(const[i,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[i]=r.toISOString());return JSON.stringify(n.body)}return s.has("content-type")&&s.get("content-type")==="application/x-www-form-urlencoded"&&nh(n.body)?new URLSearchParams(n.body).toString():n.body}function bR(n,s){var i;if(s!=null&&s.method)return s.method.toUpperCase();if(n.startsWith("@")){const r=(i=n.split("@")[1])==null?void 0:i.split("/")[0];return q0.includes(r)?r.toUpperCase():s!=null&&s.body?"POST":"GET"}return s!=null&&s.body?"POST":"GET"}function xR(n,s){let i;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(i=setTimeout(()=>s==null?void 0:s.abort(),n==null?void 0:n.timeout)),{abortTimeout:i,clearTimeout:()=>{i&&clearTimeout(i)}}}var SR=class B0 extends Error{constructor(s,i){super(i||JSON.stringify(s,null,2)),this.issues=s,Object.setPrototypeOf(this,B0.prototype)}};async function Cc(n,s){const i=await n["~standard"].validate(s);if(i.issues)throw new SR(i.issues);return i.value}var q0=["get","post","put","patch","delete"],jR=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(s,i){var r,c,d,h;const y=((c=(r=n.plugins)==null?void 0:r.find(p=>{var m;return(m=p.schema)!=null&&m.config?s.startsWith(p.schema.config.baseURL||"")||s.startsWith(p.schema.config.prefix||""):!1}))==null?void 0:c.schema)||n.schema;if(y){let p=s;(d=y.config)!=null&&d.prefix&&p.startsWith(y.config.prefix)&&(p=p.replace(y.config.prefix,""),y.config.baseURL&&(s=s.replace(y.config.prefix,y.config.baseURL))),(h=y.config)!=null&&h.baseURL&&p.startsWith(y.config.baseURL)&&(p=p.replace(y.config.baseURL,""));const m=y.schema[p];if(m){let b=Hn(Nn({},i),{method:m.method,output:m.output});return i!=null&&i.disableValidation||(b=Hn(Nn({},b),{body:m.input?await Cc(m.input,i==null?void 0:i.body):i==null?void 0:i.body,params:m.params?await Cc(m.params,i==null?void 0:i.params):i==null?void 0:i.params,query:m.query?await Cc(m.query,i==null?void 0:i.query):i==null?void 0:i.query})),{url:s,options:b}}}return{url:s,options:i}}}),RR=n=>{async function s(i,r){const c=Hn(Nn(Nn({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],jR(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await ah(i,c)}catch(d){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:d}}}return await ah(i,c)}return s};function _R(n,s){const{baseURL:i,params:r,query:c}=s||{query:{},params:{},baseURL:""};let d=n.startsWith("http")?n.split("/").slice(0,3).join("/"):i||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];q0.includes(v)&&(n=n.replace(`@${v}/`,"/"))}d.endsWith("/")||(d+="/");let[h,y]=n.replace(d,"").split("?");const p=new URLSearchParams(y);for(const[v,S]of Object.entries(c||{})){if(S==null)continue;let R;if(typeof S=="string")R=S;else if(Array.isArray(S)){for(const _ of S)p.append(v,_);continue}else R=JSON.stringify(S);p.set(v,R)}if(r)if(Array.isArray(r)){const v=h.split("/").filter(S=>S.startsWith(":"));for(const[S,R]of v.entries()){const _=r[S];h=h.replace(R,_)}}else for(const[v,S]of Object.entries(r))h=h.replace(`:${v}`,String(S));h=h.split("/").map(encodeURIComponent).join("/"),h.startsWith("/")&&(h=h.slice(1));let m=p.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",d.startsWith("http")?new URL(`${h}${m}`,d):`${d}${h}${m}`}var ah=async(n,s)=>{var i,r,c,d,h,y,p,m;const{hooks:b,url:v,options:S}=await oR(n,s),R=yR(S),_=new AbortController,E=(i=S.signal)!=null?i:_.signal,j=_R(v,S),z=vR(S),A=await pR(S),B=bR(v,S);let N=Hn(Nn({},S),{url:j,headers:A,body:z,method:B,signal:E});for(const te of b.onRequest)if(te){const ee=await te(N);typeof ee=="object"&&ee!==null&&(N=ee)}("pipeTo"in N&&typeof N.pipeTo=="function"||typeof((r=s==null?void 0:s.body)==null?void 0:r.pipe)=="function")&&("duplex"in N||(N.duplex="half"));const{clearTimeout:Q}=xR(S,_);let k=await R(N.url,N);Q();const D={response:k,request:N};for(const te of b.onResponse)if(te){const ee=await te(Hn(Nn({},D),{response:(c=s==null?void 0:s.hookOptions)!=null&&c.cloneResponse?k.clone():k}));ee instanceof Response?k=ee:typeof ee=="object"&&ee!==null&&(k=ee.response)}if(k.ok){if(!(N.method!=="HEAD"))return{data:"",error:null};const ee=hR(k),he={data:null,response:k,request:N};if(ee==="json"||ee==="text"){const L=await k.text(),K=(d=N.jsonParser)!=null?d:jv;he.data=await K(L)}else he.data=await k[ee]();N!=null&&N.output&&N.output&&!N.disableValidation&&(he.data=await Cc(N.output,he.data));for(const L of b.onSuccess)L&&await L(Hn(Nn({},he),{response:(h=s==null?void 0:s.hookOptions)!=null&&h.cloneResponse?k.clone():k}));return s!=null&&s.throw?he.data:{data:he.data,error:null}}const O=(y=s==null?void 0:s.jsonParser)!=null?y:jv,P=await k.text(),$=mR(P),W=$?await O(P):null,Z={response:k,responseText:P,request:N,error:Hn(Nn({},W),{status:k.status,statusText:k.statusText})};for(const te of b.onError)te&&await te(Hn(Nn({},Z),{response:(p=s==null?void 0:s.hookOptions)!=null&&p.cloneResponse?k.clone():k}));if(s!=null&&s.retry){const te=uR(s.retry),ee=(m=s.retryAttempt)!=null?m:0;if(await te.shouldAttemptRetry(ee,k)){for(const L of b.onRetry)L&&await L(D);const he=te.getDelay(ee);return await new Promise(L=>setTimeout(L,he)),await ah(n,Hn(Nn({},s),{retryAttempt:ee+1}))}}if(s!=null&&s.throw)throw new rR(k.status,k.statusText,$?W:P);return{data:null,error:Hn(Nn({},W),{status:k.status,statusText:k.statusText})}},Hs={};const ER=n=>{if(typeof process>"u")return;const s=n??"/api/auth";if(Hs.NEXT_PUBLIC_AUTH_URL)return Hs.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Hs.NEXTAUTH_URL)try{return Hs.NEXTAUTH_URL}catch{}if(Hs.VERCEL_URL)try{const i=Hs.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${i}${Hs.VERCEL_URL}`).origin}${s}`}catch{}}},wR=(n,s)=>{var Q,k,D,O,P,$,W;const i="credentials"in Request.prototype,r=A2(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??ER(n==null?void 0:n.basePath)??"/api/auth",c=((Q=n==null?void 0:n.plugins)==null?void 0:Q.flatMap(Z=>Z.fetchPlugins).filter(Z=>Z!==void 0))||[],d={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(k=n==null?void 0:n.fetchOptions)==null?void 0:k.onSuccess,onError:(D=n==null?void 0:n.fetchOptions)==null?void 0:D.onError,onRequest:(O=n==null?void 0:n.fetchOptions)==null?void 0:O.onRequest,onResponse:(P=n==null?void 0:n.fetchOptions)==null?void 0:P.onResponse}},{onSuccess:h,onError:y,onRequest:p,onResponse:m,...b}=(n==null?void 0:n.fetchOptions)||{},v=RR({baseURL:r,...i?{credentials:"include"}:{},method:"GET",jsonParser(Z){return Z?B2(Z,{strict:!1}):null},customFetchImpl:fetch,...b,plugins:[d,...b.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[q2],...c]}),{$sessionSignal:S,session:R,broadcastSessionUpdate:_}=W2(v,n),E=(n==null?void 0:n.plugins)||[];let j={};const z={$sessionSignal:S,session:R},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},B=[{signal:"$sessionSignal",matcher(Z){return Z==="/sign-out"||Z==="/update-user"||Z==="/update-session"||Z==="/sign-up/email"||Z==="/sign-in/email"||Z==="/delete-user"||Z==="/verify-email"||Z==="/revoke-sessions"||Z==="/revoke-session"||Z==="/revoke-other-sessions"||Z==="/change-email"||Z==="/change-password"},callback(Z){Z==="/sign-out"?_("signout"):(Z==="/update-user"||Z==="/update-session")&&_("updateUser")}}];for(const Z of E)Z.getAtoms&&Object.assign(z,($=Z.getAtoms)==null?void 0:$.call(Z,v)),Z.pathMethods&&Object.assign(A,Z.pathMethods),Z.atomListeners&&B.push(...Z.atomListeners);const N={notify:Z=>{z[Z].set(!z[Z].get())},listen:(Z,te)=>{z[Z].subscribe(te)},atoms:z};for(const Z of E)Z.getActions&&(j=tR(((W=Z.getActions)==null?void 0:W.call(Z,v,N,n))??{},j));return{get baseURL(){return r},pluginsActions:j,pluginsAtoms:z,pluginPathMethods:A,atomListeners:B,$fetch:v,$store:N}};function TR(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function NR(n,s,i){const r=s[n],{fetchOptions:c,query:d,...h}=i||{};return r||(c!=null&&c.method?c.method:h&&Object.keys(h).length>0?"POST":"GET")}function CR(n,s,i,r,c){function d(h=[]){return new Proxy(function(){},{get(y,p){if(typeof p!="string"||p==="then"||p==="catch"||p==="finally")return;const m=[...h,p];let b=n;for(const v of m)if(b&&typeof b=="object"&&v in b)b=b[v];else{b=void 0;break}return typeof b=="function"||TR(b)?b:d(m)},apply:async(y,p,m)=>{const b="/"+h.map(A=>A.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)).join("/"),v=m[0]||{},S=m[1]||{},{query:R,fetchOptions:_,...E}=v,j={...S,..._},z=NR(b,i,v);return await s(b,{...j,body:z==="GET"?void 0:{...E,...(j==null?void 0:j.body)||{}},query:R||(j==null?void 0:j.query),method:z,async onSuccess(A){var Q,k;if(await((Q=j==null?void 0:j.onSuccess)==null?void 0:Q.call(j,A)),!c||j.disableSignal)return;const B=c.filter(D=>D.matcher(b));if(!B.length)return;const N=new Set;for(const D of B){const O=r[D.signal];if(!O)return;if(N.has(D.signal))continue;N.add(D.signal);const P=O.get();setTimeout(()=>{O.set(!P)},10),(k=D.callback)==null||k.call(D,b)}}})}})}return d()}function MR(n,s={}){const i=Y.useRef(n.get()),{keys:r,deps:c=[n,r]}=s,d=Y.useCallback(y=>{const p=m=>{i.current!==m&&(i.current=m,y())};return p(n.value),r!=null&&r.length?Y2(n,r,p):n.listen(p)},c),h=()=>i.current;return Y.useSyncExternalStore(d,h,h)}function AR(n){return n.charAt(0).toUpperCase()+n.slice(1)}function OR(n){return`use${AR(n)}`}function zR(n){const{pluginPathMethods:s,pluginsActions:i,pluginsAtoms:r,$fetch:c,$store:d,atomListeners:h}=wR(n),y={};for(const[p,m]of Object.entries(r))y[OR(p)]=()=>MR(m);return CR({...i,...y,$fetch:c,$store:d},c,s,r,h)}const DR=zR({baseURL:`${U0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:UR,signUp:kR,signOut:LR,useSession:H0}=DR;function Q0(n){var s,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(s=0;s<c;s++)n[s]&&(i=Q0(n[s]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function G0(){for(var n,s,i=0,r="",c=arguments.length;i<c;i++)(n=arguments[i])&&(s=Q0(n))&&(r&&(r+=" "),r+=s);return r}const _v=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Ev=G0,V0=(n,s)=>i=>{var r;if((s==null?void 0:s.variants)==null)return Ev(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:d}=s,h=Object.keys(c).map(m=>{const b=i==null?void 0:i[m],v=d==null?void 0:d[m];if(b===null)return null;const S=_v(b)||_v(v);return c[m][S]}),y=i&&Object.entries(i).reduce((m,b)=>{let[v,S]=b;return S===void 0||(m[v]=S),m},{}),p=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((m,b)=>{let{class:v,className:S,...R}=b;return Object.entries(R).every(_=>{let[E,j]=_;return Array.isArray(j)?j.includes({...d,...y}[E]):{...d,...y}[E]===j})?[...m,v,S]:m},[]);return Ev(n,h,p,i==null?void 0:i.class,i==null?void 0:i.className)},BR=(n,s)=>{const i=new Array(n.length+s.length);for(let r=0;r<n.length;r++)i[r]=n[r];for(let r=0;r<s.length;r++)i[n.length+r]=s[r];return i},qR=(n,s)=>({classGroupId:n,validator:s}),Y0=(n=new Map,s=null,i)=>({nextPart:n,validators:s,classGroupId:i}),qc="-",wv=[],HR="arbitrary..",QR=n=>{const s=VR(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return GR(h);const y=h.split(qc),p=y[0]===""&&y.length>1?1:0;return P0(y,p,s)},getConflictingClassGroupIds:(h,y)=>{if(y){const p=r[h],m=i[h];return p?m?BR(m,p):p:m||wv}return i[h]||wv}}},P0=(n,s,i)=>{if(n.length-s===0)return i.classGroupId;const c=n[s],d=i.nextPart.get(c);if(d){const m=P0(n,s+1,d);if(m)return m}const h=i.validators;if(h===null)return;const y=s===0?n.join(qc):n.slice(s).join(qc),p=h.length;for(let m=0;m<p;m++){const b=h[m];if(b.validator(y))return b.classGroupId}},GR=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=n.slice(1,-1),i=s.indexOf(":"),r=s.slice(0,i);return r?HR+r:void 0})(),VR=n=>{const{theme:s,classGroups:i}=n;return YR(i,s)},YR=(n,s)=>{const i=Y0();for(const r in n){const c=n[r];vh(c,i,r,s)}return i},vh=(n,s,i,r)=>{const c=n.length;for(let d=0;d<c;d++){const h=n[d];PR(h,s,i,r)}},PR=(n,s,i,r)=>{if(typeof n=="string"){KR(n,s,i);return}if(typeof n=="function"){XR(n,s,i,r);return}ZR(n,s,i,r)},KR=(n,s,i)=>{const r=n===""?s:K0(s,n);r.classGroupId=i},XR=(n,s,i,r)=>{if(JR(n)){vh(n(r),s,i,r);return}s.validators===null&&(s.validators=[]),s.validators.push(qR(i,n))},ZR=(n,s,i,r)=>{const c=Object.entries(n),d=c.length;for(let h=0;h<d;h++){const[y,p]=c[h];vh(p,K0(s,y),i,r)}},K0=(n,s)=>{let i=n;const r=s.split(qc),c=r.length;for(let d=0;d<c;d++){const h=r[d];let y=i.nextPart.get(h);y||(y=Y0(),i.nextPart.set(h,y)),i=y}return i},JR=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,FR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let s=0,i=Object.create(null),r=Object.create(null);const c=(d,h)=>{i[d]=h,s++,s>n&&(s=0,r=i,i=Object.create(null))};return{get(d){let h=i[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return c(d,h),h},set(d,h){d in i?i[d]=h:c(d,h)}}},sh="!",Tv=":",IR=[],Nv=(n,s,i,r,c)=>({modifiers:n,hasImportantModifier:s,baseClassName:i,maybePostfixModifierPosition:r,isExternal:c}),$R=n=>{const{prefix:s,experimentalParseClassName:i}=n;let r=c=>{const d=[];let h=0,y=0,p=0,m;const b=c.length;for(let E=0;E<b;E++){const j=c[E];if(h===0&&y===0){if(j===Tv){d.push(c.slice(p,E)),p=E+1;continue}if(j==="/"){m=E;continue}}j==="["?h++:j==="]"?h--:j==="("?y++:j===")"&&y--}const v=d.length===0?c:c.slice(p);let S=v,R=!1;v.endsWith(sh)?(S=v.slice(0,-1),R=!0):v.startsWith(sh)&&(S=v.slice(1),R=!0);const _=m&&m>p?m-p:void 0;return Nv(d,R,S,_)};if(s){const c=s+Tv,d=r;r=h=>h.startsWith(c)?d(h.slice(c.length)):Nv(IR,!1,h,void 0,!0)}if(i){const c=r;r=d=>i({className:d,parseClassName:c})}return r},WR=n=>{const s=new Map;return n.orderSensitiveModifiers.forEach((i,r)=>{s.set(i,1e6+r)}),i=>{const r=[];let c=[];for(let d=0;d<i.length;d++){const h=i[d],y=h[0]==="[",p=s.has(h);y||p?(c.length>0&&(c.sort(),r.push(...c),c=[]),r.push(h)):c.push(h)}return c.length>0&&(c.sort(),r.push(...c)),r}},e_=n=>({cache:FR(n.cacheSize),parseClassName:$R(n),sortModifiers:WR(n),postfixLookupClassGroupIds:t_(n),...QR(n)}),t_=n=>{const s=Object.create(null),i=n.postfixLookupClassGroups;if(i)for(let r=0;r<i.length;r++)s[i[r]]=!0;return s},n_=/\s+/,a_=(n,s)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:c,sortModifiers:d,postfixLookupClassGroupIds:h}=s,y=[],p=n.trim().split(n_);let m="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:S,modifiers:R,hasImportantModifier:_,baseClassName:E,maybePostfixModifierPosition:j}=i(v);if(S){m=v+(m.length>0?" "+m:m);continue}let z=!!j,A;if(z){const D=E.substring(0,j);A=r(D);const O=A&&h[A]?r(E):void 0;O&&O!==A&&(A=O,z=!1)}else A=r(E);if(!A){if(!z){m=v+(m.length>0?" "+m:m);continue}if(A=r(E),!A){m=v+(m.length>0?" "+m:m);continue}z=!1}const B=R.length===0?"":R.length===1?R[0]:d(R).join(":"),N=_?B+sh:B,Q=N+A;if(y.indexOf(Q)>-1)continue;y.push(Q);const k=c(A,z);for(let D=0;D<k.length;++D){const O=k[D];y.push(N+O)}m=v+(m.length>0?" "+m:m)}return m},s_=(...n)=>{let s=0,i,r,c="";for(;s<n.length;)(i=n[s++])&&(r=X0(i))&&(c&&(c+=" "),c+=r);return c},X0=n=>{if(typeof n=="string")return n;let s,i="";for(let r=0;r<n.length;r++)n[r]&&(s=X0(n[r]))&&(i&&(i+=" "),i+=s);return i},l_=(n,...s)=>{let i,r,c,d;const h=p=>{const m=s.reduce((b,v)=>v(b),n());return i=e_(m),r=i.cache.get,c=i.cache.set,d=y,y(p)},y=p=>{const m=r(p);if(m)return m;const b=a_(p,i);return c(p,b),b};return d=h,(...p)=>d(s_(...p))},i_=[],ht=n=>{const s=i=>i[n]||i_;return s.isThemeGetter=!0,s},Z0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,J0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,f_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ia=n=>r_.test(n),je=n=>!!n&&!Number.isNaN(Number(n)),Bn=n=>!!n&&Number.isInteger(Number(n)),Od=n=>n.endsWith("%")&&je(n.slice(0,-1)),da=n=>o_.test(n),F0=()=>!0,h_=n=>c_.test(n)&&!u_.test(n),bh=()=>!1,m_=n=>f_.test(n),y_=n=>d_.test(n),p_=n=>!re(n)&&!oe(n),g_=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),v_=n=>gs(n,W0,bh),re=n=>Z0.test(n),Qs=n=>gs(n,eb,h_),Cv=n=>gs(n,w_,je),b_=n=>gs(n,nb,F0),x_=n=>gs(n,tb,bh),Mv=n=>gs(n,I0,bh),S_=n=>gs(n,$0,y_),bc=n=>gs(n,ab,m_),oe=n=>J0.test(n),Er=n=>rl(n,eb),j_=n=>rl(n,tb),Av=n=>rl(n,I0),R_=n=>rl(n,W0),__=n=>rl(n,$0),xc=n=>rl(n,ab,!0),E_=n=>rl(n,nb,!0),gs=(n,s,i)=>{const r=Z0.exec(n);return r?r[1]?s(r[1]):i(r[2]):!1},rl=(n,s,i=!1)=>{const r=J0.exec(n);return r?r[1]?s(r[1]):i:!1},I0=n=>n==="position"||n==="percentage",$0=n=>n==="image"||n==="url",W0=n=>n==="length"||n==="size"||n==="bg-size",eb=n=>n==="length",w_=n=>n==="number",tb=n=>n==="family-name",nb=n=>n==="number"||n==="weight",ab=n=>n==="shadow",T_=()=>{const n=ht("color"),s=ht("font"),i=ht("text"),r=ht("font-weight"),c=ht("tracking"),d=ht("leading"),h=ht("breakpoint"),y=ht("container"),p=ht("spacing"),m=ht("radius"),b=ht("shadow"),v=ht("inset-shadow"),S=ht("text-shadow"),R=ht("drop-shadow"),_=ht("blur"),E=ht("perspective"),j=ht("aspect"),z=ht("ease"),A=ht("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...N(),oe,re],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],O=()=>[oe,re,p],P=()=>[Ia,"full","auto",...O()],$=()=>[Bn,"none","subgrid",oe,re],W=()=>["auto",{span:["full",Bn,oe,re]},Bn,oe,re],Z=()=>[Bn,"auto",oe,re],te=()=>["auto","min","max","fr",oe,re],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...O()],K=()=>[Ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],ue=()=>[Ia,"screen","full","dvw","lvw","svw","min","max","fit",...O()],Me=()=>[Ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],ne=()=>[n,oe,re],C=()=>[...N(),Av,Mv,{position:[oe,re]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",R_,v_,{size:[oe,re]}],se=()=>[Od,Er,Qs],le=()=>["","none","full",m,oe,re],me=()=>["",je,Er,Qs],Re=()=>["solid","dashed","dotted","double"],He=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[je,Od,Av,Mv],un=()=>["","none",_,oe,re],kt=()=>["none",je,oe,re],Jt=()=>["none",je,oe,re],Kn=()=>[je,oe,re],Ct=()=>[Ia,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[da],breakpoint:[da],color:[F0],container:[da],"drop-shadow":[da],ease:["in","out","in-out"],font:[p_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[da],shadow:[da],spacing:["px",je],text:[da],"text-shadow":[da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ia,re,oe,j]}],container:["container"],"container-type":[{"@container":["","normal","size",oe,re]}],"container-named":[g_],columns:[{columns:[je,re,oe,y]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[Bn,"auto",oe,re]}],basis:[{basis:[Ia,"full","auto",y,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Ia,"auto","initial","none",re]}],grow:[{grow:["",je,oe,re]}],shrink:[{shrink:["",je,oe,re]}],order:[{order:[Bn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:K()}],"inline-size":[{inline:["auto",...ue()]}],"min-inline-size":[{"min-inline":["auto",...ue()]}],"max-inline-size":[{"max-inline":["none",...ue()]}],"block-size":[{block:["auto",...Me()]}],"min-block-size":[{"min-block":["auto",...Me()]}],"max-block-size":[{"max-block":["none",...Me()]}],w:[{w:[y,"screen",...K()]}],"min-w":[{"min-w":[y,"screen","none",...K()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[h]},...K()]}],h:[{h:["screen","lh",...K()]}],"min-h":[{"min-h":["screen","lh","none",...K()]}],"max-h":[{"max-h":["screen","lh",...K()]}],"font-size":[{text:["base",i,Er,Qs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,E_,b_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Od,re]}],"font-family":[{font:[j_,x_,s]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,oe,re]}],"line-clamp":[{"line-clamp":[je,"none",oe,Cv]}],leading:[{leading:[d,...O()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",oe,Qs]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[je,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"tab-size":[{tab:[Bn,oe,re]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bn,oe,re],radial:["",oe,re],conic:[Bn,oe,re]},__,S_]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,oe,re]}],"outline-w":[{outline:["",je,Er,Qs]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",b,xc,bc]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,xc,bc]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[je,Qs]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",S,xc,bc]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[je,oe,re]}],"mix-blend":[{"mix-blend":[...He(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":He()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:un()}],brightness:[{brightness:[je,oe,re]}],contrast:[{contrast:[je,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",R,xc,bc]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",je,oe,re]}],"hue-rotate":[{"hue-rotate":[je,oe,re]}],invert:[{invert:["",je,oe,re]}],saturate:[{saturate:[je,oe,re]}],sepia:[{sepia:["",je,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":un()}],"backdrop-brightness":[{"backdrop-brightness":[je,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[je,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",je,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[je,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[je,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",je,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",oe,re]}],ease:[{ease:["linear","initial",z,oe,re]}],delay:[{delay:[je,oe,re]}],animate:[{animate:["none",A,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,oe,re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:Jt()}],"scale-x":[{"scale-x":Jt()}],"scale-y":[{"scale-y":Jt()}],"scale-z":[{"scale-z":Jt()}],"scale-3d":["scale-3d"],skew:[{skew:Kn()}],"skew-x":[{"skew-x":Kn()}],"skew-y":[{"skew-y":Kn()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ct()}],"translate-x":[{"translate-x":Ct()}],"translate-y":[{"translate-y":Ct()}],"translate-z":[{"translate-z":Ct()}],"translate-none":["translate-none"],zoom:[{zoom:[Bn,oe,re]}],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ne()}],"scrollbar-track-color":[{"scrollbar-track":ne()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[je,Er,Qs,Cv]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},N_=l_(T_);function Je(...n){return N_(G0(n))}const xh=V0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Pe=Y.forwardRef(({className:n,variant:s,size:i,...r},c)=>f.jsx("button",{type:"button",className:Je(xh({variant:s,size:i,className:n})),ref:c,...r}));Pe.displayName="Button";const Cn=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("rounded-lg border bg-card text-card-foreground shadow-sm",n),...s}));Cn.displayName="Card";const Mn=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("flex flex-col space-y-1.5 p-6",n),...s}));Mn.displayName="CardHeader";const An=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("text-lg font-semibold leading-none tracking-tight",n),...s}));An.displayName="CardTitle";const Lr=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("text-sm text-muted-foreground",n),...s}));Lr.displayName="CardDescription";const On=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("p-6 pt-0",n),...s}));On.displayName="CardContent";const C_=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("flex items-center p-6 pt-0",n),...s}));C_.displayName="CardFooter";const zt=Y.forwardRef(({className:n,type:s,...i},r)=>f.jsx("input",{type:s,className:Je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...i}));zt.displayName="Input";function M_({mode:n,onSuccess:s}){const i=n==="setup",[r,c]=Y.useState(""),[d,h]=Y.useState(""),[y,p]=Y.useState(""),[m,b]=Y.useState(null),[v,S]=Y.useState(!1);async function R(_){_.preventDefault(),b(null),S(!0);try{const E=i?await kR.email({name:r||d,email:d,password:y}):await UR.email({email:d,password:y});if(E.error){b(E.error.message??"Authentication failed.");return}s()}catch(E){b(E instanceof Error?E.message:"Something went wrong.")}finally{S(!1)}}return f.jsxs(Cn,{className:"w-full max-w-sm",children:[f.jsxs(Mn,{children:[f.jsx(An,{children:i?"Create admin account":"Sign in to Studio"}),f.jsx(Lr,{children:i?"No users exist yet. Create the first admin to get started.":"Enter your credentials to access Hogsend Studio."})]}),f.jsx(On,{children:f.jsxs("form",{className:"space-y-4",onSubmit:R,children:[i?f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"name",children:"Name"}),f.jsx(zt,{id:"name",value:r,onChange:_=>c(_.target.value),placeholder:"Your name",autoComplete:"name"})]}):null,f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"email",children:"Email"}),f.jsx(zt,{id:"email",type:"email",required:!0,value:d,onChange:_=>h(_.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"password",children:"Password"}),f.jsx(zt,{id:"password",type:"password",required:!0,minLength:8,value:y,onChange:_=>p(_.target.value),placeholder:"••••••••",autoComplete:i?"new-password":"current-password"})]}),m?f.jsx("p",{className:"text-sm text-destructive",children:m}):null,f.jsx(Pe,{type:"submit",className:"w-full",disabled:v,children:v?"Please wait…":i?"Create admin":"Sign in"})]})})]})}function Ov({mode:n,onSuccess:s}){return f.jsx("div",{className:"flex h-full items-center justify-center bg-muted/30 p-6",children:f.jsx(M_,{mode:n,onSuccess:s})})}function zd({children:n}){return f.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:n})}function A_({children:n}){const{data:s,isPending:i,isError:r,refetch:c}=lt({queryKey:["auth-status"],queryFn:T2,retry:1,staleTime:0}),{data:d,isPending:h,refetch:y}=H0();return i?f.jsx(zd,{children:"Loading…"}):r?f.jsx(zd,{children:"Unable to reach the Hogsend API."}):s!=null&&s.needsSetup?f.jsx(Ov,{mode:"setup",onSuccess:()=>{c(),y()}}):h?f.jsx(zd,{children:"Loading…"}):d!=null&&d.user?f.jsx(f.Fragment,{children:n}):f.jsx(Ov,{mode:"login",onSuccess:()=>{y()}})}/**
64
+ `+l.stack}}var bs=Object.prototype.hasOwnProperty,jn=n.unstable_scheduleCallback,wi=n.unstable_cancelCallback,Pr=n.unstable_shouldYield,Pc=n.unstable_requestPaint,_t=n.unstable_now,Qe=n.unstable_getCurrentPriorityLevel,vt=n.unstable_ImmediatePriority,zn=n.unstable_UserBlockingPriority,hl=n.unstable_NormalPriority,vb=n.unstable_LowPriority,Eh=n.unstable_IdlePriority,bb=n.log,xb=n.unstable_setDisableYieldValue,Ti=null,Ft=null;function _a(e){if(typeof bb=="function"&&xb(e),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(Ti,e)}catch{}}var It=Math.clz32?Math.clz32:Rb,Sb=Math.log,jb=Math.LN2;function Rb(e){return e>>>=0,e===0?32:31-(Sb(e)/jb|0)|0}var Xr=256,Zr=262144,Jr=4194304;function xs(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fr(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var o=0,u=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var x=l&134217727;return x!==0?(l=x&~u,l!==0?o=xs(l):(g&=x,g!==0?o=xs(g):a||(a=x&~e,a!==0&&(o=xs(a))))):(x=l&~u,x!==0?o=xs(x):g!==0?o=xs(g):a||(a=l&~e,a!==0&&(o=xs(a)))),o===0?0:t!==0&&t!==o&&(t&u)===0&&(u=o&-o,a=t&-t,u>=a||u===32&&(a&4194048)!==0)?t:o}function Ni(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _b(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wh(){var e=Jr;return Jr<<=1,(Jr&62914560)===0&&(Jr=4194304),e}function Xc(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ci(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Eb(e,t,a,l,o,u){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var x=e.entanglements,w=e.expirationTimes,H=e.hiddenUpdates;for(a=g&~a;0<a;){var X=31-It(a),I=1<<X;x[X]=0,w[X]=-1;var G=H[X];if(G!==null)for(H[X]=null,X=0;X<G.length;X++){var V=G[X];V!==null&&(V.lane&=-536870913)}a&=~I}l!==0&&Th(e,l,0),u!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=u&~(g&~t))}function Th(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-It(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Nh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-It(a),o=1<<l;o&t|e[l]&t&&(e[l]|=t),a&=~o}}function Ch(e,t){var a=t&-t;return a=(a&42)!==0?1:Zc(a),(a&(e.suspendedLanes|t))!==0?0:a}function Zc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Jc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Mh(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:yg(e.type))}function Ah(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var Ea=Math.random().toString(36).slice(2),bt="__reactFiber$"+Ea,Lt="__reactProps$"+Ea,ml="__reactContainer$"+Ea,Fc="__reactEvents$"+Ea,wb="__reactListeners$"+Ea,Tb="__reactHandles$"+Ea,Oh="__reactResources$"+Ea,Mi="__reactMarker$"+Ea;function Ic(e){delete e[bt],delete e[Lt],delete e[Fc],delete e[wb],delete e[Tb]}function yl(e){var t=e[bt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[ml]||a[bt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Wp(e);e!==null;){if(a=e[bt])return a;e=Wp(e)}return t}e=a,a=e.parentNode}return null}function pl(e){if(e=e[bt]||e[ml]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ai(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function gl(e){var t=e[Oh];return t||(t=e[Oh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function yt(e){e[Mi]=!0}var zh=new Set,Dh={};function Ss(e,t){vl(e,t),vl(e+"Capture",t)}function vl(e,t){for(Dh[e]=t,e=0;e<t.length;e++)zh.add(t[e])}var Nb=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Uh={},kh={};function Cb(e){return bs.call(kh,e)?!0:bs.call(Uh,e)?!1:Nb.test(e)?kh[e]=!0:(Uh[e]=!0,!1)}function Ir(e,t,a){if(Cb(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function $r(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Zn(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function fn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Lh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Mb(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var o=l.get,u=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(g){a=""+g,u.call(this,g)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $c(e){if(!e._valueTracker){var t=Lh(e)?"checked":"value";e._valueTracker=Mb(e,t,""+e[t])}}function Bh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Lh(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Wr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ab=/[\n"\\]/g;function dn(e){return e.replace(Ab,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Wc(e,t,a,l,o,u,g,x){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+fn(t)):e.value!==""+fn(t)&&(e.value=""+fn(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?eu(e,g,fn(t)):a!=null?eu(e,g,fn(a)):l!=null&&e.removeAttribute("value"),o==null&&u!=null&&(e.defaultChecked=!!u),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.name=""+fn(x):e.removeAttribute("name")}function qh(e,t,a,l,o,u,g,x){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){$c(e);return}a=a!=null?""+fn(a):"",t=t!=null?""+fn(t):a,x||t===e.value||(e.value=t),e.defaultValue=t}l=l??o,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=x?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),$c(e)}function eu(e,t,a){t==="number"&&Wr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function bl(e,t,a,l){if(e=e.options,t){t={};for(var o=0;o<a.length;o++)t["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=t.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&l&&(e[a].defaultSelected=!0)}else{for(a=""+fn(a),t=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,l&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Hh(e,t,a){if(t!=null&&(t=""+fn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+fn(a):""}function Qh(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(r(92));if(he(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=fn(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),$c(e)}function xl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var Ob=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Gh(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||Ob.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vh(e,t,a){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var o in t)l=t[o],t.hasOwnProperty(o)&&a[o]!==l&&Gh(e,o,l)}else for(var u in t)t.hasOwnProperty(u)&&Gh(e,u,t[u])}function tu(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var zb=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Db=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function eo(e){return Db.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Jn(){}var nu=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sl=null,jl=null;function Yh(e){var t=pl(e);if(t&&(e=t.stateNode)){var a=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Wc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+dn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var o=l[Lt]||null;if(!o)throw Error(r(90));Wc(l,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Bh(l)}break e;case"textarea":Hh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&bl(e,!!a.multiple,t,!1)}}}var su=!1;function Kh(e,t,a){if(su)return e(t,a);su=!0;try{var l=e(t);return l}finally{if(su=!1,(Sl!==null||jl!==null)&&(Go(),Sl&&(t=Sl,e=jl,jl=Sl=null,Yh(t),e)))for(t=0;t<e.length;t++)Yh(e[t])}}function Oi(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Lt]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,t,typeof a));return a}var Fn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lu=!1;if(Fn)try{var zi={};Object.defineProperty(zi,"passive",{get:function(){lu=!0}}),window.addEventListener("test",zi,zi),window.removeEventListener("test",zi,zi)}catch{lu=!1}var wa=null,iu=null,to=null;function Ph(){if(to)return to;var e,t=iu,a=t.length,l,o="value"in wa?wa.value:wa.textContent,u=o.length;for(e=0;e<a&&t[e]===o[e];e++);var g=a-e;for(l=1;l<=g&&t[a-l]===o[u-l];l++);return to=o.slice(e,1<l?1-l:void 0)}function no(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ao(){return!0}function Xh(){return!1}function Bt(e){function t(a,l,o,u,g){this._reactName=a,this._targetInst=o,this.type=l,this.nativeEvent=u,this.target=g,this.currentTarget=null;for(var x in e)e.hasOwnProperty(x)&&(a=e[x],this[x]=a?a(u):u[x]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ao:Xh,this.isPropagationStopped=Xh,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=ao)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=ao)},persist:function(){},isPersistent:ao}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},so=Bt(js),Di=v({},js,{view:0,detail:0}),Ub=Bt(Di),ru,ou,Ui,lo=v({},Di,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ui&&(Ui&&e.type==="mousemove"?(ru=e.screenX-Ui.screenX,ou=e.screenY-Ui.screenY):ou=ru=0,Ui=e),ru)},movementY:function(e){return"movementY"in e?e.movementY:ou}}),Zh=Bt(lo),kb=v({},lo,{dataTransfer:0}),Lb=Bt(kb),Bb=v({},Di,{relatedTarget:0}),cu=Bt(Bb),qb=v({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),Hb=Bt(qb),Qb=v({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gb=Bt(Qb),Vb=v({},js,{data:0}),Jh=Bt(Vb),Yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Kb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pb[e])?!!t[e]:!1}function uu(){return Xb}var Zb=v({},Di,{key:function(e){if(e.key){var t=Yb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Kb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jb=Bt(Zb),Fb=v({},lo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Fh=Bt(Fb),Ib=v({},Di,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),$b=Bt(Ib),Wb=v({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),ex=Bt(Wb),tx=v({},lo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nx=Bt(tx),ax=v({},js,{newState:0,oldState:0}),sx=Bt(ax),lx=[9,13,27,32],fu=Fn&&"CompositionEvent"in window,ki=null;Fn&&"documentMode"in document&&(ki=document.documentMode);var ix=Fn&&"TextEvent"in window&&!ki,Ih=Fn&&(!fu||ki&&8<ki&&11>=ki),$h=" ",Wh=!1;function em(e,t){switch(e){case"keyup":return lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Rl=!1;function rx(e,t){switch(e){case"compositionend":return tm(t);case"keypress":return t.which!==32?null:(Wh=!0,$h);case"textInput":return e=t.data,e===$h&&Wh?null:e;default:return null}}function ox(e,t){if(Rl)return e==="compositionend"||!fu&&em(e,t)?(e=Ph(),to=iu=wa=null,Rl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ih&&t.locale!=="ko"?null:t.data;default:return null}}var cx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!cx[e.type]:t==="textarea"}function am(e,t,a,l){Sl?jl?jl.push(l):jl=[l]:Sl=l,t=Jo(t,"onChange"),0<t.length&&(a=new so("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Li=null,Bi=null;function ux(e){qp(e,0)}function io(e){var t=Ai(e);if(Bh(t))return e}function sm(e,t){if(e==="change")return t}var lm=!1;if(Fn){var du;if(Fn){var hu="oninput"in document;if(!hu){var im=document.createElement("div");im.setAttribute("oninput","return;"),hu=typeof im.oninput=="function"}du=hu}else du=!1;lm=du&&(!document.documentMode||9<document.documentMode)}function rm(){Li&&(Li.detachEvent("onpropertychange",om),Bi=Li=null)}function om(e){if(e.propertyName==="value"&&io(Bi)){var t=[];am(t,Bi,e,au(e)),Kh(ux,t)}}function fx(e,t,a){e==="focusin"?(rm(),Li=t,Bi=a,Li.attachEvent("onpropertychange",om)):e==="focusout"&&rm()}function dx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return io(Bi)}function hx(e,t){if(e==="click")return io(t)}function mx(e,t){if(e==="input"||e==="change")return io(t)}function yx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var $t=typeof Object.is=="function"?Object.is:yx;function qi(e,t){if($t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var o=a[l];if(!bs.call(t,o)||!$t(e[o],t[o]))return!1}return!0}function cm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function um(e,t){var a=cm(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=cm(a)}}function fm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?fm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function dm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Wr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Wr(e.document)}return t}function mu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var px=Fn&&"documentMode"in document&&11>=document.documentMode,_l=null,yu=null,Hi=null,pu=!1;function hm(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;pu||_l==null||_l!==Wr(l)||(l=_l,"selectionStart"in l&&mu(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}),Hi&&qi(Hi,l)||(Hi=l,l=Jo(yu,"onSelect"),0<l.length&&(t=new so("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=_l)))}function Rs(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var El={animationend:Rs("Animation","AnimationEnd"),animationiteration:Rs("Animation","AnimationIteration"),animationstart:Rs("Animation","AnimationStart"),transitionrun:Rs("Transition","TransitionRun"),transitionstart:Rs("Transition","TransitionStart"),transitioncancel:Rs("Transition","TransitionCancel"),transitionend:Rs("Transition","TransitionEnd")},gu={},mm={};Fn&&(mm=document.createElement("div").style,"AnimationEvent"in window||(delete El.animationend.animation,delete El.animationiteration.animation,delete El.animationstart.animation),"TransitionEvent"in window||delete El.transitionend.transition);function _s(e){if(gu[e])return gu[e];if(!El[e])return e;var t=El[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in mm)return gu[e]=t[a];return e}var ym=_s("animationend"),pm=_s("animationiteration"),gm=_s("animationstart"),gx=_s("transitionrun"),vx=_s("transitionstart"),bx=_s("transitioncancel"),vm=_s("transitionend"),bm=new Map,vu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");vu.push("scrollEnd");function Rn(e,t){bm.set(e,t),Ss(t,[e])}var ro=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},hn=[],wl=0,bu=0;function oo(){for(var e=wl,t=bu=wl=0;t<e;){var a=hn[t];hn[t++]=null;var l=hn[t];hn[t++]=null;var o=hn[t];hn[t++]=null;var u=hn[t];if(hn[t++]=null,l!==null&&o!==null){var g=l.pending;g===null?o.next=o:(o.next=g.next,g.next=o),l.pending=o}u!==0&&xm(a,o,u)}}function co(e,t,a,l){hn[wl++]=e,hn[wl++]=t,hn[wl++]=a,hn[wl++]=l,bu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function xu(e,t,a,l){return co(e,t,a,l),uo(e)}function Es(e,t){return co(e,null,null,t),uo(e)}function xm(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,l=u.alternate,l!==null&&(l.childLanes|=a),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&&t!==null&&(o=31-It(a),e=u.hiddenUpdates,l=e[o],l===null?e[o]=[t]:l.push(t),t.lane=a|536870912),u):null}function uo(e){if(50<or)throw or=0,Mf=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tl={};function xx(e,t,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,t,a,l){return new xx(e,t,a,l)}function Su(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var a=e.alternate;return a===null?(a=Wt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Sm(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function fo(e,t,a,l,o,u){var g=0;if(l=e,typeof e=="function")Su(e)&&(g=1);else if(typeof e=="string")g=E1(e,a,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=Wt(31,a,t,o),e.elementType=K,e.lanes=u,e;case E:return ws(a.children,o,u,t);case j:g=8,o|=24;break;case z:return e=Wt(12,a,t,o|2),e.elementType=z,e.lanes=u,e;case Q:return e=Wt(13,a,t,o),e.elementType=Q,e.lanes=u,e;case k:return e=Wt(19,a,t,o),e.elementType=k,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:g=10;break e;case A:g=9;break e;case N:g=11;break e;case D:g=14;break e;case O:g=16,l=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=Wt(g,a,t,o),t.elementType=e,t.type=l,t.lanes=u,t}function ws(e,t,a,l){return e=Wt(7,e,l,t),e.lanes=a,e}function ju(e,t,a){return e=Wt(6,e,null,t),e.lanes=a,e}function jm(e){var t=Wt(18,null,null,0);return t.stateNode=e,t}function Ru(e,t,a){return t=Wt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Rm=new WeakMap;function mn(e,t){if(typeof e=="object"&&e!==null){var a=Rm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Xn(t)},Rm.set(e,t),t)}return{value:e,source:t,stack:Xn(t)}}var Nl=[],Cl=0,ho=null,Qi=0,yn=[],pn=0,Ta=null,Dn=1,Un="";function $n(e,t){Nl[Cl++]=Qi,Nl[Cl++]=ho,ho=e,Qi=t}function _m(e,t,a){yn[pn++]=Dn,yn[pn++]=Un,yn[pn++]=Ta,Ta=e;var l=Dn;e=Un;var o=32-It(l)-1;l&=~(1<<o),a+=1;var u=32-It(t)+o;if(30<u){var g=o-o%5;u=(l&(1<<g)-1).toString(32),l>>=g,o-=g,Dn=1<<32-It(t)+o|a<<o|l,Un=u+e}else Dn=1<<u|a<<o|l,Un=e}function _u(e){e.return!==null&&($n(e,1),_m(e,1,0))}function Eu(e){for(;e===ho;)ho=Nl[--Cl],Nl[Cl]=null,Qi=Nl[--Cl],Nl[Cl]=null;for(;e===Ta;)Ta=yn[--pn],yn[pn]=null,Un=yn[--pn],yn[pn]=null,Dn=yn[--pn],yn[pn]=null}function Em(e,t){yn[pn++]=Dn,yn[pn++]=Un,yn[pn++]=Ta,Dn=t.id,Un=t.overflow,Ta=e}var xt=null,Fe=null,Ae=!1,Na=null,gn=!1,wu=Error(r(519));function Ca(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(mn(t,e)),wu}function wm(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[bt]=e,t[Lt]=l,a){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(a=0;a<ur.length;a++)Ee(ur[a],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),qh(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),Qh(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||Vp(t.textContent,a)?(l.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),l.onScroll!=null&&Ee("scroll",t),l.onScrollEnd!=null&&Ee("scrollend",t),l.onClick!=null&&(t.onclick=Jn),t=!0):t=!1,t||Ca(e,!0)}function Tm(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:xt=xt.return}}function Ml(e){if(e!==xt)return!1;if(!Ae)return Tm(e),Ae=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Kf(e.type,e.memoizedProps)),a=!a),a&&Fe&&Ca(e),Tm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=$p(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Fe=$p(e)}else t===27?(t=Fe,Va(e.type)?(e=Ff,Ff=null,Fe=e):Fe=t):Fe=xt?bn(e.stateNode.nextSibling):null;return!0}function Ts(){Fe=xt=null,Ae=!1}function Tu(){var e=Na;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),Na=null),e}function Gi(e){Na===null?Na=[e]:Na.push(e)}var Nu=C(null),Ns=null,Wn=null;function Ma(e,t,a){ae(Nu,t._currentValue),t._currentValue=a}function ea(e){e._currentValue=Nu.current,F(Nu)}function Cu(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Mu(e,t,a,l){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var g=o.child;u=u.firstContext;e:for(;u!==null;){var x=u;u=o;for(var w=0;w<t.length;w++)if(x.context===t[w]){u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),Cu(u.return,a,e),l||(g=null);break e}u=x.next}}else if(o.tag===18){if(g=o.return,g===null)throw Error(r(341));g.lanes|=a,u=g.alternate,u!==null&&(u.lanes|=a),Cu(g,a,e),g=null}else g=o.child;if(g!==null)g.return=o;else for(g=o;g!==null;){if(g===e){g=null;break}if(o=g.sibling,o!==null){o.return=g.return,g=o;break}g=g.return}o=g}}function Al(e,t,a,l){e=null;for(var o=t,u=!1;o!==null;){if(!u){if((o.flags&524288)!==0)u=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var g=o.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var x=o.type;$t(o.pendingProps.value,g.value)||(e!==null?e.push(x):e=[x])}}else if(o===Re.current){if(g=o.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(yr):e=[yr])}o=o.return}e!==null&&Mu(t,e,a,l),t.flags|=262144}function mo(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){Ns=e,Wn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return Nm(Ns,e)}function yo(e,t){return Ns===null&&Cs(e),Nm(e,t)}function Nm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Wn===null){if(e===null)throw Error(r(308));Wn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Wn=Wn.next=t;return a}var Sx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},jx=n.unstable_scheduleCallback,Rx=n.unstable_NormalPriority,it={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new Sx,data:new Map,refCount:0}}function Vi(e){e.refCount--,e.refCount===0&&jx(Rx,function(){e.controller.abort()})}var Yi=null,Ou=0,Ol=0,zl=null;function _x(e,t){if(Yi===null){var a=Yi=[];Ou=0,Ol=kf(),zl={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ou++,t.then(Cm,Cm),t}function Cm(){if(--Ou===0&&Yi!==null){zl!==null&&(zl.status="fulfilled");var e=Yi;Yi=null,Ol=0,zl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ex(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var o=0;o<a.length;o++)(0,a[o])(t)},function(o){for(l.status="rejected",l.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),l}var Mm=L.S;L.S=function(e,t){hp=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&_x(e,t),Mm!==null&&Mm(e,t)};var Ms=C(null);function zu(){var e=Ms.current;return e!==null?e:Ze.pooledCache}function po(e,t){t===null?ae(Ms,Ms.current):ae(Ms,t.pool)}function Am(){var e=zu();return e===null?null:{parent:it._currentValue,pool:e}}var Dl=Error(r(460)),Du=Error(r(474)),go=Error(r(542)),vo={then:function(){}};function Om(e){return e=e.status,e==="fulfilled"||e==="rejected"}function zm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Jn,Jn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e;default:if(typeof t.status=="string")t.then(Jn,Jn);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=l}},function(l){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Um(e),e}throw Os=t,Dl}}function As(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Os=a,Dl):a}}var Os=null;function Dm(){if(Os===null)throw Error(r(459));var e=Os;return Os=null,e}function Um(e){if(e===Dl||e===go)throw Error(r(483))}var Ul=null,Ki=0;function bo(e){var t=Ki;return Ki+=1,Ul===null&&(Ul=[]),zm(Ul,e,t)}function Pi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function xo(e,t){throw t.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function km(e){function t(U,M){if(e){var q=U.deletions;q===null?(U.deletions=[M],U.flags|=16):q.push(M)}}function a(U,M){if(!e)return null;for(;M!==null;)t(U,M),M=M.sibling;return null}function l(U){for(var M=new Map;U!==null;)U.key!==null?M.set(U.key,U):M.set(U.index,U),U=U.sibling;return M}function o(U,M){return U=In(U,M),U.index=0,U.sibling=null,U}function u(U,M,q){return U.index=q,e?(q=U.alternate,q!==null?(q=q.index,q<M?(U.flags|=67108866,M):q):(U.flags|=67108866,M)):(U.flags|=1048576,M)}function g(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function x(U,M,q,J){return M===null||M.tag!==6?(M=ju(q,U.mode,J),M.return=U,M):(M=o(M,q),M.return=U,M)}function w(U,M,q,J){var ye=q.type;return ye===E?X(U,M,q.props.children,J,q.key):M!==null&&(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&As(ye)===M.type)?(M=o(M,q.props),Pi(M,q),M.return=U,M):(M=fo(q.type,q.key,q.props,null,U.mode,J),Pi(M,q),M.return=U,M)}function H(U,M,q,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==q.containerInfo||M.stateNode.implementation!==q.implementation?(M=Ru(q,U.mode,J),M.return=U,M):(M=o(M,q.children||[]),M.return=U,M)}function X(U,M,q,J,ye){return M===null||M.tag!==7?(M=ws(q,U.mode,J,ye),M.return=U,M):(M=o(M,q),M.return=U,M)}function I(U,M,q){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ju(""+M,U.mode,q),M.return=U,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case R:return q=fo(M.type,M.key,M.props,null,U.mode,q),Pi(q,M),q.return=U,q;case _:return M=Ru(M,U.mode,q),M.return=U,M;case O:return M=As(M),I(U,M,q)}if(he(M)||Z(M))return M=ws(M,U.mode,q,null),M.return=U,M;if(typeof M.then=="function")return I(U,bo(M),q);if(M.$$typeof===B)return I(U,yo(U,M),q);xo(U,M)}return null}function G(U,M,q,J){var ye=M!==null?M.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ye!==null?null:x(U,M,""+q,J);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case R:return q.key===ye?w(U,M,q,J):null;case _:return q.key===ye?H(U,M,q,J):null;case O:return q=As(q),G(U,M,q,J)}if(he(q)||Z(q))return ye!==null?null:X(U,M,q,J,null);if(typeof q.then=="function")return G(U,M,bo(q),J);if(q.$$typeof===B)return G(U,M,yo(U,q),J);xo(U,q)}return null}function V(U,M,q,J,ye){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return U=U.get(q)||null,x(M,U,""+J,ye);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case R:return U=U.get(J.key===null?q:J.key)||null,w(M,U,J,ye);case _:return U=U.get(J.key===null?q:J.key)||null,H(M,U,J,ye);case O:return J=As(J),V(U,M,q,J,ye)}if(he(J)||Z(J))return U=U.get(q)||null,X(M,U,J,ye,null);if(typeof J.then=="function")return V(U,M,q,bo(J),ye);if(J.$$typeof===B)return V(U,M,q,yo(M,J),ye);xo(M,J)}return null}function ce(U,M,q,J){for(var ye=null,De=null,fe=M,xe=M=0,Ne=null;fe!==null&&xe<q.length;xe++){fe.index>xe?(Ne=fe,fe=null):Ne=fe.sibling;var Ue=G(U,fe,q[xe],J);if(Ue===null){fe===null&&(fe=Ne);break}e&&fe&&Ue.alternate===null&&t(U,fe),M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue,fe=Ne}if(xe===q.length)return a(U,fe),Ae&&$n(U,xe),ye;if(fe===null){for(;xe<q.length;xe++)fe=I(U,q[xe],J),fe!==null&&(M=u(fe,M,xe),De===null?ye=fe:De.sibling=fe,De=fe);return Ae&&$n(U,xe),ye}for(fe=l(fe);xe<q.length;xe++)Ne=V(fe,U,xe,q[xe],J),Ne!==null&&(e&&Ne.alternate!==null&&fe.delete(Ne.key===null?xe:Ne.key),M=u(Ne,M,xe),De===null?ye=Ne:De.sibling=Ne,De=Ne);return e&&fe.forEach(function(Za){return t(U,Za)}),Ae&&$n(U,xe),ye}function pe(U,M,q,J){if(q==null)throw Error(r(151));for(var ye=null,De=null,fe=M,xe=M=0,Ne=null,Ue=q.next();fe!==null&&!Ue.done;xe++,Ue=q.next()){fe.index>xe?(Ne=fe,fe=null):Ne=fe.sibling;var Za=G(U,fe,Ue.value,J);if(Za===null){fe===null&&(fe=Ne);break}e&&fe&&Za.alternate===null&&t(U,fe),M=u(Za,M,xe),De===null?ye=Za:De.sibling=Za,De=Za,fe=Ne}if(Ue.done)return a(U,fe),Ae&&$n(U,xe),ye;if(fe===null){for(;!Ue.done;xe++,Ue=q.next())Ue=I(U,Ue.value,J),Ue!==null&&(M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue);return Ae&&$n(U,xe),ye}for(fe=l(fe);!Ue.done;xe++,Ue=q.next())Ue=V(fe,U,xe,Ue.value,J),Ue!==null&&(e&&Ue.alternate!==null&&fe.delete(Ue.key===null?xe:Ue.key),M=u(Ue,M,xe),De===null?ye=Ue:De.sibling=Ue,De=Ue);return e&&fe.forEach(function(k1){return t(U,k1)}),Ae&&$n(U,xe),ye}function Ye(U,M,q,J){if(typeof q=="object"&&q!==null&&q.type===E&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case R:e:{for(var ye=q.key;M!==null;){if(M.key===ye){if(ye=q.type,ye===E){if(M.tag===7){a(U,M.sibling),J=o(M,q.props.children),J.return=U,U=J;break e}}else if(M.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===O&&As(ye)===M.type){a(U,M.sibling),J=o(M,q.props),Pi(J,q),J.return=U,U=J;break e}a(U,M);break}else t(U,M);M=M.sibling}q.type===E?(J=ws(q.props.children,U.mode,J,q.key),J.return=U,U=J):(J=fo(q.type,q.key,q.props,null,U.mode,J),Pi(J,q),J.return=U,U=J)}return g(U);case _:e:{for(ye=q.key;M!==null;){if(M.key===ye)if(M.tag===4&&M.stateNode.containerInfo===q.containerInfo&&M.stateNode.implementation===q.implementation){a(U,M.sibling),J=o(M,q.children||[]),J.return=U,U=J;break e}else{a(U,M);break}else t(U,M);M=M.sibling}J=Ru(q,U.mode,J),J.return=U,U=J}return g(U);case O:return q=As(q),Ye(U,M,q,J)}if(he(q))return ce(U,M,q,J);if(Z(q)){if(ye=Z(q),typeof ye!="function")throw Error(r(150));return q=ye.call(q),pe(U,M,q,J)}if(typeof q.then=="function")return Ye(U,M,bo(q),J);if(q.$$typeof===B)return Ye(U,M,yo(U,q),J);xo(U,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,M!==null&&M.tag===6?(a(U,M.sibling),J=o(M,q),J.return=U,U=J):(a(U,M),J=ju(q,U.mode,J),J.return=U,U=J),g(U)):a(U,M)}return function(U,M,q,J){try{Ki=0;var ye=Ye(U,M,q,J);return Ul=null,ye}catch(fe){if(fe===Dl||fe===go)throw fe;var De=Wt(29,fe,null,U.mode);return De.lanes=J,De.return=U,De}finally{}}}var zs=km(!0),Lm=km(!1),Aa=!1;function Uu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(ke&2)!==0){var o=l.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),l.pending=t,t=uo(e),xm(e,null,a),t}return co(e,l,t,a),uo(e)}function Xi(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Nh(e,a)}}function Lu(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=g:u=u.next=g,a=a.next}while(a!==null);u===null?o=u=t:u=u.next=t}else o=u=t;a={baseState:l.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Bu=!1;function Zi(){if(Bu){var e=zl;if(e!==null)throw e}}function Ji(e,t,a,l){Bu=!1;var o=e.updateQueue;Aa=!1;var u=o.firstBaseUpdate,g=o.lastBaseUpdate,x=o.shared.pending;if(x!==null){o.shared.pending=null;var w=x,H=w.next;w.next=null,g===null?u=H:g.next=H,g=w;var X=e.alternate;X!==null&&(X=X.updateQueue,x=X.lastBaseUpdate,x!==g&&(x===null?X.firstBaseUpdate=H:x.next=H,X.lastBaseUpdate=w))}if(u!==null){var I=o.baseState;g=0,X=H=w=null,x=u;do{var G=x.lane&-536870913,V=G!==x.lane;if(V?(Te&G)===G:(l&G)===G){G!==0&&G===Ol&&(Bu=!0),X!==null&&(X=X.next={lane:0,tag:x.tag,payload:x.payload,callback:null,next:null});e:{var ce=e,pe=x;G=t;var Ye=a;switch(pe.tag){case 1:if(ce=pe.payload,typeof ce=="function"){I=ce.call(Ye,I,G);break e}I=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=pe.payload,G=typeof ce=="function"?ce.call(Ye,I,G):ce,G==null)break e;I=v({},I,G);break e;case 2:Aa=!0}}G=x.callback,G!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[G]:V.push(G))}else V={lane:G,tag:x.tag,payload:x.payload,callback:x.callback,next:null},X===null?(H=X=V,w=I):X=X.next=V,g|=G;if(x=x.next,x===null){if(x=o.shared.pending,x===null)break;V=x,x=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);X===null&&(w=I),o.baseState=w,o.firstBaseUpdate=H,o.lastBaseUpdate=X,u===null&&(o.shared.lanes=0),Ba|=g,e.lanes=g,e.memoizedState=I}}function Bm(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function qm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Bm(a[e],t)}var kl=C(null),So=C(0);function Hm(e,t){e=ca,ae(So,e),ae(kl,t),ca=e|t.baseLanes}function qu(){ae(So,ca),ae(kl,kl.current)}function Hu(){ca=So.current,F(kl),F(So)}var en=C(null),vn=null;function Da(e){var t=e.alternate;ae(at,at.current&1),ae(en,e),vn===null&&(t===null||kl.current!==null||t.memoizedState!==null)&&(vn=e)}function Qu(e){ae(at,at.current),ae(en,e),vn===null&&(vn=e)}function Qm(e){e.tag===22?(ae(at,at.current),ae(en,e),vn===null&&(vn=e)):Ua()}function Ua(){ae(at,at.current),ae(en,en.current)}function tn(e){F(en),vn===e&&(vn=null),F(at)}var at=C(0);function jo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Zf(a)||Jf(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ta=0,be=null,Ge=null,rt=null,Ro=!1,Ll=!1,Ds=!1,_o=0,Fi=0,Bl=null,wx=0;function et(){throw Error(r(321))}function Gu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!$t(e[a],t[a]))return!1;return!0}function Vu(e,t,a,l,o,u){return ta=u,be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,L.H=e===null||e.memoizedState===null?_y:sf,Ds=!1,u=a(l,o),Ds=!1,Ll&&(u=Vm(t,a,l,o)),Gm(e),u}function Gm(e){L.H=Wi;var t=Ge!==null&&Ge.next!==null;if(ta=0,rt=Ge=be=null,Ro=!1,Fi=0,Bl=null,t)throw Error(r(300));e===null||ot||(e=e.dependencies,e!==null&&mo(e)&&(ot=!0))}function Vm(e,t,a,l){be=e;var o=0;do{if(Ll&&(Bl=null),Fi=0,Ll=!1,25<=o)throw Error(r(301));if(o+=1,rt=Ge=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}L.H=Ey,u=t(a,l)}while(Ll);return u}function Tx(){var e=L.H,t=e.useState()[0];return t=typeof t.then=="function"?Ii(t):t,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(be.flags|=1024),t}function Yu(){var e=_o!==0;return _o=0,e}function Ku(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Pu(e){if(Ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ro=!1}ta=0,rt=Ge=be=null,Ll=!1,Fi=_o=0,Bl=null}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?be.memoizedState=rt=e:rt=rt.next=e,rt}function st(){if(Ge===null){var e=be.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=rt===null?be.memoizedState:rt.next;if(t!==null)rt=t,Ge=e;else{if(e===null)throw be.alternate===null?Error(r(467)):Error(r(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},rt===null?be.memoizedState=rt=e:rt=rt.next=e}return rt}function Eo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ii(e){var t=Fi;return Fi+=1,Bl===null&&(Bl=[]),e=zm(Bl,e,t),t=be,(rt===null?t.memoizedState:rt.next)===null&&(t=t.alternate,L.H=t===null||t.memoizedState===null?_y:sf),e}function wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ii(e);if(e.$$typeof===B)return St(e)}throw Error(r(438,String(e)))}function Xu(e){var t=null,a=be.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=be.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Eo(),be.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=$;return t.index++,a}function na(e,t){return typeof t=="function"?t(e):t}function To(e){var t=st();return Zu(t,Ge,e)}function Zu(e,t,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var o=e.baseQueue,u=l.pending;if(u!==null){if(o!==null){var g=o.next;o.next=u.next,u.next=g}t.baseQueue=o=u,l.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{t=o.next;var x=g=null,w=null,H=t,X=!1;do{var I=H.lane&-536870913;if(I!==H.lane?(Te&I)===I:(ta&I)===I){var G=H.revertLane;if(G===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),I===Ol&&(X=!0);else if((ta&G)===G){H=H.next,G===Ol&&(X=!0);continue}else I={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(x=w=I,g=u):w=w.next=I,be.lanes|=G,Ba|=G;I=H.action,Ds&&a(u,I),u=H.hasEagerState?H.eagerState:a(u,I)}else G={lane:I,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},w===null?(x=w=G,g=u):w=w.next=G,be.lanes|=I,Ba|=I;H=H.next}while(H!==null&&H!==t);if(w===null?g=u:w.next=x,!$t(u,e.memoizedState)&&(ot=!0,X&&(a=zl,a!==null)))throw a;e.memoizedState=u,e.baseState=g,e.baseQueue=w,l.lastRenderedState=u}return o===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Ju(e){var t=st(),a=t.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,o=a.pending,u=t.memoizedState;if(o!==null){a.pending=null;var g=o=o.next;do u=e(u,g.action),g=g.next;while(g!==o);$t(u,t.memoizedState)||(ot=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),a.lastRenderedState=u}return[u,l]}function Ym(e,t,a){var l=be,o=st(),u=Ae;if(u){if(a===void 0)throw Error(r(407));a=a()}else a=t();var g=!$t((Ge||o).memoizedState,a);if(g&&(o.memoizedState=a,ot=!0),o=o.queue,$u(Xm.bind(null,l,o,e),[e]),o.getSnapshot!==t||g||rt!==null&&rt.memoizedState.tag&1){if(l.flags|=2048,ql(9,{destroy:void 0},Pm.bind(null,l,o,a,t),null),Ze===null)throw Error(r(349));u||(ta&127)!==0||Km(l,t,a)}return a}function Km(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=be.updateQueue,t===null?(t=Eo(),be.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Pm(e,t,a,l){t.value=a,t.getSnapshot=l,Zm(t)&&Jm(e)}function Xm(e,t,a){return a(function(){Zm(t)&&Jm(e)})}function Zm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!$t(e,a)}catch{return!0}}function Jm(e){var t=Es(e,2);t!==null&&Vt(t,e,2)}function Fu(e){var t=Mt();if(typeof e=="function"){var a=e;if(e=a(),Ds){_a(!0);try{a()}finally{_a(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:e},t}function Fm(e,t,a,l){return e.baseState=a,Zu(e,Ge,typeof l=="function"?l:na)}function Nx(e,t,a,l,o){if(Mo(e))throw Error(r(485));if(e=t.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){u.listeners.push(g)}};L.T!==null?a(!0):u.isTransition=!1,l(u),a=t.pending,a===null?(u.next=t.pending=u,Im(t,u)):(u.next=a.next,t.pending=a.next=u)}}function Im(e,t){var a=t.action,l=t.payload,o=e.state;if(t.isTransition){var u=L.T,g={};L.T=g;try{var x=a(o,l),w=L.S;w!==null&&w(g,x),$m(e,t,x)}catch(H){Iu(e,t,H)}finally{u!==null&&g.types!==null&&(u.types=g.types),L.T=u}}else try{u=a(o,l),$m(e,t,u)}catch(H){Iu(e,t,H)}}function $m(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){Wm(e,t,l)},function(l){return Iu(e,t,l)}):Wm(e,t,a)}function Wm(e,t,a){t.status="fulfilled",t.value=a,ey(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Im(e,a)))}function Iu(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,ey(t),t=t.next;while(t!==l)}e.action=null}function ey(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ty(e,t){return t}function ny(e,t){if(Ae){var a=Ze.formState;if(a!==null){e:{var l=be;if(Ae){if(Fe){t:{for(var o=Fe,u=gn;o.nodeType!==8;){if(!u){o=null;break t}if(o=bn(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u==="F!"||u==="F"?o:null}if(o){Fe=bn(o.nextSibling),l=o.data==="F!";break e}}Ca(l)}l=!1}l&&(t=a[0])}}return a=Mt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ty,lastRenderedState:t},a.queue=l,a=Sy.bind(null,be,l),l.dispatch=a,l=Fu(!1),u=af.bind(null,be,!1,l.queue),l=Mt(),o={state:t,dispatch:null,action:e,pending:null},l.queue=o,a=Nx.bind(null,be,o,u,a),o.dispatch=a,l.memoizedState=e,[t,a,!1]}function ay(e){var t=st();return sy(t,Ge,e)}function sy(e,t,a){if(t=Zu(e,t,ty)[0],e=To(na)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Ii(t)}catch(g){throw g===Dl?go:g}else l=t;t=st();var o=t.queue,u=o.dispatch;return a!==t.memoizedState&&(be.flags|=2048,ql(9,{destroy:void 0},Cx.bind(null,o,a),null)),[l,u,e]}function Cx(e,t){e.action=t}function ly(e){var t=st(),a=Ge;if(a!==null)return sy(t,a,e);st(),t=t.memoizedState,a=st();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function ql(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=be.updateQueue,t===null&&(t=Eo(),be.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function iy(){return st().memoizedState}function No(e,t,a,l){var o=Mt();be.flags|=e,o.memoizedState=ql(1|t,{destroy:void 0},a,l===void 0?null:l)}function Co(e,t,a,l){var o=st();l=l===void 0?null:l;var u=o.memoizedState.inst;Ge!==null&&l!==null&&Gu(l,Ge.memoizedState.deps)?o.memoizedState=ql(t,u,a,l):(be.flags|=e,o.memoizedState=ql(1|t,u,a,l))}function ry(e,t){No(8390656,8,e,t)}function $u(e,t){Co(2048,8,e,t)}function Mx(e){be.flags|=4;var t=be.updateQueue;if(t===null)t=Eo(),be.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function oy(e){var t=st().memoizedState;return Mx({ref:t,nextImpl:e}),function(){if((ke&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function cy(e,t){return Co(4,2,e,t)}function uy(e,t){return Co(4,4,e,t)}function fy(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function dy(e,t,a){a=a!=null?a.concat([e]):null,Co(4,4,fy.bind(null,t,e),a)}function Wu(){}function hy(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Gu(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function my(e,t){var a=st();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Gu(t,l[1]))return l[0];if(l=e(),Ds){_a(!0);try{e()}finally{_a(!1)}}return a.memoizedState=[l,t],l}function ef(e,t,a){return a===void 0||(ta&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=yp(),be.lanes|=e,Ba|=e,a)}function yy(e,t,a,l){return $t(a,t)?a:kl.current!==null?(e=ef(e,a,l),$t(e,t)||(ot=!0),e):(ta&42)===0||(ta&1073741824)!==0&&(Te&261930)===0?(ot=!0,e.memoizedState=a):(e=yp(),be.lanes|=e,Ba|=e,t)}function py(e,t,a,l,o){var u=P.p;P.p=u!==0&&8>u?u:8;var g=L.T,x={};L.T=x,af(e,!1,t,a);try{var w=o(),H=L.S;if(H!==null&&H(x,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var X=Ex(w,l);$i(e,t,X,sn(e))}else $i(e,t,l,sn(e))}catch(I){$i(e,t,{then:function(){},status:"rejected",reason:I},sn())}finally{P.p=u,g!==null&&x.types!==null&&(g.types=x.types),L.T=g}}function Ax(){}function tf(e,t,a,l){if(e.tag!==5)throw Error(r(476));var o=gy(e).queue;py(e,o,t,ue,a===null?Ax:function(){return vy(e),a(l)})}function gy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:ue},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:na,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function vy(e){var t=gy(e);t.next===null&&(t=e.alternate.memoizedState),$i(e,t.next.queue,{},sn())}function nf(){return St(yr)}function by(){return st().memoizedState}function xy(){return st().memoizedState}function Ox(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=sn();e=Oa(a);var l=za(t,e,a);l!==null&&(Vt(l,t,a),Xi(l,t,a)),t={cache:Au()},e.payload=t;return}t=t.return}}function zx(e,t,a){var l=sn();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mo(e)?jy(t,a):(a=xu(e,t,a,l),a!==null&&(Vt(a,e,l),Ry(a,t,l)))}function Sy(e,t,a){var l=sn();$i(e,t,a,l)}function $i(e,t,a,l){var o={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Mo(e))jy(t,o);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var g=t.lastRenderedState,x=u(g,a);if(o.hasEagerState=!0,o.eagerState=x,$t(x,g))return co(e,t,o,0),Ze===null&&oo(),!1}catch{}finally{}if(a=xu(e,t,o,l),a!==null)return Vt(a,e,l),Ry(a,t,l),!0}return!1}function af(e,t,a,l){if(l={lane:2,revertLane:kf(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Mo(e)){if(t)throw Error(r(479))}else t=xu(e,a,l,2),t!==null&&Vt(t,e,2)}function Mo(e){var t=e.alternate;return e===be||t!==null&&t===be}function jy(e,t){Ll=Ro=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Ry(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,Nh(e,a)}}var Wi={readContext:St,use:wo,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};Wi.useEffectEvent=et;var _y={readContext:St,use:wo,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:St,useEffect:ry,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,No(4194308,4,fy.bind(null,t,e),a)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){No(4,2,e,t)},useMemo:function(e,t){var a=Mt();t=t===void 0?null:t;var l=e();if(Ds){_a(!0);try{e()}finally{_a(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Mt();if(a!==void 0){var o=a(t);if(Ds){_a(!0);try{a(t)}finally{_a(!1)}}}else o=t;return l.memoizedState=l.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},l.queue=e,e=e.dispatch=zx.bind(null,be,e),[l.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:function(e){e=Fu(e);var t=e.queue,a=Sy.bind(null,be,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:Wu,useDeferredValue:function(e,t){var a=Mt();return ef(a,e,t)},useTransition:function(){var e=Fu(!1);return e=py.bind(null,be,e.queue,!0,!1),Mt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=be,o=Mt();if(Ae){if(a===void 0)throw Error(r(407));a=a()}else{if(a=t(),Ze===null)throw Error(r(349));(Te&127)!==0||Km(l,t,a)}o.memoizedState=a;var u={value:a,getSnapshot:t};return o.queue=u,ry(Xm.bind(null,l,u,e),[e]),l.flags|=2048,ql(9,{destroy:void 0},Pm.bind(null,l,u,a,t),null),a},useId:function(){var e=Mt(),t=Ze.identifierPrefix;if(Ae){var a=Un,l=Dn;a=(l&~(1<<32-It(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=_o++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=wx++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:nf,useFormState:ny,useActionState:ny,useOptimistic:function(e){var t=Mt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=af.bind(null,be,!0,a),a.dispatch=t,[e,t]},useMemoCache:Xu,useCacheRefresh:function(){return Mt().memoizedState=Ox.bind(null,be)},useEffectEvent:function(e){var t=Mt(),a={impl:e};return t.memoizedState=a,function(){if((ke&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},sf={readContext:St,use:wo,useCallback:hy,useContext:St,useEffect:$u,useImperativeHandle:dy,useInsertionEffect:cy,useLayoutEffect:uy,useMemo:my,useReducer:To,useRef:iy,useState:function(){return To(na)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=st();return yy(a,Ge.memoizedState,e,t)},useTransition:function(){var e=To(na)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Ym,useId:by,useHostTransitionStatus:nf,useFormState:ay,useActionState:ay,useOptimistic:function(e,t){var a=st();return Fm(a,Ge,e,t)},useMemoCache:Xu,useCacheRefresh:xy};sf.useEffectEvent=oy;var Ey={readContext:St,use:wo,useCallback:hy,useContext:St,useEffect:$u,useImperativeHandle:dy,useInsertionEffect:cy,useLayoutEffect:uy,useMemo:my,useReducer:Ju,useRef:iy,useState:function(){return Ju(na)},useDebugValue:Wu,useDeferredValue:function(e,t){var a=st();return Ge===null?ef(a,e,t):yy(a,Ge.memoizedState,e,t)},useTransition:function(){var e=Ju(na)[0],t=st().memoizedState;return[typeof e=="boolean"?e:Ii(e),t]},useSyncExternalStore:Ym,useId:by,useHostTransitionStatus:nf,useFormState:ly,useActionState:ly,useOptimistic:function(e,t){var a=st();return Ge!==null?Fm(a,Ge,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:xy};Ey.useEffectEvent=oy;function lf(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:v({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var rf={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=sn(),o=Oa(l);o.payload=t,a!=null&&(o.callback=a),t=za(e,o,l),t!==null&&(Vt(t,e,l),Xi(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=sn(),o=Oa(l);o.tag=1,o.payload=t,a!=null&&(o.callback=a),t=za(e,o,l),t!==null&&(Vt(t,e,l),Xi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=sn(),l=Oa(a);l.tag=2,t!=null&&(l.callback=t),t=za(e,l,a),t!==null&&(Vt(t,e,a),Xi(t,e,a))}};function wy(e,t,a,l,o,u,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,u,g):t.prototype&&t.prototype.isPureReactComponent?!qi(a,l)||!qi(o,u):!0}function Ty(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&rf.enqueueReplaceState(t,t.state,null)}function Us(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=v({},a));for(var o in e)a[o]===void 0&&(a[o]=e[o])}return a}function Ny(e){ro(e)}function Cy(e){console.error(e)}function My(e){ro(e)}function Ao(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ay(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function of(e,t,a){return a=Oa(a),a.tag=3,a.payload={element:null},a.callback=function(){Ao(e,t)},a}function Oy(e){return e=Oa(e),e.tag=3,e}function zy(e,t,a,l){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var u=l.value;e.payload=function(){return o(u)},e.callback=function(){Ay(t,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Ay(t,a,l),typeof o!="function"&&(qa===null?qa=new Set([this]):qa.add(this));var x=l.stack;this.componentDidCatch(l.value,{componentStack:x!==null?x:""})})}function Dx(e,t,a,l,o){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&Al(t,a,o,!0),a=en.current,a!==null){switch(a.tag){case 31:case 13:return vn===null?Vo():a.alternate===null&&tt===0&&(tt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,l===vo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),zf(e,l,o)),!1;case 22:return a.flags|=65536,l===vo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),zf(e,l,o)),!1}throw Error(r(435,a.tag))}return zf(e,l,o),Vo(),!1}if(Ae)return t=en.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,l!==wu&&(e=Error(r(422),{cause:l}),Gi(mn(e,a)))):(l!==wu&&(t=Error(r(423),{cause:l}),Gi(mn(t,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,l=mn(l,a),o=of(e.stateNode,l,o),Lu(e,o),tt!==4&&(tt=2)),!1;var u=Error(r(520),{cause:l});if(u=mn(u,a),rr===null?rr=[u]:rr.push(u),tt!==4&&(tt=2),t===null)return!0;l=mn(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=of(a.stateNode,l,e),Lu(a,e),!1;case 1:if(t=a.type,u=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(qa===null||!qa.has(u))))return a.flags|=65536,o&=-o,a.lanes|=o,o=Oy(o),zy(o,e,a,l),Lu(a,o),!1}a=a.return}while(a!==null);return!1}var cf=Error(r(461)),ot=!1;function jt(e,t,a,l){t.child=e===null?Lm(t,null,a,l):zs(t,e.child,a,l)}function Dy(e,t,a,l,o){a=a.render;var u=t.ref;if("ref"in l){var g={};for(var x in l)x!=="ref"&&(g[x]=l[x])}else g=l;return Cs(t),l=Vu(e,t,a,g,u,o),x=Yu(),e!==null&&!ot?(Ku(e,t,o),aa(e,t,o)):(Ae&&x&&_u(t),t.flags|=1,jt(e,t,l,o),t.child)}function Uy(e,t,a,l,o){if(e===null){var u=a.type;return typeof u=="function"&&!Su(u)&&u.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=u,ky(e,t,u,l,o)):(e=fo(a.type,null,l,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!gf(e,o)){var g=u.memoizedProps;if(a=a.compare,a=a!==null?a:qi,a(g,l)&&e.ref===t.ref)return aa(e,t,o)}return t.flags|=1,e=In(u,l),e.ref=t.ref,e.return=t,t.child=e}function ky(e,t,a,l,o){if(e!==null){var u=e.memoizedProps;if(qi(u,l)&&e.ref===t.ref)if(ot=!1,t.pendingProps=l=u,gf(e,o))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,aa(e,t,o)}return uf(e,t,a,l,o)}function Ly(e,t,a,l){var o=l.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(l=t.child=e.child,o=0;l!==null;)o=o|l.lanes|l.childLanes,l=l.sibling;l=o&~u}else l=0,t.child=null;return By(e,t,u,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&po(t,u!==null?u.cachePool:null),u!==null?Hm(t,u):qu(),Qm(t);else return l=t.lanes=536870912,By(e,t,u!==null?u.baseLanes|a:a,a,l)}else u!==null?(po(t,u.cachePool),Hm(t,u),Ua(),t.memoizedState=null):(e!==null&&po(t,null),qu(),Ua());return jt(e,t,o,a),t.child}function er(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function By(e,t,a,l,o){var u=zu();return u=u===null?null:{parent:it._currentValue,pool:u},t.memoizedState={baseLanes:a,cachePool:u},e!==null&&po(t,null),qu(),Qm(t),e!==null&&Al(e,t,l,!0),t.childLanes=o,null}function Oo(e,t){return t=Do({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qy(e,t,a){return zs(t,e.child,null,a),e=Oo(t,t.pendingProps),e.flags|=2,tn(t),t.memoizedState=null,e}function Ux(e,t,a){var l=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ae){if(l.mode==="hidden")return e=Oo(t,l),t.lanes=536870912,er(null,e);if(Qu(t),(e=Fe)?(e=Ip(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Dn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=jm(e),a.return=t,t.child=a,xt=t,Fe=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return Oo(t,l)}var u=e.memoizedState;if(u!==null){var g=u.dehydrated;if(Qu(t),o)if(t.flags&256)t.flags&=-257,t=qy(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(ot||Al(e,t,a,!1),o=(a&e.childLanes)!==0,ot||o){if(l=Ze,l!==null&&(g=Ch(l,a),g!==0&&g!==u.retryLane))throw u.retryLane=g,Es(e,g),Vt(l,e,g),cf;Vo(),t=qy(e,t,a)}else e=u.treeContext,Fe=bn(g.nextSibling),xt=t,Ae=!0,Na=null,gn=!1,e!==null&&Em(t,e),t=Oo(t,l),t.flags|=4096;return t}return e=In(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zo(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function uf(e,t,a,l,o){return Cs(t),a=Vu(e,t,a,l,void 0,o),l=Yu(),e!==null&&!ot?(Ku(e,t,o),aa(e,t,o)):(Ae&&l&&_u(t),t.flags|=1,jt(e,t,a,o),t.child)}function Hy(e,t,a,l,o,u){return Cs(t),t.updateQueue=null,a=Vm(t,l,a,o),Gm(e),l=Yu(),e!==null&&!ot?(Ku(e,t,u),aa(e,t,u)):(Ae&&l&&_u(t),t.flags|=1,jt(e,t,a,u),t.child)}function Qy(e,t,a,l,o){if(Cs(t),t.stateNode===null){var u=Tl,g=a.contextType;typeof g=="object"&&g!==null&&(u=St(g)),u=new a(l,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=rf,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=l,u.state=t.memoizedState,u.refs={},Uu(t),g=a.contextType,u.context=typeof g=="object"&&g!==null?St(g):Tl,u.state=t.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(lf(t,a,g,l),u.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(g=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),g!==u.state&&rf.enqueueReplaceState(u,u.state,null),Ji(t,l,u,o),Zi(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){u=t.stateNode;var x=t.memoizedProps,w=Us(a,x);u.props=w;var H=u.context,X=a.contextType;g=Tl,typeof X=="object"&&X!==null&&(g=St(X));var I=a.getDerivedStateFromProps;X=typeof I=="function"||typeof u.getSnapshotBeforeUpdate=="function",x=t.pendingProps!==x,X||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(x||H!==g)&&Ty(t,u,l,g),Aa=!1;var G=t.memoizedState;u.state=G,Ji(t,l,u,o),Zi(),H=t.memoizedState,x||G!==H||Aa?(typeof I=="function"&&(lf(t,a,I,l),H=t.memoizedState),(w=Aa||wy(t,a,w,l,G,H,g))?(X||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=H),u.props=l,u.state=H,u.context=g,l=w):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{u=t.stateNode,ku(e,t),g=t.memoizedProps,X=Us(a,g),u.props=X,I=t.pendingProps,G=u.context,H=a.contextType,w=Tl,typeof H=="object"&&H!==null&&(w=St(H)),x=a.getDerivedStateFromProps,(H=typeof x=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(g!==I||G!==w)&&Ty(t,u,l,w),Aa=!1,G=t.memoizedState,u.state=G,Ji(t,l,u,o),Zi();var V=t.memoizedState;g!==I||G!==V||Aa||e!==null&&e.dependencies!==null&&mo(e.dependencies)?(typeof x=="function"&&(lf(t,a,x,l),V=t.memoizedState),(X=Aa||wy(t,a,X,l,G,V,w)||e!==null&&e.dependencies!==null&&mo(e.dependencies))?(H||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(l,V,w),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(l,V,w)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=V),u.props=l,u.state=V,u.context=w,l=X):(typeof u.componentDidUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&G===e.memoizedState||(t.flags|=1024),l=!1)}return u=l,zo(e,t),l=(t.flags&128)!==0,u||l?(u=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&l?(t.child=zs(t,e.child,null,o),t.child=zs(t,null,a,o)):jt(e,t,a,o),t.memoizedState=u.state,e=t.child):e=aa(e,t,o),e}function Gy(e,t,a,l){return Ts(),t.flags|=256,jt(e,t,a,l),t.child}var ff={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function df(e){return{baseLanes:e,cachePool:Am()}}function hf(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=an),e}function Vy(e,t,a){var l=t.pendingProps,o=!1,u=(t.flags&128)!==0,g;if((g=u)||(g=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),g&&(o=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(o?Da(t):Ua(),(e=Fe)?(e=Ip(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:Dn,overflow:Un}:null,retryLane:536870912,hydrationErrors:null},a=jm(e),a.return=t,t.child=a,xt=t,Fe=null)):e=null,e===null)throw Ca(t);return Jf(e)?t.lanes=32:t.lanes=536870912,null}var x=l.children;return l=l.fallback,o?(Ua(),o=t.mode,x=Do({mode:"hidden",children:x},o),l=ws(l,o,a,null),x.return=t,l.return=t,x.sibling=l,t.child=x,l=t.child,l.memoizedState=df(a),l.childLanes=hf(e,g,a),t.memoizedState=ff,er(null,l)):(Da(t),mf(t,x))}var w=e.memoizedState;if(w!==null&&(x=w.dehydrated,x!==null)){if(u)t.flags&256?(Da(t),t.flags&=-257,t=yf(e,t,a)):t.memoizedState!==null?(Ua(),t.child=e.child,t.flags|=128,t=null):(Ua(),x=l.fallback,o=t.mode,l=Do({mode:"visible",children:l.children},o),x=ws(x,o,a,null),x.flags|=2,l.return=t,x.return=t,l.sibling=x,t.child=l,zs(t,e.child,null,a),l=t.child,l.memoizedState=df(a),l.childLanes=hf(e,g,a),t.memoizedState=ff,t=er(null,l));else if(Da(t),Jf(x)){if(g=x.nextSibling&&x.nextSibling.dataset,g)var H=g.dgst;g=H,l=Error(r(419)),l.stack="",l.digest=g,Gi({value:l,source:null,stack:null}),t=yf(e,t,a)}else if(ot||Al(e,t,a,!1),g=(a&e.childLanes)!==0,ot||g){if(g=Ze,g!==null&&(l=Ch(g,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,Es(e,l),Vt(g,e,l),cf;Zf(x)||Vo(),t=yf(e,t,a)}else Zf(x)?(t.flags|=192,t.child=e.child,t=null):(e=w.treeContext,Fe=bn(x.nextSibling),xt=t,Ae=!0,Na=null,gn=!1,e!==null&&Em(t,e),t=mf(t,l.children),t.flags|=4096);return t}return o?(Ua(),x=l.fallback,o=t.mode,w=e.child,H=w.sibling,l=In(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,H!==null?x=In(H,x):(x=ws(x,o,a,null),x.flags|=2),x.return=t,l.return=t,l.sibling=x,t.child=l,er(null,l),l=t.child,x=e.child.memoizedState,x===null?x=df(a):(o=x.cachePool,o!==null?(w=it._currentValue,o=o.parent!==w?{parent:w,pool:w}:o):o=Am(),x={baseLanes:x.baseLanes|a,cachePool:o}),l.memoizedState=x,l.childLanes=hf(e,g,a),t.memoizedState=ff,er(e.child,l)):(Da(t),a=e.child,e=a.sibling,a=In(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=a,t.memoizedState=null,a)}function mf(e,t){return t=Do({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Do(e,t){return e=Wt(22,e,null,t),e.lanes=0,e}function yf(e,t,a){return zs(t,e.child,null,a),e=mf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Yy(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),Cu(e.return,t,a)}function pf(e,t,a,l,o,u){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:o,treeForkCount:u}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=o,g.treeForkCount=u)}function Ky(e,t,a){var l=t.pendingProps,o=l.revealOrder,u=l.tail;l=l.children;var g=at.current,x=(g&2)!==0;if(x?(g=g&1|2,t.flags|=128):g&=1,ae(at,g),jt(e,t,l,a),l=Ae?Qi:0,!x&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yy(e,a,t);else if(e.tag===19)Yy(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(a=t.child,o=null;a!==null;)e=a.alternate,e!==null&&jo(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=t.child,t.child=null):(o=a.sibling,a.sibling=null),pf(t,!1,o,a,u,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&jo(e)===null){t.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}pf(t,!0,a,null,u,l);break;case"together":pf(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function aa(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ba|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Al(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,a=In(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=In(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function gf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&mo(e)))}function kx(e,t,a){switch(t.tag){case 3:He(t,t.stateNode.containerInfo),Ma(t,it,e.memoizedState.cache),Ts();break;case 27:case 5:un(t);break;case 4:He(t,t.stateNode.containerInfo);break;case 10:Ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Qu(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Da(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Vy(e,t,a):(Da(t),e=aa(e,t,a),e!==null?e.sibling:null);Da(t);break;case 19:var o=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(Al(e,t,a,!1),l=(a&t.childLanes)!==0),o){if(l)return Ky(e,t,a);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),ae(at,at.current),l)break;return null;case 22:return t.lanes=0,Ly(e,t,a,t.pendingProps);case 24:Ma(t,it,e.memoizedState.cache)}return aa(e,t,a)}function Py(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!gf(e,a)&&(t.flags&128)===0)return ot=!1,kx(e,t,a);ot=(e.flags&131072)!==0}else ot=!1,Ae&&(t.flags&1048576)!==0&&_m(t,Qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=As(t.elementType),t.type=e,typeof e=="function")Su(e)?(l=Us(e,l),t.tag=1,t=Qy(null,t,e,l,a)):(t.tag=0,t=uf(null,t,e,l,a));else{if(e!=null){var o=e.$$typeof;if(o===N){t.tag=11,t=Dy(null,t,e,l,a);break e}else if(o===D){t.tag=14,t=Uy(null,t,e,l,a);break e}}throw t=ee(e)||e,Error(r(306,t,""))}}return t;case 0:return uf(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,o=Us(l,t.pendingProps),Qy(e,t,l,o,a);case 3:e:{if(He(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var u=t.memoizedState;o=u.element,ku(e,t),Ji(t,l,null,a);var g=t.memoizedState;if(l=g.cache,Ma(t,it,l),l!==u.cache&&Mu(t,[it],a,!0),Zi(),l=g.element,u.isDehydrated)if(u={element:l,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=Gy(e,t,l,a);break e}else if(l!==o){o=mn(Error(r(424)),t),Gi(o),t=Gy(e,t,l,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Fe=bn(e.firstChild),xt=t,Ae=!0,Na=null,gn=!0,a=Lm(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Ts(),l===o){t=aa(e,t,a);break e}jt(e,t,l,a)}t=t.child}return t;case 26:return zo(e,t),e===null?(a=ag(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ae||(a=t.type,e=t.pendingProps,l=Fo(me.current).createElement(a),l[bt]=t,l[Lt]=e,Rt(l,a,e),yt(l),t.stateNode=l):t.memoizedState=ag(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return un(t),e===null&&Ae&&(l=t.stateNode=eg(t.type,t.pendingProps,me.current),xt=t,gn=!0,o=Fe,Va(t.type)?(Ff=o,Fe=bn(l.firstChild)):Fe=o),jt(e,t,t.pendingProps.children,a),zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((o=l=Fe)&&(l=d1(l,t.type,t.pendingProps,gn),l!==null?(t.stateNode=l,xt=t,Fe=bn(l.firstChild),gn=!1,o=!0):o=!1),o||Ca(t)),un(t),o=t.type,u=t.pendingProps,g=e!==null?e.memoizedProps:null,l=u.children,Kf(o,u)?l=null:g!==null&&Kf(o,g)&&(t.flags|=32),t.memoizedState!==null&&(o=Vu(e,t,Tx,null,null,a),yr._currentValue=o),zo(e,t),jt(e,t,l,a),t.child;case 6:return e===null&&Ae&&((e=a=Fe)&&(a=h1(a,t.pendingProps,gn),a!==null?(t.stateNode=a,xt=t,Fe=null,e=!0):e=!1),e||Ca(t)),null;case 13:return Vy(e,t,a);case 4:return He(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=zs(t,null,l,a):jt(e,t,l,a),t.child;case 11:return Dy(e,t,t.type,t.pendingProps,a);case 7:return jt(e,t,t.pendingProps,a),t.child;case 8:return jt(e,t,t.pendingProps.children,a),t.child;case 12:return jt(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,Ma(t,t.type,l.value),jt(e,t,l.children,a),t.child;case 9:return o=t.type._context,l=t.pendingProps.children,Cs(t),o=St(o),l=l(o),t.flags|=1,jt(e,t,l,a),t.child;case 14:return Uy(e,t,t.type,t.pendingProps,a);case 15:return ky(e,t,t.type,t.pendingProps,a);case 19:return Ky(e,t,a);case 31:return Ux(e,t,a);case 22:return Ly(e,t,a,t.pendingProps);case 24:return Cs(t),l=St(it),e===null?(o=zu(),o===null&&(o=Ze,u=Au(),o.pooledCache=u,u.refCount++,u!==null&&(o.pooledCacheLanes|=a),o=u),t.memoizedState={parent:l,cache:o},Uu(t),Ma(t,it,o)):((e.lanes&a)!==0&&(ku(e,t),Ji(t,null,null,a),Zi()),o=e.memoizedState,u=t.memoizedState,o.parent!==l?(o={parent:l,cache:l},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),Ma(t,it,l)):(l=u.cache,Ma(t,it,l),l!==o.cache&&Mu(t,[it],a,!0))),jt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function sa(e){e.flags|=4}function vf(e,t,a,l,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(bp())e.flags|=8192;else throw Os=vo,Du}else e.flags&=-16777217}function Xy(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!og(t))if(bp())e.flags|=8192;else throw Os=vo,Du}function Uo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?wh():536870912,e.lanes|=t,Vl|=t)}function tr(e,t){if(!Ae)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function Ie(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags&65011712,l|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,l|=o.subtreeFlags,l|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Lx(e,t,a){var l=t.pendingProps;switch(Eu(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ie(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),ea(it),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Tu())),Ie(t),null;case 26:var o=t.type,u=t.memoizedState;return e===null?(sa(t),u!==null?(Ie(t),Xy(t,u)):(Ie(t),vf(t,o,null,l,a))):u?u!==e.memoizedState?(sa(t),Ie(t),Xy(t,u)):(Ie(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&sa(t),Ie(t),vf(t,o,e,l,a)),null;case 27:if(kt(t),a=me.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}e=se.current,Ml(t)?wm(t):(e=eg(o,l,a),t.stateNode=e,sa(t))}return Ie(t),null;case 5:if(kt(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return Ie(t),null}if(u=se.current,Ml(t))wm(t);else{var g=Fo(me.current);switch(u){case 1:u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":u=g.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":u=g.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":u=g.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?u.multiple=!0:l.size&&(u.size=l.size);break;default:u=typeof l.is=="string"?g.createElement(o,{is:l.is}):g.createElement(o)}}u[bt]=t,u[Lt]=l;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)u.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=u;e:switch(Rt(u,o,l),o){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&sa(t)}}return Ie(t),vf(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&sa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=me.current,Ml(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,o=xt,o!==null)switch(o.tag){case 27:case 5:l=o.memoizedProps}e[bt]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Vp(e.nodeValue,a)),e||Ca(t,!0)}else e=Fo(e).createTextNode(l),e[bt]=t,t.stateNode=e}return Ie(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ml(t),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[bt]=t}else Ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),e=!1}else a=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(tn(t),t):(tn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return Ie(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ml(t),l!==null&&l.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[bt]=t}else Ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ie(t),o=!1}else o=Tu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(tn(t),t):(tn(t),null)}return tn(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,o=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(o=l.alternate.memoizedState.cachePool.pool),u=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==o&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),Uo(t,t.updateQueue),Ie(t),null);case 4:return ge(),e===null&&Hf(t.stateNode.containerInfo),Ie(t),null;case 10:return ea(t.type),Ie(t),null;case 19:if(F(at),l=t.memoizedState,l===null)return Ie(t),null;if(o=(t.flags&128)!==0,u=l.rendering,u===null)if(o)tr(l,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=jo(e),u!==null){for(t.flags|=128,tr(l,!1),e=u.updateQueue,t.updateQueue=e,Uo(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)Sm(a,e),a=a.sibling;return ae(at,at.current&1|2),Ae&&$n(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&_t()>Ho&&(t.flags|=128,o=!0,tr(l,!1),t.lanes=4194304)}else{if(!o)if(e=jo(u),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Uo(t,e),tr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!u.alternate&&!Ae)return Ie(t),null}else 2*_t()-l.renderingStartTime>Ho&&a!==536870912&&(t.flags|=128,o=!0,tr(l,!1),t.lanes=4194304);l.isBackwards?(u.sibling=t.child,t.child=u):(e=l.last,e!==null?e.sibling=u:t.child=u,l.last=u)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=_t(),e.sibling=null,a=at.current,ae(at,o?a&1|2:a&1),Ae&&$n(t,l.treeForkCount),e):(Ie(t),null);case 22:case 23:return tn(t),Hu(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),a=t.updateQueue,a!==null&&Uo(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&F(Ms),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ea(it),Ie(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function Bx(e,t){switch(Eu(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ea(it),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return kt(t),null;case 31:if(t.memoizedState!==null){if(tn(t),t.alternate===null)throw Error(r(340));Ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return F(at),null;case 4:return ge(),null;case 10:return ea(t.type),null;case 22:case 23:return tn(t),Hu(),e!==null&&F(Ms),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ea(it),null;case 25:return null;default:return null}}function Zy(e,t){switch(Eu(t),t.tag){case 3:ea(it),ge();break;case 26:case 27:case 5:kt(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&tn(t);break;case 13:tn(t);break;case 19:F(at);break;case 10:ea(t.type);break;case 22:case 23:tn(t),Hu(),e!==null&&F(Ms);break;case 24:ea(it)}}function nr(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){l=void 0;var u=a.create,g=a.inst;l=u(),g.destroy=l}a=a.next}while(a!==o)}}catch(x){qe(t,t.return,x)}}function ka(e,t,a){try{var l=t.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var u=o.next;l=u;do{if((l.tag&e)===e){var g=l.inst,x=g.destroy;if(x!==void 0){g.destroy=void 0,o=t;var w=a,H=x;try{H()}catch(X){qe(o,w,X)}}}l=l.next}while(l!==u)}}catch(X){qe(t,t.return,X)}}function Jy(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{qm(t,a)}catch(l){qe(e,e.return,l)}}}function Fy(e,t,a){a.props=Us(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){qe(e,t,l)}}function ar(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(o){qe(e,t,o)}}function kn(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(o){qe(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){qe(e,t,o)}else a.current=null}function Iy(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(o){qe(e,e.return,o)}}function bf(e,t,a){try{var l=e.stateNode;i1(l,e.type,a,t),l[Lt]=t}catch(o){qe(e,e.return,o)}}function $y(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Va(e.type)||e.tag===4}function xf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$y(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Va(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sf(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Jn));else if(l!==4&&(l===27&&Va(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Sf(e,t,a),e=e.sibling;e!==null;)Sf(e,t,a),e=e.sibling}function ko(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&Va(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ko(e,t,a),e=e.sibling;e!==null;)ko(e,t,a),e=e.sibling}function Wy(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);Rt(t,l,a),t[bt]=e,t[Lt]=a}catch(u){qe(e,e.return,u)}}var la=!1,ct=!1,jf=!1,ep=typeof WeakSet=="function"?WeakSet:Set,pt=null;function qx(e,t){if(e=e.containerInfo,Vf=ac,e=dm(e),mu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var o=l.anchorOffset,u=l.focusNode;l=l.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var g=0,x=-1,w=-1,H=0,X=0,I=e,G=null;t:for(;;){for(var V;I!==a||o!==0&&I.nodeType!==3||(x=g+o),I!==u||l!==0&&I.nodeType!==3||(w=g+l),I.nodeType===3&&(g+=I.nodeValue.length),(V=I.firstChild)!==null;)G=I,I=V;for(;;){if(I===e)break t;if(G===a&&++H===o&&(x=g),G===u&&++X===l&&(w=g),(V=I.nextSibling)!==null)break;I=G,G=I.parentNode}I=V}a=x===-1||w===-1?null:{start:x,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(Yf={focusedElem:e,selectionRange:a},ac=!1,pt=t;pt!==null;)if(t=pt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,pt=e;else for(;pt!==null;){switch(t=pt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,a=t,o=u.memoizedProps,u=u.memoizedState,l=a.stateNode;try{var ce=Us(a.type,o);e=l.getSnapshotBeforeUpdate(ce,u),l.__reactInternalSnapshotBeforeUpdate=e}catch(pe){qe(a,a.return,pe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Xf(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,pt=e;break}pt=t.return}}function tp(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:ra(e,a),l&4&&nr(5,a);break;case 1:if(ra(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(g){qe(a,a.return,g)}else{var o=Us(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){qe(a,a.return,g)}}l&64&&Jy(a),l&512&&ar(a,a.return);break;case 3:if(ra(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{qm(e,t)}catch(g){qe(a,a.return,g)}}break;case 27:t===null&&l&4&&Wy(a);case 26:case 5:ra(e,a),t===null&&l&4&&Iy(a),l&512&&ar(a,a.return);break;case 12:ra(e,a);break;case 31:ra(e,a),l&4&&sp(e,a);break;case 13:ra(e,a),l&4&&lp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Zx.bind(null,a),m1(e,a))));break;case 22:if(l=a.memoizedState!==null||la,!l){t=t!==null&&t.memoizedState!==null||ct,o=la;var u=ct;la=l,(ct=t)&&!u?oa(e,a,(a.subtreeFlags&8772)!==0):ra(e,a),la=o,ct=u}break;case 30:break;default:ra(e,a)}}function np(e){var t=e.alternate;t!==null&&(e.alternate=null,np(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ic(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var $e=null,qt=!1;function ia(e,t,a){for(a=a.child;a!==null;)ap(e,t,a),a=a.sibling}function ap(e,t,a){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(Ti,a)}catch{}switch(a.tag){case 26:ct||kn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:ct||kn(a,t);var l=$e,o=qt;Va(a.type)&&($e=a.stateNode,qt=!1),ia(e,t,a),dr(a.stateNode),$e=l,qt=o;break;case 5:ct||kn(a,t);case 6:if(l=$e,o=qt,$e=null,ia(e,t,a),$e=l,qt=o,$e!==null)if(qt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(a.stateNode)}catch(u){qe(a,t,u)}else try{$e.removeChild(a.stateNode)}catch(u){qe(a,t,u)}break;case 18:$e!==null&&(qt?(e=$e,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Il(e)):Jp($e,a.stateNode));break;case 4:l=$e,o=qt,$e=a.stateNode.containerInfo,qt=!0,ia(e,t,a),$e=l,qt=o;break;case 0:case 11:case 14:case 15:ka(2,a,t),ct||ka(4,a,t),ia(e,t,a);break;case 1:ct||(kn(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&Fy(a,t,l)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:ct=(l=ct)||a.memoizedState!==null,ia(e,t,a),ct=l;break;default:ia(e,t,a)}}function sp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Il(e)}catch(a){qe(t,t.return,a)}}}function lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Il(e)}catch(a){qe(t,t.return,a)}}function Hx(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ep),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ep),t;default:throw Error(r(435,e.tag))}}function Lo(e,t){var a=Hx(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var o=Jx.bind(null,e,l);l.then(o,o)}})}function Ht(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var o=a[l],u=e,g=t,x=g;e:for(;x!==null;){switch(x.tag){case 27:if(Va(x.type)){$e=x.stateNode,qt=!1;break e}break;case 5:$e=x.stateNode,qt=!1;break e;case 3:case 4:$e=x.stateNode.containerInfo,qt=!0;break e}x=x.return}if($e===null)throw Error(r(160));ap(u,g,o),$e=null,qt=!1,u=o.alternate,u!==null&&(u.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ip(t,e),t=t.sibling}var _n=null;function ip(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ht(t,e),Qt(e),l&4&&(ka(3,e,e.return),nr(3,e),ka(5,e,e.return));break;case 1:Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),l&64&&la&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var o=_n;if(Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),l&4){var u=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(l){case"title":u=o.getElementsByTagName("title")[0],(!u||u[Mi]||u[bt]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=o.createElement(l),o.head.insertBefore(u,o.querySelector("head > title"))),Rt(u,l,a),u[bt]=e,yt(u),l=u;break e;case"link":var g=ig("link","href",o).get(l+(a.href||""));if(g){for(var x=0;x<g.length;x++)if(u=g[x],u.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&u.getAttribute("rel")===(a.rel==null?null:a.rel)&&u.getAttribute("title")===(a.title==null?null:a.title)&&u.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(x,1);break t}}u=o.createElement(l),Rt(u,l,a),o.head.appendChild(u);break;case"meta":if(g=ig("meta","content",o).get(l+(a.content||""))){for(x=0;x<g.length;x++)if(u=g[x],u.getAttribute("content")===(a.content==null?null:""+a.content)&&u.getAttribute("name")===(a.name==null?null:a.name)&&u.getAttribute("property")===(a.property==null?null:a.property)&&u.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&u.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(x,1);break t}}u=o.createElement(l),Rt(u,l,a),o.head.appendChild(u);break;default:throw Error(r(468,l))}u[bt]=e,yt(u),l=u}e.stateNode=l}else rg(o,e.type,e.stateNode);else e.stateNode=lg(o,l,e.memoizedProps);else u!==l?(u===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,l===null?rg(o,e.type,e.stateNode):lg(o,l,e.memoizedProps)):l===null&&e.stateNode!==null&&bf(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),a!==null&&l&4&&bf(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ht(t,e),Qt(e),l&512&&(ct||a===null||kn(a,a.return)),e.flags&32){o=e.stateNode;try{xl(o,"")}catch(ce){qe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(o=e.memoizedProps,bf(e,o,a!==null?a.memoizedProps:o)),l&1024&&(jf=!0);break;case 6:if(Ht(t,e),Qt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ce){qe(e,e.return,ce)}}break;case 3:if(Wo=null,o=_n,_n=Io(t.containerInfo),Ht(t,e),_n=o,Qt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Il(t.containerInfo)}catch(ce){qe(e,e.return,ce)}jf&&(jf=!1,rp(e));break;case 4:l=_n,_n=Io(e.stateNode.containerInfo),Ht(t,e),Qt(e),_n=l;break;case 12:Ht(t,e),Qt(e);break;case 31:Ht(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 13:Ht(t,e),Qt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(qo=_t()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 22:o=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,H=la,X=ct;if(la=H||o,ct=X||w,Ht(t,e),ct=X,la=H,Qt(e),l&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(a===null||w||la||ct||ks(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){w=a=t;try{if(u=w.stateNode,o)g=u.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{x=w.stateNode;var I=w.memoizedProps.style,G=I!=null&&I.hasOwnProperty("display")?I.display:null;x.style.display=G==null||typeof G=="boolean"?"":(""+G).trim()}}catch(ce){qe(w,w.return,ce)}}}else if(t.tag===6){if(a===null){w=t;try{w.stateNode.nodeValue=o?"":w.memoizedProps}catch(ce){qe(w,w.return,ce)}}}else if(t.tag===18){if(a===null){w=t;try{var V=w.stateNode;o?Fp(V,!0):Fp(w.stateNode,!1)}catch(ce){qe(w,w.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,Lo(e,a))));break;case 19:Ht(t,e),Qt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 30:break;case 21:break;default:Ht(t,e),Qt(e)}}function Qt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if($y(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,u=xf(e);ko(e,u,o);break;case 5:var g=a.stateNode;a.flags&32&&(xl(g,""),a.flags&=-33);var x=xf(e);ko(e,x,g);break;case 3:case 4:var w=a.stateNode.containerInfo,H=xf(e);Sf(e,H,w);break;default:throw Error(r(161))}}catch(X){qe(e,e.return,X)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function rp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;rp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ra(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tp(e,t.alternate,t),t=t.sibling}function ks(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ka(4,t,t.return),ks(t);break;case 1:kn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Fy(t,t.return,a),ks(t);break;case 27:dr(t.stateNode);case 26:case 5:kn(t,t.return),ks(t);break;case 22:t.memoizedState===null&&ks(t);break;case 30:ks(t);break;default:ks(t)}e=e.sibling}}function oa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,o=e,u=t,g=u.flags;switch(u.tag){case 0:case 11:case 15:oa(o,u,a),nr(4,u);break;case 1:if(oa(o,u,a),l=u,o=l.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){qe(l,l.return,H)}if(l=u,o=l.updateQueue,o!==null){var x=l.stateNode;try{var w=o.shared.hiddenCallbacks;if(w!==null)for(o.shared.hiddenCallbacks=null,o=0;o<w.length;o++)Bm(w[o],x)}catch(H){qe(l,l.return,H)}}a&&g&64&&Jy(u),ar(u,u.return);break;case 27:Wy(u);case 26:case 5:oa(o,u,a),a&&l===null&&g&4&&Iy(u),ar(u,u.return);break;case 12:oa(o,u,a);break;case 31:oa(o,u,a),a&&g&4&&sp(o,u);break;case 13:oa(o,u,a),a&&g&4&&lp(o,u);break;case 22:u.memoizedState===null&&oa(o,u,a),ar(u,u.return);break;case 30:break;default:oa(o,u,a)}t=t.sibling}}function Rf(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Vi(a))}function _f(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vi(e))}function En(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)op(e,t,a,l),t=t.sibling}function op(e,t,a,l){var o=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,a,l),o&2048&&nr(9,t);break;case 1:En(e,t,a,l);break;case 3:En(e,t,a,l),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Vi(e)));break;case 12:if(o&2048){En(e,t,a,l),e=t.stateNode;try{var u=t.memoizedProps,g=u.id,x=u.onPostCommit;typeof x=="function"&&x(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){qe(t,t.return,w)}}else En(e,t,a,l);break;case 31:En(e,t,a,l);break;case 13:En(e,t,a,l);break;case 23:break;case 22:u=t.stateNode,g=t.alternate,t.memoizedState!==null?u._visibility&2?En(e,t,a,l):sr(e,t):u._visibility&2?En(e,t,a,l):(u._visibility|=2,Hl(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),o&2048&&Rf(g,t);break;case 24:En(e,t,a,l),o&2048&&_f(t.alternate,t);break;default:En(e,t,a,l)}}function Hl(e,t,a,l,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,g=t,x=a,w=l,H=g.flags;switch(g.tag){case 0:case 11:case 15:Hl(u,g,x,w,o),nr(8,g);break;case 23:break;case 22:var X=g.stateNode;g.memoizedState!==null?X._visibility&2?Hl(u,g,x,w,o):sr(u,g):(X._visibility|=2,Hl(u,g,x,w,o)),o&&H&2048&&Rf(g.alternate,g);break;case 24:Hl(u,g,x,w,o),o&&H&2048&&_f(g.alternate,g);break;default:Hl(u,g,x,w,o)}t=t.sibling}}function sr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,o=l.flags;switch(l.tag){case 22:sr(a,l),o&2048&&Rf(l.alternate,l);break;case 24:sr(a,l),o&2048&&_f(l.alternate,l);break;default:sr(a,l)}t=t.sibling}}var lr=8192;function Ql(e,t,a){if(e.subtreeFlags&lr)for(e=e.child;e!==null;)cp(e,t,a),e=e.sibling}function cp(e,t,a){switch(e.tag){case 26:Ql(e,t,a),e.flags&lr&&e.memoizedState!==null&&w1(a,_n,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,a);break;case 3:case 4:var l=_n;_n=Io(e.stateNode.containerInfo),Ql(e,t,a),_n=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=lr,lr=16777216,Ql(e,t,a),lr=l):Ql(e,t,a));break;default:Ql(e,t,a)}}function up(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ir(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];pt=l,dp(l,e)}up(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)fp(e),e=e.sibling}function fp(e){switch(e.tag){case 0:case 11:case 15:ir(e),e.flags&2048&&ka(9,e,e.return);break;case 3:ir(e);break;case 12:ir(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Bo(e)):ir(e);break;default:ir(e)}}function Bo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];pt=l,dp(l,e)}up(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ka(8,t,t.return),Bo(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,Bo(t));break;default:Bo(t)}e=e.sibling}}function dp(e,t){for(;pt!==null;){var a=pt;switch(a.tag){case 0:case 11:case 15:ka(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Vi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,pt=l;else e:for(a=e;pt!==null;){l=pt;var o=l.sibling,u=l.return;if(np(l),l===a){pt=null;break e}if(o!==null){o.return=u,pt=o;break e}pt=u}}}var Qx={getCacheForType:function(e){var t=St(it),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return St(it).controller.signal}},Gx=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ze=null,_e=null,Te=0,Be=0,nn=null,La=!1,Gl=!1,Ef=!1,ca=0,tt=0,Ba=0,Ls=0,wf=0,an=0,Vl=0,rr=null,Gt=null,Tf=!1,qo=0,hp=0,Ho=1/0,Qo=null,qa=null,dt=0,Ha=null,Yl=null,ua=0,Nf=0,Cf=null,mp=null,or=0,Mf=null;function sn(){return(ke&2)!==0&&Te!==0?Te&-Te:L.T!==null?kf():Mh()}function yp(){if(an===0)if((Te&536870912)===0||Ae){var e=Zr;Zr<<=1,(Zr&3932160)===0&&(Zr=262144),an=e}else an=536870912;return e=en.current,e!==null&&(e.flags|=32),an}function Vt(e,t,a){(e===Ze&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(Kl(e,0),Qa(e,Te,an,!1)),Ci(e,a),((ke&2)===0||e!==Ze)&&(e===Ze&&((ke&2)===0&&(Ls|=a),tt===4&&Qa(e,Te,an,!1)),Ln(e))}function pp(e,t,a){if((ke&6)!==0)throw Error(r(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ni(e,t),o=l?Kx(e,t):Of(e,t,!0),u=l;do{if(o===0){Gl&&!l&&Qa(e,t,0,!1);break}else{if(a=e.current.alternate,u&&!Vx(a)){o=Of(e,t,!1),u=!1;continue}if(o===2){if(u=t,e.errorRecoveryDisabledLanes&u)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var x=e;o=rr;var w=x.current.memoizedState.isDehydrated;if(w&&(Kl(x,g).flags|=256),g=Of(x,g,!1),g!==2){if(Ef&&!w){x.errorRecoveryDisabledLanes|=u,Ls|=u,o=4;break e}u=Gt,Gt=o,u!==null&&(Gt===null?Gt=u:Gt.push.apply(Gt,u))}o=g}if(u=!1,o!==2)continue}}if(o===1){Kl(e,0),Qa(e,t,0,!0);break}e:{switch(l=e,u=o,u){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Qa(l,t,an,!La);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(o=qo+300-_t(),10<o)){if(Qa(l,t,an,!La),Fr(l,0,!0)!==0)break e;ua=t,l.timeoutHandle=Xp(gp.bind(null,l,a,Gt,Qo,Tf,t,an,Ls,Vl,La,u,"Throttled",-0,0),o);break e}gp(l,a,Gt,Qo,Tf,t,an,Ls,Vl,La,u,null,-0,0)}}break}while(!0);Ln(e)}function gp(e,t,a,l,o,u,g,x,w,H,X,I,G,V){if(e.timeoutHandle=-1,I=t.subtreeFlags,I&8192||(I&16785408)===16785408){I={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Jn},cp(t,u,I);var ce=(u&62914560)===u?qo-_t():(u&4194048)===u?hp-_t():0;if(ce=T1(I,ce),ce!==null){ua=u,e.cancelPendingCommit=ce(Ep.bind(null,e,t,u,a,l,o,g,x,w,X,I,null,G,V)),Qa(e,u,g,!H);return}}Ep(e,t,u,a,l,o,g,x,w)}function Vx(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var o=a[l],u=o.getSnapshot;o=o.value;try{if(!$t(u(),o))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qa(e,t,a,l){t&=~wf,t&=~Ls,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var o=t;0<o;){var u=31-It(o),g=1<<u;l[u]=-1,o&=~g}a!==0&&Th(e,a,t)}function Go(){return(ke&6)===0?(cr(0),!1):!0}function Af(){if(_e!==null){if(Be===0)var e=_e.return;else e=_e,Wn=Ns=null,Pu(e),Ul=null,Ki=0,e=_e;for(;e!==null;)Zy(e.alternate,e),e=e.return;_e=null}}function Kl(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,c1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ua=0,Af(),Ze=e,_e=a=In(e.current,null),Te=t,Be=0,nn=null,La=!1,Gl=Ni(e,t),Ef=!1,Vl=an=wf=Ls=Ba=tt=0,Gt=rr=null,Tf=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var o=31-It(l),u=1<<o;t|=e[o],l&=~u}return ca=t,oo(),a}function vp(e,t){be=null,L.H=Wi,t===Dl||t===go?(t=Dm(),Be=3):t===Du?(t=Dm(),Be=4):Be=t===cf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,nn=t,_e===null&&(tt=1,Ao(e,mn(t,e.current)))}function bp(){var e=en.current;return e===null?!0:(Te&4194048)===Te?vn===null:(Te&62914560)===Te||(Te&536870912)!==0?e===vn:!1}function xp(){var e=L.H;return L.H=Wi,e===null?Wi:e}function Sp(){var e=L.A;return L.A=Qx,e}function Vo(){tt=4,La||(Te&4194048)!==Te&&en.current!==null||(Gl=!0),(Ba&134217727)===0&&(Ls&134217727)===0||Ze===null||Qa(Ze,Te,an,!1)}function Of(e,t,a){var l=ke;ke|=2;var o=xp(),u=Sp();(Ze!==e||Te!==t)&&(Qo=null,Kl(e,t)),t=!1;var g=tt;e:do try{if(Be!==0&&_e!==null){var x=_e,w=nn;switch(Be){case 8:Af(),g=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(t=!0);var H=Be;if(Be=0,nn=null,Pl(e,x,w,H),a&&Gl){g=0;break e}break;default:H=Be,Be=0,nn=null,Pl(e,x,w,H)}}Yx(),g=tt;break}catch(X){vp(e,X)}while(!0);return t&&e.shellSuspendCounter++,Wn=Ns=null,ke=l,L.H=o,L.A=u,_e===null&&(Ze=null,Te=0,oo()),g}function Yx(){for(;_e!==null;)jp(_e)}function Kx(e,t){var a=ke;ke|=2;var l=xp(),o=Sp();Ze!==e||Te!==t?(Qo=null,Ho=_t()+500,Kl(e,t)):Gl=Ni(e,t);e:do try{if(Be!==0&&_e!==null){t=_e;var u=nn;t:switch(Be){case 1:Be=0,nn=null,Pl(e,t,u,1);break;case 2:case 9:if(Om(u)){Be=0,nn=null,Rp(t);break}t=function(){Be!==2&&Be!==9||Ze!==e||(Be=7),Ln(e)},u.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Om(u)?(Be=0,nn=null,Rp(t)):(Be=0,nn=null,Pl(e,t,u,7));break;case 5:var g=null;switch(_e.tag){case 26:g=_e.memoizedState;case 5:case 27:var x=_e;if(g?og(g):x.stateNode.complete){Be=0,nn=null;var w=x.sibling;if(w!==null)_e=w;else{var H=x.return;H!==null?(_e=H,Yo(H)):_e=null}break t}}Be=0,nn=null,Pl(e,t,u,5);break;case 6:Be=0,nn=null,Pl(e,t,u,6);break;case 8:Af(),tt=6;break e;default:throw Error(r(462))}}Px();break}catch(X){vp(e,X)}while(!0);return Wn=Ns=null,L.H=l,L.A=o,ke=a,_e!==null?0:(Ze=null,Te=0,oo(),tt)}function Px(){for(;_e!==null&&!Pr();)jp(_e)}function jp(e){var t=Py(e.alternate,e,ca);e.memoizedProps=e.pendingProps,t===null?Yo(e):_e=t}function Rp(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Hy(a,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Hy(a,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:Pu(t);default:Zy(a,t),t=_e=Sm(t,ca),t=Py(a,t,ca)}e.memoizedProps=e.pendingProps,t===null?Yo(e):_e=t}function Pl(e,t,a,l){Wn=Ns=null,Pu(t),Ul=null,Ki=0;var o=t.return;try{if(Dx(e,o,t,a,Te)){tt=1,Ao(e,mn(a,e.current)),_e=null;return}}catch(u){if(o!==null)throw _e=o,u;tt=1,Ao(e,mn(a,e.current)),_e=null;return}t.flags&32768?(Ae||l===1?e=!0:Gl||(Te&536870912)!==0?e=!1:(La=e=!0,(l===2||l===9||l===3||l===6)&&(l=en.current,l!==null&&l.tag===13&&(l.flags|=16384))),_p(t,e)):Yo(t)}function Yo(e){var t=e;do{if((t.flags&32768)!==0){_p(t,La);return}e=t.return;var a=Lx(t.alternate,t,ca);if(a!==null){_e=a;return}if(t=t.sibling,t!==null){_e=t;return}_e=t=e}while(t!==null);tt===0&&(tt=5)}function _p(e,t){do{var a=Bx(e.alternate,e);if(a!==null){a.flags&=32767,_e=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){_e=e;return}_e=e=a}while(e!==null);tt=6,_e=null}function Ep(e,t,a,l,o,u,g,x,w){e.cancelPendingCommit=null;do Ko();while(dt!==0);if((ke&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(u=t.lanes|t.childLanes,u|=bu,Eb(e,a,u,g,x,w),e===Ze&&(_e=Ze=null,Te=0),Yl=t,Ha=e,ua=a,Nf=u,Cf=o,mp=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fx(hl,function(){return Mp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=L.T,L.T=null,o=P.p,P.p=2,g=ke,ke|=4;try{qx(e,t,a)}finally{ke=g,P.p=o,L.T=l}}dt=1,wp(),Tp(),Np()}}function wp(){if(dt===1){dt=0;var e=Ha,t=Yl,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=L.T,L.T=null;var l=P.p;P.p=2;var o=ke;ke|=4;try{ip(t,e);var u=Yf,g=dm(e.containerInfo),x=u.focusedElem,w=u.selectionRange;if(g!==x&&x&&x.ownerDocument&&fm(x.ownerDocument.documentElement,x)){if(w!==null&&mu(x)){var H=w.start,X=w.end;if(X===void 0&&(X=H),"selectionStart"in x)x.selectionStart=H,x.selectionEnd=Math.min(X,x.value.length);else{var I=x.ownerDocument||document,G=I&&I.defaultView||window;if(G.getSelection){var V=G.getSelection(),ce=x.textContent.length,pe=Math.min(w.start,ce),Ye=w.end===void 0?pe:Math.min(w.end,ce);!V.extend&&pe>Ye&&(g=Ye,Ye=pe,pe=g);var U=um(x,pe),M=um(x,Ye);if(U&&M&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==M.node||V.focusOffset!==M.offset)){var q=I.createRange();q.setStart(U.node,U.offset),V.removeAllRanges(),pe>Ye?(V.addRange(q),V.extend(M.node,M.offset)):(q.setEnd(M.node,M.offset),V.addRange(q))}}}}for(I=[],V=x;V=V.parentNode;)V.nodeType===1&&I.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<I.length;x++){var J=I[x];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}ac=!!Vf,Yf=Vf=null}finally{ke=o,P.p=l,L.T=a}}e.current=t,dt=2}}function Tp(){if(dt===2){dt=0;var e=Ha,t=Yl,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=L.T,L.T=null;var l=P.p;P.p=2;var o=ke;ke|=4;try{tp(e,t.alternate,t)}finally{ke=o,P.p=l,L.T=a}}dt=3}}function Np(){if(dt===4||dt===3){dt=0,Pc();var e=Ha,t=Yl,a=ua,l=mp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?dt=5:(dt=0,Yl=Ha=null,Cp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(qa=null),Jc(a),t=t.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(Ti,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=L.T,o=P.p,P.p=2,L.T=null;try{for(var u=e.onRecoverableError,g=0;g<l.length;g++){var x=l[g];u(x.value,{componentStack:x.stack})}}finally{L.T=t,P.p=o}}(ua&3)!==0&&Ko(),Ln(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===Mf?or++:(or=0,Mf=e):or=0,cr(0)}}function Cp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Vi(t)))}function Ko(){return wp(),Tp(),Np(),Mp()}function Mp(){if(dt!==5)return!1;var e=Ha,t=Nf;Nf=0;var a=Jc(ua),l=L.T,o=P.p;try{P.p=32>a?32:a,L.T=null,a=Cf,Cf=null;var u=Ha,g=ua;if(dt=0,Yl=Ha=null,ua=0,(ke&6)!==0)throw Error(r(331));var x=ke;if(ke|=4,fp(u.current),op(u,u.current,g,a),ke=x,cr(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(Ti,u)}catch{}return!0}finally{P.p=o,L.T=l,Cp(e,t)}}function Ap(e,t,a){t=mn(a,t),t=of(e.stateNode,t,2),e=za(e,t,2),e!==null&&(Ci(e,2),Ln(e))}function qe(e,t,a){if(e.tag===3)Ap(e,e,a);else for(;t!==null;){if(t.tag===3){Ap(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(qa===null||!qa.has(l))){e=mn(a,e),a=Oy(2),l=za(t,a,2),l!==null&&(zy(a,l,t,e),Ci(l,2),Ln(l));break}}t=t.return}}function zf(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new Gx;var o=new Set;l.set(t,o)}else o=l.get(t),o===void 0&&(o=new Set,l.set(t,o));o.has(a)||(Ef=!0,o.add(a),e=Xx.bind(null,e,t,a),t.then(e,e))}function Xx(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ze===e&&(Te&a)===a&&(tt===4||tt===3&&(Te&62914560)===Te&&300>_t()-qo?(ke&2)===0&&Kl(e,0):wf|=a,Vl===Te&&(Vl=0)),Ln(e)}function Op(e,t){t===0&&(t=wh()),e=Es(e,t),e!==null&&(Ci(e,t),Ln(e))}function Zx(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Op(e,a)}function Jx(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,o=e.memoizedState;o!==null&&(a=o.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),Op(e,a)}function Fx(e,t){return jn(e,t)}var Po=null,Xl=null,Df=!1,Xo=!1,Uf=!1,Ga=0;function Ln(e){e!==Xl&&e.next===null&&(Xl===null?Po=Xl=e:Xl=Xl.next=e),Xo=!0,Df||(Df=!0,$x())}function cr(e,t){if(!Uf&&Xo){Uf=!0;do for(var a=!1,l=Po;l!==null;){if(e!==0){var o=l.pendingLanes;if(o===0)var u=0;else{var g=l.suspendedLanes,x=l.pingedLanes;u=(1<<31-It(42|e)+1)-1,u&=o&~(g&~x),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(a=!0,kp(l,u))}else u=Te,u=Fr(l,l===Ze?u:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(u&3)===0||Ni(l,u)||(a=!0,kp(l,u));l=l.next}while(a);Uf=!1}}function Ix(){zp()}function zp(){Xo=Df=!1;var e=0;Ga!==0&&o1()&&(e=Ga);for(var t=_t(),a=null,l=Po;l!==null;){var o=l.next,u=Dp(l,t);u===0?(l.next=null,a===null?Po=o:a.next=o,o===null&&(Xl=a)):(a=l,(e!==0||(u&3)!==0)&&(Xo=!0)),l=o}dt!==0&&dt!==5||cr(e),Ga!==0&&(Ga=0)}function Dp(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var g=31-It(u),x=1<<g,w=o[g];w===-1?((x&a)===0||(x&l)!==0)&&(o[g]=_b(x,t)):w<=t&&(e.expiredLanes|=x),u&=~x}if(t=Ze,a=Te,a=Fr(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&wi(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ni(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&wi(l),Jc(a)){case 2:case 8:a=zn;break;case 32:a=hl;break;case 268435456:a=Eh;break;default:a=hl}return l=Up.bind(null,e),a=jn(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&wi(l),e.callbackPriority=2,e.callbackNode=null,2}function Up(e,t){if(dt!==0&&dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ko()&&e.callbackNode!==a)return null;var l=Te;return l=Fr(e,e===Ze?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(pp(e,l,t),Dp(e,_t()),e.callbackNode!=null&&e.callbackNode===a?Up.bind(null,e):null)}function kp(e,t){if(Ko())return null;pp(e,t,!0)}function $x(){u1(function(){(ke&6)!==0?jn(vt,Ix):zp()})}function kf(){if(Ga===0){var e=Ol;e===0&&(e=Xr,Xr<<=1,(Xr&261888)===0&&(Xr=256)),Ga=e}return Ga}function Lp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:eo(""+e)}function Bp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Wx(e,t,a,l,o){if(t==="submit"&&a&&a.stateNode===o){var u=Lp((o[Lt]||null).action),g=l.submitter;g&&(t=(t=g[Lt]||null)?Lp(t.formAction):g.getAttribute("formAction"),t!==null&&(u=t,g=null));var x=new so("action","action",null,l,o);e.push({event:x,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Ga!==0){var w=g?Bp(o,g):new FormData(o);tf(a,{pending:!0,data:w,method:o.method,action:u},null,w)}}else typeof u=="function"&&(x.preventDefault(),w=g?Bp(o,g):new FormData(o),tf(a,{pending:!0,data:w,method:o.method,action:u},u,w))},currentTarget:o}]})}}for(var Lf=0;Lf<vu.length;Lf++){var Bf=vu[Lf],e1=Bf.toLowerCase(),t1=Bf[0].toUpperCase()+Bf.slice(1);Rn(e1,"on"+t1)}Rn(ym,"onAnimationEnd"),Rn(pm,"onAnimationIteration"),Rn(gm,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(gx,"onTransitionRun"),Rn(vx,"onTransitionStart"),Rn(bx,"onTransitionCancel"),Rn(vm,"onTransitionEnd"),vl("onMouseEnter",["mouseout","mouseover"]),vl("onMouseLeave",["mouseout","mouseover"]),vl("onPointerEnter",["pointerout","pointerover"]),vl("onPointerLeave",["pointerout","pointerover"]),Ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ur="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),n1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ur));function qp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],o=l.event;l=l.listeners;e:{var u=void 0;if(t)for(var g=l.length-1;0<=g;g--){var x=l[g],w=x.instance,H=x.currentTarget;if(x=x.listener,w!==u&&o.isPropagationStopped())break e;u=x,o.currentTarget=H;try{u(o)}catch(X){ro(X)}o.currentTarget=null,u=w}else for(g=0;g<l.length;g++){if(x=l[g],w=x.instance,H=x.currentTarget,x=x.listener,w!==u&&o.isPropagationStopped())break e;u=x,o.currentTarget=H;try{u(o)}catch(X){ro(X)}o.currentTarget=null,u=w}}}}function Ee(e,t){var a=t[Fc];a===void 0&&(a=t[Fc]=new Set);var l=e+"__bubble";a.has(l)||(Hp(t,e,2,!1),a.add(l))}function qf(e,t,a){var l=0;t&&(l|=4),Hp(a,e,l,t)}var Zo="_reactListening"+Math.random().toString(36).slice(2);function Hf(e){if(!e[Zo]){e[Zo]=!0,zh.forEach(function(a){a!=="selectionchange"&&(n1.has(a)||qf(a,!1,e),qf(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zo]||(t[Zo]=!0,qf("selectionchange",!1,t))}}function Hp(e,t,a,l){switch(yg(t)){case 2:var o=M1;break;case 8:o=A1;break;default:o=td}a=o.bind(null,t,a,e),o=void 0,!lu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),l?o!==void 0?e.addEventListener(t,a,{capture:!0,passive:o}):e.addEventListener(t,a,!0):o!==void 0?e.addEventListener(t,a,{passive:o}):e.addEventListener(t,a,!1)}function Qf(e,t,a,l,o){var u=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var x=l.stateNode.containerInfo;if(x===o)break;if(g===4)for(g=l.return;g!==null;){var w=g.tag;if((w===3||w===4)&&g.stateNode.containerInfo===o)return;g=g.return}for(;x!==null;){if(g=yl(x),g===null)return;if(w=g.tag,w===5||w===6||w===26||w===27){l=u=g;continue e}x=x.parentNode}}l=l.return}Kh(function(){var H=u,X=au(a),I=[];e:{var G=bm.get(e);if(G!==void 0){var V=so,ce=e;switch(e){case"keypress":if(no(a)===0)break e;case"keydown":case"keyup":V=Jb;break;case"focusin":ce="focus",V=cu;break;case"focusout":ce="blur",V=cu;break;case"beforeblur":case"afterblur":V=cu;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=Zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=Lb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=$b;break;case ym:case pm:case gm:V=Hb;break;case vm:V=ex;break;case"scroll":case"scrollend":V=Ub;break;case"wheel":V=nx;break;case"copy":case"cut":case"paste":V=Gb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=Fh;break;case"toggle":case"beforetoggle":V=sx}var pe=(t&4)!==0,Ye=!pe&&(e==="scroll"||e==="scrollend"),U=pe?G!==null?G+"Capture":null:G;pe=[];for(var M=H,q;M!==null;){var J=M;if(q=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||q===null||U===null||(J=Oi(M,U),J!=null&&pe.push(fr(M,J,q))),Ye)break;M=M.return}0<pe.length&&(G=new V(G,ce,null,a,X),I.push({event:G,listeners:pe}))}}if((t&7)===0){e:{if(G=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",G&&a!==nu&&(ce=a.relatedTarget||a.fromElement)&&(yl(ce)||ce[ml]))break e;if((V||G)&&(G=X.window===X?X:(G=X.ownerDocument)?G.defaultView||G.parentWindow:window,V?(ce=a.relatedTarget||a.toElement,V=H,ce=ce?yl(ce):null,ce!==null&&(Ye=d(ce),pe=ce.tag,ce!==Ye||pe!==5&&pe!==27&&pe!==6)&&(ce=null)):(V=null,ce=H),V!==ce)){if(pe=Zh,J="onMouseLeave",U="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(pe=Fh,J="onPointerLeave",U="onPointerEnter",M="pointer"),Ye=V==null?G:Ai(V),q=ce==null?G:Ai(ce),G=new pe(J,M+"leave",V,a,X),G.target=Ye,G.relatedTarget=q,J=null,yl(X)===H&&(pe=new pe(U,M+"enter",ce,a,X),pe.target=q,pe.relatedTarget=Ye,J=pe),Ye=J,V&&ce)t:{for(pe=a1,U=V,M=ce,q=0,J=U;J;J=pe(J))q++;J=0;for(var ye=M;ye;ye=pe(ye))J++;for(;0<q-J;)U=pe(U),q--;for(;0<J-q;)M=pe(M),J--;for(;q--;){if(U===M||M!==null&&U===M.alternate){pe=U;break t}U=pe(U),M=pe(M)}pe=null}else pe=null;V!==null&&Qp(I,G,V,pe,!1),ce!==null&&Ye!==null&&Qp(I,Ye,ce,pe,!0)}}e:{if(G=H?Ai(H):window,V=G.nodeName&&G.nodeName.toLowerCase(),V==="select"||V==="input"&&G.type==="file")var De=sm;else if(nm(G))if(lm)De=mx;else{De=dx;var fe=fx}else V=G.nodeName,!V||V.toLowerCase()!=="input"||G.type!=="checkbox"&&G.type!=="radio"?H&&tu(H.elementType)&&(De=sm):De=hx;if(De&&(De=De(e,H))){am(I,De,a,X);break e}fe&&fe(e,G,H),e==="focusout"&&H&&G.type==="number"&&H.memoizedProps.value!=null&&eu(G,"number",G.value)}switch(fe=H?Ai(H):window,e){case"focusin":(nm(fe)||fe.contentEditable==="true")&&(_l=fe,yu=H,Hi=null);break;case"focusout":Hi=yu=_l=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,hm(I,a,X);break;case"selectionchange":if(px)break;case"keydown":case"keyup":hm(I,a,X)}var xe;if(fu)e:{switch(e){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Rl?em(e,a)&&(Ne="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ne="onCompositionStart");Ne&&(Ih&&a.locale!=="ko"&&(Rl||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Rl&&(xe=Ph()):(wa=X,iu="value"in wa?wa.value:wa.textContent,Rl=!0)),fe=Jo(H,Ne),0<fe.length&&(Ne=new Jh(Ne,e,null,a,X),I.push({event:Ne,listeners:fe}),xe?Ne.data=xe:(xe=tm(a),xe!==null&&(Ne.data=xe)))),(xe=ix?rx(e,a):ox(e,a))&&(Ne=Jo(H,"onBeforeInput"),0<Ne.length&&(fe=new Jh("onBeforeInput","beforeinput",null,a,X),I.push({event:fe,listeners:Ne}),fe.data=xe)),Wx(I,e,H,a,X)}qp(I,t)})}function fr(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Jo(e,t){for(var a=t+"Capture",l=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||u===null||(o=Oi(e,a),o!=null&&l.unshift(fr(e,o,u)),o=Oi(e,t),o!=null&&l.push(fr(e,o,u))),e.tag===3)return l;e=e.return}return[]}function a1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qp(e,t,a,l,o){for(var u=t._reactName,g=[];a!==null&&a!==l;){var x=a,w=x.alternate,H=x.stateNode;if(x=x.tag,w!==null&&w===l)break;x!==5&&x!==26&&x!==27||H===null||(w=H,o?(H=Oi(a,u),H!=null&&g.unshift(fr(a,H,w))):o||(H=Oi(a,u),H!=null&&g.push(fr(a,H,w)))),a=a.return}g.length!==0&&e.push({event:t,listeners:g})}var s1=/\r\n?/g,l1=/\u0000|\uFFFD/g;function Gp(e){return(typeof e=="string"?e:""+e).replace(s1,`
65
+ `).replace(l1,"")}function Vp(e,t){return t=Gp(t),Gp(e)===t}function Ve(e,t,a,l,o,u){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||xl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&xl(e,""+l);break;case"className":$r(e,"class",l);break;case"tabIndex":$r(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":$r(e,a,l);break;case"style":Vh(e,l,u);break;case"data":if(t!=="object"){$r(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=eo(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof u=="function"&&(a==="formAction"?(t!=="input"&&Ve(e,t,"name",o.name,o,null),Ve(e,t,"formEncType",o.formEncType,o,null),Ve(e,t,"formMethod",o.formMethod,o,null),Ve(e,t,"formTarget",o.formTarget,o,null)):(Ve(e,t,"encType",o.encType,o,null),Ve(e,t,"method",o.method,o,null),Ve(e,t,"target",o.target,o,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=eo(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=Jn);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=eo(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":Ee("beforetoggle",e),Ee("toggle",e),Ir(e,"popover",l);break;case"xlinkActuate":Zn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Zn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Zn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Zn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Zn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Zn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Zn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ir(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=zb.get(a)||a,Ir(e,a,l))}}function Gf(e,t,a,l,o,u){switch(a){case"style":Vh(e,l,u);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?xl(e,l):(typeof l=="number"||typeof l=="bigint")&&xl(e,""+l);break;case"onScroll":l!=null&&Ee("scroll",e);break;case"onScrollEnd":l!=null&&Ee("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Jn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dh.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),t=a.slice(2,o?a.length-7:void 0),u=e[Lt]||null,u=u!=null?u[a]:null,typeof u=="function"&&e.removeEventListener(t,u,o),typeof l=="function")){typeof u!="function"&&u!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,o);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Ir(e,a,l)}}}function Rt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var l=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var g=a[u];if(g!=null)switch(u){case"src":l=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ve(e,t,u,g,a,null)}}o&&Ve(e,t,"srcSet",a.srcSet,a,null),l&&Ve(e,t,"src",a.src,a,null);return;case"input":Ee("invalid",e);var x=u=g=o=null,w=null,H=null;for(l in a)if(a.hasOwnProperty(l)){var X=a[l];if(X!=null)switch(l){case"name":o=X;break;case"type":g=X;break;case"checked":w=X;break;case"defaultChecked":H=X;break;case"value":u=X;break;case"defaultValue":x=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,t));break;default:Ve(e,t,l,X,a,null)}}qh(e,u,x,w,H,g,o,!1);return;case"select":Ee("invalid",e),l=g=u=null;for(o in a)if(a.hasOwnProperty(o)&&(x=a[o],x!=null))switch(o){case"value":u=x;break;case"defaultValue":g=x;break;case"multiple":l=x;default:Ve(e,t,o,x,a,null)}t=u,a=g,e.multiple=!!l,t!=null?bl(e,!!l,t,!1):a!=null&&bl(e,!!l,a,!0);return;case"textarea":Ee("invalid",e),u=o=l=null;for(g in a)if(a.hasOwnProperty(g)&&(x=a[g],x!=null))switch(g){case"value":l=x;break;case"defaultValue":o=x;break;case"children":u=x;break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:Ve(e,t,g,x,a,null)}Qh(e,l,o,u);return;case"option":for(w in a)if(a.hasOwnProperty(w)&&(l=a[w],l!=null))switch(w){case"selected":e.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:Ve(e,t,w,l,a,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(l=0;l<ur.length;l++)Ee(ur[l],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in a)if(a.hasOwnProperty(H)&&(l=a[H],l!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Ve(e,t,H,l,a,null)}return;default:if(tu(t)){for(X in a)a.hasOwnProperty(X)&&(l=a[X],l!==void 0&&Gf(e,t,X,l,a,void 0));return}}for(x in a)a.hasOwnProperty(x)&&(l=a[x],l!=null&&Ve(e,t,x,l,a,null))}function i1(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,u=null,g=null,x=null,w=null,H=null,X=null;for(V in a){var I=a[V];if(a.hasOwnProperty(V)&&I!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":w=I;default:l.hasOwnProperty(V)||Ve(e,t,V,null,l,I)}}for(var G in l){var V=l[G];if(I=a[G],l.hasOwnProperty(G)&&(V!=null||I!=null))switch(G){case"type":u=V;break;case"name":o=V;break;case"checked":H=V;break;case"defaultChecked":X=V;break;case"value":g=V;break;case"defaultValue":x=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,t));break;default:V!==I&&Ve(e,t,G,V,l,I)}}Wc(e,g,x,w,H,X,u,o);return;case"select":V=g=x=G=null;for(u in a)if(w=a[u],a.hasOwnProperty(u)&&w!=null)switch(u){case"value":break;case"multiple":V=w;default:l.hasOwnProperty(u)||Ve(e,t,u,null,l,w)}for(o in l)if(u=l[o],w=a[o],l.hasOwnProperty(o)&&(u!=null||w!=null))switch(o){case"value":G=u;break;case"defaultValue":x=u;break;case"multiple":g=u;default:u!==w&&Ve(e,t,o,u,l,w)}t=x,a=g,l=V,G!=null?bl(e,!!a,G,!1):!!l!=!!a&&(t!=null?bl(e,!!a,t,!0):bl(e,!!a,a?[]:"",!1));return;case"textarea":V=G=null;for(x in a)if(o=a[x],a.hasOwnProperty(x)&&o!=null&&!l.hasOwnProperty(x))switch(x){case"value":break;case"children":break;default:Ve(e,t,x,null,l,o)}for(g in l)if(o=l[g],u=a[g],l.hasOwnProperty(g)&&(o!=null||u!=null))switch(g){case"value":G=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==u&&Ve(e,t,g,o,l,u)}Hh(e,G,V);return;case"option":for(var ce in a)if(G=a[ce],a.hasOwnProperty(ce)&&G!=null&&!l.hasOwnProperty(ce))switch(ce){case"selected":e.selected=!1;break;default:Ve(e,t,ce,null,l,G)}for(w in l)if(G=l[w],V=a[w],l.hasOwnProperty(w)&&G!==V&&(G!=null||V!=null))switch(w){case"selected":e.selected=G&&typeof G!="function"&&typeof G!="symbol";break;default:Ve(e,t,w,G,l,V)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var pe in a)G=a[pe],a.hasOwnProperty(pe)&&G!=null&&!l.hasOwnProperty(pe)&&Ve(e,t,pe,null,l,G);for(H in l)if(G=l[H],V=a[H],l.hasOwnProperty(H)&&G!==V&&(G!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,t));break;default:Ve(e,t,H,G,l,V)}return;default:if(tu(t)){for(var Ye in a)G=a[Ye],a.hasOwnProperty(Ye)&&G!==void 0&&!l.hasOwnProperty(Ye)&&Gf(e,t,Ye,void 0,l,G);for(X in l)G=l[X],V=a[X],!l.hasOwnProperty(X)||G===V||G===void 0&&V===void 0||Gf(e,t,X,G,l,V);return}}for(var U in a)G=a[U],a.hasOwnProperty(U)&&G!=null&&!l.hasOwnProperty(U)&&Ve(e,t,U,null,l,G);for(I in l)G=l[I],V=a[I],!l.hasOwnProperty(I)||G===V||G==null&&V==null||Ve(e,t,I,G,l,V)}function Yp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function r1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var o=a[l],u=o.transferSize,g=o.initiatorType,x=o.duration;if(u&&x&&Yp(g)){for(g=0,x=o.responseEnd,l+=1;l<a.length;l++){var w=a[l],H=w.startTime;if(H>x)break;var X=w.transferSize,I=w.initiatorType;X&&Yp(I)&&(w=w.responseEnd,g+=X*(w<x?1:(x-H)/(w-H)))}if(--l,t+=8*(u+g)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Vf=null,Yf=null;function Fo(e){return e.nodeType===9?e:e.ownerDocument}function Kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Pp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Kf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Pf=null;function o1(){var e=window.event;return e&&e.type==="popstate"?e===Pf?!1:(Pf=e,!0):(Pf=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,c1=typeof clearTimeout=="function"?clearTimeout:void 0,Zp=typeof Promise=="function"?Promise:void 0,u1=typeof queueMicrotask=="function"?queueMicrotask:typeof Zp<"u"?function(e){return Zp.resolve(null).then(e).catch(f1)}:Xp;function f1(e){setTimeout(function(){throw e})}function Va(e){return e==="head"}function Jp(e,t){var a=t,l=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(o),Il(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")dr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,dr(a);for(var u=a.firstChild;u;){var g=u.nextSibling,x=u.nodeName;u[Mi]||x==="SCRIPT"||x==="STYLE"||x==="LINK"&&u.rel.toLowerCase()==="stylesheet"||a.removeChild(u),u=g}}else a==="body"&&dr(e.ownerDocument.body);a=o}while(a);Il(t)}function Fp(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Xf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Xf(a),Ic(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function d1(e,t,a,l){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Mi])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=bn(e.nextSibling),e===null)break}return null}function h1(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=bn(e.nextSibling),e===null))return null;return e}function Ip(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=bn(e.nextSibling),e===null))return null;return e}function Zf(e){return e.data==="$?"||e.data==="$~"}function Jf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function m1(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function bn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ff=null;function $p(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return bn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Wp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function eg(e,t,a){switch(t=Fo(a),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function dr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ic(e)}var xn=new Map,tg=new Set;function Io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=P.d;P.d={f:y1,r:p1,D:g1,C:v1,L:b1,m:x1,X:j1,S:S1,M:R1};function y1(){var e=fa.f(),t=Go();return e||t}function p1(e){var t=pl(e);t!==null&&t.tag===5&&t.type==="form"?vy(t):fa.r(e)}var Zl=typeof document>"u"?null:document;function ng(e,t,a){var l=Zl;if(l&&typeof t=="string"&&t){var o=dn(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),tg.has(o)||(tg.add(o),e={rel:e,crossOrigin:a,href:t},l.querySelector(o)===null&&(t=l.createElement("link"),Rt(t,"link",e),yt(t),l.head.appendChild(t)))}}function g1(e){fa.D(e),ng("dns-prefetch",e,null)}function v1(e,t){fa.C(e,t),ng("preconnect",e,t)}function b1(e,t,a){fa.L(e,t,a);var l=Zl;if(l&&e&&t){var o='link[rel="preload"][as="'+dn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+dn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+dn(a.imageSizes)+'"]')):o+='[href="'+dn(e)+'"]';var u=o;switch(t){case"style":u=Jl(e);break;case"script":u=Fl(e)}xn.has(u)||(e=v({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),xn.set(u,e),l.querySelector(o)!==null||t==="style"&&l.querySelector(hr(u))||t==="script"&&l.querySelector(mr(u))||(t=l.createElement("link"),Rt(t,"link",e),yt(t),l.head.appendChild(t)))}}function x1(e,t){fa.m(e,t);var a=Zl;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+dn(l)+'"][href="'+dn(e)+'"]',u=o;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Fl(e)}if(!xn.has(u)&&(e=v({rel:"modulepreload",href:e},t),xn.set(u,e),a.querySelector(o)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(mr(u)))return}l=a.createElement("link"),Rt(l,"link",e),yt(l),a.head.appendChild(l)}}}function S1(e,t,a){fa.S(e,t,a);var l=Zl;if(l&&e){var o=gl(l).hoistableStyles,u=Jl(e);t=t||"default";var g=o.get(u);if(!g){var x={loading:0,preload:null};if(g=l.querySelector(hr(u)))x.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},a),(a=xn.get(u))&&If(e,a);var w=g=l.createElement("link");yt(w),Rt(w,"link",e),w._p=new Promise(function(H,X){w.onload=H,w.onerror=X}),w.addEventListener("load",function(){x.loading|=1}),w.addEventListener("error",function(){x.loading|=2}),x.loading|=4,$o(g,t,l)}g={type:"stylesheet",instance:g,count:1,state:x},o.set(u,g)}}}function j1(e,t){fa.X(e,t);var a=Zl;if(a&&e){var l=gl(a).hoistableScripts,o=Fl(e),u=l.get(o);u||(u=a.querySelector(mr(o)),u||(e=v({src:e,async:!0},t),(t=xn.get(o))&&$f(e,t),u=a.createElement("script"),yt(u),Rt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function R1(e,t){fa.M(e,t);var a=Zl;if(a&&e){var l=gl(a).hoistableScripts,o=Fl(e),u=l.get(o);u||(u=a.querySelector(mr(o)),u||(e=v({src:e,async:!0,type:"module"},t),(t=xn.get(o))&&$f(e,t),u=a.createElement("script"),yt(u),Rt(u,"link",e),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(o,u))}}function ag(e,t,a,l){var o=(o=me.current)?Io(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Jl(a.href),a=gl(o).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Jl(a.href);var u=gl(o).hoistableStyles,g=u.get(e);if(g||(o=o.ownerDocument||o,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,g),(u=o.querySelector(hr(e)))&&!u._p&&(g.instance=u,g.state.loading=5),xn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},xn.set(e,a),u||_1(o,e,a,g.state))),t&&l===null)throw Error(r(528,""));return g}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fl(a),a=gl(o).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Jl(e){return'href="'+dn(e)+'"'}function hr(e){return'link[rel="stylesheet"]['+e+"]"}function sg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function _1(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Rt(t,"link",a),yt(t),e.head.appendChild(t))}function Fl(e){return'[src="'+dn(e)+'"]'}function mr(e){return"script[async]"+e}function lg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+dn(a.href)+'"]');if(l)return t.instance=l,yt(l),l;var o=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),yt(l),Rt(l,"style",o),$o(l,a.precedence,e),t.instance=l;case"stylesheet":o=Jl(a.href);var u=e.querySelector(hr(o));if(u)return t.state.loading|=4,t.instance=u,yt(u),u;l=sg(a),(o=xn.get(o))&&If(l,o),u=(e.ownerDocument||e).createElement("link"),yt(u);var g=u;return g._p=new Promise(function(x,w){g.onload=x,g.onerror=w}),Rt(u,"link",l),t.state.loading|=4,$o(u,a.precedence,e),t.instance=u;case"script":return u=Fl(a.src),(o=e.querySelector(mr(u)))?(t.instance=o,yt(o),o):(l=a,(o=xn.get(u))&&(l=v({},a),$f(l,o)),e=e.ownerDocument||e,o=e.createElement("script"),yt(o),Rt(o,"link",l),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,$o(l,a.precedence,e));return t.instance}function $o(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=l.length?l[l.length-1]:null,u=o,g=0;g<l.length;g++){var x=l[g];if(x.dataset.precedence===t)u=x;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $f(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Wo=null;function ig(e,t,a){if(Wo===null){var l=new Map,o=Wo=new Map;o.set(a,l)}else o=Wo,l=o.get(a),l||(l=new Map,o.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var u=a[o];if(!(u[Mi]||u[bt]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var g=u.getAttribute(t)||"";g=e+g;var x=l.get(g);x?x.push(u):l.set(g,[u])}}return l}function rg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function E1(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function og(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function w1(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var o=Jl(l.href),u=t.querySelector(hr(o));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ec.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=u,yt(u);return}u=t.ownerDocument||t,l=sg(l),(o=xn.get(o))&&If(l,o),u=u.createElement("link"),yt(u);var g=u;g._p=new Promise(function(x,w){g.onload=x,g.onerror=w}),Rt(u,"link",l),a.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=ec.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var Wf=0;function T1(e,t){return e.stylesheets&&e.count===0&&nc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&nc(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&Wf===0&&(Wf=62500*r1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&nc(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>Wf?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(o)}}:null}function ec(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)nc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var tc=null;function nc(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,tc=new Map,t.forEach(N1,e),tc=null,ec.call(e))}function N1(e,t){if(!(t.state.loading&4)){var a=tc.get(e);if(a)var l=a.get(null);else{a=new Map,tc.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<o.length;u++){var g=o[u];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}o=t.instance,g=o.getAttribute("data-precedence"),u=a.get(g)||l,u===l&&a.set(null,o),a.set(g,o),this.count++,l=ec.bind(this),o.addEventListener("load",l),o.addEventListener("error",l),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var yr={$$typeof:B,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function C1(e,t,a,l,o,u,g,x,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.hiddenUpdates=Xc(null),this.identifierPrefix=l,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function cg(e,t,a,l,o,u,g,x,w,H,X,I){return e=new C1(e,t,a,g,w,H,X,I,x),t=1,u===!0&&(t|=24),u=Wt(3,null,null,t),e.current=u,u.stateNode=e,t=Au(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:l,isDehydrated:a,cache:t},Uu(u),e}function ug(e){return e?(e=Tl,e):Tl}function fg(e,t,a,l,o,u){o=ug(o),l.context===null?l.context=o:l.pendingContext=o,l=Oa(t),l.payload={element:a},u=u===void 0?null:u,u!==null&&(l.callback=u),a=za(e,l,t),a!==null&&(Vt(a,e,t),Xi(a,e,t))}function dg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function ed(e,t){dg(e,t),(e=e.alternate)&&dg(e,t)}function hg(e){if(e.tag===13||e.tag===31){var t=Es(e,67108864);t!==null&&Vt(t,e,67108864),ed(e,67108864)}}function mg(e){if(e.tag===13||e.tag===31){var t=sn();t=Zc(t);var a=Es(e,t);a!==null&&Vt(a,e,t),ed(e,t)}}var ac=!0;function M1(e,t,a,l){var o=L.T;L.T=null;var u=P.p;try{P.p=2,td(e,t,a,l)}finally{P.p=u,L.T=o}}function A1(e,t,a,l){var o=L.T;L.T=null;var u=P.p;try{P.p=8,td(e,t,a,l)}finally{P.p=u,L.T=o}}function td(e,t,a,l){if(ac){var o=nd(l);if(o===null)Qf(e,t,l,sc,a),pg(e,l);else if(z1(o,e,t,a,l))l.stopPropagation();else if(pg(e,l),t&4&&-1<O1.indexOf(e)){for(;o!==null;){var u=pl(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var g=xs(u.pendingLanes);if(g!==0){var x=u;for(x.pendingLanes|=2,x.entangledLanes|=2;g;){var w=1<<31-It(g);x.entanglements[1]|=w,g&=~w}Ln(u),(ke&6)===0&&(Ho=_t()+500,cr(0))}}break;case 31:case 13:x=Es(u,2),x!==null&&Vt(x,u,2),Go(),ed(u,2)}if(u=nd(l),u===null&&Qf(e,t,l,sc,a),u===o)break;o=u}o!==null&&l.stopPropagation()}else Qf(e,t,l,null,a)}}function nd(e){return e=au(e),ad(e)}var sc=null;function ad(e){if(sc=null,e=yl(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=y(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return sc=e,null}function yg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Qe()){case vt:return 2;case zn:return 8;case hl:case vb:return 32;case Eh:return 268435456;default:return 32}default:return 32}}var sd=!1,Ya=null,Ka=null,Pa=null,pr=new Map,gr=new Map,Xa=[],O1="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function pg(e,t){switch(e){case"focusin":case"focusout":Ya=null;break;case"dragenter":case"dragleave":Ka=null;break;case"mouseover":case"mouseout":Pa=null;break;case"pointerover":case"pointerout":pr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":gr.delete(t.pointerId)}}function vr(e,t,a,l,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:u,targetContainers:[o]},t!==null&&(t=pl(t),t!==null&&hg(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function z1(e,t,a,l,o){switch(t){case"focusin":return Ya=vr(Ya,e,t,a,l,o),!0;case"dragenter":return Ka=vr(Ka,e,t,a,l,o),!0;case"mouseover":return Pa=vr(Pa,e,t,a,l,o),!0;case"pointerover":var u=o.pointerId;return pr.set(u,vr(pr.get(u)||null,e,t,a,l,o)),!0;case"gotpointercapture":return u=o.pointerId,gr.set(u,vr(gr.get(u)||null,e,t,a,l,o)),!0}return!1}function gg(e){var t=yl(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Ah(e.priority,function(){mg(a)});return}}else if(t===31){if(t=y(a),t!==null){e.blockedOn=t,Ah(e.priority,function(){mg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function lc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=nd(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);nu=l,a.target.dispatchEvent(l),nu=null}else return t=pl(a),t!==null&&hg(t),e.blockedOn=a,!1;t.shift()}return!0}function vg(e,t,a){lc(e)&&a.delete(t)}function D1(){sd=!1,Ya!==null&&lc(Ya)&&(Ya=null),Ka!==null&&lc(Ka)&&(Ka=null),Pa!==null&&lc(Pa)&&(Pa=null),pr.forEach(vg),gr.forEach(vg)}function ic(e,t){e.blockedOn===t&&(e.blockedOn=null,sd||(sd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,D1)))}var rc=null;function bg(e){rc!==e&&(rc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){rc===e&&(rc=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],o=e[t+2];if(typeof l!="function"){if(ad(l||a)===null)continue;break}var u=pl(a);u!==null&&(e.splice(t,3),t-=3,tf(u,{pending:!0,data:o,method:a.method,action:l},l,o))}}))}function Il(e){function t(w){return ic(w,e)}Ya!==null&&ic(Ya,e),Ka!==null&&ic(Ka,e),Pa!==null&&ic(Pa,e),pr.forEach(t),gr.forEach(t);for(var a=0;a<Xa.length;a++){var l=Xa[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Xa.length&&(a=Xa[0],a.blockedOn===null);)gg(a),a.blockedOn===null&&Xa.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var o=a[l],u=a[l+1],g=o[Lt]||null;if(typeof u=="function")g||bg(a);else if(g){var x=null;if(u&&u.hasAttribute("formAction")){if(o=u,g=u[Lt]||null)x=g.formAction;else if(ad(o)!==null)continue}else x=g.action;typeof x=="function"?a[l+1]=x:(a.splice(l,3),l-=3),bg(a)}}}function xg(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(g){return o=g})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function ld(e){this._internalRoot=e}oc.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var a=t.current,l=sn();fg(a,l,e,t,null,null)},oc.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;fg(e.current,2,null,e,null,null),Go(),t[ml]=null}};function oc(e){this._internalRoot=e}oc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Mh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Xa.length&&t!==0&&t<Xa[a].priority;a++);Xa.splice(a,0,e),a===0&&gg(e)}};var Sg=s.version;if(Sg!=="19.2.6")throw Error(r(527,Sg,"19.2.6"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var U1={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{Ti=cc.inject(U1),Ft=cc}catch{}}return Rr.createRoot=function(e,t){if(!c(e))throw Error(r(299));var a=!1,l="",o=Ny,u=Cy,g=My;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(g=t.onRecoverableError)),t=cg(e,1,!1,null,null,a,l,null,o,u,g,xg),e[ml]=t.current,Hf(e),new ld(t)},Rr.hydrateRoot=function(e,t,a){if(!c(e))throw Error(r(299));var l=!1,o="",u=Ny,g=Cy,x=My,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(u=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(x=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),t=cg(e,1,!0,t,a??null,l,o,w,u,g,x,xg),t.context=ug(null),a=t.current,l=sn(),l=Zc(l),o=Oa(l),o.callback=null,za(a,o,l),a=l,t.current.lanes=a,Ci(t,a),Ln(t),e[ml]=t.current,Hf(e),new oc(t)},Rr.version="19.2.6",Rr}var yv;function R2(){if(yv)return jd.exports;yv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(s){console.error(s)}}return n(),jd.exports=j2(),jd.exports}var _2=R2();function E2(){var n;return typeof window<"u"&&((n=window.__HOGSEND_STUDIO__)!=null&&n.baseUrl)?window.__HOGSEND_STUDIO__.baseUrl.replace(/\/$/,""):typeof window<"u"?window.location.origin:""}const U0={baseUrl:E2()};class Xt extends Error{constructor(i,r,c){super(r);Ja(this,"status");Ja(this,"body");this.name="ApiError",this.status=i,this.body=c}}function w2(n,s){const r=`${U0.baseUrl}${n.startsWith("/")?n:`/${n}`}`;if(!s)return r;const c=new URLSearchParams;for(const[h,y]of Object.entries(s))y!=null&&c.append(h,String(y));const d=c.toString();return d?`${r}?${d}`:r}async function Wl(n,s={}){const{json:i,query:r,headers:c,...d}=s,h={credentials:"include",...d,headers:{Accept:"application/json",...i!==void 0?{"Content-Type":"application/json"}:{},...c}};i!==void 0&&(h.body=JSON.stringify(i));const y=await fetch(w2(n,r),h),m=(y.headers.get("content-type")??"").includes("application/json"),b=m?await y.json().catch(()=>null):await y.text().catch(()=>null);if(!y.ok){const v=(m&&b&&typeof b=="object"&&"message"in b&&typeof b.message=="string"?b.message:null)??`Request failed with status ${y.status}`;throw new Xt(y.status,v,b)}return b}const Xe={request:Wl,get:(n,s)=>Wl(n,{...s,method:"GET"}),post:(n,s)=>Wl(n,{...s,method:"POST"}),put:(n,s)=>Wl(n,{...s,method:"PUT"}),patch:(n,s)=>Wl(n,{...s,method:"PATCH"}),delete:(n,s)=>Wl(n,{...s,method:"DELETE"})};function T2(){return Xe.get("/v1/auth/status")}var N2={};const Tc=Object.create(null),_r=n=>{var s;return N2||((s=globalThis.Deno)==null?void 0:s.env.toObject())||globalThis.__env__||(n?Tc:globalThis)},qs=new Proxy(Tc,{get(n,s){return _r()[s]??Tc[s]},has(n,s){return s in _r()||s in Tc},set(n,s,i){const r=_r(!0);return r[s]=i,!0},deleteProperty(n,s){if(!s)return!1;const i=_r(!0);return delete i[s],!0},ownKeys(){const n=_r(!0);return Object.keys(n)}});var Nc=class extends Error{constructor(n,s){super(n,s),this.name="BetterAuthError",this.message=n,this.stack=""}};function C2(n){try{return(new URL(n).pathname.replace(/\/+$/,"")||"/")!=="/"}catch{throw new Nc(`Invalid base URL: ${n}. Please provide a valid base URL.`)}}function M2(n){try{const s=new URL(n);if(s.protocol!=="http:"&&s.protocol!=="https:")throw new Nc(`Invalid base URL: ${n}. URL must include 'http://' or 'https://'`)}catch(s){throw s instanceof Nc?s:new Nc(`Invalid base URL: ${n}. Please provide a valid base URL.`,{cause:s})}}function Ed(n,s="/api/auth"){if(M2(n),C2(n))return n;const i=n.replace(/\/+$/,"");return!s||s==="/"?i:(s=s.startsWith("/")?s:`/${s}`,`${i}${s}`)}function A2(n,s,i,r,c){if(n)return Ed(n,s);{const d=qs.BETTER_AUTH_URL||qs.NEXT_PUBLIC_BETTER_AUTH_URL||qs.PUBLIC_BETTER_AUTH_URL||qs.NUXT_PUBLIC_BETTER_AUTH_URL||qs.NUXT_PUBLIC_AUTH_URL||(qs.BASE_URL!=="/"?qs.BASE_URL:void 0);if(d)return Ed(d,s)}if(typeof window<"u"&&window.location)return Ed(window.location.origin,s)}const O2={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},z2=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,pv={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:Number.POSITIVE_INFINITY,"-infinity":Number.NEGATIVE_INFINITY},D2=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function U2(n){return n instanceof Date&&!isNaN(n.getTime())}function k2(n){const s=D2.exec(n);if(!s)return null;const[,i,r,c,d,h,y,p,m,b,v]=s,S=new Date(Date.UTC(parseInt(i,10),parseInt(r,10)-1,parseInt(c,10),parseInt(d,10),parseInt(h,10),parseInt(y,10),p?parseInt(p.padEnd(3,"0"),10):0));if(m){const R=(parseInt(b,10)*60+parseInt(v,10))*(m==="+"?-1:1);S.setUTCMinutes(S.getUTCMinutes()+R)}return U2(S)?S:null}function L2(n,s={}){const{strict:i=!1,warnings:r=!1,reviver:c,parseDates:d=!0}=s;if(typeof n!="string")return n;const h=n.trim();if(h.length>0&&h[0]==='"'&&h.endsWith('"')&&!h.slice(1,-1).includes('"'))return h.slice(1,-1);const y=h.toLowerCase();if(y.length<=9&&y in pv)return pv[y];if(!z2.test(h)){if(i)throw new SyntaxError("[better-json] Invalid JSON");return n}if(Object.entries(O2).some(([p,m])=>{const b=m.test(h);return b&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${p} pattern`),b})&&i)throw new Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(h,(m,b)=>{if(m==="__proto__"||m==="constructor"&&b&&typeof b=="object"&&"prototype"in b){r&&console.warn(`[better-json] Dropping "${m}" key to prevent prototype pollution`);return}if(d&&typeof b=="string"){const v=k2(b);if(v)return v}return c?c(m,b):b})}catch(p){if(i)throw p;return n}}function B2(n,s={strict:!0}){return L2(n,s)}const q2={id:"redirect",name:"Redirect",hooks:{onSuccess(n){var s,i;if((s=n.data)!=null&&s.url&&((i=n.data)!=null&&i.redirect)&&typeof window<"u"&&window.location&&window.location)try{window.location.href=n.data.url}catch{}}}};let wn=[],Fa=0;const pc=4,H2=globalThis.nanostoresGlobal||(globalThis.nanostoresGlobal={epoch:0}),k0=n=>{let s=[],i={get(){return i.lc||i.listen(()=>{})(),i.value},init:n,lc:0,listen(r){return i.lc=s.push(r),()=>{for(let d=Fa+pc;d<wn.length;)wn[d]===r?wn.splice(d,pc):d+=pc;let c=s.indexOf(r);~c&&(s.splice(c,1),--i.lc||i.off())}},notify(r,c){H2.epoch++;let d=!wn.length;for(let h of s)wn.push(h,i.value,r,c);if(d){for(Fa=0;Fa<wn.length;Fa+=pc)wn[Fa](wn[Fa+1],wn[Fa+2],wn[Fa+3]);wn.length=0}},off(){},set(r){let c=i.value;c!==r&&(i.value=r,i.notify(c))},subscribe(r){let c=i.listen(r);return r(i.value),c},value:n};return i},Q2=5,gc=6,vc=10;let G2=(n,s,i,r)=>(n.events=n.events||{},n.events[i+vc]||(n.events[i+vc]=r(c=>{n.events[i].reduceRight((d,h)=>(h(d),d),{shared:{},...c})})),n.events[i]=n.events[i]||[],n.events[i].push(s),()=>{let c=n.events[i],d=c.indexOf(s);c.splice(d,1),c.length||(delete n.events[i],n.events[i+vc](),delete n.events[i+vc])});const V2=1e3;let L0=(n,s)=>G2(n,r=>{let c=s(r);c&&n.events[gc].push(c)},Q2,r=>{let c=n.listen;n.listen=(...h)=>(!n.lc&&!n.active&&(n.active=!0,r()),c(...h));let d=n.off;return n.events[gc]=[],n.off=()=>{d(),setTimeout(()=>{if(n.active&&!n.lc){n.active=!1;for(let h of n.events[gc])h();n.events[gc]=[]}},V2)},()=>{n.listen=c,n.off=d}});function Y2(n,s,i){let r=new Set(s).add(void 0);return n.listen((c,d,h)=>{r.has(h)&&i(c,d,h)})}const K2=()=>typeof window>"u",P2=(n,s,i,r)=>{const c=k0({data:null,error:null,isPending:!0,isRefetching:!1,refetch:y=>d(y)}),d=async y=>new Promise(p=>{const m=typeof r=="function"?r({data:c.get().data,error:c.get().error,isPending:c.get().isPending}):r;i(s,{...m,query:{...m==null?void 0:m.query,...y==null?void 0:y.query},async onSuccess(b){var v;c.set({data:b.data,error:null,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((v=m==null?void 0:m.onSuccess)==null?void 0:v.call(m,b))},async onError(b){var E,j;const{request:v}=b,S=typeof v.retry=="number"?v.retry:(E=v.retry)==null?void 0:E.attempts,R=v.retryAttempt||0;if(S&&R<S)return;const _=b.error.status===401;c.set({error:b.error,data:_?null:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch}),await((j=m==null?void 0:m.onError)==null?void 0:j.call(m,b))},async onRequest(b){var S;const v=c.get();c.set({isPending:v.data===null,data:v.data,error:null,isRefetching:!0,refetch:c.value.refetch}),await((S=m==null?void 0:m.onRequest)==null?void 0:S.call(m,b))}}).catch(b=>{c.set({error:b,data:c.get().data,isPending:!1,isRefetching:!1,refetch:c.value.refetch})}).finally(()=>{p(void 0)})});n=Array.isArray(n)?n:[n];let h=!1;for(const y of n)y.subscribe(async()=>{K2()||(h?await d():L0(c,()=>{const p=setTimeout(async()=>{h||(h=!0,await d())},0);return()=>{c.off(),y.off(),clearTimeout(p)}}))});return c},wd=Symbol.for("better-auth:broadcast-channel"),X2=()=>Math.floor(Date.now()/1e3);var Z2=class{constructor(n="better-auth.message"){Ja(this,"listeners",new Set);Ja(this,"name");this.name=n}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}post(n){if(!(typeof window>"u"))try{localStorage.setItem(this.name,JSON.stringify({...n,timestamp:X2()}))}catch{}}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=s=>{if(s.key!==this.name)return;const i=JSON.parse(s.newValue??"{}");(i==null?void 0:i.event)!=="session"||!(i!=null&&i.data)||this.listeners.forEach(r=>r(i))};return window.addEventListener("storage",n),()=>{window.removeEventListener("storage",n)}}};function Td(n="better-auth.message"){return globalThis[wd]||(globalThis[wd]=new Z2(n)),globalThis[wd]}const Nd=Symbol.for("better-auth:focus-manager");var J2=class{constructor(){Ja(this,"listeners",new Set)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setFocused(n){this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof document>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>{document.visibilityState==="visible"&&this.setFocused(!0)};return document.addEventListener("visibilitychange",n,!1),()=>{document.removeEventListener("visibilitychange",n,!1)}}};function gv(){return globalThis[Nd]||(globalThis[Nd]=new J2),globalThis[Nd]}const Cd=Symbol.for("better-auth:online-manager");var F2=class{constructor(){Ja(this,"listeners",new Set);Ja(this,"isOnline",typeof navigator<"u"?navigator.onLine:!0)}subscribe(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}setOnline(n){this.isOnline=n,this.listeners.forEach(s=>s(n))}setup(){if(typeof window>"u"||typeof window.addEventListener>"u")return()=>{};const n=()=>this.setOnline(!0),s=()=>this.setOnline(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n,!1),window.removeEventListener("offline",s,!1)}}};function Md(){return globalThis[Cd]||(globalThis[Cd]=new F2),globalThis[Cd]}const ei=()=>Math.floor(Date.now()/1e3);function vv(n){return typeof n=="object"&&n!==null&&"data"in n&&"error"in n?n:{data:n,error:null}}const I2=5;function $2(n){var A,B,N;const{sessionAtom:s,sessionSignal:i,$fetch:r,options:c={}}=n,d=((A=c.sessionOptions)==null?void 0:A.refetchInterval)??0,h=((B=c.sessionOptions)==null?void 0:B.refetchOnWindowFocus)??!0,y=((N=c.sessionOptions)==null?void 0:N.refetchWhenOffline)??!1,p={lastSync:0,lastSessionRequest:0,cachedSession:void 0},m=()=>y||Md().isOnline,b=Q=>{if(!m())return;if((Q==null?void 0:Q.event)==="storage"){p.lastSync=ei(),i.set(!i.get());return}const k=s.get(),D=()=>{p.lastSessionRequest=ei(),r("/get-session").then(async O=>{let{data:K,error:$}=vv(O);if(K!=null&&K.needsRefresh)try{const Z=await r("/get-session",{method:"POST"});({data:K,error:$}=vv(Z))}catch{}const W=K!=null&&K.session&&(K!=null&&K.user)?K:null;s.set({...k,data:W,error:$}),p.lastSync=ei(),i.set(!i.get())}).catch(()=>{})};if((Q==null?void 0:Q.event)==="poll"){D();return}if((Q==null?void 0:Q.event)==="visibilitychange"){if(ei()-p.lastSessionRequest<I2)return;p.lastSessionRequest=ei()}if((Q==null?void 0:Q.event)==="visibilitychange"){D();return}((k==null?void 0:k.data)===null||(k==null?void 0:k.data)===void 0)&&(p.lastSync=ei(),i.set(!i.get()))},v=Q=>{Td().post({event:"session",data:{trigger:Q},clientId:Math.random().toString(36).substring(7)})},S=()=>{d&&d>0&&(p.pollInterval=setInterval(()=>{var Q;(Q=s.get())!=null&&Q.data&&b({event:"poll"})},d*1e3))},R=()=>{p.unsubscribeBroadcast=Td().subscribe(()=>{b({event:"storage"})})},_=()=>{h&&(p.unsubscribeFocus=gv().subscribe(()=>{b({event:"visibilitychange"})}))},E=()=>{p.unsubscribeOnline=Md().subscribe(Q=>{Q&&b({event:"visibilitychange"})})};return{init:()=>{S(),R(),_(),E(),Td().setup(),gv().setup(),Md().setup()},cleanup:()=>{p.pollInterval&&(clearInterval(p.pollInterval),p.pollInterval=void 0),p.unsubscribeBroadcast&&(p.unsubscribeBroadcast(),p.unsubscribeBroadcast=void 0),p.unsubscribeFocus&&(p.unsubscribeFocus(),p.unsubscribeFocus=void 0),p.unsubscribeOnline&&(p.unsubscribeOnline(),p.unsubscribeOnline=void 0),p.lastSync=0,p.lastSessionRequest=0,p.cachedSession=void 0},triggerRefetch:b,broadcastSessionUpdate:v}}function W2(n,s){const i=k0(!1),r=P2(i,"/get-session",n,{method:"GET"});let c=()=>{};return L0(r,()=>{const d=$2({sessionAtom:r,sessionSignal:i,$fetch:n,options:s});return d.init(),c=d.broadcastSessionUpdate,()=>{d.cleanup()}}),{session:r,$sessionSignal:i,broadcastSessionUpdate:d=>c(d)}}function Ad(n){if(n===null||typeof n!="object")return!1;const s=Object.getPrototypeOf(n);return s!==null&&s!==Object.prototype&&Object.getPrototypeOf(s)!==null||Symbol.iterator in n?!1:Symbol.toStringTag in n?Object.prototype.toString.call(n)==="[object Module]":!0}function th(n,s,i=".",r){if(!Ad(s))return th(n,{},i,r);const c={...s};for(const d of Object.keys(n)){if(d==="__proto__"||d==="constructor")continue;const h=n[d];h!=null&&(r&&r(c,d,h,i)||(Array.isArray(h)&&Array.isArray(c[d])?c[d]=[...h,...c[d]]:Ad(h)&&Ad(c[d])?c[d]=th(h,c[d],(i?`${i}.`:"")+d.toString(),r):c[d]=h))}return c}function eR(n){return(...s)=>s.reduce((i,r)=>th(i,r,"",n),{})}const tR=eR();var nR=Object.defineProperty,aR=Object.defineProperties,sR=Object.getOwnPropertyDescriptors,bv=Object.getOwnPropertySymbols,lR=Object.prototype.hasOwnProperty,iR=Object.prototype.propertyIsEnumerable,xv=(n,s,i)=>s in n?nR(n,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[s]=i,Nn=(n,s)=>{for(var i in s||(s={}))lR.call(s,i)&&xv(n,i,s[i]);if(bv)for(var i of bv(s))iR.call(s,i)&&xv(n,i,s[i]);return n},Hn=(n,s)=>aR(n,sR(s)),rR=class extends Error{constructor(n,s,i){super(s||n.toString(),{cause:i}),this.status=n,this.statusText=s,this.error=i,Error.captureStackTrace(this,this.constructor)}},oR=async(n,s)=>{var i,r,c,d,h,y;let p=s||{};const m={onRequest:[s==null?void 0:s.onRequest],onResponse:[s==null?void 0:s.onResponse],onSuccess:[s==null?void 0:s.onSuccess],onError:[s==null?void 0:s.onError],onRetry:[s==null?void 0:s.onRetry]};if(!s||!(s!=null&&s.plugins))return{url:n,options:p,hooks:m};for(const b of(s==null?void 0:s.plugins)||[]){if(b.init){const v=await((i=b.init)==null?void 0:i.call(b,n.toString(),s));p=v.options||p,n=v.url}m.onRequest.push((r=b.hooks)==null?void 0:r.onRequest),m.onResponse.push((c=b.hooks)==null?void 0:c.onResponse),m.onSuccess.push((d=b.hooks)==null?void 0:d.onSuccess),m.onError.push((h=b.hooks)==null?void 0:h.onError),m.onRetry.push((y=b.hooks)==null?void 0:y.onRetry)}return{url:n,options:p,hooks:m}},Sv=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(){return this.options.delay}},cR=class{constructor(n){this.options=n}shouldAttemptRetry(n,s){return this.options.shouldRetry?Promise.resolve(n<this.options.attempts&&this.options.shouldRetry(s)):Promise.resolve(n<this.options.attempts)}getDelay(n){return Math.min(this.options.maxDelay,this.options.baseDelay*2**n)}};function uR(n){if(typeof n=="number")return new Sv({type:"linear",attempts:n,delay:1e3});switch(n.type){case"linear":return new Sv(n);case"exponential":return new cR(n);default:throw new Error("Invalid retry strategy")}}var fR=async n=>{const s={},i=async r=>typeof r=="function"?await r():r;if(n!=null&&n.auth){if(n.auth.type==="Bearer"){const r=await i(n.auth.token);if(!r)return s;s.authorization=`Bearer ${r}`}else if(n.auth.type==="Basic"){const[r,c]=await Promise.all([i(n.auth.username),i(n.auth.password)]);if(!r||!c)return s;s.authorization=`Basic ${btoa(`${r}:${c}`)}`}else if(n.auth.type==="Custom"){const[r,c]=await Promise.all([i(n.auth.prefix),i(n.auth.value)]);if(!c)return s;s.authorization=`${r??""} ${c}`}}return s},dR=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function hR(n){const s=n.headers.get("content-type"),i=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!s)return"json";const r=s.split(";").shift()||"";return dR.test(r)?"json":i.has(r)||r.startsWith("text/")?"text":"blob"}function mR(n){try{return JSON.parse(n),!0}catch{return!1}}function nh(n){if(n===void 0)return!1;const s=typeof n;return s==="string"||s==="number"||s==="boolean"||s===null?!0:s!=="object"?!1:Array.isArray(n)?!0:n.buffer?!1:n.constructor&&n.constructor.name==="Object"||typeof n.toJSON=="function"}function jv(n){try{return JSON.parse(n)}catch{return n}}function Rv(n){return typeof n=="function"}function yR(n){if(n!=null&&n.customFetchImpl)return n.customFetchImpl;if(typeof globalThis<"u"&&Rv(globalThis.fetch))return globalThis.fetch;if(typeof window<"u"&&Rv(window.fetch))return window.fetch;throw new Error("No fetch implementation found")}async function pR(n){const s=new Headers(n==null?void 0:n.headers),i=await fR(n);for(const[r,c]of Object.entries(i||{}))s.set(r,c);if(!s.has("content-type")){const r=gR(n==null?void 0:n.body);r&&s.set("content-type",r)}return s}function gR(n){return nh(n)?"application/json":null}function vR(n){if(!(n!=null&&n.body))return null;const s=new Headers(n==null?void 0:n.headers);if(nh(n.body)&&!s.has("content-type")){for(const[i,r]of Object.entries(n==null?void 0:n.body))r instanceof Date&&(n.body[i]=r.toISOString());return JSON.stringify(n.body)}return s.has("content-type")&&s.get("content-type")==="application/x-www-form-urlencoded"&&nh(n.body)?new URLSearchParams(n.body).toString():n.body}function bR(n,s){var i;if(s!=null&&s.method)return s.method.toUpperCase();if(n.startsWith("@")){const r=(i=n.split("@")[1])==null?void 0:i.split("/")[0];return q0.includes(r)?r.toUpperCase():s!=null&&s.body?"POST":"GET"}return s!=null&&s.body?"POST":"GET"}function xR(n,s){let i;return!(n!=null&&n.signal)&&(n!=null&&n.timeout)&&(i=setTimeout(()=>s==null?void 0:s.abort(),n==null?void 0:n.timeout)),{abortTimeout:i,clearTimeout:()=>{i&&clearTimeout(i)}}}var SR=class B0 extends Error{constructor(s,i){super(i||JSON.stringify(s,null,2)),this.issues=s,Object.setPrototypeOf(this,B0.prototype)}};async function Cc(n,s){const i=await n["~standard"].validate(s);if(i.issues)throw new SR(i.issues);return i.value}var q0=["get","post","put","patch","delete"],jR=n=>({id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(s,i){var r,c,d,h;const y=((c=(r=n.plugins)==null?void 0:r.find(p=>{var m;return(m=p.schema)!=null&&m.config?s.startsWith(p.schema.config.baseURL||"")||s.startsWith(p.schema.config.prefix||""):!1}))==null?void 0:c.schema)||n.schema;if(y){let p=s;(d=y.config)!=null&&d.prefix&&p.startsWith(y.config.prefix)&&(p=p.replace(y.config.prefix,""),y.config.baseURL&&(s=s.replace(y.config.prefix,y.config.baseURL))),(h=y.config)!=null&&h.baseURL&&p.startsWith(y.config.baseURL)&&(p=p.replace(y.config.baseURL,""));const m=y.schema[p];if(m){let b=Hn(Nn({},i),{method:m.method,output:m.output});return i!=null&&i.disableValidation||(b=Hn(Nn({},b),{body:m.input?await Cc(m.input,i==null?void 0:i.body):i==null?void 0:i.body,params:m.params?await Cc(m.params,i==null?void 0:i.params):i==null?void 0:i.params,query:m.query?await Cc(m.query,i==null?void 0:i.query):i==null?void 0:i.query})),{url:s,options:b}}}return{url:s,options:i}}}),RR=n=>{async function s(i,r){const c=Hn(Nn(Nn({},n),r),{plugins:[...(n==null?void 0:n.plugins)||[],jR(n||{}),...(r==null?void 0:r.plugins)||[]]});if(n!=null&&n.catchAllError)try{return await ah(i,c)}catch(d){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:d}}}return await ah(i,c)}return s};function _R(n,s){const{baseURL:i,params:r,query:c}=s||{query:{},params:{},baseURL:""};let d=n.startsWith("http")?n.split("/").slice(0,3).join("/"):i||"";if(n.startsWith("@")){const v=n.toString().split("@")[1].split("/")[0];q0.includes(v)&&(n=n.replace(`@${v}/`,"/"))}d.endsWith("/")||(d+="/");let[h,y]=n.replace(d,"").split("?");const p=new URLSearchParams(y);for(const[v,S]of Object.entries(c||{})){if(S==null)continue;let R;if(typeof S=="string")R=S;else if(Array.isArray(S)){for(const _ of S)p.append(v,_);continue}else R=JSON.stringify(S);p.set(v,R)}if(r)if(Array.isArray(r)){const v=h.split("/").filter(S=>S.startsWith(":"));for(const[S,R]of v.entries()){const _=r[S];h=h.replace(R,_)}}else for(const[v,S]of Object.entries(r))h=h.replace(`:${v}`,String(S));h=h.split("/").map(encodeURIComponent).join("/"),h.startsWith("/")&&(h=h.slice(1));let m=p.toString();return m=m.length>0?`?${m}`.replace(/\+/g,"%20"):"",d.startsWith("http")?new URL(`${h}${m}`,d):`${d}${h}${m}`}var ah=async(n,s)=>{var i,r,c,d,h,y,p,m;const{hooks:b,url:v,options:S}=await oR(n,s),R=yR(S),_=new AbortController,E=(i=S.signal)!=null?i:_.signal,j=_R(v,S),z=vR(S),A=await pR(S),B=bR(v,S);let N=Hn(Nn({},S),{url:j,headers:A,body:z,method:B,signal:E});for(const te of b.onRequest)if(te){const ee=await te(N);typeof ee=="object"&&ee!==null&&(N=ee)}("pipeTo"in N&&typeof N.pipeTo=="function"||typeof((r=s==null?void 0:s.body)==null?void 0:r.pipe)=="function")&&("duplex"in N||(N.duplex="half"));const{clearTimeout:Q}=xR(S,_);let k=await R(N.url,N);Q();const D={response:k,request:N};for(const te of b.onResponse)if(te){const ee=await te(Hn(Nn({},D),{response:(c=s==null?void 0:s.hookOptions)!=null&&c.cloneResponse?k.clone():k}));ee instanceof Response?k=ee:typeof ee=="object"&&ee!==null&&(k=ee.response)}if(k.ok){if(!(N.method!=="HEAD"))return{data:"",error:null};const ee=hR(k),he={data:null,response:k,request:N};if(ee==="json"||ee==="text"){const L=await k.text(),P=(d=N.jsonParser)!=null?d:jv;he.data=await P(L)}else he.data=await k[ee]();N!=null&&N.output&&N.output&&!N.disableValidation&&(he.data=await Cc(N.output,he.data));for(const L of b.onSuccess)L&&await L(Hn(Nn({},he),{response:(h=s==null?void 0:s.hookOptions)!=null&&h.cloneResponse?k.clone():k}));return s!=null&&s.throw?he.data:{data:he.data,error:null}}const O=(y=s==null?void 0:s.jsonParser)!=null?y:jv,K=await k.text(),$=mR(K),W=$?await O(K):null,Z={response:k,responseText:K,request:N,error:Hn(Nn({},W),{status:k.status,statusText:k.statusText})};for(const te of b.onError)te&&await te(Hn(Nn({},Z),{response:(p=s==null?void 0:s.hookOptions)!=null&&p.cloneResponse?k.clone():k}));if(s!=null&&s.retry){const te=uR(s.retry),ee=(m=s.retryAttempt)!=null?m:0;if(await te.shouldAttemptRetry(ee,k)){for(const L of b.onRetry)L&&await L(D);const he=te.getDelay(ee);return await new Promise(L=>setTimeout(L,he)),await ah(n,Hn(Nn({},s),{retryAttempt:ee+1}))}}if(s!=null&&s.throw)throw new rR(k.status,k.statusText,$?W:K);return{data:null,error:Hn(Nn({},W),{status:k.status,statusText:k.statusText})}},Hs={};const ER=n=>{if(typeof process>"u")return;const s=n??"/api/auth";if(Hs.NEXT_PUBLIC_AUTH_URL)return Hs.NEXT_PUBLIC_AUTH_URL;if(typeof window>"u"){if(Hs.NEXTAUTH_URL)try{return Hs.NEXTAUTH_URL}catch{}if(Hs.VERCEL_URL)try{const i=Hs.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${i}${Hs.VERCEL_URL}`).origin}${s}`}catch{}}},wR=(n,s)=>{var Q,k,D,O,K,$,W;const i="credentials"in Request.prototype,r=A2(n==null?void 0:n.baseURL,n==null?void 0:n.basePath)??ER(n==null?void 0:n.basePath)??"/api/auth",c=((Q=n==null?void 0:n.plugins)==null?void 0:Q.flatMap(Z=>Z.fetchPlugins).filter(Z=>Z!==void 0))||[],d={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:(k=n==null?void 0:n.fetchOptions)==null?void 0:k.onSuccess,onError:(D=n==null?void 0:n.fetchOptions)==null?void 0:D.onError,onRequest:(O=n==null?void 0:n.fetchOptions)==null?void 0:O.onRequest,onResponse:(K=n==null?void 0:n.fetchOptions)==null?void 0:K.onResponse}},{onSuccess:h,onError:y,onRequest:p,onResponse:m,...b}=(n==null?void 0:n.fetchOptions)||{},v=RR({baseURL:r,...i?{credentials:"include"}:{},method:"GET",jsonParser(Z){return Z?B2(Z,{strict:!1}):null},customFetchImpl:fetch,...b,plugins:[d,...b.plugins||[],...n!=null&&n.disableDefaultFetchPlugins?[]:[q2],...c]}),{$sessionSignal:S,session:R,broadcastSessionUpdate:_}=W2(v,n),E=(n==null?void 0:n.plugins)||[];let j={};const z={$sessionSignal:S,session:R},A={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},B=[{signal:"$sessionSignal",matcher(Z){return Z==="/sign-out"||Z==="/update-user"||Z==="/update-session"||Z==="/sign-up/email"||Z==="/sign-in/email"||Z==="/delete-user"||Z==="/verify-email"||Z==="/revoke-sessions"||Z==="/revoke-session"||Z==="/revoke-other-sessions"||Z==="/change-email"||Z==="/change-password"},callback(Z){Z==="/sign-out"?_("signout"):(Z==="/update-user"||Z==="/update-session")&&_("updateUser")}}];for(const Z of E)Z.getAtoms&&Object.assign(z,($=Z.getAtoms)==null?void 0:$.call(Z,v)),Z.pathMethods&&Object.assign(A,Z.pathMethods),Z.atomListeners&&B.push(...Z.atomListeners);const N={notify:Z=>{z[Z].set(!z[Z].get())},listen:(Z,te)=>{z[Z].subscribe(te)},atoms:z};for(const Z of E)Z.getActions&&(j=tR(((W=Z.getActions)==null?void 0:W.call(Z,v,N,n))??{},j));return{get baseURL(){return r},pluginsActions:j,pluginsAtoms:z,pluginPathMethods:A,atomListeners:B,$fetch:v,$store:N}};function TR(n){return typeof n=="object"&&n!==null&&"get"in n&&typeof n.get=="function"&&"lc"in n&&typeof n.lc=="number"}function NR(n,s,i){const r=s[n],{fetchOptions:c,query:d,...h}=i||{};return r||(c!=null&&c.method?c.method:h&&Object.keys(h).length>0?"POST":"GET")}function CR(n,s,i,r,c){function d(h=[]){return new Proxy(function(){},{get(y,p){if(typeof p!="string"||p==="then"||p==="catch"||p==="finally")return;const m=[...h,p];let b=n;for(const v of m)if(b&&typeof b=="object"&&v in b)b=b[v];else{b=void 0;break}return typeof b=="function"||TR(b)?b:d(m)},apply:async(y,p,m)=>{const b="/"+h.map(A=>A.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)).join("/"),v=m[0]||{},S=m[1]||{},{query:R,fetchOptions:_,...E}=v,j={...S,..._},z=NR(b,i,v);return await s(b,{...j,body:z==="GET"?void 0:{...E,...(j==null?void 0:j.body)||{}},query:R||(j==null?void 0:j.query),method:z,async onSuccess(A){var Q,k;if(await((Q=j==null?void 0:j.onSuccess)==null?void 0:Q.call(j,A)),!c||j.disableSignal)return;const B=c.filter(D=>D.matcher(b));if(!B.length)return;const N=new Set;for(const D of B){const O=r[D.signal];if(!O)return;if(N.has(D.signal))continue;N.add(D.signal);const K=O.get();setTimeout(()=>{O.set(!K)},10),(k=D.callback)==null||k.call(D,b)}}})}})}return d()}function MR(n,s={}){const i=Y.useRef(n.get()),{keys:r,deps:c=[n,r]}=s,d=Y.useCallback(y=>{const p=m=>{i.current!==m&&(i.current=m,y())};return p(n.value),r!=null&&r.length?Y2(n,r,p):n.listen(p)},c),h=()=>i.current;return Y.useSyncExternalStore(d,h,h)}function AR(n){return n.charAt(0).toUpperCase()+n.slice(1)}function OR(n){return`use${AR(n)}`}function zR(n){const{pluginPathMethods:s,pluginsActions:i,pluginsAtoms:r,$fetch:c,$store:d,atomListeners:h}=wR(n),y={};for(const[p,m]of Object.entries(r))y[OR(p)]=()=>MR(m);return CR({...i,...y,$fetch:c,$store:d},c,s,r,h)}const DR=zR({baseURL:`${U0.baseUrl}/api/auth`,fetchOptions:{credentials:"include"}}),{signIn:UR,signUp:kR,signOut:LR,useSession:H0}=DR;function Q0(n){var s,i,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(s=0;s<c;s++)n[s]&&(i=Q0(n[s]))&&(r&&(r+=" "),r+=i)}else for(i in n)n[i]&&(r&&(r+=" "),r+=i);return r}function G0(){for(var n,s,i=0,r="",c=arguments.length;i<c;i++)(n=arguments[i])&&(s=Q0(n))&&(r&&(r+=" "),r+=s);return r}const _v=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Ev=G0,V0=(n,s)=>i=>{var r;if((s==null?void 0:s.variants)==null)return Ev(n,i==null?void 0:i.class,i==null?void 0:i.className);const{variants:c,defaultVariants:d}=s,h=Object.keys(c).map(m=>{const b=i==null?void 0:i[m],v=d==null?void 0:d[m];if(b===null)return null;const S=_v(b)||_v(v);return c[m][S]}),y=i&&Object.entries(i).reduce((m,b)=>{let[v,S]=b;return S===void 0||(m[v]=S),m},{}),p=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((m,b)=>{let{class:v,className:S,...R}=b;return Object.entries(R).every(_=>{let[E,j]=_;return Array.isArray(j)?j.includes({...d,...y}[E]):{...d,...y}[E]===j})?[...m,v,S]:m},[]);return Ev(n,h,p,i==null?void 0:i.class,i==null?void 0:i.className)},BR=(n,s)=>{const i=new Array(n.length+s.length);for(let r=0;r<n.length;r++)i[r]=n[r];for(let r=0;r<s.length;r++)i[n.length+r]=s[r];return i},qR=(n,s)=>({classGroupId:n,validator:s}),Y0=(n=new Map,s=null,i)=>({nextPart:n,validators:s,classGroupId:i}),qc="-",wv=[],HR="arbitrary..",QR=n=>{const s=VR(n),{conflictingClassGroups:i,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return GR(h);const y=h.split(qc),p=y[0]===""&&y.length>1?1:0;return K0(y,p,s)},getConflictingClassGroupIds:(h,y)=>{if(y){const p=r[h],m=i[h];return p?m?BR(m,p):p:m||wv}return i[h]||wv}}},K0=(n,s,i)=>{if(n.length-s===0)return i.classGroupId;const c=n[s],d=i.nextPart.get(c);if(d){const m=K0(n,s+1,d);if(m)return m}const h=i.validators;if(h===null)return;const y=s===0?n.join(qc):n.slice(s).join(qc),p=h.length;for(let m=0;m<p;m++){const b=h[m];if(b.validator(y))return b.classGroupId}},GR=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const s=n.slice(1,-1),i=s.indexOf(":"),r=s.slice(0,i);return r?HR+r:void 0})(),VR=n=>{const{theme:s,classGroups:i}=n;return YR(i,s)},YR=(n,s)=>{const i=Y0();for(const r in n){const c=n[r];vh(c,i,r,s)}return i},vh=(n,s,i,r)=>{const c=n.length;for(let d=0;d<c;d++){const h=n[d];KR(h,s,i,r)}},KR=(n,s,i,r)=>{if(typeof n=="string"){PR(n,s,i);return}if(typeof n=="function"){XR(n,s,i,r);return}ZR(n,s,i,r)},PR=(n,s,i)=>{const r=n===""?s:P0(s,n);r.classGroupId=i},XR=(n,s,i,r)=>{if(JR(n)){vh(n(r),s,i,r);return}s.validators===null&&(s.validators=[]),s.validators.push(qR(i,n))},ZR=(n,s,i,r)=>{const c=Object.entries(n),d=c.length;for(let h=0;h<d;h++){const[y,p]=c[h];vh(p,P0(s,y),i,r)}},P0=(n,s)=>{let i=n;const r=s.split(qc),c=r.length;for(let d=0;d<c;d++){const h=r[d];let y=i.nextPart.get(h);y||(y=Y0(),i.nextPart.set(h,y)),i=y}return i},JR=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,FR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let s=0,i=Object.create(null),r=Object.create(null);const c=(d,h)=>{i[d]=h,s++,s>n&&(s=0,r=i,i=Object.create(null))};return{get(d){let h=i[d];if(h!==void 0)return h;if((h=r[d])!==void 0)return c(d,h),h},set(d,h){d in i?i[d]=h:c(d,h)}}},sh="!",Tv=":",IR=[],Nv=(n,s,i,r,c)=>({modifiers:n,hasImportantModifier:s,baseClassName:i,maybePostfixModifierPosition:r,isExternal:c}),$R=n=>{const{prefix:s,experimentalParseClassName:i}=n;let r=c=>{const d=[];let h=0,y=0,p=0,m;const b=c.length;for(let E=0;E<b;E++){const j=c[E];if(h===0&&y===0){if(j===Tv){d.push(c.slice(p,E)),p=E+1;continue}if(j==="/"){m=E;continue}}j==="["?h++:j==="]"?h--:j==="("?y++:j===")"&&y--}const v=d.length===0?c:c.slice(p);let S=v,R=!1;v.endsWith(sh)?(S=v.slice(0,-1),R=!0):v.startsWith(sh)&&(S=v.slice(1),R=!0);const _=m&&m>p?m-p:void 0;return Nv(d,R,S,_)};if(s){const c=s+Tv,d=r;r=h=>h.startsWith(c)?d(h.slice(c.length)):Nv(IR,!1,h,void 0,!0)}if(i){const c=r;r=d=>i({className:d,parseClassName:c})}return r},WR=n=>{const s=new Map;return n.orderSensitiveModifiers.forEach((i,r)=>{s.set(i,1e6+r)}),i=>{const r=[];let c=[];for(let d=0;d<i.length;d++){const h=i[d],y=h[0]==="[",p=s.has(h);y||p?(c.length>0&&(c.sort(),r.push(...c),c=[]),r.push(h)):c.push(h)}return c.length>0&&(c.sort(),r.push(...c)),r}},e_=n=>({cache:FR(n.cacheSize),parseClassName:$R(n),sortModifiers:WR(n),postfixLookupClassGroupIds:t_(n),...QR(n)}),t_=n=>{const s=Object.create(null),i=n.postfixLookupClassGroups;if(i)for(let r=0;r<i.length;r++)s[i[r]]=!0;return s},n_=/\s+/,a_=(n,s)=>{const{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:c,sortModifiers:d,postfixLookupClassGroupIds:h}=s,y=[],p=n.trim().split(n_);let m="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:S,modifiers:R,hasImportantModifier:_,baseClassName:E,maybePostfixModifierPosition:j}=i(v);if(S){m=v+(m.length>0?" "+m:m);continue}let z=!!j,A;if(z){const D=E.substring(0,j);A=r(D);const O=A&&h[A]?r(E):void 0;O&&O!==A&&(A=O,z=!1)}else A=r(E);if(!A){if(!z){m=v+(m.length>0?" "+m:m);continue}if(A=r(E),!A){m=v+(m.length>0?" "+m:m);continue}z=!1}const B=R.length===0?"":R.length===1?R[0]:d(R).join(":"),N=_?B+sh:B,Q=N+A;if(y.indexOf(Q)>-1)continue;y.push(Q);const k=c(A,z);for(let D=0;D<k.length;++D){const O=k[D];y.push(N+O)}m=v+(m.length>0?" "+m:m)}return m},s_=(...n)=>{let s=0,i,r,c="";for(;s<n.length;)(i=n[s++])&&(r=X0(i))&&(c&&(c+=" "),c+=r);return c},X0=n=>{if(typeof n=="string")return n;let s,i="";for(let r=0;r<n.length;r++)n[r]&&(s=X0(n[r]))&&(i&&(i+=" "),i+=s);return i},l_=(n,...s)=>{let i,r,c,d;const h=p=>{const m=s.reduce((b,v)=>v(b),n());return i=e_(m),r=i.cache.get,c=i.cache.set,d=y,y(p)},y=p=>{const m=r(p);if(m)return m;const b=a_(p,i);return c(p,b),b};return d=h,(...p)=>d(s_(...p))},i_=[],ht=n=>{const s=i=>i[n]||i_;return s.isThemeGetter=!0,s},Z0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,J0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r_=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,o_=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c_=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,u_=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,f_=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d_=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ia=n=>r_.test(n),je=n=>!!n&&!Number.isNaN(Number(n)),Bn=n=>!!n&&Number.isInteger(Number(n)),Od=n=>n.endsWith("%")&&je(n.slice(0,-1)),da=n=>o_.test(n),F0=()=>!0,h_=n=>c_.test(n)&&!u_.test(n),bh=()=>!1,m_=n=>f_.test(n),y_=n=>d_.test(n),p_=n=>!re(n)&&!oe(n),g_=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),v_=n=>gs(n,W0,bh),re=n=>Z0.test(n),Qs=n=>gs(n,eb,h_),Cv=n=>gs(n,w_,je),b_=n=>gs(n,nb,F0),x_=n=>gs(n,tb,bh),Mv=n=>gs(n,I0,bh),S_=n=>gs(n,$0,y_),bc=n=>gs(n,ab,m_),oe=n=>J0.test(n),Er=n=>rl(n,eb),j_=n=>rl(n,tb),Av=n=>rl(n,I0),R_=n=>rl(n,W0),__=n=>rl(n,$0),xc=n=>rl(n,ab,!0),E_=n=>rl(n,nb,!0),gs=(n,s,i)=>{const r=Z0.exec(n);return r?r[1]?s(r[1]):i(r[2]):!1},rl=(n,s,i=!1)=>{const r=J0.exec(n);return r?r[1]?s(r[1]):i:!1},I0=n=>n==="position"||n==="percentage",$0=n=>n==="image"||n==="url",W0=n=>n==="length"||n==="size"||n==="bg-size",eb=n=>n==="length",w_=n=>n==="number",tb=n=>n==="family-name",nb=n=>n==="number"||n==="weight",ab=n=>n==="shadow",T_=()=>{const n=ht("color"),s=ht("font"),i=ht("text"),r=ht("font-weight"),c=ht("tracking"),d=ht("leading"),h=ht("breakpoint"),y=ht("container"),p=ht("spacing"),m=ht("radius"),b=ht("shadow"),v=ht("inset-shadow"),S=ht("text-shadow"),R=ht("drop-shadow"),_=ht("blur"),E=ht("perspective"),j=ht("aspect"),z=ht("ease"),A=ht("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],Q=()=>[...N(),oe,re],k=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],O=()=>[oe,re,p],K=()=>[Ia,"full","auto",...O()],$=()=>[Bn,"none","subgrid",oe,re],W=()=>["auto",{span:["full",Bn,oe,re]},Bn,oe,re],Z=()=>[Bn,"auto",oe,re],te=()=>["auto","min","max","fr",oe,re],ee=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],L=()=>["auto",...O()],P=()=>[Ia,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],ue=()=>[Ia,"screen","full","dvw","lvw","svw","min","max","fit",...O()],Me=()=>[Ia,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],ne=()=>[n,oe,re],C=()=>[...N(),Av,Mv,{position:[oe,re]}],F=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",R_,v_,{size:[oe,re]}],se=()=>[Od,Er,Qs],le=()=>["","none","full",m,oe,re],me=()=>["",je,Er,Qs],Re=()=>["solid","dashed","dotted","double"],He=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[je,Od,Av,Mv],un=()=>["","none",_,oe,re],kt=()=>["none",je,oe,re],Jt=()=>["none",je,oe,re],Pn=()=>[je,oe,re],Ct=()=>[Ia,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[da],breakpoint:[da],color:[F0],container:[da],"drop-shadow":[da],ease:["in","out","in-out"],font:[p_],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[da],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[da],shadow:[da],spacing:["px",je],text:[da],"text-shadow":[da],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ia,re,oe,j]}],container:["container"],"container-type":[{"@container":["","normal","size",oe,re]}],"container-named":[g_],columns:[{columns:[je,re,oe,y]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:Q()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Bn,"auto",oe,re]}],basis:[{basis:[Ia,"full","auto",y,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Ia,"auto","initial","none",re]}],grow:[{grow:["",je,oe,re]}],shrink:[{shrink:["",je,oe,re]}],order:[{order:[Bn,"first","last","none",oe,re]}],"grid-cols":[{"grid-cols":$()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":$()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...ee(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...ee()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":ee()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:L()}],mx:[{mx:L()}],my:[{my:L()}],ms:[{ms:L()}],me:[{me:L()}],mbs:[{mbs:L()}],mbe:[{mbe:L()}],mt:[{mt:L()}],mr:[{mr:L()}],mb:[{mb:L()}],ml:[{ml:L()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],"inline-size":[{inline:["auto",...ue()]}],"min-inline-size":[{"min-inline":["auto",...ue()]}],"max-inline-size":[{"max-inline":["none",...ue()]}],"block-size":[{block:["auto",...Me()]}],"min-block-size":[{"min-block":["auto",...Me()]}],"max-block-size":[{"max-block":["none",...Me()]}],w:[{w:[y,"screen",...P()]}],"min-w":[{"min-w":[y,"screen","none",...P()]}],"max-w":[{"max-w":[y,"screen","none","prose",{screen:[h]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",i,Er,Qs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,E_,b_]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Od,re]}],"font-family":[{font:[j_,x_,s]}],"font-features":[{"font-features":[re]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,oe,re]}],"line-clamp":[{"line-clamp":[je,"none",oe,Cv]}],leading:[{leading:[d,...O()]}],"list-image":[{"list-image":["none",oe,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",oe,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ne()}],"text-color":[{text:ne()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Re(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",oe,Qs]}],"text-decoration-color":[{decoration:ne()}],"underline-offset":[{"underline-offset":[je,"auto",oe,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"tab-size":[{tab:[Bn,oe,re]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",oe,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:F()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Bn,oe,re],radial:["",oe,re],conic:[Bn,oe,re]},__,S_]}],"bg-color":[{bg:ne()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:ne()}],"gradient-via":[{via:ne()}],"gradient-to":[{to:ne()}],rounded:[{rounded:le()}],"rounded-s":[{"rounded-s":le()}],"rounded-e":[{"rounded-e":le()}],"rounded-t":[{"rounded-t":le()}],"rounded-r":[{"rounded-r":le()}],"rounded-b":[{"rounded-b":le()}],"rounded-l":[{"rounded-l":le()}],"rounded-ss":[{"rounded-ss":le()}],"rounded-se":[{"rounded-se":le()}],"rounded-ee":[{"rounded-ee":le()}],"rounded-es":[{"rounded-es":le()}],"rounded-tl":[{"rounded-tl":le()}],"rounded-tr":[{"rounded-tr":le()}],"rounded-br":[{"rounded-br":le()}],"rounded-bl":[{"rounded-bl":le()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Re(),"hidden","none"]}],"divide-style":[{divide:[...Re(),"hidden","none"]}],"border-color":[{border:ne()}],"border-color-x":[{"border-x":ne()}],"border-color-y":[{"border-y":ne()}],"border-color-s":[{"border-s":ne()}],"border-color-e":[{"border-e":ne()}],"border-color-bs":[{"border-bs":ne()}],"border-color-be":[{"border-be":ne()}],"border-color-t":[{"border-t":ne()}],"border-color-r":[{"border-r":ne()}],"border-color-b":[{"border-b":ne()}],"border-color-l":[{"border-l":ne()}],"divide-color":[{divide:ne()}],"outline-style":[{outline:[...Re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,oe,re]}],"outline-w":[{outline:["",je,Er,Qs]}],"outline-color":[{outline:ne()}],shadow:[{shadow:["","none",b,xc,bc]}],"shadow-color":[{shadow:ne()}],"inset-shadow":[{"inset-shadow":["none",v,xc,bc]}],"inset-shadow-color":[{"inset-shadow":ne()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ne()}],"ring-offset-w":[{"ring-offset":[je,Qs]}],"ring-offset-color":[{"ring-offset":ne()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":ne()}],"text-shadow":[{"text-shadow":["none",S,xc,bc]}],"text-shadow-color":[{"text-shadow":ne()}],opacity:[{opacity:[je,oe,re]}],"mix-blend":[{"mix-blend":[...He(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":He()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":ne()}],"mask-image-linear-to-color":[{"mask-linear-to":ne()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":ne()}],"mask-image-t-to-color":[{"mask-t-to":ne()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":ne()}],"mask-image-r-to-color":[{"mask-r-to":ne()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":ne()}],"mask-image-b-to-color":[{"mask-b-to":ne()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":ne()}],"mask-image-l-to-color":[{"mask-l-to":ne()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":ne()}],"mask-image-x-to-color":[{"mask-x-to":ne()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":ne()}],"mask-image-y-to-color":[{"mask-y-to":ne()}],"mask-image-radial":[{"mask-radial":[oe,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":ne()}],"mask-image-radial-to-color":[{"mask-radial-to":ne()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":ne()}],"mask-image-conic-to-color":[{"mask-conic-to":ne()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:F()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",oe,re]}],filter:[{filter:["","none",oe,re]}],blur:[{blur:un()}],brightness:[{brightness:[je,oe,re]}],contrast:[{contrast:[je,oe,re]}],"drop-shadow":[{"drop-shadow":["","none",R,xc,bc]}],"drop-shadow-color":[{"drop-shadow":ne()}],grayscale:[{grayscale:["",je,oe,re]}],"hue-rotate":[{"hue-rotate":[je,oe,re]}],invert:[{invert:["",je,oe,re]}],saturate:[{saturate:[je,oe,re]}],sepia:[{sepia:["",je,oe,re]}],"backdrop-filter":[{"backdrop-filter":["","none",oe,re]}],"backdrop-blur":[{"backdrop-blur":un()}],"backdrop-brightness":[{"backdrop-brightness":[je,oe,re]}],"backdrop-contrast":[{"backdrop-contrast":[je,oe,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,oe,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,oe,re]}],"backdrop-invert":[{"backdrop-invert":["",je,oe,re]}],"backdrop-opacity":[{"backdrop-opacity":[je,oe,re]}],"backdrop-saturate":[{"backdrop-saturate":[je,oe,re]}],"backdrop-sepia":[{"backdrop-sepia":["",je,oe,re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",oe,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",oe,re]}],ease:[{ease:["linear","initial",z,oe,re]}],delay:[{delay:[je,oe,re]}],animate:[{animate:["none",A,oe,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,oe,re]}],"perspective-origin":[{"perspective-origin":Q()}],rotate:[{rotate:kt()}],"rotate-x":[{"rotate-x":kt()}],"rotate-y":[{"rotate-y":kt()}],"rotate-z":[{"rotate-z":kt()}],scale:[{scale:Jt()}],"scale-x":[{"scale-x":Jt()}],"scale-y":[{"scale-y":Jt()}],"scale-z":[{"scale-z":Jt()}],"scale-3d":["scale-3d"],skew:[{skew:Pn()}],"skew-x":[{"skew-x":Pn()}],"skew-y":[{"skew-y":Pn()}],transform:[{transform:[oe,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:Q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ct()}],"translate-x":[{"translate-x":Ct()}],"translate-y":[{"translate-y":Ct()}],"translate-z":[{"translate-z":Ct()}],"translate-none":["translate-none"],zoom:[{zoom:[Bn,oe,re]}],accent:[{accent:ne()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ne()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",oe,re]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":ne()}],"scrollbar-track-color":[{"scrollbar-track":ne()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",oe,re]}],fill:[{fill:["none",...ne()]}],"stroke-w":[{stroke:[je,Er,Qs,Cv]}],stroke:[{stroke:["none",...ne()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},N_=l_(T_);function Je(...n){return N_(G0(n))}const xh=V0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Ke=Y.forwardRef(({className:n,variant:s,size:i,...r},c)=>f.jsx("button",{type:"button",className:Je(xh({variant:s,size:i,className:n})),ref:c,...r}));Ke.displayName="Button";const Cn=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("rounded-lg border bg-card text-card-foreground shadow-sm",n),...s}));Cn.displayName="Card";const Mn=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("flex flex-col space-y-1.5 p-6",n),...s}));Mn.displayName="CardHeader";const An=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("text-lg font-semibold leading-none tracking-tight",n),...s}));An.displayName="CardTitle";const Lr=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("text-sm text-muted-foreground",n),...s}));Lr.displayName="CardDescription";const On=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("p-6 pt-0",n),...s}));On.displayName="CardContent";const C_=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{ref:i,className:Je("flex items-center p-6 pt-0",n),...s}));C_.displayName="CardFooter";const zt=Y.forwardRef(({className:n,type:s,...i},r)=>f.jsx("input",{type:s,className:Je("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),ref:r,...i}));zt.displayName="Input";function M_({mode:n,onSuccess:s}){const i=n==="setup",[r,c]=Y.useState(""),[d,h]=Y.useState(""),[y,p]=Y.useState(""),[m,b]=Y.useState(null),[v,S]=Y.useState(!1);async function R(_){_.preventDefault(),b(null),S(!0);try{const E=i?await kR.email({name:r||d,email:d,password:y}):await UR.email({email:d,password:y});if(E.error){b(E.error.message??"Authentication failed.");return}s()}catch(E){b(E instanceof Error?E.message:"Something went wrong.")}finally{S(!1)}}return f.jsxs(Cn,{className:"w-full max-w-sm",children:[f.jsxs(Mn,{children:[f.jsx(An,{children:i?"Create admin account":"Sign in to Studio"}),f.jsx(Lr,{children:i?"No users exist yet. Create the first admin to get started.":"Enter your credentials to access Hogsend Studio."})]}),f.jsx(On,{children:f.jsxs("form",{className:"space-y-4",onSubmit:R,children:[i?f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"name",children:"Name"}),f.jsx(zt,{id:"name",value:r,onChange:_=>c(_.target.value),placeholder:"Your name",autoComplete:"name"})]}):null,f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"email",children:"Email"}),f.jsx(zt,{id:"email",type:"email",required:!0,value:d,onChange:_=>h(_.target.value),placeholder:"you@example.com",autoComplete:"email"})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx("label",{className:"text-sm font-medium",htmlFor:"password",children:"Password"}),f.jsx(zt,{id:"password",type:"password",required:!0,minLength:8,value:y,onChange:_=>p(_.target.value),placeholder:"••••••••",autoComplete:i?"new-password":"current-password"})]}),m?f.jsx("p",{className:"text-sm text-destructive",children:m}):null,f.jsx(Ke,{type:"submit",className:"w-full",disabled:v,children:v?"Please wait…":i?"Create admin":"Sign in"})]})})]})}function Ov({mode:n,onSuccess:s}){return f.jsx("div",{className:"flex h-full items-center justify-center bg-muted/30 p-6",children:f.jsx(M_,{mode:n,onSuccess:s})})}function zd({children:n}){return f.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:n})}function A_({children:n}){const{data:s,isPending:i,isError:r,refetch:c}=lt({queryKey:["auth-status"],queryFn:T2,retry:1,staleTime:0}),{data:d,isPending:h,refetch:y}=H0();return i?f.jsx(zd,{children:"Loading…"}):r?f.jsx(zd,{children:"Unable to reach the Hogsend API."}):s!=null&&s.needsSetup?f.jsx(Ov,{mode:"setup",onSuccess:()=>{c(),y()}}):h?f.jsx(zd,{children:"Loading…"}):d!=null&&d.user?f.jsx(f.Fragment,{children:n}):f.jsx(Ov,{mode:"login",onSuccess:()=>{y()}})}/**
66
66
  * @license lucide-react v0.474.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
@@ -117,7 +117,7 @@ Error generating stack: `+l.message+`
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const P_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],K_=ze("Check",P_);/**
120
+ */const K_=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],P_=ze("Check",K_);/**
121
121
  * @license lucide-react v0.474.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
@@ -247,4 +247,4 @@ Error generating stack: `+l.message+`
247
247
  *
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
- */const zE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Rh=ze("Zap",zE),hb=Y.createContext(null);function DE({children:n}){const[s,i]=Y.useState([]),r=Y.useRef(0),c=Y.useCallback(y=>{i(p=>p.filter(m=>m.id!==y))},[]),d=Y.useCallback(y=>{const p=++r.current,m={id:p,title:y.title,description:y.description,variant:y.variant??"success"};i(b=>[...b,m]),window.setTimeout(()=>c(p),5e3)},[c]),h=Y.useMemo(()=>({toast:d}),[d]);return f.jsxs(hb.Provider,{value:h,children:[n,f.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:s.map(y=>f.jsxs("div",{className:Je("pointer-events-auto flex items-start gap-3 rounded-md border bg-card p-4 shadow-lg",y.variant==="error"&&"border-destructive/40"),children:[y.variant==="success"?f.jsx(rb,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-500"}):f.jsx(ob,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),f.jsxs("div",{className:"flex-1 space-y-0.5",children:[f.jsx("p",{className:"text-sm font-medium",children:y.title}),y.description?f.jsx("p",{className:"text-sm text-muted-foreground",children:y.description}):null]}),f.jsx("button",{type:"button","aria-label":"Dismiss",className:"text-muted-foreground transition-colors hover:text-foreground",onClick:()=>c(y.id),children:f.jsx(jh,{className:"h-4 w-4"})})]},y.id))})]})}function vs(){const n=Y.useContext(hb);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const UE=new hS({defaultOptions:{queries:{staleTime:3e4,retry:(n,s)=>s instanceof Xt&&[401,403].includes(s.status)?!1:n<2,refetchOnWindowFocus:!1}}}),wr="https://docs.hogsend.com",ll={docs:wr,quickstart:`${wr}/docs/getting-started`,recipes:`${wr}/docs/recipes`,journeys:`${wr}/docs/guides/journeys`,buckets:`${wr}/docs/guides/buckets`},kE=[{label:"Overview",path:"/",icon:fE},{label:"Sends",path:"/sends",icon:Yr},{label:"Templates",path:"/templates",icon:ub},{label:"Journeys",path:"/journeys",icon:Sh},{label:"Buckets",path:"/buckets",icon:Y_},{label:"Contacts",path:"/contacts",icon:db},{label:"Suppressions",path:"/suppressions",icon:ib},{label:"Debug",path:"/debug",icon:sE},{label:"Settings",path:"/settings",icon:EE}];function LE(){const n=b2({select:s=>s.location.pathname});return f.jsxs("aside",{className:"flex h-full w-60 flex-col border-r bg-card",children:[f.jsx("div",{className:"flex h-14 items-center border-b px-5",children:f.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Hogsend Studio"})}),f.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:kE.map(s=>{const i=s.path==="/"?n==="/":n.startsWith(s.path),r=s.icon;return f.jsxs(bi,{to:s.path,className:Je("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",i?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx(r,{className:"h-4 w-4"}),s.label]},s.path)})}),f.jsx("div",{className:"border-t p-2",children:f.jsxs("a",{href:ll.docs,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[f.jsx(G_,{className:"h-4 w-4"}),"Docs",f.jsx(lb,{className:"ml-auto h-3.5 w-3.5 opacity-60"})]})})]})}function BE(){const{data:n}=H0();return f.jsxs("div",{className:"flex h-full",children:[f.jsx(LE,{}),f.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[f.jsxs("header",{className:"flex h-14 items-center justify-end gap-3 border-b bg-card px-6",children:[n!=null&&n.user?f.jsx("span",{className:"text-sm text-muted-foreground",children:n.user.email}):null,f.jsxs(Pe,{variant:"ghost",size:"sm",onClick:()=>{LR()},children:[f.jsx(hE,{className:"h-4 w-4"}),"Sign out"]})]}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(D0,{})})]})]})}function Dt({className:n,...s}){return f.jsx("div",{className:Je("animate-pulse rounded-md bg-muted",n),...s})}function Ri({rows:n=6}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dt,{className:"h-9 w-full"}),Array.from({length:n}).map((s,i)=>f.jsx(Dt,{className:"h-12 w-full"},i))]})}function qE({count:n=4}){return f.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:n}).map((s,i)=>f.jsx(Dt,{className:"h-28 w-full"},i))})}function ol({title:n,description:s,icon:i=rE,action:r}){return f.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed p-12 text-center",children:[f.jsx(i,{className:"h-8 w-8 text-muted-foreground"}),f.jsx("p",{className:"text-sm font-medium",children:n}),s?f.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:s}):null,r?f.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:r}):null]})}function Ut({error:n,onRetry:s}){const i=n instanceof Xt||n instanceof Error?n.message:"Something went wrong.";return f.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-lg border border-destructive/40 bg-destructive/5 p-12 text-center",children:[f.jsx(F_,{className:"h-8 w-8 text-destructive"}),f.jsxs("div",{className:"space-y-1",children:[f.jsx("p",{className:"text-sm font-medium",children:"Failed to load"}),f.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:i})]}),s?f.jsx(Pe,{variant:"outline",size:"sm",onClick:s,children:"Retry"}):null]})}function Ra({title:n,description:s,action:i}){return f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:n}),s?f.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null]}),i?f.jsx("div",{className:"shrink-0",children:i}):null]})}const HE=V0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ft({className:n,variant:s,...i}){return f.jsx("div",{className:Je(HE({variant:s}),n),...i})}function Hc({open:n,onClose:s,title:i,description:r,children:c,footer:d,className:h}){return Y.useEffect(()=>{if(!n)return;const y=p=>{p.key==="Escape"&&s()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,s]),n?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-black/50",onClick:s}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:Je("relative z-10 w-full max-w-lg rounded-lg border bg-card p-6 shadow-lg",h),children:[f.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?f.jsx("p",{className:"text-sm text-muted-foreground",children:r}):null]}),f.jsx(Pe,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:s,"aria-label":"Close",children:f.jsx(jh,{className:"h-4 w-4"})})]}),c?f.jsx("div",{className:"space-y-4",children:c}):null,d?f.jsx("div",{className:"mt-6 flex justify-end gap-2",children:d}):null]})]}):null}function _i({open:n,onClose:s,onConfirm:i,title:r,description:c,confirmLabel:d="Confirm",cancelLabel:h="Cancel",destructive:y,loading:p}){return f.jsx(Hc,{open:n,onClose:s,title:r,description:c,footer:f.jsxs(f.Fragment,{children:[f.jsx(Pe,{variant:"outline",onClick:s,disabled:p,children:h}),f.jsx(Pe,{variant:y?"destructive":"default",onClick:i,disabled:p,children:p?"Working…":d})]})})}function xi({href:n,children:s,variant:i="outline",className:r}){return f.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:Je(xh({variant:i,size:"sm"}),r),children:[s,f.jsx(lb,{className:"h-3.5 w-3.5 opacity-70"})]})}const cl=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{className:"relative w-full overflow-auto",children:f.jsx("table",{ref:i,className:Je("w-full caption-bottom text-sm",n),...s})}));cl.displayName="Table";const ul=Y.forwardRef(({className:n,...s},i)=>f.jsx("thead",{ref:i,className:Je("[&_tr]:border-b",n),...s}));ul.displayName="TableHeader";const fl=Y.forwardRef(({className:n,...s},i)=>f.jsx("tbody",{ref:i,className:Je("[&_tr:last-child]:border-0",n),...s}));fl.displayName="TableBody";const on=Y.forwardRef(({className:n,...s},i)=>f.jsx("tr",{ref:i,className:Je("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n),...s}));on.displayName="TableRow";const Ce=Y.forwardRef(({className:n,...s},i)=>f.jsx("th",{ref:i,className:Je("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",n),...s}));Ce.displayName="TableHead";const we=Y.forwardRef(({className:n,...s},i)=>f.jsx("td",{ref:i,className:Je("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...s}));we.displayName="TableCell";const QE=Y.forwardRef(({className:n,...s},i)=>f.jsx("caption",{ref:i,className:Je("mt-4 text-sm text-muted-foreground",n),...s}));QE.displayName="TableCaption";function GE(){return Xe.get("/v1/admin/metrics/overview")}function VE(n){return Xe.get("/v1/admin/emails",{query:n})}function YE(n){return Xe.get(`/v1/admin/emails/${n}`)}function PE(n){return Xe.post(`/v1/admin/emails/${n}/resend`)}function KE(){return Xe.get("/v1/admin/templates")}function XE(n){return Xe.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function ZE(n,s){return Xe.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:s}})}function JE(n){return Xe.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function FE(){return Xe.get("/v1/admin/metrics/journeys")}function IE(n){return Xe.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function mb(){return Xe.get("/v1/admin/journeys",{query:{limit:100}})}function $E(n,s){return Xe.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:s}})}function WE(){return Xe.get("/v1/admin/buckets",{query:{limit:100}})}function ew(n){return Xe.get(`/v1/admin/buckets/${encodeURIComponent(n)}`)}function tw(){return Xe.get("/v1/admin/metrics/buckets")}function nw(n,s){return Xe.get(`/v1/admin/metrics/buckets/${encodeURIComponent(n)}`,{query:{period:s}})}function aw(n,s){return Xe.patch(`/v1/admin/buckets/${encodeURIComponent(n)}`,{json:{enabled:s}})}function sw(n){return Xe.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function lw(n){return Xe.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function iw(n){return Xe.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function rw(n){return Xe.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function yb(n,s){return Xe.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:s})}function ow(n){return Xe.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function cw(){return Xe.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function uw(n){return Xe.post("/v1/admin/api-keys",{json:n})}function fw(n){return Xe.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}function dw(n){return Xe.post("/v1/ingest",{json:n})}const Ke={overview:["overview"],emails:n=>["emails",n],email:n=>["email",n],templates:["templates"],templatePreview:n=>["template-preview",n],templateReport:n=>["template-report",n],journeyMetrics:["journey-metrics"],journeys:["journeys"],journeyFunnel:n=>["journey-funnel",n],buckets:["buckets"],bucketMetrics:["bucket-metrics"],bucket:n=>["bucket",n],bucketTrend:n=>["bucket-trend",n],contacts:n=>["contacts",n],contact:n=>["contact",n],contactActivity:n=>["contact-activity",n],contactTimeline:n=>["contact-timeline",n],suppressions:n=>["suppressions",n],apiKeys:["api-keys"]};function Yn(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Mc(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function hw(n){if(!n)return"—";const s=new Date(n);if(Number.isNaN(s.getTime()))return"—";const i=Date.now()-s.getTime(),r=Math.round(i/1e3);if(r<60)return"just now";const c=Math.round(r/60);if(c<60)return`${c}m ago`;const d=Math.round(c/60);if(d<24)return`${d}h ago`;const h=Math.round(d/24);return h<30?`${h}d ago`:Mc(n)}function Si(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function ut(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function _h(n){if(n==null||Number.isNaN(n))return"—";if(n<60)return`${Math.round(n)}s`;const s=Math.floor(n/60);if(s<60)return`${s}m`;const i=Math.floor(s/60),r=s%60;if(i<24)return r?`${i}h ${r}m`:`${i}h`;const c=Math.floor(i/24),d=i%24;return d?`${c}d ${d}h`:`${c}d`}function mw(n){if(!n)return null;const s=(n.hours??0)*3600+(n.minutes??0)*60+(n.seconds??0);return s>0?_h(s):null}function yw(n,s=48){return n.length>s?`${n.slice(0,s-1)}…`:n}function lh({data:n,height:s=160,label:i="value"}){var c,d;if(n.length===0)return f.jsx("div",{className:"flex items-center justify-center rounded-md border border-dashed text-sm text-muted-foreground",style:{height:s},children:"No data in range"});const r=Math.max(...n.map(h=>h.value),1);return f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"flex items-end gap-1 rounded-md border bg-muted/20 p-3",style:{height:s},children:n.map(h=>{const y=h.value/r*100;return f.jsx("div",{className:"group flex flex-1 flex-col items-center justify-end",title:`${Mc(h.date)}: ${h.value} ${i}`,children:f.jsx("div",{className:"w-full min-w-[2px] rounded-t bg-primary/70 transition-colors group-hover:bg-primary",style:{height:`${Math.max(y,h.value>0?4:0)}%`}})},h.date)})}),f.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[f.jsx("span",{children:Mc((c=n[0])==null?void 0:c.date)}),f.jsx("span",{children:Mc((d=n[n.length-1])==null?void 0:d.date)})]})]})}function pw({bucketId:n}){const s=lt({queryKey:Ke.bucketTrend(n),queryFn:()=>nw(n)});if(s.isPending)return f.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=i.points.map(y=>({date:y.date,value:y.entered})),c=i.points.map(y=>({date:y.date,value:y.left})),d=i.points.reduce((y,p)=>y+p.entered,0),h=i.points.reduce((y,p)=>y+p.left,0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Current size"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(i.size)})]}),f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Entered (range)"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(d)})]}),f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Left (range)"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(h)})]})]}),f.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Entered over time"}),f.jsx(lh,{data:r,label:"joined"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Left over time"}),f.jsx(lh,{data:c,label:"left"})]})]})]})}function gw(){var _,E;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(null),[c,d]=Y.useState(null),h=lt({queryKey:Ke.bucketMetrics,queryFn:tw}),y=lt({queryKey:Ke.buckets,queryFn:WE}),p=Sa({mutationFn:j=>aw(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Bucket enabled":"Bucket disabled"}),d(null),s.invalidateQueries({queryKey:Ke.buckets}),s.invalidateQueries({queryKey:Ke.bucketMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Xt?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((_=y.data)==null?void 0:_.buckets)??[]).map(j=>[j.id,j])),S=(((E=h.data)==null?void 0:E.buckets)??[]).map(j=>{const z=v.get(j.bucketId);return{...j,enabled:(z==null?void 0:z.enabled)??!1,kind:(z==null?void 0:z.kind)??"dynamic",timeBased:(z==null?void 0:z.timeBased)??!1}}),R=S.find(j=>j.bucketId===i)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Buckets",description:"Real-time, code-defined membership. Sizes, enter/leave trends, and which journeys each bucket feeds — observe only, authoring stays in code."}),m?f.jsx(Ri,{}):b?f.jsx(Ut,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):S.length===0?f.jsx(ol,{title:"No buckets registered",description:"Buckets are real-time, code-defined audiences (defineBucket()). Add one to your app and members appear here as events arrive.",action:f.jsxs(f.Fragment,{children:[f.jsx(xi,{href:ll.buckets,children:"How to create a bucket"}),f.jsx(xi,{href:ll.recipes,variant:"ghost",children:"Recipes"})]})}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Bucket"}),f.jsx(Ce,{className:"text-right",children:"Current size"}),f.jsx(Ce,{className:"text-right",children:"Entered"}),f.jsx(Ce,{className:"text-right",children:"Left"}),f.jsx(Ce,{className:"text-right",children:"Avg dwell"}),f.jsx(Ce,{children:"Freshness"}),f.jsx(Ce,{children:"State"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:S.map(j=>f.jsxs(on,{className:"cursor-pointer","data-state":j.bucketId===i?"selected":void 0,onClick:()=>r(z=>z===j.bucketId?null:j.bucketId),children:[f.jsxs(we,{children:[f.jsx("span",{className:"font-medium",children:j.name}),f.jsx("span",{className:"block text-xs text-muted-foreground",children:j.bucketId})]}),f.jsx(we,{className:"text-right",children:ut(j.size)}),f.jsx(we,{className:"text-right",children:ut(j.entered)}),f.jsx(we,{className:"text-right",children:ut(j.left)}),f.jsx(we,{className:"text-right text-muted-foreground",children:_h(j.avgDwellSecs)}),f.jsx(we,{children:f.jsx(vw,{timeBased:j.timeBased})}),f.jsx(we,{children:f.jsx(ft,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),f.jsx(we,{className:"text-right",children:f.jsx(Pe,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.bucketId))})]})}),R?f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — feeds journeys"]})}),f.jsx(On,{children:f.jsx(bw,{bucketId:R.bucketId})})]}),f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — enter / leave over time"]})}),f.jsx(On,{children:f.jsx(pw,{bucketId:R.bucketId})})]})]}):null,f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.bucketId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this bucket?":"Enable this bucket?",description:c!=null&&c.enabled?"Membership will stop being recomputed; in-flight members stay until they leave.":"Matching users will start being added to this bucket again.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function vw({timeBased:n}){return n?f.jsx(ft,{variant:"outline",title:"Time-based — leaves lag the reconcile cron",children:"Building"}):f.jsx(ft,{variant:"outline",title:"Event-driven — transitions in real time",children:"Live"})}function bw({bucketId:n}){const s=lt({queryKey:Ke.bucket(n),queryFn:()=>ew(n)});if(s.isPending)return f.jsx(Dt,{className:"h-10 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data.bucket.feedsJourneys,r=mw(s.data.bucket.maxDwell);return f.jsxs("div",{className:"space-y-3",children:[r?f.jsxs(ft,{variant:"outline",title:"Members are force-removed maxDwell after joining, regardless of criteria.",children:["Time-boxed · ",r]}):null,i.length===0?f.jsxs("p",{className:"text-sm text-muted-foreground",children:["No journeys are bound to this bucket's transitions yet. Bind a journey with ",f.jsxs("code",{className:"text-xs",children:['bucketEntered("',n,'")']}),"."]}):f.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(c=>f.jsx(ft,{variant:"secondary",title:c.trigger,children:c.name},`${c.id}-${c.trigger}`))})]})}const xw={delivered:{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400"},opened:{variant:"outline",className:"border-sky-500/40 text-sky-600 dark:text-sky-400"},clicked:{variant:"outline",className:"border-violet-500/40 text-violet-600 dark:text-violet-400"},sent:{variant:"secondary"},rendered:{variant:"secondary"},queued:{variant:"secondary"},bounced:{variant:"destructive"},complained:{variant:"destructive"},failed:{variant:"destructive"}};function Pc({status:n}){const s=xw[n]??{variant:"outline"};return f.jsx(ft,{variant:s.variant,className:Je("capitalize",s.className),children:n})}function pb({open:n,onClose:s,title:i,description:r,children:c,className:d}){return Y.useEffect(()=>{if(!n)return;const h=y=>{y.key==="Escape"&&s()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n,s]),n?f.jsxs("div",{className:"fixed inset-0 z-50",children:[f.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-black/50",onClick:s}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:Je("absolute inset-y-0 right-0 flex w-full max-w-2xl flex-col border-l bg-card shadow-xl",d),children:[f.jsxs("div",{className:"flex items-start justify-between gap-4 border-b p-6",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?f.jsx("p",{className:"break-all text-sm text-muted-foreground",children:r}):null]}),f.jsx(Pe,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:s,"aria-label":"Close",children:f.jsx(jh,{className:"h-4 w-4"})})]}),f.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c})]})]}):null}const Sw={event:Rh,journey:Sh,email:ub};function jw({entry:n}){const s=Sw[n.type],i=n.data,r=n.type==="event"?String(i.event??"event"):n.type==="journey"?`${String(i.journeyId??"journey")} · ${String(i.status??"")}`:String(i.subject??i.templateKey??"email");return f.jsxs("li",{className:"flex gap-3",children:[f.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border bg-card",children:f.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),f.jsxs("div",{className:"min-w-0 flex-1 pb-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("p",{className:"truncate text-sm font-medium",children:r}),n.type==="email"&&i.status?f.jsx(Pc,{status:String(i.status)}):null]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(n.timestamp)})]})]})}function Rw({contactId:n,onClose:s}){var _,E;const i=n!==null,{toast:r}=vs(),c=ps(),[d,h]=Y.useState(!1),y=lt({queryKey:n?Ke.contact(n):["contact","none"],queryFn:()=>lw(n),enabled:i}),p=lt({queryKey:n?Ke.contactActivity(n):["activity","none"],queryFn:()=>iw(n),enabled:i}),m=lt({queryKey:n?Ke.contactTimeline(n):["timeline","none"],queryFn:()=>rw(n),enabled:i}),b=Sa({mutationFn:()=>yb(n,{suppressed:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),h(!1),n&&c.invalidateQueries({queryKey:Ke.contact(n)}),c.invalidateQueries({queryKey:["suppressions"]})},onError:j=>{r({variant:"error",title:"Un-suppress failed",description:j instanceof Xt?j.message:"Unexpected error."}),h(!1)}}),v=(_=y.data)==null?void 0:_.contact,S=(E=y.data)==null?void 0:E.preferences,R=(S==null?void 0:S.suppressed)||(S==null?void 0:S.unsubscribedAll);return f.jsxs(f.Fragment,{children:[f.jsx(pb,{open:i,onClose:s,title:(v==null?void 0:v.email)??(v==null?void 0:v.externalId)??"Contact",description:v?v.externalId:void 0,children:y.isPending?f.jsxs("div",{className:"space-y-4",children:[f.jsx(Dt,{className:"h-24 w-full"}),f.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):v?f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[S!=null&&S.suppressed?f.jsx(ft,{variant:"destructive",children:"Suppressed"}):null,S!=null&&S.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Unsubscribed"}):null,S&&S.bounceCount>0?f.jsxs(ft,{variant:"secondary",children:[S.bounceCount," bounce",S.bounceCount===1?"":"s"]}):null,R?null:f.jsx(ft,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Subscribed"}),R?f.jsx(Pe,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>h(!0),children:"Un-suppress"}):null]}),f.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:"First seen"}),f.jsx("dd",{className:"text-sm",children:Yn(v.firstSeenAt)})]}),f.jsxs("div",{children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:"Last seen"}),f.jsx("dd",{className:"text-sm",children:Yn(v.lastSeenAt)})]})]}),f.jsxs("section",{children:[f.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Email activity",p.data?` (${p.data.total})`:""]}),p.isPending?f.jsx(Dt,{className:"h-20 w-full"}):p.isError?f.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load email activity."}):p.data&&p.data.sends.length>0?f.jsx("ul",{className:"space-y-2",children:p.data.sends.slice(0,10).map(j=>f.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"truncate text-sm font-medium",children:j.subject}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(j.createdAt)})]}),f.jsx(Pc,{status:j.status})]},j.id))}):f.jsx("p",{className:"text-sm text-muted-foreground",children:"No emails sent."})]}),f.jsxs("section",{children:[f.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.isPending?f.jsx(Dt,{className:"h-20 w-full"}):m.isError?f.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load timeline."}):m.data&&m.data.timeline.length>0?f.jsx("ul",{children:m.data.timeline.map((j,z)=>f.jsx(jw,{entry:j},`${j.type}-${j.timestamp}-${z}`))}):f.jsx("p",{className:"text-sm text-muted-foreground",children:"No activity yet."})]})]}):null}),f.jsx(_i,{open:d,onClose:()=>h(!1),onConfirm:()=>b.mutate(),title:"Un-suppress this contact?",description:"They will be eligible to receive emails again.",confirmLabel:"Un-suppress",loading:b.isPending})]})}function _w(){var p;const[n,s]=Y.useState(""),[i,r]=Y.useState(""),[c,d]=Y.useState(null);Y.useEffect(()=>{const m=window.setTimeout(()=>r(n.trim()),300);return()=>window.clearTimeout(m)},[n]);const h=lt({queryKey:Ke.contacts(i),queryFn:()=>sw(i||void 0),placeholderData:ch}),y=((p=h.data)==null?void 0:p.contacts)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),f.jsxs("div",{className:"relative max-w-sm",children:[f.jsx(jE,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),f.jsx(zt,{placeholder:"Search by email or external ID…",className:"pl-9",value:n,onChange:m=>s(m.target.value)})]}),h.isPending?f.jsx(Ri,{}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):y.length===0?f.jsx(ol,{title:"No contacts found",description:i?"No contacts match your search.":"Contacts appear here as events are ingested."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Email"}),f.jsx(Ce,{children:"External ID"}),f.jsx(Ce,{className:"text-right",children:"Last seen"})]})}),f.jsx(fl,{children:y.map(m=>f.jsxs(on,{className:"cursor-pointer",onClick:()=>d(m.id),children:[f.jsx(we,{className:"font-medium",children:m.email??"—"}),f.jsx(we,{className:"text-muted-foreground",children:m.externalId}),f.jsx(we,{className:"text-right text-muted-foreground",children:hw(m.lastSeenAt)})]},m.id))})]})}),f.jsx(Rw,{contactId:c,onClose:()=>d(null)})]})}function Tt({className:n,...s}){return f.jsx("label",{className:Je("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})}function Dv(){return`test_${Math.random().toString(36).slice(2,10)}`}function Ew(n){const s=n.trim();if(!s)return{ok:!0,value:{}};try{const i=JSON.parse(s);return i===null||typeof i!="object"||Array.isArray(i)?{ok:!1,error:"Properties must be a JSON object."}:{ok:!0,value:i}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Invalid JSON."}}}function ww(){const{toast:n}=vs(),[s,i]=Y.useState(""),[r,c]=Y.useState(Dv),[d,h]=Y.useState(""),[y,p]=Y.useState("{}"),[m,b]=Y.useState(null),[v,S]=Y.useState(null),R=lt({queryKey:Ke.journeys,queryFn:mb}),_=Y.useMemo(()=>{var B;const A=new Map;for(const N of((B=R.data)==null?void 0:B.journeys)??[]){const Q=A.get(N.trigger.event)??[];Q.push(N.name),A.set(N.trigger.event,Q)}return Array.from(A,([N,Q])=>({event:N,journeys:Q}))},[R.data]),E=Sa({mutationFn:A=>dw(A),onSuccess:A=>{S(A),n({title:"Event ingested",description:`Stored: ${A.stored} · ${A.exits.length} journey exit(s).`})},onError:A=>{n({variant:"error",title:"Ingest failed",description:A instanceof Xt?A.message:"Unexpected error."})}}),j=()=>{const A=Ew(y);if(!A.ok){b(A.error);return}b(null),E.mutate({event:s.trim(),userId:r.trim(),userEmail:d.trim()||void 0,properties:A.value})},z=!!s.trim()&&!!r.trim()&&!E.isPending;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Debug",description:"Fire events into the ingest pipeline — exactly what real events do. Trigger journeys locally without a PostHog tunnel."}),f.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[f.jsxs(Cn,{className:"lg:col-span-2",children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Send a test event"}),f.jsxs(Lr,{children:["POSTs to ",f.jsx("code",{className:"text-xs",children:"/v1/ingest"}),". Journeys whose trigger matches will enrol this user."]})]}),f.jsxs(On,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"event",children:"Event name"}),f.jsx(zt,{id:"event",list:"event-presets",placeholder:"e.g. user.created",value:s,onChange:A=>i(A.target.value)}),f.jsx("datalist",{id:"event-presets",children:_.map(A=>f.jsx("option",{value:A.event},A.event))})]}),f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"userId",children:"User ID"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(zt,{id:"userId",placeholder:"test_user",value:r,onChange:A=>c(A.target.value)}),f.jsx(Pe,{variant:"outline",size:"icon",title:"Generate a random test user ID",onClick:()=>c(Dv()),children:f.jsx(TE,{className:"h-4 w-4"})})]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"userEmail",children:"User email (optional)"}),f.jsx(zt,{id:"userEmail",type:"email",placeholder:"you@example.com",value:d,onChange:A=>h(A.target.value)})]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"props",children:"Properties (JSON)"}),f.jsx("textarea",{id:"props",spellCheck:!1,className:"flex min-h-[140px] w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:y,onChange:A=>{p(A.target.value),m&&b(null)}}),m?f.jsx("p",{className:"text-xs text-destructive",children:m}):null]}),f.jsx("div",{className:"flex justify-end",children:f.jsxs(Pe,{onClick:j,disabled:!z,children:[f.jsx(Rh,{className:"h-4 w-4"}),E.isPending?"Sending…":"Send event"]})})]})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Cn,{children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Journey triggers"}),f.jsx(Lr,{children:"Events that enrol a registered journey. Click to fill the form."})]}),f.jsx(On,{children:_.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No journeys registered yet. Any event name still works — define a journey to see triggers here."}):f.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(A=>f.jsx(Pe,{variant:"outline",size:"sm",title:`Triggers: ${A.journeys.join(", ")}`,onClick:()=>i(A.event),children:A.event},A.event))})})]}),v?f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"flex items-center gap-2 text-base",children:[f.jsx(rb,{className:"h-4 w-4 text-green-500"}),"Result"]})}),f.jsxs(On,{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ft,{variant:v.stored?"default":"secondary",children:v.stored?"Stored":"Not stored"}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[v.exits.length," journey exit(s)"]})]}),f.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 text-xs",children:JSON.stringify(v,null,2)}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the effect in"," ",f.jsx(bi,{to:"/journeys",className:"underline underline-offset-4",children:"Journeys"})," ","or the"," ",f.jsx(bi,{to:"/contacts",className:"underline underline-offset-4",children:"contact's timeline"}),". Make sure the worker is running."]})]})]}):null]})]})]})}function Tw({step:n,base:s}){const i=s>0?n.value/s:0,r=i*100;return f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center justify-between text-sm",children:[f.jsx("span",{className:"font-medium",children:n.label}),f.jsxs("span",{className:"text-muted-foreground",children:[ut(n.value),s>0?f.jsxs("span",{className:"ml-1 text-xs",children:["(",Si(i),")"]}):null]})]}),f.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(r,100)}%`}})})]})}function Nw({journeyId:n}){const s=lt({queryKey:Ke.journeyFunnel(n),queryFn:()=>IE(n)});if(s.isPending)return f.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=[{label:"Enrolled",value:i.enrolled},{label:"Email sent",value:i.emailSent},{label:"Opened",value:i.emailOpened},{label:"Clicked",value:i.emailClicked},{label:"Completed",value:i.completed}];return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"space-y-3",children:r.map(c=>f.jsx(Tw,{step:c,base:i.enrolled},c.label))}),f.jsxs("div",{className:"flex gap-4 border-t pt-3 text-sm text-muted-foreground",children:[f.jsxs("span",{children:["Failed: ",ut(i.failed)]}),f.jsxs("span",{children:["Exited: ",ut(i.exited)]})]})]})}function Cw(){var _,E;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(null),[c,d]=Y.useState(null),h=lt({queryKey:Ke.journeyMetrics,queryFn:FE}),y=lt({queryKey:Ke.journeys,queryFn:mb}),p=Sa({mutationFn:j=>$E(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Journey enabled":"Journey disabled"}),d(null),s.invalidateQueries({queryKey:Ke.journeys}),s.invalidateQueries({queryKey:Ke.journeyMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Xt?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((_=y.data)==null?void 0:_.journeys)??[]).map(j=>[j.id,j.enabled])),S=(((E=h.data)==null?void 0:E.journeys)??[]).map(j=>({...j,enabled:v.get(j.journeyId)??!1})),R=S.find(j=>j.journeyId===i)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?f.jsx(Ri,{}):b?f.jsx(Ut,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):S.length===0?f.jsx(ol,{title:"No journeys registered",description:"Journeys are defined in code with defineJourney(). Add one to your app, then fire its trigger event from Debug to see it here.",action:f.jsxs(f.Fragment,{children:[f.jsx(xi,{href:ll.journeys,children:"How to create a journey"}),f.jsx(xi,{href:ll.recipes,variant:"ghost",children:"Recipes"})]})}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Journey"}),f.jsx(Ce,{className:"text-right",children:"Enrolled"}),f.jsx(Ce,{className:"text-right",children:"Active"}),f.jsx(Ce,{className:"text-right",children:"Completed"}),f.jsx(Ce,{className:"text-right",children:"Completion"}),f.jsx(Ce,{className:"text-right",children:"Avg duration"}),f.jsx(Ce,{children:"State"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:S.map(j=>f.jsxs(on,{className:"cursor-pointer","data-state":j.journeyId===i?"selected":void 0,onClick:()=>r(z=>z===j.journeyId?null:j.journeyId),children:[f.jsxs(we,{children:[f.jsx("span",{className:"font-medium",children:j.name}),f.jsx("span",{className:"block text-xs text-muted-foreground",children:j.journeyId})]}),f.jsx(we,{className:"text-right",children:ut(j.enrolled)}),f.jsx(we,{className:"text-right",children:ut(j.active)}),f.jsx(we,{className:"text-right",children:ut(j.completed)}),f.jsx(we,{className:"text-right",children:Si(j.completionRate)}),f.jsx(we,{className:"text-right text-muted-foreground",children:_h(j.avgDurationSecs)}),f.jsx(we,{children:f.jsx(ft,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),f.jsx(we,{className:"text-right",children:f.jsx(Pe,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.journeyId))})]})}),R?f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — funnel"]})}),f.jsx(On,{children:f.jsx(Nw,{journeyId:R.journeyId})})]}):null,f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.journeyId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this journey?":"Enable this journey?",description:c!=null&&c.enabled?"New events will stop enrolling users into this journey.":"New matching events will start enrolling users into this journey.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function Gs({label:n,value:s,hint:i,icon:r}){return f.jsxs(Cn,{children:[f.jsxs(Mn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[f.jsx(An,{className:"text-sm font-medium text-muted-foreground",children:n}),r?f.jsx(r,{className:"h-4 w-4 text-muted-foreground"}):null]}),f.jsxs(On,{children:[f.jsx("div",{className:"text-2xl font-semibold tracking-tight",children:s}),i?f.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}):null]})]})}function Mw(n){return n.totalContacts===0&&n.activeJourneys===0&&n.emailsSent30d===0}function Aw(){return f.jsxs(Cn,{className:"border-primary/30 bg-primary/5",children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Welcome to Hogsend Studio"}),f.jsx(Lr,{children:"Studio observes your code-first lifecycle engine. Here's the path to your first running journey."})]}),f.jsxs(On,{className:"space-y-4",children:[f.jsxs("ol",{className:"space-y-1.5 text-sm text-muted-foreground",children:[f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"1."})," Define a journey in code and start the worker."]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"2."})," Fire its trigger event to enrol a test user."]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"3."})," Watch enrolments, sends, and exits land here."]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsxs(bi,{to:"/debug",className:Je(xh({size:"sm"})),children:[f.jsx(Rh,{className:"h-4 w-4"}),"Send a test event"]}),f.jsx(xi,{href:ll.quickstart,children:"Quickstart"}),f.jsx(xi,{href:ll.journeys,variant:"ghost",children:"Create a journey"})]})]})]})}function Ow(){const n=lt({queryKey:Ke.overview,queryFn:GE});return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?f.jsx(qE,{count:6}):n.isError?f.jsx(Ut,{error:n.error,onRetry:()=>n.refetch()}):f.jsxs(f.Fragment,{children:[Mw(n.data)?f.jsx(Aw,{}):null,f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[f.jsx(Gs,{label:"Total contacts",value:ut(n.data.totalContacts),icon:db}),f.jsx(Gs,{label:"Active journeys",value:ut(n.data.activeJourneys),hint:"Instances active or waiting",icon:Sh}),f.jsx(Gs,{label:"Sent (24h)",value:ut(n.data.emailsSent24h),icon:Yr}),f.jsx(Gs,{label:"Sent (7d)",value:ut(n.data.emailsSent7d),icon:zv}),f.jsx(Gs,{label:"Sent (30d)",value:ut(n.data.emailsSent30d),icon:zv}),f.jsx(Gs,{label:"Bounce rate (30d)",value:Si(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:cb})]}),f.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.jsx(Gs,{label:"Unsubscribe rate",value:Si(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:ME})})]})]})}const Qc=Y.forwardRef(({className:n,children:s,...i},r)=>f.jsxs("div",{className:"relative",children:[f.jsx("select",{ref:r,className:Je("flex h-9 w-full appearance-none rounded-md border border-input bg-transparent px-3 py-1 pr-8 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),...i,children:s}),f.jsx(Z_,{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]}));Qc.displayName="Select";const zw={queued:fb,sent:Yr,delivered:K_,opened:nE,clicked:vE,bounced:cb,complained:ib,failed:ob};function Dw({event:n}){const s=zw[n.type]??fb;return f.jsxs("li",{className:"flex gap-3",children:[f.jsxs("div",{className:"flex flex-col items-center",children:[f.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border bg-card",children:f.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),f.jsx("span",{className:"w-px flex-1 bg-border"})]}),f.jsxs("div",{className:"pb-4",children:[f.jsx("p",{className:"text-sm font-medium capitalize",children:n.type}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(n.timestamp)}),n.url?f.jsx("p",{className:"mt-0.5 break-all text-xs text-muted-foreground",children:n.url}):null]})]})}function $a({label:n,value:s}){return f.jsxs("div",{className:"space-y-0.5",children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:n}),f.jsx("dd",{className:"break-all text-sm",children:s})]})}function Uw({emailId:n,onClose:s}){const i=n!==null,{toast:r}=vs(),c=ps(),[d,h]=Y.useState(!1),y=lt({queryKey:n?Ke.email(n):["email","none"],queryFn:()=>YE(n),enabled:i}),p=Sa({mutationFn:()=>PE(n),onSuccess:()=>{r({title:"Resend queued",description:"A fresh send was queued from this template."}),h(!1),c.invalidateQueries({queryKey:["emails"]}),n&&c.invalidateQueries({queryKey:Ke.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof Xt?v.message:"Unexpected error."}),h(!1)}}),m=y.data,b=m&&["failed","bounced"].includes(m.email.status);return f.jsxs(f.Fragment,{children:[f.jsx(pb,{open:i,onClose:s,title:"Email send",description:m==null?void 0:m.email.subject,children:y.isPending?f.jsxs("div",{className:"space-y-4",children:[f.jsx(Dt,{className:"h-24 w-full"}),f.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):m?f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx(Pc,{status:m.email.status}),b?f.jsxs(Pe,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[f.jsx(Yr,{className:"h-4 w-4"}),"Resend"]}):null]}),f.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[f.jsx($a,{label:"To",value:m.email.toEmail}),f.jsx($a,{label:"From",value:m.email.fromEmail}),f.jsx($a,{label:"Template",value:m.email.templateKey??"—"}),f.jsx($a,{label:"Category",value:m.email.category??"—"}),f.jsx($a,{label:"Journey",value:m.email.journeyId??"—"}),f.jsx($a,{label:"User",value:m.email.userId??"—"}),f.jsx($a,{label:"Resend ID",value:m.email.resendId??"—"}),f.jsx($a,{label:"Created",value:Yn(m.email.createdAt)})]}),f.jsxs("section",{children:[f.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.events.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No delivery events recorded yet."}):f.jsx("ul",{className:"[&>li:last-child>div:first-child>span:last-child]:hidden",children:m.events.map((v,S)=>f.jsx(Dw,{event:v},`${v.type}-${v.timestamp}-${S}`))})]}),f.jsxs("section",{children:[f.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Tracked links (",m.trackedLinks.length,")"]}),m.trackedLinks.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No tracked links in this email."}):f.jsx("ul",{className:"space-y-2",children:m.trackedLinks.map(v=>f.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[f.jsx("span",{className:"break-all text-sm",children:v.originalUrl}),f.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[v.clickCount," click",v.clickCount===1?"":"s"]})]},v.id))})]})]}):null}),f.jsx(_i,{open:d,onClose:()=>h(!1),onConfirm:()=>p.mutate(),title:"Resend this email?",description:"A new send will be queued from the original template and recipient.",confirmLabel:"Resend",loading:p.isPending})]})}const kw=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],Lw=["opened","clicked","bounced","complained"],Tr=25,Uv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function Bw(){var N,Q;const[n,s]=Y.useState(Uv),[i,r]=Y.useState("createdAt"),[c,d]=Y.useState("desc"),[h,y]=Y.useState(0),[p,m]=Y.useState(null),b=n.from?new Date(`${n.from}T00:00:00`).toISOString():void 0,v=n.to?new Date(`${n.to}T23:59:59`).toISOString():void 0,S={limit:Tr,offset:h,templateKey:n.templateKey||void 0,status:n.status||void 0,engagement:n.engagement||void 0,journeyId:n.journeyId||void 0,userId:n.userId||void 0,from:b,to:v,sort:i,order:c},R=lt({queryKey:Ke.emails(S),queryFn:()=>VE(S),placeholderData:ch});function _(k){s(D=>({...D,...k})),y(0)}function E(k){i===k?d(D=>D==="asc"?"desc":"asc"):(r(k),d("desc")),y(0)}const j=Object.values(n).some(Boolean),z=((N=R.data)==null?void 0:N.total)??0,A=((Q=R.data)==null?void 0:Q.emails)??[];function B({column:k,label:D}){const O=i===k;return f.jsx(Ce,{children:f.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 font-medium hover:text-foreground",onClick:()=>E(k),children:[D,O?c==="asc"?f.jsx(q_,{className:"h-3 w-3"}):f.jsx(k_,{className:"h-3 w-3"}):null]})})}return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Sends",description:"Every email sent — filter, sort, and drill into the timeline."}),f.jsxs("div",{className:"grid gap-3 rounded-lg border p-4 md:grid-cols-3 lg:grid-cols-4",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-template",children:"Template"}),f.jsx(zt,{id:"f-template",placeholder:"template key",value:n.templateKey,onChange:k=>_({templateKey:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-status",children:"Status"}),f.jsxs(Qc,{id:"f-status",value:n.status,onChange:k=>_({status:k.target.value}),children:[f.jsx("option",{value:"",children:"All"}),kw.map(k=>f.jsx("option",{value:k,children:k},k))]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-engagement",children:"Engagement"}),f.jsxs(Qc,{id:"f-engagement",value:n.engagement,onChange:k=>_({engagement:k.target.value}),children:[f.jsx("option",{value:"",children:"Any"}),Lw.map(k=>f.jsx("option",{value:k,children:k},k))]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-journey",children:"Journey ID"}),f.jsx(zt,{id:"f-journey",placeholder:"journey id",value:n.journeyId,onChange:k=>_({journeyId:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-user",children:"User ID"}),f.jsx(zt,{id:"f-user",placeholder:"user id",value:n.userId,onChange:k=>_({userId:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-from",children:"From"}),f.jsx(zt,{id:"f-from",type:"date",value:n.from,onChange:k=>_({from:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-to",children:"To"}),f.jsx(zt,{id:"f-to",type:"date",value:n.to,onChange:k=>_({to:k.target.value})})]}),j?f.jsx("div",{className:"flex items-end",children:f.jsx(Pe,{variant:"ghost",size:"sm",onClick:()=>{s(Uv),y(0)},children:"Clear filters"})}):null]}),R.isPending?f.jsx(Ri,{}):R.isError?f.jsx(Ut,{error:R.error,onRetry:()=>R.refetch()}):A.length===0?f.jsx(ol,{title:"No sends found",description:j?"Try widening or clearing your filters.":"Emails will appear here once your journeys start sending."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Recipient"}),f.jsx(Ce,{children:"Subject"}),f.jsx(Ce,{children:"Template"}),f.jsx(Ce,{children:"Status"}),f.jsx(B,{column:"sentAt",label:"Sent"}),f.jsx(B,{column:"createdAt",label:"Created"})]})}),f.jsx(fl,{children:A.map(k=>f.jsxs(on,{className:"cursor-pointer",onClick:()=>m(k.id),children:[f.jsx(we,{className:"font-medium",children:k.toEmail}),f.jsx(we,{children:yw(k.subject,40)}),f.jsx(we,{className:"text-muted-foreground",children:k.templateKey??"—"}),f.jsx(we,{children:f.jsx(Pc,{status:k.status})}),f.jsx(we,{className:"text-muted-foreground",children:Yn(k.sentAt)}),f.jsx(we,{className:"text-muted-foreground",children:Yn(k.createdAt)})]},k.id))})]})}),z>0?f.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[f.jsxs("span",{children:[h+1,"–",Math.min(h+Tr,z)," of ",z]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Pe,{variant:"outline",size:"sm",disabled:h===0,onClick:()=>y(k=>Math.max(0,k-Tr)),children:"Previous"}),f.jsx(Pe,{variant:"outline",size:"sm",disabled:h+Tr>=z,onClick:()=>y(k=>k+Tr),children:"Next"})]})]}):null,f.jsx(Uw,{emailId:p,onClose:()=>m(null)})]})}const qw=["read","journey-admin","full-admin"];function Hw(){var A;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(!1),[c,d]=Y.useState(""),[h,y]=Y.useState(["read"]),[p,m]=Y.useState(null),[b,v]=Y.useState(null),S=lt({queryKey:Ke.apiKeys,queryFn:cw}),R=Sa({mutationFn:()=>uw({name:c.trim(),scopes:h}),onSuccess:B=>{r(!1),d(""),y(["read"]),m(B),s.invalidateQueries({queryKey:Ke.apiKeys})},onError:B=>{n({variant:"error",title:"Could not create key",description:B instanceof Xt?B.message:"Unexpected error."})}}),_=Sa({mutationFn:B=>fw(B),onSuccess:()=>{n({title:"API key revoked"}),v(null),s.invalidateQueries({queryKey:Ke.apiKeys})},onError:B=>{n({variant:"error",title:"Revoke failed",description:B instanceof Xt?B.message:"Unexpected error."}),v(null)}});function E(B){y(N=>N.includes(B)?N.filter(Q=>Q!==B):[...N,B])}async function j(B){try{await navigator.clipboard.writeText(B),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const z=((A=S.data)==null?void 0:A.keys)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:f.jsxs(Pe,{onClick:()=>r(!0),children:[f.jsx(xE,{className:"h-4 w-4"}),"New API key"]})}),S.isPending?f.jsx(Ri,{}):S.isError?f.jsx(Ut,{error:S.error,onRetry:()=>S.refetch()}):z.length===0?f.jsx(ol,{icon:cE,title:"No API keys",description:"Create a key to authenticate API and webhook requests."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Name"}),f.jsx(Ce,{children:"Prefix"}),f.jsx(Ce,{children:"Scopes"}),f.jsx(Ce,{children:"Last used"}),f.jsx(Ce,{children:"Status"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:z.map(B=>{const N=B.revokedAt!==null;return f.jsxs(on,{children:[f.jsx(we,{className:"font-medium",children:B.name}),f.jsxs(we,{className:"font-mono text-xs text-muted-foreground",children:[B.keyPrefix,"…"]}),f.jsx(we,{children:f.jsx("div",{className:"flex flex-wrap gap-1",children:B.scopes.map(Q=>f.jsx(ft,{variant:"secondary",children:Q},Q))})}),f.jsx(we,{className:"text-muted-foreground",children:Yn(B.lastUsedAt)}),f.jsx(we,{children:N?f.jsx(ft,{variant:"outline",children:"Revoked"}):f.jsx(ft,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Active"})}),f.jsx(we,{className:"text-right",children:N?null:f.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>v(B),children:"Revoke"})})]},B.id)})})]})}),f.jsxs(Hc,{open:i,onClose:()=>r(!1),title:"Create API key",description:"Choose a descriptive name and the scopes this key needs.",footer:f.jsxs(f.Fragment,{children:[f.jsx(Pe,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),f.jsx(Pe,{onClick:()=>R.mutate(),disabled:!c.trim()||h.length===0||R.isPending,children:R.isPending?"Creating…":"Create key"})]}),children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"key-name",children:"Name"}),f.jsx(zt,{id:"key-name",placeholder:"CI ingest key",value:c,onChange:B=>d(B.target.value)})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Tt,{children:"Scopes"}),f.jsx("div",{className:"flex flex-col gap-2",children:qw.map(B=>f.jsxs("label",{className:"flex items-center gap-2 text-sm",htmlFor:`scope-${B}`,children:[f.jsx("input",{id:`scope-${B}`,type:"checkbox",className:"h-4 w-4 rounded border-input",checked:h.includes(B),onChange:()=>E(B)}),B]},B))})]})]}),f.jsx(Hc,{open:p!==null,onClose:()=>m(null),title:"API key created",description:"Copy this key now — it will not be shown again.",footer:f.jsx(Pe,{onClick:()=>m(null),children:"Done"}),children:p?f.jsxs("div",{className:"space-y-2",children:[f.jsx(Tt,{children:"Secret key"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("code",{className:"flex-1 break-all rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:p.key}),f.jsx(Pe,{variant:"outline",size:"icon",onClick:()=>j(p.key),"aria-label":"Copy key",children:f.jsx(eE,{className:"h-4 w-4"})})]})]}):null}),f.jsx(_i,{open:b!==null,onClose:()=>v(null),onConfirm:()=>b&&_.mutate(b.id),title:"Revoke this API key?",description:b?`"${b.name}" will stop working immediately. This cannot be undone.`:void 0,confirmLabel:"Revoke",destructive:!0,loading:_.isPending})]})}const Qw=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function Gw({row:n}){return f.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?f.jsxs(ft,{variant:"secondary",children:[ut(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?f.jsx(ft,{variant:"destructive",children:"Suppressed"}):null]})}function Vw(){var m;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(""),[c,d]=Y.useState(null),h=lt({queryKey:Ke.suppressions(i),queryFn:()=>ow(i||void 0),placeholderData:ch}),y=Sa({mutationFn:b=>yb(b.userId,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{n({title:"Recipient restored",description:"They can receive emails again."}),d(null),s.invalidateQueries({queryKey:["suppressions"]})},onError:b=>{n({variant:"error",title:"Un-suppress failed",description:b instanceof Xt?b.message:"Unexpected error."}),d(null)}}),p=((m=h.data)==null?void 0:m.suppressions)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Suppressions",description:"Bounced, unsubscribed, and complained recipients."}),f.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[f.jsx(Tt,{htmlFor:"supp-type",children:"Type"}),f.jsx(Qc,{id:"supp-type",value:i,onChange:b=>r(b.target.value),children:Qw.map(b=>f.jsx("option",{value:b.value,children:b.label},b.value))})]}),h.isPending?f.jsx(Ri,{}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):p.length===0?f.jsx(ol,{title:"No suppressions",description:"Recipients who bounce, unsubscribe, or complain appear here."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Email"}),f.jsx(Ce,{children:"User ID"}),f.jsx(Ce,{children:"Reason"}),f.jsx(Ce,{className:"text-right",children:"Suppressed"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:p.map(b=>f.jsxs(on,{children:[f.jsx(we,{className:"font-medium",children:b.email}),f.jsx(we,{className:"text-muted-foreground",children:b.userId}),f.jsx(we,{children:f.jsx(Gw,{row:b})}),f.jsx(we,{className:"text-right text-muted-foreground",children:Yn(b.suppressedAt)}),f.jsx(we,{className:"text-right",children:f.jsx(Pe,{variant:"outline",size:"sm",onClick:()=>d(b),children:"Un-suppress"})})]},b.id))})]})}),f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&y.mutate(c),title:"Un-suppress this recipient?",description:c?`${c.email} will be eligible to receive emails again.`:void 0,confirmLabel:"Un-suppress",loading:y.isPending})]})}function Sc({label:n,value:s}){return f.jsxs("div",{className:"rounded-md border p-3",children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:n}),f.jsx("p",{className:"text-lg font-semibold",children:s})]})}function Yw({template:n}){const{toast:s}=vs(),[i,r]=Y.useState(!1),[c,d]=Y.useState(""),h=lt({queryKey:Ke.templatePreview(n.key),queryFn:()=>XE(n.key)}),y=lt({queryKey:Ke.templateReport(n.key),queryFn:()=>JE(n.key),retry:(b,v)=>!(v instanceof Xt&&v.status===404)&&b<2}),p=Sa({mutationFn:()=>ZE(n.key,c),onSuccess:b=>{s({title:"Test email sent",description:`Status: ${b.status}.`}),r(!1),d("")},onError:b=>{s({variant:"error",title:"Send-test failed",description:b instanceof Xt?b.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof Xt&&y.error.status===404;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:n.key}),n.category?f.jsx(ft,{variant:"secondary",children:n.category}):null]}),f.jsx("p",{className:"text-sm text-muted-foreground",children:n.defaultSubject})]}),f.jsxs(Pe,{onClick:()=>r(!0),children:[f.jsx(Yr,{className:"h-4 w-4"}),"Send test"]})]}),f.jsxs("section",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Performance"}),y.isPending?f.jsx(Dt,{className:"h-28 w-full"}):m?f.jsx("p",{className:"rounded-md border border-dashed p-6 text-center text-sm text-muted-foreground",children:"This template has never been sent."}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):y.data?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[f.jsx(Sc,{label:"Sent",value:ut(y.data.totals.sent)}),f.jsx(Sc,{label:"Delivered",value:ut(y.data.totals.delivered)}),f.jsx(Sc,{label:"Open rate",value:Si(y.data.totals.openRate)}),f.jsx(Sc,{label:"Click rate",value:Si(y.data.totals.clickRate)})]}),f.jsxs(Cn,{children:[f.jsx(Mn,{className:"pb-2",children:f.jsx(An,{className:"text-sm font-medium text-muted-foreground",children:"Sends over time"})}),f.jsx(On,{children:f.jsx(lh,{label:"sent",data:y.data.series.map(b=>({date:b.date,value:b.sent}))})})]})]}):null]}),f.jsxs("section",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Preview"}),h.isPending?f.jsx(Dt,{className:"h-96 w-full"}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):h.data?f.jsx("div",{className:"overflow-hidden rounded-lg border bg-white",children:f.jsx("iframe",{title:`${n.key} preview`,srcDoc:h.data.html,sandbox:"",className:"h-[600px] w-full"})}):null]}),f.jsx(Hc,{open:i,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:f.jsxs(f.Fragment,{children:[f.jsx(Pe,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),f.jsx(Pe,{onClick:()=>p.mutate(),disabled:!c||p.isPending,children:p.isPending?"Sending…":"Send test"})]}),children:f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"test-to",children:"Recipient email"}),f.jsx(zt,{id:"test-to",type:"email",placeholder:"you@example.com",value:c,onChange:b=>d(b.target.value)})]})})]})}function Pw(){var d;const n=lt({queryKey:Ke.templates,queryFn:KE}),[s,i]=Y.useState(null),r=((d=n.data)==null?void 0:d.templates)??[];Y.useEffect(()=>{const h=r[0];s===null&&h&&i(h.key)},[s,r]);const c=r.find(h=>h.key===s)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?f.jsx(Dt,{className:"h-96 w-full"}):n.isError?f.jsx(Ut,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?f.jsx(ol,{title:"No templates registered",description:"Templates appear here once they're added to your email registry."}):f.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[f.jsx("nav",{className:"space-y-1",children:r.map(h=>f.jsxs("button",{type:"button",onClick:()=>i(h.key),className:Je("w-full rounded-md px-3 py-2 text-left text-sm transition-colors",h.key===s?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx("span",{className:"block font-medium",children:h.key}),h.category?f.jsx("span",{className:"block text-xs opacity-70",children:h.category}):null]},h.key))}),c?f.jsx(Yw,{template:c},c.key):null]})]})}const Pn=s2({component:BE}),Kw=ja({getParentRoute:()=>Pn,path:"/",component:Ow}),Xw=ja({getParentRoute:()=>Pn,path:"/sends",component:Bw}),Zw=ja({getParentRoute:()=>Pn,path:"/templates",component:Pw}),Jw=ja({getParentRoute:()=>Pn,path:"/journeys",component:Cw}),Fw=ja({getParentRoute:()=>Pn,path:"/buckets",component:gw}),Iw=ja({getParentRoute:()=>Pn,path:"/contacts",component:_w}),$w=ja({getParentRoute:()=>Pn,path:"/suppressions",component:Vw}),Ww=ja({getParentRoute:()=>Pn,path:"/settings",component:Hw}),eT=ja({getParentRoute:()=>Pn,path:"/debug",component:ww}),tT=Pn.addChildren([Kw,Xw,Zw,Jw,Fw,Iw,$w,eT,Ww]),nT=y2({routeTree:tT,basepath:"/studio",defaultPreload:"intent"}),gb=document.getElementById("root");if(!gb)throw new Error("Root element #root not found");_2.createRoot(gb).render(f.jsx(Y.StrictMode,{children:f.jsx(yS,{client:UE,children:f.jsx(DE,{children:f.jsx(A_,{children:f.jsx(v2,{router:nT})})})})}));
250
+ */const zE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Rh=ze("Zap",zE),hb=Y.createContext(null);function DE({children:n}){const[s,i]=Y.useState([]),r=Y.useRef(0),c=Y.useCallback(y=>{i(p=>p.filter(m=>m.id!==y))},[]),d=Y.useCallback(y=>{const p=++r.current,m={id:p,title:y.title,description:y.description,variant:y.variant??"success"};i(b=>[...b,m]),window.setTimeout(()=>c(p),5e3)},[c]),h=Y.useMemo(()=>({toast:d}),[d]);return f.jsxs(hb.Provider,{value:h,children:[n,f.jsx("div",{className:"pointer-events-none fixed bottom-4 right-4 z-[60] flex w-full max-w-sm flex-col gap-2",children:s.map(y=>f.jsxs("div",{className:Je("pointer-events-auto flex items-start gap-3 rounded-md border bg-card p-4 shadow-lg",y.variant==="error"&&"border-destructive/40"),children:[y.variant==="success"?f.jsx(rb,{className:"mt-0.5 h-5 w-5 shrink-0 text-emerald-500"}):f.jsx(ob,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),f.jsxs("div",{className:"flex-1 space-y-0.5",children:[f.jsx("p",{className:"text-sm font-medium",children:y.title}),y.description?f.jsx("p",{className:"text-sm text-muted-foreground",children:y.description}):null]}),f.jsx("button",{type:"button","aria-label":"Dismiss",className:"text-muted-foreground transition-colors hover:text-foreground",onClick:()=>c(y.id),children:f.jsx(jh,{className:"h-4 w-4"})})]},y.id))})]})}function vs(){const n=Y.useContext(hb);if(!n)throw new Error("useToast must be used within a ToastProvider");return n}const UE=new hS({defaultOptions:{queries:{staleTime:3e4,retry:(n,s)=>s instanceof Xt&&[401,403].includes(s.status)?!1:n<2,refetchOnWindowFocus:!1}}}),wr="https://docs.hogsend.com",ll={docs:wr,quickstart:`${wr}/docs/getting-started`,recipes:`${wr}/docs/recipes`,journeys:`${wr}/docs/guides/journeys`,buckets:`${wr}/docs/guides/buckets`},kE=[{label:"Overview",path:"/",icon:fE},{label:"Sends",path:"/sends",icon:Yr},{label:"Templates",path:"/templates",icon:ub},{label:"Journeys",path:"/journeys",icon:Sh},{label:"Buckets",path:"/buckets",icon:Y_},{label:"Contacts",path:"/contacts",icon:db},{label:"Suppressions",path:"/suppressions",icon:ib},{label:"Debug",path:"/debug",icon:sE},{label:"Settings",path:"/settings",icon:EE}];function LE(){const n=b2({select:s=>s.location.pathname});return f.jsxs("aside",{className:"flex h-full w-60 flex-col border-r bg-card",children:[f.jsx("div",{className:"flex h-14 items-center border-b px-5",children:f.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"Hogsend Studio"})}),f.jsx("nav",{className:"flex-1 space-y-1 overflow-y-auto p-2",children:kE.map(s=>{const i=s.path==="/"?n==="/":n.startsWith(s.path),r=s.icon;return f.jsxs(bi,{to:s.path,className:Je("flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium transition-colors",i?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx(r,{className:"h-4 w-4"}),s.label]},s.path)})}),f.jsx("div",{className:"border-t p-2",children:f.jsxs("a",{href:ll.docs,target:"_blank",rel:"noreferrer",className:"flex items-center gap-3 rounded-md px-3 py-2 text-sm font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",children:[f.jsx(G_,{className:"h-4 w-4"}),"Docs",f.jsx(lb,{className:"ml-auto h-3.5 w-3.5 opacity-60"})]})})]})}function BE(){const{data:n}=H0();return f.jsxs("div",{className:"flex h-full",children:[f.jsx(LE,{}),f.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[f.jsxs("header",{className:"flex h-14 items-center justify-end gap-3 border-b bg-card px-6",children:[n!=null&&n.user?f.jsx("span",{className:"text-sm text-muted-foreground",children:n.user.email}):null,f.jsxs(Ke,{variant:"ghost",size:"sm",onClick:()=>{LR()},children:[f.jsx(hE,{className:"h-4 w-4"}),"Sign out"]})]}),f.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:f.jsx(D0,{})})]})]})}function Dt({className:n,...s}){return f.jsx("div",{className:Je("animate-pulse rounded-md bg-muted",n),...s})}function Ri({rows:n=6}){return f.jsxs("div",{className:"space-y-2",children:[f.jsx(Dt,{className:"h-9 w-full"}),Array.from({length:n}).map((s,i)=>f.jsx(Dt,{className:"h-12 w-full"},i))]})}function qE({count:n=4}){return f.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-4",children:Array.from({length:n}).map((s,i)=>f.jsx(Dt,{className:"h-28 w-full"},i))})}function ol({title:n,description:s,icon:i=rE,action:r}){return f.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed p-12 text-center",children:[f.jsx(i,{className:"h-8 w-8 text-muted-foreground"}),f.jsx("p",{className:"text-sm font-medium",children:n}),s?f.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:s}):null,r?f.jsx("div",{className:"mt-2 flex flex-wrap items-center justify-center gap-2",children:r}):null]})}function Ut({error:n,onRetry:s}){const i=n instanceof Xt||n instanceof Error?n.message:"Something went wrong.";return f.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 rounded-lg border border-destructive/40 bg-destructive/5 p-12 text-center",children:[f.jsx(F_,{className:"h-8 w-8 text-destructive"}),f.jsxs("div",{className:"space-y-1",children:[f.jsx("p",{className:"text-sm font-medium",children:"Failed to load"}),f.jsx("p",{className:"max-w-sm text-sm text-muted-foreground",children:i})]}),s?f.jsx(Ke,{variant:"outline",size:"sm",onClick:s,children:"Retry"}):null]})}function Ra({title:n,description:s,action:i}){return f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:n}),s?f.jsx("p",{className:"text-sm text-muted-foreground",children:s}):null]}),i?f.jsx("div",{className:"shrink-0",children:i}):null]})}const HE=V0("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ft({className:n,variant:s,...i}){return f.jsx("div",{className:Je(HE({variant:s}),n),...i})}function Hc({open:n,onClose:s,title:i,description:r,children:c,footer:d,className:h}){return Y.useEffect(()=>{if(!n)return;const y=p=>{p.key==="Escape"&&s()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[n,s]),n?f.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[f.jsx("button",{type:"button","aria-label":"Close dialog",className:"absolute inset-0 bg-black/50",onClick:s}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:Je("relative z-10 w-full max-w-lg rounded-lg border bg-card p-6 shadow-lg",h),children:[f.jsxs("div",{className:"mb-4 flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?f.jsx("p",{className:"text-sm text-muted-foreground",children:r}):null]}),f.jsx(Ke,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8",onClick:s,"aria-label":"Close",children:f.jsx(jh,{className:"h-4 w-4"})})]}),c?f.jsx("div",{className:"space-y-4",children:c}):null,d?f.jsx("div",{className:"mt-6 flex justify-end gap-2",children:d}):null]})]}):null}function _i({open:n,onClose:s,onConfirm:i,title:r,description:c,confirmLabel:d="Confirm",cancelLabel:h="Cancel",destructive:y,loading:p}){return f.jsx(Hc,{open:n,onClose:s,title:r,description:c,footer:f.jsxs(f.Fragment,{children:[f.jsx(Ke,{variant:"outline",onClick:s,disabled:p,children:h}),f.jsx(Ke,{variant:y?"destructive":"default",onClick:i,disabled:p,children:p?"Working…":d})]})})}function xi({href:n,children:s,variant:i="outline",className:r}){return f.jsxs("a",{href:n,target:"_blank",rel:"noreferrer",className:Je(xh({variant:i,size:"sm"}),r),children:[s,f.jsx(lb,{className:"h-3.5 w-3.5 opacity-70"})]})}const cl=Y.forwardRef(({className:n,...s},i)=>f.jsx("div",{className:"relative w-full overflow-auto",children:f.jsx("table",{ref:i,className:Je("w-full caption-bottom text-sm",n),...s})}));cl.displayName="Table";const ul=Y.forwardRef(({className:n,...s},i)=>f.jsx("thead",{ref:i,className:Je("[&_tr]:border-b",n),...s}));ul.displayName="TableHeader";const fl=Y.forwardRef(({className:n,...s},i)=>f.jsx("tbody",{ref:i,className:Je("[&_tr:last-child]:border-0",n),...s}));fl.displayName="TableBody";const on=Y.forwardRef(({className:n,...s},i)=>f.jsx("tr",{ref:i,className:Je("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n),...s}));on.displayName="TableRow";const Ce=Y.forwardRef(({className:n,...s},i)=>f.jsx("th",{ref:i,className:Je("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",n),...s}));Ce.displayName="TableHead";const we=Y.forwardRef(({className:n,...s},i)=>f.jsx("td",{ref:i,className:Je("p-2 align-middle [&:has([role=checkbox])]:pr-0",n),...s}));we.displayName="TableCell";const QE=Y.forwardRef(({className:n,...s},i)=>f.jsx("caption",{ref:i,className:Je("mt-4 text-sm text-muted-foreground",n),...s}));QE.displayName="TableCaption";function GE(){return Xe.get("/v1/admin/metrics/overview")}function VE(n){return Xe.get("/v1/admin/emails",{query:n})}function YE(n){return Xe.get(`/v1/admin/emails/${n}`)}function KE(n){return Xe.post(`/v1/admin/emails/${n}/resend`)}function PE(){return Xe.get("/v1/admin/templates")}function XE(n){return Xe.get(`/v1/admin/templates/${encodeURIComponent(n)}/preview`)}function ZE(n,s){return Xe.post(`/v1/admin/templates/${encodeURIComponent(n)}/send-test`,{json:{to:s}})}function JE(n){return Xe.get(`/v1/admin/reporting/templates/${encodeURIComponent(n)}`)}function FE(){return Xe.get("/v1/admin/metrics/journeys")}function IE(n){return Xe.get(`/v1/admin/metrics/journeys/${encodeURIComponent(n)}`)}function mb(){return Xe.get("/v1/admin/journeys",{query:{limit:100}})}function $E(n,s){return Xe.put(`/v1/admin/journeys/${encodeURIComponent(n)}`,{json:{enabled:s}})}function WE(){return Xe.get("/v1/admin/buckets",{query:{limit:100}})}function ew(n){return Xe.get(`/v1/admin/buckets/${encodeURIComponent(n)}`)}function tw(){return Xe.get("/v1/admin/metrics/buckets")}function nw(n,s){return Xe.get(`/v1/admin/metrics/buckets/${encodeURIComponent(n)}`,{query:{period:s}})}function aw(n,s){return Xe.patch(`/v1/admin/buckets/${encodeURIComponent(n)}`,{json:{enabled:s}})}function sw(n){return Xe.get("/v1/admin/contacts",{query:{search:n,limit:50}})}function lw(n){return Xe.get(`/v1/admin/contacts/${encodeURIComponent(n)}`)}function iw(n){return Xe.get(`/v1/admin/reporting/contacts/${encodeURIComponent(n)}/activity`)}function rw(n){return Xe.get(`/v1/admin/contacts/${encodeURIComponent(n)}/timeline`,{query:{limit:100}})}function yb(n,s){return Xe.put(`/v1/admin/contacts/${encodeURIComponent(n)}/preferences`,{json:s})}function ow(n){return Xe.get("/v1/admin/suppressions",{query:{type:n,limit:200}})}function cw(){return Xe.get("/v1/admin/api-keys",{query:{limit:100,includeRevoked:"true"}})}function uw(n){return Xe.post("/v1/admin/api-keys",{json:n})}function fw(n){return Xe.delete(`/v1/admin/api-keys/${encodeURIComponent(n)}`)}function dw(n){return Xe.post("/v1/admin/events",{json:{event:n.event,userId:n.userId,userEmail:n.userEmail,properties:n.properties??{}}})}const Pe={overview:["overview"],emails:n=>["emails",n],email:n=>["email",n],templates:["templates"],templatePreview:n=>["template-preview",n],templateReport:n=>["template-report",n],journeyMetrics:["journey-metrics"],journeys:["journeys"],journeyFunnel:n=>["journey-funnel",n],buckets:["buckets"],bucketMetrics:["bucket-metrics"],bucket:n=>["bucket",n],bucketTrend:n=>["bucket-trend",n],contacts:n=>["contacts",n],contact:n=>["contact",n],contactActivity:n=>["contact-activity",n],contactTimeline:n=>["contact-timeline",n],suppressions:n=>["suppressions",n],apiKeys:["api-keys"]};function Yn(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function Mc(n){if(!n)return"—";const s=new Date(n);return Number.isNaN(s.getTime())?"—":s.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function hw(n){if(!n)return"—";const s=new Date(n);if(Number.isNaN(s.getTime()))return"—";const i=Date.now()-s.getTime(),r=Math.round(i/1e3);if(r<60)return"just now";const c=Math.round(r/60);if(c<60)return`${c}m ago`;const d=Math.round(c/60);if(d<24)return`${d}h ago`;const h=Math.round(d/24);return h<30?`${h}d ago`:Mc(n)}function Si(n){return n==null||Number.isNaN(n)?"—":`${(n*100).toFixed(1)}%`}function ut(n){return n==null||Number.isNaN(n)?"—":n.toLocaleString()}function _h(n){if(n==null||Number.isNaN(n))return"—";if(n<60)return`${Math.round(n)}s`;const s=Math.floor(n/60);if(s<60)return`${s}m`;const i=Math.floor(s/60),r=s%60;if(i<24)return r?`${i}h ${r}m`:`${i}h`;const c=Math.floor(i/24),d=i%24;return d?`${c}d ${d}h`:`${c}d`}function mw(n){if(!n)return null;const s=(n.hours??0)*3600+(n.minutes??0)*60+(n.seconds??0);return s>0?_h(s):null}function yw(n,s=48){return n.length>s?`${n.slice(0,s-1)}…`:n}function lh({data:n,height:s=160,label:i="value"}){var c,d;if(n.length===0)return f.jsx("div",{className:"flex items-center justify-center rounded-md border border-dashed text-sm text-muted-foreground",style:{height:s},children:"No data in range"});const r=Math.max(...n.map(h=>h.value),1);return f.jsxs("div",{className:"space-y-2",children:[f.jsx("div",{className:"flex items-end gap-1 rounded-md border bg-muted/20 p-3",style:{height:s},children:n.map(h=>{const y=h.value/r*100;return f.jsx("div",{className:"group flex flex-1 flex-col items-center justify-end",title:`${Mc(h.date)}: ${h.value} ${i}`,children:f.jsx("div",{className:"w-full min-w-[2px] rounded-t bg-primary/70 transition-colors group-hover:bg-primary",style:{height:`${Math.max(y,h.value>0?4:0)}%`}})},h.date)})}),f.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground",children:[f.jsx("span",{children:Mc((c=n[0])==null?void 0:c.date)}),f.jsx("span",{children:Mc((d=n[n.length-1])==null?void 0:d.date)})]})]})}function pw({bucketId:n}){const s=lt({queryKey:Pe.bucketTrend(n),queryFn:()=>nw(n)});if(s.isPending)return f.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=i.points.map(y=>({date:y.date,value:y.entered})),c=i.points.map(y=>({date:y.date,value:y.left})),d=i.points.reduce((y,p)=>y+p.entered,0),h=i.points.reduce((y,p)=>y+p.left,0);return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Current size"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(i.size)})]}),f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Entered (range)"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(d)})]}),f.jsxs("div",{children:[f.jsx("span",{className:"block text-xs text-muted-foreground",children:"Left (range)"}),f.jsx("span",{className:"text-lg font-semibold",children:ut(h)})]})]}),f.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[f.jsxs("div",{className:"space-y-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Entered over time"}),f.jsx(lh,{data:r,label:"joined"})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx("span",{className:"text-sm font-medium",children:"Left over time"}),f.jsx(lh,{data:c,label:"left"})]})]})]})}function gw(){var _,E;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(null),[c,d]=Y.useState(null),h=lt({queryKey:Pe.bucketMetrics,queryFn:tw}),y=lt({queryKey:Pe.buckets,queryFn:WE}),p=Sa({mutationFn:j=>aw(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Bucket enabled":"Bucket disabled"}),d(null),s.invalidateQueries({queryKey:Pe.buckets}),s.invalidateQueries({queryKey:Pe.bucketMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Xt?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((_=y.data)==null?void 0:_.buckets)??[]).map(j=>[j.id,j])),S=(((E=h.data)==null?void 0:E.buckets)??[]).map(j=>{const z=v.get(j.bucketId);return{...j,enabled:(z==null?void 0:z.enabled)??!1,kind:(z==null?void 0:z.kind)??"dynamic",timeBased:(z==null?void 0:z.timeBased)??!1}}),R=S.find(j=>j.bucketId===i)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Buckets",description:"Real-time, code-defined membership. Sizes, enter/leave trends, and which journeys each bucket feeds — observe only, authoring stays in code."}),m?f.jsx(Ri,{}):b?f.jsx(Ut,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):S.length===0?f.jsx(ol,{title:"No buckets registered",description:"Buckets are real-time, code-defined audiences (defineBucket()). Add one to your app and members appear here as events arrive.",action:f.jsxs(f.Fragment,{children:[f.jsx(xi,{href:ll.buckets,children:"How to create a bucket"}),f.jsx(xi,{href:ll.recipes,variant:"ghost",children:"Recipes"})]})}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Bucket"}),f.jsx(Ce,{className:"text-right",children:"Current size"}),f.jsx(Ce,{className:"text-right",children:"Entered"}),f.jsx(Ce,{className:"text-right",children:"Left"}),f.jsx(Ce,{className:"text-right",children:"Avg dwell"}),f.jsx(Ce,{children:"Freshness"}),f.jsx(Ce,{children:"State"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:S.map(j=>f.jsxs(on,{className:"cursor-pointer","data-state":j.bucketId===i?"selected":void 0,onClick:()=>r(z=>z===j.bucketId?null:j.bucketId),children:[f.jsxs(we,{children:[f.jsx("span",{className:"font-medium",children:j.name}),f.jsx("span",{className:"block text-xs text-muted-foreground",children:j.bucketId})]}),f.jsx(we,{className:"text-right",children:ut(j.size)}),f.jsx(we,{className:"text-right",children:ut(j.entered)}),f.jsx(we,{className:"text-right",children:ut(j.left)}),f.jsx(we,{className:"text-right text-muted-foreground",children:_h(j.avgDwellSecs)}),f.jsx(we,{children:f.jsx(vw,{timeBased:j.timeBased})}),f.jsx(we,{children:f.jsx(ft,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),f.jsx(we,{className:"text-right",children:f.jsx(Ke,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.bucketId))})]})}),R?f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — feeds journeys"]})}),f.jsx(On,{children:f.jsx(bw,{bucketId:R.bucketId})})]}),f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — enter / leave over time"]})}),f.jsx(On,{children:f.jsx(pw,{bucketId:R.bucketId})})]})]}):null,f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.bucketId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this bucket?":"Enable this bucket?",description:c!=null&&c.enabled?"Membership will stop being recomputed; in-flight members stay until they leave.":"Matching users will start being added to this bucket again.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function vw({timeBased:n}){return n?f.jsx(ft,{variant:"outline",title:"Time-based — leaves lag the reconcile cron",children:"Building"}):f.jsx(ft,{variant:"outline",title:"Event-driven — transitions in real time",children:"Live"})}function bw({bucketId:n}){const s=lt({queryKey:Pe.bucket(n),queryFn:()=>ew(n)});if(s.isPending)return f.jsx(Dt,{className:"h-10 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data.bucket.feedsJourneys,r=mw(s.data.bucket.maxDwell);return f.jsxs("div",{className:"space-y-3",children:[r?f.jsxs(ft,{variant:"outline",title:"Members are force-removed maxDwell after joining, regardless of criteria.",children:["Time-boxed · ",r]}):null,i.length===0?f.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[f.jsxs("p",{children:["No journeys are bound to this bucket's transitions yet. Bind one to THIS bucket with the typed refs"," ",f.jsx("code",{className:"text-xs",children:"bucket.entered"})," /"," ",f.jsx("code",{className:"text-xs",children:"bucket.left"})," (e.g."," ",f.jsx("code",{className:"text-xs",children:"{ trigger: { event: bucket.entered } }"}),"), or colocate a reaction with"," ",f.jsx("code",{className:"text-xs",children:'bucket.on("enter", ...)'}),"."]}),f.jsxs("p",{children:["To react to ANY bucket, use the generic"," ",f.jsx("code",{className:"text-xs",children:"Events.BUCKET_ENTERED"})," /"," ",f.jsx("code",{className:"text-xs",children:"Events.BUCKET_LEFT"})," constants."]})]}):f.jsx("div",{className:"flex flex-wrap gap-2",children:i.map(c=>f.jsxs(ft,{variant:c.owned?"default":"secondary",title:c.trigger,children:[c.name,c.owned?f.jsx("span",{className:"ml-1.5 text-[10px] uppercase tracking-wide opacity-70",children:"owned"}):null]},`${c.id}-${c.trigger}`))})]})}const xw={delivered:{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400"},opened:{variant:"outline",className:"border-sky-500/40 text-sky-600 dark:text-sky-400"},clicked:{variant:"outline",className:"border-violet-500/40 text-violet-600 dark:text-violet-400"},sent:{variant:"secondary"},rendered:{variant:"secondary"},queued:{variant:"secondary"},bounced:{variant:"destructive"},complained:{variant:"destructive"},failed:{variant:"destructive"}};function Kc({status:n}){const s=xw[n]??{variant:"outline"};return f.jsx(ft,{variant:s.variant,className:Je("capitalize",s.className),children:n})}function pb({open:n,onClose:s,title:i,description:r,children:c,className:d}){return Y.useEffect(()=>{if(!n)return;const h=y=>{y.key==="Escape"&&s()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[n,s]),n?f.jsxs("div",{className:"fixed inset-0 z-50",children:[f.jsx("button",{type:"button","aria-label":"Close panel",className:"absolute inset-0 bg-black/50",onClick:s}),f.jsxs("div",{role:"dialog","aria-modal":"true",className:Je("absolute inset-y-0 right-0 flex w-full max-w-2xl flex-col border-l bg-card shadow-xl",d),children:[f.jsxs("div",{className:"flex items-start justify-between gap-4 border-b p-6",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsx("h2",{className:"text-lg font-semibold leading-none tracking-tight",children:i}),r?f.jsx("p",{className:"break-all text-sm text-muted-foreground",children:r}):null]}),f.jsx(Ke,{variant:"ghost",size:"icon",className:"-mr-2 -mt-2 h-8 w-8 shrink-0",onClick:s,"aria-label":"Close",children:f.jsx(jh,{className:"h-4 w-4"})})]}),f.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:c})]})]}):null}const Sw={event:Rh,journey:Sh,email:ub};function jw({entry:n}){const s=Sw[n.type],i=n.data,r=n.type==="event"?String(i.event??"event"):n.type==="journey"?`${String(i.journeyId??"journey")} · ${String(i.status??"")}`:String(i.subject??i.templateKey??"email");return f.jsxs("li",{className:"flex gap-3",children:[f.jsx("span",{className:"mt-0.5 flex h-7 w-7 shrink-0 items-center justify-center rounded-full border bg-card",children:f.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),f.jsxs("div",{className:"min-w-0 flex-1 pb-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("p",{className:"truncate text-sm font-medium",children:r}),n.type==="email"&&i.status?f.jsx(Kc,{status:String(i.status)}):null]}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(n.timestamp)})]})]})}function Rw({contactId:n,onClose:s}){var _,E;const i=n!==null,{toast:r}=vs(),c=ps(),[d,h]=Y.useState(!1),y=lt({queryKey:n?Pe.contact(n):["contact","none"],queryFn:()=>lw(n),enabled:i}),p=lt({queryKey:n?Pe.contactActivity(n):["activity","none"],queryFn:()=>iw(n),enabled:i}),m=lt({queryKey:n?Pe.contactTimeline(n):["timeline","none"],queryFn:()=>rw(n),enabled:i}),b=Sa({mutationFn:()=>yb(n,{suppressed:!1}),onSuccess:()=>{r({title:"Contact un-suppressed",description:"They can receive emails again."}),h(!1),n&&c.invalidateQueries({queryKey:Pe.contact(n)}),c.invalidateQueries({queryKey:["suppressions"]})},onError:j=>{r({variant:"error",title:"Un-suppress failed",description:j instanceof Xt?j.message:"Unexpected error."}),h(!1)}}),v=(_=y.data)==null?void 0:_.contact,S=(E=y.data)==null?void 0:E.preferences,R=(S==null?void 0:S.suppressed)||(S==null?void 0:S.unsubscribedAll);return f.jsxs(f.Fragment,{children:[f.jsx(pb,{open:i,onClose:s,title:(v==null?void 0:v.email)??(v==null?void 0:v.externalId)??"Contact",description:v?v.externalId:void 0,children:y.isPending?f.jsxs("div",{className:"space-y-4",children:[f.jsx(Dt,{className:"h-24 w-full"}),f.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):v?f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[S!=null&&S.suppressed?f.jsx(ft,{variant:"destructive",children:"Suppressed"}):null,S!=null&&S.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Unsubscribed"}):null,S&&S.bounceCount>0?f.jsxs(ft,{variant:"secondary",children:[S.bounceCount," bounce",S.bounceCount===1?"":"s"]}):null,R?null:f.jsx(ft,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Subscribed"}),R?f.jsx(Ke,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>h(!0),children:"Un-suppress"}):null]}),f.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[f.jsxs("div",{children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:"First seen"}),f.jsx("dd",{className:"text-sm",children:Yn(v.firstSeenAt)})]}),f.jsxs("div",{children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:"Last seen"}),f.jsx("dd",{className:"text-sm",children:Yn(v.lastSeenAt)})]})]}),f.jsxs("section",{children:[f.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Email activity",p.data?` (${p.data.total})`:""]}),p.isPending?f.jsx(Dt,{className:"h-20 w-full"}):p.isError?f.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load email activity."}):p.data&&p.data.sends.length>0?f.jsx("ul",{className:"space-y-2",children:p.data.sends.slice(0,10).map(j=>f.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[f.jsxs("div",{className:"min-w-0",children:[f.jsx("p",{className:"truncate text-sm font-medium",children:j.subject}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(j.createdAt)})]}),f.jsx(Kc,{status:j.status})]},j.id))}):f.jsx("p",{className:"text-sm text-muted-foreground",children:"No emails sent."})]}),f.jsxs("section",{children:[f.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.isPending?f.jsx(Dt,{className:"h-20 w-full"}):m.isError?f.jsx("p",{className:"text-sm text-muted-foreground",children:"Could not load timeline."}):m.data&&m.data.timeline.length>0?f.jsx("ul",{children:m.data.timeline.map((j,z)=>f.jsx(jw,{entry:j},`${j.type}-${j.timestamp}-${z}`))}):f.jsx("p",{className:"text-sm text-muted-foreground",children:"No activity yet."})]})]}):null}),f.jsx(_i,{open:d,onClose:()=>h(!1),onConfirm:()=>b.mutate(),title:"Un-suppress this contact?",description:"They will be eligible to receive emails again.",confirmLabel:"Un-suppress",loading:b.isPending})]})}function _w(){var p;const[n,s]=Y.useState(""),[i,r]=Y.useState(""),[c,d]=Y.useState(null);Y.useEffect(()=>{const m=window.setTimeout(()=>r(n.trim()),300);return()=>window.clearTimeout(m)},[n]);const h=lt({queryKey:Pe.contacts(i),queryFn:()=>sw(i||void 0),placeholderData:ch}),y=((p=h.data)==null?void 0:p.contacts)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Contacts",description:"Search contacts and review their full activity timeline."}),f.jsxs("div",{className:"relative max-w-sm",children:[f.jsx(jE,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),f.jsx(zt,{placeholder:"Search by email or external ID…",className:"pl-9",value:n,onChange:m=>s(m.target.value)})]}),h.isPending?f.jsx(Ri,{}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):y.length===0?f.jsx(ol,{title:"No contacts found",description:i?"No contacts match your search.":"Contacts appear here as events are ingested."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Email"}),f.jsx(Ce,{children:"External ID"}),f.jsx(Ce,{className:"text-right",children:"Last seen"})]})}),f.jsx(fl,{children:y.map(m=>f.jsxs(on,{className:"cursor-pointer",onClick:()=>d(m.id),children:[f.jsx(we,{className:"font-medium",children:m.email??"—"}),f.jsx(we,{className:"text-muted-foreground",children:m.externalId}),f.jsx(we,{className:"text-right text-muted-foreground",children:hw(m.lastSeenAt)})]},m.id))})]})}),f.jsx(Rw,{contactId:c,onClose:()=>d(null)})]})}function Tt({className:n,...s}){return f.jsx("label",{className:Je("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n),...s})}function Dv(){return`test_${Math.random().toString(36).slice(2,10)}`}function Ew(n){const s=n.trim();if(!s)return{ok:!0,value:{}};try{const i=JSON.parse(s);return i===null||typeof i!="object"||Array.isArray(i)?{ok:!1,error:"Properties must be a JSON object."}:{ok:!0,value:i}}catch(i){return{ok:!1,error:i instanceof Error?i.message:"Invalid JSON."}}}function ww(){const{toast:n}=vs(),[s,i]=Y.useState(""),[r,c]=Y.useState(Dv),[d,h]=Y.useState(""),[y,p]=Y.useState("{}"),[m,b]=Y.useState(null),[v,S]=Y.useState(null),R=lt({queryKey:Pe.journeys,queryFn:mb}),_=Y.useMemo(()=>{var B;const A=new Map;for(const N of((B=R.data)==null?void 0:B.journeys)??[]){const Q=A.get(N.trigger.event)??[];Q.push(N.name),A.set(N.trigger.event,Q)}return Array.from(A,([N,Q])=>({event:N,journeys:Q}))},[R.data]),E=Sa({mutationFn:A=>dw(A),onSuccess:A=>{S(A),n({title:"Event ingested",description:`Stored: ${A.stored} · ${A.exits.length} journey exit(s).`})},onError:A=>{n({variant:"error",title:"Ingest failed",description:A instanceof Xt?A.message:"Unexpected error."})}}),j=()=>{const A=Ew(y);if(!A.ok){b(A.error);return}b(null),E.mutate({event:s.trim(),userId:r.trim(),userEmail:d.trim()||void 0,properties:A.value})},z=!!s.trim()&&!!r.trim()&&!E.isPending;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Debug",description:"Fire events into the ingest pipeline — exactly what real events do. Trigger journeys locally without a PostHog tunnel."}),f.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[f.jsxs(Cn,{className:"lg:col-span-2",children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Send a test event"}),f.jsxs(Lr,{children:["POSTs to ",f.jsx("code",{className:"text-xs",children:"/v1/ingest"}),". Journeys whose trigger matches will enrol this user."]})]}),f.jsxs(On,{className:"space-y-4",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"event",children:"Event name"}),f.jsx(zt,{id:"event",list:"event-presets",placeholder:"e.g. user.created",value:s,onChange:A=>i(A.target.value)}),f.jsx("datalist",{id:"event-presets",children:_.map(A=>f.jsx("option",{value:A.event},A.event))})]}),f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"userId",children:"User ID"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(zt,{id:"userId",placeholder:"test_user",value:r,onChange:A=>c(A.target.value)}),f.jsx(Ke,{variant:"outline",size:"icon",title:"Generate a random test user ID",onClick:()=>c(Dv()),children:f.jsx(TE,{className:"h-4 w-4"})})]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"userEmail",children:"User email (optional)"}),f.jsx(zt,{id:"userEmail",type:"email",placeholder:"you@example.com",value:d,onChange:A=>h(A.target.value)})]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"props",children:"Properties (JSON)"}),f.jsx("textarea",{id:"props",spellCheck:!1,className:"flex min-h-[140px] w-full rounded-md border border-input bg-transparent px-3 py-2 font-mono text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:y,onChange:A=>{p(A.target.value),m&&b(null)}}),m?f.jsx("p",{className:"text-xs text-destructive",children:m}):null]}),f.jsx("div",{className:"flex justify-end",children:f.jsxs(Ke,{onClick:j,disabled:!z,children:[f.jsx(Rh,{className:"h-4 w-4"}),E.isPending?"Sending…":"Send event"]})})]})]}),f.jsxs("div",{className:"space-y-6",children:[f.jsxs(Cn,{children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Journey triggers"}),f.jsx(Lr,{children:"Events that enrol a registered journey. Click to fill the form."})]}),f.jsx(On,{children:_.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No journeys registered yet. Any event name still works — define a journey to see triggers here."}):f.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(A=>f.jsx(Ke,{variant:"outline",size:"sm",title:`Triggers: ${A.journeys.join(", ")}`,onClick:()=>i(A.event),children:A.event},A.event))})})]}),v?f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"flex items-center gap-2 text-base",children:[f.jsx(rb,{className:"h-4 w-4 text-green-500"}),"Result"]})}),f.jsxs(On,{className:"space-y-3",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx(ft,{variant:v.stored?"default":"secondary",children:v.stored?"Stored":"Not stored"}),f.jsxs("span",{className:"text-sm text-muted-foreground",children:[v.exits.length," journey exit(s)"]})]}),f.jsx("pre",{className:"max-h-48 overflow-auto rounded-md border bg-muted/30 p-3 text-xs",children:JSON.stringify(v,null,2)}),f.jsxs("p",{className:"text-sm text-muted-foreground",children:["See the effect in"," ",f.jsx(bi,{to:"/journeys",className:"underline underline-offset-4",children:"Journeys"})," ","or the"," ",f.jsx(bi,{to:"/contacts",className:"underline underline-offset-4",children:"contact's timeline"}),". Make sure the worker is running."]})]})]}):null]})]})]})}function Tw({step:n,base:s}){const i=s>0?n.value/s:0,r=i*100;return f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center justify-between text-sm",children:[f.jsx("span",{className:"font-medium",children:n.label}),f.jsxs("span",{className:"text-muted-foreground",children:[ut(n.value),s>0?f.jsxs("span",{className:"ml-1 text-xs",children:["(",Si(i),")"]}):null]})]}),f.jsx("div",{className:"h-2 overflow-hidden rounded-full bg-muted",children:f.jsx("div",{className:"h-full rounded-full bg-primary",style:{width:`${Math.min(r,100)}%`}})})]})}function Nw({journeyId:n}){const s=lt({queryKey:Pe.journeyFunnel(n),queryFn:()=>IE(n)});if(s.isPending)return f.jsx(Dt,{className:"h-48 w-full"});if(s.isError)return f.jsx(Ut,{error:s.error,onRetry:()=>s.refetch()});const i=s.data,r=[{label:"Enrolled",value:i.enrolled},{label:"Email sent",value:i.emailSent},{label:"Opened",value:i.emailOpened},{label:"Clicked",value:i.emailClicked},{label:"Completed",value:i.completed}];return f.jsxs("div",{className:"space-y-4",children:[f.jsx("div",{className:"space-y-3",children:r.map(c=>f.jsx(Tw,{step:c,base:i.enrolled},c.label))}),f.jsxs("div",{className:"flex gap-4 border-t pt-3 text-sm text-muted-foreground",children:[f.jsxs("span",{children:["Failed: ",ut(i.failed)]}),f.jsxs("span",{children:["Exited: ",ut(i.exited)]})]})]})}function Cw(){var _,E;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(null),[c,d]=Y.useState(null),h=lt({queryKey:Pe.journeyMetrics,queryFn:FE}),y=lt({queryKey:Pe.journeys,queryFn:mb}),p=Sa({mutationFn:j=>$E(j.id,j.enabled),onSuccess:(j,z)=>{n({title:z.enabled?"Journey enabled":"Journey disabled"}),d(null),s.invalidateQueries({queryKey:Pe.journeys}),s.invalidateQueries({queryKey:Pe.journeyMetrics})},onError:j=>{n({variant:"error",title:"Update failed",description:j instanceof Xt?j.message:"Unexpected error."}),d(null)}}),m=h.isPending||y.isPending,b=h.isError||y.isError,v=new Map((((_=y.data)==null?void 0:_.journeys)??[]).map(j=>[j.id,j.enabled])),S=(((E=h.data)==null?void 0:E.journeys)??[]).map(j=>({...j,enabled:v.get(j.journeyId)??!1})),R=S.find(j=>j.journeyId===i)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Journeys",description:"Lifecycle journeys, completion rates, and per-journey funnels."}),m?f.jsx(Ri,{}):b?f.jsx(Ut,{error:h.error??y.error,onRetry:()=>{h.refetch(),y.refetch()}}):S.length===0?f.jsx(ol,{title:"No journeys registered",description:"Journeys are defined in code with defineJourney(). Add one to your app, then fire its trigger event from Debug to see it here.",action:f.jsxs(f.Fragment,{children:[f.jsx(xi,{href:ll.journeys,children:"How to create a journey"}),f.jsx(xi,{href:ll.recipes,variant:"ghost",children:"Recipes"})]})}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Journey"}),f.jsx(Ce,{className:"text-right",children:"Enrolled"}),f.jsx(Ce,{className:"text-right",children:"Active"}),f.jsx(Ce,{className:"text-right",children:"Completed"}),f.jsx(Ce,{className:"text-right",children:"Completion"}),f.jsx(Ce,{className:"text-right",children:"Avg duration"}),f.jsx(Ce,{children:"State"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:S.map(j=>f.jsxs(on,{className:"cursor-pointer","data-state":j.journeyId===i?"selected":void 0,onClick:()=>r(z=>z===j.journeyId?null:j.journeyId),children:[f.jsxs(we,{children:[f.jsx("span",{className:"font-medium",children:j.name}),f.jsx("span",{className:"block text-xs text-muted-foreground",children:j.journeyId})]}),f.jsx(we,{className:"text-right",children:ut(j.enrolled)}),f.jsx(we,{className:"text-right",children:ut(j.active)}),f.jsx(we,{className:"text-right",children:ut(j.completed)}),f.jsx(we,{className:"text-right",children:Si(j.completionRate)}),f.jsx(we,{className:"text-right text-muted-foreground",children:_h(j.avgDurationSecs)}),f.jsx(we,{children:f.jsx(ft,{variant:j.enabled?"default":"secondary",children:j.enabled?"Enabled":"Disabled"})}),f.jsx(we,{className:"text-right",children:f.jsx(Ke,{variant:"outline",size:"sm",onClick:z=>{z.stopPropagation(),d(j)},children:j.enabled?"Disable":"Enable"})})]},j.journeyId))})]})}),R?f.jsxs(Cn,{children:[f.jsx(Mn,{children:f.jsxs(An,{className:"text-base",children:[R.name," — funnel"]})}),f.jsx(On,{children:f.jsx(Nw,{journeyId:R.journeyId})})]}):null,f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&p.mutate({id:c.journeyId,enabled:!c.enabled}),title:c!=null&&c.enabled?"Disable this journey?":"Enable this journey?",description:c!=null&&c.enabled?"New events will stop enrolling users into this journey.":"New matching events will start enrolling users into this journey.",confirmLabel:c!=null&&c.enabled?"Disable":"Enable",destructive:c==null?void 0:c.enabled,loading:p.isPending})]})}function Gs({label:n,value:s,hint:i,icon:r}){return f.jsxs(Cn,{children:[f.jsxs(Mn,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[f.jsx(An,{className:"text-sm font-medium text-muted-foreground",children:n}),r?f.jsx(r,{className:"h-4 w-4 text-muted-foreground"}):null]}),f.jsxs(On,{children:[f.jsx("div",{className:"text-2xl font-semibold tracking-tight",children:s}),i?f.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:i}):null]})]})}function Mw(n){return n.totalContacts===0&&n.activeJourneys===0&&n.emailsSent30d===0}function Aw(){return f.jsxs(Cn,{className:"border-primary/30 bg-primary/5",children:[f.jsxs(Mn,{children:[f.jsx(An,{className:"text-base",children:"Welcome to Hogsend Studio"}),f.jsx(Lr,{children:"Studio observes your code-first lifecycle engine. Here's the path to your first running journey."})]}),f.jsxs(On,{className:"space-y-4",children:[f.jsxs("ol",{className:"space-y-1.5 text-sm text-muted-foreground",children:[f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"1."})," Define a journey in code and start the worker."]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"2."})," Fire its trigger event to enrol a test user."]}),f.jsxs("li",{children:[f.jsx("span",{className:"font-medium text-foreground",children:"3."})," Watch enrolments, sends, and exits land here."]})]}),f.jsxs("div",{className:"flex flex-wrap gap-2",children:[f.jsxs(bi,{to:"/debug",className:Je(xh({size:"sm"})),children:[f.jsx(Rh,{className:"h-4 w-4"}),"Send a test event"]}),f.jsx(xi,{href:ll.quickstart,children:"Quickstart"}),f.jsx(xi,{href:ll.journeys,variant:"ghost",children:"Create a journey"})]})]})]})}function Ow(){const n=lt({queryKey:Pe.overview,queryFn:GE});return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Overview",description:"Key delivery and engagement metrics at a glance."}),n.isPending?f.jsx(qE,{count:6}):n.isError?f.jsx(Ut,{error:n.error,onRetry:()=>n.refetch()}):f.jsxs(f.Fragment,{children:[Mw(n.data)?f.jsx(Aw,{}):null,f.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:[f.jsx(Gs,{label:"Total contacts",value:ut(n.data.totalContacts),icon:db}),f.jsx(Gs,{label:"Active journeys",value:ut(n.data.activeJourneys),hint:"Instances active or waiting",icon:Sh}),f.jsx(Gs,{label:"Sent (24h)",value:ut(n.data.emailsSent24h),icon:Yr}),f.jsx(Gs,{label:"Sent (7d)",value:ut(n.data.emailsSent7d),icon:zv}),f.jsx(Gs,{label:"Sent (30d)",value:ut(n.data.emailsSent30d),icon:zv}),f.jsx(Gs,{label:"Bounce rate (30d)",value:Si(n.data.bounceRate30d),hint:"Bounced / sent in last 30 days",icon:cb})]}),f.jsx("div",{className:"grid gap-4 sm:grid-cols-2 lg:grid-cols-3",children:f.jsx(Gs,{label:"Unsubscribe rate",value:Si(n.data.unsubscribeRate),hint:"Unsubscribed / total preferences",icon:ME})})]})]})}const Qc=Y.forwardRef(({className:n,children:s,...i},r)=>f.jsxs("div",{className:"relative",children:[f.jsx("select",{ref:r,className:Je("flex h-9 w-full appearance-none rounded-md border border-input bg-transparent px-3 py-1 pr-8 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",n),...i,children:s}),f.jsx(Z_,{className:"pointer-events-none absolute right-2 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"})]}));Qc.displayName="Select";const zw={queued:fb,sent:Yr,delivered:P_,opened:nE,clicked:vE,bounced:cb,complained:ib,failed:ob};function Dw({event:n}){const s=zw[n.type]??fb;return f.jsxs("li",{className:"flex gap-3",children:[f.jsxs("div",{className:"flex flex-col items-center",children:[f.jsx("span",{className:"flex h-7 w-7 items-center justify-center rounded-full border bg-card",children:f.jsx(s,{className:"h-3.5 w-3.5 text-muted-foreground"})}),f.jsx("span",{className:"w-px flex-1 bg-border"})]}),f.jsxs("div",{className:"pb-4",children:[f.jsx("p",{className:"text-sm font-medium capitalize",children:n.type}),f.jsx("p",{className:"text-xs text-muted-foreground",children:Yn(n.timestamp)}),n.url?f.jsx("p",{className:"mt-0.5 break-all text-xs text-muted-foreground",children:n.url}):null]})]})}function $a({label:n,value:s}){return f.jsxs("div",{className:"space-y-0.5",children:[f.jsx("dt",{className:"text-xs text-muted-foreground",children:n}),f.jsx("dd",{className:"break-all text-sm",children:s})]})}function Uw({emailId:n,onClose:s}){const i=n!==null,{toast:r}=vs(),c=ps(),[d,h]=Y.useState(!1),y=lt({queryKey:n?Pe.email(n):["email","none"],queryFn:()=>YE(n),enabled:i}),p=Sa({mutationFn:()=>KE(n),onSuccess:()=>{r({title:"Resend queued",description:"A fresh send was queued from this template."}),h(!1),c.invalidateQueries({queryKey:["emails"]}),n&&c.invalidateQueries({queryKey:Pe.email(n)})},onError:v=>{r({variant:"error",title:"Resend failed",description:v instanceof Xt?v.message:"Unexpected error."}),h(!1)}}),m=y.data,b=m&&["failed","bounced"].includes(m.email.status);return f.jsxs(f.Fragment,{children:[f.jsx(pb,{open:i,onClose:s,title:"Email send",description:m==null?void 0:m.email.subject,children:y.isPending?f.jsxs("div",{className:"space-y-4",children:[f.jsx(Dt,{className:"h-24 w-full"}),f.jsx(Dt,{className:"h-40 w-full"})]}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):m?f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-center justify-between gap-2",children:[f.jsx(Kc,{status:m.email.status}),b?f.jsxs(Ke,{size:"sm",variant:"outline",onClick:()=>h(!0),children:[f.jsx(Yr,{className:"h-4 w-4"}),"Resend"]}):null]}),f.jsxs("dl",{className:"grid grid-cols-2 gap-4",children:[f.jsx($a,{label:"To",value:m.email.toEmail}),f.jsx($a,{label:"From",value:m.email.fromEmail}),f.jsx($a,{label:"Template",value:m.email.templateKey??"—"}),f.jsx($a,{label:"Category",value:m.email.category??"—"}),f.jsx($a,{label:"Journey",value:m.email.journeyId??"—"}),f.jsx($a,{label:"User",value:m.email.userId??"—"}),f.jsx($a,{label:"Resend ID",value:m.email.resendId??"—"}),f.jsx($a,{label:"Created",value:Yn(m.email.createdAt)})]}),f.jsxs("section",{children:[f.jsx("h3",{className:"mb-3 text-sm font-semibold",children:"Timeline"}),m.events.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No delivery events recorded yet."}):f.jsx("ul",{className:"[&>li:last-child>div:first-child>span:last-child]:hidden",children:m.events.map((v,S)=>f.jsx(Dw,{event:v},`${v.type}-${v.timestamp}-${S}`))})]}),f.jsxs("section",{children:[f.jsxs("h3",{className:"mb-3 text-sm font-semibold",children:["Tracked links (",m.trackedLinks.length,")"]}),m.trackedLinks.length===0?f.jsx("p",{className:"text-sm text-muted-foreground",children:"No tracked links in this email."}):f.jsx("ul",{className:"space-y-2",children:m.trackedLinks.map(v=>f.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border p-3",children:[f.jsx("span",{className:"break-all text-sm",children:v.originalUrl}),f.jsxs("span",{className:"shrink-0 text-xs text-muted-foreground",children:[v.clickCount," click",v.clickCount===1?"":"s"]})]},v.id))})]})]}):null}),f.jsx(_i,{open:d,onClose:()=>h(!1),onConfirm:()=>p.mutate(),title:"Resend this email?",description:"A new send will be queued from the original template and recipient.",confirmLabel:"Resend",loading:p.isPending})]})}const kw=["queued","rendered","sent","delivered","opened","clicked","bounced","complained","failed"],Lw=["opened","clicked","bounced","complained"],Tr=25,Uv={templateKey:"",status:"",engagement:"",journeyId:"",userId:"",from:"",to:""};function Bw(){var N,Q;const[n,s]=Y.useState(Uv),[i,r]=Y.useState("createdAt"),[c,d]=Y.useState("desc"),[h,y]=Y.useState(0),[p,m]=Y.useState(null),b=n.from?new Date(`${n.from}T00:00:00`).toISOString():void 0,v=n.to?new Date(`${n.to}T23:59:59`).toISOString():void 0,S={limit:Tr,offset:h,templateKey:n.templateKey||void 0,status:n.status||void 0,engagement:n.engagement||void 0,journeyId:n.journeyId||void 0,userId:n.userId||void 0,from:b,to:v,sort:i,order:c},R=lt({queryKey:Pe.emails(S),queryFn:()=>VE(S),placeholderData:ch});function _(k){s(D=>({...D,...k})),y(0)}function E(k){i===k?d(D=>D==="asc"?"desc":"asc"):(r(k),d("desc")),y(0)}const j=Object.values(n).some(Boolean),z=((N=R.data)==null?void 0:N.total)??0,A=((Q=R.data)==null?void 0:Q.emails)??[];function B({column:k,label:D}){const O=i===k;return f.jsx(Ce,{children:f.jsxs("button",{type:"button",className:"inline-flex items-center gap-1 font-medium hover:text-foreground",onClick:()=>E(k),children:[D,O?c==="asc"?f.jsx(q_,{className:"h-3 w-3"}):f.jsx(k_,{className:"h-3 w-3"}):null]})})}return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Sends",description:"Every email sent — filter, sort, and drill into the timeline."}),f.jsxs("div",{className:"grid gap-3 rounded-lg border p-4 md:grid-cols-3 lg:grid-cols-4",children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-template",children:"Template"}),f.jsx(zt,{id:"f-template",placeholder:"template key",value:n.templateKey,onChange:k=>_({templateKey:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-status",children:"Status"}),f.jsxs(Qc,{id:"f-status",value:n.status,onChange:k=>_({status:k.target.value}),children:[f.jsx("option",{value:"",children:"All"}),kw.map(k=>f.jsx("option",{value:k,children:k},k))]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-engagement",children:"Engagement"}),f.jsxs(Qc,{id:"f-engagement",value:n.engagement,onChange:k=>_({engagement:k.target.value}),children:[f.jsx("option",{value:"",children:"Any"}),Lw.map(k=>f.jsx("option",{value:k,children:k},k))]})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-journey",children:"Journey ID"}),f.jsx(zt,{id:"f-journey",placeholder:"journey id",value:n.journeyId,onChange:k=>_({journeyId:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-user",children:"User ID"}),f.jsx(zt,{id:"f-user",placeholder:"user id",value:n.userId,onChange:k=>_({userId:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-from",children:"From"}),f.jsx(zt,{id:"f-from",type:"date",value:n.from,onChange:k=>_({from:k.target.value})})]}),f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"f-to",children:"To"}),f.jsx(zt,{id:"f-to",type:"date",value:n.to,onChange:k=>_({to:k.target.value})})]}),j?f.jsx("div",{className:"flex items-end",children:f.jsx(Ke,{variant:"ghost",size:"sm",onClick:()=>{s(Uv),y(0)},children:"Clear filters"})}):null]}),R.isPending?f.jsx(Ri,{}):R.isError?f.jsx(Ut,{error:R.error,onRetry:()=>R.refetch()}):A.length===0?f.jsx(ol,{title:"No sends found",description:j?"Try widening or clearing your filters.":"Emails will appear here once your journeys start sending."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Recipient"}),f.jsx(Ce,{children:"Subject"}),f.jsx(Ce,{children:"Template"}),f.jsx(Ce,{children:"Status"}),f.jsx(B,{column:"sentAt",label:"Sent"}),f.jsx(B,{column:"createdAt",label:"Created"})]})}),f.jsx(fl,{children:A.map(k=>f.jsxs(on,{className:"cursor-pointer",onClick:()=>m(k.id),children:[f.jsx(we,{className:"font-medium",children:k.toEmail}),f.jsx(we,{children:yw(k.subject,40)}),f.jsx(we,{className:"text-muted-foreground",children:k.templateKey??"—"}),f.jsx(we,{children:f.jsx(Kc,{status:k.status})}),f.jsx(we,{className:"text-muted-foreground",children:Yn(k.sentAt)}),f.jsx(we,{className:"text-muted-foreground",children:Yn(k.createdAt)})]},k.id))})]})}),z>0?f.jsxs("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[f.jsxs("span",{children:[h+1,"–",Math.min(h+Tr,z)," of ",z]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx(Ke,{variant:"outline",size:"sm",disabled:h===0,onClick:()=>y(k=>Math.max(0,k-Tr)),children:"Previous"}),f.jsx(Ke,{variant:"outline",size:"sm",disabled:h+Tr>=z,onClick:()=>y(k=>k+Tr),children:"Next"})]})]}):null,f.jsx(Uw,{emailId:p,onClose:()=>m(null)})]})}const qw=["read","journey-admin","full-admin"];function Hw(){var A;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(!1),[c,d]=Y.useState(""),[h,y]=Y.useState(["read"]),[p,m]=Y.useState(null),[b,v]=Y.useState(null),S=lt({queryKey:Pe.apiKeys,queryFn:cw}),R=Sa({mutationFn:()=>uw({name:c.trim(),scopes:h}),onSuccess:B=>{r(!1),d(""),y(["read"]),m(B),s.invalidateQueries({queryKey:Pe.apiKeys})},onError:B=>{n({variant:"error",title:"Could not create key",description:B instanceof Xt?B.message:"Unexpected error."})}}),_=Sa({mutationFn:B=>fw(B),onSuccess:()=>{n({title:"API key revoked"}),v(null),s.invalidateQueries({queryKey:Pe.apiKeys})},onError:B=>{n({variant:"error",title:"Revoke failed",description:B instanceof Xt?B.message:"Unexpected error."}),v(null)}});function E(B){y(N=>N.includes(B)?N.filter(Q=>Q!==B):[...N,B])}async function j(B){try{await navigator.clipboard.writeText(B),n({title:"Copied to clipboard"})}catch{n({variant:"error",title:"Copy failed"})}}const z=((A=S.data)==null?void 0:A.keys)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Settings",description:"API keys for programmatic access to the Hogsend admin API.",action:f.jsxs(Ke,{onClick:()=>r(!0),children:[f.jsx(xE,{className:"h-4 w-4"}),"New API key"]})}),S.isPending?f.jsx(Ri,{}):S.isError?f.jsx(Ut,{error:S.error,onRetry:()=>S.refetch()}):z.length===0?f.jsx(ol,{icon:cE,title:"No API keys",description:"Create a key to authenticate API and webhook requests."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Name"}),f.jsx(Ce,{children:"Prefix"}),f.jsx(Ce,{children:"Scopes"}),f.jsx(Ce,{children:"Last used"}),f.jsx(Ce,{children:"Status"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:z.map(B=>{const N=B.revokedAt!==null;return f.jsxs(on,{children:[f.jsx(we,{className:"font-medium",children:B.name}),f.jsxs(we,{className:"font-mono text-xs text-muted-foreground",children:[B.keyPrefix,"…"]}),f.jsx(we,{children:f.jsx("div",{className:"flex flex-wrap gap-1",children:B.scopes.map(Q=>f.jsx(ft,{variant:"secondary",children:Q},Q))})}),f.jsx(we,{className:"text-muted-foreground",children:Yn(B.lastUsedAt)}),f.jsx(we,{children:N?f.jsx(ft,{variant:"outline",children:"Revoked"}):f.jsx(ft,{variant:"outline",className:"border-emerald-500/40 text-emerald-600 dark:text-emerald-400",children:"Active"})}),f.jsx(we,{className:"text-right",children:N?null:f.jsx(Ke,{variant:"outline",size:"sm",onClick:()=>v(B),children:"Revoke"})})]},B.id)})})]})}),f.jsxs(Hc,{open:i,onClose:()=>r(!1),title:"Create API key",description:"Choose a descriptive name and the scopes this key needs.",footer:f.jsxs(f.Fragment,{children:[f.jsx(Ke,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),f.jsx(Ke,{onClick:()=>R.mutate(),disabled:!c.trim()||h.length===0||R.isPending,children:R.isPending?"Creating…":"Create key"})]}),children:[f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"key-name",children:"Name"}),f.jsx(zt,{id:"key-name",placeholder:"CI ingest key",value:c,onChange:B=>d(B.target.value)})]}),f.jsxs("div",{className:"space-y-2",children:[f.jsx(Tt,{children:"Scopes"}),f.jsx("div",{className:"flex flex-col gap-2",children:qw.map(B=>f.jsxs("label",{className:"flex items-center gap-2 text-sm",htmlFor:`scope-${B}`,children:[f.jsx("input",{id:`scope-${B}`,type:"checkbox",className:"h-4 w-4 rounded border-input",checked:h.includes(B),onChange:()=>E(B)}),B]},B))})]})]}),f.jsx(Hc,{open:p!==null,onClose:()=>m(null),title:"API key created",description:"Copy this key now — it will not be shown again.",footer:f.jsx(Ke,{onClick:()=>m(null),children:"Done"}),children:p?f.jsxs("div",{className:"space-y-2",children:[f.jsx(Tt,{children:"Secret key"}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("code",{className:"flex-1 break-all rounded-md border bg-muted px-3 py-2 font-mono text-xs",children:p.key}),f.jsx(Ke,{variant:"outline",size:"icon",onClick:()=>j(p.key),"aria-label":"Copy key",children:f.jsx(eE,{className:"h-4 w-4"})})]})]}):null}),f.jsx(_i,{open:b!==null,onClose:()=>v(null),onConfirm:()=>b&&_.mutate(b.id),title:"Revoke this API key?",description:b?`"${b.name}" will stop working immediately. This cannot be undone.`:void 0,confirmLabel:"Revoke",destructive:!0,loading:_.isPending})]})}const Qw=[{value:"",label:"All"},{value:"bounced",label:"Bounced"},{value:"unsubscribed",label:"Unsubscribed"},{value:"complained",label:"Complained"}];function Gw({row:n}){return f.jsxs("div",{className:"flex flex-wrap gap-1",children:[n.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Unsubscribed"}):null,n.bounceCount>0?f.jsxs(ft,{variant:"secondary",children:[ut(n.bounceCount)," bounce"]}):null,n.suppressed&&n.bounceCount===0&&!n.unsubscribedAll?f.jsx(ft,{variant:"destructive",children:"Complained"}):null,n.suppressed&&!n.unsubscribedAll&&n.bounceCount>0?f.jsx(ft,{variant:"destructive",children:"Suppressed"}):null]})}function Vw(){var m;const{toast:n}=vs(),s=ps(),[i,r]=Y.useState(""),[c,d]=Y.useState(null),h=lt({queryKey:Pe.suppressions(i),queryFn:()=>ow(i||void 0),placeholderData:ch}),y=Sa({mutationFn:b=>yb(b.userId,{suppressed:!1,unsubscribedAll:!1}),onSuccess:()=>{n({title:"Recipient restored",description:"They can receive emails again."}),d(null),s.invalidateQueries({queryKey:["suppressions"]})},onError:b=>{n({variant:"error",title:"Un-suppress failed",description:b instanceof Xt?b.message:"Unexpected error."}),d(null)}}),p=((m=h.data)==null?void 0:m.suppressions)??[];return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Suppressions",description:"Bounced, unsubscribed, and complained recipients."}),f.jsxs("div",{className:"flex max-w-xs flex-col gap-1.5",children:[f.jsx(Tt,{htmlFor:"supp-type",children:"Type"}),f.jsx(Qc,{id:"supp-type",value:i,onChange:b=>r(b.target.value),children:Qw.map(b=>f.jsx("option",{value:b.value,children:b.label},b.value))})]}),h.isPending?f.jsx(Ri,{}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):p.length===0?f.jsx(ol,{title:"No suppressions",description:"Recipients who bounce, unsubscribe, or complain appear here."}):f.jsx("div",{className:"rounded-lg border",children:f.jsxs(cl,{children:[f.jsx(ul,{children:f.jsxs(on,{children:[f.jsx(Ce,{children:"Email"}),f.jsx(Ce,{children:"User ID"}),f.jsx(Ce,{children:"Reason"}),f.jsx(Ce,{className:"text-right",children:"Suppressed"}),f.jsx(Ce,{className:"text-right",children:"Action"})]})}),f.jsx(fl,{children:p.map(b=>f.jsxs(on,{children:[f.jsx(we,{className:"font-medium",children:b.email}),f.jsx(we,{className:"text-muted-foreground",children:b.userId}),f.jsx(we,{children:f.jsx(Gw,{row:b})}),f.jsx(we,{className:"text-right text-muted-foreground",children:Yn(b.suppressedAt)}),f.jsx(we,{className:"text-right",children:f.jsx(Ke,{variant:"outline",size:"sm",onClick:()=>d(b),children:"Un-suppress"})})]},b.id))})]})}),f.jsx(_i,{open:c!==null,onClose:()=>d(null),onConfirm:()=>c&&y.mutate(c),title:"Un-suppress this recipient?",description:c?`${c.email} will be eligible to receive emails again.`:void 0,confirmLabel:"Un-suppress",loading:y.isPending})]})}function Sc({label:n,value:s}){return f.jsxs("div",{className:"rounded-md border p-3",children:[f.jsx("p",{className:"text-xs text-muted-foreground",children:n}),f.jsx("p",{className:"text-lg font-semibold",children:s})]})}function Yw({template:n}){const{toast:s}=vs(),[i,r]=Y.useState(!1),[c,d]=Y.useState(""),h=lt({queryKey:Pe.templatePreview(n.key),queryFn:()=>XE(n.key)}),y=lt({queryKey:Pe.templateReport(n.key),queryFn:()=>JE(n.key),retry:(b,v)=>!(v instanceof Xt&&v.status===404)&&b<2}),p=Sa({mutationFn:()=>ZE(n.key,c),onSuccess:b=>{s({title:"Test email sent",description:`Status: ${b.status}.`}),r(!1),d("")},onError:b=>{s({variant:"error",title:"Send-test failed",description:b instanceof Xt?b.message:"Unexpected error."})}}),m=y.isError&&y.error instanceof Xt&&y.error.status===404;return f.jsxs("div",{className:"space-y-6",children:[f.jsxs("div",{className:"flex items-start justify-between gap-4",children:[f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("h2",{className:"text-xl font-semibold tracking-tight",children:n.key}),n.category?f.jsx(ft,{variant:"secondary",children:n.category}):null]}),f.jsx("p",{className:"text-sm text-muted-foreground",children:n.defaultSubject})]}),f.jsxs(Ke,{onClick:()=>r(!0),children:[f.jsx(Yr,{className:"h-4 w-4"}),"Send test"]})]}),f.jsxs("section",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Performance"}),y.isPending?f.jsx(Dt,{className:"h-28 w-full"}):m?f.jsx("p",{className:"rounded-md border border-dashed p-6 text-center text-sm text-muted-foreground",children:"This template has never been sent."}):y.isError?f.jsx(Ut,{error:y.error,onRetry:()=>y.refetch()}):y.data?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[f.jsx(Sc,{label:"Sent",value:ut(y.data.totals.sent)}),f.jsx(Sc,{label:"Delivered",value:ut(y.data.totals.delivered)}),f.jsx(Sc,{label:"Open rate",value:Si(y.data.totals.openRate)}),f.jsx(Sc,{label:"Click rate",value:Si(y.data.totals.clickRate)})]}),f.jsxs(Cn,{children:[f.jsx(Mn,{className:"pb-2",children:f.jsx(An,{className:"text-sm font-medium text-muted-foreground",children:"Sends over time"})}),f.jsx(On,{children:f.jsx(lh,{label:"sent",data:y.data.series.map(b=>({date:b.date,value:b.sent}))})})]})]}):null]}),f.jsxs("section",{className:"space-y-3",children:[f.jsx("h3",{className:"text-sm font-semibold",children:"Preview"}),h.isPending?f.jsx(Dt,{className:"h-96 w-full"}):h.isError?f.jsx(Ut,{error:h.error,onRetry:()=>h.refetch()}):h.data?f.jsx("div",{className:"overflow-hidden rounded-lg border bg-white",children:f.jsx("iframe",{title:`${n.key} preview`,srcDoc:h.data.html,sandbox:"",className:"h-[600px] w-full"})}):null]}),f.jsx(Hc,{open:i,onClose:()=>r(!1),title:"Send a test email",description:`Sends "${n.key}" with example props.`,footer:f.jsxs(f.Fragment,{children:[f.jsx(Ke,{variant:"outline",onClick:()=>r(!1),children:"Cancel"}),f.jsx(Ke,{onClick:()=>p.mutate(),disabled:!c||p.isPending,children:p.isPending?"Sending…":"Send test"})]}),children:f.jsxs("div",{className:"space-y-1.5",children:[f.jsx(Tt,{htmlFor:"test-to",children:"Recipient email"}),f.jsx(zt,{id:"test-to",type:"email",placeholder:"you@example.com",value:c,onChange:b=>d(b.target.value)})]})})]})}function Kw(){var d;const n=lt({queryKey:Pe.templates,queryFn:PE}),[s,i]=Y.useState(null),r=((d=n.data)==null?void 0:d.templates)??[];Y.useEffect(()=>{const h=r[0];s===null&&h&&i(h.key)},[s,r]);const c=r.find(h=>h.key===s)??null;return f.jsxs("div",{className:"space-y-6",children:[f.jsx(Ra,{title:"Templates",description:"Catalog, per-template stats, live previews, and send-test."}),n.isPending?f.jsx(Dt,{className:"h-96 w-full"}):n.isError?f.jsx(Ut,{error:n.error,onRetry:()=>n.refetch()}):r.length===0?f.jsx(ol,{title:"No templates registered",description:"Templates appear here once they're added to your email registry."}):f.jsxs("div",{className:"grid gap-6 lg:grid-cols-[260px_1fr]",children:[f.jsx("nav",{className:"space-y-1",children:r.map(h=>f.jsxs("button",{type:"button",onClick:()=>i(h.key),className:Je("w-full rounded-md px-3 py-2 text-left text-sm transition-colors",h.key===s?"bg-accent text-accent-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[f.jsx("span",{className:"block font-medium",children:h.key}),h.category?f.jsx("span",{className:"block text-xs opacity-70",children:h.category}):null]},h.key))}),c?f.jsx(Yw,{template:c},c.key):null]})]})}const Kn=s2({component:BE}),Pw=ja({getParentRoute:()=>Kn,path:"/",component:Ow}),Xw=ja({getParentRoute:()=>Kn,path:"/sends",component:Bw}),Zw=ja({getParentRoute:()=>Kn,path:"/templates",component:Kw}),Jw=ja({getParentRoute:()=>Kn,path:"/journeys",component:Cw}),Fw=ja({getParentRoute:()=>Kn,path:"/buckets",component:gw}),Iw=ja({getParentRoute:()=>Kn,path:"/contacts",component:_w}),$w=ja({getParentRoute:()=>Kn,path:"/suppressions",component:Vw}),Ww=ja({getParentRoute:()=>Kn,path:"/settings",component:Hw}),eT=ja({getParentRoute:()=>Kn,path:"/debug",component:ww}),tT=Kn.addChildren([Pw,Xw,Zw,Jw,Fw,Iw,$w,eT,Ww]),nT=y2({routeTree:tT,basepath:"/studio",defaultPreload:"intent"}),gb=document.getElementById("root");if(!gb)throw new Error("Root element #root not found");_2.createRoot(gb).render(f.jsx(Y.StrictMode,{children:f.jsx(yS,{client:UE,children:f.jsx(DE,{children:f.jsx(A_,{children:f.jsx(v2,{router:nT})})})})}));