@atproto/oauth-provider-ui 0.7.2 → 0.7.4

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.
Files changed (36) hide show
  1. package/dist/account-page-BWtTrJit.js +24 -0
  2. package/dist/account-page-BWtTrJit.js.map +1 -0
  3. package/dist/admonition-PcOMNxHc.js +59 -0
  4. package/dist/admonition-PcOMNxHc.js.map +1 -0
  5. package/dist/authorization-page-BrCP1UEq.js +2 -0
  6. package/dist/authorization-page-BrCP1UEq.js.map +1 -0
  7. package/dist/bundle-manifest.json +39 -39
  8. package/dist/button-cooldown-Cek48u1l.js +64 -0
  9. package/dist/button-cooldown-Cek48u1l.js.map +1 -0
  10. package/dist/{cookie-error-page-DNM0z2Cb.js → cookie-error-page-QWOGgXmH.js} +2 -2
  11. package/dist/{cookie-error-page-DNM0z2Cb.js.map → cookie-error-page-QWOGgXmH.js.map} +1 -1
  12. package/dist/error-page-BEjdpIQ7.js +2 -0
  13. package/dist/error-page-BEjdpIQ7.js.map +1 -0
  14. package/dist/error-view-BzJJuW_V.js +2 -0
  15. package/dist/error-view-BzJJuW_V.js.map +1 -0
  16. package/dist/messages--aCokQ6a.js +2 -0
  17. package/dist/messages--aCokQ6a.js.map +1 -0
  18. package/dist/messages-BaWkJYfB.js +2 -0
  19. package/dist/messages-BaWkJYfB.js.map +1 -0
  20. package/package.json +7 -8
  21. package/dist/account-page-DEDJt1AQ.js +0 -24
  22. package/dist/account-page-DEDJt1AQ.js.map +0 -1
  23. package/dist/admonition-D93KEqWM.js +0 -59
  24. package/dist/admonition-D93KEqWM.js.map +0 -1
  25. package/dist/authorization-page-BCJINyL_.js +0 -2
  26. package/dist/authorization-page-BCJINyL_.js.map +0 -1
  27. package/dist/error-page-Wul5BkHY.js +0 -2
  28. package/dist/error-page-Wul5BkHY.js.map +0 -1
  29. package/dist/error-view-DTevFrK5.js +0 -2
  30. package/dist/error-view-DTevFrK5.js.map +0 -1
  31. package/dist/index-DrKxiTaW.js +0 -64
  32. package/dist/index-DrKxiTaW.js.map +0 -1
  33. package/dist/messages-B-lnG-tF.js +0 -2
  34. package/dist/messages-B-lnG-tF.js.map +0 -1
  35. package/dist/messages-DwlQkdxq.js +0 -2
  36. package/dist/messages-DwlQkdxq.js.map +0 -1
@@ -1,24 +0,0 @@
1
- var Dl=Object.defineProperty;var Ro=e=>{throw TypeError(e)};var Vl=(e,t,s)=>t in e?Dl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var _e=(e,t,s)=>Vl(e,typeof t!="symbol"?t+"":t,s),Pr=(e,t,s)=>t.has(e)||Ro("Cannot "+s);var y=(e,t,s)=>(Pr(e,t,"read from private field"),s?s.call(e):t.get(e)),U=(e,t,s)=>t.has(e)?Ro("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),D=(e,t,s,n)=>(Pr(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),K=(e,t,s)=>(Pr(e,t,"access private method"),s);var Ln=(e,t,s,n)=>({set _(r){D(e,t,r,s)},get _(){return y(e,t,n)}});import{r as p,j as a,a as Na,p as _t,c as We,u as he,B as Oe,T as V,L as Zl,b as Li,d as Vt,A as dr,e as Ia,f as Ul,C as $l,g as ql}from"./admonition-D93KEqWM.js";import{r as Fa,P as Pn,u as ri,c as Ha,a as hr,b as Bl,d as zl,e as Wl,f as Ta,g as Kl,h as Ql,R as Gl,i as Jl,j as Yl,F as Xl,D as eu,A as Da,k as tu,l as Va,m as su,n as Ni,o as Za,p as Qt,q as Ge,z as f,Z as ve,s as nu,t as St,v as ru,T as iu,w as ou,O as au,C as cu,x as lu,y as uu,B as du,E as ii,G as hu,S as Bs,H as ps,I as Ua,J as Ii,K as fu,L as pu,M as $a,N as mu,Q as Fi,U as gu,V as vu,W as yu,X as bu,Y as wu,_ as xu,$ as _u,a0 as Su,a1 as Ru,a2 as Au,a3 as ju,a4 as Cu,a5 as Pu,a6 as Eu}from"./index-DrKxiTaW.js";import{c as Ss,E as qa,a as ku,e as Mu}from"./error-view-DTevFrK5.js";var Ys=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ms=typeof window>"u"||"Deno"in globalThis;function Te(){}function Ou(e,t){return typeof e=="function"?e(t):e}function oi(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ba(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rs(e,t){return typeof e=="function"?e(t):e}function Be(e,t){return typeof e=="function"?e(t):e}function Ao(e,t){const{type:s="all",exact:n,fetchStatus:r,predicate:o,queryKey:i,stale:c}=e;if(i){if(n){if(t.queryHash!==Hi(i,t.options))return!1}else if(!yn(t.queryKey,i))return!1}if(s!=="all"){const l=t.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||r&&r!==t.state.fetchStatus||o&&!o(t))}function jo(e,t){const{exact:s,status:n,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(s){if(gs(t.options.mutationKey)!==gs(o))return!1}else if(!yn(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||r&&!r(t))}function Hi(e,t){return((t==null?void 0:t.queryKeyHashFn)||gs)(e)}function gs(e){return JSON.stringify(e,(t,s)=>ai(s)?Object.keys(s).sort().reduce((n,r)=>(n[r]=s[r],n),{}):s)}function yn(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>yn(e[s],t[s])):!1}function za(e,t){if(e===t)return e;const s=Co(e)&&Co(t);if(s||ai(e)&&ai(t)){const n=s?e:Object.keys(e),r=n.length,o=s?t:Object.keys(t),i=o.length,c=s?[]:{};let l=0;for(let u=0;u<i;u++){const h=s?u:o[u];(!s&&n.includes(h)||s)&&e[h]===void 0&&t[h]===void 0?(c[h]=void 0,l++):(c[h]=za(e[h],t[h]),c[h]===e[h]&&e[h]!==void 0&&l++)}return r===i&&l===r?e:c}return t}function Kn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Co(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ai(e){if(!Po(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Po(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Po(e){return Object.prototype.toString.call(e)==="[object Object]"}function Lu(e){return new Promise(t=>{setTimeout(t,e)})}function ci(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?za(e,t):t}function Nu(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function Iu(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var Ti=Symbol();function Wa(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ti?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var os,Mt,Os,_a,Fu=(_a=class extends Ys{constructor(){super();U(this,os);U(this,Mt);U(this,Os);D(this,Os,t=>{if(!ms&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){y(this,Mt)||this.setEventListener(y(this,Os))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Mt))==null||t.call(this),D(this,Mt,void 0))}setEventListener(t){var s;D(this,Os,t),(s=y(this,Mt))==null||s.call(this),D(this,Mt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){y(this,os)!==t&&(D(this,os,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof y(this,os)=="boolean"?y(this,os):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},os=new WeakMap,Mt=new WeakMap,Os=new WeakMap,_a),Di=new Fu,Ls,Ot,Ns,Sa,Hu=(Sa=class extends Ys{constructor(){super();U(this,Ls,!0);U(this,Ot);U(this,Ns);D(this,Ns,t=>{if(!ms&&window.addEventListener){const s=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",n)}}})}onSubscribe(){y(this,Ot)||this.setEventListener(y(this,Ns))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Ot))==null||t.call(this),D(this,Ot,void 0))}setEventListener(t){var s;D(this,Ns,t),(s=y(this,Ot))==null||s.call(this),D(this,Ot,t(this.setOnline.bind(this)))}setOnline(t){y(this,Ls)!==t&&(D(this,Ls,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return y(this,Ls)}},Ls=new WeakMap,Ot=new WeakMap,Ns=new WeakMap,Sa),Qn=new Hu;function li(){let e,t;const s=new Promise((r,o)=>{e=r,t=o});s.status="pending",s.catch(()=>{});function n(r){Object.assign(s,r),delete s.resolve,delete s.reject}return s.resolve=r=>{n({status:"fulfilled",value:r}),e(r)},s.reject=r=>{n({status:"rejected",reason:r}),t(r)},s}function Tu(e){return Math.min(1e3*2**e,3e4)}function Ka(e){return(e??"online")==="online"?Qn.isOnline():!0}var Qa=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Er(e){return e instanceof Qa}function Ga(e){let t=!1,s=0,n=!1,r;const o=li(),i=v=>{var x;n||(m(new Qa(v)),(x=e.abort)==null||x.call(e))},c=()=>{t=!0},l=()=>{t=!1},u=()=>Di.isFocused()&&(e.networkMode==="always"||Qn.isOnline())&&e.canRun(),h=()=>Ka(e.networkMode)&&e.canRun(),d=v=>{var x;n||(n=!0,(x=e.onSuccess)==null||x.call(e,v),r==null||r(),o.resolve(v))},m=v=>{var x;n||(n=!0,(x=e.onError)==null||x.call(e,v),r==null||r(),o.reject(v))},g=()=>new Promise(v=>{var x;r=w=>{(n||u())&&v(w)},(x=e.onPause)==null||x.call(e)}).then(()=>{var v;r=void 0,n||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(n)return;let v;const x=s===0?e.initialPromise:void 0;try{v=x??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(d).catch(w=>{var P;if(n)return;const j=e.retry??(ms?0:3),A=e.retryDelay??Tu,L=typeof A=="function"?A(s,w):A,N=j===!0||typeof j=="number"&&s<j||typeof j=="function"&&j(s,w);if(t||!N){m(w);return}s++,(P=e.onFail)==null||P.call(e,s,w),Lu(L).then(()=>u()?void 0:g()).then(()=>{t?m(w):b()})})};return{promise:o,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:l,canStart:h,start:()=>(h()?b():g().then(b),o)}}var Du=e=>setTimeout(e,0);function Vu(){let e=[],t=0,s=c=>{c()},n=c=>{c()},r=Du;const o=c=>{t?e.push(c):r(()=>{s(c)})},i=()=>{const c=e;e=[],c.length&&r(()=>{n(()=>{c.forEach(l=>{s(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||i()}return l},batchCalls:c=>(...l)=>{o(()=>{c(...l)})},schedule:o,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{r=c}}}var ge=Vu(),as,Ra,Ja=(Ra=class{constructor(){U(this,as)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),oi(this.gcTime)&&D(this,as,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ms?1/0:5*60*1e3))}clearGcTimeout(){y(this,as)&&(clearTimeout(y(this,as)),D(this,as,void 0))}},as=new WeakMap,Ra),Is,Fs,He,cs,xe,Rn,ls,Ue,lt,Aa,Zu=(Aa=class extends Ja{constructor(t){super();U(this,Ue);U(this,Is);U(this,Fs);U(this,He);U(this,cs);U(this,xe);U(this,Rn);U(this,ls);D(this,ls,!1),D(this,Rn,t.defaultOptions),this.setOptions(t.options),this.observers=[],D(this,cs,t.client),D(this,He,y(this,cs).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,D(this,Is,Uu(this.options)),this.state=t.state??y(this,Is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,xe))==null?void 0:t.promise}setOptions(t){this.options={...y(this,Rn),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,He).remove(this)}setData(t,s){const n=ci(this.state.data,t,this.options);return K(this,Ue,lt).call(this,{data:n,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),n}setState(t,s){K(this,Ue,lt).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var n,r;const s=(n=y(this,xe))==null?void 0:n.promise;return(r=y(this,xe))==null||r.cancel(t),s?s.then(Te).catch(Te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Is))}isActive(){return this.observers.some(t=>Be(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ti||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Ba(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=y(this,xe))==null||s.continue()}onOnline(){var s;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=y(this,xe))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,He).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(y(this,xe)&&(y(this,ls)?y(this,xe).cancel({revert:!0}):y(this,xe).cancelRetry()),this.scheduleGc()),y(this,He).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||K(this,Ue,lt).call(this,{type:"invalidate"})}fetch(t,s){var l,u,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(y(this,xe))return y(this,xe).continueRetry(),y(this,xe).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(m=>m.options.queryFn);d&&this.setOptions(d.options)}const n=new AbortController,r=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(D(this,ls,!0),n.signal)})},o=()=>{const d=Wa(this.options,s),m={client:y(this,cs),queryKey:this.queryKey,meta:this.meta};return r(m),D(this,ls,!1),this.options.persister?this.options.persister(d,m,this):d(m)},i={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:y(this,cs),state:this.state,fetchFn:o};r(i),(l=this.options.behavior)==null||l.onFetch(i,this),D(this,Fs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&K(this,Ue,lt).call(this,{type:"fetch",meta:(h=i.fetchOptions)==null?void 0:h.meta});const c=d=>{var m,g,b,v;Er(d)&&d.silent||K(this,Ue,lt).call(this,{type:"error",error:d}),Er(d)||((g=(m=y(this,He).config).onError)==null||g.call(m,d,this),(v=(b=y(this,He).config).onSettled)==null||v.call(b,this.state.data,d,this)),this.scheduleGc()};return D(this,xe,Ga({initialPromise:s==null?void 0:s.initialPromise,fn:i.fetchFn,abort:n.abort.bind(n),onSuccess:d=>{var m,g,b,v;if(d===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(x){c(x);return}(g=(m=y(this,He).config).onSuccess)==null||g.call(m,d,this),(v=(b=y(this,He).config).onSettled)==null||v.call(b,d,this.state.error,this),this.scheduleGc()},onError:c,onFail:(d,m)=>{K(this,Ue,lt).call(this,{type:"failed",failureCount:d,error:m})},onPause:()=>{K(this,Ue,lt).call(this,{type:"pause"})},onContinue:()=>{K(this,Ue,lt).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),y(this,xe).start()}},Is=new WeakMap,Fs=new WeakMap,He=new WeakMap,cs=new WeakMap,xe=new WeakMap,Rn=new WeakMap,ls=new WeakMap,Ue=new WeakSet,lt=function(t){const s=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Ya(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=t.error;return Er(r)&&r.revert&&y(this,Fs)?{...y(this,Fs),fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=s(this.state),ge.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),y(this,He).notify({query:this,type:"updated",action:t})})},Aa);function Ya(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ka(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Uu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var et,ja,$u=(ja=class extends Ys{constructor(t={}){super();U(this,et);this.config=t,D(this,et,new Map)}build(t,s,n){const r=s.queryKey,o=s.queryHash??Hi(r,s);let i=this.get(o);return i||(i=new Zu({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(s),state:n,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){y(this,et).has(t.queryHash)||(y(this,et).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=y(this,et).get(t.queryHash);s&&(t.destroy(),s===t&&y(this,et).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,et).get(t)}getAll(){return[...y(this,et).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(n=>Ao(s,n))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(n=>Ao(t,n)):s}notify(t){ge.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},et=new WeakMap,ja),tt,Se,us,st,Ct,Ca,qu=(Ca=class extends Ja{constructor(t){super();U(this,st);U(this,tt);U(this,Se);U(this,us);this.mutationId=t.mutationId,D(this,Se,t.mutationCache),D(this,tt,[]),this.state=t.state||Xa(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){y(this,tt).includes(t)||(y(this,tt).push(t),this.clearGcTimeout(),y(this,Se).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){D(this,tt,y(this,tt).filter(s=>s!==t)),this.scheduleGc(),y(this,Se).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,tt).length||(this.state.status==="pending"?this.scheduleGc():y(this,Se).remove(this))}continue(){var t;return((t=y(this,us))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,o,i,c,l,u,h,d,m,g,b,v,x,w,j,A,L,N,P,O;D(this,us,Ga({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,_)=>{K(this,st,Ct).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{K(this,st,Ct).call(this,{type:"pause"})},onContinue:()=>{K(this,st,Ct).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,Se).canRun(this)}));const s=this.state.status==="pending",n=!y(this,us).canStart();try{if(!s){K(this,st,Ct).call(this,{type:"pending",variables:t,isPaused:n}),await((o=(r=y(this,Se).config).onMutate)==null?void 0:o.call(r,t,this));const _=await((c=(i=this.options).onMutate)==null?void 0:c.call(i,t));_!==this.state.context&&K(this,st,Ct).call(this,{type:"pending",context:_,variables:t,isPaused:n})}const S=await y(this,us).start();return await((u=(l=y(this,Se).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((d=(h=this.options).onSuccess)==null?void 0:d.call(h,S,t,this.state.context)),await((g=(m=y(this,Se).config).onSettled)==null?void 0:g.call(m,S,null,this.state.variables,this.state.context,this)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,S,null,t,this.state.context)),K(this,st,Ct).call(this,{type:"success",data:S}),S}catch(S){try{throw await((w=(x=y(this,Se).config).onError)==null?void 0:w.call(x,S,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,S,t,this.state.context)),await((N=(L=y(this,Se).config).onSettled)==null?void 0:N.call(L,void 0,S,this.state.variables,this.state.context,this)),await((O=(P=this.options).onSettled)==null?void 0:O.call(P,void 0,S,t,this.state.context)),S}finally{K(this,st,Ct).call(this,{type:"error",error:S})}}finally{y(this,Se).runNext(this)}}},tt=new WeakMap,Se=new WeakMap,us=new WeakMap,st=new WeakSet,Ct=function(t){const s=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ge.batch(()=>{y(this,tt).forEach(n=>{n.onMutationUpdate(t)}),y(this,Se).notify({mutation:this,type:"updated",action:t})})},Ca);function Xa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ut,$e,An,Pa,Bu=(Pa=class extends Ys{constructor(t={}){super();U(this,ut);U(this,$e);U(this,An);this.config=t,D(this,ut,new Set),D(this,$e,new Map),D(this,An,0)}build(t,s,n){const r=new qu({mutationCache:this,mutationId:++Ln(this,An)._,options:t.defaultMutationOptions(s),state:n});return this.add(r),r}add(t){y(this,ut).add(t);const s=Nn(t);if(typeof s=="string"){const n=y(this,$e).get(s);n?n.push(t):y(this,$e).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,ut).delete(t)){const s=Nn(t);if(typeof s=="string"){const n=y(this,$e).get(s);if(n)if(n.length>1){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}else n[0]===t&&y(this,$e).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Nn(t);if(typeof s=="string"){const n=y(this,$e).get(s),r=n==null?void 0:n.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){var n;const s=Nn(t);if(typeof s=="string"){const r=(n=y(this,$e).get(s))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ge.batch(()=>{y(this,ut).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,ut).clear(),y(this,$e).clear()})}getAll(){return Array.from(y(this,ut))}find(t){const s={exact:!0,...t};return this.getAll().find(n=>jo(s,n))}findAll(t={}){return this.getAll().filter(s=>jo(t,s))}notify(t){ge.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return ge.batch(()=>Promise.all(t.map(s=>s.continue().catch(Te))))}},ut=new WeakMap,$e=new WeakMap,An=new WeakMap,Pa);function Nn(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Eo(e){return{onFetch:(t,s)=>{var h,d,m,g,b;const n=t.options,r=(m=(d=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:d.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let v=!1;const x=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?v=!0:t.signal.addEventListener("abort",()=>{v=!0}),t.signal)})},w=Wa(t.options,t.fetchOptions),j=async(A,L,N)=>{if(v)return Promise.reject();if(L==null&&A.pages.length)return Promise.resolve(A);const P={client:t.client,queryKey:t.queryKey,pageParam:L,direction:N?"backward":"forward",meta:t.options.meta};x(P);const O=await w(P),{maxPages:S}=t.options,_=N?Iu:Nu;return{pages:_(A.pages,O,S),pageParams:_(A.pageParams,L,S)}};if(r&&o.length){const A=r==="backward",L=A?zu:ko,N={pages:o,pageParams:i},P=L(n,N);c=await j(N,P,A)}else{const A=e??o.length;do{const L=l===0?i[0]??n.initialPageParam:ko(n,c);if(l>0&&L==null)break;c=await j(c,L),l++}while(l<A)}return c};t.options.persister?t.fetchFn=()=>{var v,x;return(x=(v=t.options).persister)==null?void 0:x.call(v,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=u}}}function ko(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function zu(e,{pages:t,pageParams:s}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,s[0],s):void 0}var ue,Lt,Nt,Hs,Ts,It,Ds,Vs,Ea,Wu=(Ea=class{constructor(e={}){U(this,ue);U(this,Lt);U(this,Nt);U(this,Hs);U(this,Ts);U(this,It);U(this,Ds);U(this,Vs);D(this,ue,e.queryCache||new $u),D(this,Lt,e.mutationCache||new Bu),D(this,Nt,e.defaultOptions||{}),D(this,Hs,new Map),D(this,Ts,new Map),D(this,It,0)}mount(){Ln(this,It)._++,y(this,It)===1&&(D(this,Ds,Di.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onFocus())})),D(this,Vs,Qn.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onOnline())})))}unmount(){var e,t;Ln(this,It)._--,y(this,It)===0&&((e=y(this,Ds))==null||e.call(this),D(this,Ds,void 0),(t=y(this,Vs))==null||t.call(this),D(this,Vs,void 0))}isFetching(e){return y(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,Lt).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=y(this,ue).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=y(this,ue).build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Rs(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return y(this,ue).findAll(e).map(({queryKey:t,state:s})=>{const n=s.data;return[t,n]})}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),r=y(this,ue).get(n.queryHash),o=r==null?void 0:r.state.data,i=Ou(t,o);if(i!==void 0)return y(this,ue).build(this,n).setData(i,{...s,manual:!0})}setQueriesData(e,t,s){return ge.batch(()=>y(this,ue).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=y(this,ue).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=y(this,ue);ge.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=y(this,ue);return ge.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=ge.batch(()=>y(this,ue).findAll(e).map(r=>r.cancel(s)));return Promise.all(n).then(Te).catch(Te)}invalidateQueries(e,t={}){return ge.batch(()=>(y(this,ue).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=ge.batch(()=>y(this,ue).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,s);return s.throwOnError||(o=o.catch(Te)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Te)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=y(this,ue).build(this,t);return s.isStaleByTime(Rs(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Te).catch(Te)}fetchInfiniteQuery(e){return e.behavior=Eo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Te).catch(Te)}ensureInfiniteQueryData(e){return e.behavior=Eo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Qn.isOnline()?y(this,Lt).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,ue)}getMutationCache(){return y(this,Lt)}getDefaultOptions(){return y(this,Nt)}setDefaultOptions(e){D(this,Nt,e)}setQueryDefaults(e,t){y(this,Hs).set(gs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Hs).values()],s={};return t.forEach(n=>{yn(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){y(this,Ts).set(gs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Ts).values()],s={};return t.forEach(n=>{yn(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,Nt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Hi(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ti&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,Nt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,ue).clear(),y(this,Lt).clear()}},ue=new WeakMap,Lt=new WeakMap,Nt=new WeakMap,Hs=new WeakMap,Ts=new WeakMap,It=new WeakMap,Ds=new WeakMap,Vs=new WeakMap,Ea),Ae,Q,jn,Re,ds,Zs,Ft,nt,Cn,Us,$s,hs,fs,Ht,qs,ee,dn,ui,di,hi,fi,pi,mi,gi,ec,ka,Ku=(ka=class extends Ys{constructor(t,s){super();U(this,ee);U(this,Ae);U(this,Q);U(this,jn);U(this,Re);U(this,ds);U(this,Zs);U(this,Ft);U(this,nt);U(this,Cn);U(this,Us);U(this,$s);U(this,hs);U(this,fs);U(this,Ht);U(this,qs,new Set);this.options=s,D(this,Ae,t),D(this,nt,null),D(this,Ft,li()),this.options.experimental_prefetchInRender||y(this,Ft).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,Q).addObserver(this),Mo(y(this,Q),this.options)?K(this,ee,dn).call(this):this.updateResult(),K(this,ee,fi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vi(y(this,Q),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vi(y(this,Q),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,K(this,ee,pi).call(this),K(this,ee,mi).call(this),y(this,Q).removeObserver(this)}setOptions(t){const s=this.options,n=y(this,Q);if(this.options=y(this,Ae).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Be(this.options.enabled,y(this,Q))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");K(this,ee,gi).call(this),y(this,Q).setOptions(this.options),s._defaulted&&!Kn(this.options,s)&&y(this,Ae).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,Q),observer:this});const r=this.hasListeners();r&&Oo(y(this,Q),n,this.options,s)&&K(this,ee,dn).call(this),this.updateResult(),r&&(y(this,Q)!==n||Be(this.options.enabled,y(this,Q))!==Be(s.enabled,y(this,Q))||Rs(this.options.staleTime,y(this,Q))!==Rs(s.staleTime,y(this,Q)))&&K(this,ee,ui).call(this);const o=K(this,ee,di).call(this);r&&(y(this,Q)!==n||Be(this.options.enabled,y(this,Q))!==Be(s.enabled,y(this,Q))||o!==y(this,Ht))&&K(this,ee,hi).call(this,o)}getOptimisticResult(t){const s=y(this,Ae).getQueryCache().build(y(this,Ae),t),n=this.createResult(s,t);return Gu(this,n)&&(D(this,Re,n),D(this,Zs,this.options),D(this,ds,y(this,Q).state)),n}getCurrentResult(){return y(this,Re)}trackResult(t,s){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),s==null||s(r),t[r])})}),n}trackProp(t){y(this,qs).add(t)}getCurrentQuery(){return y(this,Q)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=y(this,Ae).defaultQueryOptions(t),n=y(this,Ae).getQueryCache().build(y(this,Ae),s);return n.fetch().then(()=>this.createResult(n,s))}fetch(t){return K(this,ee,dn).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Re)))}createResult(t,s){var S;const n=y(this,Q),r=this.options,o=y(this,Re),i=y(this,ds),c=y(this,Zs),u=t!==n?t.state:y(this,jn),{state:h}=t;let d={...h},m=!1,g;if(s._optimisticResults){const _=this.hasListeners(),F=!_&&Mo(t,s),T=_&&Oo(t,n,s,r);(F||T)&&(d={...d,...Ya(h.data,t.options)}),s._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:x}=d;if(s.select&&d.data!==void 0)if(o&&d.data===(i==null?void 0:i.data)&&s.select===y(this,Cn))g=y(this,Us);else try{D(this,Cn,s.select),g=s.select(d.data),g=ci(o==null?void 0:o.data,g,s),D(this,Us,g),D(this,nt,null)}catch(_){D(this,nt,_)}else g=d.data;if(s.placeholderData!==void 0&&g===void 0&&x==="pending"){let _;if(o!=null&&o.isPlaceholderData&&s.placeholderData===(c==null?void 0:c.placeholderData))_=o.data;else if(_=typeof s.placeholderData=="function"?s.placeholderData((S=y(this,$s))==null?void 0:S.state.data,y(this,$s)):s.placeholderData,s.select&&_!==void 0)try{_=s.select(_),D(this,nt,null)}catch(F){D(this,nt,F)}_!==void 0&&(x="success",g=ci(o==null?void 0:o.data,_,s),m=!0)}y(this,nt)&&(b=y(this,nt),g=y(this,Us),v=Date.now(),x="error");const w=d.fetchStatus==="fetching",j=x==="pending",A=x==="error",L=j&&w,N=g!==void 0,O={status:x,fetchStatus:d.fetchStatus,isPending:j,isSuccess:x==="success",isError:A,isInitialLoading:L,isLoading:L,data:g,dataUpdatedAt:d.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!j,isLoadingError:A&&!N,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&N,isStale:Vi(t,s),refetch:this.refetch,promise:y(this,Ft)};if(this.options.experimental_prefetchInRender){const _=I=>{O.status==="error"?I.reject(O.error):O.data!==void 0&&I.resolve(O.data)},F=()=>{const I=D(this,Ft,O.promise=li());_(I)},T=y(this,Ft);switch(T.status){case"pending":t.queryHash===n.queryHash&&_(T);break;case"fulfilled":(O.status==="error"||O.data!==T.value)&&F();break;case"rejected":(O.status!=="error"||O.error!==T.reason)&&F();break}}return O}updateResult(){const t=y(this,Re),s=this.createResult(y(this,Q),this.options);if(D(this,ds,y(this,Q).state),D(this,Zs,this.options),y(this,ds).data!==void 0&&D(this,$s,y(this,Q)),Kn(s,t))return;D(this,Re,s);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!y(this,qs).size)return!0;const i=new Set(o??y(this,qs));return this.options.throwOnError&&i.add("error"),Object.keys(y(this,Re)).some(c=>{const l=c;return y(this,Re)[l]!==t[l]&&i.has(l)})};K(this,ee,ec).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&K(this,ee,fi).call(this)}},Ae=new WeakMap,Q=new WeakMap,jn=new WeakMap,Re=new WeakMap,ds=new WeakMap,Zs=new WeakMap,Ft=new WeakMap,nt=new WeakMap,Cn=new WeakMap,Us=new WeakMap,$s=new WeakMap,hs=new WeakMap,fs=new WeakMap,Ht=new WeakMap,qs=new WeakMap,ee=new WeakSet,dn=function(t){K(this,ee,gi).call(this);let s=y(this,Q).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Te)),s},ui=function(){K(this,ee,pi).call(this);const t=Rs(this.options.staleTime,y(this,Q));if(ms||y(this,Re).isStale||!oi(t))return;const n=Ba(y(this,Re).dataUpdatedAt,t)+1;D(this,hs,setTimeout(()=>{y(this,Re).isStale||this.updateResult()},n))},di=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,Q)):this.options.refetchInterval)??!1},hi=function(t){K(this,ee,mi).call(this),D(this,Ht,t),!(ms||Be(this.options.enabled,y(this,Q))===!1||!oi(y(this,Ht))||y(this,Ht)===0)&&D(this,fs,setInterval(()=>{(this.options.refetchIntervalInBackground||Di.isFocused())&&K(this,ee,dn).call(this)},y(this,Ht)))},fi=function(){K(this,ee,ui).call(this),K(this,ee,hi).call(this,K(this,ee,di).call(this))},pi=function(){y(this,hs)&&(clearTimeout(y(this,hs)),D(this,hs,void 0))},mi=function(){y(this,fs)&&(clearInterval(y(this,fs)),D(this,fs,void 0))},gi=function(){const t=y(this,Ae).getQueryCache().build(y(this,Ae),this.options);if(t===y(this,Q))return;const s=y(this,Q);D(this,Q,t),D(this,jn,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},ec=function(t){ge.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(y(this,Re))}),y(this,Ae).getQueryCache().notify({query:y(this,Q),type:"observerResultsUpdated"})})},ka);function Qu(e,t){return Be(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mo(e,t){return Qu(e,t)||e.state.data!==void 0&&vi(e,t,t.refetchOnMount)}function vi(e,t,s){if(Be(t.enabled,e)!==!1){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Vi(e,t)}return!1}function Oo(e,t,s,n){return(e!==t||Be(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Vi(e,s)}function Vi(e,t){return Be(t.enabled,e)!==!1&&e.isStaleByTime(Rs(t.staleTime,e))}function Gu(e,t){return!Kn(e.getCurrentResult(),t)}var Tt,Dt,je,dt,yt,qn,yi,Ma,Ju=(Ma=class extends Ys{constructor(t,s){super();U(this,yt);U(this,Tt);U(this,Dt);U(this,je);U(this,dt);D(this,Tt,t),this.setOptions(s),this.bindMethods(),K(this,yt,qn).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const s=this.options;this.options=y(this,Tt).defaultMutationOptions(t),Kn(this.options,s)||y(this,Tt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,je),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&gs(s.mutationKey)!==gs(this.options.mutationKey)?this.reset():((n=y(this,je))==null?void 0:n.state.status)==="pending"&&y(this,je).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=y(this,je))==null||t.removeObserver(this)}onMutationUpdate(t){K(this,yt,qn).call(this),K(this,yt,yi).call(this,t)}getCurrentResult(){return y(this,Dt)}reset(){var t;(t=y(this,je))==null||t.removeObserver(this),D(this,je,void 0),K(this,yt,qn).call(this),K(this,yt,yi).call(this)}mutate(t,s){var n;return D(this,dt,s),(n=y(this,je))==null||n.removeObserver(this),D(this,je,y(this,Tt).getMutationCache().build(y(this,Tt),this.options)),y(this,je).addObserver(this),y(this,je).execute(t)}},Tt=new WeakMap,Dt=new WeakMap,je=new WeakMap,dt=new WeakMap,yt=new WeakSet,qn=function(){var s;const t=((s=y(this,je))==null?void 0:s.state)??Xa();D(this,Dt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},yi=function(t){ge.batch(()=>{var s,n,r,o,i,c,l,u;if(y(this,dt)&&this.hasListeners()){const h=y(this,Dt).variables,d=y(this,Dt).context;(t==null?void 0:t.type)==="success"?((n=(s=y(this,dt)).onSuccess)==null||n.call(s,t.data,h,d),(o=(r=y(this,dt)).onSettled)==null||o.call(r,t.data,null,h,d)):(t==null?void 0:t.type)==="error"&&((c=(i=y(this,dt)).onError)==null||c.call(i,t.error,h,d),(u=(l=y(this,dt)).onSettled)==null||u.call(l,void 0,t.error,h,d))}this.listeners.forEach(h=>{h(y(this,Dt))})})},Ma),tc=p.createContext(void 0),fr=e=>{const t=p.useContext(tc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yu=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(tc.Provider,{value:e,children:t})),sc=p.createContext(!1),Xu=()=>p.useContext(sc);sc.Provider;function ed(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var td=p.createContext(ed()),sd=()=>p.useContext(td);function nc(e,t){return typeof e=="function"?e(...t):!!e}function bi(){}var nd=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},rd=e=>{p.useEffect(()=>{e.clearReset()},[e])},id=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(r&&e.data===void 0||nc(s,[e.error,n])),od=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...s)=>Math.max(t(...s),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ad=(e,t)=>e.isLoading&&e.isFetching&&!t,cd=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lo=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function ld(e,t,s){var d,m,g,b,v;const n=fr(),r=Xu(),o=sd(),i=n.defaultQueryOptions(e);(m=(d=n.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||m.call(d,i),i._optimisticResults=r?"isRestoring":"optimistic",od(i),nd(i,o),rd(o);const c=!n.getQueryCache().get(i.queryHash),[l]=p.useState(()=>new t(n,i)),u=l.getOptimisticResult(i),h=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(x=>{const w=h?l.subscribe(ge.batchCalls(x)):bi;return l.updateResult(),w},[l,h]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(i)},[i,l]),cd(i,u))throw Lo(i,l,o);if(id({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:n.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((b=(g=n.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||b.call(g,i,u),i.experimental_prefetchInRender&&!ms&&ad(u,r)){const x=c?Lo(i,l,o):(v=n.getQueryCache().get(i.queryHash))==null?void 0:v.promise;x==null||x.catch(bi).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function rc(e,t){return ld(e,Ku)}function Rt(e,t){const s=fr(),[n]=p.useState(()=>new Ju(s,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const r=p.useSyncExternalStore(p.useCallback(i=>n.subscribe(ge.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=p.useCallback((i,c)=>{n.mutate(i,c).catch(bi)},[n]);if(r.error&&nc(n.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var ud="Invariant failed";function ft(e,t){if(!e)throw new Error(ud)}const As=new WeakMap,Bn=new WeakMap,Gn={current:[]};let kr=!1,gn=0;const hn=new Set,In=new Map;function ic(e){const t=Array.from(e).sort((s,n)=>s instanceof js&&s.options.deps.includes(n)?1:n instanceof js&&n.options.deps.includes(s)?-1:0);for(const s of t){if(Gn.current.includes(s))continue;Gn.current.push(s),s.recompute();const n=Bn.get(s);if(n)for(const r of n){const o=As.get(r);o&&ic(o)}}}function dd(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function hd(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function oc(e){if(gn>0&&!In.has(e)&&In.set(e,e.prevState),hn.add(e),!(gn>0)&&!kr)try{for(kr=!0;hn.size>0;){const t=Array.from(hn);hn.clear();for(const s of t){const n=In.get(s)??s.prevState;s.prevState=n,dd(s)}for(const s of t){const n=As.get(s);n&&(Gn.current.push(s),ic(n))}for(const s of t){const n=As.get(s);if(n)for(const r of n)hd(r)}}}finally{kr=!1,Gn.current=[],In.clear()}}function Mr(e){gn++;try{e()}finally{if(gn--,gn===0){const t=Array.from(hn)[0];t&&oc(t)}}}function fd(e){return typeof e=="function"}class wi{constructor(t,s){this.listeners=new Set,this.subscribe=n=>{var r,o;this.listeners.add(n);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,n,this);return()=>{this.listeners.delete(n),i==null||i()}},this.prevState=t,this.state=t,this.options=s}setState(t){var s,n,r;this.prevState=this.state,(s=this.options)!=null&&s.updateFn?this.state=this.options.updateFn(this.prevState)(t):fd(t)?this.state=t(this.prevState):this.state=t,(r=(n=this.options)==null?void 0:n.onUpdate)==null||r.call(n),oc(this)}}class js{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const s=[],n=[];for(const r of this.options.deps)s.push(r.prevState),n.push(r.state);return this.lastSeenDepValues=n,{prevDepVals:s,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var s,n;this.prevState=this.state;const{prevDepVals:r,currDepVals:o,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:r,currDepVals:o,prevVal:i}),(n=(s=this.options).onUpdate)==null||n.call(s)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof js&&o.checkIfRecalculationNeededDeeply();let s=!1;const n=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let o=0;o<r.length;o++)if(r[o]!==n[o]){s=!0;break}s&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const s of this._subscriptions)s()}),this.subscribe=s=>{var n,r;this.listeners.add(s);const o=(r=(n=this.options).onSubscribe)==null?void 0:r.call(n,s,this);return()=>{this.listeners.delete(s),o==null||o()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const s of t)if(s instanceof js)s.registerOnGraph(),this.registerOnGraph(s.options.deps);else if(s instanceof wi){let n=As.get(s);n||(n=new Set,As.set(s,n)),n.add(this);let r=Bn.get(this);r||(r=new Set,Bn.set(this,r)),r.add(s)}}unregisterFromGraph(t=this.options.deps){for(const s of t)if(s instanceof js)this.unregisterFromGraph(s.options.deps);else if(s instanceof wi){const n=As.get(s);n&&n.delete(this);const r=Bn.get(this);r&&r.delete(s)}}}const Ut="__TSR_index",No="popstate",Io="beforeunload";function ac(e){let t=e.getLocation();const s=new Set,n=i=>{t=e.getLocation(),s.forEach(c=>c({location:t,action:i}))},r=i=>{e.notifyOnIndexChange??!0?n(i):t=e.getLocation()},o=async({task:i,navigateOpts:c,...l})=>{var u,h;if((c==null?void 0:c.ignoreBlocker)??!1){i();return}const m=((u=e.getBlockers)==null?void 0:u.call(e))??[],g=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&m.length&&g)for(const b of m){const v=bn(l.path,l.state);if(await b.blockerFn({currentLocation:t,nextLocation:v,action:l.type})){(h=e.onBlocked)==null||h.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:i=>(s.add(i),()=>{s.delete(i)}),push:(i,c,l)=>{const u=t.state[Ut];c=xi(u+1,c),o({task:()=>{e.pushState(i,c),n({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=t.state[Ut];c=xi(u,c),o({task:()=>{e.replaceState(i,c),n({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:i,state:c})},go:(i,c)=>{o({task:()=>{e.go(i),r({type:"GO",index:i})},navigateOpts:c,type:"GO"})},back:i=>{o({task:()=>{e.back((i==null?void 0:i.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:i,type:"BACK"})},forward:i=>{o({task:()=>{e.forward((i==null?void 0:i.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:i,type:"FORWARD"})},canGoBack:()=>t.state[Ut]!==0,createHref:i=>e.createHref(i),block:i=>{var c;if(!e.setBlockers)return()=>{};const l=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...l,i]),()=>{var u,h;const d=((u=e.getBlockers)==null?void 0:u.call(e))??[];(h=e.setBlockers)==null||h.call(e,d.filter(m=>m!==i))}},flush:()=>{var i;return(i=e.flush)==null?void 0:i.call(e)},destroy:()=>{var i;return(i=e.destroy)==null?void 0:i.call(e)},notify:n}}function xi(e,t){return t||(t={}),{...t,key:Zi(),[Ut]:e}}function pd(e){var t;const s=typeof document<"u"?window:void 0,n=s.history.pushState,r=s.history.replaceState;let o=[];const i=()=>o,c=_=>o=_,l=_=>_,u=()=>bn(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state);(t=s.history.state)!=null&&t.key||s.history.replaceState({[Ut]:0,key:Zi()},"");let h=u(),d,m=!1,g=!1,b=!1,v=!1;const x=()=>h;let w,j;const A=()=>{w&&(S._ignoreSubscribers=!0,(w.isPush?s.history.pushState:s.history.replaceState)(w.state,"",w.href),S._ignoreSubscribers=!1,w=void 0,j=void 0,d=void 0)},L=(_,F,T)=>{const I=l(F);j||(d=h),h=bn(F,T),w={href:I,state:T,isPush:(w==null?void 0:w.isPush)||_==="push"},j||(j=Promise.resolve().then(()=>A()))},N=_=>{h=u(),S.notify({type:_})},P=async()=>{if(g){g=!1;return}const _=u(),F=_.state[Ut]-h.state[Ut],T=F===1,I=F===-1,H=!T&&!I||m;m=!1;const $=H?"GO":I?"BACK":"FORWARD",q=H?{type:"GO",index:F}:{type:I?"BACK":"FORWARD"};if(b)b=!1;else{const Z=i();if(typeof document<"u"&&Z.length){for(const B of Z)if(await B.blockerFn({currentLocation:h,nextLocation:_,action:$})){g=!0,s.history.go(1),S.notify(q);return}}}h=u(),S.notify(q)},O=_=>{if(v){v=!1;return}let F=!1;const T=i();if(typeof document<"u"&&T.length)for(const I of T){const H=I.enableBeforeUnload??!0;if(H===!0){F=!0;break}if(typeof H=="function"&&H()===!0){F=!0;break}}if(F)return _.preventDefault(),_.returnValue=""},S=ac({getLocation:x,getLength:()=>s.history.length,pushState:(_,F)=>L("push",_,F),replaceState:(_,F)=>L("replace",_,F),back:_=>(_&&(b=!0),v=!0,s.history.back()),forward:_=>{_&&(b=!0),v=!0,s.history.forward()},go:_=>{m=!0,s.history.go(_)},createHref:_=>l(_),flush:A,destroy:()=>{s.history.pushState=n,s.history.replaceState=r,s.removeEventListener(Io,O,{capture:!0}),s.removeEventListener(No,P)},onBlocked:()=>{d&&h!==d&&(h=d)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return s.addEventListener(Io,O,{capture:!0}),s.addEventListener(No,P),s.history.pushState=function(..._){const F=n.apply(s.history,_);return S._ignoreSubscribers||N("PUSH"),F},s.history.replaceState=function(..._){const F=r.apply(s.history,_);return S._ignoreSubscribers||N("REPLACE"),F},S}function md(e={initialEntries:["/"]}){const t=e.initialEntries;let s=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const n=t.map((o,i)=>xi(i,void 0));return ac({getLocation:()=>bn(t[s],n[s]),getLength:()=>t.length,pushState:(o,i)=>{s<t.length-1&&(t.splice(s+1),n.splice(s+1)),n.push(i),t.push(o),s=Math.max(t.length-1,0)},replaceState:(o,i)=>{n[s]=i,t[s]=o},back:()=>{s=Math.max(s-1,0)},forward:()=>{s=Math.min(s+1,t.length-1)},go:o=>{s=Math.min(Math.max(s+o,0),t.length-1)},createHref:o=>o})}function bn(e,t){const s=e.indexOf("#"),n=e.indexOf("?");return{href:e,pathname:e.substring(0,s>0?n>0?Math.min(s,n):s:n>0?n:e.length),hash:s>-1?e.substring(s):"",search:n>-1?e.slice(n,s===-1?void 0:s):"",state:t||{[Ut]:0,key:Zi()}}}function Zi(){return(Math.random()+1).toString(36).substring(7)}function xs(e){return e[e.length-1]}function gd(e){return typeof e=="function"}function rs(e,t){return gd(e)?e(t):e}function _i(e,t){return t.reduce((s,n)=>(s[n]=e[n],s),{})}function Fe(e,t){if(e===t)return e;const s=t,n=Ho(e)&&Ho(s);if(n||Jn(e)&&Jn(s)){const r=n?e:Object.keys(e),o=r.length,i=n?s:Object.keys(s),c=i.length,l=n?[]:{};let u=0;for(let h=0;h<c;h++){const d=n?h:i[h];(!n&&r.includes(d)||n)&&e[d]===void 0&&s[d]===void 0?(l[d]=void 0,u++):(l[d]=Fe(e[d],s[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return o===c&&u===o?e:l}return s}function Jn(e){if(!Fo(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!Fo(s)||!s.hasOwnProperty("isPrototypeOf"))}function Fo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ho(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function To(e,t){let s=Object.keys(e);return t&&(s=s.filter(n=>e[n]!==void 0)),s}function Cs(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Jn(e)&&Jn(t)){const n=(s==null?void 0:s.ignoreUndefined)??!0,r=To(e,n),o=To(t,n);return!(s!=null&&s.partial)&&r.length!==o.length?!1:o.every(i=>Cs(e[i],t[i],s))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((n,r)=>!Cs(n,t[r],s)):!1}function ws(e){let t,s;const n=new Promise((r,o)=>{t=r,s=o});return n.status="pending",n.resolve=r=>{n.status="resolved",n.value=r,t(r),e==null||e(r)},n.reject=r=>{n.status="rejected",s(r)},n}function vd(e){return/%[0-9A-Fa-f]{2}/.test(e)}function gt(e){return pr(e.filter(t=>t!==void 0).join("/"))}function pr(e){return e.replace(/\/{2,}/g,"/")}function Ui(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function is(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function yd(e){return is(Ui(e))}function Yn(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function bd(e,t,s){return Yn(e,s)===Yn(t,s)}function wd({basepath:e,base:t,to:s,trailingSlash:n="never",caseSensitive:r}){var o,i;t=Xn(e,t,r),s=Xn(e,s,r);let c=zs(t);const l=zs(s);c.length>1&&((o=xs(c))==null?void 0:o.value)==="/"&&c.pop(),l.forEach((h,d)=>{h.value==="/"?d?d===l.length-1&&c.push(h):c=[h]:h.value===".."?c.pop():h.value==="."||c.push(h)}),c.length>1&&(((i=xs(c))==null?void 0:i.value)==="/"?n==="never"&&c.pop():n==="always"&&c.push({type:"pathname",value:"/"}));const u=gt([e,...c.map(h=>h.value)]);return pr(u)}function zs(e){if(!e)return[];e=pr(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const s=e.split("/").filter(Boolean);return t.push(...s.map(n=>n==="$"||n==="*"?{type:"wildcard",value:n}:n.charAt(0)==="$"?{type:"param",value:n}:{type:"pathname",value:n.includes("%25")?n.split("%25").map(r=>decodeURI(r)).join("%25"):decodeURI(n)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Fn({path:e,params:t,leaveWildcards:s,leaveParams:n,decodeCharMap:r}){const o=zs(e);function i(u){const h=t[u],d=typeof h=="string";return["*","_splat"].includes(u)?d?encodeURI(h):h:d?xd(h,r):h}const c={},l=gt(o.map(u=>{if(u.type==="wildcard"){c._splat=t._splat;const h=i("_splat");return s?`${u.value}${h??""}`:h}if(u.type==="param"){const h=u.value.substring(1);if(c[h]=t[h],n){const d=i(u.value);return`${u.value}${d??""}`}return i(h)??"undefined"}return u.value}));return{usedParams:c,interpolatedPath:l}}function xd(e,t){let s=encodeURIComponent(e);if(t)for(const[n,r]of t)s=s.replaceAll(n,r);return s}function Hn(e,t,s){const n=_d(e,t,s);if(!(s.to&&!n))return n??{}}function Xn(e,t,s=!1){const n=s?e:e.toLowerCase(),r=s?t:t.toLowerCase();switch(!0){case n==="/":return t;case r===n:return"";case t.length<e.length:return t;case r[n.length]!=="/":return t;case r.startsWith(n):return t.slice(e.length);default:return t}}function _d(e,t,s){if(e!=="/"&&!t.startsWith(e))return;t=Xn(e,t,s.caseSensitive);const n=Xn(e,`${s.to??"$"}`,s.caseSensitive),r=zs(t),o=zs(n);t.startsWith("/")||r.unshift({type:"pathname",value:"/"}),n.startsWith("/")||o.unshift({type:"pathname",value:"/"});const i={};return(()=>{for(let l=0;l<Math.max(r.length,o.length);l++){const u=r[l],h=o[l],d=l>=r.length-1,m=l>=o.length-1;if(h){if(h.type==="wildcard"){const g=decodeURI(gt(r.slice(l).map(b=>b.value)));return i["*"]=g,i._splat=g,!0}if(h.type==="pathname"){if(h.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(s.caseSensitive){if(h.value!==u.value)return!1}else if(h.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(h.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(i[h.value.substring(1)]=decodeURIComponent(u.value))}}if(!d&&m)return i["**"]=gt(r.slice(l+1).map(g=>g.value)),!!s.fuzzy&&(h==null?void 0:h.value)!=="/"}return!0})()?i:void 0}function De(e){return!!(e!=null&&e.isNotFound)}const er="tsr-scroll-restoration-v1_3";let cc=!1;try{cc=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const Sd=(e,t)=>{let s;return(...n)=>{s||(s=setTimeout(()=>{e(...n),s=null},t))}},_s=cc?{state:JSON.parse(window.sessionStorage.getItem(er)||"null")||{},set:t=>(_s.state=rs(t,_s.state)||_s.state,window.sessionStorage.setItem(er,JSON.stringify(_s.state)))}:void 0,Si=e=>e.state.key||e.href;function Rd(e){const t=[];let s;for(;s=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(s.children,e)+1})`),e=s;return`${t.join(" > ")}`.toLowerCase()}let tr=!1;function lc(e,t,s,n,r){var o;let i;try{i=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const c=t||((o=window.history.state)==null?void 0:o.key),l=i[c];tr=!0,(()=>{if(n&&l){for(const h in l){const d=l[h];if(h==="window")window.scrollTo({top:d.scrollY,left:d.scrollX,behavior:s});else if(h){const m=document.querySelector(h);m&&(m.scrollLeft=d.scrollX,m.scrollTop=d.scrollY)}}return}const u=window.location.hash.split("#")[1];if(u){const h=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(h){const d=document.getElementById(u);d&&d.scrollIntoView(h)}return}["window",...(r==null?void 0:r.filter(h=>h!=="window"))??[]].forEach(h=>{const d=h==="window"?window:document.querySelector(h);d&&d.scrollTo({top:0,left:0,behavior:s})})})(),tr=!1}function Ad(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,tr=!1;const n=e.options.getScrollRestorationKey||Si;window.history.scrollRestoration="manual";const r=o=>{if(tr||!e.isScrollRestoring)return;let i="";if(o.target===document||o.target===window)i="window";else{const l=o.target.getAttribute("data-scroll-restoration-id");l?i=`[data-scroll-restoration-id="${l}"]`:i=Rd(o.target)}const c=n(e.state.location);_s.set(l=>{const u=l[c]=l[c]||{},h=u[i]=u[i]||{};if(i==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(i){const d=document.querySelector(i);d&&(h.scrollX=d.scrollLeft||0,h.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",Sd(r,100),!0),e.subscribe("onRendered",o=>{const i=n(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}lc(er,i,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&_s.set(c=>(c[i]=c[i]||{},c))})}function jd(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const s=document.getElementById(e.state.location.hash);s&&s.scrollIntoView(t)}}}function Cd(e,t){const s=Object.entries(e).flatMap(([r,o])=>Array.isArray(o)?o.map(i=>[r,String(i)]):[[r,String(o)]]);return""+new URLSearchParams(s).toString()}function Or(e){if(!e)return"";const t=vd(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Pd(e,t){const s=e;return[...new URLSearchParams(s).entries()].reduce((o,[i,c])=>{const l=o[i];return l==null?o[i]=Or(c):o[i]=Array.isArray(l)?[...l,Or(c)]:[l,Or(c)],o},{})}const Ed=Md(JSON.parse),kd=Od(JSON.stringify,JSON.parse);function Md(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const s=Pd(t);for(const n in s){const r=s[n];if(typeof r=="string")try{s[n]=e(r)}catch{}}return s}}function Od(e,t){function s(n){if(typeof n=="object"&&n!==null)try{return e(n)}catch{}else if(typeof n=="string"&&typeof t=="function")try{return t(n),e(n)}catch{}return n}return n=>{n={...n},Object.keys(n).forEach(o=>{const i=n[o];typeof i>"u"||i===void 0?delete n[o]:n[o]=s(i)});const r=Cd(n).toString();return r?`?${r}`:""}}const qe="__root__";function ss(e){return!!(e!=null&&e.isRedirect)}function Lr(e){return!!(e!=null&&e.isRedirect)&&e.href}function Ps(e){const t=e.resolvedLocation,s=e.location,n=(t==null?void 0:t.pathname)!==s.pathname,r=(t==null?void 0:t.href)!==s.href,o=(t==null?void 0:t.hash)!==s.hash;return{fromLocation:t,toLocation:s,pathChanged:n,hrefChanged:r,hashChanged:o}}class Ld{constructor(t){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.startTransition=s=>s(),this.update=s=>{var n;s.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...s},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(o=>[encodeURIComponent(o),o])):void 0,(!this.basepath||s.basepath&&s.basepath!==r.basepath)&&(s.basepath===void 0||s.basepath===""||s.basepath==="/"?this.basepath="/":this.basepath=`/${yd(s.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?md({initialEntries:[this.basepath||"/"]}):pd()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new wi(Id(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),Ad(this)),typeof window<"u"&&"CSS"in window&&typeof((n=window.CSS)==null?void 0:n.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[s.id]=s);const n=i=>{i.forEach((c,l)=>{c.init({originalIndex:l,defaultSsr:this.options.defaultSsr});const u=this.routesById[c.id];if(ft(!u,`Duplicate routes found with id: ${String(c.id)}`),this.routesById[c.id]=c,!c.isRoot&&c.path){const d=is(c.fullPath);(!this.routesByPath[d]||c.fullPath.endsWith("/"))&&(this.routesByPath[d]=c)}const h=c.children;h!=null&&h.length&&n(h)})};n([this.routeTree]);const r=[];Object.values(this.routesById).forEach((i,c)=>{var l;if(i.isRoot||!i.path)return;const u=Ui(i.fullPath),h=zs(u);for(;h.length>1&&((l=h[0])==null?void 0:l.value)==="/";)h.shift();const d=h.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);r.push({child:i,trimmed:u,parsed:h,index:c,scores:d})}),this.flatRoutes=r.sort((i,c)=>{const l=Math.min(i.scores.length,c.scores.length);for(let u=0;u<l;u++)if(i.scores[u]!==c.scores[u])return c.scores[u]-i.scores[u];if(i.scores.length!==c.scores.length)return c.scores.length-i.scores.length;for(let u=0;u<l;u++)if(i.parsed[u].value!==c.parsed[u].value)return i.parsed[u].value>c.parsed[u].value?1:-1;return i.index-c.index}).map((i,c)=>(i.child.rank=c,i.child))},this.subscribe=(s,n)=>{const r={eventType:s,fn:n};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=s=>{this.subscribers.forEach(n=>{n.eventType===s.type&&n.fn(s)})},this.parseLocation=(s,n)=>{const r=({pathname:l,search:u,hash:h,state:d})=>{const m=this.options.parseSearch(u),g=this.options.stringifySearch(m);return{pathname:l,searchStr:g,search:Fe(s==null?void 0:s.search,m),hash:h.split("#").reverse()[0]??"",href:`${l}${g}${h}`,state:Fe(s==null?void 0:s.state,d)}},o=r(n??this.history.location),{__tempLocation:i,__tempKey:c}=o.state;if(i&&(!c||c===this.tempLocationKey)){const l=r(i);return l.state.key=o.state.key,delete l.state.__tempLocation,{...l,maskedLocation:o}}return o},this.resolvePathWithBase=(s,n)=>wd({basepath:this.basepath,base:s,to:pr(n),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(s,n,r)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},r):this.matchRoutesInternal(s,n),this.getMatchedRoutes=(s,n)=>{let r={};const o=is(s.pathname),i=h=>Hn(this.basepath,o,{to:h.fullPath,caseSensitive:h.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let c=(n==null?void 0:n.to)!==void 0?this.routesByPath[n.to]:void 0;c?r=i(c):c=this.flatRoutes.find(h=>{const d=i(h);return d?(r=d,!0):!1});let l=c||this.routesById[qe];const u=[l];for(;l.parentRoute;)l=l.parentRoute,u.unshift(l);return{matchedRoutes:u,routeParams:r,foundRoute:c}},this.cancelMatch=s=>{const n=this.getMatch(s);n&&(n.abortController.abort(),clearTimeout(n.pendingTimeout))},this.cancelMatches=()=>{var s;(s=this.state.pendingMatches)==null||s.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=s=>{const n=(o={},i)=>{var c,l,u,h,d,m,g;const b=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,v=o.from!=null?b.find(I=>Hn(this.basepath,is(I.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,x=(v==null?void 0:v.pathname)||this.latestLocation.pathname;ft(o.from==null||v!=null,"Could not find match for from: "+o.from);const w=(c=this.state.pendingMatches)!=null&&c.length?(l=xs(this.state.pendingMatches))==null?void 0:l.search:((u=xs(b))==null?void 0:u.search)||this.latestLocation.search,j=i==null?void 0:i.matchedRoutes.filter(I=>b.find(H=>H.routeId===I.id));let A;if(o.to){const I=(v==null?void 0:v.fullPath)||((h=xs(b))==null?void 0:h.fullPath)||this.latestLocation.pathname;A=this.resolvePathWithBase(I,`${o.to}`)}else{const I=this.routesById[(d=j==null?void 0:j.find(H=>{const $=Fn({path:H.fullPath,params:(i==null?void 0:i.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return gt([this.basepath,$])===x}))==null?void 0:d.id];A=this.resolvePathWithBase(x,(I==null?void 0:I.to)??x)}const L={...(m=xs(b))==null?void 0:m.params};let N=(o.params??!0)===!0?L:{...L,...rs(o.params,L)};Object.keys(N).length>0&&(i==null||i.matchedRoutes.map(I=>{var H;return((H=I.options.params)==null?void 0:H.stringify)??I.options.stringifyParams}).filter(Boolean).forEach(I=>{N={...N,...I(N)}})),A=Fn({path:A,params:N??{},leaveWildcards:!1,leaveParams:s.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let P=w;if(s._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let I={};i==null||i.matchedRoutes.forEach(H=>{try{H.options.validateSearch&&(I={...I,...Nr(H.options.validateSearch,{...I,...P})??{}})}catch{}}),P=I}P=(I=>{const H=(i==null?void 0:i.matchedRoutes.reduce((Z,B)=>{var z;const G=[];if("search"in B.options)(z=B.options.search)!=null&&z.middlewares&&G.push(...B.options.search.middlewares);else if(B.options.preSearchFilters||B.options.postSearchFilters){const X=({search:J,next:be})=>{let te=J;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),J));const se=be(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),se):se};G.push(X)}if(s._includeValidateSearch&&B.options.validateSearch){const X=({search:J,next:be})=>{const te=be(J);try{return{...te,...Nr(B.options.validateSearch,te)??{}}}catch{return te}};G.push(X)}return Z.concat(G)},[]))??[],$=({search:Z})=>o.search?o.search===!0?Z:rs(o.search,Z):{};H.push($);const q=(Z,B)=>{if(Z>=H.length)return B;const z=H[Z];return z({search:B,next:X=>q(Z+1,X)})};return q(0,I)})(P),P=Fe(w,P);const S=this.options.stringifySearch(P),_=o.hash===!0?this.latestLocation.hash:o.hash?rs(o.hash,this.latestLocation.hash):void 0,F=_?`#${_}`:"";let T=o.state===!0?this.latestLocation.state:o.state?rs(o.state,this.latestLocation.state):{};return T=Fe(this.latestLocation.state,T),{pathname:A,search:P,searchStr:S,state:T,hash:_??"",href:`${A}${S}${F}`,unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{var c;const l=n(o);let u=i?n(i):void 0;if(!u){let m={};const g=(c=this.options.routeMasks)==null?void 0:c.find(b=>{const v=Hn(this.basepath,l.pathname,{to:b.from,caseSensitive:!1,fuzzy:!1});return v?(m=v,!0):!1});if(g){const{from:b,...v}=g;i={..._i(s,["from"]),...v,params:m},u=n(i)}}const h=this.getMatchedRoutes(l,o),d=n(o,h);if(u){const m=this.getMatchedRoutes(u,i),g=n(i,m);d.maskedLocation=g}return d};return s.mask?r(s,{..._i(s,["from"]),...s.mask}):r(s)},this.commitLocation=({viewTransition:s,ignoreBlocker:n,...r})=>{const o=()=>{const l=["key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(h=>{r.state[h]=this.latestLocation.state[h]});const u=Cs(r.state,this.latestLocation.state);return l.forEach(h=>{delete r.state[h]}),u},i=this.latestLocation.href===r.href,c=this.commitLocationPromise;if(this.commitLocationPromise=ws(()=>{c==null||c.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...h}=r;l&&(h={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[r.replace?"replace":"push"](h.href,h.state,{ignoreBlocker:n})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:c,...l}={})=>{if(c){const h=this.history.location.state.__TSR_index,d=bn(c,{__TSR_index:s?h:h+1});l.to=d.pathname,l.search=this.options.parseSearch(d.search),l.hash=d.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});return this.commitLocation({...u,viewTransition:o,replace:s,resetScroll:n,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:s,reloadDocument:n,href:r,...o})=>{if(n){if(!r){const i=this.buildLocation({to:s,...o});r=this.history.createHref(i.href)}o.replace?window.location.replace(r):window.location.href=r;return}return this.buildAndCommitLocation({...o,href:r,to:s})},this.load=async s=>{this.latestLocation=this.parseLocation(this.latestLocation);let n,r,o;for(o=new Promise(i=>{this.startTransition(async()=>{var c;try{const l=this.latestLocation,u=this.state.resolvedLocation;this.cancelMatches();let h;Mr(()=>{h=this.matchRoutes(l),this.__store.setState(d=>({...d,status:"pending",isLoading:!0,location:l,pendingMatches:h,cachedMatches:d.cachedMatches.filter(m=>!h.find(g=>g.id===m.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...Ps({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...Ps({resolvedLocation:u,location:l})}),await this.loadMatches({sync:s==null?void 0:s.sync,matches:h,location:l,onReady:async()=>{this.startViewTransition(async()=>{let d,m,g;Mr(()=>{this.__store.setState(b=>{const v=b.matches,x=b.pendingMatches||b.matches;return d=v.filter(w=>!x.find(j=>j.id===w.id)),m=x.filter(w=>!v.find(j=>j.id===w.id)),g=v.filter(w=>x.find(j=>j.id===w.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:x,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...d.filter(w=>w.status!=="error")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[m,"onEnter"],[g,"onStay"]].forEach(([b,v])=>{b.forEach(x=>{var w,j;(j=(w=this.looseRoutesById[x.routeId].options)[v])==null||j.call(w,x)})})})}})}catch(l){Lr(l)?(n=l,this.isServer||this.navigate({...n,replace:!0,ignoreBlocker:!0})):De(l)&&(r=l),this.__store.setState(u=>({...u,statusCode:n?n.statusCode:r?404:u.matches.some(h=>h.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===o&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(i=>({...i,statusCode:404}))},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;typeof n=="object"&&this.isViewTransitionTypesSupported?r={update:s,types:n.types}:r=s,document.startViewTransition(r)}else s()},this.updateMatch=(s,n)=>{var r;let o;const i=(r=this.state.pendingMatches)==null?void 0:r.find(h=>h.id===s),c=this.state.matches.find(h=>h.id===s),l=this.state.cachedMatches.find(h=>h.id===s),u=i?"pendingMatches":c?"matches":l?"cachedMatches":"";return u&&this.__store.setState(h=>{var d;return{...h,[u]:(d=h[u])==null?void 0:d.map(m=>m.id===s?o=n(m):m)}}),o},this.getMatch=s=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(n=>n.id===s),this.loadMatches=async({location:s,matches:n,preload:r,onReady:o,updateMatch:i=this.updateMatch,sync:c})=>{let l,u=!1;const h=async()=>{u||(u=!0,await(o==null?void 0:o()))},d=g=>!!(r&&!this.state.matches.find(b=>b.id===g));!this.isServer&&!this.state.matches.length&&h();const m=(g,b)=>{var v,x,w,j;if(Lr(b)&&!b.reloadDocument)throw b;if(ss(b)||De(b)){if(i(g.id,A=>({...A,status:ss(b)?"redirected":De(b)?"notFound":"error",isFetching:!1,error:b,beforeLoadPromise:void 0,loaderPromise:void 0})),b.routeId||(b.routeId=g.routeId),(v=g.beforeLoadPromise)==null||v.resolve(),(x=g.loaderPromise)==null||x.resolve(),(w=g.loadPromise)==null||w.resolve(),ss(b))throw u=!0,b=this.resolveRedirect({...b,_fromLocation:s}),b;if(De(b))throw this._handleNotFound(n,b,{updateMatch:i}),(j=this.serverSsr)==null||j.onMatchSettled({router:this,match:this.getMatch(g.id)}),b}};try{await new Promise((g,b)=>{(async()=>{var v,x,w,j;try{const A=(P,O,S)=>{var _,F;const{id:T,routeId:I}=n[P],H=this.looseRoutesById[I];if(O instanceof Promise)throw O;O.routerCode=S,l=l??P,m(this.getMatch(T),O);try{(F=(_=H.options).onError)==null||F.call(_,O)}catch($){O=$,m(this.getMatch(T),O)}i(T,$=>{var q,Z;return(q=$.beforeLoadPromise)==null||q.resolve(),(Z=$.loadPromise)==null||Z.resolve(),{...$,error:O,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[P,{id:O,routeId:S}]of n.entries()){const _=this.getMatch(O),F=(v=n[P-1])==null?void 0:v.id,T=this.looseRoutesById[S],I=T.options.pendingMs??this.options.defaultPendingMs,H=!!(o&&!this.isServer&&!d(O)&&(T.options.loader||T.options.beforeLoad)&&typeof I=="number"&&I!==1/0&&(T.options.pendingComponent??((x=this.options)==null?void 0:x.defaultPendingComponent)));let $=!0;if((_.beforeLoadPromise||_.loaderPromise)&&(H&&setTimeout(()=>{try{h()}catch{}},I),await _.beforeLoadPromise,$=this.getMatch(O).status!=="success"),$){try{i(O,ce=>{const Y=ce.loadPromise;return{...ce,loadPromise:ws(()=>{Y==null||Y.resolve()}),beforeLoadPromise:ws()}});const q=new AbortController;let Z;H&&(Z=setTimeout(()=>{try{h()}catch{}},I));const{paramsError:B,searchError:z}=this.getMatch(O);B&&A(P,B,"PARSE_PARAMS"),z&&A(P,z,"VALIDATE_SEARCH");const G=()=>F?this.getMatch(F).context:this.options.context??{};i(O,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:q,pendingTimeout:Z,context:{...G(),...ce.__routeContext}}));const{search:X,params:J,context:be,cause:te}=this.getMatch(O),se=d(O),oe={search:X,abortController:q,params:J,preload:se,context:be,location:s,navigate:ce=>this.navigate({...ce,_fromLocation:s}),buildLocation:this.buildLocation,cause:se?"preload":te,matches:n},ae=await((j=(w=T.options).beforeLoad)==null?void 0:j.call(w,oe))??{};(ss(ae)||De(ae))&&A(P,ae,"BEFORE_LOAD"),i(O,ce=>({...ce,__beforeLoadContext:ae,context:{...G(),...ce.__routeContext,...ae},abortController:q}))}catch(q){A(P,q,"BEFORE_LOAD")}i(O,q=>{var Z;return(Z=q.beforeLoadPromise)==null||Z.resolve(),{...q,beforeLoadPromise:void 0,isFetching:!1}})}}const L=n.slice(0,l),N=[];L.forEach(({id:P,routeId:O},S)=>{N.push((async()=>{const{loaderPromise:_}=this.getMatch(P);let F=!1,T=!1;if(_){await _;const I=this.getMatch(P);I.error&&m(I,I.error)}else{const I=N[S-1],H=this.looseRoutesById[O],$=()=>{const{params:te,loaderDeps:se,abortController:oe,context:ae,cause:ce}=this.getMatch(P),Y=d(P);return{params:te,deps:se,preload:!!Y,parentMatchPromise:I,abortController:oe,context:ae,location:s,navigate:ie=>this.navigate({...ie,_fromLocation:s}),cause:Y?"preload":ce,route:H}},q=Date.now()-this.getMatch(P).updatedAt,Z=d(P),B=Z?H.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:H.options.staleTime??this.options.defaultStaleTime??0,z=H.options.shouldReload,G=typeof z=="function"?z($()):z;i(P,te=>({...te,loaderPromise:ws(),preload:!!Z&&!this.state.matches.find(se=>se.id===P)}));const X=async()=>{var te,se,oe,ae,ce,Y,ie,Je,Ne,Ye,Ie;try{const ke=async()=>{const fe=this.getMatch(P);fe.minPendingPromise&&await fe.minPendingPromise};try{this.loadRouteChunk(H),i(P,Xt=>({...Xt,isFetching:"loader"}));const fe=await((se=(te=H.options).loader)==null?void 0:se.call(te,$()));m(this.getMatch(P),fe),await H._lazyPromise,await ke();const we={matches:n,match:this.getMatch(P),params:this.getMatch(P).params,loaderData:fe},me=(ae=(oe=H.options).head)==null?void 0:ae.call(oe,we),At=me==null?void 0:me.meta,ct=me==null?void 0:me.links,On=me==null?void 0:me.scripts,ne=(Y=(ce=H.options).scripts)==null?void 0:Y.call(ce,we),le=(Je=(ie=H.options).headers)==null?void 0:Je.call(ie,{loaderData:fe});i(P,Xt=>({...Xt,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:fe,meta:At,links:ct,headScripts:On,headers:le,scripts:ne}))}catch(fe){let we=fe;await ke(),m(this.getMatch(P),fe);try{(Ye=(Ne=H.options).onError)==null||Ye.call(Ne,fe)}catch(me){we=me,m(this.getMatch(P),me)}i(P,me=>({...me,error:we,status:"error",isFetching:!1}))}(Ie=this.serverSsr)==null||Ie.onMatchSettled({router:this,match:this.getMatch(P)}),await H._componentsPromise}catch(ke){i(P,fe=>({...fe,loaderPromise:void 0})),m(this.getMatch(P),ke)}},{status:J,invalid:be}=this.getMatch(P);F=J==="success"&&(be||(G??q>B)),Z&&H.options.preload===!1||(F&&!c?(T=!0,(async()=>{try{await X();const{loaderPromise:te,loadPromise:se}=this.getMatch(P);te==null||te.resolve(),se==null||se.resolve(),i(P,oe=>({...oe,loaderPromise:void 0}))}catch(te){Lr(te)&&await this.navigate(te)}})()):(J!=="success"||F&&c)&&await X())}if(!T){const{loaderPromise:I,loadPromise:H}=this.getMatch(P);I==null||I.resolve(),H==null||H.resolve()}return i(P,I=>({...I,isFetching:T?I.isFetching:!1,loaderPromise:T?I.loaderPromise:void 0,invalid:!1})),this.getMatch(P)})())}),await Promise.all(N),g()}catch(A){b(A)}})()}),await h()}catch(g){if(ss(g)||De(g))throw De(g)&&!r&&await h(),g}return n},this.invalidate=s=>{const n=r=>{var o;return((o=s==null?void 0:s.filter)==null?void 0:o.call(s,r))??!0?{...r,invalid:!0,...r.status==="error"?{status:"pending",error:void 0}:{}}:r};return this.__store.setState(r=>{var o;return{...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(n)}}),this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const n=s;return n.href||(n.href=this.buildLocation(n).href),n},this.clearCache=s=>{const n=s==null?void 0:s.filter;n!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!n(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=n=>{const r=this.looseRoutesById[n.routeId];if(!r.options.loader)return!0;const o=(n.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(n.status!=="error"&&Date.now()-n.updatedAt<o)};this.clearCache({filter:s})},this.loadRouteChunk=s=>(s._lazyPromise===void 0&&(s.lazyFn?s._lazyPromise=s.lazyFn().then(n=>{const{id:r,...o}=n.options;Object.assign(s.options,o)}):s._lazyPromise=Promise.resolve()),s._componentsPromise===void 0&&(s._componentsPromise=s._lazyPromise.then(()=>Promise.all(uc.map(async n=>{const r=s.options[n];r!=null&&r.preload&&await r.preload()})))),s._componentsPromise),this.preloadRoute=async s=>{const n=this.buildLocation(s);let r=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:s});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),i=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);Mr(()=>{r.forEach(c=>{i.has(c.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,c]}))})});try{return r=await this.loadMatches({matches:r,location:n,preload:!0,updateMatch:(c,l)=>{o.has(c)?r=r.map(u=>u.id===c?l(u):u):this.updateMatch(c,l)}}),r}catch(c){if(ss(c))return c.reloadDocument?void 0:await this.preloadRoute({...c,_fromLocation:n});De(c)||console.error(c);return}},this.matchRoute=(s,n)=>{const r={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},o=this.buildLocation(r);if(n!=null&&n.pending&&this.state.status!=="pending")return!1;const c=((n==null?void 0:n.pending)===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=Hn(this.basepath,c.pathname,{...n,to:o.pathname});return!l||s.params&&!Cs(l,s.params,{partial:!0})?!1:l&&((n==null?void 0:n.includeSearch)??!0)?Cs(c.search,o.search,{partial:!0})?l:!1:l},this._handleNotFound=(s,n,{updateMatch:r=this.updateMatch}={})=>{var o;const i=this.routesById[n.routeId??""]??this.routeTree,c={};for(const u of s)c[u.routeId]=u;!i.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(i.options.notFoundComponent=this.options.defaultNotFoundComponent),ft(i.options.notFoundComponent);const l=c[i.id];ft(l,"Could not find match for route: "+i.id),r(l.id,u=>({...u,status:"notFound",error:n,isFetching:!1})),n.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(n.routeId=i.parentRoute.id,this._handleNotFound(s,n,{updateMatch:r}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(s=>s.status==="notFound"||s.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??kd,parseSearch:t.parseSearch??Ed}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,s){const{foundRoute:n,matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(t,s==null?void 0:s.dest);let i=!1;(n?n.path!=="/"&&o["**"]:is(t.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let d=r.length-1;d>=0;d--){const m=r[d];if(m.children)return m.id}return qe}})(),l=r.map(d=>{var m;let g;const b=((m=d.options.params)==null?void 0:m.parse)??d.options.parseParams;if(b)try{const v=b(o);Object.assign(o,v)}catch(v){if(g=new Nd(v.message,{cause:v}),s!=null&&s.throwOnError)throw g;return g}}),u=[],h=d=>(d==null?void 0:d.id)?d.context??this.options.context??{}:this.options.context??{};return r.forEach((d,m)=>{var g,b;const v=u[m-1],[x,w,j]=(()=>{const H=(v==null?void 0:v.search)??t.search,$=(v==null?void 0:v._strictSearch)??{};try{const q=Nr(d.options.validateSearch,{...H})??{};return[{...H,...q},{...$,...q},void 0]}catch(q){let Z=q;if(q instanceof sr||(Z=new sr(q.message,{cause:q})),s!=null&&s.throwOnError)throw Z;return[H,{},Z]}})(),A=((b=(g=d.options).loaderDeps)==null?void 0:b.call(g,{search:x}))??"",L=A?JSON.stringify(A):"",{usedParams:N,interpolatedPath:P}=Fn({path:d.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),O=Fn({path:d.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+L,S=this.getMatch(O),_=this.state.matches.find(H=>H.routeId===d.id),F=_?"stay":"enter";let T;if(S)T={...S,cause:F,params:_?Fe(_.params,o):o,_strictParams:N,search:Fe(_?_.search:S.search,x),_strictSearch:w};else{const H=d.options.loader||d.options.beforeLoad||d.lazyFn||Fd(d)?"pending":"success";T={id:O,index:m,routeId:d.id,params:_?Fe(_.params,o):o,_strictParams:N,pathname:gt([this.basepath,P]),updatedAt:Date.now(),search:_?Fe(_.search,x):x,_strictSearch:w,searchError:void 0,status:H,isFetching:!1,error:void 0,paramsError:l[m],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:_?Fe(_.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:d.options.staticData||{},loadPromise:ws(),fullPath:d.fullPath}}s!=null&&s.preload||(T.globalNotFound=c===d.id),T.searchError=j;const I=h(v);T.context={...I,...T.__routeContext,...T.__beforeLoadContext},u.push(T)}),u.forEach((d,m)=>{var g,b,v,x,w,j,A,L;const N=this.looseRoutesById[d.routeId];if(!this.getMatch(d.id)&&(s==null?void 0:s._buildLocation)!==!0){const O=u[m-1],S=h(O),_={deps:d.loaderDeps,params:d.params,context:S,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:d.cause,abortController:d.abortController,preload:!!d.preload,matches:u};d.__routeContext=((b=(g=N.options).context)==null?void 0:b.call(g,_))??{},d.context={...S,...d.__routeContext,...d.__beforeLoadContext}}if(d.status==="success"){d.headers=(x=(v=N.options).headers)==null?void 0:x.call(v,{loaderData:d.loaderData});const O={matches:u,match:d,params:d.params,loaderData:d.loaderData},S=(j=(w=N.options).head)==null?void 0:j.call(w,O);d.links=S==null?void 0:S.links,d.headScripts=S==null?void 0:S.scripts,d.meta=S==null?void 0:S.meta,d.scripts=(L=(A=N.options).scripts)==null?void 0:L.call(A,O)}}),u}}class sr extends Error{}class Nd extends Error{}function Id(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Nr(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new sr("Async validation not supported");if(s.issues)throw new sr(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const uc=["component","errorComponent","pendingComponent","notFoundComponent"];function Fd(e){var t;for(const s of uc)if((t=e.options[s])!=null&&t.preload)return!0;return!1}const Hd="Error preloading route! ☝️";class dc{constructor(t){if(this.init=s=>{var n,r;this.originalIndex=s.originalIndex;const o=this.options,i=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(r=(n=this.options).getParentRoute)==null?void 0:r.call(n),i)this._path=qe;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let c=i?qe:o==null?void 0:o.path;c&&c!=="/"&&(c=Ui(c));const l=(o==null?void 0:o.id)||c;let u=i?qe:gt([this.parentRoute.id===qe?"":this.parentRoute.id,l]);c===qe&&(c="/"),u!==qe&&(u=gt(["/",u]));const h=u===qe?"/":gt([this.parentRoute.fullPath,c]);this._path=c,this._id=u,this._fullPath=h,this._to=h,this._ssr=(o==null?void 0:o.ssr)??s.defaultSsr??!0},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.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class Td extends dc{constructor(t){super(t)}}function $i(e){const t=e.errorComponent??mr;return a.jsx(Dd,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:n})=>s?p.createElement(t,{error:s,reset:n}):e.children})}class Dd extends p.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,s){s.error&&s.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,s){this.props.onCatch&&this.props.onCatch(t,s)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function mr({error:e}){const[t,s]=p.useState(!1);return a.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[a.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),a.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:t?"Hide Error":"Show Error"})]}),a.jsx("div",{style:{height:".25rem"}}),t?a.jsx("div",{children:a.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?a.jsx("code",{children:e.message}):null})}):null]})}var Ir={exports:{}},Fr={},Hr={exports:{}},Tr={};/**
2
- * @license React
3
- * use-sync-external-store-shim.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Do;function Vd(){if(Do)return Tr;Do=1;var e=Na();function t(d,m){return d===m&&(d!==0||1/d===1/m)||d!==d&&m!==m}var s=typeof Object.is=="function"?Object.is:t,n=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function c(d,m){var g=m(),b=n({inst:{value:g,getSnapshot:m}}),v=b[0].inst,x=b[1];return o(function(){v.value=g,v.getSnapshot=m,l(v)&&x({inst:v})},[d,g,m]),r(function(){return l(v)&&x({inst:v}),d(function(){l(v)&&x({inst:v})})},[d]),i(g),g}function l(d){var m=d.getSnapshot;d=d.value;try{var g=m();return!s(d,g)}catch{return!0}}function u(d,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return Tr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Tr}var Vo;function Zd(){return Vo||(Vo=1,Hr.exports=Vd()),Hr.exports}/**
10
- * @license React
11
- * use-sync-external-store-shim/with-selector.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Zo;function Ud(){if(Zo)return Fr;Zo=1;var e=Na(),t=Zd();function s(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}var n=typeof Object.is=="function"?Object.is:s,r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,c=e.useMemo,l=e.useDebugValue;return Fr.useSyncExternalStoreWithSelector=function(u,h,d,m,g){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=c(function(){function w(P){if(!j){if(j=!0,A=P,P=m(P),g!==void 0&&v.hasValue){var O=v.value;if(g(O,P))return L=O}return L=P}if(O=L,n(A,P))return O;var S=m(P);return g!==void 0&&g(O,S)?(A=P,O):(A=P,L=S)}var j=!1,A,L,N=d===void 0?null:d;return[function(){return w(h())},N===null?void 0:function(){return w(N())}]},[h,d,m,g]);var x=r(u,b[0],b[1]);return i(function(){v.hasValue=!0,v.value=x},[x]),l(x),x},Fr}var Uo;function $d(){return Uo||(Uo=1,Ir.exports=Ud()),Ir.exports}var qd=$d();function Bd(e,t=s=>s){return qd.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,zd)}function zd(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!t.has(n)||!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(t,s[n])||!Object.is(e[s[n]],t[s[n]]))return!1;return!0}const Dr=p.createContext(null);function hc(){return typeof document>"u"?Dr:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Dr,Dr)}function Ze(e){const t=p.useContext(hc());return e==null||e.warn,t}function ye(e){const t=Ze({warn:(e==null?void 0:e.router)===void 0}),s=(e==null?void 0:e.router)||t,n=p.useRef(void 0);return Bd(s.__store,r=>{if(e!=null&&e.select){if(e.structuralSharing??s.options.defaultStructuralSharing){const o=Fe(n.current,e.select(r));return n.current=o,o}return e.select(r)}return r})}const gr=p.createContext(void 0),Wd=p.createContext(void 0);function Bt(e){const t=p.useContext(e.from?Wd:gr);return ye({select:n=>{const r=n.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(ft(!((e.shouldThrow??!0)&&!r),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),r!==void 0)return e.select?e.select(r):r},structuralSharing:e.structuralSharing})}function fc(e){return Bt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function pc(e){const{select:t,...s}=e;return Bt({...s,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function mc(e){return Bt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function gc(e){return Bt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function vc(e){const{navigate:t}=Ze();return p.useCallback(s=>t({from:e==null?void 0:e.from,...s}),[e==null?void 0:e.from,t])}let Kd=class extends dc{constructor(t){super(t),this.useMatch=s=>Bt({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>Bt({...s,from:this.id,select:n=>s!=null&&s.select?s.select(n.context):n.context}),this.useSearch=s=>gc({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>mc({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>pc({...s,from:this.id}),this.useLoaderData=s=>fc({...s,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Ri(e){return new Kd(e)}let Qd=class extends Td{constructor(t){super(t),this.useMatch=s=>Bt({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>Bt({...s,from:this.id,select:n=>s!=null&&s.select?s.select(n.context):n.context}),this.useSearch=s=>gc({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>mc({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>pc({...s,from:this.id}),this.useLoaderData=s=>fc({...s,from:this.id}),this.useNavigate=()=>vc({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Gd(e){return new Qd(e)}function Jd(e){const t=ye({select:s=>`not-found-${s.location.pathname}-${s.status}`});return a.jsx($i,{getResetKey:()=>t,onCatch:(s,n)=>{var r;if(De(s))(r=e.onCatch)==null||r.call(e,s,n);else throw s},errorComponent:({error:s})=>{var n;if(De(s))return(n=e.fallback)==null?void 0:n.call(e,s);throw s},children:e.children})}function Yd(){return a.jsx("p",{children:"Not Found"})}function zn(e){return a.jsx(a.Fragment,{children:e.children})}function yc(e,t,s){return t.options.notFoundComponent?a.jsx(t.options.notFoundComponent,{data:s}):e.options.defaultNotFoundComponent?a.jsx(e.options.defaultNotFoundComponent,{data:s}):a.jsx(Yd,{})}var Vr,$o;function Xd(){if($o)return Vr;$o=1;const e={},t=e.hasOwnProperty,s=(S,_)=>{for(const F in S)t.call(S,F)&&_(F,S[F])},n=(S,_)=>(_&&s(_,(F,T)=>{S[F]=T}),S),r=(S,_)=>{const F=S.length;let T=-1;for(;++T<F;)_(S[T])},o=S=>"\\u"+("0000"+S).slice(-4),i=(S,_)=>{let F=S.toString(16);return _?F:F.toUpperCase()},c=e.toString,l=Array.isArray,u=S=>typeof Buffer=="function"&&Buffer.isBuffer(S),h=S=>c.call(S)=="[object Object]",d=S=>typeof S=="string"||c.call(S)=="[object String]",m=S=>typeof S=="number"||c.call(S)=="[object Number]",g=S=>typeof S=="bigint",b=S=>typeof S=="function",v=S=>c.call(S)=="[object Map]",x=S=>c.call(S)=="[object Set]",w={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},j=/[\\\b\f\n\r\t]/,A=/[0-9]/,L=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,N=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,P=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,O=(S,_)=>{const F=()=>{B=Z,++_.indentLevel,Z=_.indent.repeat(_.indentLevel)},T={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},I=_&&_.json;I&&(T.quotes="double",T.wrap=!0),_=n(T,_),_.quotes!="single"&&_.quotes!="double"&&_.quotes!="backtick"&&(_.quotes="single");const H=_.quotes=="double"?'"':_.quotes=="backtick"?"`":"'",$=_.compact,q=_.lowercaseHex;let Z=_.indent.repeat(_.indentLevel),B="";const z=_.__inline1__,G=_.__inline2__,X=$?"":`
18
- `;let J,be=!0;const te=_.numbers=="binary",se=_.numbers=="octal",oe=_.numbers=="decimal",ae=_.numbers=="hexadecimal";if(I&&S&&b(S.toJSON)&&(S=S.toJSON()),!d(S)){if(v(S))return S.size==0?"new Map()":($||(_.__inline1__=!0,_.__inline2__=!1),"new Map("+O(Array.from(S),_)+")");if(x(S))return S.size==0?"new Set()":"new Set("+O(Array.from(S),_)+")";if(u(S))return S.length==0?"Buffer.from([])":"Buffer.from("+O(Array.from(S),_)+")";if(l(S))return J=[],_.wrap=!0,z&&(_.__inline1__=!1,_.__inline2__=!0),G||F(),r(S,Y=>{be=!1,G&&(_.__inline2__=!1),J.push(($||G?"":Z)+O(Y,_))}),be?"[]":G?"["+J.join(", ")+"]":"["+X+J.join(","+X)+X+($?"":B)+"]";if(m(S)||g(S)){if(I)return JSON.stringify(Number(S));let Y;if(oe)Y=String(S);else if(ae){let ie=S.toString(16);q||(ie=ie.toUpperCase()),Y="0x"+ie}else te?Y="0b"+S.toString(2):se&&(Y="0o"+S.toString(8));return g(S)?Y+"n":Y}else return g(S)?I?JSON.stringify(Number(S)):S+"n":h(S)?(J=[],_.wrap=!0,F(),s(S,(Y,ie)=>{be=!1,J.push(($?"":Z)+O(Y,_)+":"+($?"":" ")+O(ie,_))}),be?"{}":"{"+X+J.join(","+X)+X+($?"":B)+"}"):I?JSON.stringify(S)||"null":String(S)}const ce=_.escapeEverything?N:P;return J=S.replace(ce,(Y,ie,Je,Ne,Ye,Ie)=>{if(ie){if(_.minimal)return ie;const fe=ie.charCodeAt(0),we=ie.charCodeAt(1);if(_.es6){const me=(fe-55296)*1024+we-56320+65536;return"\\u{"+i(me,q)+"}"}return o(i(fe,q))+o(i(we,q))}if(Je)return o(i(Je.charCodeAt(0),q));if(Y=="\0"&&!I&&!A.test(Ie.charAt(Ye+1)))return"\\0";if(Ne)return Ne==H||_.escapeEverything?"\\"+Ne:Ne;if(j.test(Y))return w[Y];if(_.minimal&&!L.test(Y))return Y;const ke=i(Y.charCodeAt(0),q);return I||ke.length>2?o(ke):"\\x"+("00"+ke).slice(-2)}),H=="`"&&(J=J.replace(/\$\{/g,"\\${")),_.isScriptContext&&(J=J.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,I?"\\u003C!--":"\\x3C!--")),_.wrap&&(J=H+J+H),J};return O.version="3.0.2",Vr=O,Vr}Xd();function eh({children:e,log:t}){return typeof document<"u"?null:a.jsx("script",{className:"tsr-once",dangerouslySetInnerHTML:{__html:[e,"",'if (typeof __TSR_SSR__ !== "undefined") __TSR_SSR__.cleanScripts()'].filter(Boolean).join(`
19
- `)}})}function th(){const e=Ze(),s=(e.options.getScrollRestorationKey||Si)(e.latestLocation),n=s!==Si(e.latestLocation)?s:null;return!e.isScrollRestoring||!e.isServer?null:a.jsx(eh,{children:`(${lc.toString()})(${JSON.stringify(er)},${JSON.stringify(n)}, undefined, true)`,log:!1})}const bc=p.memo(function({matchId:t}){var s,n;const r=Ze(),o=ye({select:w=>{var j;return(j=w.matches.find(A=>A.id===t))==null?void 0:j.routeId}});ft(o);const i=r.routesById[o],c=i.options.pendingComponent??r.options.defaultPendingComponent,l=c?a.jsx(c,{}):null,u=i.options.errorComponent??r.options.defaultErrorComponent,h=i.options.onCatch??r.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??((s=r.options.notFoundRoute)==null?void 0:s.options.component):i.options.notFoundComponent,m=(!i.isRoot||i.options.wrapInSuspense)&&(i.options.wrapInSuspense??c??((n=i.options.errorComponent)==null?void 0:n.preload))?p.Suspense:zn,g=u?$i:zn,b=d?Jd:zn,v=ye({select:w=>w.loadedAt}),x=ye({select:w=>{var j;const A=w.matches.findIndex(L=>L.id===t);return(j=w.matches[A-1])==null?void 0:j.routeId}});return a.jsxs(a.Fragment,{children:[a.jsx(gr.Provider,{value:t,children:a.jsx(m,{fallback:l,children:a.jsx(g,{getResetKey:()=>v,errorComponent:u||mr,onCatch:(w,j)=>{if(De(w))throw w;h==null||h(w,j)},children:a.jsx(b,{fallback:w=>{if(!d||w.routeId&&w.routeId!==o||!w.routeId&&!i.isRoot)throw w;return p.createElement(d,w)},children:a.jsx(nh,{matchId:t})})})})}),x===qe&&r.options.scrollRestoration?a.jsxs(a.Fragment,{children:[a.jsx(sh,{}),a.jsx(th,{})]}):null]})});function sh(){var e;const t=Ze(),s=p.useRef(void 0);return a.jsx("script",{suppressHydrationWarning:!0,ref:n=>{var r;n&&(s.current===void 0||s.current.href!==((r=t.state.resolvedLocation)==null?void 0:r.href))&&(t.emit({type:"onRendered",...Ps(t.state)}),s.current=t.state.resolvedLocation)}},(e=t.state.resolvedLocation)==null?void 0:e.state.key)}const nh=p.memo(function({matchId:t}){var s,n,r;const o=Ze(),{match:i,key:c,routeId:l}=ye({select:m=>{const g=m.matches.findIndex(A=>A.id===t),b=m.matches[g],v=b.routeId,x=o.routesById[v].options.remountDeps??o.options.defaultRemountDeps,w=x==null?void 0:x({routeId:v,loaderDeps:b.loaderDeps,params:b._strictParams,search:b._strictSearch});return{key:w?JSON.stringify(w):void 0,routeId:v,match:_i(b,["id","status","error"])}},structuralSharing:!0}),u=o.routesById[l],h=p.useMemo(()=>{const m=u.options.component??o.options.defaultComponent;return m?a.jsx(m,{},c):a.jsx(qi,{})},[c,u.options.component,o.options.defaultComponent]),d=(u.options.errorComponent??o.options.defaultErrorComponent)||mr;if(i.status==="notFound")return ft(De(i.error)),yc(o,u,i.error);if(i.status==="redirected")throw ft(ss(i.error)),(s=o.getMatch(i.id))==null?void 0:s.loadPromise;if(i.status==="error"){if(o.isServer)return a.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}});throw i.error}if(i.status==="pending"){const m=u.options.pendingMinMs??o.options.defaultPendingMinMs;if(m&&!((n=o.getMatch(i.id))!=null&&n.minPendingPromise)&&!o.isServer){const g=ws();Promise.resolve().then(()=>{o.updateMatch(i.id,b=>({...b,minPendingPromise:g}))}),setTimeout(()=>{g.resolve(),o.updateMatch(i.id,b=>({...b,minPendingPromise:void 0}))},m)}throw(r=o.getMatch(i.id))==null?void 0:r.loadPromise}return h}),qi=p.memo(function(){const t=Ze(),s=p.useContext(gr),n=ye({select:u=>{var h;return(h=u.matches.find(d=>d.id===s))==null?void 0:h.routeId}}),r=t.routesById[n],o=ye({select:u=>{const d=u.matches.find(m=>m.id===s);return ft(d),d.globalNotFound}}),i=ye({select:u=>{var h;const d=u.matches,m=d.findIndex(g=>g.id===s);return(h=d[m+1])==null?void 0:h.id}});if(o)return yc(t,r,void 0);if(!i)return null;const c=a.jsx(bc,{matchId:i}),l=t.options.defaultPendingComponent?a.jsx(t.options.defaultPendingComponent,{}):null;return s===qe?a.jsx(p.Suspense,{fallback:l,children:c}):c}),fn=typeof window<"u"?p.useLayoutEffect:p.useEffect;function Zr(e){const t=p.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function rh(e,t,s={},n={}){const r=p.useRef(typeof IntersectionObserver=="function"),o=p.useRef(null);return p.useEffect(()=>{if(!(!e.current||!r.current||n.disabled))return o.current=new IntersectionObserver(([i])=>{t(i)},s),o.current.observe(e.current),()=>{var i;(i=o.current)==null||i.disconnect()}},[t,s,n.disabled,e]),o.current}function ih(e){const t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}function oh(){const e=Ze(),t=p.useRef({router:e,mounted:!1}),s=ye({select:({isLoading:d})=>d}),[n,r]=p.useState(!1),o=ye({select:d=>d.matches.some(m=>m.status==="pending"),structuralSharing:!0}),i=Zr(s),c=s||n||o,l=Zr(c),u=s||o,h=Zr(u);return e.isServer||(e.startTransition=d=>{r(!0),p.startTransition(()=>{d(),r(!1)})}),p.useEffect(()=>{const d=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return is(e.latestLocation.href)!==is(m.href)&&e.commitLocation({...m,replace:!0}),()=>{d()}},[e,e.history]),fn(()=>{if(typeof window<"u"&&e.clientSsr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),fn(()=>{i&&!s&&e.emit({type:"onLoad",...Ps(e.state)})},[i,e,s]),fn(()=>{h&&!u&&e.emit({type:"onBeforeRouteMount",...Ps(e.state)})},[u,h,e]),fn(()=>{l&&!c&&(e.emit({type:"onResolved",...Ps(e.state)}),e.__store.setState(d=>({...d,status:"idle",resolvedLocation:d.location})),jd(e))},[c,l,e]),null}function ah(){const e=Ze(),t=e.options.defaultPendingComponent?a.jsx(e.options.defaultPendingComponent,{}):null,s=e.isServer||typeof document<"u"&&e.clientSsr?zn:p.Suspense,n=a.jsxs(s,{fallback:t,children:[a.jsx(oh,{}),a.jsx(ch,{})]});return e.options.InnerWrap?a.jsx(e.options.InnerWrap,{children:n}):n}function ch(){const e=ye({select:s=>{var n;return(n=s.matches[0])==null?void 0:n.id}}),t=ye({select:s=>s.loadedAt});return a.jsx(gr.Provider,{value:e,children:a.jsx($i,{getResetKey:()=>t,errorComponent:mr,onCatch:s=>{s.message||s.toString()},children:e?a.jsx(bc,{matchId:e}):null})})}function lh(e){return ye({select:t=>{const s=t.matches;return e!=null&&e.select?e.select(s):s},structuralSharing:e==null?void 0:e.structuralSharing})}function uh(e,t){const s=Ze(),[n,r]=p.useState(!1),o=p.useRef(!1),i=ih(t),{activeProps:c=()=>({className:"active"}),inactiveProps:l=()=>({}),activeOptions:u,to:h,preload:d,preloadDelay:m,hashScrollIntoView:g,replace:b,startTransition:v,resetScroll:x,viewTransition:w,children:j,target:A,disabled:L,style:N,className:P,onClick:O,onFocus:S,onMouseEnter:_,onMouseLeave:F,onTouchStart:T,ignoreBlocker:I,...H}=e,{params:$,search:q,hash:Z,state:B,mask:z,reloadDocument:G,...X}=H,J=p.useMemo(()=>{try{return new URL(`${h}`),"external"}catch{}return"internal"},[h]),be=ye({select:ne=>ne.location.search,structuralSharing:!0}),te=lh({select:ne=>{var le;return e.from??((le=ne[ne.length-1])==null?void 0:le.fullPath)}}),se=p.useMemo(()=>({...e,from:te}),[e,te]),oe=p.useMemo(()=>s.buildLocation(se),[s,se,be]),ae=p.useMemo(()=>se.reloadDocument?!1:d??s.options.defaultPreload,[s.options.defaultPreload,d,se.reloadDocument]),ce=m??s.options.defaultPreloadDelay??0,Y=ye({select:ne=>{if(u!=null&&u.exact){if(!bd(ne.location.pathname,oe.pathname,s.basepath))return!1}else{const le=Yn(ne.location.pathname,s.basepath).split("/");if(!Yn(oe.pathname,s.basepath).split("/").every((Hl,Tl)=>Hl===le[Tl]))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!Cs(ne.location.search,oe.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?ne.location.hash===oe.hash:!0}}),ie=p.useCallback(()=>{s.preloadRoute(se).catch(ne=>{console.warn(ne),console.warn(Hd)})},[se,s]),Je=p.useCallback(ne=>{ne!=null&&ne.isIntersecting&&ie()},[ie]);if(rh(i,Je,{rootMargin:"100px"},{disabled:!!L||ae!=="viewport"}),fn(()=>{o.current||!L&&ae==="render"&&(ie(),o.current=!0)},[L,ie,ae]),J==="external")return{...X,ref:i,type:J,href:h,...j&&{children:j},...A&&{target:A},...L&&{disabled:L},...N&&{style:N},...P&&{className:P},...O&&{onClick:O},...S&&{onFocus:S},..._&&{onMouseEnter:_},...F&&{onMouseLeave:F},...T&&{onTouchStart:T}};const Ne=ne=>{if(!L&&!dh(ne)&&!ne.defaultPrevented&&(!A||A==="_self")&&ne.button===0){ne.preventDefault(),Fa.flushSync(()=>{r(!0)});const le=s.subscribe("onResolved",()=>{le(),r(!1)});return s.navigate({...se,replace:b,resetScroll:x,hashScrollIntoView:g,startTransition:v,viewTransition:w,ignoreBlocker:I})}},Ye=ne=>{L||ae&&ie()},Ie=Ye,ke=ne=>{if(L)return;const le=ne.target||{};if(ae){if(le.preloadTimeout)return;le.preloadTimeout=setTimeout(()=>{le.preloadTimeout=null,ie()},ce)}},fe=ne=>{if(L)return;const le=ne.target||{};le.preloadTimeout&&(clearTimeout(le.preloadTimeout),le.preloadTimeout=null)},we=ne=>le=>{var Xt;(Xt=le.persist)==null||Xt.call(le),ne.filter(Boolean).forEach(So=>{le.defaultPrevented||So(le)})},me=Y?rs(c,{})??{}:{},At=Y?{}:rs(l,{}),ct=[P,me.className,At.className].filter(Boolean).join(" "),On={...N,...me.style,...At.style};return{...X,...me,...At,href:L?void 0:oe.maskedLocation?s.history.createHref(oe.maskedLocation.href):s.history.createHref(oe.href),ref:i,onClick:we([O,Ne]),onFocus:we([S,Ye]),onMouseEnter:we([_,ke]),onMouseLeave:we([F,fe]),onTouchStart:we([T,Ie]),disabled:!!L,target:A,...Object.keys(On).length&&{style:On},...ct&&{className:ct},...L&&{role:"link","aria-disabled":!0},...Y&&{"data-status":"active","aria-current":"page"},...n&&{"data-transitioning":"transitioning"}}}const nr=p.forwardRef((e,t)=>{const{_asChild:s,...n}=e,{type:r,ref:o,...i}=uh(n,t),c=typeof n.children=="function"?n.children({isActive:i["data-status"]==="active"}):n.children;return typeof s>"u"&&delete i.disabled,p.createElement(s||"a",{...i,ref:o},c)});function dh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const hh=e=>new fh(e);class fh extends Ld{constructor(t){super(t)}}function ph({router:e,children:t,...s}){e.update({...e.options,...s,context:{...e.options.context,...s.context}});const n=hc(),r=a.jsx(n.Provider,{value:e,children:t});return e.options.Wrap?a.jsx(e.options.Wrap,{children:r}):r}function mh({router:e,...t}){return a.jsx(ph,{router:e,...t,children:a.jsx(ah,{})})}const gh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),p.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),vh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),p.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),yh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z",opacity:"0.2"}),p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"}))]]),bh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,187a113.4,113.4,0,0,1-20.39-35h40.82a116.94,116.94,0,0,1-10,20.77A108.61,108.61,0,0,1,128,207Zm-26.49-59a135.42,135.42,0,0,1,0-40h53a135.42,135.42,0,0,1,0,40ZM44,128a83.49,83.49,0,0,1,2.43-20H77.25a160.63,160.63,0,0,0,0,40H46.43A83.49,83.49,0,0,1,44,128Zm84-79a113.4,113.4,0,0,1,20.39,35H107.59a116.94,116.94,0,0,1,10-20.77A108.61,108.61,0,0,1,128,49Zm50.73,59h30.82a83.52,83.52,0,0,1,0,40H178.75a160.63,160.63,0,0,0,0-40Zm20.77-24H173.71a140.82,140.82,0,0,0-15.5-34.36A84.51,84.51,0,0,1,199.52,84ZM97.79,49.64A140.82,140.82,0,0,0,82.29,84H56.48A84.51,84.51,0,0,1,97.79,49.64ZM56.48,172H82.29a140.82,140.82,0,0,0,15.5,34.36A84.51,84.51,0,0,1,56.48,172Zm101.73,34.36A140.82,140.82,0,0,0,173.71,172h25.81A84.51,84.51,0,0,1,158.21,206.36Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm78.36,64H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM216,128a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM128,43a115.27,115.27,0,0,1,26,45H102A115.11,115.11,0,0,1,128,43ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48Zm50.35,61.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm81.57,64H169.19a132.58,132.58,0,0,0-25.73-50.67A90.29,90.29,0,0,1,209.57,90ZM218,128a89.7,89.7,0,0,1-3.83,26H171.81a155.43,155.43,0,0,0,0-52h42.36A89.7,89.7,0,0,1,218,128Zm-90,87.83a110,110,0,0,1-15.19-19.45A124.24,124.24,0,0,1,99.35,166h57.3a124.24,124.24,0,0,1-13.46,30.38A110,110,0,0,1,128,215.83ZM96.45,154a139.18,139.18,0,0,1,0-52h63.1a139.18,139.18,0,0,1,0,52ZM38,128a89.7,89.7,0,0,1,3.83-26H84.19a155.43,155.43,0,0,0,0,52H41.83A89.7,89.7,0,0,1,38,128Zm90-87.83a110,110,0,0,1,15.19,19.45A124.24,124.24,0,0,1,156.65,90H99.35a124.24,124.24,0,0,1,13.46-30.38A110,110,0,0,1,128,40.17Zm-15.46-.84A132.58,132.58,0,0,0,86.81,90H46.43A90.29,90.29,0,0,1,112.54,39.33ZM46.43,166H86.81a132.58,132.58,0,0,0,25.73,50.67A90.29,90.29,0,0,1,46.43,166Zm97,50.67A132.58,132.58,0,0,0,169.19,166h40.38A90.29,90.29,0,0,1,143.46,216.67Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,24h0A104,104,0,1,0,232,128,104.12,104.12,0,0,0,128,24Zm88,104a87.61,87.61,0,0,1-3.33,24H174.16a157.44,157.44,0,0,0,0-48h38.51A87.61,87.61,0,0,1,216,128ZM102,168H154a115.11,115.11,0,0,1-26,45A115.27,115.27,0,0,1,102,168Zm-3.9-16a140.84,140.84,0,0,1,0-48h59.88a140.84,140.84,0,0,1,0,48ZM40,128a87.61,87.61,0,0,1,3.33-24H81.84a157.44,157.44,0,0,0,0,48H43.33A87.61,87.61,0,0,1,40,128ZM154,88H102a115.11,115.11,0,0,1,26-45A115.27,115.27,0,0,1,154,88Zm52.33,0H170.71a135.28,135.28,0,0,0-22.3-45.6A88.29,88.29,0,0,1,206.37,88ZM107.59,42.4A135.28,135.28,0,0,0,85.29,88H49.63A88.29,88.29,0,0,1,107.59,42.4ZM49.63,168H85.29a135.28,135.28,0,0,0,22.3,45.6A88.29,88.29,0,0,1,49.63,168Zm98.78,45.6a135.28,135.28,0,0,0,22.3-45.6h35.66A88.29,88.29,0,0,1,148.41,213.6Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M128,28h0A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,190.61c-6.33-6.09-23-24.41-31.27-54.61h62.54C151,194.2,134.33,212.52,128,218.61ZM94.82,156a140.42,140.42,0,0,1,0-56h66.36a140.42,140.42,0,0,1,0,56ZM128,37.39c6.33,6.09,23,24.41,31.27,54.61H96.73C105,61.8,121.67,43.48,128,37.39ZM169.41,100h46.23a92.09,92.09,0,0,1,0,56H169.41a152.65,152.65,0,0,0,0-56Zm43.25-8h-45a129.39,129.39,0,0,0-29.19-55.4A92.25,92.25,0,0,1,212.66,92ZM117.54,36.6A129.39,129.39,0,0,0,88.35,92h-45A92.25,92.25,0,0,1,117.54,36.6ZM40.36,100H86.59a152.65,152.65,0,0,0,0,56H40.36a92.09,92.09,0,0,1,0-56Zm3,64h45a129.39,129.39,0,0,0,29.19,55.4A92.25,92.25,0,0,1,43.34,164Zm95.12,55.4A129.39,129.39,0,0,0,167.65,164h45A92.25,92.25,0,0,1,138.46,219.4Z"}))]]),wh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H52V121.65l76-76,76,76Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,120v96H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z",opacity:"0.2"}),p.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224,120v96a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a15.87,15.87,0,0,1,4.69-11.32l80-80a16,16,0,0,1,22.62,0l80,80A15.87,15.87,0,0,1,224,120Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6H216a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8H216a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H48V120l80-80,80,80Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4H216a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"}))]]),xh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z",opacity:"0.2"}),p.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"}))]]),_h=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M235.79,142.88a12,12,0,0,0,4.7-19.87L125,7.52a12,12,0,0,0-17,0L70.25,45.29,48.48,23.52a12,12,0,0,0-17,17L53.28,62.26,12.2,103.35a28,28,0,0,0,0,39.6l84.86,84.86a28,28,0,0,0,39.6,0L214.48,150Zm-31.58-14.77a12,12,0,0,0-4.7,2.9l-79.82,79.83a4,4,0,0,1-5.66,0L29.17,126a4,4,0,0,1,0-5.66L70.25,79.24l24.29,24.29a32,32,0,0,0,52.09,35.11h0a32,32,0,0,0-35.12-52.08L87.23,62.26,116.52,33l93.27,93.28Zm-85.87-17.75,0,0a8,8,0,1,1-.06.06ZM256,208a24,24,0,0,1-48,0c0-19.44,12.93-37.23,14.4-39.2a12,12,0,0,1,19.2,0C243.07,170.78,256,188.57,256,208Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M248,208a16,16,0,0,1-32,0c0-16,16-40,16-40S248,192,248,208Zm-16-76.52-24,8-79.83,79.83a16,16,0,0,1-22.63,0L20.69,134.46a16,16,0,0,1,0-22.63L116.52,16Zm-93.86-29.62a20,20,0,1,0,0,28.28A20,20,0,0,0,138.14,101.86Z",opacity:"0.2"}),p.createElement("path",{d:"M238.66,163.56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Zm2.53-76.93a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M256,208a24,24,0,0,1-48,0c0-17.91,15.57-41.77,17.34-44.44a8,8,0,0,1,13.32,0C240.43,166.23,256,190.09,256,208ZM132.49,124.49a12,12,0,0,0-17-17l0,0s0,0,0,0a12,12,0,0,0,17,16.94ZM37.65,18.34A8,8,0,0,0,26.34,29.66l32.6,32.6L70.25,51ZM234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51l40.43,40.42a28,28,0,1,1-11.31,11.32L58.94,62.26,15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M237,164.67a6,6,0,0,0-10,0c-.7,1-17,25.72-17,43.33a22,22,0,0,0,44,0C254,190.39,237.69,165.71,237,164.67ZM232,218a10,10,0,0,1-10-10c0-8.17,5.37-19.92,10-28.34,4.63,8.41,10,20.15,10,28.34A10,10,0,0,1,232,218Zm1.9-80.82a6,6,0,0,0,2.34-9.94L120.76,11.76a6,6,0,0,0-8.49,0l-42,42-26-26a6,6,0,0,0-8.49,8.48l26,26L16.44,107.59a22,22,0,0,0,0,31.11l84.86,84.86a22,22,0,0,0,31.11,0l78.83-78.83Zm-30.14-1.94-79.83,79.83a10,10,0,0,1-14.14,0L24.93,130.21a10,10,0,0,1,0-14.14L70.25,70.75l31.62,31.61a26,26,0,0,0,3.75,32,26,26,0,0,0,36.76,0h0a26,26,0,0,0-32-40.51L78.74,62.26l37.78-37.77L220.89,128.86l-14.79,4.93A6.07,6.07,0,0,0,203.76,135.24ZM114.1,106.11l0,0a14,14,0,1,1,0,19.82,13.91,13.91,0,0,1,0-19.82Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M234.53,139.07a8,8,0,0,0,3.13-13.24L122.17,10.34a8,8,0,0,0-11.31,0L70.25,51,45.65,26.34A8,8,0,0,0,34.34,37.66l24.6,24.6L15,106.17a24,24,0,0,0,0,33.94L99.89,225a24,24,0,0,0,33.94,0l78.49-78.49Zm-32.19-5.24-79.83,79.83a8,8,0,0,1-11.31,0L26.34,128.8a8,8,0,0,1,0-11.31L70.25,73.57l29.12,29.12a28,28,0,1,0,11.31-11.32L81.57,62.26l35-34.95L217.19,128l-11.72,3.9A8.09,8.09,0,0,0,202.34,133.83Zm-86.83-26.31,0,0a13.26,13.26,0,1,1-.05.06S115.51,107.53,115.51,107.52Zm123.15,56a8,8,0,0,0-13.32,0C223.57,166.23,208,190.09,208,208a24,24,0,0,0,48,0C256,190.09,240.43,166.23,238.66,163.56ZM232,216a8,8,0,0,1-8-8c0-6.8,4-16.32,8-24.08,4,7.76,8,17.34,8,24.08A8,8,0,0,1,232,216Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M235.33,165.78a4,4,0,0,0-6.66,0C228,166.8,212,191,212,208a20,20,0,0,0,40,0C252,191,236,166.8,235.33,165.78ZM232,220a12,12,0,0,1-12-12c0-10.25,7.49-24.64,12-32.37,4.51,7.73,12,22.1,12,32.37A12,12,0,0,1,232,220Zm3.89-87.6a4,4,0,0,0-1.06-3.74L119.34,13.17a4,4,0,0,0-5.65,0L70.25,56.6,42.82,29.17a4,4,0,0,0-5.65,5.66L64.6,62.26,17.86,109a20,20,0,0,0,0,28.29l84.85,84.85a20,20,0,0,0,28.29,0L210.16,143l23.1-7.7A4,4,0,0,0,235.89,132.4Zm-29.15,3.29a4.06,4.06,0,0,0-1.57,1l-79.83,79.82a12,12,0,0,1-17,0L23.51,131.63a12,12,0,0,1,0-17L70.25,67.92l34.2,34.2A24,24,0,0,0,141,133h0a24,24,0,0,0-30.86-36.51l-34.2-34.2,40.61-40.6L224.59,129.74Zm-94.05-31a0,0,0,0,0,0,0,16,16,0,1,1,0,22.64,16,16,0,0,1,0-22.64Z"}))]]),Sh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),Rh=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z",opacity:"0.2"}),p.createElement("path",{d:"M120,136V96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,48a12,12,0,1,0-12-12A12,12,0,0,0,128,184ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40ZM120,96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M122,136V96a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm6,26a10,10,0,1,0,10,10A10,10,0,0,0,128,162ZM222,56v56c0,51.94-25.12,83.4-46.2,100.64-22.73,18.6-45.27,24.89-46.22,25.15a6,6,0,0,1-3.16,0c-1-.26-23.49-6.55-46.22-25.15C59.12,195.4,34,163.94,34,112V56A14,14,0,0,1,48,42H208A14,14,0,0,1,222,56Zm-12,0a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2v56c0,37.75,13.94,68.39,41.44,91.06A130.94,130.94,0,0,0,128,225.72a131.17,131.17,0,0,0,40.56-22.66C196.06,180.39,210,149.75,210,112Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M120,136V96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,48a12,12,0,1,0-12-12A12,12,0,0,0,128,184ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M124,136V96a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm4,28a8,8,0,1,0,8,8A8,8,0,0,0,128,164ZM220,56v56c0,51.16-24.73,82.12-45.47,99.1-22.4,18.32-44.55,24.5-45.48,24.76a4,4,0,0,1-2.1,0c-.93-.26-23.08-6.44-45.48-24.76C60.73,194.12,36,163.16,36,112V56A12,12,0,0,1,48,44H208A12,12,0,0,1,220,56Zm-8,0a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4v56c0,38.44,14.23,69.63,42.29,92.71A132.23,132.23,0,0,0,128,227.82a132.45,132.45,0,0,0,41.71-23.11C197.77,181.63,212,150.44,212,112Z"}))]]),wc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:gh}));wc.displayName="ArrowLeftIcon";const xc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:vh}));xc.displayName="CopyIcon";const _c=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:yh}));_c.displayName="DevicesIcon";const Sc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:bh}));Sc.displayName="GlobeIcon";const Rc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:wh}));Rc.displayName="HouseSimpleIcon";const Ac=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:xh}));Ac.displayName="LockIcon";const jc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:_h}));jc.displayName="PaintBucketIcon";const Cc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:Sh}));Cc.displayName="PaperPlaneTiltIcon";const Pc=p.forwardRef((e,t)=>p.createElement(_t,{ref:t,...e,weights:Rh}));Pc.displayName="ShieldWarningIcon";function Ah(){return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-contrast-0 p-5"}),a.jsx("div",{className:"bg-contrast-25 p-5"}),a.jsx("div",{className:"bg-contrast-50 p-5"}),a.jsx("div",{className:"bg-contrast-100 p-5"}),a.jsx("div",{className:"bg-contrast-200 p-5"}),a.jsx("div",{className:"bg-contrast-300 p-5"}),a.jsx("div",{className:"bg-contrast-400 p-5"}),a.jsx("div",{className:"bg-contrast-500 p-5"}),a.jsx("div",{className:"bg-contrast-600 p-5"}),a.jsx("div",{className:"bg-contrast-700 p-5"}),a.jsx("div",{className:"bg-contrast-800 p-5"}),a.jsx("div",{className:"bg-contrast-900 p-5"}),a.jsx("div",{className:"bg-contrast-950 p-5"}),a.jsx("div",{className:"bg-contrast-975 p-5"}),a.jsx("div",{className:"bg-contrast-1000 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-primary-25 p-5"}),a.jsx("div",{className:"bg-primary-50 p-5"}),a.jsx("div",{className:"bg-primary-100 p-5"}),a.jsx("div",{className:"bg-primary-200 p-5"}),a.jsx("div",{className:"bg-primary-300 p-5"}),a.jsx("div",{className:"bg-primary-400 p-5"}),a.jsx("div",{className:"bg-primary-500 p-5"}),a.jsx("div",{className:"bg-primary-600 p-5"}),a.jsx("div",{className:"bg-primary-700 p-5"}),a.jsx("div",{className:"bg-primary-800 p-5"}),a.jsx("div",{className:"bg-primary-900 p-5"}),a.jsx("div",{className:"bg-primary-950 p-5"}),a.jsx("div",{className:"bg-primary-975 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-error-25 p-5"}),a.jsx("div",{className:"bg-error-50 p-5"}),a.jsx("div",{className:"bg-error-100 p-5"}),a.jsx("div",{className:"bg-error-200 p-5"}),a.jsx("div",{className:"bg-error-300 p-5"}),a.jsx("div",{className:"bg-error-400 p-5"}),a.jsx("div",{className:"bg-error-500 p-5"}),a.jsx("div",{className:"bg-error-600 p-5"}),a.jsx("div",{className:"bg-error-700 p-5"}),a.jsx("div",{className:"bg-error-800 p-5"}),a.jsx("div",{className:"bg-error-900 p-5"}),a.jsx("div",{className:"bg-error-950 p-5"}),a.jsx("div",{className:"bg-error-975 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-warning-25 p-5"}),a.jsx("div",{className:"bg-warning-50 p-5"}),a.jsx("div",{className:"bg-warning-100 p-5"}),a.jsx("div",{className:"bg-warning-200 p-5"}),a.jsx("div",{className:"bg-warning-300 p-5"}),a.jsx("div",{className:"bg-warning-400 p-5"}),a.jsx("div",{className:"bg-warning-500 p-5"}),a.jsx("div",{className:"bg-warning-600 p-5"}),a.jsx("div",{className:"bg-warning-700 p-5"}),a.jsx("div",{className:"bg-warning-800 p-5"}),a.jsx("div",{className:"bg-warning-900 p-5"}),a.jsx("div",{className:"bg-warning-950 p-5"}),a.jsx("div",{className:"bg-warning-975 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-info-25 p-5"}),a.jsx("div",{className:"bg-info-50 p-5"}),a.jsx("div",{className:"bg-info-100 p-5"}),a.jsx("div",{className:"bg-info-200 p-5"}),a.jsx("div",{className:"bg-info-300 p-5"}),a.jsx("div",{className:"bg-info-400 p-5"}),a.jsx("div",{className:"bg-info-500 p-5"}),a.jsx("div",{className:"bg-info-600 p-5"}),a.jsx("div",{className:"bg-info-700 p-5"}),a.jsx("div",{className:"bg-info-800 p-5"}),a.jsx("div",{className:"bg-info-900 p-5"}),a.jsx("div",{className:"bg-info-950 p-5"}),a.jsx("div",{className:"bg-info-975 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-success-25 p-5"}),a.jsx("div",{className:"bg-success-50 p-5"}),a.jsx("div",{className:"bg-success-100 p-5"}),a.jsx("div",{className:"bg-success-200 p-5"}),a.jsx("div",{className:"bg-success-300 p-5"}),a.jsx("div",{className:"bg-success-400 p-5"}),a.jsx("div",{className:"bg-success-500 p-5"}),a.jsx("div",{className:"bg-success-600 p-5"}),a.jsx("div",{className:"bg-success-700 p-5"}),a.jsx("div",{className:"bg-success-800 p-5"}),a.jsx("div",{className:"bg-success-900 p-5"}),a.jsx("div",{className:"bg-success-950 p-5"}),a.jsx("div",{className:"bg-success-975 p-5"})]}),a.jsxs("div",{className:"flex items-center justify-center",children:[a.jsx("div",{className:"bg-primary text-primary-contrast p-5",children:"Az"}),a.jsx("div",{className:"bg-error text-error-contrast p-5",children:"Az"}),a.jsx("div",{className:"bg-warning text-warning-contrast p-5",children:"Az"}),a.jsx("div",{className:"bg-success text-success-contrast p-5",children:"Az"})]})]})}const jh=["top","right","bottom","left"],zt=Math.min,Me=Math.max,rr=Math.round,Tn=Math.floor,it=e=>({x:e,y:e}),Ch={left:"right",right:"left",bottom:"top",top:"bottom"},Ph={start:"end",end:"start"};function Ai(e,t,s){return Me(e,zt(t,s))}function bt(e,t){return typeof e=="function"?e(t):e}function wt(e){return e.split("-")[0]}function Xs(e){return e.split("-")[1]}function Bi(e){return e==="x"?"y":"x"}function zi(e){return e==="y"?"height":"width"}function Wt(e){return["top","bottom"].includes(wt(e))?"y":"x"}function Wi(e){return Bi(Wt(e))}function Eh(e,t,s){s===void 0&&(s=!1);const n=Xs(e),r=Wi(e),o=zi(r);let i=r==="x"?n===(s?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ir(i)),[i,ir(i)]}function kh(e){const t=ir(e);return[ji(e),t,ji(t)]}function ji(e){return e.replace(/start|end/g,t=>Ph[t])}function Mh(e,t,s){const n=["left","right"],r=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return s?t?r:n:t?n:r;case"left":case"right":return t?o:i;default:return[]}}function Oh(e,t,s,n){const r=Xs(e);let o=Mh(wt(e),s==="start",n);return r&&(o=o.map(i=>i+"-"+r),t&&(o=o.concat(o.map(ji)))),o}function ir(e){return e.replace(/left|right|bottom|top/g,t=>Ch[t])}function Lh(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ec(e){return typeof e!="number"?Lh(e):{top:e,right:e,bottom:e,left:e}}function or(e){const{x:t,y:s,width:n,height:r}=e;return{width:n,height:r,top:s,left:t,right:t+n,bottom:s+r,x:t,y:s}}function qo(e,t,s){let{reference:n,floating:r}=e;const o=Wt(t),i=Wi(t),c=zi(i),l=wt(t),u=o==="y",h=n.x+n.width/2-r.width/2,d=n.y+n.height/2-r.height/2,m=n[c]/2-r[c]/2;let g;switch(l){case"top":g={x:h,y:n.y-r.height};break;case"bottom":g={x:h,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:d};break;case"left":g={x:n.x-r.width,y:d};break;default:g={x:n.x,y:n.y}}switch(Xs(t)){case"start":g[i]-=m*(s&&u?-1:1);break;case"end":g[i]+=m*(s&&u?-1:1);break}return g}const Nh=async(e,t,s)=>{const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i}=s,c=o.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:h,y:d}=qo(u,n,l),m=n,g={},b=0;for(let v=0;v<c.length;v++){const{name:x,fn:w}=c[v],{x:j,y:A,data:L,reset:N}=await w({x:h,y:d,initialPlacement:n,placement:m,strategy:r,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});h=j??h,d=A??d,g={...g,[x]:{...g[x],...L}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(m=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):N.rects),{x:h,y:d}=qo(u,m,l)),v=-1)}return{x:h,y:d,placement:m,strategy:r,middlewareData:g}};async function wn(e,t){var s;t===void 0&&(t={});const{x:n,y:r,platform:o,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:h="viewport",elementContext:d="floating",altBoundary:m=!1,padding:g=0}=bt(t,e),b=Ec(g),x=c[m?d==="floating"?"reference":"floating":d],w=or(await o.getClippingRect({element:(s=await(o.isElement==null?void 0:o.isElement(x)))==null||s?x:x.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:h,strategy:l})),j=d==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),L=await(o.isElement==null?void 0:o.isElement(A))?await(o.getScale==null?void 0:o.getScale(A))||{x:1,y:1}:{x:1,y:1},N=or(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:j,offsetParent:A,strategy:l}):j);return{top:(w.top-N.top+b.top)/L.y,bottom:(N.bottom-w.bottom+b.bottom)/L.y,left:(w.left-N.left+b.left)/L.x,right:(N.right-w.right+b.right)/L.x}}const Ih=e=>({name:"arrow",options:e,async fn(t){const{x:s,y:n,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:h=0}=bt(e,t)||{};if(u==null)return{};const d=Ec(h),m={x:s,y:n},g=Wi(r),b=zi(g),v=await i.getDimensions(u),x=g==="y",w=x?"top":"left",j=x?"bottom":"right",A=x?"clientHeight":"clientWidth",L=o.reference[b]+o.reference[g]-m[g]-o.floating[b],N=m[g]-o.reference[g],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let O=P?P[A]:0;(!O||!await(i.isElement==null?void 0:i.isElement(P)))&&(O=c.floating[A]||o.floating[b]);const S=L/2-N/2,_=O/2-v[b]/2-1,F=zt(d[w],_),T=zt(d[j],_),I=F,H=O-v[b]-T,$=O/2-v[b]/2+S,q=Ai(I,$,H),Z=!l.arrow&&Xs(r)!=null&&$!==q&&o.reference[b]/2-($<I?F:T)-v[b]/2<0,B=Z?$<I?$-I:$-H:0;return{[g]:m[g]+B,data:{[g]:q,centerOffset:$-q-B,...Z&&{alignmentOffset:B}},reset:Z}}}),Fh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var s,n;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:h=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...x}=bt(e,t);if((s=o.arrow)!=null&&s.alignmentOffset)return{};const w=wt(r),j=Wt(c),A=wt(c)===c,L=await(l.isRTL==null?void 0:l.isRTL(u.floating)),N=m||(A||!v?[ir(c)]:kh(c)),P=b!=="none";!m&&P&&N.push(...Oh(c,v,b,L));const O=[c,...N],S=await wn(t,x),_=[];let F=((n=o.flip)==null?void 0:n.overflows)||[];if(h&&_.push(S[w]),d){const $=Eh(r,i,L);_.push(S[$[0]],S[$[1]])}if(F=[...F,{placement:r,overflows:_}],!_.every($=>$<=0)){var T,I;const $=(((T=o.flip)==null?void 0:T.index)||0)+1,q=O[$];if(q)return{data:{index:$,overflows:F},reset:{placement:q}};let Z=(I=F.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:I.placement;if(!Z)switch(g){case"bestFit":{var H;const B=(H=F.filter(z=>{if(P){const G=Wt(z.placement);return G===j||G==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(G=>G>0).reduce((G,X)=>G+X,0)]).sort((z,G)=>z[1]-G[1])[0])==null?void 0:H[0];B&&(Z=B);break}case"initialPlacement":Z=c;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};function Bo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function zo(e){return jh.some(t=>e[t]>=0)}const Hh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:s}=t,{strategy:n="referenceHidden",...r}=bt(e,t);switch(n){case"referenceHidden":{const o=await wn(t,{...r,elementContext:"reference"}),i=Bo(o,s.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:zo(i)}}}case"escaped":{const o=await wn(t,{...r,altBoundary:!0}),i=Bo(o,s.floating);return{data:{escapedOffsets:i,escaped:zo(i)}}}default:return{}}}}};async function Th(e,t){const{placement:s,platform:n,elements:r}=e,o=await(n.isRTL==null?void 0:n.isRTL(r.floating)),i=wt(s),c=Xs(s),l=Wt(s)==="y",u=["left","top"].includes(i)?-1:1,h=o&&l?-1:1,d=bt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&typeof b=="number"&&(g=c==="end"?b*-1:b),l?{x:g*h,y:m*u}:{x:m*u,y:g*h}}const Dh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var s,n;const{x:r,y:o,placement:i,middlewareData:c}=t,l=await Th(t,e);return i===((s=c.offset)==null?void 0:s.placement)&&(n=c.arrow)!=null&&n.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}},Vh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:s,y:n,placement:r}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:c={fn:x=>{let{x:w,y:j}=x;return{x:w,y:j}}},...l}=bt(e,t),u={x:s,y:n},h=await wn(t,l),d=Wt(wt(r)),m=Bi(d);let g=u[m],b=u[d];if(o){const x=m==="y"?"top":"left",w=m==="y"?"bottom":"right",j=g+h[x],A=g-h[w];g=Ai(j,g,A)}if(i){const x=d==="y"?"top":"left",w=d==="y"?"bottom":"right",j=b+h[x],A=b-h[w];b=Ai(j,b,A)}const v=c.fn({...t,[m]:g,[d]:b});return{...v,data:{x:v.x-s,y:v.y-n,enabled:{[m]:o,[d]:i}}}}}},Zh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:s,y:n,placement:r,rects:o,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=bt(e,t),h={x:s,y:n},d=Wt(r),m=Bi(d);let g=h[m],b=h[d];const v=bt(c,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const A=m==="y"?"height":"width",L=o.reference[m]-o.floating[A]+x.mainAxis,N=o.reference[m]+o.reference[A]-x.mainAxis;g<L?g=L:g>N&&(g=N)}if(u){var w,j;const A=m==="y"?"width":"height",L=["top","left"].includes(wt(r)),N=o.reference[d]-o.floating[A]+(L&&((w=i.offset)==null?void 0:w[d])||0)+(L?0:x.crossAxis),P=o.reference[d]+o.reference[A]+(L?0:((j=i.offset)==null?void 0:j[d])||0)-(L?x.crossAxis:0);b<N?b=N:b>P&&(b=P)}return{[m]:g,[d]:b}}}},Uh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var s,n;const{placement:r,rects:o,platform:i,elements:c}=t,{apply:l=()=>{},...u}=bt(e,t),h=await wn(t,u),d=wt(r),m=Xs(r),g=Wt(r)==="y",{width:b,height:v}=o.floating;let x,w;d==="top"||d==="bottom"?(x=d,w=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(w=d,x=m==="end"?"top":"bottom");const j=v-h.top-h.bottom,A=b-h.left-h.right,L=zt(v-h[x],j),N=zt(b-h[w],A),P=!t.middlewareData.shift;let O=L,S=N;if((s=t.middlewareData.shift)!=null&&s.enabled.x&&(S=A),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(O=j),P&&!m){const F=Me(h.left,0),T=Me(h.right,0),I=Me(h.top,0),H=Me(h.bottom,0);g?S=b-2*(F!==0||T!==0?F+T:Me(h.left,h.right)):O=v-2*(I!==0||H!==0?I+H:Me(h.top,h.bottom))}await l({...t,availableWidth:S,availableHeight:O});const _=await i.getDimensions(c.floating);return b!==_.width||v!==_.height?{reset:{rects:!0}}:{}}}};function vr(){return typeof window<"u"}function en(e){return kc(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function at(e){var t;return(t=(kc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function kc(e){return vr()?e instanceof Node||e instanceof Le(e).Node:!1}function Ke(e){return vr()?e instanceof Element||e instanceof Le(e).Element:!1}function ot(e){return vr()?e instanceof HTMLElement||e instanceof Le(e).HTMLElement:!1}function Wo(e){return!vr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}function En(e){const{overflow:t,overflowX:s,overflowY:n,display:r}=Qe(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+s)&&!["inline","contents"].includes(r)}function $h(e){return["table","td","th"].includes(en(e))}function yr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ki(e){const t=Qi(),s=Ke(e)?Qe(e):e;return["transform","translate","scale","rotate","perspective"].some(n=>s[n]?s[n]!=="none":!1)||(s.containerType?s.containerType!=="normal":!1)||!t&&(s.backdropFilter?s.backdropFilter!=="none":!1)||!t&&(s.filter?s.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(s.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(s.contain||"").includes(n))}function qh(e){let t=Kt(e);for(;ot(t)&&!Ws(t);){if(Ki(t))return t;if(yr(t))return null;t=Kt(t)}return null}function Qi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ws(e){return["html","body","#document"].includes(en(e))}function Qe(e){return Le(e).getComputedStyle(e)}function br(e){return Ke(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Kt(e){if(en(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Wo(e)&&e.host||at(e);return Wo(t)?t.host:t}function Mc(e){const t=Kt(e);return Ws(t)?e.ownerDocument?e.ownerDocument.body:e.body:ot(t)&&En(t)?t:Mc(t)}function xn(e,t,s){var n;t===void 0&&(t=[]),s===void 0&&(s=!0);const r=Mc(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=Le(r);if(o){const c=Ci(i);return t.concat(i,i.visualViewport||[],En(r)?r:[],c&&s?xn(c):[])}return t.concat(r,xn(r,[],s))}function Ci(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oc(e){const t=Qe(e);let s=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const r=ot(e),o=r?e.offsetWidth:s,i=r?e.offsetHeight:n,c=rr(s)!==o||rr(n)!==i;return c&&(s=o,n=i),{width:s,height:n,$:c}}function Gi(e){return Ke(e)?e:e.contextElement}function Es(e){const t=Gi(e);if(!ot(t))return it(1);const s=t.getBoundingClientRect(),{width:n,height:r,$:o}=Oc(t);let i=(o?rr(s.width):s.width)/n,c=(o?rr(s.height):s.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Bh=it(0);function Lc(e){const t=Le(e);return!Qi()||!t.visualViewport?Bh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function zh(e,t,s){return t===void 0&&(t=!1),!s||t&&s!==Le(e)?!1:t}function vs(e,t,s,n){t===void 0&&(t=!1),s===void 0&&(s=!1);const r=e.getBoundingClientRect(),o=Gi(e);let i=it(1);t&&(n?Ke(n)&&(i=Es(n)):i=Es(e));const c=zh(o,s,n)?Lc(o):it(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,h=r.width/i.x,d=r.height/i.y;if(o){const m=Le(o),g=n&&Ke(n)?Le(n):n;let b=m,v=Ci(b);for(;v&&n&&g!==b;){const x=Es(v),w=v.getBoundingClientRect(),j=Qe(v),A=w.left+(v.clientLeft+parseFloat(j.paddingLeft))*x.x,L=w.top+(v.clientTop+parseFloat(j.paddingTop))*x.y;l*=x.x,u*=x.y,h*=x.x,d*=x.y,l+=A,u+=L,b=Le(v),v=Ci(b)}}return or({width:h,height:d,x:l,y:u})}function Ji(e,t){const s=br(e).scrollLeft;return t?t.left+s:vs(at(e)).left+s}function Nc(e,t,s){s===void 0&&(s=!1);const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-(s?0:Ji(e,n)),o=n.top+t.scrollTop;return{x:r,y:o}}function Wh(e){let{elements:t,rect:s,offsetParent:n,strategy:r}=e;const o=r==="fixed",i=at(n),c=t?yr(t.floating):!1;if(n===i||c&&o)return s;let l={scrollLeft:0,scrollTop:0},u=it(1);const h=it(0),d=ot(n);if((d||!d&&!o)&&((en(n)!=="body"||En(i))&&(l=br(n)),ot(n))){const g=vs(n);u=Es(n),h.x=g.x+n.clientLeft,h.y=g.y+n.clientTop}const m=i&&!d&&!o?Nc(i,l,!0):it(0);return{width:s.width*u.x,height:s.height*u.y,x:s.x*u.x-l.scrollLeft*u.x+h.x+m.x,y:s.y*u.y-l.scrollTop*u.y+h.y+m.y}}function Kh(e){return Array.from(e.getClientRects())}function Qh(e){const t=at(e),s=br(e),n=e.ownerDocument.body,r=Me(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),o=Me(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-s.scrollLeft+Ji(e);const c=-s.scrollTop;return Qe(n).direction==="rtl"&&(i+=Me(t.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:c}}function Gh(e,t){const s=Le(e),n=at(e),r=s.visualViewport;let o=n.clientWidth,i=n.clientHeight,c=0,l=0;if(r){o=r.width,i=r.height;const u=Qi();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:o,height:i,x:c,y:l}}function Jh(e,t){const s=vs(e,!0,t==="fixed"),n=s.top+e.clientTop,r=s.left+e.clientLeft,o=ot(e)?Es(e):it(1),i=e.clientWidth*o.x,c=e.clientHeight*o.y,l=r*o.x,u=n*o.y;return{width:i,height:c,x:l,y:u}}function Ko(e,t,s){let n;if(t==="viewport")n=Gh(e,s);else if(t==="document")n=Qh(at(e));else if(Ke(t))n=Jh(t,s);else{const r=Lc(e);n={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return or(n)}function Ic(e,t){const s=Kt(e);return s===t||!Ke(s)||Ws(s)?!1:Qe(s).position==="fixed"||Ic(s,t)}function Yh(e,t){const s=t.get(e);if(s)return s;let n=xn(e,[],!1).filter(c=>Ke(c)&&en(c)!=="body"),r=null;const o=Qe(e).position==="fixed";let i=o?Kt(e):e;for(;Ke(i)&&!Ws(i);){const c=Qe(i),l=Ki(i);!l&&c.position==="fixed"&&(r=null),(o?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||En(i)&&!l&&Ic(e,i))?n=n.filter(h=>h!==i):r=c,i=Kt(i)}return t.set(e,n),n}function Xh(e){let{element:t,boundary:s,rootBoundary:n,strategy:r}=e;const i=[...s==="clippingAncestors"?yr(t)?[]:Yh(t,this._c):[].concat(s),n],c=i[0],l=i.reduce((u,h)=>{const d=Ko(t,h,r);return u.top=Me(d.top,u.top),u.right=zt(d.right,u.right),u.bottom=zt(d.bottom,u.bottom),u.left=Me(d.left,u.left),u},Ko(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ef(e){const{width:t,height:s}=Oc(e);return{width:t,height:s}}function tf(e,t,s){const n=ot(t),r=at(t),o=s==="fixed",i=vs(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const l=it(0);if(n||!n&&!o)if((en(t)!=="body"||En(r))&&(c=br(t)),n){const m=vs(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&(l.x=Ji(r));const u=r&&!n&&!o?Nc(r,c):it(0),h=i.left+c.scrollLeft-l.x-u.x,d=i.top+c.scrollTop-l.y-u.y;return{x:h,y:d,width:i.width,height:i.height}}function Ur(e){return Qe(e).position==="static"}function Qo(e,t){if(!ot(e)||Qe(e).position==="fixed")return null;if(t)return t(e);let s=e.offsetParent;return at(e)===s&&(s=s.ownerDocument.body),s}function Fc(e,t){const s=Le(e);if(yr(e))return s;if(!ot(e)){let r=Kt(e);for(;r&&!Ws(r);){if(Ke(r)&&!Ur(r))return r;r=Kt(r)}return s}let n=Qo(e,t);for(;n&&$h(n)&&Ur(n);)n=Qo(n,t);return n&&Ws(n)&&Ur(n)&&!Ki(n)?s:n||qh(e)||s}const sf=async function(e){const t=this.getOffsetParent||Fc,s=this.getDimensions,n=await s(e.floating);return{reference:tf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function nf(e){return Qe(e).direction==="rtl"}const rf={convertOffsetParentRelativeRectToViewportRelativeRect:Wh,getDocumentElement:at,getClippingRect:Xh,getOffsetParent:Fc,getElementRects:sf,getClientRects:Kh,getDimensions:ef,getScale:Es,isElement:Ke,isRTL:nf};function Hc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function of(e,t){let s=null,n;const r=at(e);function o(){var c;clearTimeout(n),(c=s)==null||c.disconnect(),s=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:h,top:d,width:m,height:g}=u;if(c||t(),!m||!g)return;const b=Tn(d),v=Tn(r.clientWidth-(h+m)),x=Tn(r.clientHeight-(d+g)),w=Tn(h),A={rootMargin:-b+"px "+-v+"px "+-x+"px "+-w+"px",threshold:Me(0,zt(1,l))||1};let L=!0;function N(P){const O=P[0].intersectionRatio;if(O!==l){if(!L)return i();O?i(!1,O):n=setTimeout(()=>{i(!1,1e-7)},1e3)}O===1&&!Hc(u,e.getBoundingClientRect())&&i(),L=!1}try{s=new IntersectionObserver(N,{...A,root:r.ownerDocument})}catch{s=new IntersectionObserver(N,A)}s.observe(e)}return i(!0),o}function af(e,t,s,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=Gi(e),h=r||o?[...u?xn(u):[],...xn(t)]:[];h.forEach(w=>{r&&w.addEventListener("scroll",s,{passive:!0}),o&&w.addEventListener("resize",s)});const d=u&&c?of(u,s):null;let m=-1,g=null;i&&(g=new ResizeObserver(w=>{let[j]=w;j&&j.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var A;(A=g)==null||A.observe(t)})),s()}),u&&!l&&g.observe(u),g.observe(t));let b,v=l?vs(e):null;l&&x();function x(){const w=vs(e);v&&!Hc(v,w)&&s(),v=w,b=requestAnimationFrame(x)}return s(),()=>{var w;h.forEach(j=>{r&&j.removeEventListener("scroll",s),o&&j.removeEventListener("resize",s)}),d==null||d(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(b)}}const cf=Dh,lf=Vh,uf=Fh,df=Uh,hf=Hh,Go=Ih,ff=Zh,pf=(e,t,s)=>{const n=new Map,r={platform:rf,...s},o={...r.platform,_c:n};return Nh(e,t,{...r,platform:o})};var Wn=typeof document<"u"?p.useLayoutEffect:p.useEffect;function ar(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let s,n,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(s=e.length,s!==t.length)return!1;for(n=s;n--!==0;)if(!ar(e[n],t[n]))return!1;return!0}if(r=Object.keys(e),s=r.length,s!==Object.keys(t).length)return!1;for(n=s;n--!==0;)if(!{}.hasOwnProperty.call(t,r[n]))return!1;for(n=s;n--!==0;){const o=r[n];if(!(o==="_owner"&&e.$$typeof)&&!ar(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Tc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Jo(e,t){const s=Tc(e);return Math.round(t*s)/s}function $r(e){const t=p.useRef(e);return Wn(()=>{t.current=e}),t}function mf(e){e===void 0&&(e={});const{placement:t="bottom",strategy:s="absolute",middleware:n=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[h,d]=p.useState({x:0,y:0,strategy:s,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=p.useState(n);ar(m,n)||g(n);const[b,v]=p.useState(null),[x,w]=p.useState(null),j=p.useCallback(z=>{z!==P.current&&(P.current=z,v(z))},[]),A=p.useCallback(z=>{z!==O.current&&(O.current=z,w(z))},[]),L=o||b,N=i||x,P=p.useRef(null),O=p.useRef(null),S=p.useRef(h),_=l!=null,F=$r(l),T=$r(r),I=$r(u),H=p.useCallback(()=>{if(!P.current||!O.current)return;const z={placement:t,strategy:s,middleware:m};T.current&&(z.platform=T.current),pf(P.current,O.current,z).then(G=>{const X={...G,isPositioned:I.current!==!1};$.current&&!ar(S.current,X)&&(S.current=X,Fa.flushSync(()=>{d(X)}))})},[m,t,s,T,I]);Wn(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,d(z=>({...z,isPositioned:!1})))},[u]);const $=p.useRef(!1);Wn(()=>($.current=!0,()=>{$.current=!1}),[]),Wn(()=>{if(L&&(P.current=L),N&&(O.current=N),L&&N){if(F.current)return F.current(L,N,H);H()}},[L,N,H,F,_]);const q=p.useMemo(()=>({reference:P,floating:O,setReference:j,setFloating:A}),[j,A]),Z=p.useMemo(()=>({reference:L,floating:N}),[L,N]),B=p.useMemo(()=>{const z={position:s,left:0,top:0};if(!Z.floating)return z;const G=Jo(Z.floating,h.x),X=Jo(Z.floating,h.y);return c?{...z,transform:"translate("+G+"px, "+X+"px)",...Tc(Z.floating)>=1.5&&{willChange:"transform"}}:{position:s,left:G,top:X}},[s,c,Z.floating,h.x,h.y]);return p.useMemo(()=>({...h,update:H,refs:q,elements:Z,floatingStyles:B}),[h,H,q,Z,B])}const gf=e=>{function t(s){return{}.hasOwnProperty.call(s,"current")}return{name:"arrow",options:e,fn(s){const{element:n,padding:r}=typeof e=="function"?e(s):e;return n&&t(n)?n.current!=null?Go({element:n.current,padding:r}).fn(s):{}:n?Go({element:n,padding:r}).fn(s):{}}}},vf=(e,t)=>({...cf(e),options:[e,t]}),yf=(e,t)=>({...lf(e),options:[e,t]}),bf=(e,t)=>({...ff(e),options:[e,t]}),wf=(e,t)=>({...uf(e),options:[e,t]}),xf=(e,t)=>({...df(e),options:[e,t]}),_f=(e,t)=>({...hf(e),options:[e,t]}),Sf=(e,t)=>({...gf(e),options:[e,t]});var Rf="Arrow",Dc=p.forwardRef((e,t)=>{const{children:s,width:n=10,height:r=5,...o}=e;return a.jsx(Pn.svg,{...o,ref:t,width:n,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Rf;var Af=Dc;function jf(e){const[t,s]=p.useState(void 0);return ri(()=>{if(e){s({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let i,c;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,c=u.blockSize}else i=e.offsetWidth,c=e.offsetHeight;s({width:i,height:c})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else s(void 0)},[e]),t}var Yi="Popper",[Vc,Zc]=Ha(Yi),[Cf,Uc]=Vc(Yi),$c=e=>{const{__scopePopper:t,children:s}=e,[n,r]=p.useState(null);return a.jsx(Cf,{scope:t,anchor:n,onAnchorChange:r,children:s})};$c.displayName=Yi;var qc="PopperAnchor",Bc=p.forwardRef((e,t)=>{const{__scopePopper:s,virtualRef:n,...r}=e,o=Uc(qc,s),i=p.useRef(null),c=hr(t,i),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(n==null?void 0:n.current)||i.current,u!==l.current&&o.onAnchorChange(l.current)}),n?null:a.jsx(Pn.div,{...r,ref:c})});Bc.displayName=qc;var Xi="PopperContent",[Pf,Ef]=Vc(Xi),zc=p.forwardRef((e,t)=>{var ce,Y,ie,Je,Ne,Ye;const{__scopePopper:s,side:n="bottom",sideOffset:r=0,align:o="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:h=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:b,...v}=e,x=Uc(Xi,s),[w,j]=p.useState(null),A=hr(t,Ie=>j(Ie)),[L,N]=p.useState(null),P=jf(L),O=(P==null?void 0:P.width)??0,S=(P==null?void 0:P.height)??0,_=n+(o!=="center"?"-"+o:""),F=typeof h=="number"?h:{top:0,right:0,bottom:0,left:0,...h},T=Array.isArray(u)?u:[u],I=T.length>0,H={padding:F,boundary:T.filter(Mf),altBoundary:I},{refs:$,floatingStyles:q,placement:Z,isPositioned:B,middlewareData:z}=mf({strategy:"fixed",placement:_,whileElementsMounted:(...Ie)=>af(...Ie,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[vf({mainAxis:r+S,alignmentAxis:i}),l&&yf({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?bf():void 0,...H}),l&&wf({...H}),xf({...H,apply:({elements:Ie,rects:ke,availableWidth:fe,availableHeight:we})=>{const{width:me,height:At}=ke.reference,ct=Ie.floating.style;ct.setProperty("--radix-popper-available-width",`${fe}px`),ct.setProperty("--radix-popper-available-height",`${we}px`),ct.setProperty("--radix-popper-anchor-width",`${me}px`),ct.setProperty("--radix-popper-anchor-height",`${At}px`)}}),L&&Sf({element:L,padding:c}),Of({arrowWidth:O,arrowHeight:S}),m&&_f({strategy:"referenceHidden",...H})]}),[G,X]=Qc(Z),J=Bl(b);ri(()=>{B&&(J==null||J())},[B,J]);const be=(ce=z.arrow)==null?void 0:ce.x,te=(Y=z.arrow)==null?void 0:Y.y,se=((ie=z.arrow)==null?void 0:ie.centerOffset)!==0,[oe,ae]=p.useState();return ri(()=>{w&&ae(window.getComputedStyle(w).zIndex)},[w]),a.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:B?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:oe,"--radix-popper-transform-origin":[(Je=z.transformOrigin)==null?void 0:Je.x,(Ne=z.transformOrigin)==null?void 0:Ne.y].join(" "),...((Ye=z.hide)==null?void 0:Ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Pf,{scope:s,placedSide:G,onArrowChange:N,arrowX:be,arrowY:te,shouldHideArrow:se,children:a.jsx(Pn.div,{"data-side":G,"data-align":X,...v,ref:A,style:{...v.style,animation:B?void 0:"none"}})})})});zc.displayName=Xi;var Wc="PopperArrow",kf={top:"bottom",right:"left",bottom:"top",left:"right"},Kc=p.forwardRef(function(t,s){const{__scopePopper:n,...r}=t,o=Ef(Wc,n),i=kf[o.placedSide];return a.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:a.jsx(Af,{...r,ref:s,style:{...r.style,display:"block"}})})});Kc.displayName=Wc;function Mf(e){return e!==null}var Of=e=>({name:"transformOrigin",options:e,fn(t){var x,w,j;const{placement:s,rects:n,middlewareData:r}=t,i=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,h]=Qc(s),d={start:"0%",center:"50%",end:"100%"}[h],m=(((w=r.arrow)==null?void 0:w.x)??0)+c/2,g=(((j=r.arrow)==null?void 0:j.y)??0)+l/2;let b="",v="";return u==="bottom"?(b=i?d:`${m}px`,v=`${-l}px`):u==="top"?(b=i?d:`${m}px`,v=`${n.floating.height+l}px`):u==="right"?(b=`${-l}px`,v=i?d:`${g}px`):u==="left"&&(b=`${n.floating.width+l}px`,v=i?d:`${g}px`),{data:{x:b,y:v}}}});function Qc(e){const[t,s="center"]=e.split("-");return[t,s]}var Lf=$c,Gc=Bc,Nf=zc,If=Kc,wr="Popover",[Jc,Nm]=Ha(wr,[Zc]),kn=Zc(),[Ff,Gt]=Jc(wr),Yc=e=>{const{__scopePopover:t,children:s,open:n,defaultOpen:r,onOpenChange:o,modal:i=!1}=e,c=kn(t),l=p.useRef(null),[u,h]=p.useState(!1),[d,m]=zl({prop:n,defaultProp:r??!1,onChange:o,caller:wr});return a.jsx(Lf,{...c,children:a.jsx(Ff,{scope:t,contentId:Wl(),triggerRef:l,open:d,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>h(!0),[]),onCustomAnchorRemove:p.useCallback(()=>h(!1),[]),modal:i,children:s})})};Yc.displayName=wr;var Xc="PopoverAnchor",Hf=p.forwardRef((e,t)=>{const{__scopePopover:s,...n}=e,r=Gt(Xc,s),o=kn(s),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return p.useEffect(()=>(i(),()=>c()),[i,c]),a.jsx(Gc,{...o,...n,ref:t})});Hf.displayName=Xc;var el="PopoverTrigger",tl=p.forwardRef((e,t)=>{const{__scopePopover:s,...n}=e,r=Gt(el,s),o=kn(s),i=hr(t,r.triggerRef),c=a.jsx(Pn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":al(r.open),...n,ref:i,onClick:Ss(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:a.jsx(Gc,{asChild:!0,...o,children:c})});tl.displayName=el;var eo="PopoverPortal",[Tf,Df]=Jc(eo,{forceMount:void 0}),sl=e=>{const{__scopePopover:t,forceMount:s,children:n,container:r}=e,o=Gt(eo,t);return a.jsx(Tf,{scope:t,forceMount:s,children:a.jsx(Ta,{present:s||o.open,children:a.jsx(Kl,{asChild:!0,container:r,children:n})})})};sl.displayName=eo;var Ks="PopoverContent",nl=p.forwardRef((e,t)=>{const s=Df(Ks,e.__scopePopover),{forceMount:n=s.forceMount,...r}=e,o=Gt(Ks,e.__scopePopover);return a.jsx(Ta,{present:n||o.open,children:o.modal?a.jsx(Zf,{...r,ref:t}):a.jsx(Uf,{...r,ref:t})})});nl.displayName=Ks;var Vf=Jl("PopoverContent.RemoveScroll"),Zf=p.forwardRef((e,t)=>{const s=Gt(Ks,e.__scopePopover),n=p.useRef(null),r=hr(t,n),o=p.useRef(!1);return p.useEffect(()=>{const i=n.current;if(i)return Ql(i)},[]),a.jsx(Gl,{as:Vf,allowPinchZoom:!0,children:a.jsx(rl,{...e,ref:r,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ss(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),o.current||(c=s.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Ss(e.onPointerDownOutside,i=>{const c=i.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:Ss(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Uf=p.forwardRef((e,t)=>{const s=Gt(Ks,e.__scopePopover),n=p.useRef(!1),r=p.useRef(!1);return a.jsx(rl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(n.current||(c=s.triggerRef.current)==null||c.focus(),o.preventDefault()),n.current=!1,r.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=o.target;((u=s.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),rl=p.forwardRef((e,t)=>{const{__scopePopover:s,trapFocus:n,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:h,...d}=e,m=Gt(Ks,s),g=kn(s);return Yl(),a.jsx(Xl,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(eu,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:h,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:a.jsx(Nf,{"data-state":al(m.open),role:"dialog",id:m.contentId,...g,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),il="PopoverClose",ol=p.forwardRef((e,t)=>{const{__scopePopover:s,...n}=e,r=Gt(il,s);return a.jsx(Pn.button,{type:"button",...n,ref:t,onClick:Ss(e.onClick,()=>r.onOpenChange(!1))})});ol.displayName=il;var $f="PopoverArrow",qf=p.forwardRef((e,t)=>{const{__scopePopover:s,...n}=e,r=kn(s);return a.jsx(If,{...r,...n,ref:t})});qf.displayName=$f;function al(e){return e?"open":"closed"}var to=Yc,so=tl,no=sl,ro=nl,Bf=ol;function cl({account:e,className:t,children:s,...n}){return a.jsxs("div",{className:We("flex max-w-full flex-col items-center justify-start gap-2",t),...n,children:[a.jsx(Da,{account:e,size:"3xl",className:"max-w-full"}),e.name&&a.jsx(tu,{account:e,className:"text-text-default max-w-full truncate text-xl font-medium"}),a.jsx(Va,{account:e,className:"text-md text-text-light max-w-full truncate"}),s]})}function zf(e){const{i18n:t,_:s}=he(),{session:n,canSwitchAccounts:r}=su(),{setSession:o,api:i}=Ni();return a.jsxs(to,{children:[a.jsx(so,{asChild:!0,children:a.jsx(Oe,{"aria-label":t._({id:"1D3nu5"}),shape:"circle",transparent:!0,color:"gray",...e,children:a.jsx(Da,{account:n.account,size:e.size})})}),a.jsx(no,{children:a.jsx(ro,{side:"top",align:"end",className:"w-full",sideOffset:5,style:{width:320},children:a.jsxs("div",{className:"relative flex flex-col gap-2 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-slate-700 dark:bg-slate-800",children:[a.jsx(cl,{account:n.account,"aria-label":t._({id:"OLYdKb"}),className:"mt-4"}),a.jsx(Oe,{onClick:async c=>{await i.signOut(n.account)},color:"primary",children:a.jsx(V,{id:"fcWrnU"})},"signout"),r&&a.jsx(Oe,{onClick:()=>o(null),children:a.jsx(V,{id:"T8poTj"})},"other"),a.jsx(Bf,{className:"absolute right-2 top-2 rounded opacity-50 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","aria-label":t._({id:"NqPBw0"}),children:a.jsx(Za,{className:"size-6","aria-hidden":!0})},"close")]})})})]})}function Wf({children:e,basePath:t,title:s,links:n,prepend:r}){const{_:o}=he(),{pathname:i}=ye().location,c=i===t,l=n.find(d=>d.to===i),u=l==null?void 0:l.title,h=typeof u=="object"?o(u):u;return a.jsxs(Zl,{title:s,header:a.jsx(zf,{className:"shrink-0",size:"lg"}),children:[r,a.jsxs("div",{className:"flex w-full flex-1 flex-col md:flex-row",children:[a.jsx("aside",{className:`shrink-0 p-4 md:px-8 ${c?"w-full md:w-auto":"hidden max-w-xs md:block"}`,role:"navigation",children:a.jsx("nav",{className:"flex flex-col gap-2",children:n.filter(({hidden:d,to:m})=>!d||i===m).map(({to:d,title:m,description:g,icon:b})=>a.jsxs(nr,{to:d,className:We("flex items-center justify-start","min-h-12 px-4","rounded-3xl transition-colors","whitespace-nowrap font-medium md:whitespace-normal","focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2","text-text-default","md:text-text-light md:[&.active]:text-text-default","hover:bg-slate-100 dark:hover:bg-slate-800","[&.active]:bg-slate-100 dark:[&.active]:bg-slate-800",c&&d===t&&"hidden md:flex"),activeOptions:{exact:!0,includeSearch:!1},activeProps:{className:"active","aria-current":"page"},children:[b&&a.jsx("span",{"aria-hidden":"true",className:"bg-primary text-primary-contrast -ml-2 mb-auto mr-2 mt-2 inline-flex size-8 shrink-0 grow-0 items-center justify-center rounded-full",children:a.jsx(b,{className:"size-4"})}),a.jsxs("span",{className:"my-1 min-w-0 flex-1",children:[a.jsx("span",{className:"block truncate",children:typeof m=="object"?o(m):m}),g&&a.jsx("span",{className:"block whitespace-pre-wrap text-xs md:hidden",children:typeof g=="object"?o(g):g})]})]},d))})}),a.jsxs("main",{className:We("w-4xl mx-auto flex min-w-0 max-w-full flex-col px-4 md:px-8",{"-order-1 md:order-1":c}),role:"main",children:[!c&&a.jsxs("nav",{className:"mb-4 flex flex-none items-center gap-2",children:[a.jsx(nr,{to:t,className:"text-text-light rounded-full p-2 hover:bg-slate-200 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 md:hidden dark:hover:bg-slate-800",children:a.jsx(wc,{className:"size-6"})},"back"),h&&a.jsxs("h2",{className:"text-text-default text-2xl font-light",children:[a.jsx("title",{children:h}),a.jsx("b",{children:h})]})]}),a.jsx("div",{className:"flex-auto",children:e})]})]})]})}const io=Gd({component:qi,errorComponent:qa});function ll(e){const{name:t,logo:s}=Li();return a.jsxs("span",{...e,children:[s&&a.jsx("img",{src:s,alt:t,className:"not-prose mr-1 inline-block h-[1em] select-none object-contain align-baseline"}),a.jsx("b",{children:t})]})}function Kf(){const{account:e}=Qt();return a.jsxs("div",{className:"prose-sm md:prose prose-slate dark:prose-invert max-w-none",children:[a.jsx("section",{children:a.jsx(V,{id:"/y3yb7",components:{0:a.jsx("h2",{}),1:a.jsx("p",{}),2:a.jsx("strong",{})}})}),a.jsx("section",{children:a.jsx(V,{id:"SBs48I",components:{0:a.jsx("h3",{}),1:a.jsx("p",{}),2:a.jsx(Vt,{className:"underline",href:"https://bsky.app"}),3:a.jsx("p",{}),4:a.jsx("p",{}),5:a.jsx("strong",{className:"whitespace-nowrap"}),6:a.jsx(Va,{account:e})}})}),a.jsx("section",{children:a.jsx(V,{id:"gB0RTR",components:{0:a.jsx("h3",{}),1:a.jsx("p",{}),2:a.jsx("ul",{}),3:a.jsx("li",{}),4:a.jsx("strong",{}),5:a.jsx("li",{}),6:a.jsx("strong",{}),7:a.jsx("li",{}),8:a.jsx("strong",{}),9:a.jsx("li",{}),10:a.jsx("strong",{})}})}),a.jsx("section",{children:a.jsx(V,{id:"bfpG7G",components:{0:a.jsx("h3",{}),1:a.jsx("p",{}),2:a.jsx("strong",{}),3:a.jsx("ul",{}),4:a.jsx("li",{}),5:a.jsx("li",{}),6:a.jsx("li",{}),7:a.jsx("p",{}),8:a.jsx(Vt,{href:`https://bsky.app/profile/${e.preferred_username??e.sub}`}),9:a.jsx("p",{}),10:a.jsx(ll,{})}})}),a.jsxs("section",{children:[a.jsx(V,{id:"7+d6kP",components:{0:a.jsx("h3",{}),1:a.jsx("p",{})}}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx(V,{id:"NS7S2h",components:{0:a.jsx(Vt,{className:"underline",href:"https://bsky.social"})}})}),a.jsx("li",{children:a.jsx(V,{id:"ZWuMKu",components:{0:a.jsx(Vt,{className:"underline",href:"https://atproto.com"})}})})]})]})]})}function oo({value:e,startAngle:t=0,progressDirection:s="clockwise",size:n=24,strokeWidth:r=2,className:o,...i}){const c=n/2,l=c-r/2,u=2*Math.PI*l,d=Math.max(0,Math.min(100,e??70))/100,m=s==="clockwise"?u*(1-d):u*d;return a.jsxs("svg",{width:n,height:n,style:{transform:`rotate(${t}deg)`},className:We(e==null&&"animate-spin",o),...i,children:[a.jsx("circle",{cx:c,cy:c,r:l,fill:"none",stroke:"currentColor",strokeWidth:r,className:"opacity-20"}),a.jsx("circle",{cx:c,cy:c,r:l,fill:"none",stroke:"currentColor",strokeWidth:r,strokeDasharray:u,strokeDashoffset:m,strokeLinecap:"round",className:"transition-all duration-1000 ease-linear",style:{transform:s==="counter-clockwise"?"scaleX(-1)":void 0,transformOrigin:"center"}})]})}function ul(e){const{i18n:t,_:s}=he(),n=Qf(e),r=Gf(),o=Math.floor(n/1e3);if(o<60)return t._({id:"xOTzt5"});const i=Math.floor(o/60);if(i===1)return t._({id:"kMDavg"});if(i<60)return t._({id:"KtNcea",values:{deltaMinutes:i}});const c=Math.floor(i/60);if(c===1)return t._({id:"x6/d1l"});if(c<24)return t._({id:"69w9p3",values:{deltaHours:c}});if(c<48&&new Date(e).getTime()<r)return t._({id:"rQRrkB"});const l=Math.floor(c/24);return t._({id:"cd9Wo5",values:{deltaDays:l}})}function Qf(e){const t=p.useMemo(()=>new Date(e),[e]),[s,n]=p.useState(()=>Date.now()-t.getTime());return p.useEffect(()=>{const r=setInterval(()=>{n(Date.now()-t.getTime())},1e3);return()=>clearInterval(r)},[t]),s}function Gf(){const[e,t]=p.useState(()=>{const s=new Date;return new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime()});return p.useEffect(()=>{const s=setInterval(()=>{const n=new Date;t(new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())},6e4);return()=>clearInterval(s)},[]),e}function Jf({date:e}){return ul(e)}const Pi=({sub:e})=>["oauth-sessions",e];function Yf({sub:e}){const t=Ge();return rc({refetchOnWindowFocus:"always",queryKey:Pi({sub:e}),retry:0,staleTime:5e3,queryFn:async s=>await t.oauthSessions({sub:e},s)})}function Xf(){const e=Ge(),t=fr();return Rt({async mutationFn(s){await e.revokeOAuthSession(s)},onError(s,{sub:n}){t.invalidateQueries({queryKey:Pi({sub:n})})},onSuccess(s,{sub:n}){t.invalidateQueries({queryKey:Pi({sub:n})})}})}const e0="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var Oa;const t0=((Oa=URL.canParse)==null?void 0:Oa.bind(URL))??(e=>{try{return new URL(e),!0}catch{return!1}});function dl(e){return!!(e.match(/^\d+\.\d+\.\d+\.\d+$/)||e.startsWith("[")&&e.endsWith("]"))}function hl(e){return e==="localhost"||e==="127.0.0.1"||e==="[::1]"}function s0(e){const t=e.split(".");if(t.length<2)return!0;const s=t.at(-1).toLowerCase();return s==="test"||s==="local"||s==="localhost"||s==="invalid"||s==="example"}function n0(e){const t=e.startsWith("https://")?8:e.startsWith("http://")?7:-1;if(t===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const s=e.indexOf("#",t),n=e.indexOf("?",t),r=n!==-1&&(s===-1||n<s)?n:-1,o=s===-1?r===-1?e.length:r:r===-1?s:Math.min(s,r),i=e.indexOf("/",t),c=i===-1||i>o?o:i;if(t===c)throw new TypeError("URL must contain a host");return e.substring(c,o)}const Yo=e=>{if(typeof e=="string"&&e.startsWith("{")&&e.endsWith("}"))try{return JSON.parse(e)}catch{return e}return e},r0=e=>{if(typeof e=="string"){const t=Number(e);if(!Number.isNaN(t))return t}return e},i0=(e,t)=>{if(e.length===0)throw new TypeError("Value cannot be empty");if(e.includes(" "))throw new TypeError("Value cannot contain spaces");const s=t.length,n=e.length;if(s<n)return!1;let r=t.indexOf(e),o;for(;r!==-1;){if(o=r+n,(r===0||t.charCodeAt(r-1)===32)&&(o===s||t.charCodeAt(o)===32))return!0;r=t.indexOf(e,o+1)}return!1},xr=f.string().refine(e=>e.includes(":")&&t0(e),{message:"Invalid URL"}),fl=xr.superRefine((e,t)=>{if(!e.startsWith("http://"))return t.addIssue({code:ve.custom,message:'URL must use the "http:" protocol'}),!1;const s=new URL(e);return hl(s.hostname)?!0:(t.addIssue({code:ve.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),ao=xr.superRefine((e,t)=>{if(!e.startsWith("https://"))return t.addIssue({code:ve.custom,message:'URL must use the "https:" protocol'}),!1;const s=new URL(e);if(hl(s.hostname))return t.addIssue({code:ve.custom,message:"https: URL must not use a loopback host"}),!1;if(!dl(s.hostname)){if(!s.hostname.includes("."))return t.addIssue({code:ve.custom,message:"Domain name must contain at least two segments"}),!1;if(s.hostname.endsWith(".local"))return t.addIssue({code:ve.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),de=f.string().superRefine((e,t)=>{if(e.startsWith("http://")){const s=fl.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}if(e.startsWith("https://")){const s=ao.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}return t.addIssue({code:ve.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),o0=xr.superRefine((e,t)=>{const s=e.indexOf("."),n=e.indexOf(":");if(s===-1||n===-1||s>n)return t.addIssue({code:ve.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const r=new URL(e);if(!r.protocol.includes("."))return t.addIssue({code:ve.custom,message:"Invalid private-use URI scheme"}),!1;const i=r.protocol.slice(0,-1).split(".").reverse().join(".");return s0(i)&&t.addIssue({code:ve.custom,message:"Private-use URI Scheme redirect URI must not be a local hostname"}),r.href.startsWith(`${r.protocol}//`)||r.username||r.password||r.hostname||r.port?(t.addIssue({code:ve.custom,message:"Private-Use URI Scheme must be in the form <scheme>:/{path} (notice the single slash!) as per RFC 8252"}),!1):!0}),a0=/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/,pl=e=>a0.test(e),co=f.string().refine(pl,{message:"Invalid OAuth scope"}),c0="atproto";function l0(e){return pl(e)&&i0(c0,e)}const u0=f.string().refine(l0,{message:"Invalid ATProto OAuth scope"}),Jt=f.string().min(1),ml=fl.superRefine((e,t)=>e.startsWith("http://localhost")?(t.addIssue({code:ve.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),d0=ml,lo=f.string().superRefine((e,t)=>{if(e.startsWith("https:")){const s=ao.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else if(e.startsWith("http:")){const s=ml.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else if(/^[^.:]+(?:\.[^.:]+)+:/.test(e)){const s=o0.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else return t.addIssue({code:ve.custom,message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'}),!1}),es="http://localhost";Jt.superRefine((e,t)=>{const s=vl(e);return s.success||t.addIssue({code:"custom",message:s.message}),s.success});function gl(e){return vl(e).success}function vl(e){if(!e.startsWith(es))return{success:!1,message:`Value must start with "${es}"`};if(e.includes("#",es.length))return{success:!1,message:"Value must not contain a hash component"};const t=e.length>es.length&&e.charCodeAt(es.length)===47?es.length+1:es.length;if(e.length!==t&&e.charCodeAt(t)!==63)return{success:!1,message:"Value must not contain a path component"};const s=e.slice(t+1);return h0(s)}function h0(e){const t={},s=typeof e=="string"?new URLSearchParams(e):e;for(const[n,r]of s)if(n==="scope"){if("scope"in t)return{success:!1,message:'Duplicate "scope" query parameter'};const o=co.safeParse(r);if(!o.success)return{success:!1,message:`Invalid "scope" query parameter: ${o.error.issues.map(c=>c.message).join(", ")||"Validation failed"}`};t.scope=o.data}else if(n==="redirect_uri"){const o=d0.safeParse(r);if(!o.success)return{success:!1,message:`Invalid "redirect_uri" query parameter: ${o.error.issues.map(c=>c.message).join(", ")||"Validation failed"}`};t.redirect_uris==null?t.redirect_uris=[o.data]:t.redirect_uris.push(o.data)}else return{success:!1,message:`Unexpected query parameter "${n}"`};return{success:!0,value:t}}const f0="ERR_JWKS_NO_MATCHING_KEY",p0="ERR_JWK_INVALID",Xo="ERR_JWK_NOT_FOUND",cr="ERR_JWT_INVALID",m0="ERR_JWT_CREATE",g0="ERR_JWT_VERIFY";class $t extends TypeError{constructor(t="JWK error",s=p0,n){super(t,n),this.code=s}}class vn extends Error{constructor(t="Unable to create JWT",s=m0,n){super(t,n),this.code=s}static from(t,s,n){return t instanceof vn?t:t instanceof $t?new vn(n,t.code,{cause:t}):new vn(n,s,{cause:t})}}class vt extends Error{constructor(t="Invalid JWT",s=g0,n){super(t,n),this.code=s}static from(t,s,n){return t instanceof vt?t:t instanceof $t?new vt(n,t.code,{cause:t}):new vt(n,s,{cause:t})}}class v0{constructor(t,s,n){_e(this,"name");_e(this,"prefix");_e(this,"baseEncode");this.name=t,this.prefix=s,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class y0{constructor(t,s,n){_e(this,"name");_e(this,"prefix");_e(this,"baseDecode");_e(this,"prefixCodePoint");this.name=t,this.prefix=s;const r=s.codePointAt(0);if(r===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r,this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return yl(this,t)}}class b0{constructor(t){_e(this,"decoders");this.decoders=t}or(t){return yl(this,t)}decode(t){const s=t[0],n=this.decoders[s];if(n!=null)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function yl(e,t){return new b0({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class w0{constructor(t,s,n,r){_e(this,"name");_e(this,"prefix");_e(this,"baseEncode");_e(this,"baseDecode");_e(this,"encoder");_e(this,"decoder");this.name=t,this.prefix=s,this.baseEncode=n,this.baseDecode=r,this.encoder=new v0(t,s,n),this.decoder=new y0(t,s,r)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function x0({name:e,prefix:t,encode:s,decode:n}){return new w0(e,t,s,n)}function _0(e,t,s,n){let r=e.length;for(;e[r-1]==="=";)--r;const o=new Uint8Array(r*s/8|0);let i=0,c=0,l=0;for(let u=0;u<r;++u){const h=t[e[u]];if(h===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<s|h,i+=s,i>=8&&(i-=8,o[l++]=255&c>>i)}if(i>=s||(255&c<<8-i)!==0)throw new SyntaxError("Unexpected end of data");return o}function S0(e,t,s){const n=t[t.length-1]==="=",r=(1<<s)-1;let o="",i=0,c=0;for(let l=0;l<e.length;++l)for(c=c<<8|e[l],i+=8;i>s;)i-=s,o+=t[r&c>>i];if(i!==0&&(o+=t[r&c<<s-i]),n)for(;(o.length*s&7)!==0;)o+="=";return o}function R0(e){const t={};for(let s=0;s<e.length;++s)t[e[s]]=s;return t}function _r({name:e,prefix:t,bitsPerChar:s,alphabet:n}){const r=R0(n);return x0({prefix:t,name:e,encode(o){return S0(o,n,s)},decode(o){return _0(o,r,s,e)}})}_r({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});_r({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});const A0=_r({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6});_r({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const ea=e=>e!==void 0,j0=e=>(t,s)=>{const n=e.indexOf(t),r=e.indexOf(s);return n===r?0:n===-1?1:r===-1?-1:n-r};function C0(e){return e==null?t=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e}const Pt=(e,t)=>function(){const s=e.call(this);return Object.defineProperty(this,e.name,{get:()=>s,enumerable:!0,configurable:!0}),s},P0=new TextDecoder;function ta(e){const t=A0.baseDecode(e),s=P0.decode(t);return JSON.parse(s)}const bl=(e,t)=>{let s;for(let n=0;n<e.length;n++)if(s=e.charCodeAt(n),!(65<=s&&s<=90||97<=s&&s<=122||48<=s&&s<=57||s===45||s===95||s===46)){const r=String.fromCodePoint(e.codePointAt(n));return t.addIssue({code:ve.custom,message:`Invalid character "${r}" in JWT at position ${n}`})}},wl=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(e|0)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const s=e*t+(e-1),n="Invalid JWT format";return(r,o)=>{if(r.length<s)return o.addIssue({code:ve.custom,message:`${n}: too short`}),!1;let i=0;for(let c=0;c<e-1;c++){const l=r.indexOf(".",i);if(l===-1)return o.addIssue({code:ve.custom,message:`${n}: expected ${e} segments, got ${c+1}`}),!1;if(l-i<t)return o.addIssue({code:ve.custom,message:`${n}: segment ${c+1} is too short`}),!1;i=l+1}return r.indexOf(".",i)!==-1?(o.addIssue({code:ve.custom,message:`${n}: too many segments`}),!1):r.length-i<t?(o.addIssue({code:ve.custom,message:`${n}: last segment is too short`}),!1):!0}};function E0(e,t,s){return s.indexOf(e,t+1)===-1}const Sr=["verify","encrypt","wrapKey"];f.enum(Sr);function uo(e){return Sr.includes(e)}function ho(e){return e==="verify"}function fo(e){return e==="encrypt"||e==="wrapKey"}const po=["sign","decrypt","unwrapKey","deriveKey","deriveBits"];f.enum(po);function k0(e){return po.includes(e)}const M0=[...po,...Sr],O0=f.enum(M0),Mn=f.object({kty:f.string().min(1),alg:f.string().min(1).optional(),kid:f.string().min(1).optional(),use:f.enum(["sig","enc"]).optional(),key_ops:f.array(O0).min(1,{message:"At least one key usage must be specified"}).refine(e=>e.every(E0),{message:"key_ops must not contain duplicates"}).optional(),x5c:f.array(f.string()).optional(),x5t:f.string().min(1).optional(),"x5t#S256":f.string().min(1).optional(),x5u:f.string().url().optional(),ext:f.boolean().optional(),iat:f.number().int().optional(),exp:f.number().int().optional(),nbf:f.number().int().optional(),revoked:f.object({revoked_at:f.number().int(),reason:f.string().optional()}).optional()}),L0=Mn.extend({kty:f.literal("RSA"),alg:f.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:f.string().min(1),e:f.string().min(1),d:f.string().min(1).optional(),p:f.string().min(1).optional(),q:f.string().min(1).optional(),dp:f.string().min(1).optional(),dq:f.string().min(1).optional(),qi:f.string().min(1).optional(),oth:f.array(f.object({r:f.string().optional(),d:f.string().optional(),t:f.string().optional()})).min(1).optional()}),N0=Mn.extend({kty:f.literal("EC"),alg:f.enum(["ES256","ES384","ES512"]).optional(),crv:f.enum(["P-256","P-384","P-521"]),x:f.string().min(1),y:f.string().min(1),d:f.string().min(1).optional()}),I0=Mn.extend({kty:f.literal("EC"),alg:f.enum(["ES256K"]).optional(),crv:f.enum(["secp256k1"]),x:f.string().min(1),y:f.string().min(1),d:f.string().min(1).optional()}),F0=Mn.extend({kty:f.literal("OKP"),alg:f.enum(["EdDSA"]).optional(),crv:f.enum(["Ed25519","Ed448"]),x:f.string().min(1),d:f.string().min(1).optional()}),H0=Mn.extend({kty:f.literal("oct"),alg:f.enum(["HS256","HS384","HS512"]).optional(),k:f.string()}),Rr=f.union([L0,N0,I0,F0,H0]).refine(e=>e.use==null||_l(e),{message:'"use" can only be used with public keys',path:["use"]}).refine(e=>{var t;return!((t=e.key_ops)!=null&&t.some(k0))||vo(e)},{message:"private key usage not allowed for public keys",path:["key_ops"]}).refine(e=>e.use==null||e.key_ops==null||e.use==="sig"&&e.key_ops.every(ho)||e.use==="enc"&&e.key_ops.every(fo),{message:'"key_ops" must be consistent with "use"',path:["key_ops"]}),mo=Rr.refine(T0,{message:'"kid" is required',path:["kid"]}).refine(_l,{message:"private key not allowed"}).refine(e=>!e.key_ops||e.key_ops.every(uo),{message:'"key_ops" must not contain private key usage for public keys',path:["key_ops"]});Rr.refine(vo,{message:"private key required"});function T0(e){return"kid"in e&&e.kid!=null}function go(e){return"k"in e&&e.k!=null}function xl(e){return"d"in e&&e.d!=null}function vo(e){return xl(e)||go(e)}function _l(e){return!xl(e)&&!go(e)}const{process:Dn}=globalThis;var La;const sa=typeof Dn<"u"&&typeof((La=Dn==null?void 0:Dn.versions)==null?void 0:La.node)=="string";function*D0(e){if(typeof e.alg=="string"){yield e.alg;return}switch(e.kty){case"EC":{if(qr(e)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),Br(e)){const t="crv"in e?e.crv:void 0;switch(t){case"P-256":case"P-384":yield`ES${t.slice(-3)}`;break;case"P-521":yield"ES512";break;case"secp256k1":sa&&(yield"ES256K");break;default:throw new $t(`Unsupported crv "${t}"`)}}return}case"OKP":{if(!e.use)throw new $t('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{qr(e)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",sa&&(yield"RSA1_5")),Br(e)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{qr(e)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),Br(e)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new $t(`Unsupported kty "${e.kty}"`)}}function qr(e){var t;return((t=e.key_ops)==null?void 0:t.some(fo))??(e.use==null||e.use==="enc")}function Br(e){var t;return((t=e.key_ops)==null?void 0:t.some(ho))??(e.use==null||e.use==="sig")}f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>Rr.safeParse(t)).filter(t=>t.success).map(t=>t.data))});const V0=f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>mo.safeParse(t)).filter(t=>t.success).map(t=>t.data))}),Ar=f.string().superRefine(bl).superRefine(wl(3)),Z0=f.string().superRefine(bl).superRefine(wl(2)),U0=f.object({alg:f.string(),jku:f.string().url().optional(),jwk:f.object({kty:f.string(),crv:f.string().optional(),x:f.string().optional(),y:f.string().optional(),e:f.string().optional(),n:f.string().optional()}).optional(),kid:f.string().optional(),x5u:f.string().optional(),x5c:f.array(f.string()).optional(),x5t:f.string().optional(),"x5t#S256":f.string().optional(),typ:f.string().optional(),cty:f.string().optional(),crit:f.array(f.string()).optional()}).passthrough(),$0=f.string().superRefine((e,t)=>{try{const s=new URL(e);s.protocol!=="http:"&&s.protocol!=="https:"&&t.addIssue({code:f.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(s.username||s.password)&&t.addIssue({code:f.ZodIssueCode.custom,message:"Credentials not allowed"}),s.search&&t.addIssue({code:f.ZodIssueCode.custom,message:"Query string not allowed"}),s.hash&&t.addIssue({code:f.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{t.addIssue({code:f.ZodIssueCode.invalid_string,validation:"url"})}return e}),q0=f.object({iss:f.string().optional(),aud:f.union([f.string(),f.array(f.string()).nonempty()]).optional(),sub:f.string().optional(),exp:f.number().int().optional(),nbf:f.number().int().optional(),iat:f.number().int().optional(),jti:f.string().optional(),htm:f.string().optional(),htu:$0.optional(),ath:f.string().optional(),acr:f.string().optional(),azp:f.string().optional(),amr:f.array(f.string()).optional(),cnf:f.object({kid:f.string().optional(),jwk:mo.optional(),jwe:f.string().optional(),jku:f.string().url().optional(),jkt:f.string().optional(),"x5t#S256":f.string().optional(),osc:f.string().optional()}).optional(),client_id:f.string().optional(),scope:f.string().optional(),nonce:f.string().optional(),at_hash:f.string().optional(),c_hash:f.string().optional(),s_hash:f.string().optional(),auth_time:f.number().int().optional(),name:f.string().optional(),family_name:f.string().optional(),given_name:f.string().optional(),middle_name:f.string().optional(),nickname:f.string().optional(),preferred_username:f.string().optional(),gender:f.string().optional(),picture:f.string().url().optional(),profile:f.string().url().optional(),website:f.string().url().optional(),birthdate:f.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:f.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:f.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:f.number().int().optional(),email:f.string().optional(),email_verified:f.boolean().optional(),phone_number:f.string().optional(),phone_number_verified:f.boolean().optional(),address:f.object({formatted:f.string().optional(),street_address:f.string().optional(),locality:f.string().optional(),region:f.string().optional(),postal_code:f.string().optional(),country:f.string().optional()}).optional(),authorization_details:f.array(f.object({type:f.string(),locations:f.array(f.string()).optional(),actions:f.array(f.string()).optional(),datatypes:f.array(f.string()).optional(),identifier:f.string().optional(),privileges:f.array(f.string()).optional()}).passthrough()).optional()}).passthrough();function B0(e){const{0:t,1:s,length:n}=e.split(".");if(n>3||n<2)throw new vt(void 0,cr);const r=U0.parse(ta(t));if(n===2&&(r==null?void 0:r.alg)!=="none")throw new vt(void 0,cr);const o=q0.parse(ta(s));return{header:r,payload:o}}var z0=function(e,t,s){for(var n=arguments.length>2,r=0;r<t.length;r++)s=n?t[r].call(e,s):t[r].call(e);return n?s:void 0},sn=function(e,t,s,n,r,o){function i(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var c=n.kind,l=c==="getter"?"get":c==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d,m=!1,g=s.length-1;g>=0;g--){var b={};for(var v in n)b[v]=v==="access"?{}:n[v];for(var v in n.access)b.access[v]=n.access[v];b.addInitializer=function(w){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(w||null))};var x=(0,s[g])(c==="accessor"?{get:h.get,set:h.set}:h[l],b);if(c==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(d=i(x.get))&&(h.get=d),(d=i(x.set))&&(h.set=d),(d=i(x.init))&&r.unshift(d)}else(d=i(x))&&(c==="field"?r.unshift(d):h[l]=d)}u&&Object.defineProperty(u,n.name,h),m=!0};(()=>{var i;let e=[],t,s,n,r,o;return i=class{constructor(l){this.jwk=(z0(this,e),l)}get isPrivate(){return vo(this.jwk)}get isSymetric(){return go(this.jwk)}get privateJwk(){if(this.isPrivate)return this.jwk}get publicJwk(){if(this.isSymetric)return;if(!this.isPrivate)return this.jwk;const l=mo.safeParse({...this.jwk,d:void 0,k:void 0,use:void 0,key_ops:W0(this.keyOps)??Sr});if(l.success)return Object.freeze(l.data)}get bareJwk(){if(this.isSymetric)return;const{kty:l,crv:u,e:h,n:d,x:m,y:g}=this.jwk;return Object.freeze(Rr.parse({crv:u,e:h,kty:l,n:d,x:m,y:g}))}get use(){return this.jwk.use}get keyOps(){return this.jwk.key_ops}get alg(){return this.jwk.alg}get kid(){return this.jwk.kid}get crv(){return this.jwk.crv}get algorithms(){return Object.freeze(Array.from(D0(this.jwk)))}get isRevoked(){return this.jwk.revoked!=null}isActive(l){var h;if(!(l!=null&&l.allowRevoked)&&this.isRevoked)return!1;const u=(l==null?void 0:l.clockTolerance)??0;if(u!==1/0){const d=((h=l==null?void 0:l.currentDate)==null?void 0:h.getTime())??Date.now(),{exp:m,nbf:g}=this.jwk;if(g!=null&&!(d>=g*1e3-u)||m!=null&&!(d<m*1e3+u))return!1}return!0}matches(l){return!(l.kid!=null&&!(Array.isArray(l.kid)?this.kid!=null&&l.kid.includes(this.kid):this.kid===l.kid)||l.alg!=null&&!(Array.isArray(l.alg)?l.alg.some(h=>this.algorithms.includes(h)):this.algorithms.includes(l.alg))||l.usage!=null&&(!(this.keyOps==null||this.keyOps.includes(l.usage)||l.usage==="verify"&&this.keyOps.includes("sign")||l.usage==="encrypt"&&this.keyOps.includes("decrypt")||l.usage==="wrapKey"&&this.keyOps.includes("unwrapKey"))||!(this.use==null||this.use==="sig"&&ho(l.usage)||this.use==="enc"&&fo(l.usage))||!(this.isPrivate||uo(l.usage))))}},(()=>{const l=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[Pt],s=[Pt],n=[Pt],r=[Pt],o=[Pt],sn(i,null,t,{kind:"getter",name:"isPrivate",static:!1,private:!1,access:{has:u=>"isPrivate"in u,get:u=>u.isPrivate},metadata:l},null,e),sn(i,null,s,{kind:"getter",name:"isSymetric",static:!1,private:!1,access:{has:u=>"isSymetric"in u,get:u=>u.isSymetric},metadata:l},null,e),sn(i,null,n,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:u=>"publicJwk"in u,get:u=>u.publicJwk},metadata:l},null,e),sn(i,null,r,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:u=>"bareJwk"in u,get:u=>u.bareJwk},metadata:l},null,e),sn(i,null,o,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:u=>"algorithms"in u,get:u=>u.algorithms},metadata:l},null,e),l&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:l})})(),i})();function W0(e){if(e==null)return;const t=new Set(e.filter(uo));return e.includes("sign")&&t.add("verify"),e.includes("decrypt")&&t.add("encrypt"),e.includes("unwrapKey")&&t.add("wrapKey"),Array.from(t)}var K0=function(e,t,s){for(var n=arguments.length>2,r=0;r<t.length;r++)s=n?t[r].call(e,s):t[r].call(e);return n?s:void 0},zr=function(e,t,s,n,r,o){function i(w){if(w!==void 0&&typeof w!="function")throw new TypeError("Function expected");return w}for(var c=n.kind,l=c==="getter"?"get":c==="setter"?"set":"value",u=!t&&e?n.static?e:e.prototype:null,h=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),d,m=!1,g=s.length-1;g>=0;g--){var b={};for(var v in n)b[v]=v==="access"?{}:n[v];for(var v in n.access)b.access[v]=n.access[v];b.addInitializer=function(w){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(w||null))};var x=(0,s[g])(c==="accessor"?{get:h.get,set:h.set}:h[l],b);if(c==="accessor"){if(x===void 0)continue;if(x===null||typeof x!="object")throw new TypeError("Object expected");(d=i(x.get))&&(h.get=d),(d=i(x.set))&&(h.set=d),(d=i(x.init))&&r.unshift(d)}else(d=i(x))&&(c==="field"?r.unshift(d):h[l]=d)}u&&Object.defineProperty(u,n.name,h),m=!0};const Q0=e=>e.privateJwk,G0=e=>e.publicJwk;(()=>{var r;let e=[],t,s,n;return r=class{constructor(i,c=i instanceof r?[...i.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){this.preferredSigningAlgorithms=(K0(this,e),c);const l=[],u=new Set;for(const h of i)if(h&&(l.push(h),h.kid)){if(u.has(h.kid))throw new $t(`Duplicate key: ${h.kid}`);u.add(h.kid)}this.keys=Object.freeze(l)}get size(){return this.keys.length}get signAlgorithms(){const i=new Set;for(const c of this)if(c.use==="sig")for(const l of c.algorithms)i.add(l);return Object.freeze([...i].sort(j0(this.preferredSigningAlgorithms)))}get publicJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,G0).filter(ea))})}get privateJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,Q0).filter(ea))})}has(i){return this.keys.some(c=>c.kid===i)}get(i){const c=this.find(i);if(c)return c;throw new $t(`Key not found ${i.kid??i.alg??i.usage??"<unknown>"}`,Xo)}find(i){for(const c of this.list(i))return c}*list(i){for(const c of this)c.isActive(i)&&c.matches(i)&&(yield c)}findPrivateKey({kid:i,alg:c,usage:l,...u}){const h=[];Array.isArray(c)&&c.length===1&&(c=c[0]);for(const g of this.list({...u,kid:i,alg:c,usage:l})){if(typeof c=="string")return{key:g,alg:c};h.push(g)}const d=C0(c),m=h.map(g=>[g,g.algorithms.filter(d)]);for(const g of this.preferredSigningAlgorithms)for(const[b,v]of m)if(v.includes(g))return{key:b,alg:g};for(const[g,b]of m)for(const v of b)return{key:g,alg:v};throw new $t(`No private key found for ${i||c||l}`,Xo)}[(t=[Pt],s=[Pt],n=[Pt],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:i,kid:c,...l},u){try{const{key:h,alg:d}=this.findPrivateKey({alg:i,kid:c,usage:"sign",allowRevoked:!1}),m={...l,alg:d,kid:h.kid};return typeof u=="function"&&(u=await u(m,h)),await h.createJwt(m,u)}catch(h){throw vn.from(h)}}async verifyJwt(i,c){const{header:l}=B0(i),{kid:u,alg:h}=l,d=[];for(const m of this.list({...c,kid:u,alg:h,usage:"verify"}))try{return{...await m.verifyJwt(i,c),key:m}}catch(g){d.push(g)}switch(d.length){case 0:throw new vt("No key matched",f0);case 1:throw vt.from(d[0],cr);default:throw vt.from(d,cr)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;zr(r,null,t,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:c=>"signAlgorithms"in c,get:c=>c.signAlgorithms},metadata:i},null,e),zr(r,null,s,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:c=>"publicJwks"in c,get:c=>c.publicJwks},metadata:i},null,e),zr(r,null,n,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:c=>"privateJwks"in c,get:c=>c.privateJwks},metadata:i},null,e),i&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})})(),r})();const J0=f.object({type:f.string(),locations:f.array(xr).optional(),actions:f.array(f.string()).optional(),datatypes:f.array(f.string()).optional(),identifier:f.string().optional(),privileges:f.array(f.string()).optional()}),Sl=f.array(J0),Y0=f.union([f.string().regex(/^DPoP$/i).transform(()=>"DPoP"),f.string().regex(/^Bearer$/i).transform(()=>"Bearer")]),X0=f.object({access_token:f.string(),token_type:Y0,scope:f.string().optional(),refresh_token:f.string().optional(),expires_in:f.number().optional(),id_token:Ar.optional(),authorization_details:Sl.optional()}).passthrough();X0.extend({token_type:f.literal("DPoP"),sub:nu,scope:u0,id_token:f.never().optional()});const ep=f.string().min(1),tp=f.object({grant_type:f.literal("authorization_code"),code:f.string().min(1),redirect_uri:lo,code_verifier:f.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()}),Rl=f.object({request:f.union([Ar,Z0])}),Al=f.enum(["S256","plain"]),jl=f.enum(["none","login","consent","select_account","create"]),sp=f.enum(["query","fragment","form_post"]),Cl=f.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),np=f.enum(["auth_time","nonce","acr","name","family_name","given_name","middle_name","nickname","preferred_username","gender","picture","profile","website","birthdate","zoneinfo","locale","updated_at","email","email_verified","phone_number","phone_number_verified","address"]),na=f.union([f.string(),f.number(),f.boolean()]),rp=f.object({essential:f.boolean().optional(),value:na.optional(),values:f.array(na).optional()}),ip=f.enum(["userinfo","id_token"]),Pl=f.object({client_id:Jt,state:f.string().optional(),redirect_uri:lo.optional(),scope:co.optional(),response_type:Cl,code_challenge:f.string().optional(),code_challenge_method:Al.optional(),dpop_jkt:f.string().optional(),response_mode:sp.optional(),nonce:f.string().optional(),max_age:f.preprocess(r0,f.number().int().min(0)).optional(),claims:f.preprocess(Yo,f.record(ip,f.record(np,f.union([f.literal(null),rp])))).optional(),login_hint:f.string().min(1).optional(),ui_locales:f.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:Ar.optional(),display:f.enum(["page","popup","touch","wap"]).optional(),prompt:jl.optional(),authorization_details:f.preprocess(Yo,Sl).optional()});f.union([Pl,Rl]);const op=f.string().min(1),ap=f.object({request_uri:op});f.intersection(f.object({client_id:Jt}),f.union([Pl,Rl,ap]));f.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);const El=de.superRefine((e,t)=>{if(e.endsWith("/"))return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const s=new URL(e);if(s.username||s.password)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(s.hash||s.search)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const n=s.pathname==="/"?s.origin:s.href;return e!==n?(t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0}),cp=f.object({issuer:El,claims_supported:f.array(f.string()).optional(),claims_locales_supported:f.array(f.string()).optional(),claims_parameter_supported:f.boolean().optional(),request_parameter_supported:f.boolean().optional(),request_uri_parameter_supported:f.boolean().optional(),require_request_uri_registration:f.boolean().optional(),scopes_supported:f.array(f.string()).optional(),subject_types_supported:f.array(f.string()).optional(),response_types_supported:f.array(f.string()).optional(),response_modes_supported:f.array(f.string()).optional(),grant_types_supported:f.array(f.string()).optional(),code_challenge_methods_supported:f.array(Al).min(1).optional(),ui_locales_supported:f.array(f.string()).optional(),id_token_signing_alg_values_supported:f.array(f.string()).optional(),display_values_supported:f.array(f.string()).optional(),request_object_signing_alg_values_supported:f.array(f.string()).optional(),authorization_response_iss_parameter_supported:f.boolean().optional(),authorization_details_types_supported:f.array(f.string()).optional(),request_object_encryption_alg_values_supported:f.array(f.string()).optional(),request_object_encryption_enc_values_supported:f.array(f.string()).optional(),jwks_uri:de.optional(),authorization_endpoint:de,token_endpoint:de,token_endpoint_auth_methods_supported:f.array(f.string()).default(["client_secret_basic"]),token_endpoint_auth_signing_alg_values_supported:f.array(f.string()).optional(),revocation_endpoint:de.optional(),introspection_endpoint:de.optional(),pushed_authorization_request_endpoint:de.optional(),require_pushed_authorization_requests:f.boolean().optional(),userinfo_endpoint:de.optional(),end_session_endpoint:de.optional(),registration_endpoint:de.optional(),dpop_signing_alg_values_supported:f.array(f.string()).optional(),protected_resources:f.array(de).optional(),client_id_metadata_document_supported:f.boolean().optional(),prompt_values_supported:f.array(jl).optional()});cp.superRefine((e,t)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&t.addIssue({code:f.ZodIssueCode.custom,message:'"pushed_authorization_request_endpoint" required when "require_pushed_authorization_requests" is true'})}).superRefine((e,t)=>{e.response_types_supported&&(e.response_types_supported.includes("code")||t.addIssue({code:f.ZodIssueCode.custom,message:'Response type "code" is required'}))}).superRefine((e,t)=>{var s;(s=e.token_endpoint_auth_signing_alg_values_supported)!=null&&s.includes("none")&&t.addIssue({code:f.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})});const lp=f.object({grant_type:f.literal("client_credentials")}),up=f.object({client_id:Jt,client_assertion_type:f.literal(e0),client_assertion:Ar}),dp=f.object({client_id:Jt,client_secret:f.string()}),hp=f.object({client_id:Jt});f.union([up,dp,hp]);const fp=f.intersection(Jt,ao).superRefine((e,t)=>{const s=new URL(e);return s.username||s.password?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):s.hash?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):s.pathname==="/"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):s.pathname.endsWith("/")?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):dl(s.hostname)?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):n0(e)!==s.pathname?(t.addIssue({code:f.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${s.href}", got "${e}")`}),!1):!0}),pp=fp.superRefine((e,t)=>{const s=new URL(e);return s.port?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):s.search?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):s.pathname!=="/oauth-client-metadata.json"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function kl(e){return pp.safeParse(e).success}const mp=f.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]),gp=f.enum(["authorization_code","implicit","refresh_token","password","client_credentials","urn:ietf:params:oauth:grant-type:jwt-bearer","urn:ietf:params:oauth:grant-type:saml2-bearer"]);f.object({redirect_uris:f.array(lo).nonempty(),response_types:f.array(Cl).nonempty().default(["code"]),grant_types:f.array(gp).nonempty().default(["authorization_code"]),scope:co.optional(),token_endpoint_auth_method:mp.default("client_secret_basic"),token_endpoint_auth_signing_alg:f.string().optional(),userinfo_signed_response_alg:f.string().optional(),userinfo_encrypted_response_alg:f.string().optional(),jwks_uri:de.optional(),jwks:V0.optional(),application_type:f.enum(["web","native"]).default("web"),subject_type:f.enum(["public","pairwise"]).default("public"),request_object_signing_alg:f.string().optional(),id_token_signed_response_alg:f.string().optional(),authorization_signed_response_alg:f.string().default("RS256"),authorization_encrypted_response_enc:f.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:f.string().optional(),client_id:Jt.optional(),client_name:f.string().optional(),client_uri:de.optional(),policy_uri:de.optional(),tos_uri:de.optional(),logo_uri:de.optional(),default_max_age:f.number().optional(),require_auth_time:f.boolean().optional(),contacts:f.array(f.string().email()).optional(),tls_client_certificate_bound_access_tokens:f.boolean().optional(),dpop_bound_access_tokens:f.boolean().optional(),authorization_details_types:f.array(f.string()).optional()});f.object({request_uri:f.string(),expires_in:f.number().int().positive()});const vp=f.object({grant_type:f.literal("password"),username:f.string(),password:f.string()});f.object({resource:de.refine(e=>!e.includes("?"),{message:"Resource URL must not contain query parameters"}).refine(e=>!e.includes("#"),{message:"Resource URL must not contain a fragment"}),authorization_servers:f.array(El).optional(),jwks_uri:de.optional(),scopes_supported:f.array(f.string()).optional(),bearer_methods_supported:f.array(f.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:f.array(f.string()).optional(),resource_documentation:de.optional(),resource_policy_uri:de.optional(),resource_tos_uri:de.optional()});const Ml=f.string().min(1),yp=f.object({grant_type:f.literal("refresh_token"),refresh_token:Ml});f.object({token:f.union([ep,Ml]),token_type_hint:f.enum(["access_token","refresh_token"]).optional()});f.discriminatedUnion("grant_type",[tp,yp,vp,lp]);f.enum(["interaction_required","login_required","account_selection_required","consent_required","invalid_request_uri","invalid_request_object","request_not_supported","request_uri_not_supported","registration_not_supported"]);f.object({sub:f.string(),iss:f.string().url().optional(),aud:f.union([f.string(),f.array(f.string()).min(1)]).optional(),email:f.string().email().optional(),email_verified:f.boolean().optional(),name:f.string().optional(),preferred_username:f.string().optional(),picture:f.string().url().optional()});function bp({clientId:e}){const{i18n:t,_:s}=he();return gl(e)?t._({id:"u607t5"}):kl(e)?new URL(e).hostname:e}function wp({clientId:e,clientMetadata:t}){const{i18n:s,_:n}=he();return gl(e)?s._({id:"4Yp2r7"}):t!=null&&t.client_name?t.client_name:kl(e)?new URL(e).hostname:e}function xp(){const{account:e}=Qt(),{sub:t}=e,{data:s,isLoading:n,refetch:r}=Yf({sub:t});return s?s.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(V,{id:"kx1Bq7"})}),s.map(o=>a.jsx(_p,{sub:t,session:o},o.tokenId)),a.jsx("p",{className:"text-text-light mt-4 text-sm",children:a.jsx(V,{id:"SLeBc7"})})]}):a.jsx("p",{children:a.jsx(V,{id:"pWhWXw"})}):n?a.jsx(oo,{className:"text-primary",size:28}):a.jsx(dr,{role:"status",action:a.jsx(Ia,{onClick:()=>r(),children:a.jsx(V,{id:"6gRgw8"})}),children:a.jsx(V,{id:"b9LiEi"})})}function _p({session:{clientId:e,clientMetadata:t,tokenId:s,createdAt:n,updatedAt:r,scope:o=t==null?void 0:t.scope},sub:i}){const{i18n:c,i18n:l,_:u}=he(),{notify:h}=St(),{mutateAsync:d,isPending:m}=Xf(),g=bp({clientId:e}),b=wp({clientId:e,clientMetadata:t}),v=async()=>{try{await d({sub:i,tokenId:s}),h({variant:"success",title:c._({id:"AyHABv"}),duration:2e3})}catch(x){console.error("Failed to revoke OAuth session",x),h({variant:"error",title:c._({id:"ginpu1"}),duration:2e3})}};return a.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[a.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[a.jsx("p",{className:"truncate font-semibold",children:b}),a.jsx("p",{className:"font-mono text-xs",children:g}),a.jsxs("p",{className:"text-text-light truncate text-xs",children:[a.jsx(V,{id:"4hPphw",values:{0:l.date(n,{year:"numeric",month:"short",day:"numeric"})}})," • ",a.jsx(V,{id:"NNWPjN",components:{0:a.jsx(Jf,{date:r})}})]})]}),a.jsx(Oe,{size:"sm",className:"min-w-max shrink-0 grow-0",loading:m,onClick:v,children:a.jsx(V,{id:"Hwam5t"})})]})}const Ol=({sub:e})=>["account-sessions",e];function Sp({sub:e}){const t=Ge();return rc({refetchOnWindowFocus:"always",staleTime:15e3,queryKey:Ol({sub:e}),queryFn:async({signal:s})=>t.accountSessions({sub:e},{signal:s})})}function Rp(){const e=Ge(),t=fr();return Rt({async mutationFn(s){await e.revokeAccountSession(s)},onSuccess(s,{sub:n}){t.invalidateQueries({queryKey:Ol({sub:n})})}})}var Ap="2.0.3",Ei=500,ra="user-agent",Qs="",ia="?",lr="function",Zt="undefined",Gs="object",ki="string",Ce="browser",ht="cpu",rt="device",ze="engine",Ve="os",ks="result",k="name",R="type",E="vendor",M="version",Pe="architecture",_n="major",C="model",pn="console",W="mobile",re="tablet",pe="smarttv",Xe="wearable",Wr="xr",mn="embedded",nn="inapp",yo="brands",ns="formFactors",bo="fullVersionList",Ms="platform",wo="platformVersion",jr="bitness",Yt="sec-ch-ua",jp=Yt+"-full-version-list",Cp=Yt+"-arch",Pp=Yt+"-"+jr,Ep=Yt+"-form-factors",kp=Yt+"-"+W,Mp=Yt+"-"+C,Ll=Yt+"-"+Ms,Op=Ll+"-version",Nl=[yo,bo,W,C,Ms,wo,Pe,ns,jr],Vn="Amazon",ys="Apple",oa="ASUS",aa="BlackBerry",ts="Google",ca="Huawei",la="Lenovo",ua="Honor",Zn="LG",Kr="Microsoft",Qr="Motorola",Gr="Nvidia",da="OnePlus",Jr="OPPO",rn="Samsung",ha="Sharp",on="Sony",Yr="Xiaomi",Xr="Zebra",fa="Chrome",pa="Chromium",jt="Chromecast",Lp="Edge",an="Firefox",cn="Opera",ei="Facebook",ma="Sogou",bs="Mobile ",ln=" Browser",Mi="Windows",Np=typeof window!==Zt,Ee=Np&&window.navigator?window.navigator:void 0,Et=Ee&&Ee.userAgentData?Ee.userAgentData:void 0,Ip=function(e,t){var s={},n=t;if(!ur(t)){n={};for(var r in t)for(var o in t[r])n[o]=t[r][o].concat(n[o]?n[o]:[])}for(var i in e)s[i]=n[i]&&n[i].length%2===0?n[i].concat(e[i]):e[i];return s},Cr=function(e){for(var t={},s=0;s<e.length;s++)t[e[s].toUpperCase()]=e[s];return t},Oi=function(e,t){if(typeof e===Gs&&e.length>0){for(var s in e)if(pt(e[s])==pt(t))return!0;return!1}return tn(e)?pt(t).indexOf(pt(e))!==-1:!1},ur=function(e,t){for(var s in e)return/^(browser|cpu|device|engine|os)$/.test(s)||(t?ur(e[s]):!1)},tn=function(e){return typeof e===ki},ti=function(e){if(e){for(var t=[],s=Js(/\\?\"/g,e).split(","),n=0;n<s.length;n++)if(s[n].indexOf(";")>-1){var r=Sn(s[n]).split(";v=");t[n]={brand:r[0],version:r[1]}}else t[n]=Sn(s[n]);return t}},pt=function(e){return tn(e)?e.toLowerCase():e},si=function(e){return tn(e)?Js(/[^\d\.]/g,e).split(".")[0]:void 0},mt=function(e){for(var t in e){var s=e[t];typeof s==Gs&&s.length==2?this[s[0]]=s[1]:this[s]=void 0}return this},Js=function(e,t){return tn(t)?t.replace(e,Qs):t},un=function(e){return Js(/\\?\"/g,e)},Sn=function(e,t){if(tn(e))return e=Js(/^\s\s*/,e),typeof t===Zt?e:e.substring(0,Ei)},ni=function(e,t){if(!(!e||!t))for(var s=0,n,r,o,i,c,l;s<t.length&&!c;){var u=t[s],h=t[s+1];for(n=r=0;n<u.length&&!c&&u[n];)if(c=u[n++].exec(e),c)for(o=0;o<h.length;o++)l=c[++r],i=h[o],typeof i===Gs&&i.length>0?i.length===2?typeof i[1]==lr?this[i[0]]=i[1].call(this,l):this[i[0]]=i[1]:i.length===3?typeof i[1]===lr&&!(i[1].exec&&i[1].test)?this[i[0]]=l?i[1].call(this,l,i[2]):void 0:this[i[0]]=l?l.replace(i[1],i[2]):void 0:i.length===4&&(this[i[0]]=l?i[3].call(this,l.replace(i[1],i[2])):void 0):this[i]=l||void 0;s+=2}},kt=function(e,t){for(var s in t)if(typeof t[s]===Gs&&t[s].length>0){for(var n=0;n<t[s].length;n++)if(Oi(t[s][n],e))return s===ia?void 0:s}else if(Oi(t[s],e))return s===ia?void 0:s;return t.hasOwnProperty("*")?t["*"]:e},ga={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},va={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ya={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[M,[k,bs+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[M,[k,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[k,M],[/opios[\/ ]+([\w\.]+)/i],[M,[k,cn+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[M,[k,cn+" GX"]],[/\bopr\/([\w\.]+)/i],[M,[k,cn]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[M,[k,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[M,[k,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[k,M],[/quark(?:pc)?\/([-\w\.]+)/i],[M,[k,"Quark"]],[/\bddg\/([\w\.]+)/i],[M,[k,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[M,[k,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[M,[k,"WeChat"]],[/konqueror\/([\w\.]+)/i],[M,[k,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[M,[k,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[M,[k,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[M,[k,"Smart "+la+ln]],[/(avast|avg)\/([\w\.]+)/i],[[k,/(.+)/,"$1 Secure"+ln],M],[/\bfocus\/([\w\.]+)/i],[M,[k,an+" Focus"]],[/\bopt\/([\w\.]+)/i],[M,[k,cn+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[M,[k,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[M,[k,"Dolphin"]],[/coast\/([\w\.]+)/i],[M,[k,cn+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[M,[k,"MIUI"+ln]],[/fxios\/([\w\.-]+)/i],[M,[k,bs+an]],[/\bqihoobrowser\/?([\w\.]*)/i],[M,[k,"360"]],[/\b(qq)\/([\w\.]+)/i],[[k,/(.+)/,"$1Browser"],M],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[k,/(.+)/,"$1"+ln],M],[/samsungbrowser\/([\w\.]+)/i],[M,[k,rn+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[M,[k,ma+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[k,ma+" Mobile"],M],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[k,M],[/(lbbrowser|rekonq)/i],[k],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[M,k],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[k,ei],M,[R,nn]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[k,M,[R,nn]],[/\bgsa\/([\w\.]+) .*safari\//i],[M,[k,"GSA"],[R,nn]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[M,[k,"TikTok"],[R,nn]],[/\[(linkedin)app\]/i],[k,[R,nn]],[/(chromium)[\/ ]([-\w\.]+)/i],[k,M],[/headlesschrome(?:\/([\w\.]+)| )/i],[M,[k,fa+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[k,fa+" WebView"],M],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[M,[k,"Android"+ln]],[/chrome\/([\w\.]+) mobile/i],[M,[k,bs+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[k,M],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[M,[k,bs+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[k,bs+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[M,k],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[k,[M,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[k,M],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[k,bs+an],M],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[k,"Netscape"],M],[/(wolvic|librewolf)\/([\w\.]+)/i],[k,M],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[M,[k,an+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[k,[M,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[k,[M,/[^\d\.]+./,Qs]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[Pe,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[Pe,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[Pe,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[Pe,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[Pe,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[Pe,/ower/,Qs,pt]],[/ sun4\w[;\)]/i],[[Pe,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[Pe,pt]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[C,[E,rn],[R,re]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[C,[E,rn],[R,W]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[C,[E,ys],[R,W]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[C,[E,ys],[R,re]],[/(macintosh);/i],[C,[E,ys]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[C,[E,ha],[R,W]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[C,[E,ua],[R,re]],[/honor([-\w ]+)[;\)]/i],[C,[E,ua],[R,W]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[C,[E,ca],[R,re]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[C,[E,ca],[R,W]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[C,/_/g," "],[E,Yr],[R,re]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[C,/_/g," "],[E,Yr],[R,W]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[C,[E,Jr],[R,W]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[C,[E,kt,{OnePlus:["304","403","203"],"*":Jr}],[R,re]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[C,[E,"BLU"],[R,W]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[C,[E,"Vivo"],[R,W]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[C,[E,"Realme"],[R,W]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[C,[E,Qr],[R,W]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[C,[E,Qr],[R,re]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[C,[E,Zn],[R,re]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[C,[E,Zn],[R,W]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[C,[E,la],[R,re]],[/(nokia) (t[12][01])/i],[E,C,[R,re]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[C,/_/g," "],[R,W],[E,"Nokia"]],[/(pixel (c|tablet))\b/i],[C,[E,ts],[R,re]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[C,[E,ts],[R,W]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[C,[E,on],[R,W]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[C,"Xperia Tablet"],[E,on],[R,re]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[C,[E,da],[R,W]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[C,[E,Vn],[R,re]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[C,/(.+)/g,"Fire Phone $1"],[E,Vn],[R,W]],[/(playbook);[-\w\),; ]+(rim)/i],[C,E,[R,re]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[C,[E,aa],[R,W]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[C,[E,oa],[R,re]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[C,[E,oa],[R,W]],[/(nexus 9)/i],[C,[E,"HTC"],[R,re]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[E,[C,/_/g," "],[R,W]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[C,[E,"TCL"],[R,re]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[C,[E,"TCL"],[R,W]],[/(itel) ((\w+))/i],[[E,pt],C,[R,kt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[C,[E,"Acer"],[R,re]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[C,[E,"Meizu"],[R,W]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[C,[E,"Ulefone"],[R,W]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[C,[E,"Energizer"],[R,W]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[C,[E,"Cat"],[R,W]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[C,[E,"Smartfren"],[R,W]],[/droid.+; (a(?:015|06[35]|142p?))/i],[C,[E,"Nothing"],[R,W]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[C,[E,"Archos"],[R,re]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[C,[E,"Archos"],[R,W]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[E,C,[R,re]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[E,C,[R,W]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[E,C,[R,re]],[/(surface duo)/i],[C,[E,Kr],[R,re]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[C,[E,"Fairphone"],[R,W]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[C,[E,Gr],[R,re]],[/(sprint) (\w+)/i],[E,C,[R,W]],[/(kin\.[onetw]{3})/i],[[C,/\./g," "],[E,Kr],[R,W]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[C,[E,Xr],[R,re]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[C,[E,Xr],[R,W]],[/smart-tv.+(samsung)/i],[E,[R,pe]],[/hbbtv.+maple;(\d+)/i],[[C,/^/,"SmartTV"],[E,rn],[R,pe]],[/tcast.+(lg)e?. ([-\w]+)/i],[E,C,[R,pe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[E,Zn],[R,pe]],[/(apple) ?tv/i],[E,[C,ys+" TV"],[R,pe]],[/crkey.*devicetype\/chromecast/i],[[C,jt+" Third Generation"],[E,ts],[R,pe]],[/crkey.*devicetype\/([^/]*)/i],[[C,/^/,"Chromecast "],[E,ts],[R,pe]],[/fuchsia.*crkey/i],[[C,jt+" Nest Hub"],[E,ts],[R,pe]],[/crkey/i],[[C,jt],[E,ts],[R,pe]],[/(portaltv)/i],[C,[E,ei],[R,pe]],[/droid.+aft(\w+)( bui|\))/i],[C,[E,Vn],[R,pe]],[/(shield \w+ tv)/i],[C,[E,Gr],[R,pe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[C,[E,ha],[R,pe]],[/(bravia[\w ]+)( bui|\))/i],[C,[E,on],[R,pe]],[/(mi(tv|box)-?\w+) bui/i],[C,[E,Yr],[R,pe]],[/Hbbtv.*(technisat) (.*);/i],[E,C,[R,pe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[E,Sn],[C,Sn],[R,pe]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[C,[R,pe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[R,pe]],[/(ouya)/i,/(nintendo) (\w+)/i],[E,C,[R,pn]],[/droid.+; (shield)( bui|\))/i],[C,[E,Gr],[R,pn]],[/(playstation \w+)/i],[C,[E,on],[R,pn]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[C,[E,Kr],[R,pn]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[C,[E,rn],[R,Xe]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[E,C,[R,Xe]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[C,[E,Jr],[R,Xe]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[C,[E,ys],[R,Xe]],[/(opwwe\d{3})/i],[C,[E,da],[R,Xe]],[/(moto 360)/i],[C,[E,Qr],[R,Xe]],[/(smartwatch 3)/i],[C,[E,on],[R,Xe]],[/(g watch r)/i],[C,[E,Zn],[R,Xe]],[/droid.+; (wt63?0{2,3})\)/i],[C,[E,Xr],[R,Xe]],[/droid.+; (glass) \d/i],[C,[E,ts],[R,Wr]],[/(pico) (4|neo3(?: link|pro)?)/i],[E,C,[R,Wr]],[/(quest( \d| pro)?s?).+vr/i],[C,[E,ei],[R,Wr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[E,[R,mn]],[/(aeobc)\b/i],[C,[E,Vn],[R,mn]],[/(homepod).+mac os/i],[C,[E,ys],[R,mn]],[/windows iot/i],[[R,mn]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[C,[R,kt,{mobile:"Mobile",xr:"VR","*":re}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[R,re]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[R,W]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[C,[E,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[M,[k,Lp+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[k,M],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[M,[k,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[k,M],[/ladybird\//i],[[k,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[M,k]],os:[[/microsoft (windows) (vista|xp)/i],[k,M],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[k,[M,kt,ga]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[M,kt,ga],[k,Mi]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[M,/_/g,"."],[k,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[k,"macOS"],[M,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[M,[k,jt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[M,[k,jt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[M,[k,jt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[M,[k,jt+" Linux"]],[/crkey\/([\d\.]+)/i],[M,[k,jt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[M,k],[/(ubuntu) ([\w\.]+) like android/i],[[k,/(.+)/,"$1 Touch"],M],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[k,M],[/\(bb(10);/i],[M,[k,aa]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[M,[k,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[M,[k,an+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[M,[k,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[M,[k,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[k,"Chrome OS"],M],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[k,M],[/(sunos) ?([\w\.\d]*)/i],[[k,"Solaris"],M],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[k,M]]},Un=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return mt.call(e.init,[[Ce,[k,M,_n,R]],[ht,[Pe]],[rt,[R,C,E]],[ze,[k,M]],[Ve,[k,M]]]),mt.call(e.isIgnore,[[Ce,[M,_n]],[ze,[M]],[Ve,[M]]]),mt.call(e.isIgnoreRgx,[[Ce,/ ?browser$/i],[Ve,/ ?os$/i]]),mt.call(e.toString,[[Ce,[k,M]],[ht,[Pe]],[rt,[E,C]],[ze,[k,M]],[Ve,[k,M]]]),e}(),Fp=function(e,t){var s=Un.init[t],n=Un.isIgnore[t]||0,r=Un.isIgnoreRgx[t]||0,o=Un.toString[t]||0;function i(){mt.call(this,s)}return i.prototype.getItem=function(){return e},i.prototype.withClientHints=function(){return Et?Et.getHighEntropyValues(Nl).then(function(c){return e.setCH(new Il(c,!1)).parseCH().get()}):e.parseCH().get()},i.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=ks&&(i.prototype.is=function(c){var l=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Oi(n,u)&&pt(r?Js(r,this[u]):this[u])==pt(r?Js(r,c):c)){if(l=!0,c!=Zt)break}else if(c==Zt&&l){l=!l;break}return l},i.prototype.toString=function(){var c=Qs;for(var l in o)typeof this[o[l]]!==Zt&&(c+=(c?" ":Qs)+this[o[l]]);return c||Zt}),Et||(i.prototype.then=function(c){var l=this,u=function(){for(var d in l)l.hasOwnProperty(d)&&(this[d]=l[d])};u.prototype={is:i.prototype.is,toString:i.prototype.toString};var h=new u;return c(h),h}),new i};function Il(e,t){if(e=e||{},mt.call(this,Nl),t)mt.call(this,[[yo,ti(e[Yt])],[bo,ti(e[jp])],[W,/\?1/.test(e[kp])],[C,un(e[Mp])],[Ms,un(e[Ll])],[wo,un(e[Op])],[Pe,un(e[Cp])],[ns,ti(e[Ep])],[jr,un(e[Pp])]]);else for(var s in e)this.hasOwnProperty(s)&&typeof e[s]!==Zt&&(this[s]=e[s])}function ba(e,t,s,n){return this.get=function(r){return r?this.data.hasOwnProperty(r)?this.data[r]:void 0:this.data},this.set=function(r,o){return this.data[r]=o,this},this.setCH=function(r){return this.uaCH=r,this},this.detectFeature=function(){if(Ee&&Ee.userAgent==this.ua)switch(this.itemType){case Ce:Ee.brave&&typeof Ee.brave.isBrave==lr&&this.set(k,"Brave");break;case rt:!this.get(R)&&Et&&Et[W]&&this.set(R,W),this.get(C)=="Macintosh"&&Ee&&typeof Ee.standalone!==Zt&&Ee.maxTouchPoints&&Ee.maxTouchPoints>2&&this.set(C,"iPad").set(R,re);break;case Ve:!this.get(k)&&Et&&Et[Ms]&&this.set(k,Et[Ms]);break;case ks:var r=this.data,o=function(i){return r[i].getItem().detectFeature().get()};this.set(Ce,o(Ce)).set(ht,o(ht)).set(rt,o(rt)).set(ze,o(ze)).set(Ve,o(Ve))}return this},this.parseUA=function(){return this.itemType!=ks&&ni.call(this.data,this.ua,this.rgxMap),this.itemType==Ce&&this.set(_n,si(this.get(M))),this},this.parseCH=function(){var r=this.uaCH,o=this.rgxMap;switch(this.itemType){case Ce:case ze:var i=r[bo]||r[yo],c;if(i)for(var l in i){var u=i[l].brand||i[l],h=i[l].version;this.itemType==Ce&&!/not.a.brand/i.test(u)&&(!c||/chrom/i.test(c)&&u!=pa)&&(u=kt(u,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(k,u).set(M,h).set(_n,si(h)),c=u),this.itemType==ze&&u==pa&&this.set(M,h)}break;case ht:var d=r[Pe];d&&(d&&r[jr]=="64"&&(d+="64"),ni.call(this.data,d+";",o));break;case rt:if(r[W]&&this.set(R,W),r[C]&&(this.set(C,r[C]),!this.get(R)||!this.get(E))){var m={};ni.call(m,"droid 9; "+r[C]+")",o),!this.get(R)&&m.type&&this.set(R,m.type),!this.get(E)&&m.vendor&&this.set(E,m.vendor)}if(r[ns]){var g;if(typeof r[ns]!="string")for(var b=0;!g&&b<r[ns].length;)g=kt(r[ns][b++],va);else g=kt(r[ns],va);this.set(R,g)}break;case Ve:var v=r[Ms];if(v){var x=r[wo];v==Mi&&(x=parseInt(si(x),10)>=13?"11":"10"),this.set(k,v).set(M,x)}this.get(k)==Mi&&r[C]=="Xbox"&&this.set(k,"Xbox").set(M,void 0);break;case ks:var w=this.data,j=function(A){return w[A].getItem().setCH(r).parseCH().get()};this.set(Ce,j(Ce)).set(ht,j(ht)).set(rt,j(rt)).set(ze,j(ze)).set(Ve,j(Ve))}return this},mt.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",s],["data",Fp(this,e)]]),this}function xt(e,t,s){if(typeof e===Gs?(ur(e,!0)?(typeof t===Gs&&(s=t),t=e):(s=e,t=void 0),e=void 0):typeof e===ki&&!ur(t,!0)&&(s=t,t=void 0),s&&typeof s.append===lr){var n={};s.forEach(function(l,u){n[u]=l}),s=n}if(!(this instanceof xt))return new xt(e,t,s).getResult();var r=typeof e===ki?e:s&&s[ra]?s[ra]:Ee&&Ee.userAgent?Ee.userAgent:Qs,o=new Il(s,!0),i=t?Ip(ya,t):ya,c=function(l){return l==ks?function(){return new ba(l,r,i,o).set("ua",r).set(Ce,this.getBrowser()).set(ht,this.getCPU()).set(rt,this.getDevice()).set(ze,this.getEngine()).set(Ve,this.getOS()).get()}:function(){return new ba(l,r,i[l],o).parseUA().get()}};return mt.call(this,[["getBrowser",c(Ce)],["getCPU",c(ht)],["getDevice",c(rt)],["getEngine",c(ze)],["getOS",c(Ve)],["getResult",c(ks)],["getUA",function(){return r}],["setUA",function(l){return tn(l)&&(r=l.length>Ei?Sn(l,Ei):l),this}]]).setUA(r),this}xt.VERSION=Ap;xt.BROWSER=Cr([k,M,_n,R]);xt.CPU=Cr([Pe]);xt.DEVICE=Cr([C,E,R,pn,W,pe,re,Xe,mn]);xt.ENGINE=xt.OS=Cr([k,M]);function Hp(e){const t=p.useMemo(()=>e?xt(e):null,[e]);return t?t.device.is("mobile")?[t.os.name].filter(Boolean).join(" • "):[t.os.name,t.browser.name].filter(Boolean).join(" • "):void 0}function Tp(){const{account:e}=Qt(),{data:t,refetch:s,isLoading:n}=Sp(e);return t?t.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(V,{id:"CbBmBd",components:{0:a.jsx(nr,{to:"/account/apps",className:"text-blue-600 hover:underline"})}})}),t.map(r=>a.jsx(Dp,{sub:e.sub,session:r},`${e.sub}@${r.deviceId}`))]}):a.jsx("p",{children:a.jsx(V,{id:"Ssa5RR"})}):n?a.jsx(oo,{className:"text-primary",size:28}):a.jsx(dr,{role:"status",action:a.jsx(Ia,{onClick:()=>s(),children:a.jsx(V,{id:"6gRgw8"})}),children:a.jsx(V,{id:"b9LiEi"})})}function Dp({session:e,sub:t}){const{notify:s}=St(),{i18n:n,_:r}=he(),{mutateAsync:o,isPending:i}=Rp(),{userAgent:c,lastSeenAt:l,ipAddress:u}=e.deviceMetadata,h=Hp(c||void 0),d=ul(l),m=async()=>{try{await o({sub:t,deviceId:e.deviceId}),s({variant:"success",title:n._({id:"jAO4/H"}),duration:2e3})}catch{s({variant:"error",title:n._({id:"CiwBmN"}),duration:2e3})}};return a.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[a.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[a.jsx("p",{className:"truncate font-semibold",children:h||a.jsx(V,{id:"K80Okk"})}),a.jsx("p",{className:"font-mono text-xs",children:u}),a.jsx("p",{className:"text-text-light truncate text-xs",children:a.jsx(V,{id:"sJZ6K9",values:{lastUsedAgo:d}})})]}),a.jsx(Oe,{size:"sm",className:"min-w-max shrink-0 grow-0",disabled:e.isCurrentDevice,loading:i,onClick:m,title:e.isCurrentDevice?n._({id:"JOalQJ"}):void 0,children:a.jsx(V,{id:"MzTcmM"})})]})}function qt({title:e,description:t,trigger:s,children:n,dismissable:r=!0,...o}){const{i18n:i,_:c}=he(),l=r?void 0:u=>u.preventDefault();return a.jsxs(ru,{...o,children:[a.jsx(iu,{asChild:!0,children:s}),a.jsxs(ou,{children:[a.jsx(au,{className:"bg-contrast-900/30 dark:bg-contrast-0/70 fixed inset-0"}),a.jsxs(cu,{role:"dialog",...t==null&&{"aria-describedby":void 0},onEscapeKeyDown:l,onPointerDownOutside:l,onInteractOutside:l,className:"bg-contrast-0 fixed inset-0 flex flex-col overflow-y-auto border-slate-200 p-6 shadow-xl sm:inset-auto sm:left-1/2 sm:top-1/2 sm:max-h-[85vh] sm:w-[90vw] sm:max-w-md sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg sm:border dark:border-slate-700",children:[n,a.jsxs("div",{className:"-order-1 mb-4 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsx(lu,{className:"text-text-default text-lg font-semibold",children:e}),t&&a.jsx(uu,{className:"text-text-light text-sm",children:t})]}),a.jsx(du,{disabled:!r,className:"text-text-light shrink-0 rounded-full p-1 hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 disabled:cursor-default disabled:opacity-50 disabled:hover:bg-transparent dark:hover:bg-slate-700","aria-label":i._({id:"yz7wBu"}),children:a.jsx(Za,{className:"size-5","aria-hidden":!0})})]})]})]})]})}function Vp(e){const[t,s]=p.useState(wa(e));p.useEffect(()=>{if(t>0){const r=setTimeout(()=>{s(t-1)},1e3);return()=>clearTimeout(r)}},[t]);const n=ii(r=>{s(wa(r))});return[Math.max(0,t),n]}function wa(e){return e<0||Number.isNaN(e)?0:Math.floor(e)}function Zp({action:e,cooldown:t=30,startWithCooldown:s=!1}){const[n,r]=Vp(s?t:0),{loading:o,run:i,reset:c}=hu(async()=>{await e(),r(t)}),l=ii(async()=>{if(o||n>0)throw new Error("Action is already running or rate limited");return i()}),u=ii(()=>{r(0),c()}),h=o,d=n>0;return p.useMemo(()=>({isRateLimited:d,isPending:h,trigger:l,clear:u,remaining:n,total:t}),[n,d,h,l,u,t])}function Up({idleIcon:e,action:t,cooldown:s,startWithCooldown:n,children:r,onClick:o,disabled:i=!1,loading:c,className:l,size:u="md",...h}){const{i18n:d,_:m}=he(),[g,b]=p.useState(!1),v=Zp({action:t,cooldown:s,startWithCooldown:n}),x=Math.ceil(v.remaining),w=!i&&v.isRateLimited,j=(v.total-v.remaining)/v.total*100;return a.jsx("span",{className:"inline-block",onMouseEnter:()=>b(!0),onMouseLeave:()=>b(!1),children:a.jsxs(to,{open:w&&g,children:[a.jsx(so,{asChild:!0,children:a.jsxs(Oe,{onClick:A=>{o==null||o(A),A.defaultPrevented||v.trigger()},size:u,loading:c||v.isPending,disabled:i||v.isRateLimited,className:We("relative",u==="sm"?"pl-7":"pl-9",l),"aria-label":w?d._({id:"6gxSCq",values:{remainingSeconds:x}}):void 0,"aria-live":w?"polite":void 0,"aria-atomic":"true",...h,children:[!w&&e?a.jsx(e,{className:We("absolute top-1/2 -translate-y-1/2",u==="sm"?"left-2":"left-3"),"aria-hidden":!0,weight:"bold"}):a.jsx(oo,{className:We("absolute top-1/2 -translate-y-1/2",u==="sm"?"left-2":"left-3"),"aria-hidden":!0,size:16,value:j,startAngle:-90}),r]})}),a.jsx(no,{children:a.jsx(ro,{side:"bottom",align:"center",role:"tooltip",children:a.jsx("span",{className:"rounded border border-slate-300 bg-white px-2 py-1.5 text-xs shadow-sm dark:border-slate-600 dark:bg-slate-800",children:a.jsx(V,{id:"VA4HpI",values:{remainingSeconds:x}})})})})]})})}function xo({children:e=a.jsx(V,{id:"Qze0/r"}),...t}){return a.jsx(Up,{idleIcon:Cc,...t,children:a.jsx("span",{className:"truncate",children:e})})}function $p({emailCurrent:e,requestPending:t,confirmPending:s,onResend:n,...r}){return a.jsx(Bs,{...r,loading:r.loading||t,validate:({email:o,token:i})=>{if(o&&i)return{email:o,token:i}},fields:({values:o,set:i})=>a.jsxs(a.Fragment,{children:[e&&a.jsxs(a.Fragment,{children:[a.jsx("input",{type:"password",autoComplete:"current-password",hidden:!0}),a.jsx("input",{type:"email",autoComplete:"username",value:e,readOnly:!0,hidden:!0})]}),a.jsx(ps,{label:a.jsx(V,{id:"OenGwo"}),children:a.jsx(Ua,{name:"newEmail",required:!0,autoFocus:!0,defaultValue:o.email,onEmail:c=>i("email",c)})}),a.jsx("hr",{className:"border-contrast-25 dark:border-contrast-50"}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-text-default text-base font-semibold",children:a.jsx(V,{id:"4fWT0G"})}),a.jsx("p",{className:"mt-1",children:a.jsx(V,{id:"jK9hhN"})})]}),a.jsx(ps,{label:a.jsx(V,{id:"wLmRnI"}),children:a.jsx(Ii,{name:"code",required:!0,autoFocus:!0,defaultValue:o.token,onToken:c=>i("token",c??void 0)})}),a.jsxs("p",{className:"text-sm italic",children:[a.jsx(V,{id:"wadss7"}),a.jsx(xo,{disabled:s,loading:t,action:n,transparent:!0,size:"sm",shape:"padded",startWithCooldown:!0,children:a.jsx(V,{id:"x1TXhd"})})]})]})})}function qp({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:r,onVerify:o,children:i,introMessage:c}){const[l,u]=p.useState(!1),[h,d]=p.useState(0),[m,g]=p.useState(void 0),[b,v]=p.useState(!1);p.useEffect(()=>{d(0),g(void 0)},[l]);const x=!b;return h===2&&m&&o?a.jsx(qt,{trigger:i,open:l,onOpenChange:u,dismissable:x,title:a.jsxs(a.Fragment,{children:[a.jsx(fu,{className:"text-success inline",weight:"bold"})," ",a.jsx(V,{id:"kbts6J"})]}),description:a.jsx(V,{id:"W5g73W",values:{email:m},components:{0:a.jsx("strong",{})}}),children:a.jsx(Bs,{onCancel:()=>u(!1),cancelLabel:a.jsx(V,{id:"Q2Fq1L"}),submitLabel:a.jsx(V,{id:"HFfnZo"}),onLoadingChange:v,validate:({token:w})=>w?{token:w,email:m}:void 0,handler:async w=>{await o(w),u(!1)},fields:({values:w,set:j})=>a.jsx(ps,{label:a.jsx(V,{id:"AdWhjZ"}),children:a.jsx(Ii,{name:"code",required:!0,autoFocus:!0,defaultValue:w.token??void 0,onToken:A=>j("token",A??void 0)})})})}):h===1?a.jsx(qt,{trigger:i,open:l,onOpenChange:u,dismissable:x,title:a.jsx(V,{id:"GmYkFm"}),description:a.jsx(V,{id:"vsqx1t"}),children:a.jsx($p,{emailCurrent:e,requestPending:t,confirmPending:s,values:{email:m},onLoadingChange:v,onResend:async()=>{await n()},handler:async w=>{await r(w),g(w.email),o?d(2):u(!1)}})}):a.jsx(qt,{trigger:i,open:l,onOpenChange:u,dismissable:x,title:a.jsx(V,{id:"GmYkFm"}),description:a.jsx(V,{id:"vsqx1t"}),children:a.jsx(Bs,{disabled:t,values:{email:m},onLoadingChange:v,validate:({email:w})=>w?{email:w}:void 0,handler:async w=>{const{tokenRequired:j}=await n();g(w.email),j?d(1):(await r(w),o?d(2):u(!1))},fields:({values:w,set:j})=>a.jsxs(a.Fragment,{children:[c,a.jsx(ps,{label:a.jsx(V,{id:"OenGwo"}),children:a.jsx(Ua,{name:"email",required:!0,autoFocus:!0,defaultValue:w.email,onEmail:A=>j("email",A)})})]})})})}function Bp({onHandle:e,did:t,onChange:s,autoCapitalize:n="none",autoComplete:r="off",autoCorrect:o="off",dir:i="auto",icon:c=a.jsx($a,{"aria-hidden":!0,weight:"bold",className:"size-5"}),title:l,placeholder:u,...h}){const{i18n:d,_:m}=he();return a.jsx(pu,{...h,type:"text",title:l??d._({id:"VxXoAs"}),placeholder:u??d._({id:"pC6cwz"}),autoCapitalize:n,autoComplete:r,autoCorrect:o,dir:i,icon:c,onChange:Ss(s,g=>{e==null||e(zp(g.target.value))})})}function zp(e){const t=mu(e.trim());if(t.length&&Fi(t)&&gu(t))return t}function Wp({value:e,label:t={id:"/4gGIX"},feedbackDurationMs:s=1500,shape:n="padded",size:r="sm",disabled:o,"aria-label":i,title:c,onClick:l,...u}){const{_:h}=he(),[d,m]=p.useState(!1),g=p.useRef(void 0);p.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const b=o||e==null;return a.jsxs(to,{open:d,children:[a.jsx(so,{asChild:!0,children:a.jsx(Oe,{...u,size:r,shape:n,disabled:b,title:c??h(t),"aria-label":i??h(t),onClick:async v=>{if(l==null||l(v),!(v.defaultPrevented||e==null))try{await navigator.clipboard.writeText(e),m(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>m(!1),s)}catch(x){console.warn("Failed to copy to clipboard",x)}},children:a.jsx(xc,{"aria-hidden":!0,weight:"regular",className:r==="sm"?"size-4":r==="lg"?"size-6":"size-5"})})}),a.jsx(no,{children:a.jsx(ro,{side:"bottom",align:"center",role:"status",children:a.jsx("div",{className:"rounded border border-slate-300 bg-white px-2 py-1.5 text-xs shadow-sm dark:border-slate-600 dark:bg-slate-800",children:a.jsx(V,{id:"6V3Ea3"})})})})]})}function Kp({label:e,children:t,copyable:s=!0,className:n,...r}){return a.jsxs("div",{...r,className:We("flex flex-col",n),children:[e&&a.jsx("span",{className:"text-text-light text-sm",children:e}),a.jsxs("div",{className:"flex items-stretch gap-2",children:[a.jsx("code",{className:"flex flex-1 items-center break-all rounded-md bg-gray-100 px-2 py-1 font-mono text-sm dark:bg-gray-800",children:t}),a.jsx(Wp,{value:s?t:void 0,size:"sm"})]})]})}function Qp({value:e,onChange:t,options:s,maxColumns:n=s.length%3===0?3:2,name:r,className:o,...i}){const c=p.useId(),l=r??`radio-group-${c}`,u=Math.min(n,s.length);return a.jsx("div",{...i,className:We("grid grid-cols-1 gap-2",u>=2&&"sm:grid-cols-2",u>=3&&"md:grid-cols-3",u>=4&&"lg:grid-cols-4",o),children:s.map((h,d)=>{const m=!h.disabled&&h.value===e,g=`${l}-${d}`,b=h.label,v=h.description,x=v?`${g}-description`:void 0;return a.jsxs("label",{htmlFor:g,className:We("flex flex-1 items-start gap-2","rounded-lg px-3 py-2","border-contrast-25 dark:border-contrast-50 border-2","transition duration-200 ease-in-out","has-[:focus-visible]:ring-primary has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-1 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-black",h.disabled?"text-text-light cursor-not-allowed opacity-60":"cursor-pointer",m?"bg-primary/10 text-text-default border-primary/0 ring-primary ring-2 ring-offset-1 ring-offset-white dark:ring-offset-black":"text-text-light hover:bg-gray-100 dark:hover:bg-gray-800"),children:[a.jsx("input",{type:"radio",id:g,name:l,checked:m,disabled:h.disabled,"aria-describedby":x,onChange:w=>{w.target.checked&&!h.disabled&&(t==null||t(h.value))},className:"accent-primary mt-1 shrink-0"}),a.jsxs("span",{className:"flex flex-col gap-0.5",children:[a.jsx("span",{children:b}),v&&a.jsx("span",{id:x,className:"text-text-light leading-snug",children:v})]})]},g)})})}function Gp({handle:e,did:t,...s}){const{i18n:n,_:r}=he(),[o,i]=p.useState(0),c=p.useMemo(()=>[{method:0,label:n._({id:"5M4Te3"}),description:n._({id:"q6Kda8"}),message:n._({id:"wIcl4E"}),values:[{label:n._({id:"Ai2U7L"}),value:`_atproto.${e??n._({id:"Qy+y0S"})}`,copyable:e!=null},{label:n._({id:"+zy2Nq"}),value:"TXT"},{label:n._({id:"wMHvYH"}),value:`did=${t}`}]},{method:1,label:n._({id:"LUTGt0"}),description:n._({id:"Zf0mtN"}),message:n._({id:"OgbFua"}),values:[{label:n._({id:"IagCbF"}),value:`https://${e??n._({id:"Qy+y0S"})}/.well-known/atproto-did`,copyable:e!=null},{label:n._({id:"TiHb0n"}),value:t}]}],[e,t]),l=c.find(m=>m.method===o)||c[0],u="https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial",h=p.useMemo(()=>{if(!e)return;const m=new URL("https://bsky-debug.app/handle");return m.searchParams.set("handle",e),m.toString()},[e]),d=p.useMemo(()=>{if(!e)return;const m=n._({id:"cqWp5F",values:{handle:e,did:t,troubleshootHref:h,tutorialHref:u,0:c.map(({label:g,message:b,values:v})=>`${g}: ${b}
20
- ${v.map(({label:x,value:w})=>`${x}: ${w}`).join(`
21
- `)}`).join(`
22
-
23
- `)}});return`mailto:?body=${encodeURIComponent(m)}`},[e,u,h,c]);return a.jsxs("div",{...s,children:[a.jsx(ps,{label:n._({id:"2AW+PM"}),children:a.jsx(Qp,{maxColumns:1,value:l.method,onChange:i,options:c.map(({method:m,label:g,description:b})=>({value:m,label:g,description:b}))})}),a.jsx("p",{className:"my-2",children:l.message}),l.values.map(({label:m,value:g,copyable:b},v)=>a.jsx(Kp,{label:m,copyable:b,children:g},v)),a.jsxs("p",{className:"my-2 flex flex-row flex-wrap gap-3",children:[a.jsx(Vt,{href:u,className:"text-blue-600 hover:underline",children:a.jsx(V,{id:"c3XJ18"})}),a.jsx(Vt,{href:h,className:"text-blue-600 hover:underline",children:a.jsx(V,{id:"et+mIi"})}),a.jsx(Vt,{href:d,noUtm:!0,className:"text-blue-600 hover:underline",children:a.jsx(V,{id:"CzD50V"})})]})]})}function Jp({did:e,...t}){return a.jsx(Bs,{...t,validate:({handle:s})=>{if(s&&Fi(s))return{handle:s}},fields:({values:s,setterFor:n})=>a.jsxs(a.Fragment,{children:[a.jsx(ps,{label:a.jsx(V,{id:"BfIgP6"}),children:a.jsx(Bp,{defaultValue:s.handle,onHandle:n("handle"),did:e,name:"domain",required:!0,autoFocus:!0,enterKeyHint:"done"})}),a.jsx(Gp,{className:"text-sm",handle:s.handle,did:e})]})})}function Yp({domains:e,...t}){return a.jsx(Bs,{...t,validate:({handle:s})=>{if(s&&e.some(n=>s.endsWith(n)))return{handle:s}},fields:({values:s,set:n})=>a.jsx(vu,{handle:s.handle,onHandle:r=>n("handle",r),domains:e,name:"handle",required:!0,autoFocus:!0,enterKeyHint:"done"})})}function Xp({handler:e,children:t,domains:s,currentHandle:n,did:r}){const[o,i]=p.useState(!1),[c,l]=p.useState(null),[u,h]=p.useState(!1);p.useEffect(()=>{o||l(null)},[o]);const d=!u,[m,g]=n&&s.some(b=>n.endsWith(b))?[n,void 0]:[void 0,n];return c===0&&s.length?a.jsx(qt,{open:o,onOpenChange:i,dismissable:d,trigger:t,title:a.jsx(V,{id:"T6sYqW"}),description:a.jsx(V,{id:"Bno89U"}),children:a.jsx(Yp,{domains:s,onBack:()=>l(null),values:{handle:m},onLoadingChange:h,handler:async(b,v)=>{await e(b,v),i(!1)}})}):c===1?a.jsx(qt,{open:o,onOpenChange:i,dismissable:d,trigger:t,title:a.jsx(V,{id:"T6sYqW"}),description:a.jsx(V,{id:"O78aQm"}),children:a.jsx(Jp,{did:r,onBack:()=>l(null),submitLabel:a.jsx(V,{id:"G7Vcxo"}),values:{handle:g},onLoadingChange:h,handler:async(b,v)=>{await e(b,v),i(!1)}})}):a.jsx(qt,{trigger:t,title:a.jsx(V,{id:"T6sYqW"}),description:a.jsx(V,{id:"GNCK6k",components:{0:a.jsx(Vt,{href:"https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial",className:"text-blue-600 hover:underline"})}}),open:o,onOpenChange:i,children:a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Oe,{onClick:()=>l(0),disabled:!s.length,children:a.jsx(xa,{label:a.jsx(V,{id:"57gCMx"}),example:a.jsx(V,{id:"Zhm/NX",values:{0:s[0]},components:{0:a.jsx("em",{})}})})}),a.jsx(Oe,{onClick:()=>l(1),children:a.jsx(xa,{label:a.jsx(V,{id:"Pahpw8"}),example:a.jsx(V,{id:"2ns2wB",components:{0:a.jsx("em",{})}})})})]})})}function xa({label:e,example:t}){return a.jsxs("span",{className:"flex w-full flex-col gap-0.5 text-left",children:[a.jsx("span",{children:e}),a.jsx("span",{className:"text-text-light text-sm leading-snug",children:t})]})}function em({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:r,children:o}){const{i18n:i,_:c}=he(),[l,u]=p.useState(!1),[h,d]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||d(0)},[l]);const b=!t&&!m;return a.jsx(qt,{trigger:o,title:i._({id:"qRxXtM"}),description:a.jsx(V,{id:"ukpmGq"}),open:l,onOpenChange:u,dismissable:b,children:h===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(xo,{action:async()=>{await n(),d(1)},loading:t,disabled:s,color:"primary",className:"w-full"}),a.jsx(Oe,{onClick:()=>d(1),className:"w-full",children:a.jsx(V,{id:"FTT4a4"})})]}):a.jsx(yu,{email:e,disabled:s,onLoadingChange:g,handler:async v=>{await r(v),u(!1)}})})}function tm(e){return a.jsx(Bs,{...e,validate:({token:t})=>{if(t)return{token:t}},fields:({set:t,values:s})=>a.jsx(ps,{label:a.jsx(V,{id:"AdWhjZ"}),children:a.jsx(Ii,{name:"code",enterKeyHint:"done",required:!0,autoFocus:!0,defaultValue:s.token,onToken:n=>t("token",n??void 0)})})})}function sm({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:r,children:o}){const{i18n:i,_:c}=he(),[l,u]=p.useState(!1),[h,d]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||d(0)},[l]);const b=!t&&!m;return a.jsx(qt,{trigger:o,title:i._({id:"/IBv6X"}),description:a.jsx(V,{id:"+Qnl3Q",values:{email:e},components:{0:a.jsx("strong",{})}}),open:l,onOpenChange:u,dismissable:b,children:h===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(xo,{action:async()=>{await n(),d(1)},loading:t,disabled:s,color:"primary",className:"w-full"}),a.jsx(Oe,{onClick:()=>d(1),className:"w-full",children:a.jsx(V,{id:"FTT4a4"})})]}):a.jsx(tm,{disabled:s,onLoadingChange:g,handler:async v=>{await r(v),u(!1)}})})}function nm(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.updateEmailRequest(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"Y/tbFA"}),description:t._({id:"lAK2OC"})})},onError(r,o,i){console.error("Failed to request email change",r),n({variant:"error",title:t._({id:"E1zEOj"}),description:t._({id:"JANaVF"})})}})}function rm(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.updateEmailConfirm(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"j/19E8"}),description:t._({id:"YNQVYW"})})},onError(r,o,i){console.error("Failed to change email",r),n({variant:"error",title:t._({id:"PNuvRd"}),description:t._({id:"q1d4qv"})})}})}function im(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.verifyEmailRequest(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"I6Q2R9"}),description:t._({id:"rpbuva"})})},onError(r,o,i){console.error("Failed to request email verification",r),n({variant:"error",title:t._({id:"yI9fD4"}),description:t._({id:"U/me+u"})})}})}function Fl(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.verifyEmailConfirm(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"PLEl94"}),description:t._({id:"HrYlJ7"})})},onError(r,o,i){console.error("Failed to verify email",r),n({variant:"error",title:t._({id:"rxy0tG"}),description:t._({id:"78Ju9c"})})}})}function om(){const e=Ge(),{_:t}=he(),{notify:s}=St();return Rt({async mutationFn(n){return e.updateHandle(n)},onSuccess(n,r,o){s({variant:"success",title:t({id:"2HQiAC"}),description:t({id:"6Hg1zS"})})},onError(n,r,o){console.error("Failed to update username",n),s({variant:"error",title:t({id:"DsHRti"}),description:t(ku(n)??{id:"GZC2rQ"})})}})}function am(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.initiatePasswordReset(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"boBFOP"}),description:t._({id:"lAK2OC"})})},onError(r,o,i){console.error("Failed to request password reset",r),n({variant:"error",title:t._({id:"eMlT5s"}),description:t._({id:"JANaVF"})})}})}function cm(){const e=Ge(),{i18n:t,_:s}=he(),{notify:n}=St();return Rt({async mutationFn(r){return e.confirmResetPassword(r)},onSuccess(r,o,i){n({variant:"success",title:t._({id:"D9Jms7"}),description:t._({id:"67nRLM"})})},onError(r,o,i){console.error("Failed to reset password",r),n({variant:"error",title:t._({id:"3DLYmM"}),description:t._({id:"q1d4qv"})})}})}function lm(){return a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx(um,{}),a.jsx(dm,{}),a.jsx(hm,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(fm,{})]})}function um(){const{account:e}=Qt(),{sub:t,email:s,email_verified:n}=e,r=im(),o=Fl();return!s||n?null:a.jsx(dr,{role:"info",icon:Pc,action:a.jsx(sm,{email:s,requestPending:r.isPending,confirmPending:o.isPending,onRequest:async()=>{await r.mutateAsync({sub:t})},onConfirm:async({token:i})=>{await o.mutateAsync({sub:t,token:i,email:s})},children:a.jsx(Oe,{size:"sm",color:"info",children:a.jsx(V,{id:"HFfnZo"})})}),children:a.jsx(V,{id:"Eo3tBf"})})}function dm(e){const{account:t}=Qt(),s=Li(),{sub:n,email:r}=t,o=nm(),i=rm(),c=Fl();return a.jsx(qp,{email:r,requestPending:o.isPending,confirmPending:i.isPending,onRequest:async()=>o.mutateAsync({sub:n}),onConfirm:async({email:l,token:u})=>{await i.mutateAsync({sub:n,email:l,token:u})},onVerify:async({email:l,token:u})=>{await c.mutateAsync({sub:n,email:l,token:u})},introMessage:s.show2FaWarningOnEmailUpdate&&a.jsx(dr,{role:"warning",className:"text-sm",children:a.jsx(V,{id:"WV5h6m"})}),children:a.jsx(_o,{...e,icon:bu,value:r,children:a.jsx(V,{id:"ATGYL1"})})})}function hm(e){const{account:t}=Qt(),{email:s}=t,n=am(),r=cm();return s?a.jsx(em,{email:s,requestPending:n.isPending,confirmPending:r.isPending,onRequest:async()=>{await n.mutateAsync({email:s})},onConfirm:async({token:o,password:i})=>{await r.mutateAsync({token:o,password:i})},children:a.jsx(_o,{...e,icon:Ac,children:a.jsx(V,{id:"8ZsakT"})})}):null}function fm(e){const{account:t}=Qt(),{availableUserDomains:s=[]}=Li(),{sub:n,preferred_username:r}=t,o=r&&Fi(r)?r:void 0,i=om();return a.jsx(Xp,{did:n,currentHandle:o,domains:s,handler:async({handle:c})=>{await i.mutateAsync({sub:n,handle:c})},children:a.jsx(_o,{...e,icon:$a,value:a.jsx(wu,{handle:o}),children:a.jsx(V,{id:"7sNhEz"})})})}function _o({icon:e,value:t,children:s,className:n,...r}){return a.jsxs(Oe,{shape:"padded",...r,className:We("gap-2",n),children:[a.jsx(e,{"aria-hidden":!0,className:"size-5 shrink-0 grow-0"}),a.jsx("span",{className:"grow-1 truncate text-left font-medium",children:s}),t!=null&&a.jsx("span",{className:"hidden min-w-0 flex-1 truncate text-right text-sm sm:inline",children:t}),a.jsx(xu,{"aria-hidden":!0,className:"size-4 shrink-0"})]})}function pm(){const{account:e}=Qt();return a.jsx("div",{className:"flex min-h-full flex-col items-center gap-4",children:a.jsx("div",{className:"flex flex-1 flex-col items-center justify-center",children:a.jsx(cl,{account:e,children:a.jsx(mm,{className:"text-text-light text-center text-sm"})})})})}function mm(e){return a.jsxs("p",{...e,children:[a.jsx(V,{id:"Jn0vdi",components:{0:a.jsx(ll,{})}})," ",a.jsx(nr,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:a.jsx(V,{id:"z73+hu"})})]})}const gm={"/":{icon:Rc,position:0,title:{id:"i0qMbr"},component:()=>a.jsx(pm,{})},"/manage":{icon:Su,position:10,title:{id:"AeXO77"},description:{id:"Xu88FC"},component:()=>a.jsx(lm,{})},"/devices":{icon:_c,position:20,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:()=>a.jsx(Tp,{})},"/apps":{icon:Sc,position:30,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:()=>a.jsx(xp,{})},"/about":{icon:_u,position:50,title:{id:"uyJsf6"},component:()=>a.jsx(Kf,{}),description:{id:"nxn0xR"}}};function vm(e,t){const s={...gm,...t},n=Ri({getParentRoute:()=>io,path:e,component:()=>a.jsx(bm,{signOutTo:e,children:a.jsx(ym,{basePath:e,subPages:s})})}),r=Object.entries(s).map(([o,{component:i}])=>Ri({getParentRoute:()=>n,path:o,component:i}));return[n,...r]}function ym({basePath:e,subPages:t}){const s=p.useMemo(()=>Object.entries(t).sort(([n,r],[o,i])=>{if(r.position!=null&&i.position!=null){const c=r.position-i.position;if(c!==0)return c}return n.localeCompare(o)}).map(([n,r])=>({to:e==="/"?n:n==="/"?e:`${e}${n}`,title:r.title,description:r.description,hidden:r.hidden,icon:r.icon})),[t,e]);return a.jsx(Wf,{title:{id:"KdxItU"},basePath:e,links:s,children:a.jsx(qi,{})})}const $n=new URL(window.location.href);function bm({children:e,signOutTo:t}){const s=Ze(),{session:n}=Ni(),r=p.useRef(n!=null),o=$n.searchParams.get("display")==="popup",i=$n.searchParams.get("login_hint")||void 0,c=$n.searchParams.get("nonce")||void 0,l=$n.searchParams.get("redirect_uri")||void 0,u=p.useMemo(()=>{if(l&&c)return()=>{const h=new URL(l);window.location.href=h.toString()};if(o)return()=>{var h;(h=window.opener)==null||h.postMessage({nonce:c,event:"done"},"*"),window.postMessage({nonce:c,event:"done"},"*"),window.close()}},[o,l,c]);return p.useEffect(()=>{n&&!r.current?r.current=!0:!n&&r.current&&(r.current=!1,t&&s.navigate({to:t}),u==null||u())},[n,u]),a.jsx(Ru,{forcedIdentifier:i,disableRemember:o,onCancel:u,children:e})}const wm=Ri({getParentRoute:()=>io,path:"/account/reset-password",component:xm,errorComponent:qa});function xm(){const{api:e}=Ni(),t=Ze();return a.jsx(Au,{onResetPasswordRequest:async s=>e.initiatePasswordReset(s),onResetPasswordConfirm:async s=>e.confirmResetPassword(s),onBack:()=>{window.history.back(),setTimeout(()=>{t.state.location.pathname==="/account/reset-password"&&t.navigate({to:"/account"})},1e3)}})}const _m=vm("/account",{"/branding":{icon:jc,hidden:!0,position:40,title:{id:"A3MAIm"},component:Ah}}),Sm=hh({routeTree:io.addChildren([..._m,wm])}),{__customizationData:Rm,__deviceSessions:Am}=window,jm=new Wu,Cm=document.getElementById("root");Ul.createRoot(Cm).render(a.jsx(p.StrictMode,{children:a.jsx($l,{value:Rm,children:a.jsx(ql,{children:a.jsx(ju,{children:a.jsx(Cu,{fallbackRender:Mu,children:a.jsx(Pu,{initialSessions:Am,initialSelected:Eu.Only,children:a.jsx(Yu,{client:jm,children:a.jsx(mh,{router:Sm})})})})})})})}));
24
- //# sourceMappingURL=account-page-DEDJt1AQ.js.map