@das-org/dascode 0.0.31
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/BunHttpServer-YBQwrNiq.mjs +407 -0
- package/dist/BunPtyAdapter--Swo7U5P.mjs +120 -0
- package/dist/BunServices-RIDbItx-.mjs +115 -0
- package/dist/Cache-DyGeujxI.mjs +605 -0
- package/dist/Config-DcF-IZjO.mjs +1274 -0
- package/dist/FetchHttpClient-BmjpVs1I.mjs +5976 -0
- package/dist/NodePtyAdapter-H8kyf9St.mjs +115 -0
- package/dist/NodeServices-D8d9bE2V.mjs +152 -0
- package/dist/NodeSqliteClient-CmuXRT3w.mjs +178 -0
- package/dist/NodeTerminal-C6yhrF1E.mjs +1813 -0
- package/dist/Path-BB53LP8h.mjs +9050 -0
- package/dist/PtyAdapter-mAqTlv3d.mjs +60 -0
- package/dist/Schema-DuQUv9rO.mjs +33744 -0
- package/dist/SqlClient-Dp5XVCmr.mjs +922 -0
- package/dist/SqlError-D49f1UD-.mjs +409 -0
- package/dist/SqliteClient-DEcJdONi.mjs +147 -0
- package/dist/bin.mjs +201961 -0
- package/dist/client/assets/ChatView-HZc6-lKr.js +60 -0
- package/dist/client/assets/ClientOnly-FoswohdZ.js +2 -0
- package/dist/client/assets/CompositeRoot-Yff66Zmm.js +2 -0
- package/dist/client/assets/ConnectCliAuthSurface-BLD0XNSi.js +2 -0
- package/dist/client/assets/DiffDisplayControls-DsQS9IDw.js +1403 -0
- package/dist/client/assets/DiffPanel-DnIRg_Qy.js +98 -0
- package/dist/client/assets/DiffWorkerPoolProvider-DZJfC5kN.js +2 -0
- package/dist/client/assets/FieldControl-CuSMRkbi.js +2 -0
- package/dist/client/assets/FieldItemContext-Ba7ZZoDN.js +2 -0
- package/dist/client/assets/FilePreviewPanel-D3bq1Own.js +2220 -0
- package/dist/client/assets/KeybindingsSettings.logic-BQBQ8pFk.js +2 -0
- package/dist/client/assets/LocalAnnotatableCodeView-BS3qlDRM.js +2 -0
- package/dist/client/assets/PreviewPanel-C41OCDV3.js +2 -0
- package/dist/client/assets/ProviderModelPicker-BcQ3CMKb.js +2 -0
- package/dist/client/assets/PullRequestMarkdown-D5bDuXWN.js +2 -0
- package/dist/client/assets/RedactedSensitiveText-C3lDjv-5.js +2 -0
- package/dist/client/assets/ReviewActionsPanel-7rqPggzL.js +2 -0
- package/dist/client/assets/ReviewDiffWorkerPoolBoundary-CpqNaHWe.js +2 -0
- package/dist/client/assets/ReviewDiffWorkerSurface-fGPW1-P9.js +2 -0
- package/dist/client/assets/ReviewPatchView-Dt3GW4pP.js +4 -0
- package/dist/client/assets/Schema-DzLI5hMK.js +16 -0
- package/dist/client/assets/ServerUpdateAction-N9rNsTaN.js +2 -0
- package/dist/client/assets/SettingsPanels-DgK9Gy4R.js +3 -0
- package/dist/client/assets/SymbolsNerdFontMono-Regular-aK5vsLov.woff2 +0 -0
- package/dist/client/assets/WorkerPoolContext-BG9CEDyi.js +15 -0
- package/dist/client/assets/_chat-CDYErsvF.js +2 -0
- package/dist/client/assets/_chat._environmentId._threadId-Dn7yzuy5.js +2 -0
- package/dist/client/assets/_chat.draft._draftId-CKnp5OeX.js +2 -0
- package/dist/client/assets/_chat.index-CSOaDOiG.js +2 -0
- package/dist/client/assets/abap-CLvhMVsD.js +2 -0
- package/dist/client/assets/actionscript-3--17pq3dv.js +2 -0
- package/dist/client/assets/ada-C5qYipkI.js +2 -0
- package/dist/client/assets/alert-dialog-0GbcUK1u.js +2 -0
- package/dist/client/assets/andromeeda-WkhI09AS.js +2 -0
- package/dist/client/assets/andromeeda-vGVdxbeo.js +2 -0
- package/dist/client/assets/angular-html-BmcYSFCP.js +2 -0
- package/dist/client/assets/angular-ts-Ab3z1XOh.js +2 -0
- package/dist/client/assets/apache-U0d_L8uA.js +2 -0
- package/dist/client/assets/apex-VAyPSnFM.js +2 -0
- package/dist/client/assets/apl-DdAjc1Is.js +2 -0
- package/dist/client/assets/applescript-CCn79oCD.js +2 -0
- package/dist/client/assets/ara-4CJ0cIlV.js +2 -0
- package/dist/client/assets/asciidoc-DE70LPWp.js +2 -0
- package/dist/client/assets/asm-Cmm7eHzH.js +2 -0
- package/dist/client/assets/astro-jyGOnYUN.js +2 -0
- package/dist/client/assets/aurora-x-C7CFqhAd.js +2 -0
- package/dist/client/assets/aurora-x-CDeNXAV0.js +2 -0
- package/dist/client/assets/awk-BWXHIvNe.js +2 -0
- package/dist/client/assets/ayu-dark-CRu61w6_.js +2 -0
- package/dist/client/assets/ayu-dark-DluEY0Gj.js +2 -0
- package/dist/client/assets/ayu-light-C3h-C4tm.js +2 -0
- package/dist/client/assets/ayu-light-Dn6O_aYR.js +2 -0
- package/dist/client/assets/ayu-mirage-Bqwy1Gya.js +2 -0
- package/dist/client/assets/ayu-mirage-CTjYAbs-.js +2 -0
- package/dist/client/assets/ballerina-B7ZEbQpA.js +2 -0
- package/dist/client/assets/bat-Bo4NYOV-.js +2 -0
- package/dist/client/assets/beancount-D-usSTwE.js +2 -0
- package/dist/client/assets/berry-DKpUyyne.js +2 -0
- package/dist/client/assets/bibtex-Ci_nEsc7.js +2 -0
- package/dist/client/assets/bicep-CUHmPFLl.js +2 -0
- package/dist/client/assets/bird2-C6vDhewU.js +2 -0
- package/dist/client/assets/blade-C4dPlbVG.js +2 -0
- package/dist/client/assets/branding-DWKqECp7.js +2 -0
- package/dist/client/assets/bsl-BkkzgIyY.js +2 -0
- package/dist/client/assets/c-DtlEA5ZX.js +2 -0
- package/dist/client/assets/c3-BFHwR3_K.js +2 -0
- package/dist/client/assets/cadence-CQ2zXKGN.js +2 -0
- package/dist/client/assets/cairo-DLTphjLi.js +2 -0
- package/dist/client/assets/catppuccin-frappe-3VR1Za6u.js +2 -0
- package/dist/client/assets/catppuccin-frappe-DFlFW5gh.js +2 -0
- package/dist/client/assets/catppuccin-latte-CpxdcXpJ.js +2 -0
- package/dist/client/assets/catppuccin-latte-DwIHMF0Q.js +2 -0
- package/dist/client/assets/catppuccin-macchiato-DIdIQ04K.js +2 -0
- package/dist/client/assets/catppuccin-macchiato-DYnBP6_5.js +2 -0
- package/dist/client/assets/catppuccin-mocha-Co3Xjl64.js +2 -0
- package/dist/client/assets/catppuccin-mocha-DYhrFGRu.js +2 -0
- package/dist/client/assets/checkbox-Cuif7tF0.js +2 -0
- package/dist/client/assets/circle-x-F0441fqg.js +2 -0
- package/dist/client/assets/clarity-SemFz856.js +2 -0
- package/dist/client/assets/clojure-DqKBuwfJ.js +2 -0
- package/dist/client/assets/cmake-Bj61d0ZC.js +2 -0
- package/dist/client/assets/cobol-X9aU3UsG.js +2 -0
- package/dist/client/assets/codeowners-C8r90Shi.js +2 -0
- package/dist/client/assets/codeql-oeQT6MSM.js +2 -0
- package/dist/client/assets/coffee-BluyIHgc.js +2 -0
- package/dist/client/assets/combobox-D0sqVdtm.js +2 -0
- package/dist/client/assets/common-lisp-Cv5bFMCO.js +2 -0
- package/dist/client/assets/compiler-runtime-CUwoe8mk.js +2 -0
- package/dist/client/assets/connect-CshPrK5J.js +2 -0
- package/dist/client/assets/connect_.callback-1fxfJdnn.js +2 -0
- package/dist/client/assets/coq-BrsZFFmf.js +2 -0
- package/dist/client/assets/cpp-BAWTDsD2.js +2 -0
- package/dist/client/assets/crystal-DEAezpUc.js +2 -0
- package/dist/client/assets/csharp-oqKa8noW.js +2 -0
- package/dist/client/assets/css-ZG5tpaE7.js +2 -0
- package/dist/client/assets/csv-Dx-8-gkx.js +2 -0
- package/dist/client/assets/cue-CE9AQfxI.js +2 -0
- package/dist/client/assets/cypher-ClKdZ_lG.js +2 -0
- package/dist/client/assets/d-qD-0Kul2.js +2 -0
- package/dist/client/assets/dark-plus-Cs2F2srj.js +2 -0
- package/dist/client/assets/dark-plus-GAt2ZgX8.js +2 -0
- package/dist/client/assets/dart-CnvKMtbv.js +2 -0
- package/dist/client/assets/dax-BkyTk9wS.js +2 -0
- package/dist/client/assets/desktop-Dlh5hvp9.js +2 -0
- package/dist/client/assets/diff-woXpYk--.js +2 -0
- package/dist/client/assets/dm-sans-latin-ext-wght-normal-BOFOeGcA.woff2 +0 -0
- package/dist/client/assets/dm-sans-latin-wght-normal-Xz1IZZA0.woff2 +0 -0
- package/dist/client/assets/docker-IyjqRm3v.js +2 -0
- package/dist/client/assets/dotenv-_5a1GRtc.js +2 -0
- package/dist/client/assets/dracula-BHWKrbxM.js +2 -0
- package/dist/client/assets/dracula-C2uKkzgK.js +2 -0
- package/dist/client/assets/dracula-soft-5eyTD99u.js +2 -0
- package/dist/client/assets/dracula-soft-D1bVjxWZ.js +2 -0
- package/dist/client/assets/dream-maker-DW3nJb8Q.js +2 -0
- package/dist/client/assets/edge-BUUilOUR.js +2 -0
- package/dist/client/assets/elixir-amUSnRCT.js +2 -0
- package/dist/client/assets/elm-BjxEHjzr.js +2 -0
- package/dist/client/assets/emacs-lisp-B4R74twV.js +2 -0
- package/dist/client/assets/entities-EGZcO-rg.js +2 -0
- package/dist/client/assets/environments-DPUVdQJp.js +2 -0
- package/dist/client/assets/erb-t1kck8M-.js +2 -0
- package/dist/client/assets/erlang-Cphh6RMH.js +2 -0
- package/dist/client/assets/everforest-dark-D-DlICQR.js +2 -0
- package/dist/client/assets/everforest-dark-sB-x3p7T.js +2 -0
- package/dist/client/assets/everforest-light-CeVdGHYG.js +2 -0
- package/dist/client/assets/everforest-light-Df2xbC6M.js +2 -0
- package/dist/client/assets/eye-TogxKhHZ.js +2 -0
- package/dist/client/assets/fennel-DQxkIbk2.js +2 -0
- package/dist/client/assets/fileCommentAnnotations-uFcaPOph.js +2 -0
- package/dist/client/assets/fish-BJitypiv.js +2 -0
- package/dist/client/assets/fluent-C03EYrpw.js +2 -0
- package/dist/client/assets/fortran-fixed-form-DEKoE2YW.js +2 -0
- package/dist/client/assets/fortran-free-form-CYNrtFtB.js +2 -0
- package/dist/client/assets/fsharp-D13ZGOAj.js +2 -0
- package/dist/client/assets/gauge-DXknpyA8.js +2 -0
- package/dist/client/assets/gdresource-C0sCabJj.js +2 -0
- package/dist/client/assets/gdscript-Cp2uCuqX.js +2 -0
- package/dist/client/assets/gdshader-CBce3t8t.js +2 -0
- package/dist/client/assets/genie-CV2tkWYe.js +2 -0
- package/dist/client/assets/gherkin-DExj1W_8.js +2 -0
- package/dist/client/assets/ghostty-vt-DdA0Zryv.wasm +0 -0
- package/dist/client/assets/ghostty-write-pty-hgyAvVbe.wasm +0 -0
- package/dist/client/assets/git-commit-BSykSTBG.js +2 -0
- package/dist/client/assets/git-rebase-Cq4_6JTl.js +2 -0
- package/dist/client/assets/github-dark-C-LZuMrd.js +2 -0
- package/dist/client/assets/github-dark-DwbbXv51.js +2 -0
- package/dist/client/assets/github-dark-default-CxjRwzl6.js +2 -0
- package/dist/client/assets/github-dark-default-DXG-b-1a.js +2 -0
- package/dist/client/assets/github-dark-dimmed-Bx1FflLF.js +2 -0
- package/dist/client/assets/github-dark-dimmed-Cr1oaoul.js +2 -0
- package/dist/client/assets/github-dark-high-contrast-B4qJZLZa.js +2 -0
- package/dist/client/assets/github-dark-high-contrast-B_tTalzw.js +2 -0
- package/dist/client/assets/github-light-CsVXhIlR.js +2 -0
- package/dist/client/assets/github-light-EUqPIrTm.js +2 -0
- package/dist/client/assets/github-light-default-BXViO-2h.js +2 -0
- package/dist/client/assets/github-light-default-DB_IwZa6.js +2 -0
- package/dist/client/assets/github-light-high-contrast-B68TUdTA.js +2 -0
- package/dist/client/assets/github-light-high-contrast-DLgVeSB-.js +2 -0
- package/dist/client/assets/gleam-CSRkHgEL.js +2 -0
- package/dist/client/assets/glimmer-js-u4EGJ0zO.js +2 -0
- package/dist/client/assets/glimmer-ts-Gurbt52H.js +2 -0
- package/dist/client/assets/glsl-30pqDoZO.js +2 -0
- package/dist/client/assets/gn-ilITqXS6.js +2 -0
- package/dist/client/assets/gnuplot-7GGW24-e.js +2 -0
- package/dist/client/assets/go-rLFTqkRN.js +2 -0
- package/dist/client/assets/graphql-Bs5G1kBK.js +2 -0
- package/dist/client/assets/groovy-CacY0gHj.js +2 -0
- package/dist/client/assets/group-BUXx2pDS.js +2 -0
- package/dist/client/assets/gruvbox-dark-hard-C820rvS2.js +2 -0
- package/dist/client/assets/gruvbox-dark-hard-DXm60lX3.js +2 -0
- package/dist/client/assets/gruvbox-dark-medium-BPjhmG05.js +2 -0
- package/dist/client/assets/gruvbox-dark-medium-GE2thSmD.js +2 -0
- package/dist/client/assets/gruvbox-dark-soft-04Cj-4VZ.js +2 -0
- package/dist/client/assets/gruvbox-dark-soft-MrdJrrXF.js +2 -0
- package/dist/client/assets/gruvbox-light-hard-BC_s9l72.js +2 -0
- package/dist/client/assets/gruvbox-light-hard-K6wSn29D.js +2 -0
- package/dist/client/assets/gruvbox-light-medium-BAWPOn9u.js +2 -0
- package/dist/client/assets/gruvbox-light-medium-CVy3aSlc.js +2 -0
- package/dist/client/assets/gruvbox-light-soft-BSMLrYjP.js +2 -0
- package/dist/client/assets/gruvbox-light-soft-DNgJjaY0.js +2 -0
- package/dist/client/assets/hack-Cko6MX06.js +2 -0
- package/dist/client/assets/haml-Doizmjk4.js +2 -0
- package/dist/client/assets/handlebars-b-YSlzII.js +2 -0
- package/dist/client/assets/haskell-D8IpX4py.js +2 -0
- package/dist/client/assets/haxe-OTjmBuCE.js +2 -0
- package/dist/client/assets/hcl-Dh228itO.js +2 -0
- package/dist/client/assets/hex-color-picker-DfLvGsRa.js +2 -0
- package/dist/client/assets/history-D05vcMtj.js +2 -0
- package/dist/client/assets/hjson-CxZEssPk.js +2 -0
- package/dist/client/assets/hlsl-Cvrh5tZx.js +2 -0
- package/dist/client/assets/horizon-0-RkHfro.js +2 -0
- package/dist/client/assets/horizon-CE9ld1lL.js +2 -0
- package/dist/client/assets/horizon-bright-BgL2X9oq.js +2 -0
- package/dist/client/assets/horizon-bright-DSNQnXHK.js +2 -0
- package/dist/client/assets/hostedPairing-nVVe5x4p.js +2 -0
- package/dist/client/assets/houston-CsvMBhTu.js +2 -0
- package/dist/client/assets/houston-KyjWKfuY.js +2 -0
- package/dist/client/assets/html-FzejeGn1.js +2 -0
- package/dist/client/assets/html-derivative-CnAooqTz.js +2 -0
- package/dist/client/assets/http-BxFImlHF.js +2 -0
- package/dist/client/assets/hurl-qINZb_eJ.js +2 -0
- package/dist/client/assets/hxml-B0Qn7Nwc.js +2 -0
- package/dist/client/assets/hy-CZbG8q4J.js +2 -0
- package/dist/client/assets/imba-DsUTQ-LC.js +2 -0
- package/dist/client/assets/index-DCOpJfCm.js +475 -0
- package/dist/client/assets/index-zJhfLl9C.css +1 -0
- package/dist/client/assets/ini-B5eOa1yu.js +2 -0
- package/dist/client/assets/input-group-DTqnJGXS.js +2 -0
- package/dist/client/assets/java-dMRc_cVD.js +2 -0
- package/dist/client/assets/javascript-BWMpBhVQ.js +2 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/client/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/dist/client/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/client/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/client/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/client/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/dist/client/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/client/assets/jinja-VDH3C9Ij.js +2 -0
- package/dist/client/assets/jison-BB0XuJyA.js +2 -0
- package/dist/client/assets/json-BjGzD-SE.js +2 -0
- package/dist/client/assets/json5-BR5RXkoi.js +2 -0
- package/dist/client/assets/jsonc-CYpm1nAK.js +2 -0
- package/dist/client/assets/jsonl-CmCQp5Yx.js +2 -0
- package/dist/client/assets/jsonnet-CJTPZ8u_.js +2 -0
- package/dist/client/assets/jssm-DXw9l8Rf.js +2 -0
- package/dist/client/assets/jsx-DzJWGKks.js +2 -0
- package/dist/client/assets/julia-BgCkjxqD.js +2 -0
- package/dist/client/assets/just-CVxSIAWS.js +2 -0
- package/dist/client/assets/kanagawa-dragon-7TqgsUPC.js +2 -0
- package/dist/client/assets/kanagawa-dragon-CXtmUGW6.js +2 -0
- package/dist/client/assets/kanagawa-lotus-BN08jTvb.js +2 -0
- package/dist/client/assets/kanagawa-lotus-CqxMQulh.js +2 -0
- package/dist/client/assets/kanagawa-wave-CTweb8Dz.js +2 -0
- package/dist/client/assets/kanagawa-wave-D8CNn6T_.js +2 -0
- package/dist/client/assets/kdl-CsD5j6eV.js +2 -0
- package/dist/client/assets/kotlin-DhhofPvG.js +2 -0
- package/dist/client/assets/kusto-C7mF5XQf.js +2 -0
- package/dist/client/assets/laserwave-CQkdhozh.js +2 -0
- package/dist/client/assets/laserwave-C_8bwKvT.js +2 -0
- package/dist/client/assets/latex-D7_rfK40.js +2 -0
- package/dist/client/assets/lean-CewbzKMR.js +2 -0
- package/dist/client/assets/less-DVTAwKKz.js +2 -0
- package/dist/client/assets/lib-b9zyleUn.js +30 -0
- package/dist/client/assets/light-plus-CNQ8_7Y0.js +2 -0
- package/dist/client/assets/light-plus-DVQuIRkW.js +2 -0
- package/dist/client/assets/link-BL3GZ_rH.js +2 -0
- package/dist/client/assets/liquid-C5PsA06M.js +2 -0
- package/dist/client/assets/llvm-Cm23YOpf.js +2 -0
- package/dist/client/assets/localApi-5K0gg1WP.js +3 -0
- package/dist/client/assets/log-BNLmms1o.js +2 -0
- package/dist/client/assets/logo-Cluzi2Zq.js +2 -0
- package/dist/client/assets/lua-Bq1DnbZG.js +2 -0
- package/dist/client/assets/luau-FMPmPwt6.js +2 -0
- package/dist/client/assets/make-Dixweg8N.js +2 -0
- package/dist/client/assets/markdown-BYOwaDjH.js +2 -0
- package/dist/client/assets/marko-C7zk2YT1.js +2 -0
- package/dist/client/assets/matchContext-C4X6O3hW.js +2 -0
- package/dist/client/assets/material-theme-Bm3Qr25_.js +2 -0
- package/dist/client/assets/material-theme-CAtLaHa3.js +2 -0
- package/dist/client/assets/material-theme-darker-2IIEA8gg.js +2 -0
- package/dist/client/assets/material-theme-darker-k-s5Bc6K.js +2 -0
- package/dist/client/assets/material-theme-lighter-CD6a-c4d.js +2 -0
- package/dist/client/assets/material-theme-lighter-uhdI0v04.js +2 -0
- package/dist/client/assets/material-theme-ocean-B3mraInd.js +2 -0
- package/dist/client/assets/material-theme-ocean-CHQ94UKr.js +2 -0
- package/dist/client/assets/material-theme-palenight-B5W6OYN7.js +2 -0
- package/dist/client/assets/material-theme-palenight-DEhAARHw.js +2 -0
- package/dist/client/assets/matlab-D7qyCx1q.js +2 -0
- package/dist/client/assets/mdc-JKnKthIF.js +2 -0
- package/dist/client/assets/mdx-DQZ5AkYe.js +2 -0
- package/dist/client/assets/mermaid-Bk4SNUv9.js +2 -0
- package/dist/client/assets/min-dark-BFqTAwCr.js +2 -0
- package/dist/client/assets/min-dark-BSWPekZh.js +2 -0
- package/dist/client/assets/min-light-DDpmG2fV.js +2 -0
- package/dist/client/assets/min-light-O7UdaaxX.js +2 -0
- package/dist/client/assets/mipsasm-BMqwQI7S.js +2 -0
- package/dist/client/assets/mojo-BgCJLMeH.js +2 -0
- package/dist/client/assets/monokai-C0p7Qecz.js +2 -0
- package/dist/client/assets/monokai-CdkpiU2Y.js +2 -0
- package/dist/client/assets/moonbit-CaWjb8XO.js +2 -0
- package/dist/client/assets/move-B1IS1UjX.js +2 -0
- package/dist/client/assets/narrat-_X_XdTYD.js +2 -0
- package/dist/client/assets/nextflow-BJtWHP5T.js +2 -0
- package/dist/client/assets/nextflow-groovy-DJMQeKeT.js +2 -0
- package/dist/client/assets/nginx-DXZZx9Fe.js +2 -0
- package/dist/client/assets/night-owl-BsnCLAKc.js +2 -0
- package/dist/client/assets/night-owl-DhmEMT88.js +2 -0
- package/dist/client/assets/night-owl-light-BODRhcTU.js +2 -0
- package/dist/client/assets/night-owl-light-eJ-hLW7d.js +2 -0
- package/dist/client/assets/nim-CkvLrvYM.js +2 -0
- package/dist/client/assets/nix-IvuFDN5E.js +2 -0
- package/dist/client/assets/nord-Cb4Vim4T.js +2 -0
- package/dist/client/assets/nord-Cd-F4txO.js +2 -0
- package/dist/client/assets/nushell-DcLAeLz5.js +2 -0
- package/dist/client/assets/objective-c-D1A_Heim.js +2 -0
- package/dist/client/assets/objective-cpp-BsSzOQcm.js +2 -0
- package/dist/client/assets/ocaml-O90oeIOV.js +2 -0
- package/dist/client/assets/odin-B1RWQWA5.js +2 -0
- package/dist/client/assets/one-dark-pro-CLwyXe_n.js +2 -0
- package/dist/client/assets/one-dark-pro-DUS_IGRK.js +2 -0
- package/dist/client/assets/one-light-CVUd7yD5.js +2 -0
- package/dist/client/assets/one-light-D7Lr4KcI.js +2 -0
- package/dist/client/assets/openscad-BUDT5pXO.js +2 -0
- package/dist/client/assets/pair-D_sKBvJj.js +2 -0
- package/dist/client/assets/pascal-4ZHwLPI5.js +2 -0
- package/dist/client/assets/perl-DKUKw9CE.js +2 -0
- package/dist/client/assets/php-GHQk7Jua.js +2 -0
- package/dist/client/assets/pierre-dark-CpLgRqie.js +2 -0
- package/dist/client/assets/pierre-dark-protanopia-deuteranopia-B35FxJx-.js +2 -0
- package/dist/client/assets/pierre-dark-soft-kZQmAZld.js +2 -0
- package/dist/client/assets/pierre-dark-tritanopia-CpjhbsIL.js +2 -0
- package/dist/client/assets/pierre-dark-vibrant-CpQYzh95.js +2 -0
- package/dist/client/assets/pierre-light-CoaEpmwp.js +2 -0
- package/dist/client/assets/pierre-light-protanopia-deuteranopia-0fSaH845.js +2 -0
- package/dist/client/assets/pierre-light-soft-lWLdNTOI.js +2 -0
- package/dist/client/assets/pierre-light-tritanopia-CEbqgOJL.js +2 -0
- package/dist/client/assets/pierre-light-vibrant-D80Fkn33.js +2 -0
- package/dist/client/assets/pkl-ot-7Btpt.js +2 -0
- package/dist/client/assets/plastic-CF8VZTnn.js +2 -0
- package/dist/client/assets/plastic-DQwYfKfQ.js +2 -0
- package/dist/client/assets/plsql-DGHpHOYJ.js +2 -0
- package/dist/client/assets/po-BiJDBrnU.js +2 -0
- package/dist/client/assets/poimandres-BX2TyY6j.js +2 -0
- package/dist/client/assets/poimandres-DRFjx7u4.js +2 -0
- package/dist/client/assets/polar-C7UOKdEL.js +2 -0
- package/dist/client/assets/postcss-BXeXVLqQ.js +2 -0
- package/dist/client/assets/powerquery-DNMTfnFr.js +2 -0
- package/dist/client/assets/powershell-DshXNtvi.js +2 -0
- package/dist/client/assets/preload-helper-D2XUqLHy.js +1 -0
- package/dist/client/assets/previewActionBus-B2LYye0P.js +2 -0
- package/dist/client/assets/prisma-BsRQq5mF.js +2 -0
- package/dist/client/assets/projects-D9v9VLJo.js +2 -0
- package/dist/client/assets/prolog-iXnhIJG7.js +2 -0
- package/dist/client/assets/proto-DB4EqR-F.js +2 -0
- package/dist/client/assets/pug-DxCMAzbD.js +2 -0
- package/dist/client/assets/puppet-CDv2pdJW.js +2 -0
- package/dist/client/assets/purescript-9MfHhQsQ.js +2 -0
- package/dist/client/assets/python-gzcpVVnB.js +2 -0
- package/dist/client/assets/qml-D3IL06-0.js +2 -0
- package/dist/client/assets/qmldir-DCQb3MpD.js +2 -0
- package/dist/client/assets/qss-Fe1Jh2GI.js +2 -0
- package/dist/client/assets/query-BTlH8ppa.js +2 -0
- package/dist/client/assets/r-D2Zb3-aq.js +2 -0
- package/dist/client/assets/racket-DcIDlBhZ.js +2 -0
- package/dist/client/assets/radio-group-VXzWvOzu.js +2 -0
- package/dist/client/assets/raku-B3gFvitq.js +2 -0
- package/dist/client/assets/razor-BfPqrQiz.js +2 -0
- package/dist/client/assets/red-7ga_dcKu.js +2 -0
- package/dist/client/assets/red-CJ3rzSJv.js +2 -0
- package/dist/client/assets/redirect-CTDpd8-N.js +2 -0
- package/dist/client/assets/reg-CRGYupPL.js +2 -0
- package/dist/client/assets/regexp-BtCnpNi-.js +2 -0
- package/dist/client/assets/rel-BtDbiS_P.js +2 -0
- package/dist/client/assets/reviewPatchParser.worker-Bx0aLcXI.js +13 -0
- package/dist/client/assets/reviews-DqcOSrtz.js +2 -0
- package/dist/client/assets/reviews._environmentId._host._owner._repository._pullRequestNumber-QICycRVU.js +11 -0
- package/dist/client/assets/reviews.index-Dw9KYVnt.js +2 -0
- package/dist/client/assets/riscv-Ckw8ddFX.js +2 -0
- package/dist/client/assets/ron-VUp2lXgN.js +2 -0
- package/dist/client/assets/rose-pine-BthvhNj6.js +2 -0
- package/dist/client/assets/rose-pine-dawn-DSuRaP6u.js +2 -0
- package/dist/client/assets/rose-pine-dawn-Dg85fqjY.js +2 -0
- package/dist/client/assets/rose-pine-moon-DdHjCvFQ.js +2 -0
- package/dist/client/assets/rose-pine-moon-hon4tzzS.js +2 -0
- package/dist/client/assets/rose-pine-rh6ipraJ.js +2 -0
- package/dist/client/assets/rosmsg-CAekHB0j.js +2 -0
- package/dist/client/assets/rotate-ccw-BuHf9qmb.js +2 -0
- package/dist/client/assets/rst-DgVsEgbv.js +2 -0
- package/dist/client/assets/ruby-DM9zEDxk.js +2 -0
- package/dist/client/assets/rust-Cfkwpbl8.js +2 -0
- package/dist/client/assets/safeLog-NeXgoMPF.js +3 -0
- package/dist/client/assets/sas-DlL3ue79.js +2 -0
- package/dist/client/assets/sass-DXrisJhu.js +2 -0
- package/dist/client/assets/scala-DKOlJaKm.js +2 -0
- package/dist/client/assets/scheduler-8SgDf5Nb.js +2 -0
- package/dist/client/assets/scheme-DQCgrYNe.js +2 -0
- package/dist/client/assets/scss-LGD8fUVB.js +2 -0
- package/dist/client/assets/sdbl-bTVj8UrX.js +2 -0
- package/dist/client/assets/settings-D4XOj85b.js +2 -0
- package/dist/client/assets/settings.appearance-CZvAeZCN.js +42 -0
- package/dist/client/assets/settings.archived-Y06GoG0S.js +2 -0
- package/dist/client/assets/settings.beta-Bd5UrFtG.js +2 -0
- package/dist/client/assets/settings.connections-YjuBg0cD.js +2 -0
- package/dist/client/assets/settings.diagnostics-DujS7DMW.js +3 -0
- package/dist/client/assets/settings.general-sQSJC3Rq.js +2 -0
- package/dist/client/assets/settings.keybindings-C6b2im1-.js +2 -0
- package/dist/client/assets/settings.providers-CzhQRSvU.js +2 -0
- package/dist/client/assets/settings.source-control-Ocoxm1T5.js +2 -0
- package/dist/client/assets/shaderlab-TOUzSsQk.js +2 -0
- package/dist/client/assets/shell-BfrxrAzH.js +2 -0
- package/dist/client/assets/shellscript-CYVg9JP5.js +2 -0
- package/dist/client/assets/shellsession-Cn2QQjIy.js +2 -0
- package/dist/client/assets/slack-dark-DYvUXyrP.js +2 -0
- package/dist/client/assets/slack-dark-DnToyrRv.js +2 -0
- package/dist/client/assets/slack-ochin-B2OO5cIa.js +2 -0
- package/dist/client/assets/slack-ochin-bqtMVDfH.js +2 -0
- package/dist/client/assets/smalltalk-B16xEiuN.js +2 -0
- package/dist/client/assets/snazzy-light-4G7pJPwS.js +2 -0
- package/dist/client/assets/snazzy-light-D8dzFmq5.js +2 -0
- package/dist/client/assets/solarized-dark-BQwPDzxK.js +2 -0
- package/dist/client/assets/solarized-dark-DV17i1UV.js +2 -0
- package/dist/client/assets/solarized-light-BLaijb3X.js +2 -0
- package/dist/client/assets/solarized-light-DSh2HLQt.js +2 -0
- package/dist/client/assets/solidity-CKzVLygQ.js +2 -0
- package/dist/client/assets/soy-BNUH7AWp.js +2 -0
- package/dist/client/assets/sparql-D_iOobhT.js +2 -0
- package/dist/client/assets/splunk-BC2Px7Mm.js +2 -0
- package/dist/client/assets/sql-BLrhh1Yv.js +2 -0
- package/dist/client/assets/ssh-config-BgfXC-Er.js +2 -0
- package/dist/client/assets/stata-CbTJOr_m.js +2 -0
- package/dist/client/assets/stylus-B6D30XZt.js +2 -0
- package/dist/client/assets/surrealql-Bp6i6018.js +2 -0
- package/dist/client/assets/svelte-CuQ8bF4c.js +2 -0
- package/dist/client/assets/swift-DonLKvLd.js +2 -0
- package/dist/client/assets/switch-rJ-jJPhK.js +2 -0
- package/dist/client/assets/synthwave-84-CIknw8y7.js +2 -0
- package/dist/client/assets/synthwave-84-nFMaYfgc.js +2 -0
- package/dist/client/assets/system-verilog-DJ5XKQeo.js +2 -0
- package/dist/client/assets/systemd-BxMlprV5.js +2 -0
- package/dist/client/assets/talonscript-CohzipZa.js +2 -0
- package/dist/client/assets/tasl-DMoTqEGO.js +2 -0
- package/dist/client/assets/tcl-CZd0xW_V.js +2 -0
- package/dist/client/assets/templ-Bo-nf_t1.js +2 -0
- package/dist/client/assets/terminalAppearance-BqQ_2bv1.js +2 -0
- package/dist/client/assets/terraform-DswuEJGm.js +2 -0
- package/dist/client/assets/tex-BgvSMBks.js +2 -0
- package/dist/client/assets/textarea-XNVgJSPU.js +2 -0
- package/dist/client/assets/toggle-QDWstdFN.js +2 -0
- package/dist/client/assets/tokyo-night-iIspnLcq.js +2 -0
- package/dist/client/assets/tokyo-night-oM2G3aXe.js +2 -0
- package/dist/client/assets/toml-CcmNWLt0.js +2 -0
- package/dist/client/assets/ts-tags-Bm95_vpn.js +2 -0
- package/dist/client/assets/tsv-sltzmVWM.js +2 -0
- package/dist/client/assets/tsx-ToB8-PkG.js +2 -0
- package/dist/client/assets/turtle-ByJddavk.js +2 -0
- package/dist/client/assets/twig-D5eIhwLo.js +2 -0
- package/dist/client/assets/typescript-55S1t3b3.js +2 -0
- package/dist/client/assets/typespec-BRdr0IET.js +2 -0
- package/dist/client/assets/typst-DI99ib-x.js +2 -0
- package/dist/client/assets/uiStateStore-DKTfup26.js +2 -0
- package/dist/client/assets/use-atom-command-CbJ8L7ju.js +4 -0
- package/dist/client/assets/useAriaLabelledBy-DcnsWgtX.js +2 -0
- package/dist/client/assets/useParams-Iww6IHUG.js +2 -0
- package/dist/client/assets/useReviewMergeAction-BgjVNuJP.js +2 -0
- package/dist/client/assets/useSettings-CGh4Xw67.js +2 -0
- package/dist/client/assets/useStore-Bv9Rrp6F.js +2 -0
- package/dist/client/assets/utils-SYwD9hoF.js +2 -0
- package/dist/client/assets/utils-Yidpy5tB.js +30 -0
- package/dist/client/assets/v-DETTlOr0.js +2 -0
- package/dist/client/assets/vala-zf12oZj6.js +2 -0
- package/dist/client/assets/vb-Djn5o6TS.js +2 -0
- package/dist/client/assets/vcsRefInvalidation-CMdkUDtM.js +2 -0
- package/dist/client/assets/verilog-CiiDBU1e.js +2 -0
- package/dist/client/assets/vesper-BIFK_oDq.js +2 -0
- package/dist/client/assets/vesper-DdrHHSXu.js +2 -0
- package/dist/client/assets/vhdl-BroJfC0k.js +2 -0
- package/dist/client/assets/viml-DvXPmvsu.js +2 -0
- package/dist/client/assets/vitesse-black-D082JcaE.js +2 -0
- package/dist/client/assets/vitesse-black-fwtXNY1n.js +2 -0
- package/dist/client/assets/vitesse-dark-BZCL-v6S.js +2 -0
- package/dist/client/assets/vitesse-dark-z-nr_5O8.js +2 -0
- package/dist/client/assets/vitesse-light-VbXTXTou.js +2 -0
- package/dist/client/assets/vitesse-light-ojz42ZLy.js +2 -0
- package/dist/client/assets/vue-BWR1mbne.js +2 -0
- package/dist/client/assets/vue-html-DGrJOwF8.js +2 -0
- package/dist/client/assets/vue-vine-SedHajQj.js +2 -0
- package/dist/client/assets/vyper-CgoNMtux.js +2 -0
- package/dist/client/assets/wasm-BnjxR4X6.js +2 -0
- package/dist/client/assets/wasm-ByWQv1Qj.js +2 -0
- package/dist/client/assets/wenyan-C8pVoKbM.js +2 -0
- package/dist/client/assets/wgsl-BsKzXJz4.js +2 -0
- package/dist/client/assets/wikitext-ClFFjSW2.js +2 -0
- package/dist/client/assets/wit-DdvCle-K.js +2 -0
- package/dist/client/assets/with-selector-C3poe37J.js +2 -0
- package/dist/client/assets/wolfram-DLL8P-h_.js +2 -0
- package/dist/client/assets/worker-CIcqvLjo.js +159 -0
- package/dist/client/assets/workspaceTitlebar-CrNTdVrF.js +2 -0
- package/dist/client/assets/xml-BB6ezbMQ.js +2 -0
- package/dist/client/assets/xsl-DygAj9pT.js +2 -0
- package/dist/client/assets/yaml-CIJj2T9S.js +2 -0
- package/dist/client/assets/zenscript-BnlCZFoB.js +2 -0
- package/dist/client/assets/zig-CMLA9XwU.js +2 -0
- package/dist/client/index.html +327 -0
- package/dist/client/mockServiceWorker.js +349 -0
- package/dist/service-launcher.mjs +461 -0
- package/package.json +54 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{c as i,s as a,t as o}from"./useSettings-CGh4Xw67.js";import{Ra as s,aa as c,oa as l,ra as u,sa as d}from"./index-DCOpJfCm.js";import{t as f}from"./switch-rJ-jJPhK.js";var p=r(),m=t(n(),1),h=t(e(),1),g=1,_=90,v=3;function y(e){let t=(0,p.c)(11),{value:n,onCommit:r}=e,[i,a]=(0,m.useState)(String(n)),o,c;t[0]===n?(o=t[1],c=t[2]):(o=()=>{a(String(n))},c=[n],t[0]=n,t[1]=o,t[2]=c),(0,m.useEffect)(o,c);let l;t[3]===r?l=t[4]:(l=e=>{a(e.target.value);let t=Number(e.target.value);Number.isInteger(t)&&t>=g&&t<=_&&r(t)},t[3]=r,t[4]=l);let u;t[5]===n?u=t[6]:(u=()=>a(String(n)),t[5]=n,t[6]=u);let d;return t[7]!==i||t[8]!==l||t[9]!==u?(d=(0,h.jsx)(s,{type:`number`,min:g,max:_,className:`w-full sm:w-24`,value:i,onChange:l,onBlur:u,"aria-label":`Days of inactivity before auto-settle`}),t[7]=i,t[8]=l,t[9]=u,t[10]=d):d=t[10],d}function b(){let e=(0,p.c)(13),t=a(),n=o(x),r=i(),s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=u(`sidebar-v2`),e[0]=s):s=e[0];let m;e[1]===r?m=e[2]:(m=e=>r({sidebarV2Enabled:!!e,sidebarV2ConfiguredByUser:!0}),e[1]=r,e[2]=m);let g;e[3]!==t||e[4]!==m?(g=(0,h.jsx)(l,{...s,description:`One flat thread list in creation order. Active work renders as rich cards; settled threads collapse to compact rows. Settling requires an up-to-date server — on older servers threads simply stay active. Switch back any time.`,control:(0,h.jsx)(f,{checked:t,onCheckedChange:m,"aria-label":`Enable the sidebar v2 beta`})}),e[3]=t,e[4]=m,e[5]=g):g=e[5];let _;e[6]!==n||e[7]!==t||e[8]!==r?(_=t?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l,{title:u(`auto-settle-inactive-threads`).title,description:`Threads with no activity for this long settle automatically. Threads on merged or closed PRs always settle.`,control:(0,h.jsx)(f,{checked:n!==null,onCheckedChange:e=>r({sidebarAutoSettleAfterDays:e?v:null}),"aria-label":`Auto-settle inactive threads`})}),n===null?null:(0,h.jsx)(l,{title:`Days of inactivity before auto-settle`,description:`Any new activity un-settles a thread automatically.`,control:(0,h.jsx)(y,{value:n,onCommit:e=>r({sidebarAutoSettleAfterDays:e})})})]}):null,e[6]=n,e[7]=t,e[8]=r,e[9]=_):_=e[9];let b;return e[10]!==g||e[11]!==_?(b=(0,h.jsx)(c,{children:(0,h.jsxs)(d,{title:`Beta features`,children:[g,_]})}),e[10]=g,e[11]=_,e[12]=b):b=e[12],b}function x(e){return e.sidebarAutoSettleAfterDays}function S(){let e=(0,p.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsx)(b,{}),e[0]=t):t=e[0],t}export{S as component};
|
|
2
|
+
//# sourceMappingURL=settings.beta-Bd5UrFtG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{Bs as i,Cs as a,Dc as o,Ds as s,Eo as c,Es as l,Ft as u,Gs as d,Hs as f,Il as p,It as m,Jl as h,Js as g,Ks as _,Lt as v,Ma as y,Os as b,Pc as x,Pt as S,Ss as C,Ts as w,Us as T,Xs as E,Ys as D,Zs as O,cn as k,eu as A,fn as ee,gn as te,hn as j,ja as ne,jt as M,mn as re,pn as N,qs as P,t as ie,wn as ae,yn as oe,yo as se}from"./utils-Yidpy5tB.js";import{A as F,At as ce,Dt as le,E as ue,Ht as de,Kt as fe,M as pe,Nt as me,Ot as he,Rt as I,Tt as L,_t as R,ft as z,k as ge,kt as _e,n as ve,pt as B,rt as V,st as ye,t as H,wt as be}from"./use-atom-command-CbJ8L7ju.js";import{$ as U,D as W,In as G,Is as xe,Ls as Se,Mi as Ce,Ms as we,P as Te,Qn as K,Wn as q,Wr as Ee,Zr as De,cn as Oe,en as ke,hr as Ae,kn as je,na as Me,nr as J,oa as Ne,ri as Pe,s as Fe,tr as Ie,vs as Le,xn as Re}from"./Schema-DzLI5hMK.js";import{A as ze,_ as Be,f as Ve,g as He,h as Ue,k as We,m as Ge,p as Ke,s as Y,u as qe,v as Je}from"./localApi-5K0gg1WP.js";import{c as Ye,h as Xe,l as Ze,n as Qe,o as $e,p as et,s as tt}from"./hostedPairing-nVVe5x4p.js";import{f as nt,t as rt,v as it}from"./query-BTlH8ppa.js";import{i as at,o as ot,r as st,s as ct}from"./environments-DPUVdQJp.js";import{r as lt,t as ut}from"./useSettings-CGh4Xw67.js";import{a as dt}from"./uiStateStore-DKTfup26.js";import{n as ft,t as pt}from"./checkbox-Cuif7tF0.js";import{Ar as mt,Ba as ht,Bc as gt,Bi as _t,Dr as vt,Fa as yt,Fc as bt,Ft as xt,Go as St,Hi as Ct,Ii as wt,It as Tt,Li as Et,Lt as Dt,Nc as Ot,Or as kt,Pt as At,Ra as jt,Ri as Mt,Ui as Nt,Va as Pt,Vc as Ft,Vi as It,Wi as Lt,Wo as X,Xo as Rt,_a as zt,aa as Bt,at as Vt,ca as Ht,et as Ut,fa as Wt,ga as Gt,ha as Kt,it as qt,ls as Jt,ma as Yt,nt as Xt,oa as Zt,os as Qt,ot as $t,ra as en,rt as tn,sa as nn,ss as rn,tt as an,wl as on,xa as sn,zi as cn}from"./index-DCOpJfCm.js";import{t as ln}from"./textarea-XNVgJSPU.js";import{t as un}from"./switch-rJ-jJPhK.js";import{n as dn,t as fn}from"./group-BUXx2pDS.js";import{a as pn,i as mn,n as hn,o as gn,r as _n,s as vn,t as yn}from"./alert-dialog-0GbcUK1u.js";import{n as bn,o as xn,s as Sn,t as Cn}from"./ServerUpdateAction-N9rNsTaN.js";var wn=y(`chevrons-left-right-ellipsis`,[[`path`,{d:`M12 12h.01`,key:`1mp3jc`}],[`path`,{d:`M16 12h.01`,key:`1l6xoz`}],[`path`,{d:`m17 7 5 5-5 5`,key:`1xlxn0`}],[`path`,{d:`m7 7-5 5 5 5`,key:`19njba`}],[`path`,{d:`M8 12h.01`,key:`czm47f`}]]),Tn=y(`qr-code`,[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]),Z=t(n(),1),Q=r();function En(e,t){let n=new URL(e);return n.pathname=`/pair`,Xe(n,t).toString()}function Dn(e,t){return new URL(e).protocol===`https:`?Qe({host:e,token:t}):null}async function On(e){let{bridge:t,mode:n,nextDistro:r,persistedDistro:i}=e;return await t.setWslOnly(n===`wsl-only`),i!==r&&await t.setWslDistro(r),await t.setWslBackendEnabled(!0)}async function kn(e){await e.commit({connectionTransport:e.connectionTransport}),e.reload()}function An(){let e=(0,Q.c)(8),t=ut(Mn),n=lt(),[r,i]=(0,Z.useState)(null),a;e[0]!==n||e[1]!==t||e[2]!==r?(a=async e=>{if(!(r!==null||e===t)){i(e);try{await kn({connectionTransport:e,commit:n,reload:jn})}catch(e){let t=e;i(null),X.add(St({type:`error`,title:`Could not change connection transport`,description:t instanceof Error?t.message:`The settings write failed.`}))}}},e[0]=n,e[1]=t,e[2]=r,e[3]=a):a=e[3];let o=a,s;return e[4]!==o||e[5]!==t||e[6]!==r?(s={connectionTransport:t,pendingConnectionTransport:r,changeConnectionTransport:o},e[4]=o,e[5]=t,e[6]=r,e[7]=s):s=e[7],s}function jn(){return window.location.reload()}function Mn(e){return e.connectionTransport}var $=t(e(),1),Nn=[{value:`auto`,label:`Automatic (recommended)`},{value:`websocket`,label:`WebSocket`},{value:`http-long-poll`,label:`HTTP compatibility`}];function Pn(){let e=(0,Q.c)(17),{connectionTransport:t,pendingConnectionTransport:n,changeConnectionTransport:r}=An(),i;e[0]===t?i=e[1]:(i=Nn.find(e=>e.value===t)?.label??t,e[0]=t,e[1]=i);let a=i,o=n===null?null:`Saving and reconnecting…`,s;e[2]===r?s=e[3]:(s=e=>{let t=Nn.find(t=>t.value===e);t&&r(t.value)},e[2]=r,e[3]=s);let c=n!==null,l;e[4]===a?l=e[5]:(l=(0,$.jsx)(v,{children:a}),e[4]=a,e[5]=l);let d;e[6]!==c||e[7]!==l?(d=(0,$.jsx)(m,{"aria-label":`Connection transport`,className:`w-full sm:w-56`,disabled:c,children:l}),e[6]=c,e[7]=l,e[8]=d):d=e[8];let f;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(u,{align:`end`,alignItemWithTrigger:!1,children:Nn.map(Fn)}),e[9]=f):f=e[9];let p;e[10]!==t||e[11]!==s||e[12]!==d?(p=(0,$.jsxs)(M,{value:t,onValueChange:s,children:[d,f]}),e[10]=t,e[11]=s,e[12]=d,e[13]=p):p=e[13];let h;return e[14]!==o||e[15]!==p?(h=(0,$.jsx)(nn,{title:`Connection behavior`,children:(0,$.jsx)(Zt,{title:`Transport`,description:`Automatic prefers WebSocket and switches to HTTP compatibility when WebSockets are unavailable. HTTP compatibility can work better through restrictive networks and proxies. Changing this setting reloads DasCode and reconnects every environment.`,status:o,control:p})}),e[14]=o,e[15]=p,e[16]=h):h=e[16],h}function Fn(e){return(0,$.jsx)(S,{hideIndicator:!0,value:e.value,children:e.label},e.value)}var In=class e{static Ecc;static encodeText(t,n){let r=Bn.makeSegments(t);return e.encodeSegments(r,n)}static encodeBinary(t,n){let r=Bn.makeBytes(t);return e.encodeSegments([r],n)}static encodeSegments(t,n,r=1,i=40,a=-1,o=!0){if(!(e.MIN_VERSION<=r&&r<=i&&i<=e.MAX_VERSION)||a<-1||a>7)throw RangeError(`Invalid value`);let s,c;for(s=r;;s++){let r=e.getNumDataCodewords(s,n)*8,a=Bn.getTotalBits(t,s);if(a<=r){c=a;break}if(s>=i)throw RangeError(`Data too long`)}for(let t of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])o&&c<=e.getNumDataCodewords(s,t)*8&&(n=t);let l=[];for(let e of t){Ln(e.mode.modeBits,4,l),Ln(e.numChars,e.mode.numCharCountBits(s),l);for(let t of e.getData())l.push(t)}zn(l.length==c);let u=e.getNumDataCodewords(s,n)*8;zn(l.length<=u),Ln(0,Math.min(4,u-l.length),l),Ln(0,(8-l.length%8)%8,l),zn(l.length%8==0);for(let e=236;l.length<u;e^=253)Ln(e,8,l);let d=[];for(;d.length*8<l.length;)d.push(0);return l.forEach((e,t)=>d[t>>>3]|=e<<7-(t&7)),new e(s,n,d,a)}version;errorCorrectionLevel;size;mask;modules=[];isFunction=[];constructor(t,n,r,i){if(this.version=t,this.errorCorrectionLevel=n,t<e.MIN_VERSION||t>e.MAX_VERSION)throw RangeError(`Version value out of range`);if(i<-1||i>7)throw RangeError(`Mask value out of range`);this.size=t*4+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();let o=this.addEccAndInterleave(r);if(this.drawCodewords(o),i==-1){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);let n=this.getPenaltyScore();n<e&&(i=t,e=n),this.applyMask(t)}}zn(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);let e=this.getAlignmentPatternPositions(),t=e.length;for(let n=0;n<t;n++)for(let r=0;r<t;r++)n==0&&r==0||n==0&&r==t-1||n==t-1&&r==0||this.drawAlignmentPattern(e[n],e[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){let t=this.errorCorrectionLevel.formatBits<<3|e,n=t;for(let e=0;e<10;e++)n=n<<1^(n>>>9)*1335;let r=(t<<10|n)^21522;zn(r>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,Rn(r,e));this.setFunctionModule(8,7,Rn(r,6)),this.setFunctionModule(8,8,Rn(r,7)),this.setFunctionModule(7,8,Rn(r,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,Rn(r,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,Rn(r,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,Rn(r,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;zn(t>>>18==0);for(let e=0;e<18;e++){let n=Rn(t,e),r=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(r,i,n),this.setFunctionModule(i,r,n)}}drawFinderPattern(e,t){for(let n=-4;n<=4;n++)for(let r=-4;r<=4;r++){let i=Math.max(Math.abs(r),Math.abs(n)),a=e+r,o=t+n;0<=a&&a<this.size&&0<=o&&o<this.size&&this.setFunctionModule(a,o,i!=2&&i!=4)}}drawAlignmentPattern(e,t){for(let n=-2;n<=2;n++)for(let r=-2;r<=2;r++)this.setFunctionModule(e+r,t+n,Math.max(Math.abs(r),Math.abs(n))!=1)}setFunctionModule(e,t,n){this.modules[t][e]=n,this.isFunction[t][e]=!0}addEccAndInterleave(t){let n=this.version,r=this.errorCorrectionLevel;if(t.length!=e.getNumDataCodewords(n,r))throw RangeError(`Invalid argument`);let i=e.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][n],a=e.ECC_CODEWORDS_PER_BLOCK[r.ordinal][n],o=Math.floor(e.getNumRawDataModules(n)/8),s=i-o%i,c=Math.floor(o/i),l=[],u=e.reedSolomonComputeDivisor(a);for(let n=0,r=0;n<i;n++){let i=t.slice(r,r+c-a+(n<s?0:1));r+=i.length;let o=e.reedSolomonComputeRemainder(i,u);n<s&&i.push(0),l.push(i.concat(o))}let d=[];for(let e=0;e<l[0].length;e++)l.forEach((t,n)=>{(e!=c-a||n>=s)&&d.push(t[e])});return zn(d.length==o),d}drawCodewords(t){if(t.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw RangeError(`Invalid argument`);let n=0;for(let e=this.size-1;e>=1;e-=2){e==6&&(e=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){let a=e-i,o=e+1&2?r:this.size-1-r;!this.isFunction[o][a]&&n<t.length*8&&(this.modules[o][a]=Rn(t[n>>>3],7-(n&7)),n++)}}zn(n==t.length*8)}applyMask(e){if(e<0||e>7)throw RangeError(`Mask value out of range`);for(let t=0;t<this.size;t++)for(let n=0;n<this.size;n++){let r;switch(e){case 0:r=(n+t)%2==0;break;case 1:r=t%2==0;break;case 2:r=n%3==0;break;case 3:r=(n+t)%3==0;break;case 4:r=(Math.floor(n/3)+Math.floor(t/2))%2==0;break;case 5:r=n*t%2+n*t%3==0;break;case 6:r=(n*t%2+n*t%3)%2==0;break;case 7:r=((n+t)%2+n*t%3)%2==0;break;default:throw Error(`Unreachable`)}!this.isFunction[t][n]&&r&&(this.modules[t][n]=!this.modules[t][n])}}getPenaltyScore(){let t=0;for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[n][o]===r?(i++,i==5?t+=e.PENALTY_N1:i>5&&t++):(this.finderPenaltyAddHistory(i,a),r||(t+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),r=this.modules[n][o],i=1);t+=this.finderPenaltyTerminateAndCount(r,i,a)*e.PENALTY_N3}for(let n=0;n<this.size;n++){let r=!1,i=0,a=[0,0,0,0,0,0,0];for(let o=0;o<this.size;o++)this.modules[o][n]===r?(i++,i==5?t+=e.PENALTY_N1:i>5&&t++):(this.finderPenaltyAddHistory(i,a),r||(t+=this.finderPenaltyCountPatterns(a)*e.PENALTY_N3),r=this.modules[o][n],i=1);t+=this.finderPenaltyTerminateAndCount(r,i,a)*e.PENALTY_N3}for(let n=0;n<this.size-1;n++)for(let r=0;r<this.size-1;r++){let i=this.modules[n][r];i==this.modules[n][r+1]&&i==this.modules[n+1][r]&&i==this.modules[n+1][r+1]&&(t+=e.PENALTY_N2)}let n=0;for(let e of this.modules)n=e.reduce((e,t)=>e+ +!!t,n);let r=this.size*this.size,i=Math.ceil(Math.abs(n*20-r*10)/r)-1;return zn(0<=i&&i<=9),t+=i*e.PENALTY_N4,zn(0<=t&&t<=2568888),t}getAlignmentPatternPositions(){if(this.version==1)return[];{let e=Math.floor(this.version/7)+2,t=this.version==32?26:Math.ceil((this.version*4+4)/(e*2-2))*2,n=[6];for(let r=this.size-7;n.length<e;r-=t)n.splice(1,0,r);return n}}static getNumRawDataModules(t){if(t<e.MIN_VERSION||t>e.MAX_VERSION)throw RangeError(`Version number out of range`);let n=(16*t+128)*t+64;if(t>=2){let e=Math.floor(t/7)+2;n-=(25*e-10)*e-55,t>=7&&(n-=36)}return zn(208<=n&&n<=29648),n}static getNumDataCodewords(t,n){return Math.floor(e.getNumRawDataModules(t)/8)-e.ECC_CODEWORDS_PER_BLOCK[n.ordinal][t]*e.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][t]}static reedSolomonComputeDivisor(t){if(t<1||t>255)throw RangeError(`Degree out of range`);let n=[];for(let e=0;e<t-1;e++)n.push(0);n.push(1);let r=1;for(let i=0;i<t;i++){for(let t=0;t<n.length;t++)n[t]=e.reedSolomonMultiply(n[t],r),t+1<n.length&&(n[t]^=n[t+1]);r=e.reedSolomonMultiply(r,2)}return n}static reedSolomonComputeRemainder(t,n){let r=n.map(e=>0);for(let i of t){let t=i^r.shift();r.push(0),n.forEach((n,i)=>r[i]^=e.reedSolomonMultiply(n,t))}return r}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw RangeError(`Byte out of range`);let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return zn(n>>>8==0),n}finderPenaltyCountPatterns(e){let t=e[1];zn(t<=this.size*3);let n=t>0&&e[2]===t&&e[3]===t*3&&e[4]===t&&e[5]===t;return(n&&e[0]>=t*4&&e[6]>=t?1:0)+(n&&e[6]>=t*4&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,n){return e&&(this.finderPenaltyAddHistory(t,n),t=0),t+=this.size,this.finderPenaltyAddHistory(t,n),this.finderPenaltyCountPatterns(n)}finderPenaltyAddHistory(e,t){t[0]===0&&(e+=this.size),t.pop(),t.unshift(e)}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]};function Ln(e,t,n){if(t<0||t>31||e>>>t)throw RangeError(`Value out of range`);for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function Rn(e,t){return(e>>>t&1)!=0}function zn(e){if(!e)throw Error(`Assertion error`)}var Bn=class e{static Mode;static makeBytes(t){let n=[];for(let e of t)Ln(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw RangeError(`String contains non-numeric characters`);let n=[];for(let e=0;e<t.length;){let r=Math.min(t.length-e,3);Ln(parseInt(t.substring(e,e+r),10),r*3+1,n),e+=r}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw RangeError(`String contains unencodable characters in alphanumeric mode`);let n=[],r;for(r=0;r+2<=t.length;r+=2){let i=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r))*45;i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r+1)),Ln(i,11,n)}return r<t.length&&Ln(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(r)),6,n),new e(e.Mode.ALPHANUMERIC,t.length,n)}static makeSegments(t){return t==``?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw RangeError(`ECI assignment value out of range`);if(t<128)Ln(t,8,n);else if(t<16384)Ln(2,2,n),Ln(t,14,n);else if(t<1e6)Ln(6,3,n),Ln(t,21,n);else throw RangeError(`ECI assignment value out of range`);return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}mode;numChars;bitData;constructor(e,t,n){if(this.mode=e,this.numChars=t,t<0)throw RangeError(`Invalid argument`);this.bitData=n.slice()}getData(){return this.bitData.slice()}static getTotalBits(e,t){let n=0;for(let r of e){let e=r.mode.numCharCountBits(t);if(r.numChars>=1<<e)return 1/0;n+=4+e+r.bitData.length}return n}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let n=0;n<e.length;n++)e.charAt(n)==`%`?(t.push(parseInt(e.substring(n+1,n+3),16)),n+=2):t.push(e.charCodeAt(n));return t}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET=`0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:`},Vn=class e{static LOW=new e(0,1);static MEDIUM=new e(1,0);static QUARTILE=new e(2,3);static HIGH=new e(3,2);ordinal;formatBits;constructor(e,t){this.ordinal=e,this.formatBits=t}},Hn=class e{static NUMERIC=new e(1,[10,12,14]);static ALPHANUMERIC=new e(2,[9,11,13]);static BYTE=new e(4,[8,16,16]);static KANJI=new e(8,[8,10,12]);static ECI=new e(7,[0,0,0]);modeBits;numBitsCharCount;constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};In.Ecc=Vn,Bn.Mode=Hn;var Un={L:In.Ecc.LOW,M:In.Ecc.MEDIUM,Q:In.Ecc.QUARTILE,H:In.Ecc.HIGH};function Wn(e,t){let n=[];for(let r=0;r<e.size;r+=1){let i=-1;for(let a=0;a<=e.size;a+=1){if(a<e.size&&e.getModule(a,r)){i===-1&&(i=a);continue}i!==-1&&(n.push(`M${i+t} ${r+t}h${a-i}v1H${i+t}z`),i=-1)}}return n.join(``)}var Gn=(0,Z.memo)(function(e){let t=(0,Q.c)(38),{value:n,size:r,level:i,marginSize:a,title:o,className:s,foregroundColor:c,backgroundColor:l}=e,u=r===void 0?128:r,d=i===void 0?`L`:i,f=a===void 0?0:a,p=c===void 0?`#000`:c,m=l===void 0?`#fff`:l,h,g,_,v,y,b,x,S,C,w,T;if(t[0]!==m||t[1]!==s||t[2]!==d||t[3]!==f||t[4]!==u||t[5]!==o||t[6]!==n){let e=In.encodeText(n,Un[d]),r=e.size+f*2;C=`http://www.w3.org/2000/svg`,w=`0 0 ${r} ${r}`,T=u,h=u,g=`crispEdges`,_=o?`img`:void 0,v=o,y=s,t[18]===o?b=t[19]:(b=o?(0,$.jsx)(`title`,{children:o}):null,t[18]=o,t[19]=b),t[20]!==m||t[21]!==r?(x=(0,$.jsx)(`rect`,{width:r,height:r,fill:m}),t[20]=m,t[21]=r,t[22]=x):x=t[22],S=Wn(e,f),t[0]=m,t[1]=s,t[2]=d,t[3]=f,t[4]=u,t[5]=o,t[6]=n,t[7]=h,t[8]=g,t[9]=_,t[10]=v,t[11]=y,t[12]=b,t[13]=x,t[14]=S,t[15]=C,t[16]=w,t[17]=T}else h=t[7],g=t[8],_=t[9],v=t[10],y=t[11],b=t[12],x=t[13],S=t[14],C=t[15],w=t[16],T=t[17];let E;t[23]!==p||t[24]!==S?(E=(0,$.jsx)(`path`,{d:S,fill:p}),t[23]=p,t[24]=S,t[25]=E):E=t[25];let D;return t[26]!==h||t[27]!==g||t[28]!==_||t[29]!==v||t[30]!==y||t[31]!==b||t[32]!==x||t[33]!==E||t[34]!==C||t[35]!==w||t[36]!==T?(D=(0,$.jsxs)(`svg`,{xmlns:C,viewBox:w,width:T,height:h,shapeRendering:g,role:_,"aria-label":v,className:y,children:[b,x,E]}),t[26]=h,t[27]=g,t[28]=_,t[29]=v,t[30]=y,t[31]=b,t[32]=x,t[33]=E,t[34]=C,t[35]=w,t[36]=T,t[37]=D):D=t[37],D});function Kn(){return Ye().relayUrl}var qn=class extends Ce(`CloudEnvironmentLinkError`){},Jn=e=>t=>new qn({message:e,cause:t});function Yn(e){return q(function*(){let t=yield*ce,n=yield*t.run(e,le(c.cloudGetRelayClientStatus,{})).pipe(J(Jn(`Could not check relay client availability.`)));if(n.status===`available`)return;if(n.status===`unsupported`)return yield*new qn({message:`DasCode cannot install the relay client automatically on ${n.platform}-${n.arch}.`});if(!(yield*De({try:()=>Dt(n.version),catch:Jn(`Could not confirm relay client installation.`)})))return yield*new qn({message:`Relay client installation was cancelled.`});let r=yield*t.runStream(e,he(c.cloudInstallRelayClient,{}).pipe(A(e=>Ee(()=>Tt(e))))).pipe(h,J(Jn(`Could not install the relay client.`)),je(Ee(xt)));if(xe(r)||r.value.type!==`complete`)return yield*new qn({message:`The relay client install completed without a final status.`});let i=r.value.status;if(i.status!==`available`)return yield*new qn({message:i.status===`unsupported`?`DasCode cannot install the relay client automatically on ${i.platform}-${i.arch}.`:`The relay client is still unavailable after installation.`})})}var Xn=U(Te([a,b,l,w,s,C]));function Zn(e){switch(e._tag){case`RelayAuthInvalidError`:switch(e.reason){case`missing_bearer`:case`invalid_bearer`:return`Relay rejected the cloud session token.`;case`invalid_dpop`:return`Relay rejected the DPoP proof.`;case`not_authorized`:return`Relay rejected the authenticated request.`}case`RelayEnvironmentLinkProofExpiredError`:return`Relay rejected an expired environment link proof.`;case`RelayEnvironmentLinkProofInvalidError`:return`Relay rejected the environment link proof (${e.reason}).`;case`RelayEnvironmentConnectNotAuthorizedError`:return e.reason===`environment_link_not_found`?`Relay has no active link for this environment. The environment server may not have re-established its link yet.`:e.reason?`Relay rejected the environment connection request (${e.reason}).`:`Relay rejected the environment connection request.`;case`RelayEnvironmentEndpointUnavailableError`:return`Relay could not reach the environment endpoint (${e.reason}).`;case`RelayEnvironmentEndpointTimedOutError`:return`Relay timed out while contacting the environment endpoint.`;case`RelayEnvironmentLinkFailedError`:return`Relay could not link the environment (${e.reason}).`;case`RelayEnvironmentLinkUnavailableError`:return`Relay cannot provision the managed endpoint (${e.reason}).`;case`RelayEnvironmentLinkLimitExceededError`:return`Relay refused the link: this account already has its maximum of ${e.maxTunnels} managed tunnels. Unlink an environment to free one up.`;case`RelayAgentActivityPublishProofExpiredError`:return`Relay rejected an expired agent activity publish proof.`;case`RelayAgentActivityPublishProofInvalidError`:return`Relay rejected the agent activity publish proof (${e.reason}).`;case`RelayInternalError`:return`Relay encountered an internal error (${e.reason}).`}}function Qn(e){return t=>{let n=t._tag===`ManagedRelayRequestFailedError`?t.relayError:void 0,r=t._tag===`ManagedRelayRequestFailedError`?t.traceId:void 0,i=n?Zn(n):null;return new qn({message:i?`${e}: ${i}`:e,cause:t,...r?{traceId:r}:{}})}}function $n(e){return Xn(e)?e:typeof e!=`object`||!e?null:`cause`in e?$n(e.cause):null}var er=e=>t=>{let n=$n(t);return new qn({message:n?`${e.replace(/[.:]$/,``)}: ${n.message}`:e,cause:t})};function tr(e){let t=new URL(e);return{localHttpHost:`127.0.0.1`,localHttpPort:Number(t.port||(t.protocol===`https:`?443:80))}}var nr=`cloudflare_tunnel`;function rr(e){return e.link.environmentId===e.expectedEnvironmentId?e.link.endpoint.providerKind===e.expectedProviderKind?Pe:new qn({message:`Relay returned credentials for a different endpoint provider.`}):new qn({message:`Relay returned credentials for a different environment.`})}function ir(e){return e.httpRequestBaseUrl??e.httpBaseUrl}function ar(e){return q(function*(){return yield*(yield*se(ir(e.target))).connect.linkState({headers:{}}).pipe(J(er(`Could not read environment cloud link state.`)))}).pipe(Ae(F))}function or(e){return q(function*(){return yield*(yield*se(ir(e.target))).connect.preferences({headers:{},payload:e}).pipe(J(er(`Could not update environment cloud preferences.`)))}).pipe(Ae(F))}function sr(e){return q(function*(){yield*(yield*se(ir(e.target))).connect.unlink({headers:{}}).pipe(J(er(`Could not unlink the environment from cloud.`))),Kn()&&e.clerkToken&&(yield*(yield*fe).unlinkEnvironment({clerkToken:e.clerkToken,environmentId:o.make(e.target.environmentId)}).pipe(Re(e=>K(`Could not revoke cloud environment link after local unlink.`,{cause:e}))))}).pipe(Ae(F))}var cr=`manual`;function lr(e){return q(function*(){let t=Kn();if(!t)return yield*new qn({message:`T3CODE_RELAY_URL is not configured.`});let n=(e.mode??`managed`)===`managed`,r=n?nr:cr,i=yield*fe,a=yield*se(ir(e.target));n&&(yield*Yn(o.make(e.target.environmentId)));let s=yield*i.createEnvironmentLinkChallenge({clerkToken:e.clerkToken,payload:{notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(J(Qn(`${t}/v1/client/environment-link-challenges failed`))),c=yield*a.connect.linkProof({headers:{},payload:{challenge:s.challenge,relayIssuer:t,endpoint:{httpBaseUrl:e.target.httpBaseUrl,wsBaseUrl:e.target.wsBaseUrl,providerKind:r},origin:tr(e.target.httpBaseUrl)}}).pipe(J(er(`Could not obtain environment link proof.`))),l=yield*i.linkEnvironment({clerkToken:e.clerkToken,payload:{proof:c,notificationsEnabled:!0,liveActivitiesEnabled:!0,managedTunnelsEnabled:n}}).pipe(J(Qn(`${t}/v1/client/environment-links failed`)));yield*rr({expectedEnvironmentId:e.target.environmentId,expectedProviderKind:r,link:l}),yield*a.connect.relayConfig({headers:{},payload:{relayUrl:t,relayIssuer:l.relayIssuer,cloudUserId:l.cloudUserId,environmentCredential:l.environmentCredential,cloudMintPublicKey:l.cloudMintPublicKey,endpointRuntime:l.endpointRuntime}}).pipe(J(er(`Could not configure environment relay access.`)))}).pipe(Ae(F))}var ur=ye(),dr={mode:`serial`,key:e=>e.target.environmentId},fr=B(ve,{label:`web:cloud:link-primary-environment`,scheduler:ur,concurrency:dr,execute:e=>lr(e)}),pr=B(ve,{label:`web:cloud:unlink-primary-environment`,scheduler:ur,concurrency:dr,execute:e=>sr(e)}),mr=B(ve,{label:`web:cloud:update-primary-environment-preferences`,scheduler:ur,concurrency:dr,execute:e=>or(e)}),hr=Ue(Ne(x,ge.contextEffect.pipe(Ie(e=>Le(e,x))))),gr=Ve(e=>{let t=JSON.parse(e);return hr.atom(ar({target:t})).pipe(Be({staleTime:5e3,revalidateOnMount:!0}),He(5*6e4),Je(`primary-cloud-link:${t.environmentId}`))}),_r=Ge(We(null)).pipe(Ke,Je(`primary-cloud-link:null`));function vr(e){return JSON.stringify(e)}function yr(e){e&&Y.refresh(gr(vr(e)))}function br(){let e=(0,Q.c)(16),t=at(),n;e[0]===t?n=e[1]:(n=t?.entry.target._tag===`PrimaryConnectionTarget`?{environmentId:t.environmentId,label:t.label,httpBaseUrl:t.entry.target.httpBaseUrl,...t.entry.target.httpRequestBaseUrl===void 0?{}:{httpRequestBaseUrl:t.entry.target.httpRequestBaseUrl},wsBaseUrl:t.entry.target.wsBaseUrl}:null,e[0]=t,e[1]=n);let r=n,i;e[2]===r?i=e[3]:(i=r?gr(vr(r)):_r,e[2]=r,e[3]=i);let a=qe(i),o;e[4]===r?o=e[5]:(o=()=>{yr(r)},e[4]=r,e[5]=o);let s=o,c=null;if(a._tag===`Failure`){let t;e[6]===a.cause?t=e[7]:(t=Me(a.cause),e[6]=a.cause,e[7]=t);let n=t;c=n instanceof Error?n.message:`Could not read DasConnect link state.`}let l;e[8]===a?l=e[9]:(l=we(ze(a)),e[8]=a,e[9]=l);let u;return e[10]!==c||e[11]!==s||e[12]!==a.waiting||e[13]!==l||e[14]!==r?(u={data:l,error:c,isPending:a.waiting,refresh:s,target:r},e[10]=c,e[11]=s,e[12]=a.waiting,e[13]=l,e[14]=r,e[15]=u):u=e[15],u}function xr(){let e=(0,Q.c)(22),{getToken:t,isSignedIn:n}=on(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={reportFailure:!1},e[0]=r):r=e[0];let i=H(ct.refresh,r),a;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},e[1]=a):a=e[1];let o=H(fr,a),s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},e[2]=s):s=e[2];let c=H(pr,s),l;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},e[3]=l):l=e[3];let u=H(mr,l),d=br(),[f,p]=(0,Z.useState)(null),m;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=e=>{let t=e instanceof Error?e.message:`Could not update DasConnect access.`,n=I(e);console.error(`[dasconnect] Could not update DasConnect`,{message:t,traceId:n,cause:e}),p(n?`${t} Trace ID: ${n}`:t),X.add({type:`error`,title:`Could not update DasConnect`,description:t,data:n?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(n)}}:void 0})},e[4]=m):m=e[4];let h=m,g=d.data?.managedTunnelActive??d.data?.linked??!1,_=d.data?.publishAgentActivity??!1,v=d.data?.linked??!1,y;e[5]!==t||e[6]!==o||e[7]!==v||e[8]!==g||e[9]!==d||e[10]!==i||e[11]!==c||e[12]!==u?(y=async e=>{p(null);let n=d.target;if(!n)return h(Error(`Local environment is not ready yet.`)),!1;let r=await be(()=>t(Ze()));if(e.managedTunnel||e.publish){if(r._tag===`Failure`)return h(L(r)),!1;let t=r.value;if(!t)return h(Error(`Sign in to DasConnect before enabling this.`)),!1;if(!v||g!==e.managedTunnel){let r=await o({target:n,clerkToken:t,mode:e.managedTunnel?`managed`:`publish_only`});if(r._tag===`Failure`)return R(r)||h(L(r)),d.refresh(),!1}let i=await u({target:n,publishAgentActivity:e.publish});if(i._tag===`Failure`)return R(i)||h(L(i)),d.refresh(),!1}else{let e=await c({target:n,clerkToken:r._tag===`Success`?r.value??null:null});if(e._tag===`Failure`)return R(e)||h(L(e)),d.refresh(),!1}d.refresh();let a=await i();return a._tag===`Failure`&&!R(a)?(h(L(a)),!1):!0},e[5]=t,e[6]=o,e[7]=v,e[8]=g,e[9]=d,e[10]=i,e[11]=c,e[12]=u,e[13]=y):y=e[13];let b=y,x;return e[14]!==n||e[15]!==v||e[16]!==g||e[17]!==f||e[18]!==d||e[19]!==_||e[20]!==b?(x={isSignedIn:n,linkState:d,linked:v,managedTunnelActive:g,publishAgentActivity:_,operationError:f,reconcileCloudState:b},e[14]=n,e[15]=v,e[16]=g,e[17]=f,e[18]=d,e[19]=_,e[20]=b,e[21]=x):x=e[21],x}var Sr={pairingLinks:[],clientSessions:[]};function Cr(e,t,n){let r=n(t);return[...e.filter(e=>n(e)!==r),t]}function wr(e,t){switch(t.type){case`snapshot`:return t.payload;case`pairingLinkUpserted`:return{...e,pairingLinks:Cr(e.pairingLinks,t.payload,e=>e.id)};case`pairingLinkRemoved`:return{...e,pairingLinks:e.pairingLinks.filter(e=>e.id!==t.payload.id)};case`clientUpserted`:return{...e,clientSessions:Cr(e.clientSessions,t.payload,e=>e.sessionId)};case`clientRemoved`:return{...e,clientSessions:e.clientSessions.filter(e=>e.sessionId!==t.payload.sessionId)}}}function Tr(e,t){let n=wr(e,t);return[n,[{version:1,revision:t.revision,type:`snapshot`,payload:n}]]}function Er(e){return{accessChanges:z(e,{label:`environment-data:server:auth-access-changes`,subscribe:e=>_e(c.subscribeAuthAccess,{}).pipe(p(()=>Sr,Tr))})}}var Dr=Er(ve),Or=3e4,kr=class extends W()(`DesktopNetworkAccessUnavailableError`,{}){get message(){return`Desktop network access is unavailable.`}},Ar=class extends W()(`DesktopServerExposureStateLoadError`,{cause:Fe()}){get message(){return`Failed to load desktop server exposure state.`}},jr=class extends W()(`DesktopAdvertisedEndpointsLoadError`,{cause:Fe()}){get message(){return`Failed to load advertised desktop endpoints.`}};function Mr(){return typeof window>`u`?void 0:window.desktopBridge}function Nr(e){return Ge(G(`loadDesktopNetworkAccess`)(function*(){let t=e();if(!t)return yield*new kr;let[n,r]=yield*Oe([De({try:()=>t.getServerExposureState(),catch:e=>new Ar({cause:e})}),De({try:()=>t.getAdvertisedEndpoints(),catch:e=>new jr({cause:e})})],{concurrency:`unbounded`});return{advertisedEndpoints:r,serverExposureState:n}})()).pipe(Be({staleTime:Or,revalidateOnMount:!0}),Ke,Je(`desktop:network-access`))}var Pr=Nr(Mr);function Fr(){Y.refresh(Pr)}var Ir=class extends W()(`DesktopSshDiscoveryUnavailableError`,{}){get message(){return`Desktop SSH host discovery is unavailable.`}},Lr=class extends W()(`DesktopSshDiscoveryError`,{cause:Fe()}){get message(){return`Failed to discover SSH hosts.`}};function Rr(){return typeof window>`u`?void 0:window.desktopBridge}function zr(e){return Ge(G(`discoverDesktopSshHosts`)(function*(){let t=e();return t?yield*De({try:()=>t.discoverSshHosts(),catch:e=>new Lr({cause:e})}):yield*new Ir})()).pipe(Be({staleTime:3e4,revalidateOnMount:!0}),Ke,Je(`desktop:ssh-hosts`))}var Br=zr(Rr),Vr=3e4,Hr=class extends W()(`DesktopWslStateUnavailableError`,{}){get message(){return`Desktop WSL state is unavailable.`}},Ur=class extends W()(`DesktopWslStateLoadError`,{cause:Fe()}){get message(){return`Failed to load WSL state.`}};function Wr(){return typeof window>`u`?void 0:window.desktopBridge}function Gr(e){return Ge(G(`loadDesktopWslState`)(function*(){let t=e();return t?yield*De({try:()=>t.getWslState(),catch:e=>new Ur({cause:e})}):yield*new Hr})()).pipe(Be({staleTime:Vr,revalidateOnMount:!0}),Ke,Je(`desktop:wsl-state:load`))}var Kr=Gr(Wr);function qr(){Y.refresh(Kr)}function Jr(e){let t=(0,Q.c)(21),{tooltipText:n,dotClassName:r,pingClassName:i}=e,a;t[0]===i?a=t[1]:(a=i?(0,$.jsx)(`span`,{className:ie(`absolute inline-flex h-full w-full animate-status-ping rounded-full`,i)}):null,t[0]=i,t[1]=a);let o;t[2]===r?o=t[3]:(o=ie(`relative inline-flex size-2 rounded-full`,r),t[2]=r,t[3]=o);let s;t[4]===o?s=t[5]:(s=(0,$.jsx)(`span`,{className:o}),t[4]=o,t[5]=s);let c;t[6]!==a||t[7]!==s?(c=(0,$.jsxs)($.Fragment,{children:[a,s]}),t[6]=a,t[7]=s,t[8]=c):c=t[8];let l=c;if(!n){let e;return t[9]===l?e=t[10]:(e=(0,$.jsx)(`span`,{className:`relative flex size-3 shrink-0 items-center justify-center`,children:l}),t[9]=l,t[10]=e),e}let u;t[11]!==l||t[12]!==n?(u=(0,$.jsx)(`button`,{type:`button`,title:n,"aria-label":n,className:`relative flex size-3 shrink-0 cursor-help items-center justify-center rounded-full outline-hidden`,children:l}),t[11]=l,t[12]=n,t[13]=u):u=t[13];let d=u,f;t[14]===d?f=t[15]:(f=(0,$.jsx)(Jt,{render:d}),t[14]=d,t[15]=f);let p;t[16]===n?p=t[17]:(p=(0,$.jsx)(rn,{side:`top`,className:`max-w-80 whitespace-pre-wrap leading-tight`,children:n}),t[16]=n,t[17]=p);let m;return t[18]!==f||t[19]!==p?(m=(0,$.jsxs)(Qt,{children:[f,p]}),t[18]=f,t[19]=p,t[20]=m):m=t[20],m}var Yr=`rounded-xl px-3 py-3 sm:px-4`,Xr=`flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between`;function Zr(e){switch(e.phase){case`connected`:return{buttonLabel:`Connected`,statusText:V(e),tone:`connected`};case`connecting`:return{buttonLabel:`Connecting…`,statusText:V(e),tone:`connecting`};case`reconnecting`:return{buttonLabel:`Reconnecting…`,statusText:V(e),tone:`connecting`};case`error`:return{buttonLabel:`Connection failed`,statusText:V(e),tone:`error`};case`offline`:return{buttonLabel:`Offline`,statusText:V(e),tone:`idle`};case`available`:return{buttonLabel:`Not connected`,statusText:V(e),tone:`idle`}}}function Qr(){let e=(0,Q.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{className:Yr,children:(0,$.jsxs)(`div`,{className:Xr,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-2`,children:[(0,$.jsx)(sn,{className:`h-4 w-32 rounded-full`}),(0,$.jsx)(sn,{className:`h-3 w-20 rounded-full`})]}),(0,$.jsx)(sn,{className:`h-7 w-16 rounded-md`})]})}),e[0]=t):t=e[0],t}function $r(e){let t=(0,Q.c)(17),{primaryEnvironmentId:n,savedEnvironments:r,showSavedEnvironments:i,empty:a}=e,o=i===void 0?!1:i,s=a===void 0?null:a,c=ot(),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={reportFailure:!1},t[0]=l):l=t[0];let u=H(it.register,l),d;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(d={reportFailure:!1},t[1]=d):d=t[1];let f=H(ct.refresh,d),p=e=>u(new me({target:new de({environmentId:e.environmentId,label:e.label})})),[m,h]=(0,Z.useState)(null),g=new Map(r.map(ei)),_,v;t[2]===f?(_=t[3],v=t[4]):(_=()=>{f()},v=[f],t[2]=f,t[3]=_,t[4]=v),(0,Z.useEffect)(_,v);let y=async e=>{h(e.environmentId);let t=await p(e);if(h(null),t._tag===`Success`){X.add({type:`success`,title:`Environment added`,description:`Connecting to ${e.label} through the configured relay.`});return}if(R(t))return;let n=L(t),r=n instanceof Error?n.message:`Could not connect the DasConnect environment.`,i=I(n);console.error(`[t3-connect] Could not connect environment`,{message:r,traceId:i,cause:n}),X.add({type:`error`,title:`Could not connect environment`,description:r,data:i?{secondaryActionProps:{children:`Copy trace ID`,onClick:()=>void navigator.clipboard?.writeText(i)}}:void 0})},b=[...c.environments.values()].filter(e=>{let{environment:t}=e;return t.environmentId!==n&&(o||!g.has(t.environmentId))}),x=o||r.length===0;if(x&&b.length===0&&c.refreshing&&c.environments.size===0){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Qr,{}),t[5]=e):e=t[5],e}if(x&&b.length===0){let e;t[6]!==c.error||t[7]!==c.offline?(e=c.offline?`You appear to be offline.`:we(c.error)?.message??null,t[6]=c.error,t[7]=c.offline,t[8]=e):e=t[8];let n=e;if(n!==null&&!c.refreshing){let e;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Could not load DasConnect environments`}),t[9]=e):e=t[9];let r;t[10]===n?r=t[11]:(r=(0,$.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n}),t[10]=n,t[11]=r);let i;t[12]===f?i=t[13]:(i=(0,$.jsx)(k,{size:`sm`,variant:`outline`,className:`mt-3`,onClick:()=>void f(),children:`Try again`}),t[12]=f,t[13]=i);let a;return t[14]!==r||t[15]!==i?(a=(0,$.jsxs)(`div`,{className:Yr,children:[e,r,i]}),t[14]=r,t[15]=i,t[16]=a):a=t[16],a}return s}return b.map(e=>{let{environment:t,availability:n,error:r}=e,i=g.get(t.environmentId),a=i?Zr(i.connection):null,o=a?a.tone===`connected`?`bg-success`:a.tone===`connecting`?`bg-warning`:a.tone===`error`?`bg-destructive`:`bg-muted-foreground/35`:n===`online`?`bg-success`:n===`error`?`bg-destructive`:n===`checking`?`bg-warning`:`bg-muted-foreground/35`,s=a?a.statusText:n===`online`?`Available · Relay online`:n===`offline`?`Available · Relay offline`:n===`checking`?`Available · Checking relay status…`:we(r)?.message??`Available · Relay status unavailable`;return(0,$.jsx)(`div`,{className:Yr,children:(0,$.jsxs)(`div`,{className:Xr,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(Jr,{dotClassName:o,pingClassName:a?.tone===`connecting`||a===null&&n===`checking`?`bg-warning/60 duration-2000`:null,tooltipText:a?a.statusText:n===`online`?`Relay online`:n===`offline`?`Relay offline`:n===`checking`?`Checking relay status`:we(r)?.message??`Relay status unavailable`}),(0,$.jsx)(`p`,{className:`truncate text-sm font-medium`,children:t.label})]}),(0,$.jsx)(`p`,{className:ie(`mt-1 truncate text-xs`,a?.tone===`error`||a?.tone===`connecting`&&i?.connection.error||a===null&&n===`error`?`text-destructive`:`text-muted-foreground`),children:s})]}),a?(0,$.jsx)(k,{size:`sm`,variant:`outline`,disabled:!0,children:a.buttonLabel}):(0,$.jsx)(k,{size:`sm`,disabled:m!==null,onClick:()=>void y(t),children:m===t.environmentId?`Connecting…`:`Connect`})]})},t.environmentId)})}function ei(e){return[e.environmentId,e]}var ti=443,ni=[],ri=[],ii=`backend:default-wsl`,ai=`backend:wsl-off`,oi=new Intl.DateTimeFormat(void 0,{dateStyle:`medium`,timeStyle:`short`});function si(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:oi.format(t)}var ci=[{scope:_,title:`View environment`,description:`Read threads, status, diffs, and configuration.`},{scope:d,title:`Operate tasks`,description:`Start tasks and perform changes in the environment.`},{scope:O,title:`Use terminals`,description:`Create terminals and send input to running shells.`},{scope:D,title:`Write reviews`,description:`Create comments while reviewing changes.`},{scope:i,title:`View access`,description:`Inspect pairing links and authorized clients.`},{scope:f,title:`Manage access`,description:`Issue and revoke credentials for other clients.`},{scope:P,title:`View relay`,description:`Inspect managed relay connectivity.`},{scope:g,title:`Manage relay`,description:`Change managed tunnel connectivity.`}];function li(e){let t=(0,Q.c)(13),{scopes:n,label:r}=e,i=`${n.length} ${n.length===1?`scope`:`scopes`}`,a=`${r}: show ${i}`,o;t[0]===a?o=t[1]:(o=(0,$.jsx)(`button`,{type:`button`,"aria-label":a,className:`cursor-help underline decoration-border underline-offset-2 outline-hidden hover:text-foreground focus-visible:text-foreground`}),t[0]=a,t[1]=o);let s;t[2]!==i||t[3]!==o?(s=(0,$.jsx)(mt,{openOnHover:!0,delay:250,closeDelay:100,render:o,children:i}),t[2]=i,t[3]=o,t[4]=s):s=t[4];let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,$.jsx)(`p`,{className:`mb-1 font-medium`,children:`Granted scopes`}),t[5]=c):c=t[5];let l;t[6]===n?l=t[7]:(l=n.map(ui),t[6]=n,t[7]=l);let u;t[8]===l?u=t[9]:(u=(0,$.jsxs)(kt,{side:`top`,align:`start`,tooltipStyle:!0,className:`w-max max-w-80 whitespace-normal`,children:[c,(0,$.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:l})]}),t[8]=l,t[9]=u);let d;return t[10]!==s||t[11]!==u?(d=(0,$.jsxs)(vt,{children:[s,u]}),t[10]=s,t[11]=u,t[12]=d):d=t[12],d}function ui(e){return(0,$.jsx)(`code`,{className:`font-mono text-foreground/85`,children:e},e)}function di(e){let t=e.username?`${e.username}@${e.hostname}`:e.hostname;return e.port?`${t}:${e.port}`:t}function fi(e){let t=e.host.trim();if(t.length===0)throw Error(`SSH host or alias is required.`);let n=t,r=e.username.trim()||null,i=null,a=n.lastIndexOf(`@`);if(a>0){let e=n.slice(0,a).trim();n=n.slice(a+1).trim(),!r&&e.length>0&&(r=e)}let o=/^\[([^\]]+)\](?::(\d+))?$/u.exec(n);if(o)n=o[1].trim(),o[2]&&(i=Number.parseInt(o[2],10));else{let e=n.split(`:`);e.length===2&&/^\d+$/u.test(e[1]??``)&&(n=e[0].trim(),i=Number.parseInt(e[1],10))}let s=e.port.trim();if(s.length>0&&(i=Number.parseInt(s,10)),n.length===0)throw Error(`SSH host or alias is required.`);if(i!==null&&(!Number.isInteger(i)||i<=0||i>65535))throw Error(`SSH port must be between 1 and 65535.`);return{alias:n,hostname:n,username:r,port:i}}function pi(e){let t=e.trim();if(!t)return null;try{let e=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//u.test(t)||t.startsWith(`//`)?t:`https://${t}`,n=new URL(e,window.location.origin),r=$e(n);if(r)return{host:r.host,pairingCode:r.token};let i=et(n);return i?{host:n.origin,pairingCode:i}:null}catch{return null}}function mi(e){let t=pi(e.host);if(t)return t;let n=e.host.trim(),r=e.pairingCode.trim();if(!n)throw Error(`Enter a backend host.`);if(!r)throw Error(`Enter a pairing code.`);return{host:n,pairingCode:r}}function hi(e){let t=`Failed to connect SSH host.`;return(e instanceof Error?e.message:t).replace(/^Error invoking remote method 'desktop:ensure-ssh-environment':\s*/u,``).replace(/^Ssh[A-Za-z]+Error:\s*/u,``).trim()||t}var gi=`rounded-xl px-3 py-2.5 sm:px-4`;function _i(e){return Yr}function vi(e,t){return e===`endpoint-rail`?ie(`relative rounded-xl px-3 py-3 sm:px-4`,!t&&`bg-muted/15`):ie(gi,!t&&`bg-muted/24`)}function yi(e){return[...e].toSorted((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}function bi(e){return[...e].toSorted((e,t)=>e.current===t.current?e.connected===t.connected?new Date(t.issuedAt).getTime()-new Date(e.issuedAt).getTime():e.connected?-1:1:e.current?-1:1)}function xi(e){return{...e,createdAt:ke(e.createdAt),expiresAt:ke(e.expiresAt)}}function Si(e){return{...e,issuedAt:ke(e.issuedAt),expiresAt:ke(e.expiresAt),lastConnectedAt:e.lastConnectedAt===null?null:ke(e.lastConnectedAt)}}function Ci(e,t){let n=e.filter(e=>e.status!==`unavailable`);if(t){let e=n.find(e=>Ti(e)===t);if(e)return e}return n.find(e=>e.isDefault)??n.find(e=>e.reachability!==`loopback`)??n.find(e=>e.compatibility.hostedHttpsApp===`compatible`)??null}function wi(e){return e.id.startsWith(`tailscale-magicdns:`)}function Ti(e){if(e.id.startsWith(`desktop-loopback:`))return`desktop-core:loopback:http`;if(e.id.startsWith(`desktop-lan:`))return`desktop-core:lan:http`;if(e.id.startsWith(`tailscale-ip:`))return`tailscale:ip:http`;if(wi(e))return`tailscale:magicdns:https`;let t=`unknown`;try{t=new URL(e.httpBaseUrl).protocol.replace(/:$/u,``)}catch{}return`${e.provider.id}:${e.reachability}:${t}:${e.label}`}function Ei(e,t){return e.compatibility.hostedHttpsApp===`compatible`?Dn(e.httpBaseUrl,t)??En(e.httpBaseUrl,t):En(e.httpBaseUrl,t)}function Di(e){return Xe(new URL(`/pair`,window.location.href),e).toString()}function Oi(e){try{let t=new URL(e);return t.pathname===`/pair`&&t.searchParams.has(`host`)}catch{return!1}}var ki=(0,Z.memo)(function(e){let t=(0,Q.c)(145),{pairingLink:n,endpointUrl:r,endpoints:i,defaultEndpointKey:a,presentation:o,revokingPairingLinkId:s,onRevoke:c}=e,l=o===void 0?`current`:o,u=Ht(1e3),d;t[0]===n.expiresAt?d=t[1]:(d=new Date(n.expiresAt).getTime(),t[0]=n.expiresAt,t[1]=d);let f=d,[p,m]=(0,Z.useState)(!1),h;t[2]===n.credential?h=t[3]:(h=Di(n.credential),t[2]=n.credential,t[3]=h);let g=h,_;t[4]!==r||t[5]!==n.credential?(_=r!=null&&r!==``?Dn(r,n.credential):null,t[4]=r,t[5]=n.credential,t[6]=_):_=t[6];let v=_,y;if(t[7]!==a||t[8]!==i||t[9]!==n.credential){let e=Ci(i,a);y=e?Ei(e,n.credential):null,t[7]=a,t[8]=i,t[9]=n.credential,t[10]=y}else y=t[10];let b=y,x;if(t[11]!==i||t[12]!==n.credential){x=[];for(let e of i){if(e.status===`unavailable`)continue;let t=Ei(e,n.credential);x.push({key:Ti(e),label:e.label,url:t,detail:Oi(t)?`Hosted app link`:`Backend pairing URL`})}t[11]=i,t[12]=n.credential,t[13]=x}else x=t[13];let S=x,C;t[14]!==g||t[15]!==b||t[16]!==r||t[17]!==v||t[18]!==n.credential?(C=b??(r!=null&&r!==``?v??En(r,n.credential):pe(window.location.hostname)?null:g),t[14]=g,t[15]=b,t[16]=r,t[17]=v,t[18]=n.credential,t[19]=C):C=t[19];let w=C,T=w??n.credential,E=w!==null&&Oi(w),D=typeof window<`u`&&window.isSecureContext&&navigator.clipboard?.writeText!=null,O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O={onCopy:Ki,onError:(e,t)=>{m(!0),X.add(St({type:`error`,title:D?t===`hosted-link`?`Could not copy hosted app link`:t===`link`?`Could not copy pairing URL`:`Could not copy pairing code`:`Clipboard copy unavailable`,description:D?e.message:`Showing the full value instead.`}))}},t[20]=O):O=t[20];let{copyToClipboard:A}=Rt(O),M;t[21]===A?M=t[22]:(M=(e,t)=>{A(e,t)},t[21]=A,t[22]=M);let P=M,ie=qi,se;t[23]!==P||t[24]!==n.credential?(se=()=>{P(n.credential,`code`)},t[23]=P,t[24]=n.credential,t[25]=se):se=t[25];let F=se,ce;t[26]!==P||t[27]!==w?(ce=()=>{w&&P(w,ie(w))},t[26]=P,t[27]=w,t[28]=ce):ce=t[28];let le=ce,ue;t[29]===n.expiresAt?ue=t[30]:(ue=si(n.expiresAt),t[29]=n.expiresAt,t[30]=ue);let de=ue,fe=n.label??`Pairing link`,me;t[31]!==a||t[32]!==S?(me=S.find(e=>e.key===a)??S[0]??null,t[31]=a,t[32]=S,t[33]=me):me=t[33];let he=me?.label??`URL`,I,L,R,z,ge,_e,ve,B,V;if(t[34]!==P||t[35]!==he||t[36]!==S||t[37]!==de||t[38]!==f||t[39]!==F||t[40]!==le||t[41]!==p||t[42]!==u||t[43]!==n.createdAt||t[44]!==n.expiresAt||t[45]!==n.scopes||t[46]!==l||t[47]!==fe||t[48]!==w){V=Symbol.for(`react.early_return_sentinel`);bb0:{let e=S.filter(Ji),r=S.filter(Yi),i;t[58]!==P||t[59]!==S?(i=(e,t)=>{let n=e===void 0?S:e,r=t===void 0?!0:t;return n.map(e=>(0,$.jsx)(j,{onClick:()=>P(e.url,ie(e.url)),children:(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate`,children:e.label}),r?(0,$.jsx)(`span`,{className:`block truncate text-ui-11 text-muted-foreground`,children:e.detail}):null]})},e.key))},t[58]=P,t[59]=S,t[60]=i):i=t[60];let a=i,o;t[61]===F?o=t[62]:(o=e=>(0,$.jsx)(j,{onClick:F,children:(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`span`,{className:`block truncate`,children:`Copy code`}),e===void 0||e?(0,$.jsx)(`span`,{className:`block truncate text-ui-11 text-muted-foreground`,children:`Token only`}):null]})}),t[61]=F,t[62]=o);let s=o,c;t[63]===a?c=t[64]:(c=(e,t,n)=>t.length>0?(0,$.jsxs)($.Fragment,{children:[n?(0,$.jsx)(oe,{}):null,(0,$.jsxs)(N,{children:[(0,$.jsx)(re,{children:e}),a(t,!1)]})]}):null,t[63]=a,t[64]=c);let d=c,h=t=>(0,$.jsxs)($.Fragment,{children:[t?.codeFirst?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(N,{children:[(0,$.jsx)(re,{children:`Pairing code`}),s(!1)]}),S.length>0?(0,$.jsx)(oe,{}):null]}):null,d(`Pairing URLs`,e,!1),d(`Hosted app link`,r,e.length>0),t?.codeFirst?null:(0,$.jsxs)($.Fragment,{children:[S.length>0?(0,$.jsx)(oe,{}):null,(0,$.jsxs)(N,{children:[(0,$.jsx)(re,{children:`Pairing code`}),s(!1)]})]})]});if(f<=u){V=null;break bb0}t[65]===l?B=t[66]:(B=_i(l),t[65]=l,t[66]=B),_e=Xr;let g;t[67]===n.createdAt?g=t[68]:(g=si(n.createdAt),t[67]=n.createdAt,t[68]=g);let _=`Link created at ${g}`,v;t[69]===_?v=t[70]:(v=(0,$.jsx)(Jr,{tooltipText:_,dotClassName:`bg-amber-400`}),t[69]=_,t[70]=v);let y;t[71]===fe?y=t[72]:(y=(0,$.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:fe}),t[71]=fe,t[72]=y);let b;t[73]===w?b=t[74]:(b=w?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(mt,{openOnHover:!0,delay:250,closeDelay:100,render:(0,$.jsx)(`button`,{type:`button`,className:`inline-flex size-4 shrink-0 items-center justify-center rounded-sm text-muted-foreground/50 outline-none hover:text-foreground`,"aria-label":`Show QR code`}),children:(0,$.jsx)(Tn,{"aria-hidden":!0,className:`size-3`})}),(0,$.jsx)(kt,{side:`top`,align:`start`,tooltipStyle:!0,className:`w-max`,children:(0,$.jsx)(Gn,{value:w,size:88,level:`M`,marginSize:2,title:`Pairing link — scan to open on another device`})})]}):null,t[73]=w,t[74]=b);let x;t[75]===b?x=t[76]:(x=(0,$.jsx)(vt,{children:b}),t[75]=b,t[76]=x);let C;t[77]!==v||t[78]!==y||t[79]!==x?(C=(0,$.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[v,y,x]}),t[77]=v,t[78]=y,t[79]=x,t[80]=C):C=t[80];let T;t[81]!==u||t[82]!==n.expiresAt?(T=Pt(n.expiresAt,u),t[81]=u,t[82]=n.expiresAt,t[83]=T):T=t[83];let E;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(`span`,{"aria-hidden":!0,children:` · `}),t[84]=E):E=t[84];let O;t[85]===n.scopes?O=t[86]:(O=(0,$.jsx)(li,{scopes:n.scopes,label:`Pairing link scopes`}),t[85]=n.scopes,t[86]=O);let A;t[87]!==de||t[88]!==T||t[89]!==O?(A=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,title:de,children:[T,E,O]}),t[87]=de,t[88]=T,t[89]=O,t[90]=A):A=t[90];let M;t[91]===w?M=t[92]:(M=w===null?(0,$.jsx)(`p`,{className:`text-ui-11 text-muted-foreground/70`,children:`Copy the token and pair from another client using this backend's reachable host.`}):null,t[91]=w,t[92]=M),t[93]!==C||t[94]!==A||t[95]!==M?(ve=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[C,A,M]}),t[93]=C,t[94]=A,t[95]=M,t[96]=ve):ve=t[96],ge=`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,I=wt,L=p,R=m,z=D?(0,$.jsx)($.Fragment,{children:w?(0,$.jsxs)(fn,{"aria-label":`Copy selected endpoint`,children:[(0,$.jsx)(k,{size:`xs`,variant:`outline`,className:`max-w-56`,title:`Copy pairing URL for: ${he}`,onClick:le,children:(0,$.jsxs)(`span`,{className:`truncate`,children:[`Copy pairing URL for: `,he]})}),(0,$.jsx)(dn,{}),(0,$.jsxs)(ee,{children:[(0,$.jsx)(ae,{render:(0,$.jsx)(k,{size:`icon-xs`,variant:`outline`,"aria-label":`Choose endpoint to copy`}),children:(0,$.jsx)(ne,{className:`size-3.5`})}),(0,$.jsx)(te,{align:`end`,className:`min-w-60`,children:h()})]})]}):(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:F,children:`Copy code`})}):(0,$.jsx)(Lt,{render:(0,$.jsx)(k,{size:`xs`,variant:`outline`}),children:w?`Show link`:`Show code`})}t[34]=P,t[35]=he,t[36]=S,t[37]=de,t[38]=f,t[39]=F,t[40]=le,t[41]=p,t[42]=u,t[43]=n.createdAt,t[44]=n.expiresAt,t[45]=n.scopes,t[46]=l,t[47]=fe,t[48]=w,t[49]=I,t[50]=L,t[51]=R,t[52]=z,t[53]=ge,t[54]=_e,t[55]=ve,t[56]=B,t[57]=V}else I=t[49],L=t[50],R=t[51],z=t[52],ge=t[53],_e=t[54],ve=t[55],B=t[56],V=t[57];if(V!==Symbol.for(`react.early_return_sentinel`))return V;let ye=w?E?`Hosted app pairing link`:`Pairing link`:`Pairing code`,H;t[97]===ye?H=t[98]:(H=(0,$.jsx)(Nt,{children:ye}),t[97]=ye,t[98]=H);let be=w?E?`Clipboard copy is unavailable here. Open or manually copy this hosted app link on the device you want to connect.`:`Clipboard copy is unavailable here. Open or manually copy this full pairing URL on the device you want to connect.`:`Clipboard copy is unavailable here. Manually copy this code into another client.`,U;t[99]===be?U=t[100]:(U=(0,$.jsx)(Mt,{children:be}),t[99]=be,t[100]=U);let W;t[101]!==H||t[102]!==U?(W=(0,$.jsxs)(_t,{children:[H,U]}),t[101]=H,t[102]=U,t[103]=W):W=t[103];let G=w?4:3,xe;t[104]!==T||t[105]!==G?(xe=(0,$.jsx)(ln,{readOnly:!0,value:T,rows:G,className:`text-xs leading-relaxed`,onFocus:Xi,onClick:Zi}),t[104]=T,t[105]=G,t[106]=xe):xe=t[106];let Se;t[107]===w?Se=t[108]:(Se=w?(0,$.jsx)(`div`,{className:`flex justify-center rounded-xl border border-border/60 bg-muted/30 p-4`,children:(0,$.jsx)(Gn,{value:w,size:132,level:`M`,marginSize:2,title:`Pairing link — scan to open on another device`})}):null,t[107]=w,t[108]=Se);let Ce;t[109]!==xe||t[110]!==Se?(Ce=(0,$.jsxs)(It,{className:`space-y-4`,children:[xe,Se]}),t[109]=xe,t[110]=Se,t[111]=Ce):Ce=t[111];let we;t[112]===Symbol.for(`react.memo_cache_sentinel`)?(we=(0,$.jsx)(k,{variant:`outline`,onClick:()=>m(!1),children:`Done`}),t[112]=we):we=t[112];let Te;t[113]===F?Te=t[114]:(Te=D?(0,$.jsx)(k,{variant:`outline`,size:`xs`,onClick:F,children:`Copy code`}):null,t[113]=F,t[114]=Te);let K;t[115]===Te?K=t[116]:(K=(0,$.jsxs)(cn,{variant:`bare`,children:[we,Te]}),t[115]=Te,t[116]=K);let q;t[117]!==W||t[118]!==Ce||t[119]!==K?(q=(0,$.jsxs)(Ct,{className:`max-w-md`,children:[W,Ce,K]}),t[117]=W,t[118]=Ce,t[119]=K,t[120]=q):q=t[120];let Ee;t[121]!==I||t[122]!==L||t[123]!==R||t[124]!==z||t[125]!==q?(Ee=(0,$.jsxs)(I,{open:L,onOpenChange:R,children:[z,q]}),t[121]=I,t[122]=L,t[123]=R,t[124]=z,t[125]=q,t[126]=Ee):Ee=t[126];let De=s===n.id,Oe;t[127]!==c||t[128]!==n.id?(Oe=()=>void c(n.id),t[127]=c,t[128]=n.id,t[129]=Oe):Oe=t[129];let ke=s===n.id?`Revoking…`:`Revoke`,Ae;t[130]!==De||t[131]!==Oe||t[132]!==ke?(Ae=(0,$.jsx)(k,{size:`xs`,variant:`destructive-outline`,disabled:De,onClick:Oe,children:ke}),t[130]=De,t[131]=Oe,t[132]=ke,t[133]=Ae):Ae=t[133];let je;t[134]!==ge||t[135]!==Ee||t[136]!==Ae?(je=(0,$.jsxs)(`div`,{className:ge,children:[Ee,Ae]}),t[134]=ge,t[135]=Ee,t[136]=Ae,t[137]=je):je=t[137];let Me;t[138]!==_e||t[139]!==ve||t[140]!==je?(Me=(0,$.jsxs)(`div`,{className:_e,children:[ve,je]}),t[138]=_e,t[139]=ve,t[140]=je,t[141]=Me):Me=t[141];let J;return t[142]!==B||t[143]!==Me?(J=(0,$.jsx)(`div`,{className:B,children:Me}),t[142]=B,t[143]=Me,t[144]=J):J=t[144],J}),Ai=(0,Z.memo)(function(e){let t=(0,Q.c)(53),{clientSession:n,presentation:r,revokingClientSessionId:i,onRevokeSession:a}=e,o=r===void 0?`current`:r,s=Ht(1e3),c=n.current||n.connected,l=n.lastConnectedAt,u;t[0]!==c||t[1]!==l||t[2]!==s?(u=c?l?`Connected for ${ht(l,s)}`:`Connected`:l?`Last connected at ${si(l)}`:`Not connected yet.`,t[0]=c,t[1]=l,t[2]=s,t[3]=u):u=t[3];let d=u,f;t[4]===n.client.deviceType?f=t[5]:(f=n.client.deviceType===`unknown`?null:n.client.deviceType[0]?.toUpperCase()+n.client.deviceType.slice(1),t[4]=n.client.deviceType,t[5]=f);let p=n.client.os??null,m=n.client.browser??null,h=n.client.ipAddress??null,g;t[6]!==f||t[7]!==p||t[8]!==m||t[9]!==h?(g=[f,p,m,h].filter(Qi),t[6]=f,t[7]=p,t[8]=m,t[9]=h,t[10]=g):g=t[10];let _=g,v;t[11]!==n.client.browser||t[12]!==n.client.label||t[13]!==n.client.os||t[14]!==n.subject?(v=n.client.label??([n.client.os,n.client.browser].filter(Boolean).join(` · `)||n.subject),t[11]=n.client.browser,t[12]=n.client.label,t[13]=n.client.os,t[14]=n.subject,t[15]=v):v=t[15];let y=v,b;t[16]===o?b=t[17]:(b=_i(o),t[16]=o,t[17]=b);let x=c?`bg-success`:`bg-muted-foreground/30`,S=c?`bg-success/60 duration-2000`:null,C;t[18]!==d||t[19]!==x||t[20]!==S?(C=(0,$.jsx)(Jr,{tooltipText:d,dotClassName:x,pingClassName:S}),t[18]=d,t[19]=x,t[20]=S,t[21]=C):C=t[21];let w;t[22]===y?w=t[23]:(w=(0,$.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:y}),t[22]=y,t[23]=w);let T;t[24]===n.current?T=t[25]:(T=n.current?(0,$.jsx)(`span`,{className:`text-ui-10 text-muted-foreground/80 rounded-md border border-border/50 bg-muted/50 px-1 py-0.5`,children:`This device`}):null,t[24]=n.current,t[25]=T);let E;t[26]!==C||t[27]!==w||t[28]!==T?(E=(0,$.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[C,w,T]}),t[26]=C,t[27]=w,t[28]=T,t[29]=E):E=t[29];let D;t[30]===_?D=t[31]:(D=_.length>0?(0,$.jsxs)($.Fragment,{children:[_.join(` · `),(0,$.jsx)(`span`,{"aria-hidden":!0,children:` · `})]}):null,t[30]=_,t[31]=D);let O;t[32]===n.scopes?O=t[33]:(O=(0,$.jsx)(li,{scopes:n.scopes,label:`Client scopes`}),t[32]=n.scopes,t[33]=O);let A;t[34]!==D||t[35]!==O?(A=(0,$.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[D,O]}),t[34]=D,t[35]=O,t[36]=A):A=t[36];let ee;t[37]!==E||t[38]!==A?(ee=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[E,A]}),t[37]=E,t[38]=A,t[39]=ee):ee=t[39];let te;t[40]!==n.current||t[41]!==n.sessionId||t[42]!==a||t[43]!==i?(te=n.current?null:(0,$.jsx)(k,{size:`xs`,variant:`destructive-outline`,disabled:i===n.sessionId,onClick:()=>void a(n.sessionId),children:i===n.sessionId?`Revoking…`:`Revoke`}),t[40]=n.current,t[41]=n.sessionId,t[42]=a,t[43]=i,t[44]=te):te=t[44];let j;t[45]===te?j=t[46]:(j=(0,$.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:te}),t[45]=te,t[46]=j);let ne;t[47]!==ee||t[48]!==j?(ne=(0,$.jsxs)(`div`,{className:Xr,children:[ee,j]}),t[47]=ee,t[48]=j,t[49]=ne):ne=t[49];let M;return t[50]!==ne||t[51]!==b?(M=(0,$.jsx)(`div`,{className:b,children:ne}),t[50]=ne,t[51]=b,t[52]=M):M=t[52],M}),ji=(0,Z.memo)(function({clientSessions:e,isRevokingOtherClients:t,onRevokeOtherClients:n}){let[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(``),[s,c]=(0,Z.useState)([...E]),[l,u]=(0,Z.useState)(!1),d=(0,Z.useCallback)(async()=>{u(!0);try{await tn({label:a,scopes:s}),o(``),c([...E]),i(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to create pairing URL.`;X.add(St({type:`error`,title:`Could not create pairing URL`,description:t}))}finally{u(!1)}},[a,s]),f=(0,Z.useCallback)((e,t)=>{c(n=>t?[...n,e]:n.filter(t=>t!==e))},[]);return(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(k,{size:`xs`,variant:`destructive-outline`,disabled:t||e.every(e=>e.current),onClick:()=>void n(),children:t?`Revoking…`:`Revoke others`}),(0,$.jsxs)(wt,{open:r,onOpenChange:e=>{i(e),e||(o(``),c([...E]))},children:[(0,$.jsx)(Lt,{render:(0,$.jsxs)(k,{size:`xs`,variant:`default`,children:[(0,$.jsx)(Ft,{className:`size-3`}),`Create link`]})}),(0,$.jsxs)(Ct,{className:`max-w-md`,children:[(0,$.jsxs)(_t,{children:[(0,$.jsx)(Nt,{children:`Create pairing link`}),(0,$.jsx)(Mt,{children:`Generate a one-time link that another device can use to pair with this backend as an authorized client.`})]}),(0,$.jsxs)(It,{className:`space-y-5`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Client label (optional)`}),(0,$.jsx)(jt,{value:a,onChange:e=>o(e.target.value),placeholder:`e.g. Living room iPad`,disabled:l,autoFocus:!0})]}),(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h3`,{className:`text-xs font-medium text-foreground`,children:`Permissions`}),(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Limit what the paired client can do.`})]}),(0,$.jsxs)(`div`,{className:`flex gap-1`,children:[(0,$.jsx)(k,{size:`xs`,variant:`outline`,disabled:l,onClick:()=>c([_]),children:`Read only`}),(0,$.jsx)(k,{size:`xs`,variant:`outline`,disabled:l,onClick:()=>c([...E]),children:`Standard`})]})]}),(0,$.jsx)(`div`,{className:`divide-y divide-border/60 rounded-lg border border-input bg-muted/25`,children:ci.map(({scope:e,title:t,description:n})=>(0,$.jsxs)(`label`,{className:`flex cursor-pointer items-start gap-3 px-3 py-2.5 transition-colors hover:bg-muted/40`,children:[(0,$.jsx)(pt,{className:`mt-0.5`,checked:s.includes(e),disabled:l,onCheckedChange:t=>f(e,t===!0)}),(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block text-xs font-medium text-foreground`,children:t}),(0,$.jsx)(`span`,{className:`block text-xs leading-snug text-muted-foreground`,children:n})]})]},e))}),s.length===0?(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:`Select at least one permission.`}):s.includes(`access:write`)?(0,$.jsx)(`p`,{className:`text-xs text-warning`,children:`This client can create or revoke access for other devices.`}):null]})]}),(0,$.jsxs)(cn,{variant:`bare`,children:[(0,$.jsx)(k,{variant:`outline`,disabled:l,onClick:()=>i(!1),children:`Cancel`}),(0,$.jsx)(k,{disabled:l||s.length===0,onClick:()=>void d(),children:l?`Creating…`:`Create link`})]})]})]})]})}),Mi=(0,Z.memo)(function(e){let t=(0,Q.c)(33),{endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:a,isLoading:o,pairingLinks:s,clientSessions:c,revokingPairingLinkId:l,revokingClientSessionId:u,onRevokePairingLink:d,onRevokeClientSession:f}=e,p=a===void 0?`current`:a,m;if(t[0]!==i||t[1]!==n||t[2]!==r||t[3]!==d||t[4]!==s||t[5]!==p||t[6]!==l){let e;t[8]!==i||t[9]!==n||t[10]!==r||t[11]!==d||t[12]!==p||t[13]!==l?(e=e=>(0,$.jsx)(ki,{pairingLink:e,endpointUrl:n,endpoints:r,defaultEndpointKey:i,presentation:p,revokingPairingLinkId:l,onRevoke:d},e.id),t[8]=i,t[9]=n,t[10]=r,t[11]=d,t[12]=p,t[13]=l,t[14]=e):e=t[14],m=s.map(e),t[0]=i,t[1]=n,t[2]=r,t[3]=d,t[4]=s,t[5]=p,t[6]=l,t[7]=m}else m=t[7];let h;if(t[15]!==c||t[16]!==f||t[17]!==p||t[18]!==u){let e;t[20]!==f||t[21]!==p||t[22]!==u?(e=e=>(0,$.jsx)(Ai,{clientSession:e,presentation:p,revokingClientSessionId:u,onRevokeSession:f},e.sessionId),t[20]=f,t[21]=p,t[22]=u,t[23]=e):e=t[23],h=c.map(e),t[15]=c,t[16]=f,t[17]=p,t[18]=u,t[19]=h}else h=t[19];let g;t[24]!==c.length||t[25]!==o||t[26]!==s.length||t[27]!==p?(g=s.length===0&&c.length===0&&!o?(0,$.jsx)(`div`,{className:_i(p),children:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:`No pairing links or client sessions.`})}):null,t[24]=c.length,t[25]=o,t[26]=s.length,t[27]=p,t[28]=g):g=t[28];let _;return t[29]!==m||t[30]!==h||t[31]!==g?(_=(0,$.jsxs)($.Fragment,{children:[m,h,g]}),t[29]=m,t[30]=h,t[31]=g,t[32]=_):_=t[32],_}),Ni=(0,Z.memo)(function(e){let t=(0,Q.c)(50),{endpoint:n,isDefault:r,presentation:i,onSetDefault:a,onSetupTailscaleServe:o,onDisableTailscaleServe:s,isUpdatingTailscaleServe:c}=e,l=i===void 0?`current`:i,u=n.status===`available`,d;t[0]===n?d=t[1]:(d=wi(n)&&n.status!==`available`,t[0]=n,t[1]=d);let f=d,p;t[2]===n?p=t[3]:(p=wi(n)&&n.status===`available`,t[2]=n,t[3]=p);let m=p,h=!f,g=l===`endpoint-rail`,_;t[4]!==u||t[5]!==l?(_=vi(l,u),t[4]=u,t[5]=l,t[6]=_):_=t[6];let v;t[7]!==r||t[8]!==g?(v=g&&r?(0,$.jsx)(`span`,{className:`absolute inset-y-2 left-0 w-1 rounded-r-full bg-primary`,"aria-hidden":!0}):null,t[7]=r,t[8]=g,t[9]=v):v=t[9];let y;t[10]===n.label?y=t[11]:(y=(0,$.jsx)(`h3`,{className:`shrink-0 text-sm leading-5 font-medium text-foreground`,children:n.label}),t[10]=n.label,t[11]=y);let b;t[12]!==n.httpBaseUrl||t[13]!==h?(b=h?(0,$.jsx)(`p`,{className:`min-w-0 truncate text-xs leading-5 text-muted-foreground`,title:n.httpBaseUrl,children:n.httpBaseUrl}):null,t[12]=n.httpBaseUrl,t[13]=h,t[14]=b):b=t[14];let x;t[15]===u?x=t[16]:(x=u?null:(0,$.jsx)(`span`,{className:`shrink-0 rounded-md border border-border/70 px-1 py-0.5 text-ui-10 text-muted-foreground`,children:`Setup required`}),t[15]=u,t[16]=x);let S;t[17]!==y||t[18]!==b||t[19]!==x?(S=(0,$.jsxs)(`div`,{className:`flex min-w-0 items-baseline gap-3`,children:[y,b,x]}),t[17]=y,t[18]=b,t[19]=x,t[20]=S):S=t[20];let C;t[21]===r?C=t[22]:(C=r?(0,$.jsx)(`span`,{className:`rounded-md border border-primary/30 bg-primary/10 px-1 py-0.5 text-ui-10 text-primary`,children:`Default`}):null,t[21]=r,t[22]=C);let w;t[23]!==n||t[24]!==c||t[25]!==f||t[26]!==o?(w=f?(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:()=>o(n),disabled:c,children:c?`Restarting…`:`Setup`}):null,t[23]=n,t[24]=c,t[25]=f,t[26]=o,t[27]=w):w=t[27];let T;t[28]!==m||t[29]!==n||t[30]!==c||t[31]!==s?(T=m?(0,$.jsx)(k,{size:`xs`,variant:`destructive-outline`,onClick:()=>s(n),disabled:c,children:c?`Restarting…`:`Disable`}):null,t[28]=m,t[29]=n,t[30]=c,t[31]=s,t[32]=T):T=t[32];let E;t[33]!==n||t[34]!==r||t[35]!==f||t[36]!==a?(E=!f&&!r?(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:()=>a(n),children:`Set as default`}):null,t[33]=n,t[34]=r,t[35]=f,t[36]=a,t[37]=E):E=t[37];let D;t[38]!==C||t[39]!==w||t[40]!==T||t[41]!==E?(D=(0,$.jsxs)(`div`,{className:`ml-auto flex min-h-6 shrink-0 items-center justify-end gap-2`,children:[C,w,T,E]}),t[38]=C,t[39]=w,t[40]=T,t[41]=E,t[42]=D):D=t[42];let O;t[43]!==D||t[44]!==S?(O=(0,$.jsxs)(`div`,{className:`flex min-h-6 min-w-0 flex-col gap-2 sm:-my-0.5 sm:flex-row sm:items-center`,children:[S,D]}),t[43]=D,t[44]=S,t[45]=O):O=t[45];let A;return t[46]!==O||t[47]!==_||t[48]!==v?(A=(0,$.jsxs)(`div`,{className:_,children:[v,O]}),t[46]=O,t[47]=_,t[48]=v,t[49]=A):A=t[49],A});function Pi(e){let t=(0,Q.c)(14),{endpoint:n,hiddenEndpointCount:r,expanded:i,onToggleExpanded:a,fallback:o}=e;if(!n)return o;let s;t[0]===n.httpBaseUrl?s=t[1]:(s=(0,$.jsx)(`span`,{className:`min-w-0 truncate`,children:n.httpBaseUrl}),t[0]=n.httpBaseUrl,t[1]=s);let c;t[2]!==i||t[3]!==r?(c=r>0?(0,$.jsx)(`span`,{className:`shrink-0 text-xs font-medium`,children:i?`Hide`:`+${r}`}):null,t[2]=i,t[3]=r,t[4]=c):c=t[4];let l;t[5]!==s||t[6]!==c?(l=(0,$.jsxs)($.Fragment,{children:[s,c]}),t[5]=s,t[6]=c,t[7]=l):l=t[7];let u=l,d;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,$.jsx)(`span`,{className:`shrink-0`,children:`Reachable at`}),t[8]=d):d=t[8];let f;return t[9]!==i||t[10]!==r||t[11]!==a||t[12]!==u?(f=(0,$.jsxs)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-1`,children:[d,r>0?(0,$.jsx)(`button`,{type:`button`,className:`inline-flex min-w-0 max-w-full items-baseline gap-2 border-b border-dotted border-muted-foreground/60 text-left text-muted-foreground underline-offset-4 hover:border-foreground hover:text-foreground`,onClick:a,"aria-expanded":i,children:u}):(0,$.jsx)(`span`,{className:`inline-flex min-w-0 max-w-full items-baseline gap-2`,children:u})]}),t[9]=i,t[10]=r,t[11]=a,t[12]=u,t[13]=f):f=t[13],f}function Fi(e){let t=(0,Q.c)(60),{environment:n,removingEnvironmentId:r,onConnect:i,onRemove:a}=e,o=n.environmentId,s=n.connection.phase,c=s===`connected`,l=s===`connecting`||s===`reconnecting`,u=s===`connected`?`bg-success`:s===`connecting`||s===`reconnecting`?`bg-warning`:s===`error`?`bg-destructive`:`bg-muted-foreground/40`,d;t[0]===n.connection?d=t[1]:(d=V(n.connection),t[0]=n.connection,t[1]=d);let f=d,p=n.connection.traceId,m;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(m={target:`trace ID`,onCopy:Ri,onError:Li},t[2]=m):m=t[2];let{copyToClipboard:h}=Rt(m),g;t[3]===h?g=t[4]:(g=e=>{h(e,{traceId:e})},t[3]=h,t[4]=g);let _=g,v;t[5]===n.serverConfig?v=t[6]:(v=xn(n.serverConfig),t[5]=n.serverConfig,t[6]=v);let y=v,b;t[7]===o?b=t[8]:(b=nt.updateStateAtom(o),t[7]=o,t[8]=b);let x=qe(b),S=x.status===`running`&&x.stage===`resuming`,C=n.entry.target._tag===`SshConnectionTarget`&&Se(n.entry.profile)&&n.entry.profile.value._tag===`SshConnectionProfile`?n.entry.profile.value.target:null,w;t[9]===C?w=t[10]:(w=C?`SSH ${di(C)}`:null,t[9]=C,t[10]=w);let T=n.relayManaged?`DasConnect`:null,E;t[11]!==w||t[12]!==T?(E=[w,T].filter(Ii),t[11]=w,t[12]=T,t[13]=E):E=t[13];let D=E,O;t[14]===n.entry.target?O=t[15]:(O=ue(n.entry.target),t[14]=n.entry.target,t[15]=O);let A=O,ee=s===`connecting`||s===`reconnecting`?`bg-warning/60 duration-2000`:null,te;t[16]!==u||t[17]!==f||t[18]!==ee?(te=(0,$.jsx)(Jr,{tooltipText:f,dotClassName:u,pingClassName:ee}),t[16]=u,t[17]=f,t[18]=ee,t[19]=te):te=t[19];let j;t[20]===n.label?j=t[21]:(j=(0,$.jsx)(`h3`,{className:`text-sm font-medium text-foreground`,children:n.label}),t[20]=n.label,t[21]=j);let ne;t[22]!==te||t[23]!==j?(ne=(0,$.jsxs)(`div`,{className:`flex min-h-5 items-center gap-1.5`,children:[te,j]}),t[22]=te,t[23]=j,t[24]=ne):ne=t[24];let M;t[25]===D?M=t[26]:(M=D.length>0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:D.join(` · `)}):null,t[25]=D,t[26]=M);let re;t[27]!==x||t[28]!==y?(re=x.status===`idle`?y?(0,$.jsxs)(`p`,{className:`flex items-center gap-1 text-warning text-xs`,children:[(0,$.jsx)(Ot,{className:`size-3.5 shrink-0`}),`Version drift: client `,y.clientVersion,`, server`,` `,y.serverVersion,`.`]}):null:(0,$.jsx)(`div`,{className:`max-w-md`,children:(0,$.jsx)(bn,{fromVersion:x.fromVersion,state:x})}),t[27]=x,t[28]=y,t[29]=re):re=t[29];let N;t[30]!==_||t[31]!==n.connection||t[32]!==p||t[33]!==S?(N=n.connection.error&&!S?(0,$.jsxs)(`p`,{className:`flex min-w-0 items-center gap-2 text-destructive text-xs`,children:[(0,$.jsx)(`span`,{className:`truncate`,children:V(n.connection)}),p?(0,$.jsx)(`button`,{type:`button`,className:`shrink-0 underline underline-offset-2`,onClick:()=>_(p),children:`Copy trace ID`}):null]}):null,t[30]=_,t[31]=n.connection,t[32]=p,t[33]=S,t[34]=N):N=t[34];let P;t[35]!==ne||t[36]!==M||t[37]!==re||t[38]!==N?(P=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[ne,M,re,N]}),t[35]=ne,t[36]=M,t[37]=re,t[38]=N,t[39]=P):P=t[39];let ie;t[40]!==n.label||t[41]!==n.serverConfig||t[42]!==o||t[43]!==x.status||t[44]!==y?(ie=y&&(x.status===`idle`||x.status===`failed`)?(0,$.jsx)(Cn,{environmentId:o,serverLabel:`${n.label} server`,selfUpdate:Sn(n.serverConfig),targetVersion:y.clientVersion,label:x.status===`failed`?`Retry update`:`Update server`}):null,t[40]=n.label,t[41]=n.serverConfig,t[42]=o,t[43]=x.status,t[44]=y,t[45]=ie):ie=t[45];let ae;t[46]!==o||t[47]!==c||t[48]!==l||t[49]!==A||t[50]!==i||t[51]!==a||t[52]!==r?(ae=A?(0,$.jsxs)(Qt,{children:[(0,$.jsx)(Jt,{render:(0,$.jsx)(k,{size:`xs`,variant:`outline`,disabled:!0,children:`Managed above`})}),(0,$.jsx)(rn,{side:`top`,className:`max-w-80 whitespace-pre-wrap leading-tight`,children:`The WSL backend is managed by the WSL setting above — turn it on or off there.`})]}):(0,$.jsxs)($.Fragment,{children:[c?null:(0,$.jsx)(k,{size:`xs`,variant:`outline`,disabled:r===o,onClick:()=>void a(o),children:r===o?`Removing…`:`Remove`}),(0,$.jsx)(k,{size:`xs`,variant:`outline`,disabled:l||r===o,onClick:()=>void(c?a(o):i(o)),children:c?r===o?`Disconnecting…`:`Disconnect`:l?`Connecting…`:`Connect`})]}),t[46]=o,t[47]=c,t[48]=l,t[49]=A,t[50]=i,t[51]=a,t[52]=r,t[53]=ae):ae=t[53];let oe;t[54]!==ie||t[55]!==ae?(oe=(0,$.jsxs)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:[ie,ae]}),t[54]=ie,t[55]=ae,t[56]=oe):oe=t[56];let se;return t[57]!==P||t[58]!==oe?(se=(0,$.jsx)(`div`,{className:Yr,children:(0,$.jsxs)(`div`,{className:Xr,children:[P,oe]})}),t[57]=P,t[58]=oe,t[59]=se):se=t[59],se}function Ii(e){return e!==null}function Li(e){X.add(St({type:`error`,title:`Could not copy trace ID`,description:e.message}))}function Ri(e){let{traceId:t}=e;X.add({type:`success`,title:`Trace ID copied`,description:t})}var zi=(0,Z.memo)(function(e){let t=(0,Q.c)(24),{target:n,connectingHostAlias:r,onConnect:i}=e,a;t[0]===n?a=t[1]:(a=di(n),t[0]=n,t[1]=a);let o=a,s=o!==n.alias,c=r===n.alias?`Adding…`:`Add environment`,l;t[2]===n.alias?l=t[3]:(l=(0,$.jsx)(`h3`,{className:`truncate text-sm font-medium text-foreground`,children:n.alias}),t[2]=n.alias,t[3]=l);let u;t[4]!==o||t[5]!==s?(u=s?(0,$.jsx)(`p`,{className:`truncate text-xs text-muted-foreground`,children:o}):null,t[4]=o,t[5]=s,t[6]=u):u=t[6];let d;t[7]!==l||t[8]!==u?(d=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[l,u]}),t[7]=l,t[8]=u,t[9]=d):d=t[9];let f=r===n.alias,p;t[10]!==i||t[11]!==n?(p=()=>i(n),t[10]=i,t[11]=n,t[12]=p):p=t[12];let m;t[13]!==r||t[14]!==n.alias?(m=r===n.alias?(0,$.jsx)(gt,{className:`size-3 animate-spin`}):null,t[13]=r,t[14]=n.alias,t[15]=m):m=t[15];let h;t[16]!==c||t[17]!==f||t[18]!==p||t[19]!==m?(h=(0,$.jsx)(`div`,{className:`flex w-full shrink-0 items-center gap-2 sm:w-auto sm:justify-end`,children:(0,$.jsxs)(k,{size:`xs`,variant:`outline`,disabled:f,onClick:p,children:[m,c]})}),t[16]=c,t[17]=f,t[18]=p,t[19]=m,t[20]=h):h=t[20];let g;return t[21]!==d||t[22]!==h?(g=(0,$.jsx)(`div`,{className:`rounded-xl px-3 py-3 sm:px-4`,children:(0,$.jsxs)(`div`,{className:Xr,children:[d,h]})}),t[21]=d,t[22]=h,t[23]=g):g=t[23],g});function Bi(e){let t=(0,Q.c)(10),{checked:n,disabled:r,disabledReason:i,onCheckedChange:a,ariaLabel:o}=e,s=o===void 0?`Enable DasConnect`:o,c;t[0]===a?c=t[1]:(c=a?{onCheckedChange:a}:{},t[0]=a,t[1]=c);let l;t[2]!==s||t[3]!==n||t[4]!==r||t[5]!==c?(l=(0,$.jsx)(un,{"aria-label":s,checked:n,disabled:r,...c}),t[2]=s,t[3]=n,t[4]=r,t[5]=c,t[6]=l):l=t[6];let u=l,d;return t[7]!==u||t[8]!==i?(d=i?(0,$.jsxs)(Qt,{children:[(0,$.jsx)(Jt,{render:(0,$.jsx)(`span`,{className:`inline-flex`,children:u})}),(0,$.jsx)(rn,{side:`top`,children:i})]}):u,t[7]=u,t[8]=i,t[9]=d):d=t[9],d}function Vi(e){let t=(0,Q.c)(27),{canManageRelay:n}=e,{isSignedIn:r,linkState:i,managedTunnelActive:a,publishAgentActivity:o,operationError:s,reconcileCloudState:c}=xr(),[l,u]=(0,Z.useState)(!1),[d,f]=(0,Z.useState)(!1),p=r?n?null:`Your session does not have permission to manage DasConnect access.`:`Sign in to DasConnect to manage this environment.`,m=l||d,h;t[0]!==o||t[1]!==c?(h=async e=>{u(!0),await c({managedTunnel:e,publish:o})&&X.add({type:`success`,title:e?`DasConnect linked`:o?`DasConnect tunnel disabled`:`DasConnect unlinked`,description:e?`This environment is available through DasConnect.`:o?`The managed tunnel was removed. Agent activity publishing stays on.`:`This environment is no longer available through DasConnect.`}),u(!1)},t[0]=o,t[1]=c,t[2]=h):h=t[2];let g=h,_;t[3]!==a||t[4]!==c?(_=async e=>{f(!0),await c({managedTunnel:a,publish:e})&&X.add({type:`success`,title:e?`Agent activity enabled`:`Agent activity disabled`,description:e?`This environment publishes agent activity to your mobile clients.`:`This environment will stop publishing agent activity.`}),f(!1)},t[3]=a,t[4]=c,t[5]=_):_=t[5];let v=_,y=a?`This environment is available to your other devices through DasConnect.`:`Make this environment available to your other devices through DasConnect.`,b=s??i.error,x=!n||!r||i.isPending||m,S;t[6]===g?S=t[7]:(S=e=>void g(e),t[6]=g,t[7]=S);let C;t[8]!==p||t[9]!==a||t[10]!==x||t[11]!==S?(C=(0,$.jsx)(Bi,{checked:a,disabled:x,disabledReason:p,onCheckedChange:S}),t[8]=p,t[9]=a,t[10]=x,t[11]=S,t[12]=C):C=t[12];let w;t[13]!==y||t[14]!==b||t[15]!==C?(w=(0,$.jsx)(Zt,{title:`DasConnect`,description:y,status:b,control:C}),t[13]=y,t[14]=b,t[15]=C,t[16]=w):w=t[16];let T=!n||!r||i.isPending||m,E;t[17]===v?E=t[18]:(E=e=>void v(e),t[17]=v,t[18]=E);let D;t[19]!==p||t[20]!==o||t[21]!==E||t[22]!==T?(D=(0,$.jsx)(Zt,{title:`Publish agent activity`,description:`Send activity from this environment to your mobile clients for push notifications and Live Activities. Works without a DasConnect tunnel.`,control:(0,$.jsx)(Bi,{ariaLabel:`Publish agent activity to mobile clients`,checked:o,disabled:T,disabledReason:p,onCheckedChange:E})}),t[19]=p,t[20]=o,t[21]=E,t[22]=T,t[23]=D):D=t[23];let O;return t[24]!==D||t[25]!==w?(O=(0,$.jsxs)($.Fragment,{children:[w,D]}),t[24]=D,t[25]=w,t[26]=O):O=t[26],O}function Hi(e){let t=(0,Q.c)(2),{canManageRelay:n}=e,r;return t[0]===n?r=t[1]:(r=tt()?(0,$.jsx)(Vi,{canManageRelay:n}):null,t[0]=n,t[1]=r),r}function Ui(e){let t=(0,Q.c)(4),{cloudEnabled:n}=e,r=n===void 0?!0:n,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(Gt,{variant:`icon`,children:(0,$.jsx)(wn,{})}),t[0]=i):i=t[0];let a;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(zt,{children:`No saved remote environments`}),t[1]=a):a=t[1];let o=r?`Click “Add environment” to pair another environment, or connect one from DasConnect.`:`Click “Add environment” to pair another environment.`,s;return t[2]===o?s=t[3]:(s=(0,$.jsxs)(Wt,{className:`min-h-52`,children:[i,(0,$.jsxs)(Kt,{children:[a,(0,$.jsx)(Yt,{children:o})]})]}),t[2]=o,t[3]=s),s}function Wi(e){let t=(0,Q.c)(3),{primaryEnvironmentId:n,savedEnvironments:r}=e,i;return t[0]!==n||t[1]!==r?(i=tt()?(0,$.jsx)($r,{primaryEnvironmentId:n,savedEnvironments:r,empty:(0,$.jsx)(Ui,{})}):r.length===0?(0,$.jsx)(Ui,{cloudEnabled:!1}):null,t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function Gi(){let e=window.desktopBridge,{environments:t}=st(),n=at(),r=H(Ut,{reportFailure:!1}),i=H(an,{reportFailure:!1}),a=H(it.remove,{reportFailure:!1}),o=H(it.retryNow,{reportFailure:!1}),s=n?.environmentId??null,c=Xt(),l=e?T:c.data?.authenticated?c.data.scopes??null:null,d=e?null:c.data?.auth.policy??null,f=(0,Z.useMemo)(()=>t.filter(e=>e.entry.target._tag!==`PrimaryConnectionTarget`).toSorted((e,t)=>e.label.localeCompare(t.label)),[t]),p=(0,Z.useMemo)(()=>f.reduce((e,t)=>{let n=t.entry.profile;return t.entry.target._tag===`SshConnectionTarget`&&Se(n)&&n.value._tag===`SshConnectionProfile`&&(e[n.value.target.alias]=t),e},{}),[f]),h=(0,Z.useMemo)(()=>{let e=new Set;for(let t of f){let n=t.entry.profile;if(t.entry.target._tag!==`SshConnectionTarget`||xe(n)||n.value._tag!==`SshConnectionProfile`)continue;let r=n.value.target;e.add(r.alias),e.add(di(r))}return e},[f]),[g,_]=(0,Z.useState)(null),[y,b]=(0,Z.useState)(null),[x,C]=(0,Z.useState)(null),[w,E]=(0,Z.useState)(null),[D,O]=(0,Z.useState)(null),[A,ee]=(0,Z.useState)(null),[te,j]=(0,Z.useState)(!1),[ne,re]=(0,Z.useState)(!1),[N,P]=(0,Z.useState)(`remote`),[ae,oe]=(0,Z.useState)(``),[se,F]=(0,Z.useState)(``),[ce,le]=(0,Z.useState)(``),[de,fe]=(0,Z.useState)(``),[pe,me]=(0,Z.useState)(``),[he,I]=(0,Z.useState)(null),[z,ge]=(0,Z.useState)(!1),[_e,ve]=(0,Z.useState)(null),[B,V]=(0,Z.useState)(!1),[ye,be]=(0,Z.useState)(!1),[U,W]=(0,Z.useState)(!1),[G,Ce]=(0,Z.useState)(!1),[we,Te]=(0,Z.useState)(null),[K,q]=(0,Z.useState)(null),Ee=K!==null,[De,Oe]=(0,Z.useState)(null),[ke,Ae]=(0,Z.useState)(!1),[je,Me]=(0,Z.useState)(String(ti)),[J,Ne]=(0,Z.useState)(null),Pe=n?.serverConfig??null,Fe=xn(Pe),Ie=qe(nt.updateStateAtom(s)),[Le,Re]=(0,Z.useState)(!1),ze=dt(e=>e.defaultAdvertisedEndpointKey),Be=dt(e=>e.setDefaultAdvertisedEndpointKey),Ve=l?.includes(`access:write`)??!1,He=l?.includes(`relay:write`)??!1,Ue=rt(Ve&&s!==null?Dr.accessChanges({environmentId:s,input:null}):null),We=rt(Ve&&e?Pr:null),Ge=rt(e&&ne&&N===`ssh`?Br:null),Ke=rt(Ve&&e?Kr:null),Y=Ke.data,Je=we??Ke.error,Ye=Ke.isPending&&Ke.data===null,Xe=Ge.data??ri,Ze=(0,Z.useMemo)(()=>Xe.filter(e=>{let t=di(e);return!h.has(e.alias)&&!h.has(t)}),[Xe,h]),Qe=Ge.data!==null||Ge.error!==null,$e=Ge.isPending,et=g??Ge.error,tt=We.data?.serverExposureState??null,ot=We.data?.advertisedEndpoints??ni,ct=x??We.error,lt=w??Ue.error,ut=Ue.isPending&&Ue.data===null,pt=(0,Z.useMemo)(()=>{let e=Ue.data;return e?.type===`snapshot`?yi(e.payload.pairingLinks.map(e=>xi(e))):[]},[Ue.data]),mt=(0,Z.useMemo)(()=>{let e=Ue.data;return e?.type===`snapshot`?bi(e.payload.clientSessions.map(e=>Si(e))):[]},[Ue.data]),ht=e?tt?.mode===`network-accessible`:d===`remote-reachable`,vt=je.trim(),xt=Number(vt),Tt=/^\d+$/u.test(vt)&&Number.isInteger(xt)&&xt>=1&&xt<=65535,Dt=(0,Z.useMemo)(()=>{if(!De)return null;if(!Tt||xt===ti)return De.httpBaseUrl;try{let e=new URL(De.httpBaseUrl);return e.port=String(xt),e.toString().replace(/\/$/u,``)}catch{return De.httpBaseUrl}},[Tt,xt,De]),kt=(0,Z.useCallback)(async t=>{if(e){V(!0),C(null);try{await e.setServerExposureMode(t?`network-accessible`:`local-only`),Fr(),be(!1),V(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to update network exposure.`;be(!1),C(t),X.add(St({type:`error`,title:`Could not update network access`,description:t})),V(!1)}}},[e]),Pt=(0,Z.useCallback)(()=>{J!==null&&kt(J===`network-accessible`)},[kt,J]),Rt=(0,Z.useCallback)(async()=>{if(e&&Tt){W(!0),C(null);try{await e.setTailscaleServeEnabled({enabled:!0,port:xt}),Fr(),Oe(null)}catch(e){let t=e instanceof Error?e.message:`Failed to configure Tailscale HTTPS.`;C(t),X.add(St({type:`error`,title:`Could not set up Tailscale HTTPS`,description:t}))}finally{W(!1)}}},[e,Tt,xt]),zt=(0,Z.useCallback)(e=>{Me(String(tt?.tailscaleServePort??ti)),Oe(e)},[tt?.tailscaleServePort]),Ht=(0,Z.useCallback)(async()=>{if(e){W(!0),C(null);try{await e.setTailscaleServeEnabled({enabled:!1,port:tt?.tailscaleServePort??ti}),Fr(),Ae(!1)}catch(e){let t=e instanceof Error?e.message:`Failed to disable Tailscale HTTPS.`;C(t),X.add(St({type:`error`,title:`Could not disable Tailscale HTTPS`,description:t}))}finally{W(!1)}}},[e,tt?.tailscaleServePort]),Wt=(0,Z.useCallback)(e=>{Ae(!0)},[]),Gt=(0,Z.useCallback)(async e=>{O(e),E(null);try{await $t(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke pairing link.`;E(t),X.add(St({type:`error`,title:`Could not revoke pairing link`,description:t}))}finally{O(null)}},[]),Kt=(0,Z.useCallback)(async e=>{ee(e),E(null);try{await Vt(e)}catch(e){let t=e instanceof Error?e.message:`Failed to revoke client access.`;E(t),X.add(St({type:`error`,title:`Could not revoke client access`,description:t}))}finally{ee(null)}},[]),Yt=(0,Z.useCallback)(async()=>{j(!0),E(null);try{let e=await qt();X.add({type:`success`,title:e===1?`Revoked 1 other client`:`Revoked ${e} clients`,description:`Other paired clients will need a new pairing link before reconnecting.`})}catch(e){let t=e instanceof Error?e.message:`Failed to revoke other clients.`;E(t),X.add(St({type:`error`,title:`Could not revoke other clients`,description:t}))}finally{j(!1)}},[]),tn=(0,Z.useCallback)(async()=>{if(N===`ssh`){ge(!0),I(null);let e;try{e=fi({host:ce,username:de,port:pe})}catch(e){I(hi(e)),ge(!1);return}let t=await i({target:e,label:``});if(t._tag===`Failure`){R(t)||I(hi(L(t))),ge(!1);return}oe(``),F(``),le(``),fe(``),me(``),re(!1),X.add({type:`success`,title:`Environment connected`,description:`${e.alias} is ready over an SSH-managed tunnel.`}),ge(!1);return}ge(!0),I(null);let e;try{e=mi({host:ae,pairingCode:se})}catch(e){let t=e instanceof Error?e.message:`Failed to add backend.`;I(t),X.add(St({type:`error`,title:`Could not add backend`,description:t})),ge(!1);return}let t=await r(e);if(t._tag===`Failure`){if(!R(t)){let e=L(t),n=e instanceof Error?e.message:`Failed to add backend.`;I(n),X.add(St({type:`error`,title:`Could not add backend`,description:n}))}ge(!1);return}oe(``),F(``),le(``),fe(``),me(``),re(!1),X.add({type:`success`,title:`Backend added`,description:`The environment is saved and will reconnect on app startup.`}),ge(!1)},[r,i,ae,N,se,ce,pe,de]),on=(0,Z.useCallback)(async e=>{I(null);let t=await o(e);if(t._tag===`Failure`&&!R(t)){let e=L(t),n=e instanceof Error?e.message:`Failed to connect backend.`;I(n),X.add(St({type:`error`,title:`Could not connect backend`,description:n}))}},[o]),sn=(0,Z.useCallback)(async e=>{ve(e),I(null);let t=await a(e);if(ve(null),t._tag===`Failure`&&!R(t)){let e=L(t),n=e instanceof Error?e.message:`Failed to remove backend.`;I(n),X.add(St({type:`error`,title:`Could not remove backend`,description:n}))}},[a]),ln=(0,Z.useCallback)(async(e,t)=>{b(e.alias),N===`ssh`?I(null):_(null);let n=await i({target:e,...t===void 0?{}:{label:t}});if(b(null),n._tag===`Success`){le(``),fe(``),me(``),re(!1),X.add({type:`success`,title:p[e.alias]?`Environment reconnected`:`Environment connected`,description:`${t?.trim()||e.alias} is ready over an SSH-managed tunnel.`});return}if(!R(n)){let e=hi(L(n));N===`ssh`?I(e):_(e)}},[i,N,p]),dn=pt,fn=(0,Z.useMemo)(()=>ot.find(wi)??null,[ot]),Tn=(0,Z.useMemo)(()=>ht?ot.filter(e=>!wi(e)):[],[ot,ht]),Q=(0,Z.useMemo)(()=>fn?[...Tn,fn]:Tn,[fn,Tn]),En=ht||fn?.status===`available`,Dn=(0,Z.useMemo)(()=>Ci(Tn,ze),[ze,Tn]),kn=(0,Z.useMemo)(()=>Dn??Ci(fn?[fn]:[],ze),[ze,Dn,fn]),An=kn?Ti(kn):null,jn=(0,Z.useCallback)(e=>{Be(Ti(e))},[Be]),Mn=(0,Z.useCallback)(e=>{let t=pi(e);if(t){oe(t.host),F(t.pairingCode);return}oe(e)},[]),Nn=e=>{let t=N===e.mode;return(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":t,className:ie(`group flex min-h-24 items-start gap-3 rounded-lg border p-4 text-left`,t?`border-primary/50 bg-primary/5`:`border-border/60 hover:bg-muted/40`),disabled:z,onClick:()=>{P(e.mode)},children:[e.icon?(0,$.jsx)(`span`,{className:ie(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-md border`,t?`border-primary/30 bg-primary/10 text-primary`:`border-border/70 bg-background text-muted-foreground group-hover:text-foreground`),children:e.icon}):null,(0,$.jsxs)(`span`,{className:`min-w-0`,children:[(0,$.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.title}),(0,$.jsx)(`span`,{className:`mt-1 block text-xs leading-relaxed text-muted-foreground`,children:e.description})]})]})},Fn=()=>(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_10rem]`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Host`}),(0,$.jsx)(jt,{value:ae,onChange:e=>Mn(e.target.value),placeholder:`backend.example.com`,disabled:z,spellCheck:!1})]}),(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Pairing code`}),(0,$.jsx)(jt,{value:se,onChange:e=>F(e.target.value),placeholder:`PAIRCODE`,disabled:z,spellCheck:!1})]})]}),(0,$.jsx)(`div`,{children:(0,$.jsx)(`span`,{className:`mt-1 block text-ui-11 text-muted-foreground`,children:`Paste a full pairing URL here to fill both fields automatically.`})})]}),In=()=>(0,$.jsxs)(`div`,{className:`space-y-4`,children:[Fn(),he?(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:he}):null,(0,$.jsxs)(k,{variant:`outline`,className:`w-full`,disabled:z,onClick:()=>void tn(),children:[(0,$.jsx)(Ft,{className:`size-3.5`}),z?`Adding…`:`Add environment`]})]}),Ln=()=>(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`SSH host or alias`}),(0,$.jsx)(jt,{value:ce,onChange:e=>le(e.target.value),placeholder:`Search hosts or type devbox`,disabled:z,spellCheck:!1})]}),(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-[minmax(0,1fr)_7rem]`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Username`}),(0,$.jsx)(jt,{value:de,onChange:e=>fe(e.target.value),placeholder:`root`,disabled:z,spellCheck:!1})]}),(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`mb-1.5 block text-xs font-medium text-foreground`,children:`Port`}),(0,$.jsx)(jt,{value:pe,onChange:e=>me(e.target.value),placeholder:`22`,inputMode:`numeric`,disabled:z,spellCheck:!1})]})]}),he||et?(0,$.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:he??et}):null,(0,$.jsxs)(k,{variant:`outline`,className:`w-full`,disabled:z,onClick:()=>void tn(),children:[(0,$.jsx)(Ft,{className:`size-3.5`}),z?`Adding…`:`Add environment`]})]}),(0,$.jsxs)(`div`,{className:`overflow-hidden rounded-lg border border-border/60`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-border/60 bg-muted/30 px-3 py-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Suggested hosts`}),(0,$.jsx)(`p`,{className:`text-ui-11 text-muted-foreground`,children:`From SSH config and known hosts`})]}),(0,$.jsxs)(k,{size:`xs`,variant:`ghost`,disabled:$e,onClick:Ge.refresh,children:[$e?(0,$.jsx)(gt,{className:`size-3 animate-spin`}):(0,$.jsx)(gt,{className:`size-3`}),`Refresh`]})]}),(0,$.jsx)(yt,{scrollFade:!0,className:`max-h-56`,children:(0,$.jsxs)(`div`,{children:[Ze.map(e=>(0,$.jsx)(zi,{target:e,connectingHostAlias:y,onConnect:e=>void ln(e)},`${e.alias}:${e.hostname}:${e.port??``}`)),Qe&&!$e&&Ze.length===0?(0,$.jsx)(`div`,{className:Yr,children:(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No new SSH hosts were discovered.`})}):null]})})]})]}),Rn=()=>(0,$.jsx)(un,{checked:tt?.mode===`network-accessible`,disabled:!tt||B,onCheckedChange:e=>{Ne(e?`network-accessible`:`local-only`),be(!0)},"aria-label":`Enable network access`}),zn=e=>Le?Tn.map(t=>{let n=Ti(t);return(0,$.jsx)(Ni,{endpoint:t,isDefault:n===An,presentation:e,onSetDefault:jn,onSetupTailscaleServe:zt,onDisableTailscaleServe:Wt,isUpdatingTailscaleServe:U},t.id)}):null,Bn=(0,Z.useCallback)(async t=>{if(e){Ce(!0),Te(null);try{await t(),qr()}catch(e){let t=e instanceof Error?e.message:`Failed to update WSL backend.`;Te(t),X.add(St({type:`error`,title:`Could not change WSL backend`,description:t})),qr()}finally{Ce(!1)}}},[e]),Vn=(0,Z.useCallback)(()=>{Te(null),qr()},[]),Hn=(0,Z.useMemo)(()=>t.some(e=>ue(e.entry.target)),[t]),Un=(0,Z.useCallback)(t=>{if(!e||!Y)return;let n=Y.distros.find(e=>e.isDefault)?.name??null;if(t===ai){if(!Y.enabled&&!Y.wslOnly)return;let t=Y.wslOnly;if(Hn||t){q({kind:`disable`,wasWslOnly:t});return}Bn(()=>e.setWslBackendEnabled(!1));return}let r=t===ii?null:t,i=r??n;if(!Y.enabled){q({kind:`enable`,nextDistro:r});return}if((Y.distro??n)!==i){if(Hn||Y.wslOnly){q({kind:`distro`,nextDistro:r});return}Bn(()=>e.setWslDistro(r))}},[Bn,e,Y,Hn]),Wn=(0,Z.useCallback)(t=>{if(!e||!K||K.kind!==`enable`)return;let n=K.nextDistro;q(null);let r=Y?.distro??null;Bn(()=>On({bridge:e,mode:t,nextDistro:n,persistedDistro:r}))},[Bn,e,Y,K]),Gn=(0,Z.useCallback)(t=>{!e||!Y||Y.wslOnly===t||q({kind:`wsl-only`,nextValue:t})},[e,Y]),Kn=(0,Z.useCallback)(()=>{if(!e||!K)return;let t=K;if(t.kind!==`enable`){if(q(null),t.kind===`disable`){Bn(async()=>{let n=await e.setWslBackendEnabled(!1);return t.wasWslOnly?await e.setWslOnly(!1):n});return}if(t.kind===`distro`){Bn(()=>e.setWslDistro(t.nextDistro));return}Bn(()=>e.setWslOnly(t.nextValue))}},[Bn,e,K]),qn=()=>{if(!Y)return Je&&Ve?(0,$.jsx)(Zt,{title:`WSL backend`,description:`Couldn't load the WSL backend state.`,status:(0,$.jsx)(`span`,{className:`block text-destructive`,children:Je}),control:(0,$.jsx)(k,{size:`xs`,variant:`outline`,onClick:Vn,disabled:Ye,children:Ye?`Retrying…`:`Retry`})}):null;if(!Y.available)return!Y.enabled&&!Y.wslOnly?null:(0,$.jsx)(Zt,{title:`WSL backend`,description:`WSL is no longer available, so the Windows backend is running instead. Switch off the WSL backend to clear this preference.`,status:Je?(0,$.jsx)(`span`,{className:`block text-destructive`,children:Je}):null,control:(0,$.jsx)(k,{variant:`outline`,disabled:G,onClick:()=>Un(ai),children:`Switch to Windows`})});let e=Y.distros.find(e=>e.isDefault)?.name??null,t=Y.enabled?Y.distro??e??ii:ai,n=t===ai?`Off`:t===ii?`Default distro`:t;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Zt,{title:`WSL backend`,description:`Run a second backend inside a WSL distro alongside the Windows one. Pick a distro to start it; pick Off to stop it. Projects opened against the WSL backend live on the Linux side; Windows projects stay where they are.`,status:Je?(0,$.jsx)(`span`,{className:`block text-destructive`,children:Je}):Y.preflightError?(0,$.jsxs)(`span`,{className:`block text-destructive`,children:[`WSL backend couldn't start: `,Y.preflightError]}):null,control:(0,$.jsxs)(M,{value:t,onValueChange:e=>{typeof e==`string`&&Un(e)},children:[(0,$.jsx)(m,{className:`w-full sm:w-56`,"aria-label":`WSL backend`,disabled:G,children:(0,$.jsx)(v,{children:n})}),(0,$.jsxs)(u,{align:`end`,alignItemWithTrigger:!1,children:[(0,$.jsx)(S,{hideIndicator:!0,value:ai,children:`Off`}),Y.distros.length===0?(0,$.jsx)(S,{hideIndicator:!0,value:ii,children:`Default distro`}):Y.distros.map(e=>(0,$.jsxs)(S,{hideIndicator:!0,value:e.name,children:[e.name,e.isDefault?` (default)`:``]},e.name))]})]})}),Y.enabled?(0,$.jsx)(Zt,{title:`WSL only`,description:`Stop the Windows backend and run only the WSL backend. Useful if you develop entirely inside WSL and don't want a second backend process. DasCode restarts when you change this.`,className:`bg-muted/20 pl-7 sm:pl-8`,control:(0,$.jsx)(un,{checked:Y.wslOnly,disabled:G,onCheckedChange:e=>Gn(e),"aria-label":`Run WSL only`})}):null]})},Jn=()=>(0,$.jsx)(Zt,{title:`Tailscale HTTPS`,description:fn?fn.status===`available`?fn.httpBaseUrl:`Use Tailscale Serve to expose this backend through a MagicDNS HTTPS URL.`:`Start Tailscale to set up HTTPS access through MagicDNS.`,control:fn?(0,$.jsx)(un,{checked:fn.status===`available`,disabled:U,onCheckedChange:e=>{if(e){zt(fn);return}Wt(fn)},"aria-label":`Enable Tailscale HTTPS`}):null}),Yn=e=>(0,$.jsxs)($.Fragment,{children:[lt?(0,$.jsx)(`div`,{className:_i(e),children:(0,$.jsx)(`p`,{className:`text-xs text-destructive`,children:lt})}):null,(0,$.jsx)(Mi,{endpointUrl:tt?.endpointUrl,endpoints:Q,defaultEndpointKey:An,presentation:e,isLoading:ut,pairingLinks:dn,clientSessions:mt,revokingPairingLinkId:D,revokingClientSessionId:A,onRevokePairingLink:Gt,onRevokeClientSession:Kt})]}),Xn=()=>(0,$.jsx)(Zt,{title:`Network access`,description:ht?(0,$.jsx)(Pi,{endpoint:Dn,hiddenEndpointCount:Math.max(Tn.length-1,0),expanded:Le,onToggleExpanded:()=>Re(e=>!e),fallback:tt?.endpointUrl?`Reachable at ${tt.endpointUrl}`:tt?.advertisedHost?`Exposed on all interfaces. Pairing links use ${tt.advertisedHost}.`:`Exposed on all interfaces.`}):tt?`Limited to this machine.`:`Loading…`,status:ct?(0,$.jsx)(`span`,{className:`block text-destructive`,children:ct}):null,control:Rn()}),Zn=()=>(0,$.jsx)(Zt,{title:`Network access`,description:d===`remote-reachable`?`This backend is already configured for remote access. Network exposure changes must be made where the server is launched.`:`This backend is only reachable on this machine. Restart it with a non-loopback host to enable remote pairing.`,control:(0,$.jsxs)(Qt,{children:[(0,$.jsx)(Jt,{render:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(un,{checked:ht,disabled:!0,"aria-label":`Enable network access`})})}),(0,$.jsx)(rn,{side:`top`,children:`Network exposure changes restart the backend and must be controlled where the server process is launched.`})]})});return(0,$.jsxs)(Bt,{children:[(0,$.jsx)(Pn,{}),Ve?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(nn,{title:`This environment`,children:[Fe||Ie.status!==`idle`?(0,$.jsx)(Zt,{title:Ie.status===`failed`?`Update failed`:Ie.status===`running`?`Updating server`:`Version drift`,description:Ie.status===`idle`?Fe?(0,$.jsxs)(`span`,{className:`flex items-center gap-1 text-warning`,children:[(0,$.jsx)(Ot,{className:`size-3.5 shrink-0`}),`Client `,Fe.clientVersion,`, server`,` `,Fe.serverVersion,`. Sync them if RPC calls or reconnects fail.`]}):null:(0,$.jsx)(bn,{fromVersion:Ie.fromVersion,state:Ie}),control:Fe&&s!==null&&Ie.status!==`running`?(0,$.jsx)(Cn,{environmentId:s,serverLabel:n?.label??`this server`,selfUpdate:Sn(Pe),targetVersion:Fe.clientVersion,...Ie.status===`failed`?{label:`Retry update`}:{}}):void 0}):null,e?(0,$.jsxs)($.Fragment,{children:[Xn(),zn(`endpoint-rail`),Jn(),qn(),(0,$.jsx)(Hi,{canManageRelay:He})]}):(0,$.jsxs)($.Fragment,{children:[Zn(),(0,$.jsx)(Hi,{canManageRelay:He})]})]}),En?(0,$.jsx)(nn,{title:`Authorized clients`,headerAction:(0,$.jsx)(ji,{clientSessions:mt,isRevokingOtherClients:te,onRevokeOtherClients:Yt}),children:(0,$.jsx)(yt,{scrollFade:!0,className:`max-h-[22.5rem]`,"data-testid":`authorized-clients-scroll-area`,children:Yn(`current`)})}):null,(0,$.jsx)(yn,{open:ye,onOpenChange:e=>{B||be(e)},onOpenChangeComplete:e=>{e||Ne(null)},children:(0,$.jsxs)(gn,{children:[(0,$.jsxs)(pn,{children:[(0,$.jsx)(vn,{children:J===`network-accessible`?`Enable network access?`:`Disable network access?`}),(0,$.jsx)(_n,{children:J===`network-accessible`?`DasCode will restart to expose this environment over the network.`:`DasCode will restart and limit this environment back to this machine.`})]}),(0,$.jsxs)(mn,{children:[(0,$.jsx)(hn,{disabled:B,render:(0,$.jsx)(k,{variant:`outline`,disabled:B}),children:`Cancel`}),(0,$.jsx)(k,{variant:J===`local-only`?`destructive`:`default`,onClick:Pt,disabled:J===null||B,children:B?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Restarting…`]}):J===`network-accessible`?`Restart and enable`:`Restart and disable`})]})]})}),(0,$.jsx)(yn,{open:Ee,onOpenChange:e=>{G||e||q(null)},children:(0,$.jsxs)(gn,{children:[(0,$.jsxs)(pn,{children:[(0,$.jsx)(vn,{children:K?.kind===`disable`?K.wasWslOnly?`Turn off WSL and switch back to Windows?`:`Disable WSL backend?`:K?.kind===`distro`?`Switch WSL distro?`:K?.kind===`enable`?`Start the WSL backend`:K?.nextValue?`Run only the WSL backend?`:`Re-enable the Windows backend?`}),(0,$.jsx)(_n,{children:K?.kind===`disable`?K.wasWslOnly?`DasCode will restart on the Windows backend. Threads and projects opened against WSL stay safe inside the distro and become available again when you re-enable WSL.`:`The WSL backend will stop. Threads and projects opened against WSL stay safe inside the distro, but they'll be unavailable in DasCode until you re-enable WSL.`:K?.kind===`distro`?`DasCode will restart the WSL backend on the new distro. Sessions still running on the current distro will be interrupted.`:K?.kind===`enable`?`Run the WSL backend alongside the Windows one, or stop the Windows backend and use only WSL? You can change this later from Settings.`:K?.nextValue?`DasCode will restart and start only the WSL backend. Your Windows-side projects won't be accessible until you turn this off again.`:`DasCode will restart and bring the Windows backend back up alongside WSL.`})]}),(0,$.jsxs)(mn,{children:[(0,$.jsx)(hn,{disabled:G,render:(0,$.jsx)(k,{variant:`outline`,disabled:G}),children:`Cancel`}),K?.kind===`enable`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(k,{variant:`outline`,onClick:()=>Wn(`wsl-only`),disabled:G,children:G?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Applying…`]}):`Use only WSL`}),(0,$.jsx)(k,{variant:`default`,onClick:()=>Wn(`both`),disabled:G,children:G?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Applying…`]}):`Run both backends`})]}):(0,$.jsx)(k,{variant:K?.kind===`disable`||K?.kind===`wsl-only`&&K.nextValue?`destructive`:`default`,onClick:Kn,disabled:G,children:G?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Applying…`]}):K?.kind===`disable`?K.wasWslOnly?`Switch to Windows`:`Disable WSL`:K?.kind===`distro`?`Switch distro`:K?.nextValue?`Restart and enable`:`Restart and disable`})]})]})}),(0,$.jsx)(yn,{open:ke,onOpenChange:e=>{U||Ae(e)},children:(0,$.jsxs)(gn,{children:[(0,$.jsxs)(pn,{children:[(0,$.jsx)(vn,{children:`Disable Tailscale HTTPS?`}),(0,$.jsx)(_n,{children:`DasCode will restart the local backend without Tailscale Serve.`})]}),(0,$.jsxs)(mn,{children:[(0,$.jsx)(hn,{disabled:U,render:(0,$.jsx)(k,{variant:`outline`,disabled:U}),children:`Cancel`}),(0,$.jsx)(k,{variant:`destructive`,onClick:()=>void Ht(),disabled:U,children:U?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Restarting…`]}):`Restart and disable`})]})]})}),(0,$.jsx)(wt,{open:De!==null,onOpenChange:e=>{U||e||Oe(null)},children:(0,$.jsxs)(Ct,{className:`max-w-md`,children:[(0,$.jsxs)(_t,{children:[(0,$.jsx)(Nt,{children:`Set up Tailscale HTTPS?`}),(0,$.jsx)(Mt,{children:`DasCode will restart the local backend with Tailscale Serve enabled and ask Tailscale to proxy HTTPS traffic to this backend.`})]}),(0,$.jsxs)(It,{className:`space-y-4`,children:[(0,$.jsxs)(`label`,{className:`block`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`HTTPS port`}),(0,$.jsx)(jt,{className:`mt-2`,type:`number`,inputMode:`numeric`,min:1,max:65535,step:1,value:je,onChange:e=>Me(e.target.value),disabled:U})]}),Tt?null:(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:`Enter a port from 1 to 65535.`}),(0,$.jsxs)(`div`,{className:`rounded-md border border-border/70 bg-muted/20 px-3 py-2`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`HTTPS endpoint`}),(0,$.jsx)(`p`,{className:`mt-1 truncate text-sm text-foreground`,title:Dt??void 0,children:Dt??`Pending MagicDNS endpoint`})]})]}),(0,$.jsxs)(cn,{children:[(0,$.jsx)(Et,{disabled:U,render:(0,$.jsx)(k,{variant:`outline`,disabled:U}),children:`Cancel`}),(0,$.jsx)(k,{onClick:()=>void Rt(),disabled:U||!Tt,children:U?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(At,{className:`size-3.5`}),`Restarting…`]}):`Enable`})]})]})})]}):(0,$.jsxs)(nn,{title:`This environment`,children:[(0,$.jsx)(Zt,{title:`Administrative access`,description:`Pairing links and client-session management require the access:write scope for this backend.`}),(0,$.jsx)(Hi,{canManageRelay:He})]}),(0,$.jsxs)(nn,{...en(`remote-environments`),headerAction:(0,$.jsxs)(wt,{open:ne,onOpenChange:e=>{re(e),e||I(null)},children:[(0,$.jsxs)(Qt,{children:[(0,$.jsx)(Jt,{render:(0,$.jsx)(Lt,{render:(0,$.jsxs)(k,{size:`xs`,variant:`ghost`,className:`h-5 gap-1 rounded-sm px-1 text-ui-11 font-normal text-muted-foreground/60 hover:text-muted-foreground`,"aria-label":`Add environment`,children:[(0,$.jsx)(Ft,{className:`size-3`}),(0,$.jsx)(`span`,{children:`Add environment`})]})})}),(0,$.jsx)(rn,{side:`top`,children:`Add environment`})]}),(0,$.jsxs)(Ct,{className:`max-h-[80dvh] sm:max-w-3xl`,children:[(0,$.jsxs)(_t,{children:[(0,$.jsx)(Nt,{children:`Add Environment`}),(0,$.jsx)(Mt,{children:`Pair another environment to this client.`})]}),(0,$.jsx)(It,{children:(0,$.jsxs)(`div`,{className:`space-y-4`,children:[(0,$.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[Nn({mode:`remote`,title:`Remote link`,description:`Enter a backend host and pairing code.`,icon:(0,$.jsx)(wn,{"aria-hidden":!0,className:`size-4`})}),e?Nn({mode:`ssh`,title:`SSH`,description:`Use local SSH config, agent, and tunnels for the backend.`,icon:(0,$.jsx)(bt,{"aria-hidden":!0,className:`size-4`})}):null]}),(0,$.jsx)(ft,{children:N===`ssh`?Ln():In()})]})})]})]}),children:[f.map(e=>(0,$.jsx)(Fi,{environment:e,removingEnvironmentId:_e,onConnect:on,onRemove:sn},e.environmentId)),(0,$.jsx)(Wi,{primaryEnvironmentId:s,savedEnvironments:f})]})]})}function Ki(e){X.add({type:`success`,title:e===`hosted-link`?`Hosted app link copied`:e===`link`?`Pairing URL copied`:`Pairing code copied`,description:e===`hosted-link`?`Open it in the browser on the device you want to connect.`:e===`link`?`Open it in the client you want to pair to this environment.`:`Paste it into another client to finish pairing.`})}function qi(e){return Oi(e)?`hosted-link`:`link`}function Ji(e){return!Oi(e.url)}function Yi(e){return Oi(e.url)}function Xi(e){return e.currentTarget.select()}function Zi(e){return e.currentTarget.select()}function Qi(e){return e!==null}var $i=Gi;export{$i as component};
|
|
2
|
+
//# sourceMappingURL=settings.connections-YjuBg0cD.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{Aa as i,Ma as a,cn as o,ja as s,mo as c,t as l}from"./utils-Yidpy5tB.js";import{Tt as u,_t as d,t as f}from"./use-atom-command-CbJ8L7ju.js";import{Cs as p,Fs as m,Ms as h,en as g,js as _,na as v,zs as y}from"./Schema-DzLI5hMK.js";import{u as b}from"./localApi-5K0gg1WP.js";import{c as x,f as S,r as ee,t as C}from"./query-BTlH8ppa.js";import{t as w}from"./gauge-DXknpyA8.js";import{t as te}from"./rotate-ccw-BuHf9qmb.js";import{i as ne}from"./environments-DPUVdQJp.js";import{a as re}from"./shell-BfrxrAzH.js";import{Bc as ie,Fa as T,Ha as E,Ka as ae,Nc as oe,Ua as D,Wo as se,Xo as O,aa as ce,ca as le,il as k,jt as ue,ls as A,os as j,qc as M,sa as N,ss as P}from"./index-DCOpJfCm.js";var de=a(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),fe=a(`battery`,[[`path`,{d:`M 22 14 L 22 10`,key:`nqc4tb`}],[`rect`,{x:`2`,y:`6`,width:`16`,height:`12`,rx:`2`,key:`13zb55`}]]),pe=a(`cpu`,[[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M17 20v2`,key:`1rnc9c`}],[`path`,{d:`M17 2v2`,key:`11trls`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M2 17h2`,key:`7oei6x`}],[`path`,{d:`M2 7h2`,key:`asdhe0`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`M20 17h2`,key:`1fpfkl`}],[`path`,{d:`M20 7h2`,key:`1o8tra`}],[`path`,{d:`M7 20v2`,key:`4gnj0m`}],[`path`,{d:`M7 2v2`,key:`1i4yhu`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`,key:`1vbyd7`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`,key:`z9xiuo`}]]),me=a(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),he=a(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ge=a(`hard-drive`,[[`path`,{d:`M10 16h.01`,key:`1bzywj`}],[`path`,{d:`M2.212 11.577a2 2 0 0 0-.212.896V18a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-5.527a2 2 0 0 0-.212-.896L18.55 5.11A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`18tbho`}],[`path`,{d:`M21.946 12.013H2.054`,key:`zqlbp7`}],[`path`,{d:`M6 16h.01`,key:`1pmjb7`}]]),_e=a(`memory-stick`,[[`path`,{d:`M12 12v-2`,key:`fwoke6`}],[`path`,{d:`M12 18v-2`,key:`qj6yno`}],[`path`,{d:`M16 12v-2`,key:`heuere`}],[`path`,{d:`M16 18v-2`,key:`s1ct0w`}],[`path`,{d:`M2 11h1.5`,key:`15p63e`}],[`path`,{d:`M20 18v-2`,key:`12ehxp`}],[`path`,{d:`M20.5 11H22`,key:`khsy7a`}],[`path`,{d:`M4 18v-2`,key:`1c3oqr`}],[`path`,{d:`M8 12v-2`,key:`1mwtfd`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`10`,rx:`2`,key:`1qcswk`}]]),F=t(n(),1),I=r();function ve(){let e=(0,I.c)(9),t=ne()?.environmentId??null,n;e[0]===t?n=e[1]:(n=t===null?null:S.resourceTelemetry({environmentId:t,input:{}}),e[0]=t,e[1]=n);let r=C(n),i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i={reportFailure:!1},e[2]=i):i=e[2];let a=f(S.retryResourceTelemetry,i),o;e[3]!==t||e[4]!==a?(o=async()=>{if(t===null)throw Error(`No environment is selected.`);let e=await a({environmentId:t,input:{}});if(e._tag===`Failure`)throw v(e.cause);return e.value.snapshot},e[3]=t,e[4]=a,e[5]=o):o=e[5];let s=o,c;return e[6]!==r||e[7]!==s?(c={...r,retry:s},e[6]=r,e[7]=s,e[8]=c):c=e[8],c}function ye(e){let t=(0,I.c)(3),n=ne()?.environmentId??null,r;return t[0]!==n||t[1]!==e?(r=n===null?null:S.resourceTelemetryHistory({environmentId:n,input:e}),t[0]=n,t[1]=e,t[2]=r):r=t[2],C(r)}function be(e){return`${e.identity.pid}:${e.identity.startTimeMs}`}function xe(e,t){let n=new Map;for(let t of e){let e=n.get(t.ppid)??[];e.push(t),n.set(t.ppid,e)}let r=new Set,i=e=>{for(let t of n.get(e)??[]){let e=be(t);r.has(e)||(r.add(e),i(t.identity.pid))}};for(let n of e)t.has(be(n))&&i(n.identity.pid);return e.filter(e=>!r.has(be(e)))}function Se(e){return e.nativeStatus===null&&e.error!==null||e.nativeStatus===`degraded`||e.nativeStatus===`unavailable`||e.nativeStatus===`stopped`}function L(e){return e.value<=0?0:Math.max(e.minimumVisiblePercent,e.value/Math.max(1,e.max)*100)}function Ce(e){return Math.max(1,...e.map(e=>e.avgCpuPercent))}var R=t(e(),1),we=[{label:`5m`,windowMs:5*6e4,bucketMs:15e3},{label:`15m`,windowMs:15*6e4,bucketMs:3e4},{label:`30m`,windowMs:30*6e4,bucketMs:6e4},{label:`1h`,windowMs:60*6e4,bucketMs:2*6e4}];function z(e){if(e<1024)return`${Math.round(e)} B`;let t=[`KB`,`MB`,`GB`,`TB`],n=e,r=-1;do n/=1024,r+=1;while(n>=1024&&r<t.length-1);return`${n.toFixed(n>=100?0:n>=10?1:2)} ${t[r]}`}function Te(e){return`${z(e)}/s`}function Ee(e){let t=e/1e3;if(t<60)return`${t.toFixed(t>=10?1:2)}s`;let n=t/60;return n<60?`${n.toFixed(n>=10?1:2)}m`:`${(n/60).toFixed(2)}h`}function De(e){return e<1e3?`${Math.round(e)} µs`:e<1e6?`${(e/1e3).toFixed(2)} ms`:`${(e/1e6).toFixed(2)} s`}function Oe(e){if(e<1e3)return`${Math.max(0,Math.round(e))} ms`;let t=e/1e3;return`${t.toLocaleString(void 0,{maximumFractionDigits:1})} ${t===1?`second`:`seconds`}`}function ke(e){return`${e.identity.pid}:${e.identity.startTimeMs}`}function B(e){return`${e.identity.pid}:${e.identity.startTimeMs}`}function V(e){if(e.name.trim())return e.name;let t=(e.command.trim().split(/\s+/)[0]??e.command).replace(/^['"]|['"]$/g,``);return t.split(/[\\/]/).findLast(e=>e.length>0)??t}function Ae(e){switch(e){case`server`:return`Server`;case`server-child`:return`Backend child`;case`provider-root`:return`Provider`;case`terminal-root`:return`Terminal`;case`electron-main`:return`Electron main`;case`electron-renderer`:return`Renderer`;case`electron-gpu`:return`GPU`;case`electron-utility`:return`Electron utility`;case`resource-monitor`:return`Monitor`;case`unknown-dascode`:return`${c} process`}}function H(e){return e===`resource-monitor`?`bg-amber-500`:e.startsWith(`electron-`)?`bg-sky-500`:e===`server`?`bg-violet-500`:`bg-emerald-500`}function je(e){switch(e){case`storage`:return`Storage bytes`;case`logical`:return`Logical bytes`;case`all-io`:return`All I/O bytes`;case`unavailable`:return`Unavailable`}}function Me(e,t){return e===`true`?t.true:e===`false`?t.false:`Unknown`}function U(e){return e===`healthy`?`default`:e===`starting`||e===`degraded`?`warning`:`danger`}function Ne(e){let t=(0,I.c)(20),{label:n,status:r,presentation:i}=e,a;t[0]!==i?.tone||t[1]!==r?(a=i?.tone??U(r),t[0]=i?.tone,t[1]=r,t[2]=a):a=t[2];let o=a,s=o===`neutral`&&`border-border/70 bg-muted/45 text-muted-foreground`,c=o==="default"&&`border-emerald-500/25 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`,u=o===`warning`&&`border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300`,d=o===`danger`&&`border-destructive/30 bg-destructive/10 text-destructive`,f;t[3]!==s||t[4]!==c||t[5]!==u||t[6]!==d?(f=l(`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-ui-10 font-semibold uppercase tracking-[0.08em]`,s,c,u,d),t[3]=s,t[4]=c,t[5]=u,t[6]=d,t[7]=f):f=t[7];let p=o===`neutral`&&`bg-muted-foreground/55`,m=o==="default"&&`bg-emerald-500`,h=o===`warning`&&`bg-amber-500`,g=o===`danger`&&`bg-destructive`,_;t[8]!==g||t[9]!==p||t[10]!==m||t[11]!==h?(_=l(`size-1.5 rounded-full`,p,m,h,g),t[8]=g,t[9]=p,t[10]=m,t[11]=h,t[12]=_):_=t[12];let v;t[13]===_?v=t[14]:(v=(0,R.jsx)(`span`,{className:_}),t[13]=_,t[14]=v);let y=i?.label??r,b;return t[15]!==n||t[16]!==v||t[17]!==y||t[18]!==f?(b=(0,R.jsxs)(`span`,{className:f,children:[v,n,` `,y]}),t[15]=n,t[16]=v,t[17]=y,t[18]=f,t[19]=b):b=t[19],b}function Pe(e){let t=(0,I.c)(9),{sampledAt:n}=e;if(le(),!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/55`,children:`Waiting for sample`}),t[0]=e):e=t[0],e}let r;t[1]===n?r=t[2]:(r=E(g(n)),t[1]=n,t[2]=r);let i=r;if(!i){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/55`,children:`Waiting for sample`}),t[3]=e):e=t[3],e}let a;t[4]===i.value?a=t[5]:(a=(0,R.jsx)(`span`,{className:`font-mono tabular-nums`,children:i.value}),t[4]=i.value,t[5]=a);let o=i.suffix?` ${i.suffix}`:``,s;return t[6]!==a||t[7]!==o?(s=(0,R.jsxs)(`span`,{className:`text-ui-11 text-muted-foreground/60`,children:[`Updated `,a,o]}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function Fe(e){let t=(0,I.c)(19),{icon:n,label:r,value:i,detail:a,tone:o}=e,s=o===void 0?`default`:o,c;t[0]===n?c=t[1]:(c=(0,R.jsx)(`span`,{className:`text-muted-foreground/55 transition-colors group-hover:text-foreground/65`,children:n}),t[0]=n,t[1]=c);let u;t[2]===r?u=t[3]:(u=(0,R.jsx)(`span`,{className:`truncate`,children:r}),t[2]=r,t[3]=u);let d;t[4]!==c||t[5]!==u?(d=(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-ui-10 font-semibold uppercase tracking-[0.11em] text-muted-foreground/70`,children:[c,u]}),t[4]=c,t[5]=u,t[6]=d):d=t[6];let f=s===`warning`&&`text-amber-600 dark:text-amber-300`,p=s===`danger`&&`text-destructive`,m;t[7]!==f||t[8]!==p?(m=l(`mt-2.5 truncate font-mono text-2xl font-semibold tracking-[-0.05em] tabular-nums text-foreground`,f,p),t[7]=f,t[8]=p,t[9]=m):m=t[9];let h;t[10]!==m||t[11]!==i?(h=(0,R.jsx)(`div`,{className:m,children:i}),t[10]=m,t[11]=i,t[12]=h):h=t[12];let g;t[13]===a?g=t[14]:(g=a?(0,R.jsx)(`div`,{className:`mt-1.5 truncate text-ui-10 text-muted-foreground/60`,children:a}):null,t[13]=a,t[14]=g);let _;return t[15]!==d||t[16]!==h||t[17]!==g?(_=(0,R.jsxs)(`div`,{className:`group min-w-0 px-4 py-4 sm:px-5`,children:[d,h,g]}),t[15]=d,t[16]=h,t[17]=g,t[18]=_):_=t[18],_}function Ie(e){let t=(0,I.c)(37),{label:n,accentClass:r,aggregate:i}=e,a;t[0]===r?a=t[1]:(a=l(`absolute inset-x-5 top-0 h-0.5 rounded-full opacity-75`,r),t[0]=r,t[1]=a);let o;t[2]===a?o=t[3]:(o=(0,R.jsx)(`span`,{className:a}),t[2]=a,t[3]=o);let s;t[4]===n?s=t[5]:(s=(0,R.jsx)(`div`,{className:`text-ui-10 font-semibold uppercase tracking-[0.11em] text-muted-foreground/75`,children:n}),t[4]=n,t[5]=s);let c=i.processCount===1?`process`:`processes`,u;t[6]!==i.processCount||t[7]!==c?(u=(0,R.jsxs)(`div`,{className:`rounded-md bg-muted/55 px-1.5 py-0.5 font-mono text-ui-9 tabular-nums text-muted-foreground/70`,children:[i.processCount,` `,c]}),t[6]=i.processCount,t[7]=c,t[8]=u):u=t[8];let d;t[9]!==s||t[10]!==u?(d=(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[s,u]}),t[9]=s,t[10]=u,t[11]=d):d=t[11];let f;t[12]===i.currentCpuPercent?f=t[13]:(f=i.currentCpuPercent.toFixed(1),t[12]=i.currentCpuPercent,t[13]=f);let p=`${f}%`,m;t[14]===p?m=t[15]:(m=(0,R.jsx)(W,{label:`CPU`,value:p}),t[14]=p,t[15]=m);let h;t[16]===i.currentRssBytes?h=t[17]:(h=z(i.currentRssBytes),t[16]=i.currentRssBytes,t[17]=h);let g;t[18]===h?g=t[19]:(g=(0,R.jsx)(W,{label:`Memory`,value:h}),t[18]=h,t[19]=g);let _;t[20]===i.ioReadBytesPerSecond?_=t[21]:(_=Te(i.ioReadBytesPerSecond),t[20]=i.ioReadBytesPerSecond,t[21]=_);let v;t[22]===_?v=t[23]:(v=(0,R.jsx)(W,{label:`Read`,value:_}),t[22]=_,t[23]=v);let y;t[24]===i.ioWriteBytesPerSecond?y=t[25]:(y=Te(i.ioWriteBytesPerSecond),t[24]=i.ioWriteBytesPerSecond,t[25]=y);let b;t[26]===y?b=t[27]:(b=(0,R.jsx)(W,{label:`Write`,value:y}),t[26]=y,t[27]=b);let x;t[28]!==g||t[29]!==v||t[30]!==b||t[31]!==m?(x=(0,R.jsxs)(`div`,{className:`mt-3.5 grid grid-cols-2 gap-x-4 gap-y-2.5`,children:[m,g,v,b]}),t[28]=g,t[29]=v,t[30]=b,t[31]=m,t[32]=x):x=t[32];let S;return t[33]!==x||t[34]!==o||t[35]!==d?(S=(0,R.jsxs)(`div`,{className:`relative overflow-hidden border-t border-border/60 px-4 py-4 first:border-t-0 md:border-t-0 md:border-l md:first:border-l-0 sm:px-5`,children:[o,d,x]}),t[33]=x,t[34]=o,t[35]=d,t[36]=S):S=t[36],S}function W(e){let t=(0,I.c)(7),{label:n,value:r}=e,i;t[0]===n?i=t[1]:(i=(0,R.jsx)(`div`,{className:`text-ui-9 font-semibold uppercase tracking-[0.08em] text-muted-foreground/45`,children:n}),t[0]=n,t[1]=i);let a;t[2]===r?a=t[3]:(a=(0,R.jsx)(`div`,{className:`truncate font-mono text-xs font-medium tabular-nums text-foreground/90`,children:r}),t[2]=r,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,R.jsxs)(`div`,{className:`min-w-0`,children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Le(e){let t=(0,I.c)(21),{label:n,health:r}=e,i;t[0]!==r.lastError||t[1]!==r.status?(i=r.status===`unavailable`&&p(r.lastError,K),t[0]=r.lastError,t[1]=r.status,t[2]=i):i=t[2];let a=i,o;t[3]===n?o=t[4]:(o=(0,R.jsx)(`div`,{className:`text-ui-13 font-medium text-foreground`,children:n}),t[3]=n,t[4]=o);let s;t[5]!==a||t[6]!==r.lastError?(s=a?`Available when this page runs inside the desktop app.`:y(r.lastError,{onNone:Re,onSome:G}),t[5]=a,t[6]=r.lastError,t[7]=s):s=t[7];let c;t[8]===s?c=t[9]:(c=(0,R.jsx)(`div`,{className:`mt-1 text-ui-11 leading-relaxed text-muted-foreground/65`,children:s}),t[8]=s,t[9]=c);let l;t[10]!==o||t[11]!==c?(l=(0,R.jsxs)(`div`,{className:`min-w-0`,children:[o,c]}),t[10]=o,t[11]=c,t[12]=l):l=t[12];let u;t[13]===a?u=t[14]:(u=a?{label:`Desktop only`,tone:`neutral`}:void 0,t[13]=a,t[14]=u);let d;t[15]!==r.status||t[16]!==u?(d=(0,R.jsx)(Ne,{label:``,status:r.status,presentation:u}),t[15]=r.status,t[16]=u,t[17]=d):d=t[17];let f;return t[18]!==l||t[19]!==d?(f=(0,R.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-t border-border/50 py-3 first:border-t-0`,children:[l,d]}),t[18]=l,t[19]=d,t[20]=f):f=t[20],f}function G(e){return e}function Re(){return`No reported errors`}function K(e){return e.includes(`'web' mode`)}function q(e){let t=(0,I.c)(10),{label:n,value:r,valueClassName:i}=e,a;t[0]===n?a=t[1]:(a=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/75`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=l(`min-w-0 truncate text-right font-mono text-ui-11 tabular-nums text-foreground/85`,i),t[2]=i,t[3]=o);let s;t[4]!==o||t[5]!==r?(s=(0,R.jsx)(`span`,{className:o,children:r}),t[4]=o,t[5]=r,t[6]=s):s=t[6];let c;return t[7]!==a||t[8]!==s?(c=(0,R.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-t border-border/50 py-2.5 first:border-t-0`,children:[a,s]}),t[7]=a,t[8]=s,t[9]=c):c=t[9],c}function ze(e){let t=(0,I.c)(5),{selectedWindowMs:n,onSelect:r}=e,i;t[0]!==r||t[1]!==n?(i=we.map(e=>(0,R.jsx)(`button`,{type:`button`,className:l(`h-6 rounded-sm px-2 text-ui-11 font-medium text-muted-foreground hover:text-foreground`,n===e.windowMs&&`bg-muted text-foreground`),onClick:()=>r(e.windowMs),children:e.label},e.windowMs)),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,R.jsx)(`div`,{className:`flex items-center rounded-md border border-border/60 p-0.5`,children:i}),t[3]=i,t[4]=a),a}function Be(e){let t=(0,I.c)(15),{buckets:n}=e,r,i,a,o;if(t[0]!==n){let e=Ce(n),s=Math.max(1,...n.map(Ve));a=`border-t border-border/60 px-4 py-4 sm:px-5`;let c;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`h-1.5 w-3 rounded-full bg-foreground/70`}),` CPU average`]}),t[5]=c):c=t[5];let l;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`h-1.5 w-3 rounded-full bg-sky-500/70`}),` I/O reads`]}),t[6]=l):l=t[6],t[7]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,R.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-ui-10 text-muted-foreground/65`,children:[c,l,(0,R.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,R.jsx)(`span`,{className:`h-1.5 w-3 rounded-full bg-amber-500/80`}),` I/O writes`]})]}),t[7]=o):o=t[7],r=`flex h-32 items-end gap-1 overflow-hidden rounded-lg border border-border/40 bg-muted/8 px-2 pt-3 pb-2`,i=n.map(t=>{let n=L({value:t.avgCpuPercent,max:e,minimumVisiblePercent:2}),r=L({value:t.ioReadBytes,max:s,minimumVisiblePercent:1}),i=L({value:t.ioWriteBytes,max:s,minimumVisiblePercent:1});return(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsxs)(`div`,{className:`grid h-full min-w-1 flex-1 grid-cols-3 items-end gap-px`,children:[(0,R.jsx)(`span`,{className:`block rounded-t-sm bg-foreground/65`,style:{height:`${n}%`}}),(0,R.jsx)(`span`,{className:`block rounded-t-sm bg-sky-500/70`,style:{height:`${r}%`}}),(0,R.jsx)(`span`,{className:`block rounded-t-sm bg-amber-500/80`,style:{height:`${i}%`}})]})}),(0,R.jsxs)(P,{side:`top`,className:`space-y-0.5 text-left`,children:[(0,R.jsxs)(`div`,{children:[`CPU avg `,t.avgCpuPercent.toFixed(1),`%`]}),(0,R.jsxs)(`div`,{children:[`CPU peak `,t.maxCpuPercent.toFixed(1),`%`]}),(0,R.jsxs)(`div`,{children:[`Read `,z(t.ioReadBytes)]}),(0,R.jsxs)(`div`,{children:[`Write `,z(t.ioWriteBytes)]})]})]},g(t.startedAt))}),t[0]=n,t[1]=r,t[2]=i,t[3]=a,t[4]=o}else r=t[1],i=t[2],a=t[3],o=t[4];let s;t[8]!==r||t[9]!==i?(s=(0,R.jsx)(`div`,{className:r,children:i}),t[8]=r,t[9]=i,t[10]=s):s=t[10];let c;return t[11]!==a||t[12]!==o||t[13]!==s?(c=(0,R.jsxs)(`div`,{className:a,children:[o,s]}),t[11]=a,t[12]=o,t[13]=s,t[14]=c):c=t[14],c}function Ve(e){return e.ioReadBytes+e.ioWriteBytes}function He(e){let t=(0,I.c)(27),{process:n,collapsed:r,onToggle:a}=e,o;t[0]===n?o=t[1]:(o=V(n),t[0]=n,t[1]=o);let c=o,u=n.childPids.length>0,d=r?i:s,f=`${Math.min(n.depth,7)*10}px`,p;t[2]===f?p=t[3]:(p={paddingLeft:f},t[2]=f,t[3]=p);let m;t[4]!==d||t[5]!==r||t[6]!==u||t[7]!==c||t[8]!==a||t[9]!==n?(m=u?(0,R.jsx)(`button`,{type:`button`,className:`inline-flex size-5 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-foreground`,onClick:()=>a(n),"aria-label":r?`Expand ${c}`:`Collapse ${c}`,children:(0,R.jsx)(d,{className:`size-3.5`})}):(0,R.jsx)(`span`,{className:`size-5`,"aria-hidden":!0}),t[4]=d,t[5]=r,t[6]=u,t[7]=c,t[8]=a,t[9]=n,t[10]=m):m=t[10];let h;t[11]===n.category?h=t[12]:(h=l(`size-1.5 rounded-full`,H(n.category)),t[11]=n.category,t[12]=h);let g;t[13]===h?g=t[14]:(g=(0,R.jsx)(`span`,{className:h}),t[13]=h,t[14]=g);let _;t[15]===c?_=t[16]:(_=(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:c})}),t[15]=c,t[16]=_);let v=n.command||n.name,y;t[17]===v?y=t[18]:(y=(0,R.jsx)(P,{side:`top`,className:`max-w-[min(520px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11`,children:v}),t[17]=v,t[18]=y);let b;t[19]!==_||t[20]!==y?(b=(0,R.jsxs)(j,{children:[_,y]}),t[19]=_,t[20]=y,t[21]=b):b=t[21];let x;return t[22]!==b||t[23]!==p||t[24]!==m||t[25]!==g?(x=(0,R.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[1.25rem_0.375rem_minmax(0,1fr)] items-center gap-2`,style:p,children:[m,g,b]}),t[22]=b,t[23]=p,t[24]=m,t[25]=g,t[26]=x):x=t[26],x}function Ue(e){return e.category===`server-child`||e.category===`provider-root`||e.category===`terminal-root`}function We(e){let t=(0,I.c)(19),{process:n,signalingKeys:r,onSignal:i}=e;if(!Ue(n)){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(`span`,{className:`text-ui-10 text-muted-foreground/35`,children:`—`}),t[0]=e):e=t[0],e}let a;t[1]!==n||t[2]!==r?(a=r.has(ke(n)),t[1]=n,t[2]=r,t[3]=a):a=t[3];let o=a,s;t[4]!==i||t[5]!==n?(s=()=>i(n,`SIGINT`),t[4]=i,t[5]=n,t[6]=s):s=t[6];let c;t[7]!==o||t[8]!==s?(c=(0,R.jsx)(`button`,{type:`button`,disabled:o,className:`text-ui-10 font-semibold text-muted-foreground hover:text-foreground disabled:opacity-50`,onClick:s,children:`INT`}),t[7]=o,t[8]=s,t[9]=c):c=t[9];let l;t[10]!==i||t[11]!==n?(l=()=>i(n,`SIGKILL`),t[10]=i,t[11]=n,t[12]=l):l=t[12];let u;t[13]!==o||t[14]!==l?(u=(0,R.jsx)(`button`,{type:`button`,disabled:o,className:`text-ui-10 font-semibold text-destructive hover:underline disabled:opacity-50`,onClick:l,children:`KILL`}),t[13]=o,t[14]=l,t[15]=u):u=t[15];let d;return t[16]!==c||t[17]!==u?(d=(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5`,children:[c,u]}),t[16]=c,t[17]=u,t[18]=d):d=t[18],d}function Ge(e){let t=(0,I.c)(20),{processes:n,signalingKeys:r,onSignal:i}=e,[a,o]=(0,F.useState)(Ke),s;t[0]!==a||t[1]!==n?(s=xe(n,a),t[0]=a,t[1]=n,t[2]=s):s=t[2];let c=s,l;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(l=e=>{let t=ke(e);o(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n})},t[3]=l):l=t[3];let u=l,d;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[20%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[7%]`}),(0,R.jsx)(`col`,{className:`w-[8%]`}),(0,R.jsx)(`col`,{className:`w-[9%]`}),(0,R.jsx)(`col`,{className:`w-[9%]`}),(0,R.jsx)(`col`,{className:`w-[9%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[8%]`}),(0,R.jsx)(`col`,{className:`w-[6%]`}),(0,R.jsx)(`col`,{className:`w-[4%]`})]}),t[4]=d):d=t[4];let f;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,R.jsx)(`thead`,{className:`sticky top-0 z-10 border-b border-border/60 bg-card text-ui-10 uppercase tracking-[0.08em] text-muted-foreground/65`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-semibold sm:pl-5`,children:`Process`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Category`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`CPU`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`CPU Time`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Memory`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Read/s`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Write/s`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Read Total`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Write Total`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`PID`}),(0,R.jsx)(`th`,{className:`px-2 py-2 text-right font-semibold sm:pr-4`,children:`Kill`})]})}),t[5]=f):f=t[5];let p;t[6]===c.length?p=t[7]:(p=c.length===0?(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:11,className:`px-4 py-5 text-xs text-muted-foreground sm:px-5`,children:`Waiting for the native process monitor.`})}):null,t[6]=c.length,t[7]=p);let m;if(t[8]!==a||t[9]!==i||t[10]!==r||t[11]!==c){let e;t[13]!==a||t[14]!==i||t[15]!==r?(e=e=>(0,R.jsxs)(`tr`,{className:`hover:bg-muted/20`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2 sm:pl-5`,children:(0,R.jsx)(He,{process:e,collapsed:a.has(ke(e)),onToggle:u})}),(0,R.jsx)(`td`,{className:`truncate px-3 py-2 text-ui-11 text-muted-foreground`,children:Ae(e.category)}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:[e.cpuPercent.toFixed(1),`%`]}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:Ee(e.cpuTimeMs)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:z(e.residentBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-sky-700 dark:text-sky-300`,children:Te(e.ioReadBytesPerSecond)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-amber-700 dark:text-amber-300`,children:Te(e.ioWriteBytesPerSecond)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground`,children:z(e.ioReadBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground`,children:(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{children:z(e.ioWriteBytes)})}),(0,R.jsx)(P,{side:`top`,children:je(e.ioSemantics)})]})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground`,children:e.identity.pid}),(0,R.jsx)(`td`,{className:`px-2 py-2 text-right sm:pr-4`,children:(0,R.jsx)(We,{process:e,signalingKeys:r,onSignal:i})})]},ke(e)),t[13]=a,t[14]=i,t[15]=r,t[16]=e):e=t[16],m=c.map(e),t[8]=a,t[9]=i,t[10]=r,t[11]=c,t[12]=m}else m=t[12];let h;return t[17]!==p||t[18]!==m?(h=(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`max-h-[min(68vh,48rem)] w-full max-w-full border-t border-border/60`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[1320px] table-fixed text-left text-xs`,children:[d,f,(0,R.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[p,m]})]})}),t[17]=p,t[18]=m,t[19]=h):h=t[19],h}function Ke(){return new Set}function qe(e){let t=(0,I.c)(9),{processes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[24%]`}),(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[7%]`}),(0,R.jsx)(`col`,{className:`w-[5%]`})]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,R.jsx)(`thead`,{className:`sticky top-0 z-10 border-b border-border/60 bg-card text-ui-10 uppercase tracking-[0.08em] text-muted-foreground/65`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-semibold sm:pl-5`,children:`Process`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Category`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`CPU Time`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Peak CPU`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Peak Mem`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Read`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Write`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Samples`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold sm:pr-5`,children:`PID`})]})}),t[1]=i):i=t[1];let a;t[2]===n.length?a=t[3]:(a=n.length===0?(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:9,className:`px-4 py-5 text-xs text-muted-foreground sm:px-5`,children:`No retained process samples in this window.`})}):null,t[2]=n.length,t[3]=a);let o;t[4]===n?o=t[5]:(o=n.map(Je),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`max-h-[28rem] w-full max-w-full border-t border-border/60`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[1020px] table-fixed text-left text-xs`,children:[r,i,(0,R.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[a,o]})]})}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function Je(e){return(0,R.jsxs)(`tr`,{className:`hover:bg-muted/20`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2 sm:pl-5`,children:(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`block truncate font-medium text-foreground`,children:e.name||e.command})}),(0,R.jsx)(P,{side:`top`,className:`max-w-[min(520px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11`,children:e.command||e.name})]})}),(0,R.jsx)(`td`,{className:`truncate px-3 py-2 text-ui-11 text-muted-foreground`,children:Ae(e.category)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:Ee(e.cpuTimeMs)}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:[e.maxCpuPercent.toFixed(1),`%`]}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:z(e.peakRssBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-sky-700 dark:text-sky-300`,children:z(e.ioReadBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-amber-700 dark:text-amber-300`,children:z(e.ioWriteBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground`,children:e.sampleCount}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground sm:pr-5`,children:e.identity.pid})]},B(e))}function Ye(e){let t=(0,I.c)(9),{entries:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[22%]`}),(0,R.jsx)(`col`,{className:`w-[28%]`}),(0,R.jsx)(`col`,{className:`w-[14%]`}),(0,R.jsx)(`col`,{className:`w-[14%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[12%]`})]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,R.jsx)(`thead`,{className:`border-b border-border/60 text-ui-10 uppercase tracking-[0.08em] text-muted-foreground/65`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-semibold sm:pl-5`,children:`Component`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Operation`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Logical Read`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Logical Write`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Count`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold sm:pr-5`,children:`Time`})]})}),t[1]=i):i=t[1];let a;t[2]===n.length?a=t[3]:(a=n.length===0?(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:6,className:`px-4 py-5 text-xs text-muted-foreground sm:px-5`,children:`No instrumented application I/O has been recorded yet.`})}):null,t[2]=n.length,t[3]=a);let o;t[4]===n?o=t[5]:(o=n.map(Xe),t[4]=n,t[5]=o);let s;return t[6]!==a||t[7]!==o?(s=(0,R.jsx)(`div`,{className:`overflow-x-auto border-t border-border/60`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[720px] table-fixed text-left text-xs`,children:[r,i,(0,R.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[a,o]})]})}),t[6]=a,t[7]=o,t[8]=s):s=t[8],s}function Xe(e){return(0,R.jsxs)(`tr`,{className:`hover:bg-muted/20`,children:[(0,R.jsx)(`td`,{className:`truncate px-4 py-2 font-medium text-foreground sm:pl-5`,children:e.component}),(0,R.jsx)(`td`,{className:`truncate px-3 py-2 text-muted-foreground`,children:e.operation}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-sky-700 dark:text-sky-300`,children:z(e.logicalReadBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-amber-700 dark:text-amber-300`,children:z(e.logicalWriteBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums`,children:e.count}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right font-mono tabular-nums text-muted-foreground sm:pr-5`,children:[(e.durationMs/1e3).toFixed(2),`s`]})]},`${e.component}:${e.operation}`)}function Ze(){let e=(0,I.c)(207),[t,n]=(0,F.useState)(9e5),r;e[0]===t?r=e[1]:(r=we.find(e=>e.windowMs===t)??we[1],e[0]=t,e[1]=r);let i=r,a=ve(),s=a.retry,p;e[2]!==i.bucketMs||e[3]!==i.windowMs?(p={windowMs:i.windowMs,bucketMs:i.bucketMs},e[2]=i.bucketMs,e[3]=i.windowMs,e[4]=p):p=e[4];let m=ye(p),g=ne(),v;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(v={reportFailure:!1},e[5]=v):v=e[5];let b=f(S.signalProcess,v),[x,ee]=(0,F.useState)(nt),[C,re]=(0,F.useState)(!1),T=a.data,E=T?.groups.allDasCode,ae;e[6]!==g?.environmentId||e[7]!==b?(ae=(e,t)=>{if(t===`SIGKILL`&&!window.confirm(`Send SIGKILL to process ${e.identity.pid}? This cannot be handled by the process.`))return;let n=ke(e),r=g?.environmentId;r!==void 0&&(ee(e=>new Set(e).add(n)),b({environmentId:r,input:{pid:e.identity.pid,startTimeMs:e.identity.startTimeMs,signal:t}}).then(n=>{if(n._tag===`Failure`){if(d(n))return;throw u(n)}n.value.signaled||se.add({type:`error`,title:`Could not send ${t}`,description:_(n.value.message,()=>`Failed to send ${t} to process ${e.identity.pid}.`)})}).catch(e=>{se.add({type:`error`,title:`Could not send ${t}`,description:e instanceof Error?e.message:`Failed to send ${t}.`})}).finally(()=>{ee(e=>{if(!e.has(n))return e;let t=new Set(e);return t.delete(n),t})}))},e[6]=g?.environmentId,e[7]=b,e[8]=ae):ae=e[8],g?.environmentId;let D=ae,O;e[9]===s?O=e[10]:(O=()=>{re(!0),s().catch(tt).finally(()=>{re(!1)})},e[9]=s,e[10]=O);let ce=O,le,k,ue,M,he,be,xe,L,Ce,B,V,Ae,H,je,U,W,G,Re,K;if(e[11]!==E||e[12]!==T||e[13]!==a.error||e[14]!==a.isPending||e[15]!==a.refresh){he=T?h(T.speedLimitPercent):null;let t=T?.health.native.status??null,n;e[35]!==t||e[36]!==a.error?(n=Se({nativeStatus:t,error:a.error}),e[35]=t,e[36]=a.error,e[37]=n):n=e[37],ue=n,M=T!==null&&(T.power.onBattery!==`unknown`||T.power.lowPowerMode!==`unknown`||T.power.idle!==`unknown`||T.power.locked!==`unknown`||T.power.thermalState!==`unknown`),k=N,Ae=`Resource monitor`,e[38]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,R.jsx)(de,{className:`size-4 text-muted-foreground`}),e[38]=H):H=e[38];let r;e[39]===T?r=e[40]:(r=T?(0,R.jsx)(Ne,{label:`Native`,status:T.health.native.status}):null,e[39]=T,e[40]=r);let i=T?.readAt??null,s;e[41]===i?s=e[42]:(s=(0,R.jsx)(Pe,{sampledAt:i}),e[41]=i,e[42]=s);let u=a.isPending,d=a.refresh,f=a.isPending&&`animate-spin`,p;e[43]===f?p=e[44]:(p=l(`size-3`,f),e[43]=f,e[44]=p);let m;e[45]===p?m=e[46]:(m=(0,R.jsx)(ie,{className:p}),e[45]=p,e[46]=m);let g;e[47]!==m||e[48]!==a.isPending||e[49]!==a.refresh?(g=(0,R.jsx)(A,{render:(0,R.jsx)(o,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0`,disabled:u,onClick:d,"aria-label":`Refresh resource telemetry`,children:m})}),e[47]=m,e[48]=a.isPending,e[49]=a.refresh,e[50]=g):g=e[50];let _;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,R.jsx)(P,{side:`top`,children:`Refresh telemetry snapshot`}),e[51]=_):_=e[51];let v;e[52]===g?v=e[53]:(v=(0,R.jsxs)(j,{children:[g,_]}),e[52]=g,e[53]=v),e[54]!==r||e[55]!==s||e[56]!==v?(je=(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r,s,v]}),e[54]=r,e[55]=s,e[56]=v,e[57]=je):je=e[57],B=`overflow-hidden rounded-2xl border border-border/70 bg-card shadow-[0_1px_1px_rgb(0_0_0/0.03),0_8px_30px_rgb(0_0_0/0.035)]`;let y;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,R.jsxs)(`div`,{children:[(0,R.jsxs)(`div`,{className:`text-ui-10 font-semibold uppercase tracking-[0.14em] text-muted-foreground/70`,children:[c,` system footprint`]}),(0,R.jsx)(`p`,{className:`mt-1 max-w-xl text-xs leading-relaxed text-muted-foreground`,children:`Live native counters for the server, providers, terminals, desktop processes, and the monitor itself.`})]}),e[58]=y):y=e[58];let b;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,R.jsx)(`span`,{className:`size-1.5 rounded-full bg-emerald-500`}),e[59]=b):b=e[59];let x;e[60]===T?x=e[61]:(x=T?Oe(T.sampleIntervalMs):`...`,e[60]=T,e[61]=x),e[62]===x?V=e[63]:(V=(0,R.jsxs)(`div`,{className:`flex flex-col gap-3 border-b border-border/60 bg-linear-to-r from-muted/45 via-muted/20 to-transparent px-4 py-4 sm:flex-row sm:items-center sm:justify-between sm:px-5`,children:[y,(0,R.jsxs)(`div`,{className:`flex items-center gap-2 text-ui-10 text-muted-foreground/65`,children:[b,`Sampling every `,x]})]}),e[62]=x,e[63]=V),Re=`grid grid-cols-2 divide-x divide-y divide-border/55 md:grid-cols-3`;let S;e[64]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,R.jsx)(pe,{className:`size-3.5`}),e[64]=S):S=e[64];let ee;e[65]===E?ee=e[66]:(ee=E?`${E.currentCpuPercent.toFixed(1)}%`:`...`,e[65]=E,e[66]=ee);let C;e[67]===E?C=e[68]:(C=E?`${Ee(E.cpuTimeMs)} observed CPU time`:void 0,e[67]=E,e[68]=C),e[69]!==ee||e[70]!==C?(K=(0,R.jsx)(Fe,{icon:S,label:`Current CPU`,value:ee,detail:C}),e[69]=ee,e[70]=C,e[71]=K):K=e[71];let te;e[72]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,R.jsx)(_e,{className:`size-3.5`}),e[72]=te):te=e[72];let ne;e[73]===E?ne=e[74]:(ne=E?z(E.currentRssBytes):`...`,e[73]=E,e[74]=ne);let re;e[75]===E?re=e[76]:(re=E?`${z(E.peakRssBytes)} combined process peaks`:void 0,e[75]=E,e[76]=re),e[77]!==ne||e[78]!==re?(be=(0,R.jsx)(Fe,{icon:te,label:`Resident memory`,value:ne,detail:re}),e[77]=ne,e[78]=re,e[79]=be):be=e[79];let ae;e[80]===Symbol.for(`react.memo_cache_sentinel`)?(ae=(0,R.jsx)(de,{className:`size-3.5`}),e[80]=ae):ae=e[80];let oe=E?String(E.processCount):`...`,D=E?`${E.processStarts} starts · ${E.processExits} exits`:void 0;e[81]!==oe||e[82]!==D?(xe=(0,R.jsx)(Fe,{icon:ae,label:`Process count`,value:oe,detail:D}),e[81]=oe,e[82]=D,e[83]=xe):xe=e[83];let se;e[84]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,R.jsx)(ge,{className:`size-3.5`}),e[84]=se):se=e[84];let O;e[85]===E?O=e[86]:(O=E?Te(E.ioReadBytesPerSecond):`...`,e[85]=E,e[86]=O);let ce;e[87]===E?ce=e[88]:(ce=E?`${z(E.ioReadBytes)} observed`:void 0,e[87]=E,e[88]=ce),e[89]!==O||e[90]!==ce?(L=(0,R.jsx)(Fe,{icon:se,label:`Read throughput`,value:O,detail:ce}),e[89]=O,e[90]=ce,e[91]=L):L=e[91];let fe;e[92]===Symbol.for(`react.memo_cache_sentinel`)?(fe=(0,R.jsx)(me,{className:`size-3.5`}),e[92]=fe):fe=e[92];let F;e[93]===E?F=e[94]:(F=E?Te(E.ioWriteBytesPerSecond):`...`,e[93]=E,e[94]=F);let I;e[95]===E?I=e[96]:(I=E?`${z(E.ioWriteBytes)} observed`:void 0,e[95]=E,e[96]=I);let ve=E&&E.ioWriteBytesPerSecond>=10485760?`danger`:E&&E.ioWriteBytesPerSecond>=1048576?`warning`:`default`;e[97]!==F||e[98]!==I||e[99]!==ve?(Ce=(0,R.jsx)(Fe,{icon:fe,label:`Write throughput`,value:F,detail:I,tone:ve}),e[97]=F,e[98]=I,e[99]=ve,e[100]=Ce):Ce=e[100],le=Fe,e[101]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,R.jsx)(w,{className:`size-3.5`}),e[101]=U):U=e[101],W=`CPU speed limit`,G=T?he===null?`Unknown`:`${he.toFixed(0)}%`:`...`,e[11]=E,e[12]=T,e[13]=a.error,e[14]=a.isPending,e[15]=a.refresh,e[16]=le,e[17]=k,e[18]=ue,e[19]=M,e[20]=he,e[21]=be,e[22]=xe,e[23]=L,e[24]=Ce,e[25]=B,e[26]=V,e[27]=Ae,e[28]=H,e[29]=je,e[30]=U,e[31]=W,e[32]=G,e[33]=Re,e[34]=K}else le=e[16],k=e[17],ue=e[18],M=e[19],he=e[20],be=e[21],xe=e[22],L=e[23],Ce=e[24],B=e[25],V=e[26],Ae=e[27],H=e[28],je=e[29],U=e[30],W=e[31],G=e[32],Re=e[33],K=e[34];let Ve=T?`${T.power.thermalState} thermal state`:void 0,He=he!==null&&he<80?`warning`:`default`,Ue;e[102]!==le||e[103]!==Ve||e[104]!==He||e[105]!==U||e[106]!==W||e[107]!==G?(Ue=(0,R.jsx)(le,{icon:U,label:W,value:G,detail:Ve,tone:He}),e[102]=le,e[103]=Ve,e[104]=He,e[105]=U,e[106]=W,e[107]=G,e[108]=Ue):Ue=e[108];let We;e[109]!==be||e[110]!==xe||e[111]!==L||e[112]!==Ce||e[113]!==Ue||e[114]!==Re||e[115]!==K?(We=(0,R.jsxs)(`div`,{className:Re,children:[K,be,xe,L,Ce,Ue]}),e[109]=be,e[110]=xe,e[111]=L,e[112]=Ce,e[113]=Ue,e[114]=Re,e[115]=K,e[116]=We):We=e[116];let Ke;e[117]===a.error?Ke=e[118]:(Ke=a.error?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 border-t border-destructive/20 bg-destructive/5 px-4 py-3 text-xs text-destructive sm:px-5`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:a.error})]}):null,e[117]=a.error,e[118]=Ke);let Je;e[119]===T?Je=e[120]:(Je=T?(0,R.jsxs)(`div`,{className:`grid border-t border-border/60 bg-muted/10 md:grid-cols-3`,children:[(0,R.jsx)(Ie,{label:`Backend + agents`,accentClass:`bg-emerald-500/80`,aggregate:T.groups.backend}),(0,R.jsx)(Ie,{label:`Desktop`,accentClass:`bg-sky-500/80`,aggregate:T.groups.electron}),(0,R.jsx)(Ie,{label:`Monitor overhead`,accentClass:`bg-amber-500/80`,aggregate:T.groups.monitor})]}):null,e[119]=T,e[120]=Je);let Xe;e[121]!==B||e[122]!==V||e[123]!==We||e[124]!==Ke||e[125]!==Je?(Xe=(0,R.jsxs)(`div`,{className:B,children:[V,We,Ke,Je]}),e[121]=B,e[122]=V,e[123]=We,e[124]=Ke,e[125]=Je,e[126]=Xe):Xe=e[126];let Ze;e[127]!==k||e[128]!==Ae||e[129]!==H||e[130]!==je||e[131]!==Xe?(Ze=(0,R.jsx)(k,{title:Ae,icon:H,headerAction:je,children:Xe}),e[127]=k,e[128]=Ae,e[129]=H,e[130]=je,e[131]=Xe,e[132]=Ze):Ze=e[132];let rt;e[133]===Symbol.for(`react.memo_cache_sentinel`)?(rt=(0,R.jsx)(w,{className:`size-4 text-muted-foreground`}),e[133]=rt):rt=e[133];let J;e[134]!==ue||e[135]!==C||e[136]!==ce?(J=ue?(0,R.jsxs)(o,{size:`xs`,variant:`outline`,disabled:C,onClick:ce,children:[(0,R.jsx)(te,{className:l(`size-3`,C&&`animate-spin`)}),`Retry monitor`]}):null,e[134]=ue,e[135]=C,e[136]=ce,e[137]=J):J=e[137];let it;e[138]===Symbol.for(`react.memo_cache_sentinel`)?(it=(0,R.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-ui-10 font-semibold uppercase tracking-[0.12em] text-muted-foreground/70`,children:[(0,R.jsx)(`span`,{className:`flex size-6 items-center justify-center rounded-md bg-muted/60`,children:(0,R.jsx)(fe,{className:`size-3.5`})}),`Host state`]}),e[138]=it):it=e[138];let at;e[139]!==M||e[140]!==T?(at=(0,R.jsxs)(`div`,{className:`px-4 py-4 sm:px-5`,children:[it,M&&T?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{label:`Power source`,value:Me(T.power.onBattery,{true:`Battery`,false:`External power`})}),(0,R.jsx)(q,{label:`Low power mode`,value:Me(T.power.lowPowerMode,{true:`Enabled`,false:`Disabled`})}),(0,R.jsx)(q,{label:`Idle`,value:`${Me(T.power.idle,{true:`Idle`,false:`Active`})}${T.power.idleSeconds===null?``:` · ${Math.round(T.power.idleSeconds)}s`}`}),(0,R.jsx)(q,{label:`Session`,value:T.power.suspended?`Suspended`:Me(T.power.locked,{true:`Locked`,false:`Unlocked`})}),(0,R.jsx)(q,{label:`Thermal`,value:T.power.thermalState,valueClassName:T.power.thermalState===`serious`||T.power.thermalState===`critical`?`text-destructive`:void 0})]}):(0,R.jsxs)(`div`,{className:`rounded-xl border border-dashed border-border/70 bg-muted/20 px-4 py-5`,children:[(0,R.jsx)(`div`,{className:`text-ui-13 font-medium text-foreground`,children:`Desktop host signals not connected`}),(0,R.jsx)(`p`,{className:`mt-1.5 max-w-sm text-ui-11 leading-relaxed text-muted-foreground/70`,children:`Power, idle, lock, and thermal state are supplied by the desktop host. Process telemetry remains fully active in this browser session.`})]})]}),e[139]=M,e[140]=T,e[141]=at):at=e[141];let ot;e[142]===Symbol.for(`react.memo_cache_sentinel`)?(ot=(0,R.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-ui-10 font-semibold uppercase tracking-[0.12em] text-muted-foreground/70`,children:[(0,R.jsx)(`span`,{className:`flex size-6 items-center justify-center rounded-md bg-muted/60`,children:(0,R.jsx)(w,{className:`size-3.5`})}),`Collection health`]}),e[142]=ot):ot=e[142];let Y;e[143]===T?Y=e[144]:(Y=(0,R.jsxs)(`div`,{className:`border-t border-border/60 px-4 py-4 md:border-t-0 sm:px-5`,children:[ot,T?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Le,{label:`Native process monitor`,health:T.health.native}),(0,R.jsx)(Le,{label:`Electron main process`,health:T.health.desktop}),(0,R.jsx)(q,{label:`Collection time`,value:De(T.health.collectionDurationMicros)}),(0,R.jsx)(q,{label:`Process scan`,value:`${T.health.retainedProcessCount}/${T.health.scannedProcessCount} retained`}),(0,R.jsx)(q,{label:`Inaccessible`,value:String(T.health.inaccessibleProcessCount),valueClassName:T.health.inaccessibleProcessCount>0?`text-amber-600 dark:text-amber-300`:void 0}),(0,R.jsx)(q,{label:`Sidecar`,value:y(T.health.sidecarVersion,{onNone:et,onSome:e=>`${e}${y(T.health.sidecarPid,{onNone:$e,onSome:Qe})}`})}),(0,R.jsx)(q,{label:`Restarts`,value:String(T.health.restartCount)})]}):(0,R.jsx)(`div`,{className:`py-4 text-xs text-muted-foreground`,children:`Waiting for collector health.`})]}),e[143]=T,e[144]=Y);let st;e[145]!==at||e[146]!==Y?(st=(0,R.jsxs)(`div`,{className:`grid overflow-hidden rounded-2xl border border-border/70 bg-card shadow-[0_1px_1px_rgb(0_0_0/0.03)] md:grid-cols-2 md:divide-x md:divide-border/60`,children:[at,Y]}),e[145]=at,e[146]=Y,e[147]=st):st=e[147];let ct;e[148]!==J||e[149]!==st?(ct=(0,R.jsx)(N,{title:`Host & collection`,icon:rt,headerAction:J,children:st}),e[148]=J,e[149]=st,e[150]=ct):ct=e[150];let X;e[151]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,R.jsx)(ge,{className:`size-4 text-muted-foreground`}),e[151]=X):X=e[151];let lt;e[152]===t?lt=e[153]:(lt=(0,R.jsx)(ze,{selectedWindowMs:t,onSelect:n}),e[152]=t,e[153]=lt);let ut=m.isPending,dt=m.refresh,ft=m.isPending&&`animate-spin`,pt;e[154]===ft?pt=e[155]:(pt=l(`size-3`,ft),e[154]=ft,e[155]=pt);let mt;e[156]===pt?mt=e[157]:(mt=(0,R.jsx)(ie,{className:pt}),e[156]=pt,e[157]=mt);let Z;e[158]!==m.isPending||e[159]!==m.refresh||e[160]!==mt?(Z=(0,R.jsx)(o,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0`,disabled:ut,onClick:dt,"aria-label":`Refresh resource history`,children:mt}),e[158]=m.isPending,e[159]=m.refresh,e[160]=mt,e[161]=Z):Z=e[161];let ht;e[162]!==lt||e[163]!==Z?(ht=(0,R.jsxs)(`div`,{className:`flex items-center gap-2`,children:[lt,Z]}),e[162]=lt,e[163]=Z,e[164]=ht):ht=e[164];let gt;e[165]===m.error?gt=e[166]:(gt=m.error?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-destructive/20 bg-destructive/5 px-4 py-3 text-xs text-destructive sm:px-5`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:m.error})]}):null,e[165]=m.error,e[166]=gt);let Q;e[167]===m.data?.buckets?Q=e[168]:(Q=m.data?.buckets??[],e[167]=m.data?.buckets,e[168]=Q);let _t;e[169]===Q?_t=e[170]:(_t=(0,R.jsx)(Be,{buckets:Q}),e[169]=Q,e[170]=_t);let vt;e[171]===m.data?.topProcesses?vt=e[172]:(vt=m.data?.topProcesses??[],e[171]=m.data?.topProcesses,e[172]=vt);let yt;e[173]===vt?yt=e[174]:(yt=(0,R.jsx)(qe,{processes:vt}),e[173]=vt,e[174]=yt);let bt;e[175]!==gt||e[176]!==_t||e[177]!==yt?(bt=(0,R.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border/70 bg-card shadow-[0_1px_1px_rgb(0_0_0/0.03)]`,children:[gt,_t,yt]}),e[175]=gt,e[176]=_t,e[177]=yt,e[178]=bt):bt=e[178];let xt;e[179]!==ht||e[180]!==bt?(xt=(0,R.jsx)(N,{title:`Resource timeline`,icon:X,headerAction:ht,children:bt}),e[179]=ht,e[180]=bt,e[181]=xt):xt=e[181];let St;e[182]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,R.jsx)(pe,{className:`size-4 text-muted-foreground`}),e[182]=St):St=e[182];let Ct;e[183]===T?Ct=e[184]:(Ct=T?(0,R.jsxs)(`span`,{className:`text-ui-10 text-muted-foreground/55`,children:[`Identity: `,(0,R.jsx)(`span`,{className:`font-mono`,children:`PID + start time`})]}):null,e[183]=T,e[184]=Ct);let wt;e[185]===T?.processes?wt=e[186]:(wt=T?.processes??[],e[185]=T?.processes,e[186]=wt);let Tt;e[187]!==D||e[188]!==x||e[189]!==wt?(Tt=(0,R.jsx)(`div`,{className:`overflow-hidden rounded-2xl border border-border/70 bg-card shadow-[0_1px_1px_rgb(0_0_0/0.03)]`,children:(0,R.jsx)(Ge,{processes:wt,signalingKeys:x,onSignal:D})}),e[187]=D,e[188]=x,e[189]=wt,e[190]=Tt):Tt=e[190];let Et;e[191]!==Ct||e[192]!==Tt?(Et=(0,R.jsx)(N,{title:`Live process tree`,icon:St,headerAction:Ct,children:Tt}),e[191]=Ct,e[192]=Tt,e[193]=Et):Et=e[193];let Dt,Ot;e[194]===Symbol.for(`react.memo_cache_sentinel`)?(Dt=(0,R.jsx)(me,{className:`size-4 text-muted-foreground`}),Ot=(0,R.jsx)(`span`,{className:`text-ui-10 text-muted-foreground/55`,children:`Logical bytes by operation`}),e[194]=Dt,e[195]=Ot):(Dt=e[194],Ot=e[195]);let kt;e[196]===Symbol.for(`react.memo_cache_sentinel`)?(kt=(0,R.jsxs)(`div`,{className:`bg-muted/15 px-4 py-3 text-ui-11 leading-relaxed text-muted-foreground sm:px-5`,children:[`Native counters identify which process is reading or writing. These application-level counters identify known `,c,` operations so process spikes can be correlated with specific persistence and logging paths.`]}),e[196]=kt):kt=e[196];let $;e[197]===T?.attribution.entries?$=e[198]:($=T?.attribution.entries??[],e[197]=T?.attribution.entries,e[198]=$);let At;e[199]===$?At=e[200]:(At=(0,R.jsx)(N,{title:`Instrumented application I/O`,icon:Dt,headerAction:Ot,children:(0,R.jsxs)(`div`,{className:`overflow-hidden rounded-2xl border border-border/70 bg-card shadow-[0_1px_1px_rgb(0_0_0/0.03)]`,children:[kt,(0,R.jsx)(Ye,{entries:$})]})}),e[199]=$,e[200]=At);let jt;return e[201]!==Ze||e[202]!==ct||e[203]!==xt||e[204]!==Et||e[205]!==At?(jt=(0,R.jsxs)(R.Fragment,{children:[Ze,ct,xt,Et,At]}),e[201]=Ze,e[202]=ct,e[203]=xt,e[204]=Et,e[205]=At,e[206]=jt):jt=e[206],jt}function Qe(e){return` · PID ${e}`}function $e(){return``}function et(){return`Unavailable`}function tt(e){se.add({type:`error`,title:`Could not restart resource monitor`,description:e instanceof Error?e.message:`The resource monitor retry failed.`})}function nt(){return new Set}var rt=new Intl.NumberFormat;function J(e){return rt.format(e)}function it(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e>=1e4?1:2)} s`}function at(e){if(e<1024)return`${e} B`;let t=[`KB`,`MB`,`GB`],n=-1,r=e;do r/=1024,n+=1;while(r>=1024&&n<t.length-1);return`${r.toFixed(r>=10?1:2)} ${t[n]}`}function ot(e){return e?D(g(e)):`No trace records`}function Y(e){return ot(e).replaceAll(` `,`\xA0`)}function st(e){return e.length<=32?e:`${e.slice(0,18)}...${e.slice(-10)}`}function ct(e){return e?.includes(`not a live descendant`)??!1}function X(e){let t=(0,I.c)(17),{label:n,value:r,tooltip:i,tone:a}=e,o=a===void 0?`default`:a,s;t[0]===n?s=t[1]:(s=(0,R.jsx)(`span`,{className:`min-w-0 truncate`,children:n}),t[0]=n,t[1]=s);let c;t[2]!==n||t[3]!==i?(c=i?(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`button`,{type:`button`,className:`inline-flex size-3.5 shrink-0 items-center justify-center rounded-sm text-muted-foreground/60 hover:text-foreground`,"aria-label":`${n} details`,children:(0,R.jsx)(M,{className:`size-3`})})}),(0,R.jsx)(P,{side:`top`,className:`max-w-[min(300px,calc(100vw-2rem))] whitespace-normal text-left text-ui-11 leading-relaxed text-wrap`,children:i})]}):null,t[2]=n,t[3]=i,t[4]=c):c=t[4];let u;t[5]!==s||t[6]!==c?(u=(0,R.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5 text-ui-11 font-medium uppercase tracking-[0.08em] text-muted-foreground/70`,children:[s,c]}),t[5]=s,t[6]=c,t[7]=u):u=t[7];let d=o===`warning`&&`text-amber-600 dark:text-amber-400`,f=o===`danger`&&`text-destructive`,p;t[8]!==d||t[9]!==f?(p=l(`mt-1 truncate font-mono text-lg font-semibold tabular-nums text-foreground`,d,f),t[8]=d,t[9]=f,t[10]=p):p=t[10];let m;t[11]!==p||t[12]!==r?(m=(0,R.jsx)(`div`,{className:p,children:r}),t[11]=p,t[12]=r,t[13]=m):m=t[13];let h;return t[14]!==u||t[15]!==m?(h=(0,R.jsxs)(`div`,{className:`min-w-0 border-border/60 px-4 py-3 sm:px-5`,children:[u,m]}),t[14]=u,t[15]=m,t[16]=h):h=t[16],h}function lt(e){let t=(0,I.c)(6),{children:n}=e,r,i,a,o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 left-1/2 w-px bg-border/60`,"aria-hidden":!0}),i=(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-x-0 top-1/2 h-px bg-border/60 sm:hidden`,"aria-hidden":!0}),a=(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 left-1/4 hidden w-px bg-border/60 sm:block`,"aria-hidden":!0}),o=(0,R.jsx)(`span`,{className:`pointer-events-none absolute inset-y-0 left-3/4 hidden w-px bg-border/60 sm:block`,"aria-hidden":!0}),t[0]=r,t[1]=i,t[2]=a,t[3]=o):(r=t[0],i=t[1],a=t[2],o=t[3]);let s;return t[4]===n?s=t[5]:(s=(0,R.jsxs)(`div`,{className:`relative grid grid-cols-2 sm:grid-cols-4`,children:[r,i,a,o,n]}),t[4]=n,t[5]=s),s}function ut(e){let t=(0,I.c)(2),{label:n}=e,r;return t[0]===n?r=t[1]:(r=(0,R.jsx)(`div`,{className:`px-4 py-4 text-xs text-muted-foreground sm:px-5`,children:n}),t[0]=n,t[1]=r),r}function dt(e){let t=(0,I.c)(17),{text:n,className:r,collapsedClassName:i,expandLabel:a}=e,o=i===void 0?`line-clamp-3`:i,s=a===void 0?`Show full error`:a,[c,u]=(0,F.useState)(!1),d;t[0]===n?d=t[1]:(d=n.length>180||n.includes(`
|
|
2
|
+
`),t[0]=n,t[1]=d);let f=d,p;t[2]===r?p=t[3]:(p=l(`min-w-0`,r),t[2]=r,t[3]=p);let m=!c&&f?o:null,h;t[4]===m?h=t[5]:(h=l(`whitespace-pre-wrap break-words`,m),t[4]=m,t[5]=h);let g;t[6]!==h||t[7]!==n?(g=(0,R.jsx)(`div`,{className:h,children:n}),t[6]=h,t[7]=n,t[8]=g):g=t[8];let _;t[9]!==f||t[10]!==s||t[11]!==c?(_=f?(0,R.jsx)(`button`,{type:`button`,className:`mt-1 text-ui-11 font-medium text-foreground/70 underline-offset-2 hover:text-foreground hover:underline`,onClick:()=>u(ft),children:c?`Show less`:s}):null,t[9]=f,t[10]=s,t[11]=c,t[12]=_):_=t[12];let v;return t[13]!==p||t[14]!==g||t[15]!==_?(v=(0,R.jsxs)(`div`,{className:p,children:[g,_]}),t[13]=p,t[14]=g,t[15]=_,t[16]=v):v=t[16],v}function ft(e){return!e}function pt(e){let t=(0,I.c)(21),{headers:n,children:r,minTableWidth:i,columnWidths:a}=e,o=i===void 0?`min-w-[640px]`:i,s=a&&`table-fixed`,c;t[0]!==o||t[1]!==s?(c=l(`w-full text-left text-xs`,o,s),t[0]=o,t[1]=s,t[2]=c):c=t[2];let u;t[3]!==a||t[4]!==n?(u=a?(0,R.jsx)(`colgroup`,{children:n.map((e,t)=>(0,R.jsx)(`col`,{className:a[t]},e))}):null,t[3]=a,t[4]=n,t[5]=u):u=t[5];let d;if(t[6]!==a||t[7]!==n){let e;t[9]!==a||t[10]!==n.length?(e=(e,t)=>(0,R.jsx)(`th`,{className:l(`whitespace-nowrap px-4 py-2.5 font-semibold first:sm:pl-5 last:sm:pr-5`,!a&&t===n.length-1&&`w-px`),children:e.replaceAll(` `,`\xA0`)},e),t[9]=a,t[10]=n.length,t[11]=e):e=t[11],d=n.map(e),t[6]=a,t[7]=n,t[8]=d}else d=t[8];let f;t[12]===d?f=t[13]:(f=(0,R.jsx)(`thead`,{className:`border-b border-border/60 text-ui-11 uppercase tracking-[0.08em] text-muted-foreground/70`,children:(0,R.jsx)(`tr`,{children:d})}),t[12]=d,t[13]=f);let p;t[14]===r?p=t[15]:(p=(0,R.jsx)(`tbody`,{className:`divide-y divide-border/60`,children:r}),t[14]=r,t[15]=p);let m;return t[16]!==c||t[17]!==u||t[18]!==f||t[19]!==p?(m=(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`w-full max-w-full rounded-none`,children:(0,R.jsxs)(`table`,{className:c,children:[u,f,p]})}),t[16]=c,t[17]=u,t[18]=f,t[19]=p,t[20]=m):m=t[20],m}function mt(e){let t=(0,I.c)(25),{traceId:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={target:`trace ID`,timeout:1200},t[0]=r):r=t[0];let{copyToClipboard:i,isCopied:a}=O(r),o;t[1]===n?o=t[2]:(o=st(n),t[1]=n,t[2]=o);let s;t[3]===o?s=t[4]:(s=(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono text-ui-11`,children:o})}),t[3]=o,t[4]=s);let c;t[5]===n?c=t[6]:(c=(0,R.jsx)(P,{side:`top`,className:`max-w-[min(520px,calc(100vw-2rem))] break-all font-mono text-ui-11`,children:n}),t[5]=n,t[6]=c);let l;t[7]!==s||t[8]!==c?(l=(0,R.jsxs)(j,{children:[s,c]}),t[7]=s,t[8]=c,t[9]=l):l=t[9];let u=a?`Copied trace ID`:`Copy trace ID`,d;t[10]!==i||t[11]!==n?(d=()=>i(n),t[10]=i,t[11]=n,t[12]=d):d=t[12];let f;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,R.jsx)(k,{className:`size-3`}),t[13]=f):f=t[13];let p;t[14]!==u||t[15]!==d?(p=(0,R.jsx)(A,{render:(0,R.jsx)(`button`,{type:`button`,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-foreground`,"aria-label":u,onClick:d,children:f})}),t[14]=u,t[15]=d,t[16]=p):p=t[16];let m=a?`Copied`:`Copy full trace ID`,h;t[17]===m?h=t[18]:(h=(0,R.jsx)(P,{side:`top`,children:m}),t[17]=m,t[18]=h);let g;t[19]!==h||t[20]!==p?(g=(0,R.jsxs)(j,{children:[p,h]}),t[19]=h,t[20]=p,t[21]=g):g=t[21];let _;return t[22]!==g||t[23]!==l?(_=(0,R.jsxs)(`div`,{className:`flex w-full min-w-0 max-w-full items-center gap-2`,children:[l,g]}),t[22]=g,t[23]=l,t[24]=_):_=t[24],_}function Z(e){let t=e.trim().split(/\s+/)[0];if(!t)return e;let n=t.replace(/^['"]|['"]$/g,``);return n.split(/[\\/]/).filter(Boolean).at(-1)??n}function ht(e){return e.depth>0?`Subprocess`:/\b(codex|claude|opencode|cursor)\b/i.test(e.command)?`Agent`:`Process`}function gt(e){let t=(0,I.c)(23),{process:n,isExpanded:r,onToggle:a}=e,o;t[0]===n.command?o=t[1]:(o=Z(n.command),t[0]=n.command,t[1]=o);let c=o,l=n.childPids.length>0,u=r?s:i,d=`${Math.min(n.depth,6)*10}px`,f;t[2]===d?f=t[3]:(f={paddingLeft:d},t[2]=d,t[3]=f);let p;t[4]!==u||t[5]!==l||t[6]!==r||t[7]!==c||t[8]!==a||t[9]!==n.pid?(p=l?(0,R.jsx)(`button`,{type:`button`,className:`inline-flex size-5 items-center justify-center rounded-sm text-muted-foreground hover:bg-accent hover:text-foreground`,"aria-label":r?`Collapse ${c}`:`Expand ${c}`,onClick:()=>a(n.pid),children:(0,R.jsx)(u,{className:`size-3.5`})}):(0,R.jsx)(`span`,{className:`size-5 shrink-0`,"aria-hidden":`true`}),t[4]=u,t[5]=l,t[6]=r,t[7]=c,t[8]=a,t[9]=n.pid,t[10]=p):p=t[10];let m;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,R.jsx)(`span`,{className:`size-1.5 shrink-0 rounded-full bg-emerald-500/80`}),t[11]=m):m=t[11];let h;t[12]===c?h=t[13]:(h=(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:c})}),t[12]=c,t[13]=h);let g;t[14]===n.command?g=t[15]:(g=(0,R.jsx)(P,{side:`top`,className:`max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11 leading-relaxed text-wrap`,children:n.command}),t[14]=n.command,t[15]=g);let _;t[16]!==h||t[17]!==g?(_=(0,R.jsxs)(j,{children:[h,g]}),t[16]=h,t[17]=g,t[18]=_):_=t[18];let v;return t[19]!==f||t[20]!==p||t[21]!==_?(v=(0,R.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[1.25rem_0.375rem_minmax(0,1fr)] items-center gap-2`,style:f,children:[p,m,_]}),t[19]=f,t[20]=p,t[21]=_,t[22]=v):v=t[22],v}function Q(e){let t=(0,I.c)(21),{process:n,isSignaling:r,onSignal:i}=e,a;t[0]!==i||t[1]!==n.pid?(a=()=>i(n.pid,`SIGINT`),t[0]=i,t[1]=n.pid,t[2]=a):a=t[2];let o;t[3]!==r||t[4]!==a?(o=(0,R.jsx)(A,{render:(0,R.jsx)(`button`,{type:`button`,disabled:r,className:`text-ui-11 font-medium text-muted-foreground underline-offset-2 hover:text-foreground hover:underline disabled:pointer-events-none disabled:opacity-50`,onClick:a,children:`INT`})}),t[3]=r,t[4]=a,t[5]=o):o=t[5];let s;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,R.jsx)(P,{side:`top`,children:`Send SIGINT`}),t[6]=s):s=t[6];let c;t[7]===o?c=t[8]:(c=(0,R.jsxs)(j,{children:[o,s]}),t[7]=o,t[8]=c);let l;t[9]!==i||t[10]!==n.pid?(l=()=>i(n.pid,`SIGKILL`),t[9]=i,t[10]=n.pid,t[11]=l):l=t[11];let u;t[12]!==r||t[13]!==l?(u=(0,R.jsx)(A,{render:(0,R.jsx)(`button`,{type:`button`,disabled:r,className:`text-ui-11 font-medium text-destructive underline-offset-2 hover:underline disabled:pointer-events-none disabled:opacity-50`,onClick:l,children:`KILL`})}),t[12]=r,t[13]=l,t[14]=u):u=t[14];let d;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,R.jsx)(P,{side:`top`,children:`Send SIGKILL`}),t[15]=d):d=t[15];let f;t[16]===u?f=t[17]:(f=(0,R.jsxs)(j,{children:[u,d]}),t[16]=u,t[17]=f);let p;return t[18]!==c||t[19]!==f?(p=(0,R.jsxs)(`div`,{className:`flex items-center justify-end gap-1.5`,children:[c,f]}),t[18]=c,t[19]=f,t[20]=p):p=t[20],p}function _t(e){let t=(0,I.c)(17),{processes:n,signalingPid:r,onSignal:i,emptyLabel:a}=e,[o,s]=(0,F.useState)(vt),c;if(t[0]!==o||t[1]!==n){c=[];let e=null;for(let t of n){if(e!==null){if(t.depth>e)continue;e=null}c.push(t),o.has(t.pid)&&(e=t.depth)}t[0]=o,t[1]=n,t[2]=c}else c=t[2];let l=c,u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=e=>{s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[3]=u):u=t[3];let d=u,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[24%]`}),(0,R.jsx)(`col`,{className:`w-[8%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[33%]`}),(0,R.jsx)(`col`,{className:`w-[8%]`}),(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[6%]`})]}),t[4]=f):f=t[4];let p;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,R.jsx)(`thead`,{className:`sticky top-0 z-10 border-b border-border/60 bg-card text-ui-11 uppercase tracking-[0.08em] text-muted-foreground/70`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-semibold sm:pl-5`,children:`Name`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`CPU`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Memory`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Command`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`PID`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Type`}),(0,R.jsx)(`th`,{className:`p-2 text-right font-semibold sm:pr-4`,children:`Kill`})]})}),t[5]=p):p=t[5];let m;t[6]!==a||t[7]!==l.length?(m=l.length===0?(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:7,className:`px-4 py-4 text-xs text-muted-foreground sm:px-5`,children:a??`No live descendant processes found.`})}):null,t[6]=a,t[7]=l.length,t[8]=m):m=t[8];let h;t[9]!==o||t[10]!==i||t[11]!==r||t[12]!==l?(h=l.map(e=>(0,R.jsxs)(`tr`,{className:`hover:bg-muted/20`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2 align-middle sm:pl-5`,children:(0,R.jsx)(gt,{process:e,isExpanded:!o.has(e.pid),onToggle:d})}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:[e.cpuPercent.toFixed(1),`%`]}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:at(e.rssBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 align-middle text-muted-foreground`,children:(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`block truncate`,children:e.command})}),(0,R.jsx)(P,{side:`top`,className:`max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11 leading-relaxed text-wrap`,children:e.command})]})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums text-muted-foreground`,children:e.pid}),(0,R.jsx)(`td`,{className:`truncate px-3 py-2 align-middle text-muted-foreground`,children:ht(e)}),(0,R.jsx)(`td`,{className:`p-2 align-middle sm:pr-4`,children:(0,R.jsx)(Q,{process:e,isSignaling:r===e.pid,onSignal:i})})]},e.pid)),t[9]=o,t[10]=i,t[11]=r,t[12]=l,t[13]=h):h=t[13];let g;return t[14]!==m||t[15]!==h?(g=(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`max-h-[min(64vh,44rem)] w-full max-w-full rounded-none border-t border-border/60`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[1040px] table-fixed text-left text-xs`,children:[f,p,(0,R.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[m,h]})]})}),t[14]=m,t[15]=h,t[16]=g):g=t[16],g}function vt(){return new Set}var yt=[{label:`5m`,windowMs:5*6e4,bucketMs:3e4},{label:`15m`,windowMs:15*6e4,bucketMs:6e4},{label:`30m`,windowMs:30*6e4,bucketMs:2*6e4},{label:`1h`,windowMs:60*6e4,bucketMs:5*6e4}];function bt(e){if(e<60)return`${e.toFixed(e>=10?1:2)}s`;let t=e/60;return t<60?`${t.toFixed(t>=10?1:2)}m`:`${(t/60).toFixed(2)}h`}function xt(e){let t=Z(e);return t.length>42?`${t.slice(0,39)}...`:t}function St(e){let t=(0,I.c)(21),{process:n,visualDepth:r}=e,i;t[0]===n.command?i=t[1]:(i=xt(n.command),t[0]=n.command,t[1]=i);let a=i,o=`${Math.min(r,6)*10}px`,s;t[2]===o?s=t[3]:(s={paddingLeft:o},t[2]=o,t[3]=s);let c=`${n.isServerRoot?`Root`:`Child`} process ${a}`,u;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,R.jsx)(`span`,{className:`size-5 shrink-0`,"aria-hidden":`true`}),t[4]=u):u=t[4];let d=n.isServerRoot?`bg-amber-500/90`:`bg-emerald-500/80`,f;t[5]===d?f=t[6]:(f=l(`size-1.5 shrink-0 rounded-full`,d),t[5]=d,t[6]=f);let p;t[7]===f?p=t[8]:(p=(0,R.jsx)(`span`,{className:f}),t[7]=f,t[8]=p);let m;t[9]===a?m=t[10]:(m=(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`min-w-0 truncate font-medium text-foreground`,children:a})}),t[9]=a,t[10]=m);let h;t[11]===n.command?h=t[12]:(h=(0,R.jsx)(P,{side:`top`,className:`max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11 leading-relaxed text-wrap`,children:n.command}),t[11]=n.command,t[12]=h);let g;t[13]!==h||t[14]!==m?(g=(0,R.jsxs)(j,{children:[m,h]}),t[13]=h,t[14]=m,t[15]=g):g=t[15];let _;return t[16]!==g||t[17]!==s||t[18]!==c||t[19]!==p?(_=(0,R.jsxs)(`div`,{className:`grid min-w-0 grid-cols-[1.25rem_0.375rem_minmax(0,1fr)] items-center gap-2`,style:s,"aria-label":c,children:[u,p,g]}),t[16]=g,t[17]=s,t[18]=c,t[19]=p,t[20]=_):_=t[20],_}function Ct(e){let t=(0,I.c)(9),{buckets:n}=e,r;t[0]===n?r=t[1]:(r=Math.max(1,...n.map(wt)),t[0]=n,t[1]=r);let i=r,a;if(t[2]!==n||t[3]!==i){let e;t[5]===i?e=t[6]:(e=e=>{let t=Math.max(2,e.maxCpuPercent/i*100),n=Math.max(2,e.avgCpuPercent/i*100);return(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`div`,{className:`flex h-full min-w-1 flex-1 items-end`,children:(0,R.jsxs)(`div`,{className:`relative h-full w-full`,"aria-label":`Average CPU ${e.avgCpuPercent.toFixed(1)}%, peak CPU ${e.maxCpuPercent.toFixed(1)}%`,children:[(0,R.jsx)(`div`,{className:`absolute inset-x-0 bottom-0 rounded-t-sm bg-foreground/15 transition-colors`,style:{height:`${t}%`}}),(0,R.jsx)(`div`,{className:`absolute inset-x-0 bottom-0 rounded-t-sm bg-foreground/60 transition-colors`,style:{height:`${n}%`}})]})})}),(0,R.jsxs)(P,{side:`top`,children:[`Avg `,e.avgCpuPercent.toFixed(1),`%, peak `,e.maxCpuPercent.toFixed(1),`%`]})]},g(e.startedAt))},t[5]=i,t[6]=e),a=n.map(e),t[2]=n,t[3]=i,t[4]=a}else a=t[4];let o;return t[7]===a?o=t[8]:(o=(0,R.jsx)(`div`,{className:`border-t border-border/60 px-4 py-3 sm:px-5`,children:(0,R.jsx)(`div`,{className:`flex h-28 items-end gap-1 overflow-hidden rounded-sm bg-muted/10 p-2`,children:a})}),t[7]=a,t[8]=o),o}function wt(e){return e.maxCpuPercent}function Tt(e){let t=(0,I.c)(5),{selectedWindowMs:n,onSelect:r}=e,i;t[0]!==r||t[1]!==n?(i=yt.map(e=>(0,R.jsx)(`button`,{type:`button`,className:l(`h-6 rounded-sm px-2 text-ui-11 font-medium text-muted-foreground hover:text-foreground`,n===e.windowMs&&`bg-muted text-foreground`),onClick:()=>r(e.windowMs),children:e.label},e.windowMs)),t[0]=r,t[1]=n,t[2]=i):i=t[2];let a;return t[3]===i?a=t[4]:(a=(0,R.jsx)(`div`,{className:`flex items-center rounded-md border border-border/60 p-0.5`,children:i}),t[3]=i,t[4]=a),a}function Et(e){let t=(0,I.c)(13),{processes:n,emptyLabel:r}=e,i=n.reduce(Dt,null),a;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[24%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`}),(0,R.jsx)(`col`,{className:`w-[16%]`}),(0,R.jsx)(`col`,{className:`w-[10%]`})]}),t[0]=a):a=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,R.jsx)(`thead`,{className:`sticky top-0 z-10 border-b border-border/60 bg-card text-ui-11 uppercase tracking-[0.08em] text-muted-foreground/70`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`px-4 py-2 font-semibold sm:pl-5`,children:`Process`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`CPU Time`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Current`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Average`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Peak`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold`,children:`Max Mem`}),(0,R.jsx)(`th`,{className:`px-3 py-2 font-semibold`,children:`Command`}),(0,R.jsx)(`th`,{className:`px-3 py-2 text-right font-semibold sm:pr-5`,children:`PID`})]})}),t[1]=o):o=t[1];let s;t[2]!==r||t[3]!==n.length?(s=n.length===0?(0,R.jsx)(`tr`,{children:(0,R.jsx)(`td`,{colSpan:8,className:`px-4 py-4 text-xs text-muted-foreground sm:px-5`,children:r})}):null,t[2]=r,t[3]=n.length,t[4]=s):s=t[4];let c;if(t[5]!==n||t[6]!==i){let e;t[8]===i?e=t[9]:(e=e=>(0,R.jsxs)(`tr`,{className:`hover:bg-muted/20`,children:[(0,R.jsx)(`td`,{className:`px-4 py-2 align-middle sm:pl-5`,children:(0,R.jsx)(St,{process:e,visualDepth:e.isServerRoot||i===null?0:Math.max(1,e.depth-i+1)})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:bt(e.cpuSecondsApprox)}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:[e.currentCpuPercent.toFixed(1),`%`]}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:[e.avgCpuPercent.toFixed(1),`%`]}),(0,R.jsxs)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:[e.maxCpuPercent.toFixed(1),`%`]}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums`,children:at(e.maxRssBytes)}),(0,R.jsx)(`td`,{className:`px-3 py-2 align-middle text-muted-foreground`,children:(0,R.jsxs)(j,{children:[(0,R.jsx)(A,{render:(0,R.jsx)(`span`,{className:`block truncate`,children:e.command})}),(0,R.jsx)(P,{side:`top`,className:`max-w-[min(440px,calc(100vw-2rem))] whitespace-normal break-words text-left font-mono text-ui-11 leading-relaxed text-wrap`,children:e.command})]})}),(0,R.jsx)(`td`,{className:`px-3 py-2 text-right align-middle font-mono tabular-nums text-muted-foreground sm:pr-5`,children:e.pid})]},e.processKey),t[8]=i,t[9]=e),c=n.map(e),t[5]=n,t[6]=i,t[7]=c}else c=t[7];let l;return t[10]!==s||t[11]!==c?(l=(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`max-h-[min(64vh,44rem)] w-full max-w-full border-t border-border/60`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[980px] table-fixed text-left text-xs`,children:[a,o,(0,R.jsxs)(`tbody`,{className:`divide-y divide-border/50`,children:[s,c]})]})}),t[10]=s,t[11]=c,t[12]=l):l=t[12],l}function Dt(e,t){return t.isServerRoot?e:e===null?t.depth:Math.min(e,t.depth)}function Ot(e){let t=(0,I.c)(7),{checkedAt:n}=e;le();let r;t[0]===n?r=t[1]:(r=ae(n?g(n):null),t[0]=n,t[1]=r);let i=r;if(i.status===`missing`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/50`,children:`Checking`}),t[2]=e):e=t[2],e}if(i.status===`invalid`){let e;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/50`,children:`Checked unavailable`}),t[3]=e):e=t[3],e}let a;return t[4]!==i.suffix||t[5]!==i.value?(a=(0,R.jsx)(`span`,{className:`text-ui-11 text-muted-foreground/60`,children:i.suffix?(0,R.jsxs)(R.Fragment,{children:[`Checked `,(0,R.jsx)(`span`,{className:`font-mono tabular-nums`,children:i.value}),` `,i.suffix]}):(0,R.jsxs)(R.Fragment,{children:[`Checked `,i.value]})}),t[4]=i.suffix,t[5]=i.value,t[6]=a):a=t[6],a}function kt(e){let t=(0,I.c)(14),{isPending:n,label:r,onClick:i}=e,a=n&&`animate-spin`,s;t[0]===a?s=t[1]:(s=l(`size-3`,a),t[0]=a,t[1]=s);let c;t[2]===s?c=t[3]:(c=(0,R.jsx)(ie,{className:s}),t[2]=s,t[3]=c);let u;t[4]!==n||t[5]!==r||t[6]!==i||t[7]!==c?(u=(0,R.jsx)(A,{render:(0,R.jsx)(o,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:n,onClick:i,"aria-label":r,children:c})}),t[4]=n,t[5]=r,t[6]=i,t[7]=c,t[8]=u):u=t[8];let d;t[9]===r?d=t[10]:(d=(0,R.jsx)(P,{side:`top`,children:r}),t[9]=r,t[10]=d);let f;return t[11]!==u||t[12]!==d?(f=(0,R.jsxs)(j,{children:[u,d]}),t[11]=u,t[12]=d,t[13]=f):f=t[13],f}function $(){let e=(0,I.c)(193),t=b(x),n=b(ee),r=ne()?.environmentId??null,i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={reportFailure:!1},e[0]=i):i=e[0];let a=f(S.signalProcess,i),s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},e[1]=s):s=e[1];let c=f(re.openInEditor,s),[p,g]=(0,F.useState)(9e5),v=yt.find(e=>e.windowMs===p)??yt[1],y;e[2]===r?y=e[3]:(y=r===null?null:S.traceDiagnostics({environmentId:r,input:{}}),e[2]=r,e[3]=y);let{data:w,error:te,isPending:ie,refresh:E}=C(y),ae;e[4]===r?ae=e[5]:(ae=r===null?null:S.processDiagnostics({environmentId:r,input:{}}),e[4]=r,e[5]=ae);let{data:D,error:O,isPending:le,refresh:k}=C(ae),{data:M,error:de,isPending:fe,refresh:pe}=C(r===null?null:S.processResourceHistory({environmentId:r,input:{windowMs:v.windowMs,bucketMs:v.bucketMs}})),[me,ge]=(0,F.useState)(!1),[_e,ve]=(0,F.useState)(null),[ye,be]=(0,F.useState)(null),xe;e[6]!==n||e[7]!==r||e[8]!==t?.logsDirectoryPath||e[9]!==c?(xe=()=>{let e=t?.logsDirectoryPath??null;if(!e)return;let i=ue(n??[]);if(!i){ve(`No available editors found.`);return}if(r===null){ve(`No environment is selected.`);return}ge(!0),ve(null),(async()=>{let t=await c({environmentId:r,input:{cwd:e,editor:i}});if(ge(!1),t._tag===`Failure`&&!d(t)){let e=u(t);ve(e instanceof Error?e.message:`Unable to open logs folder.`)}})()},e[6]=n,e[7]=r,e[8]=t?.logsDirectoryPath,e[9]=c,e[10]=xe):xe=e[10],t?.logsDirectoryPath;let Se=xe,L=ie&&w===null,Ce=le&&D===null,we;e[11]!==r||e[12]!==D?.processes||e[13]!==k||e[14]!==a?(we=(e,t)=>{if(t===`SIGKILL`&&!window.confirm(`Send SIGKILL to process ${e}? This cannot be handled by the process.`)||r===null)return;let n=D?.processes.find(t=>t.pid===e);n!==void 0&&(be(e),(async()=>{let i=await a({environmentId:r,input:{pid:e,startTimeMs:n.startTimeMs,signal:t}});if(be(null),i._tag===`Failure`){if(!d(i)){let e=u(i);se.add({type:`error`,title:`Could not send ${t}`,description:e instanceof Error?e.message:`Failed to send ${t}.`})}return}if(!i.value.signaled){let e=m(i.value.message);if(k(),ct(e)){se.add({type:`info`,title:`Process already exited`,description:`The process is not a child of the DasCode Server. It might already have exited.`});return}se.add({type:`error`,title:`Could not send ${t}`,description:e??`Failed to send ${t}.`});return}k()})())},e[11]=r,e[12]=D?.processes,e[13]=k,e[14]=a,e[15]=we):we=e[15],D?.processes;let z=we,Te;e[16]===D?Te=e[17]:(Te=D?h(D.error):null,e[16]=D,e[17]=Te);let Ee=Te,De;e[18]===M?De=e[19]:(De=M?h(M.error):null,e[18]=M,e[19]=De);let Oe=De,ke;e[20]===w?ke=e[21]:(ke=w?h(w.error):null,e[20]=w,e[21]=ke);let B=ke,V;e[22]===w?V=e[23]:(V=w?_(w.partialFailure,Ft):!1,e[22]=w,e[23]=V);let Ae=V,H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,R.jsx)(Ze,{}),e[24]=H):H=e[24];let je=D?.readAt??null,Me;e[25]===je?Me=e[26]:(Me=(0,R.jsx)(Ot,{checkedAt:je}),e[25]=je,e[26]=Me);let U;e[27]!==le||e[28]!==k?(U=(0,R.jsx)(kt,{isPending:le,label:`Refresh process diagnostics`,onClick:k}),e[27]=le,e[28]=k,e[29]=U):U=e[29];let Ne;e[30]!==Me||e[31]!==U?(Ne=(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[Me,U]}),e[30]=Me,e[31]=U,e[32]=Ne):Ne=e[32];let Pe;e[33]===D?Pe=e[34]:(Pe=D?J(D.processCount):`...`,e[33]=D,e[34]=Pe);let Fe;e[35]===Pe?Fe=e[36]:(Fe=(0,R.jsx)(X,{label:`Child Processes`,value:Pe}),e[35]=Pe,e[36]=Fe);let Ie;e[37]===D?Ie=e[38]:(Ie=D?`${D.totalCpuPercent.toFixed(1)}%`:`...`,e[37]=D,e[38]=Ie);let W;e[39]===Ie?W=e[40]:(W=(0,R.jsx)(X,{label:`CPU`,value:Ie,tooltip:`Total CPU across live child processes of the current server process. The desktop shell and other parent processes are not included.`}),e[39]=Ie,e[40]=W);let Le;e[41]===D?Le=e[42]:(Le=D?at(D.totalRssBytes):`...`,e[41]=D,e[42]=Le);let G;e[43]===Le?G=e[44]:(G=(0,R.jsx)(X,{label:`Memory`,value:Le,tooltip:`Total resident memory across live child processes of the current server process. The desktop shell and other parent processes are not included.`}),e[43]=Le,e[44]=G);let Re=D?String(D.serverPid):`...`,K;e[45]===Re?K=e[46]:(K=(0,R.jsx)(X,{label:`Server PID`,value:Re}),e[45]=Re,e[46]=K);let q;e[47]!==Fe||e[48]!==W||e[49]!==G||e[50]!==K?(q=(0,R.jsxs)(lt,{children:[Fe,W,G,K]}),e[47]=Fe,e[48]=W,e[49]=G,e[50]=K,e[51]=q):q=e[51];let ze;e[52]!==Ee||e[53]!==O?(ze=Ee||O?(0,R.jsxs)(`div`,{className:`space-y-2 border-t border-border/60 px-4 py-3 text-xs text-muted-foreground sm:px-5`,children:[Ee?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:Ee.message})]}):null,O?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:O})]}):null]}):null,e[52]=Ee,e[53]=O,e[54]=ze):ze=e[54];let Be;e[55]===D?.processes?Be=e[56]:(Be=D?.processes??[],e[55]=D?.processes,e[56]=Be);let Ve=Ce?`Loading live processes...`:`No live descendant processes found.`,He;e[57]!==z||e[58]!==ye||e[59]!==Be||e[60]!==Ve?(He=(0,R.jsx)(_t,{processes:Be,signalingPid:ye,onSignal:z,emptyLabel:Ve}),e[57]=z,e[58]=ye,e[59]=Be,e[60]=Ve,e[61]=He):He=e[61];let Ue;e[62]!==Ne||e[63]!==q||e[64]!==ze||e[65]!==He?(Ue=(0,R.jsxs)(N,{title:`Live Processes`,headerAction:Ne,children:[q,ze,He]}),e[62]=Ne,e[63]=q,e[64]=ze,e[65]=He,e[66]=Ue):Ue=e[66];let We;e[67]===p?We=e[68]:(We=(0,R.jsx)(Tt,{selectedWindowMs:p,onSelect:g}),e[67]=p,e[68]=We);let Ge=M?.readAt??null,Ke;e[69]===Ge?Ke=e[70]:(Ke=(0,R.jsx)(Ot,{checkedAt:Ge}),e[69]=Ge,e[70]=Ke);let qe;e[71]!==fe||e[72]!==pe?(qe=(0,R.jsx)(kt,{isPending:fe,label:`Refresh resource history`,onClick:pe}),e[71]=fe,e[72]=pe,e[73]=qe):qe=e[73];let Je;e[74]!==We||e[75]!==Ke||e[76]!==qe?(Je=(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[We,Ke,qe]}),e[74]=We,e[75]=Ke,e[76]=qe,e[77]=Je):Je=e[77];let Ye;e[78]===M?Ye=e[79]:(Ye=M?bt(M.totalCpuSecondsApprox):`...`,e[78]=M,e[79]=Ye);let Xe;e[80]===Ye?Xe=e[81]:(Xe=(0,R.jsx)(X,{label:`CPU Time`,value:Ye,tooltip:`Approximate active CPU time for the DasCode server root process and its descendants during the selected window. It grows only while sampled processes use CPU and older samples leave as the window moves.`}),e[80]=Ye,e[81]=Xe);let Qe;e[82]===M?Qe=e[83]:(Qe=M?J(M.retainedSampleCount):`...`,e[82]=M,e[83]=Qe);let $e;e[84]===Qe?$e=e[85]:($e=(0,R.jsx)(X,{label:`Samples`,value:Qe,tooltip:`In-memory process samples retained by the server. This resets when the server restarts.`}),e[84]=Qe,e[85]=$e);let et;e[86]===M?et=e[87]:(et=M?it(M.sampleIntervalMs):`...`,e[86]=M,e[87]=et);let tt;e[88]===et?tt=e[89]:(tt=(0,R.jsx)(X,{label:`Interval`,value:et}),e[88]=et,e[89]=tt);let nt;e[90]===M?nt=e[91]:(nt=M?J(M.topProcesses.length):`...`,e[90]=M,e[91]=nt);let rt;e[92]===nt?rt=e[93]:(rt=(0,R.jsx)(X,{label:`Processes`,value:nt}),e[92]=nt,e[93]=rt);let ot;e[94]!==Xe||e[95]!==$e||e[96]!==tt||e[97]!==rt?(ot=(0,R.jsxs)(lt,{children:[Xe,$e,tt,rt]}),e[94]=Xe,e[95]=$e,e[96]=tt,e[97]=rt,e[98]=ot):ot=e[98];let Y;e[99]!==Oe||e[100]!==de?(Y=Oe||de?(0,R.jsxs)(`div`,{className:`space-y-2 border-t border-border/60 px-4 py-3 text-xs text-muted-foreground sm:px-5`,children:[Oe?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:Oe.message})]}):null,de?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:de})]}):null]}):null,e[99]=Oe,e[100]=de,e[101]=Y):Y=e[101];let st;e[102]===M?.buckets?st=e[103]:(st=M?.buckets??[],e[102]=M?.buckets,e[103]=st);let dt;e[104]===st?dt=e[105]:(dt=(0,R.jsx)(Ct,{buckets:st}),e[104]=st,e[105]=dt);let ft;e[106]===M?.topProcesses?ft=e[107]:(ft=M?.topProcesses??[],e[106]=M?.topProcesses,e[107]=ft);let mt=fe&&M===null?`Collecting process resource samples...`:`No process resource samples found for this window.`,Z;e[108]!==ft||e[109]!==mt?(Z=(0,R.jsx)(Et,{processes:ft,emptyLabel:mt}),e[108]=ft,e[109]=mt,e[110]=Z):Z=e[110];let ht;e[111]!==Je||e[112]!==ot||e[113]!==Y||e[114]!==dt||e[115]!==Z?(ht=(0,R.jsxs)(N,{title:`Resource History`,headerAction:Je,children:[ot,Y,dt,Z]}),e[111]=Je,e[112]=ot,e[113]=Y,e[114]=dt,e[115]=Z,e[116]=ht):ht=e[116];let gt=w?.readAt??null,Q;e[117]===gt?Q=e[118]:(Q=(0,R.jsx)(Ot,{checkedAt:gt}),e[117]=gt,e[118]=Q);let vt=!t?.logsDirectoryPath||me,xt;e[119]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,R.jsx)(he,{className:`size-3`}),e[119]=xt):xt=e[119];let St;e[120]!==Se||e[121]!==vt?(St=(0,R.jsx)(A,{render:(0,R.jsx)(o,{size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:vt,onClick:Se,"aria-label":`Open logs folder`,children:xt})}),e[120]=Se,e[121]=vt,e[122]=St):St=e[122];let wt;e[123]===Symbol.for(`react.memo_cache_sentinel`)?(wt=(0,R.jsx)(P,{side:`top`,children:`Open logs folder`}),e[123]=wt):wt=e[123];let Dt;e[124]===St?Dt=e[125]:(Dt=(0,R.jsxs)(j,{children:[St,wt]}),e[124]=St,e[125]=Dt);let $;e[126]!==ie||e[127]!==E?($=(0,R.jsx)(kt,{isPending:ie,label:`Refresh trace diagnostics`,onClick:E}),e[126]=ie,e[127]=E,e[128]=$):$=e[128];let It;e[129]!==Q||e[130]!==Dt||e[131]!==$?(It=(0,R.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[Q,Dt,$]}),e[129]=Q,e[130]=Dt,e[131]=$,e[132]=It):It=e[132];let Lt;e[133]===w?Lt=e[134]:(Lt=w?J(w.recordCount):`...`,e[133]=w,e[134]=Lt);let Rt;e[135]===Lt?Rt=e[136]:(Rt=(0,R.jsx)(X,{label:`Spans`,value:Lt}),e[135]=Lt,e[136]=Rt);let zt;e[137]===w?zt=e[138]:(zt=w?J(w.failureCount):`...`,e[137]=w,e[138]=zt);let Bt=w&&w.failureCount>0?`danger`:`default`,Vt;e[139]!==zt||e[140]!==Bt?(Vt=(0,R.jsx)(X,{label:`Failures`,value:zt,tone:Bt}),e[139]=zt,e[140]=Bt,e[141]=Vt):Vt=e[141];let Ht;e[142]===w?Ht=e[143]:(Ht=w?J(w.slowSpanCount):`...`,e[142]=w,e[143]=Ht);let Ut;e[144]===w?Ut=e[145]:(Ut=w?`Spans with a duration of ${it(w.slowSpanThresholdMs)} or longer.`:`Spans at or above the configured slow-span threshold.`,e[144]=w,e[145]=Ut);let Wt=w&&w.slowSpanCount>0?`warning`:`default`,Gt;e[146]!==Ht||e[147]!==Ut||e[148]!==Wt?(Gt=(0,R.jsx)(X,{label:`Slow Spans`,value:Ht,tooltip:Ut,tone:Wt}),e[146]=Ht,e[147]=Ut,e[148]=Wt,e[149]=Gt):Gt=e[149];let Kt;e[150]===w?Kt=e[151]:(Kt=w?J(w.parseErrorCount):`...`,e[150]=w,e[151]=Kt);let qt=w&&w.parseErrorCount>0?`warning`:`default`,Jt;e[152]!==Kt||e[153]!==qt?(Jt=(0,R.jsx)(X,{label:`Parse Errors`,value:Kt,tone:qt}),e[152]=Kt,e[153]=qt,e[154]=Jt):Jt=e[154];let Yt;e[155]!==Rt||e[156]!==Vt||e[157]!==Gt||e[158]!==Jt?(Yt=(0,R.jsxs)(lt,{children:[Rt,Vt,Gt,Jt]}),e[155]=Rt,e[156]=Vt,e[157]=Gt,e[158]=Jt,e[159]=Yt):Yt=e[159];let Xt;e[160]!==te||e[161]!==_e||e[162]!==B||e[163]!==Ae?(Xt=_e||B||te?(0,R.jsxs)(`div`,{className:`space-y-2 border-t border-border/60 px-4 py-3 text-xs text-muted-foreground sm:px-5`,children:[_e?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:_e})]}):null,B?(0,R.jsxs)(`div`,{className:l(`flex items-start gap-2`,Ae?`text-amber-600 dark:text-amber-400`:`text-destructive`),children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:Ae?`Some trace files could not be read, so diagnostics may be incomplete. ${B.message}`:B.message})]}):null,te?(0,R.jsxs)(`div`,{className:`flex items-start gap-2 text-destructive`,children:[(0,R.jsx)(oe,{className:`mt-0.5 size-3.5 shrink-0`}),(0,R.jsx)(`span`,{children:te})]}):null]}):null,e[160]=te,e[161]=_e,e[162]=B,e[163]=Ae,e[164]=Xt):Xt=e[164];let Zt;e[165]!==It||e[166]!==Yt||e[167]!==Xt?(Zt=(0,R.jsxs)(N,{title:`Trace Diagnostics`,headerAction:It,children:[Yt,Xt]}),e[165]=It,e[166]=Yt,e[167]=Xt,e[168]=Zt):Zt=e[168];let Qt;e[169]!==w||e[170]!==L?(Qt=(0,R.jsx)(N,{title:`Latest Failures`,children:w&&w.latestFailures.length>0?(0,R.jsx)(pt,{headers:[`Span`,`Cause`,`Duration`,`Ended`],children:w.latestFailures.map(Pt)}):(0,R.jsx)(ut,{label:L?`Loading failures...`:`No failed spans found.`})}),e[169]=w,e[170]=L,e[171]=Qt):Qt=e[171];let $t;e[172]!==w||e[173]!==L?($t=(0,R.jsx)(N,{title:`Most Common Failures`,children:w&&w.commonFailures.length>0?(0,R.jsx)(pt,{headers:[`Span`,`Count`,`Cause`,`Last Seen`],minTableWidth:`min-w-[760px]`,children:w.commonFailures.map(Nt)}):(0,R.jsx)(ut,{label:L?`Loading failure groups...`:`No repeated failures found.`})}),e[172]=w,e[173]=L,e[174]=$t):$t=e[174];let en;e[175]!==w||e[176]!==L?(en=(0,R.jsx)(N,{title:`Slowest Spans`,children:w&&w.slowestSpans.length>0?(0,R.jsx)(pt,{headers:[`Span`,`Duration`,`Ended`,`Trace`],minTableWidth:`min-w-[900px]`,columnWidths:[`w-[44%]`,`w-[14%]`,`w-[12%]`,`w-[30%]`],children:w.slowestSpans.map(Mt)}):(0,R.jsx)(ut,{label:L?`Loading slow spans...`:`No spans found.`})}),e[175]=w,e[176]=L,e[177]=en):en=e[177];let tn;e[178]!==w||e[179]!==L?(tn=(0,R.jsx)(N,{title:`Span Logs`,children:w&&w.latestWarningAndErrorLogs.length>0?(0,R.jsx)(T,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`w-full max-w-full rounded-none`,children:(0,R.jsxs)(`table`,{className:`w-full min-w-[920px] table-fixed text-left text-xs`,children:[(0,R.jsxs)(`colgroup`,{children:[(0,R.jsx)(`col`,{className:`w-[11%]`}),(0,R.jsx)(`col`,{className:`w-[9%]`}),(0,R.jsx)(`col`,{className:`w-[24%]`}),(0,R.jsx)(`col`,{className:`w-[26%]`}),(0,R.jsx)(`col`,{className:`w-[30%]`})]}),(0,R.jsx)(`thead`,{className:`border-b border-border/60 text-ui-11 uppercase tracking-[0.08em] text-muted-foreground/70`,children:(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`th`,{className:`whitespace-nowrap px-4 py-2.5 font-semibold sm:pl-5`,children:`Time`}),(0,R.jsx)(`th`,{className:`whitespace-nowrap px-4 py-2.5 font-semibold`,children:`Level`}),(0,R.jsx)(`th`,{className:`whitespace-nowrap px-4 py-2.5 font-semibold`,children:`Span`}),(0,R.jsx)(`th`,{className:`whitespace-nowrap px-4 py-2.5 font-semibold`,children:`Message`}),(0,R.jsx)(`th`,{className:`whitespace-nowrap px-4 py-2.5 font-semibold sm:pr-5`,children:`Trace`})]})}),(0,R.jsx)(`tbody`,{className:`divide-y divide-border/60`,children:w.latestWarningAndErrorLogs.map(jt)})]})}):(0,R.jsx)(ut,{label:L?`Loading recent logs...`:`No warnings or errors found.`})}),e[178]=w,e[179]=L,e[180]=tn):tn=e[180];let nn;e[181]!==w||e[182]!==L?(nn=(0,R.jsx)(N,{title:`Top Span Names`,children:w&&w.topSpansByCount.length>0?(0,R.jsx)(pt,{headers:[`Span`,`Count`,`Failures`,`Average`,`Max`],minTableWidth:`min-w-[760px]`,columnWidths:[`w-[48%]`,`w-[13%]`,`w-[13%]`,`w-[13%]`,`w-[13%]`],children:w.topSpansByCount.map(At)}):(0,R.jsx)(ut,{label:L?`Loading span names...`:`No spans found.`})}),e[181]=w,e[182]=L,e[183]=nn):nn=e[183];let rn;return e[184]!==Ue||e[185]!==ht||e[186]!==Zt||e[187]!==Qt||e[188]!==$t||e[189]!==en||e[190]!==tn||e[191]!==nn?(rn=(0,R.jsxs)(ce,{className:`max-w-6xl gap-10`,children:[H,Ue,ht,Zt,Qt,$t,en,tn,nn]}),e[184]=Ue,e[185]=ht,e[186]=Zt,e[187]=Qt,e[188]=$t,e[189]=en,e[190]=tn,e[191]=nn,e[192]=rn):rn=e[192],rn}function At(e){return(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`px-4 py-3 align-top text-xs font-medium text-foreground first:sm:pl-5`,children:e.name}),(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums`,children:J(e.count)}),(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums`,children:J(e.failureCount)}),(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums`,children:it(e.averageDurationMs)}),(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums last:sm:pr-5`,children:it(e.maxDurationMs)})]},e.name)}function jt(e){return(0,R.jsxs)(`tr`,{className:`hover:bg-muted/15`,children:[(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums text-muted-foreground sm:pl-5`,children:Y(e.seenAt)}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top`,children:(0,R.jsx)(`span`,{className:`inline-flex rounded bg-muted px-1.5 py-0.5 font-mono text-ui-11 font-medium uppercase text-foreground/80`,children:e.level})}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top`,children:(0,R.jsx)(`div`,{className:`truncate font-medium text-foreground`,children:e.spanName})}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top text-muted-foreground`,children:(0,R.jsx)(dt,{collapsedClassName:`line-clamp-2`,expandLabel:`Show full message`,text:e.message})}),(0,R.jsx)(`td`,{className:`min-w-0 whitespace-nowrap px-4 py-3 align-top text-muted-foreground sm:pr-5`,children:(0,R.jsx)(mt,{traceId:e.traceId})})]},`${e.traceId}:${e.spanId}:${g(e.seenAt)}:${e.message}`)}function Mt(e){return(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`px-4 py-3 align-top text-xs font-medium text-foreground first:sm:pl-5`,children:e.name}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top font-mono tabular-nums`,children:it(e.durationMs)}),(0,R.jsx)(`td`,{className:`w-px whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums text-muted-foreground`,children:Y(e.endedAt)}),(0,R.jsx)(`td`,{className:`min-w-0 whitespace-nowrap px-4 py-3 align-top text-muted-foreground last:sm:pr-5`,children:(0,R.jsx)(mt,{traceId:e.traceId})})]},`${e.traceId}:${e.spanId}`)}function Nt(e){return(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`px-4 py-3 align-top text-xs font-medium text-foreground first:sm:pl-5`,children:e.name}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top font-mono tabular-nums`,children:J(e.count)}),(0,R.jsx)(`td`,{className:`max-w-[360px] px-4 py-3 align-top text-muted-foreground`,children:(0,R.jsx)(dt,{text:e.cause})}),(0,R.jsx)(`td`,{className:`w-px whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums text-muted-foreground last:sm:pr-5`,children:Y(e.lastSeenAt)})]},`${e.name}:${e.cause}`)}function Pt(e){return(0,R.jsxs)(`tr`,{children:[(0,R.jsx)(`td`,{className:`px-4 py-3 align-top text-xs font-medium text-foreground first:sm:pl-5`,children:e.name}),(0,R.jsx)(`td`,{className:`max-w-[360px] px-4 py-3 align-top text-muted-foreground`,children:(0,R.jsx)(dt,{text:e.cause})}),(0,R.jsx)(`td`,{className:`px-4 py-3 align-top font-mono tabular-nums`,children:it(e.durationMs)}),(0,R.jsx)(`td`,{className:`whitespace-nowrap px-4 py-3 align-top font-mono tabular-nums text-muted-foreground last:sm:pr-5`,children:Y(e.endedAt)})]},`${e.traceId}:${e.spanId}`)}function Ft(){return!1}var It=$;export{It as component};
|
|
3
|
+
//# sourceMappingURL=settings.diagnostics-DujS7DMW.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./compiler-runtime-CUwoe8mk.js";import{n as r}from"./SettingsPanels-DgK9Gy4R.js";var i=n(),a=t(e());function o(){let e=(0,i.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(r,{}),e[0]=t):t=e[0],t}export{o as component};
|
|
2
|
+
//# sourceMappingURL=settings.general-sQSJC3Rq.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t,r as n,t as r}from"./compiler-runtime-CUwoe8mk.js";import{Ft as i,It as a,Lt as o,Ma as s,Pt as c,cn as l,fn as u,gn as d,hn as f,ja as p,jt as m,t as h,wn as g}from"./utils-Yidpy5tB.js";import{Tt as _,_t as v,t as y}from"./use-atom-command-CbJ8L7ju.js";import{u as b}from"./localApi-5K0gg1WP.js";import{f as x,o as S,r as C,s as w}from"./query-BTlH8ppa.js";import{t as T}from"./circle-x-F0441fqg.js";import{i as E}from"./environments-DPUVdQJp.js";import{Ar as D,Dr as ee,Fa as O,Hc as k,Ia as A,La as j,Mt as te,Nc as ne,Or as re,Ra as ie,Rc as M,Vc as N,Wo as P,aa as F,hc as I,jc as L,ls as ae,os as oe,qc as R,ra as z,sa as se,ss as ce,tl as le,vl as ue}from"./index-DCOpJfCm.js";import{t as B}from"./toggle-QDWstdFN.js";import{a as V,c as de,d as fe,i as pe,l as H,n as me,o as he,r as ge,s as _e,t as U,u as W}from"./KeybindingsSettings.logic-BQBQ8pFk.js";var ve=s(`file-braces`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),ye=r(),be=t(n(),1),G=t(e(),1);function xe(e){let t=(0,ye.c)(8),{value:n}=e,r,i,a;if(t[0]!==n){let e=n.split(`+`);r=j,i=`bg-transparent p-0 shadow-none`,a=e.map(Se),t[0]=n,t[1]=r,t[2]=i,t[3]=a}else r=t[1],i=t[2],a=t[3];let o;return t[4]!==r||t[5]!==i||t[6]!==a?(o=(0,G.jsx)(r,{className:i,children:a}),t[4]=r,t[5]=i,t[6]=a,t[7]=o):o=t[7],o}function Se(e){return(0,G.jsx)(A,{className:`min-w-6 justify-center px-1.5`,children:e===`mod`?navigator.platform.toLowerCase().includes(`mac`)?`⌘`:`Ctrl`:e===`shift`?`⇧`:e===`alt`?navigator.platform.toLowerCase().includes(`mac`)?`⌥`:`Alt`:e===`ctrl`?`⌃`:e.length===1?e.toUpperCase():e},e)}function Ce(e){let t=(0,ye.c)(26),{query:n,onChange:r,isOpen:i,onOpenChange:a,inputRef:o,collapsedAccessory:s}=e;if(!i){let e;t[0]===a?e=t[1]:(e=()=>a(!0),t[0]=a,t[1]=e);let n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,G.jsx)(M,{className:`size-3`}),t[2]=n):n=t[2];let r;t[3]===e?r=t[4]:(r=(0,G.jsx)(ae,{render:(0,G.jsx)(l,{type:`button`,size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,onClick:e,"aria-label":`Search keybindings`,children:n})}),t[3]=e,t[4]=r);let i;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(ce,{side:`top`,children:`Search keybindings`}),t[5]=i):i=t[5];let o;t[6]===r?o=t[7]:(o=(0,G.jsxs)(oe,{children:[r,i]}),t[6]=r,t[7]=o);let c;return t[8]!==s||t[9]!==o?(c=(0,G.jsxs)(G.Fragment,{children:[s,o]}),t[8]=s,t[9]=o,t[10]=c):c=t[10],c}let c;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(M,{className:`pointer-events-none absolute top-1/2 left-2 size-3 -translate-y-1/2 text-muted-foreground`}),t[11]=c):c=t[11];let u;t[12]===r?u=t[13]:(u=e=>r(e.currentTarget.value),t[12]=r,t[13]=u);let d;t[14]!==a||t[15]!==n.length?(d=()=>{n.length===0&&a(!1)},t[14]=a,t[15]=n.length,t[16]=d):d=t[16];let f;t[17]!==r||t[18]!==a?(f=e=>{e.key===`Escape`&&(e.preventDefault(),r(``),a(!1))},t[17]=r,t[18]=a,t[19]=f):f=t[19];let p;return t[20]!==o||t[21]!==n||t[22]!==u||t[23]!==d||t[24]!==f?(p=(0,G.jsxs)(`div`,{className:`relative`,children:[c,(0,G.jsx)(`input`,{ref:o,autoFocus:!0,type:`text`,value:n,onChange:u,onBlur:d,onKeyDown:f,placeholder:`Search keybindings`,"aria-label":`Search keybindings`,className:`h-6 w-44 rounded-md border border-input bg-background pl-7 pr-2 text-ui-11 text-foreground outline-none placeholder:text-muted-foreground/72 focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/24`})]}),t[20]=o,t[21]=n,t[22]=u,t[23]=d,t[24]=f,t[25]=p):p=t[25],p}function K(e,t){return e.type===t?[...K(e.left,t),...K(e.right,t)]:[e]}function q(e,t){let n=e[0];if(n)return e.slice(1).reduce((e,n)=>({type:t,left:e,right:n}),n)}function J(e){return e.type===`identifier`?{identifier:e.name,negated:!1}:e.type===`not`&&e.node.type===`identifier`?{identifier:e.node.name,negated:!0}:null}function we(e,t){let n=J(e);if(!n)return e;let r={type:`identifier`,name:t};return n.negated?{type:`not`,node:r}:r}function Y(e,t){let n=J(e);if(!n)return t?{type:`not`,node:e}:e;let r={type:`identifier`,name:n.identifier};return t?{type:`not`,node:r}:r}function X(){return{type:`identifier`,name:U}}function Z(e=`and`){return{type:e,left:X(),right:{type:`not`,node:X()}}}function Q(e){let t=(0,ye.c)(9),{identifiers:n,focusable:r}=e,i=r===void 0?!0:r;if(n.length===0)return null;let a;t[0]===n?a=t[1]:(a=n.length===1?`Unknown condition: ${n[0]}`:`Unknown conditions: ${n.join(`, `)}`,t[0]=n,t[1]=a);let o=a,s=i?0:void 0,c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(ne,{className:`size-3.5`}),t[2]=c):c=t[2];let l;t[3]!==o||t[4]!==s?(l=(0,G.jsx)(ae,{render:(0,G.jsx)(`span`,{tabIndex:s,"aria-label":o,className:`inline-flex size-4.5 shrink-0 items-center justify-center rounded-sm text-warning outline-none transition-colors hover:bg-warning/10 focus-visible:ring-[3px] focus-visible:ring-warning/25`,children:c})}),t[3]=o,t[4]=s,t[5]=l):l=t[5];let u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,G.jsx)(ce,{side:`top`,className:`max-w-72 whitespace-normal leading-relaxed`,children:`DasCode does not recognize this condition yet. It can still be saved, but it may not match unless the runtime provides it.`}),t[6]=u):u=t[6];let d;return t[7]===l?d=t[8]:(d=(0,G.jsxs)(oe,{children:[l,u]}),t[7]=l,t[8]=d),d}function Te(e){let t=(0,ye.c)(5),{labels:n}=e;if(n.length===0)return null;let r;t[0]===n?r=t[1]:(r=n.length===1?`Conflicts with ${n[0]}.`:`Conflicts with ${n.slice(0,3).join(`, `)}${n.length>3?`, and more`:``}.`,t[0]=n,t[1]=r);let i=r,a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,G.jsx)(ne,{className:`size-3.5`}),t[2]=a):a=t[2];let o;return t[3]===i?o=t[4]:(o=(0,G.jsxs)(oe,{children:[(0,G.jsx)(ae,{render:(0,G.jsx)(`span`,{tabIndex:0,"aria-label":i,className:`inline-flex size-5 shrink-0 items-center justify-center rounded-sm text-warning outline-none transition-colors hover:bg-warning/10 focus-visible:ring-[3px] focus-visible:ring-warning/25`,children:a})}),(0,G.jsxs)(ce,{side:`top`,className:`max-w-72 whitespace-normal leading-relaxed`,children:[i,` The most recent matching binding wins when both conditions can apply.`]})]}),t[3]=i,t[4]=o),o}function Ee(e){let t=(0,ye.c)(25),{value:n,variables:r,unknownIdentifiers:s,onChange:c}=e,l;if(t[0]!==n||t[1]!==r){let e;t[3]===n?e=t[4]:(e=e=>e===n,t[3]=n,t[4]=e),l=r.find(e),t[0]=n,t[1]=r,t[2]=l}else l=t[2];let u=l,d;t[5]!==u||t[6]!==n||t[7]!==r?(d=u||r.some(e=>e===n)?r:[n,...r],t[5]=u,t[6]=n,t[7]=r,t[8]=d):d=t[8];let f=d,p;t[9]===c?p=t[10]:(p=e=>e&&c(e),t[9]=c,t[10]=p);let h;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,G.jsx)(o,{placeholder:`Condition`,className:`leading-7`}),t[11]=h):h=t[11];let g;t[12]===s?g=t[13]:(g=s&&s.length>0?(0,G.jsx)(Q,{identifiers:s,focusable:!1}):null,t[12]=s,t[13]=g);let _;t[14]===g?_=t[15]:(_=(0,G.jsxs)(a,{size:`xs`,className:`h-7 min-h-7 min-w-0 flex-1 rounded-md font-mono text-xs sm:h-7`,children:[h,g]}),t[14]=g,t[15]=_);let v;t[16]===f?v=t[17]:(v=f.map(De),t[16]=f,t[17]=v);let y;t[18]===v?y=t[19]:(y=(0,G.jsx)(i,{alignItemWithTrigger:!1,matchTriggerWidth:!1,popupClassName:`w-fit`,className:`max-h-72 w-fit min-w-44`,children:v}),t[18]=v,t[19]=y);let b;return t[20]!==p||t[21]!==_||t[22]!==y||t[23]!==n?(b=(0,G.jsxs)(m,{value:n,onValueChange:p,children:[_,y]}),t[20]=p,t[21]=_,t[22]=y,t[23]=n,t[24]=b):b=t[24],b}function De(e){return(0,G.jsx)(c,{value:e,className:`min-h-7 w-full py-1 font-mono text-ui-12`,children:(0,G.jsx)(`span`,{className:`truncate`,children:e})},e)}function $(e){let t=(0,ye.c)(74),{node:n,variables:r,depth:s,onChange:u,onRemove:d}=e,f=s===void 0?0:s,p;if(t[0]!==n||t[1]!==u||t[2]!==d||t[3]!==r){p=Symbol.for(`react.early_return_sentinel`);bb0:{let e=J(n);if(e){let i=he(e.identifier)?[]:[e.identifier],a;t[5]!==n||t[6]!==u?(a=e=>u(Y(n,e)),t[5]=n,t[6]=u,t[7]=a):a=t[7];let o=`Negate ${e.identifier}`,s;t[8]!==e||t[9]!==a||t[10]!==o?(s=(0,G.jsx)(B,{pressed:e.negated,onPressedChange:a,"aria-label":o,variant:`outline`,size:`xs`,className:`h-7 min-w-10 px-2 text-ui-11 sm:h-7`,children:`Not`}),t[8]=e,t[9]=a,t[10]=o,t[11]=s):s=t[11];let c;t[12]!==n||t[13]!==u?(c=e=>u(we(n,e)),t[12]=n,t[13]=u,t[14]=c):c=t[14];let f;t[15]!==e||t[16]!==c||t[17]!==i||t[18]!==r?(f=(0,G.jsx)(Ee,{value:e.identifier,variables:r,unknownIdentifiers:i,onChange:c}),t[15]=e,t[16]=c,t[17]=i,t[18]=r,t[19]=f):f=t[19];let m;t[20]===d?m=t[21]:(m=d?(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`size-7 sm:size-7`,"aria-label":`Remove condition`,onClick:d,children:(0,G.jsx)(k,{className:`size-3.5`})}):null,t[20]=d,t[21]=m);let h;t[22]!==s||t[23]!==f||t[24]!==m?(h=(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border/70 bg-background/60 px-2 py-2`,children:[s,f,m]}),t[22]=s,t[23]=f,t[24]=m,t[25]=h):h=t[25],p=h;break bb0}}t[0]=n,t[1]=u,t[2]=d,t[3]=r,t[4]=p}else p=t[4];if(p!==Symbol.for(`react.early_return_sentinel`))return p;if(n.type===`not`){let e=f>0&&`border-border/50 bg-background/50`,i;t[26]===e?i=t[27]:(i=h(`space-y-2 rounded-lg border border-border/70 bg-muted/20 p-2`,e),t[26]=e,t[27]=i);let a;t[28]!==n||t[29]!==u?(a=(0,G.jsx)(B,{pressed:!0,onPressedChange:e=>u(e?n:n.node),"aria-label":`Negate group`,variant:`outline`,size:`xs`,className:`h-7 min-w-10 px-2 text-ui-11 sm:h-7`,children:`Not`}),t[28]=n,t[29]=u,t[30]=a):a=t[30];let o;t[31]===d?o=t[32]:(o=d?(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`ml-auto size-7 sm:size-7`,"aria-label":`Remove negated group`,onClick:d,children:(0,G.jsx)(k,{className:`size-3.5`})}):null,t[31]=d,t[32]=o);let s;t[33]!==a||t[34]!==o?(s=(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[a,o]}),t[33]=a,t[34]=o,t[35]=s):s=t[35];let c,p;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(`span`,{className:`absolute top-0 bottom-0 left-1.5 w-px bg-border/70`,"aria-hidden":!0}),p=(0,G.jsx)(`span`,{className:`absolute top-4 left-1.5 h-px w-2.5 bg-border/70`,"aria-hidden":!0}),t[36]=c,t[37]=p):(c=t[36],p=t[37]);let m=f+1,g;t[38]===u?g=t[39]:(g=e=>u({type:`not`,node:e}),t[38]=u,t[39]=g);let _;t[40]!==n.node||t[41]!==m||t[42]!==g||t[43]!==r?(_=(0,G.jsxs)(`div`,{className:`relative pl-4`,children:[c,p,(0,G.jsx)($,{node:n.node,variables:r,depth:m,onChange:g})]}),t[40]=n.node,t[41]=m,t[42]=g,t[43]=r,t[44]=_):_=t[44];let v;return t[45]!==_||t[46]!==i||t[47]!==s?(v=(0,G.jsxs)(`div`,{className:i,children:[s,_]}),t[45]=_,t[46]=i,t[47]=s,t[48]=v):v=t[48],v}let g=n.type===`or`?`or`:`and`,_,v,y,b;if(t[49]!==f||t[50]!==n||t[51]!==u||t[52]!==d||t[53]!==g||t[54]!==r){let e=K(n,g),s=new Map,p=e.map(e=>{let t=`${e.type}-${fe(e)}`,n=s.get(t)??0;return s.set(t,n+1),{child:e,key:n===0?t:`${t}-${n}`}}),x=(t,n)=>{let r=!1,i=q(e.map(e=>!r&&e===t?(r=!0,n):e),g);i&&u(i)},S=t=>{let n=!1,r=q(e.filter(e=>!n&&e===t?(n=!0,!1):!0),g);u(r||X())},C=t=>{if(t===g)return;let n=q(e,t);n&&u(n)},w=()=>{let t=q([...e,X()],g);t&&u(t)},T=()=>{let t={type:g===`and`?`or`:`and`,left:X(),right:{type:`not`,node:X()}},n=q([...e,t],g);n&&u(n)},E=f>0&&`border-border/70 bg-background/55`;t[59]===E?y=t[60]:(y=h(`space-y-2 rounded-lg border border-border/60 bg-muted/10 p-2`,E),t[59]=E,t[60]=y);let D;t[61]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,G.jsx)(a,{size:`xs`,className:`h-7 min-h-7 w-24 rounded-md text-xs sm:h-7`,children:(0,G.jsx)(o,{})}),t[61]=D):D=t[61];let ee;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,G.jsxs)(i,{alignItemWithTrigger:!1,matchTriggerWidth:!1,popupClassName:`w-fit`,className:`w-fit min-w-24`,children:[(0,G.jsx)(c,{value:`and`,className:`min-h-7 py-1 font-mono text-ui-12`,children:`and`}),(0,G.jsx)(c,{value:`or`,className:`min-h-7 py-1 font-mono text-ui-12`,children:`or`})]}),t[62]=ee):ee=t[62];let O;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,G.jsx)(N,{className:`size-3.5`}),t[63]=O):O=t[63];let A;t[64]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,G.jsx)(N,{className:`size-3.5`}),t[64]=A):A=t[64];let j;t[65]===d?j=t[66]:(j=d?(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`ml-auto size-7 sm:size-7`,"aria-label":`Remove group`,onClick:d,children:(0,G.jsx)(k,{className:`size-3.5`})}):null,t[65]=d,t[66]=j),b=(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsxs)(m,{value:g,onValueChange:e=>C(e),children:[D,ee]}),(0,G.jsxs)(l,{type:`button`,variant:`outline`,size:`xs`,className:`h-7 sm:h-7`,onClick:w,children:[O,`Condition`]}),(0,G.jsxs)(l,{type:`button`,variant:`outline`,size:`xs`,className:`h-7 sm:h-7`,onClick:T,children:[A,`Group`]}),j]}),_=`space-y-2`,v=p.map(e=>{let{child:t,key:n}=e;return(0,G.jsxs)(`div`,{className:`relative pl-4`,children:[(0,G.jsx)(`span`,{className:h(`absolute top-0 bottom-0 left-1.5 w-px`,f===0?`bg-border`:`bg-border/70`),"aria-hidden":!0}),(0,G.jsx)(`span`,{className:h(`absolute top-4 left-1.5 h-px w-2.5`,f===0?`bg-border`:`bg-border/70`),"aria-hidden":!0}),(0,G.jsx)($,{node:t,variables:r,depth:f+1,onChange:e=>x(t,e),onRemove:()=>S(t)})]},n)}),t[49]=f,t[50]=n,t[51]=u,t[52]=d,t[53]=g,t[54]=r,t[55]=_,t[56]=v,t[57]=y,t[58]=b}else _=t[55],v=t[56],y=t[57],b=t[58];let x;t[67]!==_||t[68]!==v?(x=(0,G.jsx)(`div`,{className:_,children:v}),t[67]=_,t[68]=v,t[69]=x):x=t[69];let S;return t[70]!==y||t[71]!==b||t[72]!==x?(S=(0,G.jsxs)(`div`,{className:y,children:[b,x]}),t[70]=y,t[71]=b,t[72]=x,t[73]=S):S=t[73],S}function Oe(e){let t=(0,ye.c)(64),{value:n,variables:r,onChange:i,onValidityChange:a}=e,o;t[0]===n?o=t[1]:(o=fe(n),t[0]=n,t[1]=o);let[s,c]=(0,be.useState)(o),u;t[2]===s?u=t[3]:(u=H(s),t[2]=s,t[3]=u);let d=u,f=d.ok?null:d.message,p;t[4]!==d.ok||t[5]!==d.value?(p=d.ok?W(d.value):[],t[4]=d.ok,t[5]=d.value,t[6]=p):p=t[6];let m=p,g;t[7]!==i||t[8]!==a?(g=e=>{c(e);let t=H(e);a?.(t.ok),t.ok&&i(t.value)},t[7]=i,t[8]=a,t[9]=g):g=t[9];let _=g,v;t[10]!==i||t[11]!==a?(v=e=>{c(fe(e)),a?.(!0),i(e)},t[10]=i,t[11]=a,t[12]=v):v=t[12];let y=v,b;t[13]!==y||t[14]!==n?(b=()=>{if(!n){y(X());return}y({type:`and`,left:n,right:X()})},t[13]=y,t[14]=n,t[15]=b):b=t[15];let x=b,S;t[16]!==y||t[17]!==n?(S=()=>{let e=Z(`or`);if(!n){y(e);return}y({type:`and`,left:n,right:e})},t[16]=y,t[17]=n,t[18]=S):S=t[18];let C=S,w;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,G.jsx)(`div`,{className:`min-w-0`,children:(0,G.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`When`})}),t[19]=w):w=t[19];let E;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,G.jsx)(N,{className:`size-3.5`}),t[20]=E):E=t[20];let D;t[21]===x?D=t[22]:(D=(0,G.jsxs)(l,{type:`button`,variant:`outline`,size:`xs`,className:`h-7 sm:h-7`,onClick:x,children:[E,`Condition`]}),t[21]=x,t[22]=D);let ee;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,G.jsx)(N,{className:`size-3.5`}),t[23]=ee):ee=t[23];let O;t[24]===C?O=t[25]:(O=(0,G.jsxs)(l,{type:`button`,variant:`outline`,size:`xs`,className:`h-7 sm:h-7`,onClick:C,children:[ee,`Group`]}),t[24]=C,t[25]=O);let k;t[26]!==D||t[27]!==O?(k=(0,G.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[w,(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[D,O]})]}),t[26]=D,t[27]=O,t[28]=k):k=t[28];let A;t[29]===_?A=t[30]:(A=e=>_(e.currentTarget.value),t[29]=_,t[30]=A);let j=!!f,te=m.length>0&&`pr-9`,ne=f&&`border-destructive/70 focus-visible:border-destructive`,re;t[31]!==te||t[32]!==ne?(re=h(`h-7 rounded-md font-mono text-ui-12 leading-7 sm:h-7 sm:leading-7`,te,ne),t[31]=te,t[32]=ne,t[33]=re):re=t[33];let M;t[34]!==s||t[35]!==A||t[36]!==j||t[37]!==re?(M=(0,G.jsx)(ie,{value:s,onChange:A,placeholder:`Always`,"aria-invalid":j,"aria-label":`When expression`,className:re}),t[34]=s,t[35]=A,t[36]=j,t[37]=re,t[38]=M):M=t[38];let P;t[39]===m?P=t[40]:(P=m.length>0?(0,G.jsx)(`span`,{className:`absolute inset-y-0 right-2 flex items-center`,children:(0,G.jsx)(Q,{identifiers:m})}):null,t[39]=m,t[40]=P);let F;t[41]!==M||t[42]!==P?(F=(0,G.jsxs)(`div`,{className:`relative`,children:[M,P]}),t[41]=M,t[42]=P,t[43]=F):F=t[43];let I;t[44]===f?I=t[45]:(I=f?(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5 text-ui-11 text-destructive`,children:[(0,G.jsx)(T,{className:`size-3.5`}),f]}):null,t[44]=f,t[45]=I);let L;t[46]!==F||t[47]!==I?(L=(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[F,I]}),t[46]=F,t[47]=I,t[48]=L):L=t[48];let ae;t[49]!==x||t[50]!==C||t[51]!==y||t[52]!==n||t[53]!==r?(ae=n?(0,G.jsx)($,{node:n,variables:r,onChange:y,onRemove:()=>y(void 0)}):(0,G.jsx)(`div`,{className:`rounded-md border border-dashed border-border/80 bg-muted/15 p-3`,children:(0,G.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,G.jsxs)(l,{type:`button`,size:`xs`,className:`h-7 sm:h-7`,onClick:x,children:[(0,G.jsx)(N,{className:`size-3.5`}),`Condition`]}),(0,G.jsxs)(l,{type:`button`,variant:`outline`,size:`xs`,className:`h-7 sm:h-7`,onClick:C,children:[(0,G.jsx)(N,{className:`size-3.5`}),`Group`]})]})}),t[49]=x,t[50]=C,t[51]=y,t[52]=n,t[53]=r,t[54]=ae):ae=t[54];let oe;t[55]===f?oe=t[56]:(oe=f?(0,G.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center rounded-lg border border-destructive/30 bg-background/75 p-4 text-center text-xs text-destructive backdrop-blur-[1px]`,children:`Fix the expression above to continue editing visually.`}):null,t[55]=f,t[56]=oe);let R;t[57]!==ae||t[58]!==oe?(R=(0,G.jsxs)(`div`,{className:`relative`,children:[ae,oe]}),t[57]=ae,t[58]=oe,t[59]=R):R=t[59];let z;return t[60]!==k||t[61]!==L||t[62]!==R?(z=(0,G.jsxs)(`div`,{className:`w-[min(34rem,calc(100vw-2rem))] space-y-3`,children:[k,L,R]}),t[60]=k,t[61]=L,t[62]=R,t[63]=z):z=t[63],z}function ke(e){return{keyDraft:e.key,whenDraft:e.binding.whenAst,isRecording:!1,isWhenDraftValid:!0}}function Ae(e,t){return{...e,...t}}function je(e){return{command:e.command,key:e.key,...e.when.trim().length>0?{when:e.when}:{}}}function Me(e){let t=(0,ye.c)(94),{row:n,allRows:r,variables:i,isSaving:a,onSave:o,onReset:s,onRemove:c}=e,[m,_]=(0,be.useReducer)(Ae,n,ke),{keyDraft:v,whenDraft:y,isRecording:b,isWhenDraftValid:x}=m,S,C,w,T,E,O,k,A;if(t[0]!==r||t[1]!==b||t[2]!==v||t[3]!==n.binding.shortcut||t[4]!==n.defaultKey||t[5]!==n.id||t[6]!==n.key||t[7]!==n.source||t[8]!==n.when||t[9]!==y){A=fe(y),E=v!==n.key||A!==n.when;let e;t[18]===n.binding.shortcut?e=t[19]:(e=I(n.binding.shortcut),t[18]=n.binding.shortcut,t[19]=e),w=e,C=n.source===`Custom`&&n.defaultKey!==null,S=n.source!==`Default`,T=C||S,O=!b&&v===n.key&&n.key.length>0&&!E,k=_e(r,{rowId:n.id,key:v,when:A}),t[0]=r,t[1]=b,t[2]=v,t[3]=n.binding.shortcut,t[4]=n.defaultKey,t[5]=n.id,t[6]=n.key,t[7]=n.source,t[8]=n.when,t[9]=y,t[10]=S,t[11]=C,t[12]=w,t[13]=T,t[14]=E,t[15]=O,t[16]=k,t[17]=A}else S=t[10],C=t[11],w=t[12],T=t[13],E=t[14],O=t[15],k=t[16],A=t[17];let j=k,te;t[20]!==v||t[21]!==o||t[22]!==n||t[23]!==A?(te=()=>{o({command:n.command,key:v,when:A.trim().length>0?A:void 0,replace:je(n)})},t[20]=v,t[21]=o,t[22]=n,t[23]=A,t[24]=te):te=t[24];let ne=te,M;t[25]===n.key?M=t[26]:(M=e=>{if(e.key===`Tab`)return;if(e.preventDefault(),e.key===`Escape`){_({keyDraft:n.key,isRecording:!1});return}let t=de(e.nativeEvent,navigator.platform);t&&_({keyDraft:t,isRecording:!1})},t[25]=n.key,t[26]=M);let N=M,P,F;t[27]===n.command?(P=t[28],F=t[29]):(P=(0,G.jsx)(`div`,{"aria-label":n.command,className:`truncate text-ui-13 font-medium text-foreground`}),F=V(n.command),t[27]=n.command,t[28]=P,t[29]=F);let L;t[30]!==P||t[31]!==F?(L=(0,G.jsx)(ae,{render:P,children:F}),t[30]=P,t[31]=F,t[32]=L):L=t[32];let R;t[33]===n.command?R=t[34]:(R=(0,G.jsx)(ce,{side:`top`,children:n.command}),t[33]=n.command,t[34]=R);let z;t[35]!==L||t[36]!==R?(z=(0,G.jsx)(`div`,{className:`min-w-0 pr-4`,children:(0,G.jsx)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:(0,G.jsxs)(oe,{children:[L,R]})})}),t[35]=L,t[36]=R,t[37]=z):z=t[37];let se;t[38]!==N||t[39]!==b||t[40]!==v||t[41]!==n.command||t[42]!==n.key||t[43]!==O?(se=O?(0,G.jsxs)(`button`,{type:`button`,onClick:()=>_({isRecording:!0}),"aria-label":`Edit shortcut for ${V(n.command)}`,className:`group inline-flex h-7 items-center gap-1.5 rounded-md border border-transparent px-1.5 outline-none transition-colors hover:border-border/70 hover:bg-background focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/24`,children:[(0,G.jsx)(xe,{value:n.key}),(0,G.jsx)(`span`,{className:`text-ui-10 uppercase tracking-[0.08em] text-muted-foreground/0 transition-opacity group-hover:text-muted-foreground/70 group-focus-visible:text-muted-foreground/70`,children:`Edit`})]}):(0,G.jsx)(ie,{"data-keybinding-capture":``,autoFocus:b,"aria-label":`Keybinding for ${V(n.command)}`,value:b?``:v,placeholder:b?`Press shortcut`:`Unassigned`,className:h(`h-7 w-44 rounded-md font-mono text-ui-12 sm:h-7`,b&&`border-primary/70 bg-primary/5`),onFocus:()=>_({isRecording:!0}),onBlur:()=>_({isRecording:!1}),onChange:e=>_({keyDraft:e.currentTarget.value}),onKeyDown:N}),t[38]=N,t[39]=b,t[40]=v,t[41]=n.command,t[42]=n.key,t[43]=O,t[44]=se):se=t[44];let ue;t[45]!==E||t[46]!==a||t[47]!==x||t[48]!==v||t[49]!==ne?(ue=E?(0,G.jsx)(l,{size:`xs`,className:`h-7 sm:h-7`,disabled:a||v.trim().length===0||!x,onClick:ne,children:a?`Saving`:`Save`}):null,t[45]=E,t[46]=a,t[47]=x,t[48]=v,t[49]=ne,t[50]=ue):ue=t[50];let B;t[51]!==ue||t[52]!==se?(B=(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-4`,children:[se,ue]}),t[51]=ue,t[52]=se,t[53]=B):B=t[53];let pe=!A&&`text-muted-foreground`,H;t[54]===pe?H=t[55]:(H=h(`inline-flex h-7 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-2.5 text-left font-mono text-ui-12 text-foreground shadow-xs/5 outline-none transition-colors hover:bg-accent focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/24`,pe),t[54]=pe,t[55]=H);let me;t[56]===n.command?me=t[57]:(me=V(n.command),t[56]=n.command,t[57]=me);let he=`Edit when clause for ${me}`,ge=A||`Always`,U;t[58]===ge?U=t[59]:(U=(0,G.jsx)(`span`,{className:`truncate`,children:ge}),t[58]=ge,t[59]=U);let W;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,G.jsx)(p,{className:`size-3.5 shrink-0 opacity-60`}),t[60]=W):W=t[60];let ve;t[61]!==H||t[62]!==he||t[63]!==U?(ve=(0,G.jsxs)(D,{className:H,"aria-label":he,children:[U,W]}),t[61]=H,t[62]=he,t[63]=U,t[64]=ve):ve=t[64];let Se,Ce;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(Se=e=>_({whenDraft:e}),Ce=e=>_({isWhenDraftValid:e}),t[65]=Se,t[66]=Ce):(Se=t[65],Ce=t[66]);let K;t[67]!==i||t[68]!==y?(K=(0,G.jsx)(re,{align:`start`,sideOffset:6,children:(0,G.jsx)(Oe,{value:y,variables:i,onChange:Se,onValidityChange:Ce})}),t[67]=i,t[68]=y,t[69]=K):K=t[69];let q;t[70]!==ve||t[71]!==K?(q=(0,G.jsx)(`div`,{className:`pr-4`,children:(0,G.jsxs)(ee,{children:[ve,K]})}),t[70]=ve,t[71]=K,t[72]=q):q=t[72];let J;t[73]===j?J=t[74]:(J=(0,G.jsx)(Te,{labels:j}),t[73]=j,t[74]=J);let we;t[75]!==S||t[76]!==C||t[77]!==T||t[78]!==a||t[79]!==c||t[80]!==s||t[81]!==n?(we=T?(0,G.jsxs)(u,{children:[(0,G.jsx)(g,{render:(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`size-7 text-muted-foreground hover:text-foreground sm:size-7`,disabled:a,"aria-label":`Actions for ${V(n.command)}`}),children:(0,G.jsx)(le,{className:`size-3.5`})}),(0,G.jsxs)(d,{align:`end`,className:`min-w-36`,children:[C?(0,G.jsx)(f,{disabled:a,onClick:()=>s(n),children:`Reset to default`}):null,S?(0,G.jsx)(f,{variant:`destructive`,disabled:a,onClick:()=>c(n),children:`Remove`}):null]})]}):null,t[75]=S,t[76]=C,t[77]=T,t[78]=a,t[79]=c,t[80]=s,t[81]=n,t[82]=we):we=t[82];let Y;t[83]===w?Y=t[84]:(Y=(0,G.jsx)(`span`,{className:`sr-only`,children:w}),t[83]=w,t[84]=Y);let X;t[85]!==J||t[86]!==we||t[87]!==Y?(X=(0,G.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[J,we,Y]}),t[85]=J,t[86]=we,t[87]=Y,t[88]=X):X=t[88];let Z;return t[89]!==B||t[90]!==q||t[91]!==X||t[92]!==z?(Z=(0,G.jsxs)(`div`,{className:`grid grid-cols-[minmax(190px,1.1fr)_minmax(220px,0.85fr)_minmax(210px,1fr)_60px] items-center px-4 py-1.5 text-sm even:bg-muted/15 hover:bg-accent/40`,children:[z,B,q,X]}),t[89]=B,t[90]=q,t[91]=X,t[92]=z,t[93]=Z):Z=t[93],Z}function Ne(e){let t=(0,ye.c)(81),{commandOptions:n,allRows:r,variables:s,isSaving:c,onSave:u,onCancel:d}=e,[f,g]=(0,be.useState)(``),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_={keyDraft:``,whenDraft:void 0,isRecording:!1,isWhenDraftValid:!0},t[0]=_):_=t[0];let[v,y]=(0,be.useReducer)(Ae,_),{keyDraft:b,whenDraft:x,isRecording:S,isWhenDraftValid:C}=v,w,T;t[1]!==r||t[2]!==b||t[3]!==x?(T=fe(x),w=_e(r,{rowId:`new`,key:b,when:T}),t[1]=r,t[2]=b,t[3]=x,t[4]=w,t[5]=T):(w=t[4],T=t[5]);let E=w,O;t[6]===f?O=t[7]:(O=f?V(f):`new keybinding`,t[6]=f,t[7]=O);let k=O,A;t[8]!==f||t[9]!==b||t[10]!==u||t[11]!==T?(A=()=>{f&&u({command:f,key:b,...T.trim().length>0?{when:T}:{}})},t[8]=f,t[9]=b,t[10]=u,t[11]=T,t[12]=A):A=t[12];let j=A,te;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(te=e=>{if(e.key===`Tab`)return;if(e.preventDefault(),e.key===`Escape`){y({keyDraft:``,isRecording:!1});return}let t=de(e.nativeEvent,navigator.platform);t&&y({keyDraft:t,isRecording:!1})},t[13]=te):te=t[13];let ne=te,M;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(M=e=>g(e),t[14]=M):M=t[14];let N;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,G.jsx)(a,{size:`xs`,className:`h-7 min-h-7 w-full max-w-60 rounded-md text-xs sm:h-7`,children:(0,G.jsx)(o,{placeholder:`Command`})}),t[15]=N):N=t[15];let P;t[16]===n?P=t[17]:(P=n.map(Pe),t[16]=n,t[17]=P);let F;t[18]===P?F=t[19]:(F=(0,G.jsx)(i,{alignItemWithTrigger:!1,matchTriggerWidth:!1,className:`max-h-72 w-fit min-w-56`,children:P}),t[18]=P,t[19]=F);let I;t[20]!==f||t[21]!==F?(I=(0,G.jsx)(`div`,{className:`min-w-0 pr-4`,children:(0,G.jsxs)(m,{value:f,onValueChange:M,children:[N,F]})}),t[20]=f,t[21]=F,t[22]=I):I=t[22];let R=`Keybinding for ${k}`,z=S?``:b,se=S?`Press shortcut`:`Unassigned`,le=S&&`border-primary/70 bg-primary/5`,ue;t[23]===le?ue=t[24]:(ue=h(`h-7 w-44 rounded-md font-mono text-ui-12 sm:h-7`,le),t[23]=le,t[24]=ue);let B,pe,H;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=()=>y({isRecording:!0}),pe=()=>y({isRecording:!1}),H=e=>y({keyDraft:e.currentTarget.value}),t[25]=B,t[26]=pe,t[27]=H):(B=t[25],pe=t[26],H=t[27]);let me;t[28]!==R||t[29]!==z||t[30]!==se||t[31]!==ue?(me=(0,G.jsx)(ie,{"data-keybinding-capture":``,"aria-label":R,value:z,placeholder:se,className:ue,onFocus:B,onBlur:pe,onChange:H,onKeyDown:ne}),t[28]=R,t[29]=z,t[30]=se,t[31]=ue,t[32]=me):me=t[32];let he;t[33]!==f||t[34]!==c||t[35]!==C||t[36]!==b?(he=c||!f||b.trim().length===0||!C,t[33]=f,t[34]=c,t[35]=C,t[36]=b,t[37]=he):he=t[37];let ge=c?`Saving`:`Save`,U;t[38]!==j||t[39]!==he||t[40]!==ge?(U=(0,G.jsx)(l,{size:`xs`,className:`h-7 sm:h-7`,disabled:he,onClick:j,children:ge}),t[38]=j,t[39]=he,t[40]=ge,t[41]=U):U=t[41];let W;t[42]!==me||t[43]!==U?(W=(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2 pr-4`,children:[me,U]}),t[42]=me,t[43]=U,t[44]=W):W=t[44];let ve=!T&&`text-muted-foreground`,xe;t[45]===ve?xe=t[46]:(xe=h(`inline-flex h-7 w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-2.5 text-left font-mono text-ui-12 text-foreground shadow-xs/5 outline-none transition-colors hover:bg-accent focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/24`,ve),t[45]=ve,t[46]=xe);let Se=`Edit when clause for ${k}`,Ce=T||`Always`,K;t[47]===Ce?K=t[48]:(K=(0,G.jsx)(`span`,{className:`truncate`,children:Ce}),t[47]=Ce,t[48]=K);let q;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,G.jsx)(p,{className:`size-3.5 shrink-0 opacity-60`}),t[49]=q):q=t[49];let J;t[50]!==xe||t[51]!==Se||t[52]!==K?(J=(0,G.jsxs)(D,{className:xe,"aria-label":Se,children:[K,q]}),t[50]=xe,t[51]=Se,t[52]=K,t[53]=J):J=t[53];let we,Y;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>y({whenDraft:e}),Y=e=>y({isWhenDraftValid:e}),t[54]=we,t[55]=Y):(we=t[54],Y=t[55]);let X;t[56]!==s||t[57]!==x?(X=(0,G.jsx)(re,{align:`start`,sideOffset:6,children:(0,G.jsx)(Oe,{value:x,variables:s,onChange:we,onValidityChange:Y})}),t[56]=s,t[57]=x,t[58]=X):X=t[58];let Z;t[59]!==J||t[60]!==X?(Z=(0,G.jsx)(`div`,{className:`pr-4`,children:(0,G.jsxs)(ee,{children:[J,X]})}),t[59]=J,t[60]=X,t[61]=Z):Z=t[61];let Q;t[62]===E?Q=t[63]:(Q=(0,G.jsx)(Te,{labels:E}),t[62]=E,t[63]=Q);let Ee;t[64]!==c||t[65]!==d?(Ee=(0,G.jsx)(l,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`size-7 text-muted-foreground hover:text-foreground sm:size-7`,disabled:c,"aria-label":`Cancel new keybinding`,onClick:d}),t[64]=c,t[65]=d,t[66]=Ee):Ee=t[66];let De;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,G.jsx)(L,{className:`size-3.5`}),t[67]=De):De=t[67];let $;t[68]===Ee?$=t[69]:($=(0,G.jsx)(ae,{render:Ee,children:De}),t[68]=Ee,t[69]=$);let ke;t[70]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,G.jsx)(ce,{side:`top`,children:`Cancel`}),t[70]=ke):ke=t[70];let je;t[71]===$?je=t[72]:(je=(0,G.jsxs)(oe,{children:[$,ke]}),t[71]=$,t[72]=je);let Me;t[73]!==Q||t[74]!==je?(Me=(0,G.jsxs)(`div`,{className:`flex items-center justify-end gap-1`,children:[Q,je]}),t[73]=Q,t[74]=je,t[75]=Me):Me=t[75];let Ne;return t[76]!==I||t[77]!==W||t[78]!==Z||t[79]!==Me?(Ne=(0,G.jsxs)(`div`,{className:`grid grid-cols-[minmax(190px,1.1fr)_minmax(220px,0.85fr)_minmax(210px,1fr)_60px] items-center px-4 py-1.5 text-sm even:bg-muted/15 hover:bg-accent/40`,children:[I,W,Z,Me]}),t[76]=I,t[77]=W,t[78]=Z,t[79]=Me,t[80]=Ne):Ne=t[80],Ne}function Pe(e){return(0,G.jsx)(c,{value:e,className:`min-h-7 w-full py-1 text-ui-12`,children:(0,G.jsx)(`span`,{className:`truncate`,children:V(e)})},e)}function Fe(){let e=(0,ye.c)(65),t=b(S),n=b(w),r=b(C),i=E(),a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a={reportFailure:!1},e[0]=a):a=e[0];let o=y(x.upsertKeybinding,a),s;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(s={reportFailure:!1},e[1]=s):s=e[1];let c=y(x.removeKeybinding,s),u=te(i?.environmentId??null,r),[d,f]=(0,be.useState)(``),[p,m]=(0,be.useState)(!1),h=(0,be.useRef)(null),[g,T]=(0,be.useState)(null),[D,ee]=(0,be.useState)(!1),k;e[2]!==t||e[3]!==d?(k=ge(t,d),e[2]=t,e[3]=d,e[4]=k):k=e[4];let A=k,j;e[5]===t?j=e[6]:(j=me(t),e[5]=t,e[6]=j);let ne=j,re;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(re=pe(),e[7]=re):re=e[7];let ie=re,M,I;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(M=()=>{let e=e=>{if(!(e.metaKey||e.ctrlKey)||e.altKey||e.key.toLowerCase()!==`f`)return;let t=e.target;t!==h.current&&t instanceof HTMLElement&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable)||(e.preventDefault(),m(!0),requestAnimationFrame(()=>{h.current?.focus(),h.current?.select()}))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},I=[],e[8]=M,e[9]=I):(M=e[8],I=e[9]),(0,be.useEffect)(M,I);let L;e[10]!==n||e[11]!==u?(L=()=>{n&&(async()=>{let e=await u(n);if(e._tag===`Success`||v(e))return;let t=_(e);P.add({title:`Unable to open keybindings file`,description:t instanceof Error?t.message:`The keybindings file was not opened.`,type:`error`})})()},e[10]=n,e[11]=u,e[12]=L):L=e[12];let le=L,B;e[13]!==i||e[14]!==o?(B=e=>{if(!i)return;T(e.command);let t={command:e.command,key:e.key.trim(),...e.when?.trim()?{when:e.when.trim()}:{},...e.replace?{replace:e.replace}:{}};(async()=>{let e=await o({environmentId:i.environmentId,input:t});if(T(null),e._tag===`Success`){ee(!1);return}if(!v(e)){let t=_(e);P.add({title:`Unable to save keybinding`,description:t instanceof Error?t.message:`The keybinding was not saved.`,type:`error`})}})()},e[13]=i,e[14]=o,e[15]=B):B=e[15];let V=B,de;e[16]!==i||e[17]!==c?(de=e=>{i&&(T(e.command),(async()=>{let t=await c({environmentId:i.environmentId,input:je(e)});if(T(null),t._tag===`Failure`&&!v(t)){let e=_(t);P.add({title:`Unable to remove keybinding`,description:e instanceof Error?e.message:`The keybinding was not removed.`,type:`error`})}})())},e[16]=i,e[17]=c,e[18]=de):de=e[18];let fe=de,H;e[19]===V?H=e[20]:(H=e=>{e.defaultKey&&V({command:e.command,key:e.defaultKey,when:e.defaultWhen.trim().length>0?e.defaultWhen:void 0,replace:{command:e.command,key:e.key,...e.when.trim().length>0?{when:e.when}:{}}})},e[19]=V,e[20]=H);let he=H,_e=A.length+ +!!D,U=A.length+ +!!D===1?`binding`:`bindings`,W;e[21]!==_e||e[22]!==U?(W=(0,G.jsxs)(`span`,{className:`text-ui-11 text-muted-foreground`,children:[_e,` `,U]}),e[21]=_e,e[22]=U,e[23]=W):W=e[23];let xe=W,Se;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(Se=z(`keybindings`),e[24]=Se):Se=e[24];let K;e[25]!==xe||e[26]!==p||e[27]!==d?(K=(0,G.jsx)(Ce,{query:d,onChange:f,isOpen:p,onOpenChange:m,inputRef:h,collapsedAccessory:xe}),e[25]=xe,e[26]=p,e[27]=d,e[28]=K):K=e[28];let q;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(q=()=>ee(!0),e[29]=q):q=e[29];let J;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,G.jsxs)(oe,{children:[(0,G.jsx)(ae,{render:(0,G.jsx)(l,{type:`button`,size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,onClick:q,"aria-label":`Add keybinding`,children:(0,G.jsx)(N,{className:`size-3`})})}),(0,G.jsx)(ce,{side:`top`,children:`Add keybinding`})]}),e[30]=J):J=e[30];let we=!n,Y;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,G.jsx)(ve,{className:`size-3`}),e[31]=Y):Y=e[31];let X;e[32]!==le||e[33]!==we?(X=(0,G.jsx)(ae,{render:(0,G.jsx)(l,{type:`button`,size:`icon-xs`,variant:`ghost`,className:`size-5 rounded-sm p-0 text-muted-foreground hover:text-foreground`,disabled:we,onClick:le,"aria-label":`Open keybindings.json`,children:Y})}),e[32]=le,e[33]=we,e[34]=X):X=e[34];let Z;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,G.jsx)(ce,{side:`top`,children:`Open keybindings.json`}),e[35]=Z):Z=e[35];let Q;e[36]===X?Q=e[37]:(Q=(0,G.jsxs)(oe,{children:[X,Z]}),e[36]=X,e[37]=Q);let Te;e[38]!==K||e[39]!==Q?(Te=(0,G.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[K,J,Q]}),e[38]=K,e[39]=Q,e[40]=Te):Te=e[40];let Ee;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=ue?null:(0,G.jsxs)(`div`,{className:`flex items-start gap-2 border-b border-warning/20 bg-warning/5 px-3 py-2.5 text-ui-12 leading-relaxed text-muted-foreground sm:px-4`,children:[(0,G.jsx)(R,{className:`mt-0.5 size-3.5 shrink-0 text-warning`}),(0,G.jsx)(`p`,{children:`Some shortcuts may be claimed by the browser before DasCode sees them. Use the desktop app for better keybinding support.`})]}),e[41]=Ee):Ee=e[41];let De;e[42]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,G.jsxs)(`div`,{className:`grid min-w-[680px] grid-cols-[minmax(190px,1.1fr)_minmax(220px,0.85fr)_minmax(210px,1fr)_60px] border-b border-border/70 bg-muted/25 px-4 py-2 text-ui-11 font-semibold uppercase tracking-[0.07em] text-muted-foreground`,children:[(0,G.jsx)(`div`,{children:`Command`}),(0,G.jsx)(`div`,{children:`Keybinding`}),(0,G.jsx)(`div`,{children:`When`}),(0,G.jsx)(`div`,{children:`Status`})]}),e[42]=De):De=e[42];let $;e[43]!==ne||e[44]!==D||e[45]!==A||e[46]!==V||e[47]!==g?($=D?(0,G.jsx)(Ne,{commandOptions:ne,allRows:A,variables:ie,isSaving:g!==null,onSave:V,onCancel:()=>ee(!1)}):null,e[43]=ne,e[44]=D,e[45]=A,e[46]=V,e[47]=g,e[48]=$):$=e[48];let Oe;e[49]!==fe||e[50]!==he||e[51]!==A||e[52]!==V||e[53]!==g?(Oe=A.map(e=>(0,G.jsx)(Me,{row:e,allRows:A,variables:ie,isSaving:g===e.command,onSave:V,onReset:he,onRemove:fe},e.id)),e[49]=fe,e[50]=he,e[51]=A,e[52]=V,e[53]=g,e[54]=Oe):Oe=e[54];let ke;e[55]!==D||e[56]!==A.length?(ke=A.length===0&&!D?(0,G.jsx)(`div`,{className:`px-4 py-12 text-center text-sm text-muted-foreground`,children:`No keybindings match your search.`}):null,e[55]=D,e[56]=A.length,e[57]=ke):ke=e[57];let Ae;e[58]!==$||e[59]!==Oe||e[60]!==ke?(Ae=(0,G.jsxs)(O,{chainVerticalScroll:!0,scrollFade:!0,hideScrollbars:!0,className:`w-full max-w-full rounded-none`,children:[De,(0,G.jsxs)(`div`,{className:`min-w-[680px] divide-y divide-border/60`,children:[$,Oe,ke]})]}),e[58]=$,e[59]=Oe,e[60]=ke,e[61]=Ae):Ae=e[61];let Pe;return e[62]!==Te||e[63]!==Ae?(Pe=(0,G.jsx)(F,{className:`max-w-5xl`,children:(0,G.jsxs)(se,{...Se,headerAction:Te,children:[Ee,Ae]})}),e[62]=Te,e[63]=Ae,e[64]=Pe):Pe=e[64],Pe}var Ie=Fe;export{Ie as component};
|
|
2
|
+
//# sourceMappingURL=settings.keybindings-C6b2im1-.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{n as e,o as t,t as n}from"./compiler-runtime-CUwoe8mk.js";import{r}from"./SettingsPanels-DgK9Gy4R.js";var i=n(),a=t(e());function o(){let e=(0,i.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,a.jsx)(r,{}),e[0]=t):t=e[0],t}export{o as component};
|
|
2
|
+
//# sourceMappingURL=settings.providers-CzhQRSvU.js.map
|