@atproto/oauth-provider-ui 0.7.3 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-page-BG82oyjp.js +24 -0
- package/dist/account-page-BG82oyjp.js.map +1 -0
- package/dist/admonition-CbbBuXJN.css +1 -0
- package/dist/admonition-DjgUmks3.js +59 -0
- package/dist/admonition-DjgUmks3.js.map +1 -0
- package/dist/authorization-page-DfxoC93f.js +2 -0
- package/dist/authorization-page-DfxoC93f.js.map +1 -0
- package/dist/bundle-manifest.json +73 -41
- package/dist/{cookie-error-page-QWOGgXmH.js → cookie-error-page-D338lcpA.js} +2 -2
- package/dist/{cookie-error-page-QWOGgXmH.js.map → cookie-error-page-D338lcpA.js.map} +1 -1
- package/dist/{error-page-BEjdpIQ7.js → error-page-HTZtfhkN.js} +2 -2
- package/dist/{error-page-BEjdpIQ7.js.map → error-page-HTZtfhkN.js.map} +1 -1
- package/dist/error-view-BFuIFXNS.js +2 -0
- package/dist/error-view-BFuIFXNS.js.map +1 -0
- package/dist/index-CmemEDtM.js +64 -0
- package/dist/index-CmemEDtM.js.map +1 -0
- package/dist/messages-4rkLJjBK.js +2 -0
- package/dist/messages-4rkLJjBK.js.map +1 -0
- package/dist/messages-BA5oIDGU.js +2 -0
- package/dist/messages-BA5oIDGU.js.map +1 -0
- package/dist/messages-Cy2gaWBQ.js +2 -0
- package/dist/messages-Cy2gaWBQ.js.map +1 -0
- package/dist/messages-T8-auoWR.js +2 -0
- package/dist/messages-T8-auoWR.js.map +1 -0
- package/hydration-data.d.ts +1 -1
- package/package.json +7 -8
- package/dist/account-page-BWtTrJit.js +0 -24
- package/dist/account-page-BWtTrJit.js.map +0 -1
- package/dist/admonition--1QPpjgd.css +0 -1
- package/dist/admonition-PcOMNxHc.js +0 -59
- package/dist/admonition-PcOMNxHc.js.map +0 -1
- package/dist/authorization-page-CslmZWsi.js +0 -2
- package/dist/authorization-page-CslmZWsi.js.map +0 -1
- package/dist/button-cooldown-Cek48u1l.js +0 -64
- package/dist/button-cooldown-Cek48u1l.js.map +0 -1
- package/dist/error-view-BzJJuW_V.js +0 -2
- package/dist/error-view-BzJJuW_V.js.map +0 -1
- package/dist/messages--aCokQ6a.js +0 -2
- package/dist/messages--aCokQ6a.js.map +0 -1
- package/dist/messages-BaWkJYfB.js +0 -2
- package/dist/messages-BaWkJYfB.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var Tl=Object.defineProperty;var bo=e=>{throw TypeError(e)};var Dl=(e,t,n)=>t in e?Tl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xe=(e,t,n)=>Dl(e,typeof t!="symbol"?t+"":t,n),kr=(e,t,n)=>t.has(e)||bo("Cannot "+n);var y=(e,t,n)=>(kr(e,t,"read from private field"),n?n.call(e):t.get(e)),U=(e,t,n)=>t.has(e)?bo("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),V=(e,t,n,s)=>(kr(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),W=(e,t,n)=>(kr(e,t,"access private method"),n);var Is=(e,t,n,s)=>({set _(r){V(e,t,r,n)},get _(){return y(e,t,s)}});import{r as p,j as a,a as Pa,p as Et,u as Ie,B as je,T as M,L as Vl,c as Kn,b as Ii,d as qt,A as bt,e as ka,f as Zl,C as Ul,g as $l}from"./admonition-DjgUmks3.js";import{r as Ma,P as ks,u as oi,c as Oa,a as fr,b as ql,d as Bl,e as zl,f as Ha,g as Kl,h as Wl,R as Ql,i as Gl,j as Jl,F as Yl,D as Xl,k as eu,l as Ni,A as tu,m as La,n as Ia,o as lt,p as nu,q as Ce,s as Ne,z as f,Z as ge,t as su,C as Na,v as ru,T as iu,w as ou,O as au,x as cu,y as lu,B as uu,E as du,S as St,G as jt,I as pr,H as hu,J as fu,K as ai,L as Fi,M as Fa,N as pu,Q as mu,U as Ta,V as gu,W as Da,X as vu,Y as yu,_ as bu,$ as wu,a0 as wo,a1 as xu,a2 as _u,a3 as Su,a4 as ju,a5 as Cu,a6 as Au,a7 as Ru,a8 as Eu,a9 as Pu}from"./index-CmemEDtM.js";import{c as Cn,E as Ti}from"./error-view-BFuIFXNS.js";var ts=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(){}},vn=typeof window>"u"||"Deno"in globalThis;function Ue(){}function ku(e,t){return typeof e=="function"?e(t):e}function ci(e){return typeof e=="number"&&e>=0&&e!==1/0}function Va(e,t){return Math.max(e+(t||0)-Date.now(),0)}function An(e,t){return typeof e=="function"?e(t):e}function Qe(e,t){return typeof e=="function"?e(t):e}function xo(e,t){const{type:n="all",exact:s,fetchStatus:r,predicate:o,queryKey:i,stale:c}=e;if(i){if(s){if(t.queryHash!==Di(i,t.options))return!1}else if(!ws(t.queryKey,i))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||r&&r!==t.state.fetchStatus||o&&!o(t))}function _o(e,t){const{exact:n,status:s,predicate:r,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(o))return!1}else if(!ws(t.options.mutationKey,o))return!1}return!(s&&t.state.status!==s||r&&!r(t))}function Di(e,t){return((t==null?void 0:t.queryKeyHashFn)||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>li(n)?Object.keys(n).sort().reduce((s,r)=>(s[r]=n[r],s),{}):n)}function ws(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ws(e[n],t[n])):!1}function Za(e,t){if(e===t)return e;const n=So(e)&&So(t);if(n||li(e)&&li(t)){const s=n?e:Object.keys(e),r=s.length,o=n?t:Object.keys(t),i=o.length,c=n?[]:{};let l=0;for(let u=0;u<i;u++){const d=n?u:o[u];(!n&&s.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(c[d]=void 0,l++):(c[d]=Za(e[d],t[d]),c[d]===e[d]&&e[d]!==void 0&&l++)}return r===i&&l===r?e:c}return t}function Gs(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function So(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function li(e){if(!jo(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jo(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mu(e){return new Promise(t=>{setTimeout(t,e)})}function ui(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Za(e,t):t}function Ou(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function Hu(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var Vi=Symbol();function Ua(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Vi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var ln,It,Ln,va,Lu=(va=class extends ts{constructor(){super();U(this,ln);U(this,It);U(this,Ln);V(this,Ln,t=>{if(!vn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){y(this,It)||this.setEventListener(y(this,Ln))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,It))==null||t.call(this),V(this,It,void 0))}setEventListener(t){var n;V(this,Ln,t),(n=y(this,It))==null||n.call(this),V(this,It,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){y(this,ln)!==t&&(V(this,ln,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof y(this,ln)=="boolean"?y(this,ln):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ln=new WeakMap,It=new WeakMap,Ln=new WeakMap,va),Zi=new Lu,In,Nt,Nn,ya,Iu=(ya=class extends ts{constructor(){super();U(this,In,!0);U(this,Nt);U(this,Nn);V(this,Nn,t=>{if(!vn&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){y(this,Nt)||this.setEventListener(y(this,Nn))}onUnsubscribe(){var t;this.hasListeners()||((t=y(this,Nt))==null||t.call(this),V(this,Nt,void 0))}setEventListener(t){var n;V(this,Nn,t),(n=y(this,Nt))==null||n.call(this),V(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){y(this,In)!==t&&(V(this,In,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return y(this,In)}},In=new WeakMap,Nt=new WeakMap,Nn=new WeakMap,ya),Js=new Iu;function di(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});n.status="pending",n.catch(()=>{});function s(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{s({status:"fulfilled",value:r}),e(r)},n.reject=r=>{s({status:"rejected",reason:r}),t(r)},n}function Nu(e){return Math.min(1e3*2**e,3e4)}function $a(e){return(e??"online")==="online"?Js.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 Mr(e){return e instanceof qa}function Ba(e){let t=!1,n=0,s=!1,r;const o=di(),i=b=>{var w;s||(m(new qa(b)),(w=e.abort)==null||w.call(e))},c=()=>{t=!0},l=()=>{t=!1},u=()=>Zi.isFocused()&&(e.networkMode==="always"||Js.isOnline())&&e.canRun(),d=()=>$a(e.networkMode)&&e.canRun(),h=b=>{var w;s||(s=!0,(w=e.onSuccess)==null||w.call(e,b),r==null||r(),o.resolve(b))},m=b=>{var w;s||(s=!0,(w=e.onError)==null||w.call(e,b),r==null||r(),o.reject(b))},g=()=>new Promise(b=>{var w;r=x=>{(s||u())&&b(x)},(w=e.onPause)==null||w.call(e)}).then(()=>{var b;r=void 0,s||(b=e.onContinue)==null||b.call(e)}),v=()=>{if(s)return;let b;const w=n===0?e.initialPromise:void 0;try{b=w??e.fn()}catch(x){b=Promise.reject(x)}Promise.resolve(b).then(h).catch(x=>{var E;if(s)return;const j=e.retry??(vn?0:3),A=e.retryDelay??Nu,H=typeof A=="function"?A(n,x):A,I=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,x);if(t||!I){m(x);return}n++,(E=e.onFail)==null||E.call(e,n,x),Mu(H).then(()=>u()?void 0:g()).then(()=>{t?m(x):v()})})};return{promise:o,cancel:i,continue:()=>(r==null||r(),o),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?v():g().then(v),o)}}var Fu=e=>setTimeout(e,0);function Tu(){let e=[],t=0,n=c=>{c()},s=c=>{c()},r=Fu;const o=c=>{t?e.push(c):r(()=>{n(c)})},i=()=>{const c=e;e=[],c.length&&r(()=>{s(()=>{c.forEach(l=>{n(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=>{n=c},setBatchNotifyFunction:c=>{s=c},setScheduler:c=>{r=c}}}var me=Tu(),un,ba,za=(ba=class{constructor(){U(this,un)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ci(this.gcTime)&&V(this,un,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vn?1/0:5*60*1e3))}clearGcTimeout(){y(this,un)&&(clearTimeout(y(this,un)),V(this,un,void 0))}},un=new WeakMap,ba),Fn,Tn,Ze,dn,we,As,hn,ze,ht,wa,Du=(wa=class extends za{constructor(t){super();U(this,ze);U(this,Fn);U(this,Tn);U(this,Ze);U(this,dn);U(this,we);U(this,As);U(this,hn);V(this,hn,!1),V(this,As,t.defaultOptions),this.setOptions(t.options),this.observers=[],V(this,dn,t.client),V(this,Ze,y(this,dn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,V(this,Fn,Vu(this.options)),this.state=t.state??y(this,Fn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=y(this,we))==null?void 0:t.promise}setOptions(t){this.options={...y(this,As),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&y(this,Ze).remove(this)}setData(t,n){const s=ui(this.state.data,t,this.options);return W(this,ze,ht).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){W(this,ze,ht).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,r;const n=(s=y(this,we))==null?void 0:s.promise;return(r=y(this,we))==null||r.cancel(t),n?n.then(Ue).catch(Ue):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(y(this,Fn))}isActive(){return this.observers.some(t=>Qe(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Vi||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||!Va(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=y(this,we))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),y(this,Ze).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(y(this,we)&&(y(this,hn)?y(this,we).cancel({revert:!0}):y(this,we).cancelRetry()),this.scheduleGc()),y(this,Ze).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||W(this,ze,ht).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(y(this,we))return y(this,we).continueRetry(),y(this,we).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(m=>m.options.queryFn);h&&this.setOptions(h.options)}const s=new AbortController,r=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(V(this,hn,!0),s.signal)})},o=()=>{const h=Ua(this.options,n),m={client:y(this,dn),queryKey:this.queryKey,meta:this.meta};return r(m),V(this,hn,!1),this.options.persister?this.options.persister(h,m,this):h(m)},i={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:y(this,dn),state:this.state,fetchFn:o};r(i),(l=this.options.behavior)==null||l.onFetch(i,this),V(this,Tn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=i.fetchOptions)==null?void 0:u.meta))&&W(this,ze,ht).call(this,{type:"fetch",meta:(d=i.fetchOptions)==null?void 0:d.meta});const c=h=>{var m,g,v,b;Mr(h)&&h.silent||W(this,ze,ht).call(this,{type:"error",error:h}),Mr(h)||((g=(m=y(this,Ze).config).onError)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,this.state.data,h,this)),this.scheduleGc()};return V(this,we,Ba({initialPromise:n==null?void 0:n.initialPromise,fn:i.fetchFn,abort:s.abort.bind(s),onSuccess:h=>{var m,g,v,b;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(w){c(w);return}(g=(m=y(this,Ze).config).onSuccess)==null||g.call(m,h,this),(b=(v=y(this,Ze).config).onSettled)==null||b.call(v,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,m)=>{W(this,ze,ht).call(this,{type:"failed",failureCount:h,error:m})},onPause:()=>{W(this,ze,ht).call(this,{type:"pause"})},onContinue:()=>{W(this,ze,ht).call(this,{type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0})),y(this,we).start()}},Fn=new WeakMap,Tn=new WeakMap,Ze=new WeakMap,dn=new WeakMap,we=new WeakMap,As=new WeakMap,hn=new WeakMap,ze=new WeakSet,ht=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ka(s.data,this.options),fetchMeta:t.meta??null};case"success":return{...s,data:t.data,dataUpdateCount:s.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 Mr(r)&&r.revert&&y(this,Tn)?{...y(this,Tn),fetchStatus:"idle"}:{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),me.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),y(this,Ze).notify({query:this,type:"updated",action:t})})},wa);function Ka(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:$a(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vu(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var nt,xa,Zu=(xa=class extends ts{constructor(t={}){super();U(this,nt);this.config=t,V(this,nt,new Map)}build(t,n,s){const r=n.queryKey,o=n.queryHash??Di(r,n);let i=this.get(o);return i||(i=new Du({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(i)),i}add(t){y(this,nt).has(t.queryHash)||(y(this,nt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=y(this,nt).get(t.queryHash);n&&(t.destroy(),n===t&&y(this,nt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){me.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return y(this,nt).get(t)}getAll(){return[...y(this,nt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>xo(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>xo(t,s)):n}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){me.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){me.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},nt=new WeakMap,xa),st,_e,fn,rt,Mt,_a,Uu=(_a=class extends za{constructor(t){super();U(this,rt);U(this,st);U(this,_e);U(this,fn);this.mutationId=t.mutationId,V(this,_e,t.mutationCache),V(this,st,[]),this.state=t.state||Wa(),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,st).includes(t)||(y(this,st).push(t),this.clearGcTimeout(),y(this,_e).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){V(this,st,y(this,st).filter(n=>n!==t)),this.scheduleGc(),y(this,_e).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){y(this,st).length||(this.state.status==="pending"?this.scheduleGc():y(this,_e).remove(this))}continue(){var t;return((t=y(this,fn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var r,o,i,c,l,u,d,h,m,g,v,b,w,x,j,A,H,I,E,L;V(this,fn,Ba({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(S,_)=>{W(this,rt,Mt).call(this,{type:"failed",failureCount:S,error:_})},onPause:()=>{W(this,rt,Mt).call(this,{type:"pause"})},onContinue:()=>{W(this,rt,Mt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>y(this,_e).canRun(this)}));const n=this.state.status==="pending",s=!y(this,fn).canStart();try{if(!n){W(this,rt,Mt).call(this,{type:"pending",variables:t,isPaused:s}),await((o=(r=y(this,_e).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&&W(this,rt,Mt).call(this,{type:"pending",context:_,variables:t,isPaused:s})}const S=await y(this,fn).start();return await((u=(l=y(this,_e).config).onSuccess)==null?void 0:u.call(l,S,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,S,t,this.state.context)),await((g=(m=y(this,_e).config).onSettled)==null?void 0:g.call(m,S,null,this.state.variables,this.state.context,this)),await((b=(v=this.options).onSettled)==null?void 0:b.call(v,S,null,t,this.state.context)),W(this,rt,Mt).call(this,{type:"success",data:S}),S}catch(S){try{throw await((x=(w=y(this,_e).config).onError)==null?void 0:x.call(w,S,t,this.state.context,this)),await((A=(j=this.options).onError)==null?void 0:A.call(j,S,t,this.state.context)),await((I=(H=y(this,_e).config).onSettled)==null?void 0:I.call(H,void 0,S,this.state.variables,this.state.context,this)),await((L=(E=this.options).onSettled)==null?void 0:L.call(E,void 0,S,t,this.state.context)),S}finally{W(this,rt,Mt).call(this,{type:"error",error:S})}}finally{y(this,_e).runNext(this)}}},st=new WeakMap,_e=new WeakMap,fn=new WeakMap,rt=new WeakSet,Mt=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),me.batch(()=>{y(this,st).forEach(s=>{s.onMutationUpdate(t)}),y(this,_e).notify({mutation:this,type:"updated",action:t})})},_a);function Wa(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ft,Ke,Rs,Sa,$u=(Sa=class extends ts{constructor(t={}){super();U(this,ft);U(this,Ke);U(this,Rs);this.config=t,V(this,ft,new Set),V(this,Ke,new Map),V(this,Rs,0)}build(t,n,s){const r=new Uu({mutationCache:this,mutationId:++Is(this,Rs)._,options:t.defaultMutationOptions(n),state:s});return this.add(r),r}add(t){y(this,ft).add(t);const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);s?s.push(t):y(this,Ke).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(y(this,ft).delete(t)){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&y(this,Ke).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Ns(t);if(typeof n=="string"){const s=y(this,Ke).get(n),r=s==null?void 0:s.find(o=>o.state.status==="pending");return!r||r===t}else return!0}runNext(t){var s;const n=Ns(t);if(typeof n=="string"){const r=(s=y(this,Ke).get(n))==null?void 0:s.find(o=>o!==t&&o.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){me.batch(()=>{y(this,ft).forEach(t=>{this.notify({type:"removed",mutation:t})}),y(this,ft).clear(),y(this,Ke).clear()})}getAll(){return Array.from(y(this,ft))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>_o(n,s))}findAll(t={}){return this.getAll().filter(n=>_o(t,n))}notify(t){me.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return me.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ue))))}},ft=new WeakMap,Ke=new WeakMap,Rs=new WeakMap,Sa);function Ns(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Co(e){return{onFetch:(t,n)=>{var d,h,m,g,v;const s=t.options,r=(m=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:m.direction,o=((g=t.state.data)==null?void 0:g.pages)||[],i=((v=t.state.data)==null?void 0:v.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const u=async()=>{let b=!1;const w=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(t.signal.aborted?b=!0:t.signal.addEventListener("abort",()=>{b=!0}),t.signal)})},x=Ua(t.options,t.fetchOptions),j=async(A,H,I)=>{if(b)return Promise.reject();if(H==null&&A.pages.length)return Promise.resolve(A);const E={client:t.client,queryKey:t.queryKey,pageParam:H,direction:I?"backward":"forward",meta:t.options.meta};w(E);const L=await x(E),{maxPages:S}=t.options,_=I?Hu:Ou;return{pages:_(A.pages,L,S),pageParams:_(A.pageParams,H,S)}};if(r&&o.length){const A=r==="backward",H=A?qu:Ao,I={pages:o,pageParams:i},E=H(s,I);c=await j(I,E,A)}else{const A=e??o.length;do{const H=l===0?i[0]??s.initialPageParam:Ao(s,c);if(l>0&&H==null)break;c=await j(c,H),l++}while(l<A)}return c};t.options.persister?t.fetchFn=()=>{var b,w;return(w=(b=t.options).persister)==null?void 0:w.call(b,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Ao(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function qu(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var ue,Ft,Tt,Dn,Vn,Dt,Zn,Un,ja,Bu=(ja=class{constructor(e={}){U(this,ue);U(this,Ft);U(this,Tt);U(this,Dn);U(this,Vn);U(this,Dt);U(this,Zn);U(this,Un);V(this,ue,e.queryCache||new Zu),V(this,Ft,e.mutationCache||new $u),V(this,Tt,e.defaultOptions||{}),V(this,Dn,new Map),V(this,Vn,new Map),V(this,Dt,0)}mount(){Is(this,Dt)._++,y(this,Dt)===1&&(V(this,Zn,Zi.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onFocus())})),V(this,Un,Js.subscribe(async e=>{e&&(await this.resumePausedMutations(),y(this,ue).onOnline())})))}unmount(){var e,t;Is(this,Dt)._--,y(this,Dt)===0&&((e=y(this,Zn))==null||e.call(this),V(this,Zn,void 0),(t=y(this,Un))==null||t.call(this),V(this,Un,void 0))}isFetching(e){return y(this,ue).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return y(this,Ft).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=y(this,ue).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(An(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return y(this,ue).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),r=y(this,ue).get(s.queryHash),o=r==null?void 0:r.state.data,i=ku(t,o);if(i!==void 0)return y(this,ue).build(this,s).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return me.batch(()=>y(this,ue).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=y(this,ue).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=y(this,ue);me.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=y(this,ue);return me.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=me.batch(()=>y(this,ue).findAll(e).map(r=>r.cancel(n)));return Promise.all(s).then(Ue).catch(Ue)}invalidateQueries(e,t={}){return me.batch(()=>(y(this,ue).findAll(e).forEach(n=>{n.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 n={...t,cancelRefetch:t.cancelRefetch??!0},s=me.batch(()=>y(this,ue).findAll(e).filter(r=>!r.isDisabled()).map(r=>{let o=r.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ue)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(s).then(Ue)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=y(this,ue).build(this,t);return n.isStaleByTime(An(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ue).catch(Ue)}fetchInfiniteQuery(e){return e.behavior=Co(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ue).catch(Ue)}ensureInfiniteQueryData(e){return e.behavior=Co(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Js.isOnline()?y(this,Ft).resumePausedMutations():Promise.resolve()}getQueryCache(){return y(this,ue)}getMutationCache(){return y(this,Ft)}getDefaultOptions(){return y(this,Tt)}setDefaultOptions(e){V(this,Tt,e)}setQueryDefaults(e,t){y(this,Dn).set(yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...y(this,Dn).values()],n={};return t.forEach(s=>{ws(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){y(this,Vn).set(yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...y(this,Vn).values()],n={};return t.forEach(s=>{ws(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...y(this,Tt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Di(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===Vi&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...y(this,Tt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){y(this,ue).clear(),y(this,Ft).clear()}},ue=new WeakMap,Ft=new WeakMap,Tt=new WeakMap,Dn=new WeakMap,Vn=new WeakMap,Dt=new WeakMap,Zn=new WeakMap,Un=new WeakMap,ja),Ae,Q,Es,Se,pn,$n,Vt,it,Ps,qn,Bn,mn,gn,Zt,zn,ee,fs,hi,fi,pi,mi,gi,vi,yi,Qa,Ca,zu=(Ca=class extends ts{constructor(t,n){super();U(this,ee);U(this,Ae);U(this,Q);U(this,Es);U(this,Se);U(this,pn);U(this,$n);U(this,Vt);U(this,it);U(this,Ps);U(this,qn);U(this,Bn);U(this,mn);U(this,gn);U(this,Zt);U(this,zn,new Set);this.options=n,V(this,Ae,t),V(this,it,null),V(this,Vt,di()),this.options.experimental_prefetchInRender||y(this,Vt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(y(this,Q).addObserver(this),Ro(y(this,Q),this.options)?W(this,ee,fs).call(this):this.updateResult(),W(this,ee,mi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bi(y(this,Q),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bi(y(this,Q),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,W(this,ee,gi).call(this),W(this,ee,vi).call(this),y(this,Q).removeObserver(this)}setOptions(t){const n=this.options,s=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 Qe(this.options.enabled,y(this,Q))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");W(this,ee,yi).call(this),y(this,Q).setOptions(this.options),n._defaulted&&!Gs(this.options,n)&&y(this,Ae).getQueryCache().notify({type:"observerOptionsUpdated",query:y(this,Q),observer:this});const r=this.hasListeners();r&&Eo(y(this,Q),s,this.options,n)&&W(this,ee,fs).call(this),this.updateResult(),r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||An(this.options.staleTime,y(this,Q))!==An(n.staleTime,y(this,Q)))&&W(this,ee,hi).call(this);const o=W(this,ee,fi).call(this);r&&(y(this,Q)!==s||Qe(this.options.enabled,y(this,Q))!==Qe(n.enabled,y(this,Q))||o!==y(this,Zt))&&W(this,ee,pi).call(this,o)}getOptimisticResult(t){const n=y(this,Ae).getQueryCache().build(y(this,Ae),t),s=this.createResult(n,t);return Wu(this,s)&&(V(this,Se,s),V(this,$n,this.options),V(this,pn,y(this,Q).state)),s}getCurrentResult(){return y(this,Se)}trackResult(t,n){const s={};return Object.keys(t).forEach(r=>{Object.defineProperty(s,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),n==null||n(r),t[r])})}),s}trackProp(t){y(this,zn).add(t)}getCurrentQuery(){return y(this,Q)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=y(this,Ae).defaultQueryOptions(t),s=y(this,Ae).getQueryCache().build(y(this,Ae),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return W(this,ee,fs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),y(this,Se)))}createResult(t,n){var S;const s=y(this,Q),r=this.options,o=y(this,Se),i=y(this,pn),c=y(this,$n),u=t!==s?t.state:y(this,Es),{state:d}=t;let h={...d},m=!1,g;if(n._optimisticResults){const _=this.hasListeners(),F=!_&&Ro(t,n),D=_&&Eo(t,s,n,r);(F||D)&&(h={...h,...Ka(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:w}=h;if(n.select&&h.data!==void 0)if(o&&h.data===(i==null?void 0:i.data)&&n.select===y(this,Ps))g=y(this,qn);else try{V(this,Ps,n.select),g=n.select(h.data),g=ui(o==null?void 0:o.data,g,n),V(this,qn,g),V(this,it,null)}catch(_){V(this,it,_)}else g=h.data;if(n.placeholderData!==void 0&&g===void 0&&w==="pending"){let _;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData))_=o.data;else if(_=typeof n.placeholderData=="function"?n.placeholderData((S=y(this,Bn))==null?void 0:S.state.data,y(this,Bn)):n.placeholderData,n.select&&_!==void 0)try{_=n.select(_),V(this,it,null)}catch(F){V(this,it,F)}_!==void 0&&(w="success",g=ui(o==null?void 0:o.data,_,n),m=!0)}y(this,it)&&(v=y(this,it),g=y(this,qn),b=Date.now(),w="error");const x=h.fetchStatus==="fetching",j=w==="pending",A=w==="error",H=j&&x,I=g!==void 0,L={status:w,fetchStatus:h.fetchStatus,isPending:j,isSuccess:w==="success",isError:A,isInitialLoading:H,isLoading:H,data:g,dataUpdatedAt:h.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:x,isRefetching:x&&!j,isLoadingError:A&&!I,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&I,isStale:Ui(t,n),refetch:this.refetch,promise:y(this,Vt)};if(this.options.experimental_prefetchInRender){const _=N=>{L.status==="error"?N.reject(L.error):L.data!==void 0&&N.resolve(L.data)},F=()=>{const N=V(this,Vt,L.promise=di());_(N)},D=y(this,Vt);switch(D.status){case"pending":t.queryHash===s.queryHash&&_(D);break;case"fulfilled":(L.status==="error"||L.data!==D.value)&&F();break;case"rejected":(L.status!=="error"||L.error!==D.reason)&&F();break}}return L}updateResult(){const t=y(this,Se),n=this.createResult(y(this,Q),this.options);if(V(this,pn,y(this,Q).state),V(this,$n,this.options),y(this,pn).data!==void 0&&V(this,Bn,y(this,Q)),Gs(n,t))return;V(this,Se,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!y(this,zn).size)return!0;const i=new Set(o??y(this,zn));return this.options.throwOnError&&i.add("error"),Object.keys(y(this,Se)).some(c=>{const l=c;return y(this,Se)[l]!==t[l]&&i.has(l)})};W(this,ee,Qa).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&W(this,ee,mi).call(this)}},Ae=new WeakMap,Q=new WeakMap,Es=new WeakMap,Se=new WeakMap,pn=new WeakMap,$n=new WeakMap,Vt=new WeakMap,it=new WeakMap,Ps=new WeakMap,qn=new WeakMap,Bn=new WeakMap,mn=new WeakMap,gn=new WeakMap,Zt=new WeakMap,zn=new WeakMap,ee=new WeakSet,fs=function(t){W(this,ee,yi).call(this);let n=y(this,Q).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ue)),n},hi=function(){W(this,ee,gi).call(this);const t=An(this.options.staleTime,y(this,Q));if(vn||y(this,Se).isStale||!ci(t))return;const s=Va(y(this,Se).dataUpdatedAt,t)+1;V(this,mn,setTimeout(()=>{y(this,Se).isStale||this.updateResult()},s))},fi=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(y(this,Q)):this.options.refetchInterval)??!1},pi=function(t){W(this,ee,vi).call(this),V(this,Zt,t),!(vn||Qe(this.options.enabled,y(this,Q))===!1||!ci(y(this,Zt))||y(this,Zt)===0)&&V(this,gn,setInterval(()=>{(this.options.refetchIntervalInBackground||Zi.isFocused())&&W(this,ee,fs).call(this)},y(this,Zt)))},mi=function(){W(this,ee,hi).call(this),W(this,ee,pi).call(this,W(this,ee,fi).call(this))},gi=function(){y(this,mn)&&(clearTimeout(y(this,mn)),V(this,mn,void 0))},vi=function(){y(this,gn)&&(clearInterval(y(this,gn)),V(this,gn,void 0))},yi=function(){const t=y(this,Ae).getQueryCache().build(y(this,Ae),this.options);if(t===y(this,Q))return;const n=y(this,Q);V(this,Q,t),V(this,Es,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Qa=function(t){me.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(y(this,Se))}),y(this,Ae).getQueryCache().notify({query:y(this,Q),type:"observerResultsUpdated"})})},Ca);function Ku(e,t){return Qe(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Ro(e,t){return Ku(e,t)||e.state.data!==void 0&&bi(e,t,t.refetchOnMount)}function bi(e,t,n){if(Qe(t.enabled,e)!==!1){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&Ui(e,t)}return!1}function Eo(e,t,n,s){return(e!==t||Qe(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ui(e,n)}function Ui(e,t){return Qe(t.enabled,e)!==!1&&e.isStaleByTime(An(t.staleTime,e))}function Wu(e,t){return!Gs(e.getCurrentResult(),t)}var Ut,$t,Re,pt,_t,zs,wi,Aa,Qu=(Aa=class extends ts{constructor(t,n){super();U(this,_t);U(this,Ut);U(this,$t);U(this,Re);U(this,pt);V(this,Ut,t),this.setOptions(n),this.bindMethods(),W(this,_t,zs).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var s;const n=this.options;this.options=y(this,Ut).defaultMutationOptions(t),Gs(this.options,n)||y(this,Ut).getMutationCache().notify({type:"observerOptionsUpdated",mutation:y(this,Re),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&yn(n.mutationKey)!==yn(this.options.mutationKey)?this.reset():((s=y(this,Re))==null?void 0:s.state.status)==="pending"&&y(this,Re).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=y(this,Re))==null||t.removeObserver(this)}onMutationUpdate(t){W(this,_t,zs).call(this),W(this,_t,wi).call(this,t)}getCurrentResult(){return y(this,$t)}reset(){var t;(t=y(this,Re))==null||t.removeObserver(this),V(this,Re,void 0),W(this,_t,zs).call(this),W(this,_t,wi).call(this)}mutate(t,n){var s;return V(this,pt,n),(s=y(this,Re))==null||s.removeObserver(this),V(this,Re,y(this,Ut).getMutationCache().build(y(this,Ut),this.options)),y(this,Re).addObserver(this),y(this,Re).execute(t)}},Ut=new WeakMap,$t=new WeakMap,Re=new WeakMap,pt=new WeakMap,_t=new WeakSet,zs=function(){var n;const t=((n=y(this,Re))==null?void 0:n.state)??Wa();V(this,$t,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},wi=function(t){me.batch(()=>{var n,s,r,o,i,c,l,u;if(y(this,pt)&&this.hasListeners()){const d=y(this,$t).variables,h=y(this,$t).context;(t==null?void 0:t.type)==="success"?((s=(n=y(this,pt)).onSuccess)==null||s.call(n,t.data,d,h),(o=(r=y(this,pt)).onSettled)==null||o.call(r,t.data,null,d,h)):(t==null?void 0:t.type)==="error"&&((c=(i=y(this,pt)).onError)==null||c.call(i,t.error,d,h),(u=(l=y(this,pt)).onSettled)==null||u.call(l,void 0,t.error,d,h))}this.listeners.forEach(d=>{d(y(this,$t))})})},Aa),Ga=p.createContext(void 0),mr=e=>{const t=p.useContext(Ga);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Gu=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(Ga.Provider,{value:e,children:t})),Ja=p.createContext(!1),Ju=()=>p.useContext(Ja);Ja.Provider;function Yu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Xu=p.createContext(Yu()),ed=()=>p.useContext(Xu);function Ya(e,t){return typeof e=="function"?e(...t):!!e}function xi(){}var td=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nd=e=>{p.useEffect(()=>{e.clearReset()},[e])},sd=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(r&&e.data===void 0||Ya(n,[e.error,s])),rd=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},id=(e,t)=>e.isLoading&&e.isFetching&&!t,od=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Po=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ad(e,t,n){var h,m,g,v,b;const s=mr(),r=Ju(),o=ed(),i=s.defaultQueryOptions(e);(m=(h=s.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||m.call(h,i),i._optimisticResults=r?"isRestoring":"optimistic",rd(i),td(i,o),nd(o);const c=!s.getQueryCache().get(i.queryHash),[l]=p.useState(()=>new t(s,i)),u=l.getOptimisticResult(i),d=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(w=>{const x=d?l.subscribe(me.batchCalls(w)):xi;return l.updateResult(),x},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),p.useEffect(()=>{l.setOptions(i)},[i,l]),od(i,u))throw Po(i,l,o);if(sd({result:u,errorResetBoundary:o,throwOnError:i.throwOnError,query:s.getQueryCache().get(i.queryHash),suspense:i.suspense}))throw u.error;if((v=(g=s.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||v.call(g,i,u),i.experimental_prefetchInRender&&!vn&&id(u,r)){const w=c?Po(i,l,o):(b=s.getQueryCache().get(i.queryHash))==null?void 0:b.promise;w==null||w.catch(xi).finally(()=>{l.updateResult()})}return i.notifyOnChangeProps?u:l.trackResult(u)}function Xa(e,t){return ad(e,zu)}function Fe(e,t){const n=mr(),[s]=p.useState(()=>new Qu(n,e));p.useEffect(()=>{s.setOptions(e)},[s,e]);const r=p.useSyncExternalStore(p.useCallback(i=>s.subscribe(me.batchCalls(i)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),o=p.useCallback((i,c)=>{s.mutate(i,c).catch(xi)},[s]);if(r.error&&Ya(s.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}var cd="Invariant failed";function gt(e,t){if(!e)throw new Error(cd)}const Rn=new WeakMap,Ks=new WeakMap,Ys={current:[]};let Or=!1,ys=0;const ps=new Set,Fs=new Map;function ec(e){const t=Array.from(e).sort((n,s)=>n instanceof En&&n.options.deps.includes(s)?1:s instanceof En&&s.options.deps.includes(n)?-1:0);for(const n of t){if(Ys.current.includes(n))continue;Ys.current.push(n),n.recompute();const s=Ks.get(n);if(s)for(const r of s){const o=Rn.get(r);o&&ec(o)}}}function ld(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function ud(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function tc(e){if(ys>0&&!Fs.has(e)&&Fs.set(e,e.prevState),ps.add(e),!(ys>0)&&!Or)try{for(Or=!0;ps.size>0;){const t=Array.from(ps);ps.clear();for(const n of t){const s=Fs.get(n)??n.prevState;n.prevState=s,ld(n)}for(const n of t){const s=Rn.get(n);s&&(Ys.current.push(n),ec(s))}for(const n of t){const s=Rn.get(n);if(s)for(const r of s)ud(r)}}}finally{Or=!1,Ys.current=[],Fs.clear()}}function Hr(e){ys++;try{e()}finally{if(ys--,ys===0){const t=Array.from(ps)[0];t&&tc(t)}}}function dd(e){return typeof e=="function"}class _i{constructor(t,n){this.listeners=new Set,this.subscribe=s=>{var r,o;this.listeners.add(s);const i=(o=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:o.call(r,s,this);return()=>{this.listeners.delete(s),i==null||i()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,s,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):dd(t)?this.state=t(this.prevState):this.state=t,(r=(s=this.options)==null?void 0:s.onUpdate)==null||r.call(s),tc(this)}}class En{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=[],s=[];for(const r of this.options.deps)n.push(r.prevState),s.push(r.state);return this.lastSeenDepValues=s,{prevDepVals:n,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,s;this.prevState=this.state;const{prevDepVals:r,currDepVals:o,prevVal:i}=this.getDepVals();this.state=this.options.fn({prevDepVals:r,currDepVals:o,prevVal:i}),(s=(n=this.options).onUpdate)==null||s.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof En&&o.checkIfRecalculationNeededDeeply();let n=!1;const s=this.lastSeenDepValues,{currDepVals:r}=this.getDepVals();for(let o=0;o<r.length;o++)if(r[o]!==s[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var s,r;this.listeners.add(n);const o=(r=(s=this.options).onSubscribe)==null?void 0:r.call(s,n,this);return()=>{this.listeners.delete(n),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 n of t)if(n instanceof En)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof _i){let s=Rn.get(n);s||(s=new Set,Rn.set(n,s)),s.add(this);let r=Ks.get(this);r||(r=new Set,Ks.set(this,r)),r.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof En)this.unregisterFromGraph(n.options.deps);else if(n instanceof _i){const s=Rn.get(n);s&&s.delete(this);const r=Ks.get(this);r&&r.delete(n)}}}const zt="__TSR_index",ko="popstate",Mo="beforeunload";function nc(e){let t=e.getLocation();const n=new Set,s=i=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:i}))},r=i=>{e.notifyOnIndexChange??!0?s(i):t=e.getLocation()},o=async({task:i,navigateOpts:c,...l})=>{var u,d;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 v of m){const b=xs(l.path,l.state);if(await v.blockerFn({currentLocation:t,nextLocation:b,action:l.type})){(d=e.onBlocked)==null||d.call(e);return}}i()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:i=>(n.add(i),()=>{n.delete(i)}),push:(i,c,l)=>{const u=t.state[zt];c=Si(u+1,c),o({task:()=>{e.pushState(i,c),s({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:i,state:c})},replace:(i,c,l)=>{const u=t.state[zt];c=Si(u,c),o({task:()=>{e.replaceState(i,c),s({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[zt]!==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,d;const h=((u=e.getBlockers)==null?void 0:u.call(e))??[];(d=e.setBlockers)==null||d.call(e,h.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:s}}function Si(e,t){return t||(t={}),{...t,key:$i(),[zt]:e}}function hd(e){var t;const n=typeof document<"u"?window:void 0,s=n.history.pushState,r=n.history.replaceState;let o=[];const i=()=>o,c=_=>o=_,l=_=>_,u=()=>xs(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state);(t=n.history.state)!=null&&t.key||n.history.replaceState({[zt]:0,key:$i()},"");let d=u(),h,m=!1,g=!1,v=!1,b=!1;const w=()=>d;let x,j;const A=()=>{x&&(S._ignoreSubscribers=!0,(x.isPush?n.history.pushState:n.history.replaceState)(x.state,"",x.href),S._ignoreSubscribers=!1,x=void 0,j=void 0,h=void 0)},H=(_,F,D)=>{const N=l(F);j||(h=d),d=xs(F,D),x={href:N,state:D,isPush:(x==null?void 0:x.isPush)||_==="push"},j||(j=Promise.resolve().then(()=>A()))},I=_=>{d=u(),S.notify({type:_})},E=async()=>{if(g){g=!1;return}const _=u(),F=_.state[zt]-d.state[zt],D=F===1,N=F===-1,T=!D&&!N||m;m=!1;const $=T?"GO":N?"BACK":"FORWARD",q=T?{type:"GO",index:F}:{type:N?"BACK":"FORWARD"};if(v)v=!1;else{const Z=i();if(typeof document<"u"&&Z.length){for(const B of Z)if(await B.blockerFn({currentLocation:d,nextLocation:_,action:$})){g=!0,n.history.go(1),S.notify(q);return}}}d=u(),S.notify(q)},L=_=>{if(b){b=!1;return}let F=!1;const D=i();if(typeof document<"u"&&D.length)for(const N of D){const T=N.enableBeforeUnload??!0;if(T===!0){F=!0;break}if(typeof T=="function"&&T()===!0){F=!0;break}}if(F)return _.preventDefault(),_.returnValue=""},S=nc({getLocation:w,getLength:()=>n.history.length,pushState:(_,F)=>H("push",_,F),replaceState:(_,F)=>H("replace",_,F),back:_=>(_&&(v=!0),b=!0,n.history.back()),forward:_=>{_&&(v=!0),b=!0,n.history.forward()},go:_=>{m=!0,n.history.go(_)},createHref:_=>l(_),flush:A,destroy:()=>{n.history.pushState=s,n.history.replaceState=r,n.removeEventListener(Mo,L,{capture:!0}),n.removeEventListener(ko,E)},onBlocked:()=>{h&&d!==h&&(d=h)},getBlockers:i,setBlockers:c,notifyOnIndexChange:!1});return n.addEventListener(Mo,L,{capture:!0}),n.addEventListener(ko,E),n.history.pushState=function(..._){const F=s.apply(n.history,_);return S._ignoreSubscribers||I("PUSH"),F},n.history.replaceState=function(..._){const F=r.apply(n.history,_);return S._ignoreSubscribers||I("REPLACE"),F},S}function fd(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const s=t.map((o,i)=>Si(i,void 0));return nc({getLocation:()=>xs(t[n],s[n]),getLength:()=>t.length,pushState:(o,i)=>{n<t.length-1&&(t.splice(n+1),s.splice(n+1)),s.push(i),t.push(o),n=Math.max(t.length-1,0)},replaceState:(o,i)=>{s[n]=i,t[n]=o},back:()=>{n=Math.max(n-1,0)},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function xs(e,t){const n=e.indexOf("#"),s=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?s>0?Math.min(n,s):n:s>0?s:e.length),hash:n>-1?e.substring(n):"",search:s>-1?e.slice(s,n===-1?void 0:n):"",state:t||{[zt]:0,key:$i()}}}function $i(){return(Math.random()+1).toString(36).substring(7)}function Sn(e){return e[e.length-1]}function pd(e){return typeof e=="function"}function an(e,t){return pd(e)?e(t):e}function ji(e,t){return t.reduce((n,s)=>(n[s]=e[s],n),{})}function Ve(e,t){if(e===t)return e;const n=t,s=Ho(e)&&Ho(n);if(s||Xs(e)&&Xs(n)){const r=s?e:Object.keys(e),o=r.length,i=s?n:Object.keys(n),c=i.length,l=s?[]:{};let u=0;for(let d=0;d<c;d++){const h=s?d:i[d];(!s&&r.includes(h)||s)&&e[h]===void 0&&n[h]===void 0?(l[h]=void 0,u++):(l[h]=Ve(e[h],n[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return o===c&&u===o?e:l}return n}function Xs(e){if(!Oo(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Oo(n)||!n.hasOwnProperty("isPrototypeOf"))}function Oo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ho(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lo(e,t){let n=Object.keys(e);return t&&(n=n.filter(s=>e[s]!==void 0)),n}function Pn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Xs(e)&&Xs(t)){const s=(n==null?void 0:n.ignoreUndefined)??!0,r=Lo(e,s),o=Lo(t,s);return!(n!=null&&n.partial)&&r.length!==o.length?!1:o.every(i=>Pn(e[i],t[i],n))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((s,r)=>!Pn(s,t[r],n)):!1}function _n(e){let t,n;const s=new Promise((r,o)=>{t=r,n=o});return s.status="pending",s.resolve=r=>{s.status="resolved",s.value=r,t(r),e==null||e(r)},s.reject=r=>{s.status="rejected",n(r)},s}function md(e){return/%[0-9A-Fa-f]{2}/.test(e)}function wt(e){return gr(e.filter(t=>t!==void 0).join("/"))}function gr(e){return e.replace(/\/{2,}/g,"/")}function qi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function cn(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function gd(e){return cn(qi(e))}function er(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function vd(e,t,n){return er(e,n)===er(t,n)}function yd({basepath:e,base:t,to:n,trailingSlash:s="never",caseSensitive:r}){var o,i;t=tr(e,t,r),n=tr(e,n,r);let c=Wn(t);const l=Wn(n);c.length>1&&((o=Sn(c))==null?void 0:o.value)==="/"&&c.pop(),l.forEach((d,h)=>{d.value==="/"?h?h===l.length-1&&c.push(d):c=[d]:d.value===".."?c.pop():d.value==="."||c.push(d)}),c.length>1&&(((i=Sn(c))==null?void 0:i.value)==="/"?s==="never"&&c.pop():s==="always"&&c.push({type:"pathname",value:"/"}));const u=wt([e,...c.map(d=>d.value)]);return gr(u)}function Wn(e){if(!e)return[];e=gr(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(s=>s==="$"||s==="*"?{type:"wildcard",value:s}:s.charAt(0)==="$"?{type:"param",value:s}:{type:"pathname",value:s.includes("%25")?s.split("%25").map(r=>decodeURI(r)).join("%25"):decodeURI(s)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function Ts({path:e,params:t,leaveWildcards:n,leaveParams:s,decodeCharMap:r}){const o=Wn(e);function i(u){const d=t[u],h=typeof d=="string";return["*","_splat"].includes(u)?h?encodeURI(d):d:h?bd(d,r):d}const c={},l=wt(o.map(u=>{if(u.type==="wildcard"){c._splat=t._splat;const d=i("_splat");return n?`${u.value}${d??""}`:d}if(u.type==="param"){const d=u.value.substring(1);if(c[d]=t[d],s){const h=i(u.value);return`${u.value}${h??""}`}return i(d)??"undefined"}return u.value}));return{usedParams:c,interpolatedPath:l}}function bd(e,t){let n=encodeURIComponent(e);if(t)for(const[s,r]of t)n=n.replaceAll(s,r);return n}function Ds(e,t,n){const s=wd(e,t,n);if(!(n.to&&!s))return s??{}}function tr(e,t,n=!1){const s=n?e:e.toLowerCase(),r=n?t:t.toLowerCase();switch(!0){case s==="/":return t;case r===s:return"";case t.length<e.length:return t;case r[s.length]!=="/":return t;case r.startsWith(s):return t.slice(e.length);default:return t}}function wd(e,t,n){if(e!=="/"&&!t.startsWith(e))return;t=tr(e,t,n.caseSensitive);const s=tr(e,`${n.to??"$"}`,n.caseSensitive),r=Wn(t),o=Wn(s);t.startsWith("/")||r.unshift({type:"pathname",value:"/"}),s.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],d=o[l],h=l>=r.length-1,m=l>=o.length-1;if(d){if(d.type==="wildcard"){const g=decodeURI(wt(r.slice(l).map(v=>v.value)));return i["*"]=g,i._splat=g,!0}if(d.type==="pathname"){if(d.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(n.caseSensitive){if(d.value!==u.value)return!1}else if(d.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(d.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(i[d.value.substring(1)]=decodeURIComponent(u.value))}}if(!h&&m)return i["**"]=wt(r.slice(l+1).map(g=>g.value)),!!n.fuzzy&&(d==null?void 0:d.value)!=="/"}return!0})()?i:void 0}function $e(e){return!!(e!=null&&e.isNotFound)}const nr="tsr-scroll-restoration-v1_3";let sc=!1;try{sc=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const xd=(e,t)=>{let n;return(...s)=>{n||(n=setTimeout(()=>{e(...s),n=null},t))}},jn=sc?{state:JSON.parse(window.sessionStorage.getItem(nr)||"null")||{},set:t=>(jn.state=an(t,jn.state)||jn.state,window.sessionStorage.setItem(nr,JSON.stringify(jn.state)))}:void 0,Ci=e=>e.state.key||e.href;function _d(e){const t=[];let n;for(;n=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(n.children,e)+1})`),e=n;return`${t.join(" > ")}`.toLowerCase()}let sr=!1;function rc(e,t,n,s,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];sr=!0,(()=>{if(s&&l){for(const d in l){const h=l[d];if(d==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:n});else if(d){const m=document.querySelector(d);m&&(m.scrollLeft=h.scrollX,m.scrollTop=h.scrollY)}}return}const u=window.location.hash.split("#")[1];if(u){const d=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(d){const h=document.getElementById(u);h&&h.scrollIntoView(d)}return}["window",...(r==null?void 0:r.filter(d=>d!=="window"))??[]].forEach(d=>{const h=d==="window"?window:document.querySelector(d);h&&h.scrollTo({top:0,left:0,behavior:n})})})(),sr=!1}function Sd(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,sr=!1;const s=e.options.getScrollRestorationKey||Ci;window.history.scrollRestoration="manual";const r=o=>{if(sr||!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=_d(o.target)}const c=s(e.state.location);jn.set(l=>{const u=l[c]=l[c]||{},d=u[i]=u[i]||{};if(i==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(i){const h=document.querySelector(i);h&&(d.scrollX=h.scrollLeft||0,d.scrollY=h.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",xd(r,100),!0),e.subscribe("onRendered",o=>{const i=s(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}rc(nr,i,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&jn.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 n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function Cd(e,t){const n=Object.entries(e).flatMap(([r,o])=>Array.isArray(o)?o.map(i=>[r,String(i)]):[[r,String(o)]]);return""+new URLSearchParams(n).toString()}function Lr(e){if(!e)return"";const t=md(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Ad(e,t){const n=e;return[...new URLSearchParams(n).entries()].reduce((o,[i,c])=>{const l=o[i];return l==null?o[i]=Lr(c):o[i]=Array.isArray(l)?[...l,Lr(c)]:[l,Lr(c)],o},{})}const Rd=Pd(JSON.parse),Ed=kd(JSON.stringify,JSON.parse);function Pd(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=Ad(t);for(const s in n){const r=n[s];if(typeof r=="string")try{n[s]=e(r)}catch{}}return n}}function kd(e,t){function n(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(typeof s=="string"&&typeof t=="function")try{return t(s),e(s)}catch{}return s}return s=>{s={...s},Object.keys(s).forEach(o=>{const i=s[o];typeof i>"u"||i===void 0?delete s[o]:s[o]=n(i)});const r=Cd(s).toString();return r?`?${r}`:""}}const We="__root__";function rn(e){return!!(e!=null&&e.isRedirect)}function Ir(e){return!!(e!=null&&e.isRedirect)&&e.href}function kn(e){const t=e.resolvedLocation,n=e.location,s=(t==null?void 0:t.pathname)!==n.pathname,r=(t==null?void 0:t.href)!==n.href,o=(t==null?void 0:t.hash)!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:s,hrefChanged:r,hashChanged:o}}class Md{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=n=>n(),this.update=n=>{var s;n.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,...n},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||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${gd(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?fd({initialEntries:[this.basepath||"/"]}):hd()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new _i(Hd(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),Sd(this)),typeof window<"u"&&"CSS"in window&&typeof((s=window.CSS)==null?void 0:s.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[n.id]=n);const s=i=>{i.forEach((c,l)=>{c.init({originalIndex:l,defaultSsr:this.options.defaultSsr});const u=this.routesById[c.id];if(gt(!u,`Duplicate routes found with id: ${String(c.id)}`),this.routesById[c.id]=c,!c.isRoot&&c.path){const h=cn(c.fullPath);(!this.routesByPath[h]||c.fullPath.endsWith("/"))&&(this.routesByPath[h]=c)}const d=c.children;d!=null&&d.length&&s(d)})};s([this.routeTree]);const r=[];Object.values(this.routesById).forEach((i,c)=>{var l;if(i.isRoot||!i.path)return;const u=qi(i.fullPath),d=Wn(u);for(;d.length>1&&((l=d[0])==null?void 0:l.value)==="/";)d.shift();const h=d.map(m=>m.value==="/"?.75:m.type==="param"?.5:m.type==="wildcard"?.25:1);r.push({child:i,trimmed:u,parsed:d,index:c,scores:h})}),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=(n,s)=>{const r={eventType:n,fn:s};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(s=>{s.eventType===n.type&&s.fn(n)})},this.parseLocation=(n,s)=>{const r=({pathname:l,search:u,hash:d,state:h})=>{const m=this.options.parseSearch(u),g=this.options.stringifySearch(m);return{pathname:l,searchStr:g,search:Ve(n==null?void 0:n.search,m),hash:d.split("#").reverse()[0]??"",href:`${l}${g}${d}`,state:Ve(n==null?void 0:n.state,h)}},o=r(s??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=(n,s)=>yd({basepath:this.basepath,base:n,to:gr(s),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(n,s,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:s},r):this.matchRoutesInternal(n,s),this.getMatchedRoutes=(n,s)=>{let r={};const o=cn(n.pathname),i=d=>Ds(this.basepath,o,{to:d.fullPath,caseSensitive:d.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let c=(s==null?void 0:s.to)!==void 0?this.routesByPath[s.to]:void 0;c?r=i(c):c=this.flatRoutes.find(d=>{const h=i(d);return h?(r=h,!0):!1});let l=c||this.routesById[We];const u=[l];for(;l.parentRoute;)l=l.parentRoute,u.unshift(l);return{matchedRoutes:u,routeParams:r,foundRoute:c}},this.cancelMatch=n=>{const s=this.getMatch(n);s&&(s.abortController.abort(),clearTimeout(s.pendingTimeout))},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const s=(o={},i)=>{var c,l,u,d,h,m,g;const v=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,b=o.from!=null?v.find(N=>Ds(this.basepath,cn(N.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,w=(b==null?void 0:b.pathname)||this.latestLocation.pathname;gt(o.from==null||b!=null,"Could not find match for from: "+o.from);const x=(c=this.state.pendingMatches)!=null&&c.length?(l=Sn(this.state.pendingMatches))==null?void 0:l.search:((u=Sn(v))==null?void 0:u.search)||this.latestLocation.search,j=i==null?void 0:i.matchedRoutes.filter(N=>v.find(T=>T.routeId===N.id));let A;if(o.to){const N=(b==null?void 0:b.fullPath)||((d=Sn(v))==null?void 0:d.fullPath)||this.latestLocation.pathname;A=this.resolvePathWithBase(N,`${o.to}`)}else{const N=this.routesById[(h=j==null?void 0:j.find(T=>{const $=Ts({path:T.fullPath,params:(i==null?void 0:i.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return wt([this.basepath,$])===w}))==null?void 0:h.id];A=this.resolvePathWithBase(w,(N==null?void 0:N.to)??w)}const H={...(m=Sn(v))==null?void 0:m.params};let I=(o.params??!0)===!0?H:{...H,...an(o.params,H)};Object.keys(I).length>0&&(i==null||i.matchedRoutes.map(N=>{var T;return((T=N.options.params)==null?void 0:T.stringify)??N.options.stringifyParams}).filter(Boolean).forEach(N=>{I={...I,...N(I)}})),A=Ts({path:A,params:I??{},leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let E=x;if(n._includeValidateSearch&&((g=this.options.search)!=null&&g.strict)){let N={};i==null||i.matchedRoutes.forEach(T=>{try{T.options.validateSearch&&(N={...N,...Nr(T.options.validateSearch,{...N,...E})??{}})}catch{}}),E=N}E=(N=>{const T=(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:ye})=>{let te=J;"preSearchFilters"in B.options&&B.options.preSearchFilters&&(te=B.options.preSearchFilters.reduce((oe,ae)=>ae(oe),J));const ne=ye(te);return"postSearchFilters"in B.options&&B.options.postSearchFilters?B.options.postSearchFilters.reduce((oe,ae)=>ae(oe),ne):ne};G.push(X)}if(n._includeValidateSearch&&B.options.validateSearch){const X=({search:J,next:ye})=>{const te=ye(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:an(o.search,Z):{};T.push($);const q=(Z,B)=>{if(Z>=T.length)return B;const z=T[Z];return z({search:B,next:X=>q(Z+1,X)})};return q(0,N)})(E),E=Ve(x,E);const S=this.options.stringifySearch(E),_=o.hash===!0?this.latestLocation.hash:o.hash?an(o.hash,this.latestLocation.hash):void 0,F=_?`#${_}`:"";let D=o.state===!0?this.latestLocation.state:o.state?an(o.state,this.latestLocation.state):{};return D=Ve(this.latestLocation.state,D),{pathname:A,search:E,searchStr:S,state:D,hash:_??"",href:`${A}${S}${F}`,unmaskOnReload:o.unmaskOnReload}},r=(o={},i)=>{var c;const l=s(o);let u=i?s(i):void 0;if(!u){let m={};const g=(c=this.options.routeMasks)==null?void 0:c.find(v=>{const b=Ds(this.basepath,l.pathname,{to:v.from,caseSensitive:!1,fuzzy:!1});return b?(m=b,!0):!1});if(g){const{from:v,...b}=g;i={...ji(n,["from"]),...b,params:m},u=s(i)}}const d=this.getMatchedRoutes(l,o),h=s(o,d);if(u){const m=this.getMatchedRoutes(u,i),g=s(i,m);h.maskedLocation=g}return h};return n.mask?r(n,{...ji(n,["from"]),...n.mask}):r(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:s,...r})=>{const o=()=>{const l=["key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(d=>{r.state[d]=this.latestLocation.state[d]});const u=Pn(r.state,this.latestLocation.state);return l.forEach(d=>{delete r.state[d]}),u},i=this.latestLocation.href===r.href,c=this.commitLocationPromise;if(this.commitLocationPromise=_n(()=>{c==null||c.resolve()}),i&&o())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...d}=r;l&&(d={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](d.href,d.state,{ignoreBlocker:s})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:s,hashScrollIntoView:r,viewTransition:o,ignoreBlocker:i,href:c,...l}={})=>{if(c){const d=this.history.location.state.__TSR_index,h=xs(c,{__TSR_index:n?d:d+1});l.to=h.pathname,l.search=this.options.parseSearch(h.search),l.hash=h.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});return this.commitLocation({...u,viewTransition:o,replace:n,resetScroll:s,hashScrollIntoView:r,ignoreBlocker:i})},this.navigate=({to:n,reloadDocument:s,href:r,...o})=>{if(s){if(!r){const i=this.buildLocation({to:n,...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:n})},this.load=async n=>{this.latestLocation=this.parseLocation(this.latestLocation);let s,r,o;for(o=new Promise(i=>{this.startTransition(async()=>{var c;try{const l=this.latestLocation,u=this.state.resolvedLocation;this.cancelMatches();let d;Hr(()=>{d=this.matchRoutes(l),this.__store.setState(h=>({...h,status:"pending",isLoading:!0,location:l,pendingMatches:d,cachedMatches:h.cachedMatches.filter(m=>!d.find(g=>g.id===m.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...kn({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...kn({resolvedLocation:u,location:l})}),await this.loadMatches({sync:n==null?void 0:n.sync,matches:d,location:l,onReady:async()=>{this.startViewTransition(async()=>{let h,m,g;Hr(()=>{this.__store.setState(v=>{const b=v.matches,w=v.pendingMatches||v.matches;return h=b.filter(x=>!w.find(j=>j.id===x.id)),m=w.filter(x=>!b.find(j=>j.id===x.id)),g=b.filter(x=>w.find(j=>j.id===x.id)),{...v,isLoading:!1,loadedAt:Date.now(),matches:w,pendingMatches:void 0,cachedMatches:[...v.cachedMatches,...h.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[m,"onEnter"],[g,"onStay"]].forEach(([v,b])=>{v.forEach(w=>{var x,j;(j=(x=this.looseRoutesById[w.routeId].options)[b])==null||j.call(x,w)})})})}})}catch(l){Ir(l)?(s=l,this.isServer||this.navigate({...s,replace:!0,ignoreBlocker:!0})):$e(l)&&(r=l),this.__store.setState(u=>({...u,statusCode:s?s.statusCode:r?404:u.matches.some(d=>d.status==="error")?500:200,redirect:s}))}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=n=>{const s=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,s&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;typeof s=="object"&&this.isViewTransitionTypesSupported?r={update:n,types:s.types}:r=n,document.startViewTransition(r)}else n()},this.updateMatch=(n,s)=>{var r;let o;const i=(r=this.state.pendingMatches)==null?void 0:r.find(d=>d.id===n),c=this.state.matches.find(d=>d.id===n),l=this.state.cachedMatches.find(d=>d.id===n),u=i?"pendingMatches":c?"matches":l?"cachedMatches":"";return u&&this.__store.setState(d=>{var h;return{...d,[u]:(h=d[u])==null?void 0:h.map(m=>m.id===n?o=s(m):m)}}),o},this.getMatch=n=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(s=>s.id===n),this.loadMatches=async({location:n,matches:s,preload:r,onReady:o,updateMatch:i=this.updateMatch,sync:c})=>{let l,u=!1;const d=async()=>{u||(u=!0,await(o==null?void 0:o()))},h=g=>!!(r&&!this.state.matches.find(v=>v.id===g));!this.isServer&&!this.state.matches.length&&d();const m=(g,v)=>{var b,w,x,j;if(Ir(v)&&!v.reloadDocument)throw v;if(rn(v)||$e(v)){if(i(g.id,A=>({...A,status:rn(v)?"redirected":$e(v)?"notFound":"error",isFetching:!1,error:v,beforeLoadPromise:void 0,loaderPromise:void 0})),v.routeId||(v.routeId=g.routeId),(b=g.beforeLoadPromise)==null||b.resolve(),(w=g.loaderPromise)==null||w.resolve(),(x=g.loadPromise)==null||x.resolve(),rn(v))throw u=!0,v=this.resolveRedirect({...v,_fromLocation:n}),v;if($e(v))throw this._handleNotFound(s,v,{updateMatch:i}),(j=this.serverSsr)==null||j.onMatchSettled({router:this,match:this.getMatch(g.id)}),v}};try{await new Promise((g,v)=>{(async()=>{var b,w,x,j;try{const A=(E,L,S)=>{var _,F;const{id:D,routeId:N}=s[E],T=this.looseRoutesById[N];if(L instanceof Promise)throw L;L.routerCode=S,l=l??E,m(this.getMatch(D),L);try{(F=(_=T.options).onError)==null||F.call(_,L)}catch($){L=$,m(this.getMatch(D),L)}i(D,$=>{var q,Z;return(q=$.beforeLoadPromise)==null||q.resolve(),(Z=$.loadPromise)==null||Z.resolve(),{...$,error:L,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[E,{id:L,routeId:S}]of s.entries()){const _=this.getMatch(L),F=(b=s[E-1])==null?void 0:b.id,D=this.looseRoutesById[S],N=D.options.pendingMs??this.options.defaultPendingMs,T=!!(o&&!this.isServer&&!h(L)&&(D.options.loader||D.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(D.options.pendingComponent??((w=this.options)==null?void 0:w.defaultPendingComponent)));let $=!0;if((_.beforeLoadPromise||_.loaderPromise)&&(T&&setTimeout(()=>{try{d()}catch{}},N),await _.beforeLoadPromise,$=this.getMatch(L).status!=="success"),$){try{i(L,ce=>{const Y=ce.loadPromise;return{...ce,loadPromise:_n(()=>{Y==null||Y.resolve()}),beforeLoadPromise:_n()}});const q=new AbortController;let Z;T&&(Z=setTimeout(()=>{try{d()}catch{}},N));const{paramsError:B,searchError:z}=this.getMatch(L);B&&A(E,B,"PARSE_PARAMS"),z&&A(E,z,"VALIDATE_SEARCH");const G=()=>F?this.getMatch(F).context:this.options.context??{};i(L,ce=>({...ce,isFetching:"beforeLoad",fetchCount:ce.fetchCount+1,abortController:q,pendingTimeout:Z,context:{...G(),...ce.__routeContext}}));const{search:X,params:J,context:ye,cause:te}=this.getMatch(L),ne=h(L),oe={search:X,abortController:q,params:J,preload:ne,context:ye,location:n,navigate:ce=>this.navigate({...ce,_fromLocation:n}),buildLocation:this.buildLocation,cause:ne?"preload":te,matches:s},ae=await((j=(x=D.options).beforeLoad)==null?void 0:j.call(x,oe))??{};(rn(ae)||$e(ae))&&A(E,ae,"BEFORE_LOAD"),i(L,ce=>({...ce,__beforeLoadContext:ae,context:{...G(),...ce.__routeContext,...ae},abortController:q}))}catch(q){A(E,q,"BEFORE_LOAD")}i(L,q=>{var Z;return(Z=q.beforeLoadPromise)==null||Z.resolve(),{...q,beforeLoadPromise:void 0,isFetching:!1}})}}const H=s.slice(0,l),I=[];H.forEach(({id:E,routeId:L},S)=>{I.push((async()=>{const{loaderPromise:_}=this.getMatch(E);let F=!1,D=!1;if(_){await _;const N=this.getMatch(E);N.error&&m(N,N.error)}else{const N=I[S-1],T=this.looseRoutesById[L],$=()=>{const{params:te,loaderDeps:ne,abortController:oe,context:ae,cause:ce}=this.getMatch(E),Y=h(E);return{params:te,deps:ne,preload:!!Y,parentMatchPromise:N,abortController:oe,context:ae,location:n,navigate:ie=>this.navigate({...ie,_fromLocation:n}),cause:Y?"preload":ce,route:T}},q=Date.now()-this.getMatch(E).updatedAt,Z=h(E),B=Z?T.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:T.options.staleTime??this.options.defaultStaleTime??0,z=T.options.shouldReload,G=typeof z=="function"?z($()):z;i(E,te=>({...te,loaderPromise:_n(),preload:!!Z&&!this.state.matches.find(ne=>ne.id===E)}));const X=async()=>{var te,ne,oe,ae,ce,Y,ie,Xe,Te,et,De;try{const Me=async()=>{const he=this.getMatch(E);he.minPendingPromise&&await he.minPendingPromise};try{this.loadRouteChunk(T),i(E,tn=>({...tn,isFetching:"loader"}));const he=await((ne=(te=T.options).loader)==null?void 0:ne.call(te,$()));m(this.getMatch(E),he),await T._lazyPromise,await Me();const be={matches:s,match:this.getMatch(E),params:this.getMatch(E).params,loaderData:he},pe=(ae=(oe=T.options).head)==null?void 0:ae.call(oe,be),Pt=pe==null?void 0:pe.meta,dt=pe==null?void 0:pe.links,Ls=pe==null?void 0:pe.scripts,se=(Y=(ce=T.options).scripts)==null?void 0:Y.call(ce,be),le=(Xe=(ie=T.options).headers)==null?void 0:Xe.call(ie,{loaderData:he});i(E,tn=>({...tn,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:he,meta:Pt,links:dt,headScripts:Ls,headers:le,scripts:se}))}catch(he){let be=he;await Me(),m(this.getMatch(E),he);try{(et=(Te=T.options).onError)==null||et.call(Te,he)}catch(pe){be=pe,m(this.getMatch(E),pe)}i(E,pe=>({...pe,error:be,status:"error",isFetching:!1}))}(De=this.serverSsr)==null||De.onMatchSettled({router:this,match:this.getMatch(E)}),await T._componentsPromise}catch(Me){i(E,he=>({...he,loaderPromise:void 0})),m(this.getMatch(E),Me)}},{status:J,invalid:ye}=this.getMatch(E);F=J==="success"&&(ye||(G??q>B)),Z&&T.options.preload===!1||(F&&!c?(D=!0,(async()=>{try{await X();const{loaderPromise:te,loadPromise:ne}=this.getMatch(E);te==null||te.resolve(),ne==null||ne.resolve(),i(E,oe=>({...oe,loaderPromise:void 0}))}catch(te){Ir(te)&&await this.navigate(te)}})()):(J!=="success"||F&&c)&&await X())}if(!D){const{loaderPromise:N,loadPromise:T}=this.getMatch(E);N==null||N.resolve(),T==null||T.resolve()}return i(E,N=>({...N,isFetching:D?N.isFetching:!1,loaderPromise:D?N.loaderPromise:void 0,invalid:!1})),this.getMatch(E)})())}),await Promise.all(I),g()}catch(A){v(A)}})()}),await d()}catch(g){if(rn(g)||$e(g))throw $e(g)&&!r&&await d(),g}return s},this.invalidate=n=>{const s=r=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,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(s),cachedMatches:r.cachedMatches.map(s),pendingMatches:(o=r.pendingMatches)==null?void 0:o.map(s)}}),this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{const s=n;return s.href||(s.href=this.buildLocation(s).href),s},this.clearCache=n=>{const s=n==null?void 0:n.filter;s!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(o=>!s(o))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=s=>{const r=this.looseRoutesById[s.routeId];if(!r.options.loader)return!0;const o=(s.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(s.status!=="error"&&Date.now()-s.updatedAt<o)};this.clearCache({filter:n})},this.loadRouteChunk=n=>(n._lazyPromise===void 0&&(n.lazyFn?n._lazyPromise=n.lazyFn().then(s=>{const{id:r,...o}=s.options;Object.assign(n.options,o)}):n._lazyPromise=Promise.resolve()),n._componentsPromise===void 0&&(n._componentsPromise=n._lazyPromise.then(()=>Promise.all(ic.map(async s=>{const r=n.options[s];r!=null&&r.preload&&await r.preload()})))),n._componentsPromise),this.preloadRoute=async n=>{const s=this.buildLocation(n);let r=this.matchRoutes(s,{throwOnError:!0,preload:!0,dest:n});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)]);Hr(()=>{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:s,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(rn(c))return c.reloadDocument?void 0:await this.preloadRoute({...c,_fromLocation:s});$e(c)||console.error(c);return}},this.matchRoute=(n,s)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(r);if(s!=null&&s.pending&&this.state.status!=="pending")return!1;const c=((s==null?void 0:s.pending)===void 0?!this.state.isLoading:s.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=Ds(this.basepath,c.pathname,{...s,to:o.pathname});return!l||n.params&&!Pn(l,n.params,{partial:!0})?!1:l&&((s==null?void 0:s.includeSearch)??!0)?Pn(c.search,o.search,{partial:!0})?l:!1:l},this._handleNotFound=(n,s,{updateMatch:r=this.updateMatch}={})=>{var o;const i=this.routesById[s.routeId??""]??this.routeTree,c={};for(const u of n)c[u.routeId]=u;!i.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(i.options.notFoundComponent=this.options.defaultNotFoundComponent),gt(i.options.notFoundComponent);const l=c[i.id];gt(l,"Could not find match for route: "+i.id),r(l.id,u=>({...u,status:"notFound",error:s,isFetching:!1})),s.routerCode==="BEFORE_LOAD"&&i.parentRoute&&(s.routeId=i.parentRoute.id,this._handleNotFound(n,s,{updateMatch:r}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ed,parseSearch:t.parseSearch??Rd}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:s,matchedRoutes:r,routeParams:o}=this.getMatchedRoutes(t,n==null?void 0:n.dest);let i=!1;(s?s.path!=="/"&&o["**"]:cn(t.pathname))&&(this.options.notFoundRoute?r.push(this.options.notFoundRoute):i=!0);const c=(()=>{if(i){if(this.options.notFoundMode!=="root")for(let h=r.length-1;h>=0;h--){const m=r[h];if(m.children)return m.id}return We}})(),l=r.map(h=>{var m;let g;const v=((m=h.options.params)==null?void 0:m.parse)??h.options.parseParams;if(v)try{const b=v(o);Object.assign(o,b)}catch(b){if(g=new Od(b.message,{cause:b}),n!=null&&n.throwOnError)throw g;return g}}),u=[],d=h=>(h==null?void 0:h.id)?h.context??this.options.context??{}:this.options.context??{};return r.forEach((h,m)=>{var g,v;const b=u[m-1],[w,x,j]=(()=>{const T=(b==null?void 0:b.search)??t.search,$=(b==null?void 0:b._strictSearch)??{};try{const q=Nr(h.options.validateSearch,{...T})??{};return[{...T,...q},{...$,...q},void 0]}catch(q){let Z=q;if(q instanceof rr||(Z=new rr(q.message,{cause:q})),n!=null&&n.throwOnError)throw Z;return[T,{},Z]}})(),A=((v=(g=h.options).loaderDeps)==null?void 0:v.call(g,{search:w}))??"",H=A?JSON.stringify(A):"",{usedParams:I,interpolatedPath:E}=Ts({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),L=Ts({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+H,S=this.getMatch(L),_=this.state.matches.find(T=>T.routeId===h.id),F=_?"stay":"enter";let D;if(S)D={...S,cause:F,params:_?Ve(_.params,o):o,_strictParams:I,search:Ve(_?_.search:S.search,w),_strictSearch:x};else{const T=h.options.loader||h.options.beforeLoad||h.lazyFn||Ld(h)?"pending":"success";D={id:L,index:m,routeId:h.id,params:_?Ve(_.params,o):o,_strictParams:I,pathname:wt([this.basepath,E]),updatedAt:Date.now(),search:_?Ve(_.search,w):w,_strictSearch:x,searchError:void 0,status:T,isFetching:!1,error:void 0,paramsError:l[m],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:_?Ve(_.loaderDeps,A):A,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},loadPromise:_n(),fullPath:h.fullPath}}n!=null&&n.preload||(D.globalNotFound=c===h.id),D.searchError=j;const N=d(b);D.context={...N,...D.__routeContext,...D.__beforeLoadContext},u.push(D)}),u.forEach((h,m)=>{var g,v,b,w,x,j,A,H;const I=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&(n==null?void 0:n._buildLocation)!==!0){const L=u[m-1],S=d(L),_={deps:h.loaderDeps,params:h.params,context:S,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:u};h.__routeContext=((v=(g=I.options).context)==null?void 0:v.call(g,_))??{},h.context={...S,...h.__routeContext,...h.__beforeLoadContext}}if(h.status==="success"){h.headers=(w=(b=I.options).headers)==null?void 0:w.call(b,{loaderData:h.loaderData});const L={matches:u,match:h,params:h.params,loaderData:h.loaderData},S=(j=(x=I.options).head)==null?void 0:j.call(x,L);h.links=S==null?void 0:S.links,h.headScripts=S==null?void 0:S.scripts,h.meta=S==null?void 0:S.meta,h.scripts=(H=(A=I.options).scripts)==null?void 0:H.call(A,L)}}),u}}class rr extends Error{}class Od extends Error{}function Hd(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 n=e["~standard"].validate(t);if(n instanceof Promise)throw new rr("Async validation not supported");if(n.issues)throw new rr(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const ic=["component","errorComponent","pendingComponent","notFoundComponent"];function Ld(e){var t;for(const n of ic)if((t=e.options[n])!=null&&t.preload)return!0;return!1}const Id="Error preloading route! ☝️";class oc{constructor(t){if(this.init=n=>{var s,r;this.originalIndex=n.originalIndex;const o=this.options,i=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(r=(s=this.options).getParentRoute)==null?void 0:r.call(s),i)this._path=We;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let c=i?We:o==null?void 0:o.path;c&&c!=="/"&&(c=qi(c));const l=(o==null?void 0:o.id)||c;let u=i?We:wt([this.parentRoute.id===We?"":this.parentRoute.id,l]);c===We&&(c="/"),u!==We&&(u=wt(["/",u]));const d=u===We?"/":wt([this.parentRoute.fullPath,c]);this._path=c,this._id=u,this._fullPath=d,this._to=d,this._ssr=(o==null?void 0:o.ssr)??n.defaultSsr??!0},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,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 Nd extends oc{constructor(t){super(t)}}function Bi(e){const t=e.errorComponent??vr;return a.jsx(Fd,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:s})=>n?p.createElement(t,{error:n,reset:s}):e.children})}class Fd 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,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function vr({error:e}){const[t,n]=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:()=>n(s=>!s),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 Fr={exports:{}},Tr={},Dr={exports:{}},Vr={};/**
|
|
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 Io;function Td(){if(Io)return Vr;Io=1;var e=Pa();function t(h,m){return h===m&&(h!==0||1/h===1/m)||h!==h&&m!==m}var n=typeof Object.is=="function"?Object.is:t,s=e.useState,r=e.useEffect,o=e.useLayoutEffect,i=e.useDebugValue;function c(h,m){var g=m(),v=s({inst:{value:g,getSnapshot:m}}),b=v[0].inst,w=v[1];return o(function(){b.value=g,b.getSnapshot=m,l(b)&&w({inst:b})},[h,g,m]),r(function(){return l(b)&&w({inst:b}),h(function(){l(b)&&w({inst:b})})},[h]),i(g),g}function l(h){var m=h.getSnapshot;h=h.value;try{var g=m();return!n(h,g)}catch{return!0}}function u(h,m){return m()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return Vr.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Vr}var No;function Dd(){return No||(No=1,Dr.exports=Td()),Dr.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 Fo;function Vd(){if(Fo)return Tr;Fo=1;var e=Pa(),t=Dd();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var s=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,o=e.useRef,i=e.useEffect,c=e.useMemo,l=e.useDebugValue;return Tr.useSyncExternalStoreWithSelector=function(u,d,h,m,g){var v=o(null);if(v.current===null){var b={hasValue:!1,value:null};v.current=b}else b=v.current;v=c(function(){function x(E){if(!j){if(j=!0,A=E,E=m(E),g!==void 0&&b.hasValue){var L=b.value;if(g(L,E))return H=L}return H=E}if(L=H,s(A,E))return L;var S=m(E);return g!==void 0&&g(L,S)?(A=E,L):(A=E,H=S)}var j=!1,A,H,I=h===void 0?null:h;return[function(){return x(d())},I===null?void 0:function(){return x(I())}]},[d,h,m,g]);var w=r(u,v[0],v[1]);return i(function(){b.hasValue=!0,b.value=w},[w]),l(w),w},Tr}var To;function Zd(){return To||(To=1,Fr.exports=Vd()),Fr.exports}var Ud=Zd();function $d(e,t=n=>n){return Ud.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,qd)}function qd(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[s,r]of e)if(!t.has(s)||!Object.is(r,t.get(s)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let s=0;s<n.length;s++)if(!Object.prototype.hasOwnProperty.call(t,n[s])||!Object.is(e[n[s]],t[n[s]]))return!1;return!0}const Zr=p.createContext(null);function ac(){return typeof document>"u"?Zr:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Zr,Zr)}function Be(e){const t=p.useContext(ac());return e==null||e.warn,t}function ve(e){const t=Be({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,s=p.useRef(void 0);return $d(n.__store,r=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=Ve(s.current,e.select(r));return s.current=o,o}return e.select(r)}return r})}const yr=p.createContext(void 0),Bd=p.createContext(void 0);function Wt(e){const t=p.useContext(e.from?Bd:yr);return ve({select:s=>{const r=s.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(gt(!((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 cc(e){return Wt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function lc(e){const{select:t,...n}=e;return Wt({...n,select:s=>t?t(s.loaderDeps):s.loaderDeps})}function uc(e){return Wt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function dc(e){return Wt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function hc(e){const{navigate:t}=Be();return p.useCallback(n=>t({from:e==null?void 0:e.from,...n}),[e==null?void 0:e.from,t])}let zd=class extends oc{constructor(t){super(t),this.useMatch=n=>Wt({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Wt({...n,from:this.id,select:s=>n!=null&&n.select?n.select(s.context):s.context}),this.useSearch=n=>dc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>uc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>lc({...n,from:this.id}),this.useLoaderData=n=>cc({...n,from:this.id}),this.useNavigate=()=>hc({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Ai(e){return new zd(e)}let Kd=class extends Nd{constructor(t){super(t),this.useMatch=n=>Wt({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Wt({...n,from:this.id,select:s=>n!=null&&n.select?n.select(s.context):s.context}),this.useSearch=n=>dc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>uc({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>lc({...n,from:this.id}),this.useLoaderData=n=>cc({...n,from:this.id}),this.useNavigate=()=>hc({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Wd(e){return new Kd(e)}function Qd(e){const t=ve({select:n=>`not-found-${n.location.pathname}-${n.status}`});return a.jsx(Bi,{getResetKey:()=>t,onCatch:(n,s)=>{var r;if($e(n))(r=e.onCatch)==null||r.call(e,n,s);else throw n},errorComponent:({error:n})=>{var s;if($e(n))return(s=e.fallback)==null?void 0:s.call(e,n);throw n},children:e.children})}function Gd(){return a.jsx("p",{children:"Not Found"})}function Ws(e){return a.jsx(a.Fragment,{children:e.children})}function fc(e,t,n){return t.options.notFoundComponent?a.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?a.jsx(e.options.defaultNotFoundComponent,{data:n}):a.jsx(Gd,{})}var Ur,Do;function Jd(){if(Do)return Ur;Do=1;const e={},t=e.hasOwnProperty,n=(S,_)=>{for(const F in S)t.call(S,F)&&_(F,S[F])},s=(S,_)=>(_&&n(_,(F,D)=>{S[F]=D}),S),r=(S,_)=>{const F=S.length;let D=-1;for(;++D<F;)_(S[D])},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),d=S=>c.call(S)=="[object Object]",h=S=>typeof S=="string"||c.call(S)=="[object String]",m=S=>typeof S=="number"||c.call(S)=="[object Number]",g=S=>typeof S=="bigint",v=S=>typeof S=="function",b=S=>c.call(S)=="[object Map]",w=S=>c.call(S)=="[object Set]",x={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},j=/[\\\b\f\n\r\t]/,A=/[0-9]/,H=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,I=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,E=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,L=(S,_)=>{const F=()=>{B=Z,++_.indentLevel,Z=_.indent.repeat(_.indentLevel)},D={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},N=_&&_.json;N&&(D.quotes="double",D.wrap=!0),_=s(D,_),_.quotes!="single"&&_.quotes!="double"&&_.quotes!="backtick"&&(_.quotes="single");const T=_.quotes=="double"?'"':_.quotes=="backtick"?"`":"'",$=_.compact,q=_.lowercaseHex;let Z=_.indent.repeat(_.indentLevel),B="";const z=_.__inline1__,G=_.__inline2__,X=$?"":`
|
|
18
|
+
`;let J,ye=!0;const te=_.numbers=="binary",ne=_.numbers=="octal",oe=_.numbers=="decimal",ae=_.numbers=="hexadecimal";if(N&&S&&v(S.toJSON)&&(S=S.toJSON()),!h(S)){if(b(S))return S.size==0?"new Map()":($||(_.__inline1__=!0,_.__inline2__=!1),"new Map("+L(Array.from(S),_)+")");if(w(S))return S.size==0?"new Set()":"new Set("+L(Array.from(S),_)+")";if(u(S))return S.length==0?"Buffer.from([])":"Buffer.from("+L(Array.from(S),_)+")";if(l(S))return J=[],_.wrap=!0,z&&(_.__inline1__=!1,_.__inline2__=!0),G||F(),r(S,Y=>{ye=!1,G&&(_.__inline2__=!1),J.push(($||G?"":Z)+L(Y,_))}),ye?"[]":G?"["+J.join(", ")+"]":"["+X+J.join(","+X)+X+($?"":B)+"]";if(m(S)||g(S)){if(N)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):ne&&(Y="0o"+S.toString(8));return g(S)?Y+"n":Y}else return g(S)?N?JSON.stringify(Number(S)):S+"n":d(S)?(J=[],_.wrap=!0,F(),n(S,(Y,ie)=>{ye=!1,J.push(($?"":Z)+L(Y,_)+":"+($?"":" ")+L(ie,_))}),ye?"{}":"{"+X+J.join(","+X)+X+($?"":B)+"}"):N?JSON.stringify(S)||"null":String(S)}const ce=_.escapeEverything?I:E;return J=S.replace(ce,(Y,ie,Xe,Te,et,De)=>{if(ie){if(_.minimal)return ie;const he=ie.charCodeAt(0),be=ie.charCodeAt(1);if(_.es6){const pe=(he-55296)*1024+be-56320+65536;return"\\u{"+i(pe,q)+"}"}return o(i(he,q))+o(i(be,q))}if(Xe)return o(i(Xe.charCodeAt(0),q));if(Y=="\0"&&!N&&!A.test(De.charAt(et+1)))return"\\0";if(Te)return Te==T||_.escapeEverything?"\\"+Te:Te;if(j.test(Y))return x[Y];if(_.minimal&&!H.test(Y))return Y;const Me=i(Y.charCodeAt(0),q);return N||Me.length>2?o(Me):"\\x"+("00"+Me).slice(-2)}),T=="`"&&(J=J.replace(/\$\{/g,"\\${")),_.isScriptContext&&(J=J.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,N?"\\u003C!--":"\\x3C!--")),_.wrap&&(J=T+J+T),J};return L.version="3.0.2",Ur=L,Ur}Jd();function Yd({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 Xd(){const e=Be(),n=(e.options.getScrollRestorationKey||Ci)(e.latestLocation),s=n!==Ci(e.latestLocation)?n:null;return!e.isScrollRestoring||!e.isServer?null:a.jsx(Yd,{children:`(${rc.toString()})(${JSON.stringify(nr)},${JSON.stringify(s)}, undefined, true)`,log:!1})}const pc=p.memo(function({matchId:t}){var n,s;const r=Be(),o=ve({select:x=>{var j;return(j=x.matches.find(A=>A.id===t))==null?void 0:j.routeId}});gt(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,d=i.options.onCatch??r.options.defaultOnCatch,h=i.isRoot?i.options.notFoundComponent??((n=r.options.notFoundRoute)==null?void 0:n.options.component):i.options.notFoundComponent,m=(!i.isRoot||i.options.wrapInSuspense)&&(i.options.wrapInSuspense??c??((s=i.options.errorComponent)==null?void 0:s.preload))?p.Suspense:Ws,g=u?Bi:Ws,v=h?Qd:Ws,b=ve({select:x=>x.loadedAt}),w=ve({select:x=>{var j;const A=x.matches.findIndex(H=>H.id===t);return(j=x.matches[A-1])==null?void 0:j.routeId}});return a.jsxs(a.Fragment,{children:[a.jsx(yr.Provider,{value:t,children:a.jsx(m,{fallback:l,children:a.jsx(g,{getResetKey:()=>b,errorComponent:u||vr,onCatch:(x,j)=>{if($e(x))throw x;d==null||d(x,j)},children:a.jsx(v,{fallback:x=>{if(!h||x.routeId&&x.routeId!==o||!x.routeId&&!i.isRoot)throw x;return p.createElement(h,x)},children:a.jsx(th,{matchId:t})})})})}),w===We&&r.options.scrollRestoration?a.jsxs(a.Fragment,{children:[a.jsx(eh,{}),a.jsx(Xd,{})]}):null]})});function eh(){var e;const t=Be(),n=p.useRef(void 0);return a.jsx("script",{suppressHydrationWarning:!0,ref:s=>{var r;s&&(n.current===void 0||n.current.href!==((r=t.state.resolvedLocation)==null?void 0:r.href))&&(t.emit({type:"onRendered",...kn(t.state)}),n.current=t.state.resolvedLocation)}},(e=t.state.resolvedLocation)==null?void 0:e.state.key)}const th=p.memo(function({matchId:t}){var n,s,r;const o=Be(),{match:i,key:c,routeId:l}=ve({select:m=>{const g=m.matches.findIndex(A=>A.id===t),v=m.matches[g],b=v.routeId,w=o.routesById[b].options.remountDeps??o.options.defaultRemountDeps,x=w==null?void 0:w({routeId:b,loaderDeps:v.loaderDeps,params:v._strictParams,search:v._strictSearch});return{key:x?JSON.stringify(x):void 0,routeId:b,match:ji(v,["id","status","error"])}},structuralSharing:!0}),u=o.routesById[l],d=p.useMemo(()=>{const m=u.options.component??o.options.defaultComponent;return m?a.jsx(m,{},c):a.jsx(zi,{})},[c,u.options.component,o.options.defaultComponent]),h=(u.options.errorComponent??o.options.defaultErrorComponent)||vr;if(i.status==="notFound")return gt($e(i.error)),fc(o,u,i.error);if(i.status==="redirected")throw gt(rn(i.error)),(n=o.getMatch(i.id))==null?void 0:n.loadPromise;if(i.status==="error"){if(o.isServer)return a.jsx(h,{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&&!((s=o.getMatch(i.id))!=null&&s.minPendingPromise)&&!o.isServer){const g=_n();Promise.resolve().then(()=>{o.updateMatch(i.id,v=>({...v,minPendingPromise:g}))}),setTimeout(()=>{g.resolve(),o.updateMatch(i.id,v=>({...v,minPendingPromise:void 0}))},m)}throw(r=o.getMatch(i.id))==null?void 0:r.loadPromise}return d}),zi=p.memo(function(){const t=Be(),n=p.useContext(yr),s=ve({select:u=>{var d;return(d=u.matches.find(h=>h.id===n))==null?void 0:d.routeId}}),r=t.routesById[s],o=ve({select:u=>{const h=u.matches.find(m=>m.id===n);return gt(h),h.globalNotFound}}),i=ve({select:u=>{var d;const h=u.matches,m=h.findIndex(g=>g.id===n);return(d=h[m+1])==null?void 0:d.id}});if(o)return fc(t,r,void 0);if(!i)return null;const c=a.jsx(pc,{matchId:i}),l=t.options.defaultPendingComponent?a.jsx(t.options.defaultPendingComponent,{}):null;return n===We?a.jsx(p.Suspense,{fallback:l,children:c}):c}),ms=typeof window<"u"?p.useLayoutEffect:p.useEffect;function $r(e){const t=p.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function nh(e,t,n={},s={}){const r=p.useRef(typeof IntersectionObserver=="function"),o=p.useRef(null);return p.useEffect(()=>{if(!(!e.current||!r.current||s.disabled))return o.current=new IntersectionObserver(([i])=>{t(i)},n),o.current.observe(e.current),()=>{var i;(i=o.current)==null||i.disconnect()}},[t,n,s.disabled,e]),o.current}function sh(e){const t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}function rh(){const e=Be(),t=p.useRef({router:e,mounted:!1}),n=ve({select:({isLoading:h})=>h}),[s,r]=p.useState(!1),o=ve({select:h=>h.matches.some(m=>m.status==="pending"),structuralSharing:!0}),i=$r(n),c=n||s||o,l=$r(c),u=n||o,d=$r(u);return e.isServer||(e.startTransition=h=>{r(!0),p.startTransition(()=>{h(),r(!1)})}),p.useEffect(()=>{const h=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return cn(e.latestLocation.href)!==cn(m.href)&&e.commitLocation({...m,replace:!0}),()=>{h()}},[e,e.history]),ms(()=>{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]),ms(()=>{i&&!n&&e.emit({type:"onLoad",...kn(e.state)})},[i,e,n]),ms(()=>{d&&!u&&e.emit({type:"onBeforeRouteMount",...kn(e.state)})},[u,d,e]),ms(()=>{l&&!c&&(e.emit({type:"onResolved",...kn(e.state)}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),jd(e))},[c,l,e]),null}function ih(){const e=Be(),t=e.options.defaultPendingComponent?a.jsx(e.options.defaultPendingComponent,{}):null,n=e.isServer||typeof document<"u"&&e.clientSsr?Ws:p.Suspense,s=a.jsxs(n,{fallback:t,children:[a.jsx(rh,{}),a.jsx(oh,{})]});return e.options.InnerWrap?a.jsx(e.options.InnerWrap,{children:s}):s}function oh(){const e=ve({select:n=>{var s;return(s=n.matches[0])==null?void 0:s.id}}),t=ve({select:n=>n.loadedAt});return a.jsx(yr.Provider,{value:e,children:a.jsx(Bi,{getResetKey:()=>t,errorComponent:vr,onCatch:n=>{n.message||n.toString()},children:e?a.jsx(pc,{matchId:e}):null})})}function ah(e){return ve({select:t=>{const n=t.matches;return e!=null&&e.select?e.select(n):n},structuralSharing:e==null?void 0:e.structuralSharing})}function ch(e,t){const n=Be(),[s,r]=p.useState(!1),o=p.useRef(!1),i=sh(t),{activeProps:c=()=>({className:"active"}),inactiveProps:l=()=>({}),activeOptions:u,to:d,preload:h,preloadDelay:m,hashScrollIntoView:g,replace:v,startTransition:b,resetScroll:w,viewTransition:x,children:j,target:A,disabled:H,style:I,className:E,onClick:L,onFocus:S,onMouseEnter:_,onMouseLeave:F,onTouchStart:D,ignoreBlocker:N,...T}=e,{params:$,search:q,hash:Z,state:B,mask:z,reloadDocument:G,...X}=T,J=p.useMemo(()=>{try{return new URL(`${d}`),"external"}catch{}return"internal"},[d]),ye=ve({select:se=>se.location.search,structuralSharing:!0}),te=ah({select:se=>{var le;return e.from??((le=se[se.length-1])==null?void 0:le.fullPath)}}),ne=p.useMemo(()=>({...e,from:te}),[e,te]),oe=p.useMemo(()=>n.buildLocation(ne),[n,ne,ye]),ae=p.useMemo(()=>ne.reloadDocument?!1:h??n.options.defaultPreload,[n.options.defaultPreload,h,ne.reloadDocument]),ce=m??n.options.defaultPreloadDelay??0,Y=ve({select:se=>{if(u!=null&&u.exact){if(!vd(se.location.pathname,oe.pathname,n.basepath))return!1}else{const le=er(se.location.pathname,n.basepath).split("/");if(!er(oe.pathname,n.basepath).split("/").every((Nl,Fl)=>Nl===le[Fl]))return!1}return((u==null?void 0:u.includeSearch)??!0)&&!Pn(se.location.search,oe.search,{partial:!(u!=null&&u.exact),ignoreUndefined:!(u!=null&&u.explicitUndefined)})?!1:u!=null&&u.includeHash?se.location.hash===oe.hash:!0}}),ie=p.useCallback(()=>{n.preloadRoute(ne).catch(se=>{console.warn(se),console.warn(Id)})},[ne,n]),Xe=p.useCallback(se=>{se!=null&&se.isIntersecting&&ie()},[ie]);if(nh(i,Xe,{rootMargin:"100px"},{disabled:!!H||ae!=="viewport"}),ms(()=>{o.current||!H&&ae==="render"&&(ie(),o.current=!0)},[H,ie,ae]),J==="external")return{...X,ref:i,type:J,href:d,...j&&{children:j},...A&&{target:A},...H&&{disabled:H},...I&&{style:I},...E&&{className:E},...L&&{onClick:L},...S&&{onFocus:S},..._&&{onMouseEnter:_},...F&&{onMouseLeave:F},...D&&{onTouchStart:D}};const Te=se=>{if(!H&&!lh(se)&&!se.defaultPrevented&&(!A||A==="_self")&&se.button===0){se.preventDefault(),Ma.flushSync(()=>{r(!0)});const le=n.subscribe("onResolved",()=>{le(),r(!1)});return n.navigate({...ne,replace:v,resetScroll:w,hashScrollIntoView:g,startTransition:b,viewTransition:x,ignoreBlocker:N})}},et=se=>{H||ae&&ie()},De=et,Me=se=>{if(H)return;const le=se.target||{};if(ae){if(le.preloadTimeout)return;le.preloadTimeout=setTimeout(()=>{le.preloadTimeout=null,ie()},ce)}},he=se=>{if(H)return;const le=se.target||{};le.preloadTimeout&&(clearTimeout(le.preloadTimeout),le.preloadTimeout=null)},be=se=>le=>{var tn;(tn=le.persist)==null||tn.call(le),se.filter(Boolean).forEach(yo=>{le.defaultPrevented||yo(le)})},pe=Y?an(c,{})??{}:{},Pt=Y?{}:an(l,{}),dt=[E,pe.className,Pt.className].filter(Boolean).join(" "),Ls={...I,...pe.style,...Pt.style};return{...X,...pe,...Pt,href:H?void 0:oe.maskedLocation?n.history.createHref(oe.maskedLocation.href):n.history.createHref(oe.href),ref:i,onClick:be([L,Te]),onFocus:be([S,et]),onMouseEnter:be([_,Me]),onMouseLeave:be([F,he]),onTouchStart:be([D,De]),disabled:!!H,target:A,...Object.keys(Ls).length&&{style:Ls},...dt&&{className:dt},...H&&{role:"link","aria-disabled":!0},...Y&&{"data-status":"active","aria-current":"page"},...s&&{"data-transitioning":"transitioning"}}}const ir=p.forwardRef((e,t)=>{const{_asChild:n,...s}=e,{type:r,ref:o,...i}=ch(s,t),c=typeof s.children=="function"?s.children({isActive:i["data-status"]==="active"}):s.children;return typeof n>"u"&&delete i.disabled,p.createElement(n||"a",{...i,ref:o},c)});function lh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const uh=e=>new dh(e);class dh extends Md{constructor(t){super(t)}}function hh({router:e,children:t,...n}){e.update({...e.options,...n,context:{...e.options.context,...n.context}});const s=ac(),r=a.jsx(s.Provider,{value:e,children:t});return e.options.Wrap?a.jsx(e.options.Wrap,{children:r}):r}function fh({router:e,...t}){return a.jsx(hh,{router:e,...t,children:a.jsx(ih,{})})}const ph=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"}))]]),mh=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"}))]]),gh=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"}))]]),vh=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"}))]]),yh=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"}))]]),bh=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"}))]]),wh=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"}))]]),xh=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"}))]]),_h=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),p.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),mc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:ph}));mc.displayName="ArrowLeftIcon";const gc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:mh}));gc.displayName="CopyIcon";const vc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:gh}));vc.displayName="DevicesIcon";const yc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:vh}));yc.displayName="GlobeIcon";const bc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:yh}));bc.displayName="HouseSimpleIcon";const wc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:bh}));wc.displayName="LockIcon";const xc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:wh}));xc.displayName="PaintBucketIcon";const _c=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:xh}));_c.displayName="ShieldWarningIcon";const Sc=p.forwardRef((e,t)=>p.createElement(Et,{ref:t,...e,weights:_h}));Sc.displayName="TrashIcon";function Sh(){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"],Qt=Math.min,Oe=Math.max,or=Math.round,Vs=Math.floor,at=e=>({x:e,y:e}),Ch={left:"right",right:"left",bottom:"top",top:"bottom"},Ah={start:"end",end:"start"};function Ri(e,t,n){return Oe(e,Qt(t,n))}function Ct(e,t){return typeof e=="function"?e(t):e}function At(e){return e.split("-")[0]}function ns(e){return e.split("-")[1]}function Ki(e){return e==="x"?"y":"x"}function Wi(e){return e==="y"?"height":"width"}function Gt(e){return["top","bottom"].includes(At(e))?"y":"x"}function Qi(e){return Ki(Gt(e))}function Rh(e,t,n){n===void 0&&(n=!1);const s=ns(e),r=Qi(e),o=Wi(r);let i=r==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ar(i)),[i,ar(i)]}function Eh(e){const t=ar(e);return[Ei(e),t,Ei(t)]}function Ei(e){return e.replace(/start|end/g,t=>Ah[t])}function Ph(e,t,n){const s=["left","right"],r=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?r:s:t?s:r;case"left":case"right":return t?o:i;default:return[]}}function kh(e,t,n,s){const r=ns(e);let o=Ph(At(e),n==="start",s);return r&&(o=o.map(i=>i+"-"+r),t&&(o=o.concat(o.map(Ei)))),o}function ar(e){return e.replace(/left|right|bottom|top/g,t=>Ch[t])}function Mh(e){return{top:0,right:0,bottom:0,left:0,...e}}function jc(e){return typeof e!="number"?Mh(e):{top:e,right:e,bottom:e,left:e}}function cr(e){const{x:t,y:n,width:s,height:r}=e;return{width:s,height:r,top:n,left:t,right:t+s,bottom:n+r,x:t,y:n}}function Vo(e,t,n){let{reference:s,floating:r}=e;const o=Gt(t),i=Qi(t),c=Wi(i),l=At(t),u=o==="y",d=s.x+s.width/2-r.width/2,h=s.y+s.height/2-r.height/2,m=s[c]/2-r[c]/2;let g;switch(l){case"top":g={x:d,y:s.y-r.height};break;case"bottom":g={x:d,y:s.y+s.height};break;case"right":g={x:s.x+s.width,y:h};break;case"left":g={x:s.x-r.width,y:h};break;default:g={x:s.x,y:s.y}}switch(ns(t)){case"start":g[i]-=m*(n&&u?-1:1);break;case"end":g[i]+=m*(n&&u?-1:1);break}return g}const Oh=async(e,t,n)=>{const{placement:s="bottom",strategy:r="absolute",middleware:o=[],platform:i}=n,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:d,y:h}=Vo(u,s,l),m=s,g={},v=0;for(let b=0;b<c.length;b++){const{name:w,fn:x}=c[b],{x:j,y:A,data:H,reset:I}=await x({x:d,y:h,initialPlacement:s,placement:m,strategy:r,middlewareData:g,rects:u,platform:i,elements:{reference:e,floating:t}});d=j??d,h=A??h,g={...g,[w]:{...g[w],...H}},I&&v<=50&&(v++,typeof I=="object"&&(I.placement&&(m=I.placement),I.rects&&(u=I.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):I.rects),{x:d,y:h}=Vo(u,m,l)),b=-1)}return{x:d,y:h,placement:m,strategy:r,middlewareData:g}};async function _s(e,t){var n;t===void 0&&(t={});const{x:s,y:r,platform:o,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:m=!1,padding:g=0}=Ct(t,e),v=jc(g),w=c[m?h==="floating"?"reference":"floating":h],x=cr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(w)))==null||n?w:w.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),j=h==="floating"?{x:s,y:r,width:i.floating.width,height:i.floating.height}:i.reference,A=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),H=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},I=cr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:j,offsetParent:A,strategy:l}):j);return{top:(x.top-I.top+v.top)/H.y,bottom:(I.bottom-x.bottom+v.bottom)/H.y,left:(x.left-I.left+v.left)/H.x,right:(I.right-x.right+v.right)/H.x}}const Hh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:r,rects:o,platform:i,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Ct(e,t)||{};if(u==null)return{};const h=jc(d),m={x:n,y:s},g=Qi(r),v=Wi(g),b=await i.getDimensions(u),w=g==="y",x=w?"top":"left",j=w?"bottom":"right",A=w?"clientHeight":"clientWidth",H=o.reference[v]+o.reference[g]-m[g]-o.floating[v],I=m[g]-o.reference[g],E=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let L=E?E[A]:0;(!L||!await(i.isElement==null?void 0:i.isElement(E)))&&(L=c.floating[A]||o.floating[v]);const S=H/2-I/2,_=L/2-b[v]/2-1,F=Qt(h[x],_),D=Qt(h[j],_),N=F,T=L-b[v]-D,$=L/2-b[v]/2+S,q=Ri(N,$,T),Z=!l.arrow&&ns(r)!=null&&$!==q&&o.reference[v]/2-($<N?F:D)-b[v]/2<0,B=Z?$<N?$-N:$-T:0;return{[g]:m[g]+B,data:{[g]:q,centerOffset:$-q-B,...Z&&{alignmentOffset:B}},reset:Z}}}),Lh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:r,middlewareData:o,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:b=!0,...w}=Ct(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=At(r),j=Gt(c),A=At(c)===c,H=await(l.isRTL==null?void 0:l.isRTL(u.floating)),I=m||(A||!b?[ar(c)]:Eh(c)),E=v!=="none";!m&&E&&I.push(...kh(c,b,v,H));const L=[c,...I],S=await _s(t,w),_=[];let F=((s=o.flip)==null?void 0:s.overflows)||[];if(d&&_.push(S[x]),h){const $=Rh(r,i,H);_.push(S[$[0]],S[$[1]])}if(F=[...F,{placement:r,overflows:_}],!_.every($=>$<=0)){var D,N;const $=(((D=o.flip)==null?void 0:D.index)||0)+1,q=L[$];if(q)return{data:{index:$,overflows:F},reset:{placement:q}};let Z=(N=F.filter(B=>B.overflows[0]<=0).sort((B,z)=>B.overflows[1]-z.overflows[1])[0])==null?void 0:N.placement;if(!Z)switch(g){case"bestFit":{var T;const B=(T=F.filter(z=>{if(E){const G=Gt(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:T[0];B&&(Z=B);break}case"initialPlacement":Z=c;break}if(r!==Z)return{reset:{placement:Z}}}return{}}}};function Zo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Uo(e){return jh.some(t=>e[t]>=0)}const Ih=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...r}=Ct(e,t);switch(s){case"referenceHidden":{const o=await _s(t,{...r,elementContext:"reference"}),i=Zo(o,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Uo(i)}}}case"escaped":{const o=await _s(t,{...r,altBoundary:!0}),i=Zo(o,n.floating);return{data:{escapedOffsets:i,escaped:Uo(i)}}}default:return{}}}}};async function Nh(e,t){const{placement:n,platform:s,elements:r}=e,o=await(s.isRTL==null?void 0:s.isRTL(r.floating)),i=At(n),c=ns(n),l=Gt(n)==="y",u=["left","top"].includes(i)?-1:1,d=o&&l?-1:1,h=Ct(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:v}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof v=="number"&&(g=c==="end"?v*-1:v),l?{x:g*d,y:m*u}:{x:m*u,y:g*d}}const Fh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:r,y:o,placement:i,middlewareData:c}=t,l=await Nh(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:r+l.x,y:o+l.y,data:{...l,placement:i}}}}},Th=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:r}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:c={fn:w=>{let{x,y:j}=w;return{x,y:j}}},...l}=Ct(e,t),u={x:n,y:s},d=await _s(t,l),h=Gt(At(r)),m=Ki(h);let g=u[m],v=u[h];if(o){const w=m==="y"?"top":"left",x=m==="y"?"bottom":"right",j=g+d[w],A=g-d[x];g=Ri(j,g,A)}if(i){const w=h==="y"?"top":"left",x=h==="y"?"bottom":"right",j=v+d[w],A=v-d[x];v=Ri(j,v,A)}const b=c.fn({...t,[m]:g,[h]:v});return{...b,data:{x:b.x-n,y:b.y-s,enabled:{[m]:o,[h]:i}}}}}},Dh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:r,rects:o,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Ct(e,t),d={x:n,y:s},h=Gt(r),m=Ki(h);let g=d[m],v=d[h];const b=Ct(c,t),w=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const A=m==="y"?"height":"width",H=o.reference[m]-o.floating[A]+w.mainAxis,I=o.reference[m]+o.reference[A]-w.mainAxis;g<H?g=H:g>I&&(g=I)}if(u){var x,j;const A=m==="y"?"width":"height",H=["top","left"].includes(At(r)),I=o.reference[h]-o.floating[A]+(H&&((x=i.offset)==null?void 0:x[h])||0)+(H?0:w.crossAxis),E=o.reference[h]+o.reference[A]+(H?0:((j=i.offset)==null?void 0:j[h])||0)-(H?w.crossAxis:0);v<I?v=I:v>E&&(v=E)}return{[m]:g,[h]:v}}}},Vh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:r,rects:o,platform:i,elements:c}=t,{apply:l=()=>{},...u}=Ct(e,t),d=await _s(t,u),h=At(r),m=ns(r),g=Gt(r)==="y",{width:v,height:b}=o.floating;let w,x;h==="top"||h==="bottom"?(w=h,x=m===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(x=h,w=m==="end"?"top":"bottom");const j=b-d.top-d.bottom,A=v-d.left-d.right,H=Qt(b-d[w],j),I=Qt(v-d[x],A),E=!t.middlewareData.shift;let L=H,S=I;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(S=A),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(L=j),E&&!m){const F=Oe(d.left,0),D=Oe(d.right,0),N=Oe(d.top,0),T=Oe(d.bottom,0);g?S=v-2*(F!==0||D!==0?F+D:Oe(d.left,d.right)):L=b-2*(N!==0||T!==0?N+T:Oe(d.top,d.bottom))}await l({...t,availableWidth:S,availableHeight:L});const _=await i.getDimensions(c.floating);return v!==_.width||b!==_.height?{reset:{rects:!0}}:{}}}};function br(){return typeof window<"u"}function ss(e){return Cc(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ut(e){var t;return(t=(Cc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cc(e){return br()?e instanceof Node||e instanceof He(e).Node:!1}function Je(e){return br()?e instanceof Element||e instanceof He(e).Element:!1}function ct(e){return br()?e instanceof HTMLElement||e instanceof He(e).HTMLElement:!1}function $o(e){return!br()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof He(e).ShadowRoot}function Ms(e){const{overflow:t,overflowX:n,overflowY:s,display:r}=Ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!["inline","contents"].includes(r)}function Zh(e){return["table","td","th"].includes(ss(e))}function wr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Gi(e){const t=Ji(),n=Je(e)?Ye(e):e;return["transform","translate","scale","rotate","perspective"].some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function Uh(e){let t=Jt(e);for(;ct(t)&&!Qn(t);){if(Gi(t))return t;if(wr(t))return null;t=Jt(t)}return null}function Ji(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Qn(e){return["html","body","#document"].includes(ss(e))}function Ye(e){return He(e).getComputedStyle(e)}function xr(e){return Je(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Jt(e){if(ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$o(e)&&e.host||ut(e);return $o(t)?t.host:t}function Ac(e){const t=Jt(e);return Qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&Ms(t)?t:Ac(t)}function Ss(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Ac(e),o=r===((s=e.ownerDocument)==null?void 0:s.body),i=He(r);if(o){const c=Pi(i);return t.concat(i,i.visualViewport||[],Ms(r)?r:[],c&&n?Ss(c):[])}return t.concat(r,Ss(r,[],n))}function Pi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Rc(e){const t=Ye(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const r=ct(e),o=r?e.offsetWidth:n,i=r?e.offsetHeight:s,c=or(n)!==o||or(s)!==i;return c&&(n=o,s=i),{width:n,height:s,$:c}}function Yi(e){return Je(e)?e:e.contextElement}function Mn(e){const t=Yi(e);if(!ct(t))return at(1);const n=t.getBoundingClientRect(),{width:s,height:r,$:o}=Rc(t);let i=(o?or(n.width):n.width)/s,c=(o?or(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const $h=at(0);function Ec(e){const t=He(e);return!Ji()||!t.visualViewport?$h:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==He(e)?!1:t}function bn(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=Yi(e);let i=at(1);t&&(s?Je(s)&&(i=Mn(s)):i=Mn(e));const c=qh(o,n,s)?Ec(o):at(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,h=r.height/i.y;if(o){const m=He(o),g=s&&Je(s)?He(s):s;let v=m,b=Pi(v);for(;b&&s&&g!==v;){const w=Mn(b),x=b.getBoundingClientRect(),j=Ye(b),A=x.left+(b.clientLeft+parseFloat(j.paddingLeft))*w.x,H=x.top+(b.clientTop+parseFloat(j.paddingTop))*w.y;l*=w.x,u*=w.y,d*=w.x,h*=w.y,l+=A,u+=H,v=He(b),b=Pi(v)}}return cr({width:d,height:h,x:l,y:u})}function Xi(e,t){const n=xr(e).scrollLeft;return t?t.left+n:bn(ut(e)).left+n}function Pc(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),r=s.left+t.scrollLeft-(n?0:Xi(e,s)),o=s.top+t.scrollTop;return{x:r,y:o}}function Bh(e){let{elements:t,rect:n,offsetParent:s,strategy:r}=e;const o=r==="fixed",i=ut(s),c=t?wr(t.floating):!1;if(s===i||c&&o)return n;let l={scrollLeft:0,scrollTop:0},u=at(1);const d=at(0),h=ct(s);if((h||!h&&!o)&&((ss(s)!=="body"||Ms(i))&&(l=xr(s)),ct(s))){const g=bn(s);u=Mn(s),d.x=g.x+s.clientLeft,d.y=g.y+s.clientTop}const m=i&&!h&&!o?Pc(i,l,!0):at(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+m.x,y:n.y*u.y-l.scrollTop*u.y+d.y+m.y}}function zh(e){return Array.from(e.getClientRects())}function Kh(e){const t=ut(e),n=xr(e),s=e.ownerDocument.body,r=Oe(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=Oe(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let i=-n.scrollLeft+Xi(e);const c=-n.scrollTop;return Ye(s).direction==="rtl"&&(i+=Oe(t.clientWidth,s.clientWidth)-r),{width:r,height:o,x:i,y:c}}function Wh(e,t){const n=He(e),s=ut(e),r=n.visualViewport;let o=s.clientWidth,i=s.clientHeight,c=0,l=0;if(r){o=r.width,i=r.height;const u=Ji();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}return{width:o,height:i,x:c,y:l}}function Qh(e,t){const n=bn(e,!0,t==="fixed"),s=n.top+e.clientTop,r=n.left+e.clientLeft,o=ct(e)?Mn(e):at(1),i=e.clientWidth*o.x,c=e.clientHeight*o.y,l=r*o.x,u=s*o.y;return{width:i,height:c,x:l,y:u}}function qo(e,t,n){let s;if(t==="viewport")s=Wh(e,n);else if(t==="document")s=Kh(ut(e));else if(Je(t))s=Qh(t,n);else{const r=Ec(e);s={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return cr(s)}function kc(e,t){const n=Jt(e);return n===t||!Je(n)||Qn(n)?!1:Ye(n).position==="fixed"||kc(n,t)}function Gh(e,t){const n=t.get(e);if(n)return n;let s=Ss(e,[],!1).filter(c=>Je(c)&&ss(c)!=="body"),r=null;const o=Ye(e).position==="fixed";let i=o?Jt(e):e;for(;Je(i)&&!Qn(i);){const c=Ye(i),l=Gi(i);!l&&c.position==="fixed"&&(r=null),(o?!l&&!r:!l&&c.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Ms(i)&&!l&&kc(e,i))?s=s.filter(d=>d!==i):r=c,i=Jt(i)}return t.set(e,s),s}function Jh(e){let{element:t,boundary:n,rootBoundary:s,strategy:r}=e;const i=[...n==="clippingAncestors"?wr(t)?[]:Gh(t,this._c):[].concat(n),s],c=i[0],l=i.reduce((u,d)=>{const h=qo(t,d,r);return u.top=Oe(h.top,u.top),u.right=Qt(h.right,u.right),u.bottom=Qt(h.bottom,u.bottom),u.left=Oe(h.left,u.left),u},qo(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Yh(e){const{width:t,height:n}=Rc(e);return{width:t,height:n}}function Xh(e,t,n){const s=ct(t),r=ut(t),o=n==="fixed",i=bn(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const l=at(0);if(s||!s&&!o)if((ss(t)!=="body"||Ms(r))&&(c=xr(t)),s){const m=bn(t,!0,o,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&(l.x=Xi(r));const u=r&&!s&&!o?Pc(r,c):at(0),d=i.left+c.scrollLeft-l.x-u.x,h=i.top+c.scrollTop-l.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function qr(e){return Ye(e).position==="static"}function Bo(e,t){if(!ct(e)||Ye(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ut(e)===n&&(n=n.ownerDocument.body),n}function Mc(e,t){const n=He(e);if(wr(e))return n;if(!ct(e)){let r=Jt(e);for(;r&&!Qn(r);){if(Je(r)&&!qr(r))return r;r=Jt(r)}return n}let s=Bo(e,t);for(;s&&Zh(s)&&qr(s);)s=Bo(s,t);return s&&Qn(s)&&qr(s)&&!Gi(s)?n:s||Uh(e)||n}const ef=async function(e){const t=this.getOffsetParent||Mc,n=this.getDimensions,s=await n(e.floating);return{reference:Xh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function tf(e){return Ye(e).direction==="rtl"}const nf={convertOffsetParentRelativeRectToViewportRelativeRect:Bh,getDocumentElement:ut,getClippingRect:Jh,getOffsetParent:Mc,getElementRects:ef,getClientRects:zh,getDimensions:Yh,getScale:Mn,isElement:Je,isRTL:tf};function Oc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function sf(e,t){let n=null,s;const r=ut(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),o();const u=e.getBoundingClientRect(),{left:d,top:h,width:m,height:g}=u;if(c||t(),!m||!g)return;const v=Vs(h),b=Vs(r.clientWidth-(d+m)),w=Vs(r.clientHeight-(h+g)),x=Vs(d),A={rootMargin:-v+"px "+-b+"px "+-w+"px "+-x+"px",threshold:Oe(0,Qt(1,l))||1};let H=!0;function I(E){const L=E[0].intersectionRatio;if(L!==l){if(!H)return i();L?i(!1,L):s=setTimeout(()=>{i(!1,1e-7)},1e3)}L===1&&!Oc(u,e.getBoundingClientRect())&&i(),H=!1}try{n=new IntersectionObserver(I,{...A,root:r.ownerDocument})}catch{n=new IntersectionObserver(I,A)}n.observe(e)}return i(!0),o}function rf(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=s,u=Yi(e),d=r||o?[...u?Ss(u):[],...Ss(t)]:[];d.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const h=u&&c?sf(u,n):null;let m=-1,g=null;i&&(g=new ResizeObserver(x=>{let[j]=x;j&&j.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var A;(A=g)==null||A.observe(t)})),n()}),u&&!l&&g.observe(u),g.observe(t));let v,b=l?bn(e):null;l&&w();function w(){const x=bn(e);b&&!Oc(b,x)&&n(),b=x,v=requestAnimationFrame(w)}return n(),()=>{var x;d.forEach(j=>{r&&j.removeEventListener("scroll",n),o&&j.removeEventListener("resize",n)}),h==null||h(),(x=g)==null||x.disconnect(),g=null,l&&cancelAnimationFrame(v)}}const of=Fh,af=Th,cf=Lh,lf=Vh,uf=Ih,zo=Hh,df=Dh,hf=(e,t,n)=>{const s=new Map,r={platform:nf,...n},o={...r.platform,_c:s};return Oh(e,t,{...r,platform:o})};var Qs=typeof document<"u"?p.useLayoutEffect:p.useEffect;function lr(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 n,s,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!lr(e[s],t[s]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,r[s]))return!1;for(s=n;s--!==0;){const o=r[s];if(!(o==="_owner"&&e.$$typeof)&&!lr(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Hc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ko(e,t){const n=Hc(e);return Math.round(t*n)/n}function Br(e){const t=p.useRef(e);return Qs(()=>{t.current=e}),t}function ff(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:r,elements:{reference:o,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=p.useState(s);lr(m,s)||g(s);const[v,b]=p.useState(null),[w,x]=p.useState(null),j=p.useCallback(z=>{z!==E.current&&(E.current=z,b(z))},[]),A=p.useCallback(z=>{z!==L.current&&(L.current=z,x(z))},[]),H=o||v,I=i||w,E=p.useRef(null),L=p.useRef(null),S=p.useRef(d),_=l!=null,F=Br(l),D=Br(r),N=Br(u),T=p.useCallback(()=>{if(!E.current||!L.current)return;const z={placement:t,strategy:n,middleware:m};D.current&&(z.platform=D.current),hf(E.current,L.current,z).then(G=>{const X={...G,isPositioned:N.current!==!1};$.current&&!lr(S.current,X)&&(S.current=X,Ma.flushSync(()=>{h(X)}))})},[m,t,n,D,N]);Qs(()=>{u===!1&&S.current.isPositioned&&(S.current.isPositioned=!1,h(z=>({...z,isPositioned:!1})))},[u]);const $=p.useRef(!1);Qs(()=>($.current=!0,()=>{$.current=!1}),[]),Qs(()=>{if(H&&(E.current=H),I&&(L.current=I),H&&I){if(F.current)return F.current(H,I,T);T()}},[H,I,T,F,_]);const q=p.useMemo(()=>({reference:E,floating:L,setReference:j,setFloating:A}),[j,A]),Z=p.useMemo(()=>({reference:H,floating:I}),[H,I]),B=p.useMemo(()=>{const z={position:n,left:0,top:0};if(!Z.floating)return z;const G=Ko(Z.floating,d.x),X=Ko(Z.floating,d.y);return c?{...z,transform:"translate("+G+"px, "+X+"px)",...Hc(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:G,top:X}},[n,c,Z.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:T,refs:q,elements:Z,floatingStyles:B}),[d,T,q,Z,B])}const pf=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:r}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?zo({element:s.current,padding:r}).fn(n):{}:s?zo({element:s,padding:r}).fn(n):{}}}},mf=(e,t)=>({...of(e),options:[e,t]}),gf=(e,t)=>({...af(e),options:[e,t]}),vf=(e,t)=>({...df(e),options:[e,t]}),yf=(e,t)=>({...cf(e),options:[e,t]}),bf=(e,t)=>({...lf(e),options:[e,t]}),wf=(e,t)=>({...uf(e),options:[e,t]}),xf=(e,t)=>({...pf(e),options:[e,t]});var _f="Arrow",Lc=p.forwardRef((e,t)=>{const{children:n,width:s=10,height:r=5,...o}=e;return a.jsx(ks.svg,{...o,ref:t,width:s,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:a.jsx("polygon",{points:"0,0 30,0 15,10"})})});Lc.displayName=_f;var Sf=Lc;function jf(e){const[t,n]=p.useState(void 0);return oi(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=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;n({width:i,height:c})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var eo="Popper",[Ic,Nc]=Oa(eo),[Cf,Fc]=Ic(eo),Tc=e=>{const{__scopePopper:t,children:n}=e,[s,r]=p.useState(null);return a.jsx(Cf,{scope:t,anchor:s,onAnchorChange:r,children:n})};Tc.displayName=eo;var Dc="PopperAnchor",Vc=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...r}=e,o=Fc(Dc,n),i=p.useRef(null),c=fr(t,i),l=p.useRef(null);return p.useEffect(()=>{const u=l.current;l.current=(s==null?void 0:s.current)||i.current,u!==l.current&&o.onAnchorChange(l.current)}),s?null:a.jsx(ks.div,{...r,ref:c})});Vc.displayName=Dc;var to="PopperContent",[Af,Rf]=Ic(to),Zc=p.forwardRef((e,t)=>{var ce,Y,ie,Xe,Te,et;const{__scopePopper:n,side:s="bottom",sideOffset:r=0,align:o="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:v,...b}=e,w=Fc(to,n),[x,j]=p.useState(null),A=fr(t,De=>j(De)),[H,I]=p.useState(null),E=jf(H),L=(E==null?void 0:E.width)??0,S=(E==null?void 0:E.height)??0,_=s+(o!=="center"?"-"+o:""),F=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},D=Array.isArray(u)?u:[u],N=D.length>0,T={padding:F,boundary:D.filter(Pf),altBoundary:N},{refs:$,floatingStyles:q,placement:Z,isPositioned:B,middlewareData:z}=ff({strategy:"fixed",placement:_,whileElementsMounted:(...De)=>rf(...De,{animationFrame:g==="always"}),elements:{reference:w.anchor},middleware:[mf({mainAxis:r+S,alignmentAxis:i}),l&&gf({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?vf():void 0,...T}),l&&yf({...T}),bf({...T,apply:({elements:De,rects:Me,availableWidth:he,availableHeight:be})=>{const{width:pe,height:Pt}=Me.reference,dt=De.floating.style;dt.setProperty("--radix-popper-available-width",`${he}px`),dt.setProperty("--radix-popper-available-height",`${be}px`),dt.setProperty("--radix-popper-anchor-width",`${pe}px`),dt.setProperty("--radix-popper-anchor-height",`${Pt}px`)}}),H&&xf({element:H,padding:c}),kf({arrowWidth:L,arrowHeight:S}),m&&wf({strategy:"referenceHidden",...T})]}),[G,X]=qc(Z),J=ql(v);oi(()=>{B&&(J==null||J())},[B,J]);const ye=(ce=z.arrow)==null?void 0:ce.x,te=(Y=z.arrow)==null?void 0:Y.y,ne=((ie=z.arrow)==null?void 0:ie.centerOffset)!==0,[oe,ae]=p.useState();return oi(()=>{x&&ae(window.getComputedStyle(x).zIndex)},[x]),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":[(Xe=z.transformOrigin)==null?void 0:Xe.x,(Te=z.transformOrigin)==null?void 0:Te.y].join(" "),...((et=z.hide)==null?void 0:et.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:a.jsx(Af,{scope:n,placedSide:G,onArrowChange:I,arrowX:ye,arrowY:te,shouldHideArrow:ne,children:a.jsx(ks.div,{"data-side":G,"data-align":X,...b,ref:A,style:{...b.style,animation:B?void 0:"none"}})})})});Zc.displayName=to;var Uc="PopperArrow",Ef={top:"bottom",right:"left",bottom:"top",left:"right"},$c=p.forwardRef(function(t,n){const{__scopePopper:s,...r}=t,o=Rf(Uc,s),i=Ef[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(Sf,{...r,ref:n,style:{...r.style,display:"block"}})})});$c.displayName=Uc;function Pf(e){return e!==null}var kf=e=>({name:"transformOrigin",options:e,fn(t){var w,x,j;const{placement:n,rects:s,middlewareData:r}=t,i=((w=r.arrow)==null?void 0:w.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,d]=qc(n),h={start:"0%",center:"50%",end:"100%"}[d],m=(((x=r.arrow)==null?void 0:x.x)??0)+c/2,g=(((j=r.arrow)==null?void 0:j.y)??0)+l/2;let v="",b="";return u==="bottom"?(v=i?h:`${m}px`,b=`${-l}px`):u==="top"?(v=i?h:`${m}px`,b=`${s.floating.height+l}px`):u==="right"?(v=`${-l}px`,b=i?h:`${g}px`):u==="left"&&(v=`${s.floating.width+l}px`,b=i?h:`${g}px`),{data:{x:v,y:b}}}});function qc(e){const[t,n="center"]=e.split("-");return[t,n]}var Mf=Tc,Bc=Vc,Of=Zc,Hf=$c,_r="Popover",[zc,Tm]=Oa(_r,[Nc]),Os=Nc(),[Lf,Yt]=zc(_r),Kc=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:r,onOpenChange:o,modal:i=!1}=e,c=Os(t),l=p.useRef(null),[u,d]=p.useState(!1),[h,m]=Bl({prop:s,defaultProp:r??!1,onChange:o,caller:_r});return a.jsx(Mf,{...c,children:a.jsx(Lf,{scope:t,contentId:zl(),triggerRef:l,open:h,onOpenChange:m,onOpenToggle:p.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:u,onCustomAnchorAdd:p.useCallback(()=>d(!0),[]),onCustomAnchorRemove:p.useCallback(()=>d(!1),[]),modal:i,children:n})})};Kc.displayName=_r;var Wc="PopoverAnchor",If=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Yt(Wc,n),o=Os(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:c}=r;return p.useEffect(()=>(i(),()=>c()),[i,c]),a.jsx(Bc,{...o,...s,ref:t})});If.displayName=Wc;var Qc="PopoverTrigger",Gc=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Yt(Qc,n),o=Os(n),i=fr(t,r.triggerRef),c=a.jsx(ks.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":nl(r.open),...s,ref:i,onClick:Cn(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:a.jsx(Bc,{asChild:!0,...o,children:c})});Gc.displayName=Qc;var no="PopoverPortal",[Nf,Ff]=zc(no,{forceMount:void 0}),Jc=e=>{const{__scopePopover:t,forceMount:n,children:s,container:r}=e,o=Yt(no,t);return a.jsx(Nf,{scope:t,forceMount:n,children:a.jsx(Ha,{present:n||o.open,children:a.jsx(Kl,{asChild:!0,container:r,children:s})})})};Jc.displayName=no;var Gn="PopoverContent",Yc=p.forwardRef((e,t)=>{const n=Ff(Gn,e.__scopePopover),{forceMount:s=n.forceMount,...r}=e,o=Yt(Gn,e.__scopePopover);return a.jsx(Ha,{present:s||o.open,children:o.modal?a.jsx(Df,{...r,ref:t}):a.jsx(Vf,{...r,ref:t})})});Yc.displayName=Gn;var Tf=Gl("PopoverContent.RemoveScroll"),Df=p.forwardRef((e,t)=>{const n=Yt(Gn,e.__scopePopover),s=p.useRef(null),r=fr(t,s),o=p.useRef(!1);return p.useEffect(()=>{const i=s.current;if(i)return Wl(i)},[]),a.jsx(Ql,{as:Tf,allowPinchZoom:!0,children:a.jsx(Xc,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Cn(e.onCloseAutoFocus,i=>{var c;i.preventDefault(),o.current||(c=n.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Cn(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:Cn(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Vf=p.forwardRef((e,t)=>{const n=Yt(Gn,e.__scopePopover),s=p.useRef(!1),r=p.useRef(!1);return a.jsx(Xc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i,c;(i=e.onCloseAutoFocus)==null||i.call(e,o),o.defaultPrevented||(s.current||(c=n.triggerRef.current)==null||c.focus(),o.preventDefault()),s.current=!1,r.current=!1},onInteractOutside:o=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(s.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),Xc=p.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:i,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...h}=e,m=Yt(Gn,n),g=Os(n);return Jl(),a.jsx(Yl,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:r,onUnmountAutoFocus:o,children:a.jsx(Xl,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:a.jsx(Of,{"data-state":nl(m.open),role:"dialog",id:m.contentId,...g,...h,ref:t,style:{...h.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)"}})})})}),el="PopoverClose",tl=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Yt(el,n);return a.jsx(ks.button,{type:"button",...s,ref:t,onClick:Cn(e.onClick,()=>r.onOpenChange(!1))})});tl.displayName=el;var Zf="PopoverArrow",Uf=p.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,r=Os(n);return a.jsx(Hf,{...r,...s,ref:t})});Uf.displayName=Zf;function nl(e){return e?"open":"closed"}var sl=Kc,rl=Gc,il=Jc,ol=Yc,$f=tl;function qf(e){const{i18n:t,_:n}=Ie(),{session:s,canSwitchAccounts:r}=eu(),{setSession:o,api:i}=Ni();return a.jsxs(sl,{children:[a.jsx(rl,{asChild:!0,children:a.jsx(je,{"aria-label":t._({id:"1D3nu5"}),shape:"circle",transparent:!0,color:"gray",...e,children:a.jsx(tu,{account:s.account,size:e.size})})}),a.jsx(il,{children:a.jsx(ol,{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(La,{account:s.account,"aria-label":t._({id:"OLYdKb"}),className:"mt-4"}),a.jsx(je,{onClick:async c=>{await i.signOut(s.account)},color:"primary",children:a.jsx(M,{id:"fcWrnU"})},"signout"),r&&a.jsx(je,{onClick:()=>o(null),children:a.jsx(M,{id:"T8poTj"})},"other"),a.jsx($f,{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(Ia,{className:"size-6","aria-hidden":!0})},"close")]})})})]})}function Bf({children:e,basePath:t,title:n,links:s,prepend:r}){const{_:o}=Ie(),{pathname:i}=ve().location,c=i===t,l=s.find(h=>h.to===i),u=l==null?void 0:l.title,d=typeof u=="object"?o(u):u;return a.jsxs(Vl,{title:n,header:a.jsx(qf,{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:s.filter(({hidden:h,to:m})=>!h||i===m).map(({to:h,title:m,description:g,icon:v})=>a.jsxs(ir,{to:h,className:Kn("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&&h===t&&"hidden md:flex"),activeOptions:{exact:!0,includeSearch:!1},activeProps:{className:"active","aria-current":"page"},children:[v&&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(v,{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})]})]},h))})}),a.jsxs("main",{className:Kn("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(ir,{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(mc,{className:"size-6"})},"back"),d&&a.jsxs("h2",{className:"text-text-default text-2xl font-light",children:[a.jsx("title",{children:d}),a.jsx("b",{children:d})]})]}),a.jsx("div",{className:"flex-auto",children:e})]})]})]})}const so=Wd({component:zi,errorComponent:Ti});function al(e){const{name:t,logo:n}=Ii();return a.jsxs("span",{...e,children:[n&&a.jsx("img",{src:n,alt:t,className:"not-prose mr-1 inline-block h-[1em] select-none object-contain align-baseline"}),a.jsx("b",{children:t})]})}function zf(){const{account:e}=lt();return a.jsxs("div",{className:"prose-sm md:prose prose-slate dark:prose-invert max-w-none",children:[a.jsx("section",{children:a.jsx(M,{id:"/y3yb7",components:{0:a.jsx("h2",{}),1:a.jsx("p",{}),2:a.jsx("strong",{})}})}),a.jsx("section",{children:a.jsx(M,{id:"SBs48I",components:{0:a.jsx("h3",{}),1:a.jsx("p",{}),2:a.jsx(qt,{className:"underline",href:"https://bsky.app"}),3:a.jsx("p",{}),4:a.jsx("p",{}),5:a.jsx("strong",{className:"whitespace-nowrap"}),6:a.jsx(nu,{account:e})}})}),a.jsx("section",{children:a.jsx(M,{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(M,{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(qt,{href:`https://bsky.app/profile/${e.handle??e.did}`}),9:a.jsx("p",{}),10:a.jsx(al,{})}})}),a.jsxs("section",{children:[a.jsx(M,{id:"7+d6kP",components:{0:a.jsx("h3",{}),1:a.jsx("p",{})}}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx(M,{id:"NS7S2h",components:{0:a.jsx(qt,{className:"underline",href:"https://bsky.social"})}})}),a.jsx("li",{children:a.jsx(M,{id:"ZWuMKu",components:{0:a.jsx(qt,{className:"underline",href:"https://atproto.com"})}})})]})]})]})}function cl(e){const{i18n:t,_:n}=Ie(),s=Kf(e),r=Wf(),o=Math.floor(s/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 Kf(e){const t=p.useMemo(()=>new Date(e),[e]),[n,s]=p.useState(()=>Date.now()-t.getTime());return p.useEffect(()=>{const r=setInterval(()=>{s(Date.now()-t.getTime())},1e3);return()=>clearInterval(r)},[t]),n}function Wf(){const[e,t]=p.useState(()=>{const n=new Date;return new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime()});return p.useEffect(()=>{const n=setInterval(()=>{const s=new Date;t(new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime())},6e4);return()=>clearInterval(n)},[]),e}function Qf({date:e}){return cl(e)}const ki=({did:e})=>["oauth-sessions",e];function Gf({did:e}){const t=Ce();return Xa({refetchOnWindowFocus:"always",queryKey:ki({did:e}),retry:0,staleTime:5e3,queryFn:async n=>await t.oauthSessions({did:e},n)})}function Jf(){const e=Ce(),t=mr(),{notify:n,notifyError:s}=Ne();return Fe({async mutationFn(r){return e.revokeOAuthSession(r)},onSuccess(r,{did:o},i){t.invalidateQueries({queryKey:ki({did:o})}),n({title:{id:"AyHABv"},duration:2e3})},onError(r,{did:o},i){t.invalidateQueries({queryKey:ki({did:o})}),s(r,{title:{id:"ginpu1"},duration:2e3})}})}const Yf="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var Ra;const Xf=((Ra=URL.canParse)==null?void 0:Ra.bind(URL))??(e=>{try{return new URL(e),!0}catch{return!1}});function ll(e){return!!(e.match(/^\d+\.\d+\.\d+\.\d+$/)||e.startsWith("[")&&e.endsWith("]"))}function ul(e){return e==="localhost"||e==="127.0.0.1"||e==="[::1]"}function e0(e){const t=e.split(".");if(t.length<2)return!0;const n=t.at(-1).toLowerCase();return n==="test"||n==="local"||n==="localhost"||n==="invalid"||n==="example"}function t0(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 n=e.indexOf("#",t),s=e.indexOf("?",t),r=s!==-1&&(n===-1||s<n)?s:-1,o=n===-1?r===-1?e.length:r:r===-1?n:Math.min(n,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 Wo=e=>{if(typeof e=="string"&&e.startsWith("{")&&e.endsWith("}"))try{return JSON.parse(e)}catch{return e}return e},n0=e=>{if(typeof e=="string"){const t=Number(e);if(!Number.isNaN(t))return t}return e},s0=(e,t)=>{if(e.length===0)throw new TypeError("Value cannot be empty");if(e.includes(" "))throw new TypeError("Value cannot contain spaces");const n=t.length,s=e.length;if(n<s)return!1;let r=t.indexOf(e),o;for(;r!==-1;){if(o=r+s,(r===0||t.charCodeAt(r-1)===32)&&(o===n||t.charCodeAt(o)===32))return!0;r=t.indexOf(e,o+1)}return!1},Sr=f.string().refine(e=>e.includes(":")&&Xf(e),{message:"Invalid URL"}),dl=Sr.superRefine((e,t)=>{if(!e.startsWith("http://"))return t.addIssue({code:ge.custom,message:'URL must use the "http:" protocol'}),!1;const n=new URL(e);return ul(n.hostname)?!0:(t.addIssue({code:ge.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),ro=Sr.superRefine((e,t)=>{if(!e.startsWith("https://"))return t.addIssue({code:ge.custom,message:'URL must use the "https:" protocol'}),!1;const n=new URL(e);if(ul(n.hostname))return t.addIssue({code:ge.custom,message:"https: URL must not use a loopback host"}),!1;if(!ll(n.hostname)){if(!n.hostname.includes("."))return t.addIssue({code:ge.custom,message:"Domain name must contain at least two segments"}),!1;if(n.hostname.endsWith(".local"))return t.addIssue({code:ge.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),de=f.string().superRefine((e,t)=>{if(e.startsWith("http://")){const n=dl.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}if(e.startsWith("https://")){const n=ro.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}return t.addIssue({code:ge.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),r0=Sr.superRefine((e,t)=>{const n=e.indexOf("."),s=e.indexOf(":");if(n===-1||s===-1||n>s)return t.addIssue({code:ge.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:ge.custom,message:"Invalid private-use URI scheme"}),!1;const i=r.protocol.slice(0,-1).split(".").reverse().join(".");return e0(i)&&t.addIssue({code:ge.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:ge.custom,message:"Private-Use URI Scheme must be in the form <scheme>:/{path} (notice the single slash!) as per RFC 8252"}),!1):!0}),i0=/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/,hl=e=>i0.test(e),io=f.string().refine(hl,{message:"Invalid OAuth scope"}),o0="atproto";function a0(e){return hl(e)&&s0(o0,e)}const c0=f.string().refine(a0,{message:"Invalid ATProto OAuth scope"}),Xt=f.string().min(1),fl=dl.superRefine((e,t)=>e.startsWith("http://localhost")?(t.addIssue({code:ge.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),l0=fl,oo=f.string().superRefine((e,t)=>{if(e.startsWith("https:")){const n=ro.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else if(e.startsWith("http:")){const n=fl.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else if(/^[^.:]+(?:\.[^.:]+)+:/.test(e)){const n=r0.safeParse(e);return n.success||n.error.issues.forEach(t.addIssue,t),n.success}else return t.addIssue({code:ge.custom,message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'}),!1}),nn="http://localhost";Xt.superRefine((e,t)=>{const n=ml(e);return n.success||t.addIssue({code:"custom",message:n.message}),n.success});function pl(e){return ml(e).success}function ml(e){if(!e.startsWith(nn))return{success:!1,message:`Value must start with "${nn}"`};if(e.includes("#",nn.length))return{success:!1,message:"Value must not contain a hash component"};const t=e.length>nn.length&&e.charCodeAt(nn.length)===47?nn.length+1:nn.length;if(e.length!==t&&e.charCodeAt(t)!==63)return{success:!1,message:"Value must not contain a path component"};const n=e.slice(t+1);return u0(n)}function u0(e){const t={},n=typeof e=="string"?new URLSearchParams(e):e;for(const[s,r]of n)if(s==="scope"){if("scope"in t)return{success:!1,message:'Duplicate "scope" query parameter'};const o=io.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(s==="redirect_uri"){const o=l0.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 "${s}"`};return{success:!0,value:t}}const d0="ERR_JWKS_NO_MATCHING_KEY",h0="ERR_JWK_INVALID",Qo="ERR_JWK_NOT_FOUND",ur="ERR_JWT_INVALID",f0="ERR_JWT_CREATE",p0="ERR_JWT_VERIFY";class Kt extends TypeError{constructor(t="JWK error",n=h0,s){super(t,s),this.code=n}}class bs extends Error{constructor(t="Unable to create JWT",n=f0,s){super(t,s),this.code=n}static from(t,n,s){return t instanceof bs?t:t instanceof Kt?new bs(s,t.code,{cause:t}):new bs(s,n,{cause:t})}}class xt extends Error{constructor(t="Invalid JWT",n=p0,s){super(t,s),this.code=n}static from(t,n,s){return t instanceof xt?t:t instanceof Kt?new xt(s,t.code,{cause:t}):new xt(s,n,{cause:t})}}class m0{constructor(t,n,s){xe(this,"name");xe(this,"prefix");xe(this,"baseEncode");this.name=t,this.prefix=n,this.baseEncode=s}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class g0{constructor(t,n,s){xe(this,"name");xe(this,"prefix");xe(this,"baseDecode");xe(this,"prefixCodePoint");this.name=t,this.prefix=n;const r=n.codePointAt(0);if(r===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=r,this.baseDecode=s}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 gl(this,t)}}class v0{constructor(t){xe(this,"decoders");this.decoders=t}or(t){return gl(this,t)}decode(t){const n=t[0],s=this.decoders[n];if(s!=null)return s.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function gl(e,t){return new v0({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class y0{constructor(t,n,s,r){xe(this,"name");xe(this,"prefix");xe(this,"baseEncode");xe(this,"baseDecode");xe(this,"encoder");xe(this,"decoder");this.name=t,this.prefix=n,this.baseEncode=s,this.baseDecode=r,this.encoder=new m0(t,n,s),this.decoder=new g0(t,n,r)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function b0({name:e,prefix:t,encode:n,decode:s}){return new y0(e,t,n,s)}function w0(e,t,n,s){let r=e.length;for(;e[r-1]==="=";)--r;const o=new Uint8Array(r*n/8|0);let i=0,c=0,l=0;for(let u=0;u<r;++u){const d=t[e[u]];if(d===void 0)throw new SyntaxError(`Non-${s} character`);c=c<<n|d,i+=n,i>=8&&(i-=8,o[l++]=255&c>>i)}if(i>=n||(255&c<<8-i)!==0)throw new SyntaxError("Unexpected end of data");return o}function x0(e,t,n){const s=t[t.length-1]==="=",r=(1<<n)-1;let o="",i=0,c=0;for(let l=0;l<e.length;++l)for(c=c<<8|e[l],i+=8;i>n;)i-=n,o+=t[r&c>>i];if(i!==0&&(o+=t[r&c<<n-i]),s)for(;(o.length*n&7)!==0;)o+="=";return o}function _0(e){const t={};for(let n=0;n<e.length;++n)t[e[n]]=n;return t}function jr({name:e,prefix:t,bitsPerChar:n,alphabet:s}){const r=_0(s);return b0({prefix:t,name:e,encode(o){return x0(o,s,n)},decode(o){return w0(o,r,n,e)}})}jr({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});jr({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});const S0=jr({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6});jr({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Go=e=>e!==void 0,j0=e=>(t,n)=>{const s=e.indexOf(t),r=e.indexOf(n);return s===r?0:s===-1?1:r===-1?-1:s-r};function C0(e){return e==null?t=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e}const Ot=(e,t)=>function(){const n=e.call(this);return Object.defineProperty(this,e.name,{get:()=>n,enumerable:!0,configurable:!0}),n},A0=new TextDecoder;function Jo(e){const t=S0.baseDecode(e),n=A0.decode(t);return JSON.parse(n)}const vl=(e,t)=>{let n;for(let s=0;s<e.length;s++)if(n=e.charCodeAt(s),!(65<=n&&n<=90||97<=n&&n<=122||48<=n&&n<=57||n===45||n===95||n===46)){const r=String.fromCodePoint(e.codePointAt(s));return t.addIssue({code:ge.custom,message:`Invalid character "${r}" in JWT at position ${s}`})}},yl=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(e|0)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const n=e*t+(e-1),s="Invalid JWT format";return(r,o)=>{if(r.length<n)return o.addIssue({code:ge.custom,message:`${s}: 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:ge.custom,message:`${s}: expected ${e} segments, got ${c+1}`}),!1;if(l-i<t)return o.addIssue({code:ge.custom,message:`${s}: segment ${c+1} is too short`}),!1;i=l+1}return r.indexOf(".",i)!==-1?(o.addIssue({code:ge.custom,message:`${s}: too many segments`}),!1):r.length-i<t?(o.addIssue({code:ge.custom,message:`${s}: last segment is too short`}),!1):!0}};function R0(e,t,n){return n.indexOf(e,t+1)===-1}const Cr=["verify","encrypt","wrapKey"];f.enum(Cr);function ao(e){return Cr.includes(e)}function co(e){return e==="verify"}function lo(e){return e==="encrypt"||e==="wrapKey"}const uo=["sign","decrypt","unwrapKey","deriveKey","deriveBits"];f.enum(uo);function E0(e){return uo.includes(e)}const P0=[...uo,...Cr],k0=f.enum(P0),Hs=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(k0).min(1,{message:"At least one key usage must be specified"}).refine(e=>e.every(R0),{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()}),M0=Hs.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()}),O0=Hs.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()}),H0=Hs.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()}),L0=Hs.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()}),I0=Hs.extend({kty:f.literal("oct"),alg:f.enum(["HS256","HS384","HS512"]).optional(),k:f.string()}),Ar=f.union([M0,O0,H0,L0,I0]).refine(e=>e.use==null||wl(e),{message:'"use" can only be used with public keys',path:["use"]}).refine(e=>{var t;return!((t=e.key_ops)!=null&&t.some(E0))||po(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(co)||e.use==="enc"&&e.key_ops.every(lo),{message:'"key_ops" must be consistent with "use"',path:["key_ops"]}),ho=Ar.refine(N0,{message:'"kid" is required',path:["kid"]}).refine(wl,{message:"private key not allowed"}).refine(e=>!e.key_ops||e.key_ops.every(ao),{message:'"key_ops" must not contain private key usage for public keys',path:["key_ops"]});Ar.refine(po,{message:"private key required"});function N0(e){return"kid"in e&&e.kid!=null}function fo(e){return"k"in e&&e.k!=null}function bl(e){return"d"in e&&e.d!=null}function po(e){return bl(e)||fo(e)}function wl(e){return!bl(e)&&!fo(e)}const{process:Zs}=globalThis;var Ea;const Yo=typeof Zs<"u"&&typeof((Ea=Zs==null?void 0:Zs.versions)==null?void 0:Ea.node)=="string";function*F0(e){if(typeof e.alg=="string"){yield e.alg;return}switch(e.kty){case"EC":{if(zr(e)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),Kr(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":Yo&&(yield"ES256K");break;default:throw new Kt(`Unsupported crv "${t}"`)}}return}case"OKP":{if(!e.use)throw new Kt('Missing "use" Parameter value');yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW";return}case"RSA":{zr(e)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",Yo&&(yield"RSA1_5")),Kr(e)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{zr(e)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),Kr(e)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new Kt(`Unsupported kty "${e.kty}"`)}}function zr(e){var t;return((t=e.key_ops)==null?void 0:t.some(lo))??(e.use==null||e.use==="enc")}function Kr(e){var t;return((t=e.key_ops)==null?void 0:t.some(co))??(e.use==null||e.use==="sig")}f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>Ar.safeParse(t)).filter(t=>t.success).map(t=>t.data))});const T0=f.object({keys:f.array(f.unknown()).transform(e=>e.map(t=>ho.safeParse(t)).filter(t=>t.success).map(t=>t.data))}),Rr=f.string().superRefine(vl).superRefine(yl(3)),D0=f.string().superRefine(vl).superRefine(yl(2)),V0=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(),Z0=f.string().superRefine((e,t)=>{try{const n=new URL(e);n.protocol!=="http:"&&n.protocol!=="https:"&&t.addIssue({code:f.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(n.username||n.password)&&t.addIssue({code:f.ZodIssueCode.custom,message:"Credentials not allowed"}),n.search&&t.addIssue({code:f.ZodIssueCode.custom,message:"Query string not allowed"}),n.hash&&t.addIssue({code:f.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{t.addIssue({code:f.ZodIssueCode.invalid_string,validation:"url"})}return e}),U0=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:Z0.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:ho.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 $0(e){const{0:t,1:n,length:s}=e.split(".");if(s>3||s<2)throw new xt(void 0,ur);const r=V0.parse(Jo(t));if(s===2&&(r==null?void 0:r.alg)!=="none")throw new xt(void 0,ur);const o=U0.parse(Jo(n));return{header:r,payload:o}}var q0=function(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0},is=function(e,t,n,s,r,o){function i(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var c=s.kind,l=c==="getter"?"get":c==="setter"?"set":"value",u=!t&&e?s.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,s.name):{}),h,m=!1,g=n.length-1;g>=0;g--){var v={};for(var b in s)v[b]=b==="access"?{}:s[b];for(var b in s.access)v.access[b]=s.access[b];v.addInitializer=function(x){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(x||null))};var w=(0,n[g])(c==="accessor"?{get:d.get,set:d.set}:d[l],v);if(c==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(h=i(w.get))&&(d.get=h),(h=i(w.set))&&(d.set=h),(h=i(w.init))&&r.unshift(h)}else(h=i(w))&&(c==="field"?r.unshift(h):d[l]=h)}u&&Object.defineProperty(u,s.name,d),m=!0};(()=>{var i;let e=[],t,n,s,r,o;return i=class{constructor(l){this.jwk=(q0(this,e),l)}get isPrivate(){return po(this.jwk)}get isSymetric(){return fo(this.jwk)}get privateJwk(){if(this.isPrivate)return this.jwk}get publicJwk(){if(this.isSymetric)return;if(!this.isPrivate)return this.jwk;const l=ho.safeParse({...this.jwk,d:void 0,k:void 0,use:void 0,key_ops:B0(this.keyOps)??Cr});if(l.success)return Object.freeze(l.data)}get bareJwk(){if(this.isSymetric)return;const{kty:l,crv:u,e:d,n:h,x:m,y:g}=this.jwk;return Object.freeze(Ar.parse({crv:u,e:d,kty:l,n:h,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(F0(this.jwk)))}get isRevoked(){return this.jwk.revoked!=null}isActive(l){var d;if(!(l!=null&&l.allowRevoked)&&this.isRevoked)return!1;const u=(l==null?void 0:l.clockTolerance)??0;if(u!==1/0){const h=((d=l==null?void 0:l.currentDate)==null?void 0:d.getTime())??Date.now(),{exp:m,nbf:g}=this.jwk;if(g!=null&&!(h>=g*1e3-u)||m!=null&&!(h<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(d=>this.algorithms.includes(d)):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"&&co(l.usage)||this.use==="enc"&&lo(l.usage))||!(this.isPrivate||ao(l.usage))))}},(()=>{const l=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[Ot],n=[Ot],s=[Ot],r=[Ot],o=[Ot],is(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),is(i,null,n,{kind:"getter",name:"isSymetric",static:!1,private:!1,access:{has:u=>"isSymetric"in u,get:u=>u.isSymetric},metadata:l},null,e),is(i,null,s,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:u=>"publicJwk"in u,get:u=>u.publicJwk},metadata:l},null,e),is(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),is(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 B0(e){if(e==null)return;const t=new Set(e.filter(ao));return e.includes("sign")&&t.add("verify"),e.includes("decrypt")&&t.add("encrypt"),e.includes("unwrapKey")&&t.add("wrapKey"),Array.from(t)}var z0=function(e,t,n){for(var s=arguments.length>2,r=0;r<t.length;r++)n=s?t[r].call(e,n):t[r].call(e);return s?n:void 0},Wr=function(e,t,n,s,r,o){function i(x){if(x!==void 0&&typeof x!="function")throw new TypeError("Function expected");return x}for(var c=s.kind,l=c==="getter"?"get":c==="setter"?"set":"value",u=!t&&e?s.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,s.name):{}),h,m=!1,g=n.length-1;g>=0;g--){var v={};for(var b in s)v[b]=b==="access"?{}:s[b];for(var b in s.access)v.access[b]=s.access[b];v.addInitializer=function(x){if(m)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(x||null))};var w=(0,n[g])(c==="accessor"?{get:d.get,set:d.set}:d[l],v);if(c==="accessor"){if(w===void 0)continue;if(w===null||typeof w!="object")throw new TypeError("Object expected");(h=i(w.get))&&(d.get=h),(h=i(w.set))&&(d.set=h),(h=i(w.init))&&r.unshift(h)}else(h=i(w))&&(c==="field"?r.unshift(h):d[l]=h)}u&&Object.defineProperty(u,s.name,d),m=!0};const K0=e=>e.privateJwk,W0=e=>e.publicJwk;(()=>{var r;let e=[],t,n,s;return r=class{constructor(i,c=i instanceof r?[...i.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){this.preferredSigningAlgorithms=(z0(this,e),c);const l=[],u=new Set;for(const d of i)if(d&&(l.push(d),d.kid)){if(u.has(d.kid))throw new Kt(`Duplicate key: ${d.kid}`);u.add(d.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,W0).filter(Go))})}get privateJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,K0).filter(Go))})}has(i){return this.keys.some(c=>c.kid===i)}get(i){const c=this.find(i);if(c)return c;throw new Kt(`Key not found ${i.kid??i.alg??i.usage??"<unknown>"}`,Qo)}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 d=[];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};d.push(g)}const h=C0(c),m=d.map(g=>[g,g.algorithms.filter(h)]);for(const g of this.preferredSigningAlgorithms)for(const[v,b]of m)if(b.includes(g))return{key:v,alg:g};for(const[g,v]of m)for(const b of v)return{key:g,alg:b};throw new Kt(`No private key found for ${i||c||l}`,Qo)}[(t=[Ot],n=[Ot],s=[Ot],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:i,kid:c,...l},u){try{const{key:d,alg:h}=this.findPrivateKey({alg:i,kid:c,usage:"sign",allowRevoked:!1}),m={...l,alg:h,kid:d.kid};return typeof u=="function"&&(u=await u(m,d)),await d.createJwt(m,u)}catch(d){throw bs.from(d)}}async verifyJwt(i,c){const{header:l}=$0(i),{kid:u,alg:d}=l,h=[];for(const m of this.list({...c,kid:u,alg:d,usage:"verify"}))try{return{...await m.verifyJwt(i,c),key:m}}catch(g){h.push(g)}switch(h.length){case 0:throw new xt("No key matched",d0);case 1:throw xt.from(h[0],ur);default:throw xt.from(h,ur)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;Wr(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),Wr(r,null,n,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:c=>"publicJwks"in c,get:c=>c.publicJwks},metadata:i},null,e),Wr(r,null,s,{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 Q0=f.object({type:f.string(),locations:f.array(Sr).optional(),actions:f.array(f.string()).optional(),datatypes:f.array(f.string()).optional(),identifier:f.string().optional(),privileges:f.array(f.string()).optional()}),xl=f.array(Q0),G0=f.union([f.string().regex(/^DPoP$/i).transform(()=>"DPoP"),f.string().regex(/^Bearer$/i).transform(()=>"Bearer")]),J0=f.object({access_token:f.string(),token_type:G0,scope:f.string().optional(),refresh_token:f.string().optional(),expires_in:f.number().optional(),id_token:Rr.optional(),authorization_details:xl.optional()}).passthrough();J0.extend({token_type:f.literal("DPoP"),sub:su,scope:c0,id_token:f.never().optional()});const Y0=f.string().min(1),X0=f.object({grant_type:f.literal("authorization_code"),code:f.string().min(1),redirect_uri:oo,code_verifier:f.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()}),_l=f.object({request:f.union([Rr,D0])}),Sl=f.enum(["S256","plain"]),jl=f.enum(["none","login","consent","select_account","create"]),ep=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"]),tp=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"]),Xo=f.union([f.string(),f.number(),f.boolean()]),np=f.object({essential:f.boolean().optional(),value:Xo.optional(),values:f.array(Xo).optional()}),sp=f.enum(["userinfo","id_token"]),Al=f.object({client_id:Xt,state:f.string().optional(),redirect_uri:oo.optional(),scope:io.optional(),response_type:Cl,code_challenge:f.string().optional(),code_challenge_method:Sl.optional(),dpop_jkt:f.string().optional(),response_mode:ep.optional(),nonce:f.string().optional(),max_age:f.preprocess(n0,f.number().int().min(0)).optional(),claims:f.preprocess(Wo,f.record(sp,f.record(tp,f.union([f.literal(null),np])))).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:Rr.optional(),display:f.enum(["page","popup","touch","wap"]).optional(),prompt:jl.optional(),authorization_details:f.preprocess(Wo,xl).optional()});f.union([Al,_l]);const rp=f.string().min(1),ip=f.object({request_uri:rp});f.intersection(f.object({client_id:Xt}),f.union([Al,_l,ip]));f.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);const Rl=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 n=new URL(e);if(n.username||n.password)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(n.hash||n.search)return t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const s=n.pathname==="/"?n.origin:n.href;return e!==s?(t.addIssue({code:f.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0}),op=f.object({issuer:Rl,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(Sl).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()});op.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 n;(n=e.token_endpoint_auth_signing_alg_values_supported)!=null&&n.includes("none")&&t.addIssue({code:f.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})});const ap=f.object({grant_type:f.literal("client_credentials")}),cp=f.object({client_id:Xt,client_assertion_type:f.literal(Yf),client_assertion:Rr}),lp=f.object({client_id:Xt,client_secret:f.string()}),up=f.object({client_id:Xt});f.union([cp,lp,up]);const dp=f.intersection(Xt,ro).superRefine((e,t)=>{const n=new URL(e);return n.username||n.password?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):n.hash?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):n.pathname==="/"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):n.pathname.endsWith("/")?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):ll(n.hostname)?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):t0(e)!==n.pathname?(t.addIssue({code:f.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${n.href}", got "${e}")`}),!1):!0}),hp=dp.superRefine((e,t)=>{const n=new URL(e);return n.port?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):n.search?(t.addIssue({code:f.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):n.pathname!=="/oauth-client-metadata.json"?(t.addIssue({code:f.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function El(e){return hp.safeParse(e).success}const fp=f.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]),pp=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(oo).nonempty(),response_types:f.array(Cl).nonempty().default(["code"]),grant_types:f.array(pp).nonempty().default(["authorization_code"]),scope:io.optional(),token_endpoint_auth_method:fp.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:T0.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:Xt.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 mp=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(Rl).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 Pl=f.string().min(1),gp=f.object({grant_type:f.literal("refresh_token"),refresh_token:Pl});f.object({token:f.union([Y0,Pl]),token_type_hint:f.enum(["access_token","refresh_token"]).optional()});f.discriminatedUnion("grant_type",[X0,gp,mp,ap]);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 vp({clientId:e}){const{i18n:t,_:n}=Ie();return pl(e)?t._({id:"u607t5"}):El(e)?new URL(e).hostname:e}function yp({clientId:e,clientMetadata:t}){const{i18n:n,_:s}=Ie();return pl(e)?n._({id:"4Yp2r7"}):t!=null&&t.client_name?t.client_name:El(e)?new URL(e).hostname:e}function bp(){const{account:e}=lt(),{did:t}=e,{data:n,isLoading:s,refetch:r}=Gf({did:t});return n?n.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(M,{id:"kx1Bq7"})}),n.map(o=>a.jsx(wp,{did:t,session:o},o.tokenId)),a.jsx("p",{className:"text-text-light mt-4 text-sm",children:a.jsx(M,{id:"SLeBc7"})})]}):a.jsx("p",{children:a.jsx(M,{id:"pWhWXw"})}):s?a.jsx(Na,{className:"text-primary",size:28}):a.jsx(bt,{role:"status",action:a.jsx(ka,{onClick:()=>r(),children:a.jsx(M,{id:"6gRgw8"})}),children:a.jsx(M,{id:"b9LiEi"})})}function wp({session:{clientId:e,clientMetadata:t,tokenId:n,createdAt:s,updatedAt:r,scope:o=t==null?void 0:t.scope},did:i}){const{i18n:c,_:l}=Ie(),{mutateAsync:u,isPending:d}=Jf(),h=vp({clientId:e}),m=yp({clientId:e,clientMetadata:t});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:m}),a.jsx("p",{className:"font-mono text-xs",children:h}),a.jsxs("p",{className:"text-text-light truncate text-xs",children:[a.jsx(M,{id:"4hPphw",values:{0:c.date(s,{year:"numeric",month:"short",day:"numeric"})}})," • ",a.jsx(M,{id:"NNWPjN",components:{0:a.jsx(Qf,{date:r})}})]})]}),a.jsx(je,{size:"sm",className:"min-w-max shrink-0 grow-0",loading:d,onClick:g=>{u({did:i,tokenId:n}).catch(v=>{console.warn("Failed to revoke OAuth session",v)})},children:a.jsx(M,{id:"Hwam5t"})})]})}const kl=({did:e})=>["account-sessions",e];function xp({did:e}){const t=Ce();return Xa({refetchOnWindowFocus:"always",staleTime:15e3,queryKey:kl({did:e}),queryFn:async({signal:n})=>t.accountSessions({did:e},{signal:n})})}function _p(){const e=Ce(),t=mr(),{notify:n,notifyError:s}=Ne();return Fe({async mutationFn(r){return e.revokeAccountSession(r)},onSuccess(r,{did:o},i){t.invalidateQueries({queryKey:kl({did:o})}),n({title:{id:"jAO4/H"}})},onError(r,o,i){s(r,{title:{id:"CiwBmN"}})}})}var Sp="2.0.3",Mi=500,ea="user-agent",Jn="",ta="?",dr="function",Bt="undefined",Yn="object",Oi="string",Ee="browser",mt="cpu",ot="device",Ge="engine",qe="os",On="result",k="name",C="type",P="vendor",O="version",Pe="architecture",js="major",R="model",gs="console",K="mobile",re="tablet",fe="smarttv",tt="wearable",Qr="xr",vs="embedded",os="inapp",mo="brands",on="formFactors",go="fullVersionList",Hn="platform",vo="platformVersion",Er="bitness",en="sec-ch-ua",jp=en+"-full-version-list",Cp=en+"-arch",Ap=en+"-"+Er,Rp=en+"-form-factors",Ep=en+"-"+K,Pp=en+"-"+R,Ml=en+"-"+Hn,kp=Ml+"-version",Ol=[mo,go,K,R,Hn,vo,Pe,on,Er],Us="Amazon",wn="Apple",na="ASUS",sa="BlackBerry",sn="Google",ra="Huawei",ia="Lenovo",oa="Honor",$s="LG",Gr="Microsoft",Jr="Motorola",Yr="Nvidia",aa="OnePlus",Xr="OPPO",as="Samsung",ca="Sharp",cs="Sony",ei="Xiaomi",ti="Zebra",la="Chrome",ua="Chromium",kt="Chromecast",Mp="Edge",ls="Firefox",us="Opera",ni="Facebook",da="Sogou",xn="Mobile ",ds=" Browser",Hi="Windows",Op=typeof window!==Bt,ke=Op&&window.navigator?window.navigator:void 0,Ht=ke&&ke.userAgentData?ke.userAgentData:void 0,Hp=function(e,t){var n={},s=t;if(!hr(t)){s={};for(var r in t)for(var o in t[r])s[o]=t[r][o].concat(s[o]?s[o]:[])}for(var i in e)n[i]=s[i]&&s[i].length%2===0?s[i].concat(e[i]):e[i];return n},Pr=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Li=function(e,t){if(typeof e===Yn&&e.length>0){for(var n in e)if(vt(e[n])==vt(t))return!0;return!1}return rs(e)?vt(t).indexOf(vt(e))!==-1:!1},hr=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||(t?hr(e[n]):!1)},rs=function(e){return typeof e===Oi},si=function(e){if(e){for(var t=[],n=Xn(/\\?\"/g,e).split(","),s=0;s<n.length;s++)if(n[s].indexOf(";")>-1){var r=Cs(n[s]).split(";v=");t[s]={brand:r[0],version:r[1]}}else t[s]=Cs(n[s]);return t}},vt=function(e){return rs(e)?e.toLowerCase():e},ri=function(e){return rs(e)?Xn(/[^\d\.]/g,e).split(".")[0]:void 0},yt=function(e){for(var t in e){var n=e[t];typeof n==Yn&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},Xn=function(e,t){return rs(t)?t.replace(e,Jn):t},hs=function(e){return Xn(/\\?\"/g,e)},Cs=function(e,t){if(rs(e))return e=Xn(/^\s\s*/,e),typeof t===Bt?e:e.substring(0,Mi)},ii=function(e,t){if(!(!e||!t))for(var n=0,s,r,o,i,c,l;n<t.length&&!c;){var u=t[n],d=t[n+1];for(s=r=0;s<u.length&&!c&&u[s];)if(c=u[s++].exec(e),c)for(o=0;o<d.length;o++)l=c[++r],i=d[o],typeof i===Yn&&i.length>0?i.length===2?typeof i[1]==dr?this[i[0]]=i[1].call(this,l):this[i[0]]=i[1]:i.length===3?typeof i[1]===dr&&!(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;n+=2}},Lt=function(e,t){for(var n in t)if(typeof t[n]===Yn&&t[n].length>0){for(var s=0;s<t[n].length;s++)if(Li(t[n][s],e))return n===ta?void 0:n}else if(Li(t[n],e))return n===ta?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},ha={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"},fa={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},pa={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[O,[k,xn+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[O,[k,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[k,O],[/opios[\/ ]+([\w\.]+)/i],[O,[k,us+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[O,[k,us+" GX"]],[/\bopr\/([\w\.]+)/i],[O,[k,us]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[O,[k,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[O,[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,O],[/quark(?:pc)?\/([-\w\.]+)/i],[O,[k,"Quark"]],[/\bddg\/([\w\.]+)/i],[O,[k,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[O,[k,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[O,[k,"WeChat"]],[/konqueror\/([\w\.]+)/i],[O,[k,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[O,[k,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[O,[k,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[O,[k,"Smart "+ia+ds]],[/(avast|avg)\/([\w\.]+)/i],[[k,/(.+)/,"$1 Secure"+ds],O],[/\bfocus\/([\w\.]+)/i],[O,[k,ls+" Focus"]],[/\bopt\/([\w\.]+)/i],[O,[k,us+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[O,[k,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[O,[k,"Dolphin"]],[/coast\/([\w\.]+)/i],[O,[k,us+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[O,[k,"MIUI"+ds]],[/fxios\/([\w\.-]+)/i],[O,[k,xn+ls]],[/\bqihoobrowser\/?([\w\.]*)/i],[O,[k,"360"]],[/\b(qq)\/([\w\.]+)/i],[[k,/(.+)/,"$1Browser"],O],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[k,/(.+)/,"$1"+ds],O],[/samsungbrowser\/([\w\.]+)/i],[O,[k,as+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[O,[k,da+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[k,da+" Mobile"],O],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[k,O],[/(lbbrowser|rekonq)/i],[k],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[O,k],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[k,ni],O,[C,os]],[/(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,O,[C,os]],[/\bgsa\/([\w\.]+) .*safari\//i],[O,[k,"GSA"],[C,os]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[O,[k,"TikTok"],[C,os]],[/\[(linkedin)app\]/i],[k,[C,os]],[/(chromium)[\/ ]([-\w\.]+)/i],[k,O],[/headlesschrome(?:\/([\w\.]+)| )/i],[O,[k,la+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[k,la+" WebView"],O],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[O,[k,"Android"+ds]],[/chrome\/([\w\.]+) mobile/i],[O,[k,xn+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[k,O],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[O,[k,xn+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[k,xn+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[O,k],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[k,[O,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[k,O],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[k,xn+ls],O],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[k,"Netscape"],O],[/(wolvic|librewolf)\/([\w\.]+)/i],[k,O],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[O,[k,ls+" 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,[O,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[k,[O,/[^\d\.]+./,Jn]]],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/,Jn,vt]],[/ 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,vt]]],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],[R,[P,as],[C,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],[R,[P,as],[C,K]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[R,[P,wn],[C,K]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[R,[P,wn],[C,re]],[/(macintosh);/i],[R,[P,wn]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[R,[P,ca],[C,K]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[R,[P,oa],[C,re]],[/honor([-\w ]+)[;\)]/i],[R,[P,oa],[C,K]],[/\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],[R,[P,ra],[C,re]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[R,[P,ra],[C,K]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[R,/_/g," "],[P,ei],[C,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],[[R,/_/g," "],[P,ei],[C,K]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[R,[P,Xr],[C,K]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[R,[P,Lt,{OnePlus:["304","403","203"],"*":Xr}],[C,re]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[R,[P,"BLU"],[C,K]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[R,[P,"Vivo"],[C,K]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[R,[P,"Realme"],[C,K]],[/\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],[R,[P,Jr],[C,K]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[R,[P,Jr],[C,re]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[R,[P,$s],[C,re]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[R,[P,$s],[C,K]],[/(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],[R,[P,ia],[C,re]],[/(nokia) (t[12][01])/i],[P,R,[C,re]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[R,/_/g," "],[C,K],[P,"Nokia"]],[/(pixel (c|tablet))\b/i],[R,[P,sn],[C,re]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[R,[P,sn],[C,K]],[/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],[R,[P,cs],[C,K]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[R,"Xperia Tablet"],[P,cs],[C,re]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[R,[P,aa],[C,K]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[R,[P,Us],[C,re]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[R,/(.+)/g,"Fire Phone $1"],[P,Us],[C,K]],[/(playbook);[-\w\),; ]+(rim)/i],[R,P,[C,re]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[R,[P,sa],[C,K]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[R,[P,na],[C,re]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[R,[P,na],[C,K]],[/(nexus 9)/i],[R,[P,"HTC"],[C,re]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[P,[R,/_/g," "],[C,K]],[/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],[R,[P,"TCL"],[C,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],[R,[P,"TCL"],[C,K]],[/(itel) ((\w+))/i],[[P,vt],R,[C,Lt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[R,[P,"Acer"],[C,re]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[R,[P,"Meizu"],[C,K]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[R,[P,"Ulefone"],[C,K]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[R,[P,"Energizer"],[C,K]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[R,[P,"Cat"],[C,K]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[R,[P,"Smartfren"],[C,K]],[/droid.+; (a(?:015|06[35]|142p?))/i],[R,[P,"Nothing"],[C,K]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[R,[P,"Archos"],[C,re]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[R,[P,"Archos"],[C,K]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[P,R,[C,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],[P,R,[C,K]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[P,R,[C,re]],[/(surface duo)/i],[R,[P,Gr],[C,re]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[R,[P,"Fairphone"],[C,K]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[R,[P,Yr],[C,re]],[/(sprint) (\w+)/i],[P,R,[C,K]],[/(kin\.[onetw]{3})/i],[[R,/\./g," "],[P,Gr],[C,K]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[R,[P,ti],[C,re]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[R,[P,ti],[C,K]],[/smart-tv.+(samsung)/i],[P,[C,fe]],[/hbbtv.+maple;(\d+)/i],[[R,/^/,"SmartTV"],[P,as],[C,fe]],[/tcast.+(lg)e?. ([-\w]+)/i],[P,R,[C,fe]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[P,$s],[C,fe]],[/(apple) ?tv/i],[P,[R,wn+" TV"],[C,fe]],[/crkey.*devicetype\/chromecast/i],[[R,kt+" Third Generation"],[P,sn],[C,fe]],[/crkey.*devicetype\/([^/]*)/i],[[R,/^/,"Chromecast "],[P,sn],[C,fe]],[/fuchsia.*crkey/i],[[R,kt+" Nest Hub"],[P,sn],[C,fe]],[/crkey/i],[[R,kt],[P,sn],[C,fe]],[/(portaltv)/i],[R,[P,ni],[C,fe]],[/droid.+aft(\w+)( bui|\))/i],[R,[P,Us],[C,fe]],[/(shield \w+ tv)/i],[R,[P,Yr],[C,fe]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[R,[P,ca],[C,fe]],[/(bravia[\w ]+)( bui|\))/i],[R,[P,cs],[C,fe]],[/(mi(tv|box)-?\w+) bui/i],[R,[P,ei],[C,fe]],[/Hbbtv.*(technisat) (.*);/i],[P,R,[C,fe]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[P,Cs],[R,Cs],[C,fe]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[R,[C,fe]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[C,fe]],[/(ouya)/i,/(nintendo) (\w+)/i],[P,R,[C,gs]],[/droid.+; (shield)( bui|\))/i],[R,[P,Yr],[C,gs]],[/(playstation \w+)/i],[R,[P,cs],[C,gs]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[R,[P,Gr],[C,gs]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[R,[P,as],[C,tt]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[P,R,[C,tt]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[R,[P,Xr],[C,tt]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[R,[P,wn],[C,tt]],[/(opwwe\d{3})/i],[R,[P,aa],[C,tt]],[/(moto 360)/i],[R,[P,Jr],[C,tt]],[/(smartwatch 3)/i],[R,[P,cs],[C,tt]],[/(g watch r)/i],[R,[P,$s],[C,tt]],[/droid.+; (wt63?0{2,3})\)/i],[R,[P,ti],[C,tt]],[/droid.+; (glass) \d/i],[R,[P,sn],[C,Qr]],[/(pico) (4|neo3(?: link|pro)?)/i],[P,R,[C,Qr]],[/(quest( \d| pro)?s?).+vr/i],[R,[P,ni],[C,Qr]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[P,[C,vs]],[/(aeobc)\b/i],[R,[P,Us],[C,vs]],[/(homepod).+mac os/i],[R,[P,wn],[C,vs]],[/windows iot/i],[[C,vs]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[R,[C,Lt,{mobile:"Mobile",xr:"VR","*":re}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[C,re]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[C,K]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[R,[P,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[O,[k,Mp+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[k,O],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[O,[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,O],[/ladybird\//i],[[k,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[O,k]],os:[[/microsoft (windows) (vista|xp)/i],[k,O],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[k,[O,Lt,ha]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[O,Lt,ha],[k,Hi]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[O,/_/g,"."],[k,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[k,"macOS"],[O,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[O,[k,kt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[O,[k,kt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[O,[k,kt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[O,[k,kt+" Linux"]],[/crkey\/([\d\.]+)/i],[O,[k,kt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[O,k],[/(ubuntu) ([\w\.]+) like android/i],[[k,/(.+)/,"$1 Touch"],O],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[k,O],[/\(bb(10);/i],[O,[k,sa]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[O,[k,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[O,[k,ls+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[O,[k,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[O,[k,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[k,"Chrome OS"],O],[/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,O],[/(sunos) ?([\w\.\d]*)/i],[[k,"Solaris"],O],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[k,O]]},qs=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return yt.call(e.init,[[Ee,[k,O,js,C]],[mt,[Pe]],[ot,[C,R,P]],[Ge,[k,O]],[qe,[k,O]]]),yt.call(e.isIgnore,[[Ee,[O,js]],[Ge,[O]],[qe,[O]]]),yt.call(e.isIgnoreRgx,[[Ee,/ ?browser$/i],[qe,/ ?os$/i]]),yt.call(e.toString,[[Ee,[k,O]],[mt,[Pe]],[ot,[P,R]],[Ge,[k,O]],[qe,[k,O]]]),e}(),Lp=function(e,t){var n=qs.init[t],s=qs.isIgnore[t]||0,r=qs.isIgnoreRgx[t]||0,o=qs.toString[t]||0;function i(){yt.call(this,n)}return i.prototype.getItem=function(){return e},i.prototype.withClientHints=function(){return Ht?Ht.getHighEntropyValues(Ol).then(function(c){return e.setCH(new Hl(c,!1)).parseCH().get()}):e.parseCH().get()},i.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=On&&(i.prototype.is=function(c){var l=!1;for(var u in this)if(this.hasOwnProperty(u)&&!Li(s,u)&&vt(r?Xn(r,this[u]):this[u])==vt(r?Xn(r,c):c)){if(l=!0,c!=Bt)break}else if(c==Bt&&l){l=!l;break}return l},i.prototype.toString=function(){var c=Jn;for(var l in o)typeof this[o[l]]!==Bt&&(c+=(c?" ":Jn)+this[o[l]]);return c||Bt}),Ht||(i.prototype.then=function(c){var l=this,u=function(){for(var h in l)l.hasOwnProperty(h)&&(this[h]=l[h])};u.prototype={is:i.prototype.is,toString:i.prototype.toString};var d=new u;return c(d),d}),new i};function Hl(e,t){if(e=e||{},yt.call(this,Ol),t)yt.call(this,[[mo,si(e[en])],[go,si(e[jp])],[K,/\?1/.test(e[Ep])],[R,hs(e[Pp])],[Hn,hs(e[Ml])],[vo,hs(e[kp])],[Pe,hs(e[Cp])],[on,si(e[Rp])],[Er,hs(e[Ap])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==Bt&&(this[n]=e[n])}function ma(e,t,n,s){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(ke&&ke.userAgent==this.ua)switch(this.itemType){case Ee:ke.brave&&typeof ke.brave.isBrave==dr&&this.set(k,"Brave");break;case ot:!this.get(C)&&Ht&&Ht[K]&&this.set(C,K),this.get(R)=="Macintosh"&&ke&&typeof ke.standalone!==Bt&&ke.maxTouchPoints&&ke.maxTouchPoints>2&&this.set(R,"iPad").set(C,re);break;case qe:!this.get(k)&&Ht&&Ht[Hn]&&this.set(k,Ht[Hn]);break;case On:var r=this.data,o=function(i){return r[i].getItem().detectFeature().get()};this.set(Ee,o(Ee)).set(mt,o(mt)).set(ot,o(ot)).set(Ge,o(Ge)).set(qe,o(qe))}return this},this.parseUA=function(){return this.itemType!=On&&ii.call(this.data,this.ua,this.rgxMap),this.itemType==Ee&&this.set(js,ri(this.get(O))),this},this.parseCH=function(){var r=this.uaCH,o=this.rgxMap;switch(this.itemType){case Ee:case Ge:var i=r[go]||r[mo],c;if(i)for(var l in i){var u=i[l].brand||i[l],d=i[l].version;this.itemType==Ee&&!/not.a.brand/i.test(u)&&(!c||/chrom/i.test(c)&&u!=ua)&&(u=Lt(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(O,d).set(js,ri(d)),c=u),this.itemType==Ge&&u==ua&&this.set(O,d)}break;case mt:var h=r[Pe];h&&(h&&r[Er]=="64"&&(h+="64"),ii.call(this.data,h+";",o));break;case ot:if(r[K]&&this.set(C,K),r[R]&&(this.set(R,r[R]),!this.get(C)||!this.get(P))){var m={};ii.call(m,"droid 9; "+r[R]+")",o),!this.get(C)&&m.type&&this.set(C,m.type),!this.get(P)&&m.vendor&&this.set(P,m.vendor)}if(r[on]){var g;if(typeof r[on]!="string")for(var v=0;!g&&v<r[on].length;)g=Lt(r[on][v++],fa);else g=Lt(r[on],fa);this.set(C,g)}break;case qe:var b=r[Hn];if(b){var w=r[vo];b==Hi&&(w=parseInt(ri(w),10)>=13?"11":"10"),this.set(k,b).set(O,w)}this.get(k)==Hi&&r[R]=="Xbox"&&this.set(k,"Xbox").set(O,void 0);break;case On:var x=this.data,j=function(A){return x[A].getItem().setCH(r).parseCH().get()};this.set(Ee,j(Ee)).set(mt,j(mt)).set(ot,j(ot)).set(Ge,j(Ge)).set(qe,j(qe))}return this},yt.call(this,[["itemType",e],["ua",t],["uaCH",s],["rgxMap",n],["data",Lp(this,e)]]),this}function Rt(e,t,n){if(typeof e===Yn?(hr(e,!0)?(typeof t===Yn&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e===Oi&&!hr(t,!0)&&(n=t,t=void 0),n&&typeof n.append===dr){var s={};n.forEach(function(l,u){s[u]=l}),n=s}if(!(this instanceof Rt))return new Rt(e,t,n).getResult();var r=typeof e===Oi?e:n&&n[ea]?n[ea]:ke&&ke.userAgent?ke.userAgent:Jn,o=new Hl(n,!0),i=t?Hp(pa,t):pa,c=function(l){return l==On?function(){return new ma(l,r,i,o).set("ua",r).set(Ee,this.getBrowser()).set(mt,this.getCPU()).set(ot,this.getDevice()).set(Ge,this.getEngine()).set(qe,this.getOS()).get()}:function(){return new ma(l,r,i[l],o).parseUA().get()}};return yt.call(this,[["getBrowser",c(Ee)],["getCPU",c(mt)],["getDevice",c(ot)],["getEngine",c(Ge)],["getOS",c(qe)],["getResult",c(On)],["getUA",function(){return r}],["setUA",function(l){return rs(l)&&(r=l.length>Mi?Cs(l,Mi):l),this}]]).setUA(r),this}Rt.VERSION=Sp;Rt.BROWSER=Pr([k,O,js,C]);Rt.CPU=Pr([Pe]);Rt.DEVICE=Pr([R,P,C,gs,K,fe,re,tt,vs]);Rt.ENGINE=Rt.OS=Pr([k,O]);function Ip(e){const t=p.useMemo(()=>e?Rt(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 Np(){const{account:e}=lt(),{data:t,refetch:n,isLoading:s}=xp(e);return t?t.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(M,{id:"CbBmBd",components:{0:a.jsx(ir,{to:"/account/apps",className:"text-blue-600 hover:underline"})}})}),t.map(r=>a.jsx(Fp,{did:e.did,session:r},`${e.did}@${r.deviceId}`))]}):a.jsx("p",{children:a.jsx(M,{id:"Ssa5RR"})}):s?a.jsx(Na,{className:"text-primary",size:28}):a.jsx(bt,{role:"status",action:a.jsx(ka,{onClick:()=>n(),children:a.jsx(M,{id:"6gRgw8"})}),children:a.jsx(M,{id:"b9LiEi"})})}function Fp({session:e,did:t}){const{i18n:n,_:s}=Ie(),{mutateAsync:r,isPending:o}=_p(),{userAgent:i,lastSeenAt:c,ipAddress:l}=e.deviceMetadata,u=Ip(i||void 0),d=cl(c);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:u||a.jsx(M,{id:"K80Okk"})}),a.jsx("p",{className:"font-mono text-xs",children:l}),a.jsx("p",{className:"text-text-light truncate text-xs",children:a.jsx(M,{id:"sJZ6K9",values:{lastUsedAgo:d}})})]}),a.jsx(je,{size:"sm",className:"min-w-max shrink-0 grow-0",disabled:e.isCurrentDevice,loading:o,onClick:h=>{r({did:t,deviceId:e.deviceId}).catch(m=>{console.warn("Failed to revoke account session",m)})},title:e.isCurrentDevice?n._({id:"JOalQJ"}):void 0,children:a.jsx(M,{id:"MzTcmM"})})]})}function Le({title:e,description:t,trigger:n,children:s,dismissable:r=!0,...o}){const{i18n:i,_:c}=Ie(),l=r?void 0:u=>u.preventDefault();return a.jsxs(ru,{...o,children:[a.jsx(iu,{asChild:!0,children:n}),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:[s,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(Ia,{className:"size-5","aria-hidden":!0})})]})]})]})]})}function Tp({onConfirm:e,children:t}){const[n,s]=p.useState(!1),[r,o]=p.useState(!1);return a.jsx(Le,{trigger:t,title:a.jsx(M,{id:"bm0hju"}),description:a.jsx(M,{id:"rR+eDa"}),open:n,onOpenChange:s,dismissable:!r,children:a.jsx(St,{submitColor:"error",submitLabel:a.jsx(M,{id:"JTkZoS"}),onCancel:()=>s(!1),onLoadingChange:o,validate:()=>({}),handler:async()=>{await e(),s(!1)},fields:()=>a.jsxs(a.Fragment,{children:[a.jsx(bt,{role:"note",className:"text-sm",children:a.jsx(M,{id:"tXaf8O"})}),a.jsx(bt,{role:"note",className:"text-sm",children:a.jsx(M,{id:"aW8/u1"})}),a.jsx(bt,{role:"warning",className:"text-sm",children:a.jsx(M,{id:"pDHYg7"})})]})})})}function Dp({email:e,onResend:t,...n}){const s=p.useRef(null);return a.jsx(St,{...n,submitColor:"error",loading:n.loading,submitLabel:a.jsx(M,{id:"ktknoE"}),validate:({token:r,password:o})=>{if(r&&o)return{token:r,password:o}},fields:({values:r,set:o,setterFor:i})=>a.jsxs(a.Fragment,{children:[e&&a.jsx("input",{type:"text",autoComplete:"username",defaultValue:e,readOnly:!0,hidden:!0}),a.jsx(jt,{label:a.jsx(M,{id:"ioZOzk"}),children:a.jsx(pr,{name:"code",enterKeyHint:"next",required:!0,autoFocus:!0,defaultValue:r.token,onToken:c=>{var l;o("token",c??void 0),c&&((l=s.current)==null||l.focus())},onResend:t})}),a.jsx(jt,{label:a.jsx(M,{id:"8ZsakT"}),children:a.jsx(hu,{ref:s,name:"password",autoComplete:"current-password",enterKeyHint:"done",required:!0,defaultValue:r.password,onPassword:i("password")})})]})})}function Vp({handle:e,email:t,requestPending:n,confirmPending:s,onRequest:r,onConfirm:o,children:i}){const[c,l]=p.useState(!1),[u,d]=p.useState(0),[h,m]=p.useState(!1),[g,v]=p.useState(void 0),b=fu(async()=>{if(g)try{await o(g),l(!1)}catch(j){throw v(void 0),d(1),j}},{onLoadingChange:m});p.useEffect(()=>{c||(d(0),v(void 0),b.reset())},[c,b]);const w=!n&&!h,x=e?a.jsx(M,{id:"pepXQP",components:{0:a.jsx(ai,{handle:e})}}):a.jsx(M,{id:"ZDGm40"});return u===2?a.jsx(Le,{trigger:i,open:c,onOpenChange:l,dismissable:w,title:a.jsx(M,{id:"0u6xc2"}),description:e?a.jsx(M,{id:"qLpwxZ",components:{0:a.jsx(ai,{handle:e,className:"font-bold"})}}):a.jsx(M,{id:"Vu2GCe"}),children:a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(je,{color:"error",loading:b.loading||s,disabled:b.loading||s,onClick:()=>void b.run(),className:"w-full",children:a.jsx(M,{id:"dfBVKc"})}),a.jsx(je,{onClick:()=>l(!1),disabled:b.loading||s,className:"w-full",children:a.jsx(M,{id:"dEgA5A"})})]})}):u===1?a.jsx(Le,{trigger:i,open:c,onOpenChange:l,dismissable:w,title:x,description:t?a.jsx(M,{id:"gHT4KZ",values:{email:t},components:{0:a.jsx("strong",{})}}):a.jsx(M,{id:"uBa/PF"}),children:a.jsx(Dp,{email:t,loading:n,onResend:r,onCancel:()=>l(!1),handler:async j=>{v(j),d(2)}})}):a.jsx(Le,{trigger:i,open:c,onOpenChange:l,dismissable:w,title:x,description:t?a.jsx(M,{id:"ij+c43",values:{email:t},components:{0:a.jsx("strong",{})}}):a.jsx(M,{id:"5RhDkD"}),children:a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Fi,{action:async()=>{await r(),d(1)},loading:n,disabled:s,color:"primary",className:"w-full",children:a.jsx(M,{id:"65dxv8"})}),a.jsx(je,{onClick:()=>l(!1),disabled:n,className:"w-full",children:a.jsx(M,{id:"dEgA5A"})}),a.jsx(bt,{role:"note",className:"text-sm",children:a.jsx(M,{id:"L2lnQX"})})]})})}function Zp({onConfirm:e,children:t}){const[n,s]=p.useState(!1),[r,o]=p.useState(!1);return a.jsx(Le,{trigger:t,title:a.jsx(M,{id:"+A9Udm"}),description:a.jsx(M,{id:"JlKWoR"}),open:n,onOpenChange:s,dismissable:!r,children:a.jsx(St,{submitColor:"primary",submitLabel:a.jsx(M,{id:"D2yGaZ"}),onCancel:()=>s(!1),onLoadingChange:o,validate:()=>({}),handler:async()=>{await e(),s(!1)},fields:()=>a.jsx(bt,{role:"note",className:"text-sm",children:a.jsx(M,{id:"ktrbe9"})})})})}function Up({emailCurrent:e,requestPending:t,confirmPending:n,onResend:s,...r}){return a.jsx(St,{...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",defaultValue:e,readOnly:!0,hidden:!0})]}),a.jsx(jt,{label:a.jsx(M,{id:"OenGwo"}),children:a.jsx(Fa,{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(M,{id:"4fWT0G"})}),a.jsx("p",{className:"mt-1",children:a.jsx(M,{id:"jK9hhN"})})]}),a.jsx(jt,{label:a.jsx(M,{id:"wLmRnI"}),children:a.jsx(pr,{name:"code",required:!0,autoFocus:!0,defaultValue:o.token,onToken:c=>i("token",c??void 0),onResend:s})})]})})}function $p({email:e,requestPending:t,confirmPending:n,onUpdateRequest:s,onUpdateConfirm:r,onVerifyRequest:o,onVerifyConfirm:i,children:c,introMessage:l}){const[u,d]=p.useState(!1),[h,m]=p.useState(0),[g,v]=p.useState(void 0),[b,w]=p.useState(!1);p.useEffect(()=>{m(0),v(void 0)},[u]);const x=!b;return h===2&&g&&i?a.jsx(Le,{trigger:c,open:u,onOpenChange:d,dismissable:x,title:a.jsxs(a.Fragment,{children:[a.jsx(pu,{className:"text-success mr-2 inline",weight:"bold"}),a.jsx(M,{id:"kbts6J"})]}),description:a.jsx(M,{id:"W5g73W",values:{email:g},components:{0:a.jsx("strong",{})}}),children:a.jsx(St,{onCancel:()=>d(!1),cancelLabel:a.jsx(M,{id:"Q2Fq1L"}),submitLabel:a.jsx(M,{id:"HFfnZo"}),onLoadingChange:w,validate:({token:j})=>j?{token:j,email:g}:void 0,handler:async j=>{await i(j),d(!1)},fields:({values:j,set:A})=>a.jsx(jt,{label:a.jsx(M,{id:"AdWhjZ"}),children:a.jsx(pr,{name:"code",required:!0,autoFocus:!0,defaultValue:j.token??void 0,onToken:H=>A("token",H??void 0),onResend:o})})})}):h===1?a.jsx(Le,{trigger:c,open:u,onOpenChange:d,dismissable:x,title:a.jsx(M,{id:"GmYkFm"}),description:a.jsx(M,{id:"vsqx1t"}),children:a.jsx(Up,{emailCurrent:e,requestPending:t,confirmPending:n,values:{email:g},onLoadingChange:w,onCancel:()=>d(!1),onResend:async()=>{await s()},handler:async j=>{await r(j),v(j.email),i?m(2):d(!1)}})}):a.jsx(Le,{trigger:c,open:u,onOpenChange:d,dismissable:x,title:a.jsx(M,{id:"GmYkFm"}),description:a.jsx(M,{id:"vsqx1t"}),children:a.jsx(St,{disabled:t,values:{email:g},onLoadingChange:w,validate:({email:j})=>j?{email:j}:void 0,onCancel:()=>d(!1),handler:async j=>{const{tokenRequired:A}=await s();v(j.email),A?m(1):(await r(j),i?m(2):d(!1))},fields:({values:j,set:A})=>a.jsxs(a.Fragment,{children:[l,a.jsx(jt,{label:a.jsx(M,{id:"OenGwo"}),children:a.jsx(Fa,{name:"email",required:!0,autoFocus:!0,defaultValue:j.email,onEmail:H=>A("email",H)})})]})})})}function qp({onHandle:e,did:t,onChange:n,autoCapitalize:s="none",autoComplete:r="off",autoCorrect:o="off",dir:i="auto",icon:c=a.jsx(Ta,{"aria-hidden":!0,weight:"bold",className:"size-5"}),title:l,placeholder:u,...d}){const{i18n:h,_:m}=Ie();return a.jsx(mu,{...d,type:"text",title:l??h._({id:"VxXoAs"}),placeholder:u??h._({id:"pC6cwz"}),autoCapitalize:s,autoComplete:r,autoCorrect:o,dir:i,icon:c,onChange:Cn(n,g=>{e==null||e(Bp(g.target.value))})})}function Bp(e){const t=gu(e.trim());if(t.length&&Da(t)&&vu(t))return t}function zp({value:e,label:t={id:"/4gGIX"},feedbackDurationMs:n=1500,shape:s="padded",size:r="sm",disabled:o,"aria-label":i,title:c,onClick:l,...u}){const{_:d}=Ie(),[h,m]=p.useState(!1),g=p.useRef(void 0);p.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const v=o||e==null;return a.jsxs(sl,{open:h,children:[a.jsx(rl,{asChild:!0,children:a.jsx(je,{...u,size:r,shape:s,disabled:v,title:c??d(t),"aria-label":i??d(t),onClick:async b=>{if(l==null||l(b),!(b.defaultPrevented||e==null))try{await navigator.clipboard.writeText(e),m(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>m(!1),n)}catch(w){console.warn("Failed to copy to clipboard",w)}},children:a.jsx(gc,{"aria-hidden":!0,weight:"regular",className:r==="sm"?"size-4":r==="lg"?"size-6":"size-5"})})}),a.jsx(il,{children:a.jsx(ol,{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(M,{id:"6V3Ea3"})})})})]})}function Kp({label:e,children:t,copyable:n=!0,className:s,...r}){return a.jsxs("div",{...r,className:Kn("flex flex-col",s),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(zp,{value:n?t:void 0,size:"sm"})]})]})}function Wp({value:e,onChange:t,options:n,maxColumns:s=n.length%3===0?3:2,name:r,className:o,...i}){const c=p.useId(),l=r??`radio-group-${c}`,u=Math.min(s,n.length);return a.jsx("div",{...i,className:Kn("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:n.map((d,h)=>{const m=!d.disabled&&d.value===e,g=`${l}-${h}`,v=d.label,b=d.description,w=b?`${g}-description`:void 0;return a.jsxs("label",{htmlFor:g,className:Kn("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",d.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:d.disabled,"aria-describedby":w,onChange:x=>{x.target.checked&&!d.disabled&&(t==null||t(d.value))},className:"accent-primary mt-1 shrink-0"}),a.jsxs("span",{className:"flex flex-col gap-0.5",children:[a.jsx("span",{children:v}),b&&a.jsx("span",{id:w,className:"text-text-light leading-snug",children:b})]})]},g)})})}function Qp({handle:e,did:t,...n}){const{i18n:s,_:r}=Ie(),[o,i]=p.useState(0),c=p.useMemo(()=>[{method:0,label:s._({id:"5M4Te3"}),description:s._({id:"q6Kda8"}),message:s._({id:"wIcl4E"}),values:[{label:s._({id:"Ai2U7L"}),value:`_atproto.${e??s._({id:"Qy+y0S"})}`,copyable:e!=null},{label:s._({id:"+zy2Nq"}),value:"TXT"},{label:s._({id:"wMHvYH"}),value:`did=${t}`}]},{method:1,label:s._({id:"LUTGt0"}),description:s._({id:"Zf0mtN"}),message:s._({id:"OgbFua"}),values:[{label:s._({id:"IagCbF"}),value:`https://${e??s._({id:"Qy+y0S"})}/.well-known/atproto-did`,copyable:e!=null},{label:s._({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",d=p.useMemo(()=>{if(!e)return;const m=new URL("https://bsky-debug.app/handle");return m.searchParams.set("handle",e),m.toString()},[e]),h=p.useMemo(()=>{if(!e)return;const m=s._({id:"cqWp5F",values:{handle:e,did:t,troubleshootHref:d,tutorialHref:u,0:c.map(({label:g,message:v,values:b})=>`${g}: ${v}
|
|
20
|
+
${b.map(({label:w,value:x})=>`${w}: ${x}`).join(`
|
|
21
|
+
`)}`).join(`
|
|
22
|
+
|
|
23
|
+
`)}});return`mailto:?body=${encodeURIComponent(m)}`},[e,u,d,c]);return a.jsxs("div",{...n,children:[a.jsx(jt,{label:s._({id:"2AW+PM"}),children:a.jsx(Wp,{maxColumns:1,value:l.method,onChange:i,options:c.map(({method:m,label:g,description:v})=>({value:m,label:g,description:v}))})}),a.jsx("p",{className:"my-2",children:l.message}),l.values.map(({label:m,value:g,copyable:v},b)=>a.jsx(Kp,{label:m,copyable:v,children:g},b)),a.jsxs("p",{className:"my-2 flex flex-row flex-wrap gap-3",children:[a.jsx(qt,{href:u,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"c3XJ18"})}),a.jsx(qt,{href:d,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"et+mIi"})}),a.jsx(qt,{href:h,noUtm:!0,className:"text-blue-600 hover:underline",children:a.jsx(M,{id:"CzD50V"})})]})]})}function Gp({did:e,...t}){return a.jsx(St,{...t,validate:({handle:n})=>{if(n&&Da(n))return{handle:n}},fields:({values:n,setterFor:s})=>a.jsxs(a.Fragment,{children:[a.jsx(jt,{label:a.jsx(M,{id:"BfIgP6"}),children:a.jsx(qp,{defaultValue:n.handle,onHandle:s("handle"),did:e,name:"domain",required:!0,autoFocus:!0,enterKeyHint:"done"})}),a.jsx(Qp,{className:"text-sm",handle:n.handle,did:e})]})})}function Jp({domains:e,...t}){return a.jsx(St,{...t,validate:({handle:n})=>{if(n&&e.some(s=>n.endsWith(s)))return{handle:n}},fields:({values:n,set:s})=>a.jsx(yu,{handle:n.handle,onHandle:r=>s("handle",r),domains:e,name:"handle",required:!0,autoFocus:!0,enterKeyHint:"done"})})}function Yp({handler:e,children:t,domains:n,currentHandle:s,did:r}){const[o,i]=p.useState(!1),[c,l]=p.useState(null),[u,d]=p.useState(!1);p.useEffect(()=>{o||l(null)},[o]);const h=!u,[m,g]=s&&n.some(v=>s.endsWith(v))?[s,void 0]:[void 0,s];return c===0&&n.length?a.jsx(Le,{open:o,onOpenChange:i,dismissable:h,trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"Bno89U"}),children:a.jsx(Jp,{domains:n,onBack:()=>l(null),values:{handle:m},onLoadingChange:d,handler:async(v,b)=>{await e(v,b),i(!1)}})}):c===1?a.jsx(Le,{open:o,onOpenChange:i,dismissable:h,trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"O78aQm"}),children:a.jsx(Gp,{did:r,onBack:()=>l(null),submitLabel:a.jsx(M,{id:"G7Vcxo"}),values:{handle:g},onLoadingChange:d,handler:async(v,b)=>{await e(v,b),i(!1)}})}):a.jsx(Le,{trigger:t,title:a.jsx(M,{id:"T6sYqW"}),description:a.jsx(M,{id:"GNCK6k",components:{0:a.jsx(qt,{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(je,{onClick:()=>l(0),disabled:!n.length,children:a.jsx(ga,{label:a.jsx(M,{id:"57gCMx"}),example:a.jsx(M,{id:"Zhm/NX",values:{0:n[0]},components:{0:a.jsx("em",{})}})})}),a.jsx(je,{onClick:()=>l(1),children:a.jsx(ga,{label:a.jsx(M,{id:"Pahpw8"}),example:a.jsx(M,{id:"2ns2wB",components:{0:a.jsx("em",{})}})})})]})})}function ga({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 Xp({email:e,requestPending:t,confirmPending:n,onRequest:s,onConfirm:r,children:o}){const{i18n:i,_:c}=Ie(),[l,u]=p.useState(!1),[d,h]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||h(0)},[l]);const v=!t&&!m;return a.jsx(Le,{trigger:o,title:i._({id:"qRxXtM"}),description:a.jsx(M,{id:"ukpmGq"}),open:l,onOpenChange:u,dismissable:v,children:d===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Fi,{action:async()=>{await s(),h(1)},loading:t,disabled:n,color:"primary",className:"w-full"}),a.jsx(je,{onClick:()=>h(1),className:"w-full",children:a.jsx(M,{id:"FTT4a4"})})]}):a.jsx(bu,{email:e,disabled:n,onLoadingChange:g,onResend:s,handler:async b=>{await r(b),u(!1)}})})}function em({onResend:e,...t}){return a.jsx(St,{...t,validate:({token:n})=>{if(n)return{token:n}},fields:({set:n,values:s})=>a.jsx(jt,{label:a.jsx(M,{id:"AdWhjZ"}),children:a.jsx(pr,{name:"code",enterKeyHint:"done",required:!0,autoFocus:!0,defaultValue:s.token,onToken:r=>n("token",r??void 0),onResend:e})})})}function tm({email:e,requestPending:t,confirmPending:n,onRequest:s,onConfirm:r,children:o}){const{i18n:i,_:c}=Ie(),[l,u]=p.useState(!1),[d,h]=p.useState(0),[m,g]=p.useState(!1);p.useEffect(()=>{l||h(0)},[l]);const v=!t&&!m;return a.jsx(Le,{trigger:o,title:i._({id:"/IBv6X"}),description:a.jsx(M,{id:"+Qnl3Q",values:{email:e},components:{0:a.jsx("strong",{})}}),open:l,onOpenChange:u,dismissable:v,children:d===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Fi,{action:async()=>{await s(),h(1)},loading:t,disabled:n,color:"primary",className:"w-full"}),a.jsx(je,{onClick:()=>h(1),className:"w-full",children:a.jsx(M,{id:"FTT4a4"})})]}):a.jsx(em,{disabled:n,onLoadingChange:g,handler:async b=>{await r(b),u(!1)},onResend:s})})}function nm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deactivateAccount(s)},onSuccess(s,r,o){t({title:{id:"K5DOaD"},description:{id:"GCPbSt"}})},onError(s,r,o){n(s,{title:{id:"F+HpQO"},description:{id:"U/me+u"}})}})}function sm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.reactivateAccount(s)},onSuccess(s,r,o){t({title:{id:"ZTs+D3"},description:{id:"fMAR1c"}})},onError(s,r,o){n(s,{title:{id:"Wrj6E0"},description:{id:"U/me+u"}})}})}function rm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deleteAccountRequest(s)},onSuccess(s,r,o){t({title:{id:"13PnPF"},description:{id:"f6ChCo"}})},onError(s,r,o){n(s,{title:{id:"Mhc//w"},description:{id:"U/me+u"}})}})}function im(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.deleteAccountConfirm(s)},onSuccess(s,r,o){t({title:{id:"TKFUnX"},description:{id:"/C919/"}})},onError(s,r,o){n(s,{title:{id:"ykyODs"},description:{id:"xFKkhq"}})}})}function om(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateEmailRequest(s)},onSuccess(s,r,o){t({title:{id:"Y/tbFA"},description:{id:"lAK2OC"}})},onError(s,r,o){n(s,{title:{id:"E1zEOj"},description:{id:"JANaVF"}})}})}function am(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateEmailConfirm(s)},onSuccess(s,r,o){t({title:{id:"j/19E8"},description:{id:"YNQVYW"}})},onError(s,r,o){n(s,{title:{id:"PNuvRd"},description:{id:"q1d4qv"}})}})}function Ll(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.verifyEmailRequest(s)},onSuccess(s,r,o){t({title:{id:"I6Q2R9"},description:{id:"rpbuva"}})},onError(s,r,o){n(s,{title:{id:"yI9fD4"},description:{id:"U/me+u"}})}})}function Il(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.verifyEmailConfirm(s)},onSuccess(s,r,o){t({title:{id:"PLEl94"},description:{id:"HrYlJ7"}})},onError(s,r,o){n(s,{title:{id:"rxy0tG"},description:{id:"78Ju9c"}})}})}function cm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.updateHandle(s)},onSuccess(s,r,o){t({title:{id:"2HQiAC"},description:{id:"6Hg1zS"}})},onError(s,r,o){n(s,{title:{id:"DsHRti"},description:{id:"GZC2rQ"}})}})}function lm(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.initiatePasswordReset(s)},onSuccess(s,r,o){t({title:{id:"boBFOP"},description:{id:"lAK2OC"}})},onError(s,r,o){n(s,{title:{id:"eMlT5s"},description:{id:"JANaVF"}})}})}function um(){const e=Ce(),{notify:t,notifyError:n}=Ne();return Fe({async mutationFn(s){return e.confirmResetPassword(s)},onSuccess(s,r,o){t({title:{id:"D9Jms7"},description:{id:"67nRLM"}})},onError(s,r,o){n(s,{title:{id:"3DLYmM"},description:{id:"q1d4qv"}})}})}function dm(){return a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx(hm,{}),a.jsx(fm,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(vm,{}),a.jsx(pm,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(mm,{}),a.jsx(gm,{})]})}function hm(){const{account:e}=lt(),{did:t,email:n,emailVerified:s}=e,r=Ll(),o=Il();return!n||s?null:a.jsx(bt,{role:"info",icon:_c,action:a.jsx(tm,{email:n,requestPending:r.isPending,confirmPending:o.isPending,onRequest:async()=>{await r.mutateAsync({did:t})},onConfirm:async({token:i})=>{await o.mutateAsync({did:t,token:i,email:n})},children:a.jsx(je,{size:"sm",color:"info",children:a.jsx(M,{id:"HFfnZo"})})}),children:a.jsx(M,{id:"Eo3tBf"})})}function fm(e){const{account:t}=lt(),n=Ii(),{did:s,email:r}=t,o=om(),i=am(),c=Ll(),l=Il();return a.jsx($p,{email:r,requestPending:o.isPending,confirmPending:i.isPending,onUpdateRequest:async()=>o.mutateAsync({did:s}),onUpdateConfirm:async({email:u,token:d})=>{await i.mutateAsync({did:s,email:u,token:d})},onVerifyRequest:async()=>{await c.mutateAsync({did:s})},onVerifyConfirm:async({email:u,token:d})=>{await l.mutateAsync({did:s,email:u,token:d})},introMessage:n.show2FaWarningOnEmailUpdate&&a.jsx(bt,{role:"warning",className:"text-sm",children:a.jsx(M,{id:"WV5h6m"})}),children:a.jsx(es,{...e,icon:wu,value:r,children:a.jsx(M,{id:"ATGYL1"})})})}function pm(e){const{account:t}=lt(),{email:n}=t,s=lm(),r=um();return n?a.jsx(Xp,{email:n,requestPending:s.isPending,confirmPending:r.isPending,onRequest:async()=>{await s.mutateAsync({email:n})},onConfirm:async({token:o,password:i})=>{await r.mutateAsync({token:o,password:i})},children:a.jsx(es,{...e,icon:wc,children:a.jsx(M,{id:"8ZsakT"})})}):null}function mm(e){const{account:t}=lt(),n=nm(),s=sm();return t.deactivated?a.jsx(Zp,{onConfirm:async()=>{await s.mutateAsync({did:t.did})},children:a.jsx(es,{...e,icon:wo,color:"primary",children:a.jsx(M,{id:"+A9Udm"})})}):a.jsx(Tp,{onConfirm:async()=>{await n.mutateAsync({did:t.did})},children:a.jsx(es,{...e,icon:wo,color:"error",children:a.jsx(M,{id:"bm0hju"})})})}function gm(e){const{account:t}=lt(),{did:n,email:s,handle:r}=t,o=rm(),i=im();return a.jsx(Vp,{handle:r,email:s,requestPending:o.isPending,confirmPending:i.isPending,onRequest:async()=>{await o.mutateAsync({did:n})},onConfirm:async({token:c,password:l})=>{await i.mutateAsync({did:n,token:c,password:l})},children:a.jsx(es,{...e,icon:Sc,color:"error",children:a.jsx(M,{id:"ZDGm40"})})})}function vm(e){const{account:t}=lt(),{availableUserDomains:n=[]}=Ii(),{did:s,handle:r}=t,o=cm();return a.jsx(Yp,{did:s,currentHandle:r,domains:n,handler:async({handle:i})=>{await o.mutateAsync({did:s,handle:i})},children:a.jsx(es,{...e,icon:Ta,value:a.jsx(ai,{handle:r}),children:a.jsx(M,{id:"7sNhEz"})})})}function es({icon:e,value:t,children:n,className:s,transparent:r=!0,...o}){return a.jsxs(je,{shape:"padded",...o,transparent:r,className:Kn("gap-2",s),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:n}),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 ym(){const{account:e}=lt();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(La,{account:e,children:a.jsx(bm,{className:"text-text-light text-center text-sm"})})})})}function bm(e){return a.jsxs("p",{...e,children:[a.jsx(M,{id:"Jn0vdi",components:{0:a.jsx(al,{})}})," ",a.jsx(ir,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:a.jsx(M,{id:"z73+hu"})})]})}const wm={"/":{icon:bc,position:0,title:{id:"i0qMbr"},component:()=>a.jsx(ym,{})},"/manage":{icon:Su,position:10,title:{id:"AeXO77"},description:{id:"Xu88FC"},component:()=>a.jsx(dm,{})},"/devices":{icon:vc,position:20,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:()=>a.jsx(Np,{})},"/apps":{icon:yc,position:30,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:()=>a.jsx(bp,{})},"/about":{icon:_u,position:50,title:{id:"uyJsf6"},component:()=>a.jsx(zf,{}),description:{id:"nxn0xR"}}};function xm(e,t){const n={...wm,...t},s=Ai({getParentRoute:()=>so,path:e,component:()=>a.jsx(Sm,{signOutTo:e,children:a.jsx(_m,{basePath:e,subPages:n})})}),r=Object.entries(n).map(([o,{component:i}])=>Ai({getParentRoute:()=>s,path:o,component:i}));return[s,...r]}function _m({basePath:e,subPages:t}){const n=p.useMemo(()=>Object.entries(t).sort(([s,r],[o,i])=>{if(r.position!=null&&i.position!=null){const c=r.position-i.position;if(c!==0)return c}return s.localeCompare(o)}).map(([s,r])=>({to:e==="/"?s:s==="/"?e:`${e}${s}`,title:r.title,description:r.description,hidden:r.hidden,icon:r.icon})),[t,e]);return a.jsx(Bf,{title:{id:"KdxItU"},basePath:e,links:n,children:a.jsx(zi,{})})}const Bs=new URL(window.location.href);function Sm({children:e,signOutTo:t}){const n=Be(),{session:s}=Ni(),r=p.useRef(s!=null),o=Bs.searchParams.get("display")==="popup",i=Bs.searchParams.get("login_hint")||void 0,c=Bs.searchParams.get("nonce")||void 0,l=Bs.searchParams.get("redirect_uri")||void 0,u=p.useMemo(()=>{if(l&&c)return()=>{const d=new URL(l);window.location.href=d.toString()};if(o)return()=>{var d;(d=window.opener)==null||d.postMessage({nonce:c,event:"done"},"*"),window.postMessage({nonce:c,event:"done"},"*"),window.close()}},[o,l,c]);return p.useEffect(()=>{s&&!r.current?r.current=!0:!s&&r.current&&(r.current=!1,t&&n.navigate({to:t}),u==null||u())},[s,u]),a.jsx(ju,{forcedIdentifier:i,disableRemember:o,onCancel:u,children:e})}const jm=Ai({getParentRoute:()=>so,path:"/account/reset-password",component:Cm,errorComponent:Ti});function Cm(){const{api:e}=Ni(),t=Be();return a.jsx(Cu,{onResetPasswordRequest:async n=>e.initiatePasswordReset(n),onResetPasswordConfirm:async n=>e.confirmResetPassword(n),onBack:()=>{window.history.back(),setTimeout(()=>{t.state.location.pathname==="/account/reset-password"&&t.navigate({to:"/account"})},1e3)}})}const Am=xm("/account",{"/branding":{icon:xc,hidden:!0,position:40,title:{id:"A3MAIm"},component:Sh}}),Rm=uh({routeTree:so.addChildren([...Am,jm])}),{__customizationData:Em,__deviceSessions:Pm}=window,km=new Bu,Mm=document.getElementById("root");Zl.createRoot(Mm).render(a.jsx(p.StrictMode,{children:a.jsx(Ul,{value:Em,children:a.jsx($l,{children:a.jsx(Au,{children:a.jsx(Ru,{fallbackRender:({error:e,resetErrorBoundary:t})=>a.jsx(Ti,{error:e,retry:t}),children:a.jsx(Eu,{initialSessions:Pm,initialSelected:Pu.Only,children:a.jsx(Gu,{client:km,children:a.jsx(fh,{router:Rm})})})})})})})}));
|
|
24
|
+
//# sourceMappingURL=account-page-BG82oyjp.js.map
|