ryco-cli 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/bin.cjs +1 -1
  2. package/dist/bin.mjs +1 -1
  3. package/dist/client/assets/{AccountSettings-C3v2klAG.js → AccountSettings-Be5_48k0.js} +1 -1
  4. package/dist/client/assets/{AiFocusSettings-BquKjnWf.js → AiFocusSettings-DIpQXLW2.js} +1 -1
  5. package/dist/client/assets/{BranchToolbar.logic-CmvD76Cw.js → BranchToolbar.logic-D7slG_zJ.js} +1 -1
  6. package/dist/client/assets/{ChatRightPanel-DVxRdZWT.js → ChatRightPanel-BIS1DPGa.js} +3 -3
  7. package/dist/client/assets/{ChatThreadRouteView-DlgAAOCp.js → ChatThreadRouteView-CocRstME.js} +1 -1
  8. package/dist/client/assets/{CommandPaletteDialog-BnJURcy7.js → CommandPaletteDialog-C5xAo65V.js} +1 -1
  9. package/dist/client/assets/{ConnectionsSettings-Ccn8q4fG.js → ConnectionsSettings-CXabxSaH.js} +1 -1
  10. package/dist/client/assets/{DiagnosticsSettings-QXpjXOrH.js → DiagnosticsSettings-CZ3vY43G.js} +1 -1
  11. package/dist/client/assets/{DraftChatThreadRouteView-DFMY6O91.js → DraftChatThreadRouteView-D8Bt3Qnq.js} +1 -1
  12. package/dist/client/assets/{HostedConnectionControls-BC4kVWTa.js → HostedConnectionControls-DxAXv0Hd.js} +1 -1
  13. package/dist/client/assets/{HostedHubRoot-pBGVub10.js → HostedHubRoot-Cc8GYcK6.js} +1 -1
  14. package/dist/client/assets/{HostedNativeAuthorizationRoute-Df0oSrLR.js → HostedNativeAuthorizationRoute-CTQe7Vjt.js} +1 -1
  15. package/dist/client/assets/{HostedRelayTrustNotice-ffS_O2AX.js → HostedRelayTrustNotice-BldMySVi.js} +1 -1
  16. package/dist/client/assets/{IntegrationsSettingsPanel-BHyy-VM0.js → IntegrationsSettingsPanel-D6f3KoqM.js} +1 -1
  17. package/dist/client/assets/{KeybindingsSettings-BfkONqmZ.js → KeybindingsSettings-D2bNQPI-.js} +1 -1
  18. package/dist/client/assets/{McpServersSettings-UthT1T80.js → McpServersSettings-B7YqVvV4.js} +1 -1
  19. package/dist/client/assets/{NewWorktreeDialog-DTZnArOC.js → NewWorktreeDialog-CKr2ioue.js} +1 -1
  20. package/dist/client/assets/{NoActiveThreadState-jcEAWu7N.js → NoActiveThreadState-BD-eNmfn.js} +1 -1
  21. package/dist/client/assets/{NodeSecuritySettings-DPqjRphc.js → NodeSecuritySettings-FWM_SeDi.js} +1 -1
  22. package/dist/client/assets/{OpinionatedPluginsSettings-BSy3F4v6.js → OpinionatedPluginsSettings-BtZQF4Ze.js} +1 -1
  23. package/dist/client/assets/{PhoneGetAppInterstitial-B2mrJtgM.js → PhoneGetAppInterstitial-CooQgpSw.js} +1 -1
  24. package/dist/client/assets/{PhoneHome-C-ttaKuE.js → PhoneHome-BtPE7bQn.js} +1 -1
  25. package/dist/client/assets/{PhoneSettingsSurface-CJddundi.js → PhoneSettingsSurface-tcFCccEL.js} +1 -1
  26. package/dist/client/assets/{ProjectFavicon-BhQnkxbx.js → ProjectFavicon-qZGdjYCM.js} +1 -1
  27. package/dist/client/assets/{ProviderModelPicker-COg6CGM4.js → ProviderModelPicker-D0w23uWo.js} +1 -1
  28. package/dist/client/assets/{ProvidersSettingsPanel-C3aPyCrN.js → ProvidersSettingsPanel-B3aBKY--.js} +1 -1
  29. package/dist/client/assets/{RootAppShell-3T2sBtpP.js → RootAppShell-C-0ChFVJ.js} +2 -2
  30. package/dist/client/assets/{SettingsDialog-krsStFrf.js → SettingsDialog-Bbuoh793.js} +1 -1
  31. package/dist/client/assets/{SettingsPanels-D8Xy3pPC.js → SettingsPanels-Dr4f2y9l.js} +1 -1
  32. package/dist/client/assets/{SourceControlSettings-KIx9EfEZ.js → SourceControlSettings-CkiYR4lR.js} +1 -1
  33. package/dist/client/assets/{StatisticsPage-C38pI2_b.js → StatisticsPage-Bjouapmf.js} +1 -1
  34. package/dist/client/assets/{StatisticsPanel-6sINT28-.js → StatisticsPanel-D_khPph6.js} +1 -1
  35. package/dist/client/assets/{ThreadStatusIndicators-CL0KGLlj.js → ThreadStatusIndicators-ZImeLExQ.js} +0 -0
  36. package/dist/client/assets/{ThreadTerminalDrawer-C4NJu8Qs.js → ThreadTerminalDrawer-DDHEuRGB.js} +1 -1
  37. package/dist/client/assets/{ThreadWorkspacePanel-D9qlHXCA.js → ThreadWorkspacePanel-QF3KwbGm.js} +1 -1
  38. package/dist/client/assets/{WorkItemsTab-BDAeQe4D.js → WorkItemsTab-AOVwVvb7.js} +1 -1
  39. package/dist/client/assets/{branding-DeKsIp6g.js → branding-BDfN6Spd.js} +1 -1
  40. package/dist/client/assets/{capabilities-BkVqeGLQ.js → capabilities-3zgirmmI.js} +1 -1
  41. package/dist/client/assets/{desktopUpdateAtoms-B9iJXSdW.js → desktopUpdateAtoms-CyfPW2jg.js} +1 -1
  42. package/dist/client/assets/{desktopWorkspace-B-cSBe8H.js → desktopWorkspace-DHUZEpfy.js} +1 -1
  43. package/dist/client/assets/{device-DfIh5pQV.js → device-B_qvyvtW.js} +1 -1
  44. package/dist/client/assets/{editorPreferences-0DWMgcci.js → editorPreferences-DHIJntKF.js} +1 -1
  45. package/dist/client/assets/{index-Bntnmu6O.js → index-CQmEMMQH.js} +1 -1
  46. package/dist/client/assets/{main-BjVnVob0.js → main-BKS5Nf2_.js} +2 -2
  47. package/dist/client/assets/primary-BzLEg2w1.js +2 -0
  48. package/dist/client/assets/{projectPaths-SSsIvt0g.js → projectPaths-BAd6NFcE.js} +1 -1
  49. package/dist/client/assets/{providerIconUtils-CzSa_16f.js → providerIconUtils-X0Z3EK-Q.js} +1 -1
  50. package/dist/client/assets/{runtime-DfGHeCnR.js → runtime-CXut_g4p.js} +1 -1
  51. package/dist/client/assets/{session-logic-wxhvMgEN.js → session-logic-GZix7S2I.js} +1 -1
  52. package/dist/client/assets/{sidebarProjectFolders-CGVDJ0ZT.js → sidebarProjectFolders-cnmz3B_-.js} +1 -1
  53. package/dist/client/assets/storeSelectors-DYekgeHu.js +1 -0
  54. package/dist/client/assets/{threadPriorityRefreshRuntime-tRDgvBzr.js → threadPriorityRefreshRuntime-Ct5pnIbX.js} +1 -1
  55. package/dist/client/assets/types-DYekgeHu.js +1 -0
  56. package/dist/client/assets/{useAtlassian-DC0XOw4u.js → useAtlassian-9-hy2f8z.js} +0 -0
  57. package/dist/client/assets/{useHandleNewThread-Bvz-DKgn.js → useHandleNewThread-DX2FtXcP.js} +1 -1
  58. package/dist/client/assets/{usePhoneThreadActions-CAgIq9aZ.js → usePhoneThreadActions-BEa3VzGG.js} +1 -1
  59. package/dist/client/assets/{useStatistics-CiLROMJP.js → useStatistics-CtunoTE-.js} +1 -1
  60. package/dist/client/assets/{useThreadActions-Vew3ScxG.js → useThreadActions-fN-Al13y.js} +1 -1
  61. package/dist/client/index.html +1 -1
  62. package/package.json +1 -1
  63. package/dist/client/assets/primary-OskAInOO.js +0 -2
  64. package/dist/client/assets/storeSelectors-Bpr2pdhU.js +0 -1
  65. package/dist/client/assets/types-Bpr2pdhU.js +0 -1
@@ -1 +1 @@
1
- import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{n as r}from"./env-B4arEvJg.js";import{Ir as i,Nr as a}from"./src-Vf4LVnMX.js";import{N as o}from"./runtime-DfGHeCnR.js";import{It as s}from"./composerDraftStore-CdJJZe42.js";import{_ as c,d as l,f as u,h as d,l as f,m as p,p as m,r as h,v as g}from"./useHandleNewThread-Bvz-DKgn.js";import{t as _}from"./useNavigate-2tVq4iZ2.js";import{o as v}from"./authorization-mIJKV2yp.js";import{f as y}from"./useRenderElement-DchFnsR8.js";import{t as b}from"./chevron-down-B7C6FKzM.js";import{t as x}from"./copy-UQjKGt7t.js";import{t as S}from"./download-CQZ-m4zW.js";import{t as ee}from"./log-out-tMJm0Gk6.js";import{t as te}from"./refresh-cw-DopCMrtR.js";import{t as C}from"./shield-check-dQ-4cMKk.js";import{t as w}from"./shield-IZEIJ8r7.js";import{t as T}from"./smartphone-gNe1ynB8.js";import{t as ne}from"./user-round-Cpzx8pSw.js";import{t as E}from"./x-C1Cemsov.js";import{t as D}from"./utils-BofFIn5Y.js";import{t as O}from"./button-BAbJxRzt.js";import{t as k}from"./usePresentationTier-B_SCFvN7.js";import{a as A,i as j,n as re,o as M,s as N,t as P}from"./MobileSheet-CkeG6_SP.js";import{t as F}from"./GlassSurface-C3IIWMu9.js";import{a as ie,c as ae,i as I,n as L,o as R,r as z,s as oe,t as B}from"./HostedRelayTrustNotice-ffS_O2AX.js";import{n as V,o as se}from"./settingsSections.logic-F8RXVmAq.js";var ce=y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),H=y(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),U=y(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),W=y(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),G=n(),K=e(t(),1),le=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),q=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),ue=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function de(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function fe(e){let t=de(e);if(t.startsWith(`/account`))return{kind:`account`,section:le[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(q))if(t===n)return{kind:e};return null}function pe(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:q[e.kind]}function me(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var he=typeof window>`u`?`/`:de(window.location.pathname),ge=new Set;function _e(){for(let e of Array.from(ge))e()}function ve(e){let t=de(e);t!==he&&(he=t,_e())}var ye=!1;function be(){ye||(ye=!0,g(()=>{ve(d().logicalPathname)}))}function xe(){return p()===null?typeof window>`u`?he:de(window.location.pathname):he}var Se=!1;function Ce(){Se||typeof window>`u`||(Se=!0,window.addEventListener(`popstate`,()=>{p()===null&&_e()}))}function we(e){return be(),Ce(),ge.add(e),()=>{ge.delete(e)}}function Te(e,t){Ee(pe(e),t)}function Ee(e,t){let n=de(e),r=p();if(r){t?.replace===!0?r.replace(n):r.push(n),ve(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),he=n,_e()}function De(){let e=(0,G.c)(2),t=(0,K.useSyncExternalStore)(we,xe),n;return e[0]===t?n=e[1]:(n=fe(t),e[0]=t,e[1]=n),n}var J=s(),Oe={unavailable:`The node from this link is not in your authorized node directory. Choose a node to continue.`,revoked:`Access to the node from this link was revoked. Choose a node to continue.`,offline:`The node from this link is offline. Choose a node to continue.`,"invalid-link":`This node link is not valid. Choose a node to continue.`},ke=null,Ae=new Set;function Y(e){if(ke!==e){ke=e;for(let e of Array.from(Ae))e()}}function je(e){return Ae.add(e),()=>{Ae.delete(e)}}function Me(){return ke===null?null:Oe[ke]}function Ne(){return(0,K.useSyncExternalStore)(je,Me)}function Pe(){return(0,K.useSyncExternalStore)(g,d)}var Fe=new Set([`node`,`draft`,`pair`,`diagnostics`,...ue]);function Ie(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Fe.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Le(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Fe.has(t[1]??``))return null;try{return{environmentId:a.make(decodeURIComponent(t[1]??``)),threadId:i.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Re(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,ze=!1,Be=null,Ve=0,He=!1,Ue=null,We=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==Ue&&(We?.(),We=null,Ue=t,e&&(We=f(e.environmentId,e.threadId)))}function Ge(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Ke(){He||(He=!0,queueMicrotask(()=>{He=!1,Ve!==0&&Ye()}))}function qe(e){ze=!0;try{e()}finally{ze=!1}Ke()}function Je(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),u()}function Ye(){if(ze||!p())return;let e=d(),t=o.getState();if(e.malformed){Y(`invalid-link`),$(null),u();return}if(t.accountStatus!==`authenticated`){$(null),Be===`authenticated`&&Y(null),Be=t.accountStatus;return}Be=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!h()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;v.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Xe(e.logicalPathname,t);return}let r=Le(e.logicalPathname);Ge(r)!==Ue&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Je(t.selectionStatus,`unavailable`);return}if(t.selectedNode?.id===n){if($(r),X=null,Q=null,t.sessionEstablished){Z=null,Y(null);return}if(Z===n&&t.transportStatus===`terminal-failure`&&(t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`)){Z=null,qe(()=>{u(),v.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&qe(()=>{Je(t.selectionStatus,`offline`),v.returnToDirectory()});return}if(t.directoryStatus===`stale`){Je(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Je(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Je(t.selectionStatus,`revoked`);return}let s=Q===n;$(r);let c=r!==null&&!a.presence.online&&!s;r&&h()&&!c||X!==n&&(X=n,Z=s?null:n,Q=null,Y(null),v.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Xe(e,t){if(Re(e)){u();return}let n=Ie(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),u();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),u();return}l(r.id)}function Ze(e){return p()?(Q=e,Y(null),m(e)):!1}function Qe(){if(!p())return!1;Q=null,Y(null);let e=d();return e.nodeId===null&&e.logicalPathname===`/nodes`||c()}function $e(){Ve+=1;let e=g(Ke),t=o.subscribe(Ke),n=p()?.subscribe(()=>Ke());Ke();let r=!1;return()=>{r||(r=!0,--Ve,e(),t(),n?.())}}function et(){let e=(0,G.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(tt,t)}function tt(){return $e()}function nt(e){let t=(0,G.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,c;t[0]===s?c=t[1]:(c=D(F(`chip`),`flex min-h-11 min-w-11 max-w-[136px] shrink items-center justify-center gap-1.5 rounded-full border border-border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring`,s),t[0]=s,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,J.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=l);let u;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==o?(u=(0,J.jsxs)(`button`,{type:`button`,"aria-label":n,"data-slot":`mobile-status-chip`,"data-testid":o,className:c,onClick:a,children:[i,l]}),t[4]=i,t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=o,t[10]=u):u=t[10],u}var rt={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function it(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:rt[e.guarantee]}function at(){let e=(0,G.c)(19),t=ie(),n=R(),i=o(ct),a=o(st),s=o(ot);if(t!==`web-unsigned`)return null;let c,l;e[0]!==n||e[1]!==a||e[2]!==i||e[3]!==s?(c=z(se(`security`,{hosted:r(),role:V(i,a,s)})),l=I(n,c),e[0]=n,e[1]=a,e[2]=i,e[3]=s,e[4]=c,e[5]=l):(c=e[4],l=e[5]);let u=l;if(!u){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:L})]}),e[6]=t):t=e[6],t}let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=d):d=e[7];let f;e[8]===u.display?f=e[9]:(f=(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-code`,className:`font-mono text-base leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:u.display}),e[8]=u.display,e[9]=f);let p;e[10]===u.display?p=e[11]:(p=()=>void navigator.clipboard.writeText(u.display),e[10]=u.display,e[11]=p);let m;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(x,{"aria-hidden":!0,className:`size-3.5`}),e[12]=m):m=e[12];let h;e[13]===p?h=e[14]:(h=(0,J.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:p,children:[m,` Copy`]}),e[13]=p,e[14]=h);let g;return e[15]!==c||e[16]!==f||e[17]!==h?(g=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":c,className:`space-y-2`,children:[d,f,h]}),e[15]=c,e[16]=f,e[17]=h,e[18]=g):g=e[18],g}function ot(e){return e.transportStatus}function st(e){return e.directoryStatus}function ct(e){return e.effectiveRole}var lt=`ryco:pwa:activate:v1`,ut=`Installation is temporarily unavailable.`,dt={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function ft(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function pt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function mt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function ht(e){let t=dt,n=!1,r=null,i=null,a=!!e.navigator.serviceWorker?.controller,o=!1,s=!1,c=new Set,l=e.window.matchMedia(`(display-mode: standalone)`),u=e=>{let n={...t,...e};Object.entries(n).every(([e,n])=>t[e]===n)||(t=n,c.forEach(e=>e()))},d=()=>l.matches||e.navigator.standalone===!0,f=()=>d()?`installed`:`manual-available`,p=e=>{!mt(e)||d()||(e.preventDefault(),r=e,u({installState:`native-available`}))},m=()=>{r=null,u({installState:`installed`})},h=()=>{d()?(r=null,u({installState:`installed`})):u({installState:r?`native-available`:`manual-available`})},g=()=>{let t=a;a=!!e.navigator.serviceWorker?.controller,!(o||!s&&!t)&&(s=!1,o=!0,e.window.reload())},_=t=>{i=t,t.waiting&&u({updateState:`ready`}),t.addEventListener(`updatefound`,()=>{let n=t.installing;n&&n.addEventListener(`statechange`,()=>{n.state===`installed`&&e.navigator.serviceWorker?.controller&&u({updateState:`ready`})})})},v=async()=>{let t=e.navigator.serviceWorker;if(!t){u({registrationState:`unavailable`,errorMessage:ut});return}u({registrationState:`registering`,errorMessage:null});try{let n=ft(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:ut})}};return{activateUpdate(){let e=i?.waiting;!e||t.updateState!==`ready`||(s=!0,u({updateState:`activating`}),e.postMessage({type:lt}))},dismissInstall(){r=null,u({installState:d()?`installed`:`hidden`})},getSnapshot(){return t},async promptInstall(){let e=r;e&&(r=null,u({installState:`hidden`}),await e.prompt(),(await e.userChoice).outcome===`dismissed`&&!d()&&u({installState:`manual-available`}))},async start(t){n||(n=!0,t.enabled&&(a=!!e.navigator.serviceWorker?.controller,o=!1,u({installState:f(),platform:pt(e)?`ios`:`other`}),e.window.addEventListener(`beforeinstallprompt`,p),e.window.addEventListener(`appinstalled`,m),l.addEventListener(`change`,h),e.navigator.serviceWorker?.addEventListener(`controllerchange`,g),e.document.readyState===`complete`?await v():e.window.addEventListener(`load`,()=>void v(),{once:!0})))},stop(){n&&(n=!1,r=null,i=null,a=!1,o=!1,s=!1,e.window.removeEventListener(`beforeinstallprompt`,p),e.window.removeEventListener(`appinstalled`,m),l.removeEventListener(`change`,h),e.navigator.serviceWorker?.removeEventListener(`controllerchange`,g),t=dt,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function gt(){let e=navigator;return{baseUrl:`/`,document,navigator:{maxTouchPoints:e.maxTouchPoints,userAgent:e.userAgent,...e.serviceWorker?{serviceWorker:e.serviceWorker}:{},...typeof e.standalone==`boolean`?{standalone:e.standalone}:{}},window:{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),matchMedia:window.matchMedia.bind(window),reload:()=>window.location.reload()}}}var _t=typeof window>`u`?null:ht(gt());function vt(e){let t=(0,G.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?_t:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,J.jsx)(yt,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function yt(e){let t=(0,G.c)(27),{compact:n,lifecycle:r}=e,i=(0,K.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,K.useState)(!1);if(i.installState!==`native-available`&&i.installState!==`manual-available`&&i.updateState===`idle`&&i.registrationState!==`unavailable`)return null;let s=n?`space-y-2`:`mt-4 space-y-3`,c;t[0]!==n||t[1]!==r||t[2]!==i.installState?(c=i.installState===`native-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,J.jsx)(S,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==a||t[6]!==i.installState?(l=i.installState===`manual-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(bt),children:[(0,J.jsx)(T,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(u=i.updateState===`idle`?null:(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,J.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=u):u=t[11];let d;t[12]!==c||t[13]!==l||t[14]!==u?(d=(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c,l,u]}),t[12]=c,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;t[16]!==a||t[17]!==i?(f=a?(0,J.jsx)(xt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=f):f=t[18];let p;t[19]!==i.errorMessage||t[20]!==i.registrationState?(p=i.registrationState===`unavailable`&&i.errorMessage?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=p):p=t[21];let m;return t[22]!==s||t[23]!==d||t[24]!==f||t[25]!==p?(m=(0,J.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[d,f,p]}),t[22]=s,t[23]=d,t[24]=f,t[25]=p,t[26]=m):m=t[26],m}function bt(e){return!e}function xt(e){let t=(0,G.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`p`,{className:`font-medium`,children:`Install Ryco on this device`}),t[0]=i):i=t[0];let a;t[1]===n.platform?a=t[2]:(a=(0,J.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`In Safari, open the Share or browser menu, choose Add to Home Screen, enable Open as Web App when offered, then tap Add.`}):(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Open the browser menu, choose Add to home screen or Install app, then confirm Install.`})]}),t[1]=n.platform,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(E,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=(0,J.jsxs)(O,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=c);let l;t[7]!==a||t[8]!==c?(l=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,J.jsx)(B,{compact:!0})}),t[10]=u):u=t[10];let d;return t[11]===l?d=t[12]:(d=(0,J.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[l,u]}),t[11]=l,t[12]=d),d}var St={connected:W,disconnected:U,legacy:H,"browser-encrypted":w,"native-verified":C};function Ct(e){let t=(0,G.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=it(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=St[o],l=String(n.connected),u=`${r} ${s}`,d;return t[2]!==c||t[3]!==o||t[4]!==n.guarantee||t[5]!==l||t[6]!==u||t[7]!==i?(d=(0,J.jsx)(c,{"aria-hidden":!0,"data-testid":i,"data-connected":l,"data-guarantee":n.guarantee,"data-glyph":o,className:u}),t[2]=c,t[3]=o,t[4]=n.guarantee,t[5]=l,t[6]=u,t[7]=i,t[8]=d):d=t[8],d}function wt(e){let t=(0,G.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`span`,{className:`text-xs text-destructive`,children:`Revoked`}),t[0]=e):e=t[0],e}let r;return t[1]===n.presence.online?r=t[2]:(r=n.presence.online?(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,J.jsx)(W,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(U,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function Tt(){let e=(0,G.c)(7),t=_(),n;e[0]===t?n=e[1]:(n=async e=>{Ze(e.id)||(await t({to:`/`,replace:!0}),await v.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Qe()||(await t({to:`/`,replace:!0}),await v.returnToDirectory())},e[2]=t,e[3]=i);let a=i,o;return e[4]!==a||e[5]!==r?(o={switchNode:r,returnToAllNodes:a},e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function Et(){let e=(0,G.c)(5),t=o(kt),n=o(Ot);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`p`,{children:`A request may or may not have reached the node. Ryco did not resend it automatically.`}),e[0]=r):r=e[0];let i=!n,a=n?void 0:`Wait for session replay to finish before acknowledging this warning.`,s=n?`Acknowledge`:`Synchronizing…`,c;return e[1]!==i||e[2]!==a||e[3]!==s?(c=(0,J.jsxs)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-2 text-xs`,children:[r,(0,J.jsx)(O,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:Dt,children:s})]}),e[1]=i,e[2]=a,e[3]=s,e[4]=c):c=e[4],c}function Dt(){return v.acknowledgeDeliveryUnknown()}function Ot(e){return e.sessionRecoveredAfterUnknown}function kt(e){return e.sessionStatus}function At(){let e=(0,G.c)(62),t=o(Vt),n=o(Bt),r=o(zt),i=o(Rt),a=o(Lt),s=o(It),c=o(Ft),l=o(Pt),u=o(Nt),d=ie(),{switchNode:f,returnToAllNodes:p}=Tt(),m=(0,K.useRef)(null);if(!t)return null;let h,g;if(e[0]!==u||e[1]!==d||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:u,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:d};h=ae(t),g=oe(t),e[0]=u,e[1]=d,e[2]=a,e[3]=i,e[4]=r,e[5]=h,e[6]=g}else h=e[5],g=e[6];let _=g,v;e[7]===_?v=e[8]:(v=(0,J.jsx)(Ct,{indicator:_,className:`size-4`}),e[7]=_,e[8]=v);let y;e[9]===t.label?y=e[10]:(y=(0,J.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=y);let x;e[11]===h?x=e[12]:(x=(0,J.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:h}),e[11]=h,e[12]=x);let S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(b,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=S):S=e[13];let C;e[14]!==v||e[15]!==y||e[16]!==x?(C=(0,J.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-lg border border-border bg-card/95 px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[v,y,x,S]}),e[14]=v,e[15]=y,e[16]=x,e[17]=C):C=e[17];let w;e[18]===t.label?w=e[19]:(w=(0,J.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=w);let T=c??`Role unavailable`,E;e[20]!==h||e[21]!==T?(E=(0,J.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[T,` · `,h]}),e[20]=h,e[21]=T,e[22]=E):E=e[22];let D;e[23]!==t.label||e[24]!==h?(D=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,h,`.`]}),e[23]=t.label,e[24]=h,e[25]=D):D=e[25];let k;e[26]===l?k=e[27]:(k=l?(0,J.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:l}):null,e[26]=l,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(Et,{}),e[28]=A):A=e[28];let j;e[29]===p?j=e[30]:(j=()=>void p(),e[29]=p,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,J.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:j,children:[re,` All nodes`]}),e[32]=j,e[33]=M);let N;if(e[34]!==u||e[35]!==s||e[36]!==t.id||e[37]!==n||e[38]!==f){let r;e[40]===t.id?r=e[41]:(r=e=>e.id!==t.id,e[40]=t.id,e[41]=r);let i;e[42]!==u||e[43]!==s||e[44]!==f?(i=e=>(0,J.jsxs)(`button`,{type:`button`,disabled:s!==`ready`||u!==`current`||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,title:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:void 0,className:`flex w-full items-center justify-between rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onClick:()=>void f(e),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.label}),(0,J.jsx)(wt,{node:e})]},e.id),e[42]=u,e[43]=s,e[44]=f,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=u,e[35]=s,e[36]=t.id,e[37]=n,e[38]=f,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,J.jsxs)(`div`,{className:`mt-3 max-h-48 space-y-1 overflow-auto border-t border-border pt-3`,children:[M,N]}),e[46]=M,e[47]=N,e[48]=P):P=e[48];let F;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,onClick:Mt,children:[(0,J.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let I;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:jt,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=I):I=e[50];let L;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,I,(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:()=>{m.current&&(m.current.open=!1),Te({kind:`account`,section:`security`})},children:[(0,J.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=L):L=e[51];let R;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,J.jsx)(at,{}),(0,J.jsx)(vt,{compact:!0})]}),e[52]=R):R=e[52];let z;e[53]!==k||e[54]!==P||e[55]!==w||e[56]!==E||e[57]!==D?(z=(0,J.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[w,E,D,k,A,P,L,R]}),e[53]=k,e[54]=P,e[55]=w,e[56]=E,e[57]=D,e[58]=z):z=e[58];let B;return e[59]!==z||e[60]!==C?(B=(0,J.jsx)(`div`,{className:`relative max-w-full`,children:(0,J.jsxs)(`details`,{ref:m,className:`group relative`,children:[C,z]})}),e[59]=z,e[60]=C,e[61]=B):B=e[61],B}function jt(){v.signOut()}function Mt(){v.refreshDirectory()}function Nt(e){return e.browserStatus}function Pt(e){return e.errorMessage}function Ft(e){return e.effectiveRole}function It(e){return e.directoryStatus}function Lt(e){return e.selectionStatus}function Rt(e){return e.sessionStatus}function zt(e){return e.transportStatus}function Bt(e){return e.nodes}function Vt(e){return e.selectedNode}function Ht(e){let t=(0,G.c)(66),{open:n,onOpenChange:r}=e,i=o($t),a=o(Qt),s=o(Zt),c=o(Xt),l=o(Yt),u=o(Jt),d=o(qt),f=o(Kt),p=o(Gt),m=ie(),{switchNode:h,returnToAllNodes:g}=Tt();if(!i)return null;let _,v;if(t[0]!==p||t[1]!==m||t[2]!==l||t[3]!==c||t[4]!==s){let e={browserStatus:p,sessionStatus:c,selectionStatus:l,transportStatus:s,e2eeStatus:m};_=ae(e),v=oe(e),t[0]=p,t[1]=m,t[2]=l,t[3]=c,t[4]=s,t[5]=_,t[6]=v}else _=t[5],v=t[6];let y=v,b=u!==`ready`||p!==`current`,x;t[7]===y?x=t[8]:(x=(0,J.jsx)(Ct,{indicator:y,className:`size-4`}),t[7]=y,t[8]=x);let S;t[9]===i.label?S=t[10]:(S=(0,J.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=S);let C;t[11]!==x||t[12]!==S?(C=(0,J.jsxs)(M,{className:`flex items-center gap-2`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w=d??`Role unavailable`,T;t[14]!==_||t[15]!==w?(T=(0,J.jsxs)(re,{className:`capitalize`,children:[w,` · `,_]}),t[14]=_,t[15]=w,t[16]=T):T=t[16];let E;t[17]!==i.label||t[18]!==_?(E=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,_,`.`]}),t[17]=i.label,t[18]=_,t[19]=E):E=t[19];let D;t[20]!==C||t[21]!==T||t[22]!==E?(D=(0,J.jsxs)(j,{children:[C,T,E]}),t[20]=C,t[21]=T,t[22]=E,t[23]=D):D=t[23];let k;t[24]===f?k=t[25]:(k=f?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:f}):null,t[24]=f,t[25]=k);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Et,{}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=I):I=t[27];let L;t[28]===r?L=t[29]:(L=(0,J.jsx)(N,{label:`Security details`,icon:I,onClick:()=>{r(!1),Te({kind:`account`,section:`security`})}}),t[28]=r,t[29]=L);let R;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=R):R=t[30];let z;t[31]!==r||t[32]!==g?(z=(0,J.jsx)(N,{label:`All nodes`,icon:R,onClick:()=>{r(!1),g()}}),t[31]=r,t[32]=g,t[33]=z):z=t[33];let B;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==h||t[38]!==b){let e;t[40]===i.id?e=t[41]:(e=e=>e.id!==i.id,t[40]=i.id,t[41]=e);let n;t[42]!==r||t[43]!==h||t[44]!==b?(n=e=>(0,J.jsx)(N,{label:e.label,disabled:b||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,disabledReason:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:e.revokedAt===null?`Node switching is unavailable until the directory and this browser are current.`:`Access to this node was revoked.`,trailing:(0,J.jsx)(wt,{node:e}),onClick:()=>{r(!1),h(e)}},e.id),t[42]=r,t[43]=h,t[44]=b,t[45]=n):n=t[45],B=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=h,t[38]=b,t[39]=B}else B=t[39];let V;t[46]!==L||t[47]!==z||t[48]!==B?(V=(0,J.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[L,z,B]}),t[46]=L,t[47]=z,t[48]=B,t[49]=V):V=t[49];let se=u===`loading`,H;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(te,{"aria-hidden":!0}),t[50]=H):H=t[50];let U;t[51]===se?U=t[52]:(U=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:se,onClick:Wt,children:[H,` Refresh nodes`]}),t[51]=se,t[52]=U);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:Ut,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=W):W=t[53];let K;t[54]===U?K=t[55]:(K=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[U,W]}),t[54]=U,t[55]=K);let le;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,J.jsx)(vt,{compact:!0})}),t[56]=le):le=t[56];let q;t[57]!==V||t[58]!==K||t[59]!==k?(q=(0,J.jsxs)(A,{children:[k,F,V,K,le]}),t[57]=V,t[58]=K,t[59]=k,t[60]=q):q=t[60];let ue;return t[61]!==r||t[62]!==n||t[63]!==q||t[64]!==D?(ue=(0,J.jsxs)(P,{open:n,onOpenChange:r,label:`Connection`,children:[D,q]}),t[61]=r,t[62]=n,t[63]=q,t[64]=D,t[65]=ue):ue=t[65],ue}function Ut(){v.signOut()}function Wt(){v.refreshDirectory()}function Gt(e){return e.browserStatus}function Kt(e){return e.errorMessage}function qt(e){return e.effectiveRole}function Jt(e){return e.directoryStatus}function Yt(e){return e.selectionStatus}function Xt(e){return e.sessionStatus}function Zt(e){return e.transportStatus}function Qt(e){return e.nodes}function $t(e){return e.selectedNode}function en(){let e=(0,G.c)(25),t=o(on),n=o(an),r=o(rn),i=o(nn),a=o(tn),s=ie(),[c,l]=(0,K.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==s||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:s};u=ae(t),d=oe(t),e[0]=a,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=d}else u=e[5],d=e[6];let f=d,p;e[7]!==t.label||e[8]!==c||e[9]!==r||e[10]!==u?(p=c?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`hosted-connection-status-announcer`,className:`sr-only`,children:[`Node `,t.label,`: `,u,`.`]}),r===`delivery-unknown`?(0,J.jsx)(`span`,{role:`alert`,className:`sr-only`,children:`Delivery unknown: a request may or may not have reached the node. Open the connection controls to acknowledge.`}):null]}),e[7]=t.label,e[8]=c,e[9]=r,e[10]=u,e[11]=p):p=e[11];let m=`Connection: ${t.label}, ${u}`,h;e[12]===f?h=e[13]:(h=(0,J.jsx)(Ct,{indicator:f,testId:`hosted-connection-icon`,className:`size-3.5 shrink-0`}),e[12]=f,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(!0),e[14]=g):g=e[14];let _;e[15]!==f.shortLabel||e[16]!==m||e[17]!==h?(_=(0,J.jsx)(nt,{testId:`hosted-connection-pill`,label:m,status:f.shortLabel,icon:h,onClick:g}),e[15]=f.shortLabel,e[16]=m,e[17]=h,e[18]=_):_=e[18];let v;e[19]===c?v=e[20]:(v=(0,J.jsx)(Ht,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,J.jsxs)(J.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function tn(e){return e.browserStatus}function nn(e){return e.selectionStatus}function rn(e){return e.sessionStatus}function an(e){return e.transportStatus}function on(e){return e.selectedNode}function sn(){let e=(0,G.c)(2),t=k(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,J.jsx)(en,{}):(0,J.jsx)(At,{}),e[0]=t,e[1]=n),n}export{De as _,Tt as a,Le as c,et as d,Pe as f,Ee as g,Te as h,wt as i,Ze as l,me as m,en as n,vt as o,pe as p,At as r,_t as s,sn as t,Ne as u,U as v};
1
+ import{i as e,t}from"./react-SIfiwpqq.js";import{t as n}from"./compiler-runtime-qmuS0Svy.js";import{n as r}from"./env-B4arEvJg.js";import{Ir as i,Nr as a}from"./src-Vf4LVnMX.js";import{N as o}from"./runtime-CXut_g4p.js";import{It as s}from"./composerDraftStore-CdJJZe42.js";import{_ as c,d as l,f as u,h as d,l as f,m as p,p as m,r as h,v as g}from"./useHandleNewThread-DX2FtXcP.js";import{t as _}from"./useNavigate-2tVq4iZ2.js";import{o as v}from"./authorization-mIJKV2yp.js";import{f as y}from"./useRenderElement-DchFnsR8.js";import{t as b}from"./chevron-down-B7C6FKzM.js";import{t as x}from"./copy-UQjKGt7t.js";import{t as S}from"./download-CQZ-m4zW.js";import{t as ee}from"./log-out-tMJm0Gk6.js";import{t as te}from"./refresh-cw-DopCMrtR.js";import{t as C}from"./shield-check-dQ-4cMKk.js";import{t as w}from"./shield-IZEIJ8r7.js";import{t as T}from"./smartphone-gNe1ynB8.js";import{t as ne}from"./user-round-Cpzx8pSw.js";import{t as E}from"./x-C1Cemsov.js";import{t as D}from"./utils-BofFIn5Y.js";import{t as O}from"./button-BAbJxRzt.js";import{t as k}from"./usePresentationTier-B_SCFvN7.js";import{a as A,i as j,n as re,o as M,s as N,t as P}from"./MobileSheet-CkeG6_SP.js";import{t as F}from"./GlassSurface-C3IIWMu9.js";import{a as ie,c as ae,i as I,n as L,o as R,r as z,s as oe,t as B}from"./HostedRelayTrustNotice-BldMySVi.js";import{n as V,o as se}from"./settingsSections.logic-F8RXVmAq.js";var ce=y(`layout-grid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),H=y(`shield-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),U=y(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),W=y(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),G=n(),K=e(t(),1),le=Object.freeze({"":`overview`,security:`security`,appearance:`appearance`}),q=Object.freeze({"sign-in":`/sign-in`,"sign-in-password":`/sign-in/password`,"sign-in-recovery-code":`/sign-in/recovery-code`,"sign-up":`/sign-up`,"sign-up-verify":`/public-signup/verify`,"reset-password":`/password-reset`,invitation:`/invitation`,setup:`/setup`,"email-verification":`/email-verification`,nodes:`/nodes`,"nodes-enroll":`/nodes/enroll`}),ue=Object.freeze([`sign-in`,`sign-up`,`public-signup`,`password-reset`,`invitation`,`setup`,`email-verification`,`nodes`,`account`]);function de(e){return e.length>1&&e.endsWith(`/`)?e.slice(0,-1):e===``?`/`:e}function fe(e){let t=de(e);if(t.startsWith(`/account`))return{kind:`account`,section:le[t.slice(8).replace(/^\//,``)]??`overview`};for(let[e,n]of Object.entries(q))if(t===n)return{kind:e};return null}function pe(e){return e.kind===`account`?e.section===`overview`?`/account`:`/account/${e.section}`:q[e.kind]}function me(e){switch(e.kind){case`sign-in`:return`Sign in`;case`sign-in-password`:return`Sign in with a password`;case`sign-in-recovery-code`:return`Use a recovery code`;case`sign-up`:return`Create your account`;case`sign-up-verify`:return`Verify your email`;case`reset-password`:return`Reset your password`;case`invitation`:return`Redeem your invitation`;case`setup`:return`Claim this Hub`;case`email-verification`:return`Email verification`;case`nodes`:return`Your nodes`;case`nodes-enroll`:return`Enroll a node`;case`account`:return e.section===`overview`?`Account`:e.section===`security`?`Security`:`Appearance`}}var he=typeof window>`u`?`/`:de(window.location.pathname),ge=new Set;function _e(){for(let e of Array.from(ge))e()}function ve(e){let t=de(e);t!==he&&(he=t,_e())}var ye=!1;function be(){ye||(ye=!0,g(()=>{ve(d().logicalPathname)}))}function xe(){return p()===null?typeof window>`u`?he:de(window.location.pathname):he}var Se=!1;function Ce(){Se||typeof window>`u`||(Se=!0,window.addEventListener(`popstate`,()=>{p()===null&&_e()}))}function we(e){return be(),Ce(),ge.add(e),()=>{ge.delete(e)}}function Te(e,t){Ee(pe(e),t)}function Ee(e,t){let n=de(e),r=p();if(r){t?.replace===!0?r.replace(n):r.push(n),ve(n);return}typeof window<`u`&&(t?.replace===!0?window.history.replaceState(window.history.state,``,n):window.history.pushState(window.history.state,``,n)),he=n,_e()}function De(){let e=(0,G.c)(2),t=(0,K.useSyncExternalStore)(we,xe),n;return e[0]===t?n=e[1]:(n=fe(t),e[0]=t,e[1]=n),n}var J=s(),Oe={unavailable:`The node from this link is not in your authorized node directory. Choose a node to continue.`,revoked:`Access to the node from this link was revoked. Choose a node to continue.`,offline:`The node from this link is offline. Choose a node to continue.`,"invalid-link":`This node link is not valid. Choose a node to continue.`},ke=null,Ae=new Set;function Y(e){if(ke!==e){ke=e;for(let e of Array.from(Ae))e()}}function je(e){return Ae.add(e),()=>{Ae.delete(e)}}function Me(){return ke===null?null:Oe[ke]}function Ne(){return(0,K.useSyncExternalStore)(je,Me)}function Pe(){return(0,K.useSyncExternalStore)(g,d)}var Fe=new Set([`node`,`draft`,`pair`,`diagnostics`,...ue]);function Ie(e){let t=/^\/([^/]+)\/([^/]+)\/?$/.exec(e);if(!t)return null;let n=t[1]??``;if(Fe.has(n))return null;try{return decodeURIComponent(n)}catch{return n}}function Le(e){let t=/^\/([^/]+)\/([^/]+)\/?$/u.exec(e);if(!t||Fe.has(t[1]??``))return null;try{return{environmentId:a.make(decodeURIComponent(t[1]??``)),threadId:i.make(decodeURIComponent(t[2]??``))}}catch{return null}}function Re(e){return e.startsWith(`/draft/`)}var X=null,Z=null,Q=null,ze=!1,Be=null,Ve=0,He=!1,Ue=null,We=null;function $(e){let t=e?JSON.stringify([e.environmentId,e.threadId]):null;t!==Ue&&(We?.(),We=null,Ue=t,e&&(We=f(e.environmentId,e.threadId)))}function Ge(e){return e?JSON.stringify([e.environmentId,e.threadId]):null}function Ke(){He||(He=!0,queueMicrotask(()=>{He=!1,Ve!==0&&Ye()}))}function qe(e){ze=!0;try{e()}finally{ze=!1}Ke()}function Je(e,t){X=null,Z=null,Q=null,(e===`none`||e===`online`||e===`offline`)&&Y(t),u()}function Ye(){if(ze||!p())return;let e=d(),t=o.getState();if(e.malformed){Y(`invalid-link`),$(null),u();return}if(t.accountStatus!==`authenticated`){$(null),Be===`authenticated`&&Y(null),Be=t.accountStatus;return}Be=t.accountStatus;let n=e.nodeId;if(n===null){if(Q=null,$(null),X=null,Z=null,t.selectedNode&&!h()){let e=t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`;v.returnToDirectory(e?{preserveTerminalSelection:!0}:void 0);return}Xe(e.logicalPathname,t);return}let r=Le(e.logicalPathname);Ge(r)!==Ue&&$(null);let i=t.nodes.find(e=>e.id===n)??null;if(i&&(i.capabilities?.nativeClientRequired===!0||r&&i.environmentId!==r.environmentId)){$(null),Je(t.selectionStatus,`unavailable`);return}if(t.selectedNode?.id===n){if($(r),X=null,Q=null,t.sessionEstablished){Z=null,Y(null);return}if(Z===n&&t.transportStatus===`terminal-failure`&&(t.selectionStatus===`revoked`||t.selectionStatus===`authorization-removed`||t.selectionStatus===`incompatible`)){Z=null,qe(()=>{u(),v.returnToDirectory({preserveTerminalSelection:!0})});return}Z===n&&t.transportStatus===`terminal-failure`&&t.selectionStatus===`offline`&&t.errorMessage===`Ryco state could not be synchronized.`&&qe(()=>{Je(t.selectionStatus,`offline`),v.returnToDirectory()});return}if(t.directoryStatus===`stale`){Je(t.selectionStatus,`unavailable`);return}if(t.directoryStatus!==`ready`||t.browserStatus!==`current`)return;let a=t.nodes.find(e=>e.id===n);if(!a){Je(t.selectionStatus,`unavailable`);return}if(a.revokedAt!==null){Je(t.selectionStatus,`revoked`);return}let s=Q===n;$(r);let c=r!==null&&!a.presence.online&&!s;r&&h()&&!c||X!==n&&(X=n,Z=s?null:n,Q=null,Y(null),v.selectNode(a.id).finally(()=>{X===n&&(X=null)}))}function Xe(e,t){if(Re(e)){u();return}let n=Ie(e);if(n===null)return;if(t.directoryStatus===`stale`){Y(`unavailable`),u();return}if(t.directoryStatus!==`ready`)return;let r=t.nodes.find(e=>e.environmentId===n&&e.revokedAt===null);if(!r){Y(`unavailable`),u();return}l(r.id)}function Ze(e){return p()?(Q=e,Y(null),m(e)):!1}function Qe(){if(!p())return!1;Q=null,Y(null);let e=d();return e.nodeId===null&&e.logicalPathname===`/nodes`||c()}function $e(){Ve+=1;let e=g(Ke),t=o.subscribe(Ke),n=p()?.subscribe(()=>Ke());Ke();let r=!1;return()=>{r||(r=!0,--Ve,e(),t(),n?.())}}function et(){let e=(0,G.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,K.useEffect)(tt,t)}function tt(){return $e()}function nt(e){let t=(0,G.c)(11),{label:n,status:r,icon:i,onClick:a,testId:o,className:s}=e,c;t[0]===s?c=t[1]:(c=D(F(`chip`),`flex min-h-11 min-w-11 max-w-[136px] shrink items-center justify-center gap-1.5 rounded-full border border-border px-2.5 text-xs font-medium outline-none focus-visible:ring-2 focus-visible:ring-ring`,s),t[0]=s,t[1]=c);let l;t[2]===r?l=t[3]:(l=(0,J.jsx)(`span`,{"data-slot":`mobile-status-chip-status`,className:`min-w-0 truncate`,children:r}),t[2]=r,t[3]=l);let u;return t[4]!==i||t[5]!==n||t[6]!==a||t[7]!==c||t[8]!==l||t[9]!==o?(u=(0,J.jsxs)(`button`,{type:`button`,"aria-label":n,"data-slot":`mobile-status-chip`,"data-testid":o,className:c,onClick:a,children:[i,l]}),t[4]=i,t[5]=n,t[6]=a,t[7]=c,t[8]=l,t[9]=o,t[10]=u):u=t[10],u}var rt={legacy:{glyph:`legacy`,iconClassName:`text-amber-500`},web:{glyph:`browser-encrypted`,iconClassName:`text-sky-500`},e2ee:{glyph:`native-verified`,iconClassName:`text-emerald-500`}};function it(e){return e.guarantee===`none`?e.connected?{glyph:`connected`,iconClassName:`text-emerald-500`}:{glyph:`disconnected`,iconClassName:`text-amber-500`}:rt[e.guarantee]}function at(){let e=(0,G.c)(19),t=ie(),n=R(),i=o(ct),a=o(st),s=o(ot);if(t!==`web-unsigned`)return null;let c,l;e[0]!==n||e[1]!==a||e[2]!==i||e[3]!==s?(c=z(se(`security`,{hosted:r(),role:V(i,a,s)})),l=I(n,c),e[0]=n,e[1]=a,e[2]=i,e[3]=s,e[4]=c,e[5]=l):(c=e[4],l=e[5]);let u=l;if(!u){let t;return e[6]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`absent`,className:`space-y-2`,children:[(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-unavailable`,className:`text-[11px] leading-relaxed text-muted-foreground`,children:L})]}),e[6]=t):t=e[6],t}let d;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,J.jsx)(`p`,{className:`text-xs font-medium`,children:`Session code`}),e[7]=d):d=e[7];let f;e[8]===u.display?f=e[9]:(f=(0,J.jsx)(`p`,{"data-testid":`hosted-e2ee-verification-code`,className:`font-mono text-base leading-none font-semibold tracking-[0.2em] whitespace-nowrap select-all`,children:u.display}),e[8]=u.display,e[9]=f);let p;e[10]===u.display?p=e[11]:(p=()=>void navigator.clipboard.writeText(u.display),e[10]=u.display,e[11]=p);let m;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,J.jsx)(x,{"aria-hidden":!0,className:`size-3.5`}),e[12]=m):m=e[12];let h;e[13]===p?h=e[14]:(h=(0,J.jsxs)(`button`,{type:`button`,className:`inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground`,onClick:p,children:[m,` Copy`]}),e[13]=p,e[14]=h);let g;return e[15]!==c||e[16]!==f||e[17]!==h?(g=(0,J.jsxs)(`section`,{"aria-label":`Session code`,"data-testid":`hosted-e2ee-verification`,"data-code":`present`,"data-form":c,className:`space-y-2`,children:[d,f,h]}),e[15]=c,e[16]=f,e[17]=h,e[18]=g):g=e[18],g}function ot(e){return e.transportStatus}function st(e){return e.directoryStatus}function ct(e){return e.effectiveRole}var lt=`ryco:pwa:activate:v1`,ut=`Installation is temporarily unavailable.`,dt={errorMessage:null,installState:`hidden`,platform:`other`,registrationState:`disabled`,updateState:`idle`};function ft(e){return e===``||e===`./`?`./`:e.endsWith(`/`)?e:`${e}/`}function pt(e){let t=e.navigator.userAgent;return/iPad|iPhone|iPod/.test(t)||/Macintosh/.test(t)&&e.navigator.maxTouchPoints>1}function mt(e){let t=e;return typeof t.prompt==`function`&&t.userChoice instanceof Promise}function ht(e){let t=dt,n=!1,r=null,i=null,a=!!e.navigator.serviceWorker?.controller,o=!1,s=!1,c=new Set,l=e.window.matchMedia(`(display-mode: standalone)`),u=e=>{let n={...t,...e};Object.entries(n).every(([e,n])=>t[e]===n)||(t=n,c.forEach(e=>e()))},d=()=>l.matches||e.navigator.standalone===!0,f=()=>d()?`installed`:`manual-available`,p=e=>{!mt(e)||d()||(e.preventDefault(),r=e,u({installState:`native-available`}))},m=()=>{r=null,u({installState:`installed`})},h=()=>{d()?(r=null,u({installState:`installed`})):u({installState:r?`native-available`:`manual-available`})},g=()=>{let t=a;a=!!e.navigator.serviceWorker?.controller,!(o||!s&&!t)&&(s=!1,o=!0,e.window.reload())},_=t=>{i=t,t.waiting&&u({updateState:`ready`}),t.addEventListener(`updatefound`,()=>{let n=t.installing;n&&n.addEventListener(`statechange`,()=>{n.state===`installed`&&e.navigator.serviceWorker?.controller&&u({updateState:`ready`})})})},v=async()=>{let t=e.navigator.serviceWorker;if(!t){u({registrationState:`unavailable`,errorMessage:ut});return}u({registrationState:`registering`,errorMessage:null});try{let n=ft(e.baseUrl);_(await t.register(`${n}service-worker.js`,{scope:n})),u({registrationState:`ready`,errorMessage:null})}catch{u({registrationState:`unavailable`,errorMessage:ut})}};return{activateUpdate(){let e=i?.waiting;!e||t.updateState!==`ready`||(s=!0,u({updateState:`activating`}),e.postMessage({type:lt}))},dismissInstall(){r=null,u({installState:d()?`installed`:`hidden`})},getSnapshot(){return t},async promptInstall(){let e=r;e&&(r=null,u({installState:`hidden`}),await e.prompt(),(await e.userChoice).outcome===`dismissed`&&!d()&&u({installState:`manual-available`}))},async start(t){n||(n=!0,t.enabled&&(a=!!e.navigator.serviceWorker?.controller,o=!1,u({installState:f(),platform:pt(e)?`ios`:`other`}),e.window.addEventListener(`beforeinstallprompt`,p),e.window.addEventListener(`appinstalled`,m),l.addEventListener(`change`,h),e.navigator.serviceWorker?.addEventListener(`controllerchange`,g),e.document.readyState===`complete`?await v():e.window.addEventListener(`load`,()=>void v(),{once:!0})))},stop(){n&&(n=!1,r=null,i=null,a=!1,o=!1,s=!1,e.window.removeEventListener(`beforeinstallprompt`,p),e.window.removeEventListener(`appinstalled`,m),l.removeEventListener(`change`,h),e.navigator.serviceWorker?.removeEventListener(`controllerchange`,g),t=dt,c.forEach(e=>e()))},subscribe(e){return c.add(e),()=>c.delete(e)}}}function gt(){let e=navigator;return{baseUrl:`/`,document,navigator:{maxTouchPoints:e.maxTouchPoints,userAgent:e.userAgent,...e.serviceWorker?{serviceWorker:e.serviceWorker}:{},...typeof e.standalone==`boolean`?{standalone:e.standalone}:{}},window:{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),matchMedia:window.matchMedia.bind(window),reload:()=>window.location.reload()}}}var _t=typeof window>`u`?null:ht(gt());function vt(e){let t=(0,G.c)(3),{compact:n,lifecycle:r}=e,i=n!==void 0&&n,a=r===void 0?_t:r,o;return t[0]!==i||t[1]!==a?(o=a?(0,J.jsx)(yt,{compact:i,lifecycle:a}):null,t[0]=i,t[1]=a,t[2]=o):o=t[2],o}function yt(e){let t=(0,G.c)(27),{compact:n,lifecycle:r}=e,i=(0,K.useSyncExternalStore)(r.subscribe,r.getSnapshot,r.getSnapshot),[a,o]=(0,K.useState)(!1);if(i.installState!==`native-available`&&i.installState!==`manual-available`&&i.updateState===`idle`&&i.registrationState!==`unavailable`)return null;let s=n?`space-y-2`:`mt-4 space-y-3`,c;t[0]!==n||t[1]!==r||t[2]!==i.installState?(c=i.installState===`native-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,onClick:()=>void r.promptInstall(),children:[(0,J.jsx)(S,{"aria-hidden":!0}),` Install Ryco`]}):null,t[0]=n,t[1]=r,t[2]=i.installState,t[3]=c):c=t[3];let l;t[4]!==n||t[5]!==a||t[6]!==i.installState?(l=i.installState===`manual-available`?(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,"aria-expanded":a,onClick:()=>o(bt),children:[(0,J.jsx)(T,{"aria-hidden":!0}),` How to install`]}):null,t[4]=n,t[5]=a,t[6]=i.installState,t[7]=l):l=t[7];let u;t[8]!==n||t[9]!==r||t[10]!==i.updateState?(u=i.updateState===`idle`?null:(0,J.jsxs)(O,{className:`min-h-11`,size:n?`sm`:`default`,variant:`outline`,disabled:i.updateState===`activating`,onClick:()=>r.activateUpdate(),children:[(0,J.jsx)(te,{"aria-hidden":!0}),i.updateState===`activating`?`Updating…`:`Update ready`]}),t[8]=n,t[9]=r,t[10]=i.updateState,t[11]=u):u=t[11];let d;t[12]!==c||t[13]!==l||t[14]!==u?(d=(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[c,l,u]}),t[12]=c,t[13]=l,t[14]=u,t[15]=d):d=t[15];let f;t[16]!==a||t[17]!==i?(f=a?(0,J.jsx)(xt,{snapshot:i,onClose:()=>o(!1)}):null,t[16]=a,t[17]=i,t[18]=f):f=t[18];let p;t[19]!==i.errorMessage||t[20]!==i.registrationState?(p=i.registrationState===`unavailable`&&i.errorMessage?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:i.errorMessage}):null,t[19]=i.errorMessage,t[20]=i.registrationState,t[21]=p):p=t[21];let m;return t[22]!==s||t[23]!==d||t[24]!==f||t[25]!==p?(m=(0,J.jsxs)(`section`,{className:s,"aria-label":`Ryco app installation`,children:[d,f,p]}),t[22]=s,t[23]=d,t[24]=f,t[25]=p,t[26]=m):m=t[26],m}function bt(e){return!e}function xt(e){let t=(0,G.c)(13),{snapshot:n,onClose:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,J.jsx)(`p`,{className:`font-medium`,children:`Install Ryco on this device`}),t[0]=i):i=t[0];let a;t[1]===n.platform?a=t[2]:(a=(0,J.jsxs)(`div`,{children:[i,n.platform===`ios`?(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`In Safari, open the Share or browser menu, choose Add to Home Screen, enable Open as Web App when offered, then tap Add.`}):(0,J.jsx)(`p`,{className:`mt-1 text-xs leading-relaxed text-muted-foreground`,children:`Open the browser menu, choose Add to home screen or Install app, then confirm Install.`})]}),t[1]=n.platform,t[2]=a);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,J.jsx)(E,{"aria-hidden":!0}),t[3]=o):o=t[3];let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,J.jsx)(`span`,{className:`sr-only`,children:`Close install instructions`}),t[4]=s):s=t[4];let c;t[5]===r?c=t[6]:(c=(0,J.jsxs)(O,{className:`size-11 shrink-0`,size:`icon`,variant:`ghost`,onClick:r,children:[o,` `,s]}),t[5]=r,t[6]=c);let l;t[7]!==a||t[8]!==c?(l=(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[a,c]}),t[7]=a,t[8]=c,t[9]=l):l=t[9];let u;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,J.jsx)(`div`,{className:`mt-3 border-t border-border pt-3`,children:(0,J.jsx)(B,{compact:!0})}),t[10]=u):u=t[10];let d;return t[11]===l?d=t[12]:(d=(0,J.jsxs)(`div`,{role:`region`,"aria-label":`Install Ryco instructions`,className:`rounded-lg border border-border bg-background p-3 text-sm`,children:[l,u]}),t[11]=l,t[12]=d),d}var St={connected:W,disconnected:U,legacy:H,"browser-encrypted":w,"native-verified":C};function Ct(e){let t=(0,G.c)(9),{indicator:n,className:r,testId:i}=e,a;t[0]===n?a=t[1]:(a=it(n),t[0]=n,t[1]=a);let{glyph:o,iconClassName:s}=a,c=St[o],l=String(n.connected),u=`${r} ${s}`,d;return t[2]!==c||t[3]!==o||t[4]!==n.guarantee||t[5]!==l||t[6]!==u||t[7]!==i?(d=(0,J.jsx)(c,{"aria-hidden":!0,"data-testid":i,"data-connected":l,"data-guarantee":n.guarantee,"data-glyph":o,className:u}),t[2]=c,t[3]=o,t[4]=n.guarantee,t[5]=l,t[6]=u,t[7]=i,t[8]=d):d=t[8],d}function wt(e){let t=(0,G.c)(3),{node:n}=e;if(n.revokedAt){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,J.jsx)(`span`,{className:`text-xs text-destructive`,children:`Revoked`}),t[0]=e):e=t[0],e}let r;return t[1]===n.presence.online?r=t[2]:(r=n.presence.online?(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400`,children:[(0,J.jsx)(W,{"aria-hidden":!0,className:`size-3.5`}),` Online`]}):(0,J.jsxs)(`span`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,J.jsx)(U,{"aria-hidden":!0,className:`size-3.5`}),` Offline`]}),t[1]=n.presence.online,t[2]=r),r}function Tt(){let e=(0,G.c)(7),t=_(),n;e[0]===t?n=e[1]:(n=async e=>{Ze(e.id)||(await t({to:`/`,replace:!0}),await v.selectNode(e.id))},e[0]=t,e[1]=n);let r=n,i;e[2]===t?i=e[3]:(i=async()=>{Qe()||(await t({to:`/`,replace:!0}),await v.returnToDirectory())},e[2]=t,e[3]=i);let a=i,o;return e[4]!==a||e[5]!==r?(o={switchNode:r,returnToAllNodes:a},e[4]=a,e[5]=r,e[6]=o):o=e[6],o}function Et(){let e=(0,G.c)(5),t=o(kt),n=o(Ot);if(t!==`delivery-unknown`)return null;let r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,J.jsx)(`p`,{children:`A request may or may not have reached the node. Ryco did not resend it automatically.`}),e[0]=r):r=e[0];let i=!n,a=n?void 0:`Wait for session replay to finish before acknowledging this warning.`,s=n?`Acknowledge`:`Synchronizing…`,c;return e[1]!==i||e[2]!==a||e[3]!==s?(c=(0,J.jsxs)(`div`,{role:`alert`,className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-2 text-xs`,children:[r,(0,J.jsx)(O,{className:`mt-2`,size:`sm`,variant:`outline`,disabled:i,title:a,onClick:Dt,children:s})]}),e[1]=i,e[2]=a,e[3]=s,e[4]=c):c=e[4],c}function Dt(){return v.acknowledgeDeliveryUnknown()}function Ot(e){return e.sessionRecoveredAfterUnknown}function kt(e){return e.sessionStatus}function At(){let e=(0,G.c)(62),t=o(Vt),n=o(Bt),r=o(zt),i=o(Rt),a=o(Lt),s=o(It),c=o(Ft),l=o(Pt),u=o(Nt),d=ie(),{switchNode:f,returnToAllNodes:p}=Tt(),m=(0,K.useRef)(null);if(!t)return null;let h,g;if(e[0]!==u||e[1]!==d||e[2]!==a||e[3]!==i||e[4]!==r){let t={browserStatus:u,sessionStatus:i,selectionStatus:a,transportStatus:r,e2eeStatus:d};h=ae(t),g=oe(t),e[0]=u,e[1]=d,e[2]=a,e[3]=i,e[4]=r,e[5]=h,e[6]=g}else h=e[5],g=e[6];let _=g,v;e[7]===_?v=e[8]:(v=(0,J.jsx)(Ct,{indicator:_,className:`size-4`}),e[7]=_,e[8]=v);let y;e[9]===t.label?y=e[10]:(y=(0,J.jsx)(`span`,{className:`max-w-32 truncate font-medium`,children:t.label}),e[9]=t.label,e[10]=y);let x;e[11]===h?x=e[12]:(x=(0,J.jsx)(`span`,{className:`max-w-24 truncate text-xs text-muted-foreground`,children:h}),e[11]=h,e[12]=x);let S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,J.jsx)(b,{"aria-hidden":!0,className:`size-3.5 transition-transform group-open:rotate-180`}),e[13]=S):S=e[13];let C;e[14]!==v||e[15]!==y||e[16]!==x?(C=(0,J.jsxs)(`summary`,{className:`flex cursor-pointer list-none items-center gap-2 rounded-lg border border-border bg-card/95 px-3 py-2 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring`,children:[v,y,x,S]}),e[14]=v,e[15]=y,e[16]=x,e[17]=C):C=e[17];let w;e[18]===t.label?w=e[19]:(w=(0,J.jsx)(`p`,{className:`font-medium`,children:t.label}),e[18]=t.label,e[19]=w);let T=c??`Role unavailable`,E;e[20]!==h||e[21]!==T?(E=(0,J.jsxs)(`p`,{className:`mt-0.5 text-xs capitalize text-muted-foreground`,children:[T,` · `,h]}),e[20]=h,e[21]=T,e[22]=E):E=e[22];let D;e[23]!==t.label||e[24]!==h?(D=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,t.label,`: `,h,`.`]}),e[23]=t.label,e[24]=h,e[25]=D):D=e[25];let k;e[26]===l?k=e[27]:(k=l?(0,J.jsx)(`p`,{role:`status`,className:`mt-2 text-xs text-muted-foreground`,children:l}):null,e[26]=l,e[27]=k);let A;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,J.jsx)(Et,{}),e[28]=A):A=e[28];let j;e[29]===p?j=e[30]:(j=()=>void p(),e[29]=p,e[30]=j);let re;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4`}),e[31]=re):re=e[31];let M;e[32]===j?M=e[33]:(M=(0,J.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:j,children:[re,` All nodes`]}),e[32]=j,e[33]=M);let N;if(e[34]!==u||e[35]!==s||e[36]!==t.id||e[37]!==n||e[38]!==f){let r;e[40]===t.id?r=e[41]:(r=e=>e.id!==t.id,e[40]=t.id,e[41]=r);let i;e[42]!==u||e[43]!==s||e[44]!==f?(i=e=>(0,J.jsxs)(`button`,{type:`button`,disabled:s!==`ready`||u!==`current`||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,title:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:void 0,className:`flex w-full items-center justify-between rounded-md px-2 py-2 text-left text-sm hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,onClick:()=>void f(e),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.label}),(0,J.jsx)(wt,{node:e})]},e.id),e[42]=u,e[43]=s,e[44]=f,e[45]=i):i=e[45],N=n.filter(r).map(i),e[34]=u,e[35]=s,e[36]=t.id,e[37]=n,e[38]=f,e[39]=N}else N=e[39];let P;e[46]!==M||e[47]!==N?(P=(0,J.jsxs)(`div`,{className:`mt-3 max-h-48 space-y-1 overflow-auto border-t border-border pt-3`,children:[M,N]}),e[46]=M,e[47]=N,e[48]=P):P=e[48];let F;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,onClick:Mt,children:[(0,J.jsx)(te,{"aria-hidden":!0}),` Refresh`]}),e[49]=F):F=e[49];let I;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:jt,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),e[50]=I):I=e[50];let L;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[F,I,(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,onClick:()=>{m.current&&(m.current.open=!1),Te({kind:`account`,section:`security`})},children:[(0,J.jsx)(ne,{"aria-hidden":!0}),` Security details`]})]}),e[51]=L):L=e[51];let R;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsxs)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:[(0,J.jsx)(at,{}),(0,J.jsx)(vt,{compact:!0})]}),e[52]=R):R=e[52];let z;e[53]!==k||e[54]!==P||e[55]!==w||e[56]!==E||e[57]!==D?(z=(0,J.jsxs)(`div`,{className:`absolute right-0 z-50 mt-2 w-72 rounded-xl border border-border bg-popover p-3 shadow-xl`,children:[w,E,D,k,A,P,L,R]}),e[53]=k,e[54]=P,e[55]=w,e[56]=E,e[57]=D,e[58]=z):z=e[58];let B;return e[59]!==z||e[60]!==C?(B=(0,J.jsx)(`div`,{className:`relative max-w-full`,children:(0,J.jsxs)(`details`,{ref:m,className:`group relative`,children:[C,z]})}),e[59]=z,e[60]=C,e[61]=B):B=e[61],B}function jt(){v.signOut()}function Mt(){v.refreshDirectory()}function Nt(e){return e.browserStatus}function Pt(e){return e.errorMessage}function Ft(e){return e.effectiveRole}function It(e){return e.directoryStatus}function Lt(e){return e.selectionStatus}function Rt(e){return e.sessionStatus}function zt(e){return e.transportStatus}function Bt(e){return e.nodes}function Vt(e){return e.selectedNode}function Ht(e){let t=(0,G.c)(66),{open:n,onOpenChange:r}=e,i=o($t),a=o(Qt),s=o(Zt),c=o(Xt),l=o(Yt),u=o(Jt),d=o(qt),f=o(Kt),p=o(Gt),m=ie(),{switchNode:h,returnToAllNodes:g}=Tt();if(!i)return null;let _,v;if(t[0]!==p||t[1]!==m||t[2]!==l||t[3]!==c||t[4]!==s){let e={browserStatus:p,sessionStatus:c,selectionStatus:l,transportStatus:s,e2eeStatus:m};_=ae(e),v=oe(e),t[0]=p,t[1]=m,t[2]=l,t[3]=c,t[4]=s,t[5]=_,t[6]=v}else _=t[5],v=t[6];let y=v,b=u!==`ready`||p!==`current`,x;t[7]===y?x=t[8]:(x=(0,J.jsx)(Ct,{indicator:y,className:`size-4`}),t[7]=y,t[8]=x);let S;t[9]===i.label?S=t[10]:(S=(0,J.jsx)(`span`,{className:`truncate`,children:i.label}),t[9]=i.label,t[10]=S);let C;t[11]!==x||t[12]!==S?(C=(0,J.jsxs)(M,{className:`flex items-center gap-2`,children:[x,S]}),t[11]=x,t[12]=S,t[13]=C):C=t[13];let w=d??`Role unavailable`,T;t[14]!==_||t[15]!==w?(T=(0,J.jsxs)(re,{className:`capitalize`,children:[w,` · `,_]}),t[14]=_,t[15]=w,t[16]=T):T=t[16];let E;t[17]!==i.label||t[18]!==_?(E=(0,J.jsxs)(`p`,{className:`sr-only`,"aria-live":`polite`,children:[`Node `,i.label,`: `,_,`.`]}),t[17]=i.label,t[18]=_,t[19]=E):E=t[19];let D;t[20]!==C||t[21]!==T||t[22]!==E?(D=(0,J.jsxs)(j,{children:[C,T,E]}),t[20]=C,t[21]=T,t[22]=E,t[23]=D):D=t[23];let k;t[24]===f?k=t[25]:(k=f?(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:f}):null,t[24]=f,t[25]=k);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,J.jsx)(Et,{}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,J.jsx)(ne,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[27]=I):I=t[27];let L;t[28]===r?L=t[29]:(L=(0,J.jsx)(N,{label:`Security details`,icon:I,onClick:()=>{r(!1),Te({kind:`account`,section:`security`})}}),t[28]=r,t[29]=L);let R;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,J.jsx)(ce,{"aria-hidden":!0,className:`size-4 shrink-0`}),t[30]=R):R=t[30];let z;t[31]!==r||t[32]!==g?(z=(0,J.jsx)(N,{label:`All nodes`,icon:R,onClick:()=>{r(!1),g()}}),t[31]=r,t[32]=g,t[33]=z):z=t[33];let B;if(t[34]!==i.id||t[35]!==a||t[36]!==r||t[37]!==h||t[38]!==b){let e;t[40]===i.id?e=t[41]:(e=e=>e.id!==i.id,t[40]=i.id,t[41]=e);let n;t[42]!==r||t[43]!==h||t[44]!==b?(n=e=>(0,J.jsx)(N,{label:e.label,disabled:b||e.revokedAt!==null||e.capabilities?.nativeClientRequired===!0,disabledReason:e.capabilities?.nativeClientRequired===!0?`Open in Desktop/Mobile`:e.revokedAt===null?`Node switching is unavailable until the directory and this browser are current.`:`Access to this node was revoked.`,trailing:(0,J.jsx)(wt,{node:e}),onClick:()=>{r(!1),h(e)}},e.id),t[42]=r,t[43]=h,t[44]=b,t[45]=n):n=t[45],B=a.filter(e).map(n),t[34]=i.id,t[35]=a,t[36]=r,t[37]=h,t[38]=b,t[39]=B}else B=t[39];let V;t[46]!==L||t[47]!==z||t[48]!==B?(V=(0,J.jsxs)(`div`,{className:`mt-3 space-y-1 border-t border-border pt-3`,children:[L,z,B]}),t[46]=L,t[47]=z,t[48]=B,t[49]=V):V=t[49];let se=u===`loading`,H;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,J.jsx)(te,{"aria-hidden":!0}),t[50]=H):H=t[50];let U;t[51]===se?U=t[52]:(U=(0,J.jsxs)(O,{size:`sm`,variant:`outline`,className:`min-h-11`,disabled:se,onClick:Wt,children:[H,` Refresh nodes`]}),t[51]=se,t[52]=U);let W;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,J.jsxs)(O,{size:`sm`,variant:`ghost`,className:`min-h-11`,onClick:Ut,children:[(0,J.jsx)(ee,{"aria-hidden":!0}),` Sign out`]}),t[53]=W):W=t[53];let K;t[54]===U?K=t[55]:(K=(0,J.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2 border-t border-border pt-3`,children:[U,W]}),t[54]=U,t[55]=K);let le;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,J.jsx)(`div`,{className:`mt-3 space-y-3 border-t border-border pt-3`,children:(0,J.jsx)(vt,{compact:!0})}),t[56]=le):le=t[56];let q;t[57]!==V||t[58]!==K||t[59]!==k?(q=(0,J.jsxs)(A,{children:[k,F,V,K,le]}),t[57]=V,t[58]=K,t[59]=k,t[60]=q):q=t[60];let ue;return t[61]!==r||t[62]!==n||t[63]!==q||t[64]!==D?(ue=(0,J.jsxs)(P,{open:n,onOpenChange:r,label:`Connection`,children:[D,q]}),t[61]=r,t[62]=n,t[63]=q,t[64]=D,t[65]=ue):ue=t[65],ue}function Ut(){v.signOut()}function Wt(){v.refreshDirectory()}function Gt(e){return e.browserStatus}function Kt(e){return e.errorMessage}function qt(e){return e.effectiveRole}function Jt(e){return e.directoryStatus}function Yt(e){return e.selectionStatus}function Xt(e){return e.sessionStatus}function Zt(e){return e.transportStatus}function Qt(e){return e.nodes}function $t(e){return e.selectedNode}function en(){let e=(0,G.c)(25),t=o(on),n=o(an),r=o(rn),i=o(nn),a=o(tn),s=ie(),[c,l]=(0,K.useState)(!1);if(!t)return null;let u,d;if(e[0]!==a||e[1]!==s||e[2]!==i||e[3]!==r||e[4]!==n){let t={browserStatus:a,sessionStatus:r,selectionStatus:i,transportStatus:n,e2eeStatus:s};u=ae(t),d=oe(t),e[0]=a,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=u,e[6]=d}else u=e[5],d=e[6];let f=d,p;e[7]!==t.label||e[8]!==c||e[9]!==r||e[10]!==u?(p=c?null:(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`span`,{role:`status`,"aria-live":`polite`,"data-testid":`hosted-connection-status-announcer`,className:`sr-only`,children:[`Node `,t.label,`: `,u,`.`]}),r===`delivery-unknown`?(0,J.jsx)(`span`,{role:`alert`,className:`sr-only`,children:`Delivery unknown: a request may or may not have reached the node. Open the connection controls to acknowledge.`}):null]}),e[7]=t.label,e[8]=c,e[9]=r,e[10]=u,e[11]=p):p=e[11];let m=`Connection: ${t.label}, ${u}`,h;e[12]===f?h=e[13]:(h=(0,J.jsx)(Ct,{indicator:f,testId:`hosted-connection-icon`,className:`size-3.5 shrink-0`}),e[12]=f,e[13]=h);let g;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>l(!0),e[14]=g):g=e[14];let _;e[15]!==f.shortLabel||e[16]!==m||e[17]!==h?(_=(0,J.jsx)(nt,{testId:`hosted-connection-pill`,label:m,status:f.shortLabel,icon:h,onClick:g}),e[15]=f.shortLabel,e[16]=m,e[17]=h,e[18]=_):_=e[18];let v;e[19]===c?v=e[20]:(v=(0,J.jsx)(Ht,{open:c,onOpenChange:l}),e[19]=c,e[20]=v);let y;return e[21]!==p||e[22]!==_||e[23]!==v?(y=(0,J.jsxs)(J.Fragment,{children:[p,_,v]}),e[21]=p,e[22]=_,e[23]=v,e[24]=y):y=e[24],y}function tn(e){return e.browserStatus}function nn(e){return e.selectionStatus}function rn(e){return e.sessionStatus}function an(e){return e.transportStatus}function on(e){return e.selectedNode}function sn(){let e=(0,G.c)(2),t=k(),n;return e[0]===t?n=e[1]:(n=t===`phone`?(0,J.jsx)(en,{}):(0,J.jsx)(At,{}),e[0]=t,e[1]=n),n}export{De as _,Tt as a,Le as c,et as d,Pe as f,Ee as g,Te as h,wt as i,Ze as l,me as m,en as n,vt as o,pe as p,At as r,_t as s,sn as t,Ne as u,U as v};