/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}:root{--bg: #14110e;--panel: #1d1915;--raise: #28221c;--line: #3a3129;--ink: #ece5dc;--muted: #a0968a;--accent: #d98b4a;--good: #7fb069;--warn: #e0b04a;--bad: #e06c5a;--term-bg: #14110e;--term-fg: #ece5dc;--term-cursor: #d98b4a;--term-selection: rgba(217, 139, 74, .35);--ansi-0: #2a2520;--ansi-1: #e06c5a;--ansi-2: #8fbf6a;--ansi-3: #e0b04a;--ansi-4: #6fa3d6;--ansi-5: #c98bd0;--ansi-6: #5fbfb3;--ansi-7: #d8cfc4;--ansi-8: #6e645a;--ansi-9: #ff8a75;--ansi-10: #aee08a;--ansi-11: #ffd070;--ansi-12: #93c2f0;--ansi-13: #e3a8ea;--ansi-14: #83e0d4;--ansi-15: #fffaf3;--app-height: 100dvh;--tabs-height: 44px;color-scheme:dark}@media(prefers-color-scheme:light){:root{--bg: #f7f4ef;--panel: #efe9e1;--raise: #e4dcd1;--line: #d3c8ba;--ink: #2a241e;--muted: #74695d;--accent: #b8652a;--good: #4f8a3a;--warn: #a87b12;--bad: #b8412f;--term-bg: #fbf8f3;--term-fg: #2a241e;--term-cursor: #b8652a;--term-selection: rgba(184, 101, 42, .25);--ansi-0: #2a241e;--ansi-1: #b8412f;--ansi-2: #4f7f2a;--ansi-3: #8a6410;--ansi-4: #2f67a8;--ansi-5: #8f4a98;--ansi-6: #267d73;--ansi-7: #c9bfb2;--ansi-8: #74695d;--ansi-9: #d0543f;--ansi-10: #5f9434;--ansi-11: #a87b12;--ansi-12: #3b7bc4;--ansi-13: #a45cae;--ansi-14: #2f958a;--ansi-15: #ffffff;color-scheme:light}}*{box-sizing:border-box}html,body,#root{margin:0;height:100%;background:var(--bg);color:var(--ink);font:14px/1.4 system-ui,-apple-system,Segoe UI,sans-serif;overscroll-behavior:none}button{font:inherit;color:inherit}.app{position:fixed;left:0;right:0;top:var(--app-top, 0px);display:flex;flex-direction:column;height:var(--app-height);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);overflow:hidden}.tabbar{display:flex;align-items:stretch;gap:2px;min-height:var(--tabs-height);padding-top:env(safe-area-inset-top);background:var(--panel);border-bottom:1px solid var(--line);flex:none}.tabs{display:flex;gap:2px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tab{display:flex;align-items:center;gap:6px;max-width:220px;min-width:0;padding:0 4px 0 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);cursor:pointer;flex:none}.tab.active{color:var(--ink);background:var(--bg);border-bottom-color:var(--accent)}.tab.exited .title{text-decoration:line-through;opacity:.7}.tab .glyph{font-family:Cascadia Mono,Consolas,monospace;color:var(--accent);flex:none}.tab .title{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;min-width:0}.tab .x{display:grid;place-items:center;min-width:32px;height:32px;padding:0;border:0;border-radius:6px;background:transparent;cursor:pointer;color:var(--muted);flex:none}.tab .x:hover{background:var(--raise);color:var(--ink)}.tab .x.confirm{min-width:48px;color:var(--bad);font-size:12px;font-weight:600}.bar-actions{display:flex;align-items:center;gap:4px;padding:0 6px;flex:none}.plus{width:40px;height:36px;border:0;border-radius:8px;background:transparent;font-size:22px;line-height:1;cursor:pointer}.plus:hover,.plus[aria-expanded=true]{background:var(--raise)}.status{width:10px;height:10px;border-radius:50%;margin:0 8px;background:var(--warn);flex:none}.status.live{background:var(--good)}.status.gone{background:var(--bad)}.status.reconnecting,.status.connecting{animation:pulse 1s ease-in-out infinite alternate}@keyframes pulse{to{opacity:.35}}.menu{position:fixed;z-index:20;top:calc(var(--tabs-height) + env(safe-area-inset-top) + 4px);right:calc(8px + env(safe-area-inset-right));min-width:240px;max-width:calc(100vw - 16px);padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:0 12px 32px #00000059}.menu button.item{display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:0 10px;border:0;border-radius:6px;background:transparent;text-align:left;cursor:pointer}.menu button.item:hover,.menu button.item:focus-visible{background:var(--raise);outline:none}.menu .glyph{width:20px;color:var(--accent);font-family:Cascadia Mono,Consolas,monospace}.menu hr{border:0;border-top:1px solid var(--line);margin:6px 0}.menu .where{display:flex;align-items:center;gap:8px;padding:6px 10px 4px;color:var(--muted);font-size:12px}.menu .where span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;direction:rtl;text-align:left}.scrim{position:fixed;top:0;right:0;bottom:0;left:0;z-index:10}.screen{position:relative;flex:1;min-height:0;background:var(--term-bg);overflow:hidden}.hosts{position:absolute;top:0;right:0;bottom:0;left:0}.term-host{position:absolute;top:4px;right:0;bottom:0;left:6px;overflow:hidden}.term-host.oversize{overflow:auto}.term-host .xterm{height:100%}.empty{display:grid;place-content:center;gap:12px;height:100%;padding:24px;text-align:center;color:var(--muted)}.empty .choices{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.empty button{min-height:44px;padding:0 16px;border:1px solid var(--line);border-radius:8px;background:var(--panel);cursor:pointer}.empty button:hover{border-color:var(--accent)}.empty .glyph{color:var(--accent);margin-right:6px;font-family:Cascadia Mono,Consolas,monospace}.toast{position:absolute;left:50%;bottom:16px;z-index:5;transform:translate(-50%);max-width:calc(100% - 32px);padding:8px 14px;border-radius:8px;background:var(--raise);border:1px solid var(--bad);color:var(--ink)}.keybar{display:flex;gap:4px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));overflow-x:auto;background:var(--panel);border-top:1px solid var(--line);flex:none;scrollbar-width:none;-webkit-user-select:none;user-select:none;touch-action:pan-x}.keybar::-webkit-scrollbar{display:none}.keybar button{min-width:40px;height:40px;padding:0 10px;border:1px solid var(--line);border-radius:6px;background:var(--raise);font-family:Cascadia Mono,Consolas,monospace;font-size:14px;flex:none;-webkit-tap-highlight-color:transparent}.keybar button:active{background:var(--line)}.keybar button[aria-pressed=true]{background:var(--accent);border-color:var(--accent);color:#1a120b}.select{position:absolute;top:0;right:0;bottom:0;left:0;z-index:8;display:flex;flex-direction:column;background:var(--term-bg)}.select header{display:flex;gap:8px;align-items:center;padding:6px 8px;border-bottom:1px solid var(--line);background:var(--panel)}.select header span{flex:1;color:var(--muted);font-size:12px}.select header button{min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:6px;background:var(--raise)}.select pre{flex:1;margin:0;padding:8px;overflow:auto;font:12px/1.3 Cascadia Mono,Consolas,ui-monospace,monospace;white-space:pre;-webkit-user-select:text;user-select:text}.notice{display:grid;place-content:center;height:100%;padding:24px;max-width:34rem;margin:0 auto;gap:8px}.notice h1{margin:0;font-size:20px}.notice p{margin:0;color:var(--muted)}.notice code{color:var(--ink);background:var(--panel);padding:1px 5px;border-radius:4px}
