@deslop/auth 0.1.1237 → 0.1.1238

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.
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-BKEOZjfN.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/toast-D2hAfPD-.js","assets/effect-DksNtAHN.js","assets/components-Gr1GoJzQ.js","assets/badge-CbTkmKPg.js","assets/(home)-CR9wOpHN.js","assets/people-CTpDPbFl.js"])))=>i.map(i=>d[i]);
2
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{o as t,r as n,s as r}from"./react-BUjtWCUj.js";import{Cr as i,Er as a,Sr as o,Tr as s,_r as c,br as l,cr as u,dr as d,fr as f,gr as p,hr as m,ln as h,lr as g,mr as _,or as ee,pr as v,t as te,ur as y,vr as b,wr as x,xr as S,yr as C}from"./toast-D2hAfPD-.js";var w=e(r(),1),T=w.use,E=w.useLayoutEffect,D=w.createContext(null);function O(e){return w.useContext(D)}function k(e){let t=O();return w.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function A(e){let t=O(),n=k(),r=w.useRef(null);return E(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var j=`Error preloading route! ☝️`;function M(e,t){if(e)return typeof e==`string`?e:e[t]}function N(e){return e?.scriptFormat??`module`}function P(e,t,n){let r=F(t),i=M(n,`script`)??r.crossOrigin;return{...N(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function F(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ne(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function L(e,t,n,r){let i=u(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function re([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ie=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=f:this.parentRoute||b();let r=n?f:t?.path;r&&r!==`/`&&(r=p(r));let i=t?.id||r,a=n?f:_((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:_(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=c(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>d({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ae=class extends ie{constructor(e){super(e)}};function oe(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{g(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var R=w.createContext(void 0),se=w.createContext(void 0),z=t();function ce(...e){let t=w.useRef(e),n=t.current;return e.forEach((e,t)=>{C(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(j)})}function le(e,t){let n=typeof e==`string`&&o(e);if(n)return t.has(n)?e:null}function ue(e,t,n,r){let i=m(e.pathname,r),a=m(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!C(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function de(e,t,n){let r=O(),i=w.useRef(null),a=w.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:ee}=e,[v,te,y]=ce(e.search,e.params,s),b=w.useContext(R),x=(r.stores._linkScopes??={})[b]??=oe(r,b),[S,C,T]=w.useMemo(()=>{let t=le(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,s,l=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),s=_e(t,r,d),c=d||s&&!o(s)?ue(e,t,y,r.basepath):void 0;a&&a[0]===s&&a[1]===c||(a=[s,c]),i=e}return a};return[n,l,y?.includeHash&&(()=>{let e=l();return e[1]?s??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,c,v,te,e.state,e.mask,e.unsafeRelative,y,d]),[E,D]=w.useSyncExternalStore(x[1],C,T||C),k=D===void 0&&E,A=d||E===void 0,j=w.useRef(!1),M=e.reloadDocument||k||A?!1:l??r.options.defaultPreload,N=u??r.options.defaultPreloadDelay??0,P=w.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,B(r,S)},N):B(r,S):t===!1&&V(i)},[r,S,i,M,N]);w.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,B(r,S));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),V(i)}},[r,S,M,P,i]);let F=he(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let I=t=>{let n=f??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),V(i),r.navigate({...e,_fromLocation:S._fromLocation}))},ne=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(p,I),F.onBlur=H(m,L),F.onFocus=H(h,P),F.onMouseEnter=H(g,P),F.onMouseLeave=H(_,L),F.onTouchStart=H(ee,ne),ge(F,e,D,E,A,n)}var fe={},pe={className:`active`},me=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function he(e,t){let n={};for(let r in e)me.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ge(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=S(n?o:s,{})??(n?pe:fe);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var V=e=>{clearTimeout(e.t),e.t=void 0},H=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function _e(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!x(i,t.protocolAllowlist))return i}var U=w.memo(w.forwardRef((e,t)=>{let n=e._asChild||`a`,r=de(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return w.createElement(n,r,i)}),ve);function ve(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!me.has(r)||!C(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ye=ee();function be(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??be,i=(0,w.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,w.useCallback)(()=>e.get(),[e]);return(0,ye.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var xe={};function Se(e,t){let n=w.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function G(e){let t=O(),n=w.useContext(e.from?se:R),r=e.from??n,i=t.stores.getMatchStore(r),a=Se(e,t),o=W(i,e=>e?a(e):xe);if(o!==xe)return o;(e.shouldThrow??!0)&&b()}function Ce(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function we(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Te(e){return G({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function K(e){return G({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ee(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var De=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Oe(e){return new De(e)}var ke=class extends ae{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Ae(e){return new ke(e)}function q(e){return e=>{let t=Oe(e);return t.isRoot=!1,t}}function J(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(s(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(T)T(a());else throw a()}return w.createElement(r,e)};return o.preload=a,o}var Y=class extends w.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??je,{error:e[0],reset:this.reset}):this.props.children}};function je({error:e}){let[t,n]=w.useState(!1);return(0,z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,z.jsx)(`div`,{children:(0,z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,z.jsx)(`code`,{children:e.message}):null})}):null]})}var Me=()=>!0,Ne=()=>!1;function Pe({children:e,fallback:t=null}){return(0,z.jsx)(w.Fragment,{children:Fe()?e:t})}function Fe(e=!0){return w.useSyncExternalStore(Ie,Me,e?Ne:Me)}function Ie(){return()=>{}}function Le(e){let t=O(),n=`not-found-${W(t.stores.location,e=>e.pathname)}-${W(t.stores.status)}`;return(0,z.jsx)(Y,{getResetKey:()=>n,onCatch:(t,n)=>{if(v(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(v(t))return e.fallback?.(t);throw t},children:e.children})}function Re(){return(0,z.jsx)(`p`,{children:`Not Found`})}function ze(e,t,n){return t.options.notFoundComponent?(0,z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,z.jsx)(Re,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var Be=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ve=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,He=w.memo(function({routeId:e}){let t=O();return Ue(t,W(t.stores.getMatchStore(e)))});function Ue(e,t){let n=e.routesById[t.routeId],r=X(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Ve(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(We,{match:t});s&&(l=(0,z.jsx)(Pe,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Le,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(v(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(w.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,z.jsx)(R.Provider,{value:t.routeId,children:(0,z.jsxs)(u,{children:[l,null]})}):(0,z.jsxs)(R.Provider,{value:t.routeId,children:[l,null]})}var We=w.memo(function({match:e}){let t=O(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(Ge,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ve(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return ze(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ge=w.memo(function(){let e=O(),t=w.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:Be}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ze(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(He,{routeId:i});return t===`__root__`?(0,z.jsx)(w.Suspense,{fallback:X(e),children:a}):a});function Ke(e,t){let n=e[1];e.length=0,n?.(t)}function qe({t:e}){let t=O(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ke(n,!1),n.push(i,a),e(t),w.startTransition(r)}),E(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(c(r.publicHref)!==c(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...y(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Je(){let e=O(),t=e.routesById[f],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(qe,{t:w.useState()[1]}),e.ssr?(0,z.jsx)(Ye,{}):(0,z.jsx)(w.Suspense,{fallback:n,children:(0,z.jsx)(Ye,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Ye(){let e=O(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;E(()=>{t[0]===n&&Ke(t,!0)},[t,n]);let a=i?(0,z.jsx)(He,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Xe(){let e=O();return w.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,W(e.stores.location,e=>e.href),W(e.stores.resolvedLocation,e=>e?.href),W(e.stores.status)])}function Ze({router:e,children:t,...n}){i(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Qe({router:e,...t}){return(0,z.jsx)(Ze,{router:e,...t,children:(0,z.jsx)(Je,{})})}function $e(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function et(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=w.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)(tt,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function tt({attrs:e,children:t,preventScriptHoist:n}){O();let r=Fe(),i=w.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(w.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return $e(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,$e(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function nt(e,t,n,r){n=u(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:l(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),d=e.ssr?.manifest,f=[];d&&(n.forEach(e=>{(d.routes[e.routeId]?.css)?.forEach(e=>{let n=ne(e);f.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:M(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),d.inlineStyle&&f.push({tag:`style`,attrs:{...d.inlineStyle.attrs,nonce:t},children:d.inlineStyle.children,inlineCss:!0}));let p=[];d&&n.forEach(e=>{d.routes[e.routeId]?.preloads?.forEach(e=>{p.push({tag:`link`,attrs:{...P(d,e,r),nonce:t}})})});let m=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),h=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),g=[];return I(g,a),g.push(...p),I(g,c),g.push(...f),I(g,m),I(g,h),g}var rt=e=>{let t=O(),n=t.options.ssr?.nonce,r=w.useCallback(r=>nt(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:C})};function it(e){let t=rt(e.assetCrossOrigin),n=O().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,w.createElement)(et,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var at={suppressHydrationWarning:!0},ot=()=>{let e=O(),t=e.options.ssr?.nonce,n=n=>{let r=L(n,e.ssr?.manifest,t,at);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return st(W(e.stores.matches,e=>re(n(e)),{compare:C}))};function st(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,w.createElement)(et,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ct=n(),lt=Ae({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(it,{}),(0,z.jsx)(ot,{}),(0,z.jsx)(te,{children:e.children})]})}),ut=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),dt=function(e){return`/`+e},ft={},pt=function(e){return e.pathname.endsWith(`.css`)},mt=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=dt(t,n);let r=s(t),i=pt(r);return mt(ft,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ut,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ht=q(`/(home)`)({component:J(()=>Z(()=>import(`./route-BKEOZjfN.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),gt=q(`/(home)/`)({component:J(()=>Z(()=>import(`./(home)-CR9wOpHN.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),_t=q(`/(home)/people`)({component:J(()=>Z(()=>import(`./people-CTpDPbFl.js`),__vite__mapDeps([8,1,2,3,4,5,6])),`component`)}),Q=ht.update({id:`/(home)`,getParentRoute:()=>lt}),vt=gt.update({id:`/`,path:`/`,getParentRoute:()=>Q}),yt={homePeopleRoute:_t.update({id:`/people`,path:`/people`,getParentRoute:()=>Q}),homeIndexRoute:vt},bt={homeRouteRoute:Q._addFileChildren(yt)},xt=lt._addFileChildren(bt)._addFileTypes(),$=h(xt);(0,ct.createRoot)($.root).render((0,z.jsx)(w.StrictMode,{children:(0,z.jsx)(Qe,{router:$.router})}));export{A as i,Ge as n,U as r,Xe as t};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/route-nzdKd_UO.js","assets/rolldown-runtime-WkwZ5CU-.js","assets/react-BUjtWCUj.js","assets/toast-D2hAfPD-.js","assets/effect-DksNtAHN.js","assets/components-CY-PK17G.js","assets/badge-Orwp1LuN.js","assets/(home)-CXtD82GI.js","assets/people-BRGu8hJj.js"])))=>i.map(i=>d[i]);
2
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{o as t,r as n,s as r}from"./react-BUjtWCUj.js";import{Cr as i,Er as a,Sr as o,Tr as s,_r as c,br as l,cr as u,dr as d,fr as f,gr as p,hr as m,ln as h,lr as g,mr as _,or as ee,pr as v,t as te,ur as y,vr as b,wr as x,xr as S,yr as C}from"./toast-D2hAfPD-.js";var w=e(r(),1),T=w.use,E=w.useLayoutEffect,D=w.createContext(null);function O(e){return w.useContext(D)}function k(e){let t=O();return w.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function A(e){let t=O(),n=k(),r=w.useRef(null);return E(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}var j=`Error preloading route! ☝️`;function M(e,t){if(e)return typeof e==`string`?e:e[t]}function N(e){return e?.scriptFormat??`module`}function P(e,t,n){let r=F(t),i=M(n,`script`)??r.crossOrigin;return{...N(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,fetchPriority:`low`,...i?{crossOrigin:i}:{}}}function F(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function I(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function ne(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function L(e,t,n,r){let i=u(e),a=[],o=[];for(let e of i)for(let t of Array.isArray(e.scripts)?e.scripts:[]){if(!t)continue;let{children:e,...i}=t;a.push({tag:`script`,attrs:{...i,...r,nonce:n},children:e})}if(t)for(let e of i)for(let r of t.routes[e.routeId]?.scripts??[])o.push({tag:`script`,attrs:{...r.attrs,nonce:n},children:r.children});return[a,o]}function re([e,t],n){return n?[...n.before,...e,...t,n.boundary]:[...e,...t]}var ie=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=f:this.parentRoute||b();let r=n?f:t?.path;r&&r!==`/`&&(r=p(r));let i=t?.id||r,a=n?f:_((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:_(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=c(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>d({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ae=class extends ie{constructor(e){super(e)}};function oe(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{g(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var R=w.createContext(void 0),se=w.createContext(void 0),z=t();function ce(...e){let t=w.useRef(e),n=t.current;return e.forEach((e,t)=>{C(n[t],e,!1,!0)||(n[t]=e)}),t.current}function B(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(j)})}function le(e,t){let n=typeof e==`string`&&o(e);if(n)return t.has(n)?e:null}function ue(e,t,n,r){let i=m(e.pathname,r),a=m(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!C(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function de(e,t,n){let r=O(),i=w.useRef(null),a=w.useCallback(e=>{if(i.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:ee}=e,[v,te,y]=ce(e.search,e.params,s),b=w.useContext(R),x=(r.stores._linkScopes??={})[b]??=oe(r,b),[S,C,T]=w.useMemo(()=>{let t=le(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,s,l=()=>{let e=x[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),s=_e(t,r,d),c=d||s&&!o(s)?ue(e,t,y,r.basepath):void 0;a&&a[0]===s&&a[1]===c||(a=[s,c]),i=e}return a};return[n,l,y?.includeHash&&(()=>{let e=l();return e[1]?s??=[e[0],!1]:e})]},[r,x,e.from,e.hash,e.href,c,v,te,e.state,e.mask,e.unsafeRelative,y,d]),[E,D]=w.useSyncExternalStore(x[1],C,T||C),k=D===void 0&&E,A=d||E===void 0,j=w.useRef(!1),M=e.reloadDocument||k||A?!1:l??r.options.defaultPreload,N=u??r.options.defaultPreloadDelay??0,P=w.useCallback(e=>{let t=e?.isIntersecting;t??M===`intent`?N?i.t??=setTimeout(()=>{i.t=void 0,B(r,S)},N):B(r,S):t===!1&&V(i)},[r,S,i,M,N]);w.useEffect(()=>{if(!M)return;M===`render`&&!j.current&&(j.current=!0,B(r,S));let e=!0,t;return M===`viewport`&&i.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&P(t.pop())},{rootMargin:`100px`}),t.observe(i.current)),()=>{e=!1,t?.disconnect(),V(i)}},[r,S,M,P,i]);let F=he(e,n);if(F.ref=t?a:i,k)return F.href=k,F;let I=t=>{let n=f??t.currentTarget.getAttribute(`target`);A||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||n&&n!==`_self`||t.button!==0||(t.preventDefault(),V(i),r.navigate({...e,_fromLocation:S._fromLocation}))},ne=()=>{M===`intent`&&B(r,S)},L=()=>{M===`intent`&&V(i)};return F.onClick=H(p,I),F.onBlur=H(m,L),F.onFocus=H(h,P),F.onMouseEnter=H(g,P),F.onMouseLeave=H(_,L),F.onTouchStart=H(ee,ne),ge(F,e,D,E,A,n)}var fe={},pe={className:`active`},me=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function he(e,t){let n={};for(let r in e)me.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function ge(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:c,style:l,target:u}=t,d=S(n?o:s,{})??(n?pe:fe);Object.assign(e,d),e.href=r,a!==`a`&&(e.disabled=i),e.target=u;let f=d.style;(l||f)&&(e.style=l&&f?{...l,...f}:l||f);let p=d.className;return(c||p)&&(e.className=c?p?`${c} ${p}`:c:p),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var V=e=>{clearTimeout(e.t),e.t=void 0},H=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function _e(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!x(i,t.protocolAllowlist))return i}var U=w.memo(w.forwardRef((e,t)=>{let n=e._asChild||`a`,r=de(e,t,n),i=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return w.createElement(n,r,i)}),ve);function ve(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!me.has(r)||!C(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var ye=ee();function be(e,t){return e===t}function W(e,t=e=>e,n){let r=n?.compare??be,i=(0,w.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,w.useCallback)(()=>e.get(),[e]);return(0,ye.useSyncExternalStoreWithSelector)(i,a,a,t,r)}var xe={};function Se(e,t){let n=w.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=a(n.current,i):i}}function G(e){let t=O(),n=w.useContext(e.from?se:R),r=e.from??n,i=t.stores.getMatchStore(r),a=Se(e,t),o=W(i,e=>e?a(e):xe);if(o!==xe)return o;(e.shouldThrow??!0)&&b()}function Ce(e){return G({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function we(e){let{select:t,...n}=e;return G({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Te(e){return G({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function K(e){return G({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Ee(e){return G({...e,select:t=>e.select?e.select(t.context):t.context})}var De=class extends ie{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Oe(e){return new De(e)}var ke=class extends ae{constructor(e){super(e),this.useMatch=e=>G({...e,from:this.id}),this.useRouteContext=e=>Ee({...e,from:this.id}),this.useSearch=e=>K({...e,from:this.id}),this.useParams=e=>Te({...e,from:this.id}),this.useLoaderDeps=e=>we({...e,from:this.id}),this.useLoaderData=e=>Ce({...e,from:this.id}),this.useNavigate=()=>k({from:this.fullPath}),this.Link=w.forwardRef((e,t)=>(0,z.jsx)(U,{ref:t,from:this.fullPath,...e}))}};function Ae(e){return new ke(e)}function q(e){return e=>{let t=Oe(e);return t.isRoot=!1,t}}function J(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(s(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(T)T(a());else throw a()}return w.createElement(r,e)};return o.preload=a,o}var Y=class extends w.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??je,{error:e[0],reset:this.reset}):this.props.children}};function je({error:e}){let[t,n]=w.useState(!1);return(0,z.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,z.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,z.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,z.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,z.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,z.jsx)(`div`,{children:(0,z.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,z.jsx)(`code`,{children:e.message}):null})}):null]})}var Me=()=>!0,Ne=()=>!1;function Pe({children:e,fallback:t=null}){return(0,z.jsx)(w.Fragment,{children:Fe()?e:t})}function Fe(e=!0){return w.useSyncExternalStore(Ie,Me,e?Ne:Me)}function Ie(){return()=>{}}function Le(e){let t=O(),n=`not-found-${W(t.stores.location,e=>e.pathname)}-${W(t.stores.status)}`;return(0,z.jsx)(Y,{getResetKey:()=>n,onCatch:(t,n)=>{if(v(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(v(t))return e.fallback?.(t);throw t},children:e.children})}function Re(){return(0,z.jsx)(`p`,{children:`Not Found`})}function ze(e,t,n){return t.options.notFoundComponent?(0,z.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,z.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,z.jsx)(Re,{})}function X(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,z.jsx)(n,{}):null}var Be=(e,t)=>e[0]===t[0]&&e[1]===t[1],Ve=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,He=w.memo(function({routeId:e}){let t=O();return Ue(t,W(t.stores.getMatchStore(e)))});function Ue(e,t){let n=e.routesById[t.routeId],r=X(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Ve(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,z.jsx)(We,{match:t});s&&(l=(0,z.jsx)(Pe,{fallback:r,children:l})),o&&(l=(0,z.jsx)(Le,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:l})),i&&(l=(0,z.jsx)(Y,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(v(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,z.jsx)(w.Suspense,{fallback:r,children:l}));let u=n.isRoot&&n.options.shellComponent;return u?(0,z.jsx)(R.Provider,{value:t.routeId,children:(0,z.jsxs)(u,{children:[l,null]})}):(0,z.jsxs)(R.Provider,{value:t.routeId,children:[l,null]})}var We=w.memo(function({match:e}){let t=O(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,z.jsx)(e,{},i):(0,z.jsx)(Ge,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Ve(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return X(t,r)}if(e.status===`notFound`)return ze(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Ge=w.memo(function(){let e=O(),t=w.useContext(R),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=W(a,e=>[!!e._notFound,e.error],{compare:Be}),i=W(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return ze(e,e.routesById[t],r);if(!i)return null;let a=(0,z.jsx)(He,{routeId:i});return t===`__root__`?(0,z.jsx)(w.Suspense,{fallback:X(e),children:a}):a});function Ke(e,t){let n=e[1];e.length=0,n?.(t)}function qe({t:e}){let t=O(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Ke(n,!1),n.push(i,a),e(t),w.startTransition(r)}),E(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(c(r.publicHref)!==c(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...y(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Je(){let e=O(),t=e.routesById[f],n=X(e,t),r=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(qe,{t:w.useState()[1]}),e.ssr?(0,z.jsx)(Ye,{}):(0,z.jsx)(w.Suspense,{fallback:n,children:(0,z.jsx)(Ye,{})})]});return e.options.InnerWrap?(0,z.jsx)(e.options.InnerWrap,{children:r}):r}function Ye(){let e=O(),t=e._rendered,n=W(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;E(()=>{t[0]===n&&Ke(t,!0)},[t,n]);let a=i?(0,z.jsx)(He,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,z.jsx)(Y,{getResetKey:()=>r,onCatch:void 0,children:a})}function Xe(){let e=O();return w.useCallback(t=>{let{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a,...o}=t;return e.matchRoute(o,{pending:n,caseSensitive:r,fuzzy:i,includeSearch:a})},[e,W(e.stores.location,e=>e.href),W(e.stores.resolvedLocation,e=>e?.href),W(e.stores.status)])}function Ze({router:e,children:t,...n}){i(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,z.jsx)(D.Provider,{value:e,children:t});return e.options.Wrap?(0,z.jsx)(e.options.Wrap,{children:r}):r}function Qe({router:e,...t}){return(0,z.jsx)(Ze,{router:e,...t,children:(0,z.jsx)(Je,{})})}function $e(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function et(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e,a=w.useMemo(()=>n===void 0?void 0:{__html:n},[n]);switch(e.tag){case`title`:return(0,z.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,z.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,z.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,z.jsx)(`style`,{...t,dangerouslySetInnerHTML:a,nonce:r});case`script`:return(0,z.jsx)(tt,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function tt({attrs:e,children:t,preventScriptHoist:n}){O();let r=Fe(),i=w.useMemo(()=>t===void 0?void 0:{__html:t},[t]),a=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(w.useEffect(()=>{if(!a){if(e?.src){let t=document.createElement(`a`);t.href=e.src;let n=t.href;for(let e of document.scripts)if(e.src===n)return;let r=document.createElement(`script`);return $e(r,e),document.head.appendChild(r),()=>r.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.scripts){if(e.hasAttribute(`src`))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,$e(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,a]),a&&typeof t==`string`)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:i});if(!r){if(e?.src)return(0,z.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,z.jsx)(`script`,{...e,dangerouslySetInnerHTML:i,suppressHydrationWarning:!0})}return null}function nt(e,t,n,r){n=u(n);let i=n.map(e=>e.meta).filter(e=>e!==void 0),a=[],o={},s;for(let e=i.length-1;e>=0;e--){let n=i[e];for(let e=n.length-1;e>=0;e--){let r=n[e];if(r){if(r.title)s||={tag:`title`,children:r.title};else if(`script:ld+json`in r)try{let e=JSON.stringify(r[`script:ld+json`]);a.push({tag:`script`,attrs:{type:`application/ld+json`},children:l(e)})}catch{}else{let e=r.name??r.property;if(e){if(o[e])continue;o[e]=!0}a.push({tag:`meta`,attrs:{...r,nonce:t}})}}}}s&&a.push(s),t&&a.push({tag:`meta`,attrs:{property:`csp-nonce`,content:t}}),a.reverse();let c=n.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:t}})),d=e.ssr?.manifest,f=[];d&&(n.forEach(e=>{(d.routes[e.routeId]?.css)?.forEach(e=>{let n=ne(e);f.push({tag:`link`,attrs:{rel:`stylesheet`,...n,crossOrigin:M(r,`stylesheet`)??n.crossOrigin,suppressHydrationWarning:!0,nonce:t}})})}),d.inlineStyle&&f.push({tag:`style`,attrs:{...d.inlineStyle.attrs,nonce:t},children:d.inlineStyle.children,inlineCss:!0}));let p=[];d&&n.forEach(e=>{d.routes[e.routeId]?.preloads?.forEach(e=>{p.push({tag:`link`,attrs:{...P(d,e,r),nonce:t}})})});let m=n.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`style`,attrs:{...n,nonce:t},children:e})),h=n.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...n})=>({tag:`script`,attrs:{...n,nonce:t},children:e})),g=[];return I(g,a),g.push(...p),I(g,c),g.push(...f),I(g,m),I(g,h),g}var rt=e=>{let t=O(),n=t.options.ssr?.nonce,r=w.useCallback(r=>nt(t,n,r,e),[e,n,t]);return W(t.stores.matches,r,{compare:C})};function it(e){let t=rt(e.assetCrossOrigin),n=O().options.ssr?.nonce;return(0,z.jsx)(z.Fragment,{children:t.map(e=>(0,w.createElement)(et,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var at={suppressHydrationWarning:!0},ot=()=>{let e=O(),t=e.options.ssr?.nonce,n=n=>{let r=L(n,e.ssr?.manifest,t,at);for(let e of r[1])if(typeof e.attrs?.src==`string`){let t=e;t.preventScriptHoist=!0}return r};return st(W(e.stores.matches,e=>re(n(e)),{compare:C}))};function st(e){return(0,z.jsx)(z.Fragment,{children:e.map((e,t)=>(0,w.createElement)(et,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}var ct=n(),lt=Ae({shellComponent:e=>(0,z.jsxs)(`div`,{className:`bg-background text-foreground safe-area flex h-dvh w-dvw flex-col`,children:[(0,z.jsx)(it,{}),(0,z.jsx)(ot,{}),(0,z.jsx)(te,{children:e.children})]})}),ut=(function(){let e=typeof document<`u`&&document.createElement(`link`).relList;return e&&e.supports&&e.supports(`modulepreload`)?`modulepreload`:`preload`})(),dt=function(e){return`/`+e},ft={},pt=function(e){return e.pathname.endsWith(`.css`)},mt=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Z=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=dt(t,n);let r=s(t),i=pt(r);return mt(ft,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:ut,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ht=q(`/(home)`)({component:J(()=>Z(()=>import(`./route-nzdKd_UO.js`),__vite__mapDeps([0,1,2,3,4,5,6])),`component`)}),gt=q(`/(home)/`)({component:J(()=>Z(()=>import(`./(home)-CXtD82GI.js`),__vite__mapDeps([7,1,2,3,4,5])),`component`)}),_t=q(`/(home)/people`)({component:J(()=>Z(()=>import(`./people-BRGu8hJj.js`),__vite__mapDeps([8,1,2,3,4,5,6])),`component`)}),Q=ht.update({id:`/(home)`,getParentRoute:()=>lt}),vt=gt.update({id:`/`,path:`/`,getParentRoute:()=>Q}),yt={homePeopleRoute:_t.update({id:`/people`,path:`/people`,getParentRoute:()=>Q}),homeIndexRoute:vt},bt={homeRouteRoute:Q._addFileChildren(yt)},xt=lt._addFileChildren(bt)._addFileTypes(),$=h(xt);(0,ct.createRoot)($.root).render((0,z.jsx)(w.StrictMode,{children:(0,z.jsx)(Qe,{router:$.router})}));export{A as i,Ge as n,U as r,Xe as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{An as i,Cn as a,D as o,Jt as s,Ot as c,T as l,U as u,_n as d,bn as f,mn as p,o as m,qt as h,rn as g,tr as _,w as ee,yn as v}from"./toast-D2hAfPD-.js";import{Ca as y,Ra as b,U as x,Va as S,Zi as C,ii as w,ma as T,pa as E,qr as D,ra as O,va as k}from"./effect-DksNtAHN.js";import{$ as A,I as j,J as M,N,Q as P,X as F,Y as I,Z as te,a as L,at as ne,b as re,et as ie,ft as R,ht as ae,lt as z,m as B,nt as oe,q as V,s as H,t as U,tt as W,x as G}from"./components-CY-PK17G.js";import{i as K}from"./index-DIpS8BKV.js";import{t as q}from"./badge-Orwp1LuN.js";var J=e(r(),1),Y=n();function se(e){let[t,n]=J.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=J.useRef(null),i=J.useRef(null),a=J.useRef(null),s=J.useRef(null),c=J.useRef(!0),l=J.useRef(null),u=o(),d=J.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:s,allowMouseUpTriggerRef:c,initialCursorPointRef:l,rootId:u}),[t,u]);return(0,Y.jsx)(W.Provider,{value:d,children:(0,Y.jsx)(A.Provider,{value:void 0,children:(0,Y.jsx)(M,{...e})})})}var X=500,ce=J.forwardRef(function(e,t){let{render:n,className:r,style:o,...d}=e,{setAnchor:f,actionsRef:p,internalBackdropRef:_,backdropRef:v,positionerRef:y,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:S}=oe(!1),{store:C}=ie(!1),w=C.useState(`open`),T=C.useState(`disabled`),E=J.useRef(null),D=J.useRef(null),O=g(),k=g(),A=J.useRef(!1),j=J.useRef(null);function M(e,t,n){let r=n.type.startsWith(`touch`);x.current={x:e,y:t},f({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),A.current=!1,p.current?.setOpen(!0,l(ee,n)),k.start(X,()=>{A.current=!0})}function N(e){if(T)return;b.current=!0,c(e),M(e.clientX,e.clientY,e.nativeEvent);let t=i(E.current);j.current?.abort();let n=new AbortController;j.current=n,t.addEventListener(`mouseup`,e=>{if(b.current=!1,!A.current)return;k.clear(),A.current=!1;let t=s(e);h(y.current,t)||S&&t&&V(t)===S||p.current?.setOpen(!1,l(m,e))},{once:!0,signal:n.signal})}function P(){O.clear(),D.current=null}function F(e){if(T||(b.current=!1,e.touches.length!==1)){P();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};D.current=n,O.start(X,()=>{M(n.x,n.y,e.nativeEvent)})}function I(e){if(e.touches.length!==1)P();else if(O.isStarted()&&D.current){let t=e.touches[0],n=Math.abs(t.clientX-D.current.x),r=Math.abs(t.clientY-D.current.y);(n>10||r>10)&&P()}}return J.useEffect(()=>()=>{j.current?.abort()},[]),J.useEffect(()=>{function e(e){if(T)return;let t=s(e);(h(E.current,t)||h(_.current,t)||h(v.current,t))&&e.preventDefault()}let t=i(E.current);return u(t,`contextmenu`,e)},[v,T,_]),a(`div`,e,{state:{open:w},ref:[E,t],props:[{onContextMenu:N,onTouchStart:F,onTouchMove:I,onTouchEnd:P,onTouchCancel:P,style:{WebkitTouchCallout:`none`}},d],stateAttributesMapping:ae})}),le=I,Z=t();function ue(e){let t=(0,Z.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,Y.jsx)(se,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function de(e){let t=(0,Z.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=_(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Y.jsx)(ce,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function fe(e){let t=(0,Z.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,align:i,alignOffset:a,side:o,sideOffset:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?4:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=_(`z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,Y.jsx)(te,{"data-slot":`context-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,Y.jsx)(F,{children:(0,Y.jsx)(le,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function pe(e){let t=(0,Z.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=_(`group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,Y.jsx)(P,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Q(e){let t=(0,Z.c)(11),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,Y.jsx)(U,{id:e.person.id,name:e.person.name}),t[0]=e.person.id,t[1]=e.person.name,t[2]=n):n=t[2];let r=e.person.fullName??e.person.name,i;t[3]===r?i=t[4]:(i=(0,Y.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:r}),t[3]=r,t[4]=i);let a=e.person.fullName!==void 0&&`@${e.person.name}`,o;t[5]===a?o=t[6]:(o=(0,Y.jsx)(`span`,{className:`text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs`,children:a}),t[5]=a,t[6]=o);let s;return t[7]!==n||t[8]!==i||t[9]!==o?(s=(0,Y.jsxs)(Y.Fragment,{children:[n,i,o]}),t[7]=n,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function $(e){let t=(0,Z.c)(8),n;t[0]===e.person?n=t[1]:(n=(0,Y.jsx)(Q,{person:e.person}),t[0]=e.person,t[1]=n);let r;t[2]!==e.children||t[3]!==n?(r=(0,Y.jsxs)(`div`,{className:`flex h-10 min-w-0 items-center gap-3 px-1 text-sm`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==e.failure||t[6]!==r?(i=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[r,e.failure]}),t[5]=e.failure,t[6]=r,t[7]=i):i=t[7],i}function me(e){let t=(0,Z.c)(28),n;t[0]===e.person.id?n=t[1]:(n=H(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n),a=e.person,o;t[2]===r?o=t[3]:(o=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[2]=r,t[3]=o);let s;t[4]===e.person.since?s=t[5]:(s=B(e.person.since),t[4]=e.person.since,t[5]=s);let c;t[6]===s?c=t[7]:(c=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs max-sm:hidden`,children:s}),t[6]=s,t[7]=c);let l;t[8]===r?l=t[9]:(l=x(r),t[8]=r,t[9]=l);let u;t[10]===i?u=t[11]:(u=()=>i(!0),t[10]=i,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,Y.jsx)(f,{size:`sm`,className:`shrink-0`,disabled:l,onClick:u,children:`Allow`}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let p;t[15]===r?p=t[16]:(p=x(r),t[15]=r,t[16]=p);let m;t[17]===i?m=t[18]:(m=()=>i(!1),t[17]=i,t[18]=m);let h;t[19]!==p||t[20]!==m?(h=(0,Y.jsx)(f,{size:`sm`,variant:`outline`,className:`shrink-0`,disabled:p,onClick:m,children:`Decline`}),t[19]=p,t[20]=m,t[21]=h):h=t[21];let g;return t[22]!==e.person||t[23]!==h||t[24]!==o||t[25]!==c||t[26]!==d?(g=(0,Y.jsxs)($,{person:a,failure:o,children:[c,d,h]}),t[22]=e.person,t[23]=h,t[24]=o,t[25]=c,t[26]=d,t[27]=g):g=t[27],g}function he(e){let t=(0,Z.c)(34),n;t[0]===e.person.id?n=t[1]:(n=G(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=z(n);if(e.person.role===`Admin`){let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,Y.jsx)(q,{variant:`outline`,className:`shrink-0`,children:`admin`}),t[2]=n):n=t[2];let r;return t[3]===e.person?r=t[4]:(r=(0,Y.jsx)($,{person:e.person,children:n}),t[3]=e.person,t[4]=r),r}let a;t[5]===e.person.since?a=t[6]:(a=B(e.person.since),t[5]=e.person.since,t[6]=a);let o=`${e.person.fullName??e.person.name}, member since ${a}`,s;t[7]===o?s=t[8]:(s=(0,Y.jsx)(`div`,{role:`button`,tabIndex:0,"aria-haspopup":`menu`,"aria-label":o,className:`hover:bg-muted/50 flex h-10 min-w-0 items-center gap-3 px-1 text-sm`}),t[7]=o,t[8]=s);let c;t[9]===e.person?c=t[10]:(c=(0,Y.jsx)(Q,{person:e.person}),t[9]=e.person,t[10]=c);let l;t[11]===e.person.since?l=t[12]:(l=B(e.person.since),t[11]=e.person.since,t[12]=l);let u;t[13]===l?u=t[14]:(u=(0,Y.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs`,children:l}),t[13]=l,t[14]=u);let d;t[15]!==s||t[16]!==c||t[17]!==u?(d=(0,Y.jsxs)(de,{render:s,children:[c,u]}),t[15]=s,t[16]=c,t[17]=u,t[18]=d):d=t[18];let f;t[19]===r?f=t[20]:(f=(0,Y.jsx)(N,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[19]=r,t[20]=f);let p;t[21]!==d||t[22]!==f?(p=(0,Y.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===r?m=t[25]:(m=x(r),t[24]=r,t[25]=m);let h;t[26]===i?h=t[27]:(h=()=>i(),t[26]=i,t[27]=h);let g;t[28]!==m||t[29]!==h?(g=(0,Y.jsx)(fe,{className:`w-auto min-w-36`,children:(0,Y.jsx)(pe,{variant:`destructive`,disabled:m,onClick:h,children:`Remove`})}),t[28]=m,t[29]=h,t[30]=g):g=t[30];let _;return t[31]!==g||t[32]!==p?(_=(0,Y.jsxs)(ue,{children:[p,g]}),t[31]=g,t[32]=p,t[33]=_):_=t[33],_}function ge(){let e=(0,Z.c)(2),t=j(),n;return e[0]===t?n=e[1]:(n=e=>D(t)(w(`${e.fullName??``} ${e.name}`)),e[0]=t,e[1]=n),T(O(k(R(re).value,S(b,be)),n),{onEmpty:ye,onNonEmpty:_e})}function _e(e){return(0,Y.jsx)(`div`,{role:`list`,"aria-label":`People`,children:E(e,ve)})}function ve(e){return C(e.role===`Waiting`,{onFalse:()=>(0,Y.jsx)(he,{person:e},e.id),onTrue:()=>(0,Y.jsx)(me,{person:e},e.id)})}function ye(){return(0,Y.jsx)(p,{children:(0,Y.jsx)(d,{children:(0,Y.jsx)(v,{children:`No one matches`})})})}function be(e){return e.role!==`Waiting`}function xe(){let e=(0,Z.c)(2);if(!y(R(L).value,Se)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(K,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Y.jsx)(J.Suspense,{fallback:(0,Y.jsx)(ne,{label:`People`,media:!0,rows:3}),children:(0,Y.jsx)(ge,{})}),e[1]=t):t=e[1],t}function Se(e){return e.role===`Admin`}export{xe as component};
@@ -0,0 +1 @@
1
+ import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{_n as i,ar as a,bn as o,gn as s,hn as c,ir as l,mn as u,tr as d,vn as f,yn as p}from"./toast-D2hAfPD-.js";import{$i as m,Aa as h,Ca as g,F as _,Fa as v,Ia as y,Na as b,Qa as x,R as ee,U as S,Zi as C,ii as te,it as ne,ja as re,nt as ie,ot as w,pa as T,st as ae,wa as E}from"./effect-DksNtAHN.js";import{A as D,B as O,C as oe,D as k,E as se,F as ce,G as le,H as A,K as ue,L as de,M as j,N as fe,P as M,R as pe,S as me,T as N,U as he,V as P,W as ge,_ as _e,a as ve,at as F,b as ye,c as be,d as xe,dt as Se,ft as I,gt as Ce,h as we,i as Te,it as L,k as Ee,lt as R,n as De,o as z,p as Oe,pt as ke,r as Ae,t as je,u as B,v as V,w as H,y as Me,z as U}from"./components-CY-PK17G.js";import{n as Ne,r as Pe,t as Fe}from"./index-DIpS8BKV.js";import{t as Ie}from"./badge-Orwp1LuN.js";var W={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};W.node;var Le=a(W),G={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};G.node;var K=a(G),q={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};q.node;var Re=a(q),J=e(r()),Y=t(),X=n();function Z(e){let t=(0,Y.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`}),t[0]=n):n=t[0];let r;return t[1]===e.className?r=t[2]:(r=(0,X.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`currentColor`,className:e.className,"aria-hidden":`true`,children:n}),t[1]=e.className,t[2]=r),r}function Q(e){let t=(0,Y.c)(5),n;t[0]===e.className?n=t[1]:(n=d(`flex min-h-full w-full max-w-3xl flex-col gap-4 self-start`,e.className),t[0]=e.className,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,X.jsx)(`main`,{className:`pb-safe flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-3`,children:(0,X.jsx)(`div`,{className:n,children:e.children})}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function $(e){let t=(0,Y.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`size-4 animate-spin`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,X.jsx)(l,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var ze=`/assets/icon-3Ql0zGr9.svg`;function Be(){let e=(0,Y.c)(11),[t]=R(k),[n]=R(B),[r]=R(V),i;if(e[0]!==n||e[1]!==r||e[2]!==t){let a;e[4]===n?a=e[5]:(a=()=>_(n),e[4]=n,e[5]=a);let o;e[6]===r?o=e[7]:(o=()=>_(r),e[6]=r,e[7]=o),i=b(x(_(t),v(a),v(o)),{onNone:He,onSome:Ve}),e[0]=n,e[1]=r,e[2]=t,e[3]=i}else i=e[3];let a;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(a=new URLSearchParams(location.search).has(`error`)&&(0,X.jsx)(L,{children:`GitHub sign-in failed. Try again.`}),e[8]=a):a=e[8];let o;return e[9]===i?o=e[10]:(o=(0,X.jsxs)(X.Fragment,{children:[i,a]}),e[9]=i,e[10]=o),o}function Ve(e){return(0,X.jsx)(L,{children:e.message})}function He(){return null}function Ue(e){let t=(0,Y.c)(34),[n,r]=R(Oe),i,a,s,c,l,u,d,f;if(t[0]!==n||t[1]!==r||t[2]!==e.id){a=S(n),i=o,s=`ghost`;let p;t[11]===e.id?p=t[12]:(p=H(e.id),t[11]=e.id,t[12]=p),c=`Copy the code ${p}`,l=`font-mono text-base font-semibold`,t[13]!==r||t[14]!==e.id?(u=()=>r(H(e.id)),t[13]=r,t[14]=e.id,t[15]=u):u=t[15],t[16]===e.id?d=t[17]:(d=H(e.id),t[16]=e.id,t[17]=d),f=C(a,{onFalse:Ge,onTrue:We}),t[0]=n,t[1]=r,t[2]=e.id,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else i=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];let p=a&&`Copied`,m;t[18]===p?m=t[19]:(m=(0,X.jsx)(`span`,{role:`status`,className:`sr-only`,children:p}),t[18]=p,t[19]=m);let h;t[20]!==i||t[21]!==s||t[22]!==c||t[23]!==l||t[24]!==u||t[25]!==d||t[26]!==f||t[27]!==m?(h=(0,X.jsxs)(i,{variant:s,"aria-label":c,className:l,onClick:u,children:[d,f,m]}),t[20]=i,t[21]=s,t[22]=c,t[23]=l,t[24]=u,t[25]=d,t[26]=f,t[27]=m,t[28]=h):h=t[28];let g;t[29]===n?g=t[30]:(g=(0,X.jsx)(fe,{result:n}),t[29]=n,t[30]=g);let _;return t[31]!==h||t[32]!==g?(_=(0,X.jsxs)(X.Fragment,{children:[h,g]}),t[31]=h,t[32]=g,t[33]=_):_=t[33],_}function We(){return(0,X.jsx)(Ce,{className:`text-primary`})}function Ge(){return(0,X.jsx)(Le,{className:`text-muted-foreground`})}function Ke(e){let t=(0,Y.c)(13),n=I(se).value,r;t[0]!==n||t[1]!==e.expiresAt?(r=C(e.expiresAt-n<6e4,{onFalse:Je,onTrue:qe}),t[0]=n,t[1]=e.expiresAt,t[2]=r):r=t[2];let i;t[3]===r?i=t[4]:(i=(0,X.jsx)(j,{waiting:!0,status:r}),t[3]=r,t[4]=i);let a;t[5]!==n||t[6]!==e.expiresAt?(a=we(e.expiresAt,n),t[5]=n,t[6]=e.expiresAt,t[7]=a):a=t[7];let o;t[8]===a?o=t[9]:(o=(0,X.jsxs)(`span`,{children:[(0,X.jsx)(`span`,{className:`font-mono tabular-nums`,children:a}),` left`]}),t[8]=a,t[9]=o);let s;return t[10]!==i||t[11]!==o?(s=(0,X.jsxs)(`span`,{role:`timer`,className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[i,o]}),t[10]=i,t[11]=o,t[12]=s):s=t[12],s}function qe(){return`warning`}function Je(){return`live`}function Ye(e){let t=(0,Y.c)(23),[n,r]=R(k),[i,a]=R(V),s=`Sign in ${e.request.clientName} on ${e.request.device}`,c;t[0]===s?c=t[1]:(c=(0,X.jsx)(`p`,{id:`waiting-title`,title:s,className:`max-w-full truncate text-base font-semibold`,children:s}),t[0]=s,t[1]=c);let l;t[2]===e.request.id?l=t[3]:(l=be(e.request.id),t[2]=e.request.id,t[3]=l);let u;t[4]===l?u=t[5]:(u=(0,X.jsx)(`span`,{className:`bg-card text-foreground rounded-md border p-1.5`,children:(0,X.jsx)(Ae,{text:l,className:`size-40`})}),t[4]=l,t[5]=u);let d;t[6]===e.request.id?d=t[7]:(d=(0,X.jsx)(Ue,{id:e.request.id}),t[6]=e.request.id,t[7]=d);let f;t[8]===e.request.expiresAt?f=t[9]:(f=(0,X.jsx)(Ke,{expiresAt:e.request.expiresAt}),t[8]=e.request.expiresAt,t[9]=f);let p;t[10]!==i||t[11]!==e.request.kind||t[12]!==n||t[13]!==a||t[14]!==r?(p=e.request.kind===`App`&&(0,X.jsxs)(`span`,{className:`flex flex-wrap justify-center gap-1`,children:[(0,X.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(i),onClick:()=>a(),children:[(0,X.jsx)(K,{}),`Approve here with a passkey`]}),(0,X.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(n),onClick:()=>r(),children:[(0,X.jsx)(Z,{}),`Approve here with GitHub`]})]}),t[10]=i,t[11]=e.request.kind,t[12]=n,t[13]=a,t[14]=r,t[15]=p):p=t[15];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(Be,{}),t[16]=m):m=t[16];let h;return t[17]!==c||t[18]!==u||t[19]!==d||t[20]!==f||t[21]!==p?(h=(0,X.jsxs)(`section`,{className:`flex flex-1 flex-col items-center justify-center gap-3 pb-12 text-center`,"aria-labelledby":`waiting-title`,children:[c,u,d,f,p,m]}),t[17]=c,t[18]=u,t[19]=d,t[20]=f,t[21]=p,t[22]=h):h=t[22],h}function Xe(e){let t=(0,Y.c)(7),n;t[0]===e.id?n=t[1]:(n=oe(e.id),t[0]=e.id,t[1]=n);let r=I(n),i;if(t[2]!==e.account||t[3]!==r.value){let n;t[5]===e.account?n=t[6]:(n=t=>b(E(e.account,Ze),{onNone:()=>(0,X.jsx)(Ye,{request:t.request}),onSome:()=>(0,X.jsx)(J.Suspense,{fallback:(0,X.jsx)(F,{label:`Apps`,media:!0,rows:9}),children:(0,X.jsx)(De,{pending:y(t.request)})})}),t[5]=e.account,t[6]=n),i=x(r.value,w,ne({Decided:et,Expired:Qe,Waiting:n})),t[2]=e.account,t[3]=r.value,t[4]=i}else i=t[4];return i}function Ze(e){return e.role!==`Waiting`}function Qe(){return(0,X.jsxs)(u,{role:`status`,children:[(0,X.jsxs)(i,{children:[(0,X.jsx)(p,{children:`This sign-in expired`}),(0,X.jsx)(s,{children:`Start it again in the app or agent that asked.`})]}),(0,X.jsx)(c,{children:(0,X.jsx)(o,{variant:`outline`,onClick:$e,children:`Back to Auth`})})]})}function $e(){return location.assign(`/`)}function et(){return(0,X.jsx)(u,{role:`status`,children:(0,X.jsx)(i,{children:(0,X.jsx)(p,{children:`Continuing…`})})})}function tt(){let e=(0,Y.c)(2),t=Fe(),n;return e[0]===t?n=e[1]:(n=e=>(0,X.jsxs)(ce,{active:t({to:e.to})!==!1,render:(0,X.jsx)(Pe,{to:e.to}),children:[e.label,e.count>0&&(0,X.jsx)(Ie,{children:e.count})]},e.to),e[0]=t,e[1]=n),T([{count:0,label:`Sign-ins`,to:`/`},{count:m(I(ye).value,nt),label:`People`,to:`/people`}],n)}function nt(e){return e.role===`Waiting`}function rt(e){return x(w(e.account.role),ae(`Waiting`,()=>(0,X.jsx)(u,{role:`status`,children:(0,X.jsxs)(i,{children:[(0,X.jsx)(f,{children:(0,X.jsx)(j,{waiting:!0})}),(0,X.jsx)(p,{children:`Waiting for an admin`})]})})),ie(()=>(0,X.jsx)(Ne,{})))}function it(e){let t=(0,Y.c)(23),n=ke(Me),r=ee(n,lt),[i,a]=R(z),[o,s]=R(me),[c,l]=R(xe),u=U,d;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,X.jsx)(P,{children:`Passkeys`}),t[0]=d):d=t[0];let f;t[1]===n?f=t[2]:(f=b(_(n),{onNone:ct,onSome:st}),t[1]=n,t[2]=f);let p;t[3]!==s||t[4]!==o?(p=e=>(0,X.jsxs)(he,{children:[(0,X.jsxs)(le,{children:[(0,X.jsx)(K,{}),(0,X.jsx)(`span`,{className:`truncate`,children:e.addedFrom}),(0,X.jsx)(`span`,{className:`text-muted-foreground ml-auto pl-3 text-xs`,children:C(e.synced,{onFalse:ot,onTrue:at})})]}),(0,X.jsx)(ge,{children:(0,X.jsx)(O,{variant:`destructive`,disabled:S(o),onClick:()=>s(e.id),children:`Remove`})})]},e.id),t[3]=s,t[4]=o,t[5]=p):p=t[5];let m=T(r,p),h;t[6]!==i||t[7]!==c?(h=S(i)||S(c),t[6]=i,t[7]=c,t[8]=h):h=t[8];let g;t[9]!==a||t[10]!==l||t[11]!==e.via?(g=()=>C(e.via===`Code`,{onFalse:()=>a(),onTrue:()=>l()}),t[9]=a,t[10]=l,t[11]=e.via,t[12]=g):g=t[12];let v;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,X.jsx)(Re,{}),t[13]=v):v=t[13];let y;t[14]!==h||t[15]!==g?(y=(0,X.jsxs)(O,{disabled:h,onClick:g,children:[v,`Add a passkey`]}),t[14]=h,t[15]=g,t[16]=y):y=t[16];let x;return t[17]!==u||t[18]!==d||t[19]!==f||t[20]!==m||t[21]!==y?(x=(0,X.jsxs)(u,{children:[d,f,m,y]}),t[17]=u,t[18]=d,t[19]=f,t[20]=m,t[21]=y,t[22]=x):x=t[22],x}function at(){return`Synced`}function ot(){return`One device`}function st(e){return(0,X.jsx)(O,{disabled:!0,children:(0,X.jsxs)(`span`,{className:`text-destructive text-xs`,children:[`Passkeys unavailable · `,e.message]})})}function ct(){return null}function lt(){return[]}function ut(e){let t=(0,Y.c)(32),[n,r]=R(_e),i=Se(z),a,o;t[0]!==i||t[1]!==e.account.via?(a=()=>{sessionStorage.getItem(`adding-passkey`)!==null&&(sessionStorage.removeItem(Te),e.account.via!==`Code`&&i())},o=[i,e.account.via],t[0]=i,t[1]=e.account.via,t[2]=a,t[3]=o):(a=t[2],o=t[3]),(0,J.useEffect)(a,o);let s;t[4]!==e.account.id||t[5]!==e.account.name?(s=(0,X.jsx)(ue,{"aria-label":`Account`,className:`focus-visible:ring-ring rounded-full outline-none focus-visible:ring-2`,children:(0,X.jsx)(je,{id:e.account.id,name:e.account.name})}),t[4]=e.account.id,t[5]=e.account.name,t[6]=s):s=t[6];let c=e.account.fullName??e.account.name,l;t[7]===c?l=t[8]:(l=(0,X.jsx)(`span`,{className:`text-foreground block text-sm`,children:c}),t[7]=c,t[8]=l);let u=e.account.name,d;t[9]===e.account.role?d=t[10]:(d=te(e.account.role),t[9]=e.account.role,t[10]=d);let f=`@${u} · ${d}`,p;t[11]!==l||t[12]!==f?(p=(0,X.jsx)(U,{children:(0,X.jsxs)(P,{children:[l,f]})}),t[11]=l,t[12]=f,t[13]=p):p=t[13];let m;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,X.jsx)(A,{}),t[14]=m):m=t[14];let h;t[15]!==e.account.role||t[16]!==e.account.via?(h=e.account.role!==`Waiting`&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(it,{via:e.account.via}),(0,X.jsx)(A,{})]}),t[15]=e.account.role,t[16]=e.account.via,t[17]=h):h=t[17];let g;t[18]===n?g=t[19]:(g=S(n),t[18]=n,t[19]=g);let _;t[20]===r?_=t[21]:(_=()=>r(),t[20]=r,t[21]=_);let v;t[22]!==g||t[23]!==_?(v=(0,X.jsx)(O,{variant:`destructive`,disabled:g,onClick:_,children:`Sign out`}),t[22]=g,t[23]=_,t[24]=v):v=t[24];let y;t[25]!==h||t[26]!==v||t[27]!==p?(y=(0,X.jsxs)(pe,{align:`end`,className:`w-auto min-w-48`,children:[p,m,h,v]}),t[25]=h,t[26]=v,t[27]=p,t[28]=y):y=t[28];let b;return t[29]!==y||t[30]!==s?(b=(0,X.jsxs)(de,{children:[s,y]}),t[29]=y,t[30]=s,t[31]=b):b=t[31],b}function dt(){let e=(0,Y.c)(32),[t,n]=R(k),[r,i]=R(B),[a,s]=R(V),c;e[0]===t?c=e[1]:(c=S(t),e[0]=t,e[1]=c);let l;e[2]===n?l=e[3]:(l=()=>n(),e[2]=n,e[3]=l);let u;e[4]===t?u=e[5]:(u=C(S(t),{onFalse:ht,onTrue:mt}),e[4]=t,e[5]=u);let d;e[6]!==c||e[7]!==l||e[8]!==u?(d=(0,X.jsxs)(o,{size:`lg`,disabled:c,onClick:l,children:[u,`Sign in with GitHub`]}),e[6]=c,e[7]=l,e[8]=u,e[9]=d):d=e[9];let f;e[10]===a?f=e[11]:(f=S(a),e[10]=a,e[11]=f);let p;e[12]===s?p=e[13]:(p=()=>s(),e[12]=s,e[13]=p);let m;e[14]===a?m=e[15]:(m=C(S(a),{onFalse:pt,onTrue:ft}),e[14]=a,e[15]=m);let h;e[16]!==f||e[17]!==p||e[18]!==m?(h=(0,X.jsxs)(o,{size:`lg`,variant:`outline`,disabled:f,onClick:p,children:[m,`Sign in with a passkey`]}),e[16]=f,e[17]=p,e[18]=m,e[19]=h):h=e[19];let g;e[20]===r?g=e[21]:(g=S(r),e[20]=r,e[21]=g);let _;e[22]===i?_=e[23]:(_=()=>i(),e[22]=i,e[23]=_);let v;e[24]!==g||e[25]!==_?(v=(0,X.jsx)(o,{size:`lg`,variant:`outline`,disabled:g,onClick:_,children:`Sign in with a code`}),e[24]=g,e[25]=_,e[26]=v):v=e[26];let y;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,X.jsx)(Be,{}),e[27]=y):y=e[27];let b;return e[28]!==v||e[29]!==d||e[30]!==h?(b=(0,X.jsxs)(`section`,{className:`flex flex-1 flex-col justify-center gap-2 pb-12`,"aria-label":`Sign in`,children:[d,h,v,y]}),e[28]=v,e[29]=d,e[30]=h,e[31]=b):b=e[31],b}function ft(){return(0,X.jsx)($,{})}function pt(){return(0,X.jsx)(K,{})}function mt(){return(0,X.jsx)($,{})}function ht(){return(0,X.jsx)(Z,{})}function gt(){let e=(0,Y.c)(8),[t,n]=R(Ee),r,a;e[0]===n?(r=e[1],a=e[2]):(r=()=>n(),a=[n],e[0]=n,e[1]=r,e[2]=a),(0,J.useEffect)(r,a);let l;if(e[3]!==n||e[4]!==t){let r;e[6]===n?r=e[7]:(r=e=>(0,X.jsxs)(u,{role:`alert`,children:[(0,X.jsxs)(i,{children:[(0,X.jsx)(p,{children:`Sign-out failed`}),(0,X.jsx)(s,{children:e.message})]}),(0,X.jsx)(c,{children:(0,X.jsx)(o,{variant:`outline`,onClick:()=>n(),children:`Try again`})})]}),e[6]=n,e[7]=r),l=b(_(t),{onNone:_t,onSome:r}),e[3]=n,e[4]=t,e[5]=l}else l=e[5];return l}function _t(){return(0,X.jsx)(u,{role:`status`,children:(0,X.jsx)(i,{children:(0,X.jsx)(p,{children:`Signing out…`})})})}function vt(){let e=(0,Y.c)(21),t=I(ve).value,n;e[0]===t?n=e[1]:(n=b(t,{onNone:Ot,onSome:Dt}),e[0]=t,e[1]=n);let r;e[2]===t?r=e[3]:(r=g(t,Et)&&(0,X.jsx)(J.Suspense,{fallback:null,children:(0,X.jsx)(tt,{})}),e[2]=t,e[3]=r);let i;e[4]===t?i=e[5]:(i=b(E(t,Tt),{onNone:wt,onSome:Ct}),e[4]=t,e[5]=i);let a;e[6]!==n||e[7]!==r||e[8]!==i?(a=(0,X.jsx)(M,{icon:ze,name:`auth`,account:n,tabs:r,commands:i}),e[6]=n,e[7]=r,e[8]=i,e[9]=a):a=e[9];let o;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(o=D&&(0,X.jsx)(gt,{}),e[10]=o):o=e[10];let s;e[11]===t?s=e[12]:(s=b(N,{onNone:St,onSome:e=>(0,X.jsx)(Xe,{account:t,id:e})}),e[11]=t,e[12]=s);let c;e[13]===t?c=e[14]:(c=b(t,{onNone:xt,onSome:yt}),e[13]=t,e[14]=c);let l;e[15]!==s||e[16]!==c?(l=(0,X.jsxs)(Q,{className:`max-w-xl`,children:[o,s,c]}),e[15]=s,e[16]=c,e[17]=l):l=e[17];let u;return e[18]!==a||e[19]!==l?(u=(0,X.jsxs)(X.Fragment,{children:[a,l]}),e[18]=a,e[19]=l,e[20]=u):u=e[20],u}function yt(e){return C(re(N)&&e.role!==`Waiting`,{onFalse:()=>(0,X.jsx)(rt,{account:e}),onTrue:bt})}function bt(){return null}function xt(){return h(N)&&!D&&(0,X.jsx)(dt,{})}function St(){return null}function Ct(){return[]}function wt(){}function Tt(e){return e.role!==`Waiting`}function Et(e){return e.role===`Admin`}function Dt(e){return(0,X.jsx)(ut,{account:e})}function Ot(){return!1}function kt(){let e=(0,Y.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,X.jsx)(M,{icon:ze,name:`auth`,account:!1}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,X.jsx)(J.Suspense,{fallback:(0,X.jsxs)(X.Fragment,{children:[t,(0,X.jsx)(Q,{className:`max-w-xl`,children:(0,X.jsx)(F,{label:`Apps`,media:!0,rows:9})})]}),children:(0,X.jsx)(vt,{})}),e[1]=n):n=e[1],n}export{kt as component};
@@ -14,7 +14,7 @@
14
14
  <link rel="manifest" href="/manifest.webmanifest" />
15
15
 
16
16
  <title>Auth</title>
17
- <script type="module" crossorigin src="/assets/index-BDvvjADU.js"></script>
17
+ <script type="module" crossorigin src="/assets/index-DIpS8BKV.js"></script>
18
18
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-WkwZ5CU-.js">
19
19
  <link rel="modulepreload" crossorigin href="/assets/react-BUjtWCUj.js">
20
20
  <link rel="modulepreload" crossorigin href="/assets/effect-DksNtAHN.js">
package/dist/server.js CHANGED
@@ -120454,7 +120454,7 @@ const HttpHandlers = use((router) => gen(function* () {
120454
120454
  if ((yield* HttpServerRequest).cookies[LOGIN_COOKIE] !== params.state) return yield* AuthError.make({ message: "The sign-in state does not match" });
120455
120455
  const request = yield* HttpServerRequest;
120456
120456
  const finished = yield* github.finish(params.code, params.state);
120457
- return yield* pipe(people.register(finished.profile), flatMap$2((user) => tokens.startSession(user, originOf(request), "GitHub")), map$5((started) => pipe(redirect(returnTo(finished.flow)), expireCookieUnsafe(LOGIN_COOKIE, COOKIE), setCookieUnsafe(SESSION_COOKIE, started.token, session(started.seconds)))), catch_$2((cause) => githubFailed(cause, some$1(finished.flow))));
120457
+ return yield* pipe(people.register(finished.profile), tap$1(() => tokens.endSession(request.headers)), flatMap$2((user) => tokens.startSession(user, originOf(request), "GitHub")), map$5((started) => pipe(redirect(returnTo(finished.flow)), expireCookieUnsafe(LOGIN_COOKIE, COOKIE), setCookieUnsafe(SESSION_COOKIE, started.token, session(started.seconds)))), catch_$2((cause) => githubFailed(cause, some$1(finished.flow))));
120458
120458
  }), catch_$2((cause) => flatMap$2(option$1(flatMap$2(schemaSearchParams(LoginState), (found) => github.cancel(found.state))), (flow) => githubFailed(cause, flow)))));
120459
120459
  yield* router.add("GET", "/auth/code", limited("code", 20)(oauth(gen(function* () {
120460
120460
  const next = (yield* pipe(schemaSearchParams(BrowserParams), rejected("Invalid sign-in request"))).next;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deslop/auth",
3
- "version": "0.1.1237",
3
+ "version": "0.1.1238",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/MP281X/deslop.git",
@@ -32,5 +32,5 @@
32
32
  "engines": {
33
33
  "node": ">=26"
34
34
  },
35
- "fingerprint": "8384f782ffac88bf5e9cdccf83df10c5c8a43840d7d2ca5a050eed2c0067f630"
35
+ "fingerprint": "83d956598bdd61b9a87b8f12aebb924454e414d5597b9753418f3951ab24a1cd"
36
36
  }
@@ -1,20 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{ar as i,rr as a,tr as o}from"./toast-D2hAfPD-.js";import{B as s,Da as c,H as l,Ia as u,Ja as d,Ki as f,Na as p,Pa as m,V as h,Zi as g,ha as _,ja as v,pa as y,x as b}from"./effect-DksNtAHN.js";import{E as x,at as S,c as C,ct as w,ft as T,it as E,k as D,lt as O,m as k,mt as A,n as j,nt as M,ot as N,rt as P,u as F}from"./components-Gr1GoJzQ.js";var I={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};I.node;var L=i(I),R=e(r(),1),z=e=>{let t=V(R.useMemo(()=>B(e.machine,e.path),[e.machine,e.path]));if(s(t))throw f(t.cause);return h(t)?e.pending??null:v(t.value)?e.children(t.value.value):e.inactive??null},B=(e,t)=>E(e)?S(e,t):N(e,t),V=e=>H(R.useContext(T),e),H=(e,t)=>{let n=R.useMemo(()=>{let n,r,i=e=>l(e)?(n=e,e):h(e)&&n!==void 0?n:e;return{subscribe:n=>e.subscribe(t,n),snapshot:()=>i(e.get(t)),serverSnapshot:()=>r??=i(b(t,e))}},[e,t]);return R.useSyncExternalStore(n.subscribe,n.snapshot,n.serverSnapshot)},U=z,W=t(),G=Object.defineProperty,K=Object.defineProperties,q=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,ee=Object.prototype.propertyIsEnumerable,te=(e,t,n)=>t in e?G(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ne=(e,t)=>{for(var n in t||={})Y.call(t,n)&&te(e,n,t[n]);if(J)for(var n of J(t))ee.call(t,n)&&te(e,n,t[n]);return e},re=(e,t)=>K(e,q(t)),ie=(e,t)=>{var n={};for(var r in e)Y.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&J)for(var r of J(e))t.indexOf(r)<0&&ee.call(e,r)&&(n[r]=e[r]);return n};function ae(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function oe(e){let t=R.useRef();return R.useEffect(()=>{t.current=e}),t.current}var se=18,X=40,ce=`${X}px`;function le(e){let t=e.getBoundingClientRect().right,n=e;for(;n;){if(getComputedStyle(n).overflowX!==`visible`)return n.getBoundingClientRect().left+n.clientLeft+n.clientWidth-t;n=n.parentElement}return document.documentElement.clientWidth-t}var ue=`[data-lastpass-icon-root],com-1password-button,[data-dashlanecreated],[style$="2147483647 !important;"]`;function de({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=R.useState(!1),[o,s]=R.useState(!1),[c,l]=R.useState(!1),u=R.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=R.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,u=o.getBoundingClientRect().left+o.offsetWidth,d=o.getBoundingClientRect().top+o.offsetHeight/2,f=u-se,p=d;document.querySelectorAll(ue).length===0&&document.elementFromPoint(f,p)===r||(s(le(r)>=X),a(!0),l(!0))},[e,t,c,n]);return R.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){s(le(t)>=X)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),R.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:ce}}var fe=R.createContext({}),pe=R.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=me,nonce:h,render:g,children:_}=n,v=ie(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`nonce`,`render`,`children`]),y;let[b,x]=R.useState(typeof v.defaultValue==`string`?v.defaultValue:``),S=r??b,C=oe(S),w=R.useCallback(e=>{i?.(e),x(e)},[i]),T=R.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=R.useRef(null),D=R.useRef(null),O=R.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((y=window==null?void 0:window.CSS)?.supports)?.call(y,`-webkit-touch-callout`,`none`)}),k=R.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});R.useImperativeHandle(t,()=>E.current,[]),R.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),L(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let r=t===n,u=t===a.length&&a.length<i;if(r&&!u){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&e.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),L(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,h&&e.setAttribute(`nonce`,h),document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Z(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Z(e.sheet,`[data-input-otp]:autofill { ${t} }`),Z(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Z(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Z(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=typeof ResizeObserver>`u`?null:new ResizeObserver(r);return i?.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i?.disconnect()}},[]);let[A,j]=R.useState(!1),[M,N]=R.useState(!1),[P,F]=R.useState(null),[I,L]=R.useState(null);R.useEffect(()=>{let e=ae(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),L(n),k.current.prev=[t,n,r])});return()=>{e.forEach(e=>clearTimeout(e))}},[S,M]),R.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let z=de({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),B=R.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);t.length>0&&T&&!T.test(t)?e.preventDefault():(typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t))},[a,w,C,T]),V=R.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),L(n)}N(!0)},[a]),H=R.useCallback(e=>{let t=E.current;if(!f&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),L(l)},[a,w,f,T,S]),U=R.useMemo(()=>({position:`relative`,cursor:v.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[v.disabled]),W=R.useMemo(()=>({position:`absolute`,inset:0,width:z.willPushPWMBadge?`calc(100% + ${z.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:z.willPushPWMBadge?`inset(0 ${z.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height, 16px)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[z.PWM_BADGE_SPACE_WIDTH,z.willPushPWMBadge,o]),G=R.useMemo(()=>R.createElement(`input`,re(ne({autoComplete:v.autoComplete||`one-time-code`},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:l,pattern:T?.source,"aria-placeholder":c,style:W,maxLength:a,value:S,ref:E,spellCheck:v.spellCheck??!1,onPaste:e=>{var t;H(e),(t=v.onPaste)==null||t.call(v,e)},onChange:B,onMouseOver:e=>{var t;j(!0),(t=v.onMouseOver)==null||t.call(v,e)},onMouseLeave:e=>{var t;j(!1),(t=v.onMouseLeave)==null||t.call(v,e)},onFocus:e=>{var t;V(),(t=v.onFocus)==null||t.call(v,e)},onBlur:e=>{var t;N(!1),(t=v.onBlur)==null||t.call(v,e)}})),[B,V,H,l,W,a,I,P,c,v,T?.source,S]),K=R.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!v.disabled&&A}),[M,A,a,I,P,c,v.disabled,S]),q=R.useMemo(()=>g?g(K):R.createElement(fe.Provider,{value:K},_),[_,K,g]);return R.createElement(R.Fragment,null,m!==null&&R.createElement(`noscript`,null,R.createElement(`style`,null,m)),R.createElement(`div`,{ref:D,"data-input-otp-container":!0,translate:`no`,style:U,className:p},q,R.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},G)))});pe.displayName=`Input`;function Z(e,t){try{e.insertRule(t)}catch{console.warn(`input-otp could not insert CSS rule:`,t)}}var me=`
2
- [data-input-otp] {
3
- --nojs-bg: white !important;
4
- --nojs-fg: black !important;
5
-
6
- background-color: var(--nojs-bg) !important;
7
- color: var(--nojs-fg) !important;
8
- caret-color: var(--nojs-fg) !important;
9
- letter-spacing: .25em !important;
10
- text-align: center !important;
11
- border: 1px solid var(--nojs-fg) !important;
12
- border-radius: 4px !important;
13
- width: 100% !important;
14
- }
15
- @media (prefers-color-scheme: dark) {
16
- [data-input-otp] {
17
- --nojs-bg: black !important;
18
- --nojs-fg: white !important;
19
- }
20
- }`,Q=n();function he(e){let t=(0,W.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,containerClassName:r,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=o(`cn-input-otp flex items-center has-disabled:opacity-50`,r),t[4]=r,t[5]=a);let s;t[6]===n?s=t[7]:(s=o(`disabled:cursor-not-allowed`,n),t[6]=n,t[7]=s);let c;return t[8]!==i||t[9]!==a||t[10]!==s?(c=(0,Q.jsx)(pe,{"data-slot":`input-otp`,containerClassName:a,spellCheck:!1,className:s,...i}),t[8]=i,t[9]=a,t[10]=s,t[11]=c):c=t[11],c}function ge(e){let t=(0,W.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-md has-aria-invalid:border-destructive has-aria-invalid:ring-2 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,Q.jsx)(`div`,{"data-slot":`input-otp-group`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function _e(e){let t=(0,W.c)(17),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({index:r,className:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=R.useContext(fe),s;t[4]!==r||t[5]!==a?(s=a?.slots[r]??{},t[4]=r,t[5]=a,t[6]=s):s=t[6];let{char:c,hasFakeCaret:l,isActive:u}=s,d;t[7]===n?d=t[8]:(d=o(`relative flex size-7 items-center justify-center border-y border-r border-input bg-input/20 text-xs/relaxed transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-2 data-[active=true]:ring-ring/30 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40`,n),t[7]=n,t[8]=d);let f;t[9]===l?f=t[10]:(f=l&&(0,Q.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,Q.jsx)(`div`,{className:`h-4 w-px animate-caret-blink bg-foreground duration-1000`})}),t[9]=l,t[10]=f);let p;return t[11]!==c||t[12]!==u||t[13]!==i||t[14]!==d||t[15]!==f?(p=(0,Q.jsxs)(`div`,{"data-slot":`input-otp-slot`,"data-active":u,className:d,...i,children:[c,f]}),t[11]=c,t[12]=u,t[13]=i,t[14]=d,t[15]=f,t[16]=p):p=t[16],p}function ve(e){let t=(0,W.c)(5),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(L,{}),t[2]=r):r=t[2];let i;return t[3]===n?i=t[4]:(i=(0,Q.jsx)(`div`,{"data-slot":`input-otp-separator`,className:`flex items-center [&_svg:not([class*='size-'])]:size-4`,role:`separator`,...n,children:r}),t[3]=n,t[4]=i),i}function ye(e){let t=(0,W.c)(34),n;t[0]===e.state?n=t[1]:(n=e.state===`Missing`||d(e.state),t[0]=e.state,t[1]=n);let r=n,i=e.typed,a;t[2]===e?a=t[3]:(a=t=>{e.onType(D(t))},t[2]=e,t[3]=a);let s=e.state===`Checking`,c=e.state===`Missing`&&`refuse`,l;t[4]===c?l=t[5]:(l=o(`gap-2`,c),t[4]=c,t[5]=l);let u;t[6]===r?u=t[7]:(u=y(_(0,3),e=>(0,Q.jsx)(_e,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[6]=r,t[7]=u);let f;t[8]===u?f=t[9]:(f=(0,Q.jsx)(ge,{className:`flex-1`,children:u}),t[8]=u,t[9]=f);let m;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(ve,{}),t[10]=m):m=t[10];let h;t[11]===r?h=t[12]:(h=y(_(4,7),e=>(0,Q.jsx)(_e,{index:e,"aria-invalid":r,className:`h-11 flex-1 font-mono text-lg`},e)),t[11]=r,t[12]=h);let g;t[13]===h?g=t[14]:(g=(0,Q.jsx)(ge,{className:`flex-1`,children:h}),t[13]=h,t[14]=g);let v;t[15]!==r||t[16]!==e.typed||t[17]!==g||t[18]!==a||t[19]!==s||t[20]!==l||t[21]!==f?(v=(0,Q.jsxs)(he,{id:`code`,"aria-label":`Code of a sign-in to approve`,maxLength:8,value:i,onChange:a,pasteTransformer:D,pattern:`^[A-Za-z]+$`,inputMode:`text`,autoFocus:!0,autoComplete:`off`,autoCapitalize:`characters`,disabled:s,"aria-invalid":r,"aria-describedby":`code-error`,containerClassName:l,children:[f,m,g]}),t[15]=r,t[16]=e.typed,t[17]=g,t[18]=a,t[19]=s,t[20]=l,t[21]=f,t[22]=v):v=t[22];let b;t[23]===e.state?b=t[24]:(b=e.state===`Missing`&&(0,Q.jsx)(M,{id:`code-error`,children:`No waiting sign-in has this code.`}),t[23]=e.state,t[24]=b);let x;t[25]===e.state?x=t[26]:(x=d(e.state)&&(0,Q.jsx)(M,{id:`code-error`,children:e.state.failed}),t[25]=e.state,t[26]=x);let S;t[27]===e.answered?S=t[28]:(S=p(e.answered,{onNone:xe,onSome:be}),t[27]=e.answered,t[28]=S);let C;return t[29]!==v||t[30]!==b||t[31]!==x||t[32]!==S?(C=(0,Q.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[v,b,x,S]}),t[29]=v,t[30]=b,t[31]=x,t[32]=S,t[33]=C):C=t[33],C}function be(e){return(0,Q.jsx)(`p`,{className:`text-muted-foreground settle-in flex items-center gap-1.5 text-xs`,role:`status`,children:g(e.accept,{onFalse:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(a,{className:`size-3.5`}),x(e.request.clientName,e.request.device),` denied`]}),onTrue:()=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(A,{className:`text-primary size-3.5`}),x(e.request.clientName,e.request.device),` approved`]})})})}function xe(){return null}function $(e){let t=(0,W.c)(11),n;t[0]!==e.answered||t[1]!==e.onType||t[2]!==e.state||t[3]!==e.typed?(n=(0,Q.jsx)(ye,{answered:e.answered,onType:e.onType,state:e.state,typed:e.typed}),t[0]=e.answered,t[1]=e.onType,t[2]=e.state,t[3]=e.typed,t[4]=n):n=t[4];let r;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(P,{label:`Apps`,media:!0,rows:9}),t[5]=r):r=t[5];let i;t[6]===e.pending?i=t[7]:(i=(0,Q.jsx)(R.Suspense,{fallback:r,children:(0,Q.jsx)(j,{pending:e.pending})}),t[6]=e.pending,t[7]=i);let a;return t[8]!==n||t[9]!==i?(a=(0,Q.jsxs)(Q.Fragment,{children:[n,i]}),t[8]=n,t[9]=i,t[10]=a):a=t[10],a}function Se(){let e=(0,W.c)(9);w(k),w(F);let t=O(C.send),n;e[0]===t?n=e[1]:(n=function(e){t({_tag:`Typed`,typed:e})},e[0]=t,e[1]=n);let r=n,i;e[2]===r?i=e[3]:(i=(0,Q.jsx)(U,{machine:C,path:`Typing`,children:e=>(0,Q.jsx)($,{answered:c(e.value.answered),onType:r,pending:m(),state:`Typing`,typed:e.value.typed})}),e[2]=r,e[3]=i);let a;e[4]===r?a=e[5]:(a=(0,Q.jsx)(U,{machine:C,path:`Code`,children:e=>(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(U,{machine:C,path:`Code.Looking`,children:()=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:`Checking`,typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Found`,children:t=>(0,Q.jsx)($,{answered:m(),onType:r,pending:u(t.value.request),state:`Found`,typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Failed`,children:t=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:{failed:t.value.message},typed:e.value.code})}),(0,Q.jsx)(U,{machine:C,path:`Code.Missing`,children:()=>(0,Q.jsx)($,{answered:m(),onType:r,pending:m(),state:`Missing`,typed:e.value.code})})]})}),e[4]=r,e[5]=a);let o;return e[6]!==i||e[7]!==a?(o=(0,Q.jsxs)(Q.Fragment,{children:[i,a]}),e[6]=i,e[7]=a,e[8]=o):o=e[8],o}export{Se as component};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{An as i,Cn as a,D as o,Jt as s,Ot as c,T as l,U as u,_n as d,bn as f,mn as p,o as m,qt as h,rn as g,tr as _,w as ee,yn as v}from"./toast-D2hAfPD-.js";import{Ca as y,Ra as b,U as x,Va as S,Zi as C,ii as w,ma as T,pa as E,qr as D,ra as O,va as k}from"./effect-DksNtAHN.js";import{$ as A,G as te,J as j,K as M,P as N,Q as P,X as F,Y as I,Z as L,et as R,f as z,i as ne,j as B,o as re,pt as ie,q as ae,rt as oe,st as V,t as H,ut as U,v as W,y as G}from"./components-Gr1GoJzQ.js";import{i as K}from"./index-BDvvjADU.js";import{t as se}from"./badge-CbTkmKPg.js";var q=e(r(),1),J=n();function ce(e){let[t,n]=q.useState({getBoundingClientRect(){return DOMRect.fromRect({width:0,height:0,x:0,y:0})}}),r=q.useRef(null),i=q.useRef(null),a=q.useRef(null),s=q.useRef(null),c=q.useRef(!0),l=q.useRef(null),u=o(),d=q.useMemo(()=>({anchor:t,setAnchor:n,actionsRef:a,backdropRef:r,internalBackdropRef:i,positionerRef:s,allowMouseUpTriggerRef:c,initialCursorPointRef:l,rootId:u}),[t,u]);return(0,J.jsx)(A.Provider,{value:d,children:(0,J.jsx)(L.Provider,{value:void 0,children:(0,J.jsx)(M,{...e})})})}var Y=500,le=q.forwardRef(function(e,t){let{render:n,className:r,style:o,...d}=e,{setAnchor:f,actionsRef:p,internalBackdropRef:_,backdropRef:v,positionerRef:y,allowMouseUpTriggerRef:b,initialCursorPointRef:x,rootId:S}=R(!1),{store:C}=P(!1),w=C.useState(`open`),T=C.useState(`disabled`),E=q.useRef(null),D=q.useRef(null),O=g(),k=g(),A=q.useRef(!1),j=q.useRef(null);function M(e,t,n){let r=n.type.startsWith(`touch`);x.current={x:e,y:t},f({getBoundingClientRect(){return DOMRect.fromRect({width:r?10:0,height:r?10:0,x:e,y:t})}}),A.current=!1,p.current?.setOpen(!0,l(ee,n)),k.start(Y,()=>{A.current=!0})}function N(e){if(T)return;b.current=!0,c(e),M(e.clientX,e.clientY,e.nativeEvent);let t=i(E.current);j.current?.abort();let n=new AbortController;j.current=n,t.addEventListener(`mouseup`,e=>{if(b.current=!1,!A.current)return;k.clear(),A.current=!1;let t=s(e);h(y.current,t)||S&&t&&te(t)===S||p.current?.setOpen(!1,l(m,e))},{once:!0,signal:n.signal})}function F(){O.clear(),D.current=null}function I(e){if(T||(b.current=!1,e.touches.length!==1)){F();return}e.stopPropagation();let t=e.touches[0],n={x:t.clientX,y:t.clientY};D.current=n,O.start(Y,()=>{M(n.x,n.y,e.nativeEvent)})}function L(e){if(e.touches.length!==1)F();else if(O.isStarted()&&D.current){let t=e.touches[0],n=Math.abs(t.clientX-D.current.x),r=Math.abs(t.clientY-D.current.y);(n>10||r>10)&&F()}}return q.useEffect(()=>()=>{j.current?.abort()},[]),q.useEffect(()=>{function e(e){if(T)return;let t=s(e);(h(E.current,t)||h(_.current,t)||h(v.current,t))&&e.preventDefault()}let t=i(E.current);return u(t,`contextmenu`,e)},[v,T,_]),a(`div`,e,{state:{open:w},ref:[E,t],props:[{onContextMenu:N,onTouchStart:I,onTouchMove:L,onTouchEnd:F,onTouchCancel:F,style:{WebkitTouchCallout:`none`}},d],stateAttributesMapping:ie})}),ue=ae,X=t();function de(e){let t=(0,X.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,J.jsx)(ce,{"data-slot":`context-menu`,...n}),t[2]=n,t[3]=r),r}function fe(e){let t=(0,X.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=_(`select-none`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(le,{"data-slot":`context-menu-trigger`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function pe(e){let t=(0,X.c)(18),n,r,i,a,o,s;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6]):({className:n,align:i,alignOffset:a,side:o,sideOffset:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s);let c=i===void 0?`start`:i,l=a===void 0?4:a,u=o===void 0?`right`:o,d=s===void 0?0:s,f;t[7]===n?f=t[8]:(f=_(`z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,n),t[7]=n,t[8]=f);let p;t[9]!==r||t[10]!==f?(p=(0,J.jsx)(I,{"data-slot":`context-menu-content`,className:f,...r}),t[9]=r,t[10]=f,t[11]=p):p=t[11];let m;return t[12]!==c||t[13]!==l||t[14]!==u||t[15]!==d||t[16]!==p?(m=(0,J.jsx)(j,{children:(0,J.jsx)(ue,{className:`isolate z-50 outline-none`,align:c,alignOffset:l,side:u,sideOffset:d,children:p})}),t[12]=c,t[13]=l,t[14]=u,t[15]=d,t[16]=p,t[17]=m):m=t[17],m}function me(e){let t=(0,X.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,inset:r,variant:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=a===void 0?`default`:a,s;t[5]===n?s=t[6]:(s=_(`group/context-menu-item relative flex min-h-7 cursor-default items-center gap-2 rounded-md px-2 py-1 text-xs/relaxed outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3.5 data-[variant=destructive]:*:[svg]:text-destructive`,n),t[5]=n,t[6]=s);let c;return t[7]!==r||t[8]!==i||t[9]!==s||t[10]!==o?(c=(0,J.jsx)(F,{"data-slot":`context-menu-item`,"data-inset":r,"data-variant":o,className:s,...i}),t[7]=r,t[8]=i,t[9]=s,t[10]=o,t[11]=c):c=t[11],c}function Z(e){let t=(0,X.c)(11),n;t[0]!==e.person.id||t[1]!==e.person.name?(n=(0,J.jsx)(H,{id:e.person.id,name:e.person.name}),t[0]=e.person.id,t[1]=e.person.name,t[2]=n):n=t[2];let r=e.person.fullName??e.person.name,i;t[3]===r?i=t[4]:(i=(0,J.jsx)(`span`,{className:`min-w-0 truncate font-medium`,children:r}),t[3]=r,t[4]=i);let a=e.person.fullName!==void 0&&`@${e.person.name}`,o;t[5]===a?o=t[6]:(o=(0,J.jsx)(`span`,{className:`text-muted-foreground min-w-0 flex-1 truncate font-mono text-xs`,children:a}),t[5]=a,t[6]=o);let s;return t[7]!==n||t[8]!==i||t[9]!==o?(s=(0,J.jsxs)(J.Fragment,{children:[n,i,o]}),t[7]=n,t[8]=i,t[9]=o,t[10]=s):s=t[10],s}function Q(e){let t=(0,X.c)(8),n;t[0]===e.person?n=t[1]:(n=(0,J.jsx)(Z,{person:e.person}),t[0]=e.person,t[1]=n);let r;t[2]!==e.children||t[3]!==n?(r=(0,J.jsxs)(`div`,{className:`flex h-10 min-w-0 items-center gap-3 px-1 text-sm`,children:[n,e.children]}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4];let i;return t[5]!==e.failure||t[6]!==r?(i=(0,J.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[r,e.failure]}),t[5]=e.failure,t[6]=r,t[7]=i):i=t[7],i}function he(e){let t=(0,X.c)(28),n;t[0]===e.person.id?n=t[1]:(n=re(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=V(n),a=e.person,o;t[2]===r?o=t[3]:(o=(0,J.jsx)(B,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[2]=r,t[3]=o);let s;t[4]===e.person.since?s=t[5]:(s=z(e.person.since),t[4]=e.person.since,t[5]=s);let c;t[6]===s?c=t[7]:(c=(0,J.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs max-sm:hidden`,children:s}),t[6]=s,t[7]=c);let l;t[8]===r?l=t[9]:(l=x(r),t[8]=r,t[9]=l);let u;t[10]===i?u=t[11]:(u=()=>i(!0),t[10]=i,t[11]=u);let d;t[12]!==l||t[13]!==u?(d=(0,J.jsx)(f,{size:`sm`,className:`shrink-0`,disabled:l,onClick:u,children:`Allow`}),t[12]=l,t[13]=u,t[14]=d):d=t[14];let p;t[15]===r?p=t[16]:(p=x(r),t[15]=r,t[16]=p);let m;t[17]===i?m=t[18]:(m=()=>i(!1),t[17]=i,t[18]=m);let h;t[19]!==p||t[20]!==m?(h=(0,J.jsx)(f,{size:`sm`,variant:`outline`,className:`shrink-0`,disabled:p,onClick:m,children:`Decline`}),t[19]=p,t[20]=m,t[21]=h):h=t[21];let g;return t[22]!==e.person||t[23]!==h||t[24]!==o||t[25]!==c||t[26]!==d?(g=(0,J.jsxs)(Q,{person:a,failure:o,children:[c,d,h]}),t[22]=e.person,t[23]=h,t[24]=o,t[25]=c,t[26]=d,t[27]=g):g=t[27],g}function ge(e){let t=(0,X.c)(34),n;t[0]===e.person.id?n=t[1]:(n=G(e.person.id),t[0]=e.person.id,t[1]=n);let[r,i]=V(n);if(e.person.role===`Admin`){let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(se,{variant:`outline`,className:`shrink-0`,children:`admin`}),t[2]=n):n=t[2];let r;return t[3]===e.person?r=t[4]:(r=(0,J.jsx)(Q,{person:e.person,children:n}),t[3]=e.person,t[4]=r),r}let a;t[5]===e.person.since?a=t[6]:(a=z(e.person.since),t[5]=e.person.since,t[6]=a);let o=`${e.person.fullName??e.person.name}, member since ${a}`,s;t[7]===o?s=t[8]:(s=(0,J.jsx)(`div`,{role:`button`,tabIndex:0,"aria-haspopup":`menu`,"aria-label":o,className:`hover:bg-muted/50 flex h-10 min-w-0 items-center gap-3 px-1 text-sm`}),t[7]=o,t[8]=s);let c;t[9]===e.person?c=t[10]:(c=(0,J.jsx)(Z,{person:e.person}),t[9]=e.person,t[10]=c);let l;t[11]===e.person.since?l=t[12]:(l=z(e.person.since),t[11]=e.person.since,t[12]=l);let u;t[13]===l?u=t[14]:(u=(0,J.jsx)(`span`,{className:`text-muted-foreground shrink-0 font-mono text-xs`,children:l}),t[13]=l,t[14]=u);let d;t[15]!==s||t[16]!==c||t[17]!==u?(d=(0,J.jsxs)(fe,{render:s,children:[c,u]}),t[15]=s,t[16]=c,t[17]=u,t[18]=d):d=t[18];let f;t[19]===r?f=t[20]:(f=(0,J.jsx)(B,{result:r,className:`mr-1 mb-2 ml-10 wrap-anywhere`}),t[19]=r,t[20]=f);let p;t[21]!==d||t[22]!==f?(p=(0,J.jsxs)(`div`,{role:`listitem`,className:`border-b`,children:[d,f]}),t[21]=d,t[22]=f,t[23]=p):p=t[23];let m;t[24]===r?m=t[25]:(m=x(r),t[24]=r,t[25]=m);let h;t[26]===i?h=t[27]:(h=()=>i(),t[26]=i,t[27]=h);let g;t[28]!==m||t[29]!==h?(g=(0,J.jsx)(pe,{className:`w-auto min-w-36`,children:(0,J.jsx)(me,{variant:`destructive`,disabled:m,onClick:h,children:`Remove`})}),t[28]=m,t[29]=h,t[30]=g):g=t[30];let _;return t[31]!==g||t[32]!==p?(_=(0,J.jsxs)(de,{children:[p,g]}),t[31]=g,t[32]=p,t[33]=_):_=t[33],_}function $(){let e=(0,X.c)(2),t=N(),n;return e[0]===t?n=e[1]:(n=e=>D(t)(w(`${e.fullName??``} ${e.name}`)),e[0]=t,e[1]=n),T(O(k(U(W).value,S(b,be)),n),{onEmpty:ye,onNonEmpty:_e})}function _e(e){return(0,J.jsx)(`div`,{role:`list`,"aria-label":`People`,children:E(e,ve)})}function ve(e){return C(e.role===`Waiting`,{onFalse:()=>(0,J.jsx)(ge,{person:e},e.id),onTrue:()=>(0,J.jsx)(he,{person:e},e.id)})}function ye(){return(0,J.jsx)(p,{children:(0,J.jsx)(d,{children:(0,J.jsx)(v,{children:`No one matches`})})})}function be(e){return e.role!==`Waiting`}function xe(){let e=(0,X.c)(2);if(!y(U(ne).value,Se)){let t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(K,{to:`/`}),e[0]=t):t=e[0],t}let t;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(q.Suspense,{fallback:(0,J.jsx)(oe,{label:`People`,media:!0,rows:3}),children:(0,J.jsx)($,{})}),e[1]=t):t=e[1],t}function Se(e){return e.role===`Admin`}export{xe as component};
@@ -1 +0,0 @@
1
- import{n as e}from"./rolldown-runtime-WkwZ5CU-.js";import{n as t,o as n,s as r}from"./react-BUjtWCUj.js";import{_n as i,ar as a,bn as o,gn as s,hn as c,ir as l,mn as u,tr as d,vn as f,yn as p}from"./toast-D2hAfPD-.js";import{$i as m,Aa as h,Ca as g,F as _,Fa as v,Ia as y,Na as b,Qa as x,R as ee,U as S,Zi as C,ii as te,it as ne,ja as re,nt as ie,ot as w,pa as T,st as ae,wa as E}from"./effect-DksNtAHN.js";import{A as D,B as oe,C as O,D as se,F as ce,H as le,I as ue,L as k,M as A,N as de,O as j,R as M,S as N,T as P,U as fe,V as pe,W as me,_ as he,a as ge,b as _e,d as ve,dt as ye,g as F,h as be,i as xe,j as Se,l as I,mt as Ce,n as we,nt as L,p as Te,r as Ee,rt as R,s as De,st as z,t as Oe,ut as B,v as ke,w as Ae,x as je,z as V}from"./components-Gr1GoJzQ.js";import{n as Me,r as Ne,t as Pe}from"./index-BDvvjADU.js";import{t as Fe}from"./badge-CbTkmKPg.js";var H={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};H.node;var Ie=a(H),U={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};U.node;var W=a(U),G={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};G.node;var Le=a(G),K=e(r()),q=t(),J=n();function Y(e){let t=(0,q.c)(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(`path`,{d:`M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z`}),t[0]=n):n=t[0];let r;return t[1]===e.className?r=t[2]:(r=(0,J.jsx)(`svg`,{viewBox:`0 0 16 16`,fill:`currentColor`,className:e.className,"aria-hidden":`true`,children:n}),t[1]=e.className,t[2]=r),r}function X(e){let t=(0,q.c)(5),n;t[0]===e.className?n=t[1]:(n=d(`flex min-h-full w-full max-w-3xl flex-col gap-4 self-start`,e.className),t[0]=e.className,t[1]=n);let r;return t[2]!==e.children||t[3]!==n?(r=(0,J.jsx)(`main`,{className:`pb-safe flex min-h-0 flex-1 justify-center overflow-y-auto px-4 pt-3`,children:(0,J.jsx)(`div`,{className:n,children:e.children})}),t[2]=e.children,t[3]=n,t[4]=r):r=t[4],r}function Z(e){let t=(0,q.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=d(`size-4 animate-spin`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,J.jsx)(l,{"data-slot":`spinner`,role:`status`,"aria-label":`Loading`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var Q=`/assets/icon-3Ql0zGr9.svg`;function $(){let e=(0,q.c)(11),[t]=z(P),[n]=z(I),[r]=z(F),i;if(e[0]!==n||e[1]!==r||e[2]!==t){let a;e[4]===n?a=e[5]:(a=()=>_(n),e[4]=n,e[5]=a);let o;e[6]===r?o=e[7]:(o=()=>_(r),e[6]=r,e[7]=o),i=b(x(_(t),v(a),v(o)),{onNone:ze,onSome:Re}),e[0]=n,e[1]=r,e[2]=t,e[3]=i}else i=e[3];let a;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(a=new URLSearchParams(location.search).has(`error`)&&(0,J.jsx)(L,{children:`GitHub sign-in failed. Try again.`}),e[8]=a):a=e[8];let o;return e[9]===i?o=e[10]:(o=(0,J.jsxs)(J.Fragment,{children:[i,a]}),e[9]=i,e[10]=o),o}function Re(e){return(0,J.jsx)(L,{children:e.message})}function ze(){return null}function Be(e){let t=(0,q.c)(34),[n,r]=z(ve),i,a,s,c,l,u,d,f;if(t[0]!==n||t[1]!==r||t[2]!==e.id){a=S(n),i=o,s=`ghost`;let p;t[11]===e.id?p=t[12]:(p=N(e.id),t[11]=e.id,t[12]=p),c=`Copy the code ${p}`,l=`font-mono text-base font-semibold`,t[13]!==r||t[14]!==e.id?(u=()=>r(N(e.id)),t[13]=r,t[14]=e.id,t[15]=u):u=t[15],t[16]===e.id?d=t[17]:(d=N(e.id),t[16]=e.id,t[17]=d),f=C(a,{onFalse:He,onTrue:Ve}),t[0]=n,t[1]=r,t[2]=e.id,t[3]=i,t[4]=a,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d,t[10]=f}else i=t[3],a=t[4],s=t[5],c=t[6],l=t[7],u=t[8],d=t[9],f=t[10];let p=a&&`Copied`,m;t[18]===p?m=t[19]:(m=(0,J.jsx)(`span`,{role:`status`,className:`sr-only`,children:p}),t[18]=p,t[19]=m);let h;t[20]!==i||t[21]!==s||t[22]!==c||t[23]!==l||t[24]!==u||t[25]!==d||t[26]!==f||t[27]!==m?(h=(0,J.jsxs)(i,{variant:s,"aria-label":c,className:l,onClick:u,children:[d,f,m]}),t[20]=i,t[21]=s,t[22]=c,t[23]=l,t[24]=u,t[25]=d,t[26]=f,t[27]=m,t[28]=h):h=t[28];let g;t[29]===n?g=t[30]:(g=(0,J.jsx)(Se,{result:n}),t[29]=n,t[30]=g);let _;return t[31]!==h||t[32]!==g?(_=(0,J.jsxs)(J.Fragment,{children:[h,g]}),t[31]=h,t[32]=g,t[33]=_):_=t[33],_}function Ve(){return(0,J.jsx)(Ce,{className:`text-primary`})}function He(){return(0,J.jsx)(Ie,{className:`text-muted-foreground`})}function Ue(e){let t=(0,q.c)(13),n=B(Ae).value,r;t[0]!==n||t[1]!==e.expiresAt?(r=C(e.expiresAt-n<6e4,{onFalse:Ge,onTrue:We}),t[0]=n,t[1]=e.expiresAt,t[2]=r):r=t[2];let i;t[3]===r?i=t[4]:(i=(0,J.jsx)(D,{waiting:!0,status:r}),t[3]=r,t[4]=i);let a;t[5]!==n||t[6]!==e.expiresAt?(a=Te(e.expiresAt,n),t[5]=n,t[6]=e.expiresAt,t[7]=a):a=t[7];let o;t[8]===a?o=t[9]:(o=(0,J.jsxs)(`span`,{children:[(0,J.jsx)(`span`,{className:`font-mono tabular-nums`,children:a}),` left`]}),t[8]=a,t[9]=o);let s;return t[10]!==i||t[11]!==o?(s=(0,J.jsxs)(`span`,{role:`timer`,className:`text-muted-foreground flex items-center gap-1.5 text-xs`,children:[i,o]}),t[10]=i,t[11]=o,t[12]=s):s=t[12],s}function We(){return`warning`}function Ge(){return`live`}function Ke(e){let t=(0,q.c)(23),[n,r]=z(P),[i,a]=z(F),s=`Sign in ${e.request.clientName} on ${e.request.device}`,c;t[0]===s?c=t[1]:(c=(0,J.jsx)(`p`,{id:`waiting-title`,title:s,className:`max-w-full truncate text-base font-semibold`,children:s}),t[0]=s,t[1]=c);let l;t[2]===e.request.id?l=t[3]:(l=De(e.request.id),t[2]=e.request.id,t[3]=l);let u;t[4]===l?u=t[5]:(u=(0,J.jsx)(`span`,{className:`bg-card text-foreground rounded-md border p-1.5`,children:(0,J.jsx)(Ee,{text:l,className:`size-40`})}),t[4]=l,t[5]=u);let d;t[6]===e.request.id?d=t[7]:(d=(0,J.jsx)(Be,{id:e.request.id}),t[6]=e.request.id,t[7]=d);let f;t[8]===e.request.expiresAt?f=t[9]:(f=(0,J.jsx)(Ue,{expiresAt:e.request.expiresAt}),t[8]=e.request.expiresAt,t[9]=f);let p;t[10]!==i||t[11]!==e.request.kind||t[12]!==n||t[13]!==a||t[14]!==r?(p=e.request.kind===`App`&&(0,J.jsxs)(`span`,{className:`flex flex-wrap justify-center gap-1`,children:[(0,J.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(i),onClick:()=>a(),children:[(0,J.jsx)(W,{}),`Approve here with a passkey`]}),(0,J.jsxs)(o,{variant:`ghost`,size:`sm`,disabled:S(n),onClick:()=>r(),children:[(0,J.jsx)(Y,{}),`Approve here with GitHub`]})]}),t[10]=i,t[11]=e.request.kind,t[12]=n,t[13]=a,t[14]=r,t[15]=p):p=t[15];let m;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)($,{}),t[16]=m):m=t[16];let h;return t[17]!==c||t[18]!==u||t[19]!==d||t[20]!==f||t[21]!==p?(h=(0,J.jsxs)(`section`,{className:`flex flex-1 flex-col items-center justify-center gap-3 pb-12 text-center`,"aria-labelledby":`waiting-title`,children:[c,u,d,f,p,m]}),t[17]=c,t[18]=u,t[19]=d,t[20]=f,t[21]=p,t[22]=h):h=t[22],h}function qe(e){let t=(0,q.c)(7),n;t[0]===e.id?n=t[1]:(n=je(e.id),t[0]=e.id,t[1]=n);let r=B(n),i;if(t[2]!==e.account||t[3]!==r.value){let n;t[5]===e.account?n=t[6]:(n=t=>b(E(e.account,Je),{onNone:()=>(0,J.jsx)(Ke,{request:t.request}),onSome:()=>(0,J.jsx)(K.Suspense,{fallback:(0,J.jsx)(R,{label:`Apps`,media:!0,rows:9}),children:(0,J.jsx)(we,{pending:y(t.request)})})}),t[5]=e.account,t[6]=n),i=x(r.value,w,ne({Decided:Ze,Expired:Ye,Waiting:n})),t[2]=e.account,t[3]=r.value,t[4]=i}else i=t[4];return i}function Je(e){return e.role!==`Waiting`}function Ye(){return(0,J.jsxs)(u,{role:`status`,children:[(0,J.jsxs)(i,{children:[(0,J.jsx)(p,{children:`This sign-in expired`}),(0,J.jsx)(s,{children:`Start it again in the app or agent that asked.`})]}),(0,J.jsx)(c,{children:(0,J.jsx)(o,{variant:`outline`,onClick:Xe,children:`Back to Auth`})})]})}function Xe(){return location.assign(`/`)}function Ze(){return(0,J.jsx)(u,{role:`status`,children:(0,J.jsx)(i,{children:(0,J.jsx)(p,{children:`Continuing…`})})})}function Qe(){let e=(0,q.c)(2),t=Pe(),n;return e[0]===t?n=e[1]:(n=e=>(0,J.jsxs)(de,{active:t({to:e.to})!==!1,render:(0,J.jsx)(Ne,{to:e.to}),children:[e.label,e.count>0&&(0,J.jsx)(Fe,{children:e.count})]},e.to),e[0]=t,e[1]=n),T([{count:0,label:`Sign-ins`,to:`/`},{count:m(B(ke).value,$e),label:`People`,to:`/people`}],n)}function $e(e){return e.role===`Waiting`}function et(e){return x(w(e.account.role),ae(`Waiting`,()=>(0,J.jsx)(u,{role:`status`,children:(0,J.jsxs)(i,{children:[(0,J.jsx)(f,{children:(0,J.jsx)(D,{waiting:!0})}),(0,J.jsx)(p,{children:`Waiting for an admin`})]})})),ie(()=>(0,J.jsx)(Me,{})))}function tt(e){let t=(0,q.c)(26),n=ye(he),r=ee(n,ot),[i,a]=z(ge),[o,s]=z(_e),c=k,l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,J.jsx)(V,{children:`Passkeys`}),t[0]=l):l=t[0];let u;t[1]===n?u=t[2]:(u=b(_(n),{onNone:at,onSome:it}),t[1]=n,t[2]=u);let d;t[3]!==s||t[4]!==o?(d=e=>(0,J.jsxs)(pe,{children:[(0,J.jsxs)(fe,{children:[(0,J.jsx)(W,{}),(0,J.jsx)(`span`,{className:`truncate`,children:e.addedFrom}),(0,J.jsx)(`span`,{className:`text-muted-foreground ml-auto pl-3 text-xs`,children:C(e.synced,{onFalse:rt,onTrue:nt})})]}),(0,J.jsx)(le,{children:(0,J.jsx)(M,{variant:`destructive`,disabled:S(o),onClick:()=>s(e.id),children:`Remove`})})]},e.id),t[3]=s,t[4]=o,t[5]=d):d=t[5];let f=T(r,d),p;t[6]!==i||t[7]!==e.via?(p=e.via===`Code`||S(i),t[6]=i,t[7]=e.via,t[8]=p):p=t[8];let m;t[9]===a?m=t[10]:(m=()=>a(),t[9]=a,t[10]=m);let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,J.jsx)(Le,{}),t[11]=h):h=t[11];let g;t[12]===e.via?g=t[13]:(g=e.via===`Code`&&(0,J.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:`Needs a GitHub or passkey sign-in on this browser`}),t[12]=e.via,t[13]=g);let v;t[14]===g?v=t[15]:(v=(0,J.jsxs)(`span`,{className:`flex flex-col`,children:[`Add a passkey`,g]}),t[14]=g,t[15]=v);let y;t[16]!==p||t[17]!==m||t[18]!==v?(y=(0,J.jsxs)(M,{disabled:p,onClick:m,children:[h,v]}),t[16]=p,t[17]=m,t[18]=v,t[19]=y):y=t[19];let x;return t[20]!==c||t[21]!==l||t[22]!==u||t[23]!==f||t[24]!==y?(x=(0,J.jsxs)(c,{children:[l,u,f,y]}),t[20]=c,t[21]=l,t[22]=u,t[23]=f,t[24]=y,t[25]=x):x=t[25],x}function nt(){return`Synced`}function rt(){return`One device`}function it(e){return(0,J.jsx)(M,{disabled:!0,children:(0,J.jsxs)(`span`,{className:`text-destructive text-xs`,children:[`Passkeys unavailable · `,e.message]})})}function at(){return null}function ot(){return[]}function st(e){let t=(0,q.c)(28),[n,r]=z(be),i;t[0]!==e.account.id||t[1]!==e.account.name?(i=(0,J.jsx)(me,{"aria-label":`Account`,className:`focus-visible:ring-ring rounded-full outline-none focus-visible:ring-2`,children:(0,J.jsx)(Oe,{id:e.account.id,name:e.account.name})}),t[0]=e.account.id,t[1]=e.account.name,t[2]=i):i=t[2];let a=e.account.fullName??e.account.name,o;t[3]===a?o=t[4]:(o=(0,J.jsx)(`span`,{className:`text-foreground block text-sm`,children:a}),t[3]=a,t[4]=o);let s=e.account.name,c;t[5]===e.account.role?c=t[6]:(c=te(e.account.role),t[5]=e.account.role,t[6]=c);let l=`@${s} · ${c}`,u;t[7]!==o||t[8]!==l?(u=(0,J.jsx)(k,{children:(0,J.jsxs)(V,{children:[o,l]})}),t[7]=o,t[8]=l,t[9]=u):u=t[9];let d;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(oe,{}),t[10]=d):d=t[10];let f;t[11]!==e.account.role||t[12]!==e.account.via?(f=e.account.role!==`Waiting`&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(tt,{via:e.account.via}),(0,J.jsx)(oe,{})]}),t[11]=e.account.role,t[12]=e.account.via,t[13]=f):f=t[13];let p;t[14]===n?p=t[15]:(p=S(n),t[14]=n,t[15]=p);let m;t[16]===r?m=t[17]:(m=()=>r(),t[16]=r,t[17]=m);let h;t[18]!==m||t[19]!==p?(h=(0,J.jsx)(M,{variant:`destructive`,disabled:p,onClick:m,children:`Sign out`}),t[18]=m,t[19]=p,t[20]=h):h=t[20];let g;t[21]!==h||t[22]!==u||t[23]!==f?(g=(0,J.jsxs)(ue,{align:`end`,className:`w-auto min-w-48`,children:[u,d,f,h]}),t[21]=h,t[22]=u,t[23]=f,t[24]=g):g=t[24];let _;return t[25]!==i||t[26]!==g?(_=(0,J.jsxs)(ce,{children:[i,g]}),t[25]=i,t[26]=g,t[27]=_):_=t[27],_}function ct(){let e=(0,q.c)(32),[t,n]=z(P),[r,i]=z(I),[a,s]=z(F),c;e[0]===t?c=e[1]:(c=S(t),e[0]=t,e[1]=c);let l;e[2]===n?l=e[3]:(l=()=>n(),e[2]=n,e[3]=l);let u;e[4]===t?u=e[5]:(u=C(S(t),{onFalse:ft,onTrue:dt}),e[4]=t,e[5]=u);let d;e[6]!==c||e[7]!==l||e[8]!==u?(d=(0,J.jsxs)(o,{size:`lg`,disabled:c,onClick:l,children:[u,`Sign in with GitHub`]}),e[6]=c,e[7]=l,e[8]=u,e[9]=d):d=e[9];let f;e[10]===a?f=e[11]:(f=S(a),e[10]=a,e[11]=f);let p;e[12]===s?p=e[13]:(p=()=>s(),e[12]=s,e[13]=p);let m;e[14]===a?m=e[15]:(m=C(S(a),{onFalse:ut,onTrue:lt}),e[14]=a,e[15]=m);let h;e[16]!==f||e[17]!==p||e[18]!==m?(h=(0,J.jsxs)(o,{size:`lg`,variant:`outline`,disabled:f,onClick:p,children:[m,`Sign in with a passkey`]}),e[16]=f,e[17]=p,e[18]=m,e[19]=h):h=e[19];let g;e[20]===r?g=e[21]:(g=S(r),e[20]=r,e[21]=g);let _;e[22]===i?_=e[23]:(_=()=>i(),e[22]=i,e[23]=_);let v;e[24]!==g||e[25]!==_?(v=(0,J.jsx)(o,{size:`lg`,variant:`outline`,disabled:g,onClick:_,children:`Sign in with a code`}),e[24]=g,e[25]=_,e[26]=v):v=e[26];let y;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,J.jsx)($,{}),e[27]=y):y=e[27];let b;return e[28]!==v||e[29]!==d||e[30]!==h?(b=(0,J.jsxs)(`section`,{className:`flex flex-1 flex-col justify-center gap-2 pb-12`,"aria-label":`Sign in`,children:[d,h,v,y]}),e[28]=v,e[29]=d,e[30]=h,e[31]=b):b=e[31],b}function lt(){return(0,J.jsx)(Z,{})}function ut(){return(0,J.jsx)(W,{})}function dt(){return(0,J.jsx)(Z,{})}function ft(){return(0,J.jsx)(Y,{})}function pt(){let e=(0,q.c)(8),[t,n]=z(se),r,a;e[0]===n?(r=e[1],a=e[2]):(r=()=>n(),a=[n],e[0]=n,e[1]=r,e[2]=a),(0,K.useEffect)(r,a);let l;if(e[3]!==n||e[4]!==t){let r;e[6]===n?r=e[7]:(r=e=>(0,J.jsxs)(u,{role:`alert`,children:[(0,J.jsxs)(i,{children:[(0,J.jsx)(p,{children:`Sign-out failed`}),(0,J.jsx)(s,{children:e.message})]}),(0,J.jsx)(c,{children:(0,J.jsx)(o,{variant:`outline`,onClick:()=>n(),children:`Try again`})})]}),e[6]=n,e[7]=r),l=b(_(t),{onNone:mt,onSome:r}),e[3]=n,e[4]=t,e[5]=l}else l=e[5];return l}function mt(){return(0,J.jsx)(u,{role:`status`,children:(0,J.jsx)(i,{children:(0,J.jsx)(p,{children:`Signing out…`})})})}function ht(){let e=(0,q.c)(21),t=B(xe).value,n;e[0]===t?n=e[1]:(n=b(t,{onNone:Tt,onSome:wt}),e[0]=t,e[1]=n);let r;e[2]===t?r=e[3]:(r=g(t,Ct)&&(0,J.jsx)(K.Suspense,{fallback:null,children:(0,J.jsx)(Qe,{})}),e[2]=t,e[3]=r);let i;e[4]===t?i=e[5]:(i=b(E(t,St),{onNone:xt,onSome:bt}),e[4]=t,e[5]=i);let a;e[6]!==n||e[7]!==r||e[8]!==i?(a=(0,J.jsx)(A,{icon:Q,name:`auth`,account:n,tabs:r,commands:i}),e[6]=n,e[7]=r,e[8]=i,e[9]=a):a=e[9];let o;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(o=j&&(0,J.jsx)(pt,{}),e[10]=o):o=e[10];let s;e[11]===t?s=e[12]:(s=b(O,{onNone:yt,onSome:e=>(0,J.jsx)(qe,{account:t,id:e})}),e[11]=t,e[12]=s);let c;e[13]===t?c=e[14]:(c=b(t,{onNone:vt,onSome:gt}),e[13]=t,e[14]=c);let l;e[15]!==s||e[16]!==c?(l=(0,J.jsxs)(X,{className:`max-w-xl`,children:[o,s,c]}),e[15]=s,e[16]=c,e[17]=l):l=e[17];let u;return e[18]!==a||e[19]!==l?(u=(0,J.jsxs)(J.Fragment,{children:[a,l]}),e[18]=a,e[19]=l,e[20]=u):u=e[20],u}function gt(e){return C(re(O)&&e.role!==`Waiting`,{onFalse:()=>(0,J.jsx)(et,{account:e}),onTrue:_t})}function _t(){return null}function vt(){return h(O)&&!j&&(0,J.jsx)(ct,{})}function yt(){return null}function bt(){return[]}function xt(){}function St(e){return e.role!==`Waiting`}function Ct(e){return e.role===`Admin`}function wt(e){return(0,J.jsx)(st,{account:e})}function Tt(){return!1}function Et(){let e=(0,q.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsx)(A,{icon:Q,name:`auth`,account:!1}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,J.jsx)(K.Suspense,{fallback:(0,J.jsxs)(J.Fragment,{children:[t,(0,J.jsx)(X,{className:`max-w-xl`,children:(0,J.jsx)(R,{label:`Apps`,media:!0,rows:9})})]}),children:(0,J.jsx)(ht,{})}),e[1]=n):n=e[1],n}export{Et as component};