@atproto/oauth-provider-ui 0.7.2 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/account-page-BWtTrJit.js +24 -0
- package/dist/account-page-BWtTrJit.js.map +1 -0
- package/dist/admonition-PcOMNxHc.js +59 -0
- package/dist/admonition-PcOMNxHc.js.map +1 -0
- package/dist/authorization-page-BrCP1UEq.js +2 -0
- package/dist/authorization-page-BrCP1UEq.js.map +1 -0
- package/dist/bundle-manifest.json +39 -39
- package/dist/button-cooldown-Cek48u1l.js +64 -0
- package/dist/button-cooldown-Cek48u1l.js.map +1 -0
- package/dist/{cookie-error-page-DNM0z2Cb.js → cookie-error-page-QWOGgXmH.js} +2 -2
- package/dist/{cookie-error-page-DNM0z2Cb.js.map → cookie-error-page-QWOGgXmH.js.map} +1 -1
- package/dist/error-page-BEjdpIQ7.js +2 -0
- package/dist/error-page-BEjdpIQ7.js.map +1 -0
- package/dist/error-view-BzJJuW_V.js +2 -0
- package/dist/error-view-BzJJuW_V.js.map +1 -0
- package/dist/messages--aCokQ6a.js +2 -0
- package/dist/messages--aCokQ6a.js.map +1 -0
- package/dist/messages-BaWkJYfB.js +2 -0
- package/dist/messages-BaWkJYfB.js.map +1 -0
- package/package.json +7 -8
- package/dist/account-page-DEDJt1AQ.js +0 -24
- package/dist/account-page-DEDJt1AQ.js.map +0 -1
- package/dist/admonition-D93KEqWM.js +0 -59
- package/dist/admonition-D93KEqWM.js.map +0 -1
- package/dist/authorization-page-BCJINyL_.js +0 -2
- package/dist/authorization-page-BCJINyL_.js.map +0 -1
- package/dist/error-page-Wul5BkHY.js +0 -2
- package/dist/error-page-Wul5BkHY.js.map +0 -1
- package/dist/error-view-DTevFrK5.js +0 -2
- package/dist/error-view-DTevFrK5.js.map +0 -1
- package/dist/index-DrKxiTaW.js +0 -64
- package/dist/index-DrKxiTaW.js.map +0 -1
- package/dist/messages-B-lnG-tF.js +0 -2
- package/dist/messages-B-lnG-tF.js.map +0 -1
- package/dist/messages-DwlQkdxq.js +0 -2
- package/dist/messages-DwlQkdxq.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var Qo=Object.defineProperty;var br=e=>{throw TypeError(e)};var Go=(e,t,s)=>t in e?Qo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var we=(e,t,s)=>Go(e,typeof t!="symbol"?t+"":t,s),zn=(e,t,s)=>t.has(e)||br("Cannot "+s);var m=(e,t,s)=>(zn(e,t,"read from private field"),s?s.call(e):t.get(e)),D=(e,t,s)=>t.has(e)?br("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),O=(e,t,s,n)=>(zn(e,t,"write to private field"),n?n.call(e,s):t.set(e,s),s),q=(e,t,s)=>(zn(e,t,"access private method"),s);var cn=(e,t,s,n)=>({set _(i){O(e,t,i,s)},get _(){return m(e,t,n)}});import{r as p,j as a,a as wa,p as ct,c as Jt,u as de,B as Ne,T as L,L as Jo,b as Bi,d as Et,A as In,e as xa,f as Yo,C as Xo,g as ec}from"./admonition-PcOMNxHc.js";import{r as tc,A as _a,a as sc,b as Sa,u as nc,c as $i,R as ja,T as Ea,P as Ra,C as Ca,d as ic,e as ka,f as Mt,g as Ue,z as l,Z as fe,h as rc,i as Aa,j as lt,k as ac,l as oc,m as cc,O as lc,n as uc,o as dc,D as hc,p as fc,B as pc,S as ks,F as Yt,I as Pa,q as zi,s as mc,t as gc,v as Ma,w as vc,x as Ki,y as yc,E as bc,G as wc,H as xc,J as _c,K as Sc,L as jc,M as Ec,N as Rc,Q as Cc,U as kc,V as Ac,W as Pc,X as Mc}from"./button-cooldown-Cek48u1l.js";import{E as Oa,c as Oc,a as Lc,e as Ic}from"./error-view-BzJJuW_V.js";var Ls=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(){}},Xt=typeof window>"u"||"Deno"in globalThis;function Oe(){}function Nc(e,t){return typeof e=="function"?e(t):e}function wi(e){return typeof e=="number"&&e>=0&&e!==1/0}function La(e,t){return Math.max(e+(t||0)-Date.now(),0)}function cs(e,t){return typeof e=="function"?e(t):e}function Ve(e,t){return typeof e=="function"?e(t):e}function wr(e,t){const{type:s="all",exact:n,fetchStatus:i,predicate:o,queryKey:r,stale:c}=e;if(r){if(n){if(t.queryHash!==Wi(r,t.options))return!1}else if(!Gs(t.queryKey,r))return!1}if(s!=="all"){const u=t.isActive();if(s==="active"&&!u||s==="inactive"&&u)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||o&&!o(t))}function xr(e,t){const{exact:s,status:n,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(s){if(es(t.options.mutationKey)!==es(o))return!1}else if(!Gs(t.options.mutationKey,o))return!1}return!(n&&t.state.status!==n||i&&!i(t))}function Wi(e,t){return((t==null?void 0:t.queryKeyHashFn)||es)(e)}function es(e){return JSON.stringify(e,(t,s)=>xi(s)?Object.keys(s).sort().reduce((n,i)=>(n[i]=s[i],n),{}):s)}function Gs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(s=>Gs(e[s],t[s])):!1}function Ia(e,t){if(e===t)return e;const s=_r(e)&&_r(t);if(s||xi(e)&&xi(t)){const n=s?e:Object.keys(e),i=n.length,o=s?t:Object.keys(t),r=o.length,c=s?[]:{};let u=0;for(let d=0;d<r;d++){const f=s?d:o[d];(!s&&n.includes(f)||s)&&e[f]===void 0&&t[f]===void 0?(c[f]=void 0,u++):(c[f]=Ia(e[f],t[f]),c[f]===e[f]&&e[f]!==void 0&&u++)}return i===r&&u===i?e:c}return t}function xn(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function _r(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function xi(e){if(!Sr(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!Sr(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Sr(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fc(e){return new Promise(t=>{setTimeout(t,e)})}function _i(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Ia(e,t):t}function Hc(e,t,s=0){const n=[...e,t];return s&&n.length>s?n.slice(1):n}function Tc(e,t,s=0){const n=[t,...e];return s&&n.length>s?n.slice(0,-1):n}var Qi=Symbol();function Na(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Qi?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var qt,gt,ms,ca,Dc=(ca=class extends Ls{constructor(){super();D(this,qt);D(this,gt);D(this,ms);O(this,ms,t=>{if(!Xt&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){m(this,gt)||this.setEventListener(m(this,ms))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,gt))==null||t.call(this),O(this,gt,void 0))}setEventListener(t){var s;O(this,ms,t),(s=m(this,gt))==null||s.call(this),O(this,gt,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){m(this,qt)!==t&&(O(this,qt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof m(this,qt)=="boolean"?m(this,qt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qt=new WeakMap,gt=new WeakMap,ms=new WeakMap,ca),Gi=new Dc,gs,vt,vs,la,Vc=(la=class extends Ls{constructor(){super();D(this,gs,!0);D(this,vt);D(this,vs);O(this,vs,t=>{if(!Xt&&window.addEventListener){const s=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",n)}}})}onSubscribe(){m(this,vt)||this.setEventListener(m(this,vs))}onUnsubscribe(){var t;this.hasListeners()||((t=m(this,vt))==null||t.call(this),O(this,vt,void 0))}setEventListener(t){var s;O(this,vs,t),(s=m(this,vt))==null||s.call(this),O(this,vt,t(this.setOnline.bind(this)))}setOnline(t){m(this,gs)!==t&&(O(this,gs,t),this.listeners.forEach(n=>{n(t)}))}isOnline(){return m(this,gs)}},gs=new WeakMap,vt=new WeakMap,vs=new WeakMap,la),_n=new Vc;function Si(){let e,t;const s=new Promise((i,o)=>{e=i,t=o});s.status="pending",s.catch(()=>{});function n(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{n({status:"fulfilled",value:i}),e(i)},s.reject=i=>{n({status:"rejected",reason:i}),t(i)},s}function Zc(e){return Math.min(1e3*2**e,3e4)}function Fa(e){return(e??"online")==="online"?_n.isOnline():!0}var Ha=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Kn(e){return e instanceof Ha}function Ta(e){let t=!1,s=0,n=!1,i;const o=Si(),r=y=>{var _;n||(g(new Ha(y)),(_=e.abort)==null||_.call(e))},c=()=>{t=!0},u=()=>{t=!1},d=()=>Gi.isFocused()&&(e.networkMode==="always"||_n.isOnline())&&e.canRun(),f=()=>Fa(e.networkMode)&&e.canRun(),h=y=>{var _;n||(n=!0,(_=e.onSuccess)==null||_.call(e,y),i==null||i(),o.resolve(y))},g=y=>{var _;n||(n=!0,(_=e.onError)==null||_.call(e,y),i==null||i(),o.reject(y))},v=()=>new Promise(y=>{var _;i=S=>{(n||d())&&y(S)},(_=e.onPause)==null||_.call(e)}).then(()=>{var y;i=void 0,n||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(n)return;let y;const _=s===0?e.initialPromise:void 0;try{y=_??e.fn()}catch(S){y=Promise.reject(S)}Promise.resolve(y).then(h).catch(S=>{var A;if(n)return;const M=e.retry??(Xt?0:3),P=e.retryDelay??Zc,V=typeof P=="function"?P(s,S):P,Z=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,S);if(t||!Z){g(S);return}s++,(A=e.onFail)==null||A.call(e,s,S),Fc(V).then(()=>d()?void 0:v()).then(()=>{t?g(S):b()})})};return{promise:o,cancel:r,continue:()=>(i==null||i(),o),cancelRetry:c,continueRetry:u,canStart:f,start:()=>(f()?b():v().then(b),o)}}var Uc=e=>setTimeout(e,0);function qc(){let e=[],t=0,s=c=>{c()},n=c=>{c()},i=Uc;const o=c=>{t?e.push(c):i(()=>{s(c)})},r=()=>{const c=e;e=[],c.length&&i(()=>{n(()=>{c.forEach(u=>{s(u)})})})};return{batch:c=>{let u;t++;try{u=c()}finally{t--,t||r()}return u},batchCalls:c=>(...u)=>{o(()=>{c(...u)})},schedule:o,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{n=c},setScheduler:c=>{i=c}}}var he=qc(),Bt,ua,Da=(ua=class{constructor(){D(this,Bt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),wi(this.gcTime)&&O(this,Bt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xt?1/0:5*60*1e3))}clearGcTimeout(){m(this,Bt)&&(clearTimeout(m(this,Bt)),O(this,Bt,void 0))}},Bt=new WeakMap,ua),ys,bs,Me,$t,ye,en,zt,He,Je,da,Bc=(da=class extends Da{constructor(t){super();D(this,He);D(this,ys);D(this,bs);D(this,Me);D(this,$t);D(this,ye);D(this,en);D(this,zt);O(this,zt,!1),O(this,en,t.defaultOptions),this.setOptions(t.options),this.observers=[],O(this,$t,t.client),O(this,Me,m(this,$t).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,O(this,ys,$c(this.options)),this.state=t.state??m(this,ys),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=m(this,ye))==null?void 0:t.promise}setOptions(t){this.options={...m(this,en),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&m(this,Me).remove(this)}setData(t,s){const n=_i(this.state.data,t,this.options);return q(this,He,Je).call(this,{data:n,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),n}setState(t,s){q(this,He,Je).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var n,i;const s=(n=m(this,ye))==null?void 0:n.promise;return(i=m(this,ye))==null||i.cancel(t),s?s.then(Oe).catch(Oe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(m(this,ys))}isActive(){return this.observers.some(t=>Ve(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Qi||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||!La(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=m(this,ye))==null||s.continue()}onOnline(){var s;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=m(this,ye))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),m(this,Me).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(m(this,ye)&&(m(this,zt)?m(this,ye).cancel({revert:!0}):m(this,ye).cancelRetry()),this.scheduleGc()),m(this,Me).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||q(this,He,Je).call(this,{type:"invalidate"})}fetch(t,s){var u,d,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(m(this,ye))return m(this,ye).continueRetry(),m(this,ye).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const n=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(O(this,zt,!0),n.signal)})},o=()=>{const h=Na(this.options,s),g={client:m(this,$t),queryKey:this.queryKey,meta:this.meta};return i(g),O(this,zt,!1),this.options.persister?this.options.persister(h,g,this):h(g)},r={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:m(this,$t),state:this.state,fetchFn:o};i(r),(u=this.options.behavior)==null||u.onFetch(r,this),O(this,bs,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=r.fetchOptions)==null?void 0:d.meta))&&q(this,He,Je).call(this,{type:"fetch",meta:(f=r.fetchOptions)==null?void 0:f.meta});const c=h=>{var g,v,b,y;Kn(h)&&h.silent||q(this,He,Je).call(this,{type:"error",error:h}),Kn(h)||((v=(g=m(this,Me).config).onError)==null||v.call(g,h,this),(y=(b=m(this,Me).config).onSettled)==null||y.call(b,this.state.data,h,this)),this.scheduleGc()};return O(this,ye,Ta({initialPromise:s==null?void 0:s.initialPromise,fn:r.fetchFn,abort:n.abort.bind(n),onSuccess:h=>{var g,v,b,y;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(_){c(_);return}(v=(g=m(this,Me).config).onSuccess)==null||v.call(g,h,this),(y=(b=m(this,Me).config).onSettled)==null||y.call(b,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,g)=>{q(this,He,Je).call(this,{type:"failed",failureCount:h,error:g})},onPause:()=>{q(this,He,Je).call(this,{type:"pause"})},onContinue:()=>{q(this,He,Je).call(this,{type:"continue"})},retry:r.options.retry,retryDelay:r.options.retryDelay,networkMode:r.options.networkMode,canRun:()=>!0})),m(this,ye).start()}},ys=new WeakMap,bs=new WeakMap,Me=new WeakMap,$t=new WeakMap,ye=new WeakMap,en=new WeakMap,zt=new WeakMap,He=new WeakSet,Je=function(t){const s=n=>{switch(t.type){case"failed":return{...n,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Va(n.data,this.options),fetchMeta:t.meta??null};case"success":return{...n,data:t.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Kn(i)&&i.revert&&m(this,bs)?{...m(this,bs),fetchStatus:"idle"}:{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...t.state}}};this.state=s(this.state),he.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),m(this,Me).notify({query:this,type:"updated",action:t})})},da);function Va(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Fa(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function $c(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,n=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var $e,ha,zc=(ha=class extends Ls{constructor(t={}){super();D(this,$e);this.config=t,O(this,$e,new Map)}build(t,s,n){const i=s.queryKey,o=s.queryHash??Wi(i,s);let r=this.get(o);return r||(r=new Bc({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(s),state:n,defaultOptions:t.getQueryDefaults(i)}),this.add(r)),r}add(t){m(this,$e).has(t.queryHash)||(m(this,$e).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=m(this,$e).get(t.queryHash);s&&(t.destroy(),s===t&&m(this,$e).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){he.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return m(this,$e).get(t)}getAll(){return[...m(this,$e).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(n=>wr(s,n))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(n=>wr(t,n)):s}notify(t){he.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){he.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){he.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$e=new WeakMap,ha),ze,xe,Kt,Ke,ht,fa,Kc=(fa=class extends Da{constructor(t){super();D(this,Ke);D(this,ze);D(this,xe);D(this,Kt);this.mutationId=t.mutationId,O(this,xe,t.mutationCache),O(this,ze,[]),this.state=t.state||Za(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){m(this,ze).includes(t)||(m(this,ze).push(t),this.clearGcTimeout(),m(this,xe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){O(this,ze,m(this,ze).filter(s=>s!==t)),this.scheduleGc(),m(this,xe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){m(this,ze).length||(this.state.status==="pending"?this.scheduleGc():m(this,xe).remove(this))}continue(){var t;return((t=m(this,Kt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,r,c,u,d,f,h,g,v,b,y,_,S,M,P,V,Z,A,I;O(this,Kt,Ta({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(x,w)=>{q(this,Ke,ht).call(this,{type:"failed",failureCount:x,error:w})},onPause:()=>{q(this,Ke,ht).call(this,{type:"pause"})},onContinue:()=>{q(this,Ke,ht).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>m(this,xe).canRun(this)}));const s=this.state.status==="pending",n=!m(this,Kt).canStart();try{if(!s){q(this,Ke,ht).call(this,{type:"pending",variables:t,isPaused:n}),await((o=(i=m(this,xe).config).onMutate)==null?void 0:o.call(i,t,this));const w=await((c=(r=this.options).onMutate)==null?void 0:c.call(r,t));w!==this.state.context&&q(this,Ke,ht).call(this,{type:"pending",context:w,variables:t,isPaused:n})}const x=await m(this,Kt).start();return await((d=(u=m(this,xe).config).onSuccess)==null?void 0:d.call(u,x,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,x,t,this.state.context)),await((v=(g=m(this,xe).config).onSettled)==null?void 0:v.call(g,x,null,this.state.variables,this.state.context,this)),await((y=(b=this.options).onSettled)==null?void 0:y.call(b,x,null,t,this.state.context)),q(this,Ke,ht).call(this,{type:"success",data:x}),x}catch(x){try{throw await((S=(_=m(this,xe).config).onError)==null?void 0:S.call(_,x,t,this.state.context,this)),await((P=(M=this.options).onError)==null?void 0:P.call(M,x,t,this.state.context)),await((Z=(V=m(this,xe).config).onSettled)==null?void 0:Z.call(V,void 0,x,this.state.variables,this.state.context,this)),await((I=(A=this.options).onSettled)==null?void 0:I.call(A,void 0,x,t,this.state.context)),x}finally{q(this,Ke,ht).call(this,{type:"error",error:x})}}finally{m(this,xe).runNext(this)}}},ze=new WeakMap,xe=new WeakMap,Kt=new WeakMap,Ke=new WeakSet,ht=function(t){const s=n=>{switch(t.type){case"failed":return{...n,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...n,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:t.error,failureCount:n.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),he.batch(()=>{m(this,ze).forEach(n=>{n.onMutationUpdate(t)}),m(this,xe).notify({mutation:this,type:"updated",action:t})})},fa);function Za(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ye,Te,tn,pa,Wc=(pa=class extends Ls{constructor(t={}){super();D(this,Ye);D(this,Te);D(this,tn);this.config=t,O(this,Ye,new Set),O(this,Te,new Map),O(this,tn,0)}build(t,s,n){const i=new Kc({mutationCache:this,mutationId:++cn(this,tn)._,options:t.defaultMutationOptions(s),state:n});return this.add(i),i}add(t){m(this,Ye).add(t);const s=ln(t);if(typeof s=="string"){const n=m(this,Te).get(s);n?n.push(t):m(this,Te).set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(m(this,Ye).delete(t)){const s=ln(t);if(typeof s=="string"){const n=m(this,Te).get(s);if(n)if(n.length>1){const i=n.indexOf(t);i!==-1&&n.splice(i,1)}else n[0]===t&&m(this,Te).delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=ln(t);if(typeof s=="string"){const n=m(this,Te).get(s),i=n==null?void 0:n.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var n;const s=ln(t);if(typeof s=="string"){const i=(n=m(this,Te).get(s))==null?void 0:n.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){he.batch(()=>{m(this,Ye).forEach(t=>{this.notify({type:"removed",mutation:t})}),m(this,Ye).clear(),m(this,Te).clear()})}getAll(){return Array.from(m(this,Ye))}find(t){const s={exact:!0,...t};return this.getAll().find(n=>xr(s,n))}findAll(t={}){return this.getAll().filter(s=>xr(t,s))}notify(t){he.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return he.batch(()=>Promise.all(t.map(s=>s.continue().catch(Oe))))}},Ye=new WeakMap,Te=new WeakMap,tn=new WeakMap,pa);function ln(e){var t;return(t=e.options.scope)==null?void 0:t.id}function jr(e){return{onFetch:(t,s)=>{var f,h,g,v,b;const n=t.options,i=(g=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],r=((b=t.state.data)==null?void 0:b.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const d=async()=>{let y=!1;const _=P=>{Object.defineProperty(P,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},S=Na(t.options,t.fetchOptions),M=async(P,V,Z)=>{if(y)return Promise.reject();if(V==null&&P.pages.length)return Promise.resolve(P);const A={client:t.client,queryKey:t.queryKey,pageParam:V,direction:Z?"backward":"forward",meta:t.options.meta};_(A);const I=await S(A),{maxPages:x}=t.options,w=Z?Tc:Hc;return{pages:w(P.pages,I,x),pageParams:w(P.pageParams,V,x)}};if(i&&o.length){const P=i==="backward",V=P?Qc:Er,Z={pages:o,pageParams:r},A=V(n,Z);c=await M(Z,A,P)}else{const P=e??o.length;do{const V=u===0?r[0]??n.initialPageParam:Er(n,c);if(u>0&&V==null)break;c=await M(c,V),u++}while(u<P)}return c};t.options.persister?t.fetchFn=()=>{var y,_;return(_=(y=t.options).persister)==null?void 0:_.call(y,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=d}}}function Er(e,{pages:t,pageParams:s}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,s[n],s):void 0}function Qc(e,{pages:t,pageParams:s}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,s[0],s):void 0}var ae,yt,bt,ws,xs,wt,_s,Ss,ma,Gc=(ma=class{constructor(e={}){D(this,ae);D(this,yt);D(this,bt);D(this,ws);D(this,xs);D(this,wt);D(this,_s);D(this,Ss);O(this,ae,e.queryCache||new zc),O(this,yt,e.mutationCache||new Wc),O(this,bt,e.defaultOptions||{}),O(this,ws,new Map),O(this,xs,new Map),O(this,wt,0)}mount(){cn(this,wt)._++,m(this,wt)===1&&(O(this,_s,Gi.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,ae).onFocus())})),O(this,Ss,_n.subscribe(async e=>{e&&(await this.resumePausedMutations(),m(this,ae).onOnline())})))}unmount(){var e,t;cn(this,wt)._--,m(this,wt)===0&&((e=m(this,_s))==null||e.call(this),O(this,_s,void 0),(t=m(this,Ss))==null||t.call(this),O(this,Ss,void 0))}isFetching(e){return m(this,ae).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return m(this,yt).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=m(this,ae).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=m(this,ae).build(this,t),n=s.state.data;return n===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(cs(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return m(this,ae).findAll(e).map(({queryKey:t,state:s})=>{const n=s.data;return[t,n]})}setQueryData(e,t,s){const n=this.defaultQueryOptions({queryKey:e}),i=m(this,ae).get(n.queryHash),o=i==null?void 0:i.state.data,r=Nc(t,o);if(r!==void 0)return m(this,ae).build(this,n).setData(r,{...s,manual:!0})}setQueriesData(e,t,s){return he.batch(()=>m(this,ae).findAll(e).map(({queryKey:n})=>[n,this.setQueryData(n,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=m(this,ae).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=m(this,ae);he.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=m(this,ae);return he.batch(()=>(s.findAll(e).forEach(n=>{n.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},n=he.batch(()=>m(this,ae).findAll(e).map(i=>i.cancel(s)));return Promise.all(n).then(Oe).catch(Oe)}invalidateQueries(e,t={}){return he.batch(()=>(m(this,ae).findAll(e).forEach(s=>{s.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},n=he.batch(()=>m(this,ae).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,s);return s.throwOnError||(o=o.catch(Oe)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(n).then(Oe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=m(this,ae).build(this,t);return s.isStaleByTime(cs(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Oe).catch(Oe)}fetchInfiniteQuery(e){return e.behavior=jr(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Oe).catch(Oe)}ensureInfiniteQueryData(e){return e.behavior=jr(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _n.isOnline()?m(this,yt).resumePausedMutations():Promise.resolve()}getQueryCache(){return m(this,ae)}getMutationCache(){return m(this,yt)}getDefaultOptions(){return m(this,bt)}setDefaultOptions(e){O(this,bt,e)}setQueryDefaults(e,t){m(this,ws).set(es(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...m(this,ws).values()],s={};return t.forEach(n=>{Gs(e,n.queryKey)&&Object.assign(s,n.defaultOptions)}),s}setMutationDefaults(e,t){m(this,xs).set(es(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...m(this,xs).values()],s={};return t.forEach(n=>{Gs(e,n.mutationKey)&&Object.assign(s,n.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...m(this,bt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Wi(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===Qi&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...m(this,bt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){m(this,ae).clear(),m(this,yt).clear()}},ae=new WeakMap,yt=new WeakMap,bt=new WeakMap,ws=new WeakMap,xs=new WeakMap,wt=new WeakMap,_s=new WeakMap,Ss=new WeakMap,ma),Ee,$,sn,_e,Wt,js,xt,We,nn,Es,Rs,Qt,Gt,_t,Cs,W,qs,ji,Ei,Ri,Ci,ki,Ai,Pi,Ua,ga,Jc=(ga=class extends Ls{constructor(t,s){super();D(this,W);D(this,Ee);D(this,$);D(this,sn);D(this,_e);D(this,Wt);D(this,js);D(this,xt);D(this,We);D(this,nn);D(this,Es);D(this,Rs);D(this,Qt);D(this,Gt);D(this,_t);D(this,Cs,new Set);this.options=s,O(this,Ee,t),O(this,We,null),O(this,xt,Si()),this.options.experimental_prefetchInRender||m(this,xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(m(this,$).addObserver(this),Rr(m(this,$),this.options)?q(this,W,qs).call(this):this.updateResult(),q(this,W,Ci).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Mi(m(this,$),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Mi(m(this,$),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,q(this,W,ki).call(this),q(this,W,Ai).call(this),m(this,$).removeObserver(this)}setOptions(t){const s=this.options,n=m(this,$);if(this.options=m(this,Ee).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ve(this.options.enabled,m(this,$))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");q(this,W,Pi).call(this),m(this,$).setOptions(this.options),s._defaulted&&!xn(this.options,s)&&m(this,Ee).getQueryCache().notify({type:"observerOptionsUpdated",query:m(this,$),observer:this});const i=this.hasListeners();i&&Cr(m(this,$),n,this.options,s)&&q(this,W,qs).call(this),this.updateResult(),i&&(m(this,$)!==n||Ve(this.options.enabled,m(this,$))!==Ve(s.enabled,m(this,$))||cs(this.options.staleTime,m(this,$))!==cs(s.staleTime,m(this,$)))&&q(this,W,ji).call(this);const o=q(this,W,Ei).call(this);i&&(m(this,$)!==n||Ve(this.options.enabled,m(this,$))!==Ve(s.enabled,m(this,$))||o!==m(this,_t))&&q(this,W,Ri).call(this,o)}getOptimisticResult(t){const s=m(this,Ee).getQueryCache().build(m(this,Ee),t),n=this.createResult(s,t);return Xc(this,n)&&(O(this,_e,n),O(this,js,this.options),O(this,Wt,m(this,$).state)),n}getCurrentResult(){return m(this,_e)}trackResult(t,s){const n={};return Object.keys(t).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),s==null||s(i),t[i])})}),n}trackProp(t){m(this,Cs).add(t)}getCurrentQuery(){return m(this,$)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=m(this,Ee).defaultQueryOptions(t),n=m(this,Ee).getQueryCache().build(m(this,Ee),s);return n.fetch().then(()=>this.createResult(n,s))}fetch(t){return q(this,W,qs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),m(this,_e)))}createResult(t,s){var x;const n=m(this,$),i=this.options,o=m(this,_e),r=m(this,Wt),c=m(this,js),d=t!==n?t.state:m(this,sn),{state:f}=t;let h={...f},g=!1,v;if(s._optimisticResults){const w=this.hasListeners(),F=!w&&Rr(t,s),T=w&&Cr(t,n,s,i);(F||T)&&(h={...h,...Va(f.data,t.options)}),s._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:_}=h;if(s.select&&h.data!==void 0)if(o&&h.data===(r==null?void 0:r.data)&&s.select===m(this,nn))v=m(this,Es);else try{O(this,nn,s.select),v=s.select(h.data),v=_i(o==null?void 0:o.data,v,s),O(this,Es,v),O(this,We,null)}catch(w){O(this,We,w)}else v=h.data;if(s.placeholderData!==void 0&&v===void 0&&_==="pending"){let w;if(o!=null&&o.isPlaceholderData&&s.placeholderData===(c==null?void 0:c.placeholderData))w=o.data;else if(w=typeof s.placeholderData=="function"?s.placeholderData((x=m(this,Rs))==null?void 0:x.state.data,m(this,Rs)):s.placeholderData,s.select&&w!==void 0)try{w=s.select(w),O(this,We,null)}catch(F){O(this,We,F)}w!==void 0&&(_="success",v=_i(o==null?void 0:o.data,w,s),g=!0)}m(this,We)&&(b=m(this,We),v=m(this,Es),y=Date.now(),_="error");const S=h.fetchStatus==="fetching",M=_==="pending",P=_==="error",V=M&&S,Z=v!==void 0,I={status:_,fetchStatus:h.fetchStatus,isPending:M,isSuccess:_==="success",isError:P,isInitialLoading:V,isLoading:V,data:v,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!M,isLoadingError:P&&!Z,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:P&&Z,isStale:Ji(t,s),refetch:this.refetch,promise:m(this,xt)};if(this.options.experimental_prefetchInRender){const w=N=>{I.status==="error"?N.reject(I.error):I.data!==void 0&&N.resolve(I.data)},F=()=>{const N=O(this,xt,I.promise=Si());w(N)},T=m(this,xt);switch(T.status){case"pending":t.queryHash===n.queryHash&&w(T);break;case"fulfilled":(I.status==="error"||I.data!==T.value)&&F();break;case"rejected":(I.status!=="error"||I.error!==T.reason)&&F();break}}return I}updateResult(){const t=m(this,_e),s=this.createResult(m(this,$),this.options);if(O(this,Wt,m(this,$).state),O(this,js,this.options),m(this,Wt).data!==void 0&&O(this,Rs,m(this,$)),xn(s,t))return;O(this,_e,s);const n=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!m(this,Cs).size)return!0;const r=new Set(o??m(this,Cs));return this.options.throwOnError&&r.add("error"),Object.keys(m(this,_e)).some(c=>{const u=c;return m(this,_e)[u]!==t[u]&&r.has(u)})};q(this,W,Ua).call(this,{listeners:n()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&q(this,W,Ci).call(this)}},Ee=new WeakMap,$=new WeakMap,sn=new WeakMap,_e=new WeakMap,Wt=new WeakMap,js=new WeakMap,xt=new WeakMap,We=new WeakMap,nn=new WeakMap,Es=new WeakMap,Rs=new WeakMap,Qt=new WeakMap,Gt=new WeakMap,_t=new WeakMap,Cs=new WeakMap,W=new WeakSet,qs=function(t){q(this,W,Pi).call(this);let s=m(this,$).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(Oe)),s},ji=function(){q(this,W,ki).call(this);const t=cs(this.options.staleTime,m(this,$));if(Xt||m(this,_e).isStale||!wi(t))return;const n=La(m(this,_e).dataUpdatedAt,t)+1;O(this,Qt,setTimeout(()=>{m(this,_e).isStale||this.updateResult()},n))},Ei=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(m(this,$)):this.options.refetchInterval)??!1},Ri=function(t){q(this,W,Ai).call(this),O(this,_t,t),!(Xt||Ve(this.options.enabled,m(this,$))===!1||!wi(m(this,_t))||m(this,_t)===0)&&O(this,Gt,setInterval(()=>{(this.options.refetchIntervalInBackground||Gi.isFocused())&&q(this,W,qs).call(this)},m(this,_t)))},Ci=function(){q(this,W,ji).call(this),q(this,W,Ri).call(this,q(this,W,Ei).call(this))},ki=function(){m(this,Qt)&&(clearTimeout(m(this,Qt)),O(this,Qt,void 0))},Ai=function(){m(this,Gt)&&(clearInterval(m(this,Gt)),O(this,Gt,void 0))},Pi=function(){const t=m(this,Ee).getQueryCache().build(m(this,Ee),this.options);if(t===m(this,$))return;const s=m(this,$);O(this,$,t),O(this,sn,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ua=function(t){he.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(m(this,_e))}),m(this,Ee).getQueryCache().notify({query:m(this,$),type:"observerResultsUpdated"})})},ga);function Yc(e,t){return Ve(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rr(e,t){return Yc(e,t)||e.state.data!==void 0&&Mi(e,t,t.refetchOnMount)}function Mi(e,t,s){if(Ve(t.enabled,e)!==!1){const n=typeof s=="function"?s(e):s;return n==="always"||n!==!1&&Ji(e,t)}return!1}function Cr(e,t,s,n){return(e!==t||Ve(n.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Ji(e,s)}function Ji(e,t){return Ve(t.enabled,e)!==!1&&e.isStaleByTime(cs(t.staleTime,e))}function Xc(e,t){return!xn(e.getCurrentResult(),t)}var St,jt,Re,Xe,at,yn,Oi,va,el=(va=class extends Ls{constructor(t,s){super();D(this,at);D(this,St);D(this,jt);D(this,Re);D(this,Xe);O(this,St,t),this.setOptions(s),this.bindMethods(),q(this,at,yn).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const s=this.options;this.options=m(this,St).defaultMutationOptions(t),xn(this.options,s)||m(this,St).getMutationCache().notify({type:"observerOptionsUpdated",mutation:m(this,Re),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&es(s.mutationKey)!==es(this.options.mutationKey)?this.reset():((n=m(this,Re))==null?void 0:n.state.status)==="pending"&&m(this,Re).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=m(this,Re))==null||t.removeObserver(this)}onMutationUpdate(t){q(this,at,yn).call(this),q(this,at,Oi).call(this,t)}getCurrentResult(){return m(this,jt)}reset(){var t;(t=m(this,Re))==null||t.removeObserver(this),O(this,Re,void 0),q(this,at,yn).call(this),q(this,at,Oi).call(this)}mutate(t,s){var n;return O(this,Xe,s),(n=m(this,Re))==null||n.removeObserver(this),O(this,Re,m(this,St).getMutationCache().build(m(this,St),this.options)),m(this,Re).addObserver(this),m(this,Re).execute(t)}},St=new WeakMap,jt=new WeakMap,Re=new WeakMap,Xe=new WeakMap,at=new WeakSet,yn=function(){var s;const t=((s=m(this,Re))==null?void 0:s.state)??Za();O(this,jt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},Oi=function(t){he.batch(()=>{var s,n,i,o,r,c,u,d;if(m(this,Xe)&&this.hasListeners()){const f=m(this,jt).variables,h=m(this,jt).context;(t==null?void 0:t.type)==="success"?((n=(s=m(this,Xe)).onSuccess)==null||n.call(s,t.data,f,h),(o=(i=m(this,Xe)).onSettled)==null||o.call(i,t.data,null,f,h)):(t==null?void 0:t.type)==="error"&&((c=(r=m(this,Xe)).onError)==null||c.call(r,t.error,f,h),(d=(u=m(this,Xe)).onSettled)==null||d.call(u,void 0,t.error,f,h))}this.listeners.forEach(f=>{f(m(this,jt))})})},va),qa=p.createContext(void 0),Nn=e=>{const t=p.useContext(qa);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},tl=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),a.jsx(qa.Provider,{value:e,children:t})),Ba=p.createContext(!1),sl=()=>p.useContext(Ba);Ba.Provider;function nl(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var il=p.createContext(nl()),rl=()=>p.useContext(il);function $a(e,t){return typeof e=="function"?e(...t):!!e}function Li(){}var al=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},ol=e=>{p.useEffect(()=>{e.clearReset()},[e])},cl=({result:e,errorResetBoundary:t,throwOnError:s,query:n,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(i&&e.data===void 0||$a(s,[e.error,n])),ll=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...s)=>Math.max(t(...s),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ul=(e,t)=>e.isLoading&&e.isFetching&&!t,dl=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,kr=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function hl(e,t,s){var h,g,v,b,y;const n=Nn(),i=sl(),o=rl(),r=n.defaultQueryOptions(e);(g=(h=n.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||g.call(h,r),r._optimisticResults=i?"isRestoring":"optimistic",ll(r),al(r,o),ol(o);const c=!n.getQueryCache().get(r.queryHash),[u]=p.useState(()=>new t(n,r)),d=u.getOptimisticResult(r),f=!i&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(_=>{const S=f?u.subscribe(he.batchCalls(_)):Li;return u.updateResult(),S},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),p.useEffect(()=>{u.setOptions(r)},[r,u]),dl(r,d))throw kr(r,u,o);if(cl({result:d,errorResetBoundary:o,throwOnError:r.throwOnError,query:n.getQueryCache().get(r.queryHash),suspense:r.suspense}))throw d.error;if((b=(v=n.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||b.call(v,r,d),r.experimental_prefetchInRender&&!Xt&&ul(d,i)){const _=c?kr(r,u,o):(y=n.getQueryCache().get(r.queryHash))==null?void 0:y.promise;_==null||_.catch(Li).finally(()=>{u.updateResult()})}return r.notifyOnChangeProps?d:u.trackResult(d)}function za(e,t){return hl(e,Jc)}function ut(e,t){const s=Nn(),[n]=p.useState(()=>new el(s,e));p.useEffect(()=>{n.setOptions(e)},[n,e]);const i=p.useSyncExternalStore(p.useCallback(r=>n.subscribe(he.batchCalls(r)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=p.useCallback((r,c)=>{n.mutate(r,c).catch(Li)},[n]);if(i.error&&$a(n.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var fl="Invariant failed";function tt(e,t){if(!e)throw new Error(fl)}const ls=new WeakMap,bn=new WeakMap,Sn={current:[]};let Wn=!1,Ws=0;const Bs=new Set,un=new Map;function Ka(e){const t=Array.from(e).sort((s,n)=>s instanceof us&&s.options.deps.includes(n)?1:n instanceof us&&n.options.deps.includes(s)?-1:0);for(const s of t){if(Sn.current.includes(s))continue;Sn.current.push(s),s.recompute();const n=bn.get(s);if(n)for(const i of n){const o=ls.get(i);o&&Ka(o)}}}function pl(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function ml(e){e.listeners.forEach(t=>t({prevVal:e.prevState,currentVal:e.state}))}function Wa(e){if(Ws>0&&!un.has(e)&&un.set(e,e.prevState),Bs.add(e),!(Ws>0)&&!Wn)try{for(Wn=!0;Bs.size>0;){const t=Array.from(Bs);Bs.clear();for(const s of t){const n=un.get(s)??s.prevState;s.prevState=n,pl(s)}for(const s of t){const n=ls.get(s);n&&(Sn.current.push(s),Ka(n))}for(const s of t){const n=ls.get(s);if(n)for(const i of n)ml(i)}}}finally{Wn=!1,Sn.current=[],un.clear()}}function Qn(e){Ws++;try{e()}finally{if(Ws--,Ws===0){const t=Array.from(Bs)[0];t&&Wa(t)}}}function gl(e){return typeof e=="function"}class Ii{constructor(t,s){this.listeners=new Set,this.subscribe=n=>{var i,o;this.listeners.add(n);const r=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,n,this);return()=>{this.listeners.delete(n),r==null||r()}},this.prevState=t,this.state=t,this.options=s}setState(t){var s,n,i;this.prevState=this.state,(s=this.options)!=null&&s.updateFn?this.state=this.options.updateFn(this.prevState)(t):gl(t)?this.state=t(this.prevState):this.state=t,(i=(n=this.options)==null?void 0:n.onUpdate)==null||i.call(n),Wa(this)}}class us{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const s=[],n=[];for(const i of this.options.deps)s.push(i.prevState),n.push(i.state);return this.lastSeenDepValues=n,{prevDepVals:s,currDepVals:n,prevVal:this.prevState??void 0}},this.recompute=()=>{var s,n;this.prevState=this.state;const{prevDepVals:i,currDepVals:o,prevVal:r}=this.getDepVals();this.state=this.options.fn({prevDepVals:i,currDepVals:o,prevVal:r}),(n=(s=this.options).onUpdate)==null||n.call(s)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof us&&o.checkIfRecalculationNeededDeeply();let s=!1;const n=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let o=0;o<i.length;o++)if(i[o]!==n[o]){s=!0;break}s&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const s of this._subscriptions)s()}),this.subscribe=s=>{var n,i;this.listeners.add(s);const o=(i=(n=this.options).onSubscribe)==null?void 0:i.call(n,s,this);return()=>{this.listeners.delete(s),o==null||o()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const s of t)if(s instanceof us)s.registerOnGraph(),this.registerOnGraph(s.options.deps);else if(s instanceof Ii){let n=ls.get(s);n||(n=new Set,ls.set(s,n)),n.add(this);let i=bn.get(this);i||(i=new Set,bn.set(this,i)),i.add(s)}}unregisterFromGraph(t=this.options.deps){for(const s of t)if(s instanceof us)this.unregisterFromGraph(s.options.deps);else if(s instanceof Ii){const n=ls.get(s);n&&n.delete(this);const i=bn.get(this);i&&i.delete(s)}}}const Ct="__TSR_index",Ar="popstate",Pr="beforeunload";function Qa(e){let t=e.getLocation();const s=new Set,n=r=>{t=e.getLocation(),s.forEach(c=>c({location:t,action:r}))},i=r=>{e.notifyOnIndexChange??!0?n(r):t=e.getLocation()},o=async({task:r,navigateOpts:c,...u})=>{var d,f;if((c==null?void 0:c.ignoreBlocker)??!1){r();return}const g=((d=e.getBlockers)==null?void 0:d.call(e))??[],v=u.type==="PUSH"||u.type==="REPLACE";if(typeof document<"u"&&g.length&&v)for(const b of g){const y=Js(u.path,u.state);if(await b.blockerFn({currentLocation:t,nextLocation:y,action:u.type})){(f=e.onBlocked)==null||f.call(e);return}}r()};return{get location(){return t},get length(){return e.getLength()},subscribers:s,subscribe:r=>(s.add(r),()=>{s.delete(r)}),push:(r,c,u)=>{const d=t.state[Ct];c=Ni(d+1,c),o({task:()=>{e.pushState(r,c),n({type:"PUSH"})},navigateOpts:u,type:"PUSH",path:r,state:c})},replace:(r,c,u)=>{const d=t.state[Ct];c=Ni(d,c),o({task:()=>{e.replaceState(r,c),n({type:"REPLACE"})},navigateOpts:u,type:"REPLACE",path:r,state:c})},go:(r,c)=>{o({task:()=>{e.go(r),i({type:"GO",index:r})},navigateOpts:c,type:"GO"})},back:r=>{o({task:()=>{e.back((r==null?void 0:r.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:r,type:"BACK"})},forward:r=>{o({task:()=>{e.forward((r==null?void 0:r.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:r,type:"FORWARD"})},canGoBack:()=>t.state[Ct]!==0,createHref:r=>e.createHref(r),block:r=>{var c;if(!e.setBlockers)return()=>{};const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...u,r]),()=>{var d,f;const h=((d=e.getBlockers)==null?void 0:d.call(e))??[];(f=e.setBlockers)==null||f.call(e,h.filter(g=>g!==r))}},flush:()=>{var r;return(r=e.flush)==null?void 0:r.call(e)},destroy:()=>{var r;return(r=e.destroy)==null?void 0:r.call(e)},notify:n}}function Ni(e,t){return t||(t={}),{...t,key:Yi(),[Ct]:e}}function vl(e){var t;const s=typeof document<"u"?window:void 0,n=s.history.pushState,i=s.history.replaceState;let o=[];const r=()=>o,c=w=>o=w,u=w=>w,d=()=>Js(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state);(t=s.history.state)!=null&&t.key||s.history.replaceState({[Ct]:0,key:Yi()},"");let f=d(),h,g=!1,v=!1,b=!1,y=!1;const _=()=>f;let S,M;const P=()=>{S&&(x._ignoreSubscribers=!0,(S.isPush?s.history.pushState:s.history.replaceState)(S.state,"",S.href),x._ignoreSubscribers=!1,S=void 0,M=void 0,h=void 0)},V=(w,F,T)=>{const N=u(F);M||(h=f),f=Js(F,T),S={href:N,state:T,isPush:(S==null?void 0:S.isPush)||w==="push"},M||(M=Promise.resolve().then(()=>P()))},Z=w=>{f=d(),x.notify({type:w})},A=async()=>{if(v){v=!1;return}const w=d(),F=w.state[Ct]-f.state[Ct],T=F===1,N=F===-1,H=!T&&!N||g;g=!1;const Q=H?"GO":N?"BACK":"FORWARD",B=H?{type:"GO",index:F}:{type:N?"BACK":"FORWARD"};if(b)b=!1;else{const z=r();if(typeof document<"u"&&z.length){for(const G of z)if(await G.blockerFn({currentLocation:f,nextLocation:w,action:Q})){v=!0,s.history.go(1),x.notify(B);return}}}f=d(),x.notify(B)},I=w=>{if(y){y=!1;return}let F=!1;const T=r();if(typeof document<"u"&&T.length)for(const N of T){const H=N.enableBeforeUnload??!0;if(H===!0){F=!0;break}if(typeof H=="function"&&H()===!0){F=!0;break}}if(F)return w.preventDefault(),w.returnValue=""},x=Qa({getLocation:_,getLength:()=>s.history.length,pushState:(w,F)=>V("push",w,F),replaceState:(w,F)=>V("replace",w,F),back:w=>(w&&(b=!0),y=!0,s.history.back()),forward:w=>{w&&(b=!0),y=!0,s.history.forward()},go:w=>{g=!0,s.history.go(w)},createHref:w=>u(w),flush:P,destroy:()=>{s.history.pushState=n,s.history.replaceState=i,s.removeEventListener(Pr,I,{capture:!0}),s.removeEventListener(Ar,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:r,setBlockers:c,notifyOnIndexChange:!1});return s.addEventListener(Pr,I,{capture:!0}),s.addEventListener(Ar,A),s.history.pushState=function(...w){const F=n.apply(s.history,w);return x._ignoreSubscribers||Z("PUSH"),F},s.history.replaceState=function(...w){const F=i.apply(s.history,w);return x._ignoreSubscribers||Z("REPLACE"),F},x}function yl(e={initialEntries:["/"]}){const t=e.initialEntries;let s=e.initialIndex?Math.min(Math.max(e.initialIndex,0),t.length-1):t.length-1;const n=t.map((o,r)=>Ni(r,void 0));return Qa({getLocation:()=>Js(t[s],n[s]),getLength:()=>t.length,pushState:(o,r)=>{s<t.length-1&&(t.splice(s+1),n.splice(s+1)),n.push(r),t.push(o),s=Math.max(t.length-1,0)},replaceState:(o,r)=>{n[s]=r,t[s]=o},back:()=>{s=Math.max(s-1,0)},forward:()=>{s=Math.min(s+1,t.length-1)},go:o=>{s=Math.min(Math.max(s+o,0),t.length-1)},createHref:o=>o})}function Js(e,t){const s=e.indexOf("#"),n=e.indexOf("?");return{href:e,pathname:e.substring(0,s>0?n>0?Math.min(s,n):s:n>0?n:e.length),hash:s>-1?e.substring(s):"",search:n>-1?e.slice(n,s===-1?void 0:s):"",state:t||{[Ct]:0,key:Yi()}}}function Yi(){return(Math.random()+1).toString(36).substring(7)}function as(e){return e[e.length-1]}function bl(e){return typeof e=="function"}function Zt(e,t){return bl(e)?e(t):e}function Fi(e,t){return t.reduce((s,n)=>(s[n]=e[n],s),{})}function Pe(e,t){if(e===t)return e;const s=t,n=Or(e)&&Or(s);if(n||jn(e)&&jn(s)){const i=n?e:Object.keys(e),o=i.length,r=n?s:Object.keys(s),c=r.length,u=n?[]:{};let d=0;for(let f=0;f<c;f++){const h=n?f:r[f];(!n&&i.includes(h)||n)&&e[h]===void 0&&s[h]===void 0?(u[h]=void 0,d++):(u[h]=Pe(e[h],s[h]),u[h]===e[h]&&e[h]!==void 0&&d++)}return o===c&&d===o?e:u}return s}function jn(e){if(!Mr(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const s=t.prototype;return!(!Mr(s)||!s.hasOwnProperty("isPrototypeOf"))}function Mr(e){return Object.prototype.toString.call(e)==="[object Object]"}function Or(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Lr(e,t){let s=Object.keys(e);return t&&(s=s.filter(n=>e[n]!==void 0)),s}function ds(e,t,s){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(jn(e)&&jn(t)){const n=(s==null?void 0:s.ignoreUndefined)??!0,i=Lr(e,n),o=Lr(t,n);return!(s!=null&&s.partial)&&i.length!==o.length?!1:o.every(r=>ds(e[r],t[r],s))}return Array.isArray(e)&&Array.isArray(t)?e.length!==t.length?!1:!e.some((n,i)=>!ds(n,t[i],s)):!1}function rs(e){let t,s;const n=new Promise((i,o)=>{t=i,s=o});return n.status="pending",n.resolve=i=>{n.status="resolved",n.value=i,t(i),e==null||e(i)},n.reject=i=>{n.status="rejected",s(i)},n}function wl(e){return/%[0-9A-Fa-f]{2}/.test(e)}function it(e){return Fn(e.filter(t=>t!==void 0).join("/"))}function Fn(e){return e.replace(/\/{2,}/g,"/")}function Xi(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Ut(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function xl(e){return Ut(Xi(e))}function En(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function _l(e,t,s){return En(e,s)===En(t,s)}function Sl({basepath:e,base:t,to:s,trailingSlash:n="never",caseSensitive:i}){var o,r;t=Rn(e,t,i),s=Rn(e,s,i);let c=As(t);const u=As(s);c.length>1&&((o=as(c))==null?void 0:o.value)==="/"&&c.pop(),u.forEach((f,h)=>{f.value==="/"?h?h===u.length-1&&c.push(f):c=[f]:f.value===".."?c.pop():f.value==="."||c.push(f)}),c.length>1&&(((r=as(c))==null?void 0:r.value)==="/"?n==="never"&&c.pop():n==="always"&&c.push({type:"pathname",value:"/"}));const d=it([e,...c.map(f=>f.value)]);return Fn(d)}function As(e){if(!e)return[];e=Fn(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const s=e.split("/").filter(Boolean);return t.push(...s.map(n=>n==="$"||n==="*"?{type:"wildcard",value:n}:n.charAt(0)==="$"?{type:"param",value:n}:{type:"pathname",value:n.includes("%25")?n.split("%25").map(i=>decodeURI(i)).join("%25"):decodeURI(n)})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function dn({path:e,params:t,leaveWildcards:s,leaveParams:n,decodeCharMap:i}){const o=As(e);function r(d){const f=t[d],h=typeof f=="string";return["*","_splat"].includes(d)?h?encodeURI(f):f:h?jl(f,i):f}const c={},u=it(o.map(d=>{if(d.type==="wildcard"){c._splat=t._splat;const f=r("_splat");return s?`${d.value}${f??""}`:f}if(d.type==="param"){const f=d.value.substring(1);if(c[f]=t[f],n){const h=r(d.value);return`${d.value}${h??""}`}return r(f)??"undefined"}return d.value}));return{usedParams:c,interpolatedPath:u}}function jl(e,t){let s=encodeURIComponent(e);if(t)for(const[n,i]of t)s=s.replaceAll(n,i);return s}function hn(e,t,s){const n=El(e,t,s);if(!(s.to&&!n))return n??{}}function Rn(e,t,s=!1){const n=s?e:e.toLowerCase(),i=s?t:t.toLowerCase();switch(!0){case n==="/":return t;case i===n:return"";case t.length<e.length:return t;case i[n.length]!=="/":return t;case i.startsWith(n):return t.slice(e.length);default:return t}}function El(e,t,s){if(e!=="/"&&!t.startsWith(e))return;t=Rn(e,t,s.caseSensitive);const n=Rn(e,`${s.to??"$"}`,s.caseSensitive),i=As(t),o=As(n);t.startsWith("/")||i.unshift({type:"pathname",value:"/"}),n.startsWith("/")||o.unshift({type:"pathname",value:"/"});const r={};return(()=>{for(let u=0;u<Math.max(i.length,o.length);u++){const d=i[u],f=o[u],h=u>=i.length-1,g=u>=o.length-1;if(f){if(f.type==="wildcard"){const v=decodeURI(it(i.slice(u).map(b=>b.value)));return r["*"]=v,r._splat=v,!0}if(f.type==="pathname"){if(f.value==="/"&&!(d!=null&&d.value))return!0;if(d){if(s.caseSensitive){if(f.value!==d.value)return!1}else if(f.value.toLowerCase()!==d.value.toLowerCase())return!1}}if(!d)return!1;if(f.type==="param"){if(d.value==="/")return!1;d.value.charAt(0)!=="$"&&(r[f.value.substring(1)]=decodeURIComponent(d.value))}}if(!h&&g)return r["**"]=it(i.slice(u+1).map(v=>v.value)),!!s.fuzzy&&(f==null?void 0:f.value)!=="/"}return!0})()?r:void 0}function Le(e){return!!(e!=null&&e.isNotFound)}const Cn="tsr-scroll-restoration-v1_3";let Ga=!1;try{Ga=typeof window<"u"&&typeof window.sessionStorage=="object"}catch{}const Rl=(e,t)=>{let s;return(...n)=>{s||(s=setTimeout(()=>{e(...n),s=null},t))}},os=Ga?{state:JSON.parse(window.sessionStorage.getItem(Cn)||"null")||{},set:t=>(os.state=Zt(t,os.state)||os.state,window.sessionStorage.setItem(Cn,JSON.stringify(os.state)))}:void 0,Hi=e=>e.state.key||e.href;function Cl(e){const t=[];let s;for(;s=e.parentNode;)t.unshift(`${e.tagName}:nth-child(${[].indexOf.call(s.children,e)+1})`),e=s;return`${t.join(" > ")}`.toLowerCase()}let kn=!1;function Ja(e,t,s,n,i){var o;let r;try{r=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(d){console.error(d);return}const c=t||((o=window.history.state)==null?void 0:o.key),u=r[c];kn=!0,(()=>{if(n&&u){for(const f in u){const h=u[f];if(f==="window")window.scrollTo({top:h.scrollY,left:h.scrollX,behavior:s});else if(f){const g=document.querySelector(f);g&&(g.scrollLeft=h.scrollX,g.scrollTop=h.scrollY)}}return}const d=window.location.hash.split("#")[1];if(d){const f=(window.history.state||{}).__hashScrollIntoViewOptions??!0;if(f){const h=document.getElementById(d);h&&h.scrollIntoView(f)}return}["window",...(i==null?void 0:i.filter(f=>f!=="window"))??[]].forEach(f=>{const h=f==="window"?window:document.querySelector(f);h&&h.scrollTo({top:0,left:0,behavior:s})})})(),kn=!1}function kl(e,t){if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),typeof document>"u"||e.isScrollRestorationSetup)return;e.isScrollRestorationSetup=!0,kn=!1;const n=e.options.getScrollRestorationKey||Hi;window.history.scrollRestoration="manual";const i=o=>{if(kn||!e.isScrollRestoring)return;let r="";if(o.target===document||o.target===window)r="window";else{const u=o.target.getAttribute("data-scroll-restoration-id");u?r=`[data-scroll-restoration-id="${u}"]`:r=Cl(o.target)}const c=n(e.state.location);os.set(u=>{const d=u[c]=u[c]||{},f=d[r]=d[r]||{};if(r==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(r){const h=document.querySelector(r);h&&(f.scrollX=h.scrollLeft||0,f.scrollY=h.scrollTop||0)}return u})};typeof document<"u"&&document.addEventListener("scroll",Rl(i,100),!0),e.subscribe("onRendered",o=>{const r=n(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}Ja(Cn,r,e.options.scrollRestorationBehavior||void 0,e.isScrollRestoring||void 0,e.options.scrollToTopSelectors||void 0),e.isScrollRestoring&&os.set(c=>(c[r]=c[r]||{},c))})}function Al(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const s=document.getElementById(e.state.location.hash);s&&s.scrollIntoView(t)}}}function Pl(e,t){const s=Object.entries(e).flatMap(([i,o])=>Array.isArray(o)?o.map(r=>[i,String(r)]):[[i,String(o)]]);return""+new URLSearchParams(s).toString()}function Gn(e){if(!e)return"";const t=wl(e)?decodeURIComponent(e):decodeURIComponent(encodeURIComponent(e));return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function Ml(e,t){const s=e;return[...new URLSearchParams(s).entries()].reduce((o,[r,c])=>{const u=o[r];return u==null?o[r]=Gn(c):o[r]=Array.isArray(u)?[...u,Gn(c)]:[u,Gn(c)],o},{})}const Ol=Il(JSON.parse),Ll=Nl(JSON.stringify,JSON.parse);function Il(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const s=Ml(t);for(const n in s){const i=s[n];if(typeof i=="string")try{s[n]=e(i)}catch{}}return s}}function Nl(e,t){function s(n){if(typeof n=="object"&&n!==null)try{return e(n)}catch{}else if(typeof n=="string"&&typeof t=="function")try{return t(n),e(n)}catch{}return n}return n=>{n={...n},Object.keys(n).forEach(o=>{const r=n[o];typeof r>"u"||r===void 0?delete n[o]:n[o]=s(r)});const i=Pl(n).toString();return i?`?${i}`:""}}const De="__root__";function Dt(e){return!!(e!=null&&e.isRedirect)}function Jn(e){return!!(e!=null&&e.isRedirect)&&e.href}function hs(e){const t=e.resolvedLocation,s=e.location,n=(t==null?void 0:t.pathname)!==s.pathname,i=(t==null?void 0:t.href)!==s.href,o=(t==null?void 0:t.hash)!==s.hash;return{fromLocation:t,toLocation:s,pathChanged:n,hrefChanged:i,hashChanged:o}}class Fl{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=s=>s(),this.update=s=>{var n;s.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options;this.options={...this.options,...s},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(o=>[encodeURIComponent(o),o])):void 0,(!this.basepath||s.basepath&&s.basepath!==i.basepath)&&(s.basepath===void 0||s.basepath===""||s.basepath==="/"?this.basepath="/":this.basepath=`/${xl(s.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(this.isServer?yl({initialEntries:[this.basepath||"/"]}):vl()),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new Ii(Tl(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(o=>!["redirected"].includes(o.status))}}}),kl(this)),typeof window<"u"&&"CSS"in window&&typeof((n=window.CSS)==null?void 0:n.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999,defaultSsr:this.options.defaultSsr}),this.routesById[s.id]=s);const n=r=>{r.forEach((c,u)=>{c.init({originalIndex:u,defaultSsr:this.options.defaultSsr});const d=this.routesById[c.id];if(tt(!d,`Duplicate routes found with id: ${String(c.id)}`),this.routesById[c.id]=c,!c.isRoot&&c.path){const h=Ut(c.fullPath);(!this.routesByPath[h]||c.fullPath.endsWith("/"))&&(this.routesByPath[h]=c)}const f=c.children;f!=null&&f.length&&n(f)})};n([this.routeTree]);const i=[];Object.values(this.routesById).forEach((r,c)=>{var u;if(r.isRoot||!r.path)return;const d=Xi(r.fullPath),f=As(d);for(;f.length>1&&((u=f[0])==null?void 0:u.value)==="/";)f.shift();const h=f.map(g=>g.value==="/"?.75:g.type==="param"?.5:g.type==="wildcard"?.25:1);i.push({child:r,trimmed:d,parsed:f,index:c,scores:h})}),this.flatRoutes=i.sort((r,c)=>{const u=Math.min(r.scores.length,c.scores.length);for(let d=0;d<u;d++)if(r.scores[d]!==c.scores[d])return c.scores[d]-r.scores[d];if(r.scores.length!==c.scores.length)return c.scores.length-r.scores.length;for(let d=0;d<u;d++)if(r.parsed[d].value!==c.parsed[d].value)return r.parsed[d].value>c.parsed[d].value?1:-1;return r.index-c.index}).map((r,c)=>(r.child.rank=c,r.child))},this.subscribe=(s,n)=>{const i={eventType:s,fn:n};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=s=>{this.subscribers.forEach(n=>{n.eventType===s.type&&n.fn(s)})},this.parseLocation=(s,n)=>{const i=({pathname:u,search:d,hash:f,state:h})=>{const g=this.options.parseSearch(d),v=this.options.stringifySearch(g);return{pathname:u,searchStr:v,search:Pe(s==null?void 0:s.search,g),hash:f.split("#").reverse()[0]??"",href:`${u}${v}${f}`,state:Pe(s==null?void 0:s.state,h)}},o=i(n??this.history.location),{__tempLocation:r,__tempKey:c}=o.state;if(r&&(!c||c===this.tempLocationKey)){const u=i(r);return u.state.key=o.state.key,delete u.state.__tempLocation,{...u,maskedLocation:o}}return o},this.resolvePathWithBase=(s,n)=>Sl({basepath:this.basepath,base:s,to:Fn(n),trailingSlash:this.options.trailingSlash,caseSensitive:this.options.caseSensitive}),this.matchRoutes=(s,n,i)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:n},i):this.matchRoutesInternal(s,n),this.getMatchedRoutes=(s,n)=>{let i={};const o=Ut(s.pathname),r=f=>hn(this.basepath,o,{to:f.fullPath,caseSensitive:f.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});let c=(n==null?void 0:n.to)!==void 0?this.routesByPath[n.to]:void 0;c?i=r(c):c=this.flatRoutes.find(f=>{const h=r(f);return h?(i=h,!0):!1});let u=c||this.routesById[De];const d=[u];for(;u.parentRoute;)u=u.parentRoute,d.unshift(u);return{matchedRoutes:d,routeParams:i,foundRoute:c}},this.cancelMatch=s=>{const n=this.getMatch(s);n&&(n.abortController.abort(),clearTimeout(n.pendingTimeout))},this.cancelMatches=()=>{var s;(s=this.state.pendingMatches)==null||s.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=s=>{const n=(o={},r)=>{var c,u,d,f,h,g,v;const b=o._fromLocation?this.matchRoutes(o._fromLocation,{_buildLocation:!0}):this.state.matches,y=o.from!=null?b.find(N=>hn(this.basepath,Ut(N.pathname),{to:o.from,caseSensitive:!1,fuzzy:!1})):void 0,_=(y==null?void 0:y.pathname)||this.latestLocation.pathname;tt(o.from==null||y!=null,"Could not find match for from: "+o.from);const S=(c=this.state.pendingMatches)!=null&&c.length?(u=as(this.state.pendingMatches))==null?void 0:u.search:((d=as(b))==null?void 0:d.search)||this.latestLocation.search,M=r==null?void 0:r.matchedRoutes.filter(N=>b.find(H=>H.routeId===N.id));let P;if(o.to){const N=(y==null?void 0:y.fullPath)||((f=as(b))==null?void 0:f.fullPath)||this.latestLocation.pathname;P=this.resolvePathWithBase(N,`${o.to}`)}else{const N=this.routesById[(h=M==null?void 0:M.find(H=>{const Q=dn({path:H.fullPath,params:(r==null?void 0:r.routeParams)??{},decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;return it([this.basepath,Q])===_}))==null?void 0:h.id];P=this.resolvePathWithBase(_,(N==null?void 0:N.to)??_)}const V={...(g=as(b))==null?void 0:g.params};let Z=(o.params??!0)===!0?V:{...V,...Zt(o.params,V)};Object.keys(Z).length>0&&(r==null||r.matchedRoutes.map(N=>{var H;return((H=N.options.params)==null?void 0:H.stringify)??N.options.stringifyParams}).filter(Boolean).forEach(N=>{Z={...Z,...N(Z)}})),P=dn({path:P,params:Z??{},leaveWildcards:!1,leaveParams:s.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath;let A=S;if(s._includeValidateSearch&&((v=this.options.search)!=null&&v.strict)){let N={};r==null||r.matchedRoutes.forEach(H=>{try{H.options.validateSearch&&(N={...N,...Yn(H.options.validateSearch,{...N,...A})??{}})}catch{}}),A=N}A=(N=>{const H=(r==null?void 0:r.matchedRoutes.reduce((z,G)=>{var be;const ve=[];if("search"in G.options)(be=G.options.search)!=null&&be.middlewares&&ve.push(...G.options.search.middlewares);else if(G.options.preSearchFilters||G.options.postSearchFilters){const ce=({search:J,next:Se})=>{let ee=J;"preSearchFilters"in G.options&&G.options.preSearchFilters&&(ee=G.options.preSearchFilters.reduce((ne,ie)=>ie(ne),J));const te=Se(ee);return"postSearchFilters"in G.options&&G.options.postSearchFilters?G.options.postSearchFilters.reduce((ne,ie)=>ie(ne),te):te};ve.push(ce)}if(s._includeValidateSearch&&G.options.validateSearch){const ce=({search:J,next:Se})=>{const ee=Se(J);try{return{...ee,...Yn(G.options.validateSearch,ee)??{}}}catch{return ee}};ve.push(ce)}return z.concat(ve)},[]))??[],Q=({search:z})=>o.search?o.search===!0?z:Zt(o.search,z):{};H.push(Q);const B=(z,G)=>{if(z>=H.length)return G;const be=H[z];return be({search:G,next:ce=>B(z+1,ce)})};return B(0,N)})(A),A=Pe(S,A);const x=this.options.stringifySearch(A),w=o.hash===!0?this.latestLocation.hash:o.hash?Zt(o.hash,this.latestLocation.hash):void 0,F=w?`#${w}`:"";let T=o.state===!0?this.latestLocation.state:o.state?Zt(o.state,this.latestLocation.state):{};return T=Pe(this.latestLocation.state,T),{pathname:P,search:A,searchStr:x,state:T,hash:w??"",href:`${P}${x}${F}`,unmaskOnReload:o.unmaskOnReload}},i=(o={},r)=>{var c;const u=n(o);let d=r?n(r):void 0;if(!d){let g={};const v=(c=this.options.routeMasks)==null?void 0:c.find(b=>{const y=hn(this.basepath,u.pathname,{to:b.from,caseSensitive:!1,fuzzy:!1});return y?(g=y,!0):!1});if(v){const{from:b,...y}=v;r={...Fi(s,["from"]),...y,params:g},d=n(r)}}const f=this.getMatchedRoutes(u,o),h=n(o,f);if(d){const g=this.getMatchedRoutes(d,r),v=n(r,g);h.maskedLocation=v}return h};return s.mask?i(s,{...Fi(s,["from"]),...s.mask}):i(s)},this.commitLocation=({viewTransition:s,ignoreBlocker:n,...i})=>{const o=()=>{const u=["key","__TSR_index","__hashScrollIntoViewOptions"];u.forEach(f=>{i.state[f]=this.latestLocation.state[f]});const d=ds(i.state,this.latestLocation.state);return u.forEach(f=>{delete i.state[f]}),d},r=this.latestLocation.href===i.href,c=this.commitLocationPromise;if(this.commitLocationPromise=rs(()=>{c==null||c.resolve()}),r&&o())this.load();else{let{maskedLocation:u,hashScrollIntoView:d,...f}=i;u&&(f={...u,state:{...u.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=d??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=s,this.history[i.replace?"replace":"push"](f.href,f.state,{ignoreBlocker:n})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:s,resetScroll:n,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:r,href:c,...u}={})=>{if(c){const f=this.history.location.state.__TSR_index,h=Js(c,{__TSR_index:s?f:f+1});u.to=h.pathname,u.search=this.options.parseSearch(h.search),u.hash=h.hash.slice(1)}const d=this.buildLocation({...u,_includeValidateSearch:!0});return this.commitLocation({...d,viewTransition:o,replace:s,resetScroll:n,hashScrollIntoView:i,ignoreBlocker:r})},this.navigate=({to:s,reloadDocument:n,href:i,...o})=>{if(n){if(!i){const r=this.buildLocation({to:s,...o});i=this.history.createHref(r.href)}o.replace?window.location.replace(i):window.location.href=i;return}return this.buildAndCommitLocation({...o,href:i,to:s})},this.load=async s=>{this.latestLocation=this.parseLocation(this.latestLocation);let n,i,o;for(o=new Promise(r=>{this.startTransition(async()=>{var c;try{const u=this.latestLocation,d=this.state.resolvedLocation;this.cancelMatches();let f;Qn(()=>{f=this.matchRoutes(u),this.__store.setState(h=>({...h,status:"pending",isLoading:!0,location:u,pendingMatches:f,cachedMatches:h.cachedMatches.filter(g=>!f.find(v=>v.id===g.id))}))}),this.state.redirect||this.emit({type:"onBeforeNavigate",...hs({resolvedLocation:d,location:u})}),this.emit({type:"onBeforeLoad",...hs({resolvedLocation:d,location:u})}),await this.loadMatches({sync:s==null?void 0:s.sync,matches:f,location:u,onReady:async()=>{this.startViewTransition(async()=>{let h,g,v;Qn(()=>{this.__store.setState(b=>{const y=b.matches,_=b.pendingMatches||b.matches;return h=y.filter(S=>!_.find(M=>M.id===S.id)),g=_.filter(S=>!y.find(M=>M.id===S.id)),v=y.filter(S=>_.find(M=>M.id===S.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:_,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...h.filter(S=>S.status!=="error")]}}),this.clearExpiredCache()}),[[h,"onLeave"],[g,"onEnter"],[v,"onStay"]].forEach(([b,y])=>{b.forEach(_=>{var S,M;(M=(S=this.looseRoutesById[_.routeId].options)[y])==null||M.call(S,_)})})})}})}catch(u){Jn(u)?(n=u,this.isServer||this.navigate({...n,replace:!0,ignoreBlocker:!0})):Le(u)&&(i=u),this.__store.setState(d=>({...d,statusCode:n?n.statusCode:i?404:d.matches.some(f=>f.status==="error")?500:200,redirect:n}))}this.latestLoadPromise===o&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),r()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(r=>({...r,statusCode:404}))},this.startViewTransition=s=>{const n=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,n&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;typeof n=="object"&&this.isViewTransitionTypesSupported?i={update:s,types:n.types}:i=s,document.startViewTransition(i)}else s()},this.updateMatch=(s,n)=>{var i;let o;const r=(i=this.state.pendingMatches)==null?void 0:i.find(f=>f.id===s),c=this.state.matches.find(f=>f.id===s),u=this.state.cachedMatches.find(f=>f.id===s),d=r?"pendingMatches":c?"matches":u?"cachedMatches":"";return d&&this.__store.setState(f=>{var h;return{...f,[d]:(h=f[d])==null?void 0:h.map(g=>g.id===s?o=n(g):g)}}),o},this.getMatch=s=>[...this.state.cachedMatches,...this.state.pendingMatches??[],...this.state.matches].find(n=>n.id===s),this.loadMatches=async({location:s,matches:n,preload:i,onReady:o,updateMatch:r=this.updateMatch,sync:c})=>{let u,d=!1;const f=async()=>{d||(d=!0,await(o==null?void 0:o()))},h=v=>!!(i&&!this.state.matches.find(b=>b.id===v));!this.isServer&&!this.state.matches.length&&f();const g=(v,b)=>{var y,_,S,M;if(Jn(b)&&!b.reloadDocument)throw b;if(Dt(b)||Le(b)){if(r(v.id,P=>({...P,status:Dt(b)?"redirected":Le(b)?"notFound":"error",isFetching:!1,error:b,beforeLoadPromise:void 0,loaderPromise:void 0})),b.routeId||(b.routeId=v.routeId),(y=v.beforeLoadPromise)==null||y.resolve(),(_=v.loaderPromise)==null||_.resolve(),(S=v.loadPromise)==null||S.resolve(),Dt(b))throw d=!0,b=this.resolveRedirect({...b,_fromLocation:s}),b;if(Le(b))throw this._handleNotFound(n,b,{updateMatch:r}),(M=this.serverSsr)==null||M.onMatchSettled({router:this,match:this.getMatch(v.id)}),b}};try{await new Promise((v,b)=>{(async()=>{var y,_,S,M;try{const P=(A,I,x)=>{var w,F;const{id:T,routeId:N}=n[A],H=this.looseRoutesById[N];if(I instanceof Promise)throw I;I.routerCode=x,u=u??A,g(this.getMatch(T),I);try{(F=(w=H.options).onError)==null||F.call(w,I)}catch(Q){I=Q,g(this.getMatch(T),I)}r(T,Q=>{var B,z;return(B=Q.beforeLoadPromise)==null||B.resolve(),(z=Q.loadPromise)==null||z.resolve(),{...Q,error:I,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController,beforeLoadPromise:void 0}})};for(const[A,{id:I,routeId:x}]of n.entries()){const w=this.getMatch(I),F=(y=n[A-1])==null?void 0:y.id,T=this.looseRoutesById[x],N=T.options.pendingMs??this.options.defaultPendingMs,H=!!(o&&!this.isServer&&!h(I)&&(T.options.loader||T.options.beforeLoad)&&typeof N=="number"&&N!==1/0&&(T.options.pendingComponent??((_=this.options)==null?void 0:_.defaultPendingComponent)));let Q=!0;if((w.beforeLoadPromise||w.loaderPromise)&&(H&&setTimeout(()=>{try{f()}catch{}},N),await w.beforeLoadPromise,Q=this.getMatch(I).status!=="success"),Q){try{r(I,le=>{const K=le.loadPromise;return{...le,loadPromise:rs(()=>{K==null||K.resolve()}),beforeLoadPromise:rs()}});const B=new AbortController;let z;H&&(z=setTimeout(()=>{try{f()}catch{}},N));const{paramsError:G,searchError:be}=this.getMatch(I);G&&P(A,G,"PARSE_PARAMS"),be&&P(A,be,"VALIDATE_SEARCH");const ve=()=>F?this.getMatch(F).context:this.options.context??{};r(I,le=>({...le,isFetching:"beforeLoad",fetchCount:le.fetchCount+1,abortController:B,pendingTimeout:z,context:{...ve(),...le.__routeContext}}));const{search:ce,params:J,context:Se,cause:ee}=this.getMatch(I),te=h(I),ne={search:ce,abortController:B,params:J,preload:te,context:Se,location:s,navigate:le=>this.navigate({...le,_fromLocation:s}),buildLocation:this.buildLocation,cause:te?"preload":ee,matches:n},ie=await((M=(S=T.options).beforeLoad)==null?void 0:M.call(S,ne))??{};(Dt(ie)||Le(ie))&&P(A,ie,"BEFORE_LOAD"),r(I,le=>({...le,__beforeLoadContext:ie,context:{...ve(),...le.__routeContext,...ie},abortController:B}))}catch(B){P(A,B,"BEFORE_LOAD")}r(I,B=>{var z;return(z=B.beforeLoadPromise)==null||z.resolve(),{...B,beforeLoadPromise:void 0,isFetching:!1}})}}const V=n.slice(0,u),Z=[];V.forEach(({id:A,routeId:I},x)=>{Z.push((async()=>{const{loaderPromise:w}=this.getMatch(A);let F=!1,T=!1;if(w){await w;const N=this.getMatch(A);N.error&&g(N,N.error)}else{const N=Z[x-1],H=this.looseRoutesById[I],Q=()=>{const{params:ee,loaderDeps:te,abortController:ne,context:ie,cause:le}=this.getMatch(A),K=h(A);return{params:ee,deps:te,preload:!!K,parentMatchPromise:N,abortController:ne,context:ie,location:s,navigate:re=>this.navigate({...re,_fromLocation:s}),cause:K?"preload":le,route:H}},B=Date.now()-this.getMatch(A).updatedAt,z=h(A),G=z?H.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:H.options.staleTime??this.options.defaultStaleTime??0,be=H.options.shouldReload,ve=typeof be=="function"?be(Q()):be;r(A,ee=>({...ee,loaderPromise:rs(),preload:!!z&&!this.state.matches.find(te=>te.id===A)}));const ce=async()=>{var ee,te,ne,ie,le,K,re,It,Ge,Nt,ts;try{const qe=async()=>{const pe=this.getMatch(A);pe.minPendingPromise&&await pe.minPendingPromise};try{this.loadRouteChunk(H),r(A,Ft=>({...Ft,isFetching:"loader"}));const pe=await((te=(ee=H.options).loader)==null?void 0:te.call(ee,Q()));g(this.getMatch(A),pe),await H._lazyPromise,await qe();const je={matches:n,match:this.getMatch(A),params:this.getMatch(A).params,loaderData:pe},me=(ie=(ne=H.options).head)==null?void 0:ie.call(ne,je),ss=me==null?void 0:me.meta,an=me==null?void 0:me.links,on=me==null?void 0:me.scripts,Y=(K=(le=H.options).scripts)==null?void 0:K.call(le,je),se=(It=(re=H.options).headers)==null?void 0:It.call(re,{loaderData:pe});r(A,Ft=>({...Ft,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:pe,meta:ss,links:an,headScripts:on,headers:se,scripts:Y}))}catch(pe){let je=pe;await qe(),g(this.getMatch(A),pe);try{(Nt=(Ge=H.options).onError)==null||Nt.call(Ge,pe)}catch(me){je=me,g(this.getMatch(A),me)}r(A,me=>({...me,error:je,status:"error",isFetching:!1}))}(ts=this.serverSsr)==null||ts.onMatchSettled({router:this,match:this.getMatch(A)}),await H._componentsPromise}catch(qe){r(A,pe=>({...pe,loaderPromise:void 0})),g(this.getMatch(A),qe)}},{status:J,invalid:Se}=this.getMatch(A);F=J==="success"&&(Se||(ve??B>G)),z&&H.options.preload===!1||(F&&!c?(T=!0,(async()=>{try{await ce();const{loaderPromise:ee,loadPromise:te}=this.getMatch(A);ee==null||ee.resolve(),te==null||te.resolve(),r(A,ne=>({...ne,loaderPromise:void 0}))}catch(ee){Jn(ee)&&await this.navigate(ee)}})()):(J!=="success"||F&&c)&&await ce())}if(!T){const{loaderPromise:N,loadPromise:H}=this.getMatch(A);N==null||N.resolve(),H==null||H.resolve()}return r(A,N=>({...N,isFetching:T?N.isFetching:!1,loaderPromise:T?N.loaderPromise:void 0,invalid:!1})),this.getMatch(A)})())}),await Promise.all(Z),v()}catch(P){b(P)}})()}),await f()}catch(v){if(Dt(v)||Le(v))throw Le(v)&&!i&&await f(),v}return n},this.invalidate=s=>{const n=i=>{var o;return((o=s==null?void 0:s.filter)==null?void 0:o.call(s,i))??!0?{...i,invalid:!0,...i.status==="error"?{status:"pending",error:void 0}:{}}:i};return this.__store.setState(i=>{var o;return{...i,matches:i.matches.map(n),cachedMatches:i.cachedMatches.map(n),pendingMatches:(o=i.pendingMatches)==null?void 0:o.map(n)}}),this.load({sync:s==null?void 0:s.sync})},this.resolveRedirect=s=>{const n=s;return n.href||(n.href=this.buildLocation(n).href),n},this.clearCache=s=>{const n=s==null?void 0:s.filter;n!==void 0?this.__store.setState(i=>({...i,cachedMatches:i.cachedMatches.filter(o=>!n(o))})):this.__store.setState(i=>({...i,cachedMatches:[]}))},this.clearExpiredCache=()=>{const s=n=>{const i=this.looseRoutesById[n.routeId];if(!i.options.loader)return!0;const o=(n.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return!(n.status!=="error"&&Date.now()-n.updatedAt<o)};this.clearCache({filter:s})},this.loadRouteChunk=s=>(s._lazyPromise===void 0&&(s.lazyFn?s._lazyPromise=s.lazyFn().then(n=>{const{id:i,...o}=n.options;Object.assign(s.options,o)}):s._lazyPromise=Promise.resolve()),s._componentsPromise===void 0&&(s._componentsPromise=s._lazyPromise.then(()=>Promise.all(Ya.map(async n=>{const i=s.options[n];i!=null&&i.preload&&await i.preload()})))),s._componentsPromise),this.preloadRoute=async s=>{const n=this.buildLocation(s);let i=this.matchRoutes(n,{throwOnError:!0,preload:!0,dest:s});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),r=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);Qn(()=>{i.forEach(c=>{r.has(c.id)||this.__store.setState(u=>({...u,cachedMatches:[...u.cachedMatches,c]}))})});try{return i=await this.loadMatches({matches:i,location:n,preload:!0,updateMatch:(c,u)=>{o.has(c)?i=i.map(d=>d.id===c?u(d):d):this.updateMatch(c,u)}}),i}catch(c){if(Dt(c))return c.reloadDocument?void 0:await this.preloadRoute({...c,_fromLocation:n});Le(c)||console.error(c);return}},this.matchRoute=(s,n)=>{const i={...s,to:s.to?this.resolvePathWithBase(s.from||"",s.to):void 0,params:s.params||{},leaveParams:!0},o=this.buildLocation(i);if(n!=null&&n.pending&&this.state.status!=="pending")return!1;const c=((n==null?void 0:n.pending)===void 0?!this.state.isLoading:n.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,u=hn(this.basepath,c.pathname,{...n,to:o.pathname});return!u||s.params&&!ds(u,s.params,{partial:!0})?!1:u&&((n==null?void 0:n.includeSearch)??!0)?ds(c.search,o.search,{partial:!0})?u:!1:u},this._handleNotFound=(s,n,{updateMatch:i=this.updateMatch}={})=>{var o;const r=this.routesById[n.routeId??""]??this.routeTree,c={};for(const d of s)c[d.routeId]=d;!r.options.notFoundComponent&&((o=this.options)!=null&&o.defaultNotFoundComponent)&&(r.options.notFoundComponent=this.options.defaultNotFoundComponent),tt(r.options.notFoundComponent);const u=c[r.id];tt(u,"Could not find match for route: "+r.id),i(u.id,d=>({...d,status:"notFound",error:n,isFetching:!1})),n.routerCode==="BEFORE_LOAD"&&r.parentRoute&&(n.routeId=r.parentRoute.id,this._handleNotFound(s,n,{updateMatch:i}))},this.hasNotFoundMatch=()=>this.__store.state.matches.some(s=>s.status==="notFound"||s.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Ll,parseSearch:t.parseSearch??Ol}),typeof document<"u"&&(window.__TSR_ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,s){const{foundRoute:n,matchedRoutes:i,routeParams:o}=this.getMatchedRoutes(t,s==null?void 0:s.dest);let r=!1;(n?n.path!=="/"&&o["**"]:Ut(t.pathname))&&(this.options.notFoundRoute?i.push(this.options.notFoundRoute):r=!0);const c=(()=>{if(r){if(this.options.notFoundMode!=="root")for(let h=i.length-1;h>=0;h--){const g=i[h];if(g.children)return g.id}return De}})(),u=i.map(h=>{var g;let v;const b=((g=h.options.params)==null?void 0:g.parse)??h.options.parseParams;if(b)try{const y=b(o);Object.assign(o,y)}catch(y){if(v=new Hl(y.message,{cause:y}),s!=null&&s.throwOnError)throw v;return v}}),d=[],f=h=>(h==null?void 0:h.id)?h.context??this.options.context??{}:this.options.context??{};return i.forEach((h,g)=>{var v,b;const y=d[g-1],[_,S,M]=(()=>{const H=(y==null?void 0:y.search)??t.search,Q=(y==null?void 0:y._strictSearch)??{};try{const B=Yn(h.options.validateSearch,{...H})??{};return[{...H,...B},{...Q,...B},void 0]}catch(B){let z=B;if(B instanceof An||(z=new An(B.message,{cause:B})),s!=null&&s.throwOnError)throw z;return[H,{},z]}})(),P=((b=(v=h.options).loaderDeps)==null?void 0:b.call(v,{search:_}))??"",V=P?JSON.stringify(P):"",{usedParams:Z,interpolatedPath:A}=dn({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),I=dn({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath+V,x=this.getMatch(I),w=this.state.matches.find(H=>H.routeId===h.id),F=w?"stay":"enter";let T;if(x)T={...x,cause:F,params:w?Pe(w.params,o):o,_strictParams:Z,search:Pe(w?w.search:x.search,_),_strictSearch:S};else{const H=h.options.loader||h.options.beforeLoad||h.lazyFn||Dl(h)?"pending":"success";T={id:I,index:g,routeId:h.id,params:w?Pe(w.params,o):o,_strictParams:Z,pathname:it([this.basepath,A]),updatedAt:Date.now(),search:w?Pe(w.search,_):_,_strictSearch:S,searchError:void 0,status:H,isFetching:!1,error:void 0,paramsError:u[g],__routeContext:{},__beforeLoadContext:{},context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:w?Pe(w.loaderDeps,P):P,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},loadPromise:rs(),fullPath:h.fullPath}}s!=null&&s.preload||(T.globalNotFound=c===h.id),T.searchError=M;const N=f(y);T.context={...N,...T.__routeContext,...T.__beforeLoadContext},d.push(T)}),d.forEach((h,g)=>{var v,b,y,_,S,M,P,V;const Z=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&(s==null?void 0:s._buildLocation)!==!0){const I=d[g-1],x=f(I),w={deps:h.loaderDeps,params:h.params,context:x,location:t,navigate:F=>this.navigate({...F,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:d};h.__routeContext=((b=(v=Z.options).context)==null?void 0:b.call(v,w))??{},h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}if(h.status==="success"){h.headers=(_=(y=Z.options).headers)==null?void 0:_.call(y,{loaderData:h.loaderData});const I={matches:d,match:h,params:h.params,loaderData:h.loaderData},x=(M=(S=Z.options).head)==null?void 0:M.call(S,I);h.links=x==null?void 0:x.links,h.headScripts=x==null?void 0:x.scripts,h.meta=x==null?void 0:x.meta,h.scripts=(V=(P=Z.options).scripts)==null?void 0:V.call(P,I)}}),d}}class An extends Error{}class Hl extends Error{}function Tl(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Yn(e,t){if(e==null)return{};if("~standard"in e){const s=e["~standard"].validate(t);if(s instanceof Promise)throw new An("Async validation not supported");if(s.issues)throw new An(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}const Ya=["component","errorComponent","pendingComponent","notFoundComponent"];function Dl(e){var t;for(const s of Ya)if((t=e.options[s])!=null&&t.preload)return!0;return!1}const Vl="Error preloading route! ☝️";class Xa{constructor(t){if(this.init=s=>{var n,i;this.originalIndex=s.originalIndex;const o=this.options,r=!(o!=null&&o.path)&&!(o!=null&&o.id);if(this.parentRoute=(i=(n=this.options).getParentRoute)==null?void 0:i.call(n),r)this._path=De;else if(!this.parentRoute)throw new Error("Child Route instances must pass a 'getParentRoute: () => ParentRoute' option that returns a Route instance.");let c=r?De:o==null?void 0:o.path;c&&c!=="/"&&(c=Xi(c));const u=(o==null?void 0:o.id)||c;let d=r?De:it([this.parentRoute.id===De?"":this.parentRoute.id,u]);c===De&&(c="/"),d!==De&&(d=it(["/",d]));const f=d===De?"/":it([this.parentRoute.fullPath,c]);this._path=c,this._id=d,this._fullPath=f,this._to=f,this._ssr=(o==null?void 0:o.ssr)??s.defaultSsr??!0},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),t!=null&&t.id&&(t!=null&&t.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}get ssr(){return this._ssr}}class Zl extends Xa{constructor(t){super(t)}}function er(e){const t=e.errorComponent??Hn;return a.jsx(Ul,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:s,reset:n})=>s?p.createElement(t,{error:s,reset:n}):e.children})}class Ul extends p.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,s){s.error&&s.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,s){this.props.onCatch&&this.props.onCatch(t,s)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Hn({error:e}){const[t,s]=p.useState(!1);return a.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[a.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),a.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(n=>!n),children:t?"Hide Error":"Show Error"})]}),a.jsx("div",{style:{height:".25rem"}}),t?a.jsx("div",{children:a.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?a.jsx("code",{children:e.message}):null})}):null]})}var Xn={exports:{}},ei={},ti={exports:{}},si={};/**
|
|
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 Ir;function ql(){if(Ir)return si;Ir=1;var e=wa();function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var s=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,r=e.useDebugValue;function c(h,g){var v=g(),b=n({inst:{value:v,getSnapshot:g}}),y=b[0].inst,_=b[1];return o(function(){y.value=v,y.getSnapshot=g,u(y)&&_({inst:y})},[h,v,g]),i(function(){return u(y)&&_({inst:y}),h(function(){u(y)&&_({inst:y})})},[h]),r(v),v}function u(h){var g=h.getSnapshot;h=h.value;try{var v=g();return!s(h,v)}catch{return!0}}function d(h,g){return g()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return si.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,si}var Nr;function Bl(){return Nr||(Nr=1,ti.exports=ql()),ti.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 Fr;function $l(){if(Fr)return ei;Fr=1;var e=wa(),t=Bl();function s(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:s,i=t.useSyncExternalStore,o=e.useRef,r=e.useEffect,c=e.useMemo,u=e.useDebugValue;return ei.useSyncExternalStoreWithSelector=function(d,f,h,g,v){var b=o(null);if(b.current===null){var y={hasValue:!1,value:null};b.current=y}else y=b.current;b=c(function(){function S(A){if(!M){if(M=!0,P=A,A=g(A),v!==void 0&&y.hasValue){var I=y.value;if(v(I,A))return V=I}return V=A}if(I=V,n(P,A))return I;var x=g(A);return v!==void 0&&v(I,x)?(P=A,I):(P=A,V=x)}var M=!1,P,V,Z=h===void 0?null:h;return[function(){return S(f())},Z===null?void 0:function(){return S(Z())}]},[f,h,g,v]);var _=i(d,b[0],b[1]);return r(function(){y.hasValue=!0,y.value=_},[_]),u(_),_},ei}var Hr;function zl(){return Hr||(Hr=1,Xn.exports=$l()),Xn.exports}var Kl=zl();function Wl(e,t=s=>s){return Kl.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,Ql)}function Ql(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,i]of e)if(!t.has(n)||!Object.is(i,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!1;for(let n=0;n<s.length;n++)if(!Object.prototype.hasOwnProperty.call(t,s[n])||!Object.is(e[s[n]],t[s[n]]))return!1;return!0}const ni=p.createContext(null);function eo(){return typeof document>"u"?ni:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=ni,ni)}function Fe(e){const t=p.useContext(eo());return e==null||e.warn,t}function ge(e){const t=Fe({warn:(e==null?void 0:e.router)===void 0}),s=(e==null?void 0:e.router)||t,n=p.useRef(void 0);return Wl(s.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??s.options.defaultStructuralSharing){const o=Pe(n.current,e.select(i));return n.current=o,o}return e.select(i)}return i})}const Tn=p.createContext(void 0),Gl=p.createContext(void 0);function Pt(e){const t=p.useContext(e.from?Gl:Tn);return ge({select:n=>{const i=n.matches.find(o=>e.from?e.from===o.routeId:o.id===t);if(tt(!((e.shouldThrow??!0)&&!i),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),i!==void 0)return e.select?e.select(i):i},structuralSharing:e.structuralSharing})}function to(e){return Pt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function so(e){const{select:t,...s}=e;return Pt({...s,select:n=>t?t(n.loaderDeps):n.loaderDeps})}function no(e){return Pt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.params):t.params})}function io(e){return Pt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function ro(e){const{navigate:t}=Fe();return p.useCallback(s=>t({from:e==null?void 0:e.from,...s}),[e==null?void 0:e.from,t])}let Jl=class extends Xa{constructor(t){super(t),this.useMatch=s=>Pt({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>Pt({...s,from:this.id,select:n=>s!=null&&s.select?s.select(n.context):n.context}),this.useSearch=s=>io({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>no({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>so({...s,from:this.id}),this.useLoaderData=s=>to({...s,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Ti(e){return new Jl(e)}let Yl=class extends Zl{constructor(t){super(t),this.useMatch=s=>Pt({select:s==null?void 0:s.select,from:this.id,structuralSharing:s==null?void 0:s.structuralSharing}),this.useRouteContext=s=>Pt({...s,from:this.id,select:n=>s!=null&&s.select?s.select(n.context):n.context}),this.useSearch=s=>io({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useParams=s=>no({select:s==null?void 0:s.select,structuralSharing:s==null?void 0:s.structuralSharing,from:this.id}),this.useLoaderDeps=s=>so({...s,from:this.id}),this.useLoaderData=s=>to({...s,from:this.id}),this.useNavigate=()=>ro({from:this.fullPath}),this.$$typeof=Symbol.for("react.memo")}};function Xl(e){return new Yl(e)}function eu(e){const t=ge({select:s=>`not-found-${s.location.pathname}-${s.status}`});return a.jsx(er,{getResetKey:()=>t,onCatch:(s,n)=>{var i;if(Le(s))(i=e.onCatch)==null||i.call(e,s,n);else throw s},errorComponent:({error:s})=>{var n;if(Le(s))return(n=e.fallback)==null?void 0:n.call(e,s);throw s},children:e.children})}function tu(){return a.jsx("p",{children:"Not Found"})}function wn(e){return a.jsx(a.Fragment,{children:e.children})}function ao(e,t,s){return t.options.notFoundComponent?a.jsx(t.options.notFoundComponent,{data:s}):e.options.defaultNotFoundComponent?a.jsx(e.options.defaultNotFoundComponent,{data:s}):a.jsx(tu,{})}var ii,Tr;function su(){if(Tr)return ii;Tr=1;const e={},t=e.hasOwnProperty,s=(x,w)=>{for(const F in x)t.call(x,F)&&w(F,x[F])},n=(x,w)=>(w&&s(w,(F,T)=>{x[F]=T}),x),i=(x,w)=>{const F=x.length;let T=-1;for(;++T<F;)w(x[T])},o=x=>"\\u"+("0000"+x).slice(-4),r=(x,w)=>{let F=x.toString(16);return w?F:F.toUpperCase()},c=e.toString,u=Array.isArray,d=x=>typeof Buffer=="function"&&Buffer.isBuffer(x),f=x=>c.call(x)=="[object Object]",h=x=>typeof x=="string"||c.call(x)=="[object String]",g=x=>typeof x=="number"||c.call(x)=="[object Number]",v=x=>typeof x=="bigint",b=x=>typeof x=="function",y=x=>c.call(x)=="[object Map]",_=x=>c.call(x)=="[object Set]",S={"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"},M=/[\\\b\f\n\r\t]/,P=/[0-9]/,V=/[\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,Z=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^]/g,A=/([\uD800-\uDBFF][\uDC00-\uDFFF])|([\uD800-\uDFFF])|(['"`])|[^ !#-&\(-\[\]-_a-~]/g,I=(x,w)=>{const F=()=>{G=z,++w.indentLevel,z=w.indent.repeat(w.indentLevel)},T={escapeEverything:!1,minimal:!1,isScriptContext:!1,quotes:"single",wrap:!1,es6:!1,json:!1,compact:!0,lowercaseHex:!1,numbers:"decimal",indent:" ",indentLevel:0,__inline1__:!1,__inline2__:!1},N=w&&w.json;N&&(T.quotes="double",T.wrap=!0),w=n(T,w),w.quotes!="single"&&w.quotes!="double"&&w.quotes!="backtick"&&(w.quotes="single");const H=w.quotes=="double"?'"':w.quotes=="backtick"?"`":"'",Q=w.compact,B=w.lowercaseHex;let z=w.indent.repeat(w.indentLevel),G="";const be=w.__inline1__,ve=w.__inline2__,ce=Q?"":`
|
|
18
|
+
`;let J,Se=!0;const ee=w.numbers=="binary",te=w.numbers=="octal",ne=w.numbers=="decimal",ie=w.numbers=="hexadecimal";if(N&&x&&b(x.toJSON)&&(x=x.toJSON()),!h(x)){if(y(x))return x.size==0?"new Map()":(Q||(w.__inline1__=!0,w.__inline2__=!1),"new Map("+I(Array.from(x),w)+")");if(_(x))return x.size==0?"new Set()":"new Set("+I(Array.from(x),w)+")";if(d(x))return x.length==0?"Buffer.from([])":"Buffer.from("+I(Array.from(x),w)+")";if(u(x))return J=[],w.wrap=!0,be&&(w.__inline1__=!1,w.__inline2__=!0),ve||F(),i(x,K=>{Se=!1,ve&&(w.__inline2__=!1),J.push((Q||ve?"":z)+I(K,w))}),Se?"[]":ve?"["+J.join(", ")+"]":"["+ce+J.join(","+ce)+ce+(Q?"":G)+"]";if(g(x)||v(x)){if(N)return JSON.stringify(Number(x));let K;if(ne)K=String(x);else if(ie){let re=x.toString(16);B||(re=re.toUpperCase()),K="0x"+re}else ee?K="0b"+x.toString(2):te&&(K="0o"+x.toString(8));return v(x)?K+"n":K}else return v(x)?N?JSON.stringify(Number(x)):x+"n":f(x)?(J=[],w.wrap=!0,F(),s(x,(K,re)=>{Se=!1,J.push((Q?"":z)+I(K,w)+":"+(Q?"":" ")+I(re,w))}),Se?"{}":"{"+ce+J.join(","+ce)+ce+(Q?"":G)+"}"):N?JSON.stringify(x)||"null":String(x)}const le=w.escapeEverything?Z:A;return J=x.replace(le,(K,re,It,Ge,Nt,ts)=>{if(re){if(w.minimal)return re;const pe=re.charCodeAt(0),je=re.charCodeAt(1);if(w.es6){const me=(pe-55296)*1024+je-56320+65536;return"\\u{"+r(me,B)+"}"}return o(r(pe,B))+o(r(je,B))}if(It)return o(r(It.charCodeAt(0),B));if(K=="\0"&&!N&&!P.test(ts.charAt(Nt+1)))return"\\0";if(Ge)return Ge==H||w.escapeEverything?"\\"+Ge:Ge;if(M.test(K))return S[K];if(w.minimal&&!V.test(K))return K;const qe=r(K.charCodeAt(0),B);return N||qe.length>2?o(qe):"\\x"+("00"+qe).slice(-2)}),H=="`"&&(J=J.replace(/\$\{/g,"\\${")),w.isScriptContext&&(J=J.replace(/<\/(script|style)/gi,"<\\/$1").replace(/<!--/g,N?"\\u003C!--":"\\x3C!--")),w.wrap&&(J=H+J+H),J};return I.version="3.0.2",ii=I,ii}su();function nu({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 iu(){const e=Fe(),s=(e.options.getScrollRestorationKey||Hi)(e.latestLocation),n=s!==Hi(e.latestLocation)?s:null;return!e.isScrollRestoring||!e.isServer?null:a.jsx(nu,{children:`(${Ja.toString()})(${JSON.stringify(Cn)},${JSON.stringify(n)}, undefined, true)`,log:!1})}const oo=p.memo(function({matchId:t}){var s,n;const i=Fe(),o=ge({select:S=>{var M;return(M=S.matches.find(P=>P.id===t))==null?void 0:M.routeId}});tt(o);const r=i.routesById[o],c=r.options.pendingComponent??i.options.defaultPendingComponent,u=c?a.jsx(c,{}):null,d=r.options.errorComponent??i.options.defaultErrorComponent,f=r.options.onCatch??i.options.defaultOnCatch,h=r.isRoot?r.options.notFoundComponent??((s=i.options.notFoundRoute)==null?void 0:s.options.component):r.options.notFoundComponent,g=(!r.isRoot||r.options.wrapInSuspense)&&(r.options.wrapInSuspense??c??((n=r.options.errorComponent)==null?void 0:n.preload))?p.Suspense:wn,v=d?er:wn,b=h?eu:wn,y=ge({select:S=>S.loadedAt}),_=ge({select:S=>{var M;const P=S.matches.findIndex(V=>V.id===t);return(M=S.matches[P-1])==null?void 0:M.routeId}});return a.jsxs(a.Fragment,{children:[a.jsx(Tn.Provider,{value:t,children:a.jsx(g,{fallback:u,children:a.jsx(v,{getResetKey:()=>y,errorComponent:d||Hn,onCatch:(S,M)=>{if(Le(S))throw S;f==null||f(S,M)},children:a.jsx(b,{fallback:S=>{if(!h||S.routeId&&S.routeId!==o||!S.routeId&&!r.isRoot)throw S;return p.createElement(h,S)},children:a.jsx(au,{matchId:t})})})})}),_===De&&i.options.scrollRestoration?a.jsxs(a.Fragment,{children:[a.jsx(ru,{}),a.jsx(iu,{})]}):null]})});function ru(){var e;const t=Fe(),s=p.useRef(void 0);return a.jsx("script",{suppressHydrationWarning:!0,ref:n=>{var i;n&&(s.current===void 0||s.current.href!==((i=t.state.resolvedLocation)==null?void 0:i.href))&&(t.emit({type:"onRendered",...hs(t.state)}),s.current=t.state.resolvedLocation)}},(e=t.state.resolvedLocation)==null?void 0:e.state.key)}const au=p.memo(function({matchId:t}){var s,n,i;const o=Fe(),{match:r,key:c,routeId:u}=ge({select:g=>{const v=g.matches.findIndex(P=>P.id===t),b=g.matches[v],y=b.routeId,_=o.routesById[y].options.remountDeps??o.options.defaultRemountDeps,S=_==null?void 0:_({routeId:y,loaderDeps:b.loaderDeps,params:b._strictParams,search:b._strictSearch});return{key:S?JSON.stringify(S):void 0,routeId:y,match:Fi(b,["id","status","error"])}},structuralSharing:!0}),d=o.routesById[u],f=p.useMemo(()=>{const g=d.options.component??o.options.defaultComponent;return g?a.jsx(g,{},c):a.jsx(tr,{})},[c,d.options.component,o.options.defaultComponent]),h=(d.options.errorComponent??o.options.defaultErrorComponent)||Hn;if(r.status==="notFound")return tt(Le(r.error)),ao(o,d,r.error);if(r.status==="redirected")throw tt(Dt(r.error)),(s=o.getMatch(r.id))==null?void 0:s.loadPromise;if(r.status==="error"){if(o.isServer)return a.jsx(h,{error:r.error,reset:void 0,info:{componentStack:""}});throw r.error}if(r.status==="pending"){const g=d.options.pendingMinMs??o.options.defaultPendingMinMs;if(g&&!((n=o.getMatch(r.id))!=null&&n.minPendingPromise)&&!o.isServer){const v=rs();Promise.resolve().then(()=>{o.updateMatch(r.id,b=>({...b,minPendingPromise:v}))}),setTimeout(()=>{v.resolve(),o.updateMatch(r.id,b=>({...b,minPendingPromise:void 0}))},g)}throw(i=o.getMatch(r.id))==null?void 0:i.loadPromise}return f}),tr=p.memo(function(){const t=Fe(),s=p.useContext(Tn),n=ge({select:d=>{var f;return(f=d.matches.find(h=>h.id===s))==null?void 0:f.routeId}}),i=t.routesById[n],o=ge({select:d=>{const h=d.matches.find(g=>g.id===s);return tt(h),h.globalNotFound}}),r=ge({select:d=>{var f;const h=d.matches,g=h.findIndex(v=>v.id===s);return(f=h[g+1])==null?void 0:f.id}});if(o)return ao(t,i,void 0);if(!r)return null;const c=a.jsx(oo,{matchId:r}),u=t.options.defaultPendingComponent?a.jsx(t.options.defaultPendingComponent,{}):null;return s===De?a.jsx(p.Suspense,{fallback:u,children:c}):c}),$s=typeof window<"u"?p.useLayoutEffect:p.useEffect;function ri(e){const t=p.useRef({value:e,prev:null}),s=t.current.value;return e!==s&&(t.current={value:e,prev:s}),t.current.prev}function ou(e,t,s={},n={}){const i=p.useRef(typeof IntersectionObserver=="function"),o=p.useRef(null);return p.useEffect(()=>{if(!(!e.current||!i.current||n.disabled))return o.current=new IntersectionObserver(([r])=>{t(r)},s),o.current.observe(e.current),()=>{var r;(r=o.current)==null||r.disconnect()}},[t,s,n.disabled,e]),o.current}function cu(e){const t=p.useRef(null);return p.useImperativeHandle(e,()=>t.current,[]),t}function lu(){const e=Fe(),t=p.useRef({router:e,mounted:!1}),s=ge({select:({isLoading:h})=>h}),[n,i]=p.useState(!1),o=ge({select:h=>h.matches.some(g=>g.status==="pending"),structuralSharing:!0}),r=ri(s),c=s||n||o,u=ri(c),d=s||o,f=ri(d);return e.isServer||(e.startTransition=h=>{i(!0),p.startTransition(()=>{h(),i(!1)})}),p.useEffect(()=>{const h=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ut(e.latestLocation.href)!==Ut(g.href)&&e.commitLocation({...g,replace:!0}),()=>{h()}},[e,e.history]),$s(()=>{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(g){console.error(g)}})()},[e]),$s(()=>{r&&!s&&e.emit({type:"onLoad",...hs(e.state)})},[r,e,s]),$s(()=>{f&&!d&&e.emit({type:"onBeforeRouteMount",...hs(e.state)})},[d,f,e]),$s(()=>{u&&!c&&(e.emit({type:"onResolved",...hs(e.state)}),e.__store.setState(h=>({...h,status:"idle",resolvedLocation:h.location})),Al(e))},[c,u,e]),null}function uu(){const e=Fe(),t=e.options.defaultPendingComponent?a.jsx(e.options.defaultPendingComponent,{}):null,s=e.isServer||typeof document<"u"&&e.clientSsr?wn:p.Suspense,n=a.jsxs(s,{fallback:t,children:[a.jsx(lu,{}),a.jsx(du,{})]});return e.options.InnerWrap?a.jsx(e.options.InnerWrap,{children:n}):n}function du(){const e=ge({select:s=>{var n;return(n=s.matches[0])==null?void 0:n.id}}),t=ge({select:s=>s.loadedAt});return a.jsx(Tn.Provider,{value:e,children:a.jsx(er,{getResetKey:()=>t,errorComponent:Hn,onCatch:s=>{s.message||s.toString()},children:e?a.jsx(oo,{matchId:e}):null})})}function hu(e){return ge({select:t=>{const s=t.matches;return e!=null&&e.select?e.select(s):s},structuralSharing:e==null?void 0:e.structuralSharing})}function fu(e,t){const s=Fe(),[n,i]=p.useState(!1),o=p.useRef(!1),r=cu(t),{activeProps:c=()=>({className:"active"}),inactiveProps:u=()=>({}),activeOptions:d,to:f,preload:h,preloadDelay:g,hashScrollIntoView:v,replace:b,startTransition:y,resetScroll:_,viewTransition:S,children:M,target:P,disabled:V,style:Z,className:A,onClick:I,onFocus:x,onMouseEnter:w,onMouseLeave:F,onTouchStart:T,ignoreBlocker:N,...H}=e,{params:Q,search:B,hash:z,state:G,mask:be,reloadDocument:ve,...ce}=H,J=p.useMemo(()=>{try{return new URL(`${f}`),"external"}catch{}return"internal"},[f]),Se=ge({select:Y=>Y.location.search,structuralSharing:!0}),ee=hu({select:Y=>{var se;return e.from??((se=Y[Y.length-1])==null?void 0:se.fullPath)}}),te=p.useMemo(()=>({...e,from:ee}),[e,ee]),ne=p.useMemo(()=>s.buildLocation(te),[s,te,Se]),ie=p.useMemo(()=>te.reloadDocument?!1:h??s.options.defaultPreload,[s.options.defaultPreload,h,te.reloadDocument]),le=g??s.options.defaultPreloadDelay??0,K=ge({select:Y=>{if(d!=null&&d.exact){if(!_l(Y.location.pathname,ne.pathname,s.basepath))return!1}else{const se=En(Y.location.pathname,s.basepath).split("/");if(!En(ne.pathname,s.basepath).split("/").every((Ko,Wo)=>Ko===se[Wo]))return!1}return((d==null?void 0:d.includeSearch)??!0)&&!ds(Y.location.search,ne.search,{partial:!(d!=null&&d.exact),ignoreUndefined:!(d!=null&&d.explicitUndefined)})?!1:d!=null&&d.includeHash?Y.location.hash===ne.hash:!0}}),re=p.useCallback(()=>{s.preloadRoute(te).catch(Y=>{console.warn(Y),console.warn(Vl)})},[te,s]),It=p.useCallback(Y=>{Y!=null&&Y.isIntersecting&&re()},[re]);if(ou(r,It,{rootMargin:"100px"},{disabled:!!V||ie!=="viewport"}),$s(()=>{o.current||!V&&ie==="render"&&(re(),o.current=!0)},[V,re,ie]),J==="external")return{...ce,ref:r,type:J,href:f,...M&&{children:M},...P&&{target:P},...V&&{disabled:V},...Z&&{style:Z},...A&&{className:A},...I&&{onClick:I},...x&&{onFocus:x},...w&&{onMouseEnter:w},...F&&{onMouseLeave:F},...T&&{onTouchStart:T}};const Ge=Y=>{if(!V&&!pu(Y)&&!Y.defaultPrevented&&(!P||P==="_self")&&Y.button===0){Y.preventDefault(),tc.flushSync(()=>{i(!0)});const se=s.subscribe("onResolved",()=>{se(),i(!1)});return s.navigate({...te,replace:b,resetScroll:_,hashScrollIntoView:v,startTransition:y,viewTransition:S,ignoreBlocker:N})}},Nt=Y=>{V||ie&&re()},ts=Nt,qe=Y=>{if(V)return;const se=Y.target||{};if(ie){if(se.preloadTimeout)return;se.preloadTimeout=setTimeout(()=>{se.preloadTimeout=null,re()},le)}},pe=Y=>{if(V)return;const se=Y.target||{};se.preloadTimeout&&(clearTimeout(se.preloadTimeout),se.preloadTimeout=null)},je=Y=>se=>{var Ft;(Ft=se.persist)==null||Ft.call(se),Y.filter(Boolean).forEach(yr=>{se.defaultPrevented||yr(se)})},me=K?Zt(c,{})??{}:{},ss=K?{}:Zt(u,{}),an=[A,me.className,ss.className].filter(Boolean).join(" "),on={...Z,...me.style,...ss.style};return{...ce,...me,...ss,href:V?void 0:ne.maskedLocation?s.history.createHref(ne.maskedLocation.href):s.history.createHref(ne.href),ref:r,onClick:je([I,Ge]),onFocus:je([x,Nt]),onMouseEnter:je([w,qe]),onMouseLeave:je([F,pe]),onTouchStart:je([T,ts]),disabled:!!V,target:P,...Object.keys(on).length&&{style:on},...an&&{className:an},...V&&{role:"link","aria-disabled":!0},...K&&{"data-status":"active","aria-current":"page"},...n&&{"data-transitioning":"transitioning"}}}const Pn=p.forwardRef((e,t)=>{const{_asChild:s,...n}=e,{type:i,ref:o,...r}=fu(n,t),c=typeof n.children=="function"?n.children({isActive:r["data-status"]==="active"}):n.children;return typeof s>"u"&&delete r.disabled,p.createElement(s||"a",{...r,ref:o},c)});function pu(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}const mu=e=>new gu(e);class gu extends Fl{constructor(t){super(t)}}function vu({router:e,children:t,...s}){e.update({...e.options,...s,context:{...e.options.context,...s.context}});const n=eo(),i=a.jsx(n.Provider,{value:e,children:t});return e.options.Wrap?a.jsx(e.options.Wrap,{children:i}):i}function yu({router:e,...t}){return a.jsx(vu,{router:e,...t,children:a.jsx(uu,{})})}const bu=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"}))]]),wu=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"}))]]),xu=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"}))]]),_u=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"}))]]),Su=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"}))]]),ju=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"}))]]),Eu=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"}))]]),Ru=new Map([["bold",p.createElement(p.Fragment,null,p.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",p.createElement(p.Fragment,null,p.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",p.createElement(p.Fragment,null,p.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",p.createElement(p.Fragment,null,p.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",p.createElement(p.Fragment,null,p.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",p.createElement(p.Fragment,null,p.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),Cu=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"}))]]),co=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:bu}));co.displayName="ArrowLeftIcon";const lo=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:wu}));lo.displayName="CopyIcon";const uo=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:xu}));uo.displayName="DevicesIcon";const ho=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:_u}));ho.displayName="GlobeIcon";const fo=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:Su}));fo.displayName="HouseSimpleIcon";const po=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:ju}));po.displayName="LockIcon";const mo=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:Eu}));mo.displayName="PaintBucketIcon";const go=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:Ru}));go.displayName="PaperPlaneTiltIcon";const vo=p.forwardRef((e,t)=>p.createElement(ct,{ref:t,...e,weights:Cu}));vo.displayName="ShieldWarningIcon";function ku(){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"})]})]})}function yo({account:e,className:t,children:s,...n}){return a.jsxs("div",{className:Jt("flex max-w-full flex-col items-center justify-start gap-2",t),...n,children:[a.jsx(_a,{account:e,size:"3xl",className:"max-w-full"}),e.name&&a.jsx(sc,{account:e,className:"text-text-default max-w-full truncate text-xl font-medium"}),a.jsx(Sa,{account:e,className:"text-md text-text-light max-w-full truncate"}),s]})}function Au(e){const{i18n:t,_:s}=de(),{session:n,canSwitchAccounts:i}=nc(),{setSession:o,api:r}=$i();return a.jsxs(ja,{children:[a.jsx(Ea,{asChild:!0,children:a.jsx(Ne,{"aria-label":t._({id:"1D3nu5"}),shape:"circle",transparent:!0,color:"gray",...e,children:a.jsx(_a,{account:n.account,size:e.size})})}),a.jsx(Ra,{children:a.jsx(Ca,{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(yo,{account:n.account,"aria-label":t._({id:"OLYdKb"}),className:"mt-4"}),a.jsx(Ne,{onClick:async c=>{await r.signOut(n.account)},color:"primary",children:a.jsx(L,{id:"fcWrnU"})},"signout"),i&&a.jsx(Ne,{onClick:()=>o(null),children:a.jsx(L,{id:"T8poTj"})},"other"),a.jsx(ic,{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(ka,{className:"size-6","aria-hidden":!0})},"close")]})})})]})}function Pu({children:e,basePath:t,title:s,links:n,prepend:i}){const{_:o}=de(),{pathname:r}=ge().location,c=r===t,u=n.find(h=>h.to===r),d=u==null?void 0:u.title,f=typeof d=="object"?o(d):d;return a.jsxs(Jo,{title:s,header:a.jsx(Au,{className:"shrink-0",size:"lg"}),children:[i,a.jsxs("div",{className:"flex w-full flex-1 flex-col md:flex-row",children:[a.jsx("aside",{className:`shrink-0 p-4 md:px-8 ${c?"w-full md:w-auto":"hidden max-w-xs md:block"}`,role:"navigation",children:a.jsx("nav",{className:"flex flex-col gap-2",children:n.filter(({hidden:h,to:g})=>!h||r===g).map(({to:h,title:g,description:v,icon:b})=>a.jsxs(Pn,{to:h,className:Jt("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:[b&&a.jsx("span",{"aria-hidden":"true",className:"bg-primary text-primary-contrast -ml-2 mb-auto mr-2 mt-2 inline-flex size-8 shrink-0 grow-0 items-center justify-center rounded-full",children:a.jsx(b,{className:"size-4"})}),a.jsxs("span",{className:"my-1 min-w-0 flex-1",children:[a.jsx("span",{className:"block truncate",children:typeof g=="object"?o(g):g}),v&&a.jsx("span",{className:"block whitespace-pre-wrap text-xs md:hidden",children:typeof v=="object"?o(v):v})]})]},h))})}),a.jsxs("main",{className:Jt("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(Pn,{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(co,{className:"size-6"})},"back"),f&&a.jsxs("h2",{className:"text-text-default text-2xl font-light",children:[a.jsx("title",{children:f}),a.jsx("b",{children:f})]})]}),a.jsx("div",{className:"flex-auto",children:e})]})]})]})}const sr=Xl({component:tr,errorComponent:Oa});function bo(e){const{name:t,logo:s}=Bi();return a.jsxs("span",{...e,children:[s&&a.jsx("img",{src:s,alt:t,className:"not-prose mr-1 inline-block h-[1em] select-none object-contain align-baseline"}),a.jsx("b",{children:t})]})}function Mu(){const{account:e}=Mt();return a.jsxs("div",{className:"prose-sm md:prose prose-slate dark:prose-invert max-w-none",children:[a.jsx("section",{children:a.jsx(L,{id:"/y3yb7",components:{0:a.jsx("h2",{}),1:a.jsx("p",{}),2:a.jsx("strong",{})}})}),a.jsx("section",{children:a.jsx(L,{id:"SBs48I",components:{0:a.jsx("h3",{}),1:a.jsx("p",{}),2:a.jsx(Et,{className:"underline",href:"https://bsky.app"}),3:a.jsx("p",{}),4:a.jsx("p",{}),5:a.jsx("strong",{className:"whitespace-nowrap"}),6:a.jsx(Sa,{account:e})}})}),a.jsx("section",{children:a.jsx(L,{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(L,{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(Et,{href:`https://bsky.app/profile/${e.preferred_username??e.sub}`}),9:a.jsx("p",{}),10:a.jsx(bo,{})}})}),a.jsxs("section",{children:[a.jsx(L,{id:"7+d6kP",components:{0:a.jsx("h3",{}),1:a.jsx("p",{})}}),a.jsxs("ul",{children:[a.jsx("li",{children:a.jsx(L,{id:"NS7S2h",components:{0:a.jsx(Et,{className:"underline",href:"https://bsky.social"})}})}),a.jsx("li",{children:a.jsx(L,{id:"ZWuMKu",components:{0:a.jsx(Et,{className:"underline",href:"https://atproto.com"})}})})]})]})]})}function wo(e){const{i18n:t,_:s}=de(),n=Ou(e),i=Lu(),o=Math.floor(n/1e3);if(o<60)return t._({id:"xOTzt5"});const r=Math.floor(o/60);if(r===1)return t._({id:"kMDavg"});if(r<60)return t._({id:"KtNcea",values:{deltaMinutes:r}});const c=Math.floor(r/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()<i)return t._({id:"rQRrkB"});const u=Math.floor(c/24);return t._({id:"cd9Wo5",values:{deltaDays:u}})}function Ou(e){const t=p.useMemo(()=>new Date(e),[e]),[s,n]=p.useState(()=>Date.now()-t.getTime());return p.useEffect(()=>{const i=setInterval(()=>{n(Date.now()-t.getTime())},1e3);return()=>clearInterval(i)},[t]),s}function Lu(){const[e,t]=p.useState(()=>{const s=new Date;return new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime()});return p.useEffect(()=>{const s=setInterval(()=>{const n=new Date;t(new Date(n.getFullYear(),n.getMonth(),n.getDate()).getTime())},6e4);return()=>clearInterval(s)},[]),e}function Iu({date:e}){return wo(e)}const Di=({sub:e})=>["oauth-sessions",e];function Nu({sub:e}){const t=Ue();return za({refetchOnWindowFocus:"always",queryKey:Di({sub:e}),retry:0,staleTime:5e3,queryFn:async s=>await t.oauthSessions({sub:e},s)})}function Fu(){const e=Ue(),t=Nn();return ut({async mutationFn(s){await e.revokeOAuthSession(s)},onError(s,{sub:n}){t.invalidateQueries({queryKey:Di({sub:n})})},onSuccess(s,{sub:n}){t.invalidateQueries({queryKey:Di({sub:n})})}})}const Hu="urn:ietf:params:oauth:client-assertion-type:jwt-bearer";var ya;const Tu=((ya=URL.canParse)==null?void 0:ya.bind(URL))??(e=>{try{return new URL(e),!0}catch{return!1}});function xo(e){return!!(e.match(/^\d+\.\d+\.\d+\.\d+$/)||e.startsWith("[")&&e.endsWith("]"))}function _o(e){return e==="localhost"||e==="127.0.0.1"||e==="[::1]"}function Du(e){const t=e.split(".");if(t.length<2)return!0;const s=t.at(-1).toLowerCase();return s==="test"||s==="local"||s==="localhost"||s==="invalid"||s==="example"}function Vu(e){const t=e.startsWith("https://")?8:e.startsWith("http://")?7:-1;if(t===-1)throw new TypeError('URL must use the "https:" or "http:" protocol');const s=e.indexOf("#",t),n=e.indexOf("?",t),i=n!==-1&&(s===-1||n<s)?n:-1,o=s===-1?i===-1?e.length:i:i===-1?s:Math.min(s,i),r=e.indexOf("/",t),c=r===-1||r>o?o:r;if(t===c)throw new TypeError("URL must contain a host");return e.substring(c,o)}const Dr=e=>{if(typeof e=="string"&&e.startsWith("{")&&e.endsWith("}"))try{return JSON.parse(e)}catch{return e}return e},Zu=e=>{if(typeof e=="string"){const t=Number(e);if(!Number.isNaN(t))return t}return e},Uu=(e,t)=>{if(e.length===0)throw new TypeError("Value cannot be empty");if(e.includes(" "))throw new TypeError("Value cannot contain spaces");const s=t.length,n=e.length;if(s<n)return!1;let i=t.indexOf(e),o;for(;i!==-1;){if(o=i+n,(i===0||t.charCodeAt(i-1)===32)&&(o===s||t.charCodeAt(o)===32))return!0;i=t.indexOf(e,o+1)}return!1},Dn=l.string().refine(e=>e.includes(":")&&Tu(e),{message:"Invalid URL"}),So=Dn.superRefine((e,t)=>{if(!e.startsWith("http://"))return t.addIssue({code:fe.custom,message:'URL must use the "http:" protocol'}),!1;const s=new URL(e);return _o(s.hostname)?!0:(t.addIssue({code:fe.custom,message:'URL must use "localhost", "127.0.0.1" or "[::1]" as hostname'}),!1)}),nr=Dn.superRefine((e,t)=>{if(!e.startsWith("https://"))return t.addIssue({code:fe.custom,message:'URL must use the "https:" protocol'}),!1;const s=new URL(e);if(_o(s.hostname))return t.addIssue({code:fe.custom,message:"https: URL must not use a loopback host"}),!1;if(!xo(s.hostname)){if(!s.hostname.includes("."))return t.addIssue({code:fe.custom,message:"Domain name must contain at least two segments"}),!1;if(s.hostname.endsWith(".local"))return t.addIssue({code:fe.custom,message:'Domain name must not end with ".local"'}),!1}return!0}),oe=l.string().superRefine((e,t)=>{if(e.startsWith("http://")){const s=So.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}if(e.startsWith("https://")){const s=nr.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}return t.addIssue({code:fe.custom,message:'URL must use the "http:" or "https:" protocol'}),!1}),qu=Dn.superRefine((e,t)=>{const s=e.indexOf("."),n=e.indexOf(":");if(s===-1||n===-1||s>n)return t.addIssue({code:fe.custom,message:'Private-use URI scheme requires a "." as part of the protocol'}),!1;const i=new URL(e);if(!i.protocol.includes("."))return t.addIssue({code:fe.custom,message:"Invalid private-use URI scheme"}),!1;const r=i.protocol.slice(0,-1).split(".").reverse().join(".");return Du(r)&&t.addIssue({code:fe.custom,message:"Private-use URI Scheme redirect URI must not be a local hostname"}),i.href.startsWith(`${i.protocol}//`)||i.username||i.password||i.hostname||i.port?(t.addIssue({code:fe.custom,message:"Private-Use URI Scheme must be in the form <scheme>:/{path} (notice the single slash!) as per RFC 8252"}),!1):!0}),Bu=/^[\x21\x23-\x5B\x5D-\x7E]+(?: [\x21\x23-\x5B\x5D-\x7E]+)*$/,jo=e=>Bu.test(e),ir=l.string().refine(jo,{message:"Invalid OAuth scope"}),$u="atproto";function zu(e){return jo(e)&&Uu($u,e)}const Ku=l.string().refine(zu,{message:"Invalid ATProto OAuth scope"}),Ot=l.string().min(1),Eo=So.superRefine((e,t)=>e.startsWith("http://localhost")?(t.addIssue({code:fe.custom,message:'Use of "localhost" hostname is not allowed (RFC 8252), use a loopback IP such as "127.0.0.1" instead'}),!1):!0),Wu=Eo,rr=l.string().superRefine((e,t)=>{if(e.startsWith("https:")){const s=nr.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else if(e.startsWith("http:")){const s=Eo.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else if(/^[^.:]+(?:\.[^.:]+)+:/.test(e)){const s=qu.safeParse(e);return s.success||s.error.issues.forEach(t.addIssue,t),s.success}else return t.addIssue({code:fe.custom,message:'URL must use the "https:" or "http:" protocol, or a private-use URI scheme (RFC 8252)'}),!1}),Ht="http://localhost";Ot.superRefine((e,t)=>{const s=Co(e);return s.success||t.addIssue({code:"custom",message:s.message}),s.success});function Ro(e){return Co(e).success}function Co(e){if(!e.startsWith(Ht))return{success:!1,message:`Value must start with "${Ht}"`};if(e.includes("#",Ht.length))return{success:!1,message:"Value must not contain a hash component"};const t=e.length>Ht.length&&e.charCodeAt(Ht.length)===47?Ht.length+1:Ht.length;if(e.length!==t&&e.charCodeAt(t)!==63)return{success:!1,message:"Value must not contain a path component"};const s=e.slice(t+1);return Qu(s)}function Qu(e){const t={},s=typeof e=="string"?new URLSearchParams(e):e;for(const[n,i]of s)if(n==="scope"){if("scope"in t)return{success:!1,message:'Duplicate "scope" query parameter'};const o=ir.safeParse(i);if(!o.success)return{success:!1,message:`Invalid "scope" query parameter: ${o.error.issues.map(c=>c.message).join(", ")||"Validation failed"}`};t.scope=o.data}else if(n==="redirect_uri"){const o=Wu.safeParse(i);if(!o.success)return{success:!1,message:`Invalid "redirect_uri" query parameter: ${o.error.issues.map(c=>c.message).join(", ")||"Validation failed"}`};t.redirect_uris==null?t.redirect_uris=[o.data]:t.redirect_uris.push(o.data)}else return{success:!1,message:`Unexpected query parameter "${n}"`};return{success:!0,value:t}}const Gu="ERR_JWKS_NO_MATCHING_KEY",Ju="ERR_JWK_INVALID",Vr="ERR_JWK_NOT_FOUND",Mn="ERR_JWT_INVALID",Yu="ERR_JWT_CREATE",Xu="ERR_JWT_VERIFY";class kt extends TypeError{constructor(t="JWK error",s=Ju,n){super(t,n),this.code=s}}class Qs extends Error{constructor(t="Unable to create JWT",s=Yu,n){super(t,n),this.code=s}static from(t,s,n){return t instanceof Qs?t:t instanceof kt?new Qs(n,t.code,{cause:t}):new Qs(n,s,{cause:t})}}class rt extends Error{constructor(t="Invalid JWT",s=Xu,n){super(t,n),this.code=s}static from(t,s,n){return t instanceof rt?t:t instanceof kt?new rt(n,t.code,{cause:t}):new rt(n,s,{cause:t})}}class ed{constructor(t,s,n){we(this,"name");we(this,"prefix");we(this,"baseEncode");this.name=t,this.prefix=s,this.baseEncode=n}encode(t){if(t instanceof Uint8Array)return`${this.prefix}${this.baseEncode(t)}`;throw Error("Unknown type, must be binary type")}}class td{constructor(t,s,n){we(this,"name");we(this,"prefix");we(this,"baseDecode");we(this,"prefixCodePoint");this.name=t,this.prefix=s;const i=s.codePointAt(0);if(i===void 0)throw new Error("Invalid prefix character");this.prefixCodePoint=i,this.baseDecode=n}decode(t){if(typeof t=="string"){if(t.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(t)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(t.slice(this.prefix.length))}else throw Error("Can only multibase decode strings")}or(t){return ko(this,t)}}class sd{constructor(t){we(this,"decoders");this.decoders=t}or(t){return ko(this,t)}decode(t){const s=t[0],n=this.decoders[s];if(n!=null)return n.decode(t);throw RangeError(`Unable to decode multibase string ${JSON.stringify(t)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}function ko(e,t){return new sd({...e.decoders??{[e.prefix]:e},...t.decoders??{[t.prefix]:t}})}class nd{constructor(t,s,n,i){we(this,"name");we(this,"prefix");we(this,"baseEncode");we(this,"baseDecode");we(this,"encoder");we(this,"decoder");this.name=t,this.prefix=s,this.baseEncode=n,this.baseDecode=i,this.encoder=new ed(t,s,n),this.decoder=new td(t,s,i)}encode(t){return this.encoder.encode(t)}decode(t){return this.decoder.decode(t)}}function id({name:e,prefix:t,encode:s,decode:n}){return new nd(e,t,s,n)}function rd(e,t,s,n){let i=e.length;for(;e[i-1]==="=";)--i;const o=new Uint8Array(i*s/8|0);let r=0,c=0,u=0;for(let d=0;d<i;++d){const f=t[e[d]];if(f===void 0)throw new SyntaxError(`Non-${n} character`);c=c<<s|f,r+=s,r>=8&&(r-=8,o[u++]=255&c>>r)}if(r>=s||(255&c<<8-r)!==0)throw new SyntaxError("Unexpected end of data");return o}function ad(e,t,s){const n=t[t.length-1]==="=",i=(1<<s)-1;let o="",r=0,c=0;for(let u=0;u<e.length;++u)for(c=c<<8|e[u],r+=8;r>s;)r-=s,o+=t[i&c>>r];if(r!==0&&(o+=t[i&c<<s-r]),n)for(;(o.length*s&7)!==0;)o+="=";return o}function od(e){const t={};for(let s=0;s<e.length;++s)t[e[s]]=s;return t}function Vn({name:e,prefix:t,bitsPerChar:s,alphabet:n}){const i=od(n);return id({prefix:t,name:e,encode(o){return ad(o,n,s)},decode(o){return rd(o,i,s,e)}})}Vn({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});Vn({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6});const cd=Vn({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6});Vn({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6});const Zr=e=>e!==void 0,ld=e=>(t,s)=>{const n=e.indexOf(t),i=e.indexOf(s);return n===i?0:n===-1?1:i===-1?-1:n-i};function ud(e){return e==null?t=>!0:Array.isArray(e)?t=>e.includes(t):t=>t===e}const ft=(e,t)=>function(){const s=e.call(this);return Object.defineProperty(this,e.name,{get:()=>s,enumerable:!0,configurable:!0}),s},dd=new TextDecoder;function Ur(e){const t=cd.baseDecode(e),s=dd.decode(t);return JSON.parse(s)}const Ao=(e,t)=>{let s;for(let n=0;n<e.length;n++)if(s=e.charCodeAt(n),!(65<=s&&s<=90||97<=s&&s<=122||48<=s&&s<=57||s===45||s===95||s===46)){const i=String.fromCodePoint(e.codePointAt(n));return t.addIssue({code:fe.custom,message:`Invalid character "${i}" in JWT at position ${n}`})}},Po=(e,t=2)=>{if(!Number.isFinite(e)||e<1||(e|0)!==e)throw new TypeError(`Count must be a natural number (got ${e})`);const s=e*t+(e-1),n="Invalid JWT format";return(i,o)=>{if(i.length<s)return o.addIssue({code:fe.custom,message:`${n}: too short`}),!1;let r=0;for(let c=0;c<e-1;c++){const u=i.indexOf(".",r);if(u===-1)return o.addIssue({code:fe.custom,message:`${n}: expected ${e} segments, got ${c+1}`}),!1;if(u-r<t)return o.addIssue({code:fe.custom,message:`${n}: segment ${c+1} is too short`}),!1;r=u+1}return i.indexOf(".",r)!==-1?(o.addIssue({code:fe.custom,message:`${n}: too many segments`}),!1):i.length-r<t?(o.addIssue({code:fe.custom,message:`${n}: last segment is too short`}),!1):!0}};function hd(e,t,s){return s.indexOf(e,t+1)===-1}const Zn=["verify","encrypt","wrapKey"];l.enum(Zn);function ar(e){return Zn.includes(e)}function or(e){return e==="verify"}function cr(e){return e==="encrypt"||e==="wrapKey"}const lr=["sign","decrypt","unwrapKey","deriveKey","deriveBits"];l.enum(lr);function fd(e){return lr.includes(e)}const pd=[...lr,...Zn],md=l.enum(pd),rn=l.object({kty:l.string().min(1),alg:l.string().min(1).optional(),kid:l.string().min(1).optional(),use:l.enum(["sig","enc"]).optional(),key_ops:l.array(md).min(1,{message:"At least one key usage must be specified"}).refine(e=>e.every(hd),{message:"key_ops must not contain duplicates"}).optional(),x5c:l.array(l.string()).optional(),x5t:l.string().min(1).optional(),"x5t#S256":l.string().min(1).optional(),x5u:l.string().url().optional(),ext:l.boolean().optional(),iat:l.number().int().optional(),exp:l.number().int().optional(),nbf:l.number().int().optional(),revoked:l.object({revoked_at:l.number().int(),reason:l.string().optional()}).optional()}),gd=rn.extend({kty:l.literal("RSA"),alg:l.enum(["RS256","RS384","RS512","PS256","PS384","PS512"]).optional(),n:l.string().min(1),e:l.string().min(1),d:l.string().min(1).optional(),p:l.string().min(1).optional(),q:l.string().min(1).optional(),dp:l.string().min(1).optional(),dq:l.string().min(1).optional(),qi:l.string().min(1).optional(),oth:l.array(l.object({r:l.string().optional(),d:l.string().optional(),t:l.string().optional()})).min(1).optional()}),vd=rn.extend({kty:l.literal("EC"),alg:l.enum(["ES256","ES384","ES512"]).optional(),crv:l.enum(["P-256","P-384","P-521"]),x:l.string().min(1),y:l.string().min(1),d:l.string().min(1).optional()}),yd=rn.extend({kty:l.literal("EC"),alg:l.enum(["ES256K"]).optional(),crv:l.enum(["secp256k1"]),x:l.string().min(1),y:l.string().min(1),d:l.string().min(1).optional()}),bd=rn.extend({kty:l.literal("OKP"),alg:l.enum(["EdDSA"]).optional(),crv:l.enum(["Ed25519","Ed448"]),x:l.string().min(1),d:l.string().min(1).optional()}),wd=rn.extend({kty:l.literal("oct"),alg:l.enum(["HS256","HS384","HS512"]).optional(),k:l.string()}),Un=l.union([gd,vd,yd,bd,wd]).refine(e=>e.use==null||Oo(e),{message:'"use" can only be used with public keys',path:["use"]}).refine(e=>{var t;return!((t=e.key_ops)!=null&&t.some(fd))||hr(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(or)||e.use==="enc"&&e.key_ops.every(cr),{message:'"key_ops" must be consistent with "use"',path:["key_ops"]}),ur=Un.refine(xd,{message:'"kid" is required',path:["kid"]}).refine(Oo,{message:"private key not allowed"}).refine(e=>!e.key_ops||e.key_ops.every(ar),{message:'"key_ops" must not contain private key usage for public keys',path:["key_ops"]});Un.refine(hr,{message:"private key required"});function xd(e){return"kid"in e&&e.kid!=null}function dr(e){return"k"in e&&e.k!=null}function Mo(e){return"d"in e&&e.d!=null}function hr(e){return Mo(e)||dr(e)}function Oo(e){return!Mo(e)&&!dr(e)}const{process:fn}=globalThis;var ba;const qr=typeof fn<"u"&&typeof((ba=fn==null?void 0:fn.versions)==null?void 0:ba.node)=="string";function*_d(e){if(typeof e.alg=="string"){yield e.alg;return}switch(e.kty){case"EC":{if(ai(e)&&(yield"ECDH-ES",yield"ECDH-ES+A128KW",yield"ECDH-ES+A192KW",yield"ECDH-ES+A256KW"),oi(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":qr&&(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":{ai(e)&&(yield"RSA-OAEP",yield"RSA-OAEP-256",yield"RSA-OAEP-384",yield"RSA-OAEP-512",qr&&(yield"RSA1_5")),oi(e)&&(yield"PS256",yield"PS384",yield"PS512",yield"RS256",yield"RS384",yield"RS512");return}case"oct":{ai(e)&&(yield"A128GCMKW",yield"A192GCMKW",yield"A256GCMKW",yield"A128KW",yield"A192KW",yield"A256KW"),oi(e)&&(yield"HS256",yield"HS384",yield"HS512");return}default:throw new kt(`Unsupported kty "${e.kty}"`)}}function ai(e){var t;return((t=e.key_ops)==null?void 0:t.some(cr))??(e.use==null||e.use==="enc")}function oi(e){var t;return((t=e.key_ops)==null?void 0:t.some(or))??(e.use==null||e.use==="sig")}l.object({keys:l.array(l.unknown()).transform(e=>e.map(t=>Un.safeParse(t)).filter(t=>t.success).map(t=>t.data))});const Sd=l.object({keys:l.array(l.unknown()).transform(e=>e.map(t=>ur.safeParse(t)).filter(t=>t.success).map(t=>t.data))}),qn=l.string().superRefine(Ao).superRefine(Po(3)),jd=l.string().superRefine(Ao).superRefine(Po(2)),Ed=l.object({alg:l.string(),jku:l.string().url().optional(),jwk:l.object({kty:l.string(),crv:l.string().optional(),x:l.string().optional(),y:l.string().optional(),e:l.string().optional(),n:l.string().optional()}).optional(),kid:l.string().optional(),x5u:l.string().optional(),x5c:l.array(l.string()).optional(),x5t:l.string().optional(),"x5t#S256":l.string().optional(),typ:l.string().optional(),cty:l.string().optional(),crit:l.array(l.string()).optional()}).passthrough(),Rd=l.string().superRefine((e,t)=>{try{const s=new URL(e);s.protocol!=="http:"&&s.protocol!=="https:"&&t.addIssue({code:l.ZodIssueCode.custom,message:"Only http: and https: protocols are allowed"}),(s.username||s.password)&&t.addIssue({code:l.ZodIssueCode.custom,message:"Credentials not allowed"}),s.search&&t.addIssue({code:l.ZodIssueCode.custom,message:"Query string not allowed"}),s.hash&&t.addIssue({code:l.ZodIssueCode.custom,message:"Fragment not allowed"})}catch{t.addIssue({code:l.ZodIssueCode.invalid_string,validation:"url"})}return e}),Cd=l.object({iss:l.string().optional(),aud:l.union([l.string(),l.array(l.string()).nonempty()]).optional(),sub:l.string().optional(),exp:l.number().int().optional(),nbf:l.number().int().optional(),iat:l.number().int().optional(),jti:l.string().optional(),htm:l.string().optional(),htu:Rd.optional(),ath:l.string().optional(),acr:l.string().optional(),azp:l.string().optional(),amr:l.array(l.string()).optional(),cnf:l.object({kid:l.string().optional(),jwk:ur.optional(),jwe:l.string().optional(),jku:l.string().url().optional(),jkt:l.string().optional(),"x5t#S256":l.string().optional(),osc:l.string().optional()}).optional(),client_id:l.string().optional(),scope:l.string().optional(),nonce:l.string().optional(),at_hash:l.string().optional(),c_hash:l.string().optional(),s_hash:l.string().optional(),auth_time:l.number().int().optional(),name:l.string().optional(),family_name:l.string().optional(),given_name:l.string().optional(),middle_name:l.string().optional(),nickname:l.string().optional(),preferred_username:l.string().optional(),gender:l.string().optional(),picture:l.string().url().optional(),profile:l.string().url().optional(),website:l.string().url().optional(),birthdate:l.string().regex(/\d{4}-\d{2}-\d{2}/).optional(),zoneinfo:l.string().regex(/^[A-Za-z0-9_/]+$/).optional(),locale:l.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?$/).optional(),updated_at:l.number().int().optional(),email:l.string().optional(),email_verified:l.boolean().optional(),phone_number:l.string().optional(),phone_number_verified:l.boolean().optional(),address:l.object({formatted:l.string().optional(),street_address:l.string().optional(),locality:l.string().optional(),region:l.string().optional(),postal_code:l.string().optional(),country:l.string().optional()}).optional(),authorization_details:l.array(l.object({type:l.string(),locations:l.array(l.string()).optional(),actions:l.array(l.string()).optional(),datatypes:l.array(l.string()).optional(),identifier:l.string().optional(),privileges:l.array(l.string()).optional()}).passthrough()).optional()}).passthrough();function kd(e){const{0:t,1:s,length:n}=e.split(".");if(n>3||n<2)throw new rt(void 0,Mn);const i=Ed.parse(Ur(t));if(n===2&&(i==null?void 0:i.alg)!=="none")throw new rt(void 0,Mn);const o=Cd.parse(Ur(s));return{header:i,payload:o}}var Ad=function(e,t,s){for(var n=arguments.length>2,i=0;i<t.length;i++)s=n?t[i].call(e,s):t[i].call(e);return n?s:void 0},Ns=function(e,t,s,n,i,o){function r(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var c=n.kind,u=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),h,g=!1,v=s.length-1;v>=0;v--){var b={};for(var y in n)b[y]=y==="access"?{}:n[y];for(var y in n.access)b.access[y]=n.access[y];b.addInitializer=function(S){if(g)throw new TypeError("Cannot add initializers after decoration has completed");o.push(r(S||null))};var _=(0,s[v])(c==="accessor"?{get:f.get,set:f.set}:f[u],b);if(c==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(h=r(_.get))&&(f.get=h),(h=r(_.set))&&(f.set=h),(h=r(_.init))&&i.unshift(h)}else(h=r(_))&&(c==="field"?i.unshift(h):f[u]=h)}d&&Object.defineProperty(d,n.name,f),g=!0};(()=>{var r;let e=[],t,s,n,i,o;return r=class{constructor(u){this.jwk=(Ad(this,e),u)}get isPrivate(){return hr(this.jwk)}get isSymetric(){return dr(this.jwk)}get privateJwk(){if(this.isPrivate)return this.jwk}get publicJwk(){if(this.isSymetric)return;if(!this.isPrivate)return this.jwk;const u=ur.safeParse({...this.jwk,d:void 0,k:void 0,use:void 0,key_ops:Pd(this.keyOps)??Zn});if(u.success)return Object.freeze(u.data)}get bareJwk(){if(this.isSymetric)return;const{kty:u,crv:d,e:f,n:h,x:g,y:v}=this.jwk;return Object.freeze(Un.parse({crv:d,e:f,kty:u,n:h,x:g,y:v}))}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(_d(this.jwk)))}get isRevoked(){return this.jwk.revoked!=null}isActive(u){var f;if(!(u!=null&&u.allowRevoked)&&this.isRevoked)return!1;const d=(u==null?void 0:u.clockTolerance)??0;if(d!==1/0){const h=((f=u==null?void 0:u.currentDate)==null?void 0:f.getTime())??Date.now(),{exp:g,nbf:v}=this.jwk;if(v!=null&&!(h>=v*1e3-d)||g!=null&&!(h<g*1e3+d))return!1}return!0}matches(u){return!(u.kid!=null&&!(Array.isArray(u.kid)?this.kid!=null&&u.kid.includes(this.kid):this.kid===u.kid)||u.alg!=null&&!(Array.isArray(u.alg)?u.alg.some(f=>this.algorithms.includes(f)):this.algorithms.includes(u.alg))||u.usage!=null&&(!(this.keyOps==null||this.keyOps.includes(u.usage)||u.usage==="verify"&&this.keyOps.includes("sign")||u.usage==="encrypt"&&this.keyOps.includes("decrypt")||u.usage==="wrapKey"&&this.keyOps.includes("unwrapKey"))||!(this.use==null||this.use==="sig"&&or(u.usage)||this.use==="enc"&&cr(u.usage))||!(this.isPrivate||ar(u.usage))))}},(()=>{const u=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[ft],s=[ft],n=[ft],i=[ft],o=[ft],Ns(r,null,t,{kind:"getter",name:"isPrivate",static:!1,private:!1,access:{has:d=>"isPrivate"in d,get:d=>d.isPrivate},metadata:u},null,e),Ns(r,null,s,{kind:"getter",name:"isSymetric",static:!1,private:!1,access:{has:d=>"isSymetric"in d,get:d=>d.isSymetric},metadata:u},null,e),Ns(r,null,n,{kind:"getter",name:"publicJwk",static:!1,private:!1,access:{has:d=>"publicJwk"in d,get:d=>d.publicJwk},metadata:u},null,e),Ns(r,null,i,{kind:"getter",name:"bareJwk",static:!1,private:!1,access:{has:d=>"bareJwk"in d,get:d=>d.bareJwk},metadata:u},null,e),Ns(r,null,o,{kind:"getter",name:"algorithms",static:!1,private:!1,access:{has:d=>"algorithms"in d,get:d=>d.algorithms},metadata:u},null,e),u&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:u})})(),r})();function Pd(e){if(e==null)return;const t=new Set(e.filter(ar));return e.includes("sign")&&t.add("verify"),e.includes("decrypt")&&t.add("encrypt"),e.includes("unwrapKey")&&t.add("wrapKey"),Array.from(t)}var Md=function(e,t,s){for(var n=arguments.length>2,i=0;i<t.length;i++)s=n?t[i].call(e,s):t[i].call(e);return n?s:void 0},ci=function(e,t,s,n,i,o){function r(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var c=n.kind,u=c==="getter"?"get":c==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,f=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),h,g=!1,v=s.length-1;v>=0;v--){var b={};for(var y in n)b[y]=y==="access"?{}:n[y];for(var y in n.access)b.access[y]=n.access[y];b.addInitializer=function(S){if(g)throw new TypeError("Cannot add initializers after decoration has completed");o.push(r(S||null))};var _=(0,s[v])(c==="accessor"?{get:f.get,set:f.set}:f[u],b);if(c==="accessor"){if(_===void 0)continue;if(_===null||typeof _!="object")throw new TypeError("Object expected");(h=r(_.get))&&(f.get=h),(h=r(_.set))&&(f.set=h),(h=r(_.init))&&i.unshift(h)}else(h=r(_))&&(c==="field"?i.unshift(h):f[u]=h)}d&&Object.defineProperty(d,n.name,f),g=!0};const Od=e=>e.privateJwk,Ld=e=>e.publicJwk;(()=>{var i;let e=[],t,s,n;return i=class{constructor(r,c=r instanceof i?[...r.preferredSigningAlgorithms]:["EdDSA","ES256K","ES256","PS256","PS384","PS512","HS256","HS384","HS512"]){this.preferredSigningAlgorithms=(Md(this,e),c);const u=[],d=new Set;for(const f of r)if(f&&(u.push(f),f.kid)){if(d.has(f.kid))throw new kt(`Duplicate key: ${f.kid}`);d.add(f.kid)}this.keys=Object.freeze(u)}get size(){return this.keys.length}get signAlgorithms(){const r=new Set;for(const c of this)if(c.use==="sig")for(const u of c.algorithms)r.add(u);return Object.freeze([...r].sort(ld(this.preferredSigningAlgorithms)))}get publicJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,Ld).filter(Zr))})}get privateJwks(){return Object.freeze({keys:Object.freeze(Array.from(this,Od).filter(Zr))})}has(r){return this.keys.some(c=>c.kid===r)}get(r){const c=this.find(r);if(c)return c;throw new kt(`Key not found ${r.kid??r.alg??r.usage??"<unknown>"}`,Vr)}find(r){for(const c of this.list(r))return c}*list(r){for(const c of this)c.isActive(r)&&c.matches(r)&&(yield c)}findPrivateKey({kid:r,alg:c,usage:u,...d}){const f=[];Array.isArray(c)&&c.length===1&&(c=c[0]);for(const v of this.list({...d,kid:r,alg:c,usage:u})){if(typeof c=="string")return{key:v,alg:c};f.push(v)}const h=ud(c),g=f.map(v=>[v,v.algorithms.filter(h)]);for(const v of this.preferredSigningAlgorithms)for(const[b,y]of g)if(y.includes(v))return{key:b,alg:v};for(const[v,b]of g)for(const y of b)return{key:v,alg:y};throw new kt(`No private key found for ${r||c||u}`,Vr)}[(t=[ft],s=[ft],n=[ft],Symbol.iterator)](){return this.keys.values()}async createJwt({alg:r,kid:c,...u},d){try{const{key:f,alg:h}=this.findPrivateKey({alg:r,kid:c,usage:"sign",allowRevoked:!1}),g={...u,alg:h,kid:f.kid};return typeof d=="function"&&(d=await d(g,f)),await f.createJwt(g,d)}catch(f){throw Qs.from(f)}}async verifyJwt(r,c){const{header:u}=kd(r),{kid:d,alg:f}=u,h=[];for(const g of this.list({...c,kid:d,alg:f,usage:"verify"}))try{return{...await g.verifyJwt(r,c),key:g}}catch(v){h.push(v)}switch(h.length){case 0:throw new rt("No key matched",Gu);case 1:throw rt.from(h[0],Mn);default:throw rt.from(h,Mn)}}toJSON(){return structuredClone(this.publicJwks)}},(()=>{const r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;ci(i,null,t,{kind:"getter",name:"signAlgorithms",static:!1,private:!1,access:{has:c=>"signAlgorithms"in c,get:c=>c.signAlgorithms},metadata:r},null,e),ci(i,null,s,{kind:"getter",name:"publicJwks",static:!1,private:!1,access:{has:c=>"publicJwks"in c,get:c=>c.publicJwks},metadata:r},null,e),ci(i,null,n,{kind:"getter",name:"privateJwks",static:!1,private:!1,access:{has:c=>"privateJwks"in c,get:c=>c.privateJwks},metadata:r},null,e),r&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),i})();const Id=l.object({type:l.string(),locations:l.array(Dn).optional(),actions:l.array(l.string()).optional(),datatypes:l.array(l.string()).optional(),identifier:l.string().optional(),privileges:l.array(l.string()).optional()}),Lo=l.array(Id),Nd=l.union([l.string().regex(/^DPoP$/i).transform(()=>"DPoP"),l.string().regex(/^Bearer$/i).transform(()=>"Bearer")]),Fd=l.object({access_token:l.string(),token_type:Nd,scope:l.string().optional(),refresh_token:l.string().optional(),expires_in:l.number().optional(),id_token:qn.optional(),authorization_details:Lo.optional()}).passthrough();Fd.extend({token_type:l.literal("DPoP"),sub:rc,scope:Ku,id_token:l.never().optional()});const Hd=l.string().min(1),Td=l.object({grant_type:l.literal("authorization_code"),code:l.string().min(1),redirect_uri:rr,code_verifier:l.string().min(43).max(128).regex(/^[a-zA-Z0-9-._~]+$/).optional()}),Io=l.object({request:l.union([qn,jd])}),No=l.enum(["S256","plain"]),Fo=l.enum(["none","login","consent","select_account","create"]),Dd=l.enum(["query","fragment","form_post"]),Ho=l.enum(["code","token","none","code id_token token","code id_token","code token","id_token token","id_token"]),Vd=l.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"]),Br=l.union([l.string(),l.number(),l.boolean()]),Zd=l.object({essential:l.boolean().optional(),value:Br.optional(),values:l.array(Br).optional()}),Ud=l.enum(["userinfo","id_token"]),To=l.object({client_id:Ot,state:l.string().optional(),redirect_uri:rr.optional(),scope:ir.optional(),response_type:Ho,code_challenge:l.string().optional(),code_challenge_method:No.optional(),dpop_jkt:l.string().optional(),response_mode:Dd.optional(),nonce:l.string().optional(),max_age:l.preprocess(Zu,l.number().int().min(0)).optional(),claims:l.preprocess(Dr,l.record(Ud,l.record(Vd,l.union([l.literal(null),Zd])))).optional(),login_hint:l.string().min(1).optional(),ui_locales:l.string().regex(/^[a-z]{2,3}(-[A-Z]{2})?( [a-z]{2,3}(-[A-Z]{2})?)*$/).optional(),id_token_hint:qn.optional(),display:l.enum(["page","popup","touch","wap"]).optional(),prompt:Fo.optional(),authorization_details:l.preprocess(Dr,Lo).optional()});l.union([To,Io]);const qd=l.string().min(1),Bd=l.object({request_uri:qd});l.intersection(l.object({client_id:Ot}),l.union([To,Io,Bd]));l.enum(["invalid_request","unauthorized_client","access_denied","unsupported_response_type","invalid_scope","server_error","temporarily_unavailable"]);const Do=oe.superRefine((e,t)=>{if(e.endsWith("/"))return t.addIssue({code:l.ZodIssueCode.custom,message:"Issuer URL must not end with a slash"}),!1;const s=new URL(e);if(s.username||s.password)return t.addIssue({code:l.ZodIssueCode.custom,message:"Issuer URL must not contain a username or password"}),!1;if(s.hash||s.search)return t.addIssue({code:l.ZodIssueCode.custom,message:"Issuer URL must not contain a query or fragment"}),!1;const n=s.pathname==="/"?s.origin:s.href;return e!==n?(t.addIssue({code:l.ZodIssueCode.custom,message:"Issuer URL must be in the canonical form"}),!1):!0}),$d=l.object({issuer:Do,claims_supported:l.array(l.string()).optional(),claims_locales_supported:l.array(l.string()).optional(),claims_parameter_supported:l.boolean().optional(),request_parameter_supported:l.boolean().optional(),request_uri_parameter_supported:l.boolean().optional(),require_request_uri_registration:l.boolean().optional(),scopes_supported:l.array(l.string()).optional(),subject_types_supported:l.array(l.string()).optional(),response_types_supported:l.array(l.string()).optional(),response_modes_supported:l.array(l.string()).optional(),grant_types_supported:l.array(l.string()).optional(),code_challenge_methods_supported:l.array(No).min(1).optional(),ui_locales_supported:l.array(l.string()).optional(),id_token_signing_alg_values_supported:l.array(l.string()).optional(),display_values_supported:l.array(l.string()).optional(),request_object_signing_alg_values_supported:l.array(l.string()).optional(),authorization_response_iss_parameter_supported:l.boolean().optional(),authorization_details_types_supported:l.array(l.string()).optional(),request_object_encryption_alg_values_supported:l.array(l.string()).optional(),request_object_encryption_enc_values_supported:l.array(l.string()).optional(),jwks_uri:oe.optional(),authorization_endpoint:oe,token_endpoint:oe,token_endpoint_auth_methods_supported:l.array(l.string()).default(["client_secret_basic"]),token_endpoint_auth_signing_alg_values_supported:l.array(l.string()).optional(),revocation_endpoint:oe.optional(),introspection_endpoint:oe.optional(),pushed_authorization_request_endpoint:oe.optional(),require_pushed_authorization_requests:l.boolean().optional(),userinfo_endpoint:oe.optional(),end_session_endpoint:oe.optional(),registration_endpoint:oe.optional(),dpop_signing_alg_values_supported:l.array(l.string()).optional(),protected_resources:l.array(oe).optional(),client_id_metadata_document_supported:l.boolean().optional(),prompt_values_supported:l.array(Fo).optional()});$d.superRefine((e,t)=>{e.require_pushed_authorization_requests&&!e.pushed_authorization_request_endpoint&&t.addIssue({code:l.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:l.ZodIssueCode.custom,message:'Response type "code" is required'}))}).superRefine((e,t)=>{var s;(s=e.token_endpoint_auth_signing_alg_values_supported)!=null&&s.includes("none")&&t.addIssue({code:l.ZodIssueCode.custom,message:'Client authentication method "none" is not allowed'})});const zd=l.object({grant_type:l.literal("client_credentials")}),Kd=l.object({client_id:Ot,client_assertion_type:l.literal(Hu),client_assertion:qn}),Wd=l.object({client_id:Ot,client_secret:l.string()}),Qd=l.object({client_id:Ot});l.union([Kd,Wd,Qd]);const Gd=l.intersection(Ot,nr).superRefine((e,t)=>{const s=new URL(e);return s.username||s.password?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID must not contain credentials"}),!1):s.hash?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID must not contain a fragment"}),!1):s.pathname==="/"?(t.addIssue({code:l.ZodIssueCode.custom,message:'ClientID must contain a path component (e.g. "/client-metadata.json")'}),!1):s.pathname.endsWith("/")?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID path must not end with a trailing slash"}),!1):xo(s.hostname)?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID hostname must not be an IP address"}),!1):Vu(e)!==s.pathname?(t.addIssue({code:l.ZodIssueCode.custom,message:`ClientID must be in canonical form ("${s.href}", got "${e}")`}),!1):!0}),Jd=Gd.superRefine((e,t)=>{const s=new URL(e);return s.port?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID must not contain a port"}),!1):s.search?(t.addIssue({code:l.ZodIssueCode.custom,message:"ClientID must not contain a query string"}),!1):s.pathname!=="/oauth-client-metadata.json"?(t.addIssue({code:l.ZodIssueCode.custom,message:'ClientID must be "/oauth-client-metadata.json"'}),!1):!0});function Vo(e){return Jd.safeParse(e).success}const Yd=l.enum(["client_secret_basic","client_secret_jwt","client_secret_post","none","private_key_jwt","self_signed_tls_client_auth","tls_client_auth"]),Xd=l.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"]);l.object({redirect_uris:l.array(rr).nonempty(),response_types:l.array(Ho).nonempty().default(["code"]),grant_types:l.array(Xd).nonempty().default(["authorization_code"]),scope:ir.optional(),token_endpoint_auth_method:Yd.default("client_secret_basic"),token_endpoint_auth_signing_alg:l.string().optional(),userinfo_signed_response_alg:l.string().optional(),userinfo_encrypted_response_alg:l.string().optional(),jwks_uri:oe.optional(),jwks:Sd.optional(),application_type:l.enum(["web","native"]).default("web"),subject_type:l.enum(["public","pairwise"]).default("public"),request_object_signing_alg:l.string().optional(),id_token_signed_response_alg:l.string().optional(),authorization_signed_response_alg:l.string().default("RS256"),authorization_encrypted_response_enc:l.enum(["A128CBC-HS256"]).optional(),authorization_encrypted_response_alg:l.string().optional(),client_id:Ot.optional(),client_name:l.string().optional(),client_uri:oe.optional(),policy_uri:oe.optional(),tos_uri:oe.optional(),logo_uri:oe.optional(),default_max_age:l.number().optional(),require_auth_time:l.boolean().optional(),contacts:l.array(l.string().email()).optional(),tls_client_certificate_bound_access_tokens:l.boolean().optional(),dpop_bound_access_tokens:l.boolean().optional(),authorization_details_types:l.array(l.string()).optional()});l.object({request_uri:l.string(),expires_in:l.number().int().positive()});const eh=l.object({grant_type:l.literal("password"),username:l.string(),password:l.string()});l.object({resource:oe.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:l.array(Do).optional(),jwks_uri:oe.optional(),scopes_supported:l.array(l.string()).optional(),bearer_methods_supported:l.array(l.enum(["header","body","query"])).optional(),resource_signing_alg_values_supported:l.array(l.string()).optional(),resource_documentation:oe.optional(),resource_policy_uri:oe.optional(),resource_tos_uri:oe.optional()});const Zo=l.string().min(1),th=l.object({grant_type:l.literal("refresh_token"),refresh_token:Zo});l.object({token:l.union([Hd,Zo]),token_type_hint:l.enum(["access_token","refresh_token"]).optional()});l.discriminatedUnion("grant_type",[Td,th,eh,zd]);l.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"]);l.object({sub:l.string(),iss:l.string().url().optional(),aud:l.union([l.string(),l.array(l.string()).min(1)]).optional(),email:l.string().email().optional(),email_verified:l.boolean().optional(),name:l.string().optional(),preferred_username:l.string().optional(),picture:l.string().url().optional()});function sh({clientId:e}){const{i18n:t,_:s}=de();return Ro(e)?t._({id:"u607t5"}):Vo(e)?new URL(e).hostname:e}function nh({clientId:e,clientMetadata:t}){const{i18n:s,_:n}=de();return Ro(e)?s._({id:"4Yp2r7"}):t!=null&&t.client_name?t.client_name:Vo(e)?new URL(e).hostname:e}function ih(){const{account:e}=Mt(),{sub:t}=e,{data:s,isLoading:n,refetch:i}=Nu({sub:t});return s?s.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(L,{id:"kx1Bq7"})}),s.map(o=>a.jsx(rh,{sub:t,session:o},o.tokenId)),a.jsx("p",{className:"text-text-light mt-4 text-sm",children:a.jsx(L,{id:"SLeBc7"})})]}):a.jsx("p",{children:a.jsx(L,{id:"pWhWXw"})}):n?a.jsx(Aa,{className:"text-primary",size:28}):a.jsx(In,{role:"status",action:a.jsx(xa,{onClick:()=>i(),children:a.jsx(L,{id:"6gRgw8"})}),children:a.jsx(L,{id:"b9LiEi"})})}function rh({session:{clientId:e,clientMetadata:t,tokenId:s,createdAt:n,updatedAt:i,scope:o=t==null?void 0:t.scope},sub:r}){const{i18n:c,i18n:u,_:d}=de(),{notify:f}=lt(),{mutateAsync:h,isPending:g}=Fu(),v=sh({clientId:e}),b=nh({clientId:e,clientMetadata:t}),y=async()=>{try{await h({sub:r,tokenId:s}),f({variant:"success",title:c._({id:"AyHABv"}),duration:2e3})}catch(_){console.error("Failed to revoke OAuth session",_),f({variant:"error",title:c._({id:"ginpu1"}),duration:2e3})}};return a.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[a.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[a.jsx("p",{className:"truncate font-semibold",children:b}),a.jsx("p",{className:"font-mono text-xs",children:v}),a.jsxs("p",{className:"text-text-light truncate text-xs",children:[a.jsx(L,{id:"4hPphw",values:{0:u.date(n,{year:"numeric",month:"short",day:"numeric"})}})," • ",a.jsx(L,{id:"NNWPjN",components:{0:a.jsx(Iu,{date:i})}})]})]}),a.jsx(Ne,{size:"sm",className:"min-w-max shrink-0 grow-0",loading:g,onClick:y,children:a.jsx(L,{id:"Hwam5t"})})]})}const Uo=({sub:e})=>["account-sessions",e];function ah({sub:e}){const t=Ue();return za({refetchOnWindowFocus:"always",staleTime:15e3,queryKey:Uo({sub:e}),queryFn:async({signal:s})=>t.accountSessions({sub:e},{signal:s})})}function oh(){const e=Ue(),t=Nn();return ut({async mutationFn(s){await e.revokeAccountSession(s)},onSuccess(s,{sub:n}){t.invalidateQueries({queryKey:Uo({sub:n})})}})}var ch="2.0.3",Vi=500,$r="user-agent",Ps="",zr="?",On="function",Rt="undefined",Ms="object",Zi="string",Ce="browser",et="cpu",Qe="device",Ze="engine",Ie="os",fs="result",C="name",j="type",R="vendor",k="version",ke="architecture",Ys="major",E="model",zs="console",U="mobile",X="tablet",ue="smarttv",Be="wearable",li="xr",Ks="embedded",Fs="inapp",fr="brands",Vt="formFactors",pr="fullVersionList",ps="platform",mr="platformVersion",Bn="bitness",Lt="sec-ch-ua",lh=Lt+"-full-version-list",uh=Lt+"-arch",dh=Lt+"-"+Bn,hh=Lt+"-form-factors",fh=Lt+"-"+U,ph=Lt+"-"+E,qo=Lt+"-"+ps,mh=qo+"-version",Bo=[fr,pr,U,E,ps,mr,ke,Vt,Bn],pn="Amazon",ns="Apple",Kr="ASUS",Wr="BlackBerry",Tt="Google",Qr="Huawei",Gr="Lenovo",Jr="Honor",mn="LG",ui="Microsoft",di="Motorola",hi="Nvidia",Yr="OnePlus",fi="OPPO",Hs="Samsung",Xr="Sharp",Ts="Sony",pi="Xiaomi",mi="Zebra",ea="Chrome",ta="Chromium",dt="Chromecast",gh="Edge",Ds="Firefox",Vs="Opera",gi="Facebook",sa="Sogou",is="Mobile ",Zs=" Browser",Ui="Windows",vh=typeof window!==Rt,Ae=vh&&window.navigator?window.navigator:void 0,pt=Ae&&Ae.userAgentData?Ae.userAgentData:void 0,yh=function(e,t){var s={},n=t;if(!Ln(t)){n={};for(var i in t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[])}for(var r in e)s[r]=n[r]&&n[r].length%2===0?n[r].concat(e[r]):e[r];return s},$n=function(e){for(var t={},s=0;s<e.length;s++)t[e[s].toUpperCase()]=e[s];return t},qi=function(e,t){if(typeof e===Ms&&e.length>0){for(var s in e)if(st(e[s])==st(t))return!0;return!1}return Is(e)?st(t).indexOf(st(e))!==-1:!1},Ln=function(e,t){for(var s in e)return/^(browser|cpu|device|engine|os)$/.test(s)||(t?Ln(e[s]):!1)},Is=function(e){return typeof e===Zi},vi=function(e){if(e){for(var t=[],s=Os(/\\?\"/g,e).split(","),n=0;n<s.length;n++)if(s[n].indexOf(";")>-1){var i=Xs(s[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=Xs(s[n]);return t}},st=function(e){return Is(e)?e.toLowerCase():e},yi=function(e){return Is(e)?Os(/[^\d\.]/g,e).split(".")[0]:void 0},nt=function(e){for(var t in e){var s=e[t];typeof s==Ms&&s.length==2?this[s[0]]=s[1]:this[s]=void 0}return this},Os=function(e,t){return Is(t)?t.replace(e,Ps):t},Us=function(e){return Os(/\\?\"/g,e)},Xs=function(e,t){if(Is(e))return e=Os(/^\s\s*/,e),typeof t===Rt?e:e.substring(0,Vi)},bi=function(e,t){if(!(!e||!t))for(var s=0,n,i,o,r,c,u;s<t.length&&!c;){var d=t[s],f=t[s+1];for(n=i=0;n<d.length&&!c&&d[n];)if(c=d[n++].exec(e),c)for(o=0;o<f.length;o++)u=c[++i],r=f[o],typeof r===Ms&&r.length>0?r.length===2?typeof r[1]==On?this[r[0]]=r[1].call(this,u):this[r[0]]=r[1]:r.length===3?typeof r[1]===On&&!(r[1].exec&&r[1].test)?this[r[0]]=u?r[1].call(this,u,r[2]):void 0:this[r[0]]=u?u.replace(r[1],r[2]):void 0:r.length===4&&(this[r[0]]=u?r[3].call(this,u.replace(r[1],r[2])):void 0):this[r]=u||void 0;s+=2}},mt=function(e,t){for(var s in t)if(typeof t[s]===Ms&&t[s].length>0){for(var n=0;n<t[s].length;n++)if(qi(t[s][n],e))return s===zr?void 0:s}else if(qi(t[s],e))return s===zr?void 0:s;return t.hasOwnProperty("*")?t["*"]:e},na={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"},ia={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},ra={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[k,[C,is+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[k,[C,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[C,k],[/opios[\/ ]+([\w\.]+)/i],[k,[C,Vs+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[k,[C,Vs+" GX"]],[/\bopr\/([\w\.]+)/i],[k,[C,Vs]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[k,[C,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[k,[C,"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],[C,k],[/quark(?:pc)?\/([-\w\.]+)/i],[k,[C,"Quark"]],[/\bddg\/([\w\.]+)/i],[k,[C,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[k,[C,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[k,[C,"WeChat"]],[/konqueror\/([\w\.]+)/i],[k,[C,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[k,[C,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[k,[C,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[k,[C,"Smart "+Gr+Zs]],[/(avast|avg)\/([\w\.]+)/i],[[C,/(.+)/,"$1 Secure"+Zs],k],[/\bfocus\/([\w\.]+)/i],[k,[C,Ds+" Focus"]],[/\bopt\/([\w\.]+)/i],[k,[C,Vs+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[k,[C,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[k,[C,"Dolphin"]],[/coast\/([\w\.]+)/i],[k,[C,Vs+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[k,[C,"MIUI"+Zs]],[/fxios\/([\w\.-]+)/i],[k,[C,is+Ds]],[/\bqihoobrowser\/?([\w\.]*)/i],[k,[C,"360"]],[/\b(qq)\/([\w\.]+)/i],[[C,/(.+)/,"$1Browser"],k],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[C,/(.+)/,"$1"+Zs],k],[/samsungbrowser\/([\w\.]+)/i],[k,[C,Hs+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[k,[C,sa+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[C,sa+" Mobile"],k],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[C,k],[/(lbbrowser|rekonq)/i],[C],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[k,C],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[C,gi],k,[j,Fs]],[/(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],[C,k,[j,Fs]],[/\bgsa\/([\w\.]+) .*safari\//i],[k,[C,"GSA"],[j,Fs]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[k,[C,"TikTok"],[j,Fs]],[/\[(linkedin)app\]/i],[C,[j,Fs]],[/(chromium)[\/ ]([-\w\.]+)/i],[C,k],[/headlesschrome(?:\/([\w\.]+)| )/i],[k,[C,ea+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[C,ea+" WebView"],k],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[k,[C,"Android"+Zs]],[/chrome\/([\w\.]+) mobile/i],[k,[C,is+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[C,k],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[k,[C,is+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[C,is+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[k,C],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[C,[k,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[C,k],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[C,is+Ds],k],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[C,"Netscape"],k],[/(wolvic|librewolf)\/([\w\.]+)/i],[C,k],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[k,[C,Ds+" 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],[C,[k,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[C,[k,/[^\d\.]+./,Ps]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[ke,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[ke,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[ke,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[ke,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[ke,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[ke,/ower/,Ps,st]],[/ sun4\w[;\)]/i],[[ke,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[ke,st]]],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],[E,[R,Hs],[j,X]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[E,[R,Hs],[j,U]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[E,[R,ns],[j,U]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[E,[R,ns],[j,X]],[/(macintosh);/i],[E,[R,ns]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[E,[R,Xr],[j,U]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[E,[R,Jr],[j,X]],[/honor([-\w ]+)[;\)]/i],[E,[R,Jr],[j,U]],[/\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],[E,[R,Qr],[j,X]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[E,[R,Qr],[j,U]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[E,/_/g," "],[R,pi],[j,X]],[/\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],[[E,/_/g," "],[R,pi],[j,U]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[E,[R,fi],[j,U]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[E,[R,mt,{OnePlus:["304","403","203"],"*":fi}],[j,X]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[E,[R,"BLU"],[j,U]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[E,[R,"Vivo"],[j,U]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[E,[R,"Realme"],[j,U]],[/\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],[E,[R,di],[j,U]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[E,[R,di],[j,X]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[E,[R,mn],[j,X]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[E,[R,mn],[j,U]],[/(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],[E,[R,Gr],[j,X]],[/(nokia) (t[12][01])/i],[R,E,[j,X]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[E,/_/g," "],[j,U],[R,"Nokia"]],[/(pixel (c|tablet))\b/i],[E,[R,Tt],[j,X]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[E,[R,Tt],[j,U]],[/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],[E,[R,Ts],[j,U]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[E,"Xperia Tablet"],[R,Ts],[j,X]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[E,[R,Yr],[j,U]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[E,[R,pn],[j,X]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[E,/(.+)/g,"Fire Phone $1"],[R,pn],[j,U]],[/(playbook);[-\w\),; ]+(rim)/i],[E,R,[j,X]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[E,[R,Wr],[j,U]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[E,[R,Kr],[j,X]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[E,[R,Kr],[j,U]],[/(nexus 9)/i],[E,[R,"HTC"],[j,X]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[R,[E,/_/g," "],[j,U]],[/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],[E,[R,"TCL"],[j,X]],[/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],[E,[R,"TCL"],[j,U]],[/(itel) ((\w+))/i],[[R,st],E,[j,mt,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[E,[R,"Acer"],[j,X]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[E,[R,"Meizu"],[j,U]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[E,[R,"Ulefone"],[j,U]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[E,[R,"Energizer"],[j,U]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[E,[R,"Cat"],[j,U]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[E,[R,"Smartfren"],[j,U]],[/droid.+; (a(?:015|06[35]|142p?))/i],[E,[R,"Nothing"],[j,U]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[E,[R,"Archos"],[j,X]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[E,[R,"Archos"],[j,U]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[R,E,[j,X]],[/(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],[R,E,[j,U]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[R,E,[j,X]],[/(surface duo)/i],[E,[R,ui],[j,X]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[E,[R,"Fairphone"],[j,U]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[E,[R,hi],[j,X]],[/(sprint) (\w+)/i],[R,E,[j,U]],[/(kin\.[onetw]{3})/i],[[E,/\./g," "],[R,ui],[j,U]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[E,[R,mi],[j,X]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[E,[R,mi],[j,U]],[/smart-tv.+(samsung)/i],[R,[j,ue]],[/hbbtv.+maple;(\d+)/i],[[E,/^/,"SmartTV"],[R,Hs],[j,ue]],[/tcast.+(lg)e?. ([-\w]+)/i],[R,E,[j,ue]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[R,mn],[j,ue]],[/(apple) ?tv/i],[R,[E,ns+" TV"],[j,ue]],[/crkey.*devicetype\/chromecast/i],[[E,dt+" Third Generation"],[R,Tt],[j,ue]],[/crkey.*devicetype\/([^/]*)/i],[[E,/^/,"Chromecast "],[R,Tt],[j,ue]],[/fuchsia.*crkey/i],[[E,dt+" Nest Hub"],[R,Tt],[j,ue]],[/crkey/i],[[E,dt],[R,Tt],[j,ue]],[/(portaltv)/i],[E,[R,gi],[j,ue]],[/droid.+aft(\w+)( bui|\))/i],[E,[R,pn],[j,ue]],[/(shield \w+ tv)/i],[E,[R,hi],[j,ue]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[E,[R,Xr],[j,ue]],[/(bravia[\w ]+)( bui|\))/i],[E,[R,Ts],[j,ue]],[/(mi(tv|box)-?\w+) bui/i],[E,[R,pi],[j,ue]],[/Hbbtv.*(technisat) (.*);/i],[R,E,[j,ue]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[R,Xs],[E,Xs],[j,ue]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[E,[j,ue]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[j,ue]],[/(ouya)/i,/(nintendo) (\w+)/i],[R,E,[j,zs]],[/droid.+; (shield)( bui|\))/i],[E,[R,hi],[j,zs]],[/(playstation \w+)/i],[E,[R,Ts],[j,zs]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[E,[R,ui],[j,zs]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[E,[R,Hs],[j,Be]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[R,E,[j,Be]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[E,[R,fi],[j,Be]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[E,[R,ns],[j,Be]],[/(opwwe\d{3})/i],[E,[R,Yr],[j,Be]],[/(moto 360)/i],[E,[R,di],[j,Be]],[/(smartwatch 3)/i],[E,[R,Ts],[j,Be]],[/(g watch r)/i],[E,[R,mn],[j,Be]],[/droid.+; (wt63?0{2,3})\)/i],[E,[R,mi],[j,Be]],[/droid.+; (glass) \d/i],[E,[R,Tt],[j,li]],[/(pico) (4|neo3(?: link|pro)?)/i],[R,E,[j,li]],[/(quest( \d| pro)?s?).+vr/i],[E,[R,gi],[j,li]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[R,[j,Ks]],[/(aeobc)\b/i],[E,[R,pn],[j,Ks]],[/(homepod).+mac os/i],[E,[R,ns],[j,Ks]],[/windows iot/i],[[j,Ks]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[E,[j,mt,{mobile:"Mobile",xr:"VR","*":X}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[j,X]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[j,U]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[E,[R,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[k,[C,gh+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[C,k],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[k,[C,"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],[C,k],[/ladybird\//i],[[C,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[k,C]],os:[[/microsoft (windows) (vista|xp)/i],[C,k],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[C,[k,mt,na]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[k,mt,na],[C,Ui]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[k,/_/g,"."],[C,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[C,"macOS"],[k,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[k,[C,dt+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[k,[C,dt+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[k,[C,dt+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[k,[C,dt+" Linux"]],[/crkey\/([\d\.]+)/i],[k,[C,dt]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[k,C],[/(ubuntu) ([\w\.]+) like android/i],[[C,/(.+)/,"$1 Touch"],k],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[C,k],[/\(bb(10);/i],[k,[C,Wr]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[k,[C,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[k,[C,Ds+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[k,[C,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[k,[C,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[C,"Chrome OS"],k],[/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],[C,k],[/(sunos) ?([\w\.\d]*)/i],[[C,"Solaris"],k],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[C,k]]},gn=function(){var e={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return nt.call(e.init,[[Ce,[C,k,Ys,j]],[et,[ke]],[Qe,[j,E,R]],[Ze,[C,k]],[Ie,[C,k]]]),nt.call(e.isIgnore,[[Ce,[k,Ys]],[Ze,[k]],[Ie,[k]]]),nt.call(e.isIgnoreRgx,[[Ce,/ ?browser$/i],[Ie,/ ?os$/i]]),nt.call(e.toString,[[Ce,[C,k]],[et,[ke]],[Qe,[R,E]],[Ze,[C,k]],[Ie,[C,k]]]),e}(),bh=function(e,t){var s=gn.init[t],n=gn.isIgnore[t]||0,i=gn.isIgnoreRgx[t]||0,o=gn.toString[t]||0;function r(){nt.call(this,s)}return r.prototype.getItem=function(){return e},r.prototype.withClientHints=function(){return pt?pt.getHighEntropyValues(Bo).then(function(c){return e.setCH(new $o(c,!1)).parseCH().get()}):e.parseCH().get()},r.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=fs&&(r.prototype.is=function(c){var u=!1;for(var d in this)if(this.hasOwnProperty(d)&&!qi(n,d)&&st(i?Os(i,this[d]):this[d])==st(i?Os(i,c):c)){if(u=!0,c!=Rt)break}else if(c==Rt&&u){u=!u;break}return u},r.prototype.toString=function(){var c=Ps;for(var u in o)typeof this[o[u]]!==Rt&&(c+=(c?" ":Ps)+this[o[u]]);return c||Rt}),pt||(r.prototype.then=function(c){var u=this,d=function(){for(var h in u)u.hasOwnProperty(h)&&(this[h]=u[h])};d.prototype={is:r.prototype.is,toString:r.prototype.toString};var f=new d;return c(f),f}),new r};function $o(e,t){if(e=e||{},nt.call(this,Bo),t)nt.call(this,[[fr,vi(e[Lt])],[pr,vi(e[lh])],[U,/\?1/.test(e[fh])],[E,Us(e[ph])],[ps,Us(e[qo])],[mr,Us(e[mh])],[ke,Us(e[uh])],[Vt,vi(e[hh])],[Bn,Us(e[dh])]]);else for(var s in e)this.hasOwnProperty(s)&&typeof e[s]!==Rt&&(this[s]=e[s])}function aa(e,t,s,n){return this.get=function(i){return i?this.data.hasOwnProperty(i)?this.data[i]:void 0:this.data},this.set=function(i,o){return this.data[i]=o,this},this.setCH=function(i){return this.uaCH=i,this},this.detectFeature=function(){if(Ae&&Ae.userAgent==this.ua)switch(this.itemType){case Ce:Ae.brave&&typeof Ae.brave.isBrave==On&&this.set(C,"Brave");break;case Qe:!this.get(j)&&pt&&pt[U]&&this.set(j,U),this.get(E)=="Macintosh"&&Ae&&typeof Ae.standalone!==Rt&&Ae.maxTouchPoints&&Ae.maxTouchPoints>2&&this.set(E,"iPad").set(j,X);break;case Ie:!this.get(C)&&pt&&pt[ps]&&this.set(C,pt[ps]);break;case fs:var i=this.data,o=function(r){return i[r].getItem().detectFeature().get()};this.set(Ce,o(Ce)).set(et,o(et)).set(Qe,o(Qe)).set(Ze,o(Ze)).set(Ie,o(Ie))}return this},this.parseUA=function(){return this.itemType!=fs&&bi.call(this.data,this.ua,this.rgxMap),this.itemType==Ce&&this.set(Ys,yi(this.get(k))),this},this.parseCH=function(){var i=this.uaCH,o=this.rgxMap;switch(this.itemType){case Ce:case Ze:var r=i[pr]||i[fr],c;if(r)for(var u in r){var d=r[u].brand||r[u],f=r[u].version;this.itemType==Ce&&!/not.a.brand/i.test(d)&&(!c||/chrom/i.test(c)&&d!=ta)&&(d=mt(d,{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(C,d).set(k,f).set(Ys,yi(f)),c=d),this.itemType==Ze&&d==ta&&this.set(k,f)}break;case et:var h=i[ke];h&&(h&&i[Bn]=="64"&&(h+="64"),bi.call(this.data,h+";",o));break;case Qe:if(i[U]&&this.set(j,U),i[E]&&(this.set(E,i[E]),!this.get(j)||!this.get(R))){var g={};bi.call(g,"droid 9; "+i[E]+")",o),!this.get(j)&&g.type&&this.set(j,g.type),!this.get(R)&&g.vendor&&this.set(R,g.vendor)}if(i[Vt]){var v;if(typeof i[Vt]!="string")for(var b=0;!v&&b<i[Vt].length;)v=mt(i[Vt][b++],ia);else v=mt(i[Vt],ia);this.set(j,v)}break;case Ie:var y=i[ps];if(y){var _=i[mr];y==Ui&&(_=parseInt(yi(_),10)>=13?"11":"10"),this.set(C,y).set(k,_)}this.get(C)==Ui&&i[E]=="Xbox"&&this.set(C,"Xbox").set(k,void 0);break;case fs:var S=this.data,M=function(P){return S[P].getItem().setCH(i).parseCH().get()};this.set(Ce,M(Ce)).set(et,M(et)).set(Qe,M(Qe)).set(Ze,M(Ze)).set(Ie,M(Ie))}return this},nt.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",s],["data",bh(this,e)]]),this}function ot(e,t,s){if(typeof e===Ms?(Ln(e,!0)?(typeof t===Ms&&(s=t),t=e):(s=e,t=void 0),e=void 0):typeof e===Zi&&!Ln(t,!0)&&(s=t,t=void 0),s&&typeof s.append===On){var n={};s.forEach(function(u,d){n[d]=u}),s=n}if(!(this instanceof ot))return new ot(e,t,s).getResult();var i=typeof e===Zi?e:s&&s[$r]?s[$r]:Ae&&Ae.userAgent?Ae.userAgent:Ps,o=new $o(s,!0),r=t?yh(ra,t):ra,c=function(u){return u==fs?function(){return new aa(u,i,r,o).set("ua",i).set(Ce,this.getBrowser()).set(et,this.getCPU()).set(Qe,this.getDevice()).set(Ze,this.getEngine()).set(Ie,this.getOS()).get()}:function(){return new aa(u,i,r[u],o).parseUA().get()}};return nt.call(this,[["getBrowser",c(Ce)],["getCPU",c(et)],["getDevice",c(Qe)],["getEngine",c(Ze)],["getOS",c(Ie)],["getResult",c(fs)],["getUA",function(){return i}],["setUA",function(u){return Is(u)&&(i=u.length>Vi?Xs(u,Vi):u),this}]]).setUA(i),this}ot.VERSION=ch;ot.BROWSER=$n([C,k,Ys,j]);ot.CPU=$n([ke]);ot.DEVICE=$n([E,R,j,zs,U,ue,X,Be,Ks]);ot.ENGINE=ot.OS=$n([C,k]);function wh(e){const t=p.useMemo(()=>e?ot(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 xh(){const{account:e}=Mt(),{data:t,refetch:s,isLoading:n}=ah(e);return t?t.length>0?a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{children:a.jsx(L,{id:"CbBmBd",components:{0:a.jsx(Pn,{to:"/account/apps",className:"text-blue-600 hover:underline"})}})}),t.map(i=>a.jsx(_h,{sub:e.sub,session:i},`${e.sub}@${i.deviceId}`))]}):a.jsx("p",{children:a.jsx(L,{id:"Ssa5RR"})}):n?a.jsx(Aa,{className:"text-primary",size:28}):a.jsx(In,{role:"status",action:a.jsx(xa,{onClick:()=>s(),children:a.jsx(L,{id:"6gRgw8"})}),children:a.jsx(L,{id:"b9LiEi"})})}function _h({session:e,sub:t}){const{notify:s}=lt(),{i18n:n,_:i}=de(),{mutateAsync:o,isPending:r}=oh(),{userAgent:c,lastSeenAt:u,ipAddress:d}=e.deviceMetadata,f=wh(c||void 0),h=wo(u),g=async()=>{try{await o({sub:t,deviceId:e.deviceId}),s({variant:"success",title:n._({id:"jAO4/H"}),duration:2e3})}catch{s({variant:"error",title:n._({id:"CiwBmN"}),duration:2e3})}};return a.jsxs("div",{className:"border-contrast-50 dark:border-contrast-100 flex flex-wrap items-center justify-between space-x-4 border-t px-2 pt-3",children:[a.jsxs("div",{className:"flex min-w-36 flex-1 flex-col space-x-2 truncate",children:[a.jsx("p",{className:"truncate font-semibold",children:f||a.jsx(L,{id:"K80Okk"})}),a.jsx("p",{className:"font-mono text-xs",children:d}),a.jsx("p",{className:"text-text-light truncate text-xs",children:a.jsx(L,{id:"sJZ6K9",values:{lastUsedAgo:h}})})]}),a.jsx(Ne,{size:"sm",className:"min-w-max shrink-0 grow-0",disabled:e.isCurrentDevice,loading:r,onClick:g,title:e.isCurrentDevice?n._({id:"JOalQJ"}):void 0,children:a.jsx(L,{id:"MzTcmM"})})]})}function At({title:e,description:t,trigger:s,children:n,dismissable:i=!0,...o}){const{i18n:r,_:c}=de(),u=i?void 0:d=>d.preventDefault();return a.jsxs(ac,{...o,children:[a.jsx(oc,{asChild:!0,children:s}),a.jsxs(cc,{children:[a.jsx(lc,{className:"bg-contrast-900/30 dark:bg-contrast-0/70 fixed inset-0"}),a.jsxs(uc,{role:"dialog",...t==null&&{"aria-describedby":void 0},onEscapeKeyDown:u,onPointerDownOutside:u,onInteractOutside:u,className:"bg-contrast-0 fixed inset-0 flex flex-col overflow-y-auto border-slate-200 p-6 shadow-xl sm:inset-auto sm:left-1/2 sm:top-1/2 sm:max-h-[85vh] sm:w-[90vw] sm:max-w-md sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-lg sm:border dark:border-slate-700",children:[n,a.jsxs("div",{className:"-order-1 mb-4 flex items-start justify-between gap-4",children:[a.jsxs("div",{className:"flex flex-col gap-1",children:[a.jsx(dc,{className:"text-text-default text-lg font-semibold",children:e}),t&&a.jsx(hc,{className:"text-text-light text-sm",children:t})]}),a.jsx(fc,{disabled:!i,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":r._({id:"yz7wBu"}),children:a.jsx(ka,{className:"size-5","aria-hidden":!0})})]})]})]})]})}function gr({children:e=a.jsx(L,{id:"Qze0/r"}),...t}){return a.jsx(pc,{idleIcon:go,...t,children:a.jsx("span",{className:"truncate",children:e})})}function Sh({emailCurrent:e,requestPending:t,confirmPending:s,onResend:n,...i}){return a.jsx(ks,{...i,loading:i.loading||t,validate:({email:o,token:r})=>{if(o&&r)return{email:o,token:r}},fields:({values:o,set:r})=>a.jsxs(a.Fragment,{children:[e&&a.jsxs(a.Fragment,{children:[a.jsx("input",{type:"password",autoComplete:"current-password",hidden:!0}),a.jsx("input",{type:"email",autoComplete:"username",value:e,readOnly:!0,hidden:!0})]}),a.jsx(Yt,{label:a.jsx(L,{id:"OenGwo"}),children:a.jsx(Pa,{name:"newEmail",required:!0,autoFocus:!0,defaultValue:o.email,onEmail:c=>r("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(L,{id:"4fWT0G"})}),a.jsx("p",{className:"mt-1",children:a.jsx(L,{id:"jK9hhN"})})]}),a.jsx(Yt,{label:a.jsx(L,{id:"wLmRnI"}),children:a.jsx(zi,{name:"code",required:!0,autoFocus:!0,defaultValue:o.token,onToken:c=>r("token",c??void 0)})}),a.jsxs("p",{className:"text-sm italic",children:[a.jsx(L,{id:"wadss7"}),a.jsx(gr,{disabled:s,loading:t,action:n,transparent:!0,size:"sm",shape:"padded",startWithCooldown:!0,children:a.jsx(L,{id:"x1TXhd"})})]})]})})}function jh({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:i,onVerify:o,children:r,introMessage:c}){const[u,d]=p.useState(!1),[f,h]=p.useState(0),[g,v]=p.useState(void 0),[b,y]=p.useState(!1);p.useEffect(()=>{h(0),v(void 0)},[u]);const _=!b;return f===2&&g&&o?a.jsx(At,{trigger:r,open:u,onOpenChange:d,dismissable:_,title:a.jsxs(a.Fragment,{children:[a.jsx(mc,{className:"text-success inline",weight:"bold"})," ",a.jsx(L,{id:"kbts6J"})]}),description:a.jsx(L,{id:"W5g73W",values:{email:g},components:{0:a.jsx("strong",{})}}),children:a.jsx(ks,{onCancel:()=>d(!1),cancelLabel:a.jsx(L,{id:"Q2Fq1L"}),submitLabel:a.jsx(L,{id:"HFfnZo"}),onLoadingChange:y,validate:({token:S})=>S?{token:S,email:g}:void 0,handler:async S=>{await o(S),d(!1)},fields:({values:S,set:M})=>a.jsx(Yt,{label:a.jsx(L,{id:"AdWhjZ"}),children:a.jsx(zi,{name:"code",required:!0,autoFocus:!0,defaultValue:S.token??void 0,onToken:P=>M("token",P??void 0)})})})}):f===1?a.jsx(At,{trigger:r,open:u,onOpenChange:d,dismissable:_,title:a.jsx(L,{id:"GmYkFm"}),description:a.jsx(L,{id:"vsqx1t"}),children:a.jsx(Sh,{emailCurrent:e,requestPending:t,confirmPending:s,values:{email:g},onLoadingChange:y,onResend:async()=>{await n()},handler:async S=>{await i(S),v(S.email),o?h(2):d(!1)}})}):a.jsx(At,{trigger:r,open:u,onOpenChange:d,dismissable:_,title:a.jsx(L,{id:"GmYkFm"}),description:a.jsx(L,{id:"vsqx1t"}),children:a.jsx(ks,{disabled:t,values:{email:g},onLoadingChange:y,validate:({email:S})=>S?{email:S}:void 0,handler:async S=>{const{tokenRequired:M}=await n();v(S.email),M?h(1):(await i(S),o?h(2):d(!1))},fields:({values:S,set:M})=>a.jsxs(a.Fragment,{children:[c,a.jsx(Yt,{label:a.jsx(L,{id:"OenGwo"}),children:a.jsx(Pa,{name:"email",required:!0,autoFocus:!0,defaultValue:S.email,onEmail:P=>M("email",P)})})]})})})}function Eh({onHandle:e,did:t,onChange:s,autoCapitalize:n="none",autoComplete:i="off",autoCorrect:o="off",dir:r="auto",icon:c=a.jsx(Ma,{"aria-hidden":!0,weight:"bold",className:"size-5"}),title:u,placeholder:d,...f}){const{i18n:h,_:g}=de();return a.jsx(gc,{...f,type:"text",title:u??h._({id:"VxXoAs"}),placeholder:d??h._({id:"pC6cwz"}),autoCapitalize:n,autoComplete:i,autoCorrect:o,dir:r,icon:c,onChange:Oc(s,v=>{e==null||e(Rh(v.target.value))})})}function Rh(e){const t=vc(e.trim());if(t.length&&Ki(t)&&yc(t))return t}function Ch({value:e,label:t={id:"/4gGIX"},feedbackDurationMs:s=1500,shape:n="padded",size:i="sm",disabled:o,"aria-label":r,title:c,onClick:u,...d}){const{_:f}=de(),[h,g]=p.useState(!1),v=p.useRef(void 0);p.useEffect(()=>()=>{v.current&&clearTimeout(v.current)},[]);const b=o||e==null;return a.jsxs(ja,{open:h,children:[a.jsx(Ea,{asChild:!0,children:a.jsx(Ne,{...d,size:i,shape:n,disabled:b,title:c??f(t),"aria-label":r??f(t),onClick:async y=>{if(u==null||u(y),!(y.defaultPrevented||e==null))try{await navigator.clipboard.writeText(e),g(!0),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>g(!1),s)}catch(_){console.warn("Failed to copy to clipboard",_)}},children:a.jsx(lo,{"aria-hidden":!0,weight:"regular",className:i==="sm"?"size-4":i==="lg"?"size-6":"size-5"})})}),a.jsx(Ra,{children:a.jsx(Ca,{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(L,{id:"6V3Ea3"})})})})]})}function kh({label:e,children:t,copyable:s=!0,className:n,...i}){return a.jsxs("div",{...i,className:Jt("flex flex-col",n),children:[e&&a.jsx("span",{className:"text-text-light text-sm",children:e}),a.jsxs("div",{className:"flex items-stretch gap-2",children:[a.jsx("code",{className:"flex flex-1 items-center break-all rounded-md bg-gray-100 px-2 py-1 font-mono text-sm dark:bg-gray-800",children:t}),a.jsx(Ch,{value:s?t:void 0,size:"sm"})]})]})}function Ah({value:e,onChange:t,options:s,maxColumns:n=s.length%3===0?3:2,name:i,className:o,...r}){const c=p.useId(),u=i??`radio-group-${c}`,d=Math.min(n,s.length);return a.jsx("div",{...r,className:Jt("grid grid-cols-1 gap-2",d>=2&&"sm:grid-cols-2",d>=3&&"md:grid-cols-3",d>=4&&"lg:grid-cols-4",o),children:s.map((f,h)=>{const g=!f.disabled&&f.value===e,v=`${u}-${h}`,b=f.label,y=f.description,_=y?`${v}-description`:void 0;return a.jsxs("label",{htmlFor:v,className:Jt("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",f.disabled?"text-text-light cursor-not-allowed opacity-60":"cursor-pointer",g?"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:v,name:u,checked:g,disabled:f.disabled,"aria-describedby":_,onChange:S=>{S.target.checked&&!f.disabled&&(t==null||t(f.value))},className:"accent-primary mt-1 shrink-0"}),a.jsxs("span",{className:"flex flex-col gap-0.5",children:[a.jsx("span",{children:b}),y&&a.jsx("span",{id:_,className:"text-text-light leading-snug",children:y})]})]},v)})})}function Ph({handle:e,did:t,...s}){const{i18n:n,_:i}=de(),[o,r]=p.useState(0),c=p.useMemo(()=>[{method:0,label:n._({id:"5M4Te3"}),description:n._({id:"q6Kda8"}),message:n._({id:"wIcl4E"}),values:[{label:n._({id:"Ai2U7L"}),value:`_atproto.${e??n._({id:"Qy+y0S"})}`,copyable:e!=null},{label:n._({id:"+zy2Nq"}),value:"TXT"},{label:n._({id:"wMHvYH"}),value:`did=${t}`}]},{method:1,label:n._({id:"LUTGt0"}),description:n._({id:"Zf0mtN"}),message:n._({id:"OgbFua"}),values:[{label:n._({id:"IagCbF"}),value:`https://${e??n._({id:"Qy+y0S"})}/.well-known/atproto-did`,copyable:e!=null},{label:n._({id:"TiHb0n"}),value:t}]}],[e,t]),u=c.find(g=>g.method===o)||c[0],d="https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial",f=p.useMemo(()=>{if(!e)return;const g=new URL("https://bsky-debug.app/handle");return g.searchParams.set("handle",e),g.toString()},[e]),h=p.useMemo(()=>{if(!e)return;const g=n._({id:"cqWp5F",values:{handle:e,did:t,troubleshootHref:f,tutorialHref:d,0:c.map(({label:v,message:b,values:y})=>`${v}: ${b}
|
|
20
|
+
${y.map(({label:_,value:S})=>`${_}: ${S}`).join(`
|
|
21
|
+
`)}`).join(`
|
|
22
|
+
|
|
23
|
+
`)}});return`mailto:?body=${encodeURIComponent(g)}`},[e,d,f,c]);return a.jsxs("div",{...s,children:[a.jsx(Yt,{label:n._({id:"2AW+PM"}),children:a.jsx(Ah,{maxColumns:1,value:u.method,onChange:r,options:c.map(({method:g,label:v,description:b})=>({value:g,label:v,description:b}))})}),a.jsx("p",{className:"my-2",children:u.message}),u.values.map(({label:g,value:v,copyable:b},y)=>a.jsx(kh,{label:g,copyable:b,children:v},y)),a.jsxs("p",{className:"my-2 flex flex-row flex-wrap gap-3",children:[a.jsx(Et,{href:d,className:"text-blue-600 hover:underline",children:a.jsx(L,{id:"c3XJ18"})}),a.jsx(Et,{href:f,className:"text-blue-600 hover:underline",children:a.jsx(L,{id:"et+mIi"})}),a.jsx(Et,{href:h,noUtm:!0,className:"text-blue-600 hover:underline",children:a.jsx(L,{id:"CzD50V"})})]})]})}function Mh({did:e,...t}){return a.jsx(ks,{...t,validate:({handle:s})=>{if(s&&Ki(s))return{handle:s}},fields:({values:s,setterFor:n})=>a.jsxs(a.Fragment,{children:[a.jsx(Yt,{label:a.jsx(L,{id:"BfIgP6"}),children:a.jsx(Eh,{defaultValue:s.handle,onHandle:n("handle"),did:e,name:"domain",required:!0,autoFocus:!0,enterKeyHint:"done"})}),a.jsx(Ph,{className:"text-sm",handle:s.handle,did:e})]})})}function Oh({domains:e,...t}){return a.jsx(ks,{...t,validate:({handle:s})=>{if(s&&e.some(n=>s.endsWith(n)))return{handle:s}},fields:({values:s,set:n})=>a.jsx(bc,{handle:s.handle,onHandle:i=>n("handle",i),domains:e,name:"handle",required:!0,autoFocus:!0,enterKeyHint:"done"})})}function Lh({handler:e,children:t,domains:s,currentHandle:n,did:i}){const[o,r]=p.useState(!1),[c,u]=p.useState(null),[d,f]=p.useState(!1);p.useEffect(()=>{o||u(null)},[o]);const h=!d,[g,v]=n&&s.some(b=>n.endsWith(b))?[n,void 0]:[void 0,n];return c===0&&s.length?a.jsx(At,{open:o,onOpenChange:r,dismissable:h,trigger:t,title:a.jsx(L,{id:"T6sYqW"}),description:a.jsx(L,{id:"Bno89U"}),children:a.jsx(Oh,{domains:s,onBack:()=>u(null),values:{handle:g},onLoadingChange:f,handler:async(b,y)=>{await e(b,y),r(!1)}})}):c===1?a.jsx(At,{open:o,onOpenChange:r,dismissable:h,trigger:t,title:a.jsx(L,{id:"T6sYqW"}),description:a.jsx(L,{id:"O78aQm"}),children:a.jsx(Mh,{did:i,onBack:()=>u(null),submitLabel:a.jsx(L,{id:"G7Vcxo"}),values:{handle:v},onLoadingChange:f,handler:async(b,y)=>{await e(b,y),r(!1)}})}):a.jsx(At,{trigger:t,title:a.jsx(L,{id:"T6sYqW"}),description:a.jsx(L,{id:"GNCK6k",components:{0:a.jsx(Et,{href:"https://bsky.social/about/blog/4-28-2023-domain-handle-tutorial",className:"text-blue-600 hover:underline"})}}),open:o,onOpenChange:r,children:a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(Ne,{onClick:()=>u(0),disabled:!s.length,children:a.jsx(oa,{label:a.jsx(L,{id:"57gCMx"}),example:a.jsx(L,{id:"Zhm/NX",values:{0:s[0]},components:{0:a.jsx("em",{})}})})}),a.jsx(Ne,{onClick:()=>u(1),children:a.jsx(oa,{label:a.jsx(L,{id:"Pahpw8"}),example:a.jsx(L,{id:"2ns2wB",components:{0:a.jsx("em",{})}})})})]})})}function oa({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 Ih({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:i,children:o}){const{i18n:r,_:c}=de(),[u,d]=p.useState(!1),[f,h]=p.useState(0),[g,v]=p.useState(!1);p.useEffect(()=>{u||h(0)},[u]);const b=!t&&!g;return a.jsx(At,{trigger:o,title:r._({id:"qRxXtM"}),description:a.jsx(L,{id:"ukpmGq"}),open:u,onOpenChange:d,dismissable:b,children:f===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(gr,{action:async()=>{await n(),h(1)},loading:t,disabled:s,color:"primary",className:"w-full"}),a.jsx(Ne,{onClick:()=>h(1),className:"w-full",children:a.jsx(L,{id:"FTT4a4"})})]}):a.jsx(wc,{email:e,disabled:s,onLoadingChange:v,handler:async y=>{await i(y),d(!1)}})})}function Nh(e){return a.jsx(ks,{...e,validate:({token:t})=>{if(t)return{token:t}},fields:({set:t,values:s})=>a.jsx(Yt,{label:a.jsx(L,{id:"AdWhjZ"}),children:a.jsx(zi,{name:"code",enterKeyHint:"done",required:!0,autoFocus:!0,defaultValue:s.token,onToken:n=>t("token",n??void 0)})})})}function Fh({email:e,requestPending:t,confirmPending:s,onRequest:n,onConfirm:i,children:o}){const{i18n:r,_:c}=de(),[u,d]=p.useState(!1),[f,h]=p.useState(0),[g,v]=p.useState(!1);p.useEffect(()=>{u||h(0)},[u]);const b=!t&&!g;return a.jsx(At,{trigger:o,title:r._({id:"/IBv6X"}),description:a.jsx(L,{id:"+Qnl3Q",values:{email:e},components:{0:a.jsx("strong",{})}}),open:u,onOpenChange:d,dismissable:b,children:f===0?a.jsxs("div",{className:"align-stretch flex flex-col gap-4",children:[a.jsx(gr,{action:async()=>{await n(),h(1)},loading:t,disabled:s,color:"primary",className:"w-full"}),a.jsx(Ne,{onClick:()=>h(1),className:"w-full",children:a.jsx(L,{id:"FTT4a4"})})]}):a.jsx(Nh,{disabled:s,onLoadingChange:v,handler:async y=>{await i(y),d(!1)}})})}function Hh(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.updateEmailRequest(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"Y/tbFA"}),description:t._({id:"lAK2OC"})})},onError(i,o,r){console.error("Failed to request email change",i),n({variant:"error",title:t._({id:"E1zEOj"}),description:t._({id:"JANaVF"})})}})}function Th(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.updateEmailConfirm(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"j/19E8"}),description:t._({id:"YNQVYW"})})},onError(i,o,r){console.error("Failed to change email",i),n({variant:"error",title:t._({id:"PNuvRd"}),description:t._({id:"q1d4qv"})})}})}function Dh(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.verifyEmailRequest(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"I6Q2R9"}),description:t._({id:"rpbuva"})})},onError(i,o,r){console.error("Failed to request email verification",i),n({variant:"error",title:t._({id:"yI9fD4"}),description:t._({id:"U/me+u"})})}})}function zo(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.verifyEmailConfirm(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"PLEl94"}),description:t._({id:"HrYlJ7"})})},onError(i,o,r){console.error("Failed to verify email",i),n({variant:"error",title:t._({id:"rxy0tG"}),description:t._({id:"78Ju9c"})})}})}function Vh(){const e=Ue(),{_:t}=de(),{notify:s}=lt();return ut({async mutationFn(n){return e.updateHandle(n)},onSuccess(n,i,o){s({variant:"success",title:t({id:"2HQiAC"}),description:t({id:"6Hg1zS"})})},onError(n,i,o){console.error("Failed to update username",n),s({variant:"error",title:t({id:"DsHRti"}),description:t(Lc(n)??{id:"GZC2rQ"})})}})}function Zh(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.initiatePasswordReset(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"boBFOP"}),description:t._({id:"lAK2OC"})})},onError(i,o,r){console.error("Failed to request password reset",i),n({variant:"error",title:t._({id:"eMlT5s"}),description:t._({id:"JANaVF"})})}})}function Uh(){const e=Ue(),{i18n:t,_:s}=de(),{notify:n}=lt();return ut({async mutationFn(i){return e.confirmResetPassword(i)},onSuccess(i,o,r){n({variant:"success",title:t._({id:"D9Jms7"}),description:t._({id:"67nRLM"})})},onError(i,o,r){console.error("Failed to reset password",i),n({variant:"error",title:t._({id:"3DLYmM"}),description:t._({id:"q1d4qv"})})}})}function qh(){return a.jsxs("div",{className:"flex flex-col gap-2",children:[a.jsx(Bh,{}),a.jsx($h,{}),a.jsx(zh,{}),a.jsx("hr",{className:"border-none","aria-hidden":!0}),a.jsx(Kh,{})]})}function Bh(){const{account:e}=Mt(),{sub:t,email:s,email_verified:n}=e,i=Dh(),o=zo();return!s||n?null:a.jsx(In,{role:"info",icon:vo,action:a.jsx(Fh,{email:s,requestPending:i.isPending,confirmPending:o.isPending,onRequest:async()=>{await i.mutateAsync({sub:t})},onConfirm:async({token:r})=>{await o.mutateAsync({sub:t,token:r,email:s})},children:a.jsx(Ne,{size:"sm",color:"info",children:a.jsx(L,{id:"HFfnZo"})})}),children:a.jsx(L,{id:"Eo3tBf"})})}function $h(e){const{account:t}=Mt(),s=Bi(),{sub:n,email:i}=t,o=Hh(),r=Th(),c=zo();return a.jsx(jh,{email:i,requestPending:o.isPending,confirmPending:r.isPending,onRequest:async()=>o.mutateAsync({sub:n}),onConfirm:async({email:u,token:d})=>{await r.mutateAsync({sub:n,email:u,token:d})},onVerify:async({email:u,token:d})=>{await c.mutateAsync({sub:n,email:u,token:d})},introMessage:s.show2FaWarningOnEmailUpdate&&a.jsx(In,{role:"warning",className:"text-sm",children:a.jsx(L,{id:"WV5h6m"})}),children:a.jsx(vr,{...e,icon:xc,value:i,children:a.jsx(L,{id:"ATGYL1"})})})}function zh(e){const{account:t}=Mt(),{email:s}=t,n=Zh(),i=Uh();return s?a.jsx(Ih,{email:s,requestPending:n.isPending,confirmPending:i.isPending,onRequest:async()=>{await n.mutateAsync({email:s})},onConfirm:async({token:o,password:r})=>{await i.mutateAsync({token:o,password:r})},children:a.jsx(vr,{...e,icon:po,children:a.jsx(L,{id:"8ZsakT"})})}):null}function Kh(e){const{account:t}=Mt(),{availableUserDomains:s=[]}=Bi(),{sub:n,preferred_username:i}=t,o=i&&Ki(i)?i:void 0,r=Vh();return a.jsx(Lh,{did:n,currentHandle:o,domains:s,handler:async({handle:c})=>{await r.mutateAsync({sub:n,handle:c})},children:a.jsx(vr,{...e,icon:Ma,value:a.jsx(_c,{handle:o}),children:a.jsx(L,{id:"7sNhEz"})})})}function vr({icon:e,value:t,children:s,className:n,...i}){return a.jsxs(Ne,{shape:"padded",...i,className:Jt("gap-2",n),children:[a.jsx(e,{"aria-hidden":!0,className:"size-5 shrink-0 grow-0"}),a.jsx("span",{className:"grow-1 truncate text-left font-medium",children:s}),t!=null&&a.jsx("span",{className:"hidden min-w-0 flex-1 truncate text-right text-sm sm:inline",children:t}),a.jsx(Sc,{"aria-hidden":!0,className:"size-4 shrink-0"})]})}function Wh(){const{account:e}=Mt();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(yo,{account:e,children:a.jsx(Qh,{className:"text-text-light text-center text-sm"})})})})}function Qh(e){return a.jsxs("p",{...e,children:[a.jsx(L,{id:"Jn0vdi",components:{0:a.jsx(bo,{})}})," ",a.jsx(Pn,{to:"/account/about",className:"text-sm text-blue-600 hover:underline",children:a.jsx(L,{id:"z73+hu"})})]})}const Gh={"/":{icon:fo,position:0,title:{id:"i0qMbr"},component:()=>a.jsx(Wh,{})},"/manage":{icon:Ec,position:10,title:{id:"AeXO77"},description:{id:"Xu88FC"},component:()=>a.jsx(qh,{})},"/devices":{icon:uo,position:20,title:{id:"qavm0B"},description:{id:"bdNEzF"},component:()=>a.jsx(xh,{})},"/apps":{icon:ho,position:30,title:{id:"VDvaN2"},description:{id:"xSiaWQ"},component:()=>a.jsx(ih,{})},"/about":{icon:jc,position:50,title:{id:"uyJsf6"},component:()=>a.jsx(Mu,{}),description:{id:"nxn0xR"}}};function Jh(e,t){const s={...Gh,...t},n=Ti({getParentRoute:()=>sr,path:e,component:()=>a.jsx(Xh,{signOutTo:e,children:a.jsx(Yh,{basePath:e,subPages:s})})}),i=Object.entries(s).map(([o,{component:r}])=>Ti({getParentRoute:()=>n,path:o,component:r}));return[n,...i]}function Yh({basePath:e,subPages:t}){const s=p.useMemo(()=>Object.entries(t).sort(([n,i],[o,r])=>{if(i.position!=null&&r.position!=null){const c=i.position-r.position;if(c!==0)return c}return n.localeCompare(o)}).map(([n,i])=>({to:e==="/"?n:n==="/"?e:`${e}${n}`,title:i.title,description:i.description,hidden:i.hidden,icon:i.icon})),[t,e]);return a.jsx(Pu,{title:{id:"KdxItU"},basePath:e,links:s,children:a.jsx(tr,{})})}const vn=new URL(window.location.href);function Xh({children:e,signOutTo:t}){const s=Fe(),{session:n}=$i(),i=p.useRef(n!=null),o=vn.searchParams.get("display")==="popup",r=vn.searchParams.get("login_hint")||void 0,c=vn.searchParams.get("nonce")||void 0,u=vn.searchParams.get("redirect_uri")||void 0,d=p.useMemo(()=>{if(u&&c)return()=>{const f=new URL(u);window.location.href=f.toString()};if(o)return()=>{var f;(f=window.opener)==null||f.postMessage({nonce:c,event:"done"},"*"),window.postMessage({nonce:c,event:"done"},"*"),window.close()}},[o,u,c]);return p.useEffect(()=>{n&&!i.current?i.current=!0:!n&&i.current&&(i.current=!1,t&&s.navigate({to:t}),d==null||d())},[n,d]),a.jsx(Rc,{forcedIdentifier:r,disableRemember:o,onCancel:d,children:e})}const e0=Ti({getParentRoute:()=>sr,path:"/account/reset-password",component:t0,errorComponent:Oa});function t0(){const{api:e}=$i(),t=Fe();return a.jsx(Cc,{onResetPasswordRequest:async s=>e.initiatePasswordReset(s),onResetPasswordConfirm:async s=>e.confirmResetPassword(s),onBack:()=>{window.history.back(),setTimeout(()=>{t.state.location.pathname==="/account/reset-password"&&t.navigate({to:"/account"})},1e3)}})}const s0=Jh("/account",{"/branding":{icon:mo,hidden:!0,position:40,title:{id:"A3MAIm"},component:ku}}),n0=mu({routeTree:sr.addChildren([...s0,e0])}),{__customizationData:i0,__deviceSessions:r0}=window,a0=new Gc,o0=document.getElementById("root");Yo.createRoot(o0).render(a.jsx(p.StrictMode,{children:a.jsx(Xo,{value:i0,children:a.jsx(ec,{children:a.jsx(kc,{children:a.jsx(Ac,{fallbackRender:Ic,children:a.jsx(Pc,{initialSessions:r0,initialSelected:Mc.Only,children:a.jsx(tl,{client:a0,children:a.jsx(yu,{router:n0})})})})})})})}));
|
|
24
|
+
//# sourceMappingURL=account-page-BWtTrJit.js.map
|