/**
 * 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}@font-face{font-family:"Web437 IBM VGA 8x16";src:url(/fonts/Web437_IBM_VGA_8x16.woff) format("woff");font-weight:400;font-style:normal}:root{--phosphor: #33ff66;--phosphor-dim: #1a8033;--room-bg: #0a0a0c;--bezel-plastic: #c8c0ae;--bezel-plastic-dark: #8f886f;--bezel-shadow: rgba(0, 0, 0, .55);--case-top: #d7cfbd;--case-face: #cbc3af;--case-face-dark: #aaa28d;--bay-plastic: #d9d1c0;--slot-dark: #232320}*{margin:0;padding:0;box-sizing:border-box}html,body{height:100%;background:var(--room-bg);overflow:hidden;font-family:Consolas,Courier New,monospace}#room{height:100%;display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 40%,#16161c 0%,var(--room-bg) 70%)}#crt-canvas{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none}body.crt-active #terminal{opacity:0}body.crt-active #scanlines{display:none}#rig{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center center;display:flex;align-items:flex-end;justify-content:center;gap:30px}#rig-stack{display:flex;flex-direction:column;align-items:center}#bezel{position:relative;z-index:2;padding:58px 58px 96px;border-radius:30px;background:linear-gradient(158deg,var(--bezel-plastic) 0%,var(--bezel-plastic-dark) 100%);box-shadow:inset 0 3px 4px #ffffff6b,inset 0 -12px 22px #0000004d,inset 7px 0 16px #0000001f,inset -7px 0 16px #0000001f,0 22px 38px #00000073}.monitor-stand{position:relative;z-index:1;margin-top:-8px;display:flex;flex-direction:column;align-items:center}.stand-neck{width:168px;height:30px;border-radius:5px 5px 3px 3px;background:linear-gradient(180deg,var(--bezel-plastic) 0%,var(--bezel-plastic-dark) 100%);box-shadow:inset 0 2px 2px #ffffff4d,inset 0 -4px 8px #00000038}.stand-base{width:360px;height:66px;margin-top:-6px;border-radius:50%/62%;background:linear-gradient(180deg,var(--bezel-plastic) 0%,var(--bezel-plastic-dark) 100%);box-shadow:inset 0 4px 5px #ffffff59,inset 0 -10px 16px #00000042,0 16px 22px #0006}#case{position:relative;z-index:1;align-self:stretch;min-height:300px;margin-top:-6px;padding:26px 36px;border-radius:10px 10px 16px 16px;background:linear-gradient(178deg,var(--case-top) 0%,var(--case-face) 12%,var(--case-face-dark) 100%);box-shadow:inset 0 2px 2px #ffffff73,inset 0 -9px 16px #00000042,0 30px 60px var(--bezel-shadow);display:flex;align-items:stretch;gap:30px}#case:before{content:"";position:absolute;top:0;left:50%;transform:translate(-50%);width:28%;height:18px;border-radius:50%;background:radial-gradient(ellipse at center,#0000003d,#0000 72%);pointer-events:none}.case-left{flex:0 0 auto;display:flex;flex-direction:column;justify-content:space-between;gap:16px}.case-brand{display:flex;flex-direction:column;gap:4px}.cb-name{font-size:22px;font-weight:700;letter-spacing:4px;color:#4a4536;text-shadow:0 1px 0 rgba(255,255,255,.35)}.cb-model{font-size:13px;letter-spacing:3px;color:#6c6553}.case-controls{display:flex;align-items:center;gap:20px}.case-leds{display:flex;flex-direction:column;gap:8px}.cled{display:flex;align-items:center;gap:8px;font-size:11px;letter-spacing:1.5px;color:#6c6553}.cled i{width:9px;height:9px;border-radius:50%;background:#2a2b24;box-shadow:inset 0 1px 1px #0009;transition:background .4s,box-shadow .4s}body.powered-on .cled-power i{background:#46e07a;box-shadow:0 0 6px 1px #46e07ab3}body.powered-on .cled-turbo i{background:#ffb347;box-shadow:0 0 6px 1px #ffb34799}body.powered-on .cled-hdd i{background:#7a1d1d;animation:hdd-flicker 2.7s steps(1,end) infinite}@keyframes hdd-flicker{0%,to{background:#7a1d1d;box-shadow:inset 0 1px 1px #0009}3%,9%{background:#ff4d4d;box-shadow:0 0 6px 1px #ff4d4db3}6%{background:#7a1d1d;box-shadow:inset 0 1px 1px #0009}47%,52%{background:#ff4d4d;box-shadow:0 0 6px 1px #ff4d4db3}}.case-vents{flex:1 1 auto;align-self:stretch;margin:4px 0;border-radius:3px;background:repeating-linear-gradient(to bottom,rgba(0,0,0,.16) 0px,rgba(0,0,0,.16) 1px,rgba(255,255,255,.22) 2px,rgba(255,255,255,.22) 3px,transparent 3px,transparent 7px)}.drive-bays{display:flex;flex-direction:column;justify-content:center;gap:14px;flex:0 0 auto}.bay{position:relative;border-radius:4px;background:linear-gradient(180deg,var(--bay-plastic),var(--case-face-dark));box-shadow:inset 0 1px #fff6,inset 0 -1px 2px #0000002e}.bay525{width:220px;height:46px;display:flex;align-items:center;padding:0 11px;gap:11px}.bay525-slot{flex:1 1 auto;height:7px;border-radius:2px;background:var(--slot-dark);box-shadow:inset 0 1px 2px #000c}.bay525-lever{width:16px;height:18px;border-radius:2px;background:linear-gradient(180deg,#3a3a34,#1f1f1b);box-shadow:inset 0 1px #ffffff26}.bay35{width:220px;height:32px;display:flex;align-items:center;padding:0 11px;gap:9px}.bay35-slot{flex:1 1 auto;height:5px;border-radius:2px;background:var(--slot-dark);box-shadow:inset 0 1px 2px #000c}.bay35-eject{width:12px;height:8px;border-radius:1px;background:linear-gradient(180deg,#e9e2d2,#c3bba8);box-shadow:inset 0 1px #fff9,0 1px 1px #0003}.bay35-led{width:7px;height:7px;border-radius:50%;background:#2a2b24;transition:background .4s}body.powered-on .bay35-led{background:#3a7d2a;box-shadow:0 0 4px 1px #3a7d2a99}.speaker{flex:0 0 auto;width:132px;height:322px;margin-bottom:4px;padding:16px 16px 13px;border-radius:9px 9px 7px 7px;background:linear-gradient(165deg,var(--case-top) 0%,var(--case-face) 30%,var(--case-face-dark) 100%);box-shadow:inset 0 2px 2px #fff6,inset 0 -6px 12px #0000003d,0 24px 44px var(--bezel-shadow);display:flex;flex-direction:column;align-items:center;gap:8px}.spk-left{transform:perspective(520px) rotateY(11deg)}.spk-right{transform:perspective(520px) rotateY(-11deg)}.spk-grille{width:100%;flex:1 1 auto;border-radius:5px;background:radial-gradient(circle at center,rgba(0,0,0,.5) 38%,transparent 39%) 0 0 / 6px 6px,linear-gradient(180deg,#2c2c28,#1b1b18);box-shadow:inset 0 0 8px #000000b3,inset 0 1px #ffffff14}.spk-brand{font-size:10px;letter-spacing:2px;color:#5e5849;text-shadow:0 1px 0 rgba(255,255,255,.3)}.spk-foot{width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px}.spk-knob{position:relative;width:30px;height:30px;border-radius:50%;flex:0 0 auto;background:radial-gradient(circle at 38% 32%,#6b6456,#3c382f 68%,#2b2823);box-shadow:inset 0 1px 1px #ffffff47,inset 0 -2px 3px #00000073,0 1px 2px #00000073}.spk-knob i{position:absolute;top:4px;left:50%;width:2px;height:9px;margin-left:-1px;border-radius:1px;background:#d9d2c1;transform-origin:50% 11px;transform:rotate(-34deg)}#bezel-badge{position:absolute;bottom:18px;left:50%;transform:translate(-50%);font-size:11px;letter-spacing:2px;color:#4a4536;text-shadow:0 1px 0 rgba(255,255,255,.3)}#power-led{position:absolute;bottom:20px;right:32px;width:9px;height:9px;border-radius:50%;background:#20211c;box-shadow:inset 0 1px 1px #0009;transition:background .4s,box-shadow .4s}body.powered-on #power-led{background:var(--phosphor);box-shadow:0 0 6px 2px color-mix(in srgb,var(--phosphor) 60%,transparent)}#power-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:4;cursor:pointer;background:radial-gradient(ellipse 65% 50% at 28% 16%,#788c9614,#0000 60%),#01030a;transition:opacity .9s ease}body.powered-on #power-overlay{opacity:0;pointer-events:none}#power-btn{display:inline-flex;flex-direction:column;align-items:center;gap:4px;width:62px;padding:12px 0 9px;border-radius:8px;border:1px solid var(--case-face-dark);background:linear-gradient(180deg,#ddd6c5,#b6ae9a);color:#4a4536;font-family:Consolas,Courier New,monospace;font-size:10px;font-weight:700;letter-spacing:1.5px;cursor:pointer;box-shadow:inset 0 1px #fff9,inset 0 -2px 3px #0000002e,0 2px 3px #0000004d}#power-btn .pb-glyph{font-size:24px;line-height:1;color:#6a3030}#power-btn:hover{filter:brightness(1.05)}#power-btn:active,body.powered-on #power-btn{transform:translateY(1px);box-shadow:inset 0 1px 4px #0006}#reset-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;padding:11px 0;border-radius:7px;border:1px solid var(--case-face-dark);background:linear-gradient(180deg,#d2cbb9,#aaa28e);color:#7a3b3b;font-family:Consolas,Courier New,monospace;font-size:8px;font-weight:700;letter-spacing:1px;cursor:pointer;box-shadow:inset 0 1px #ffffff8c,inset 0 -2px 3px #0000002e,0 2px 3px #00000047}#reset-btn:hover{filter:brightness(1.05)}#reset-btn:active{transform:translateY(1px);box-shadow:inset 0 1px 4px #0006}body:not(.powered-on) #reset-btn{opacity:.55}#screen.warmup:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:5;pointer-events:none;background:radial-gradient(ellipse at 50% 50%,#beffd2a6,#beffd200 70%);animation:crt-warmup .6s ease-out forwards}@keyframes crt-warmup{0%{opacity:0}12%{opacity:1}to{opacity:0}}@media(prefers-reduced-motion:reduce){body.powered-on .cled-hdd i,#screen.warmup:after{animation:none}body.powered-on .cled-hdd i{background:#7a1d1d;box-shadow:inset 0 1px 1px #0009}}#screen{position:relative;border-radius:24px;overflow:hidden;background:#050605;box-shadow:inset 0 0 70px #000000f2,inset 0 0 12px #000000f2,0 0 0 3px #00000080,0 0 0 6px #ffffff0d;padding:28px}#terminal{position:relative;z-index:1}#terminal .xterm-viewport{scrollbar-width:none}#terminal .xterm-viewport::-webkit-scrollbar{display:none}#terminal .xterm{text-shadow:0 0 4px color-mix(in srgb,var(--phosphor) 55%,transparent)}#scanlines{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;pointer-events:none;background:repeating-linear-gradient(to bottom,#0000,#0000 2px,#0000002e 3px);mix-blend-mode:multiply}#desk-menu{position:fixed;left:18px;bottom:18px;z-index:50;font-family:Consolas,Courier New,monospace}#desk-handle,#desk-menu.collapsed #desk-body{display:none}#desk-menu.collapsed #desk-handle{display:inline-flex}#desk-handle{align-items:center;gap:5px;padding:7px 9px;background:linear-gradient(160deg,#15151b,#0c0c10);color:var(--phosphor);border:1px solid color-mix(in srgb,var(--phosphor) 40%,#000);border-radius:8px;cursor:pointer;font-size:14px;box-shadow:0 4px 14px #00000080}#desk-handle:hover{border-color:var(--phosphor)}#desk-body{width:178px;background:linear-gradient(180deg,#14140f,#0b0b08);border:1px solid color-mix(in srgb,var(--phosphor) 30%,#000);border-radius:10px;overflow:hidden;box-shadow:0 8px 22px #00000080}#desk-menu.has-unread #desk-body,#desk-menu.has-unread #desk-handle{border-color:var(--phosphor);box-shadow:0 0 12px color-mix(in srgb,var(--phosphor) 30%,transparent),0 6px 18px #00000080}#desk-head{display:flex;align-items:center;justify-content:space-between;padding:6px 6px 6px 11px;border-bottom:1px solid rgba(255,255,255,.08)}.desk-title{font-size:11px;letter-spacing:2px;color:#6b6b5a}#desk-collapse{background:none;border:none;color:#8a8a78;cursor:pointer;font-size:13px;padding:2px 7px;border-radius:5px}#desk-collapse:hover{color:var(--phosphor);background:#ffffff0f}#mailbox-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:none;border:none;color:var(--phosphor);font-size:12px;letter-spacing:1.5px;cursor:pointer;text-shadow:0 0 5px color-mix(in srgb,var(--phosphor) 50%,transparent);font-family:inherit}#mailbox-toggle:hover{background:#ffffff0d}#mailbox-toggle .mb-glyph{font-size:14px}#mailbox-toggle .mb-label{flex:1;text-align:left}.desk-badge{min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#d8442f;color:#fff;font-size:11px;font-weight:700;line-height:17px;text-align:center;text-shadow:none}#mailbox-panel{position:absolute;left:0;bottom:100%;margin-bottom:8px;width:330px;max-height:60vh;display:flex;flex-direction:column;background:linear-gradient(180deg,#14140f,#0b0b08);border:1px solid color-mix(in srgb,var(--phosphor) 35%,#000);border-radius:10px;box-shadow:0 16px 40px #0009;overflow:hidden}#mailbox-panel[hidden]{display:none}#mailbox-head{padding:10px 13px;font-size:12px;letter-spacing:1.5px;color:var(--phosphor);border-bottom:1px solid rgba(255,255,255,.08);text-shadow:0 0 5px color-mix(in srgb,var(--phosphor) 50%,transparent)}#mailbox-head .mb-sub{color:#6b6b5a;letter-spacing:.5px}#mailbox-list{overflow-y:auto;padding:6px}#mailbox-list .mb-empty{padding:22px 14px;color:#6b6b5a;font-size:12px;line-height:1.6;text-align:center}.mb-item{padding:8px 9px;border-radius:7px;margin:3px 0;background:#ffffff05;border-left:3px solid transparent}.mb-item.mb-unread{background:#ffffff0d;border-left-color:var(--phosphor)}.mb-row{display:flex;align-items:center;gap:7px;font-size:11px}.mb-tag{padding:1px 5px;border-radius:4px;font-size:10px;font-weight:700;letter-spacing:.5px}.mb-check{background:#33ff6626;color:#6fdc8c}.mb-note{background:#ffc85026;color:#e2b85c}.mb-amt{color:#eaeaea;font-weight:700}.mb-from{color:#cfcfc4;flex:1}.mb-time{color:#5e5e50;font-size:10px}.mb-body{margin-top:4px;font-size:12px;line-height:1.45;color:#b9b9ad}#notepad-toggle{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:none;border:none;border-top:1px solid rgba(255,255,255,.06);color:var(--phosphor);font-size:12px;letter-spacing:1.5px;cursor:pointer;text-shadow:0 0 5px color-mix(in srgb,var(--phosphor) 50%,transparent);font-family:inherit}#notepad-toggle:hover{background:#ffffff0d}#notepad-toggle .mb-glyph{font-size:14px}#notepad-toggle .mb-label{flex:1;text-align:left}#desk-menu.notepad-fresh #notepad-toggle{color:#ffd66e;text-shadow:0 0 7px rgba(255,214,110,.6)}#desk-menu.notepad-fresh #desk-body{border-color:#ffd66e73;box-shadow:0 0 12px #ffd66e2e,0 6px 18px #00000080}#notepad-panel{position:absolute;left:0;bottom:100%;margin-bottom:8px;width:372px;max-height:72vh;display:flex;flex-direction:column;background:repeating-linear-gradient(to bottom,transparent 0,transparent 20px,rgba(94,130,160,.28) 20px,rgba(94,130,160,.28) 21px),linear-gradient(180deg,#f2ecd4,#e8e0c4);border:1px solid #b9ad86;border-radius:4px 10px 10px 4px;box-shadow:0 16px 40px #000000a6,inset 12px 0 #0000000f;overflow:hidden}#notepad-panel[hidden]{display:none}#notepad-panel:before{content:"";position:absolute;top:0;bottom:0;left:30px;width:1px;background:#c8463c8c;pointer-events:none}#notepad-panel:after{content:"";position:absolute;top:14px;bottom:14px;left:9px;width:8px;background:radial-gradient(circle 4px,rgba(20,20,24,.85) 3px,transparent 4px);background-size:8px 34px;background-repeat:repeat-y;pointer-events:none}#notepad-page{flex:1;overflow-y:auto;padding:12px 16px 10px 42px;color:#262a3c;font-size:12.5px;line-height:21px;font-family:Consolas,Courier New,monospace}.np-title{font-weight:700;letter-spacing:1.5px;text-decoration:underline;margin-bottom:8px;color:#1c2033}.np-line{min-height:21px;white-space:pre-wrap}.np-blank{min-height:21px}.np-bullet{padding-left:14px;text-indent:-10px}.np-bullet:before{content:"• ";color:#6a4a3a}.np-key{padding-left:8px;font-weight:700;color:#3a2f6e}.np-key:before{content:"▸ ";color:#8a6a4a}#notepad-nav{display:flex;align-items:center;justify-content:space-between;padding:6px 12px 8px 42px;border-top:1px solid rgba(120,100,60,.35);background:#00000008}#notepad-nav button{border:1px solid #b9ad86;background:#efe8cf;color:#4a4433;border-radius:6px;padding:2px 14px;font-size:13px;cursor:pointer;font-family:inherit}#notepad-nav button:hover:not(:disabled){background:#fff8e0}#notepad-nav button:disabled{opacity:.35;cursor:default}#np-count{font-size:11px;letter-spacing:1px;color:#7a7057}#glass-glare{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;pointer-events:none;background:radial-gradient(ellipse 60% 40% at 22% 12%,#ffffff12,#fff0 60%)}
