ryco-cli 0.1.22 → 0.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ClaudeDriver-D7NatUx6.cjs → ClaudeDriver-B7mbf51W.cjs} +1 -1
- package/dist/{ClaudeDriver-D65SPdHR.mjs → ClaudeDriver-C4yu7Jit.mjs} +1 -1
- package/dist/{CodexDriver-DWGtHt9r.cjs → CodexDriver-CR0S17Lb.cjs} +2 -2
- package/dist/{CodexDriver-D4z5-wUD.mjs → CodexDriver-DnnqkGoY.mjs} +2 -2
- package/dist/{CodexTextGeneration-BikHow8k.mjs → CodexTextGeneration-Cw-FZbSS.mjs} +1 -1
- package/dist/{CodexTextGeneration-B4tJTUDo.cjs → CodexTextGeneration-tlfe1S5W.cjs} +1 -1
- package/dist/{CopilotDriver-ZvvsAIkd.mjs → CopilotDriver-GxKLX5pL.mjs} +2 -2
- package/dist/{CopilotDriver-DJvYncGI.cjs → CopilotDriver-IBd27Ji2.cjs} +2 -2
- package/dist/{CursorDriver-D3I4KULs.cjs → CursorDriver-C4Enoe9N.cjs} +1 -1
- package/dist/{CursorDriver-B1QSBzuH.mjs → CursorDriver-CNo9Uzo8.mjs} +1 -1
- package/dist/{GrokDriver-DgQe3pKz.mjs → GrokDriver-DSPEmiwq.mjs} +1 -1
- package/dist/{GrokDriver-_puXDTU3.cjs → GrokDriver-RyyFeh_q.cjs} +1 -1
- package/dist/{Metrics-DIjMQ5pa.cjs → Metrics-Bcb9vCAe.cjs} +21 -15
- package/dist/{Metrics-BP9YjxZB.mjs → Metrics-a1h4iBQi.mjs} +21 -15
- package/dist/{OpenCodeDriver-DNUlF8M-.mjs → OpenCodeDriver-0q44rSQX.mjs} +1 -1
- package/dist/{OpenCodeDriver-401RexI0.cjs → OpenCodeDriver-CDcvPT9v.cjs} +1 -1
- package/dist/bin.cjs +337 -123
- package/dist/bin.mjs +339 -125
- package/dist/client/assets/AccountSettings-ApnDA1f-.js +1 -0
- package/dist/client/assets/AiFocusSettings-CNmGHEcA.js +1 -0
- package/dist/client/assets/{AnimatedHeight-DKCe4x_Q.js → AnimatedHeight-i0YhvlGD.js} +1 -1
- package/dist/client/assets/AppearanceSettings-BG8W4DP0.js +1 -0
- package/dist/client/assets/BranchToolbar.logic-AgPy06Mx.js +1 -0
- package/dist/client/assets/BrowserPanel-BWztlNuL.js +1 -0
- package/dist/client/assets/ChatRightPanel-a6UOHNMm.js +194 -0
- package/dist/client/assets/ChatThreadRouteView-CWoBLzR_.js +1 -0
- package/dist/client/assets/CommandPaletteDialog-B2iKWCUi.js +1 -0
- package/dist/client/assets/CompositeRoot-C1G-Ejus.js +1 -0
- package/dist/client/assets/ComputerUseSettings-CPwWoHWj.js +1 -0
- package/dist/client/assets/ConnectionsSettings-CPMkuxza.js +7 -0
- package/dist/client/assets/ContextHandoffEndpointLabel-BildLLDY.js +4 -0
- package/dist/client/assets/DiagnosticsSettings-DvnNz2AZ.js +2 -0
- package/dist/client/assets/DialogHandle-8o3kfoiI.js +1 -0
- package/dist/client/assets/DialogPopup-CLw6NCkW.js +1 -0
- package/dist/client/assets/DialogRoot-SKkIuQHA.js +1 -0
- package/dist/client/assets/DialogTitle-DCHX74Tz.js +1 -0
- package/dist/client/assets/DialogTrigger-Bl_fcIV2.js +1 -0
- package/dist/client/assets/DialogViewport-DVDl03yd.js +1 -0
- package/dist/client/assets/DraftChatThreadRouteView-CEDYjbKq.js +1 -0
- package/dist/client/assets/{ExternalIdentityWeb.logic-CGJKCFPo.js → ExternalIdentityWeb.logic-arHvT6AX.js} +1 -1
- package/dist/client/assets/GlassSurface-GY6owikG.js +1 -0
- package/dist/client/assets/HostedConnectionControls-COUhSe9x.js +1 -0
- package/dist/client/assets/HostedHubRoot-BTWc0XoQ.js +2 -0
- package/dist/client/assets/HostedNativeAuthorizationRoute-DZhYxv--.js +2 -0
- package/dist/client/assets/HostedRelayTrustNotice-Bl6On0Yi.js +1 -0
- package/dist/client/assets/IntegrationsSettingsPanel-n9owMZf-.js +2 -0
- package/dist/client/assets/KeybindingsSettings-CPtXx-W2.js +7 -0
- package/dist/client/assets/LazyBrowserPanel-SUIBB7B4.js +2 -0
- package/dist/client/assets/McpServersSettings-BWIUud0Z.js +6 -0
- package/dist/client/assets/MobileSheet-NTayGHF6.js +1 -0
- package/dist/client/assets/NodeSecuritySettings-BFifrshE.js +1 -0
- package/dist/client/assets/OpinionatedPluginsSettings-D7WuuNWZ.js +1 -0
- package/dist/client/assets/PhoneGetAppInterstitial-R0cqI17q.js +1 -0
- package/dist/client/assets/PhoneHome-FqWvnJP_.js +1 -0
- package/dist/client/assets/PhoneSettingsSurface-w5PJnoBc.js +2 -0
- package/dist/client/assets/ProviderModelPicker-dwWhl7Uf.js +1 -0
- package/dist/client/assets/ProvidersSettingsPanel-Ww1ch3xA.js +1 -0
- package/dist/client/assets/QuitShortcutFeedback-CklL3jMd.js +1 -0
- package/dist/client/assets/RedactedSensitiveText-CLPBtvH1.js +1 -0
- package/dist/client/assets/RootAppShell-BdQCs2XJ.js +7 -0
- package/dist/client/assets/Separator-CpYBhf-I.js +1 -0
- package/dist/client/assets/SettingsDialog-DeMzEeCP.js +2 -0
- package/dist/client/assets/SettingsPanels-ZxNz9ZfL.js +3 -0
- package/dist/client/assets/SettingsPanels.editor-9pSZP875.js +1 -0
- package/dist/client/assets/SourceControlSettings-C1F3Brcn.js +1 -0
- package/dist/client/assets/StatisticsPage-C7v-6CTr.js +1 -0
- package/dist/client/assets/StatisticsPanel-CeIjiBm8.js +1 -0
- package/dist/client/assets/StatisticsSettingsLink-5s_violW.js +1 -0
- package/dist/client/assets/ThreadTerminalDrawer-CHZ60lPI.js +18 -0
- package/dist/client/assets/ThreadWorkspacePanel-Ct5kMcuY.js +2073 -0
- package/dist/client/assets/actionscript-3-Cs6JJXT5.js +1 -0
- package/dist/client/assets/activity-BMBx2Fu0.js +1 -0
- package/dist/client/assets/ahk-CA9gdOdF.js +1 -0
- package/dist/client/assets/ahk2-_6rzW9BS.js +1 -0
- package/dist/client/assets/alert-CXnC_RJc.js +1 -0
- package/dist/client/assets/apex-KFGFyKwG.js +1 -0
- package/dist/client/assets/{appChrome-CJauXpqv.js → appChrome-BzM66lXM.js} +1 -1
- package/dist/client/assets/appearancePreferences-nFx4MHoI.js +1 -0
- package/dist/client/assets/arrow-left-CymyVbCi.js +1 -0
- package/dist/client/assets/arrow-right-9wyq4YVq.js +1 -0
- package/dist/client/assets/arrow-up-right-mfU38K6p.js +1 -0
- package/dist/client/assets/asciidoc-SCjQUq34.js +1 -0
- package/dist/client/assets/authorization-CjOFkg7b.js +1 -0
- package/dist/client/assets/badge-Dg7mXiOh.js +1 -0
- package/dist/client/assets/{bat-Bo4NYOV-.js → bat-qdxAdBWQ.js} +1 -1
- package/dist/client/assets/bird2-CYIUgYqB.js +1 -0
- package/dist/client/assets/bot-BR3RyOWP.js +1 -0
- package/dist/client/assets/bsl-_VjlB9mv.js +1 -0
- package/dist/client/assets/c3-D0apG41V.js +1 -0
- package/dist/client/assets/{capabilities-D6bsjqkj.js → capabilities-C8sxDbKT.js} +1 -1
- package/dist/client/assets/chapel-B4wvmE90.js +1 -0
- package/dist/client/assets/chart-column-CcRi3pAd.js +1 -0
- package/dist/client/assets/chevron-right-CuUjBsQV.js +1 -0
- package/dist/client/assets/clarity-CtfBBspg.js +1 -0
- package/dist/client/assets/clipboard-copy-ezz8rnaT.js +1 -0
- package/dist/client/assets/coq-DuBRPxYg.js +1 -0
- package/dist/client/assets/cpp-C3nXdf7H.js +1 -0
- package/dist/client/assets/data-list-ZLhzdlED.js +1 -0
- package/dist/client/assets/{desktopWorkspace-8s8rm3zL.js → desktopWorkspace-P28r2lN2.js} +1 -1
- package/dist/client/assets/download-BA9L9tK9.js +1 -0
- package/dist/client/assets/editorPreferences-DeKdSV3s.js +1 -0
- package/dist/client/assets/emacs-lisp-c_oH4hRZ.js +1 -0
- package/dist/client/assets/empty-3NpXLnAM.js +1 -0
- package/dist/client/assets/{erb-UQla4w8B.js → erb-CXyXxaAM.js} +1 -1
- package/dist/client/assets/{gdresource-C0sCabJj.js → gdresource-xMC7jr7x.js} +1 -1
- package/dist/client/assets/gdscript-DYvRD3hg.js +1 -0
- package/dist/client/assets/group-D5qBdsaB.js +1 -0
- package/dist/client/assets/hack-Bw3mo9za.js +1 -0
- package/dist/client/assets/haxe-C8oCnwJJ.js +1 -0
- package/dist/client/assets/hostedConnectionCoordinator-CLV-JD1S.js +1 -0
- package/dist/client/assets/{hostedPairing-PogXRAb7.js → hostedPairing-B_ylEEDa.js} +1 -1
- package/dist/client/assets/hubRoutes-EWJ3Gdod.js +1 -0
- package/dist/client/assets/hxml-Dcm88srW.js +1 -0
- package/dist/client/assets/{index-DRY8Hgrj.js → index-DxCd1PgA.js} +2 -2
- package/dist/client/assets/input-DrOL1KPS.js +1 -0
- package/dist/client/assets/{julia-DTmLe4fA.js → julia-C-lBeOK5.js} +1 -1
- package/dist/client/assets/{just-CPUGe9J1.js → just-DfEtguTY.js} +1 -1
- package/dist/client/assets/kbd-rWDjJnWX.js +1 -0
- package/dist/client/assets/key-round-D2DtQ7aS.js +1 -0
- package/dist/client/assets/latex-6oxeCMbP.js +1 -0
- package/dist/client/assets/layers-DtSJWmwy.js +1 -0
- package/dist/client/assets/{liquidGlass-yFkZrRk5.js → liquidGlass-Dbl4k51l.js} +1 -1
- package/dist/client/assets/{llvm-Cm23YOpf.js → llvm-DqHOMS-s.js} +1 -1
- package/dist/client/assets/log-out-YAp9fsOg.js +1 -0
- package/dist/client/assets/{logging-Y73f240E.js → logging-BuUPX1SP.js} +1 -1
- package/dist/client/assets/luau-C2pBCSgt.js +1 -0
- package/dist/client/assets/main-BbtLAX7M.js +9 -0
- package/dist/client/assets/main-D4CtFNPY.css +2 -0
- package/dist/client/assets/mdc-uTSeACfH.js +1 -0
- package/dist/client/assets/mermaid-BxpfTIzt.js +1 -0
- package/dist/client/assets/mojo-fg40_ntQ.js +1 -0
- package/dist/client/assets/monitor-OyD484tI.js +1 -0
- package/dist/client/assets/moonbit-DgjMoLWr.js +1 -0
- package/dist/client/assets/move-BYnGhZoM.js +1 -0
- package/dist/client/assets/nsis-CjNLYCLg.js +1 -0
- package/dist/client/assets/nushell-DHYfO66s.js +1 -0
- package/dist/client/assets/org-DRYqs_wo.js +1 -0
- package/dist/client/assets/palette-D18VboLH.js +1 -0
- package/dist/client/assets/play-d3KUi4G6.js +1 -0
- package/dist/client/assets/{powershell-DshXNtvi.js → powershell-CCSX75yM.js} +1 -1
- package/dist/client/assets/primary-D_D7eLwT.js +2 -0
- package/dist/client/assets/prisma-DMgNhnYS.js +1 -0
- package/dist/client/assets/providerDriverMeta-DNTocCcU.js +1 -0
- package/dist/client/assets/providerModels-bFbEIfL9.js +1 -0
- package/dist/client/assets/{qr-code-BKrwYZ2s.js → qr-code-Bk1kdf_k.js} +1 -1
- package/dist/client/assets/qr-code-MAZkoKtL.js +1 -0
- package/dist/client/assets/r-B-BYV2IP.js +1 -0
- package/dist/client/assets/radio-group-D-VCGinX.js +2 -0
- package/dist/client/assets/rbs-C0MpOrj4.js +1 -0
- package/dist/client/assets/refresh-cw-DY3_Ph-S.js +1 -0
- package/dist/client/assets/{rst-C90_EUa_.js → rst-DKqX_39h.js} +1 -1
- package/dist/client/assets/{ruby-BlGyFGAQ.js → ruby-CaU3RLfE.js} +1 -1
- package/dist/client/assets/runtime-Djy96GJd.js +17 -0
- package/dist/client/assets/save-ugJXuJRM.js +1 -0
- package/dist/client/assets/{scala-DKOlJaKm.js → scala-BiFt_7mu.js} +1 -1
- package/dist/client/assets/scroll-area-BMnGzd2a.js +1 -0
- package/dist/client/assets/scrollEdges-QLSFwGSQ.js +1 -0
- package/dist/client/assets/separator-BwUYkCkX.js +1 -0
- package/dist/client/assets/settingsLayout-C6SUmJVB.js +1 -0
- package/dist/client/assets/sheet-DLy4aeVa.js +1 -0
- package/dist/client/assets/shield-Zq_ygsnJ.js +1 -0
- package/dist/client/assets/shield-alert-DfUhTI4-.js +1 -0
- package/dist/client/assets/shield-check-CO4SMhAs.js +1 -0
- package/dist/client/assets/sidebar-DNnW-a2V.js +1 -0
- package/dist/client/assets/sidebarProjectFolders-ygpaKZM6.js +4 -0
- package/dist/client/assets/sidebarStatusText-CawrXnx0.js +1 -0
- package/dist/client/assets/skeleton-DRm4_OvB.js +1 -0
- package/dist/client/assets/smalltalk-BHpQb5nM.js +1 -0
- package/dist/client/assets/smartphone-O2VACDhU.js +1 -0
- package/dist/client/assets/smithy-Dgaz7aur.js +1 -0
- package/dist/client/assets/solidity-Bj7E1mRn.js +1 -0
- package/dist/client/assets/sparkles-isHutYWU.js +1 -0
- package/dist/client/assets/src-BSuAGqhK.js +14 -0
- package/dist/client/assets/star-7UHEnC3x.js +1 -0
- package/dist/client/assets/surrealql-CVtmRpY6.js +1 -0
- package/dist/client/assets/swift-CyEgAFGc.js +1 -0
- package/dist/client/assets/switch-DD1qVLgN.js +48 -0
- package/dist/client/assets/system-verilog-Dh5ihWbf.js +1 -0
- package/dist/client/assets/tex-DOBpnpUK.js +1 -0
- package/dist/client/assets/toggle-CaKBNe6W.js +1 -0
- package/dist/client/assets/toggle-group-UeFeTI3u.js +1 -0
- package/dist/client/assets/tokenModePresentation-DV56ekA4.js +1 -0
- package/dist/client/assets/tooltip-DXvXxL37.js +1 -0
- package/dist/client/assets/twig-DsmcR2eZ.js +1 -0
- package/dist/client/assets/typst-Drab9wKO.js +1 -0
- package/dist/client/assets/unplug-DisTpujT.js +1 -0
- package/dist/client/assets/useAppSidebarCollapsed-CaAsLi1q.js +1 -0
- package/dist/client/assets/useAppearancePreference-BteoFdGa.js +1 -0
- package/dist/client/assets/useBaseUiId-CJN4MvrU.js +1 -0
- package/dist/client/assets/{useControlled-HocCF1v9.js → useControlled-DQwgzrEC.js} +1 -1
- package/dist/client/assets/useLabelableId-BsDFG9Oj.js +1 -0
- package/dist/client/assets/{useLongPress-OGlhYKlH.js → useLongPress-DG1W7YqV.js} +1 -1
- package/dist/client/assets/useNavigate-cLfxn_9L.js +1 -0
- package/dist/client/assets/usePhoneThreadActions-rekHL1Mi.js +1 -0
- package/dist/client/assets/usePopupViewport-kXU31P6l.js +1 -0
- package/dist/client/assets/useScrollLock-DjMxrUJe.js +1 -0
- package/dist/client/assets/useStatistics-BYP-9CmW.js +55 -0
- package/dist/client/assets/{useTheme-By1kfyiU.js → useTheme-CVNauCtz.js} +1 -1
- package/dist/client/assets/useTriggerFocusGuards-DuAm2B8C.js +1 -0
- package/dist/client/assets/useValueChanged-DreFjrMK.js +1 -0
- package/dist/client/assets/user-round-DctamWV6.js +1 -0
- package/dist/client/assets/{v-DETTlOr0.js → v-DBj4K9d_.js} +1 -1
- package/dist/client/assets/{vb-Djn5o6TS.js → vb-DOwzaHZ0.js} +1 -1
- package/dist/client/assets/verilog-B2gwz-sJ.js +1 -0
- package/dist/client/assets/vscode-icons-Dw-LGJAv.js +1 -0
- package/dist/client/assets/{vue-DStD_OmO.js → vue-Dt-rrFdH.js} +1 -1
- package/dist/client/assets/worker-Bs0l0ezO.js +162 -0
- package/dist/client/assets/{workspaceMetadataProjection-D3vqw40g.js → workspaceMetadataProjection-BL4sEIL2.js} +1 -1
- package/dist/client/assets/wrench-Ds8eZerZ.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/client/mockServiceWorker.js +124 -99
- package/dist/resource-monitor/darwin-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/darwin-x64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-arm64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/linux-x64/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor +0 -0
- package/dist/resource-monitor/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-arm64/ryco-resource-monitor.exe +0 -0
- package/dist/resource-monitor/win32-x64/ryco-resource-monitor.exe +0 -0
- package/package.json +20 -12
- package/dist/client/assets/AccountSettings-CypheYqM.js +0 -1
- package/dist/client/assets/AiFocusSettings-BlX0ED1t.js +0 -1
- package/dist/client/assets/AppearanceSettings-BSyn6NXf.js +0 -1
- package/dist/client/assets/BranchToolbar.logic-fpBz8Ajj.js +0 -1
- package/dist/client/assets/BrowserPanel-BWch19QH.js +0 -1
- package/dist/client/assets/ChatRightPanel-B7yrq-hS.js +0 -27
- package/dist/client/assets/ChatThreadRouteView-Cg0d_EHs.js +0 -1
- package/dist/client/assets/CommandPaletteDialog-DImCuPaX.js +0 -1
- package/dist/client/assets/CompositeItem-BYnHWRNf.js +0 -1
- package/dist/client/assets/CompositeRoot-B28uivk7.js +0 -1
- package/dist/client/assets/ComputerUseSettings-CosW7jaG.js +0 -1
- package/dist/client/assets/ConnectionsSettings-Bk6vI3G-.js +0 -7
- package/dist/client/assets/ContextHandoffEndpointLabel-BR6ygaub.js +0 -4
- package/dist/client/assets/DiagnosticsSettings-Dp_tCNLw.js +0 -2
- package/dist/client/assets/DialogHandle-BN-QB-sO.js +0 -1
- package/dist/client/assets/DialogPopup-BuJs5WUt.js +0 -1
- package/dist/client/assets/DialogRoot-PxEcoecQ.js +0 -1
- package/dist/client/assets/DialogTitle-4nxQsra4.js +0 -1
- package/dist/client/assets/DialogTrigger-D_0canul.js +0 -1
- package/dist/client/assets/DialogViewport-DSo-2hyf.js +0 -1
- package/dist/client/assets/DraftChatThreadRouteView-C94kpMx4.js +0 -1
- package/dist/client/assets/GlassSurface-CyOTUS7E.js +0 -1
- package/dist/client/assets/HostedConnectionControls-CL0Ws4ca.js +0 -1
- package/dist/client/assets/HostedHubRoot-LUINZl4r.js +0 -1
- package/dist/client/assets/HostedNativeAuthorizationRoute-CgYVBE6N.js +0 -1
- package/dist/client/assets/HostedRelayTrustNotice-DgdeZh52.js +0 -1
- package/dist/client/assets/Icons-BIUbIFr7.js +0 -1
- package/dist/client/assets/IntegrationsSettingsPanel-B7tXTaa3.js +0 -1
- package/dist/client/assets/KeybindingsSettings-HMlRcGQ4.js +0 -7
- package/dist/client/assets/LazyBrowserPanel-CKfmuM9U.js +0 -1
- package/dist/client/assets/McpServersSettings-Bq-HyhvC.js +0 -6
- package/dist/client/assets/MobileSheet-acDRH9aa.js +0 -1
- package/dist/client/assets/NoActiveThreadState-7rym7bV7.js +0 -1
- package/dist/client/assets/NodeSecuritySettings-D8qjh4Dc.js +0 -1
- package/dist/client/assets/OpinionatedPluginsSettings-D7Uks5yR.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitial-BQXUSufH.js +0 -1
- package/dist/client/assets/PhoneGetAppInterstitialBackdrop-BbUvwGmI.js +0 -1
- package/dist/client/assets/PhoneHome-DvgdMTkh.js +0 -1
- package/dist/client/assets/PhoneSettingsSurface-DncJ540i.js +0 -1
- package/dist/client/assets/ProjectFavicon-BY5Vyyk6.js +0 -1
- package/dist/client/assets/ProviderInstanceIcon-CZe1TbeC.js +0 -1
- package/dist/client/assets/ProviderModelPicker-DHAY1n_1.js +0 -1
- package/dist/client/assets/ProviderUpdateLaunchNotification.logic-DQJVrUIo.js +0 -1
- package/dist/client/assets/ProvidersSettingsPanel-BylxZs4S.js +0 -1
- package/dist/client/assets/RedactedSensitiveText-D-enj1h5.js +0 -1
- package/dist/client/assets/RootAppShell-DBK0WW2b.js +0 -6
- package/dist/client/assets/RycoLetterMark-PnGm6TQY.js +0 -1
- package/dist/client/assets/Separator-BWKYMFqt.js +0 -1
- package/dist/client/assets/SettingsDialog-N25hIv-a.js +0 -1
- package/dist/client/assets/SettingsPanels-D9YXmUPP.js +0 -3
- package/dist/client/assets/SettingsPanels.editor-Cn18k74l.js +0 -1
- package/dist/client/assets/SourceControlSettings-BAzSpMfR.js +0 -1
- package/dist/client/assets/StatisticsPage-CLKpfsQ8.js +0 -1
- package/dist/client/assets/StatisticsPanel-DxHUFn64.js +0 -1
- package/dist/client/assets/StatisticsSettingsLink-B3HIQYFh.js +0 -1
- package/dist/client/assets/ThreadStatusIndicators-CQZ_OgY8.js +0 -0
- package/dist/client/assets/ThreadTerminalDrawer-D1SPewXR.js +0 -20
- package/dist/client/assets/ThreadWorkspacePanel-DVF6oZsV.js +0 -2009
- package/dist/client/assets/ToolbarRootContext-Dt8G5aCw.js +0 -1
- package/dist/client/assets/WorkItemsTab-BoE-TcXJ.js +0 -19
- package/dist/client/assets/actionscript-3--17pq3dv.js +0 -1
- package/dist/client/assets/activity-DfFM6I8A.js +0 -1
- package/dist/client/assets/alert-DE5SkZhr.js +0 -1
- package/dist/client/assets/alert-dialog-BqPnPhb6.js +0 -1
- package/dist/client/assets/andromeeda-WkhI09AS.js +0 -1
- package/dist/client/assets/apex-VAyPSnFM.js +0 -1
- package/dist/client/assets/appearancePreferences-BhNRCg6W.js +0 -1
- package/dist/client/assets/archive-BFV4YQ7D.js +0 -1
- package/dist/client/assets/arrow-left-CCmICk1t.js +0 -1
- package/dist/client/assets/arrow-right-Z3Eay6Fd.js +0 -1
- package/dist/client/assets/arrow-up-caak6P06.js +0 -1
- package/dist/client/assets/arrow-up-right-BwC-fCE4.js +0 -1
- package/dist/client/assets/asciidoc-DE70LPWp.js +0 -1
- package/dist/client/assets/aurora-x-C7CFqhAd.js +0 -1
- package/dist/client/assets/authorization-bHsGYIT0.js +0 -1
- package/dist/client/assets/ayu-dark-CRu61w6_.js +0 -1
- package/dist/client/assets/ayu-light-Dn6O_aYR.js +0 -1
- package/dist/client/assets/ayu-mirage-CTjYAbs-.js +0 -1
- package/dist/client/assets/badge-m9kM3P07.js +0 -1
- package/dist/client/assets/bird2-C6vDhewU.js +0 -1
- package/dist/client/assets/bot-Cv7a7Ksf.js +0 -1
- package/dist/client/assets/bsl-BkkzgIyY.js +0 -1
- package/dist/client/assets/button-B6xQZNKz.js +0 -1
- package/dist/client/assets/c3-BFHwR3_K.js +0 -1
- package/dist/client/assets/catppuccin-frappe-3VR1Za6u.js +0 -1
- package/dist/client/assets/catppuccin-latte-DwIHMF0Q.js +0 -1
- package/dist/client/assets/catppuccin-macchiato-DYnBP6_5.js +0 -1
- package/dist/client/assets/catppuccin-mocha-DYhrFGRu.js +0 -1
- package/dist/client/assets/chart-column-DgGlY4sD.js +0 -1
- package/dist/client/assets/chatThreadActions-BXaNbPbp.js +0 -1
- package/dist/client/assets/check-BfnWUGBT.js +0 -1
- package/dist/client/assets/chevron-down-B_FKCRVh.js +0 -1
- package/dist/client/assets/chevron-right-B6CKNGh4.js +0 -1
- package/dist/client/assets/circle-alert-BV3vJE-c.js +0 -1
- package/dist/client/assets/circle-check-D2Vx39x-.js +0 -1
- package/dist/client/assets/circle-dashed-khcA8K3Y.js +0 -1
- package/dist/client/assets/circle-question-mark-DEuLdOiy.js +0 -1
- package/dist/client/assets/circle-x-DqfM_2wS.js +0 -1
- package/dist/client/assets/clamp-D0kAXd-u.js +0 -1
- package/dist/client/assets/clarity-SemFz856.js +0 -1
- package/dist/client/assets/clipboard-copy-CiD4tBsh.js +0 -1
- package/dist/client/assets/clock--4M7moiV.js +0 -1
- package/dist/client/assets/clock-3-NbnQqtcd.js +0 -1
- package/dist/client/assets/collapsible-BECg-ssO.js +0 -1
- package/dist/client/assets/command-DvbA3O0J.js +0 -1
- package/dist/client/assets/composerHandleContext-BrQ6d8r9.js +0 -1
- package/dist/client/assets/copy-CkPe1c-r.js +0 -1
- package/dist/client/assets/coq-BrsZFFmf.js +0 -1
- package/dist/client/assets/cpp-nUc1dxUX.js +0 -1
- package/dist/client/assets/dark-plus-GAt2ZgX8.js +0 -1
- package/dist/client/assets/data-list-7TiaqfZU.js +0 -1
- package/dist/client/assets/desktopUpdateAtoms-6j0d8vfy.js +0 -1
- package/dist/client/assets/device-CGaJ6fwD.js +0 -168
- package/dist/client/assets/dialog-C9v8Zl6e.js +0 -1
- package/dist/client/assets/download-DPjzVxTa.js +0 -1
- package/dist/client/assets/dracula-C2uKkzgK.js +0 -1
- package/dist/client/assets/dracula-soft-D1bVjxWZ.js +0 -1
- package/dist/client/assets/draft-input-BRSLIjV6.js +0 -1
- package/dist/client/assets/editorPreferences-D-9SDgRM.js +0 -1
- package/dist/client/assets/emacs-lisp-B4R74twV.js +0 -1
- package/dist/client/assets/empty-CuQ57p2u.js +0 -1
- package/dist/client/assets/everforest-dark-D-DlICQR.js +0 -1
- package/dist/client/assets/everforest-light-CeVdGHYG.js +0 -1
- package/dist/client/assets/external-link-CF9EzT-A.js +0 -1
- package/dist/client/assets/eye-C2Puut9B.js +0 -1
- package/dist/client/assets/folder-BKTxLq18.js +0 -1
- package/dist/client/assets/folder-closed-D2cwiusg.js +0 -1
- package/dist/client/assets/gdscript-Cp2uCuqX.js +0 -1
- package/dist/client/assets/getPseudoElementBounds-DdH76YK5.js +0 -1
- package/dist/client/assets/git-branch-Dauy2SWC.js +0 -1
- package/dist/client/assets/git-pull-request-DsK1gBtK.js +0 -1
- package/dist/client/assets/github-dark-DwbbXv51.js +0 -1
- package/dist/client/assets/github-dark-default-CxjRwzl6.js +0 -1
- package/dist/client/assets/github-dark-dimmed-Cr1oaoul.js +0 -1
- package/dist/client/assets/github-dark-high-contrast-B4qJZLZa.js +0 -1
- package/dist/client/assets/github-light-CsVXhIlR.js +0 -1
- package/dist/client/assets/github-light-default-DB_IwZa6.js +0 -1
- package/dist/client/assets/github-light-high-contrast-DLgVeSB-.js +0 -1
- package/dist/client/assets/globe-dS40wBdE.js +0 -1
- package/dist/client/assets/group-DBXm8riE.js +0 -1
- package/dist/client/assets/gruvbox-dark-hard-DXm60lX3.js +0 -1
- package/dist/client/assets/gruvbox-dark-medium-GE2thSmD.js +0 -1
- package/dist/client/assets/gruvbox-dark-soft-04Cj-4VZ.js +0 -1
- package/dist/client/assets/gruvbox-light-hard-K6wSn29D.js +0 -1
- package/dist/client/assets/gruvbox-light-medium-CVy3aSlc.js +0 -1
- package/dist/client/assets/gruvbox-light-soft-DNgJjaY0.js +0 -1
- package/dist/client/assets/hack-Vy6VBrBk.js +0 -1
- package/dist/client/assets/haxe-OTjmBuCE.js +0 -1
- package/dist/client/assets/horizon-0-RkHfro.js +0 -1
- package/dist/client/assets/horizon-bright-BgL2X9oq.js +0 -1
- package/dist/client/assets/hostedConnectionCoordinator-DSMW2Ldh.js +0 -1
- package/dist/client/assets/houston-KyjWKfuY.js +0 -1
- package/dist/client/assets/hxml-B0Qn7Nwc.js +0 -1
- package/dist/client/assets/input-Dn_zesdZ.js +0 -1
- package/dist/client/assets/isElementDisabled-KSuuBj8D.js +0 -1
- package/dist/client/assets/kanagawa-dragon-CXtmUGW6.js +0 -1
- package/dist/client/assets/kanagawa-lotus-BN08jTvb.js +0 -1
- package/dist/client/assets/kanagawa-wave-CTweb8Dz.js +0 -1
- package/dist/client/assets/kbd-BF2-WlxQ.js +0 -1
- package/dist/client/assets/key-round-BjaaL9Df.js +0 -1
- package/dist/client/assets/keybindings-FSJY3Tht.js +0 -1
- package/dist/client/assets/keyboard-AkUFPD_e.js +0 -1
- package/dist/client/assets/label-BKjVY2A9.js +0 -1
- package/dist/client/assets/laserwave-CQkdhozh.js +0 -1
- package/dist/client/assets/latex-UxGGx4RW.js +0 -1
- package/dist/client/assets/layers-tzRiuxSx.js +0 -1
- package/dist/client/assets/lib-D5cyGc84.js +0 -29
- package/dist/client/assets/light-plus-CNQ8_7Y0.js +0 -1
- package/dist/client/assets/loader-BrbWRz3I.js +0 -1
- package/dist/client/assets/loader-circle-DRKbHQst.js +0 -1
- package/dist/client/assets/log-out-BEihaal1.js +0 -1
- package/dist/client/assets/luau-FMPmPwt6.js +0 -1
- package/dist/client/assets/main-BiIQEybS.js +0 -9
- package/dist/client/assets/main-tZWU6iqX.css +0 -2
- package/dist/client/assets/material-theme-CAtLaHa3.js +0 -1
- package/dist/client/assets/material-theme-darker-k-s5Bc6K.js +0 -1
- package/dist/client/assets/material-theme-lighter-CD6a-c4d.js +0 -1
- package/dist/client/assets/material-theme-ocean-B3mraInd.js +0 -1
- package/dist/client/assets/material-theme-palenight-DEhAARHw.js +0 -1
- package/dist/client/assets/mdc-OfbQwt23.js +0 -1
- package/dist/client/assets/menu-BxtB33Up.js +0 -1
- package/dist/client/assets/mermaid-Bk4SNUv9.js +0 -1
- package/dist/client/assets/messages-square-e0Zg750i.js +0 -1
- package/dist/client/assets/min-dark-BFqTAwCr.js +0 -1
- package/dist/client/assets/min-light-O7UdaaxX.js +0 -1
- package/dist/client/assets/minimize-2-DC9gMgGl.js +0 -1
- package/dist/client/assets/mojo-BgCJLMeH.js +0 -1
- package/dist/client/assets/monitor-Dj0JFj4_.js +0 -1
- package/dist/client/assets/monokai-CdkpiU2Y.js +0 -1
- package/dist/client/assets/moonbit-CaWjb8XO.js +0 -1
- package/dist/client/assets/motion-thOBhZyM.js +0 -1
- package/dist/client/assets/move-B1IS1UjX.js +0 -1
- package/dist/client/assets/night-owl-BsnCLAKc.js +0 -1
- package/dist/client/assets/night-owl-light-BODRhcTU.js +0 -1
- package/dist/client/assets/nord-Cd-F4txO.js +0 -1
- package/dist/client/assets/nushell-DcLAeLz5.js +0 -1
- package/dist/client/assets/one-dark-pro-DUS_IGRK.js +0 -1
- package/dist/client/assets/one-light-CVUd7yD5.js +0 -1
- package/dist/client/assets/palette-0qvNt1CR.js +0 -1
- package/dist/client/assets/pathEntry-BR9vr7Ug.js +0 -1
- package/dist/client/assets/pencil-CA0DGufX.js +0 -1
- package/dist/client/assets/phoneAnchoredActions-CtpkI3yG.js +0 -1
- package/dist/client/assets/plastic-CF8VZTnn.js +0 -1
- package/dist/client/assets/play-wIyvqd_g.js +0 -1
- package/dist/client/assets/plus-5kH13lqq.js +0 -1
- package/dist/client/assets/poimandres-BX2TyY6j.js +0 -1
- package/dist/client/assets/popover-CwhgX3HA.js +0 -1
- package/dist/client/assets/primary-BqnEJHWx.js +0 -2
- package/dist/client/assets/prisma-BsRQq5mF.js +0 -1
- package/dist/client/assets/projectPaths-45WPhgoj.js +0 -1
- package/dist/client/assets/providerDriverMeta-Cc60r9Rb.js +0 -1
- package/dist/client/assets/providerInstances-Cr8JmFCe.js +0 -1
- package/dist/client/assets/providerModels-Cr8JmFCe.js +0 -1
- package/dist/client/assets/qr-code-DDmpRnPp.js +0 -1
- package/dist/client/assets/r-DbaFp5Gj.js +0 -1
- package/dist/client/assets/radio-group-DZCo21CF.js +0 -2
- package/dist/client/assets/react-dom-x9LNwWQc.js +0 -1
- package/dist/client/assets/red-CJ3rzSJv.js +0 -1
- package/dist/client/assets/refresh-cw-DiuiLTny.js +0 -1
- package/dist/client/assets/resolveAriaLabelledBy-927ShlEO.js +0 -1
- package/dist/client/assets/rightPanelRouteSearch-CExl-IaQ.js +0 -1
- package/dist/client/assets/rose-pine-BthvhNj6.js +0 -1
- package/dist/client/assets/rose-pine-dawn-Dg85fqjY.js +0 -1
- package/dist/client/assets/rose-pine-moon-hon4tzzS.js +0 -1
- package/dist/client/assets/rotate-ccw-XOYBPtyK.js +0 -1
- package/dist/client/assets/rotate-cw-D32Z4Sdd.js +0 -1
- package/dist/client/assets/runtime-CA2W9mZ-.js +0 -17
- package/dist/client/assets/save-DjlqeVG_.js +0 -1
- package/dist/client/assets/scroll-area-CylKYQms.js +0 -1
- package/dist/client/assets/scrollEdges-D7RQhYjX.js +0 -1
- package/dist/client/assets/search-B2nLj573.js +0 -1
- package/dist/client/assets/select-qTezUK8F.js +0 -1
- package/dist/client/assets/separator-D77goPy-.js +0 -1
- package/dist/client/assets/server-y8Wq0Qwv.js +0 -1
- package/dist/client/assets/session-logic-xfW418Rx.js +0 -1
- package/dist/client/assets/settings-2-DpwBKj3m.js +0 -1
- package/dist/client/assets/settingsLayout-BuaXzjIe.js +0 -1
- package/dist/client/assets/settingsSections.logic-CR4aytUI.js +0 -1
- package/dist/client/assets/shallow-DWZCFNun.js +0 -1
- package/dist/client/assets/sheet-z3AEiSN4.js +0 -1
- package/dist/client/assets/shield-BuXuMVtb.js +0 -1
- package/dist/client/assets/shield-alert-Dfk--o-I.js +0 -1
- package/dist/client/assets/shield-check-BHi57iF1.js +0 -1
- package/dist/client/assets/sidebar-Dst9O2OR.js +0 -1
- package/dist/client/assets/sidebarProjectFolders-DR1NBLLz.js +0 -4
- package/dist/client/assets/sidebarStatusText-7jo1n9E1.js +0 -1
- package/dist/client/assets/skeleton-D_kbMg21.js +0 -1
- package/dist/client/assets/slack-dark-DYvUXyrP.js +0 -1
- package/dist/client/assets/slack-ochin-bqtMVDfH.js +0 -1
- package/dist/client/assets/smalltalk-B16xEiuN.js +0 -1
- package/dist/client/assets/smartphone-DcUQ17YT.js +0 -1
- package/dist/client/assets/snazzy-light-D8dzFmq5.js +0 -1
- package/dist/client/assets/solarized-dark-DV17i1UV.js +0 -1
- package/dist/client/assets/solarized-light-DSh2HLQt.js +0 -1
- package/dist/client/assets/solidity-CKzVLygQ.js +0 -1
- package/dist/client/assets/sparkles-nVLLtdqb.js +0 -1
- package/dist/client/assets/spinner-CkXSwhuf.js +0 -1
- package/dist/client/assets/square-pen-dcArpda7.js +0 -1
- package/dist/client/assets/src-I4s4HU8f.js +0 -14
- package/dist/client/assets/star-CdUOqzzZ.js +0 -1
- package/dist/client/assets/storeSelectors-Cr8JmFCe.js +0 -1
- package/dist/client/assets/surrealql-CaZedS14.js +0 -1
- package/dist/client/assets/swift-DonLKvLd.js +0 -1
- package/dist/client/assets/switch-BMeRsIbg.js +0 -1
- package/dist/client/assets/synthwave-84-CIknw8y7.js +0 -1
- package/dist/client/assets/system-verilog-DJ5XKQeo.js +0 -1
- package/dist/client/assets/tabSwitchInstrumentation-BuxWNdCV.js +0 -1
- package/dist/client/assets/terminal-DupJfYRW.js +0 -1
- package/dist/client/assets/terminal-links-Bf4neyyn.js +0 -1
- package/dist/client/assets/tex-CLeF3jRN.js +0 -1
- package/dist/client/assets/textarea-Bu_OTJYe.js +0 -1
- package/dist/client/assets/threadPinning-DhnkssEa.js +0 -1
- package/dist/client/assets/threadPriorityRefreshRuntime-DJjlyX7f.js +0 -1
- package/dist/client/assets/timestampFormat-8uPXS812.js +0 -1
- package/dist/client/assets/toast-CIjfIWUw.js +0 -1
- package/dist/client/assets/toggle-BA4mJ5v9.js +0 -1
- package/dist/client/assets/toggle-group-ChGfILTR.js +0 -1
- package/dist/client/assets/tokenModePresentation-B64s_OK3.js +0 -1
- package/dist/client/assets/tokyo-night-iIspnLcq.js +0 -1
- package/dist/client/assets/tooltip-C2VVqN6U.js +0 -1
- package/dist/client/assets/trash-2-Dqgxd0nF.js +0 -1
- package/dist/client/assets/triangle-alert-D4cCh6sB.js +0 -1
- package/dist/client/assets/twig-BmgBVapk.js +0 -1
- package/dist/client/assets/types-Cr8JmFCe.js +0 -1
- package/dist/client/assets/typst-DI99ib-x.js +0 -1
- package/dist/client/assets/undo-2-C8EQVSSD.js +0 -1
- package/dist/client/assets/unplug-Dt3Sy2op.js +0 -1
- package/dist/client/assets/useAppSidebarCollapsed-w0th-164.js +0 -1
- package/dist/client/assets/useAtlassian-j7ex3bVN.js +0 -0
- package/dist/client/assets/useButton-Dx5k1uZG.js +0 -1
- package/dist/client/assets/useCompositeListItem-BqkyY0oT.js +0 -1
- package/dist/client/assets/useCopyToClipboard-BTpWxumf.js +0 -1
- package/dist/client/assets/useDebouncedValue-BevbEbPO.js +0 -1
- package/dist/client/assets/useFloatingRootContext-j6TgzEFa.js +0 -1
- package/dist/client/assets/useHandleNewThread-gVYty_Bg.js +0 -1
- package/dist/client/assets/useLabelableId-CcYPzJvj.js +0 -1
- package/dist/client/assets/useLocation-CZ3osOgz.js +0 -1
- package/dist/client/assets/useNavigate-2tVq4iZ2.js +0 -1
- package/dist/client/assets/useOpenInteractionType-apbY9ZEK.js +0 -1
- package/dist/client/assets/usePhoneThreadActions-CnDlicSp.js +0 -1
- package/dist/client/assets/usePopupViewport-0k75uXo1.js +0 -1
- package/dist/client/assets/useRenderElement-5DRNLBaU.js +0 -1
- package/dist/client/assets/useRouter-CcIDS3PN.js +0 -1
- package/dist/client/assets/useScrollLock-C5WLWXcc.js +0 -1
- package/dist/client/assets/useStatistics-GOFXPHO0.js +0 -55
- package/dist/client/assets/useSwipeDismiss-BNHPBucH.js +0 -1
- package/dist/client/assets/useThreadActions-B4Xy2soQ.js +0 -2
- package/dist/client/assets/useTriggerFocusGuards-C3geWFzt.js +0 -1
- package/dist/client/assets/useValueChanged-FVqPwcY_.js +0 -1
- package/dist/client/assets/user-round-KsVtJgon.js +0 -1
- package/dist/client/assets/utils-B5qahmRn.js +0 -1
- package/dist/client/assets/verilog-CiiDBU1e.js +0 -1
- package/dist/client/assets/vesper-BIFK_oDq.js +0 -1
- package/dist/client/assets/visuallyHidden-j2WbVEv-.js +0 -1
- package/dist/client/assets/vitesse-black-D082JcaE.js +0 -1
- package/dist/client/assets/vitesse-dark-z-nr_5O8.js +0 -1
- package/dist/client/assets/vitesse-light-ojz42ZLy.js +0 -1
- package/dist/client/assets/vscode-icons-D3XEYHTI.js +0 -1
- package/dist/client/assets/worker-B0IAubm_.js +0 -161
- package/dist/client/assets/wrench-BnpoYEZm.js +0 -1
- package/dist/client/assets/x-BXHT1Zj1.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import"./src-BSuAGqhK.js";import{Da as n,I as r,Ma as i,N as a,Na as o,P as s,Rr as c,_l as l,wa as u,zr as d}from"./runtime-Djy96GJd.js";import{A as f,F as p,Ft as m,I as h,It as g,M as _,Mt as v,N as ee,Nt as y,P as te,Pt as ne,an as b,ct as x,j as S,jt as re,kt as C,r as w}from"./switch-DD1qVLgN.js";import{t as T}from"./compiler-runtime-qmuS0Svy.js";import{t as E}from"./badge-Dg7mXiOh.js";import{K as D}from"./ContextHandoffEndpointLabel-BildLLDY.js";import{t as O}from"./key-round-D2DtQ7aS.js";import{t as k}from"./refresh-cw-DY3_Ph-S.js";import{t as A}from"./shield-check-CO4SMhAs.js";import{t as j}from"./user-round-DctamWV6.js";import{_ as M,o as N}from"./authorization-CjOFkg7b.js";import{n as ie,t as ae}from"./input-DrOL1KPS.js";import{i as P,n as oe,r as F,t as I}from"./alert-CXnC_RJc.js";import{C as L,S as R,_ as z,a as se,b as B,c as ce,d as le,f as V,g as H,h as U,i as W,l as G,m as K,n as q,o as J,p as Y,r as ue,s as X,t as de,u as fe,v as Z,x as pe,y as me}from"./ExternalIdentityWeb.logic-arHvT6AX.js";import{i as he,n as ge,r as _e}from"./settingsLayout-C6SUmJVB.js";import{t as ve}from"./qr-code-Bk1kdf_k.js";var ye={name:`monitor-smartphone`,size:24,node:[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]};ye.node;var be=o(ye),Q=e(t(),1),xe=T(),Se=`Signed-in native apps use these device keys to establish encrypted connections automatically. The Hub authorizes account-trusted connections, so this does not protect against a malicious Hub; independent node verification remains the stronger option.`,Ce={darwin:`macOS`,linux:`Linux`,windows:`Windows`,ios:`iPhone or iPad`,android:`Android`},we={"secure-enclave":`Secure Enclave`,strongbox:`StrongBox`,tee:`Hardware-backed TEE`,tpm:`TPM`,"hardware-backed":`Hardware backed`,unavailable:`Unavailable`};function Te(e){return Ce[e.platform]}function Ee(e){return`${we[e.reportedKeyBacking]} · reported by device`}function De(e){switch(e.status){case`active`:return`Active`;case`revoked`:return`Revoked`;case`superseded`:return`Superseded`}}function Oe(e){let t=e.trim();return t.length>0&&t.length<=100?t:null}function ke(e,t){return[{label:`Enrollment`,value:e.enrollmentId},{label:`Identity fingerprint`,value:e.identityFingerprint,fingerprint:!0},{label:`Agreement fingerprint`,value:e.agreementFingerprint,fingerprint:!0},{label:`Key backing`,value:Ee(e)},{label:`First enrolled`,value:t(e.createdAt)},{label:`Last used`,value:e.lastUsedAt===null?`Not used yet`:t(e.lastUsedAt)},...e.revokedAt===null?[]:[{label:`Revoked`,value:t(e.revokedAt)}]]}var $=l(),Ae=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function je(e){return Ae.format(new Date(e))}function Me(){let e=(0,xe.c)(75),t=a(Re),n=a(Le),r=a(Ie),[i,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(``),[l,u]=(0,Q.useState)(null),b=r!==`idle`,T=r===`renaming-e2ee-device`,D=r===`revoking-e2ee-device`,O;e[0]===s?O=e[1]:(O=Oe(s),e[0]=s,e[1]=O);let k=O,A;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(A=[],e[2]=A):A=e[2],(0,Q.useEffect)(Fe,A);let j;e[3]!==k||e[4]!==i?(j=async()=>{i&&k!==null&&(await N.renameE2eeDevice(i.enrollmentId,{expectedEnrollmentRevision:i.enrollmentRevision,deviceLabel:k})).status===`committed`&&(o(null),c(``))},e[3]=k,e[4]=i,e[5]=j):j=e[5];let M=j,P;e[6]===l?P=e[7]:(P=async()=>{l&&(await N.revokeE2eeDevice(l.enrollmentId,{expectedEnrollmentRevision:l.enrollmentRevision,reasonCode:`owner_requested`})).status===`committed`&&u(null)},e[6]=l,e[7]=P);let oe=P,F;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,$.jsx)(be,{"aria-hidden":!0,className:`size-3.5`}),e[8]=F):F=e[8];let I=b||n===`loading`,L;e[9]===I?L=e[10]:(L=(0,$.jsx)(d,{size:`xs`,variant:`ghost`,disabled:I,onClick:Pe,children:`Refresh`}),e[9]=I,e[10]=L);let R;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(_e,{title:`Automatic native encryption`,description:Se,status:`A new signed-in Desktop or mobile app enrolls its own keys; private keys stay on that device.`}),e[11]=R):R=e[11];let z;e[12]!==b||e[13]!==t||e[14]!==n?(z=t.length===0?(0,$.jsx)(_e,{title:n===`loading`?`Loading devices…`:`No native devices yet`,description:`Sign in from Ryco Desktop or mobile to enroll that app automatically. Web sessions stay separate and do not join this native device trust set.`,status:n===`stale`?`The device directory is temporarily unavailable.`:null,control:n===`loading`?(0,$.jsx)(x,{className:`size-3.5`}):null}):t.map(e=>{let t=e.status===`active`;return(0,$.jsx)(_e,{title:(0,$.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[e.deviceLabel,(0,$.jsx)(E,{variant:t?`success`:`secondary`,children:De(e)})]}),description:`${Te(e)} · Ryco ${e.appVersion}`,status:n===`stale`?`Showing the last device directory Ryco read.`:null,control:t?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:b,onClick:()=>{o(e),c(e.deviceLabel)},children:`Rename`}),(0,$.jsx)(d,{size:`xs`,variant:`destructive-outline`,disabled:b,onClick:()=>u(e),children:`Revoke`})]}):null,children:(0,$.jsx)(`dl`,{className:`mt-3 grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 border-t border-border/60 py-3`,children:ke(e,je).map(Ne)})},`${e.enrollmentId}:${String(e.enrollmentRevision)}`)}),e[12]=b,e[13]=t,e[14]=n,e[15]=z):z=e[15];let se=i!==null,B;e[16]===T?B=e[17]:(B=e=>{e||T||(o(null),c(``))},e[16]=T,e[17]=B);let ce;e[18]===M?ce=e[19]:(ce=e=>{e.preventDefault(),M()},e[18]=M,e[19]=ce);let le;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,$.jsxs)(y,{children:[(0,$.jsx)(g,{children:`Rename encrypted device`}),(0,$.jsx)(re,{children:`This label is account metadata. Renaming does not rotate or replace the device keys.`})]}),e[20]=le):le=e[20];let V;e[21]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(w,{htmlFor:`account-e2ee-device-label`,children:`Device name`}),e[21]=V):V=e[21];let H;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(H=e=>c(e.target.value),e[22]=H):H=e[22];let U;e[23]!==s||e[24]!==T?(U=(0,$.jsxs)(ne,{className:`space-y-2`,children:[V,(0,$.jsx)(ae,{id:`account-e2ee-device-label`,value:s,maxLength:100,disabled:T,className:ie,onChange:H})]}),e[23]=s,e[24]=T,e[25]=U):U=e[25];let W;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(W=()=>{o(null),c(``)},e[26]=W):W=e[26];let G;e[27]===T?G=e[28]:(G=(0,$.jsx)(d,{type:`button`,variant:`outline`,disabled:T,onClick:W,children:`Cancel`}),e[27]=T,e[28]=G);let K=T||k===null,q;e[29]===T?q=e[30]:(q=T?(0,$.jsx)(x,{className:`size-3.5`}):null,e[29]=T,e[30]=q);let J;e[31]!==K||e[32]!==q?(J=(0,$.jsxs)(d,{type:`submit`,disabled:K,children:[q,`Save name`]}),e[31]=K,e[32]=q,e[33]=J):J=e[33];let Y;e[34]!==G||e[35]!==J?(Y=(0,$.jsxs)(v,{children:[G,J]}),e[34]=G,e[35]=J,e[36]=Y):Y=e[36];let ue;e[37]!==ce||e[38]!==U||e[39]!==Y?(ue=(0,$.jsx)(m,{className:`max-w-sm`,children:(0,$.jsxs)(`form`,{onSubmit:ce,children:[le,U,Y]})}),e[37]=ce,e[38]=U,e[39]=Y,e[40]=ue):ue=e[40];let X;e[41]!==B||e[42]!==ue||e[43]!==se?(X=(0,$.jsx)(C,{open:se,onOpenChange:B,children:ue}),e[41]=B,e[42]=ue,e[43]=se,e[44]=X):X=e[44];let de=l!==null,fe;e[45]===D?fe=e[46]:(fe=e=>{!e&&!D&&u(null)},e[45]=D,e[46]=fe);let Z;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,$.jsx)(h,{children:`Revoke this encrypted device?`}),e[47]=Z):Z=e[47];let pe=l?.deviceLabel??`This device`,me;e[48]===pe?me=e[49]:(me=(0,$.jsxs)(te,{children:[Z,(0,$.jsxs)(_,{children:[pe,` will lose account-authorized native connections. Signing in again can enroll fresh keys, but this enrollment cannot be restored.`]})]}),e[48]=pe,e[49]=me);let ge;e[50]===D?ge=e[51]:(ge=(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`,disabled:D}),children:`Cancel`}),e[50]=D,e[51]=ge);let ve;e[52]===oe?ve=e[53]:(ve=()=>void oe(),e[52]=oe,e[53]=ve);let ye;e[54]===D?ye=e[55]:(ye=D?(0,$.jsx)(x,{className:`size-3.5`}):null,e[54]=D,e[55]=ye);let Ce;e[56]!==D||e[57]!==ve||e[58]!==ye?(Ce=(0,$.jsxs)(d,{variant:`destructive`,disabled:D,onClick:ve,children:[ye,`Revoke device`]}),e[56]=D,e[57]=ve,e[58]=ye,e[59]=Ce):Ce=e[59];let we;e[60]!==ge||e[61]!==Ce?(we=(0,$.jsxs)(ee,{children:[ge,Ce]}),e[60]=ge,e[61]=Ce,e[62]=we):we=e[62];let Ee;e[63]!==me||e[64]!==we?(Ee=(0,$.jsxs)(p,{children:[me,we]}),e[63]=me,e[64]=we,e[65]=Ee):Ee=e[65];let Ae;e[66]!==de||e[67]!==fe||e[68]!==Ee?(Ae=(0,$.jsx)(f,{open:de,onOpenChange:fe,children:Ee}),e[66]=de,e[67]=fe,e[68]=Ee,e[69]=Ae):Ae=e[69];let Me;return e[70]!==X||e[71]!==Ae||e[72]!==L||e[73]!==z?(Me=(0,$.jsxs)(he,{title:`Encrypted devices`,icon:F,headerAction:L,children:[R,z,X,Ae]}),e[70]=X,e[71]=Ae,e[72]=L,e[73]=z,e[74]=Me):Me=e[74],Me}function Ne(e){return(0,$.jsxs)(`div`,{className:`contents`,children:[(0,$.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,$.jsx)(`dd`,{className:e.fingerprint?`min-w-0 font-mono text-xs break-all`:`min-w-0 text-xs break-all`,children:e.value})]},e.label)}function Pe(){N.refreshE2eeDevices({force:!0})}function Fe(){N.refreshE2eeDevices()}function Ie(e){return e.actionStatus}function Le(e){return e.e2eeDevicesStatus??`idle`}function Re(e){return e.e2eeDevices??[]}var ze=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function Be(e){return e===null||!Number.isFinite(e)?null:ze.format(new Date(e))}function Ve(){let e=(0,xe.c)(15),[t,n]=(0,Q.useState)(null),[r,i]=(0,Q.useState)(0),[a,o]=(0,Q.useState)(``),[s,c]=(0,Q.useState)(!1),l=(0,Q.useRef)(0),u;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(u=()=>{n(null),i(0),o(``)},e[0]=u):u=e[0];let d=u,f;e[1]===t?.options?f=e[2]:(f=()=>{l.current+=1,N.cancelAccountAction(),t?.options?.onAbandoned?.(),c(!1),d()},e[1]=t?.options,e[2]=f);let p=f,m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=async(e,t,r)=>{let a=l.current+=1;c(!1);let s=await t({});if(l.current===a){if(V(s)){o(``),i(0),n({action:e,run:t,options:r,inferred:s.inferredErrorCode===!0});return}s.status===`committed`&&r?.onCommitted?.()}},e[3]=m):m=e[3];let h=m,g;e[4]!==t||e[5]!==a||e[6]!==r?(g=async()=>{if(!t)return;let e=U(a);if(e.length===0)return;let n=l.current+=1,s=await t.run({totpCode:e});if(l.current===n){if(V(s)){let e=r+1;if(B(s,e)){i(e),o(``);return}c(!0),t.options?.onAbandoned?.(),d();return}s.status===`committed`&&t.options?.onCommitted?.(),d()}},e[4]=t,e[5]=a,e[6]=r,e[7]=g):g=e[7];let _=g,v;return e[8]!==p||e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==s||e[13]!==_?(v={run:h,cancel:p,stepUp:t,stepUpAttempts:r,stepUpCode:a,stepUpUnresolved:s,setStepUpCode:o,submitStepUp:_},e[8]=p,e[9]=t,e[10]=a,e[11]=r,e[12]=s,e[13]=_,e[14]=v):v=e[14],v}function He(){let e=(0,xe.c)(1),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=[],e[0]=t):t=e[0],(0,Q.useEffect)(Ue,t)}function Ue(){return N.leaseRecoveryCodeDisplay()}function We(e){let t=(0,xe.c)(3),{busy:n,children:r}=e,i;return t[0]!==n||t[1]!==r?(i=n?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(x,{className:`size-3.5`}),r]}):(0,$.jsx)($.Fragment,{children:r}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Ge(){let e=(0,xe.c)(100),t=s(ut),n=s(lt),[i,o]=(0,Q.useState)(!1),c=a(ct),l=a(st),f=a(ot),p=a(at),m=a(it),h=a(rt),g=a(nt),_=a(tt),v=s(et),ee=s($e),[y,te]=(0,Q.useState)(!1),[ne,b]=(0,Q.useState)(null),x=(0,Q.useRef)(!1),S=Ve(),re=S.run;He();let C=h!==`idle`,w;e[0]===m?w=e[1]:(w=ue(m),e[0]=m,e[1]=w);let T=w,E;e[2]===f?.externalIdentities?E=e[3]:(E=f?.externalIdentities.find(Qe)??null,e[2]=f?.externalIdentities,e[3]=E);let D=E,O;e[4]===y?O=e[5]:(O=async()=>{if(!y){te(!0),b(null);try{await de({intent:`link`,returnTo:`/account/security`,start:Ze,navigate:Xe})}catch(e){let t=e;b(t instanceof M?t.message:`GitHub connection is temporarily unavailable.`),te(!1)}}},e[4]=y,e[5]=O);let k=O,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=[],e[6]=N):N=e[6],(0,Q.useEffect)(Ye,N);let ie,ae;if(e[7]!==t||e[8]!==re?(ie=()=>{if(t!==`authenticated`||x.current)return;x.current=!0;let e=new AbortController;return r.getPendingExternalIdentity(e.signal).then(e=>{if(e.status===`link`)return re(`connect-github`,Je);e.status===`error`&&b(q(e.code))}).catch(qe),()=>e.abort()},ae=[t,re],e[7]=t,e[8]=re,e[9]=ie,e[10]=ae):(ie=e[9],ae=e[10]),(0,Q.useEffect)(ie,ae),t!==`authenticated`){let t;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(ge,{children:(0,$.jsxs)(I,{variant:`warning`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:`Not signed in`}),(0,$.jsx)(F,{children:`Sign in to the Hub to manage passkeys, two-factor authentication, and recovery codes.`})]})}),e[11]=t):t=e[11],t}let L;e[12]!==S.stepUp||e[13]!==S.stepUpUnresolved||e[14]!==_||e[15]!==g?(L=S.stepUpUnresolved?W:G(g,_,S.stepUp!==null),e[12]=S.stepUp,e[13]=S.stepUpUnresolved,e[14]=_,e[15]=g,e[16]=L):L=e[16];let R=L,z;e[17]!==S.stepUpUnresolved||e[18]!==_?(z=!S.stepUpUnresolved&&le(_),e[17]=S.stepUpUnresolved,e[18]=_,e[19]=z):z=e[19];let B=z,ce;e[20]!==c||e[21]!==l?(ce=se(c,l),e[20]=c,e[21]=l,e[22]=ce):ce=e[22];let V=ce,H;e[23]!==R||e[24]!==B?(H=R?(0,$.jsxs)(I,{variant:B?`info`:`error`,"aria-live":`polite`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:B?`Passkey needed`:`That did not work`}),(0,$.jsx)(F,{children:R})]}):null,e[23]=R,e[24]=B,e[25]=H):H=e[25];let U;e[26]===ne?U=e[27]:(U=ne?(0,$.jsxs)(I,{variant:`warning`,"aria-live":`polite`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:`GitHub connection did not complete`}),(0,$.jsx)(F,{children:ne})]}):null,e[26]=ne,e[27]=U);let K;e[28]!==f||e[29]!==p?(K=f===null&&p!==`stale`?(0,$.jsxs)(I,{variant:`info`,"aria-live":`polite`,children:[(0,$.jsx)(A,{"aria-hidden":!0}),(0,$.jsx)(P,{children:`Checking account security`}),(0,$.jsx)(F,{children:`Reading which fallback sign-in methods are configured on this Hub.`})]}):null,e[28]=f,e[29]=p,e[30]=K):K=e[30];let J;e[31]!==C||e[32]!==f||e[33]!==p?(J=p===`stale`?(0,$.jsxs)(I,{variant:`warning`,"aria-live":`polite`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:f===null?`Account security unavailable`:`Account security may be outdated`}),(0,$.jsx)(F,{children:f===null?`Ryco could not read the current password, authenticator, and email state.`:`These controls use the last state Ryco successfully read from the Hub.`}),(0,$.jsx)(oe,{children:(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:C,onClick:Ke,children:`Retry`})})]}):null,e[31]=C,e[32]=f,e[33]=p,e[34]=J):J=e[34];let Y;e[35]!==C||e[36]!==V?(Y=V?(0,$.jsxs)(I,{variant:V.variant,"aria-live":`polite`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:V.title}),(0,$.jsx)(F,{children:V.description}),(0,$.jsx)(oe,{children:(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:C,onClick:()=>o(!0),children:V.actionLabel})})]}):null,e[35]=C,e[36]=V,e[37]=Y):Y=e[37];let X;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,$.jsx)(j,{"aria-hidden":!0,className:`size-3.5`}),e[38]=X):X=e[38];let fe=n?.displayName??`Signed in`,Z;e[39]===n?Z=e[40]:(Z=n?`${n.role} · joined ${Be(n.createdAt)??`unknown`}`:null,e[39]=n,e[40]=Z);let pe;e[41]!==fe||e[42]!==Z?(pe=(0,$.jsx)(he,{title:`Account`,icon:X,children:(0,$.jsx)(_e,{title:fe,description:`The Hub account these credentials belong to.`,status:Z})}),e[41]=fe,e[42]=Z,e[43]=pe):pe=e[43];let me;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,$.jsx)(Me,{}),e[44]=me):me=e[44];let ve;e[45]!==h||e[46]!==C||e[47]!==y||e[48]!==D||e[49]!==T?.link||e[50]!==re||e[51]!==k?(ve=D||T?.link?(0,$.jsx)(dt,{identity:D,actionsAvailable:T?.link===!0,busy:C||y,actionStatus:h,onConnect:()=>void k(),run:re}):null,e[45]=h,e[46]=C,e[47]=y,e[48]=D,e[49]=T?.link,e[50]=re,e[51]=k,e[52]=ve):ve=e[52];let ye=l===`loading`,be=l===`stale`,Se;e[53]!==S.cancel||e[54]!==S.run||e[55]!==h||e[56]!==i||e[57]!==C||e[58]!==c||e[59]!==ye||e[60]!==be?(Se=(0,$.jsx)(pt,{passkeys:c,loading:ye,stale:be,busy:C,actionStatus:h,addOpen:i,setAddOpen:o,run:S.run,cancel:S.cancel}),e[53]=S.cancel,e[54]=S.run,e[55]=h,e[56]=i,e[57]=C,e[58]=c,e[59]=ye,e[60]=be,e[61]=Se):Se=e[61];let Ce=f?.totpEnrolled??null,we;e[62]!==S.run||e[63]!==h||e[64]!==C||e[65]!==Ce||e[66]!==ee?(we=(0,$.jsx)(mt,{busy:C,actionStatus:h,enrollment:ee,enrolled:Ce,run:S.run}),e[62]=S.run,e[63]=h,e[64]=C,e[65]=Ce,e[66]=ee,e[67]=we):we=e[67];let Te;e[68]!==S.run||e[69]!==h||e[70]!==C||e[71]!==v?(Te=(0,$.jsx)(bt,{busy:C,actionStatus:h,recoveryCodes:v,run:S.run}),e[68]=S.run,e[69]=h,e[70]=C,e[71]=v,e[72]=Te):Te=e[72];let Ee;e[73]!==S.cancel||e[74]!==S.run||e[75]!==h||e[76]!==C||e[77]!==f?(Ee=(0,$.jsx)(_t,{busy:C,actionStatus:h,security:f,run:S.run,cancel:S.cancel}),e[73]=S.cancel,e[74]=S.run,e[75]=h,e[76]=C,e[77]=f,e[78]=Ee):Ee=e[78];let De;e[79]!==S.cancel||e[80]!==S.setStepUpCode||e[81]!==S.stepUp||e[82]!==S.stepUpAttempts||e[83]!==S.stepUpCode||e[84]!==S.submitStepUp||e[85]!==C?(De=(0,$.jsx)(Tt,{pending:S.stepUp,attempts:S.stepUpAttempts,code:S.stepUpCode,onCodeChange:S.setStepUpCode,onSubmit:S.submitStepUp,onCancel:S.cancel,busy:C}),e[79]=S.cancel,e[80]=S.setStepUpCode,e[81]=S.stepUp,e[82]=S.stepUpAttempts,e[83]=S.stepUpCode,e[84]=S.submitStepUp,e[85]=C,e[86]=De):De=e[86];let Oe;return e[87]!==U||e[88]!==K||e[89]!==J||e[90]!==Y||e[91]!==pe||e[92]!==ve||e[93]!==Se||e[94]!==we||e[95]!==Te||e[96]!==Ee||e[97]!==De||e[98]!==H?(Oe=(0,$.jsxs)(ge,{children:[H,U,K,J,Y,pe,me,ve,Se,we,Te,Ee,De]}),e[87]=U,e[88]=K,e[89]=J,e[90]=Y,e[91]=pe,e[92]=ve,e[93]=Se,e[94]=we,e[95]=Te,e[96]=Ee,e[97]=De,e[98]=H,e[99]=Oe):Oe=e[99],Oe}function Ke(){N.refreshAccountSecurity({force:!0})}function qe(){}function Je(e){return N.finishBrowserExternalIdentityConnection(`github`,e)}function Ye(){N.refreshPasskeys(),N.refreshAccountSecurity(),N.refreshExternalIdentityConfiguration()}function Xe(e){return window.location.assign(e)}function Ze(e){return r.startExternalIdentityAuthorization(e)}function Qe(e){return e.provider===`github`}function $e(e){return e.totpEnrollment??null}function et(e){return e.recoveryCodes}function tt(e){return e.errorCode??null}function nt(e){return e.errorMessage}function rt(e){return e.actionStatus}function it(e){return e.externalIdentityConfiguration}function at(e){return e.securityStatus}function ot(e){return e.security}function st(e){return e.passkeysStatus}function ct(e){return e.passkeys}function lt(e){return e.account}function ut(e){return e.accountStatus}function dt(e){let t=(0,xe.c)(33),{identity:n,actionsAvailable:r,busy:i,actionStatus:a,onConnect:o,run:s}=e,[c,l]=(0,Q.useState)(!1),u=a===`connecting-external-identity`,m=a===`disconnecting-external-identity`,g;t[0]===s?g=t[1]:(g=async()=>{await s(`disconnect-github`,ft,{onCommitted:()=>l(!1)})},t[0]=s,t[1]=g);let v=g,y;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsx)(b,{"aria-hidden":!0,className:`size-3.5`}),t[2]=y):y=t[2];let ne=n?`GitHub · @${n.login}`:`GitHub`,x=n?`Use this GitHub identity to sign in to Ryco. Repository access remains separate.`:`Connect GitHub as another way to sign in. Ryco requests no repository access.`,re;t[3]===n?re=t[4]:(re=n?`Connected ${Be(n.connectedAt)??`at an unknown time`}${n.lastUsedAt===null?``:` · last used ${Be(n.lastUsedAt)??`at an unknown time`}`}`:null,t[3]=n,t[4]=re);let C;t[5]!==r||t[6]!==i||t[7]!==u||t[8]!==m||t[9]!==n||t[10]!==o?(C=r?n?(0,$.jsx)(d,{size:`sm`,variant:`outline`,disabled:i,onClick:()=>l(!0),children:(0,$.jsx)(We,{busy:m,children:`Disconnect`})}):(0,$.jsx)(d,{size:`sm`,variant:`outline`,disabled:i,onClick:o,children:(0,$.jsx)(We,{busy:u,children:`Connect GitHub`})}):null,t[5]=r,t[6]=i,t[7]=u,t[8]=m,t[9]=n,t[10]=o,t[11]=C):C=t[11];let w;t[12]!==ne||t[13]!==x||t[14]!==re||t[15]!==C?(w=(0,$.jsx)(_e,{title:ne,description:x,status:re,control:C}),t[12]=ne,t[13]=x,t[14]=re,t[15]=C,t[16]=w):w=t[16];let T;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsxs)(te,{children:[(0,$.jsx)(h,{children:`Disconnect GitHub?`}),(0,$.jsx)(_,{children:`You will no longer be able to sign in with GitHub. Ryco refuses this change if GitHub is your only remaining sign-in method.`})]}),t[17]=T):T=t[17];let E;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`}),children:`Cancel`}),t[18]=E):E=t[18];let D;t[19]===v?D=t[20]:(D=()=>void v(),t[19]=v,t[20]=D);let O;t[21]===m?O=t[22]:(O=(0,$.jsx)(We,{busy:m,children:`Disconnect GitHub`}),t[21]=m,t[22]=O);let k;t[23]!==i||t[24]!==D||t[25]!==O?(k=(0,$.jsxs)(p,{children:[T,(0,$.jsxs)(ee,{children:[E,(0,$.jsx)(d,{disabled:i,onClick:D,children:O})]})]}),t[23]=i,t[24]=D,t[25]=O,t[26]=k):k=t[26];let A;t[27]!==c||t[28]!==k?(A=(0,$.jsx)(f,{open:c,onOpenChange:l,children:k}),t[27]=c,t[28]=k,t[29]=A):A=t[29];let j;return t[30]!==A||t[31]!==w?(j=(0,$.jsxs)(he,{title:`Connected accounts`,icon:y,children:[w,A]}),t[30]=A,t[31]=w,t[32]=j):j=t[32],j}function ft(e){return N.disconnectExternalIdentity(`github`,e)}function pt({passkeys:e,loading:t,stale:n,busy:r,actionStatus:i,addOpen:a,setAddOpen:o,run:s,cancel:c}){let[l,u]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(null),[T,k]=(0,Q.useState)(null),A=i===`adding-passkey`,j=i===`revoking-passkey`,M=J(e),P=L(e),oe=H(e),F=(0,Q.useCallback)(()=>{u(``),o(!1)},[o]),I=async e=>{e.preventDefault();let t=K(l);await s(`add-passkey`,e=>N.addPasskey({passkeyLabel:t,...e}),{onCommitted:F,onAbandoned:F})},R=async()=>{let e=b;if(e){x(null),k(e.id);try{await N.revokePasskey(e.id)}finally{k(null)}}};return(0,$.jsxs)(he,{title:`Passkeys`,icon:(0,$.jsx)(O,{"aria-hidden":!0,className:`size-3.5`}),headerAction:(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:r,onClick:()=>o(!0),children:`Add passkey`}),children:[(0,$.jsx)(_e,{title:`Passkeys on this account`,description:`A passkey is the strongest way in. Add one for every device you sign in from, and keep at least two so losing a device does not lock you out.`,status:n?`This list could not be refreshed and may be out of date.`:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`span`,{children:`${String(M.length)} usable ${M.length===1?`passkey`:`passkeys`}`}),P>0?(0,$.jsx)(`span`,{children:` · ${String(P)} synced to a password manager`}):null]})}),t&&e.length===0?(0,$.jsx)(_e,{title:`Loading passkeys…`,description:`Reading the credentials on file.`}):null,!t&&e.length===0?(0,$.jsx)(_e,{title:`No passkeys yet`,description:`Add one now — without a passkey you can only get back in through a fallback credential.`}):null,oe.map(e=>{let t=fe(e),n=z(e),i=Be(e.createdAt),a=Be(e.lastUsedAt);return(0,$.jsx)(_e,{title:(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[Z(e),t?(0,$.jsx)(E,{variant:`error`,size:`sm`,children:`Revoked`}):null]}),description:t?`Revoked${e.revocationReasonCode?` — ${e.revocationReasonCode}`:``}. This credential can no longer sign in.`:n??`The Hub did not report whether this credential is backed up.`,status:[i?`Added ${i}`:null,a?`Last used ${a}`:`Never used`].filter(e=>e!==null).join(` · `),control:t?null:(0,$.jsx)(d,{size:`xs`,variant:`destructive-outline`,"aria-label":`Revoke ${Z(e)}`,disabled:r,onClick:()=>x(e),children:(0,$.jsxs)(We,{busy:j&&T===e.id,children:[(0,$.jsx)(D,{"aria-hidden":!0}),`Revoke`]})})},e.id)}),(0,$.jsx)(C,{open:a,onOpenChange:e=>{if(e){o(!0);return}r||F()},children:(0,$.jsx)(m,{className:`max-w-md`,children:(0,$.jsxs)(`form`,{onSubmit:e=>void I(e),children:[(0,$.jsxs)(y,{children:[(0,$.jsx)(g,{children:`Add a passkey`}),(0,$.jsx)(re,{children:`Your browser will ask you to create a passkey for this account. Adding one replaces the current Hub session with a fresh one.`})]}),(0,$.jsxs)(ne,{className:`space-y-3`,children:[(0,$.jsx)(w,{htmlFor:`account-passkey-label`,children:`Name (optional)`}),(0,$.jsx)(ae,{id:`account-passkey-label`,value:l,autoComplete:`off`,placeholder:`Work laptop`,disabled:A,className:ie,onChange:e=>u(e.target.value)})]}),(0,$.jsxs)(v,{children:[(0,$.jsx)(d,{variant:`outline`,onClick:()=>{c(),F()},children:`Cancel`}),(0,$.jsx)(d,{type:`submit`,disabled:r,children:(0,$.jsx)(We,{busy:A,children:`Create passkey`})})]})]})})}),(0,$.jsx)(f,{open:b!==null,onOpenChange:e=>{r||e||x(null)},children:(0,$.jsxs)(p,{children:[(0,$.jsxs)(te,{children:[(0,$.jsx)(h,{children:`Revoke this passkey?`}),(0,$.jsxs)(_,{children:[M.length===1?`This is the only usable passkey on this account. `:``,b?Z(b):``,` will stop working immediately, on every device it is stored on. This cannot be undone — you would have to enrol the device again.`]})]}),(0,$.jsxs)(ee,{children:[(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`}),children:`Keep it`}),(0,$.jsx)(d,{variant:`destructive`,disabled:r,onClick:()=>void R(),children:`Revoke passkey`})]})]})})]})}function mt(e){let t=(0,xe.c)(61),{busy:n,actionStatus:r,enrollment:i,enrolled:a,run:o}=e,[s,c]=(0,Q.useState)(``),[l,u]=(0,Q.useState)(!1),b=r===`enrolling-totp`,x=r===`confirming-totp`,T=r===`revoking-totp`,E;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(E=()=>{c(``),N.dismissTotpEnrollment()},t[0]=E):E=t[0];let D=E,O;t[1]===s?O=t[2]:(O=async e=>{e.preventDefault();let t=U(s);t.length!==0&&(await N.confirmTotpEnrollment({code:t}),c(``))},t[1]=s,t[2]=O);let k=O,j;t[3]===o?j=t[4]:(j=async()=>{u(!1),await o(`revoke-totp`,gt)},t[3]=o,t[4]=j);let M=j,P;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(A,{"aria-hidden":!0,className:`size-3.5`}),t[5]=P):P=t[5];let oe=a===null?`Checking current state…`:a?`On`:`Off`,F;t[6]!==n||t[7]!==a||t[8]!==b||t[9]!==T?(F=a===null?null:a?(0,$.jsx)(d,{size:`xs`,variant:`destructive-outline`,"aria-label":`Turn off two-factor authentication`,disabled:n,onClick:()=>u(!0),children:(0,$.jsx)(We,{busy:T,children:`Turn off`})}):(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:n,onClick:ht,children:(0,$.jsx)(We,{busy:b,children:`Set up`})}),t[6]=n,t[7]=a,t[8]=b,t[9]=T,t[10]=F):F=t[10];let I;t[11]!==oe||t[12]!==F?(I=(0,$.jsx)(_e,{title:`Authenticator app`,description:`A six-digit code from an authenticator app, required whenever you change credentials from a session that was not started with a passkey. Signing in with a passkey never asks for one.`,status:oe,control:F}),t[11]=oe,t[12]=F,t[13]=I):I=t[13];let L=i!==null,R;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{e||D()},t[14]=R):R=t[14];let z;t[15]===k?z=t[16]:(z=e=>void k(e),t[15]=k,t[16]=z);let se;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,$.jsxs)(y,{children:[(0,$.jsx)(g,{children:`Set up two-factor authentication`}),(0,$.jsx)(re,{children:`Scan this with your authenticator app, then enter the code it shows. This is the only time the key is displayed.`})]}),t[17]=se):se=t[17];let B;t[18]===i?B=t[19]:(B=i?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border bg-white p-4`,children:(0,$.jsx)(ve,{value:i.provisioningUri,size:168,level:`M`,marginSize:1,title:`Two-factor setup code`})}),(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Can't scan? Enter this key manually:`}),(0,$.jsx)(`p`,{"aria-label":`Two-factor setup key`,className:`rounded-lg border border-border bg-background px-3 py-2 font-mono text-sm break-all`,children:i.secretBase32})]})]}):null,t[18]=i,t[19]=B);let ce;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,$.jsx)(w,{htmlFor:`account-totp-confirm`,children:`Code from your app`}),t[20]=ce):ce=t[20];let le;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(le=e=>c(U(e.target.value)),t[21]=le):le=t[21];let V;t[22]!==s||t[23]!==x?(V=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[ce,(0,$.jsx)(ae,{id:`account-totp-confirm`,value:s,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:x,className:ie,onChange:le})]}),t[22]=s,t[23]=x,t[24]=V):V=t[24];let H;t[25]!==B||t[26]!==V?(H=(0,$.jsxs)(ne,{className:`space-y-4`,children:[B,V]}),t[25]=B,t[26]=V,t[27]=H):H=t[27];let W;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,$.jsx)(d,{variant:`outline`,onClick:D,children:`Cancel`}),t[28]=W):W=t[28];let G;t[29]!==n||t[30]!==s?(G=n||!Y(s),t[29]=n,t[30]=s,t[31]=G):G=t[31];let K;t[32]===x?K=t[33]:(K=(0,$.jsx)(We,{busy:x,children:`Turn on`}),t[32]=x,t[33]=K);let q;t[34]!==G||t[35]!==K?(q=(0,$.jsxs)(v,{children:[W,(0,$.jsx)(d,{type:`submit`,disabled:G,children:K})]}),t[34]=G,t[35]=K,t[36]=q):q=t[36];let J;t[37]!==z||t[38]!==H||t[39]!==q?(J=(0,$.jsx)(m,{className:`max-w-md`,children:(0,$.jsxs)(`form`,{onSubmit:z,children:[se,H,q]})}),t[37]=z,t[38]=H,t[39]=q,t[40]=J):J=t[40];let ue;t[41]!==J||t[42]!==L?(ue=(0,$.jsx)(C,{open:L,onOpenChange:R,children:J}),t[41]=J,t[42]=L,t[43]=ue):ue=t[43];let X;t[44]===n?X=t[45]:(X=e=>{n||u(e)},t[44]=n,t[45]=X);let de;t[46]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsxs)(te,{children:[(0,$.jsx)(h,{children:`Remove two-factor authentication?`}),(0,$.jsx)(_,{children:`Password, recovery-code, and emailed-link sign-ins will no longer need a code from your authenticator app. You can set it up again at any time.`})]}),t[46]=de):de=t[46];let fe;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`}),children:`Keep it on`}),t[47]=fe):fe=t[47];let Z;t[48]===M?Z=t[49]:(Z=()=>void M(),t[48]=M,t[49]=Z);let pe;t[50]!==n||t[51]!==Z?(pe=(0,$.jsxs)(p,{children:[de,(0,$.jsxs)(ee,{children:[fe,(0,$.jsx)(d,{variant:`destructive`,disabled:n,onClick:Z,children:`Remove two-factor`})]})]}),t[50]=n,t[51]=Z,t[52]=pe):pe=t[52];let me;t[53]!==l||t[54]!==X||t[55]!==pe?(me=(0,$.jsx)(f,{open:l,onOpenChange:X,children:pe}),t[53]=l,t[54]=X,t[55]=pe,t[56]=me):me=t[56];let ge;return t[57]!==ue||t[58]!==me||t[59]!==I?(ge=(0,$.jsxs)(he,{title:`Two-factor authentication`,icon:P,children:[I,ue,me]}),t[57]=ue,t[58]=me,t[59]=I,t[60]=ge):ge=t[60],ge}function ht(){N.beginTotpEnrollment()}function gt(e){return N.revokeTotp(e)}function _t(e){let t=(0,xe.c)(86),{busy:n,actionStatus:r,security:i,run:a,cancel:o}=e,[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(``),[b,x]=(0,Q.useState)(``),[T,E]=(0,Q.useState)(!1),[D,k]=(0,Q.useState)(!1),A=r===`setting-password`,j=r===`removing-password`,M;t[0]!==b||t[1]!==l?(M=me(l,b),t[0]=b,t[1]=l,t[2]=M):M=t[2];let P=M,oe;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(oe=()=>{u(``),x(``),E(!1)},t[3]=oe):oe=t[3];let F=oe,I;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(I=()=>{F(),c(!1)},t[4]=I):I=t[4];let L=I,R;t[5]===o?R=t[6]:(R=()=>{o(),L()},t[5]=o,t[6]=R);let z=R,se;t[7]!==P||t[8]!==l||t[9]!==a?(se=async e=>{e.preventDefault(),E(!0),!P&&await a(`set-password`,e=>N.setPassword({password:l,...e}),{onCommitted:L,onAbandoned:L})},t[7]=P,t[8]=l,t[9]=a,t[10]=se):se=t[10];let B=se,ce;t[11]===a?ce=t[12]:(ce=async()=>{k(!1),await a(`remove-password`,vt)},t[11]=a,t[12]=ce);let le=ce,V;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(O,{"aria-hidden":!0,className:`size-3.5`}),t[13]=V):V=t[13];let H=i===null?`Checking current state…`:i.passwordConfigured?`Set`:`Not set`,U;t[14]!==n||t[15]!==j||t[16]!==i||t[17]!==A?(U=i===null?null:(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(d,{size:`xs`,variant:`outline`,disabled:n,onClick:()=>c(!0),children:(0,$.jsx)(We,{busy:A,children:i.passwordConfigured?`Change`:`Set password`})}),i.passwordConfigured?(0,$.jsx)(d,{size:`xs`,variant:`destructive-outline`,"aria-label":`Delete the fallback password`,disabled:n,onClick:()=>k(!0),children:(0,$.jsx)(We,{busy:j,children:`Remove`})}):null]}),t[14]=n,t[15]=j,t[16]=i,t[17]=A,t[18]=U):U=t[18];let W;t[19]!==H||t[20]!==U?(W=(0,$.jsx)(_e,{title:`Fallback password`,description:`A password is a fallback, not an equal of a passkey: it can be phished and reused, and a session started with one has to prove itself again before changing credentials. Keep a passkey as your normal way in.`,status:H,control:U}),t[19]=H,t[20]=U,t[21]=W):W=t[21];let G=i===null?void 0:i.email,K=i?.emailDeliveryConfigured,q;t[22]!==r||t[23]!==n||t[24]!==a||t[25]!==G||t[26]!==K?(q=(0,$.jsx)(yt,{busy:n,actionStatus:r,email:G,deliveryConfigured:K,run:a}),t[22]=r,t[23]=n,t[24]=a,t[25]=G,t[26]=K,t[27]=q):q=t[27];let J;t[28]===z?J=t[29]:(J=e=>{if(e){c(!0);return}z()},t[28]=z,t[29]=J);let Y;t[30]===B?Y=t[31]:(Y=e=>void B(e),t[30]=B,t[31]=Y);let ue;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,$.jsxs)(y,{children:[(0,$.jsx)(g,{children:`Set a fallback password`}),(0,$.jsx)(re,{children:`This replaces any password already on the account. The Hub rejects passwords that have appeared in a known breach.`})]}),t[32]=ue):ue=t[32];let X;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,$.jsx)(w,{htmlFor:`account-password`,children:`New password`}),t[33]=X):X=t[33];let de;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>u(e.target.value),t[34]=de):de=t[34];let fe;t[35]!==l||t[36]!==A?(fe=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[X,(0,$.jsx)(ae,{id:`account-password`,type:`password`,value:l,autoComplete:`new-password`,maxLength:256,disabled:A,className:ie,onChange:de})]}),t[35]=l,t[36]=A,t[37]=fe):fe=t[37];let Z;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,$.jsx)(w,{htmlFor:`account-password-confirm`,children:`Confirm password`}),t[38]=Z):Z=t[38];let pe;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>x(e.target.value),t[39]=pe):pe=t[39];let ge;t[40]!==b||t[41]!==A?(ge=(0,$.jsxs)(`div`,{className:`space-y-2`,children:[Z,(0,$.jsx)(ae,{id:`account-password-confirm`,type:`password`,value:b,autoComplete:`new-password`,maxLength:256,disabled:A,className:ie,onChange:pe})]}),t[40]=b,t[41]=A,t[42]=ge):ge=t[42];let ve;t[43]!==P||t[44]!==T?(ve=T&&P?(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-destructive-foreground`,children:P}):null,t[43]=P,t[44]=T,t[45]=ve):ve=t[45];let ye;t[46]!==fe||t[47]!==ge||t[48]!==ve?(ye=(0,$.jsxs)(ne,{className:`space-y-3`,children:[fe,ge,ve]}),t[46]=fe,t[47]=ge,t[48]=ve,t[49]=ye):ye=t[49];let be;t[50]===z?be=t[51]:(be=(0,$.jsx)(d,{variant:`outline`,onClick:z,children:`Cancel`}),t[50]=z,t[51]=be);let Se;t[52]===A?Se=t[53]:(Se=(0,$.jsx)(We,{busy:A,children:`Save password`}),t[52]=A,t[53]=Se);let Ce;t[54]!==n||t[55]!==Se?(Ce=(0,$.jsx)(d,{type:`submit`,disabled:n,children:Se}),t[54]=n,t[55]=Se,t[56]=Ce):Ce=t[56];let we;t[57]!==be||t[58]!==Ce?(we=(0,$.jsxs)(v,{children:[be,Ce]}),t[57]=be,t[58]=Ce,t[59]=we):we=t[59];let Te;t[60]!==Y||t[61]!==ye||t[62]!==we?(Te=(0,$.jsx)(m,{className:`max-w-md`,children:(0,$.jsxs)(`form`,{onSubmit:Y,children:[ue,ye,we]})}),t[60]=Y,t[61]=ye,t[62]=we,t[63]=Te):Te=t[63];let Ee;t[64]!==s||t[65]!==J||t[66]!==Te?(Ee=(0,$.jsx)(C,{open:s,onOpenChange:J,children:Te}),t[64]=s,t[65]=J,t[66]=Te,t[67]=Ee):Ee=t[67];let De;t[68]===n?De=t[69]:(De=e=>{n||k(e)},t[68]=n,t[69]=De);let Oe;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,$.jsxs)(te,{children:[(0,$.jsx)(h,{children:`Remove the password?`}),(0,$.jsx)(_,{children:`You will no longer be able to sign in with a password. Make sure you still have a passkey, or recovery codes you have saved.`})]}),t[70]=Oe):Oe=t[70];let ke;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`}),children:`Keep it`}),t[71]=ke):ke=t[71];let Ae;t[72]===le?Ae=t[73]:(Ae=()=>void le(),t[72]=le,t[73]=Ae);let je;t[74]!==n||t[75]!==Ae?(je=(0,$.jsxs)(p,{children:[Oe,(0,$.jsxs)(ee,{children:[ke,(0,$.jsx)(d,{variant:`destructive`,disabled:n,onClick:Ae,children:`Remove password`})]})]}),t[74]=n,t[75]=Ae,t[76]=je):je=t[76];let Me;t[77]!==D||t[78]!==De||t[79]!==je?(Me=(0,$.jsx)(f,{open:D,onOpenChange:De,children:je}),t[77]=D,t[78]=De,t[79]=je,t[80]=Me):Me=t[80];let Ne;return t[81]!==W||t[82]!==q||t[83]!==Ee||t[84]!==Me?(Ne=(0,$.jsxs)(he,{title:`Fallback sign-in`,icon:V,children:[W,q,Ee,Me]}),t[81]=W,t[82]=q,t[83]=Ee,t[84]=Me,t[85]=Ne):Ne=t[85],Ne}function vt(e){return N.removePassword(e)}function yt(e){let t=(0,xe.c)(25),{busy:n,actionStatus:r,email:i,deliveryConfigured:a,run:o}=e,[s,c]=(0,Q.useState)(``),[l,f]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(!1),h=r===`requesting-email-verification`,g;t[0]===s?g=t[1]:(g=X(s),t[0]=s,t[1]=g);let _=g,v;t[2]!==s||t[3]!==_||t[4]!==o?(v=async e=>{e.preventDefault(),f(!0),m(!1),!_&&await o(`request-email-verification`,e=>N.requestEmailVerification({email:s.trim(),...e}),{onCommitted:()=>{m(!0),c(``),f(!1)}})},t[2]=s,t[3]=_,t[4]=o,t[5]=v):v=t[5];let ee=v,y;t[6]===a?y=t[7]:(y=a===!1?(0,$.jsx)(`div`,{className:`border-t border-border/60 px-4 pt-3.5 sm:px-5`,children:(0,$.jsxs)(I,{variant:`warning`,children:[(0,$.jsx)(u,{"aria-hidden":!0}),(0,$.jsx)(P,{children:`No mail will arrive yet`}),(0,$.jsx)(F,{children:`This Hub has no mail transport configured, so verification messages are generated and discarded. The request below will be accepted and nothing will be delivered until an operator wires one up. Do not rely on email as your way back into the account.`})]})}):null,t[6]=a,t[7]=y);let te=a?`Used for account recovery after verification. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`:`Used for account recovery once mail delivery is switched on. The Hub answers the same way whether or not the address is already known, so this never confirms who owns it.`,ne=i===void 0?`Checking current state…`:i===null?`Not set`:`${i.verified?`Verified`:`Verification pending`} · ${i.address}`,b;t[8]!==p||t[9]!==n||t[10]!==i||t[11]!==a||t[12]!==s||t[13]!==_||t[14]!==h||t[15]!==ee||t[16]!==l?(b=i===void 0?null:(0,$.jsxs)(`form`,{className:`pt-3 pb-3.5`,onSubmit:e=>void ee(e),children:[(0,$.jsxs)(`div`,{className:`flex flex-col gap-2 sm:flex-row`,children:[(0,$.jsx)(ae,{"aria-label":`Email address`,type:`email`,value:s,autoComplete:`email`,placeholder:`you@example.com`,maxLength:254,disabled:h,className:ie,onChange:e=>{c(e.target.value),m(!1)}}),(0,$.jsx)(d,{type:`submit`,size:`sm`,variant:`outline`,disabled:n,className:`shrink-0`,children:(0,$.jsx)(We,{busy:h,children:i===null?`Send verification`:i.verified?`Change email`:`Resend or change`})})]}),l&&_?(0,$.jsx)(`p`,{role:`alert`,className:`pt-2 text-xs text-destructive-foreground`,children:_}):null,p?(0,$.jsx)(`p`,{role:`status`,className:`pt-2 text-xs text-muted-foreground`,children:a?`Verification email requested. Check your inbox and spam folder; delivery may take a moment.`:`Request accepted by the Hub. No message will be delivered until a mail transport is configured.`}):null]}),t[8]=p,t[9]=n,t[10]=i,t[11]=a,t[12]=s,t[13]=_,t[14]=h,t[15]=ee,t[16]=l,t[17]=b):b=t[17];let x;t[18]!==te||t[19]!==ne||t[20]!==b?(x=(0,$.jsx)(_e,{title:`Recovery email`,description:te,status:ne,children:b}),t[18]=te,t[19]=ne,t[20]=b,t[21]=x):x=t[21];let S;return t[22]!==y||t[23]!==x?(S=(0,$.jsxs)($.Fragment,{children:[y,x]}),t[22]=y,t[23]=x,t[24]=S):S=t[24],S}function bt(e){let t=(0,xe.c)(52),{busy:r,actionStatus:a,recoveryCodes:o,run:s}=e,[l,u]=(0,Q.useState)(!1),b=a===`regenerating-recovery-codes`,{copyToClipboard:x,isCopied:w}=c(),T;t[0]===s?T=t[1]:(T=async()=>{u(!1),await s(`regenerate-recovery-codes`,wt)},t[0]=s,t[1]=T);let E=T,D;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(k,{"aria-hidden":!0,className:`size-3.5`}),t[2]=D):D=t[2];let O;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(O=()=>u(!0),t[3]=O):O=t[3];let A;t[4]===b?A=t[5]:(A=(0,$.jsx)(We,{busy:b,children:`Generate new codes`}),t[4]=b,t[5]=A);let j;t[6]!==r||t[7]!==A?(j=(0,$.jsx)(_e,{title:`One-time recovery codes`,description:`Single-use codes that get you back in when you have lost every passkey. They are a last resort, not a substitute for one — anyone holding a code can sign in as you.`,status:`Ryco shows them once and never writes them to browser storage.`,control:(0,$.jsx)(d,{size:`xs`,variant:`destructive-outline`,disabled:r,onClick:O,children:A})}),t[6]=r,t[7]=A,t[8]=j):j=t[8];let M;t[9]===r?M=t[10]:(M=e=>{r||u(e)},t[9]=r,t[10]=M);let N;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsxs)(te,{children:[(0,$.jsx)(h,{children:`Replace your recovery codes?`}),(0,$.jsx)(_,{children:`Every code you have already saved stops working immediately. You will get a new set, shown once — if you lose them you will have to generate another set from a session you can still sign in to.`})]}),t[11]=N):N=t[11];let ie;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,$.jsx)(S,{render:(0,$.jsx)(d,{variant:`outline`}),children:`Cancel`}),t[12]=ie):ie=t[12];let ae;t[13]===E?ae=t[14]:(ae=()=>void E(),t[13]=E,t[14]=ae);let P;t[15]!==r||t[16]!==ae?(P=(0,$.jsxs)(p,{children:[N,(0,$.jsxs)(ee,{children:[ie,(0,$.jsx)(d,{variant:`destructive`,disabled:r,onClick:ae,children:`Replace codes`})]})]}),t[15]=r,t[16]=ae,t[17]=P):P=t[17];let oe;t[18]!==l||t[19]!==P||t[20]!==M?(oe=(0,$.jsx)(f,{open:l,onOpenChange:M,children:P}),t[18]=l,t[19]=P,t[20]=M,t[21]=oe):oe=t[21];let F=o.length>0,I;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,$.jsx)(g,{children:`Save your recovery codes`}),t[22]=I):I=t[22];let L=String(o.length),R;t[23]===L?R=t[24]:(R=(0,$.jsxs)(y,{children:[I,(0,$.jsxs)(re,{children:[`Save all `,L,` codes — they are shown once and cannot be retrieved later. Store them somewhere only you can reach — a password manager, or paper somewhere safe.`]})]}),t[23]=L,t[24]=R);let z;t[25]===o?z=t[26]:(z=o.map(St),t[25]=o,t[26]=z);let se;t[27]===z?se=t[28]:(se=(0,$.jsx)(ne,{children:(0,$.jsx)(`ul`,{"aria-label":`Recovery codes`,className:`grid gap-2 rounded-xl border border-border bg-background p-4 font-mono text-sm break-all sm:grid-cols-2`,children:z})}),t[27]=z,t[28]=se);let B;t[29]!==x||t[30]!==o?(B=()=>x(ce(o),void 0),t[29]=x,t[30]=o,t[31]=B):B=t[31];let le;t[32]===w?le=t[33]:(le=w?(0,$.jsx)(i,{"aria-hidden":!0}):(0,$.jsx)(n,{"aria-hidden":!0}),t[32]=w,t[33]=le);let V=w?`Copied`:`Copy codes`,H;t[34]!==B||t[35]!==le||t[36]!==V?(H=(0,$.jsxs)(d,{variant:`outline`,onClick:B,children:[le,V]}),t[34]=B,t[35]=le,t[36]=V,t[37]=H):H=t[37];let U;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,$.jsx)(d,{onClick:xt,children:`I saved the codes`}),t[38]=U):U=t[38];let W;t[39]===H?W=t[40]:(W=(0,$.jsxs)(v,{children:[H,U]}),t[39]=H,t[40]=W);let G;t[41]!==R||t[42]!==se||t[43]!==W?(G=(0,$.jsxs)(m,{className:`max-w-md`,showCloseButton:!1,children:[R,se,W]}),t[41]=R,t[42]=se,t[43]=W,t[44]=G):G=t[44];let K;t[45]!==F||t[46]!==G?(K=(0,$.jsx)(C,{open:F,disablePointerDismissal:!0,onOpenChange:Ct,children:G}),t[45]=F,t[46]=G,t[47]=K):K=t[47];let q;return t[48]!==oe||t[49]!==K||t[50]!==j?(q=(0,$.jsxs)(he,{title:`Recovery codes`,icon:D,children:[j,oe,K]}),t[48]=oe,t[49]=K,t[50]=j,t[51]=q):q=t[51],q}function xt(){return N.dismissRecoveryCodes()}function St(e){return(0,$.jsx)(`li`,{children:e},e)}function Ct(e,t){e||t.cancel()}function wt(e){return N.regenerateRecoveryCodes(e)}function Tt(e){let t=(0,xe.c)(45),{pending:n,attempts:r,code:i,onCodeChange:a,onSubmit:o,onCancel:s,busy:c}=e,l=n!==null,u;t[0]===s?u=t[1]:(u=e=>{e||s()},t[0]=s,t[1]=u);let f;t[2]===o?f=t[3]:(f=e=>{e.preventDefault(),o()},t[2]=o,t[3]=f);let p;t[4]===n?p=t[5]:(p=n?R(n.action):``,t[4]=n,t[5]=p);let h;t[6]===p?h=t[7]:(h=(0,$.jsx)(g,{children:p}),t[6]=p,t[7]=h);let _=n?.inferred??!1,ee;t[8]!==r||t[9]!==_?(ee=pe(r,_),t[8]=r,t[9]=_,t[10]=ee):ee=t[10];let te;t[11]===ee?te=t[12]:(te=(0,$.jsx)(re,{children:ee}),t[11]=ee,t[12]=te);let b;t[13]!==h||t[14]!==te?(b=(0,$.jsxs)(y,{children:[h,te]}),t[13]=h,t[14]=te,t[15]=b):b=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(w,{htmlFor:`account-step-up-code`,children:`Authenticator code`}),t[16]=x):x=t[16];let S;t[17]===a?S=t[18]:(S=e=>a(U(e.target.value)),t[17]=a,t[18]=S);let T;t[19]!==c||t[20]!==i||t[21]!==S?(T=(0,$.jsxs)(ne,{className:`space-y-2`,children:[x,(0,$.jsx)(ae,{id:`account-step-up-code`,value:i,inputMode:`numeric`,autoComplete:`one-time-code`,maxLength:16,disabled:c,className:ie,onChange:S})]}),t[19]=c,t[20]=i,t[21]=S,t[22]=T):T=t[22];let E;t[23]===s?E=t[24]:(E=(0,$.jsx)(d,{variant:`outline`,onClick:s,children:`Cancel`}),t[23]=s,t[24]=E);let D;t[25]!==c||t[26]!==i?(D=c||!Y(i),t[25]=c,t[26]=i,t[27]=D):D=t[27];let O;t[28]===c?O=t[29]:(O=(0,$.jsx)(We,{busy:c,children:`Confirm code`}),t[28]=c,t[29]=O);let k;t[30]!==D||t[31]!==O?(k=(0,$.jsx)(d,{type:`submit`,disabled:D,children:O}),t[30]=D,t[31]=O,t[32]=k):k=t[32];let A;t[33]!==E||t[34]!==k?(A=(0,$.jsxs)(v,{children:[E,k]}),t[33]=E,t[34]=k,t[35]=A):A=t[35];let j;t[36]!==T||t[37]!==A||t[38]!==f||t[39]!==b?(j=(0,$.jsx)(m,{className:`max-w-sm`,children:(0,$.jsxs)(`form`,{onSubmit:f,children:[b,T,A]})}),t[36]=T,t[37]=A,t[38]=f,t[39]=b,t[40]=j):j=t[40];let M;return t[41]!==l||t[42]!==j||t[43]!==u?(M=(0,$.jsx)(C,{open:l,onOpenChange:u,children:j}),t[41]=l,t[42]=j,t[43]=u,t[44]=M):M=t[44],M}export{Ge as AccountSettingsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{Kt as n,n as r}from"./primary-D_D7eLwT.js";import{$r as i,T as a,b as o}from"./src-BSuAGqhK.js";import{$i as s,Ea as c,Ki as l,Nr as u,Or as d,Wi as f,Xi as p,_l as m,al as ee,ar as te,b as h,bl as g,gl as ne,hl as re,kr as ie,p as _,u as v,y,zr as ae}from"./runtime-Djy96GJd.js";import{t as oe}from"./switch-DD1qVLgN.js";import{t as b}from"./compiler-runtime-qmuS0Svy.js";import{a as x,c as se,n as ce,o as S,s as C}from"./badge-Dg7mXiOh.js";import{r as le,y as w}from"./RootAppShell-BdQCs2XJ.js";import{t as ue}from"./sparkles-isHutYWU.js";import{t as de}from"./refresh-cw-DY3_Ph-S.js";import{t as T}from"./toastHelpers-CSQRKo4F.js";import{i as E,n as fe,r as D}from"./settingsLayout-C6SUmJVB.js";import{t as O}from"./ProviderModelPicker-dwWhl7Uf.js";var pe=[`Thread titles`,`Project or repository names`,`Branch names`,`Bucketed creation and activity age`,`Running, approval, input, queue, failure, and delivery state`,`Pull request or linked issue title and state`,`Up to 600 characters from the latest user request`],k=[{value:0,label:`Manual only`},{value:3e5,label:`Every 5 minutes`},{value:6e5,label:`Every 10 minutes`},{value:18e5,label:`Every 30 minutes`},{value:36e5,label:`Every hour`},{value:216e5,label:`Every 6 hours`},{value:864e5,label:`Every 24 hours`}];function A(e){return{...e.enabled===void 0?{}:{aiFocusEnabled:e.enabled},...e.refreshIntervalMs===void 0?{}:{aiFocusRefreshIntervalMs:e.refreshIntervalMs}}}function me(e){return e.map(e=>{let t=e.serverConfig,n=t?.environment.capabilities.threadPriorityRanking===!0,r=t?.settings.inboxPriorityModelSelection??null,i=t?r??t.settings.textGenerationModelSelection:null,a=i===null?null:t?.providers.find(e=>e.instanceId===i.instanceId)??null;return{...e,supported:n,inherited:r===null,effectiveModelSelection:i,effectiveProvider:a}})}function j(e,t){let n=e.find(e=>e.instanceId===t);return!!(n&&n.enabled&&n.installed&&n.availability!==`unavailable`&&n.status!==`disabled`&&n.status!==`error`)}function M(e){if(e.selection!==null&&!j(e.serverConfig.providers,e.selection.instanceId))throw Error(`That provider instance is not available on this environment.`);return{inboxPriorityModelSelection:e.selection}}var N=b(),P=e(t(),1),F=m();function he(e){return e instanceof Error?e.message:`An unexpected error occurred.`}function ge(e){let t=(0,N.c)(12),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,F.jsx)(w,{className:`size-3.5`}),t[0]=n):n=t[0];let r;t[1]===e.value?r=t[2]:(r=e.value?.toString()??`off`,t[1]=e.value,t[2]=r);let i;t[3]===e?i=t[4]:(i=t=>{let n=t===`off`?null:Number(t);(n===null||a.includes(n))&&e.onChange(n)},t[3]=e,t[4]=i);let o=e.value===null?`Off`:`After ${e.value} ${e.value===1?`day`:`days`}`,s;t[5]===o?s=t[6]:(s=(0,F.jsx)(C,{className:`w-48`,"aria-label":`Auto-settle inactive tasks`,children:(0,F.jsx)(se,{children:o})}),t[5]=o,t[6]=s);let c;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,F.jsxs)(S,{align:`end`,alignItemWithTrigger:!1,children:[(0,F.jsx)(x,{hideIndicator:!0,value:`off`,children:`Off`}),a.map(I)]}),t[7]=c):c=t[7];let l;return t[8]!==r||t[9]!==i||t[10]!==s?(l=(0,F.jsx)(E,{owner:`client`,title:`Housekeeping`,icon:n,children:(0,F.jsx)(D,{title:`Auto-settle inactive tasks`,description:`Move inactive tasks to Settled after their last message or turn. Running work, queued messages, pending input, open pull requests, and tasks kept active are protected.`,control:(0,F.jsxs)(ce,{value:r,onValueChange:i,children:[s,c]})})}),t[8]=r,t[9]=i,t[10]=s,t[11]=l):l=t[11],l}function I(e){return(0,F.jsxs)(x,{hideIndicator:!0,value:String(e),children:[`After `,e,` `,e===1?`day`:`days`]},e)}function _e(){let e=(0,N.c)(2),[t,n]=(0,P.useState)(L),r,i;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>y(()=>{n(v())}),i=[],e[0]=r,e[1]=i):(r=e[0],i=e[1]),(0,P.useEffect)(r,i),t}function L(){return v()}function R({row:e}){let[t,n]=(0,P.useState)(!1),r=e.serverConfig;if(!r||!e.effectiveModelSelection)return null;let i={...r.settings,...o},a=e.effectiveModelSelection,c=s(p(r.providers)),d=f(i,r.providers,a.instanceId,a.model),m=async t=>{n(!0);try{let n=M({serverConfig:r,selection:t});await h(e.environmentId,n)}catch(t){u.add(T({type:`error`,title:`Could not update ${e.label}`,description:he(t)}))}finally{n(!1)}};return(0,F.jsxs)(`div`,{className:`flex flex-wrap items-center justify-end gap-2`,children:[(0,F.jsx)(O,{activeInstanceId:a.instanceId,model:a.model,lockedProvider:null,instanceEntries:c,modelOptionsByInstance:d,compact:!0,disabled:t||!e.connected,...e.connected?{}:{disabledReason:`Connect this environment to change its model.`},onInstanceModelChange:(e,t)=>{m(l({...i,textGenerationModelSelection:g(e,t)},r.providers))}}),e.inherited?null:(0,F.jsx)(ae,{size:`xs`,variant:`ghost`,disabled:t||!e.connected,onClick:()=>void m(null),children:`Use text model`})]})}function z(e){let t=(0,N.c)(6),{row:n}=e,r=n.effectiveProvider?.displayName??n.effectiveProvider?.driver??null,i=n.connected?n.supported?n.inherited?`Inherits the text-generation model${r?` (${r})`:``}.`:`Uses a separate model for Inbox ranking.`:`This node version does not support AI Focus ranking. Other supported nodes still work.`:`Offline — ranking waits for an existing connection.`,a;t[0]===n?a=t[1]:(a=n.supported?(0,F.jsx)(R,{row:n}):void 0,t[0]=n,t[1]=a);let o;return t[2]!==n.label||t[3]!==i||t[4]!==a?(o=(0,F.jsx)(D,{title:n.label,description:i,control:a}),t[2]=n.label,t[3]=i,t[4]=a,t[5]=o):o=t[5],o}function B(){let e=(0,N.c)(59),t=re(),n=ne(),a=d(),{updateSettings:o}=ie(),s=ee(),l;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=r(),e[0]=l):l=e[0];let f=l,p=te(Se),m=_e(),[h,g]=(0,P.useState)(!1);f?.environmentId,f?.label;let _;bb0:{if(t===`node`&&n){let t=n.connected&&n.canManage!==!1,r;e[1]!==t||e[2]!==n.environmentId||e[3]!==n.nodeLabel||e[4]!==n.serverConfig?(r=me([{environmentId:n.environmentId,label:n.nodeLabel,connected:t,serverConfig:n.serverConfig}]),e[1]=t,e[2]=n.environmentId,e[3]=n.nodeLabel,e[4]=n.serverConfig,e[5]=r):r=e[5],_=r;break bb0}let r;if(e[6]!==m||e[7]!==s||e[8]!==p){let t=new Map;f?.environmentId&&t.set(f.environmentId,{label:f.label,config:s});for(let e of m){if(t.has(e.environmentId))continue;let n=p[e.environmentId];t.set(e.environmentId,{label:n?.descriptor?.label??e.knownEnvironment.label,config:n?.serverConfig??null})}for(let[e,n]of Object.entries(p)){let r=i.make(e);t.has(r)||t.set(r,{label:n.descriptor?.label??`Saved environment`,config:n.serverConfig})}r=me([...t].map(xe)),e[6]=m,e[7]=s,e[8]=p,e[9]=r}else r=e[9];_=r}let v=_,y;e[10]===v?y=e[11]:(y=async()=>{g(!0);let e=await le(),t=e.failures;t.length>0?u.add(T({type:`error`,title:`AI Focus refresh failed`,description:t.map(e=>{let{environmentId:t,error:n}=e;return`${v.find(e=>e.environmentId===t)?.label??`Environment`}: ${he(n)}`}).join(` · `)})):u.add(T({type:`success`,title:e.attempted.length>0?`AI Focus refreshed`:`No connected supported nodes`,description:e.attempted.length>0?`Updated ${e.succeeded.length} environment${e.succeeded.length===1?``:`s`}.`:`Connect a supported node to rank its Inbox.`})),g(!1)},e[10]=v,e[11]=y);let b=y,x;e[12]===o?x=e[13]:(x=e=>o({sidebarAutoSettleAfterDays:e}),e[12]=o,e[13]=x);let w;e[14]!==a.sidebarAutoSettleAfterDays||e[15]!==x?(w=(0,F.jsx)(ge,{value:a.sidebarAutoSettleAfterDays,onChange:x}),e[14]=a.sidebarAutoSettleAfterDays,e[15]=x,e[16]=w):w=e[16];let O;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,F.jsx)(ue,{className:`size-3.5`}),e[17]=O):O=e[17];let j;e[18]===o?j=e[19]:(j=e=>o(A({enabled:e})),e[18]=o,e[19]=j);let M;e[20]!==a.aiFocusEnabled||e[21]!==j?(M=(0,F.jsx)(D,{title:`Prioritize the Inbox`,description:`Create a Focus section from pinned, actionable, and model-ranked threads. Focused threads are removed from Active, never duplicated.`,control:(0,F.jsx)(oe,{"aria-label":`Enable AI Focus`,checked:a.aiFocusEnabled,onCheckedChange:j})}),e[20]=a.aiFocusEnabled,e[21]=j,e[22]=M):M=e[22];let I=String(a.aiFocusRefreshIntervalMs),L;e[23]===o?L=e[24]:(L=e=>{let t=Number(e);o(A({refreshIntervalMs:t}))},e[23]=o,e[24]=L);let R;e[25]===a.aiFocusRefreshIntervalMs?R=e[26]:(R=k.find(e=>e.value===a.aiFocusRefreshIntervalMs)?.label??`Every 10 minutes`,e[25]=a.aiFocusRefreshIntervalMs,e[26]=R);let z;e[27]===R?z=e[28]:(z=(0,F.jsx)(C,{className:`w-48`,"aria-label":`AI Focus refresh interval`,children:(0,F.jsx)(se,{children:R})}),e[27]=R,e[28]=z);let B;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,F.jsx)(S,{align:`end`,alignItemWithTrigger:!1,children:k.map(be)}),e[29]=B):B=e[29];let V;e[30]!==z||e[31]!==I||e[32]!==L?(V=(0,F.jsxs)(ce,{value:I,onValueChange:L,children:[z,B]}),e[30]=z,e[31]=I,e[32]=L,e[33]=V):V=e[33];let H;e[34]===b?H=e[35]:(H=()=>void b(),e[34]=b,e[35]=H);let U=h?`size-4 animate-spin`:`size-4`,W;e[36]===U?W=e[37]:(W=(0,F.jsx)(de,{className:U}),e[36]=U,e[37]=W);let G;e[38]!==h||e[39]!==H||e[40]!==W?(G=(0,F.jsx)(ae,{size:`icon-sm`,variant:`outline`,"aria-label":`Refresh AI Focus now`,disabled:h,onClick:H,children:W}),e[38]=h,e[39]=H,e[40]=W,e[41]=G):G=e[41];let K;e[42]!==V||e[43]!==G?(K=(0,F.jsx)(D,{title:`Refresh rankings`,description:`Automatic checks use only nodes that are already connected. Manual-only never starts a connection.`,control:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[V,G]})}),e[42]=V,e[43]=G,e[44]=K):K=e[44];let q;e[45]!==K||e[46]!==M?(q=(0,F.jsxs)(E,{owner:`client`,title:`AI Focus`,icon:O,children:[M,K]}),e[45]=K,e[46]=M,e[47]=q):q=e[47];let J;e[48]===v?J=e[49]:(J=v.length>0?v.map(ye):(0,F.jsx)(D,{title:`No environments available`,description:`Connect a node to configure its Inbox ranking model.`}),e[48]=v,e[49]=J);let Y;e[50]===J?Y=e[51]:(Y=(0,F.jsx)(E,{owner:`node`,title:`Models`,children:J}),e[50]=J,e[51]=Y);let X;e[52]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,F.jsx)(c,{className:`size-3.5`}),e[52]=X):X=e[52];let Z;e[53]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,F.jsx)(`p`,{className:`mb-3 text-xs text-muted-foreground`,children:`Ranking sends only this bounded metadata from each environment. It does not send full chat history, file contents, or message responses.`}),e[53]=Z):Z=e[53];let Q;e[54]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,F.jsx)(E,{owner:`node`,title:`Data sent to the selected model`,icon:X,children:(0,F.jsxs)(`div`,{className:`px-5 py-4`,children:[Z,(0,F.jsx)(`ul`,{className:`grid gap-1.5 text-xs text-foreground/80 sm:grid-cols-2`,children:pe.map(ve)})]})}),e[54]=Q):Q=e[54];let $;return e[55]!==q||e[56]!==Y||e[57]!==w?($=(0,F.jsxs)(fe,{children:[w,q,Y,Q]}),e[55]=q,e[56]=Y,e[57]=w,e[58]=$):$=e[58],$}function ve(e){return(0,F.jsxs)(`li`,{className:`flex gap-2`,children:[(0,F.jsx)(`span`,{"aria-hidden":!0,className:`text-muted-foreground`,children:`•`}),(0,F.jsx)(`span`,{children:e})]},e)}function ye(e){return(0,F.jsx)(z,{row:e},e.environmentId)}function be(e){return(0,F.jsx)(x,{hideIndicator:!0,value:String(e.value),children:e.label},e.value)}function xe(e){let[t,r]=e;return{environmentId:t,label:r.label,connected:_(t)!==null&&n(t).phase===`connected`,serverConfig:r.config}}function Se(e){return e.byId}export{B as AiFocusSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e,t}from"./react-SIfiwpqq.js";import{
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{_l as n}from"./runtime-Djy96GJd.js";import{t as r}from"./compiler-runtime-qmuS0Svy.js";var i=r(),a=e(t(),1),o=n(),s=250;function c(e){let t=(0,i.c)(17),{children:n}=e,r=(0,a.useRef)(null),c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={height:null,isClipping:!1},t[0]=c):c=t[0];let[d,f]=(0,a.useState)(c),p;t[1]===d.isClipping?p=t[2]:(p=()=>{if(!d.isClipping)return;let e=window.setTimeout(()=>{f(u)},s);return()=>window.clearTimeout(e)},t[1]=d.isClipping,t[2]=p);let m;t[3]!==d.height||t[4]!==d.isClipping?(m=[d.height,d.isClipping],t[3]=d.height,t[4]=d.isClipping,t[5]=m):m=t[5],(0,a.useEffect)(p,m);let h,g;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=()=>{let e=r.current;if(!e)return;let t=null,n=null,i=()=>{let t=Math.ceil(e.scrollHeight||e.getBoundingClientRect().height);f(e=>e.height===t?e:{height:t,isClipping:e.height!==null})},a=()=>{t!==null&&(window.cancelAnimationFrame(t),t=null),n!==null&&(window.cancelAnimationFrame(n),n=null)},o=()=>{a(),i(),t=window.requestAnimationFrame(()=>{t=null,i(),n=window.requestAnimationFrame(()=>{n=null,i()})})};o();let s=new ResizeObserver(o);return s.observe(e),()=>{s.disconnect(),a()}},g=[],t[6]=h,t[7]=g):(h=t[6],g=t[7]),(0,a.useLayoutEffect)(h,g);let _;t[8]!==d.height||t[9]!==d.isClipping?(_=d.height===null?void 0:{height:d.height,overflow:d.isClipping?`hidden`:`visible`},t[8]=d.height,t[9]=d.isClipping,t[10]=_):_=t[10];let v;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(v=e=>{e.target===e.currentTarget&&e.propertyName===`height`&&f(l)},t[11]=v):v=t[11];let y;t[12]===n?y=t[13]:(y=(0,o.jsx)(`div`,{ref:r,children:n}),t[12]=n,t[13]=y);let b;return t[14]!==_||t[15]!==y?(b=(0,o.jsx)(`div`,{"data-slot":`animated-height`,className:`transition-[height] duration-200 ease-out motion-reduce:transition-none`,style:_,onTransitionEnd:v,children:y}),t[14]=_,t[15]=y,t[16]=b):b=t[16],b}function l(e){return e.isClipping?{...e,isClipping:!1}:e}function u(e){return e.isClipping?{...e,isClipping:!1}:e}export{c as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{Ca as n,Da as r,Ma as i,Na as a,Nr as o,Vr as s,_l as c,zr as l}from"./runtime-Djy96GJd.js";import{A as u,Dt as d,F as f,I as p,M as m,N as h,P as g,Yn as _,dt as v,ht as y,j as b,lt as x,st as S,t as C,ut as w,vt as T,yt as E}from"./switch-DD1qVLgN.js";import{t as D}from"./compiler-runtime-qmuS0Svy.js";import{t as O}from"./badge-Dg7mXiOh.js";import{K as k,X as A}from"./ContextHandoffEndpointLabel-BildLLDY.js";import{t as j}from"./clipboard-copy-ezz8rnaT.js";import{t as ee}from"./download-BA9L9tK9.js";import{t as te}from"./palette-D18VboLH.js";import{t as M}from"./input-DrOL1KPS.js";import{_ as N,a as P,b as F,f as ne,i as re,l as I,m as L,o as ie,p as ae,u as oe,y as se}from"./appearancePreferences-nFx4MHoI.js";import{C as ce,S as le,_ as R,a as ue,b as de,c as fe,d as pe,f as me,g as z,h as he,i as ge,l as _e,m as B,o as ve,p as ye,r as V,s as H,t as U,u as be,v as xe,x as W,y as Se}from"./useTheme-CVNauCtz.js";import{n as Ce,r as we,t as Te}from"./toggle-group-UeFeTI3u.js";import{i as G,n as K,r as q,t as J}from"./settingsLayout-C6SUmJVB.js";import{It as Ee}from"./main-BbtLAX7M.js";var Y={name:`baseline`,size:24,node:[[`path`,{d:`M4 20h16`,key:`14thso`}],[`path`,{d:`m6 16 6-12 6 12`,key:`1b4byz`}],[`path`,{d:`M8 12h8`,key:`1wcyev`}]]};Y.node;var X=a(Y),De={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};De.node;var Oe=a(De),ke={name:`gauge`,size:24,node:[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]};ke.node;var Ae=a(ke),je={name:`radius`,size:24,node:[[`path`,{d:`M20.34 17.52a10 10 0 1 0-2.82 2.82`,key:`fydyku`}],[`circle`,{cx:`19`,cy:`19`,r:`2`,key:`17f5cg`}],[`path`,{d:`m13.41 13.41 4.18 4.18`,key:`1gqbwc`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]};je.node;var Me=a(je),Ne={name:`type`,size:24,node:[[`path`,{d:`M12 4v16`,key:`1654pz`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`,key:`e0r10z`}],[`path`,{d:`M9 20h6`,key:`s66wpe`}]]};Ne.node;var Pe=a(Ne),Fe={name:`upload`,size:24,node:[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]};Fe.node;var Ie=a(Fe),Z=e(t(),1),Q=D(),Le=`.rycotheme.json`,Re=/[^a-z0-9-_]+/gi;function ze(e){let t=(e.name||e.id).trim().replace(Re,`-`).replace(/^-+|-+$/g,``);return`${t.length>0?t:e.id||`theme`}${Le}`}function Be(e){let t={id:e.id,name:e.name};return e.description&&(t.description=e.description),e.light&&(t.light={...e.light}),e.dark&&(t.dark={...e.dark}),JSON.stringify(t,null,2)}function Ve(e){let t;try{t=JSON.parse(e)}catch(e){throw Error(`Could not parse theme JSON: ${e instanceof Error?e.message:`invalid JSON`}`,{cause:e})}if(!ye(t))throw Error(`Theme JSON does not match the schema (need string id/name and string-only light/dark tokens).`);let n={id:t.id,name:t.name,builtIn:!1};return t.description&&(n.description=t.description),t.light&&(n.light={...t.light}),t.dark&&(n.dark={...t.dark}),n}function He(e,t=`rename`){let n=Ve(e);if(!be().find(e=>e.id===n.id))return ge(n),{theme:n,action:`added`};if(pe(n.id)||t===`rename`){let e={...n,id:_e(n.id)};return ge(e),{theme:e,action:`renamed`}}return de(n.id,n),{theme:n,action:`replaced`}}typeof TextEncoder>`u`||new TextEncoder,typeof TextDecoder>`u`||new TextDecoder;async function Ue(e){let t=Be(e);if(typeof navigator>`u`||!navigator.clipboard)throw Error(`Clipboard API not available in this environment.`);await navigator.clipboard.writeText(t)}function We(e){if(typeof document>`u`||typeof URL>`u`||typeof Blob>`u`)throw Error(`Download not supported in this environment.`);let t=new Blob([Be(e)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=ze(e),r.rel=`noopener`,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(n)}async function Ge(e,t={}){let n=He(await e.text(),t.collision??`rename`);return t.activate&&(Se(n.theme.id),ue(n.theme)),n}var $=c();function Ke(e,t,n){return e<t?t:e>n?n:e}function qe(e){let t=e.trim().replace(/^#/,``),n;if(t.length===3)n=t.split(``).map(e=>`${e}${e}`).join(``);else if(t.length===6)n=t;else return null;return/^[0-9a-fA-F]{6}$/.test(n)?{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16)}:null}function Je({r:e,g:t,b:n}){let r=e=>Ke(Math.round(e),0,255).toString(16).padStart(2,`0`);return`#${r(e)}${r(t)}${r(n)}`}function Ye({r:e,g:t,b:n}){let r=e/255,i=t/255,a=n/255,o=Math.max(r,i,a),s=o-Math.min(r,i,a),c=0;s!==0&&(c=o===r?60*((i-a)/s%6):o===i?60*((a-r)/s+2):60*((r-i)/s+4)),c<0&&(c+=360);let l=o===0?0:s/o;return{h:c,s:l,v:o}}function Xe({h:e,s:t,v:n}){let r=n*t,i=(e%360+360)%360/60,a=r*(1-Math.abs(i%2-1)),o=0,s=0,c=0;i<1?[o,s,c]=[r,a,0]:i<2?[o,s,c]=[a,r,0]:i<3?[o,s,c]=[0,r,a]:i<4?[o,s,c]=[0,a,r]:i<5?[o,s,c]=[a,0,r]:[o,s,c]=[r,0,a];let l=n-r;return{r:(o+l)*255,g:(s+l)*255,b:(c+l)*255}}function Ze(e){let t=(0,Q.c)(71),{value:n,onChange:r,children:i,side:a,align:o,ariaLabel:c,triggerClassName:l}=e,u=a===void 0?`bottom`:a,d=o===void 0?`start`:o,f;t[0]===n?f=t[1]:(f=()=>{let e=qe(n);return e?Ye(e):{h:0,s:0,v:0}},t[0]=n,t[1]=f);let[p,m]=(0,Z.useState)(f),[h,g]=(0,Z.useState)(n),[_,y]=(0,Z.useState)(!1),b=(0,Z.useRef)(null),S=(0,Z.useRef)(null),C=(0,Z.useRef)(r),T=(0,Z.useRef)(p.h),E;t[2]===r?E=t[3]:(E=()=>{C.current=r},t[2]=r,t[3]=E),(0,Z.useEffect)(E);let D,O;t[4]===p.h?(D=t[5],O=t[6]):(D=()=>{T.current=p.h},O=[p.h],t[4]=p.h,t[5]=D,t[6]=O),(0,Z.useEffect)(D,O);let k;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>{if(b.current=null,S.current===null)return;let e=S.current;S.current=null,C.current(e)},t[7]=k):k=t[7];let A=k,j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{S.current=e,b.current===null&&(b.current=requestAnimationFrame(A))},t[8]=j):j=t[8];let ee=j,te,N;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(N=()=>()=>{if(b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),S.current!==null){let e=S.current;S.current=null,C.current(e)}},te=[],t[9]=te,t[10]=N):(te=t[9],N=t[10]),(0,Z.useEffect)(N,te);let P;t[11]===p?P=t[12]:(P=Je(Xe(p)),t[11]=p,t[12]=P);let F=P,ne,re;t[13]!==F||t[14]!==n?(ne=()=>{if(n.toLowerCase()===F.toLowerCase())return;let e=qe(n);if(!e)return;let t=Ye(e);m(e=>({h:t.s===0?e.h:t.h,s:t.s,v:t.v})),g(n)},re=[n,F],t[13]=F,t[14]=n,t[15]=ne,t[16]=re):(ne=t[15],re=t[16]),(0,Z.useEffect)(ne,re);let I=(0,Z.useRef)(null),L;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{let t=I.current;if(!t)return;let n=t.getBoundingClientRect(),r=Ke(e.clientX-n.left,0,n.width),i=Ke(e.clientY-n.top,0,n.height),a=n.width===0?0:r/n.width,o=n.height===0?0:1-i/n.height;m(e=>{let t={h:e.h,s:a,v:o},n=Je(Xe(t));return g(n),S.current=n,b.current===null&&(b.current=requestAnimationFrame(A)),t})},t[17]=L):L=t[17];let ie=L,ae;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(ae=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),ie(e)},t[18]=ae):ae=t[18];let oe=ae,se;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(se=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&ie(e)},t[19]=se):se=t[19];let ce=se,le=(0,Z.useRef)(null),R;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>{let t=le.current;if(!t)return;let n=t.getBoundingClientRect(),r=Ke(e.clientX-n.left,0,n.width),i=n.width===0?0:r/n.width*360;m(e=>{let t={h:i,s:e.s,v:e.v},n=Je(Xe(t));return g(n),S.current=n,b.current===null&&(b.current=requestAnimationFrame(A)),t})},t[20]=R):R=t[20];let ue=R,de;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>{e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),ue(e)},t[21]=de):de=t[21];let fe=de,pe;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(pe=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&ue(e)},t[22]=pe):pe=t[22];let me=pe,z;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{g(e);let t=qe(e.startsWith(`#`)?e:`#${e}`);if(!t)return;let n=Ye(t),r={h:n.s===0?T.current:n.h,s:n.s,v:n.v};m(r),ee(Je(t))},t[23]=z):z=t[23];let he=z,ge=`${p.h/360*100}%`,_e=`${p.s*100}%`,B=`${(1-p.v)*100}%`,ve=`hsl(${p.h} 100% 50%)`,ye;t[24]===l?ye=t[25]:(ye=s(`relative size-5 shrink-0 cursor-pointer overflow-hidden rounded-sm border border-border/80 outline-none transition-shadow focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background`,l),t[24]=l,t[25]=ye);let V;t[26]!==c||t[27]!==i||t[28]!==ye?(V=(0,$.jsx)(v,{"aria-label":c,className:ye,children:i}),t[26]=c,t[27]=i,t[28]=ye,t[29]=V):V=t[29];let H;t[30]===p.s?H=t[31]:(H=Math.round(p.s*100),t[30]=p.s,t[31]=H);let U;t[32]===ve?U=t[33]:(U={backgroundColor:ve},t[32]=ve,t[33]=U);let be;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,style:{background:`linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0))`}}),t[34]=be):be=t[34];let xe;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute inset-0`,style:{background:`linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0))`}}),t[35]=xe):xe=t[35];let W;t[36]!==_e||t[37]!==B?(W=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.4)]`,style:{left:_e,top:B}}),t[36]=_e,t[37]=B,t[38]=W):W=t[38];let Se;t[39]!==H||t[40]!==U||t[41]!==W?(Se=(0,$.jsxs)(`div`,{ref:I,role:`slider`,"aria-label":`Saturation and value`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":H,tabIndex:0,className:`relative h-36 w-full cursor-crosshair touch-none select-none overflow-hidden rounded-md outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,style:U,onPointerDown:oe,onPointerMove:ce,children:[be,xe,W]}),t[39]=H,t[40]=U,t[41]=W,t[42]=Se):Se=t[42];let Ce;t[43]===p.h?Ce=t[44]:(Ce=Math.round(p.h),t[43]=p.h,t[44]=Ce);let we;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(we={background:`linear-gradient(to right, hsl(0 100% 50%), hsl(60 100% 50%), hsl(120 100% 50%), hsl(180 100% 50%), hsl(240 100% 50%), hsl(300 100% 50%), hsl(360 100% 50%))`},t[45]=we):we=t[45];let Te;t[46]===ge?Te=t[47]:(Te=(0,$.jsx)(`div`,{"aria-hidden":!0,className:`pointer-events-none absolute top-1/2 size-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.4)]`,style:{left:ge}}),t[46]=ge,t[47]=Te);let G;t[48]!==Ce||t[49]!==Te?(G=(0,$.jsx)(`div`,{ref:le,role:`slider`,"aria-label":`Hue`,"aria-valuemin":0,"aria-valuemax":360,"aria-valuenow":Ce,tabIndex:0,className:`relative h-3 w-full cursor-ew-resize touch-none select-none overflow-hidden rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/40`,style:we,onPointerDown:fe,onPointerMove:me,children:Te}),t[48]=Ce,t[49]=Te,t[50]=G):G=t[50];let K;t[51]===F?K=t[52]:(K=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-7 shrink-0 rounded-md border border-border/60`,style:{backgroundColor:F}}),t[51]=F,t[52]=K);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=e=>he(e.currentTarget.value),t[53]=q):q=t[53];let J;t[54]===h?J=t[55]:(J=(0,$.jsx)(M,{value:h,size:`sm`,nativeInput:!0,onChange:q,spellCheck:!1,className:`font-mono text-xs`,"aria-label":`Hex value`}),t[54]=h,t[55]=J);let Ee;t[56]!==K||t[57]!==J?(Ee=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[K,J]}),t[56]=K,t[57]=J,t[58]=Ee):Ee=t[58];let Y;t[59]!==Se||t[60]!==G||t[61]!==Ee?(Y=(0,$.jsxs)(`div`,{className:`space-y-3`,children:[Se,G,Ee]}),t[59]=Se,t[60]=G,t[61]=Ee,t[62]=Y):Y=t[62];let X;t[63]!==d||t[64]!==u||t[65]!==Y?(X=(0,$.jsx)(w,{side:u,align:d,className:`w-64`,children:Y}),t[63]=d,t[64]=u,t[65]=Y,t[66]=X):X=t[66];let De;return t[67]!==_||t[68]!==V||t[69]!==X?(De=(0,$.jsxs)(x,{open:_,onOpenChange:y,children:[V,X]}),t[67]=_,t[68]=V,t[69]=X,t[70]=De):De=t[70],De}var Qe=[{value:`stacked`,label:`Unified`,description:`Removed and added lines together in one column.`},{value:`split`,label:`Split`,description:`Compare the original and updated code side by side.`}];function $e(e){let t=(0,Q.c)(16),{number:n,kind:r,children:i}=e,a;t[0]===r?a=t[1]:(a=r?{backgroundColor:`color-mix(in srgb, var(--background) 92%, var(--${r===`added`?`success`:`destructive`}))`}:void 0,t[0]=r,t[1]=a);let o;t[2]===n?o=t[3]:(o=(0,$.jsx)(`span`,{className:`w-7 shrink-0 select-none text-center text-muted-foreground/60`,children:n}),t[2]=n,t[3]=o);let s=r===`added`?`var(--success)`:`var(--destructive)`,c;t[4]===s?c=t[5]:(c={color:s},t[4]=s,t[5]=c);let l=r===`added`?`+`:r===`removed`?`−`:` `,u;t[6]!==c||t[7]!==l?(u=(0,$.jsx)(`span`,{className:`w-4 shrink-0`,style:c,children:l}),t[6]=c,t[7]=l,t[8]=u):u=t[8];let d;t[9]===i?d=t[10]:(d=(0,$.jsx)(`span`,{children:i}),t[9]=i,t[10]=d);let f;return t[11]!==a||t[12]!==o||t[13]!==u||t[14]!==d?(f=(0,$.jsxs)(`div`,{className:`flex whitespace-pre leading-6`,style:a,children:[o,u,d]}),t[11]=a,t[12]=o,t[13]=u,t[14]=d,t[15]=f):f=t[15],f}function et(e){let t=(0,Q.c)(10),{layout:n}=e,r,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`span`,{children:`greeting.ts`}),i=(0,$.jsx)(`span`,{className:`text-success`,children:`+1`}),t[0]=r,t[1]=i):(r=t[0],i=t[1]);let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsxs)(`div`,{className:`flex justify-between border-b border-border bg-muted/30 px-3 py-2`,children:[r,(0,$.jsxs)(`span`,{children:[i,` `,(0,$.jsx)(`span`,{className:`text-destructive`,children:`−1`})]})]}),t[2]=a):a=t[2];let o=n===`split`&&`grid grid-cols-2 divide-x divide-border`,c;t[3]===o?c=t[4]:(c=s(`min-h-32 py-3`,o),t[3]=o,t[4]=c);let l;t[5]===n?l=t[6]:(l=n===`split`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,$.jsx)($e,{number:1,children:`// Greeting`}),(0,$.jsx)($e,{number:2,kind:`removed`,children:`hello("world");`}),(0,$.jsx)($e,{number:3,children:``})]}),(0,$.jsxs)(`div`,{className:`overflow-hidden`,children:[(0,$.jsx)($e,{number:1,children:`// Greeting`}),(0,$.jsx)($e,{number:2,kind:`added`,children:`hello("Ryco");`}),(0,$.jsx)($e,{number:3,children:``})]})]}):(0,$.jsxs)(`div`,{children:[(0,$.jsx)($e,{number:1,children:`// Greeting`}),(0,$.jsx)($e,{number:2,kind:`removed`,children:`hello("world");`}),(0,$.jsx)($e,{number:2,kind:`added`,children:`hello("Ryco");`}),(0,$.jsx)($e,{number:3,children:``})]}),t[5]=n,t[6]=l);let u;return t[7]!==c||t[8]!==l?(u=(0,$.jsxs)(`div`,{"aria-hidden":`true`,className:`overflow-hidden rounded-lg border border-border bg-background text-left font-mono text-[10px] text-foreground`,children:[a,(0,$.jsx)(`div`,{className:c,children:l})]}),t[7]=c,t[8]=l,t[9]=u):u=t[9],u}function tt(){let e=(0,Q.c)(6),[t,n]=we(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,$.jsx)(`p`,{className:`px-4 pt-4 text-xs text-muted-foreground`,children:`Choose how code changes appear in the diff viewer. You can also switch from its toolbar.`}),e[0]=r):r=e[0];let a;e[1]!==t||e[2]!==n?(a=Qe.map(e=>(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":t===e.value,"aria-label":`${e.label} diff style`,onClick:()=>n(e.value),className:s(`min-w-0 rounded-xl border p-3 text-left transition-colors focus-visible:outline-2 focus-visible:outline-ring`,t===e.value?`border-primary bg-muted/40`:`border-border hover:bg-muted/20`),children:[(0,$.jsx)(et,{layout:e.value}),(0,$.jsxs)(`span`,{className:`mt-3 flex items-center justify-between text-sm font-medium`,children:[e.label,t===e.value&&(0,$.jsx)(i,{"aria-hidden":`true`,className:`size-4`})]}),(0,$.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:e.description})]},e.value)),e[1]=t,e[2]=n,e[3]=a):a=e[3];let o;return e[4]===a?o=e[5]:(o=(0,$.jsxs)(G,{title:`Diff style`,children:[r,(0,$.jsx)(`div`,{role:`group`,"aria-label":`Diff style`,className:`grid gap-4 p-4 lg:grid-cols-2`,children:a})]}),e[4]=a,e[5]=o),o}function nt(e){let t=(0,Q.c)(22),{theme:n,variant:r,compact:i}=e,a=i!==void 0&&i,o;t[0]!==n||t[1]!==r?(o=Object.fromEntries(Object.entries(z(xe(n,r))).map(it)),t[0]=n,t[1]=r,t[2]=o):o=t[2];let s=o,c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsxs)(`div`,{className:`flex w-[26%] flex-col gap-2 border-r border-[var(--sidebar-border)] bg-[var(--sidebar)] p-[4%]`,children:[(0,$.jsx)(`span`,{className:`font-semibold`,children:`Ryco`}),(0,$.jsx)(`span`,{className:`h-1.5 w-4/5 rounded bg-[var(--muted-foreground)] opacity-40`}),(0,$.jsx)(`span`,{className:`h-3 rounded bg-[var(--sidebar-accent)]`}),(0,$.jsx)(`span`,{className:`h-1.5 w-3/4 rounded bg-[var(--muted-foreground)] opacity-25`}),(0,$.jsx)(`span`,{className:`h-1.5 w-4/5 rounded bg-[var(--muted-foreground)] opacity-25`})]}),t[3]=c):c=t[3];let l;t[4]===a?l=t[5]:(l=a?(0,$.jsx)(`div`,{className:`h-3 w-2/3 shrink-0 self-end rounded bg-[var(--secondary)]`}):(0,$.jsx)(`div`,{className:`self-end rounded bg-[var(--secondary)] px-2 py-1`,children:`Build something great`}),t[4]=a,t[5]=l);let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(`div`,{className:`h-1.5 w-4/5 rounded bg-[var(--muted-foreground)] opacity-40`}),t[6]=u):u=t[6];let d;t[7]===a?d=t[8]:(d=a?(0,$.jsx)(`div`,{className:`h-1.5 w-2/3 rounded bg-[var(--muted-foreground)] opacity-25`}):(0,$.jsxs)(`div`,{className:`rounded border border-[var(--border)] bg-[var(--card)] p-2 font-mono`,children:[(0,$.jsx)(`span`,{style:{color:`var(--info)`},children:`const `}),`theme =`,` `,(0,$.jsx)(`span`,{style:{color:`var(--success)`},children:`"ryco"`}),`;`,(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:`// Make it yours`})]}),t[7]=a,t[8]=d);let f;t[9]===a?f=t[10]:(f=a?(0,$.jsx)(`span`,{className:`h-1 w-1/2 rounded bg-[var(--muted-foreground)] opacity-30`}):(0,$.jsx)(`span`,{style:{color:`var(--muted-foreground)`},children:`Ask anything…`}),t[9]=a,t[10]=f);let p;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`span`,{className:`size-3 rounded-full bg-[var(--primary)]`}),t[11]=p):p=t[11];let m;t[12]===f?m=t[13]:(m=(0,$.jsxs)(`div`,{className:`mt-auto flex items-center justify-between rounded-md border border-[var(--input)] px-2 py-1.5`,children:[f,p]}),t[12]=f,t[13]=m);let h;t[14]!==l||t[15]!==d||t[16]!==m?(h=(0,$.jsxs)(`div`,{className:`flex aspect-[16/9] text-[9px] leading-relaxed`,children:[c,(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-2 p-[4%]`,children:[l,u,d,m]})]}),t[14]=l,t[15]=d,t[16]=m,t[17]=h):h=t[17];let g;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(`div`,{className:`flex h-2`,children:[`sidebar`,`background`,`primary`,`info`,`success`,`warning`,`destructive`].map(rt)}),t[18]=g):g=t[18];let _;return t[19]!==s||t[20]!==h?(_=(0,$.jsxs)(`div`,{"aria-hidden":`true`,style:s,className:`w-full overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--background)] text-[var(--foreground)]`,children:[h,g]}),t[19]=s,t[20]=h,t[21]=_):_=t[21],_}function rt(e){return(0,$.jsx)(`span`,{className:`flex-1`,style:{backgroundColor:`var(--${e})`}},e)}function it(e){let[t,n]=e;return[`--${t}`,n]}var at=[{title:`Surfaces`,tokens:[`background`,`app-chrome-background`,`foreground`,`card`,`card-foreground`,`popover`,`popover-foreground`]},{title:`Brand & focus`,tokens:[`primary`,`primary-foreground`,`ring`]},{title:`Neutrals`,tokens:[`secondary`,`secondary-foreground`,`muted`,`muted-foreground`,`accent`,`accent-foreground`]},{title:`Status`,tokens:[`destructive`,`destructive-foreground`,`info`,`info-foreground`,`success`,`success-foreground`,`warning`,`warning-foreground`]},{title:`Borders & inputs`,tokens:[`border`,`input`]},{title:`Scrollbars`,tokens:[`scrollbar-thumb`,`scrollbar-thumb-hover`,`scrollbar-thumb-thin`,`scrollbar-thumb-thin-hover`]}],ot=new Set(W),st=null,ct=null;function lt(e){if(typeof document>`u`||document.body===void 0||!e)return`#000000`;st||(st=document.createElement(`div`),st.style.position=`absolute`,st.style.visibility=`hidden`,st.style.pointerEvents=`none`,document.body.append(st)),st.style.color=``,st.style.color=e;let t=getComputedStyle(st).color;ct||=document.createElement(`canvas`),ct.width=1,ct.height=1;let n=ct.getContext(`2d`,{willReadFrequently:!0});if(!n)return`#000000`;n.clearRect(0,0,1,1);try{n.fillStyle=t}catch{return`#000000`}n.fillRect(0,0,1,1);let r=n.getImageData(0,0,1,1).data;return`#${[r[0],r[1],r[2]].map(e=>(e??0).toString(16).padStart(2,`0`)).join(``)}`}function ut(e,t,n,r){let i={...e[t]};return r.length===0?delete i[n]:i[n]=r,t===`light`?{...e,light:i}:{...e,dark:i}}function dt(e,t){return{...e,name:t}}function ft(e,t){let n={...e};return t.length===0?delete n.description:n.description=t,n}function pt(e){return V.includes(e)}function mt(e){let t=(0,Q.c)(124),{source:n,draft:r,onDraftChange:i,onSave:a,onCancel:o,resolvedVariant:s}=e,[c,d]=(0,Z.useState)(`form`),[_,v]=(0,Z.useState)(s),y;t[0]===r?y=t[1]:(y=()=>JSON.stringify(r,null,2),t[0]=r,t[1]=y);let[x,C]=(0,Z.useState)(y),[w,T]=(0,Z.useState)(null),[E,D]=(0,Z.useState)(!1),O;t[2]===n?O=t[3]:(O=JSON.stringify(n),t[2]=n,t[3]=O);let k;t[4]===r?k=t[5]:(k=JSON.stringify(r),t[4]=r,t[5]=k);let A=O!==k,j;t[6]===r?j=t[7]:(j=()=>{ue(r)},t[6]=r,t[7]=j);let ee;t[8]!==r||t[9]!==s?(ee=[r,s],t[8]=r,t[9]=s,t[10]=ee):ee=t[10],(0,Z.useEffect)(j,ee);let te,N;t[11]!==r||t[12]!==c?(te=()=>{c===`form`&&C(JSON.stringify(r,null,2))},N=[r,c],t[11]=r,t[12]=c,t[13]=te,t[14]=N):(te=t[13],N=t[14]),(0,Z.useEffect)(te,N);let P;t[15]!==r||t[16]!==i?(P=e=>{i(dt(r,e))},t[15]=r,t[16]=i,t[17]=P):P=t[17];let F=P,ne;t[18]!==r||t[19]!==i?(ne=e=>{i(ft(r,e))},t[18]=r,t[19]=i,t[20]=ne):ne=t[20];let re=ne,I;t[21]!==r||t[22]!==i||t[23]!==_?(I=(e,t)=>{i(ut(r,_,e,t))},t[21]=r,t[22]=i,t[23]=_,t[24]=I):I=t[24];let L=I,ie;t[25]===i?ie=t[26]:(ie=e=>{C(e);let t;try{t=JSON.parse(e)}catch(e){let t=e;T(t instanceof Error?t.message:`Invalid JSON`);return}if(!ye(t)){T(`Invalid theme schema. Need string id/name and string-only light/dark tokens.`);return}T(null),i(t)},t[25]=i,t[26]=ie);let ae=ie,oe;t[27]!==A||t[28]!==o?(oe=()=>{if(A){D(!0);return}o()},t[27]=A,t[28]=o,t[29]=oe):oe=t[29];let se=oe,R,de,fe;if(t[30]!==r.dark||t[31]!==r.light||t[32]!==_){fe=(_===`dark`?r.dark:r.light)??{};let e;t[36]===_?e=t[37]:(e=(_===`dark`?ce.dark:ce.light)??{},t[36]=_,t[37]=e),R=e,de=Object.entries(fe).filter(_t),t[30]=r.dark,t[31]=r.light,t[32]=_,t[33]=R,t[34]=de,t[35]=fe}else R=t[33],de=t[34],fe=t[35];let pe=de,me=ht,z=me(r.light)||me(r.dark),he;t[38]!==r.name||t[39]!==z||t[40]!==w?(he=w!==null||r.name.trim().length===0||z,t[38]=r.name,t[39]=z,t[40]=w,t[41]=he):he=t[41];let ge=he,_e;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,$.jsx)(`span`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:`Editing`}),t[42]=_e):_e=t[42];let B=r.name||`Untitled`,ve;t[43]!==r.name||t[44]!==B?(ve=(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,title:r.name,children:B}),t[43]=r.name,t[44]=B,t[45]=ve):ve=t[45];let V;t[46]===A?V=t[47]:(V=A?(0,$.jsx)(`span`,{className:`rounded-sm bg-warning/16 px-1.5 py-0.5 text-[10px] font-medium text-warning-foreground`,children:`Unsaved`}):null,t[46]=A,t[47]=V);let H;t[48]===se?H=t[49]:(H=(0,$.jsx)(l,{size:`sm`,variant:`outline`,onClick:se,children:`Cancel`}),t[48]=se,t[49]=H);let U;t[50]!==a||t[51]!==ge?(U=(0,$.jsx)(l,{size:`sm`,onClick:a,disabled:ge,children:`Save`}),t[50]=a,t[51]=ge,t[52]=U):U=t[52];let be;t[53]!==H||t[54]!==U?(be=(0,$.jsxs)(`div`,{className:`ms-auto flex items-center gap-2`,children:[H,U]}),t[53]=H,t[54]=U,t[55]=be):be=t[55];let xe;t[56]!==ve||t[57]!==V||t[58]!==be?(xe=(0,$.jsxs)(`div`,{className:`sticky top-0 z-10 flex flex-wrap items-center gap-2 border-b border-border/60 bg-muted/72 px-4 py-2 backdrop-blur-sm sm:px-5`,children:[_e,ve,V,be]}),t[56]=ve,t[57]=V,t[58]=be,t[59]=xe):xe=t[59];let W;t[60]===c?W=t[61]:(W=[c],t[60]=c,t[61]=W);let Se,we,G;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>{let t=e[0];(t===`form`||t===`json`)&&d(t)},we=(0,$.jsx)(Te,{value:`form`,"aria-label":`Form editor`,className:`px-3 sm:px-3`,children:`Form`}),G=(0,$.jsx)(Te,{value:`json`,"aria-label":`JSON editor`,className:`px-3 sm:px-3`,children:`JSON`}),t[62]=Se,t[63]=we,t[64]=G):(Se=t[62],we=t[63],G=t[64]);let K;t[65]===W?K=t[66]:(K=(0,$.jsxs)(Ce,{value:W,variant:`outline`,size:`sm`,onValueChange:Se,children:[we,G]}),t[65]=W,t[66]=K);let q;t[67]===_?q=t[68]:(q=[_],t[67]=_,t[68]=q);let J,Ee,Y;t[69]===Symbol.for(`react.memo_cache_sentinel`)?(J=e=>{let t=e[0];(t===`light`||t===`dark`)&&v(t)},Ee=(0,$.jsx)(Te,{value:`light`,"aria-label":`Light variant`,className:`px-3 sm:px-3`,children:`Light`}),Y=(0,$.jsx)(Te,{value:`dark`,"aria-label":`Dark variant`,className:`px-3 sm:px-3`,children:`Dark`}),t[69]=J,t[70]=Ee,t[71]=Y):(J=t[69],Ee=t[70],Y=t[71]);let X;t[72]===q?X=t[73]:(X=(0,$.jsxs)(Ce,{value:q,variant:`outline`,size:`sm`,onValueChange:J,children:[Ee,Y]}),t[72]=q,t[73]=X);let De;t[74]!==K||t[75]!==X?(De=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[K,X]}),t[74]=K,t[75]=X,t[76]=De):De=t[76];let Oe;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Name`}),t[77]=Oe):Oe=t[77];let ke;t[78]===F?ke=t[79]:(ke=e=>F(e.currentTarget.value),t[78]=F,t[79]=ke);let Ae;t[80]===r.name?Ae=t[81]:(Ae=r.name.trim().length===0||void 0,t[80]=r.name,t[81]=Ae);let je;t[82]!==r.name||t[83]!==ke||t[84]!==Ae?(je=(0,$.jsxs)(`label`,{className:`space-y-1.5`,children:[Oe,(0,$.jsx)(M,{value:r.name,nativeInput:!0,onChange:ke,"aria-invalid":Ae})]}),t[82]=r.name,t[83]=ke,t[84]=Ae,t[85]=je):je=t[85];let Me;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsx)(`span`,{className:`text-xs font-medium text-foreground`,children:`Description`}),t[86]=Me):Me=t[86];let Ne=r.description??``,Pe;t[87]===re?Pe=t[88]:(Pe=e=>re(e.currentTarget.value),t[87]=re,t[88]=Pe);let Fe;t[89]!==Ne||t[90]!==Pe?(Fe=(0,$.jsxs)(`label`,{className:`space-y-1.5`,children:[Me,(0,$.jsx)(M,{value:Ne,nativeInput:!0,onChange:Pe,placeholder:`Optional, shown under the picker.`})]}),t[89]=Ne,t[90]=Pe,t[91]=Fe):Fe=t[91];let Ie;t[92]!==je||t[93]!==Fe?(Ie=(0,$.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-[minmax(0,1fr)_minmax(0,1fr)]`,children:[je,Fe]}),t[92]=je,t[93]=Fe,t[94]=Ie):Ie=t[94];let Le;t[95]!==ae||t[96]!==L||t[97]!==R||t[98]!==w||t[99]!==x||t[100]!==c||t[101]!==pe||t[102]!==fe?(Le=c===`form`?(0,$.jsxs)(`div`,{className:`mt-5 space-y-5`,children:[at.map(e=>(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`h4`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground`,children:e.title}),(0,$.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:e.tokens.map(e=>{let t=fe[e]??``,n=R[e]??``,r=le(e);return r?(0,$.jsx)(vt,{token:e,kind:r,value:t,inherited:n,onChange:t=>L(e,t)},e):null})})]},e.title)),pe.length>0?(0,$.jsxs)(`p`,{className:`text-xs text-warning-foreground`,children:[pe.length,` token`,pe.length===1?``:`s`,` not in the allow-list will be ignored on save.`]}):null]}):(0,$.jsxs)(`div`,{className:`mt-5 space-y-2`,children:[(0,$.jsx)(S,{value:x,size:`sm`,className:`font-mono text-xs`,spellCheck:!1,rows:18,onChange:e=>ae(e.currentTarget.value),"aria-invalid":w!==null||void 0}),w?(0,$.jsx)(`p`,{className:`text-xs text-destructive-foreground`,children:w}):(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground/80`,children:`Edit the JSON directly. Save is disabled while the schema is invalid.`})]}),t[95]=ae,t[96]=L,t[97]=R,t[98]=w,t[99]=x,t[100]=c,t[101]=pe,t[102]=fe,t[103]=Le):Le=t[103];let Re;t[104]!==De||t[105]!==Ie||t[106]!==Le?(Re=(0,$.jsxs)(`div`,{className:`px-4 py-4 sm:px-5`,children:[De,Ie,Le]}),t[104]=De,t[105]=Ie,t[106]=Le,t[107]=Re):Re=t[107];let ze;t[108]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,$.jsx)(p,{children:`Discard your changes?`}),t[108]=ze):ze=t[108];let Be;t[109]===n.name?Be=t[110]:(Be=(0,$.jsxs)(g,{children:[ze,(0,$.jsxs)(m,{children:[`You have unsaved edits to `,n.name,`. Discarding will revert any token changes you made.`]})]}),t[109]=n.name,t[110]=Be);let Ve;t[111]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,$.jsx)(b,{render:(0,$.jsx)(l,{variant:`outline`}),children:`Keep editing`}),t[111]=Ve):Ve=t[111];let He;t[112]===o?He=t[113]:(He=(0,$.jsxs)(h,{children:[Ve,(0,$.jsx)(l,{variant:`destructive`,onClick:()=>{D(!1),o()},children:`Discard changes`})]}),t[112]=o,t[113]=He);let Ue;t[114]!==Be||t[115]!==He?(Ue=(0,$.jsxs)(f,{children:[Be,He]}),t[114]=Be,t[115]=He,t[116]=Ue):Ue=t[116];let We;t[117]!==E||t[118]!==Ue?(We=(0,$.jsx)(u,{open:E,onOpenChange:D,children:Ue}),t[117]=E,t[118]=Ue,t[119]=We):We=t[119];let Ge;return t[120]!==xe||t[121]!==Re||t[122]!==We?(Ge=(0,$.jsxs)(`div`,{className:`border-t border-border/60 bg-muted/24`,children:[xe,Re,We]}),t[120]=xe,t[121]=Re,t[122]=We,t[123]=Ge):Ge=t[123],Ge}function ht(e){return Object.entries(e??{}).some(gt)}function gt(e){let[t,n]=e;if(typeof n!=`string`||n.length===0)return!1;let r=le(t);return r?!B(r,n):!1}function _t(e){let[t]=e;return!ot.has(t)}function vt(e){let t=(0,Q.c)(12),{token:n,kind:r,value:i,inherited:a,onChange:o}=e,c=i.length>0,l=r===`font-family`&&`sm:col-span-2`,u;t[0]===l?u=t[1]:(u=s(`rounded-md border border-border/60 bg-background px-2 py-1.5`,l),t[0]=l,t[1]=u);let d;t[2]!==a||t[3]!==r||t[4]!==o||t[5]!==c||t[6]!==n||t[7]!==i?(d=r===`color`?(0,$.jsx)(xt,{token:n,value:i,inherited:a,overridden:c,onChange:o}):r===`opacity`?(0,$.jsx)(St,{token:n,value:i,inherited:a,overridden:c,onChange:o}):r===`length`?(0,$.jsx)(Ct,{token:n,value:i,inherited:a,overridden:c,onChange:o}):(0,$.jsx)(Tt,{token:n,value:i,inherited:a,overridden:c,onChange:o}),t[2]=a,t[3]=r,t[4]=o,t[5]=c,t[6]=n,t[7]=i,t[8]=d):d=t[8];let f;return t[9]!==u||t[10]!==d?(f=(0,$.jsx)(`div`,{className:u,children:d}),t[9]=u,t[10]=d,t[11]=f):f=t[11],f}function yt(e){let t=(0,Q.c)(6),{token:r,onChange:i}=e,a=`Reset --${r}`,o;t[0]===i?o=t[1]:(o=()=>i(``),t[0]=i,t[1]=o);let s;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,$.jsx)(n,{className:`size-3.5`,"aria-hidden":!0}),t[2]=s):s=t[2];let c;return t[3]!==a||t[4]!==o?(c=(0,$.jsx)(l,{size:`icon-xs`,variant:`ghost`,"aria-label":a,onClick:o,className:`text-muted-foreground`,children:s}),t[3]=a,t[4]=o,t[5]=c):c=t[5],c}function bt(e){let t=(0,Q.c)(6),{token:n,overridden:r}=e,i=r?`text-foreground`:`text-muted-foreground/70`,a;t[0]===i?a=t[1]:(a=s(`truncate font-mono text-[11px]`,i),t[0]=i,t[1]=a);let o=`--${n}`,c;return t[2]!==a||t[3]!==o||t[4]!==n?(c=(0,$.jsxs)(`span`,{className:a,title:o,children:[`--`,n]}),t[2]=a,t[3]=o,t[4]=n,t[5]=c):c=t[5],c}function xt(e){let t=(0,Q.c)(41),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=r||i,c,l,u,d,f;if(t[0]!==s||t[1]!==r){u=he(s);let e;t[7]===r?e=t[8]:(e=r.length>0&&!me(r),t[7]=r,t[8]=e),l=e,f=`flex items-center gap-2`,c=Ze,d=lt(u),t[0]=s,t[1]=r,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=f}else c=t[2],l=t[3],u=t[4],d=t[5],f=t[6];let p;t[9]===o?p=t[10]:(p=e=>o(e),t[9]=o,t[10]=p);let m=`Pick a color for --${n}`,h=l?`transparent`:u||`transparent`,g;t[11]===h?g=t[12]:(g=(0,$.jsx)(`span`,{className:`pointer-events-none absolute inset-0`,style:{backgroundColor:h},"aria-hidden":!0}),t[11]=h,t[12]=g);let _;t[13]!==c||t[14]!==d||t[15]!==p||t[16]!==m||t[17]!==g?(_=(0,$.jsx)(c,{value:d,onChange:p,ariaLabel:m,children:g}),t[13]=c,t[14]=d,t[15]=p,t[16]=m,t[17]=g,t[18]=_):_=t[18];let v;t[19]!==a||t[20]!==n?(v=(0,$.jsx)(bt,{token:n,overridden:a}),t[19]=a,t[20]=n,t[21]=v):v=t[21];let y=i||`inherit default`,b=l||void 0,x;t[22]===o?x=t[23]:(x=e=>o(e.currentTarget.value),t[22]=o,t[23]=x);let S;t[24]!==b||t[25]!==x||t[26]!==y||t[27]!==r?(S=(0,$.jsx)(M,{value:r,nativeInput:!0,unstyled:!0,size:`sm`,className:`border-0 bg-transparent p-0 shadow-none focus-within:shadow-none`,placeholder:y,"aria-invalid":b,onChange:x}),t[24]=b,t[25]=x,t[26]=y,t[27]=r,t[28]=S):S=t[28];let C;t[29]!==S||t[30]!==v?(C=(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[v,S]}),t[29]=S,t[30]=v,t[31]=C):C=t[31];let w;t[32]!==o||t[33]!==a||t[34]!==n?(w=a?(0,$.jsx)(yt,{token:n,onChange:o}):null,t[32]=o,t[33]=a,t[34]=n,t[35]=w):w=t[35];let T;return t[36]!==C||t[37]!==w||t[38]!==f||t[39]!==_?(T=(0,$.jsxs)(`div`,{className:f,children:[_,C,w]}),t[36]=C,t[37]=w,t[38]=f,t[39]=_,t[40]=T):T=t[40],T}function St(e){let t=(0,Q.c)(31),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=Number(r||i),c;t[0]===s?c=t[1]:(c=Number.isFinite(s)?Math.min(1,Math.max(0,s)):0,t[0]=s,t[1]=c);let l=c,u;t[2]===r?u=t[3]:(u=r.length>0&&!B(`opacity`,r),t[2]=r,t[3]=u);let d=u,f;t[4]!==a||t[5]!==n?(f=(0,$.jsx)(bt,{token:n,overridden:a}),t[4]=a,t[5]=n,t[6]=f):f=t[6];let p;t[7]===o?p=t[8]:(p=e=>o(e.currentTarget.value),t[7]=o,t[8]=p);let m=`--${n} value`,h;t[9]!==l||t[10]!==p||t[11]!==m?(h=(0,$.jsx)(`input`,{type:`range`,min:0,max:1,step:.005,value:l,onChange:p,"aria-label":m,className:`h-7.5 flex-1 accent-primary cursor-pointer`}),t[9]=l,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g=i||`0`,_=d||void 0,v;t[13]===o?v=t[14]:(v=e=>o(e.currentTarget.value),t[13]=o,t[14]=v);let y;t[15]!==g||t[16]!==_||t[17]!==v||t[18]!==r?(y=(0,$.jsx)(`div`,{className:`w-20 shrink-0`,children:(0,$.jsx)(M,{value:r,nativeInput:!0,type:`number`,min:0,max:1,step:.005,size:`sm`,placeholder:g,"aria-invalid":_,onChange:v})}),t[15]=g,t[16]=_,t[17]=v,t[18]=r,t[19]=y):y=t[19];let b;t[20]!==o||t[21]!==a||t[22]!==n?(b=a?(0,$.jsx)(yt,{token:n,onChange:o}):null,t[20]=o,t[21]=a,t[22]=n,t[23]=b):b=t[23];let x;t[24]!==y||t[25]!==b||t[26]!==h?(x=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[h,y,b]}),t[24]=y,t[25]=b,t[26]=h,t[27]=x):x=t[27];let S;return t[28]!==x||t[29]!==f?(S=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[f,x]}),t[28]=x,t[29]=f,t[30]=S):S=t[30],S}function Ct(e){let t=(0,Q.c)(67),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s,c,l,u,d;if(t[0]!==i||t[1]!==o||t[2]!==a||t[3]!==n||t[4]!==r){d=Symbol.for(`react.early_return_sentinel`);bb0:{l=R(r),c=R(i);let e=c?pt(c.unit):!1,f=l?pt(l.unit):!1;if(r.length>0&&!f||r.length===0&&i.length>0&&!e){let e;t[10]===r?e=t[11]:(e=r.length>0&&!B(`length`,r),t[10]=r,t[11]=e);let s=e,c;t[12]!==a||t[13]!==n?(c=(0,$.jsx)(bt,{token:n,overridden:a}),t[12]=a,t[13]=n,t[14]=c):c=t[14];let l=i||`e.g. 1rem`,u=s||void 0,f;t[15]===o?f=t[16]:(f=e=>o(e.currentTarget.value),t[15]=o,t[16]=f);let p;t[17]!==l||t[18]!==u||t[19]!==f||t[20]!==r?(p=(0,$.jsx)(M,{value:r,nativeInput:!0,size:`sm`,placeholder:l,"aria-invalid":u,onChange:f}),t[17]=l,t[18]=u,t[19]=f,t[20]=r,t[21]=p):p=t[21];let m;t[22]!==o||t[23]!==a||t[24]!==n?(m=a?(0,$.jsx)(yt,{token:n,onChange:o}):null,t[22]=o,t[23]=a,t[24]=n,t[25]=m):m=t[25];let h;t[26]!==p||t[27]!==m?(h=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[p,m]}),t[26]=p,t[27]=m,t[28]=h):h=t[28];let g;t[29]!==h||t[30]!==c?(g=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[c,h]}),t[29]=h,t[30]=c,t[31]=g):g=t[31],d=g;break bb0}s=l?String(l.number):``,u=l&&pt(l.unit)?l.unit:c&&pt(c.unit)?c.unit:`rem`}t[0]=i,t[1]=o,t[2]=a,t[3]=n,t[4]=r,t[5]=s,t[6]=c,t[7]=l,t[8]=u,t[9]=d}else s=t[5],c=t[6],l=t[7],u=t[8],d=t[9];if(d!==Symbol.for(`react.early_return_sentinel`))return d;let f=u,p=c?String(c.number):``,m;t[32]!==o||t[33]!==f?(m=e=>{let t=e.trim();if(t.length===0){o(``);return}let n=Number(t);Number.isFinite(n)&&o(`${n}${f}`)},t[32]=o,t[33]=f,t[34]=m):m=t[34];let h=m,g;t[35]!==o||t[36]!==c||t[37]!==l?(g=e=>{if(l){o(`${l.number}${e}`);return}c&&o(`${c.number}${e}`)},t[35]=o,t[36]=c,t[37]=l,t[38]=g):g=t[38];let _=g,v;t[39]!==a||t[40]!==n?(v=(0,$.jsx)(bt,{token:n,overridden:a}),t[39]=a,t[40]=n,t[41]=v):v=t[41];let y=n===`font-size-base`?1:.05,b;t[42]===h?b=t[43]:(b=e=>h(e.currentTarget.value),t[42]=h,t[43]=b);let x;t[44]!==p||t[45]!==s||t[46]!==y||t[47]!==b?(x=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(M,{value:s,nativeInput:!0,type:`number`,step:y,size:`sm`,placeholder:p,onChange:b})}),t[44]=p,t[45]=s,t[46]=y,t[47]=b,t[48]=x):x=t[48];let S;t[49]===_?S=t[50]:(S=e=>_(e.currentTarget.value),t[49]=_,t[50]=S);let C=`--${n} unit`,w;t[51]===Symbol.for(`react.memo_cache_sentinel`)?(w=V.map(wt),t[51]=w):w=t[51];let T;t[52]!==C||t[53]!==S||t[54]!==f?(T=(0,$.jsx)(`select`,{value:f,onChange:S,"aria-label":C,className:`h-7.5 rounded-md border border-input bg-background px-2 text-sm outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/24 sm:h-6.5 sm:text-xs`,children:w}),t[52]=C,t[53]=S,t[54]=f,t[55]=T):T=t[55];let E;t[56]!==o||t[57]!==a||t[58]!==n?(E=a?(0,$.jsx)(yt,{token:n,onChange:o}):null,t[56]=o,t[57]=a,t[58]=n,t[59]=E):E=t[59];let D;t[60]!==T||t[61]!==E||t[62]!==x?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,T,E]}),t[60]=T,t[61]=E,t[62]=x,t[63]=D):D=t[63];let O;return t[64]!==D||t[65]!==v?(O=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[v,D]}),t[64]=D,t[65]=v,t[66]=O):O=t[66],O}function wt(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function Tt(e){let t=(0,Q.c)(25),{token:n,value:r,inherited:i,overridden:a,onChange:o}=e,s=r||i,c;t[0]===r?c=t[1]:(c=r.length>0&&!B(`font-family`,r),t[0]=r,t[1]=c);let l=c,u;t[2]!==a||t[3]!==n?(u=(0,$.jsx)(bt,{token:n,overridden:a}),t[2]=a,t[3]=n,t[4]=u):u=t[4];let d=i||`system-ui, sans-serif`,f=s||void 0,p;t[5]===f?p=t[6]:(p={fontFamily:f},t[5]=f,t[6]=p);let m=l||void 0,h;t[7]===o?h=t[8]:(h=e=>o(e.currentTarget.value),t[7]=o,t[8]=h);let g;t[9]!==d||t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==r?(g=(0,$.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,$.jsx)(M,{value:r,nativeInput:!0,size:`sm`,placeholder:d,style:p,"aria-invalid":m,onChange:h})}),t[9]=d,t[10]=p,t[11]=m,t[12]=h,t[13]=r,t[14]=g):g=t[14];let _;t[15]!==o||t[16]!==a||t[17]!==n?(_=a?(0,$.jsx)(yt,{token:n,onChange:o}):null,t[15]=o,t[16]=a,t[17]=n,t[18]=_):_=t[18];let v;t[19]!==g||t[20]!==_?(v=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[g,_]}),t[19]=g,t[20]=_,t[21]=v):v=t[21];let y;return t[22]!==v||t[23]!==u?(y=(0,$.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[u,v]}),t[22]=v,t[23]=u,t[24]=y):y=t[24],y}var Et=[{value:`system`,label:`System`},{value:`light`,label:`Light`},{value:`dark`,label:`Dark`}],Dt={default:1,light:.92,medium:.84,high:.78,glass:.72};function Ot({surface:e=`node`}={}){let t=e===`hub`,{theme:n,setTheme:i,resolvedTheme:a,activeThemeId:c,setActiveTheme:v}=U(),[x,S]=(0,Z.useState)(null),[C,w]=(0,Z.useState)(null),[D,te]=(0,Z.useState)(null),[M,I]=(0,Z.useState)(()=>L()),[ce,le]=(0,Z.useState)(0),R=(0,Z.useRef)(null),me=be(),z=(0,Z.useMemo)(()=>x!==null&&C!==null?{source:fe(x),draft:C}:null,[C,x,ce]),he=D?fe(D):null,B=(0,Z.useCallback)(()=>le(e=>e+1),[]);(0,Z.useEffect)(()=>{if(typeof window>`u`)return;let e=e=>{e.key===`ryco:appearance-preferences`&&I(L())};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[]);let ye=(0,Z.useCallback)((e,t)=>{F(e,t),ae(),I(L())},[]),V=(0,Z.useCallback)(e=>{se(e),ae(),I(L())},[]),xe=(0,Z.useCallback)(()=>{se(`primaryColorMode`),se(`primaryColor`),ae(),I(L())},[]),W=(0,Z.useCallback)(e=>{F(`primaryColorMode`,e?`custom`:`theme`),ae(),I(L())},[]),Ce=(0,Z.useCallback)(e=>{F(`primaryColor`,e),F(`primaryColorMode`,`custom`),ae(),I(L())},[]),we=(0,Z.useCallback)(e=>{if(pe(e.id)){let t=H(e);ge(t),Se(t.id),v(t.id),S(t.id),w(t),B();return}v(e.id),S(e.id),w(e)},[B,v]),Te=(0,Z.useCallback)(e=>{let t=H(e);ge(t),v(t.id),S(t.id),w(t),B()},[B,v]),Y=(0,Z.useCallback)(()=>{let e={id:_e(`new`),name:`New theme`,builtIn:!1};ge(e),v(e.id),S(e.id),w(e),B()},[B,v]),De=(0,Z.useCallback)(()=>{z&&(de(z.source.id,z.draft),z.source.id===z.draft.id?ue(z.draft):v(z.draft.id),S(null),w(null),B())},[z,B,v]),ke=(0,Z.useCallback)(()=>{z&&ue(z.source),S(null),w(null)},[z]),je=(0,Z.useCallback)(()=>{D&&(x===D&&(S(null),w(null)),ve(D),te(null),B())},[x,D,B]),Ne=(0,Z.useCallback)(e=>{try{We(e)}catch(e){o.add({type:`error`,title:`Could not export theme`,description:e instanceof Error?e.message:`Download failed.`})}},[]),Fe=(0,Z.useCallback)(async e=>{try{await Ue(e),o.add({type:`success`,title:`Copied theme JSON`,description:`${e.name} is ready to paste.`})}catch(e){o.add({type:`error`,title:`Could not copy theme`,description:e instanceof Error?e.message:`Clipboard write failed.`})}},[]),Q=(0,Z.useCallback)(()=>{R.current?.click()},[]),Le=(0,Z.useCallback)(async e=>{let t=e.target.files?.[0];if(e.target.value=``,t)try{let e=await Ge(t,{collision:`rename`,activate:!0});v(e.theme.id),B(),o.add({type:`success`,title:`Imported "${e.theme.name}"`,description:e.action===`renamed`?`An existing theme used the same id, so it was imported as "${e.theme.id}".`:`Theme imported and activated.`})}catch(e){o.add({type:`error`,title:`Could not import theme`,description:e instanceof Error?e.message:`Invalid theme file.`})}},[B,v]);return(0,$.jsxs)(K,{children:[(0,$.jsx)(G,{title:`Color mode`,children:(0,$.jsx)(`div`,{className:`grid grid-cols-3 gap-3 p-4`,role:`group`,"aria-label":`Color mode`,children:Et.map(e=>(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":n===e.value,onClick:()=>i(e.value),className:s(`min-w-0 rounded-xl border p-2 text-sm transition-colors focus-visible:outline-2 focus-visible:outline-ring`,n===e.value?`border-primary bg-muted/40`:`border-border hover:bg-muted/30`),children:[(0,$.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg`,children:[(0,$.jsx)(nt,{compact:!0,theme:fe(c),variant:e.value===`dark`?`dark`:`light`}),e.value===`system`&&(0,$.jsx)(`div`,{className:`absolute inset-0 [clip-path:inset(0_0_0_50%)]`,children:(0,$.jsx)(nt,{compact:!0,theme:fe(c),variant:`dark`})})]}),(0,$.jsx)(`span`,{className:`mt-2 block font-medium`,children:e.label})]},e.value))})}),(0,$.jsx)(G,{title:`Theme palette`,headerAction:(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(`input`,{ref:R,type:`file`,accept:`.json,application/json`,className:`sr-only`,onChange:Le,"aria-hidden":!0,tabIndex:-1}),(0,$.jsxs)(l,{size:`xs`,variant:`ghost`,onClick:Y,"aria-label":`Create a new theme`,title:`Create a new theme`,className:`text-muted-foreground`,children:[(0,$.jsx)(Ee,{className:`size-3.5`}),`New`]}),(0,$.jsxs)(l,{size:`xs`,variant:`ghost`,onClick:Q,"aria-label":`Import a theme from file`,title:`Import a theme from disk`,className:`text-muted-foreground`,children:[(0,$.jsx)(Ie,{className:`size-3.5`}),`Import`]})]}),children:(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":`Theme palette`,className:`grid grid-cols-2 gap-4 p-4`,children:me.map(e=>{let t=e.id===c,n=x===e.id;return(0,$.jsxs)(Z.Fragment,{children:[(0,$.jsxs)(`div`,{role:`radio`,"aria-checked":t,tabIndex:t?0:-1,onClick:()=>v(e.id),onKeyDown:t=>{let n=t.key===`ArrowRight`||t.key===`ArrowDown`?1:t.key===`ArrowLeft`||t.key===`ArrowUp`?-1:0;if(n){t.preventDefault();let r=(me.findIndex(t=>t.id===e.id)+n+me.length)%me.length;v(me[r].id),(t.currentTarget.parentElement?.querySelectorAll(`[role="radio"]`))?.item(r).focus()}(t.key===` `||t.key===`Enter`)&&(t.preventDefault(),v(e.id))},className:s(`flex cursor-pointer flex-wrap items-center gap-3 rounded-xl border p-3 outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset`,t?`border-primary`:`border-border`,t?`bg-muted/40`:`hover:bg-muted/24`),children:[(0,$.jsx)(nt,{theme:e,variant:a}),(0,$.jsx)(`span`,{"aria-hidden":!0,className:s(`relative flex size-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors`,t?`border-primary`:`border-muted-foreground/40`),children:t?(0,$.jsx)(`span`,{className:`size-2 rounded-full bg-primary`,"aria-hidden":!0}):null}),(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,title:e.name,children:e.name}),(0,$.jsx)(O,{variant:`outline`,size:`sm`,children:e.builtIn?`Built-in`:`Custom`})]}),e.description?(0,$.jsx)(`span`,{className:`truncate text-xs text-muted-foreground/80`,title:e.description,children:e.description}):null]}),(0,$.jsx)(`div`,{onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,$.jsxs)(y,{children:[(0,$.jsx)(d,{render:(0,$.jsx)(l,{size:`icon-xs`,variant:`ghost`,"aria-label":`Theme actions for ${e.name}`,children:(0,$.jsx)(A,{className:`size-4`})})}),(0,$.jsxs)(E,{align:`end`,children:[!e.builtIn&&(0,$.jsxs)(T,{onClick:()=>we(e),children:[(0,$.jsx)(_,{}),` Edit`]}),(0,$.jsxs)(T,{onClick:()=>Te(e),children:[(0,$.jsx)(r,{}),` Duplicate`]}),(0,$.jsxs)(T,{onClick:()=>Ne(e),children:[(0,$.jsx)(ee,{}),` Export`]}),(0,$.jsxs)(T,{onClick:()=>void Fe(e),children:[(0,$.jsx)(j,{}),` Copy JSON`]}),!e.builtIn&&(0,$.jsxs)(T,{onClick:()=>te(e.id),children:[(0,$.jsx)(k,{}),` Delete`]})]})]})})]}),n&&z?(0,$.jsx)(`div`,{className:`col-span-full`,children:(0,$.jsx)(mt,{source:z.source,draft:z.draft,onDraftChange:e=>w(e),onSave:De,onCancel:ke,resolvedVariant:a})}):null]},e.id)})})}),!t&&(0,$.jsx)(tt,{}),(0,$.jsxs)(G,{title:`Typography`,children:[(0,$.jsx)(q,{title:`Interface font`,description:`Normal app text, navigation, dialogs, and controls.`,resetAction:N(`fontFamilySans`)?(0,$.jsx)(J,{label:`interface font`,onClick:()=>V(`fontFamilySans`)}):null,control:(0,$.jsx)(kt,{ariaLabel:`Interface font`,icon:(0,$.jsx)(Pe,{className:`size-3.5`}),options:P,value:M.fontFamilySans,sample:`The quick brown fox`,onChange:e=>ye(`fontFamilySans`,e)})}),t?null:(0,$.jsx)(q,{title:`Code font`,description:`Code blocks, diffs, file paths, and terminal surfaces.`,resetAction:N(`fontFamilyMono`)?(0,$.jsx)(J,{label:`code font`,onClick:()=>V(`fontFamilyMono`)}):null,control:(0,$.jsx)(kt,{ariaLabel:`Code font`,icon:(0,$.jsx)(Oe,{className:`size-3.5`}),options:re,value:M.fontFamilyMono,sample:`const answer = 42`,onChange:e=>ye(`fontFamilyMono`,e)})}),(0,$.jsx)(q,{title:`Text size`,description:`Scale the interface independently from the active theme.`,resetAction:N(`fontSizeBase`)?(0,$.jsx)(J,{label:`text size`,onClick:()=>V(`fontSizeBase`)}):null,control:(0,$.jsx)(jt,{ariaLabel:`Text size`,icon:(0,$.jsx)(X,{className:`size-3.5`}),options:ie,value:M.fontSizeBase,onChange:e=>ye(`fontSizeBase`,e),preview:(0,$.jsx)(`span`,{className:`flex h-9 min-w-14 items-center justify-center rounded-md border border-border/70 bg-background px-2 font-semibold text-foreground shadow-xs/5`,children:(0,$.jsx)(`span`,{style:{fontSize:M.fontSizeBase},children:`Aa`})})})})]}),(0,$.jsxs)(G,{title:`Interface`,children:[t?null:(0,$.jsx)(q,{title:`Corner radius`,description:`Adjust rounding for panels, buttons, inputs, and menus globally.`,resetAction:N(`radius`)?(0,$.jsx)(J,{label:`corner radius`,onClick:()=>V(`radius`)}):null,control:(0,$.jsx)(jt,{ariaLabel:`Corner radius`,icon:(0,$.jsx)(Me,{className:`size-3.5`}),options:oe,value:M.radius,onChange:e=>ye(`radius`,e),preview:(0,$.jsxs)(`span`,{className:`grid h-9 min-w-14 grid-cols-2 gap-1 rounded-md border border-border/70 bg-background p-1.5 shadow-xs/5`,children:[(0,$.jsx)(`span`,{className:`border border-primary/55 bg-primary/15`,style:{borderRadius:M.radius}}),(0,$.jsx)(`span`,{className:`border border-muted-foreground/30 bg-muted`,style:{borderRadius:M.radius}})]})})}),(0,$.jsx)(q,{title:`Primary color`,description:`Theme palettes control buttons by default; enable a custom color to pin one app accent.`,resetAction:N(`primaryColorMode`)||N(`primaryColor`)?(0,$.jsx)(J,{label:`primary color`,onClick:xe}):null,control:(0,$.jsx)(At,{mode:M.primaryColorMode,value:M.primaryColor,onModeChange:W,onColorChange:Ce})}),(0,$.jsx)(q,{title:`Transparency`,description:`Adjust glass and floating surfaces like dialogs, menus, popups, and toasts.`,resetAction:N(`surfaceTransparency`)?(0,$.jsx)(J,{label:`transparency`,onClick:()=>V(`surfaceTransparency`)}):null,control:(0,$.jsx)(jt,{ariaLabel:`Transparency`,icon:(0,$.jsx)(Ae,{className:`size-3.5`}),options:ne,value:M.surfaceTransparency,onChange:e=>ye(`surfaceTransparency`,e),preview:(0,$.jsx)(`span`,{className:`relative h-9 min-w-14 overflow-hidden rounded-md border border-border/70 bg-[linear-gradient(135deg,var(--color-sky-500)_0_20%,var(--color-emerald-500)_20%_40%,var(--color-amber-500)_40%_60%,var(--color-fuchsia-500)_60%_80%,var(--color-slate-500)_80%_100%)] p-1.5 shadow-xs/5`,children:(0,$.jsx)(`span`,{className:`block h-full rounded border border-border/70 bg-popover`,style:{opacity:Dt[M.surfaceTransparency]??Dt.default}})})})})]}),(0,$.jsx)(u,{open:D!==null,onOpenChange:e=>{e||te(null)},children:(0,$.jsxs)(f,{children:[(0,$.jsxs)(g,{children:[(0,$.jsx)(p,{children:`Delete custom theme?`}),(0,$.jsx)(m,{children:he?`"${he.name}" will be removed permanently. This action cannot be undone.`:`This action cannot be undone.`})]}),(0,$.jsxs)(h,{children:[(0,$.jsx)(b,{render:(0,$.jsx)(l,{variant:`outline`}),children:`Cancel`}),(0,$.jsx)(l,{variant:`destructive`,onClick:je,children:`Delete theme`})]})]})})]})}function kt(e){let t=(0,Q.c)(43),{ariaLabel:n,icon:r,options:i,value:a,sample:o,onChange:c}=e,l;if(t[0]!==i||t[1]!==a){let e;t[3]===a?e=t[4]:(e=e=>e.value===a,t[3]=a,t[4]=e),l=i.findIndex(e),t[0]=i,t[1]=a,t[2]=l}else l=t[2];let u=Math.max(0,l),d=i[u]??i[0],f;t[5]===r?f=t[6]:(f=(0,$.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:r}),t[5]=r,t[6]=f);let p=d?.value??a,m;t[7]===p?m=t[8]:(m={fontFamily:p},t[7]=p,t[8]=m);let h=d?.label??a,g;t[9]!==m||t[10]!==h?(g=(0,$.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,style:m,children:h}),t[9]=m,t[10]=h,t[11]=g):g=t[11];let _=d?.description??`Custom`,v;t[12]===_?v=t[13]:(v=(0,$.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:_}),t[12]=_,t[13]=v);let y;t[14]!==g||t[15]!==v?(y=(0,$.jsxs)(`span`,{className:`min-w-0`,children:[g,v]}),t[14]=g,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==f||t[18]!==y?(b=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[f,y]}),t[17]=f,t[18]=y,t[19]=b):b=t[19];let x=d?.value??a,S;t[20]===x?S=t[21]:(S={fontFamily:x},t[20]=x,t[21]=S);let C;t[22]!==o||t[23]!==S?(C=(0,$.jsx)(`span`,{className:`flex h-9 min-w-30 max-w-44 items-center justify-start truncate rounded-md border border-border/70 bg-background px-2 text-xs text-foreground shadow-xs/5`,style:S,title:o,children:o}),t[22]=o,t[23]=S,t[24]=C):C=t[24];let w;t[25]!==b||t[26]!==C?(w=(0,$.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[b,C]}),t[25]=b,t[26]=C,t[27]=w):w=t[27];let T;if(t[28]!==n||t[29]!==c||t[30]!==i||t[31]!==u){let e;t[33]!==n||t[34]!==c||t[35]!==u?(e=(e,t)=>{let r=t===u;return(0,$.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":r,"aria-label":`Use ${e.label} for ${n.toLowerCase()}`,title:`${e.label} (${e.description})`,onClick:()=>c(e.value),className:s(`min-h-12 min-w-0 rounded-md border px-2 py-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,r?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`),children:[(0,$.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,style:{fontFamily:e.value},children:e.label}),(0,$.jsx)(`span`,{className:`block truncate text-[10px] leading-3 opacity-75`,children:e.description})]},e.value)},t[33]=n,t[34]=c,t[35]=u,t[36]=e):e=t[36],T=i.map(e),t[28]=n,t[29]=c,t[30]=i,t[31]=u,t[32]=T}else T=t[32];let E;t[37]!==n||t[38]!==T?(E=(0,$.jsx)(`div`,{role:`radiogroup`,"aria-label":n,className:`grid grid-cols-2 gap-1.5 sm:grid-cols-3`,children:T}),t[37]=n,t[38]=T,t[39]=E):E=t[39];let D;return t[40]!==w||t[41]!==E?(D=(0,$.jsxs)(`div`,{className:`w-full sm:w-96`,children:[w,E]}),t[40]=w,t[41]=E,t[42]=D):D=t[42],D}function At(e){let t=(0,Q.c)(48),{mode:n,value:r,onModeChange:i,onColorChange:a}=e,o=n===`custom`,c;t[0]===r?c=t[1]:(c=/^#[0-9a-f]{6}$/i.test(r)?r.toLowerCase():I[0].value,t[0]=r,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=I.find(e=>e.value===l),t[2]=l,t[3]=u);let d=u,f=o&&!d?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`,p=!o&&`cursor-not-allowed opacity-55 hover:border-border/70 hover:bg-transparent`,m;t[4]!==f||t[5]!==p?(m=s(`h-12 w-full rounded-md border px-2 py-1.5 text-left shadow-none`,f,p),t[4]=f,t[5]=p,t[6]=m):m=t[6];let h=m,g;t[7]===l?g=t[8]:(g=(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-5 shrink-0 rounded-full border border-black/10 shadow-xs dark:border-white/20`,style:{backgroundColor:l}}),t[7]=l,t[8]=g);let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,children:`Custom`}),t[9]=_):_=t[9];let v;t[10]===l?v=t[11]:(v=(0,$.jsxs)(`span`,{className:`min-w-0`,children:[_,(0,$.jsx)(`span`,{className:`block truncate font-mono text-[10px] leading-3 opacity-75`,children:l})]}),t[10]=l,t[11]=v);let y;t[12]!==g||t[13]!==v?(y=(0,$.jsxs)(`span`,{className:`flex size-full min-w-0 items-center gap-2`,children:[g,v]}),t[12]=g,t[13]=v,t[14]=y):y=t[14];let b=y,x;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:(0,$.jsx)(te,{className:`size-3.5`})}),t[15]=x):x=t[15];let S=o?d?.label??`Custom`:`Theme color`,w;t[16]===S?w=t[17]:(w=(0,$.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:S}),t[16]=S,t[17]=w);let T=o?l:`Active palette`,E;t[18]===T?E=t[19]:(E=(0,$.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:T}),t[18]=T,t[19]=E);let D;t[20]!==w||t[21]!==E?(D=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[x,(0,$.jsxs)(`span`,{className:`min-w-0`,children:[w,E]})]}),t[20]=w,t[21]=E,t[22]=D):D=t[22];let O;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(`span`,{children:`Use theme`}),t[23]=O):O=t[23];let k=!o,A;t[24]===i?A=t[25]:(A=e=>i(!e),t[24]=i,t[25]=A);let j;t[26]!==k||t[27]!==A?(j=(0,$.jsxs)(`label`,{className:`flex h-9 shrink-0 items-center gap-2 rounded-md border border-border/70 bg-background px-2 text-xs text-muted-foreground shadow-xs/5`,children:[O,(0,$.jsx)(C,{checked:k,onCheckedChange:A,"aria-label":`Use theme primary color`})]}),t[26]=k,t[27]=A,t[28]=j):j=t[28];let ee;t[29]!==D||t[30]!==j?(ee=(0,$.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[D,j]}),t[29]=D,t[30]=j,t[31]=ee):ee=t[31];let M;t[32]!==o||t[33]!==l||t[34]!==a?(M=I.map(e=>{let t=l===e.value;return(0,$.jsxs)(`button`,{type:`button`,role:`radio`,"aria-checked":o&&t,"aria-label":`Use ${e.label} as primary color`,title:`${e.label} (${e.value})`,onClick:()=>a(e.value),disabled:!o,className:s(`flex min-h-12 min-w-0 items-center gap-2 rounded-md border px-2 py-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,o&&t?`border-primary bg-primary/8 text-foreground ring-1 ring-primary/35`:`border-border/70 text-muted-foreground hover:border-foreground/25 hover:bg-muted/45`,!o&&`cursor-not-allowed opacity-55 hover:border-border/70 hover:bg-transparent`),children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`size-5 shrink-0 rounded-full border border-black/10 shadow-xs dark:border-white/20`,style:{backgroundColor:e.value}}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block truncate text-[12px] font-semibold leading-4`,children:e.label}),(0,$.jsx)(`span`,{className:`block truncate text-[10px] leading-3 opacity-75`,children:e.description})]})]},e.value)}),t[32]=o,t[33]=l,t[34]=a,t[35]=M):M=t[35];let N;t[36]!==o||t[37]!==h||t[38]!==b||t[39]!==l||t[40]!==a?(N=o?(0,$.jsx)(Ze,{value:l,onChange:a,ariaLabel:`Pick custom primary color`,triggerClassName:h,children:b}):(0,$.jsx)(`button`,{type:`button`,disabled:!0,"aria-label":`Pick custom primary color`,className:h,children:b}),t[36]=o,t[37]=h,t[38]=b,t[39]=l,t[40]=a,t[41]=N):N=t[41];let P;t[42]!==M||t[43]!==N?(P=(0,$.jsxs)(`div`,{role:`radiogroup`,"aria-label":`Primary color`,className:`grid grid-cols-2 gap-1.5 sm:grid-cols-4`,children:[M,N]}),t[42]=M,t[43]=N,t[44]=P):P=t[44];let F;return t[45]!==ee||t[46]!==P?(F=(0,$.jsxs)(`div`,{className:`w-full sm:w-96`,children:[ee,P]}),t[45]=ee,t[46]=P,t[47]=F):F=t[47],F}function jt(e){let t=(0,Q.c)(50),{ariaLabel:n,icon:r,options:i,value:a,onChange:o,preview:c}=e,l;if(t[0]!==i||t[1]!==a){let e;t[3]===a?e=t[4]:(e=e=>e.value===a,t[3]=a,t[4]=e),l=i.findIndex(e),t[0]=i,t[1]=a,t[2]=l}else l=t[2];let u=Math.max(0,l),d=i[u]??i[0],f=i.length>1?u/(i.length-1)*100:0,p;t[5]===r?p=t[6]:(p=(0,$.jsx)(`span`,{className:`inline-flex size-7 shrink-0 items-center justify-center rounded-md border border-border/70 bg-muted/60 text-muted-foreground`,children:r}),t[5]=r,t[6]=p);let m=d?.label??a,h;t[7]===m?h=t[8]:(h=(0,$.jsx)(`span`,{className:`block truncate text-sm font-semibold text-foreground`,children:m}),t[7]=m,t[8]=h);let g=d?.description??a,_;t[9]===g?_=t[10]:(_=(0,$.jsx)(`span`,{className:`block truncate text-[11px] text-muted-foreground`,children:g}),t[9]=g,t[10]=_);let v;t[11]!==h||t[12]!==_?(v=(0,$.jsxs)(`span`,{className:`min-w-0`,children:[h,_]}),t[11]=h,t[12]=_,t[13]=v):v=t[13];let y;t[14]!==p||t[15]!==v?(y=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[p,v]}),t[14]=p,t[15]=v,t[16]=y):y=t[16];let b;t[17]!==c||t[18]!==y?(b=(0,$.jsxs)(`div`,{className:`mb-2 flex min-h-9 items-center justify-between gap-3`,children:[y,c]}),t[17]=c,t[18]=y,t[19]=b):b=t[19];let x;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(x=s(`h-5 w-full cursor-pointer appearance-none bg-transparent outline-none`,`[&::-webkit-slider-runnable-track]:h-1.5 [&::-webkit-slider-runnable-track]:rounded-full`,`[&::-webkit-slider-thumb]:mt-[-5px] [&::-webkit-slider-thumb]:size-4 [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:border-2 [&::-webkit-slider-thumb]:border-background [&::-webkit-slider-thumb]:bg-primary [&::-webkit-slider-thumb]:shadow-sm`,`[&::-moz-range-track]:h-1.5 [&::-moz-range-track]:rounded-full [&::-moz-range-track]:border-0`,`[&::-moz-range-thumb]:size-4 [&::-moz-range-thumb]:rounded-full [&::-moz-range-thumb]:border-2 [&::-moz-range-thumb]:border-background [&::-moz-range-thumb]:bg-primary [&::-moz-range-thumb]:shadow-sm`,`focus-visible:[&::-webkit-slider-thumb]:ring-2 focus-visible:[&::-webkit-slider-thumb]:ring-ring focus-visible:[&::-moz-range-thumb]:ring-2 focus-visible:[&::-moz-range-thumb]:ring-ring`),t[20]=x):x=t[20];let S=Math.max(0,i.length-1),C=`linear-gradient(to right, var(--color-primary) 0%, var(--color-primary) ${f}%, color-mix(in srgb, var(--color-muted-foreground) 18%, transparent) ${f}%, color-mix(in srgb, var(--color-muted-foreground) 18%, transparent) 100%)`,w;t[21]===C?w=t[22]:(w={background:C,borderRadius:`999px`},t[21]=C,t[22]=w);let T;t[23]!==o||t[24]!==i?(T=e=>{let t=i[Number(e.currentTarget.value)];t&&o(t.value)},t[23]=o,t[24]=i,t[25]=T):T=t[25];let E;t[26]!==n||t[27]!==u||t[28]!==S||t[29]!==w||t[30]!==T?(E=(0,$.jsx)(`input`,{"aria-label":n,className:x,max:S,min:0,step:1,type:`range`,value:u,style:w,onChange:T}),t[26]=n,t[27]=u,t[28]=S,t[29]=w,t[30]=T,t[31]=E):E=t[31];let D=`repeat(${i.length}, minmax(0, 1fr))`,O;t[32]===D?O=t[33]:(O={gridTemplateColumns:D},t[32]=D,t[33]=O);let k;if(t[34]!==n||t[35]!==o||t[36]!==i||t[37]!==u){let e;t[39]!==n||t[40]!==o||t[41]!==u?(e=(e,t)=>{let r=t===u;return(0,$.jsxs)(`button`,{type:`button`,"aria-label":`Set ${n.toLowerCase()} to ${e.label}`,title:`${e.label} (${e.description})`,onClick:()=>o(e.value),className:s(`flex min-h-7 min-w-0 flex-col items-center justify-start gap-1 rounded-md px-1 py-1 text-center outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring`,r?`text-foreground`:`text-muted-foreground hover:bg-muted/50`),children:[(0,$.jsx)(`span`,{className:s(`size-1.5 rounded-full`,r?`bg-primary`:`bg-muted-foreground/35`),"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`max-w-full truncate text-[10px] leading-none`,children:e.label})]},e.value)},t[39]=n,t[40]=o,t[41]=u,t[42]=e):e=t[42],k=i.map(e),t[34]=n,t[35]=o,t[36]=i,t[37]=u,t[38]=k}else k=t[38];let A;t[43]!==O||t[44]!==k?(A=(0,$.jsx)(`div`,{className:`mt-1.5 grid gap-1`,style:O,children:k}),t[43]=O,t[44]=k,t[45]=A):A=t[45];let j;return t[46]!==E||t[47]!==A||t[48]!==b?(j=(0,$.jsxs)(`div`,{className:`w-full sm:w-96`,children:[b,E,A]}),t[46]=E,t[47]=A,t[48]=b,t[49]=j):j=t[49],j}export{Ot as AppearanceSettingsPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import"./primary-D_D7eLwT.js";import{Ki as n}from"./src-BSuAGqhK.js";import{Hn as r,Jn as i,Kn as a,Ml as o,Un as s,Vn as c,Wn as l,Xn as u,Yn as d,Zn as f,er as p,p as m,qn as h,y as g}from"./runtime-Djy96GJd.js";import{Sn as _,xn as v}from"./switch-DD1qVLgN.js";import{t as y}from"./compiler-runtime-qmuS0Svy.js";var b=y(),x=e(t(),1);function S(e){let t=(0,b.c)(13),n=d(e),{environmentId:i,cwd:s,query:c,enabled:f,limit:p,staleTime:m}=e,g,_;t[0]!==s||t[1]!==i||t[2]!==p?(g=()=>{if(i===null||s===null)return;let e={environmentId:i,cwd:s,...p===void 0?{}:{limit:p}};return u(e),()=>a(e)},_=[i,s,p],t[0]=s,t[1]=i,t[2]=p,t[3]=g,t[4]=_):(g=t[3],_=t[4]),(0,x.useEffect)(g,_);let v,y;t[5]!==s||t[6]!==f||t[7]!==i||t[8]!==p||t[9]!==c||t[10]!==m?(v=()=>{h({environmentId:i,cwd:s,query:c,...f===void 0?{}:{enabled:f},...p===void 0?{}:{limit:p},...m===void 0?{}:{staleTime:m}})},y=[i,s,c,f,p,m],t[5]=s,t[6]=f,t[7]=i,t[8]=p,t[9]=c,t[10]=m,t[11]=v,t[12]=y):(v=t[11],y=t[12]),(0,x.useEffect)(v,y);let S=o(l(n));return n===null?r:S}function C(e){let t=i(e),n=(0,x.useSyncExternalStore)(g,()=>e.environmentId===null?null:m(e.environmentId),()=>null),r=(0,x.useRef)(e);r.current=e,(0,x.useEffect)(()=>{let e=r.current,t=e.environmentId===null?void 0:p(e.environmentId,n?.client??null);return f(e,t??null)},[t,n]);let a=o(s(t));return t===null?c:a}function w(e){let t=e.trim().replace(/\.git$/i,``).replace(/\/+$/,``);if(!t||/^[a-z]:[\\/]/i.test(t)||t.startsWith(`\\\\`))return null;if(!t.includes(`://`)){let e=/^(?:[^@/]+@)?([^:/]+):(.+)$/.exec(t);return e?.[1]&&e[2]?`https://${e[1]}/${e[2].replace(/^\/+/,``)}`:null}try{let e=new URL(t.replace(/^(ssh|git|http):\/\//i,`https://`).replace(/^ssh:/i,`https:`));return!e.hostname||e.pathname===`/`||e.pathname===``?null:`https://${e.hostname}${e.pathname}`}catch{return null}}function T(e){if(!e)return null;let t=[e.locator?.remoteUrl,...(e.remotes??[]).map(e=>e.url)];for(let e of t){if(!e)continue;let t=w(e);if(t)return t}return null}n([`local`,`worktree`]);function E(e){let t=_(e.runtimeLabel),n=_(e.savedLabel);return e.isPrimary?[t,n].find(e=>e?!v(e):!1)??`This device`:t??n??e.environmentId}function D(e){let{activeWorktreePath:t,hasServerThread:n,draftThreadEnvMode:r}=e;return n?t?`worktree`:`local`:t?`local`:r===`worktree`?`worktree`:`local`}function O(e){let{nextWorktreePath:t,currentWorktreePath:n,effectiveEnvMode:r}=e;return t||r===`worktree`&&!n?`worktree`:`local`}function k(e){let{envMode:t,activeWorktreePath:n,activeThreadBranch:r,currentGitBranch:i}=e;return t===`worktree`&&!n?r??i:i??r}function A(e){let{activeProjectCwd:t,activeWorktreePath:n,refName:r}=e;if(r.worktreePath)return{checkoutCwd:r.worktreePath,nextWorktreePath:r.worktreePath===t?null:r.worktreePath,reuseExistingWorktree:!0};let i=n!==null&&r.isDefault?null:n;return{checkoutCwd:i??t,nextWorktreePath:i,reuseExistingWorktree:!1}}function j(e){let{itemValue:t,normalizedQuery:n,createBranchItemValue:r,checkoutPullRequestItemValue:i}=e;if(n.length===0||r&&t===r||i&&t===i)return!0;let a=e.searchTextByItemValue?.get(t);return a===void 0?t.toLowerCase().includes(n):a.toLowerCase().includes(n)}export{D as a,C as c,O as i,S as l,A as n,E as o,k as r,j as s,T as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,t}from"./react-SIfiwpqq.js";import{Ut as n}from"./primary-D_D7eLwT.js";import{Ca as r,Ta as i,_l as a,tr as o,zr as s}from"./runtime-Djy96GJd.js";import{Jn as c,Qn as l,lr as u}from"./switch-DD1qVLgN.js";import{t as d}from"./compiler-runtime-qmuS0Svy.js";import{t as f}from"./arrow-left-CymyVbCi.js";import{t as p}from"./arrow-right-9wyq4YVq.js";import{t as m}from"./star-7UHEnC3x.js";import{It as h}from"./main-BbtLAX7M.js";var g=d(),_=e(t(),1),v=a();function y(e){let t=(0,g.c)(14),{tab:n,width:r}=e,i=(0,_.useRef)(null),[a,o]=(0,_.useState)(null),s=window.desktopBridge?.browser,c=n.presentation===`window`,l,u;t[0]!==c||t[1]!==n.id?(l=()=>{if(!s||!i.current||c)return;let e=crypto.randomUUID(),t=0,r=!1,a=``,l=0,u=()=>{if(t=0,r||!i.current)return;let c=i.current.getBoundingClientRect(),d=![...document.querySelectorAll(`[role="dialog"], [role="alertdialog"], [data-slot="popover-popup"], [role="menu"]`)].some(e=>!e.contains(i.current))&&document.visibilityState===`visible`&&c.width>=1&&c.height>=1&&c.left>=0&&c.top>=0&&c.left<innerWidth&&c.top<innerHeight&&!i.current.closest(`[inert], [aria-hidden="true"]`),f={owner:e,tab:d?n.id:null,x:Math.max(0,c.left),y:Math.max(0,c.top),width:Math.max(1,Math.min(c.width,innerWidth-c.left)),height:Math.max(1,Math.min(c.height,innerHeight-c.top))},p=JSON.stringify(f);p!==a&&(a=p,s.surface(f).catch(e=>{r||o(e instanceof Error?e.message:`Browser surface unavailable.`)})),performance.now()<l&&(t=requestAnimationFrame(u))},d=()=>{!t&&!r&&(t=requestAnimationFrame(u))},f=()=>{l=performance.now()+500,d()},p=new ResizeObserver(d);p.observe(i.current);let m=new MutationObserver(d);return m.observe(document.body,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`inert`,`aria-hidden`,`data-state`]}),window.addEventListener(`resize`,f),document.addEventListener(`scroll`,d,!0),document.addEventListener(`visibilitychange`,d),document.addEventListener(`transitionrun`,f,!0),f(),()=>{r=!0,cancelAnimationFrame(t),p.disconnect(),m.disconnect(),window.removeEventListener(`resize`,f),document.removeEventListener(`scroll`,d,!0),document.removeEventListener(`visibilitychange`,d),document.removeEventListener(`transitionrun`,f,!0),s.surface({owner:e,tab:null,x:0,y:0,width:1,height:1}).catch(b)}},u=[s,n.id,c],t[0]=c,t[1]=n.id,t[2]=l,t[3]=u):(l=t[2],u=t[3]),(0,_.useEffect)(l,u);let d=r??`100%`,f;t[4]===d?f=t[5]:(f={width:d,maxWidth:`100%`,height:`100%`},t[4]=d,t[5]=f);let p;t[6]!==a||t[7]!==n.id||t[8]!==n.title||t[9]!==n.url?(p=s?a?(0,v.jsx)(`p`,{role:`alert`,className:`p-4 text-sm text-destructive`,children:a}):null:(0,v.jsx)(`iframe`,{title:n.title||`Browser preview`,src:n.url,sandbox:`allow-scripts allow-forms`,referrerPolicy:`no-referrer`,className:`size-full border-0`},n.id+n.url),t[6]=a,t[7]=n.id,t[8]=n.title,t[9]=n.url,t[10]=p):p=t[10];let m;return t[11]!==f||t[12]!==p?(m=(0,v.jsx)(`div`,{className:`flex min-h-0 flex-1 justify-center overflow-hidden bg-muted/30`,children:(0,v.jsx)(`div`,{ref:i,className:`relative min-h-0 bg-white`,style:f,children:p})}),t[11]=f,t[12]=p,t[13]=m):m=t[13],m}function b(){}var x=n(e=>({native:{tabs:[]},fallback:[],selected:{},setNative:t=>e({native:t}),select:(t,n)=>e(e=>({selected:{...e.selected,[t]:n}})),openFallback:(t,n)=>{let r=crypto.randomUUID();return e(e=>({fallback:[...e.fallback,{id:r,project:n,url:t,title:new URL(t).host,loading:!1,canGoBack:!1,canGoForward:!1,zoom:1,presentation:`panel`,error:null}],selected:{...e.selected,[n]:r}})),r},closeFallback:t=>e(e=>({fallback:e.fallback.filter(e=>e.id!==t)})),navigateFallback:(t,n)=>e(e=>({fallback:e.fallback.map(e=>e.id===t?{...e,url:n,title:new URL(n).host}:e)}))})),S=0,C,w=0;function T(e){let t=window.desktopBridge?.browser;(0,_.useEffect)(()=>{if(t){if(S++===0){let e=++w,n=!1;C=t.onState(e=>{n=!0,x.getState().setNative(e)}),t.getState().then(t=>{!n&&S&&e===w&&x.getState().setNative(t)}).catch(()=>{})}return()=>{--S===0&&(w++,C?.(),C=void 0)}}},[t]);let n=x(e=>t?e.native.tabs:e.fallback),r=x(t=>t.selected[e]),i=n.filter(t=>t.project===e||t.project===``);return{tabs:i,selected:i.find(e=>e.id===r)??i[0]??null,api:t}}function E(e,t){return JSON.stringify([e,t])}function D(e){let t=e.trim(),n=new URL(/^[a-z][a-z\d+.-]*:\/\//iu.test(t)?t:`http://${t}`);if(![`http:`,`https:`].includes(n.protocol)||n.username||n.password||!n.hostname)throw Error(`Enter an HTTP(S) URL without embedded credentials.`);return n.href}function O({environmentId:e,cwd:t}){let n=E(e,t),{tabs:a,selected:d,api:g}=T(n),b=(0,_.useRef)(null),[S,C]=(0,_.useState)(``),[w,O]=(0,_.useState)(null),[k,A]=(0,_.useState)(!1),[j,M]=(0,_.useState)(!1),[N,P]=(0,_.useState)(null),F;try{let n=window.desktopBridge?.getLocalEnvironmentBootstrap()?.httpBaseUrl,r=e?o(e):null;n&&r&&new URL(n).origin===new URL(r).origin&&(F=t??void 0)}catch{}let[I,L]=(0,_.useState)([]),[R,z]=(0,_.useState)(!1),B=(0,_.useRef)({generation:0}).current,[V,H]=(0,_.useState)([]),U=j?null:d,W=U===null;(0,_.useEffect)(()=>g?.onFocusAddress(e=>{e===U?.id&&(b.current?.focus(),b.current?.select())}),[g,U?.id]),(0,_.useEffect)(()=>{C(U?.url??``)},[U?.id,U?.url]),(0,_.useEffect)(()=>{M(!1);try{let e=JSON.parse(localStorage.getItem(`ryco:browser-sites:${n}`)??`[]`);H(Array.isArray(e)?e.filter(e=>typeof e==`string`).slice(0,20):[])}catch{H([])}},[n]);let G=async e=>{O(null);try{await e()}catch(e){O(e instanceof Error?e.message:`Browser request failed.`)}},K=(0,_.useCallback)(async()=>{if(!g)return;let e=++B.generation;z(!0);try{let t=await g.discover(F);e===B.generation&&L(t)}catch(t){e===B.generation&&O(t instanceof Error?t.message:`Discovery failed.`)}finally{e===B.generation&&z(!1)}},[g,F,B]);(0,_.useEffect)(()=>(L([]),W&&g&&K(),()=>{B.generation++}),[W,g,K,B,n]);let q=async e=>{let t=D(e);A(!0);try{if(g){let e=await g.open({url:t,project:n});x.getState().select(n,e)}else x.getState().openFallback(t,n);M(!1)}finally{A(!1)}},J=(e,t={})=>{g&&U&&G(()=>g.command({...t,action:e,tab:U.id}))};return(0,v.jsxs)(`section`,{className:`flex min-h-0 flex-1 flex-col`,"aria-label":`Project browser`,children:[(0,v.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 overflow-x-auto border-b p-1`,role:`tablist`,"aria-label":`Browser tabs`,children:[a.map(e=>(0,v.jsxs)(`div`,{className:`flex min-w-0 max-w-44 shrink-0 items-center rounded bg-muted/40`,children:[(0,v.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":U?.id===e.id,className:`flex min-w-0 items-center gap-1.5 px-2 py-1.5 text-xs`,onClick:()=>{x.getState().select(n,e.id),M(!1)},children:[e.loading?(0,v.jsx)(i,{className:`size-3 shrink-0 animate-spin`}):(0,v.jsx)(l,{className:`size-3 shrink-0`}),(0,v.jsx)(`span`,{className:`truncate`,children:e.title||e.url||`Loading…`})]}),(0,v.jsx)(`button`,{type:`button`,"aria-label":`Close ${e.title||`browser tab`}`,className:`p-1 text-muted-foreground hover:text-foreground`,onClick:()=>void G(()=>g?g.command({action:`close`,tab:e.id}):Promise.resolve(x.getState().closeFallback(e.id))),children:(0,v.jsx)(r,{className:`size-3`})})]},e.id)),(0,v.jsx)(s,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"aria-label":`New browser tab`,onClick:()=>{M(!0),C(``)},children:(0,v.jsx)(h,{className:`size-3.5`})})]}),(0,v.jsxs)(`form`,{className:`flex shrink-0 items-center gap-1 border-b p-2`,onSubmit:e=>{e.preventDefault(),G(async()=>{if(U){let e=D(S);g?await g.command({action:`navigate`,tab:U.id,url:e}):x.getState().navigateFallback(U.id,e)}else await q(S)})},children:[(0,v.jsx)(s,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7`,"aria-label":`Back`,disabled:!g||!U?.canGoBack,onClick:()=>J(`back`),children:(0,v.jsx)(f,{className:`size-3.5`})}),(0,v.jsx)(s,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7`,"aria-label":`Forward`,disabled:!g||!U?.canGoForward,onClick:()=>J(`forward`),children:(0,v.jsx)(p,{className:`size-3.5`})}),(0,v.jsx)(s,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7`,"aria-label":U?.loading?`Stop loading`:`Reload`,disabled:!g||!U,onClick:()=>J(U?.loading?`stop`:`reload`),children:U?.loading?(0,v.jsx)(r,{className:`size-3.5`}):(0,v.jsx)(c,{className:`size-3.5`})}),(0,v.jsx)(`input`,{ref:b,"aria-label":`Browser address`,className:`h-8 min-w-0 flex-1 rounded-md border bg-background px-2 text-xs`,placeholder:`Enter a URL or localhost:3000`,value:S,onChange:e=>C(e.target.value),onFocus:e=>e.currentTarget.select()}),(0,v.jsx)(s,{type:`submit`,size:`sm`,variant:`outline`,disabled:k,children:`Go`}),(0,v.jsx)(s,{type:`button`,size:`icon`,variant:`ghost`,className:`size-7`,disabled:!U?.url,"aria-label":`Save project URL`,"aria-pressed":!!(U&&V.includes(U.url)),onClick:()=>{if(!U?.url)return;let e=V.includes(U.url)?V.filter(e=>e!==U.url):[U.url,...V].slice(0,20);try{localStorage.setItem(`ryco:browser-sites:${n}`,JSON.stringify(e)),H(e)}catch{O(`Could not save this URL.`)}},children:(0,v.jsx)(m,{className:`size-3.5`})})]}),U?(0,v.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2 border-b px-2 py-1 text-[11px] text-muted-foreground`,children:[(0,v.jsxs)(`select`,{"aria-label":`Browser viewport`,className:`bg-background`,value:N??`auto`,onChange:e=>P(e.target.value===`auto`?null:Number(e.target.value)),children:[(0,v.jsx)(`option`,{value:`auto`,children:`Responsive`}),(0,v.jsx)(`option`,{value:`390`,children:`Phone · 390px`}),(0,v.jsx)(`option`,{value:`768`,children:`Tablet · 768px`}),(0,v.jsx)(`option`,{value:`1280`,children:`Desktop · 1280px`})]}),g?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`select`,{"aria-label":`Browser zoom`,className:`bg-background`,value:U.zoom,onChange:e=>J(`zoom`,{zoom:Number(e.target.value)}),children:[.5,.75,1,1.25,1.5,2].map(e=>(0,v.jsxs)(`option`,{value:e,children:[e*100,`%`]},e))}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>J(`devtools`),children:`DevTools`}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>J(`popout`),children:`Pop out`}),(0,v.jsx)(`button`,{type:`button`,onClick:()=>void G(()=>window.desktopBridge?.computerUse?.stop()??Promise.resolve()),children:`Stop agent`})]}):(0,v.jsx)(`span`,{children:`Web preview · sites may restrict embedding`}),(0,v.jsxs)(`a`,{href:U.url,target:`_blank`,rel:`noreferrer`,className:`ml-auto inline-flex items-center gap-1`,"aria-label":`Open in external browser`,children:[(0,v.jsx)(u,{className:`size-3`}),`External`]})]}):null,w||U?.error?(0,v.jsx)(`p`,{role:`alert`,className:`border-b p-2 text-xs text-destructive`,children:w??U?.error}):null,U?U.presentation===`window`?(0,v.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 text-sm`,children:[(0,v.jsx)(`p`,{children:`This tab is open in a separate window.`}),(0,v.jsx)(s,{variant:`outline`,onClick:()=>J(`dock`),children:`Bring back into Ryco`})]}):(0,v.jsx)(y,{tab:U,width:N}):(0,v.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-5`,children:[(0,v.jsx)(l,{className:`mb-3 size-7 text-muted-foreground`}),(0,v.jsx)(`h3`,{className:`text-sm font-semibold`,children:`Your project, live`}),(0,v.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`Enter an address above, or choose a site below. Agents can use these same tabs through Ryco Browser.`}),(0,v.jsx)(`p`,{className:`mt-2 truncate text-[11px] text-muted-foreground`,title:t??void 0,children:t??`No project selected`}),V.length?(0,v.jsxs)(`div`,{className:`mt-5`,children:[(0,v.jsx)(`h4`,{className:`mb-2 text-xs font-medium`,children:`Saved for this project`}),V.map(e=>(0,v.jsx)(`button`,{type:`button`,className:`block w-full truncate rounded px-2 py-2 text-left text-xs hover:bg-accent`,onClick:()=>void G(()=>q(e)),children:e},e))]}):null,(0,v.jsxs)(`div`,{className:`mt-5 flex items-center justify-between`,children:[(0,v.jsx)(`h4`,{className:`text-xs font-medium`,children:`Services on this computer`}),(0,v.jsx)(s,{variant:`ghost`,size:`sm`,disabled:!g||R,onClick:()=>void K(),children:R?`Finding…`:`Refresh`})]}),g?!I.length&&!R?(0,v.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`No local HTTP services found. Start your project’s dev server, then refresh.`}):I.map(e=>(0,v.jsxs)(`button`,{type:`button`,disabled:k,className:`mt-1 flex w-full items-center justify-between rounded border border-border/60 px-3 py-2 text-left text-xs hover:bg-accent`,onClick:()=>void G(()=>q(e.url)),children:[(0,v.jsx)(`span`,{children:e.url}),(0,v.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.projectMatch?`This project · `:``,e.process]})]},e.url)):(0,v.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:`Local port discovery is available in Ryco desktop. For remote projects, enter a reachable or forwarded URL.`}),k?(0,v.jsx)(`p`,{role:`status`,className:`mt-3 text-xs`,children:`Opening page…`}):null]})]})}export{O as BrowserPanel};
|