/**
 * 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}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:#181818;color:#e6e6e6}.app{display:flex;flex-direction:column;height:100%}.topbar{display:flex;align-items:center;gap:16px;padding:8px 14px;background:#202020;border-bottom:1px solid #333;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:8px;font-weight:600;font-size:14px}.brand-mark{color:#f26207}.room-badge{font-family:Menlo,Monaco,Courier New,monospace;font-size:12px;font-weight:400;background:#2b2b2b;border:1px solid #3a3a3a;border-radius:4px;padding:2px 7px;color:#9cdcfe}.topbar-right{margin-left:auto;display:flex;align-items:center;gap:10px}.name-field{display:flex;align-items:center;gap:6px;font-size:12px;color:#9a9a9a}.name-field input{background:#181818;border:1px solid #3a3a3a;border-radius:4px;color:#e6e6e6;padding:5px 8px;font-size:13px;width:130px}.name-field input:focus{outline:none;border-color:#f26207}.btn{background:#f26207;border:none;border-radius:4px;color:#fff;padding:6px 12px;font-size:13px;cursor:pointer}.btn:hover{background:#d95706}.conn,.status{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#9a9a9a}.status-dot{width:8px;height:8px;border-radius:50%;background:#888;display:inline-block}.conn-on .status-dot,.status-ready .status-dot{background:#30a46c}.conn-off .status-dot,.status-disconnected .status-dot{background:#e5484d}.status-connecting .status-dot{background:#f5a623}.peer-list{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.peer-chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;background:#2b2b2b;border:1px solid #3a3a3a;border-radius:12px;padding:3px 9px}.peer-dot{width:8px;height:8px;border-radius:50%}.peer-empty{font-size:12px;color:#777;font-style:italic}.workspace{display:flex;flex-direction:column;flex:1;min-height:0}.editor-area{display:flex;flex:1;min-height:0}.filetree{width:190px;flex:0 0 auto;display:flex;flex-direction:column;background:#181818;border-right:1px solid #333;overflow:hidden}.filetree-toggle{width:34px;flex:0 0 auto;background:#181818;border:none;border-right:1px solid #333;color:#ccc;cursor:pointer;font-size:16px}.filetree-toggle:hover{background:#2b2b2b}.filetree-header{display:flex;align-items:center;justify-content:space-between;padding:7px 8px 7px 12px;font-size:11px;letter-spacing:.08em;color:#888;border-bottom:1px solid #2b2b2b}.filetree-actions{display:flex;gap:2px}.filetree-actions button{background:transparent;border:none;color:#9a9a9a;cursor:pointer;font-size:15px;line-height:1;padding:2px 5px;border-radius:3px}.filetree-actions button:hover{background:#333;color:#fff}.filetree-list{flex:1;overflow:auto;padding:4px 0}.filetree-item{display:flex;align-items:center;gap:7px;padding:4px 8px 4px 10px;font-size:12.5px;color:#c5c5c5;cursor:pointer;white-space:nowrap}.filetree-item:hover{background:#252526}.filetree-item.active{background:#094771;color:#fff}.filetree-icon{font-size:13px}.filetree-name{flex:1;overflow:hidden;text-overflow:ellipsis}.filetree-delete{background:transparent;border:none;color:#888;cursor:pointer;opacity:0;font-size:15px;line-height:1}.filetree-item:hover .filetree-delete{opacity:1}.filetree-delete:hover{color:#f47067}.filetree-empty,.no-file{padding:12px;font-size:12px;color:#777;font-style:italic}.editor-pane{display:flex;flex-direction:column;flex:1;min-height:0}.pane-header{display:flex;align-items:center;gap:12px;padding:6px 14px;background:#202020;border-bottom:1px solid #333;font-size:12px}.pane-title{font-weight:600;color:#ccc}.pane-hint{color:#777}.editor-wrap{flex:1;min-height:0;overflow:hidden}.editor-host,.editor-host .cm-editor{height:100%}.terminal-pane{display:flex;flex-direction:column;min-height:120px;flex:0 0 auto;background:#1e1e1e}.terminal-host{flex:1;min-height:0;padding:6px 8px;overflow:hidden}.terminal-host .xterm{height:100%}.lang-field select,.lang-select{background:#181818;border:1px solid #3a3a3a;border-radius:4px;color:#e6e6e6;padding:3px 6px;font-size:12px}.lang-field select:focus,.lang-select:focus{outline:none;border-color:#f26207}.resize-handle{height:8px;flex:0 0 auto;display:flex;align-items:center;justify-content:center;background:#181818;border-top:2px solid #f26207;cursor:row-resize;touch-action:none;-webkit-user-select:none;user-select:none}.resize-handle:hover,.resize-handle:focus-visible,body.resizing-terminal .resize-handle{background:#333;outline:none}.resize-grip{width:44px;height:2px;border-radius:2px;background:#777}.resize-handle:hover .resize-grip,.resize-handle:focus-visible .resize-grip,body.resizing-terminal .resize-grip{background:#f26207}body.resizing-terminal{cursor:row-resize!important}body.resizing-terminal *{-webkit-user-select:none!important;user-select:none!important}.run-bar{display:flex;align-items:center;gap:8px;padding:5px 14px;background:#1b1b1b;border-bottom:1px solid #333}.btn-run{background:#2ea043}.btn-run:hover{background:#268839}.btn-run:disabled,.btn:disabled{background:#3a3a3a;color:#888;cursor:not-allowed}.btn-stop{background:#e5484d}.btn-stop:hover{background:#cc353a}.btn-ghost{background:transparent;border:1px solid #3a3a3a;color:#9a9a9a}.btn-ghost:hover{background:#2b2b2b}.run-lang{font-size:12px;color:#9cdcfe;font-family:Menlo,Monaco,Courier New,monospace}.cwd-badge{font-family:Menlo,Monaco,Courier New,monospace;font-size:12px;color:#4ec9b0;background:#181818;border:1px solid #3a3a3a;border-radius:4px;padding:2px 7px;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.run-status{font-size:12px;color:#9a9a9a;margin-left:auto}.run-status.ok{color:#30a46c}.run-status.fail{color:#e5484d}.console-pane{max-height:160px;overflow:auto;background:#111;border-bottom:1px solid #333}.console-out{margin:0;padding:8px 14px;font-family:Menlo,Monaco,Courier New,monospace;font-size:12.5px;line-height:1.45;color:#d4d4d4;white-space:pre-wrap;word-break:break-word}.console-err{color:#f47067}.fatal-banner{background:#5a1d1d;color:#ffb4b4;padding:8px 14px;font-size:13px}.voice{position:relative}.voice-btn.active{background:#2ea043}.voice-btn.active:hover{background:#268839}.voice-panel{position:absolute;top:calc(100% + 8px);right:0;z-index:200;width:250px;background:#252526;border:1px solid #454545;border-radius:8px;box-shadow:0 10px 30px #00000080;padding:10px;font-size:12.5px}.voice-panel-title{color:#888;font-size:11px;letter-spacing:.08em;margin-bottom:8px}.voice-person{display:flex;align-items:center;gap:8px;padding:4px 2px}.voice-avatar{width:26px;height:26px;flex:0 0 auto;border-radius:50%;background:#3a3a3a;color:#ccc;display:grid;place-items:center;font-size:10px;font-weight:700}.voice-avatar.you{background:#f26207;color:#fff}.voice-name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.voice-mic.off{opacity:.6}.voice-panel-actions{display:flex;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid #3a3a3a}.voice-panel-actions .btn{flex:1}.voice-note{color:#777;font-size:11px;margin-top:8px}.voice-error{position:absolute;top:calc(100% + 8px);right:0;z-index:200;width:260px;background:#5a1d1d;color:#ffb4b4;border-radius:6px;padding:8px 10px;font-size:12px}.cm-tooltip.cm-tooltip-autocomplete,.cm-tooltip.cm-intellisense-tooltip{background:#252526!important;border:1px solid #454545!important;border-radius:6px!important;box-shadow:0 8px 24px #00000073!important;color:#d4d4d4!important;max-width:520px}.cm-tooltip-autocomplete>ul{font-family:Menlo,Monaco,Courier New,monospace!important;font-size:12.5px!important}.cm-tooltip-autocomplete>ul>li{padding:3px 8px!important}.cm-tooltip-autocomplete>ul>li[aria-selected]{background:#094771!important;color:#fff!important}.cm-completionIcon{opacity:.85}.cm-completionDetail{color:#9a9a9a!important;font-style:normal!important;margin-left:12px}.cm-completionInfo{background:#1e1e1e!important;border-left:1px solid #454545!important;color:#d4d4d4!important;padding:8px 10px!important;font-size:12px;max-width:320px;white-space:pre-wrap}.cm-intellisense{background:#252526;color:#d4d4d4;border:1px solid #454545;border-radius:6px;box-shadow:0 8px 24px #00000073;padding:8px 10px;max-width:460px;font-size:12.5px}.cm-intellisense-title{font-family:Menlo,Monaco,Courier New,monospace;color:#9cdcfe;white-space:pre-wrap;margin-bottom:6px}.cm-intellisense-docs{color:#bdbdbd;line-height:1.45;white-space:pre-wrap}.cm-lintRange-error{background-image:none!important;text-decoration:underline wavy #f47067;text-underline-offset:3px}.cm-lintRange-warning{background-image:none!important;text-decoration:underline wavy #d7ba7d;text-underline-offset:3px}.cm-lintRange-info{background-image:none!important;text-decoration:underline dotted #9cdcfe;text-underline-offset:3px}.cm-tooltip-lint{background:#252526!important;border:1px solid #454545!important;color:#d4d4d4!important}.app-loading{display:grid;place-items:center;height:100%;color:#888;font-size:14px}.login-screen{display:grid;place-items:center;min-height:100%;background:radial-gradient(circle at 50% 0%,#2a2a2a,#141414 70%);padding:24px}.login-card{width:100%;max-width:380px;background:#1e1e1e;border:1px solid #3a3a3a;border-radius:12px;box-shadow:0 20px 60px #00000073;padding:28px;display:flex;flex-direction:column;gap:14px}.login-brand{font-size:18px;font-weight:700;color:#ccc}.login-card h1{margin:0;font-size:22px;color:#fff}.login-sub{margin:0 0 6px;font-size:13px;color:#9a9a9a;line-height:1.5}.login-card label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#aaa}.login-card input{background:#252526;border:1px solid #3a3a3a;border-radius:6px;color:#e6e6e6;padding:10px 12px;font-size:14px}.login-card input:focus{outline:none;border-color:#f26207}.login-submit{margin-top:6px;padding:10px;font-size:14px}.login-switch{background:transparent;border:none;color:#9cdcfe;cursor:pointer;font-size:12.5px;padding:4px}.login-switch:hover{text-decoration:underline}.login-error{background:#5a1d1d;color:#ffb4b4;border-radius:6px;padding:8px 10px;font-size:12.5px}.peer-list-wrap{position:relative}.peer-count{display:inline-flex;align-items:center;gap:7px;background:#2b2b2b;border:1px solid #3a3a3a;border-radius:14px;color:#ccc;padding:4px 10px;font-size:12px;cursor:pointer}.peer-count:hover{border-color:#f26207}.peer-count-dot{width:8px;height:8px;border-radius:50%;background:#30a46c}.peer-dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:200;width:250px;background:#252526;border:1px solid #454545;border-radius:8px;box-shadow:0 10px 30px #00000080;padding:10px}.peer-dropdown-title{color:#888;font-size:11px;letter-spacing:.08em;margin-bottom:8px}.peer-row{display:flex;align-items:center;gap:9px;padding:5px 2px}.peer-avatar{width:26px;height:26px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:10px;font-weight:700}.peer-row-info{display:flex;flex-direction:column;flex:1;min-width:0}.peer-row-name{font-size:12.5px;color:#ddd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.peer-row-user{font-size:11px;color:#888}.signed-in{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#ccc;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:768px){.topbar{gap:8px;padding:6px 10px}.topbar-right{gap:6px;flex-wrap:wrap;justify-content:flex-end}.signed-in{max-width:110px}.filetree{display:none}.editor-area{min-height:0}.editor-wrap{min-height:280px}.pane-header{flex-wrap:wrap;gap:8px;padding:6px 10px}.pane-hint{display:none}.lang-field select,.lang-select{max-width:140px}.run-bar{flex-wrap:wrap;gap:6px}.cwd-badge{max-width:150px}.terminal-pane,.terminal-host{min-height:140px}.console-pane{max-height:120px}.peer-dropdown{position:fixed;top:56px;left:8px;right:8px;width:auto}.voice-panel,.voice-error{position:fixed;right:8px;top:56px;width:auto;max-width:calc(100vw - 16px)}}@media(max-width:420px){.brand{font-size:13px}.peer-count{font-size:11px;padding:3px 8px}.btn{padding:6px 9px;font-size:12px}}
