import { ref as ir, onMounted as sr, watch as nr, onBeforeUnmount as or } from "vue";
var ar = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function hr(z) {
  return z && z.__esModule && Object.prototype.hasOwnProperty.call(z, "default") ? z.default : z;
}
var ee = {}, cr = {
  get exports() {
    return ee;
  },
  set exports(z) {
    ee = z;
  }
};
(function(z, Z) {
  (function(D, V) {
    V(Z);
  })(ar, function(D) {
    var V = { foreground: "#a5a2a2", background: "#090300", cursor: "#a5a2a2", black: "#090300", brightBlack: "#5c5855", red: "#db2d20", brightRed: "#e8bbd0", green: "#01a252", brightGreen: "#3a3432", yellow: "#fded02", brightYellow: "#4a4543", blue: "#01a0e4", brightBlue: "#807d7c", magenta: "#a16a94", brightMagenta: "#d6d5d4", cyan: "#b5e4f4", brightCyan: "#cdab53", white: "#a5a2a2", brightWhite: "#f7f7f7" }, N = { foreground: "#f8dcc0", background: "#1f1d45", cursor: "#efbf38", black: "#050404", brightBlack: "#4e7cbf", red: "#bd0013", brightRed: "#fc5f5a", green: "#4ab118", brightGreen: "#9eff6e", yellow: "#e7741e", brightYellow: "#efc11a", blue: "#0f4ac6", brightBlue: "#1997c6", magenta: "#665993", brightMagenta: "#9b5953", cyan: "#70a598", brightCyan: "#c8faf4", white: "#f8dcc0", brightWhite: "#f6f5fb" }, J = { foreground: "#d0d0d0", background: "#212121", cursor: "#d0d0d0", black: "#151515", brightBlack: "#505050", red: "#ac4142", brightRed: "#ac4142", green: "#7e8e50", brightGreen: "#7e8e50", yellow: "#e5b567", brightYellow: "#e5b567", blue: "#6c99bb", brightBlue: "#6c99bb", magenta: "#9f4e85", brightMagenta: "#9f4e85", cyan: "#7dd6cf", brightCyan: "#7dd6cf", white: "#d0d0d0", brightWhite: "#f5f5f5" }, T = { foreground: "#637d75", background: "#0f1610", cursor: "#73fa91", black: "#112616", brightBlack: "#3c4812", red: "#7f2b27", brightRed: "#e08009", green: "#2f7e25", brightGreen: "#18e000", yellow: "#717f24", brightYellow: "#bde000", blue: "#2f6a7f", brightBlue: "#00aae0", magenta: "#47587f", brightMagenta: "#0058e0", cyan: "#327f77", brightCyan: "#00e0c4", white: "#647d75", brightWhite: "#73fa91" }, r = { foreground: "#fffaf4", background: "#0e1019", cursor: "#ff0018", black: "#232323", brightBlack: "#444444", red: "#ff000f", brightRed: "#ff2740", green: "#8ce10b", brightGreen: "#abe15b", yellow: "#ffb900", brightYellow: "#ffd242", blue: "#008df8", brightBlue: "#0092ff", magenta: "#6d43a6", brightMagenta: "#9a5feb", cyan: "#00d8eb", brightCyan: "#67fff0", white: "#ffffff", brightWhite: "#ffffff" }, a = { foreground: "#ddeedd", background: "#1c1c1c", cursor: "#e2bbef", black: "#3d352a", brightBlack: "#554444", red: "#cd5c5c", brightRed: "#cc5533", green: "#86af80", brightGreen: "#88aa22", yellow: "#e8ae5b", brightYellow: "#ffa75d", blue: "#6495ed", brightBlue: "#87ceeb", magenta: "#deb887", brightMagenta: "#996600", cyan: "#b0c4de", brightCyan: "#b0c4de", white: "#bbaa99", brightWhite: "#ddccbb" }, h = { foreground: "#979db4", background: "#202746", cursor: "#979db4", black: "#202746", brightBlack: "#6b7394", red: "#c94922", brightRed: "#c76b29", green: "#ac9739", brightGreen: "#293256", yellow: "#c08b30", brightYellow: "#5e6687", blue: "#3d8fd1", brightBlue: "#898ea4", magenta: "#6679cc", brightMagenta: "#dfe2f1", cyan: "#22a2c9", brightCyan: "#9c637a", white: "#979db4", brightWhite: "#f5f7ff" }, f = { foreground: "#c5c8c6", background: "#161719", cursor: "#d0d0d0", black: "#000000", brightBlack: "#000000", red: "#fd5ff1", brightRed: "#fd5ff1", green: "#87c38a", brightGreen: "#94fa36", yellow: "#ffd7b1", brightYellow: "#f5ffa8", blue: "#85befd", brightBlue: "#96cbfe", magenta: "#b9b6fc", brightMagenta: "#b9b6fc", cyan: "#85befd", brightCyan: "#85befd", white: "#e0e0e0", brightWhite: "#e0e0e0" }, d = { foreground: "#6f6f6f", background: "#1b1d1e", cursor: "#fcef0c", black: "#1b1d1e", brightBlack: "#505354", red: "#e6dc44", brightRed: "#fff78e", green: "#c8be46", brightGreen: "#fff27d", yellow: "#f4fd22", brightYellow: "#feed6c", blue: "#737174", brightBlue: "#919495", magenta: "#747271", brightMagenta: "#9a9a9d", cyan: "#62605f", brightCyan: "#a3a3a6", white: "#c6c5bf", brightWhite: "#dadbd6" }, u = { foreground: "#968c83", background: "#20111b", cursor: "#968c83", black: "#20111b", brightBlack: "#5e5252", red: "#be100e", brightRed: "#be100e", green: "#858162", brightGreen: "#858162", yellow: "#eaa549", brightYellow: "#eaa549", blue: "#426a79", brightBlue: "#426a79", magenta: "#97522c", brightMagenta: "#97522c", cyan: "#989a9c", brightCyan: "#989a9c", white: "#968c83", brightWhite: "#d5ccba" }, b = { foreground: "#e0dbb7", background: "#2a1f1d", cursor: "#573d26", black: "#573d26", brightBlack: "#9b6c4a", red: "#be2d26", brightRed: "#e84627", green: "#6ba18a", brightGreen: "#95d8ba", yellow: "#e99d2a", brightYellow: "#d0d150", blue: "#5a86ad", brightBlue: "#b8d3ed", magenta: "#ac80a6", brightMagenta: "#d19ecb", cyan: "#74a6ad", brightCyan: "#93cfd7", white: "#e0dbb7", brightWhite: "#fff9d5" }, g = { foreground: "#d9e6f2", background: "#0d1926", cursor: "#d9e6f2", black: "#000000", brightBlack: "#262626", red: "#b87a7a", brightRed: "#dbbdbd", green: "#7ab87a", brightGreen: "#bddbbd", yellow: "#b8b87a", brightYellow: "#dbdbbd", blue: "#7a7ab8", brightBlue: "#bdbddb", magenta: "#b87ab8", brightMagenta: "#dbbddb", cyan: "#7ab8b8", brightCyan: "#bddbdb", white: "#d9d9d9", brightWhite: "#ffffff" }, c = { foreground: "#ffff4e", background: "#0000a4", cursor: "#ffa560", black: "#4f4f4f", brightBlack: "#7c7c7c", red: "#ff6c60", brightRed: "#ffb6b0", green: "#a8ff60", brightGreen: "#ceffac", yellow: "#ffffb6", brightYellow: "#ffffcc", blue: "#96cbfe", brightBlue: "#b5dcff", magenta: "#ff73fd", brightMagenta: "#ff9cfe", cyan: "#c6c5fe", brightCyan: "#dfdffe", white: "#eeeeee", brightWhite: "#ffffff" }, e = { foreground: "#b3c9d7", background: "#191919", cursor: "#f34b00", black: "#191919", brightBlack: "#191919", red: "#ff355b", brightRed: "#ff355b", green: "#b7e876", brightGreen: "#b7e876", yellow: "#ffc251", brightYellow: "#ffc251", blue: "#76d4ff", brightBlue: "#76d5ff", magenta: "#ba76e7", brightMagenta: "#ba76e7", cyan: "#6cbfb5", brightCyan: "#6cbfb5", white: "#c2c8d7", brightWhite: "#c2c8d7" }, i = { foreground: "#e6e1dc", background: "#2b2b2b", cursor: "#ffffff", black: "#000000", brightBlack: "#323232", red: "#da4939", brightRed: "#ff7b6b", green: "#519f50", brightGreen: "#83d182", yellow: "#ffd24a", brightYellow: "#ffff7c", blue: "#6d9cbe", brightBlue: "#9fcef0", magenta: "#d0d0ff", brightMagenta: "#ffffff", cyan: "#6e9cbe", brightCyan: "#a0cef0", white: "#ffffff", brightWhite: "#ffffff" }, n = { foreground: "#d6dbe5", background: "#131313", cursor: "#b9b9b9", black: "#1f1f1f", brightBlack: "#d6dbe5", red: "#f81118", brightRed: "#de352e", green: "#2dc55e", brightGreen: "#1dd361", yellow: "#ecba0f", brightYellow: "#f3bd09", blue: "#2a84d2", brightBlue: "#1081d6", magenta: "#4e5ab7", brightMagenta: "#5350b9", cyan: "#1081d6", brightCyan: "#0f7ddb", white: "#d6dbe5", brightWhite: "#ffffff" }, t = { foreground: "#7869c4", background: "#40318d", cursor: "#7869c4", black: "#090300", brightBlack: "#000000", red: "#883932", brightRed: "#883932", green: "#55a049", brightGreen: "#55a049", yellow: "#bfce72", brightYellow: "#bfce72", blue: "#40318d", brightBlue: "#40318d", magenta: "#8b3f96", brightMagenta: "#8b3f96", cyan: "#67b6bd", brightCyan: "#67b6bd", white: "#ffffff", brightWhite: "#f7f7f7" }, s = { foreground: "#d2d8d9", background: "#2b2d2e", cursor: "#708284", black: "#7d8b8f", brightBlack: "#888888", red: "#b23a52", brightRed: "#f24840", green: "#789b6a", brightGreen: "#80c470", yellow: "#b9ac4a", brightYellow: "#ffeb62", blue: "#2a7fac", brightBlue: "#4196ff", magenta: "#bd4f5a", brightMagenta: "#fc5275", cyan: "#44a799", brightCyan: "#53cdbd", white: "#d2d8d9", brightWhite: "#d2d8d9" }, l = { foreground: "#d9e6f2", background: "#29262f", cursor: "#d9e6f2", black: "#000000", brightBlack: "#323232", red: "#c37372", brightRed: "#dbaaaa", green: "#72c373", brightGreen: "#aadbaa", yellow: "#c2c372", brightYellow: "#dadbaa", blue: "#7372c3", brightBlue: "#aaaadb", magenta: "#c372c2", brightMagenta: "#dbaada", cyan: "#72c2c3", brightCyan: "#aadadb", white: "#d9d9d9", brightWhite: "#ffffff" }, _ = { foreground: "#aea47a", background: "#191c27", cursor: "#92805b", black: "#181818", brightBlack: "#555555", red: "#810009", brightRed: "#ac3835", green: "#48513b", brightGreen: "#a6a75d", yellow: "#cc8b3f", brightYellow: "#dcdf7c", blue: "#576d8c", brightBlue: "#3097c6", magenta: "#724d7c", brightMagenta: "#d33061", cyan: "#5c4f4b", brightCyan: "#f3dbb2", white: "#aea47f", brightWhite: "#f4f4f4" }, m = { foreground: "#ffffff", background: "#132738", cursor: "#f0cc09", black: "#000000", brightBlack: "#555555", red: "#ff0000", brightRed: "#f40e17", green: "#38de21", brightGreen: "#3bd01d", yellow: "#ffe50a", brightYellow: "#edc809", blue: "#1460d2", brightBlue: "#5555ff", magenta: "#ff005d", brightMagenta: "#ff55ff", cyan: "#00bbbb", brightCyan: "#6ae3fa", white: "#bbbbbb", brightWhite: "#ffffff" }, o = { foreground: "#8ff586", background: "#142838", cursor: "#c4206f", black: "#142631", brightBlack: "#fff688", red: "#ff2320", brightRed: "#d4312e", green: "#3ba5ff", brightGreen: "#8ff586", yellow: "#e9e75c", brightYellow: "#e9f06d", blue: "#8ff586", brightBlue: "#3c7dd2", magenta: "#781aa0", brightMagenta: "#8230a7", cyan: "#8ff586", brightCyan: "#6cbc67", white: "#ba46b2", brightWhite: "#8ff586" }, v = { foreground: "#68525a", background: "#150707", cursor: "#68525a", black: "#2b1b1d", brightBlack: "#3d2b2e", red: "#91002b", brightRed: "#c5255d", green: "#579524", brightGreen: "#8dff57", yellow: "#ab311b", brightYellow: "#c8381d", blue: "#8c87b0", brightBlue: "#cfc9ff", magenta: "#692f50", brightMagenta: "#fc6cba", cyan: "#e8a866", brightCyan: "#ffceaf", white: "#68525a", brightWhite: "#b0949d" }, S = { foreground: "#ffffff", background: "#000000", cursor: "#bbbbbb", black: "#000000", brightBlack: "#555555", red: "#ff5555", brightRed: "#ff5555", green: "#55ff55", brightGreen: "#55ff55", yellow: "#ffff55", brightYellow: "#ffff55", blue: "#5555ff", brightBlue: "#5555ff", magenta: "#ff55ff", brightMagenta: "#ff55ff", cyan: "#55ffff", brightCyan: "#55ffff", white: "#bbbbbb", brightWhite: "#ffffff" }, y = { foreground: "#bababa", background: "#222324", cursor: "#bbbbbb", black: "#000000", brightBlack: "#000000", red: "#e8341c", brightRed: "#e05a4f", green: "#68c256", brightGreen: "#77b869", yellow: "#f2d42c", brightYellow: "#efd64b", blue: "#1c98e8", brightBlue: "#387cd3", magenta: "#8e69c9", brightMagenta: "#957bbe", cyan: "#1c98e8", brightCyan: "#3d97e2", white: "#bababa", brightWhite: "#bababa" }, w = { foreground: "#ffffff", background: "#333333", cursor: "#00ff00", black: "#4d4d4d", brightBlack: "#555555", red: "#ff2b2b", brightRed: "#ff5555", green: "#98fb98", brightGreen: "#55ff55", yellow: "#f0e68c", brightYellow: "#ffff55", blue: "#cd853f", brightBlue: "#87ceff", magenta: "#ffdead", brightMagenta: "#ff55ff", cyan: "#ffa0a0", brightCyan: "#ffd700", white: "#f5deb3", brightWhite: "#ffffff" }, L = { foreground: "#b9bcba", background: "#1f1f1f", cursor: "#f83e19", black: "#3a3d43", brightBlack: "#888987", red: "#be3f48", brightRed: "#fb001f", green: "#879a3b", brightGreen: "#0f722f", yellow: "#c5a635", brightYellow: "#c47033", blue: "#4f76a1", brightBlue: "#186de3", magenta: "#855c8d", brightMagenta: "#fb0067", cyan: "#578fa4", brightCyan: "#2e706d", white: "#b9bcba", brightWhite: "#fdffb9" }, M = { foreground: "#ebebeb", background: "#262c35", cursor: "#d9002f", black: "#191919", brightBlack: "#191919", red: "#bf091d", brightRed: "#bf091d", green: "#3d9751", brightGreen: "#3d9751", yellow: "#f6bb34", brightYellow: "#f6bb34", blue: "#17b2e0", brightBlue: "#17b2e0", magenta: "#7830b0", brightMagenta: "#7830b0", cyan: "#8bd2ed", brightCyan: "#8bd2ed", white: "#ffffff", brightWhite: "#ffffff" }, I = { foreground: "#f8f8f2", background: "#1e1f29", cursor: "#bbbbbb", black: "#000000", brightBlack: "#555555", red: "#ff5555", brightRed: "#ff5555", green: "#50fa7b", brightGreen: "#50fa7b", yellow: "#f1fa8c", brightYellow: "#f1fa8c", blue: "#bd93f9", brightBlue: "#bd93f9", magenta: "#ff79c6", brightMagenta: "#ff79c6", cyan: "#8be9fd", brightCyan: "#8be9fd", white: "#bbbbbb", brightWhite: "#ffffff" }, W = { foreground: "#b7a1ff", background: "#1f1d27", cursor: "#ff9839", black: "#1f1d27", brightBlack: "#353147", red: "#d9393e", brightRed: "#d9393e", green: "#2dcd73", brightGreen: "#2dcd73", yellow: "#d9b76e", brightYellow: "#d9b76e", blue: "#ffc284", brightBlue: "#ffc284", magenta: "#de8d40", brightMagenta: "#de8d40", cyan: "#2488ff", brightCyan: "#2488ff", white: "#b7a1ff", brightWhite: "#eae5ff" }, p = { foreground: "#00a595", background: "#000000", cursor: "#bbbbbb", black: "#000000", brightBlack: "#555555", red: "#9f0000", brightRed: "#ff0000", green: "#008b00", brightGreen: "#00ee00", yellow: "#ffd000", brightYellow: "#ffff00", blue: "#0081ff", brightBlue: "#0000ff", magenta: "#bc00ca", brightMagenta: "#ff00ff", cyan: "#008b8b", brightCyan: "#00cdcd", white: "#bbbbbb", brightWhite: "#ffffff" }, C = { foreground: "#e5c7a9", background: "#292520", cursor: "#f6f7ec", black: "#121418", brightBlack: "#675f54", red: "#c94234", brightRed: "#ff645a", green: "#85c54c", brightGreen: "#98e036", yellow: "#f5ae2e", brightYellow: "#e0d561", blue: "#1398b9", brightBlue: "#5fdaff", magenta: "#d0633d", brightMagenta: "#ff9269", cyan: "#509552", brightCyan: "#84f088", white: "#e5c6aa", brightWhite: "#f6f7ec" }, E = { foreground: "#807a74", background: "#22211d", cursor: "#facb80", black: "#3c3c30", brightBlack: "#555445", red: "#98290f", brightRed: "#e0502a", green: "#479a43", brightGreen: "#61e070", yellow: "#7f7111", brightYellow: "#d69927", blue: "#497f7d", brightBlue: "#79d9d9", magenta: "#7f4e2f", brightMagenta: "#cd7c54", cyan: "#387f58", brightCyan: "#59d599", white: "#807974", brightWhite: "#fff1e9" }, R = { foreground: "#efefef", background: "#181818", cursor: "#bbbbbb", black: "#242424", brightBlack: "#4b4b4b", red: "#d71c15", brightRed: "#fc1c18", green: "#5aa513", brightGreen: "#6bc219", yellow: "#fdb40c", brightYellow: "#fec80e", blue: "#063b8c", brightBlue: "#0955ff", magenta: "#e40038", brightMagenta: "#fb0050", cyan: "#2595e1", brightCyan: "#3ea8fc", white: "#efefef", brightWhite: "#8c00ec" }, O = { foreground: "#ffffff", background: "#323232", cursor: "#d6d6d6", black: "#353535", brightBlack: "#535353", red: "#d25252", brightRed: "#f00c0c", green: "#a5c261", brightGreen: "#c2e075", yellow: "#ffc66d", brightYellow: "#e1e48b", blue: "#6c99bb", brightBlue: "#8ab7d9", magenta: "#d197d9", brightMagenta: "#efb5f7", cyan: "#bed6ff", brightCyan: "#dcf4ff", white: "#eeeeec", brightWhite: "#ffffff" }, F = { foreground: "#b8a898", background: "#2a211c", cursor: "#ffffff", black: "#000000", brightBlack: "#555753", red: "#cc0000", brightRed: "#ef2929", green: "#1a921c", brightGreen: "#9aff87", yellow: "#f0e53a", brightYellow: "#fffb5c", blue: "#0066ff", brightBlue: "#43a8ed", magenta: "#c5656b", brightMagenta: "#ff818a", cyan: "#06989a", brightCyan: "#34e2e2", white: "#d3d7cf", brightWhite: "#eeeeec" }, Y = { foreground: "#dbdae0", background: "#292f33", cursor: "#d4605a", black: "#292f33", brightBlack: "#092028", red: "#cb1e2d", brightRed: "#d4605a", green: "#edb8ac", brightGreen: "#d4605a", yellow: "#b7ab9b", brightYellow: "#a86671", blue: "#2e78c2", brightBlue: "#7c85c4", magenta: "#c0236f", brightMagenta: "#5c5db2", cyan: "#309186", brightCyan: "#819090", white: "#eae3ce", brightWhite: "#fcf4df" }, P = { foreground: "#7c8fa4", background: "#0e1011", cursor: "#708284", black: "#002831", brightBlack: "#001e27", red: "#e63853", brightRed: "#e1003f", green: "#5eb83c", brightGreen: "#1d9000", yellow: "#a57706", brightYellow: "#cd9409", blue: "#359ddf", brightBlue: "#006fc0", magenta: "#d75cff", brightMagenta: "#a200da", cyan: "#4b73a2", brightCyan: "#005794", white: "#dcdcdc", brightWhite: "#e2e2e2" }, G = { foreground: "#9ba2b2", background: "#1e2027", cursor: "#f6f7ec", black: "#585f6d", brightBlack: "#585f6d", red: "#d95360", brightRed: "#d95360", green: "#5ab977", brightGreen: "#5ab977", yellow: "#dfb563", brightYellow: "#dfb563", blue: "#4d89c4", brightBlue: "#4c89c5", magenta: "#d55119", brightMagenta: "#d55119", cyan: "#44a8b6", brightCyan: "#44a8b6", white: "#e6e5ff", brightWhite: "#e6e5ff" }, B = { foreground: "#ecf0fe", background: "#232537", cursor: "#fecd5e", black: "#03073c", brightBlack: "#6c5b30", red: "#c6004a", brightRed: "#da4b8a", green: "#acf157", brightGreen: "#dbffa9", yellow: "#fecd5e", brightYellow: "#fee6a9", blue: "#525fb8", brightBlue: "#b2befa", magenta: "#986f82", brightMagenta: "#fda5cd", cyan: "#968763", brightCyan: "#a5bd86", white: "#ecf0fc", brightWhite: "#f6ffec" }, k = { foreground: "#2cc55d", background: "#002240", cursor: "#e5be0c", black: "#222d3f", brightBlack: "#212c3c", red: "#a82320", brightRed: "#d4312e", green: "#32a548", brightGreen: "#2d9440", yellow: "#e58d11", brightYellow: "#e5be0c", blue: "#3167ac", brightBlue: "#3c7dd2", magenta: "#781aa0", brightMagenta: "#8230a7", cyan: "#2c9370", brightCyan: "#35b387", white: "#b0b6ba", brightWhite: "#e7eced" }, A = { foreground: "#b8dbef", background: "#1d1f21", cursor: "#708284", black: "#1d1d19", brightBlack: "#1d1d19", red: "#f18339", brightRed: "#d22a24", green: "#9fd364", brightGreen: "#a7d42c", yellow: "#f4ef6d", brightYellow: "#ff8949", blue: "#5096be", brightBlue: "#61b9d0", magenta: "#695abc", brightMagenta: "#695abc", cyan: "#d63865", brightCyan: "#d63865", white: "#ffffff", brightWhite: "#ffffff" }, x = { foreground: "#dbd1b9", background: "#0e0d15", cursor: "#bbbbbb", black: "#08002e", brightBlack: "#331e4d", red: "#64002c", brightRed: "#d02063", green: "#5d731a", brightGreen: "#b4ce59", yellow: "#cd751c", brightYellow: "#fac357", blue: "#1d6da1", brightBlue: "#40a4cf", magenta: "#b7077e", brightMagenta: "#f12aae", cyan: "#42a38c", brightCyan: "#62caa8", white: "#f3e0b8", brightWhite: "#fff5db" }, H = { foreground: "#e2d8cd", background: "#051519", cursor: "#9e9ecb", black: "#333333", brightBlack: "#3d3d3d", red: "#f8818e", brightRed: "#fb3d66", green: "#92d3a2", brightGreen: "#6bb48d", yellow: "#1a8e63", brightYellow: "#30c85a", blue: "#8ed0ce", brightBlue: "#39a7a2", magenta: "#5e468c", brightMagenta: "#7e62b3", cyan: "#31658c", brightCyan: "#6096bf", white: "#e2d8cd", brightWhite: "#e2d8cd" }, $ = { foreground: "#adadad", background: "#1b1c1d", cursor: "#cdcdcd", black: "#242526", brightBlack: "#5fac6d", red: "#f8511b", brightRed: "#f74319", green: "#565747", brightGreen: "#74ec4c", yellow: "#fa771d", brightYellow: "#fdc325", blue: "#2c70b7", brightBlue: "#3393ca", magenta: "#f02e4f", brightMagenta: "#e75e4f", cyan: "#3ca1a6", brightCyan: "#4fbce6", white: "#adadad", brightWhite: "#8c735b" }, U = { foreground: "#dec165", background: "#251200", cursor: "#e5591c", black: "#000000", brightBlack: "#7f6a55", red: "#d6262b", brightRed: "#e55a1c", green: "#919c00", brightGreen: "#bfc65a", yellow: "#be8a13", brightYellow: "#ffcb1b", blue: "#4699a3", brightBlue: "#7cc9cf", magenta: "#8d4331", brightMagenta: "#d26349", cyan: "#da8213", brightCyan: "#e6a96b", white: "#ddc265", brightWhite: "#ffeaa3" }, K = { foreground: "#ffffff", background: "#1d2837", cursor: "#bbbbbb", black: "#000000", brightBlack: "#555555", red: "#f9555f", brightRed: "#fa8c8f", green: "#21b089", brightGreen: "#35bb9a", yellow: "#fef02a", brightYellow: "#ffff55", blue: "#589df6", brightBlue: "#589df6", magenta: "#944d95", brightMagenta: "#e75699", cyan: "#1f9ee7", brightCyan: "#3979bc", white: "#bbbbbb", brightWhite: "#ffffff" }, X = { foreground: "#3e3e3e", background: "#f4f4f4", cursor: "#3f3f3f", black: "#3e3e3e", brightBlack: "#666666", red: "#970b16", brightRed: "#de0000", green: "#07962a", brightGreen: "#87d5a2", yellow: "#f8eec7", brightYellow: "#f1d007", blue: "#003e8a", brightBlue: "#2e6cba", magenta: "#e94691", brightMagenta: "#ffa29f", cyan: "#89d1ec", brightCyan: "#1cfafe", white: "#ffffff", brightWhite: "#ffffff" }, q = { foreground: "#ffffff", background: "#0c1115", cursor: "#6c6c6c", black: "#2e343c", brightBlack: "#404a55", red: "#bd0f2f", brightRed: "#bd0f2f", green: "#35a770", brightGreen: "#49e998", yellow: "#fb9435", brightYellow: "#fddf6e", blue: "#1f5872", brightBlue: "#2a8bc1", magenta: "#bd2523", brightMagenta: "#ea4727", cyan: "#778397", brightCyan: "#a0b6d3", white: "#ffffff", brightWhite: "#ffffff" }, j = { foreground: "#9f9fa1", background: "#171423", cursor: "#a288f7", black: "#2d283f", brightBlack: "#59516a", red: "#ed2261", brightRed: "#f0729a", green: "#1fa91b", brightGreen: "#53aa5e", yellow: "#8ddc20", brightYellow: "#b2dc87", blue: "#487df4", brightBlue: "#a9bcec", magenta: "#8d35c9", brightMagenta: "#ad81c2", cyan: "#3bdeed", brightCyan: "#9de3eb", white: "#9e9ea0", brightWhite: "#a288f7" }, Q = { foreground: "#fff0a5", background: "#13773d", cursor: "#8c2800", black: "#000000", brightBlack: "#555555", red: "#bb0000", brightRed: "#bb0000", green: "#00bb00", brightGreen: "#00bb00", yellow: "#e7b000", brightYellow: "#e7b000", blue: "#0000a3", brightBlue: "#0000bb", magenta: "#950062", brightMagenta: "#ff55ff", cyan: "#00bbbb", brightCyan: "#55ffff", white: "#bbbbbb", brightWhite: "#ffffff" }, ie = { foreground: "#e6d4a3", background: "#1e1e1e", cursor: "#bbbbbb", black: "#161819", brightBlack: "#7f7061", red: "#f73028", brightRed: "#be0f17", green: "#aab01e", brightGreen: "#868715", yellow: "#f7b125", brightYellow: "#cc881a", blue: "#719586", brightBlue: "#377375", magenta: "#c77089", brightMagenta: "#a04b73", cyan: "#7db669", brightCyan: "#578e57", white: "#faefbb", brightWhite: "#e6d4a3" }, se = { foreground: "#a0a0a0", background: "#121212", cursor: "#bbbbbb", black: "#1b1d1e", brightBlack: "#505354", red: "#f92672", brightRed: "#ff669d", green: "#a6e22e", brightGreen: "#beed5f", yellow: "#fd971f", brightYellow: "#e6db74", blue: "#66d9ef", brightBlue: "#66d9ef", magenta: "#9e6ffe", brightMagenta: "#9e6ffe", cyan: "#5e7175", brightCyan: "#a3babf", white: "#ccccc6", brightWhite: "#f8f8f2" }, ne = { foreground: "#a8a49d", background: "#010101", cursor: "#a8a49d", black: "#010101", brightBlack: "#726e6a", red: "#f8b63f", brightRed: "#f8b63f", green: "#7fb5e1", brightGreen: "#7fb5e1", yellow: "#d6da25", brightYellow: "#d6da25", blue: "#489e48", brightBlue: "#489e48", magenta: "#b296c6", brightMagenta: "#b296c6", cyan: "#f5bfd7", brightCyan: "#f5bfd7", white: "#a8a49d", brightWhite: "#fefbea" }, oe = { foreground: "#ededed", background: "#222225", cursor: "#e0d9b9", black: "#000000", brightBlack: "#5d504a", red: "#d00e18", brightRed: "#f07e18", green: "#138034", brightGreen: "#b1d130", yellow: "#ffcb3e", brightYellow: "#fff120", blue: "#006bb3", brightBlue: "#4fc2fd", magenta: "#6b2775", brightMagenta: "#de0071", cyan: "#384564", brightCyan: "#5d504a", white: "#ededed", brightWhite: "#ffffff" }, ae = { foreground: "#84c138", background: "#100b05", cursor: "#23ff18", black: "#000000", brightBlack: "#666666", red: "#b6214a", brightRed: "#e50000", green: "#00a600", brightGreen: "#86a93e", yellow: "#bfbf00", brightYellow: "#e5e500", blue: "#246eb2", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, he = { foreground: "#00ff00", background: "#000000", cursor: "#23ff18", black: "#000000", brightBlack: "#666666", red: "#990000", brightRed: "#e50000", green: "#00a600", brightGreen: "#00d900", yellow: "#999900", brightYellow: "#e5e500", blue: "#0000b2", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, ce = { foreground: "#dbdbdb", background: "#000000", cursor: "#bbbbbb", black: "#575757", brightBlack: "#262626", red: "#ff1b00", brightRed: "#d51d00", green: "#a5e055", brightGreen: "#a5df55", yellow: "#fbe74a", brightYellow: "#fbe84a", blue: "#496487", brightBlue: "#89beff", magenta: "#fd5ff1", brightMagenta: "#c001c1", cyan: "#86e9fe", brightCyan: "#86eafe", white: "#cbcccb", brightWhite: "#dbdbdb" }, le = { foreground: "#b7bcba", background: "#161719", cursor: "#b7bcba", black: "#2a2e33", brightBlack: "#1d1f22", red: "#b84d51", brightRed: "#8d2e32", green: "#b3bf5a", brightGreen: "#798431", yellow: "#e4b55e", brightYellow: "#e58a50", blue: "#6e90b0", brightBlue: "#4b6b88", magenta: "#a17eac", brightMagenta: "#6e5079", cyan: "#7fbfb4", brightCyan: "#4d7b74", white: "#b5b9b6", brightWhite: "#5a626a" }, de = { foreground: "#d9efd3", background: "#3a3d3f", cursor: "#42ff58", black: "#1f1f1f", brightBlack: "#032710", red: "#fb002a", brightRed: "#a7ff3f", green: "#339c24", brightGreen: "#9fff6d", yellow: "#659b25", brightYellow: "#d2ff6d", blue: "#149b45", brightBlue: "#72ffb5", magenta: "#53b82c", brightMagenta: "#50ff3e", cyan: "#2cb868", brightCyan: "#22ff71", white: "#e0ffef", brightWhite: "#daefd0" }, fe = { foreground: "#ffcb83", background: "#262626", cursor: "#fc531d", black: "#000000", brightBlack: "#6a4f2a", red: "#c13900", brightRed: "#ff8c68", green: "#a4a900", brightGreen: "#f6ff40", yellow: "#caaf00", brightYellow: "#ffe36e", blue: "#bd6d00", brightBlue: "#ffbe55", magenta: "#fc5e00", brightMagenta: "#fc874f", cyan: "#f79500", brightCyan: "#c69752", white: "#ffc88a", brightWhite: "#fafaff" }, ue = { foreground: "#f1f1f1", background: "#000000", cursor: "#808080", black: "#4f4f4f", brightBlack: "#7b7b7b", red: "#fa6c60", brightRed: "#fcb6b0", green: "#a8ff60", brightGreen: "#cfffab", yellow: "#fffeb7", brightYellow: "#ffffcc", blue: "#96cafe", brightBlue: "#b5dcff", magenta: "#fa73fd", brightMagenta: "#fb9cfe", cyan: "#c6c5fe", brightCyan: "#e0e0fe", white: "#efedef", brightWhite: "#ffffff" }, _e = { foreground: "#ffcc2f", background: "#2c1d16", cursor: "#23ff18", black: "#2c1d16", brightBlack: "#666666", red: "#ef5734", brightRed: "#e50000", green: "#2baf2b", brightGreen: "#86a93e", yellow: "#bebf00", brightYellow: "#e5e500", blue: "#246eb2", brightBlue: "#0000ff", magenta: "#d05ec1", brightMagenta: "#e500e5", cyan: "#00acee", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, ge = { foreground: "#f7f6ec", background: "#1e1e1e", cursor: "#edcf4f", black: "#343935", brightBlack: "#595b59", red: "#cf3f61", brightRed: "#d18fa6", green: "#7bb75b", brightGreen: "#767f2c", yellow: "#e9b32a", brightYellow: "#78592f", blue: "#4c9ad4", brightBlue: "#135979", magenta: "#a57fc4", brightMagenta: "#604291", cyan: "#389aad", brightCyan: "#76bbca", white: "#fafaf6", brightWhite: "#b2b5ae" }, be = { foreground: "#dedede", background: "#121212", cursor: "#ffa560", black: "#929292", brightBlack: "#bdbdbd", red: "#e27373", brightRed: "#ffa1a1", green: "#94b979", brightGreen: "#bddeab", yellow: "#ffba7b", brightYellow: "#ffdca0", blue: "#97bedc", brightBlue: "#b1d8f6", magenta: "#e1c0fa", brightMagenta: "#fbdaff", cyan: "#00988e", brightCyan: "#1ab2a8", white: "#dedede", brightWhite: "#ffffff" }, ve = { foreground: "#adadad", background: "#202020", cursor: "#ffffff", black: "#000000", brightBlack: "#555555", red: "#fa5355", brightRed: "#fb7172", green: "#126e00", brightGreen: "#67ff4f", yellow: "#c2c300", brightYellow: "#ffff00", blue: "#4581eb", brightBlue: "#6d9df1", magenta: "#fa54ff", brightMagenta: "#fb82ff", cyan: "#33c2c1", brightCyan: "#60d3d1", white: "#adadad", brightWhite: "#eeeeee" }, pe = { foreground: "#f7f7f7", background: "#0e100a", cursor: "#9fda9c", black: "#4d4d4d", brightBlack: "#5a5a5a", red: "#c70031", brightRed: "#f01578", green: "#29cf13", brightGreen: "#6ce05c", yellow: "#d8e30e", brightYellow: "#f3f79e", blue: "#3449d1", brightBlue: "#97a4f7", magenta: "#8400ff", brightMagenta: "#c495f0", cyan: "#0798ab", brightCyan: "#68f2e0", white: "#e2d1e3", brightWhite: "#ffffff" }, me = { foreground: "#959595", background: "#222222", cursor: "#424242", black: "#2b2b2b", brightBlack: "#454747", red: "#d45a60", brightRed: "#d3232f", green: "#afba67", brightGreen: "#aabb39", yellow: "#e5d289", brightYellow: "#e5be39", blue: "#a0bad6", brightBlue: "#6699d6", magenta: "#c092d6", brightMagenta: "#ab53d6", cyan: "#91bfb7", brightCyan: "#5fc0ae", white: "#3c3d3d", brightWhite: "#c1c2c2" }, Se = { foreground: "#736e7d", background: "#050014", cursor: "#8c91fa", black: "#230046", brightBlack: "#372d46", red: "#7d1625", brightRed: "#e05167", green: "#337e6f", brightGreen: "#52e0c4", yellow: "#7f6f49", brightYellow: "#e0c386", blue: "#4f4a7f", brightBlue: "#8e87e0", magenta: "#5a3f7f", brightMagenta: "#a776e0", cyan: "#58777f", brightCyan: "#9ad4e0", white: "#736e7d", brightWhite: "#8c91fa" }, Ce = { foreground: "#afc2c2", background: "#303030", cursor: "#ffffff", black: "#000000", brightBlack: "#000000", red: "#ff3030", brightRed: "#ff3030", green: "#559a70", brightGreen: "#559a70", yellow: "#ccac00", brightYellow: "#ccac00", blue: "#0099cc", brightBlue: "#0099cc", magenta: "#cc69c8", brightMagenta: "#cc69c8", cyan: "#7ac4cc", brightCyan: "#7ac4cc", white: "#bccccc", brightWhite: "#bccccc" }, ye = { foreground: "#afc2c2", background: "#000000", cursor: "#ffffff", black: "#000000", brightBlack: "#000000", red: "#ff3030", brightRed: "#ff3030", green: "#559a70", brightGreen: "#559a70", yellow: "#ccac00", brightYellow: "#ccac00", blue: "#0099cc", brightBlue: "#0099cc", magenta: "#cc69c8", brightMagenta: "#cc69c8", cyan: "#7ac4cc", brightCyan: "#7ac4cc", white: "#bccccc", brightWhite: "#bccccc" }, we = { foreground: "#afc2c2", background: "#000000", cursor: "#ffffff", black: "#bccccd", brightBlack: "#ffffff", red: "#ff3030", brightRed: "#ff3030", green: "#559a70", brightGreen: "#559a70", yellow: "#ccac00", brightYellow: "#ccac00", blue: "#0099cc", brightBlue: "#0099cc", magenta: "#cc69c8", brightMagenta: "#cc69c8", cyan: "#7ac4cc", brightCyan: "#7ac4cc", white: "#000000", brightWhite: "#000000" }, ke = { foreground: "#000000", background: "#fef49c", cursor: "#7f7f7f", black: "#000000", brightBlack: "#666666", red: "#cc0000", brightRed: "#e50000", green: "#00a600", brightGreen: "#00d900", yellow: "#999900", brightYellow: "#e5e500", blue: "#0000b2", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#cccccc", brightWhite: "#e5e5e5" }, Ee = { foreground: "#232322", background: "#eaeaea", cursor: "#16afca", black: "#212121", brightBlack: "#424242", red: "#b7141f", brightRed: "#e83b3f", green: "#457b24", brightGreen: "#7aba3a", yellow: "#f6981e", brightYellow: "#ffea2e", blue: "#134eb2", brightBlue: "#54a4f3", magenta: "#560088", brightMagenta: "#aa4dbc", cyan: "#0e717c", brightCyan: "#26bbd1", white: "#efefef", brightWhite: "#d9d9d9" }, Be = { foreground: "#e5e5e5", background: "#232322", cursor: "#16afca", black: "#212121", brightBlack: "#424242", red: "#b7141f", brightRed: "#e83b3f", green: "#457b24", brightGreen: "#7aba3a", yellow: "#f6981e", brightYellow: "#ffea2e", blue: "#134eb2", brightBlue: "#54a4f3", magenta: "#560088", brightMagenta: "#aa4dbc", cyan: "#0e717c", brightCyan: "#26bbd1", white: "#efefef", brightWhite: "#d9d9d9" }, Re = { foreground: "#bbbbbb", background: "#000000", cursor: "#bbbbbb", black: "#000000", brightBlack: "#555555", red: "#e52222", brightRed: "#ff5555", green: "#a6e32d", brightGreen: "#55ff55", yellow: "#fc951e", brightYellow: "#ffff55", blue: "#c48dff", brightBlue: "#5555ff", magenta: "#fa2573", brightMagenta: "#ff55ff", cyan: "#67d9f0", brightCyan: "#55ffff", white: "#f2f2f2", brightWhite: "#ffffff" }, Le = { foreground: "#cac296", background: "#1d1908", cursor: "#d3ba30", black: "#000000", brightBlack: "#5e5219", red: "#b64c00", brightRed: "#ff9149", green: "#7c8b16", brightGreen: "#b2ca3b", yellow: "#d3bd26", brightYellow: "#ffe54a", blue: "#616bb0", brightBlue: "#acb8ff", magenta: "#8c5a90", brightMagenta: "#ffa0ff", cyan: "#916c25", brightCyan: "#ffbc51", white: "#cac29a", brightWhite: "#fed698" }, De = { foreground: "#e1e1e0", background: "#2d3743", cursor: "#000000", black: "#000000", brightBlack: "#555555", red: "#ff4242", brightRed: "#ff3242", green: "#74af68", brightGreen: "#74cd68", yellow: "#ffad29", brightYellow: "#ffb929", blue: "#338f86", brightBlue: "#23d7d7", magenta: "#9414e6", brightMagenta: "#ff37ff", cyan: "#23d7d7", brightCyan: "#00ede1", white: "#e1e1e0", brightWhite: "#ffffff" }, Ae = { foreground: "#bbbbbb", background: "#121212", cursor: "#bbbbbb", black: "#121212", brightBlack: "#555555", red: "#fa2573", brightRed: "#f6669d", green: "#98e123", brightGreen: "#b1e05f", yellow: "#dfd460", brightYellow: "#fff26d", blue: "#1080d0", brightBlue: "#00afff", magenta: "#8700ff", brightMagenta: "#af87ff", cyan: "#43a8d0", brightCyan: "#51ceff", white: "#bbbbbb", brightWhite: "#ffffff" }, Me = { foreground: "#f7d66a", background: "#120b0d", cursor: "#c46c32", black: "#351b0e", brightBlack: "#874228", red: "#9b291c", brightRed: "#ff4331", green: "#636232", brightGreen: "#b4b264", yellow: "#c36e28", brightYellow: "#ff9566", blue: "#515c5d", brightBlue: "#9eb2b4", magenta: "#9b1d29", brightMagenta: "#ff5b6a", cyan: "#588056", brightCyan: "#8acd8f", white: "#f7d75c", brightWhite: "#ffe598" }, xe = { foreground: "#c4c5b5", background: "#1a1a1a", cursor: "#f6f7ec", black: "#1a1a1a", brightBlack: "#625e4c", red: "#f4005f", brightRed: "#f4005f", green: "#98e024", brightGreen: "#98e024", yellow: "#fa8419", brightYellow: "#e0d561", blue: "#9d65ff", brightBlue: "#9d65ff", magenta: "#f4005f", brightMagenta: "#f4005f", cyan: "#58d1eb", brightCyan: "#58d1eb", white: "#c4c5b5", brightWhite: "#f6f6ef" }, Te = { foreground: "#f9f9f9", background: "#121212", cursor: "#fb0007", black: "#121212", brightBlack: "#838383", red: "#fa2934", brightRed: "#f6669d", green: "#98e123", brightGreen: "#b1e05f", yellow: "#fff30a", brightYellow: "#fff26d", blue: "#0443ff", brightBlue: "#0443ff", magenta: "#f800f8", brightMagenta: "#f200f6", cyan: "#01b6ed", brightCyan: "#51ceff", white: "#ffffff", brightWhite: "#ffffff" }, Oe = { foreground: "#a0a0a0", background: "#222222", cursor: "#aa9175", black: "#383838", brightBlack: "#474747", red: "#a95551", brightRed: "#a97775", green: "#666666", brightGreen: "#8c8c8c", yellow: "#a98051", brightYellow: "#a99175", blue: "#657d3e", brightBlue: "#98bd5e", magenta: "#767676", brightMagenta: "#a3a3a3", cyan: "#c9c9c9", brightCyan: "#dcdcdc", white: "#d0b8a3", brightWhite: "#d8c8bb" }, Pe = { foreground: "#ffffff", background: "#271f19", cursor: "#ffffff", black: "#000000", brightBlack: "#000000", red: "#800000", brightRed: "#800000", green: "#61ce3c", brightGreen: "#61ce3c", yellow: "#fbde2d", brightYellow: "#fbde2d", blue: "#253b76", brightBlue: "#253b76", magenta: "#ff0080", brightMagenta: "#ff0080", cyan: "#8da6ce", brightCyan: "#8da6ce", white: "#f8f8f8", brightWhite: "#f8f8f8" }, Ie = { foreground: "#e6e8ef", background: "#1c1e22", cursor: "#f6f7ec", black: "#23252b", brightBlack: "#23252b", red: "#b54036", brightRed: "#b54036", green: "#5ab977", brightGreen: "#5ab977", yellow: "#deb566", brightYellow: "#deb566", blue: "#6a7c93", brightBlue: "#6a7c93", magenta: "#a4799d", brightMagenta: "#a4799d", cyan: "#3f94a8", brightCyan: "#3f94a8", white: "#e6e8ef", brightWhite: "#ebedf2" }, He = { foreground: "#bbbbbb", background: "#000000", cursor: "#bbbbbb", black: "#4c4c4c", brightBlack: "#555555", red: "#bb0000", brightRed: "#ff5555", green: "#5fde8f", brightGreen: "#55ff55", yellow: "#f3f167", brightYellow: "#ffff55", blue: "#276bd8", brightBlue: "#5555ff", magenta: "#bb00bb", brightMagenta: "#ff55ff", cyan: "#00dadf", brightCyan: "#55ffff", white: "#bbbbbb", brightWhite: "#ffffff" }, We = { foreground: "#bbbbbb", background: "#171717", cursor: "#bbbbbb", black: "#4c4c4c", brightBlack: "#555555", red: "#bb0000", brightRed: "#ff5555", green: "#04f623", brightGreen: "#7df71d", yellow: "#f3f167", brightYellow: "#ffff55", blue: "#64d0f0", brightBlue: "#62cbe8", magenta: "#ce6fdb", brightMagenta: "#ff9bf5", cyan: "#00dadf", brightCyan: "#00ccd8", white: "#bbbbbb", brightWhite: "#ffffff" }, Fe = { foreground: "#3b2322", background: "#dfdbc3", cursor: "#73635a", black: "#000000", brightBlack: "#808080", red: "#cc0000", brightRed: "#cc0000", green: "#009600", brightGreen: "#009600", yellow: "#d06b00", brightYellow: "#d06b00", blue: "#0000cc", brightBlue: "#0000cc", magenta: "#cc00cc", brightMagenta: "#cc00cc", cyan: "#0087cc", brightCyan: "#0087cc", white: "#cccccc", brightWhite: "#ffffff" }, Ue = { foreground: "#cdcdcd", background: "#283033", cursor: "#c0cad0", black: "#000000", brightBlack: "#555555", red: "#a60001", brightRed: "#ff0003", green: "#00bb00", brightGreen: "#93c863", yellow: "#fecd22", brightYellow: "#fef874", blue: "#3a9bdb", brightBlue: "#a1d7ff", magenta: "#bb00bb", brightMagenta: "#ff55ff", cyan: "#00bbbb", brightCyan: "#55ffff", white: "#bbbbbb", brightWhite: "#ffffff" }, Ne = { foreground: "#ffffff", background: "#224fbc", cursor: "#7f7f7f", black: "#000000", brightBlack: "#666666", red: "#990000", brightRed: "#e50000", green: "#00a600", brightGreen: "#00d900", yellow: "#999900", brightYellow: "#e5e500", blue: "#0000b2", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, Ge = { foreground: "#c2c8d7", background: "#1c262b", cursor: "#b3b8c3", black: "#000000", brightBlack: "#777777", red: "#ee2b2a", brightRed: "#dc5c60", green: "#40a33f", brightGreen: "#70be71", yellow: "#ffea2e", brightYellow: "#fff163", blue: "#1e80f0", brightBlue: "#54a4f3", magenta: "#8800a0", brightMagenta: "#aa4dbc", cyan: "#16afca", brightCyan: "#42c7da", white: "#a4a4a4", brightWhite: "#ffffff" }, Ye = { foreground: "#8a8dae", background: "#222125", cursor: "#5b6ea7", black: "#000000", brightBlack: "#5b3725", red: "#ac2e31", brightRed: "#ff3d48", green: "#31ac61", brightGreen: "#3bff99", yellow: "#ac4300", brightYellow: "#ff5e1e", blue: "#2d57ac", brightBlue: "#4488ff", magenta: "#b08528", brightMagenta: "#ffc21d", cyan: "#1fa6ac", brightCyan: "#1ffaff", white: "#8a8eac", brightWhite: "#5b6ea7" }, je = { foreground: "#dcdfe4", background: "#282c34", cursor: "#a3b3cc", black: "#282c34", brightBlack: "#282c34", red: "#e06c75", brightRed: "#e06c75", green: "#98c379", brightGreen: "#98c379", yellow: "#e5c07b", brightYellow: "#e5c07b", blue: "#61afef", brightBlue: "#61afef", magenta: "#c678dd", brightMagenta: "#c678dd", cyan: "#56b6c2", brightCyan: "#56b6c2", white: "#dcdfe4", brightWhite: "#dcdfe4" }, $e = { foreground: "#383a42", background: "#fafafa", cursor: "#bfceff", black: "#383a42", brightBlack: "#4f525e", red: "#e45649", brightRed: "#e06c75", green: "#50a14f", brightGreen: "#98c379", yellow: "#c18401", brightYellow: "#e5c07b", blue: "#0184bc", brightBlue: "#61afef", magenta: "#a626a4", brightMagenta: "#c678dd", cyan: "#0997b3", brightCyan: "#56b6c2", white: "#fafafa", brightWhite: "#ffffff" }, ze = { foreground: "#e1e1e1", background: "#141e43", cursor: "#43d58e", black: "#000000", brightBlack: "#3f5648", red: "#ff4242", brightRed: "#ff3242", green: "#74af68", brightGreen: "#74cd68", yellow: "#ffad29", brightYellow: "#ffb929", blue: "#338f86", brightBlue: "#23d7d7", magenta: "#9414e6", brightMagenta: "#ff37ff", cyan: "#23d7d7", brightCyan: "#00ede1", white: "#e2e2e2", brightWhite: "#ffffff" }, Ke = { foreground: "#a39e9b", background: "#2f1e2e", cursor: "#a39e9b", black: "#2f1e2e", brightBlack: "#776e71", red: "#ef6155", brightRed: "#ef6155", green: "#48b685", brightGreen: "#48b685", yellow: "#fec418", brightYellow: "#fec418", blue: "#06b6ef", brightBlue: "#06b6ef", magenta: "#815ba4", brightMagenta: "#815ba4", cyan: "#5bc4bf", brightCyan: "#5bc4bf", white: "#a39e9b", brightWhite: "#e7e9db" }, qe = { foreground: "#a39e9b", background: "#2f1e2e", cursor: "#a39e9b", black: "#2f1e2e", brightBlack: "#776e71", red: "#ef6155", brightRed: "#ef6155", green: "#48b685", brightGreen: "#48b685", yellow: "#fec418", brightYellow: "#fec418", blue: "#06b6ef", brightBlue: "#06b6ef", magenta: "#815ba4", brightMagenta: "#815ba4", cyan: "#5bc4bf", brightCyan: "#5bc4bf", white: "#a39e9b", brightWhite: "#e7e9db" }, Ve = { foreground: "#f2f2f2", background: "#000000", cursor: "#4d4d4d", black: "#2a2a2a", brightBlack: "#666666", red: "#ff0000", brightRed: "#ff0080", green: "#79ff0f", brightGreen: "#66ff66", yellow: "#e7bf00", brightYellow: "#f3d64e", blue: "#396bd7", brightBlue: "#709aed", magenta: "#b449be", brightMagenta: "#db67e6", cyan: "#66ccff", brightCyan: "#7adff2", white: "#bbbbbb", brightWhite: "#ffffff" }, Xe = { foreground: "#f1f1f1", background: "#212121", cursor: "#20bbfc", black: "#212121", brightBlack: "#424242", red: "#c30771", brightRed: "#fb007a", green: "#10a778", brightGreen: "#5fd7af", yellow: "#a89c14", brightYellow: "#f3e430", blue: "#008ec4", brightBlue: "#20bbfc", magenta: "#523c79", brightMagenta: "#6855de", cyan: "#20a5ba", brightCyan: "#4fb8cc", white: "#d9d9d9", brightWhite: "#f1f1f1" }, Je = { foreground: "#424242", background: "#f1f1f1", cursor: "#20bbfc", black: "#212121", brightBlack: "#424242", red: "#c30771", brightRed: "#fb007a", green: "#10a778", brightGreen: "#5fd7af", yellow: "#a89c14", brightYellow: "#f3e430", blue: "#008ec4", brightBlue: "#20bbfc", magenta: "#523c79", brightMagenta: "#6855de", cyan: "#20a5ba", brightCyan: "#4fb8cc", white: "#d9d9d9", brightWhite: "#f1f1f1" }, Ze = { foreground: "#414141", background: "#ffffff", cursor: "#5e77c8", black: "#414141", brightBlack: "#3f3f3f", red: "#b23771", brightRed: "#db3365", green: "#66781e", brightGreen: "#829429", yellow: "#cd6f34", brightYellow: "#cd6f34", blue: "#3c5ea8", brightBlue: "#3c5ea8", magenta: "#a454b2", brightMagenta: "#a454b2", cyan: "#66781e", brightCyan: "#829429", white: "#ffffff", brightWhite: "#f2f2f2" }, Qe = { foreground: "#d0d0d0", background: "#1c1c1c", cursor: "#e4c9af", black: "#2f2e2d", brightBlack: "#4a4845", red: "#a36666", brightRed: "#d78787", green: "#90a57d", brightGreen: "#afbea2", yellow: "#d7af87", brightYellow: "#e4c9af", blue: "#7fa5bd", brightBlue: "#a1bdce", magenta: "#c79ec4", brightMagenta: "#d7beda", cyan: "#8adbb4", brightCyan: "#b1e7dd", white: "#d0d0d0", brightWhite: "#efefef" }, et = { foreground: "#f2f2f2", background: "#000000", cursor: "#4d4d4d", black: "#000000", brightBlack: "#666666", red: "#990000", brightRed: "#e50000", green: "#00a600", brightGreen: "#00d900", yellow: "#999900", brightYellow: "#e5e500", blue: "#2009db", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, tt = { foreground: "#ffffff", background: "#762423", cursor: "#ffffff", black: "#000000", brightBlack: "#262626", red: "#d62e4e", brightRed: "#e02553", green: "#71be6b", brightGreen: "#aff08c", yellow: "#beb86b", brightYellow: "#dfddb7", blue: "#489bee", brightBlue: "#65aaf1", magenta: "#e979d7", brightMagenta: "#ddb7df", cyan: "#6bbeb8", brightCyan: "#b7dfdd", white: "#d6d6d6", brightWhite: "#ffffff" }, rt = { foreground: "#d7c9a7", background: "#7a251e", cursor: "#ffffff", black: "#000000", brightBlack: "#555555", red: "#ff3f00", brightRed: "#bb0000", green: "#00bb00", brightGreen: "#00bb00", yellow: "#e7b000", brightYellow: "#e7b000", blue: "#0072ff", brightBlue: "#0072ae", magenta: "#bb00bb", brightMagenta: "#ff55ff", cyan: "#00bbbb", brightCyan: "#55ffff", white: "#bbbbbb", brightWhite: "#ffffff" }, it = { foreground: "#ffffff", background: "#2b2b2b", cursor: "#7f7f7f", black: "#000000", brightBlack: "#666666", red: "#cdaf95", brightRed: "#eecbad", green: "#a8ff60", brightGreen: "#bcee68", yellow: "#bfbb1f", brightYellow: "#e5e500", blue: "#75a5b0", brightBlue: "#86bdc9", magenta: "#ff73fd", brightMagenta: "#e500e5", cyan: "#5a647e", brightCyan: "#8c9bc4", white: "#bfbfbf", brightWhite: "#e5e5e5" }, st = { foreground: "#514968", background: "#100815", cursor: "#524966", black: "#241f2b", brightBlack: "#312d3d", red: "#91284c", brightRed: "#d5356c", green: "#23801c", brightGreen: "#2cd946", yellow: "#b49d27", brightYellow: "#fde83b", blue: "#6580b0", brightBlue: "#90baf9", magenta: "#674d96", brightMagenta: "#a479e3", cyan: "#8aaabe", brightCyan: "#acd4eb", white: "#524966", brightWhite: "#9e8cbd" }, nt = { foreground: "#ececec", background: "#2c3941", cursor: "#ececec", black: "#2c3941", brightBlack: "#5d7079", red: "#865f5b", brightRed: "#865f5b", green: "#66907d", brightGreen: "#66907d", yellow: "#b1a990", brightYellow: "#b1a990", blue: "#6a8e95", brightBlue: "#6a8e95", magenta: "#b18a73", brightMagenta: "#b18a73", cyan: "#88b2ac", brightCyan: "#88b2ac", white: "#ececec", brightWhite: "#ececec" }, ot = { foreground: "#deb88d", background: "#09141b", cursor: "#fca02f", black: "#17384c", brightBlack: "#434b53", red: "#d15123", brightRed: "#d48678", green: "#027c9b", brightGreen: "#628d98", yellow: "#fca02f", brightYellow: "#fdd39f", blue: "#1e4950", brightBlue: "#1bbcdd", magenta: "#68d4f1", brightMagenta: "#bbe3ee", cyan: "#50a3b5", brightCyan: "#87acb4", white: "#deb88d", brightWhite: "#fee4ce" }, at = { foreground: "#d4e7d4", background: "#243435", cursor: "#57647a", black: "#757575", brightBlack: "#8a8a8a", red: "#825d4d", brightRed: "#cf937a", green: "#728c62", brightGreen: "#98d9aa", yellow: "#ada16d", brightYellow: "#fae79d", blue: "#4d7b82", brightBlue: "#7ac3cf", magenta: "#8a7267", brightMagenta: "#d6b2a1", cyan: "#729494", brightCyan: "#ade0e0", white: "#e0e0e0", brightWhite: "#e0e0e0" }, ht = { foreground: "#cacecd", background: "#111213", cursor: "#e3bf21", black: "#323232", brightBlack: "#323232", red: "#c22832", brightRed: "#c22832", green: "#8ec43d", brightGreen: "#8ec43d", yellow: "#e0c64f", brightYellow: "#e0c64f", blue: "#43a5d5", brightBlue: "#43a5d5", magenta: "#8b57b5", brightMagenta: "#8b57b5", cyan: "#8ec43d", brightCyan: "#8ec43d", white: "#eeeeee", brightWhite: "#ffffff" }, ct = { foreground: "#405555", background: "#001015", cursor: "#4afcd6", black: "#012026", brightBlack: "#384451", red: "#b2302d", brightRed: "#ff4242", green: "#00a941", brightGreen: "#2aea5e", yellow: "#5e8baa", brightYellow: "#8ed4fd", blue: "#449a86", brightBlue: "#61d5ba", magenta: "#00599d", brightMagenta: "#1298ff", cyan: "#5d7e19", brightCyan: "#98d028", white: "#405555", brightWhite: "#58fbd6" }, lt = { foreground: "#35b1d2", background: "#222222", cursor: "#87d3c4", black: "#222222", brightBlack: "#ffffff", red: "#e2a8bf", brightRed: "#ffcdd9", green: "#81d778", brightGreen: "#beffa8", yellow: "#c4c9c0", brightYellow: "#d0ccca", blue: "#264b49", brightBlue: "#7ab0d2", magenta: "#a481d3", brightMagenta: "#c5a7d9", cyan: "#15ab9c", brightCyan: "#8cdfe0", white: "#02c5e0", brightWhite: "#e0e0e0" }, dt = { foreground: "#f7f7f7", background: "#1b1b1b", cursor: "#bbbbbb", black: "#000000", brightBlack: "#7a7a7a", red: "#b84131", brightRed: "#d6837c", green: "#7da900", brightGreen: "#c4f137", yellow: "#c4a500", brightYellow: "#fee14d", blue: "#62a3c4", brightBlue: "#8dcff0", magenta: "#ba8acc", brightMagenta: "#f79aff", cyan: "#207383", brightCyan: "#6ad9cf", white: "#a1a1a1", brightWhite: "#f7f7f7" }, ft = { foreground: "#99a3a2", background: "#242626", cursor: "#d2e0de", black: "#000000", brightBlack: "#666c6c", red: "#a2686a", brightRed: "#dd5c60", green: "#9aa56a", brightGreen: "#bfdf55", yellow: "#a3906a", brightYellow: "#deb360", blue: "#6b8fa3", brightBlue: "#62b1df", magenta: "#6a71a3", brightMagenta: "#606edf", cyan: "#6ba58f", brightCyan: "#64e39c", white: "#99a3a2", brightWhite: "#d2e0de" }, ut = { foreground: "#d2d8d9", background: "#3d3f41", cursor: "#708284", black: "#25292a", brightBlack: "#25292a", red: "#f24840", brightRed: "#f24840", green: "#629655", brightGreen: "#629655", yellow: "#b68800", brightYellow: "#b68800", blue: "#2075c7", brightBlue: "#2075c7", magenta: "#797fd4", brightMagenta: "#797fd4", cyan: "#15968d", brightCyan: "#15968d", white: "#d2d8d9", brightWhite: "#d2d8d9" }, _t = { foreground: "#708284", background: "#001e27", cursor: "#708284", black: "#002831", brightBlack: "#001e27", red: "#d11c24", brightRed: "#bd3613", green: "#738a05", brightGreen: "#475b62", yellow: "#a57706", brightYellow: "#536870", blue: "#2176c7", brightBlue: "#708284", magenta: "#c61c6f", brightMagenta: "#5956ba", cyan: "#259286", brightCyan: "#819090", white: "#eae3cb", brightWhite: "#fcf4dc" }, gt = { foreground: "#708284", background: "#001e27", cursor: "#708284", black: "#002831", brightBlack: "#475b62", red: "#d11c24", brightRed: "#bd3613", green: "#738a05", brightGreen: "#475b62", yellow: "#a57706", brightYellow: "#536870", blue: "#2176c7", brightBlue: "#708284", magenta: "#c61c6f", brightMagenta: "#5956ba", cyan: "#259286", brightCyan: "#819090", white: "#eae3cb", brightWhite: "#fcf4dc" }, bt = { foreground: "#9cc2c3", background: "#001e27", cursor: "#f34b00", black: "#002831", brightBlack: "#006488", red: "#d11c24", brightRed: "#f5163b", green: "#6cbe6c", brightGreen: "#51ef84", yellow: "#a57706", brightYellow: "#b27e28", blue: "#2176c7", brightBlue: "#178ec8", magenta: "#c61c6f", brightMagenta: "#e24d8e", cyan: "#259286", brightCyan: "#00b39e", white: "#eae3cb", brightWhite: "#fcf4dc" }, vt = { foreground: "#536870", background: "#fcf4dc", cursor: "#536870", black: "#002831", brightBlack: "#001e27", red: "#d11c24", brightRed: "#bd3613", green: "#738a05", brightGreen: "#475b62", yellow: "#a57706", brightYellow: "#536870", blue: "#2176c7", brightBlue: "#708284", magenta: "#c61c6f", brightMagenta: "#5956ba", cyan: "#259286", brightCyan: "#819090", white: "#eae3cb", brightWhite: "#fcf4dc" }, pt = { foreground: "#b3b8c3", background: "#20242d", cursor: "#b3b8c3", black: "#000000", brightBlack: "#000000", red: "#b04b57", brightRed: "#b04b57", green: "#87b379", brightGreen: "#87b379", yellow: "#e5c179", brightYellow: "#e5c179", blue: "#7d8fa4", brightBlue: "#7d8fa4", magenta: "#a47996", brightMagenta: "#a47996", cyan: "#85a7a5", brightCyan: "#85a7a5", white: "#b3b8c3", brightWhite: "#ffffff" }, mt = { foreground: "#bdbaae", background: "#222222", cursor: "#bbbbbb", black: "#15171c", brightBlack: "#555555", red: "#ec5f67", brightRed: "#ff6973", green: "#81a764", brightGreen: "#93d493", yellow: "#fec254", brightYellow: "#ffd256", blue: "#5486c0", brightBlue: "#4d84d1", magenta: "#bf83c1", brightMagenta: "#ff55ff", cyan: "#57c2c1", brightCyan: "#83e9e4", white: "#efece7", brightWhite: "#ffffff" }, St = { foreground: "#c9c6bc", background: "#222222", cursor: "#bbbbbb", black: "#15171c", brightBlack: "#555555", red: "#b24a56", brightRed: "#ec5f67", green: "#92b477", brightGreen: "#89e986", yellow: "#c6735a", brightYellow: "#fec254", blue: "#7c8fa5", brightBlue: "#5486c0", magenta: "#a5789e", brightMagenta: "#bf83c1", cyan: "#80cdcb", brightCyan: "#58c2c1", white: "#b3b8c3", brightWhite: "#ffffff" }, Ct = { foreground: "#ecf0c1", background: "#0a1e24", cursor: "#708284", black: "#6e5346", brightBlack: "#684c31", red: "#e35b00", brightRed: "#ff8a3a", green: "#5cab96", brightGreen: "#aecab8", yellow: "#e3cd7b", brightYellow: "#ffc878", blue: "#0f548b", brightBlue: "#67a0ce", magenta: "#e35b00", brightMagenta: "#ff8a3a", cyan: "#06afc7", brightCyan: "#83a7b4", white: "#f0f1ce", brightWhite: "#fefff1" }, yt = { foreground: "#e3e3e3", background: "#1b1d1e", cursor: "#2c3fff", black: "#1b1d1e", brightBlack: "#505354", red: "#e60813", brightRed: "#ff0325", green: "#e22928", brightGreen: "#ff3338", yellow: "#e24756", brightYellow: "#fe3a35", blue: "#2c3fff", brightBlue: "#1d50ff", magenta: "#2435db", brightMagenta: "#747cff", cyan: "#3256ff", brightCyan: "#6184ff", white: "#fffef6", brightWhite: "#fffff9" }, wt = { foreground: "#4d4d4c", background: "#ffffff", cursor: "#4d4d4c", black: "#000000", brightBlack: "#000000", red: "#ff4d83", brightRed: "#ff0021", green: "#1f8c3b", brightGreen: "#1fc231", yellow: "#1fc95b", brightYellow: "#d5b807", blue: "#1dd3ee", brightBlue: "#15a9fd", magenta: "#8959a8", brightMagenta: "#8959a8", cyan: "#3e999f", brightCyan: "#3e999f", white: "#ffffff", brightWhite: "#ffffff" }, kt = { foreground: "#acacab", background: "#1a1a1a", cursor: "#fcfbcc", black: "#050505", brightBlack: "#141414", red: "#e9897c", brightRed: "#f99286", green: "#b6377d", brightGreen: "#c3f786", yellow: "#ecebbe", brightYellow: "#fcfbcc", blue: "#a9cdeb", brightBlue: "#b6defb", magenta: "#75507b", brightMagenta: "#ad7fa8", cyan: "#c9caec", brightCyan: "#d7d9fc", white: "#f2f2f2", brightWhite: "#e2e2e2" }, Et = { foreground: "#c9c9c9", background: "#1a1818", cursor: "#ffffff", black: "#302b2a", brightBlack: "#4d4e48", red: "#a7463d", brightRed: "#aa000c", green: "#587744", brightGreen: "#128c21", yellow: "#9d602a", brightYellow: "#fc6a21", blue: "#485b98", brightBlue: "#7999f7", magenta: "#864651", brightMagenta: "#fd8aa1", cyan: "#9c814f", brightCyan: "#fad484", white: "#c9c9c9", brightWhite: "#ffffff" }, Bt = { foreground: "#ffffff", background: "#000000", cursor: "#dc322f", black: "#000000", brightBlack: "#1b1d21", red: "#dc322f", brightRed: "#dc322f", green: "#56db3a", brightGreen: "#56db3a", yellow: "#ff8400", brightYellow: "#ff8400", blue: "#0084d4", brightBlue: "#0084d4", magenta: "#b729d9", brightMagenta: "#b729d9", cyan: "#ccccff", brightCyan: "#ccccff", white: "#ffffff", brightWhite: "#ffffff" }, Rt = { foreground: "#d0d0d0", background: "#262626", cursor: "#e4c9af", black: "#1c1c1c", brightBlack: "#1c1c1c", red: "#d68686", brightRed: "#d68686", green: "#aed686", brightGreen: "#aed686", yellow: "#d7af87", brightYellow: "#e4c9af", blue: "#86aed6", brightBlue: "#86aed6", magenta: "#d6aed6", brightMagenta: "#d6aed6", cyan: "#8adbb4", brightCyan: "#b1e7dd", white: "#d0d0d0", brightWhite: "#efefef" }, Lt = { foreground: "#000000", background: "#ffffff", cursor: "#7f7f7f", black: "#000000", brightBlack: "#666666", red: "#990000", brightRed: "#e50000", green: "#00a600", brightGreen: "#00d900", yellow: "#999900", brightYellow: "#e5e500", blue: "#0000b2", brightBlue: "#0000ff", magenta: "#b200b2", brightMagenta: "#e500e5", cyan: "#00a6b2", brightCyan: "#00e5e5", white: "#bfbfbf", brightWhite: "#e5e5e5" }, Dt = { foreground: "#f8f8f8", background: "#1b1d1e", cursor: "#fc971f", black: "#1b1d1e", brightBlack: "#505354", red: "#f92672", brightRed: "#ff5995", green: "#4df840", brightGreen: "#b6e354", yellow: "#f4fd22", brightYellow: "#feed6c", blue: "#2757d6", brightBlue: "#3f78ff", magenta: "#8c54fe", brightMagenta: "#9e6ffe", cyan: "#38c8b5", brightCyan: "#23cfd5", white: "#ccccc6", brightWhite: "#f8f8f2" }, At = { foreground: "#b5b5b5", background: "#1b1d1e", cursor: "#16b61b", black: "#1b1d1e", brightBlack: "#505354", red: "#269d1b", brightRed: "#8dff2a", green: "#13ce30", brightGreen: "#48ff77", yellow: "#63e457", brightYellow: "#3afe16", blue: "#2525f5", brightBlue: "#506b95", magenta: "#641f74", brightMagenta: "#72589d", cyan: "#378ca9", brightCyan: "#4085a6", white: "#d9d8d1", brightWhite: "#e5e6e1" }, Mt = { foreground: "#4d4d4c", background: "#ffffff", cursor: "#4d4d4c", black: "#000000", brightBlack: "#000000", red: "#c82829", brightRed: "#c82829", green: "#718c00", brightGreen: "#718c00", yellow: "#eab700", brightYellow: "#eab700", blue: "#4271ae", brightBlue: "#4271ae", magenta: "#8959a8", brightMagenta: "#8959a8", cyan: "#3e999f", brightCyan: "#3e999f", white: "#ffffff", brightWhite: "#ffffff" }, xt = { foreground: "#c5c8c6", background: "#1d1f21", cursor: "#c5c8c6", black: "#000000", brightBlack: "#000000", red: "#cc6666", brightRed: "#cc6666", green: "#b5bd68", brightGreen: "#b5bd68", yellow: "#f0c674", brightYellow: "#f0c674", blue: "#81a2be", brightBlue: "#81a2be", magenta: "#b294bb", brightMagenta: "#b294bb", cyan: "#8abeb7", brightCyan: "#8abeb7", white: "#ffffff", brightWhite: "#ffffff" }, Tt = { foreground: "#ffffff", background: "#002451", cursor: "#ffffff", black: "#000000", brightBlack: "#000000", red: "#ff9da4", brightRed: "#ff9da4", green: "#d1f1a9", brightGreen: "#d1f1a9", yellow: "#ffeead", brightYellow: "#ffeead", blue: "#bbdaff", brightBlue: "#bbdaff", magenta: "#ebbbff", brightMagenta: "#ebbbff", cyan: "#99ffff", brightCyan: "#99ffff", white: "#ffffff", brightWhite: "#ffffff" }, Ot = { foreground: "#eaeaea", background: "#000000", cursor: "#eaeaea", black: "#000000", brightBlack: "#000000", red: "#d54e53", brightRed: "#d54e53", green: "#b9ca4a", brightGreen: "#b9ca4a", yellow: "#e7c547", brightYellow: "#e7c547", blue: "#7aa6da", brightBlue: "#7aa6da", magenta: "#c397d8", brightMagenta: "#c397d8", cyan: "#70c0b1", brightCyan: "#70c0b1", white: "#ffffff", brightWhite: "#ffffff" }, Pt = { foreground: "#cccccc", background: "#2d2d2d", cursor: "#cccccc", black: "#000000", brightBlack: "#000000", red: "#f2777a", brightRed: "#f2777a", green: "#99cc99", brightGreen: "#99cc99", yellow: "#ffcc66", brightYellow: "#ffcc66", blue: "#6699cc", brightBlue: "#6699cc", magenta: "#cc99cc", brightMagenta: "#cc99cc", cyan: "#66cccc", brightCyan: "#66cccc", white: "#ffffff", brightWhite: "#ffffff" }, It = { foreground: "#31d07b", background: "#24364b", cursor: "#d5d5d5", black: "#2c3f58", brightBlack: "#336889", red: "#be2d26", brightRed: "#dd5944", green: "#1a9172", brightGreen: "#31d07b", yellow: "#db8e27", brightYellow: "#e7d84b", blue: "#325d96", brightBlue: "#34a6da", magenta: "#8a5edc", brightMagenta: "#ae6bdc", cyan: "#35a08f", brightCyan: "#42c3ae", white: "#23d183", brightWhite: "#d5d5d5" }, Ht = { foreground: "#786b53", background: "#191919", cursor: "#fac814", black: "#321300", brightBlack: "#433626", red: "#b2270e", brightRed: "#ed5d20", green: "#44a900", brightGreen: "#55f238", yellow: "#aa820c", brightYellow: "#f2b732", blue: "#58859a", brightBlue: "#85cfed", magenta: "#97363d", brightMagenta: "#e14c5a", cyan: "#b25a1e", brightCyan: "#f07d14", white: "#786b53", brightWhite: "#ffc800" }, Wt = { foreground: "#eeeeec", background: "#300a24", cursor: "#bbbbbb", black: "#2e3436", brightBlack: "#555753", red: "#cc0000", brightRed: "#ef2929", green: "#4e9a06", brightGreen: "#8ae234", yellow: "#c4a000", brightYellow: "#fce94f", blue: "#3465a4", brightBlue: "#729fcf", magenta: "#75507b", brightMagenta: "#ad7fa8", cyan: "#06989a", brightCyan: "#34e2e2", white: "#d3d7cf", brightWhite: "#eeeeec" }, Ft = { foreground: "#ffffff", background: "#011116", cursor: "#4afcd6", black: "#022026", brightBlack: "#384451", red: "#b2302d", brightRed: "#ff4242", green: "#00a941", brightGreen: "#2aea5e", yellow: "#59819c", brightYellow: "#8ed4fd", blue: "#459a86", brightBlue: "#61d5ba", magenta: "#00599d", brightMagenta: "#1298ff", cyan: "#5d7e19", brightCyan: "#98d028", white: "#405555", brightWhite: "#58fbd6" }, Ut = { foreground: "#877a9b", background: "#1b1b23", cursor: "#a063eb", black: "#000000", brightBlack: "#5d3225", red: "#b0425b", brightRed: "#ff6388", green: "#37a415", brightGreen: "#29e620", yellow: "#ad5c42", brightYellow: "#f08161", blue: "#564d9b", brightBlue: "#867aed", magenta: "#6c3ca1", brightMagenta: "#a05eee", cyan: "#808080", brightCyan: "#eaeaea", white: "#87799c", brightWhite: "#bfa3ff" }, Nt = { foreground: "#dcdccc", background: "#25234f", cursor: "#ff5555", black: "#25234f", brightBlack: "#709080", red: "#705050", brightRed: "#dca3a3", green: "#60b48a", brightGreen: "#60b48a", yellow: "#dfaf8f", brightYellow: "#f0dfaf", blue: "#5555ff", brightBlue: "#5555ff", magenta: "#f08cc3", brightMagenta: "#ec93d3", cyan: "#8cd0d3", brightCyan: "#93e0e3", white: "#709080", brightWhite: "#ffffff" }, Gt = { foreground: "#ffffff", background: "#000000", cursor: "#ffffff", black: "#878787", brightBlack: "#555555", red: "#ff6600", brightRed: "#ff0000", green: "#ccff04", brightGreen: "#00ff00", yellow: "#ffcc00", brightYellow: "#ffff00", blue: "#44b4cc", brightBlue: "#0000ff", magenta: "#9933cc", brightMagenta: "#ff00ff", cyan: "#44b4cc", brightCyan: "#00ffff", white: "#f5f5f5", brightWhite: "#e5e5e5" }, Yt = { foreground: "#708284", background: "#1c1d1f", cursor: "#708284", black: "#56595c", brightBlack: "#45484b", red: "#c94c22", brightRed: "#bd3613", green: "#85981c", brightGreen: "#738a04", yellow: "#b4881d", brightYellow: "#a57705", blue: "#2e8bce", brightBlue: "#2176c7", magenta: "#d13a82", brightMagenta: "#c61c6f", cyan: "#32a198", brightCyan: "#259286", white: "#c9c6bd", brightWhite: "#c9c6bd" }, jt = { foreground: "#536870", background: "#fcf4dc", cursor: "#536870", black: "#56595c", brightBlack: "#45484b", red: "#c94c22", brightRed: "#bd3613", green: "#85981c", brightGreen: "#738a04", yellow: "#b4881d", brightYellow: "#a57705", blue: "#2e8bce", brightBlue: "#2176c7", magenta: "#d13a82", brightMagenta: "#c61c6f", cyan: "#32a198", brightCyan: "#259286", white: "#d3d0c9", brightWhite: "#c9c6bd" }, $t = { foreground: "#afdab6", background: "#404040", cursor: "#30ff24", black: "#000000", brightBlack: "#fefcfc", red: "#e24346", brightRed: "#e97071", green: "#39b13a", brightGreen: "#9cc090", yellow: "#dae145", brightYellow: "#ddda7a", blue: "#4261c5", brightBlue: "#7b91d6", magenta: "#f920fb", brightMagenta: "#f674ba", cyan: "#2abbd4", brightCyan: "#5ed1e5", white: "#d0b8a3", brightWhite: "#d8c8bb" }, zt = { foreground: "#b3b3b3", background: "#000000", cursor: "#53ae71", black: "#000000", brightBlack: "#555555", red: "#cc5555", brightRed: "#ff5555", green: "#55cc55", brightGreen: "#55ff55", yellow: "#cdcd55", brightYellow: "#ffff55", blue: "#5555cc", brightBlue: "#5555ff", magenta: "#cc55cc", brightMagenta: "#ff55ff", cyan: "#7acaca", brightCyan: "#55ffff", white: "#cccccc", brightWhite: "#ffffff" }, Kt = { foreground: "#dafaff", background: "#1f1726", cursor: "#dd00ff", black: "#000507", brightBlack: "#009cc9", red: "#d94085", brightRed: "#da6bac", green: "#2ab250", brightGreen: "#f4dca5", yellow: "#ffd16f", brightYellow: "#eac066", blue: "#883cdc", brightBlue: "#308cba", magenta: "#ececec", brightMagenta: "#ae636b", cyan: "#c1b8b7", brightCyan: "#ff919d", white: "#fff8de", brightWhite: "#e4838d" }, qt = { foreground: "#dedacf", background: "#171717", cursor: "#bbbbbb", black: "#000000", brightBlack: "#313131", red: "#ff615a", brightRed: "#f58c80", green: "#b1e969", brightGreen: "#ddf88f", yellow: "#ebd99c", brightYellow: "#eee5b2", blue: "#5da9f6", brightBlue: "#a5c7ff", magenta: "#e86aff", brightMagenta: "#ddaaff", cyan: "#82fff7", brightCyan: "#b7fff9", white: "#dedacf", brightWhite: "#ffffff" }, Vt = { foreground: "#999993", background: "#101010", cursor: "#9e9ecb", black: "#333333", brightBlack: "#3d3d3d", red: "#8c4665", brightRed: "#bf4d80", green: "#287373", brightGreen: "#53a6a6", yellow: "#7c7c99", brightYellow: "#9e9ecb", blue: "#395573", brightBlue: "#477ab3", magenta: "#5e468c", brightMagenta: "#7e62b3", cyan: "#31658c", brightCyan: "#6096bf", white: "#899ca1", brightWhite: "#c0c0c0" }, Xt = { foreground: "#dcdccc", background: "#3f3f3f", cursor: "#73635a", black: "#4d4d4d", brightBlack: "#709080", red: "#705050", brightRed: "#dca3a3", green: "#60b48a", brightGreen: "#c3bf9f", yellow: "#f0dfaf", brightYellow: "#e0cf9f", blue: "#506070", brightBlue: "#94bff3", magenta: "#dc8cc3", brightMagenta: "#ec93d3", cyan: "#8cd0d3", brightCyan: "#93e0e3", white: "#dcdccc", brightWhite: "#ffffff" }, Jt = { foreground: "#e6e1cf", background: "#0f1419", cursor: "#f29718", black: "#000000", brightBlack: "#323232", red: "#ff3333", brightRed: "#ff6565", green: "#b8cc52", brightGreen: "#eafe84", yellow: "#e7c547", brightYellow: "#fff779", blue: "#36a3d9", brightBlue: "#68d5ff", magenta: "#f07178", brightMagenta: "#ffa3aa", cyan: "#95e6cb", brightCyan: "#c7fffd", white: "#ffffff", brightWhite: "#ffffff" }, Zt = { foreground: "#cdcdcd", background: "#000000", cursor: "#d0d0d0", black: "#000000", brightBlack: "#535353", red: "#d11600", brightRed: "#f4152c", green: "#37c32c", brightGreen: "#01ea10", yellow: "#e3c421", brightYellow: "#ffee1d", blue: "#5c6bfd", brightBlue: "#8cb0f8", magenta: "#dd5be5", brightMagenta: "#e056f5", cyan: "#6eb4f2", brightCyan: "#67ecff", white: "#e0e0e0", brightWhite: "#f4f4f4" }, Qt = { foreground: "#ffffff", background: "#323232", cursor: "#d6d6d6", black: "#323232", brightBlack: "#535353", red: "#d25252", brightRed: "#f07070", green: "#7fe173", brightGreen: "#9dff91", yellow: "#ffc66d", brightYellow: "#ffe48b", blue: "#4099ff", brightBlue: "#5eb7f7", magenta: "#f680ff", brightMagenta: "#ff9dff", cyan: "#bed6ff", brightCyan: "#dcf4ff", white: "#eeeeec", brightWhite: "#ffffff" }, rr = { Night_3024: V, AdventureTime: N, Afterglow: J, AlienBlood: T, Argonaut: r, Arthur: a, AtelierSulphurpool: h, Atom: f, Batman: d, Belafonte_Night: u, BirdsOfParadise: b, Blazer: g, Borland: c, Bright_Lights: e, Broadcast: i, Brogrammer: n, C64: t, Chalk: s, Chalkboard: l, Ciapre: _, Cobalt2: m, Cobalt_Neon: o, CrayonPonyFish: v, Dark_Pastel: S, Darkside: y, Desert: w, DimmedMonokai: L, DotGov: M, Dracula: I, Duotone_Dark: W, ENCOM: p, Earthsong: C, Elemental: E, Elementary: R, Espresso: O, Espresso_Libre: F, Fideloper: Y, FirefoxDev: P, Firewatch: G, FishTank: B, Flat: k, Flatland: A, Floraverse: x, ForestBlue: H, FrontEndDelight: $, FunForrest: U, Galaxy: K, Github: X, Glacier: q, Grape: j, Grass: Q, Gruvbox_Dark: ie, Hardcore: se, Harper: ne, Highway: oe, Hipster_Green: ae, Homebrew: he, Hurtado: ce, Hybrid: le, IC_Green_PPL: de, IC_Orange_PPL: fe, IR_Black: ue, Jackie_Brown: _e, Japanesque: ge, Jellybeans: be, JetBrains_Darcula: ve, Kibble: pe, Later_This_Evening: me, Lavandula: Se, LiquidCarbon: Ce, LiquidCarbonTransparent: ye, LiquidCarbonTransparentInverse: we, Man_Page: ke, Material: Ee, MaterialDark: Be, Mathias: Re, Medallion: Le, Misterioso: De, Molokai: Ae, MonaLisa: Me, Monokai_Soda: xe, Monokai_Vivid: Te, N0tch2k: Oe, Neopolitan: Pe, Neutron: Ie, NightLion_v1: He, NightLion_v2: We, Novel: Fe, Obsidian: Ue, Ocean: Ne, OceanicMaterial: Ge, Ollie: Ye, OneHalfDark: je, OneHalfLight: $e, Pandora: ze, Paraiso_Dark: Ke, Parasio_Dark: qe, PaulMillr: Ve, PencilDark: Xe, PencilLight: Je, Piatto_Light: Ze, Pnevma: Qe, Pro: et, Red_Alert: tt, Red_Sands: rt, Rippedcasts: it, Royal: st, Ryuuko: nt, SeaShells: ot, Seafoam_Pastel: at, Seti: ht, Shaman: ct, Slate: lt, Smyck: dt, SoftServer: ft, Solarized_Darcula: ut, Solarized_Dark: _t, Solarized_Dark_Patched: gt, Solarized_Dark_Higher_Contrast: bt, Solarized_Light: vt, SpaceGray: pt, SpaceGray_Eighties: mt, SpaceGray_Eighties_Dull: St, Spacedust: Ct, Spiderman: yt, Spring: wt, Square: kt, Sundried: Et, Symfonic: Bt, Teerb: Rt, Terminal_Basic: Lt, Thayer_Bright: Dt, The_Hulk: At, Tomorrow: Mt, Tomorrow_Night: xt, Tomorrow_Night_Blue: Tt, Tomorrow_Night_Bright: Ot, Tomorrow_Night_Eighties: Pt, ToyChest: It, Treehouse: Ht, Ubuntu: Wt, UnderTheSea: Ft, Urple: Ut, Vaughn: Nt, VibrantInk: Gt, Violet_Dark: Yt, Violet_Light: jt, WarmNeon: $t, Wez: zt, WildCherry: Kt, Wombat: qt, Wryan: Vt, Zenburn: Xt, ayu: Jt, deep: Zt, idleToes: Qt };
    D.AdventureTime = N, D.Afterglow = J, D.AlienBlood = T, D.Argonaut = r, D.Arthur = a, D.AtelierSulphurpool = h, D.Atom = f, D.Batman = d, D.Belafonte_Night = u, D.BirdsOfParadise = b, D.Blazer = g, D.Borland = c, D.Bright_Lights = e, D.Broadcast = i, D.Brogrammer = n, D.C64 = t, D.Chalk = s, D.Chalkboard = l, D.Ciapre = _, D.Cobalt2 = m, D.Cobalt_Neon = o, D.CrayonPonyFish = v, D.Dark_Pastel = S, D.Darkside = y, D.Desert = w, D.DimmedMonokai = L, D.DotGov = M, D.Dracula = I, D.Duotone_Dark = W, D.ENCOM = p, D.Earthsong = C, D.Elemental = E, D.Elementary = R, D.Espresso = O, D.Espresso_Libre = F, D.Fideloper = Y, D.FirefoxDev = P, D.Firewatch = G, D.FishTank = B, D.Flat = k, D.Flatland = A, D.Floraverse = x, D.ForestBlue = H, D.FrontEndDelight = $, D.FunForrest = U, D.Galaxy = K, D.Github = X, D.Glacier = q, D.Grape = j, D.Grass = Q, D.Gruvbox_Dark = ie, D.Hardcore = se, D.Harper = ne, D.Highway = oe, D.Hipster_Green = ae, D.Homebrew = he, D.Hurtado = ce, D.Hybrid = le, D.IC_Green_PPL = de, D.IC_Orange_PPL = fe, D.IR_Black = ue, D.Jackie_Brown = _e, D.Japanesque = ge, D.Jellybeans = be, D.JetBrains_Darcula = ve, D.Kibble = pe, D.Later_This_Evening = me, D.Lavandula = Se, D.LiquidCarbon = Ce, D.LiquidCarbonTransparent = ye, D.LiquidCarbonTransparentInverse = we, D.Man_Page = ke, D.Material = Ee, D.MaterialDark = Be, D.Mathias = Re, D.Medallion = Le, D.Misterioso = De, D.Molokai = Ae, D.MonaLisa = Me, D.Monokai_Soda = xe, D.Monokai_Vivid = Te, D.N0tch2k = Oe, D.Neopolitan = Pe, D.Neutron = Ie, D.NightLion_v1 = He, D.NightLion_v2 = We, D.Night_3024 = V, D.Novel = Fe, D.Obsidian = Ue, D.Ocean = Ne, D.OceanicMaterial = Ge, D.Ollie = Ye, D.OneHalfDark = je, D.OneHalfLight = $e, D.Pandora = ze, D.Paraiso_Dark = Ke, D.Parasio_Dark = qe, D.PaulMillr = Ve, D.PencilDark = Xe, D.PencilLight = Je, D.Piatto_Light = Ze, D.Pnevma = Qe, D.Pro = et, D.Red_Alert = tt, D.Red_Sands = rt, D.Rippedcasts = it, D.Royal = st, D.Ryuuko = nt, D.SeaShells = ot, D.Seafoam_Pastel = at, D.Seti = ht, D.Shaman = ct, D.Slate = lt, D.Smyck = dt, D.SoftServer = ft, D.Solarized_Darcula = ut, D.Solarized_Dark = _t, D.Solarized_Dark_Higher_Contrast = bt, D.Solarized_Dark_Patched = gt, D.Solarized_Light = vt, D.SpaceGray = pt, D.SpaceGray_Eighties = mt, D.SpaceGray_Eighties_Dull = St, D.Spacedust = Ct, D.Spiderman = yt, D.Spring = wt, D.Square = kt, D.Sundried = Et, D.Symfonic = Bt, D.Teerb = Rt, D.Terminal_Basic = Lt, D.Thayer_Bright = Dt, D.The_Hulk = At, D.Tomorrow = Mt, D.Tomorrow_Night = xt, D.Tomorrow_Night_Blue = Tt, D.Tomorrow_Night_Bright = Ot, D.Tomorrow_Night_Eighties = Pt, D.ToyChest = It, D.Treehouse = Ht, D.Ubuntu = Wt, D.UnderTheSea = Ft, D.Urple = Ut, D.Vaughn = Nt, D.VibrantInk = Gt, D.Violet_Dark = Yt, D.Violet_Light = jt, D.WarmNeon = $t, D.Wez = zt, D.WildCherry = Kt, D.Wombat = qt, D.Wryan = Vt, D.Zenburn = Xt, D.ayu = Jt, D.deep = Zt, D.default = rr, D.idleToes = Qt, Object.defineProperty(D, "__esModule", { value: !0 });
  });
})(cr, ee);
const lr = /* @__PURE__ */ hr(ee);
var te = {}, dr = {
  get exports() {
    return te;
  },
  set exports(z) {
    te = z;
  }
};
(function(z, Z) {
  (function(D, V) {
    z.exports = V();
  })(self, function() {
    return (() => {
      var D = { 4567: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.AccessibilityManager = void 0;
        const h = a(9042), f = a(6114), d = a(9924), u = a(3656), b = a(844), g = a(5596), c = a(9631);
        class e extends b.Disposable {
          constructor(n, t) {
            super(), this._terminal = n, this._renderService = t, this._liveRegionLineCount = 0, this._charsToConsume = [], this._charsToAnnounce = "", this._accessibilityTreeRoot = document.createElement("div"), this._accessibilityTreeRoot.classList.add("xterm-accessibility"), this._accessibilityTreeRoot.tabIndex = 0, this._rowContainer = document.createElement("div"), this._rowContainer.setAttribute("role", "list"), this._rowContainer.classList.add("xterm-accessibility-tree"), this._rowElements = [];
            for (let s = 0; s < this._terminal.rows; s++)
              this._rowElements[s] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[s]);
            if (this._topBoundaryFocusListener = (s) => this._handleBoundaryFocus(s, 0), this._bottomBoundaryFocusListener = (s) => this._handleBoundaryFocus(s, 1), this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions(), this._accessibilityTreeRoot.appendChild(this._rowContainer), this._renderRowsDebouncer = new d.TimeBasedDebouncer(this._renderRows.bind(this)), this._refreshRows(), this._liveRegion = document.createElement("div"), this._liveRegion.classList.add("live-region"), this._liveRegion.setAttribute("aria-live", "assertive"), this._accessibilityTreeRoot.appendChild(this._liveRegion), !this._terminal.element)
              throw new Error("Cannot enable accessibility before Terminal.open");
            this._terminal.element.insertAdjacentElement("afterbegin", this._accessibilityTreeRoot), this.register(this._renderRowsDebouncer), this.register(this._terminal.onResize((s) => this._handleResize(s.rows))), this.register(this._terminal.onRender((s) => this._refreshRows(s.start, s.end))), this.register(this._terminal.onScroll(() => this._refreshRows())), this.register(this._terminal.onA11yChar((s) => this._handleChar(s))), this.register(this._terminal.onLineFeed(() => this._handleChar(`
`))), this.register(this._terminal.onA11yTab((s) => this._handleTab(s))), this.register(this._terminal.onKey((s) => this._handleKey(s.key))), this.register(this._terminal.onBlur(() => this._clearLiveRegion())), this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions())), this._screenDprMonitor = new g.ScreenDprMonitor(window), this.register(this._screenDprMonitor), this._screenDprMonitor.setListener(() => this._refreshRowsDimensions()), this.register((0, u.addDisposableDomListener)(window, "resize", () => this._refreshRowsDimensions())), this.register((0, b.toDisposable)(() => {
              (0, c.removeElementFromParent)(this._accessibilityTreeRoot), this._rowElements.length = 0;
            }));
          }
          _handleBoundaryFocus(n, t) {
            const s = n.target, l = this._rowElements[t === 0 ? 1 : this._rowElements.length - 2];
            if (s.getAttribute("aria-posinset") === (t === 0 ? "1" : `${this._terminal.buffer.lines.length}`) || n.relatedTarget !== l)
              return;
            let _, m;
            if (t === 0 ? (_ = s, m = this._rowElements.pop(), this._rowContainer.removeChild(m)) : (_ = this._rowElements.shift(), m = s, this._rowContainer.removeChild(_)), _.removeEventListener("focus", this._topBoundaryFocusListener), m.removeEventListener("focus", this._bottomBoundaryFocusListener), t === 0) {
              const o = this._createAccessibilityTreeNode();
              this._rowElements.unshift(o), this._rowContainer.insertAdjacentElement("afterbegin", o);
            } else {
              const o = this._createAccessibilityTreeNode();
              this._rowElements.push(o), this._rowContainer.appendChild(o);
            }
            this._rowElements[0].addEventListener("focus", this._topBoundaryFocusListener), this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._terminal.scrollLines(t === 0 ? -1 : 1), this._rowElements[t === 0 ? 1 : this._rowElements.length - 2].focus(), n.preventDefault(), n.stopImmediatePropagation();
          }
          _handleResize(n) {
            this._rowElements[this._rowElements.length - 1].removeEventListener("focus", this._bottomBoundaryFocusListener);
            for (let t = this._rowContainer.children.length; t < this._terminal.rows; t++)
              this._rowElements[t] = this._createAccessibilityTreeNode(), this._rowContainer.appendChild(this._rowElements[t]);
            for (; this._rowElements.length > n; )
              this._rowContainer.removeChild(this._rowElements.pop());
            this._rowElements[this._rowElements.length - 1].addEventListener("focus", this._bottomBoundaryFocusListener), this._refreshRowsDimensions();
          }
          _createAccessibilityTreeNode() {
            const n = document.createElement("div");
            return n.setAttribute("role", "listitem"), n.tabIndex = -1, this._refreshRowDimensions(n), n;
          }
          _handleTab(n) {
            for (let t = 0; t < n; t++)
              this._handleChar(" ");
          }
          _handleChar(n) {
            this._liveRegionLineCount < 21 && (this._charsToConsume.length > 0 ? this._charsToConsume.shift() !== n && (this._charsToAnnounce += n) : this._charsToAnnounce += n, n === `
` && (this._liveRegionLineCount++, this._liveRegionLineCount === 21 && (this._liveRegion.textContent += h.tooMuchOutput)), f.isMac && this._liveRegion.textContent && this._liveRegion.textContent.length > 0 && !this._liveRegion.parentNode && setTimeout(() => {
              this._accessibilityTreeRoot.appendChild(this._liveRegion);
            }, 0));
          }
          _clearLiveRegion() {
            this._liveRegion.textContent = "", this._liveRegionLineCount = 0, f.isMac && (0, c.removeElementFromParent)(this._liveRegion);
          }
          _handleKey(n) {
            this._clearLiveRegion(), /\p{Control}/u.test(n) || this._charsToConsume.push(n);
          }
          _refreshRows(n, t) {
            this._renderRowsDebouncer.refresh(n, t, this._terminal.rows);
          }
          _renderRows(n, t) {
            const s = this._terminal.buffer, l = s.lines.length.toString();
            for (let _ = n; _ <= t; _++) {
              const m = s.translateBufferLineToString(s.ydisp + _, !0), o = (s.ydisp + _ + 1).toString(), v = this._rowElements[_];
              v && (m.length === 0 ? v.innerText = " " : v.textContent = m, v.setAttribute("aria-posinset", o), v.setAttribute("aria-setsize", l));
            }
            this._announceCharacters();
          }
          _refreshRowsDimensions() {
            if (this._renderService.dimensions.css.cell.height) {
              this._accessibilityTreeRoot.style.width = `${this._renderService.dimensions.css.canvas.width}px`, this._rowElements.length !== this._terminal.rows && this._handleResize(this._terminal.rows);
              for (let n = 0; n < this._terminal.rows; n++)
                this._refreshRowDimensions(this._rowElements[n]);
            }
          }
          _refreshRowDimensions(n) {
            n.style.height = `${this._renderService.dimensions.css.cell.height}px`;
          }
          _announceCharacters() {
            this._charsToAnnounce.length !== 0 && (this._liveRegion.textContent += this._charsToAnnounce, this._charsToAnnounce = "");
          }
        }
        r.AccessibilityManager = e;
      }, 3614: (T, r) => {
        function a(u) {
          return u.replace(/\r?\n/g, "\r");
        }
        function h(u, b) {
          return b ? "\x1B[200~" + u + "\x1B[201~" : u;
        }
        function f(u, b, g) {
          u = h(u = a(u), g.decPrivateModes.bracketedPasteMode), g.triggerDataEvent(u, !0), b.value = "";
        }
        function d(u, b, g) {
          const c = g.getBoundingClientRect(), e = u.clientX - c.left - 10, i = u.clientY - c.top - 10;
          b.style.width = "20px", b.style.height = "20px", b.style.left = `${e}px`, b.style.top = `${i}px`, b.style.zIndex = "1000", b.focus();
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.rightClickHandler = r.moveTextAreaUnderMouseCursor = r.paste = r.handlePasteEvent = r.copyHandler = r.bracketTextForPaste = r.prepareTextForTerminal = void 0, r.prepareTextForTerminal = a, r.bracketTextForPaste = h, r.copyHandler = function(u, b) {
          u.clipboardData && u.clipboardData.setData("text/plain", b.selectionText), u.preventDefault();
        }, r.handlePasteEvent = function(u, b, g) {
          u.stopPropagation(), u.clipboardData && f(u.clipboardData.getData("text/plain"), b, g);
        }, r.paste = f, r.moveTextAreaUnderMouseCursor = d, r.rightClickHandler = function(u, b, g, c, e) {
          d(u, b, g), e && c.rightClickSelect(u), b.value = c.selectionText, b.select();
        };
      }, 7239: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ColorContrastCache = void 0;
        const h = a(1505);
        r.ColorContrastCache = class {
          constructor() {
            this._color = new h.TwoKeyMap(), this._css = new h.TwoKeyMap();
          }
          setCss(f, d, u) {
            this._css.set(f, d, u);
          }
          getCss(f, d) {
            return this._css.get(f, d);
          }
          setColor(f, d, u) {
            this._color.set(f, d, u);
          }
          getColor(f, d) {
            return this._color.get(f, d);
          }
          clear() {
            this._color.clear(), this._css.clear();
          }
        };
      }, 9631: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.removeElementFromParent = void 0, r.removeElementFromParent = function(...a) {
          var h;
          for (const f of a)
            (h = f == null ? void 0 : f.parentElement) === null || h === void 0 || h.removeChild(f);
        };
      }, 3656: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.addDisposableDomListener = void 0, r.addDisposableDomListener = function(a, h, f, d) {
          a.addEventListener(h, f, d);
          let u = !1;
          return { dispose: () => {
            u || (u = !0, a.removeEventListener(h, f, d));
          } };
        };
      }, 6465: function(T, r, a) {
        var h = this && this.__decorate || function(e, i, n, t) {
          var s, l = arguments.length, _ = l < 3 ? i : t === null ? t = Object.getOwnPropertyDescriptor(i, n) : t;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            _ = Reflect.decorate(e, i, n, t);
          else
            for (var m = e.length - 1; m >= 0; m--)
              (s = e[m]) && (_ = (l < 3 ? s(_) : l > 3 ? s(i, n, _) : s(i, n)) || _);
          return l > 3 && _ && Object.defineProperty(i, n, _), _;
        }, f = this && this.__param || function(e, i) {
          return function(n, t) {
            i(n, t, e);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Linkifier2 = void 0;
        const d = a(2585), u = a(8460), b = a(844), g = a(3656);
        let c = class extends b.Disposable {
          constructor(e) {
            super(), this._bufferService = e, this._linkProviders = [], this._linkCacheDisposables = [], this._isMouseOut = !0, this._activeLine = -1, this._onShowLinkUnderline = this.register(new u.EventEmitter()), this.onShowLinkUnderline = this._onShowLinkUnderline.event, this._onHideLinkUnderline = this.register(new u.EventEmitter()), this.onHideLinkUnderline = this._onHideLinkUnderline.event, this.register((0, b.getDisposeArrayDisposable)(this._linkCacheDisposables)), this.register((0, b.toDisposable)(() => {
              this._lastMouseEvent = void 0;
            }));
          }
          get currentLink() {
            return this._currentLink;
          }
          registerLinkProvider(e) {
            return this._linkProviders.push(e), { dispose: () => {
              const i = this._linkProviders.indexOf(e);
              i !== -1 && this._linkProviders.splice(i, 1);
            } };
          }
          attachToDom(e, i, n) {
            this._element = e, this._mouseService = i, this._renderService = n, this.register((0, g.addDisposableDomListener)(this._element, "mouseleave", () => {
              this._isMouseOut = !0, this._clearCurrentLink();
            })), this.register((0, g.addDisposableDomListener)(this._element, "mousemove", this._handleMouseMove.bind(this))), this.register((0, g.addDisposableDomListener)(this._element, "mousedown", this._handleMouseDown.bind(this))), this.register((0, g.addDisposableDomListener)(this._element, "mouseup", this._handleMouseUp.bind(this)));
          }
          _handleMouseMove(e) {
            if (this._lastMouseEvent = e, !this._element || !this._mouseService)
              return;
            const i = this._positionFromMouseEvent(e, this._element, this._mouseService);
            if (!i)
              return;
            this._isMouseOut = !1;
            const n = e.composedPath();
            for (let t = 0; t < n.length; t++) {
              const s = n[t];
              if (s.classList.contains("xterm"))
                break;
              if (s.classList.contains("xterm-hover"))
                return;
            }
            this._lastBufferCell && i.x === this._lastBufferCell.x && i.y === this._lastBufferCell.y || (this._handleHover(i), this._lastBufferCell = i);
          }
          _handleHover(e) {
            if (this._activeLine !== e.y)
              return this._clearCurrentLink(), void this._askForLink(e, !1);
            this._currentLink && this._linkAtPosition(this._currentLink.link, e) || (this._clearCurrentLink(), this._askForLink(e, !0));
          }
          _askForLink(e, i) {
            var n, t;
            this._activeProviderReplies && i || ((n = this._activeProviderReplies) === null || n === void 0 || n.forEach((l) => {
              l == null || l.forEach((_) => {
                _.link.dispose && _.link.dispose();
              });
            }), this._activeProviderReplies = /* @__PURE__ */ new Map(), this._activeLine = e.y);
            let s = !1;
            for (const [l, _] of this._linkProviders.entries())
              i ? !((t = this._activeProviderReplies) === null || t === void 0) && t.get(l) && (s = this._checkLinkProviderResult(l, e, s)) : _.provideLinks(e.y, (m) => {
                var o, v;
                if (this._isMouseOut)
                  return;
                const S = m == null ? void 0 : m.map((y) => ({ link: y }));
                (o = this._activeProviderReplies) === null || o === void 0 || o.set(l, S), s = this._checkLinkProviderResult(l, e, s), ((v = this._activeProviderReplies) === null || v === void 0 ? void 0 : v.size) === this._linkProviders.length && this._removeIntersectingLinks(e.y, this._activeProviderReplies);
              });
          }
          _removeIntersectingLinks(e, i) {
            const n = /* @__PURE__ */ new Set();
            for (let t = 0; t < i.size; t++) {
              const s = i.get(t);
              if (s)
                for (let l = 0; l < s.length; l++) {
                  const _ = s[l], m = _.link.range.start.y < e ? 0 : _.link.range.start.x, o = _.link.range.end.y > e ? this._bufferService.cols : _.link.range.end.x;
                  for (let v = m; v <= o; v++) {
                    if (n.has(v)) {
                      s.splice(l--, 1);
                      break;
                    }
                    n.add(v);
                  }
                }
            }
          }
          _checkLinkProviderResult(e, i, n) {
            var t;
            if (!this._activeProviderReplies)
              return n;
            const s = this._activeProviderReplies.get(e);
            let l = !1;
            for (let _ = 0; _ < e; _++)
              this._activeProviderReplies.has(_) && !this._activeProviderReplies.get(_) || (l = !0);
            if (!l && s) {
              const _ = s.find((m) => this._linkAtPosition(m.link, i));
              _ && (n = !0, this._handleNewLink(_));
            }
            if (this._activeProviderReplies.size === this._linkProviders.length && !n)
              for (let _ = 0; _ < this._activeProviderReplies.size; _++) {
                const m = (t = this._activeProviderReplies.get(_)) === null || t === void 0 ? void 0 : t.find((o) => this._linkAtPosition(o.link, i));
                if (m) {
                  n = !0, this._handleNewLink(m);
                  break;
                }
              }
            return n;
          }
          _handleMouseDown() {
            this._mouseDownLink = this._currentLink;
          }
          _handleMouseUp(e) {
            if (!this._element || !this._mouseService || !this._currentLink)
              return;
            const i = this._positionFromMouseEvent(e, this._element, this._mouseService);
            i && this._mouseDownLink === this._currentLink && this._linkAtPosition(this._currentLink.link, i) && this._currentLink.link.activate(e, this._currentLink.link.text);
          }
          _clearCurrentLink(e, i) {
            this._element && this._currentLink && this._lastMouseEvent && (!e || !i || this._currentLink.link.range.start.y >= e && this._currentLink.link.range.end.y <= i) && (this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent), this._currentLink = void 0, (0, b.disposeArray)(this._linkCacheDisposables));
          }
          _handleNewLink(e) {
            if (!this._element || !this._lastMouseEvent || !this._mouseService)
              return;
            const i = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
            i && this._linkAtPosition(e.link, i) && (this._currentLink = e, this._currentLink.state = { decorations: { underline: e.link.decorations === void 0 || e.link.decorations.underline, pointerCursor: e.link.decorations === void 0 || e.link.decorations.pointerCursor }, isHovered: !0 }, this._linkHover(this._element, e.link, this._lastMouseEvent), e.link.decorations = {}, Object.defineProperties(e.link.decorations, { pointerCursor: { get: () => {
              var n, t;
              return (t = (n = this._currentLink) === null || n === void 0 ? void 0 : n.state) === null || t === void 0 ? void 0 : t.decorations.pointerCursor;
            }, set: (n) => {
              var t, s;
              !((t = this._currentLink) === null || t === void 0) && t.state && this._currentLink.state.decorations.pointerCursor !== n && (this._currentLink.state.decorations.pointerCursor = n, this._currentLink.state.isHovered && ((s = this._element) === null || s === void 0 || s.classList.toggle("xterm-cursor-pointer", n)));
            } }, underline: { get: () => {
              var n, t;
              return (t = (n = this._currentLink) === null || n === void 0 ? void 0 : n.state) === null || t === void 0 ? void 0 : t.decorations.underline;
            }, set: (n) => {
              var t, s, l;
              !((t = this._currentLink) === null || t === void 0) && t.state && ((l = (s = this._currentLink) === null || s === void 0 ? void 0 : s.state) === null || l === void 0 ? void 0 : l.decorations.underline) !== n && (this._currentLink.state.decorations.underline = n, this._currentLink.state.isHovered && this._fireUnderlineEvent(e.link, n));
            } } }), this._renderService && this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((n) => {
              const t = n.start === 0 ? 0 : n.start + 1 + this._bufferService.buffer.ydisp, s = this._currentLink ? this._lastMouseEvent : void 0;
              if (this._clearCurrentLink(t, n.end + 1 + this._bufferService.buffer.ydisp), s && this._element) {
                const l = this._positionFromMouseEvent(s, this._element, this._mouseService);
                l && this._askForLink(l, !1);
              }
            })));
          }
          _linkHover(e, i, n) {
            var t;
            !((t = this._currentLink) === null || t === void 0) && t.state && (this._currentLink.state.isHovered = !0, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(i, !0), this._currentLink.state.decorations.pointerCursor && e.classList.add("xterm-cursor-pointer")), i.hover && i.hover(n, i.text);
          }
          _fireUnderlineEvent(e, i) {
            const n = e.range, t = this._bufferService.buffer.ydisp, s = this._createLinkUnderlineEvent(n.start.x - 1, n.start.y - t - 1, n.end.x, n.end.y - t - 1, void 0);
            (i ? this._onShowLinkUnderline : this._onHideLinkUnderline).fire(s);
          }
          _linkLeave(e, i, n) {
            var t;
            !((t = this._currentLink) === null || t === void 0) && t.state && (this._currentLink.state.isHovered = !1, this._currentLink.state.decorations.underline && this._fireUnderlineEvent(i, !1), this._currentLink.state.decorations.pointerCursor && e.classList.remove("xterm-cursor-pointer")), i.leave && i.leave(n, i.text);
          }
          _linkAtPosition(e, i) {
            const n = e.range.start.y * this._bufferService.cols + e.range.start.x, t = e.range.end.y * this._bufferService.cols + e.range.end.x, s = i.y * this._bufferService.cols + i.x;
            return n <= s && s <= t;
          }
          _positionFromMouseEvent(e, i, n) {
            const t = n.getCoords(e, i, this._bufferService.cols, this._bufferService.rows);
            if (t)
              return { x: t[0], y: t[1] + this._bufferService.buffer.ydisp };
          }
          _createLinkUnderlineEvent(e, i, n, t, s) {
            return { x1: e, y1: i, x2: n, y2: t, cols: this._bufferService.cols, fg: s };
          }
        };
        c = h([f(0, d.IBufferService)], c), r.Linkifier2 = c;
      }, 9042: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.tooMuchOutput = r.promptLabel = void 0, r.promptLabel = "Terminal input", r.tooMuchOutput = "Too much output to announce, navigate to rows manually to read";
      }, 3730: function(T, r, a) {
        var h = this && this.__decorate || function(c, e, i, n) {
          var t, s = arguments.length, l = s < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, i) : n;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            l = Reflect.decorate(c, e, i, n);
          else
            for (var _ = c.length - 1; _ >= 0; _--)
              (t = c[_]) && (l = (s < 3 ? t(l) : s > 3 ? t(e, i, l) : t(e, i)) || l);
          return s > 3 && l && Object.defineProperty(e, i, l), l;
        }, f = this && this.__param || function(c, e) {
          return function(i, n) {
            e(i, n, c);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.OscLinkProvider = void 0;
        const d = a(511), u = a(2585);
        let b = class {
          constructor(c, e, i) {
            this._bufferService = c, this._optionsService = e, this._oscLinkService = i;
          }
          provideLinks(c, e) {
            var i;
            const n = this._bufferService.buffer.lines.get(c - 1);
            if (!n)
              return void e(void 0);
            const t = [], s = this._optionsService.rawOptions.linkHandler, l = new d.CellData(), _ = n.getTrimmedLength();
            let m = -1, o = -1, v = !1;
            for (let S = 0; S < _; S++)
              if (o !== -1 || n.hasContent(S)) {
                if (n.loadCell(S, l), l.hasExtendedAttrs() && l.extended.urlId) {
                  if (o === -1) {
                    o = S, m = l.extended.urlId;
                    continue;
                  }
                  v = l.extended.urlId !== m;
                } else
                  o !== -1 && (v = !0);
                if (v || o !== -1 && S === _ - 1) {
                  const y = (i = this._oscLinkService.getLinkData(m)) === null || i === void 0 ? void 0 : i.uri;
                  if (y) {
                    const w = { start: { x: o + 1, y: c }, end: { x: S + (v || S !== _ - 1 ? 0 : 1), y: c } };
                    let L = !1;
                    if (!(s != null && s.allowNonHttpProtocols))
                      try {
                        const M = new URL(y);
                        ["http:", "https:"].includes(M.protocol) || (L = !0);
                      } catch {
                        L = !0;
                      }
                    L || t.push({ text: y, range: w, activate: (M, I) => s ? s.activate(M, I, w) : g(0, I), hover: (M, I) => {
                      var W;
                      return (W = s == null ? void 0 : s.hover) === null || W === void 0 ? void 0 : W.call(s, M, I, w);
                    }, leave: (M, I) => {
                      var W;
                      return (W = s == null ? void 0 : s.leave) === null || W === void 0 ? void 0 : W.call(s, M, I, w);
                    } });
                  }
                  v = !1, l.hasExtendedAttrs() && l.extended.urlId ? (o = S, m = l.extended.urlId) : (o = -1, m = -1);
                }
              }
            e(t);
          }
        };
        function g(c, e) {
          if (confirm(`Do you want to navigate to ${e}?

WARNING: This link could potentially be dangerous`)) {
            const i = window.open();
            if (i) {
              try {
                i.opener = null;
              } catch {
              }
              i.location.href = e;
            } else
              console.warn("Opening link blocked as opener could not be cleared");
          }
        }
        b = h([f(0, u.IBufferService), f(1, u.IOptionsService), f(2, u.IOscLinkService)], b), r.OscLinkProvider = b;
      }, 6193: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.RenderDebouncer = void 0, r.RenderDebouncer = class {
          constructor(a, h) {
            this._parentWindow = a, this._renderCallback = h, this._refreshCallbacks = [];
          }
          dispose() {
            this._animationFrame && (this._parentWindow.cancelAnimationFrame(this._animationFrame), this._animationFrame = void 0);
          }
          addRefreshCallback(a) {
            return this._refreshCallbacks.push(a), this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame(() => this._innerRefresh())), this._animationFrame;
          }
          refresh(a, h, f) {
            this._rowCount = f, a = a !== void 0 ? a : 0, h = h !== void 0 ? h : this._rowCount - 1, this._rowStart = this._rowStart !== void 0 ? Math.min(this._rowStart, a) : a, this._rowEnd = this._rowEnd !== void 0 ? Math.max(this._rowEnd, h) : h, this._animationFrame || (this._animationFrame = this._parentWindow.requestAnimationFrame(() => this._innerRefresh()));
          }
          _innerRefresh() {
            if (this._animationFrame = void 0, this._rowStart === void 0 || this._rowEnd === void 0 || this._rowCount === void 0)
              return void this._runRefreshCallbacks();
            const a = Math.max(this._rowStart, 0), h = Math.min(this._rowEnd, this._rowCount - 1);
            this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(a, h), this._runRefreshCallbacks();
          }
          _runRefreshCallbacks() {
            for (const a of this._refreshCallbacks)
              a(0);
            this._refreshCallbacks = [];
          }
        };
      }, 5596: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ScreenDprMonitor = void 0;
        const h = a(844);
        class f extends h.Disposable {
          constructor(u) {
            super(), this._parentWindow = u, this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this.register((0, h.toDisposable)(() => {
              this.clearListener();
            }));
          }
          setListener(u) {
            this._listener && this.clearListener(), this._listener = u, this._outerListener = () => {
              this._listener && (this._listener(this._parentWindow.devicePixelRatio, this._currentDevicePixelRatio), this._updateDpr());
            }, this._updateDpr();
          }
          _updateDpr() {
            var u;
            this._outerListener && ((u = this._resolutionMediaMatchList) === null || u === void 0 || u.removeListener(this._outerListener), this._currentDevicePixelRatio = this._parentWindow.devicePixelRatio, this._resolutionMediaMatchList = this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`), this._resolutionMediaMatchList.addListener(this._outerListener));
          }
          clearListener() {
            this._resolutionMediaMatchList && this._listener && this._outerListener && (this._resolutionMediaMatchList.removeListener(this._outerListener), this._resolutionMediaMatchList = void 0, this._listener = void 0, this._outerListener = void 0);
          }
        }
        r.ScreenDprMonitor = f;
      }, 3236: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Terminal = void 0;
        const h = a(2950), f = a(1680), d = a(3614), u = a(2584), b = a(5435), g = a(9312), c = a(6114), e = a(3656), i = a(9042), n = a(4567), t = a(1296), s = a(7399), l = a(8460), _ = a(8437), m = a(3230), o = a(4725), v = a(428), S = a(8934), y = a(6465), w = a(5114), L = a(8969), M = a(8055), I = a(4269), W = a(5941), p = a(3107), C = a(5744), E = a(9074), R = a(2585), O = a(3730), F = a(844), Y = a(6731), P = typeof window < "u" ? window.document : null;
        class G extends L.CoreTerminal {
          constructor(k = {}) {
            super(k), this.browser = c, this._keyDownHandled = !1, this._keyDownSeen = !1, this._keyPressHandled = !1, this._unprocessedDeadKey = !1, this._onCursorMove = this.register(new l.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onKey = this.register(new l.EventEmitter()), this.onKey = this._onKey.event, this._onRender = this.register(new l.EventEmitter()), this.onRender = this._onRender.event, this._onSelectionChange = this.register(new l.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onTitleChange = this.register(new l.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onBell = this.register(new l.EventEmitter()), this.onBell = this._onBell.event, this._onFocus = this.register(new l.EventEmitter()), this._onBlur = this.register(new l.EventEmitter()), this._onA11yCharEmitter = this.register(new l.EventEmitter()), this._onA11yTabEmitter = this.register(new l.EventEmitter()), this._onWillOpen = this.register(new l.EventEmitter()), this._setup(), this.linkifier2 = this.register(this._instantiationService.createInstance(y.Linkifier2)), this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(O.OscLinkProvider)), this._decorationService = this._instantiationService.createInstance(E.DecorationService), this._instantiationService.setService(R.IDecorationService, this._decorationService), this.register(this._inputHandler.onRequestBell(() => this._onBell.fire())), this.register(this._inputHandler.onRequestRefreshRows((A, x) => this.refresh(A, x))), this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus())), this.register(this._inputHandler.onRequestReset(() => this.reset())), this.register(this._inputHandler.onRequestWindowsOptionsReport((A) => this._reportWindowsOptions(A))), this.register(this._inputHandler.onColor((A) => this._handleColorEvent(A))), this.register((0, l.forwardEvent)(this._inputHandler.onCursorMove, this._onCursorMove)), this.register((0, l.forwardEvent)(this._inputHandler.onTitleChange, this._onTitleChange)), this.register((0, l.forwardEvent)(this._inputHandler.onA11yChar, this._onA11yCharEmitter)), this.register((0, l.forwardEvent)(this._inputHandler.onA11yTab, this._onA11yTabEmitter)), this.register(this._bufferService.onResize((A) => this._afterResize(A.cols, A.rows))), this.register((0, F.toDisposable)(() => {
              var A, x;
              this._customKeyEventHandler = void 0, (x = (A = this.element) === null || A === void 0 ? void 0 : A.parentNode) === null || x === void 0 || x.removeChild(this.element);
            }));
          }
          get onFocus() {
            return this._onFocus.event;
          }
          get onBlur() {
            return this._onBlur.event;
          }
          get onA11yChar() {
            return this._onA11yCharEmitter.event;
          }
          get onA11yTab() {
            return this._onA11yTabEmitter.event;
          }
          get onWillOpen() {
            return this._onWillOpen.event;
          }
          _handleColorEvent(k) {
            if (this._themeService)
              for (const A of k) {
                let x, H = "";
                switch (A.index) {
                  case 256:
                    x = "foreground", H = "10";
                    break;
                  case 257:
                    x = "background", H = "11";
                    break;
                  case 258:
                    x = "cursor", H = "12";
                    break;
                  default:
                    x = "ansi", H = "4;" + A.index;
                }
                switch (A.type) {
                  case 0:
                    const $ = M.color.toColorRGB(x === "ansi" ? this._themeService.colors.ansi[A.index] : this._themeService.colors[x]);
                    this.coreService.triggerDataEvent(`${u.C0.ESC}]${H};${(0, W.toRgbString)($)}${u.C1_ESCAPED.ST}`);
                    break;
                  case 1:
                    if (x === "ansi")
                      this._themeService.modifyColors((U) => U.ansi[A.index] = M.rgba.toColor(...A.color));
                    else {
                      const U = x;
                      this._themeService.modifyColors((K) => K[U] = M.rgba.toColor(...A.color));
                    }
                    break;
                  case 2:
                    this._themeService.restoreColor(A.index);
                }
              }
          }
          _setup() {
            super._setup(), this._customKeyEventHandler = void 0;
          }
          get buffer() {
            return this.buffers.active;
          }
          focus() {
            this.textarea && this.textarea.focus({ preventScroll: !0 });
          }
          _handleScreenReaderModeOptionChange(k) {
            var A;
            k ? !this._accessibilityManager && this._renderService && (this._accessibilityManager = new n.AccessibilityManager(this, this._renderService)) : ((A = this._accessibilityManager) === null || A === void 0 || A.dispose(), this._accessibilityManager = void 0);
          }
          _handleTextAreaFocus(k) {
            this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(u.C0.ESC + "[I"), this.updateCursorStyle(k), this.element.classList.add("focus"), this._showCursor(), this._onFocus.fire();
          }
          blur() {
            var k;
            return (k = this.textarea) === null || k === void 0 ? void 0 : k.blur();
          }
          _handleTextAreaBlur() {
            this.textarea.value = "", this.refresh(this.buffer.y, this.buffer.y), this.coreService.decPrivateModes.sendFocus && this.coreService.triggerDataEvent(u.C0.ESC + "[O"), this.element.classList.remove("focus"), this._onBlur.fire();
          }
          _syncTextArea() {
            if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper.isComposing || !this._renderService)
              return;
            const k = this.buffer.ybase + this.buffer.y, A = this.buffer.lines.get(k);
            if (!A)
              return;
            const x = Math.min(this.buffer.x, this.cols - 1), H = this._renderService.dimensions.css.cell.height, $ = A.getWidth(x), U = this._renderService.dimensions.css.cell.width * $, K = this.buffer.y * this._renderService.dimensions.css.cell.height, X = x * this._renderService.dimensions.css.cell.width;
            this.textarea.style.left = X + "px", this.textarea.style.top = K + "px", this.textarea.style.width = U + "px", this.textarea.style.height = H + "px", this.textarea.style.lineHeight = H + "px", this.textarea.style.zIndex = "-5";
          }
          _initGlobal() {
            this._bindKeys(), this.register((0, e.addDisposableDomListener)(this.element, "copy", (A) => {
              this.hasSelection() && (0, d.copyHandler)(A, this._selectionService);
            }));
            const k = (A) => (0, d.handlePasteEvent)(A, this.textarea, this.coreService);
            this.register((0, e.addDisposableDomListener)(this.textarea, "paste", k)), this.register((0, e.addDisposableDomListener)(this.element, "paste", k)), c.isFirefox ? this.register((0, e.addDisposableDomListener)(this.element, "mousedown", (A) => {
              A.button === 2 && (0, d.rightClickHandler)(A, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
            })) : this.register((0, e.addDisposableDomListener)(this.element, "contextmenu", (A) => {
              (0, d.rightClickHandler)(A, this.textarea, this.screenElement, this._selectionService, this.options.rightClickSelectsWord);
            })), c.isLinux && this.register((0, e.addDisposableDomListener)(this.element, "auxclick", (A) => {
              A.button === 1 && (0, d.moveTextAreaUnderMouseCursor)(A, this.textarea, this.screenElement);
            }));
          }
          _bindKeys() {
            this.register((0, e.addDisposableDomListener)(this.textarea, "keyup", (k) => this._keyUp(k), !0)), this.register((0, e.addDisposableDomListener)(this.textarea, "keydown", (k) => this._keyDown(k), !0)), this.register((0, e.addDisposableDomListener)(this.textarea, "keypress", (k) => this._keyPress(k), !0)), this.register((0, e.addDisposableDomListener)(this.textarea, "compositionstart", () => this._compositionHelper.compositionstart())), this.register((0, e.addDisposableDomListener)(this.textarea, "compositionupdate", (k) => this._compositionHelper.compositionupdate(k))), this.register((0, e.addDisposableDomListener)(this.textarea, "compositionend", () => this._compositionHelper.compositionend())), this.register((0, e.addDisposableDomListener)(this.textarea, "input", (k) => this._inputEvent(k), !0)), this.register(this.onRender(() => this._compositionHelper.updateCompositionElements()));
          }
          open(k) {
            var A;
            if (!k)
              throw new Error("Terminal requires a parent element.");
            k.isConnected || this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"), this._document = k.ownerDocument, this.element = this._document.createElement("div"), this.element.dir = "ltr", this.element.classList.add("terminal"), this.element.classList.add("xterm"), this.element.setAttribute("tabindex", "0"), k.appendChild(this.element);
            const x = P.createDocumentFragment();
            this._viewportElement = P.createElement("div"), this._viewportElement.classList.add("xterm-viewport"), x.appendChild(this._viewportElement), this._viewportScrollArea = P.createElement("div"), this._viewportScrollArea.classList.add("xterm-scroll-area"), this._viewportElement.appendChild(this._viewportScrollArea), this.screenElement = P.createElement("div"), this.screenElement.classList.add("xterm-screen"), this._helperContainer = P.createElement("div"), this._helperContainer.classList.add("xterm-helpers"), this.screenElement.appendChild(this._helperContainer), x.appendChild(this.screenElement), this.textarea = P.createElement("textarea"), this.textarea.classList.add("xterm-helper-textarea"), this.textarea.setAttribute("aria-label", i.promptLabel), c.isChromeOS || this.textarea.setAttribute("aria-multiline", "false"), this.textarea.setAttribute("autocorrect", "off"), this.textarea.setAttribute("autocapitalize", "off"), this.textarea.setAttribute("spellcheck", "false"), this.textarea.tabIndex = 0, this._coreBrowserService = this._instantiationService.createInstance(w.CoreBrowserService, this.textarea, (A = this._document.defaultView) !== null && A !== void 0 ? A : window), this._instantiationService.setService(o.ICoreBrowserService, this._coreBrowserService), this.register((0, e.addDisposableDomListener)(this.textarea, "focus", (H) => this._handleTextAreaFocus(H))), this.register((0, e.addDisposableDomListener)(this.textarea, "blur", () => this._handleTextAreaBlur())), this._helperContainer.appendChild(this.textarea), this._charSizeService = this._instantiationService.createInstance(v.CharSizeService, this._document, this._helperContainer), this._instantiationService.setService(o.ICharSizeService, this._charSizeService), this._themeService = this._instantiationService.createInstance(Y.ThemeService), this._instantiationService.setService(o.IThemeService, this._themeService), this._characterJoinerService = this._instantiationService.createInstance(I.CharacterJoinerService), this._instantiationService.setService(o.ICharacterJoinerService, this._characterJoinerService), this._renderService = this.register(this._instantiationService.createInstance(m.RenderService, this.rows, this.screenElement)), this._instantiationService.setService(o.IRenderService, this._renderService), this.register(this._renderService.onRenderedViewportChange((H) => this._onRender.fire(H))), this.onResize((H) => this._renderService.resize(H.cols, H.rows)), this._compositionView = P.createElement("div"), this._compositionView.classList.add("composition-view"), this._compositionHelper = this._instantiationService.createInstance(h.CompositionHelper, this.textarea, this._compositionView), this._helperContainer.appendChild(this._compositionView), this.element.appendChild(x);
            try {
              this._onWillOpen.fire(this.element);
            } catch {
            }
            this._renderService.hasRenderer() || this._renderService.setRenderer(this._createRenderer()), this._mouseService = this._instantiationService.createInstance(S.MouseService), this._instantiationService.setService(o.IMouseService, this._mouseService), this.viewport = this._instantiationService.createInstance(f.Viewport, (H) => this.scrollLines(H, !0, 1), this._viewportElement, this._viewportScrollArea), this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport.syncScrollArea())), this.register(this.viewport), this.register(this.onCursorMove(() => {
              this._renderService.handleCursorMove(), this._syncTextArea();
            })), this.register(this.onResize(() => this._renderService.handleResize(this.cols, this.rows))), this.register(this.onBlur(() => this._renderService.handleBlur())), this.register(this.onFocus(() => this._renderService.handleFocus())), this.register(this._renderService.onDimensionsChange(() => this.viewport.syncScrollArea())), this._selectionService = this.register(this._instantiationService.createInstance(g.SelectionService, this.element, this.screenElement, this.linkifier2)), this._instantiationService.setService(o.ISelectionService, this._selectionService), this.register(this._selectionService.onRequestScrollLines((H) => this.scrollLines(H.amount, H.suppressScrollEvent))), this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire())), this.register(this._selectionService.onRequestRedraw((H) => this._renderService.handleSelectionChanged(H.start, H.end, H.columnSelectMode))), this.register(this._selectionService.onLinuxMouseSelection((H) => {
              this.textarea.value = H, this.textarea.focus(), this.textarea.select();
            })), this.register(this._onScroll.event((H) => {
              this.viewport.syncScrollArea(), this._selectionService.refresh();
            })), this.register((0, e.addDisposableDomListener)(this._viewportElement, "scroll", () => this._selectionService.refresh())), this.linkifier2.attachToDom(this.screenElement, this._mouseService, this._renderService), this.register(this._instantiationService.createInstance(p.BufferDecorationRenderer, this.screenElement)), this.register((0, e.addDisposableDomListener)(this.element, "mousedown", (H) => this._selectionService.handleMouseDown(H))), this.coreMouseService.areMouseEventsActive ? (this._selectionService.disable(), this.element.classList.add("enable-mouse-events")) : this._selectionService.enable(), this.options.screenReaderMode && (this._accessibilityManager = new n.AccessibilityManager(this, this._renderService)), this.register(this.optionsService.onSpecificOptionChange("screenReaderMode", (H) => this._handleScreenReaderModeOptionChange(H))), this.options.overviewRulerWidth && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(C.OverviewRulerRenderer, this._viewportElement, this.screenElement))), this.optionsService.onSpecificOptionChange("overviewRulerWidth", (H) => {
              !this._overviewRulerRenderer && H && this._viewportElement && this.screenElement && (this._overviewRulerRenderer = this.register(this._instantiationService.createInstance(C.OverviewRulerRenderer, this._viewportElement, this.screenElement)));
            }), this._charSizeService.measure(), this.refresh(0, this.rows - 1), this._initGlobal(), this.bindMouse();
          }
          _createRenderer() {
            return this._instantiationService.createInstance(t.DomRenderer, this.element, this.screenElement, this._viewportElement, this.linkifier2);
          }
          bindMouse() {
            const k = this, A = this.element;
            function x(U) {
              const K = k._mouseService.getMouseReportCoords(U, k.screenElement);
              if (!K)
                return !1;
              let X, q;
              switch (U.overrideType || U.type) {
                case "mousemove":
                  q = 32, U.buttons === void 0 ? (X = 3, U.button !== void 0 && (X = U.button < 3 ? U.button : 3)) : X = 1 & U.buttons ? 0 : 4 & U.buttons ? 1 : 2 & U.buttons ? 2 : 3;
                  break;
                case "mouseup":
                  q = 0, X = U.button < 3 ? U.button : 3;
                  break;
                case "mousedown":
                  q = 1, X = U.button < 3 ? U.button : 3;
                  break;
                case "wheel":
                  if (k.viewport.getLinesScrolled(U) === 0)
                    return !1;
                  q = U.deltaY < 0 ? 0 : 1, X = 4;
                  break;
                default:
                  return !1;
              }
              return !(q === void 0 || X === void 0 || X > 4) && k.coreMouseService.triggerMouseEvent({ col: K.col, row: K.row, x: K.x, y: K.y, button: X, action: q, ctrl: U.ctrlKey, alt: U.altKey, shift: U.shiftKey });
            }
            const H = { mouseup: null, wheel: null, mousedrag: null, mousemove: null }, $ = { mouseup: (U) => (x(U), U.buttons || (this._document.removeEventListener("mouseup", H.mouseup), H.mousedrag && this._document.removeEventListener("mousemove", H.mousedrag)), this.cancel(U)), wheel: (U) => (x(U), this.cancel(U, !0)), mousedrag: (U) => {
              U.buttons && x(U);
            }, mousemove: (U) => {
              U.buttons || x(U);
            } };
            this.register(this.coreMouseService.onProtocolChange((U) => {
              U ? (this.optionsService.rawOptions.logLevel === "debug" && this._logService.debug("Binding to mouse events:", this.coreMouseService.explainEvents(U)), this.element.classList.add("enable-mouse-events"), this._selectionService.disable()) : (this._logService.debug("Unbinding from mouse events."), this.element.classList.remove("enable-mouse-events"), this._selectionService.enable()), 8 & U ? H.mousemove || (A.addEventListener("mousemove", $.mousemove), H.mousemove = $.mousemove) : (A.removeEventListener("mousemove", H.mousemove), H.mousemove = null), 16 & U ? H.wheel || (A.addEventListener("wheel", $.wheel, { passive: !1 }), H.wheel = $.wheel) : (A.removeEventListener("wheel", H.wheel), H.wheel = null), 2 & U ? H.mouseup || (H.mouseup = $.mouseup) : (this._document.removeEventListener("mouseup", H.mouseup), H.mouseup = null), 4 & U ? H.mousedrag || (H.mousedrag = $.mousedrag) : (this._document.removeEventListener("mousemove", H.mousedrag), H.mousedrag = null);
            })), this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol, this.register((0, e.addDisposableDomListener)(A, "mousedown", (U) => {
              if (U.preventDefault(), this.focus(), this.coreMouseService.areMouseEventsActive && !this._selectionService.shouldForceSelection(U))
                return x(U), H.mouseup && this._document.addEventListener("mouseup", H.mouseup), H.mousedrag && this._document.addEventListener("mousemove", H.mousedrag), this.cancel(U);
            })), this.register((0, e.addDisposableDomListener)(A, "wheel", (U) => {
              if (!H.wheel) {
                if (!this.buffer.hasScrollback) {
                  const K = this.viewport.getLinesScrolled(U);
                  if (K === 0)
                    return;
                  const X = u.C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? "O" : "[") + (U.deltaY < 0 ? "A" : "B");
                  let q = "";
                  for (let j = 0; j < Math.abs(K); j++)
                    q += X;
                  return this.coreService.triggerDataEvent(q, !0), this.cancel(U, !0);
                }
                return this.viewport.handleWheel(U) ? this.cancel(U) : void 0;
              }
            }, { passive: !1 })), this.register((0, e.addDisposableDomListener)(A, "touchstart", (U) => {
              if (!this.coreMouseService.areMouseEventsActive)
                return this.viewport.handleTouchStart(U), this.cancel(U);
            }, { passive: !0 })), this.register((0, e.addDisposableDomListener)(A, "touchmove", (U) => {
              if (!this.coreMouseService.areMouseEventsActive)
                return this.viewport.handleTouchMove(U) ? void 0 : this.cancel(U);
            }, { passive: !1 }));
          }
          refresh(k, A) {
            var x;
            (x = this._renderService) === null || x === void 0 || x.refreshRows(k, A);
          }
          updateCursorStyle(k) {
            var A;
            !((A = this._selectionService) === null || A === void 0) && A.shouldColumnSelect(k) ? this.element.classList.add("column-select") : this.element.classList.remove("column-select");
          }
          _showCursor() {
            this.coreService.isCursorInitialized || (this.coreService.isCursorInitialized = !0, this.refresh(this.buffer.y, this.buffer.y));
          }
          scrollLines(k, A, x = 0) {
            super.scrollLines(k, A, x), this.refresh(0, this.rows - 1);
          }
          paste(k) {
            (0, d.paste)(k, this.textarea, this.coreService);
          }
          attachCustomKeyEventHandler(k) {
            this._customKeyEventHandler = k;
          }
          registerLinkProvider(k) {
            return this.linkifier2.registerLinkProvider(k);
          }
          registerCharacterJoiner(k) {
            if (!this._characterJoinerService)
              throw new Error("Terminal must be opened first");
            const A = this._characterJoinerService.register(k);
            return this.refresh(0, this.rows - 1), A;
          }
          deregisterCharacterJoiner(k) {
            if (!this._characterJoinerService)
              throw new Error("Terminal must be opened first");
            this._characterJoinerService.deregister(k) && this.refresh(0, this.rows - 1);
          }
          get markers() {
            return this.buffer.markers;
          }
          addMarker(k) {
            return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + k);
          }
          registerDecoration(k) {
            return this._decorationService.registerDecoration(k);
          }
          hasSelection() {
            return !!this._selectionService && this._selectionService.hasSelection;
          }
          select(k, A, x) {
            this._selectionService.setSelection(k, A, x);
          }
          getSelection() {
            return this._selectionService ? this._selectionService.selectionText : "";
          }
          getSelectionPosition() {
            if (this._selectionService && this._selectionService.hasSelection)
              return { start: { x: this._selectionService.selectionStart[0], y: this._selectionService.selectionStart[1] }, end: { x: this._selectionService.selectionEnd[0], y: this._selectionService.selectionEnd[1] } };
          }
          clearSelection() {
            var k;
            (k = this._selectionService) === null || k === void 0 || k.clearSelection();
          }
          selectAll() {
            var k;
            (k = this._selectionService) === null || k === void 0 || k.selectAll();
          }
          selectLines(k, A) {
            var x;
            (x = this._selectionService) === null || x === void 0 || x.selectLines(k, A);
          }
          _keyDown(k) {
            if (this._keyDownHandled = !1, this._keyDownSeen = !0, this._customKeyEventHandler && this._customKeyEventHandler(k) === !1)
              return !1;
            const A = this.browser.isMac && this.options.macOptionIsMeta && k.altKey;
            if (!A && !this._compositionHelper.keydown(k))
              return this.options.scrollOnUserInput && this.buffer.ybase !== this.buffer.ydisp && this._bufferService.scrollToBottom(), !1;
            A || k.key !== "Dead" && k.key !== "AltGraph" || (this._unprocessedDeadKey = !0);
            const x = (0, s.evaluateKeyboardEvent)(k, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
            if (this.updateCursorStyle(k), x.type === 3 || x.type === 2) {
              const H = this.rows - 1;
              return this.scrollLines(x.type === 2 ? -H : H), this.cancel(k, !0);
            }
            return x.type === 1 && this.selectAll(), !!this._isThirdLevelShift(this.browser, k) || (x.cancel && this.cancel(k, !0), !x.key || !!(k.key && !k.ctrlKey && !k.altKey && !k.metaKey && k.key.length === 1 && k.key.charCodeAt(0) >= 65 && k.key.charCodeAt(0) <= 90) || (this._unprocessedDeadKey ? (this._unprocessedDeadKey = !1, !0) : (x.key !== u.C0.ETX && x.key !== u.C0.CR || (this.textarea.value = ""), this._onKey.fire({ key: x.key, domEvent: k }), this._showCursor(), this.coreService.triggerDataEvent(x.key, !0), !this.optionsService.rawOptions.screenReaderMode || k.altKey || k.ctrlKey ? this.cancel(k, !0) : void (this._keyDownHandled = !0))));
          }
          _isThirdLevelShift(k, A) {
            const x = k.isMac && !this.options.macOptionIsMeta && A.altKey && !A.ctrlKey && !A.metaKey || k.isWindows && A.altKey && A.ctrlKey && !A.metaKey || k.isWindows && A.getModifierState("AltGraph");
            return A.type === "keypress" ? x : x && (!A.keyCode || A.keyCode > 47);
          }
          _keyUp(k) {
            this._keyDownSeen = !1, this._customKeyEventHandler && this._customKeyEventHandler(k) === !1 || (function(A) {
              return A.keyCode === 16 || A.keyCode === 17 || A.keyCode === 18;
            }(k) || this.focus(), this.updateCursorStyle(k), this._keyPressHandled = !1);
          }
          _keyPress(k) {
            let A;
            if (this._keyPressHandled = !1, this._keyDownHandled || this._customKeyEventHandler && this._customKeyEventHandler(k) === !1)
              return !1;
            if (this.cancel(k), k.charCode)
              A = k.charCode;
            else if (k.which === null || k.which === void 0)
              A = k.keyCode;
            else {
              if (k.which === 0 || k.charCode === 0)
                return !1;
              A = k.which;
            }
            return !(!A || (k.altKey || k.ctrlKey || k.metaKey) && !this._isThirdLevelShift(this.browser, k) || (A = String.fromCharCode(A), this._onKey.fire({ key: A, domEvent: k }), this._showCursor(), this.coreService.triggerDataEvent(A, !0), this._keyPressHandled = !0, this._unprocessedDeadKey = !1, 0));
          }
          _inputEvent(k) {
            if (k.data && k.inputType === "insertText" && (!k.composed || !this._keyDownSeen) && !this.optionsService.rawOptions.screenReaderMode) {
              if (this._keyPressHandled)
                return !1;
              this._unprocessedDeadKey = !1;
              const A = k.data;
              return this.coreService.triggerDataEvent(A, !0), this.cancel(k), !0;
            }
            return !1;
          }
          resize(k, A) {
            k !== this.cols || A !== this.rows ? super.resize(k, A) : this._charSizeService && !this._charSizeService.hasValidSize && this._charSizeService.measure();
          }
          _afterResize(k, A) {
            var x, H;
            (x = this._charSizeService) === null || x === void 0 || x.measure(), (H = this.viewport) === null || H === void 0 || H.syncScrollArea(!0);
          }
          clear() {
            if (this.buffer.ybase !== 0 || this.buffer.y !== 0) {
              this.buffer.clearAllMarkers(), this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)), this.buffer.lines.length = 1, this.buffer.ydisp = 0, this.buffer.ybase = 0, this.buffer.y = 0;
              for (let k = 1; k < this.rows; k++)
                this.buffer.lines.push(this.buffer.getBlankLine(_.DEFAULT_ATTR_DATA));
              this.refresh(0, this.rows - 1), this._onScroll.fire({ position: this.buffer.ydisp, source: 0 });
            }
          }
          reset() {
            var k, A;
            this.options.rows = this.rows, this.options.cols = this.cols;
            const x = this._customKeyEventHandler;
            this._setup(), super.reset(), (k = this._selectionService) === null || k === void 0 || k.reset(), this._decorationService.reset(), this._customKeyEventHandler = x, this.refresh(0, this.rows - 1), (A = this.viewport) === null || A === void 0 || A.syncScrollArea();
          }
          clearTextureAtlas() {
            var k;
            (k = this._renderService) === null || k === void 0 || k.clearTextureAtlas();
          }
          _reportFocus() {
            var k;
            !((k = this.element) === null || k === void 0) && k.classList.contains("focus") ? this.coreService.triggerDataEvent(u.C0.ESC + "[I") : this.coreService.triggerDataEvent(u.C0.ESC + "[O");
          }
          _reportWindowsOptions(k) {
            if (this._renderService)
              switch (k) {
                case b.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:
                  const A = this._renderService.dimensions.css.canvas.width.toFixed(0), x = this._renderService.dimensions.css.canvas.height.toFixed(0);
                  this.coreService.triggerDataEvent(`${u.C0.ESC}[4;${x};${A}t`);
                  break;
                case b.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:
                  const H = this._renderService.dimensions.css.cell.width.toFixed(0), $ = this._renderService.dimensions.css.cell.height.toFixed(0);
                  this.coreService.triggerDataEvent(`${u.C0.ESC}[6;${$};${H}t`);
              }
          }
          cancel(k, A) {
            if (this.options.cancelEvents || A)
              return k.preventDefault(), k.stopPropagation(), !1;
          }
        }
        r.Terminal = G;
      }, 9924: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.TimeBasedDebouncer = void 0, r.TimeBasedDebouncer = class {
          constructor(a, h = 1e3) {
            this._renderCallback = a, this._debounceThresholdMS = h, this._lastRefreshMs = 0, this._additionalRefreshRequested = !1;
          }
          dispose() {
            this._refreshTimeoutID && clearTimeout(this._refreshTimeoutID);
          }
          refresh(a, h, f) {
            this._rowCount = f, a = a !== void 0 ? a : 0, h = h !== void 0 ? h : this._rowCount - 1, this._rowStart = this._rowStart !== void 0 ? Math.min(this._rowStart, a) : a, this._rowEnd = this._rowEnd !== void 0 ? Math.max(this._rowEnd, h) : h;
            const d = Date.now();
            if (d - this._lastRefreshMs >= this._debounceThresholdMS)
              this._lastRefreshMs = d, this._innerRefresh();
            else if (!this._additionalRefreshRequested) {
              const u = d - this._lastRefreshMs, b = this._debounceThresholdMS - u;
              this._additionalRefreshRequested = !0, this._refreshTimeoutID = window.setTimeout(() => {
                this._lastRefreshMs = Date.now(), this._innerRefresh(), this._additionalRefreshRequested = !1, this._refreshTimeoutID = void 0;
              }, b);
            }
          }
          _innerRefresh() {
            if (this._rowStart === void 0 || this._rowEnd === void 0 || this._rowCount === void 0)
              return;
            const a = Math.max(this._rowStart, 0), h = Math.min(this._rowEnd, this._rowCount - 1);
            this._rowStart = void 0, this._rowEnd = void 0, this._renderCallback(a, h);
          }
        };
      }, 1680: function(T, r, a) {
        var h = this && this.__decorate || function(e, i, n, t) {
          var s, l = arguments.length, _ = l < 3 ? i : t === null ? t = Object.getOwnPropertyDescriptor(i, n) : t;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            _ = Reflect.decorate(e, i, n, t);
          else
            for (var m = e.length - 1; m >= 0; m--)
              (s = e[m]) && (_ = (l < 3 ? s(_) : l > 3 ? s(i, n, _) : s(i, n)) || _);
          return l > 3 && _ && Object.defineProperty(i, n, _), _;
        }, f = this && this.__param || function(e, i) {
          return function(n, t) {
            i(n, t, e);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Viewport = void 0;
        const d = a(844), u = a(3656), b = a(4725), g = a(2585);
        let c = class extends d.Disposable {
          constructor(e, i, n, t, s, l, _, m, o) {
            super(), this._scrollLines = e, this._viewportElement = i, this._scrollArea = n, this._bufferService = t, this._optionsService = s, this._charSizeService = l, this._renderService = _, this._coreBrowserService = m, this.scrollBarWidth = 0, this._currentRowHeight = 0, this._currentDeviceCellHeight = 0, this._lastRecordedBufferLength = 0, this._lastRecordedViewportHeight = 0, this._lastRecordedBufferHeight = 0, this._lastTouchY = 0, this._lastScrollTop = 0, this._wheelPartialScroll = 0, this._refreshAnimationFrame = null, this._ignoreNextScrollEvent = !1, this._smoothScrollState = { startTime: 0, origin: -1, target: -1 }, this.scrollBarWidth = this._viewportElement.offsetWidth - this._scrollArea.offsetWidth || 15, this.register((0, u.addDisposableDomListener)(this._viewportElement, "scroll", this._handleScroll.bind(this))), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((v) => this._activeBuffer = v.activeBuffer)), this._renderDimensions = this._renderService.dimensions, this.register(this._renderService.onDimensionsChange((v) => this._renderDimensions = v)), this._handleThemeChange(o.colors), this.register(o.onChangeColors((v) => this._handleThemeChange(v))), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.syncScrollArea())), setTimeout(() => this.syncScrollArea(), 0);
          }
          _handleThemeChange(e) {
            this._viewportElement.style.backgroundColor = e.background.css;
          }
          _refresh(e) {
            if (e)
              return this._innerRefresh(), void (this._refreshAnimationFrame !== null && this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));
            this._refreshAnimationFrame === null && (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._innerRefresh()));
          }
          _innerRefresh() {
            if (this._charSizeService.height > 0) {
              this._currentRowHeight = this._renderService.dimensions.device.cell.height / this._coreBrowserService.dpr, this._currentDeviceCellHeight = this._renderService.dimensions.device.cell.height, this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
              const i = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.css.canvas.height);
              this._lastRecordedBufferHeight !== i && (this._lastRecordedBufferHeight = i, this._scrollArea.style.height = this._lastRecordedBufferHeight + "px");
            }
            const e = this._bufferService.buffer.ydisp * this._currentRowHeight;
            this._viewportElement.scrollTop !== e && (this._ignoreNextScrollEvent = !0, this._viewportElement.scrollTop = e), this._refreshAnimationFrame = null;
          }
          syncScrollArea(e = !1) {
            if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length)
              return this._lastRecordedBufferLength = this._bufferService.buffer.lines.length, void this._refresh(e);
            this._lastRecordedViewportHeight === this._renderService.dimensions.css.canvas.height && this._lastScrollTop === this._activeBuffer.ydisp * this._currentRowHeight && this._renderDimensions.device.cell.height === this._currentDeviceCellHeight || this._refresh(e);
          }
          _handleScroll(e) {
            if (this._lastScrollTop = this._viewportElement.scrollTop, !this._viewportElement.offsetParent)
              return;
            if (this._ignoreNextScrollEvent)
              return this._ignoreNextScrollEvent = !1, void this._scrollLines(0);
            const i = Math.round(this._lastScrollTop / this._currentRowHeight) - this._bufferService.buffer.ydisp;
            this._scrollLines(i);
          }
          _smoothScroll() {
            if (this._isDisposed || this._smoothScrollState.origin === -1 || this._smoothScrollState.target === -1)
              return;
            const e = this._smoothScrollPercent();
            this._viewportElement.scrollTop = this._smoothScrollState.origin + Math.round(e * (this._smoothScrollState.target - this._smoothScrollState.origin)), e < 1 ? this._coreBrowserService.window.requestAnimationFrame(() => this._smoothScroll()) : this._clearSmoothScrollState();
          }
          _smoothScrollPercent() {
            return this._optionsService.rawOptions.smoothScrollDuration && this._smoothScrollState.startTime ? Math.max(Math.min((Date.now() - this._smoothScrollState.startTime) / this._optionsService.rawOptions.smoothScrollDuration, 1), 0) : 1;
          }
          _clearSmoothScrollState() {
            this._smoothScrollState.startTime = 0, this._smoothScrollState.origin = -1, this._smoothScrollState.target = -1;
          }
          _bubbleScroll(e, i) {
            const n = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
            return !(i < 0 && this._viewportElement.scrollTop !== 0 || i > 0 && n < this._lastRecordedBufferHeight) || (e.cancelable && e.preventDefault(), !1);
          }
          handleWheel(e) {
            const i = this._getPixelsScrolled(e);
            return i !== 0 && (this._optionsService.rawOptions.smoothScrollDuration ? (this._smoothScrollState.startTime = Date.now(), this._smoothScrollPercent() < 1 ? (this._smoothScrollState.origin = this._viewportElement.scrollTop, this._smoothScrollState.target === -1 ? this._smoothScrollState.target = this._viewportElement.scrollTop + i : this._smoothScrollState.target += i, this._smoothScrollState.target = Math.max(Math.min(this._smoothScrollState.target, this._viewportElement.scrollHeight), 0), this._smoothScroll()) : this._clearSmoothScrollState()) : this._viewportElement.scrollTop += i, this._bubbleScroll(e, i));
          }
          _getPixelsScrolled(e) {
            if (e.deltaY === 0 || e.shiftKey)
              return 0;
            let i = this._applyScrollModifier(e.deltaY, e);
            return e.deltaMode === WheelEvent.DOM_DELTA_LINE ? i *= this._currentRowHeight : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (i *= this._currentRowHeight * this._bufferService.rows), i;
          }
          getLinesScrolled(e) {
            if (e.deltaY === 0 || e.shiftKey)
              return 0;
            let i = this._applyScrollModifier(e.deltaY, e);
            return e.deltaMode === WheelEvent.DOM_DELTA_PIXEL ? (i /= this._currentRowHeight + 0, this._wheelPartialScroll += i, i = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1), this._wheelPartialScroll %= 1) : e.deltaMode === WheelEvent.DOM_DELTA_PAGE && (i *= this._bufferService.rows), i;
          }
          _applyScrollModifier(e, i) {
            const n = this._optionsService.rawOptions.fastScrollModifier;
            return n === "alt" && i.altKey || n === "ctrl" && i.ctrlKey || n === "shift" && i.shiftKey ? e * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity : e * this._optionsService.rawOptions.scrollSensitivity;
          }
          handleTouchStart(e) {
            this._lastTouchY = e.touches[0].pageY;
          }
          handleTouchMove(e) {
            const i = this._lastTouchY - e.touches[0].pageY;
            return this._lastTouchY = e.touches[0].pageY, i !== 0 && (this._viewportElement.scrollTop += i, this._bubbleScroll(e, i));
          }
        };
        c = h([f(3, g.IBufferService), f(4, g.IOptionsService), f(5, b.ICharSizeService), f(6, b.IRenderService), f(7, b.ICoreBrowserService), f(8, b.IThemeService)], c), r.Viewport = c;
      }, 3107: function(T, r, a) {
        var h = this && this.__decorate || function(e, i, n, t) {
          var s, l = arguments.length, _ = l < 3 ? i : t === null ? t = Object.getOwnPropertyDescriptor(i, n) : t;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            _ = Reflect.decorate(e, i, n, t);
          else
            for (var m = e.length - 1; m >= 0; m--)
              (s = e[m]) && (_ = (l < 3 ? s(_) : l > 3 ? s(i, n, _) : s(i, n)) || _);
          return l > 3 && _ && Object.defineProperty(i, n, _), _;
        }, f = this && this.__param || function(e, i) {
          return function(n, t) {
            i(n, t, e);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferDecorationRenderer = void 0;
        const d = a(3656), u = a(4725), b = a(844), g = a(2585);
        let c = class extends b.Disposable {
          constructor(e, i, n, t) {
            super(), this._screenElement = e, this._bufferService = i, this._decorationService = n, this._renderService = t, this._decorationElements = /* @__PURE__ */ new Map(), this._altBufferIsActive = !1, this._dimensionsChanged = !1, this._container = document.createElement("div"), this._container.classList.add("xterm-decoration-container"), this._screenElement.appendChild(this._container), this.register(this._renderService.onRenderedViewportChange(() => this._doRefreshDecorations())), this.register(this._renderService.onDimensionsChange(() => {
              this._dimensionsChanged = !0, this._queueRefresh();
            })), this.register((0, d.addDisposableDomListener)(window, "resize", () => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
              this._altBufferIsActive = this._bufferService.buffer === this._bufferService.buffers.alt;
            })), this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh())), this.register(this._decorationService.onDecorationRemoved((s) => this._removeDecoration(s))), this.register((0, b.toDisposable)(() => {
              this._container.remove(), this._decorationElements.clear();
            }));
          }
          _queueRefresh() {
            this._animationFrame === void 0 && (this._animationFrame = this._renderService.addRefreshCallback(() => {
              this._doRefreshDecorations(), this._animationFrame = void 0;
            }));
          }
          _doRefreshDecorations() {
            for (const e of this._decorationService.decorations)
              this._renderDecoration(e);
            this._dimensionsChanged = !1;
          }
          _renderDecoration(e) {
            this._refreshStyle(e), this._dimensionsChanged && this._refreshXPosition(e);
          }
          _createElement(e) {
            var i;
            const n = document.createElement("div");
            n.classList.add("xterm-decoration"), n.style.width = `${Math.round((e.options.width || 1) * this._renderService.dimensions.css.cell.width)}px`, n.style.height = (e.options.height || 1) * this._renderService.dimensions.css.cell.height + "px", n.style.top = (e.marker.line - this._bufferService.buffers.active.ydisp) * this._renderService.dimensions.css.cell.height + "px", n.style.lineHeight = `${this._renderService.dimensions.css.cell.height}px`;
            const t = (i = e.options.x) !== null && i !== void 0 ? i : 0;
            return t && t > this._bufferService.cols && (n.style.display = "none"), this._refreshXPosition(e, n), n;
          }
          _refreshStyle(e) {
            const i = e.marker.line - this._bufferService.buffers.active.ydisp;
            if (i < 0 || i >= this._bufferService.rows)
              e.element && (e.element.style.display = "none", e.onRenderEmitter.fire(e.element));
            else {
              let n = this._decorationElements.get(e);
              n || (n = this._createElement(e), e.element = n, this._decorationElements.set(e, n), this._container.appendChild(n)), n.style.top = i * this._renderService.dimensions.css.cell.height + "px", n.style.display = this._altBufferIsActive ? "none" : "block", e.onRenderEmitter.fire(n);
            }
          }
          _refreshXPosition(e, i = e.element) {
            var n;
            if (!i)
              return;
            const t = (n = e.options.x) !== null && n !== void 0 ? n : 0;
            (e.options.anchor || "left") === "right" ? i.style.right = t ? t * this._renderService.dimensions.css.cell.width + "px" : "" : i.style.left = t ? t * this._renderService.dimensions.css.cell.width + "px" : "";
          }
          _removeDecoration(e) {
            var i;
            (i = this._decorationElements.get(e)) === null || i === void 0 || i.remove(), this._decorationElements.delete(e), e.dispose();
          }
        };
        c = h([f(1, g.IBufferService), f(2, g.IDecorationService), f(3, u.IRenderService)], c), r.BufferDecorationRenderer = c;
      }, 5871: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ColorZoneStore = void 0, r.ColorZoneStore = class {
          constructor() {
            this._zones = [], this._zonePool = [], this._zonePoolIndex = 0, this._linePadding = { full: 0, left: 0, center: 0, right: 0 };
          }
          get zones() {
            return this._zonePool.length = Math.min(this._zonePool.length, this._zones.length), this._zones;
          }
          clear() {
            this._zones.length = 0, this._zonePoolIndex = 0;
          }
          addDecoration(a) {
            if (a.options.overviewRulerOptions) {
              for (const h of this._zones)
                if (h.color === a.options.overviewRulerOptions.color && h.position === a.options.overviewRulerOptions.position) {
                  if (this._lineIntersectsZone(h, a.marker.line))
                    return;
                  if (this._lineAdjacentToZone(h, a.marker.line, a.options.overviewRulerOptions.position))
                    return void this._addLineToZone(h, a.marker.line);
                }
              if (this._zonePoolIndex < this._zonePool.length)
                return this._zonePool[this._zonePoolIndex].color = a.options.overviewRulerOptions.color, this._zonePool[this._zonePoolIndex].position = a.options.overviewRulerOptions.position, this._zonePool[this._zonePoolIndex].startBufferLine = a.marker.line, this._zonePool[this._zonePoolIndex].endBufferLine = a.marker.line, void this._zones.push(this._zonePool[this._zonePoolIndex++]);
              this._zones.push({ color: a.options.overviewRulerOptions.color, position: a.options.overviewRulerOptions.position, startBufferLine: a.marker.line, endBufferLine: a.marker.line }), this._zonePool.push(this._zones[this._zones.length - 1]), this._zonePoolIndex++;
            }
          }
          setPadding(a) {
            this._linePadding = a;
          }
          _lineIntersectsZone(a, h) {
            return h >= a.startBufferLine && h <= a.endBufferLine;
          }
          _lineAdjacentToZone(a, h, f) {
            return h >= a.startBufferLine - this._linePadding[f || "full"] && h <= a.endBufferLine + this._linePadding[f || "full"];
          }
          _addLineToZone(a, h) {
            a.startBufferLine = Math.min(a.startBufferLine, h), a.endBufferLine = Math.max(a.endBufferLine, h);
          }
        };
      }, 5744: function(T, r, a) {
        var h = this && this.__decorate || function(s, l, _, m) {
          var o, v = arguments.length, S = v < 3 ? l : m === null ? m = Object.getOwnPropertyDescriptor(l, _) : m;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            S = Reflect.decorate(s, l, _, m);
          else
            for (var y = s.length - 1; y >= 0; y--)
              (o = s[y]) && (S = (v < 3 ? o(S) : v > 3 ? o(l, _, S) : o(l, _)) || S);
          return v > 3 && S && Object.defineProperty(l, _, S), S;
        }, f = this && this.__param || function(s, l) {
          return function(_, m) {
            l(_, m, s);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.OverviewRulerRenderer = void 0;
        const d = a(5871), u = a(3656), b = a(4725), g = a(844), c = a(2585), e = { full: 0, left: 0, center: 0, right: 0 }, i = { full: 0, left: 0, center: 0, right: 0 }, n = { full: 0, left: 0, center: 0, right: 0 };
        let t = class extends g.Disposable {
          constructor(s, l, _, m, o, v, S) {
            var y;
            super(), this._viewportElement = s, this._screenElement = l, this._bufferService = _, this._decorationService = m, this._renderService = o, this._optionsService = v, this._coreBrowseService = S, this._colorZoneStore = new d.ColorZoneStore(), this._shouldUpdateDimensions = !0, this._shouldUpdateAnchor = !0, this._lastKnownBufferLength = 0, this._canvas = document.createElement("canvas"), this._canvas.classList.add("xterm-decoration-overview-ruler"), this._refreshCanvasDimensions(), (y = this._viewportElement.parentElement) === null || y === void 0 || y.insertBefore(this._canvas, this._viewportElement);
            const w = this._canvas.getContext("2d");
            if (!w)
              throw new Error("Ctx cannot be null");
            this._ctx = w, this._registerDecorationListeners(), this._registerBufferChangeListeners(), this._registerDimensionChangeListeners(), this.register((0, g.toDisposable)(() => {
              var L;
              (L = this._canvas) === null || L === void 0 || L.remove();
            }));
          }
          get _width() {
            return this._optionsService.options.overviewRulerWidth || 0;
          }
          _registerDecorationListeners() {
            this.register(this._decorationService.onDecorationRegistered(() => this._queueRefresh(void 0, !0))), this.register(this._decorationService.onDecorationRemoved(() => this._queueRefresh(void 0, !0)));
          }
          _registerBufferChangeListeners() {
            this.register(this._renderService.onRenderedViewportChange(() => this._queueRefresh())), this.register(this._bufferService.buffers.onBufferActivate(() => {
              this._canvas.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? "none" : "block";
            })), this.register(this._bufferService.onScroll(() => {
              this._lastKnownBufferLength !== this._bufferService.buffers.normal.lines.length && (this._refreshDrawHeightConstants(), this._refreshColorZonePadding());
            }));
          }
          _registerDimensionChangeListeners() {
            this.register(this._renderService.onRender(() => {
              this._containerHeight && this._containerHeight === this._screenElement.clientHeight || (this._queueRefresh(!0), this._containerHeight = this._screenElement.clientHeight);
            })), this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth", () => this._queueRefresh(!0))), this.register((0, u.addDisposableDomListener)(this._coreBrowseService.window, "resize", () => this._queueRefresh(!0))), this._queueRefresh(!0);
          }
          _refreshDrawConstants() {
            const s = Math.floor(this._canvas.width / 3), l = Math.ceil(this._canvas.width / 3);
            i.full = this._canvas.width, i.left = s, i.center = l, i.right = s, this._refreshDrawHeightConstants(), n.full = 0, n.left = 0, n.center = i.left, n.right = i.left + i.center;
          }
          _refreshDrawHeightConstants() {
            e.full = Math.round(2 * this._coreBrowseService.dpr);
            const s = this._canvas.height / this._bufferService.buffer.lines.length, l = Math.round(Math.max(Math.min(s, 12), 6) * this._coreBrowseService.dpr);
            e.left = l, e.center = l, e.right = l;
          }
          _refreshColorZonePadding() {
            this._colorZoneStore.setPadding({ full: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * e.full), left: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * e.left), center: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * e.center), right: Math.floor(this._bufferService.buffers.active.lines.length / (this._canvas.height - 1) * e.right) }), this._lastKnownBufferLength = this._bufferService.buffers.normal.lines.length;
          }
          _refreshCanvasDimensions() {
            this._canvas.style.width = `${this._width}px`, this._canvas.width = Math.round(this._width * this._coreBrowseService.dpr), this._canvas.style.height = `${this._screenElement.clientHeight}px`, this._canvas.height = Math.round(this._screenElement.clientHeight * this._coreBrowseService.dpr), this._refreshDrawConstants(), this._refreshColorZonePadding();
          }
          _refreshDecorations() {
            this._shouldUpdateDimensions && this._refreshCanvasDimensions(), this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height), this._colorZoneStore.clear();
            for (const l of this._decorationService.decorations)
              this._colorZoneStore.addDecoration(l);
            this._ctx.lineWidth = 1;
            const s = this._colorZoneStore.zones;
            for (const l of s)
              l.position !== "full" && this._renderColorZone(l);
            for (const l of s)
              l.position === "full" && this._renderColorZone(l);
            this._shouldUpdateDimensions = !1, this._shouldUpdateAnchor = !1;
          }
          _renderColorZone(s) {
            this._ctx.fillStyle = s.color, this._ctx.fillRect(n[s.position || "full"], Math.round((this._canvas.height - 1) * (s.startBufferLine / this._bufferService.buffers.active.lines.length) - e[s.position || "full"] / 2), i[s.position || "full"], Math.round((this._canvas.height - 1) * ((s.endBufferLine - s.startBufferLine) / this._bufferService.buffers.active.lines.length) + e[s.position || "full"]));
          }
          _queueRefresh(s, l) {
            this._shouldUpdateDimensions = s || this._shouldUpdateDimensions, this._shouldUpdateAnchor = l || this._shouldUpdateAnchor, this._animationFrame === void 0 && (this._animationFrame = this._coreBrowseService.window.requestAnimationFrame(() => {
              this._refreshDecorations(), this._animationFrame = void 0;
            }));
          }
        };
        t = h([f(2, c.IBufferService), f(3, c.IDecorationService), f(4, b.IRenderService), f(5, c.IOptionsService), f(6, b.ICoreBrowserService)], t), r.OverviewRulerRenderer = t;
      }, 2950: function(T, r, a) {
        var h = this && this.__decorate || function(c, e, i, n) {
          var t, s = arguments.length, l = s < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, i) : n;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            l = Reflect.decorate(c, e, i, n);
          else
            for (var _ = c.length - 1; _ >= 0; _--)
              (t = c[_]) && (l = (s < 3 ? t(l) : s > 3 ? t(e, i, l) : t(e, i)) || l);
          return s > 3 && l && Object.defineProperty(e, i, l), l;
        }, f = this && this.__param || function(c, e) {
          return function(i, n) {
            e(i, n, c);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CompositionHelper = void 0;
        const d = a(4725), u = a(2585), b = a(2584);
        let g = class {
          constructor(c, e, i, n, t, s) {
            this._textarea = c, this._compositionView = e, this._bufferService = i, this._optionsService = n, this._coreService = t, this._renderService = s, this._isComposing = !1, this._isSendingComposition = !1, this._compositionPosition = { start: 0, end: 0 }, this._dataAlreadySent = "";
          }
          get isComposing() {
            return this._isComposing;
          }
          compositionstart() {
            this._isComposing = !0, this._compositionPosition.start = this._textarea.value.length, this._compositionView.textContent = "", this._dataAlreadySent = "", this._compositionView.classList.add("active");
          }
          compositionupdate(c) {
            this._compositionView.textContent = c.data, this.updateCompositionElements(), setTimeout(() => {
              this._compositionPosition.end = this._textarea.value.length;
            }, 0);
          }
          compositionend() {
            this._finalizeComposition(!0);
          }
          keydown(c) {
            if (this._isComposing || this._isSendingComposition) {
              if (c.keyCode === 229 || c.keyCode === 16 || c.keyCode === 17 || c.keyCode === 18)
                return !1;
              this._finalizeComposition(!1);
            }
            return c.keyCode !== 229 || (this._handleAnyTextareaChanges(), !1);
          }
          _finalizeComposition(c) {
            if (this._compositionView.classList.remove("active"), this._isComposing = !1, c) {
              const e = { start: this._compositionPosition.start, end: this._compositionPosition.end };
              this._isSendingComposition = !0, setTimeout(() => {
                if (this._isSendingComposition) {
                  let i;
                  this._isSendingComposition = !1, e.start += this._dataAlreadySent.length, i = this._isComposing ? this._textarea.value.substring(e.start, e.end) : this._textarea.value.substring(e.start), i.length > 0 && this._coreService.triggerDataEvent(i, !0);
                }
              }, 0);
            } else {
              this._isSendingComposition = !1;
              const e = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end);
              this._coreService.triggerDataEvent(e, !0);
            }
          }
          _handleAnyTextareaChanges() {
            const c = this._textarea.value;
            setTimeout(() => {
              if (!this._isComposing) {
                const e = this._textarea.value, i = e.replace(c, "");
                this._dataAlreadySent = i, e.length > c.length ? this._coreService.triggerDataEvent(i, !0) : e.length < c.length ? this._coreService.triggerDataEvent(`${b.C0.DEL}`, !0) : e.length === c.length && e !== c && this._coreService.triggerDataEvent(e, !0);
              }
            }, 0);
          }
          updateCompositionElements(c) {
            if (this._isComposing) {
              if (this._bufferService.buffer.isCursorInViewport) {
                const e = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1), i = this._renderService.dimensions.css.cell.height, n = this._bufferService.buffer.y * this._renderService.dimensions.css.cell.height, t = e * this._renderService.dimensions.css.cell.width;
                this._compositionView.style.left = t + "px", this._compositionView.style.top = n + "px", this._compositionView.style.height = i + "px", this._compositionView.style.lineHeight = i + "px", this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + "px";
                const s = this._compositionView.getBoundingClientRect();
                this._textarea.style.left = t + "px", this._textarea.style.top = n + "px", this._textarea.style.width = Math.max(s.width, 1) + "px", this._textarea.style.height = Math.max(s.height, 1) + "px", this._textarea.style.lineHeight = s.height + "px";
              }
              c || setTimeout(() => this.updateCompositionElements(!0), 0);
            }
          }
        };
        g = h([f(2, u.IBufferService), f(3, u.IOptionsService), f(4, u.ICoreService), f(5, d.IRenderService)], g), r.CompositionHelper = g;
      }, 9806: (T, r) => {
        function a(h, f, d) {
          const u = d.getBoundingClientRect(), b = h.getComputedStyle(d), g = parseInt(b.getPropertyValue("padding-left")), c = parseInt(b.getPropertyValue("padding-top"));
          return [f.clientX - u.left - g, f.clientY - u.top - c];
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.getCoords = r.getCoordsRelativeToElement = void 0, r.getCoordsRelativeToElement = a, r.getCoords = function(h, f, d, u, b, g, c, e, i) {
          if (!g)
            return;
          const n = a(h, f, d);
          return n ? (n[0] = Math.ceil((n[0] + (i ? c / 2 : 0)) / c), n[1] = Math.ceil(n[1] / e), n[0] = Math.min(Math.max(n[0], 1), u + (i ? 1 : 0)), n[1] = Math.min(Math.max(n[1], 1), b), n) : void 0;
        };
      }, 9504: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.moveToCellSequence = void 0;
        const h = a(2584);
        function f(e, i, n, t) {
          const s = e - d(e, n), l = i - d(i, n), _ = Math.abs(s - l) - function(m, o, v) {
            let S = 0;
            const y = m - d(m, v), w = o - d(o, v);
            for (let L = 0; L < Math.abs(y - w); L++) {
              const M = u(m, o) === "A" ? -1 : 1, I = v.buffer.lines.get(y + M * L);
              I != null && I.isWrapped && S++;
            }
            return S;
          }(e, i, n);
          return c(_, g(u(e, i), t));
        }
        function d(e, i) {
          let n = 0, t = i.buffer.lines.get(e), s = t == null ? void 0 : t.isWrapped;
          for (; s && e >= 0 && e < i.rows; )
            n++, t = i.buffer.lines.get(--e), s = t == null ? void 0 : t.isWrapped;
          return n;
        }
        function u(e, i) {
          return e > i ? "A" : "B";
        }
        function b(e, i, n, t, s, l) {
          let _ = e, m = i, o = "";
          for (; _ !== n || m !== t; )
            _ += s ? 1 : -1, s && _ > l.cols - 1 ? (o += l.buffer.translateBufferLineToString(m, !1, e, _), _ = 0, e = 0, m++) : !s && _ < 0 && (o += l.buffer.translateBufferLineToString(m, !1, 0, e + 1), _ = l.cols - 1, e = _, m--);
          return o + l.buffer.translateBufferLineToString(m, !1, e, _);
        }
        function g(e, i) {
          const n = i ? "O" : "[";
          return h.C0.ESC + n + e;
        }
        function c(e, i) {
          e = Math.floor(e);
          let n = "";
          for (let t = 0; t < e; t++)
            n += i;
          return n;
        }
        r.moveToCellSequence = function(e, i, n, t) {
          const s = n.buffer.x, l = n.buffer.y;
          if (!n.buffer.hasScrollback)
            return function(o, v, S, y, w, L) {
              return f(v, y, w, L).length === 0 ? "" : c(b(o, v, o, v - d(v, w), !1, w).length, g("D", L));
            }(s, l, 0, i, n, t) + f(l, i, n, t) + function(o, v, S, y, w, L) {
              let M;
              M = f(v, y, w, L).length > 0 ? y - d(y, w) : v;
              const I = y, W = function(p, C, E, R, O, F) {
                let Y;
                return Y = f(E, R, O, F).length > 0 ? R - d(R, O) : C, p < E && Y <= R || p >= E && Y < R ? "C" : "D";
              }(o, v, S, y, w, L);
              return c(b(o, M, S, I, W === "C", w).length, g(W, L));
            }(s, l, e, i, n, t);
          let _;
          if (l === i)
            return _ = s > e ? "D" : "C", c(Math.abs(s - e), g(_, t));
          _ = l > i ? "D" : "C";
          const m = Math.abs(l - i);
          return c(function(o, v) {
            return v.cols - o;
          }(l > i ? e : s, n) + (m - 1) * n.cols + 1 + ((l > i ? s : e) - 1), g(_, t));
        };
      }, 1296: function(T, r, a) {
        var h = this && this.__decorate || function(o, v, S, y) {
          var w, L = arguments.length, M = L < 3 ? v : y === null ? y = Object.getOwnPropertyDescriptor(v, S) : y;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            M = Reflect.decorate(o, v, S, y);
          else
            for (var I = o.length - 1; I >= 0; I--)
              (w = o[I]) && (M = (L < 3 ? w(M) : L > 3 ? w(v, S, M) : w(v, S)) || M);
          return L > 3 && M && Object.defineProperty(v, S, M), M;
        }, f = this && this.__param || function(o, v) {
          return function(S, y) {
            v(S, y, o);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DomRenderer = void 0;
        const d = a(9631), u = a(3787), b = a(2223), g = a(6171), c = a(4725), e = a(8055), i = a(8460), n = a(844), t = a(2585), s = "xterm-dom-renderer-owner-", l = "xterm-focus";
        let _ = 1, m = class extends n.Disposable {
          constructor(o, v, S, y, w, L, M, I, W, p) {
            super(), this._element = o, this._screenElement = v, this._viewportElement = S, this._linkifier2 = y, this._charSizeService = L, this._optionsService = M, this._bufferService = I, this._coreBrowserService = W, this._terminalClass = _++, this._rowElements = [], this._cellToRowElements = [], this.onRequestRedraw = this.register(new i.EventEmitter()).event, this._rowContainer = document.createElement("div"), this._rowContainer.classList.add("xterm-rows"), this._rowContainer.style.lineHeight = "normal", this._rowContainer.setAttribute("aria-hidden", "true"), this._refreshRowElements(this._bufferService.cols, this._bufferService.rows), this._selectionContainer = document.createElement("div"), this._selectionContainer.classList.add("xterm-selection"), this._selectionContainer.setAttribute("aria-hidden", "true"), this.dimensions = (0, g.createRenderDimensions)(), this._updateDimensions(), this.register(this._optionsService.onOptionChange(() => this._handleOptionsChanged())), this.register(p.onChangeColors((C) => this._injectCss(C))), this._injectCss(p.colors), this._rowFactory = w.createInstance(u.DomRendererRowFactory, document), this._element.classList.add(s + this._terminalClass), this._screenElement.appendChild(this._rowContainer), this._screenElement.appendChild(this._selectionContainer), this.register(this._linkifier2.onShowLinkUnderline((C) => this._handleLinkHover(C))), this.register(this._linkifier2.onHideLinkUnderline((C) => this._handleLinkLeave(C))), this.register((0, n.toDisposable)(() => {
              this._element.classList.remove(s + this._terminalClass), (0, d.removeElementFromParent)(this._rowContainer, this._selectionContainer, this._themeStyleElement, this._dimensionsStyleElement);
            }));
          }
          _updateDimensions() {
            const o = this._coreBrowserService.dpr;
            this.dimensions.device.char.width = this._charSizeService.width * o, this.dimensions.device.char.height = Math.ceil(this._charSizeService.height * o), this.dimensions.device.cell.width = this.dimensions.device.char.width + Math.round(this._optionsService.rawOptions.letterSpacing), this.dimensions.device.cell.height = Math.floor(this.dimensions.device.char.height * this._optionsService.rawOptions.lineHeight), this.dimensions.device.char.left = 0, this.dimensions.device.char.top = 0, this.dimensions.device.canvas.width = this.dimensions.device.cell.width * this._bufferService.cols, this.dimensions.device.canvas.height = this.dimensions.device.cell.height * this._bufferService.rows, this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / o), this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / o), this.dimensions.css.cell.width = this.dimensions.css.canvas.width / this._bufferService.cols, this.dimensions.css.cell.height = this.dimensions.css.canvas.height / this._bufferService.rows;
            for (const S of this._rowElements)
              S.style.width = `${this.dimensions.css.canvas.width}px`, S.style.height = `${this.dimensions.css.cell.height}px`, S.style.lineHeight = `${this.dimensions.css.cell.height}px`, S.style.overflow = "hidden";
            this._dimensionsStyleElement || (this._dimensionsStyleElement = document.createElement("style"), this._screenElement.appendChild(this._dimensionsStyleElement));
            const v = `${this._terminalSelector} .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: ${this.dimensions.css.cell.width}px}`;
            this._dimensionsStyleElement.textContent = v, this._selectionContainer.style.height = this._viewportElement.style.height, this._screenElement.style.width = `${this.dimensions.css.canvas.width}px`, this._screenElement.style.height = `${this.dimensions.css.canvas.height}px`;
          }
          _injectCss(o) {
            this._themeStyleElement || (this._themeStyleElement = document.createElement("style"), this._screenElement.appendChild(this._themeStyleElement));
            let v = `${this._terminalSelector} .xterm-rows { color: ${o.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px;}`;
            v += `${this._terminalSelector} span:not(.${u.BOLD_CLASS}) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.${u.BOLD_CLASS} { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.${u.ITALIC_CLASS} { font-style: italic;}`, v += "@keyframes blink_box_shadow_" + this._terminalClass + " { 50% {  box-shadow: none; }}", v += "@keyframes blink_block_" + this._terminalClass + ` { 0% {  background-color: ${o.cursor.css};  color: ${o.cursorAccent.css}; } 50% {  background-color: ${o.cursorAccent.css};  color: ${o.cursor.css}; }}`, v += `${this._terminalSelector} .xterm-rows:not(.xterm-focus) .${u.CURSOR_CLASS}.${u.CURSOR_STYLE_BLOCK_CLASS} { outline: 1px solid ${o.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .xterm-rows.xterm-focus .${u.CURSOR_CLASS}.${u.CURSOR_BLINK_CLASS}:not(.${u.CURSOR_STYLE_BLOCK_CLASS}) { animation: blink_box_shadow_` + this._terminalClass + ` 1s step-end infinite;}${this._terminalSelector} .xterm-rows.xterm-focus .${u.CURSOR_CLASS}.${u.CURSOR_BLINK_CLASS}.${u.CURSOR_STYLE_BLOCK_CLASS} { animation: blink_block_` + this._terminalClass + ` 1s step-end infinite;}${this._terminalSelector} .xterm-rows.xterm-focus .${u.CURSOR_CLASS}.${u.CURSOR_STYLE_BLOCK_CLASS} { background-color: ${o.cursor.css}; color: ${o.cursorAccent.css};}${this._terminalSelector} .xterm-rows .${u.CURSOR_CLASS}.${u.CURSOR_STYLE_BAR_CLASS} { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${o.cursor.css} inset;}${this._terminalSelector} .xterm-rows .${u.CURSOR_CLASS}.${u.CURSOR_STYLE_UNDERLINE_CLASS} { box-shadow: 0 -1px 0 ${o.cursor.css} inset;}`, v += `${this._terminalSelector} .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .xterm-selection div { position: absolute; background-color: ${o.selectionBackgroundOpaque.css};}${this._terminalSelector} .xterm-selection div { position: absolute; background-color: ${o.selectionInactiveBackgroundOpaque.css};}`;
            for (const [S, y] of o.ansi.entries())
              v += `${this._terminalSelector} .xterm-fg-${S} { color: ${y.css}; }${this._terminalSelector} .xterm-bg-${S} { background-color: ${y.css}; }`;
            v += `${this._terminalSelector} .xterm-fg-${b.INVERTED_DEFAULT_COLOR} { color: ${e.color.opaque(o.background).css}; }${this._terminalSelector} .xterm-bg-${b.INVERTED_DEFAULT_COLOR} { background-color: ${o.foreground.css}; }`, this._themeStyleElement.textContent = v;
          }
          handleDevicePixelRatioChange() {
            this._updateDimensions();
          }
          _refreshRowElements(o, v) {
            for (let S = this._rowElements.length; S <= v; S++) {
              const y = document.createElement("div");
              this._rowContainer.appendChild(y), this._rowElements.push(y);
            }
            for (; this._rowElements.length > v; )
              this._rowContainer.removeChild(this._rowElements.pop());
          }
          handleResize(o, v) {
            this._refreshRowElements(o, v), this._updateDimensions();
          }
          handleCharSizeChanged() {
            this._updateDimensions();
          }
          handleBlur() {
            this._rowContainer.classList.remove(l);
          }
          handleFocus() {
            this._rowContainer.classList.add(l);
          }
          handleSelectionChanged(o, v, S) {
            for (; this._selectionContainer.children.length; )
              this._selectionContainer.removeChild(this._selectionContainer.children[0]);
            if (this._rowFactory.handleSelectionChanged(o, v, S), this.renderRows(0, this._bufferService.rows - 1), !o || !v)
              return;
            const y = o[1] - this._bufferService.buffer.ydisp, w = v[1] - this._bufferService.buffer.ydisp, L = Math.max(y, 0), M = Math.min(w, this._bufferService.rows - 1);
            if (L >= this._bufferService.rows || M < 0)
              return;
            const I = document.createDocumentFragment();
            if (S) {
              const W = o[0] > v[0];
              I.appendChild(this._createSelectionElement(L, W ? v[0] : o[0], W ? o[0] : v[0], M - L + 1));
            } else {
              const W = y === L ? o[0] : 0, p = L === w ? v[0] : this._bufferService.cols;
              I.appendChild(this._createSelectionElement(L, W, p));
              const C = M - L - 1;
              if (I.appendChild(this._createSelectionElement(L + 1, 0, this._bufferService.cols, C)), L !== M) {
                const E = w === M ? v[0] : this._bufferService.cols;
                I.appendChild(this._createSelectionElement(M, 0, E));
              }
            }
            this._selectionContainer.appendChild(I);
          }
          _createSelectionElement(o, v, S, y = 1) {
            const w = document.createElement("div");
            return w.style.height = y * this.dimensions.css.cell.height + "px", w.style.top = o * this.dimensions.css.cell.height + "px", w.style.left = v * this.dimensions.css.cell.width + "px", w.style.width = this.dimensions.css.cell.width * (S - v) + "px", w;
          }
          handleCursorMove() {
          }
          _handleOptionsChanged() {
            this._updateDimensions();
          }
          clear() {
            for (const o of this._rowElements)
              o.replaceChildren();
          }
          renderRows(o, v) {
            const S = this._bufferService.buffer.ybase + this._bufferService.buffer.y, y = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1), w = this._optionsService.rawOptions.cursorBlink;
            for (let L = o; L <= v; L++) {
              const M = this._rowElements[L], I = L + this._bufferService.buffer.ydisp, W = this._bufferService.buffer.lines.get(I), p = this._optionsService.rawOptions.cursorStyle;
              this._cellToRowElements[L] && this._cellToRowElements[L].length === this._bufferService.cols || (this._cellToRowElements[L] = new Int16Array(this._bufferService.cols)), M.replaceChildren(this._rowFactory.createRow(W, I, I === S, p, y, w, this.dimensions.css.cell.width, this._bufferService.cols, this._cellToRowElements[L]));
            }
          }
          get _terminalSelector() {
            return `.${s}${this._terminalClass}`;
          }
          _handleLinkHover(o) {
            this._setCellUnderline(o.x1, o.x2, o.y1, o.y2, o.cols, !0);
          }
          _handleLinkLeave(o) {
            this._setCellUnderline(o.x1, o.x2, o.y1, o.y2, o.cols, !1);
          }
          _setCellUnderline(o, v, S, y, w, L) {
            if (o = this._cellToRowElements[S][o], v = this._cellToRowElements[y][v], o !== -1 && v !== -1)
              for (; o !== v || S !== y; ) {
                const M = this._rowElements[S];
                if (!M)
                  return;
                const I = M.children[o];
                I && (I.style.textDecoration = L ? "underline" : "none"), ++o >= w && (o = 0, S++);
              }
          }
        };
        m = h([f(4, t.IInstantiationService), f(5, c.ICharSizeService), f(6, t.IOptionsService), f(7, t.IBufferService), f(8, c.ICoreBrowserService), f(9, c.IThemeService)], m), r.DomRenderer = m;
      }, 3787: function(T, r, a) {
        var h = this && this.__decorate || function(_, m, o, v) {
          var S, y = arguments.length, w = y < 3 ? m : v === null ? v = Object.getOwnPropertyDescriptor(m, o) : v;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            w = Reflect.decorate(_, m, o, v);
          else
            for (var L = _.length - 1; L >= 0; L--)
              (S = _[L]) && (w = (y < 3 ? S(w) : y > 3 ? S(m, o, w) : S(m, o)) || w);
          return y > 3 && w && Object.defineProperty(m, o, w), w;
        }, f = this && this.__param || function(_, m) {
          return function(o, v) {
            m(o, v, _);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DomRendererRowFactory = r.CURSOR_STYLE_UNDERLINE_CLASS = r.CURSOR_STYLE_BAR_CLASS = r.CURSOR_STYLE_BLOCK_CLASS = r.CURSOR_BLINK_CLASS = r.CURSOR_CLASS = r.STRIKETHROUGH_CLASS = r.UNDERLINE_CLASS = r.ITALIC_CLASS = r.DIM_CLASS = r.BOLD_CLASS = void 0;
        const d = a(2223), u = a(643), b = a(511), g = a(2585), c = a(8055), e = a(4725), i = a(4269), n = a(6171), t = a(3734);
        r.BOLD_CLASS = "xterm-bold", r.DIM_CLASS = "xterm-dim", r.ITALIC_CLASS = "xterm-italic", r.UNDERLINE_CLASS = "xterm-underline", r.STRIKETHROUGH_CLASS = "xterm-strikethrough", r.CURSOR_CLASS = "xterm-cursor", r.CURSOR_BLINK_CLASS = "xterm-cursor-blink", r.CURSOR_STYLE_BLOCK_CLASS = "xterm-cursor-block", r.CURSOR_STYLE_BAR_CLASS = "xterm-cursor-bar", r.CURSOR_STYLE_UNDERLINE_CLASS = "xterm-cursor-underline";
        let s = class {
          constructor(_, m, o, v, S, y, w) {
            this._document = _, this._characterJoinerService = m, this._optionsService = o, this._coreBrowserService = v, this._coreService = S, this._decorationService = y, this._themeService = w, this._workCell = new b.CellData(), this._columnSelectMode = !1;
          }
          handleSelectionChanged(_, m, o) {
            this._selectionStart = _, this._selectionEnd = m, this._columnSelectMode = o;
          }
          createRow(_, m, o, v, S, y, w, L, M) {
            const I = this._document.createDocumentFragment(), W = this._characterJoinerService.getJoinedCharacters(m);
            let p = 0;
            for (let O = Math.min(_.length, L) - 1; O >= 0; O--)
              if (_.loadCell(O, this._workCell).getCode() !== u.NULL_CELL_CODE || o && O === S) {
                p = O + 1;
                break;
              }
            const C = this._themeService.colors;
            let E = -1, R = 0;
            for (; R < p; R++) {
              _.loadCell(R, this._workCell);
              let O = this._workCell.getWidth();
              if (O === 0) {
                M[R] = E;
                continue;
              }
              let F = !1, Y = R, P = this._workCell;
              if (W.length > 0 && R === W[0][0]) {
                F = !0;
                const j = W.shift();
                P = new i.JoinedCellData(this._workCell, _.translateToString(!0, j[0], j[1]), j[1] - j[0]), Y = j[1] - 1, O = P.getWidth();
              }
              const G = this._document.createElement("span");
              if (O > 1 && (G.style.width = w * O + "px"), F && (G.style.display = "inline", S >= R && S <= Y && (S = R)), !this._coreService.isCursorHidden && o && R === S)
                switch (G.classList.add(r.CURSOR_CLASS), y && G.classList.add(r.CURSOR_BLINK_CLASS), v) {
                  case "bar":
                    G.classList.add(r.CURSOR_STYLE_BAR_CLASS);
                    break;
                  case "underline":
                    G.classList.add(r.CURSOR_STYLE_UNDERLINE_CLASS);
                    break;
                  default:
                    G.classList.add(r.CURSOR_STYLE_BLOCK_CLASS);
                }
              if (P.isBold() && G.classList.add(r.BOLD_CLASS), P.isItalic() && G.classList.add(r.ITALIC_CLASS), P.isDim() && G.classList.add(r.DIM_CLASS), P.isInvisible() ? G.textContent = u.WHITESPACE_CELL_CHAR : G.textContent = P.getChars() || u.WHITESPACE_CELL_CHAR, P.isUnderline() && (G.classList.add(`${r.UNDERLINE_CLASS}-${P.extended.underlineStyle}`), G.textContent === " " && (G.textContent = " "), !P.isUnderlineColorDefault()))
                if (P.isUnderlineColorRGB())
                  G.style.textDecorationColor = `rgb(${t.AttributeData.toColorRGB(P.getUnderlineColor()).join(",")})`;
                else {
                  let j = P.getUnderlineColor();
                  this._optionsService.rawOptions.drawBoldTextInBrightColors && P.isBold() && j < 8 && (j += 8), G.style.textDecorationColor = C.ansi[j].css;
                }
              P.isStrikethrough() && G.classList.add(r.STRIKETHROUGH_CLASS);
              let B = P.getFgColor(), k = P.getFgColorMode(), A = P.getBgColor(), x = P.getBgColorMode();
              const H = !!P.isInverse();
              if (H) {
                const j = B;
                B = A, A = j;
                const Q = k;
                k = x, x = Q;
              }
              let $, U, K = !1;
              this._decorationService.forEachDecorationAtCell(R, m, void 0, (j) => {
                j.options.layer !== "top" && K || (j.backgroundColorRGB && (x = 50331648, A = j.backgroundColorRGB.rgba >> 8 & 16777215, $ = j.backgroundColorRGB), j.foregroundColorRGB && (k = 50331648, B = j.foregroundColorRGB.rgba >> 8 & 16777215, U = j.foregroundColorRGB), K = j.options.layer === "top");
              });
              const X = this._isCellInSelection(R, m);
              let q;
              switch (K || C.selectionForeground && X && (k = 50331648, B = C.selectionForeground.rgba >> 8 & 16777215, U = C.selectionForeground), X && ($ = this._coreBrowserService.isFocused ? C.selectionBackgroundOpaque : C.selectionInactiveBackgroundOpaque, K = !0), K && G.classList.add("xterm-decoration-top"), x) {
                case 16777216:
                case 33554432:
                  q = C.ansi[A], G.classList.add(`xterm-bg-${A}`);
                  break;
                case 50331648:
                  q = c.rgba.toColor(A >> 16, A >> 8 & 255, 255 & A), this._addStyle(G, `background-color:#${l((A >>> 0).toString(16), "0", 6)}`);
                  break;
                default:
                  H ? (q = C.foreground, G.classList.add(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)) : q = C.background;
              }
              switch ($ || P.isDim() && ($ = c.color.multiplyOpacity(q, 0.5)), k) {
                case 16777216:
                case 33554432:
                  P.isBold() && B < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors && (B += 8), this._applyMinimumContrast(G, q, C.ansi[B], P, $, void 0) || G.classList.add(`xterm-fg-${B}`);
                  break;
                case 50331648:
                  const j = c.rgba.toColor(B >> 16 & 255, B >> 8 & 255, 255 & B);
                  this._applyMinimumContrast(G, q, j, P, $, U) || this._addStyle(G, `color:#${l(B.toString(16), "0", 6)}`);
                  break;
                default:
                  this._applyMinimumContrast(G, q, C.foreground, P, $, void 0) || H && G.classList.add(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`);
              }
              I.appendChild(G), M[R] = ++E, R = Y;
            }
            return R < L - 1 && M.subarray(R).fill(++E), I;
          }
          _applyMinimumContrast(_, m, o, v, S, y) {
            if (this._optionsService.rawOptions.minimumContrastRatio === 1 || (0, n.excludeFromContrastRatioDemands)(v.getCode()))
              return !1;
            let w;
            return S || y || (w = this._themeService.colors.contrastCache.getColor(m.rgba, o.rgba)), w === void 0 && (w = c.color.ensureContrastRatio(S || m, y || o, this._optionsService.rawOptions.minimumContrastRatio), this._themeService.colors.contrastCache.setColor((S || m).rgba, (y || o).rgba, w ?? null)), !!w && (this._addStyle(_, `color:${w.css}`), !0);
          }
          _addStyle(_, m) {
            _.setAttribute("style", `${_.getAttribute("style") || ""}${m};`);
          }
          _isCellInSelection(_, m) {
            const o = this._selectionStart, v = this._selectionEnd;
            return !(!o || !v) && (this._columnSelectMode ? o[0] <= v[0] ? _ >= o[0] && m >= o[1] && _ < v[0] && m <= v[1] : _ < o[0] && m >= o[1] && _ >= v[0] && m <= v[1] : m > o[1] && m < v[1] || o[1] === v[1] && m === o[1] && _ >= o[0] && _ < v[0] || o[1] < v[1] && m === v[1] && _ < v[0] || o[1] < v[1] && m === o[1] && _ >= o[0]);
          }
        };
        function l(_, m, o) {
          for (; _.length < o; )
            _ = m + _;
          return _;
        }
        s = h([f(1, e.ICharacterJoinerService), f(2, g.IOptionsService), f(3, e.ICoreBrowserService), f(4, g.ICoreService), f(5, g.IDecorationService), f(6, e.IThemeService)], s), r.DomRendererRowFactory = s;
      }, 2223: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.TEXT_BASELINE = r.DIM_OPACITY = r.INVERTED_DEFAULT_COLOR = void 0;
        const h = a(6114);
        r.INVERTED_DEFAULT_COLOR = 257, r.DIM_OPACITY = 0.5, r.TEXT_BASELINE = h.isFirefox || h.isLegacyEdge ? "bottom" : "ideographic";
      }, 6171: (T, r) => {
        function a(h) {
          return 57508 <= h && h <= 57558;
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.createRenderDimensions = r.excludeFromContrastRatioDemands = r.isRestrictedPowerlineGlyph = r.isPowerlineGlyph = r.throwIfFalsy = void 0, r.throwIfFalsy = function(h) {
          if (!h)
            throw new Error("value must not be falsy");
          return h;
        }, r.isPowerlineGlyph = a, r.isRestrictedPowerlineGlyph = function(h) {
          return 57520 <= h && h <= 57527;
        }, r.excludeFromContrastRatioDemands = function(h) {
          return a(h) || function(f) {
            return 9472 <= f && f <= 9631;
          }(h);
        }, r.createRenderDimensions = function() {
          return { css: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 } }, device: { canvas: { width: 0, height: 0 }, cell: { width: 0, height: 0 }, char: { width: 0, height: 0, left: 0, top: 0 } } };
        };
      }, 456: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.SelectionModel = void 0, r.SelectionModel = class {
          constructor(a) {
            this._bufferService = a, this.isSelectAllActive = !1, this.selectionStartLength = 0;
          }
          clearSelection() {
            this.selectionStart = void 0, this.selectionEnd = void 0, this.isSelectAllActive = !1, this.selectionStartLength = 0;
          }
          get finalSelectionStart() {
            return this.isSelectAllActive ? [0, 0] : this.selectionEnd && this.selectionStart && this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;
          }
          get finalSelectionEnd() {
            if (this.isSelectAllActive)
              return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1];
            if (this.selectionStart) {
              if (!this.selectionEnd || this.areSelectionValuesReversed()) {
                const a = this.selectionStart[0] + this.selectionStartLength;
                return a > this._bufferService.cols ? a % this._bufferService.cols == 0 ? [this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols) - 1] : [a % this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols)] : [a, this.selectionStart[1]];
              }
              if (this.selectionStartLength && this.selectionEnd[1] === this.selectionStart[1]) {
                const a = this.selectionStart[0] + this.selectionStartLength;
                return a > this._bufferService.cols ? [a % this._bufferService.cols, this.selectionStart[1] + Math.floor(a / this._bufferService.cols)] : [Math.max(a, this.selectionEnd[0]), this.selectionEnd[1]];
              }
              return this.selectionEnd;
            }
          }
          areSelectionValuesReversed() {
            const a = this.selectionStart, h = this.selectionEnd;
            return !(!a || !h) && (a[1] > h[1] || a[1] === h[1] && a[0] > h[0]);
          }
          handleTrim(a) {
            return this.selectionStart && (this.selectionStart[1] -= a), this.selectionEnd && (this.selectionEnd[1] -= a), this.selectionEnd && this.selectionEnd[1] < 0 ? (this.clearSelection(), !0) : (this.selectionStart && this.selectionStart[1] < 0 && (this.selectionStart[1] = 0), !1);
          }
        };
      }, 428: function(T, r, a) {
        var h = this && this.__decorate || function(e, i, n, t) {
          var s, l = arguments.length, _ = l < 3 ? i : t === null ? t = Object.getOwnPropertyDescriptor(i, n) : t;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            _ = Reflect.decorate(e, i, n, t);
          else
            for (var m = e.length - 1; m >= 0; m--)
              (s = e[m]) && (_ = (l < 3 ? s(_) : l > 3 ? s(i, n, _) : s(i, n)) || _);
          return l > 3 && _ && Object.defineProperty(i, n, _), _;
        }, f = this && this.__param || function(e, i) {
          return function(n, t) {
            i(n, t, e);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CharSizeService = void 0;
        const d = a(2585), u = a(8460), b = a(844);
        let g = class extends b.Disposable {
          constructor(e, i, n) {
            super(), this._optionsService = n, this.width = 0, this.height = 0, this._onCharSizeChange = this.register(new u.EventEmitter()), this.onCharSizeChange = this._onCharSizeChange.event, this._measureStrategy = new c(e, i, this._optionsService), this.register(this._optionsService.onMultipleOptionChange(["fontFamily", "fontSize"], () => this.measure()));
          }
          get hasValidSize() {
            return this.width > 0 && this.height > 0;
          }
          measure() {
            const e = this._measureStrategy.measure();
            e.width === this.width && e.height === this.height || (this.width = e.width, this.height = e.height, this._onCharSizeChange.fire());
          }
        };
        g = h([f(2, d.IOptionsService)], g), r.CharSizeService = g;
        class c {
          constructor(i, n, t) {
            this._document = i, this._parentElement = n, this._optionsService = t, this._result = { width: 0, height: 0 }, this._measureElement = this._document.createElement("span"), this._measureElement.classList.add("xterm-char-measure-element"), this._measureElement.textContent = "W", this._measureElement.setAttribute("aria-hidden", "true"), this._parentElement.appendChild(this._measureElement);
          }
          measure() {
            this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily, this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`;
            const i = this._measureElement.getBoundingClientRect();
            return i.width !== 0 && i.height !== 0 && (this._result.width = i.width, this._result.height = Math.ceil(i.height)), this._result;
          }
        }
      }, 4269: function(T, r, a) {
        var h = this && this.__decorate || function(i, n, t, s) {
          var l, _ = arguments.length, m = _ < 3 ? n : s === null ? s = Object.getOwnPropertyDescriptor(n, t) : s;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            m = Reflect.decorate(i, n, t, s);
          else
            for (var o = i.length - 1; o >= 0; o--)
              (l = i[o]) && (m = (_ < 3 ? l(m) : _ > 3 ? l(n, t, m) : l(n, t)) || m);
          return _ > 3 && m && Object.defineProperty(n, t, m), m;
        }, f = this && this.__param || function(i, n) {
          return function(t, s) {
            n(t, s, i);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CharacterJoinerService = r.JoinedCellData = void 0;
        const d = a(3734), u = a(643), b = a(511), g = a(2585);
        class c extends d.AttributeData {
          constructor(n, t, s) {
            super(), this.content = 0, this.combinedData = "", this.fg = n.fg, this.bg = n.bg, this.combinedData = t, this._width = s;
          }
          isCombined() {
            return 2097152;
          }
          getWidth() {
            return this._width;
          }
          getChars() {
            return this.combinedData;
          }
          getCode() {
            return 2097151;
          }
          setFromCharData(n) {
            throw new Error("not implemented");
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        r.JoinedCellData = c;
        let e = class tr {
          constructor(n) {
            this._bufferService = n, this._characterJoiners = [], this._nextCharacterJoinerId = 0, this._workCell = new b.CellData();
          }
          register(n) {
            const t = { id: this._nextCharacterJoinerId++, handler: n };
            return this._characterJoiners.push(t), t.id;
          }
          deregister(n) {
            for (let t = 0; t < this._characterJoiners.length; t++)
              if (this._characterJoiners[t].id === n)
                return this._characterJoiners.splice(t, 1), !0;
            return !1;
          }
          getJoinedCharacters(n) {
            if (this._characterJoiners.length === 0)
              return [];
            const t = this._bufferService.buffer.lines.get(n);
            if (!t || t.length === 0)
              return [];
            const s = [], l = t.translateToString(!0);
            let _ = 0, m = 0, o = 0, v = t.getFg(0), S = t.getBg(0);
            for (let y = 0; y < t.getTrimmedLength(); y++)
              if (t.loadCell(y, this._workCell), this._workCell.getWidth() !== 0) {
                if (this._workCell.fg !== v || this._workCell.bg !== S) {
                  if (y - _ > 1) {
                    const w = this._getJoinedRanges(l, o, m, t, _);
                    for (let L = 0; L < w.length; L++)
                      s.push(w[L]);
                  }
                  _ = y, o = m, v = this._workCell.fg, S = this._workCell.bg;
                }
                m += this._workCell.getChars().length || u.WHITESPACE_CELL_CHAR.length;
              }
            if (this._bufferService.cols - _ > 1) {
              const y = this._getJoinedRanges(l, o, m, t, _);
              for (let w = 0; w < y.length; w++)
                s.push(y[w]);
            }
            return s;
          }
          _getJoinedRanges(n, t, s, l, _) {
            const m = n.substring(t, s);
            let o = [];
            try {
              o = this._characterJoiners[0].handler(m);
            } catch (v) {
              console.error(v);
            }
            for (let v = 1; v < this._characterJoiners.length; v++)
              try {
                const S = this._characterJoiners[v].handler(m);
                for (let y = 0; y < S.length; y++)
                  tr._mergeRanges(o, S[y]);
              } catch (S) {
                console.error(S);
              }
            return this._stringRangesToCellRanges(o, l, _), o;
          }
          _stringRangesToCellRanges(n, t, s) {
            let l = 0, _ = !1, m = 0, o = n[l];
            if (o) {
              for (let v = s; v < this._bufferService.cols; v++) {
                const S = t.getWidth(v), y = t.getString(v).length || u.WHITESPACE_CELL_CHAR.length;
                if (S !== 0) {
                  if (!_ && o[0] <= m && (o[0] = v, _ = !0), o[1] <= m) {
                    if (o[1] = v, o = n[++l], !o)
                      break;
                    o[0] <= m ? (o[0] = v, _ = !0) : _ = !1;
                  }
                  m += y;
                }
              }
              o && (o[1] = this._bufferService.cols);
            }
          }
          static _mergeRanges(n, t) {
            let s = !1;
            for (let l = 0; l < n.length; l++) {
              const _ = n[l];
              if (s) {
                if (t[1] <= _[0])
                  return n[l - 1][1] = t[1], n;
                if (t[1] <= _[1])
                  return n[l - 1][1] = Math.max(t[1], _[1]), n.splice(l, 1), n;
                n.splice(l, 1), l--;
              } else {
                if (t[1] <= _[0])
                  return n.splice(l, 0, t), n;
                if (t[1] <= _[1])
                  return _[0] = Math.min(t[0], _[0]), n;
                t[0] < _[1] && (_[0] = Math.min(t[0], _[0]), s = !0);
              }
            }
            return s ? n[n.length - 1][1] = t[1] : n.push(t), n;
          }
        };
        e = h([f(0, g.IBufferService)], e), r.CharacterJoinerService = e;
      }, 5114: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreBrowserService = void 0, r.CoreBrowserService = class {
          constructor(a, h) {
            this._textarea = a, this.window = h, this._isFocused = !1, this._cachedIsFocused = void 0, this._textarea.addEventListener("focus", () => this._isFocused = !0), this._textarea.addEventListener("blur", () => this._isFocused = !1);
          }
          get dpr() {
            return this.window.devicePixelRatio;
          }
          get isFocused() {
            return this._cachedIsFocused === void 0 && (this._cachedIsFocused = this._isFocused && this._textarea.ownerDocument.hasFocus(), queueMicrotask(() => this._cachedIsFocused = void 0)), this._cachedIsFocused;
          }
        };
      }, 8934: function(T, r, a) {
        var h = this && this.__decorate || function(g, c, e, i) {
          var n, t = arguments.length, s = t < 3 ? c : i === null ? i = Object.getOwnPropertyDescriptor(c, e) : i;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            s = Reflect.decorate(g, c, e, i);
          else
            for (var l = g.length - 1; l >= 0; l--)
              (n = g[l]) && (s = (t < 3 ? n(s) : t > 3 ? n(c, e, s) : n(c, e)) || s);
          return t > 3 && s && Object.defineProperty(c, e, s), s;
        }, f = this && this.__param || function(g, c) {
          return function(e, i) {
            c(e, i, g);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.MouseService = void 0;
        const d = a(4725), u = a(9806);
        let b = class {
          constructor(g, c) {
            this._renderService = g, this._charSizeService = c;
          }
          getCoords(g, c, e, i, n) {
            return (0, u.getCoords)(window, g, c, e, i, this._charSizeService.hasValidSize, this._renderService.dimensions.css.cell.width, this._renderService.dimensions.css.cell.height, n);
          }
          getMouseReportCoords(g, c) {
            const e = (0, u.getCoordsRelativeToElement)(window, g, c);
            if (!(!this._charSizeService.hasValidSize || e[0] < 0 || e[1] < 0 || e[0] >= this._renderService.dimensions.css.canvas.width || e[1] >= this._renderService.dimensions.css.canvas.height))
              return { col: Math.floor(e[0] / this._renderService.dimensions.css.cell.width), row: Math.floor(e[1] / this._renderService.dimensions.css.cell.height), x: Math.floor(e[0]), y: Math.floor(e[1]) };
          }
        };
        b = h([f(0, d.IRenderService), f(1, d.ICharSizeService)], b), r.MouseService = b;
      }, 3230: function(T, r, a) {
        var h = this && this.__decorate || function(s, l, _, m) {
          var o, v = arguments.length, S = v < 3 ? l : m === null ? m = Object.getOwnPropertyDescriptor(l, _) : m;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            S = Reflect.decorate(s, l, _, m);
          else
            for (var y = s.length - 1; y >= 0; y--)
              (o = s[y]) && (S = (v < 3 ? o(S) : v > 3 ? o(l, _, S) : o(l, _)) || S);
          return v > 3 && S && Object.defineProperty(l, _, S), S;
        }, f = this && this.__param || function(s, l) {
          return function(_, m) {
            l(_, m, s);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.RenderService = void 0;
        const d = a(6193), u = a(8460), b = a(844), g = a(5596), c = a(3656), e = a(2585), i = a(4725), n = a(7226);
        let t = class extends b.Disposable {
          constructor(s, l, _, m, o, v, S, y) {
            if (super(), this._rowCount = s, this._charSizeService = m, this._pausedResizeTask = new n.DebouncedIdleTask(), this._isPaused = !1, this._needsFullRefresh = !1, this._isNextRenderRedrawOnly = !0, this._needsSelectionRefresh = !1, this._canvasWidth = 0, this._canvasHeight = 0, this._selectionState = { start: void 0, end: void 0, columnSelectMode: !1 }, this._onDimensionsChange = this.register(new u.EventEmitter()), this.onDimensionsChange = this._onDimensionsChange.event, this._onRenderedViewportChange = this.register(new u.EventEmitter()), this.onRenderedViewportChange = this._onRenderedViewportChange.event, this._onRender = this.register(new u.EventEmitter()), this.onRender = this._onRender.event, this._onRefreshRequest = this.register(new u.EventEmitter()), this.onRefreshRequest = this._onRefreshRequest.event, this.register({ dispose: () => {
              var w;
              return (w = this._renderer) === null || w === void 0 ? void 0 : w.dispose();
            } }), this._renderDebouncer = new d.RenderDebouncer(S.window, (w, L) => this._renderRows(w, L)), this.register(this._renderDebouncer), this._screenDprMonitor = new g.ScreenDprMonitor(S.window), this._screenDprMonitor.setListener(() => this.handleDevicePixelRatioChange()), this.register(this._screenDprMonitor), this.register(v.onResize(() => this._fullRefresh())), this.register(v.buffers.onBufferActivate(() => {
              var w;
              return (w = this._renderer) === null || w === void 0 ? void 0 : w.clear();
            })), this.register(_.onOptionChange(() => this._handleOptionsChanged())), this.register(this._charSizeService.onCharSizeChange(() => this.handleCharSizeChanged())), this.register(o.onDecorationRegistered(() => this._fullRefresh())), this.register(o.onDecorationRemoved(() => this._fullRefresh())), this.register(_.onMultipleOptionChange(["customGlyphs", "drawBoldTextInBrightColors", "letterSpacing", "lineHeight", "fontFamily", "fontSize", "fontWeight", "fontWeightBold", "minimumContrastRatio"], () => {
              this.clear(), this.handleResize(v.cols, v.rows), this._fullRefresh();
            })), this.register(_.onMultipleOptionChange(["cursorBlink", "cursorStyle"], () => this.refreshRows(v.buffer.y, v.buffer.y, !0))), this.register((0, c.addDisposableDomListener)(S.window, "resize", () => this.handleDevicePixelRatioChange())), this.register(y.onChangeColors(() => this._fullRefresh())), "IntersectionObserver" in S.window) {
              const w = new S.window.IntersectionObserver((L) => this._handleIntersectionChange(L[L.length - 1]), { threshold: 0 });
              w.observe(l), this.register({ dispose: () => w.disconnect() });
            }
          }
          get dimensions() {
            return this._renderer.dimensions;
          }
          _handleIntersectionChange(s) {
            this._isPaused = s.isIntersecting === void 0 ? s.intersectionRatio === 0 : !s.isIntersecting, this._isPaused || this._charSizeService.hasValidSize || this._charSizeService.measure(), !this._isPaused && this._needsFullRefresh && (this._pausedResizeTask.flush(), this.refreshRows(0, this._rowCount - 1), this._needsFullRefresh = !1);
          }
          refreshRows(s, l, _ = !1) {
            this._isPaused ? this._needsFullRefresh = !0 : (_ || (this._isNextRenderRedrawOnly = !1), this._renderDebouncer.refresh(s, l, this._rowCount));
          }
          _renderRows(s, l) {
            this._renderer && (this._renderer.renderRows(s, l), this._needsSelectionRefresh && (this._renderer.handleSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode), this._needsSelectionRefresh = !1), this._isNextRenderRedrawOnly || this._onRenderedViewportChange.fire({ start: s, end: l }), this._onRender.fire({ start: s, end: l }), this._isNextRenderRedrawOnly = !0);
          }
          resize(s, l) {
            this._rowCount = l, this._fireOnCanvasResize();
          }
          _handleOptionsChanged() {
            this._renderer && (this.refreshRows(0, this._rowCount - 1), this._fireOnCanvasResize());
          }
          _fireOnCanvasResize() {
            this._renderer && (this._renderer.dimensions.css.canvas.width === this._canvasWidth && this._renderer.dimensions.css.canvas.height === this._canvasHeight || this._onDimensionsChange.fire(this._renderer.dimensions));
          }
          hasRenderer() {
            return !!this._renderer;
          }
          setRenderer(s) {
            var l;
            (l = this._renderer) === null || l === void 0 || l.dispose(), this._renderer = s, this._renderer.onRequestRedraw((_) => this.refreshRows(_.start, _.end, !0)), this._needsSelectionRefresh = !0, this._fullRefresh();
          }
          addRefreshCallback(s) {
            return this._renderDebouncer.addRefreshCallback(s);
          }
          _fullRefresh() {
            this._isPaused ? this._needsFullRefresh = !0 : this.refreshRows(0, this._rowCount - 1);
          }
          clearTextureAtlas() {
            var s, l;
            this._renderer && ((l = (s = this._renderer).clearTextureAtlas) === null || l === void 0 || l.call(s), this._fullRefresh());
          }
          handleDevicePixelRatioChange() {
            this._charSizeService.measure(), this._renderer && (this._renderer.handleDevicePixelRatioChange(), this.refreshRows(0, this._rowCount - 1));
          }
          handleResize(s, l) {
            this._renderer && (this._isPaused ? this._pausedResizeTask.set(() => this._renderer.handleResize(s, l)) : this._renderer.handleResize(s, l), this._fullRefresh());
          }
          handleCharSizeChanged() {
            var s;
            (s = this._renderer) === null || s === void 0 || s.handleCharSizeChanged();
          }
          handleBlur() {
            var s;
            (s = this._renderer) === null || s === void 0 || s.handleBlur();
          }
          handleFocus() {
            var s;
            (s = this._renderer) === null || s === void 0 || s.handleFocus();
          }
          handleSelectionChanged(s, l, _) {
            var m;
            this._selectionState.start = s, this._selectionState.end = l, this._selectionState.columnSelectMode = _, (m = this._renderer) === null || m === void 0 || m.handleSelectionChanged(s, l, _);
          }
          handleCursorMove() {
            var s;
            (s = this._renderer) === null || s === void 0 || s.handleCursorMove();
          }
          clear() {
            var s;
            (s = this._renderer) === null || s === void 0 || s.clear();
          }
        };
        t = h([f(2, e.IOptionsService), f(3, i.ICharSizeService), f(4, e.IDecorationService), f(5, e.IBufferService), f(6, i.ICoreBrowserService), f(7, i.IThemeService)], t), r.RenderService = t;
      }, 9312: function(T, r, a) {
        var h = this && this.__decorate || function(o, v, S, y) {
          var w, L = arguments.length, M = L < 3 ? v : y === null ? y = Object.getOwnPropertyDescriptor(v, S) : y;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            M = Reflect.decorate(o, v, S, y);
          else
            for (var I = o.length - 1; I >= 0; I--)
              (w = o[I]) && (M = (L < 3 ? w(M) : L > 3 ? w(v, S, M) : w(v, S)) || M);
          return L > 3 && M && Object.defineProperty(v, S, M), M;
        }, f = this && this.__param || function(o, v) {
          return function(S, y) {
            v(S, y, o);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.SelectionService = void 0;
        const d = a(6114), u = a(456), b = a(511), g = a(8460), c = a(4725), e = a(2585), i = a(9806), n = a(9504), t = a(844), s = a(4841), l = String.fromCharCode(160), _ = new RegExp(l, "g");
        let m = class extends t.Disposable {
          constructor(o, v, S, y, w, L, M, I, W) {
            super(), this._element = o, this._screenElement = v, this._linkifier = S, this._bufferService = y, this._coreService = w, this._mouseService = L, this._optionsService = M, this._renderService = I, this._coreBrowserService = W, this._dragScrollAmount = 0, this._enabled = !0, this._workCell = new b.CellData(), this._mouseDownTimeStamp = 0, this._oldHasSelection = !1, this._oldSelectionStart = void 0, this._oldSelectionEnd = void 0, this._onLinuxMouseSelection = this.register(new g.EventEmitter()), this.onLinuxMouseSelection = this._onLinuxMouseSelection.event, this._onRedrawRequest = this.register(new g.EventEmitter()), this.onRequestRedraw = this._onRedrawRequest.event, this._onSelectionChange = this.register(new g.EventEmitter()), this.onSelectionChange = this._onSelectionChange.event, this._onRequestScrollLines = this.register(new g.EventEmitter()), this.onRequestScrollLines = this._onRequestScrollLines.event, this._mouseMoveListener = (p) => this._handleMouseMove(p), this._mouseUpListener = (p) => this._handleMouseUp(p), this._coreService.onUserInput(() => {
              this.hasSelection && this.clearSelection();
            }), this._trimListener = this._bufferService.buffer.lines.onTrim((p) => this._handleTrim(p)), this.register(this._bufferService.buffers.onBufferActivate((p) => this._handleBufferActivate(p))), this.enable(), this._model = new u.SelectionModel(this._bufferService), this._activeSelectionMode = 0, this.register((0, t.toDisposable)(() => {
              this._removeMouseDownListeners();
            }));
          }
          reset() {
            this.clearSelection();
          }
          disable() {
            this.clearSelection(), this._enabled = !1;
          }
          enable() {
            this._enabled = !0;
          }
          get selectionStart() {
            return this._model.finalSelectionStart;
          }
          get selectionEnd() {
            return this._model.finalSelectionEnd;
          }
          get hasSelection() {
            const o = this._model.finalSelectionStart, v = this._model.finalSelectionEnd;
            return !(!o || !v || o[0] === v[0] && o[1] === v[1]);
          }
          get selectionText() {
            const o = this._model.finalSelectionStart, v = this._model.finalSelectionEnd;
            if (!o || !v)
              return "";
            const S = this._bufferService.buffer, y = [];
            if (this._activeSelectionMode === 3) {
              if (o[0] === v[0])
                return "";
              const w = o[0] < v[0] ? o[0] : v[0], L = o[0] < v[0] ? v[0] : o[0];
              for (let M = o[1]; M <= v[1]; M++) {
                const I = S.translateBufferLineToString(M, !0, w, L);
                y.push(I);
              }
            } else {
              const w = o[1] === v[1] ? v[0] : void 0;
              y.push(S.translateBufferLineToString(o[1], !0, o[0], w));
              for (let L = o[1] + 1; L <= v[1] - 1; L++) {
                const M = S.lines.get(L), I = S.translateBufferLineToString(L, !0);
                M != null && M.isWrapped ? y[y.length - 1] += I : y.push(I);
              }
              if (o[1] !== v[1]) {
                const L = S.lines.get(v[1]), M = S.translateBufferLineToString(v[1], !0, 0, v[0]);
                L && L.isWrapped ? y[y.length - 1] += M : y.push(M);
              }
            }
            return y.map((w) => w.replace(_, " ")).join(d.isWindows ? `\r
` : `
`);
          }
          clearSelection() {
            this._model.clearSelection(), this._removeMouseDownListeners(), this.refresh(), this._onSelectionChange.fire();
          }
          refresh(o) {
            this._refreshAnimationFrame || (this._refreshAnimationFrame = this._coreBrowserService.window.requestAnimationFrame(() => this._refresh())), d.isLinux && o && this.selectionText.length && this._onLinuxMouseSelection.fire(this.selectionText);
          }
          _refresh() {
            this._refreshAnimationFrame = void 0, this._onRedrawRequest.fire({ start: this._model.finalSelectionStart, end: this._model.finalSelectionEnd, columnSelectMode: this._activeSelectionMode === 3 });
          }
          _isClickInSelection(o) {
            const v = this._getMouseBufferCoords(o), S = this._model.finalSelectionStart, y = this._model.finalSelectionEnd;
            return !!(S && y && v) && this._areCoordsInSelection(v, S, y);
          }
          isCellInSelection(o, v) {
            const S = this._model.finalSelectionStart, y = this._model.finalSelectionEnd;
            return !(!S || !y) && this._areCoordsInSelection([o, v], S, y);
          }
          _areCoordsInSelection(o, v, S) {
            return o[1] > v[1] && o[1] < S[1] || v[1] === S[1] && o[1] === v[1] && o[0] >= v[0] && o[0] < S[0] || v[1] < S[1] && o[1] === S[1] && o[0] < S[0] || v[1] < S[1] && o[1] === v[1] && o[0] >= v[0];
          }
          _selectWordAtCursor(o, v) {
            var S, y;
            const w = (y = (S = this._linkifier.currentLink) === null || S === void 0 ? void 0 : S.link) === null || y === void 0 ? void 0 : y.range;
            if (w)
              return this._model.selectionStart = [w.start.x - 1, w.start.y - 1], this._model.selectionStartLength = (0, s.getRangeLength)(w, this._bufferService.cols), this._model.selectionEnd = void 0, !0;
            const L = this._getMouseBufferCoords(o);
            return !!L && (this._selectWordAt(L, v), this._model.selectionEnd = void 0, !0);
          }
          selectAll() {
            this._model.isSelectAllActive = !0, this.refresh(), this._onSelectionChange.fire();
          }
          selectLines(o, v) {
            this._model.clearSelection(), o = Math.max(o, 0), v = Math.min(v, this._bufferService.buffer.lines.length - 1), this._model.selectionStart = [0, o], this._model.selectionEnd = [this._bufferService.cols, v], this.refresh(), this._onSelectionChange.fire();
          }
          _handleTrim(o) {
            this._model.handleTrim(o) && this.refresh();
          }
          _getMouseBufferCoords(o) {
            const v = this._mouseService.getCoords(o, this._screenElement, this._bufferService.cols, this._bufferService.rows, !0);
            if (v)
              return v[0]--, v[1]--, v[1] += this._bufferService.buffer.ydisp, v;
          }
          _getMouseEventScrollAmount(o) {
            let v = (0, i.getCoordsRelativeToElement)(this._coreBrowserService.window, o, this._screenElement)[1];
            const S = this._renderService.dimensions.css.canvas.height;
            return v >= 0 && v <= S ? 0 : (v > S && (v -= S), v = Math.min(Math.max(v, -50), 50), v /= 50, v / Math.abs(v) + Math.round(14 * v));
          }
          shouldForceSelection(o) {
            return d.isMac ? o.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection : o.shiftKey;
          }
          handleMouseDown(o) {
            if (this._mouseDownTimeStamp = o.timeStamp, (o.button !== 2 || !this.hasSelection) && o.button === 0) {
              if (!this._enabled) {
                if (!this.shouldForceSelection(o))
                  return;
                o.stopPropagation();
              }
              o.preventDefault(), this._dragScrollAmount = 0, this._enabled && o.shiftKey ? this._handleIncrementalClick(o) : o.detail === 1 ? this._handleSingleClick(o) : o.detail === 2 ? this._handleDoubleClick(o) : o.detail === 3 && this._handleTripleClick(o), this._addMouseDownListeners(), this.refresh(!0);
            }
          }
          _addMouseDownListeners() {
            this._screenElement.ownerDocument && (this._screenElement.ownerDocument.addEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.addEventListener("mouseup", this._mouseUpListener)), this._dragScrollIntervalTimer = this._coreBrowserService.window.setInterval(() => this._dragScroll(), 50);
          }
          _removeMouseDownListeners() {
            this._screenElement.ownerDocument && (this._screenElement.ownerDocument.removeEventListener("mousemove", this._mouseMoveListener), this._screenElement.ownerDocument.removeEventListener("mouseup", this._mouseUpListener)), this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer), this._dragScrollIntervalTimer = void 0;
          }
          _handleIncrementalClick(o) {
            this._model.selectionStart && (this._model.selectionEnd = this._getMouseBufferCoords(o));
          }
          _handleSingleClick(o) {
            if (this._model.selectionStartLength = 0, this._model.isSelectAllActive = !1, this._activeSelectionMode = this.shouldColumnSelect(o) ? 3 : 0, this._model.selectionStart = this._getMouseBufferCoords(o), !this._model.selectionStart)
              return;
            this._model.selectionEnd = void 0;
            const v = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
            v && v.length !== this._model.selectionStart[0] && v.hasWidth(this._model.selectionStart[0]) === 0 && this._model.selectionStart[0]++;
          }
          _handleDoubleClick(o) {
            this._selectWordAtCursor(o, !0) && (this._activeSelectionMode = 1);
          }
          _handleTripleClick(o) {
            const v = this._getMouseBufferCoords(o);
            v && (this._activeSelectionMode = 2, this._selectLineAt(v[1]));
          }
          shouldColumnSelect(o) {
            return o.altKey && !(d.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);
          }
          _handleMouseMove(o) {
            if (o.stopImmediatePropagation(), !this._model.selectionStart)
              return;
            const v = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
            if (this._model.selectionEnd = this._getMouseBufferCoords(o), !this._model.selectionEnd)
              return void this.refresh(!0);
            this._activeSelectionMode === 2 ? this._model.selectionEnd[1] < this._model.selectionStart[1] ? this._model.selectionEnd[0] = 0 : this._model.selectionEnd[0] = this._bufferService.cols : this._activeSelectionMode === 1 && this._selectToWordAt(this._model.selectionEnd), this._dragScrollAmount = this._getMouseEventScrollAmount(o), this._activeSelectionMode !== 3 && (this._dragScrollAmount > 0 ? this._model.selectionEnd[0] = this._bufferService.cols : this._dragScrollAmount < 0 && (this._model.selectionEnd[0] = 0));
            const S = this._bufferService.buffer;
            if (this._model.selectionEnd[1] < S.lines.length) {
              const y = S.lines.get(this._model.selectionEnd[1]);
              y && y.hasWidth(this._model.selectionEnd[0]) === 0 && this._model.selectionEnd[0]++;
            }
            v && v[0] === this._model.selectionEnd[0] && v[1] === this._model.selectionEnd[1] || this.refresh(!0);
          }
          _dragScroll() {
            if (this._model.selectionEnd && this._model.selectionStart && this._dragScrollAmount) {
              this._onRequestScrollLines.fire({ amount: this._dragScrollAmount, suppressScrollEvent: !1 });
              const o = this._bufferService.buffer;
              this._dragScrollAmount > 0 ? (this._activeSelectionMode !== 3 && (this._model.selectionEnd[0] = this._bufferService.cols), this._model.selectionEnd[1] = Math.min(o.ydisp + this._bufferService.rows, o.lines.length - 1)) : (this._activeSelectionMode !== 3 && (this._model.selectionEnd[0] = 0), this._model.selectionEnd[1] = o.ydisp), this.refresh();
            }
          }
          _handleMouseUp(o) {
            const v = o.timeStamp - this._mouseDownTimeStamp;
            if (this._removeMouseDownListeners(), this.selectionText.length <= 1 && v < 500 && o.altKey && this._optionsService.rawOptions.altClickMovesCursor) {
              if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
                const S = this._mouseService.getCoords(o, this._element, this._bufferService.cols, this._bufferService.rows, !1);
                if (S && S[0] !== void 0 && S[1] !== void 0) {
                  const y = (0, n.moveToCellSequence)(S[0] - 1, S[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
                  this._coreService.triggerDataEvent(y, !0);
                }
              }
            } else
              this._fireEventIfSelectionChanged();
          }
          _fireEventIfSelectionChanged() {
            const o = this._model.finalSelectionStart, v = this._model.finalSelectionEnd, S = !(!o || !v || o[0] === v[0] && o[1] === v[1]);
            S ? o && v && (this._oldSelectionStart && this._oldSelectionEnd && o[0] === this._oldSelectionStart[0] && o[1] === this._oldSelectionStart[1] && v[0] === this._oldSelectionEnd[0] && v[1] === this._oldSelectionEnd[1] || this._fireOnSelectionChange(o, v, S)) : this._oldHasSelection && this._fireOnSelectionChange(o, v, S);
          }
          _fireOnSelectionChange(o, v, S) {
            this._oldSelectionStart = o, this._oldSelectionEnd = v, this._oldHasSelection = S, this._onSelectionChange.fire();
          }
          _handleBufferActivate(o) {
            this.clearSelection(), this._trimListener.dispose(), this._trimListener = o.activeBuffer.lines.onTrim((v) => this._handleTrim(v));
          }
          _convertViewportColToCharacterIndex(o, v) {
            let S = v;
            for (let y = 0; v >= y; y++) {
              const w = o.loadCell(y, this._workCell).getChars().length;
              this._workCell.getWidth() === 0 ? S-- : w > 1 && v !== y && (S += w - 1);
            }
            return S;
          }
          setSelection(o, v, S) {
            this._model.clearSelection(), this._removeMouseDownListeners(), this._model.selectionStart = [o, v], this._model.selectionStartLength = S, this.refresh(), this._fireEventIfSelectionChanged();
          }
          rightClickSelect(o) {
            this._isClickInSelection(o) || (this._selectWordAtCursor(o, !1) && this.refresh(!0), this._fireEventIfSelectionChanged());
          }
          _getWordAt(o, v, S = !0, y = !0) {
            if (o[0] >= this._bufferService.cols)
              return;
            const w = this._bufferService.buffer, L = w.lines.get(o[1]);
            if (!L)
              return;
            const M = w.translateBufferLineToString(o[1], !1);
            let I = this._convertViewportColToCharacterIndex(L, o[0]), W = I;
            const p = o[0] - I;
            let C = 0, E = 0, R = 0, O = 0;
            if (M.charAt(I) === " ") {
              for (; I > 0 && M.charAt(I - 1) === " "; )
                I--;
              for (; W < M.length && M.charAt(W + 1) === " "; )
                W++;
            } else {
              let P = o[0], G = o[0];
              L.getWidth(P) === 0 && (C++, P--), L.getWidth(G) === 2 && (E++, G++);
              const B = L.getString(G).length;
              for (B > 1 && (O += B - 1, W += B - 1); P > 0 && I > 0 && !this._isCharWordSeparator(L.loadCell(P - 1, this._workCell)); ) {
                L.loadCell(P - 1, this._workCell);
                const k = this._workCell.getChars().length;
                this._workCell.getWidth() === 0 ? (C++, P--) : k > 1 && (R += k - 1, I -= k - 1), I--, P--;
              }
              for (; G < L.length && W + 1 < M.length && !this._isCharWordSeparator(L.loadCell(G + 1, this._workCell)); ) {
                L.loadCell(G + 1, this._workCell);
                const k = this._workCell.getChars().length;
                this._workCell.getWidth() === 2 ? (E++, G++) : k > 1 && (O += k - 1, W += k - 1), W++, G++;
              }
            }
            W++;
            let F = I + p - C + R, Y = Math.min(this._bufferService.cols, W - I + C + E - R - O);
            if (v || M.slice(I, W).trim() !== "") {
              if (S && F === 0 && L.getCodePoint(0) !== 32) {
                const P = w.lines.get(o[1] - 1);
                if (P && L.isWrapped && P.getCodePoint(this._bufferService.cols - 1) !== 32) {
                  const G = this._getWordAt([this._bufferService.cols - 1, o[1] - 1], !1, !0, !1);
                  if (G) {
                    const B = this._bufferService.cols - G.start;
                    F -= B, Y += B;
                  }
                }
              }
              if (y && F + Y === this._bufferService.cols && L.getCodePoint(this._bufferService.cols - 1) !== 32) {
                const P = w.lines.get(o[1] + 1);
                if (P != null && P.isWrapped && P.getCodePoint(0) !== 32) {
                  const G = this._getWordAt([0, o[1] + 1], !1, !1, !0);
                  G && (Y += G.length);
                }
              }
              return { start: F, length: Y };
            }
          }
          _selectWordAt(o, v) {
            const S = this._getWordAt(o, v);
            if (S) {
              for (; S.start < 0; )
                S.start += this._bufferService.cols, o[1]--;
              this._model.selectionStart = [S.start, o[1]], this._model.selectionStartLength = S.length;
            }
          }
          _selectToWordAt(o) {
            const v = this._getWordAt(o, !0);
            if (v) {
              let S = o[1];
              for (; v.start < 0; )
                v.start += this._bufferService.cols, S--;
              if (!this._model.areSelectionValuesReversed())
                for (; v.start + v.length > this._bufferService.cols; )
                  v.length -= this._bufferService.cols, S++;
              this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? v.start : v.start + v.length, S];
            }
          }
          _isCharWordSeparator(o) {
            return o.getWidth() !== 0 && this._optionsService.rawOptions.wordSeparator.indexOf(o.getChars()) >= 0;
          }
          _selectLineAt(o) {
            const v = this._bufferService.buffer.getWrappedRangeForLine(o), S = { start: { x: 0, y: v.first }, end: { x: this._bufferService.cols - 1, y: v.last } };
            this._model.selectionStart = [0, v.first], this._model.selectionEnd = void 0, this._model.selectionStartLength = (0, s.getRangeLength)(S, this._bufferService.cols);
          }
        };
        m = h([f(3, e.IBufferService), f(4, e.ICoreService), f(5, c.IMouseService), f(6, e.IOptionsService), f(7, c.IRenderService), f(8, c.ICoreBrowserService)], m), r.SelectionService = m;
      }, 4725: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.IThemeService = r.ICharacterJoinerService = r.ISelectionService = r.IRenderService = r.IMouseService = r.ICoreBrowserService = r.ICharSizeService = void 0;
        const h = a(8343);
        r.ICharSizeService = (0, h.createDecorator)("CharSizeService"), r.ICoreBrowserService = (0, h.createDecorator)("CoreBrowserService"), r.IMouseService = (0, h.createDecorator)("MouseService"), r.IRenderService = (0, h.createDecorator)("RenderService"), r.ISelectionService = (0, h.createDecorator)("SelectionService"), r.ICharacterJoinerService = (0, h.createDecorator)("CharacterJoinerService"), r.IThemeService = (0, h.createDecorator)("ThemeService");
      }, 6731: function(T, r, a) {
        var h = this && this.__decorate || function(m, o, v, S) {
          var y, w = arguments.length, L = w < 3 ? o : S === null ? S = Object.getOwnPropertyDescriptor(o, v) : S;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            L = Reflect.decorate(m, o, v, S);
          else
            for (var M = m.length - 1; M >= 0; M--)
              (y = m[M]) && (L = (w < 3 ? y(L) : w > 3 ? y(o, v, L) : y(o, v)) || L);
          return w > 3 && L && Object.defineProperty(o, v, L), L;
        }, f = this && this.__param || function(m, o) {
          return function(v, S) {
            o(v, S, m);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ThemeService = r.DEFAULT_ANSI_COLORS = void 0;
        const d = a(7239), u = a(8055), b = a(8460), g = a(844), c = a(2585), e = u.css.toColor("#ffffff"), i = u.css.toColor("#000000"), n = u.css.toColor("#ffffff"), t = u.css.toColor("#000000"), s = { css: "rgba(255, 255, 255, 0.3)", rgba: 4294967117 };
        r.DEFAULT_ANSI_COLORS = Object.freeze((() => {
          const m = [u.css.toColor("#2e3436"), u.css.toColor("#cc0000"), u.css.toColor("#4e9a06"), u.css.toColor("#c4a000"), u.css.toColor("#3465a4"), u.css.toColor("#75507b"), u.css.toColor("#06989a"), u.css.toColor("#d3d7cf"), u.css.toColor("#555753"), u.css.toColor("#ef2929"), u.css.toColor("#8ae234"), u.css.toColor("#fce94f"), u.css.toColor("#729fcf"), u.css.toColor("#ad7fa8"), u.css.toColor("#34e2e2"), u.css.toColor("#eeeeec")], o = [0, 95, 135, 175, 215, 255];
          for (let v = 0; v < 216; v++) {
            const S = o[v / 36 % 6 | 0], y = o[v / 6 % 6 | 0], w = o[v % 6];
            m.push({ css: u.channels.toCss(S, y, w), rgba: u.channels.toRgba(S, y, w) });
          }
          for (let v = 0; v < 24; v++) {
            const S = 8 + 10 * v;
            m.push({ css: u.channels.toCss(S, S, S), rgba: u.channels.toRgba(S, S, S) });
          }
          return m;
        })());
        let l = class extends g.Disposable {
          constructor(m) {
            super(), this._optionsService = m, this._onChangeColors = this.register(new b.EventEmitter()), this.onChangeColors = this._onChangeColors.event, this._contrastCache = new d.ColorContrastCache(), this._colors = { foreground: e, background: i, cursor: n, cursorAccent: t, selectionForeground: void 0, selectionBackgroundTransparent: s, selectionBackgroundOpaque: u.color.blend(i, s), selectionInactiveBackgroundTransparent: s, selectionInactiveBackgroundOpaque: u.color.blend(i, s), ansi: r.DEFAULT_ANSI_COLORS.slice(), contrastCache: this._contrastCache }, this._updateRestoreColors(), this._setTheme(this._optionsService.rawOptions.theme), this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio", () => this._contrastCache.clear())), this.register(this._optionsService.onSpecificOptionChange("theme", () => this._setTheme(this._optionsService.rawOptions.theme)));
          }
          get colors() {
            return this._colors;
          }
          _setTheme(m = {}) {
            const o = this._colors;
            if (o.foreground = _(m.foreground, e), o.background = _(m.background, i), o.cursor = _(m.cursor, n), o.cursorAccent = _(m.cursorAccent, t), o.selectionBackgroundTransparent = _(m.selectionBackground, s), o.selectionBackgroundOpaque = u.color.blend(o.background, o.selectionBackgroundTransparent), o.selectionInactiveBackgroundTransparent = _(m.selectionInactiveBackground, o.selectionBackgroundTransparent), o.selectionInactiveBackgroundOpaque = u.color.blend(o.background, o.selectionInactiveBackgroundTransparent), o.selectionForeground = m.selectionForeground ? _(m.selectionForeground, u.NULL_COLOR) : void 0, o.selectionForeground === u.NULL_COLOR && (o.selectionForeground = void 0), u.color.isOpaque(o.selectionBackgroundTransparent) && (o.selectionBackgroundTransparent = u.color.opacity(o.selectionBackgroundTransparent, 0.3)), u.color.isOpaque(o.selectionInactiveBackgroundTransparent) && (o.selectionInactiveBackgroundTransparent = u.color.opacity(o.selectionInactiveBackgroundTransparent, 0.3)), o.ansi = r.DEFAULT_ANSI_COLORS.slice(), o.ansi[0] = _(m.black, r.DEFAULT_ANSI_COLORS[0]), o.ansi[1] = _(m.red, r.DEFAULT_ANSI_COLORS[1]), o.ansi[2] = _(m.green, r.DEFAULT_ANSI_COLORS[2]), o.ansi[3] = _(m.yellow, r.DEFAULT_ANSI_COLORS[3]), o.ansi[4] = _(m.blue, r.DEFAULT_ANSI_COLORS[4]), o.ansi[5] = _(m.magenta, r.DEFAULT_ANSI_COLORS[5]), o.ansi[6] = _(m.cyan, r.DEFAULT_ANSI_COLORS[6]), o.ansi[7] = _(m.white, r.DEFAULT_ANSI_COLORS[7]), o.ansi[8] = _(m.brightBlack, r.DEFAULT_ANSI_COLORS[8]), o.ansi[9] = _(m.brightRed, r.DEFAULT_ANSI_COLORS[9]), o.ansi[10] = _(m.brightGreen, r.DEFAULT_ANSI_COLORS[10]), o.ansi[11] = _(m.brightYellow, r.DEFAULT_ANSI_COLORS[11]), o.ansi[12] = _(m.brightBlue, r.DEFAULT_ANSI_COLORS[12]), o.ansi[13] = _(m.brightMagenta, r.DEFAULT_ANSI_COLORS[13]), o.ansi[14] = _(m.brightCyan, r.DEFAULT_ANSI_COLORS[14]), o.ansi[15] = _(m.brightWhite, r.DEFAULT_ANSI_COLORS[15]), m.extendedAnsi) {
              const v = Math.min(o.ansi.length - 16, m.extendedAnsi.length);
              for (let S = 0; S < v; S++)
                o.ansi[S + 16] = _(m.extendedAnsi[S], r.DEFAULT_ANSI_COLORS[S + 16]);
            }
            this._contrastCache.clear(), this._updateRestoreColors(), this._onChangeColors.fire(this.colors);
          }
          restoreColor(m) {
            this._restoreColor(m), this._onChangeColors.fire(this.colors);
          }
          _restoreColor(m) {
            if (m !== void 0)
              switch (m) {
                case 256:
                  this._colors.foreground = this._restoreColors.foreground;
                  break;
                case 257:
                  this._colors.background = this._restoreColors.background;
                  break;
                case 258:
                  this._colors.cursor = this._restoreColors.cursor;
                  break;
                default:
                  this._colors.ansi[m] = this._restoreColors.ansi[m];
              }
            else
              for (let o = 0; o < this._restoreColors.ansi.length; ++o)
                this._colors.ansi[o] = this._restoreColors.ansi[o];
          }
          modifyColors(m) {
            m(this._colors), this._onChangeColors.fire(this.colors);
          }
          _updateRestoreColors() {
            this._restoreColors = { foreground: this._colors.foreground, background: this._colors.background, cursor: this._colors.cursor, ansi: this._colors.ansi.slice() };
          }
        };
        function _(m, o) {
          if (m !== void 0)
            try {
              return u.css.toColor(m);
            } catch {
            }
          return o;
        }
        l = h([f(0, c.IOptionsService)], l), r.ThemeService = l;
      }, 6349: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CircularList = void 0;
        const h = a(8460), f = a(844);
        class d extends f.Disposable {
          constructor(b) {
            super(), this._maxLength = b, this.onDeleteEmitter = this.register(new h.EventEmitter()), this.onDelete = this.onDeleteEmitter.event, this.onInsertEmitter = this.register(new h.EventEmitter()), this.onInsert = this.onInsertEmitter.event, this.onTrimEmitter = this.register(new h.EventEmitter()), this.onTrim = this.onTrimEmitter.event, this._array = new Array(this._maxLength), this._startIndex = 0, this._length = 0;
          }
          get maxLength() {
            return this._maxLength;
          }
          set maxLength(b) {
            if (this._maxLength === b)
              return;
            const g = new Array(b);
            for (let c = 0; c < Math.min(b, this.length); c++)
              g[c] = this._array[this._getCyclicIndex(c)];
            this._array = g, this._maxLength = b, this._startIndex = 0;
          }
          get length() {
            return this._length;
          }
          set length(b) {
            if (b > this._length)
              for (let g = this._length; g < b; g++)
                this._array[g] = void 0;
            this._length = b;
          }
          get(b) {
            return this._array[this._getCyclicIndex(b)];
          }
          set(b, g) {
            this._array[this._getCyclicIndex(b)] = g;
          }
          push(b) {
            this._array[this._getCyclicIndex(this._length)] = b, this._length === this._maxLength ? (this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1)) : this._length++;
          }
          recycle() {
            if (this._length !== this._maxLength)
              throw new Error("Can only recycle when the buffer is full");
            return this._startIndex = ++this._startIndex % this._maxLength, this.onTrimEmitter.fire(1), this._array[this._getCyclicIndex(this._length - 1)];
          }
          get isFull() {
            return this._length === this._maxLength;
          }
          pop() {
            return this._array[this._getCyclicIndex(this._length-- - 1)];
          }
          splice(b, g, ...c) {
            if (g) {
              for (let e = b; e < this._length - g; e++)
                this._array[this._getCyclicIndex(e)] = this._array[this._getCyclicIndex(e + g)];
              this._length -= g, this.onDeleteEmitter.fire({ index: b, amount: g });
            }
            for (let e = this._length - 1; e >= b; e--)
              this._array[this._getCyclicIndex(e + c.length)] = this._array[this._getCyclicIndex(e)];
            for (let e = 0; e < c.length; e++)
              this._array[this._getCyclicIndex(b + e)] = c[e];
            if (c.length && this.onInsertEmitter.fire({ index: b, amount: c.length }), this._length + c.length > this._maxLength) {
              const e = this._length + c.length - this._maxLength;
              this._startIndex += e, this._length = this._maxLength, this.onTrimEmitter.fire(e);
            } else
              this._length += c.length;
          }
          trimStart(b) {
            b > this._length && (b = this._length), this._startIndex += b, this._length -= b, this.onTrimEmitter.fire(b);
          }
          shiftElements(b, g, c) {
            if (!(g <= 0)) {
              if (b < 0 || b >= this._length)
                throw new Error("start argument out of range");
              if (b + c < 0)
                throw new Error("Cannot shift elements in list beyond index 0");
              if (c > 0) {
                for (let i = g - 1; i >= 0; i--)
                  this.set(b + i + c, this.get(b + i));
                const e = b + g + c - this._length;
                if (e > 0)
                  for (this._length += e; this._length > this._maxLength; )
                    this._length--, this._startIndex++, this.onTrimEmitter.fire(1);
              } else
                for (let e = 0; e < g; e++)
                  this.set(b + e + c, this.get(b + e));
            }
          }
          _getCyclicIndex(b) {
            return (this._startIndex + b) % this._maxLength;
          }
        }
        r.CircularList = d;
      }, 1439: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.clone = void 0, r.clone = function a(h, f = 5) {
          if (typeof h != "object")
            return h;
          const d = Array.isArray(h) ? [] : {};
          for (const u in h)
            d[u] = f <= 1 ? h[u] : h[u] && a(h[u], f - 1);
          return d;
        };
      }, 8055: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.contrastRatio = r.toPaddedHex = r.rgba = r.rgb = r.css = r.color = r.channels = r.NULL_COLOR = void 0;
        const h = a(6114);
        let f = 0, d = 0, u = 0, b = 0;
        var g, c, e;
        function i(t) {
          const s = t.toString(16);
          return s.length < 2 ? "0" + s : s;
        }
        function n(t, s) {
          return t < s ? (s + 0.05) / (t + 0.05) : (t + 0.05) / (s + 0.05);
        }
        r.NULL_COLOR = { css: "#00000000", rgba: 0 }, function(t) {
          t.toCss = function(s, l, _, m) {
            return m !== void 0 ? `#${i(s)}${i(l)}${i(_)}${i(m)}` : `#${i(s)}${i(l)}${i(_)}`;
          }, t.toRgba = function(s, l, _, m = 255) {
            return (s << 24 | l << 16 | _ << 8 | m) >>> 0;
          };
        }(g = r.channels || (r.channels = {})), function(t) {
          function s(l, _) {
            return b = Math.round(255 * _), [f, d, u] = e.toChannels(l.rgba), { css: g.toCss(f, d, u, b), rgba: g.toRgba(f, d, u, b) };
          }
          t.blend = function(l, _) {
            if (b = (255 & _.rgba) / 255, b === 1)
              return { css: _.css, rgba: _.rgba };
            const m = _.rgba >> 24 & 255, o = _.rgba >> 16 & 255, v = _.rgba >> 8 & 255, S = l.rgba >> 24 & 255, y = l.rgba >> 16 & 255, w = l.rgba >> 8 & 255;
            return f = S + Math.round((m - S) * b), d = y + Math.round((o - y) * b), u = w + Math.round((v - w) * b), { css: g.toCss(f, d, u), rgba: g.toRgba(f, d, u) };
          }, t.isOpaque = function(l) {
            return (255 & l.rgba) == 255;
          }, t.ensureContrastRatio = function(l, _, m) {
            const o = e.ensureContrastRatio(l.rgba, _.rgba, m);
            if (o)
              return e.toColor(o >> 24 & 255, o >> 16 & 255, o >> 8 & 255);
          }, t.opaque = function(l) {
            const _ = (255 | l.rgba) >>> 0;
            return [f, d, u] = e.toChannels(_), { css: g.toCss(f, d, u), rgba: _ };
          }, t.opacity = s, t.multiplyOpacity = function(l, _) {
            return b = 255 & l.rgba, s(l, b * _ / 255);
          }, t.toColorRGB = function(l) {
            return [l.rgba >> 24 & 255, l.rgba >> 16 & 255, l.rgba >> 8 & 255];
          };
        }(r.color || (r.color = {})), function(t) {
          let s, l;
          if (!h.isNode) {
            const _ = document.createElement("canvas");
            _.width = 1, _.height = 1;
            const m = _.getContext("2d", { willReadFrequently: !0 });
            m && (s = m, s.globalCompositeOperation = "copy", l = s.createLinearGradient(0, 0, 1, 1));
          }
          t.toColor = function(_) {
            if (_.match(/#[\da-f]{3,8}/i))
              switch (_.length) {
                case 4:
                  return f = parseInt(_.slice(1, 2).repeat(2), 16), d = parseInt(_.slice(2, 3).repeat(2), 16), u = parseInt(_.slice(3, 4).repeat(2), 16), e.toColor(f, d, u);
                case 5:
                  return f = parseInt(_.slice(1, 2).repeat(2), 16), d = parseInt(_.slice(2, 3).repeat(2), 16), u = parseInt(_.slice(3, 4).repeat(2), 16), b = parseInt(_.slice(4, 5).repeat(2), 16), e.toColor(f, d, u, b);
                case 7:
                  return { css: _, rgba: (parseInt(_.slice(1), 16) << 8 | 255) >>> 0 };
                case 9:
                  return { css: _, rgba: parseInt(_.slice(1), 16) >>> 0 };
              }
            const m = _.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);
            if (m)
              return f = parseInt(m[1]), d = parseInt(m[2]), u = parseInt(m[3]), b = Math.round(255 * (m[5] === void 0 ? 1 : parseFloat(m[5]))), e.toColor(f, d, u, b);
            if (!s || !l)
              throw new Error("css.toColor: Unsupported css format");
            if (s.fillStyle = l, s.fillStyle = _, typeof s.fillStyle != "string")
              throw new Error("css.toColor: Unsupported css format");
            if (s.fillRect(0, 0, 1, 1), [f, d, u, b] = s.getImageData(0, 0, 1, 1).data, b !== 255)
              throw new Error("css.toColor: Unsupported css format");
            return { rgba: g.toRgba(f, d, u, b), css: _ };
          };
        }(r.css || (r.css = {})), function(t) {
          function s(l, _, m) {
            const o = l / 255, v = _ / 255, S = m / 255;
            return 0.2126 * (o <= 0.03928 ? o / 12.92 : Math.pow((o + 0.055) / 1.055, 2.4)) + 0.7152 * (v <= 0.03928 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4)) + 0.0722 * (S <= 0.03928 ? S / 12.92 : Math.pow((S + 0.055) / 1.055, 2.4));
          }
          t.relativeLuminance = function(l) {
            return s(l >> 16 & 255, l >> 8 & 255, 255 & l);
          }, t.relativeLuminance2 = s;
        }(c = r.rgb || (r.rgb = {})), function(t) {
          function s(_, m, o) {
            const v = _ >> 24 & 255, S = _ >> 16 & 255, y = _ >> 8 & 255;
            let w = m >> 24 & 255, L = m >> 16 & 255, M = m >> 8 & 255, I = n(c.relativeLuminance2(w, L, M), c.relativeLuminance2(v, S, y));
            for (; I < o && (w > 0 || L > 0 || M > 0); )
              w -= Math.max(0, Math.ceil(0.1 * w)), L -= Math.max(0, Math.ceil(0.1 * L)), M -= Math.max(0, Math.ceil(0.1 * M)), I = n(c.relativeLuminance2(w, L, M), c.relativeLuminance2(v, S, y));
            return (w << 24 | L << 16 | M << 8 | 255) >>> 0;
          }
          function l(_, m, o) {
            const v = _ >> 24 & 255, S = _ >> 16 & 255, y = _ >> 8 & 255;
            let w = m >> 24 & 255, L = m >> 16 & 255, M = m >> 8 & 255, I = n(c.relativeLuminance2(w, L, M), c.relativeLuminance2(v, S, y));
            for (; I < o && (w < 255 || L < 255 || M < 255); )
              w = Math.min(255, w + Math.ceil(0.1 * (255 - w))), L = Math.min(255, L + Math.ceil(0.1 * (255 - L))), M = Math.min(255, M + Math.ceil(0.1 * (255 - M))), I = n(c.relativeLuminance2(w, L, M), c.relativeLuminance2(v, S, y));
            return (w << 24 | L << 16 | M << 8 | 255) >>> 0;
          }
          t.ensureContrastRatio = function(_, m, o) {
            const v = c.relativeLuminance(_ >> 8), S = c.relativeLuminance(m >> 8);
            if (n(v, S) < o) {
              if (S < v) {
                const L = s(_, m, o), M = n(v, c.relativeLuminance(L >> 8));
                if (M < o) {
                  const I = l(_, m, o);
                  return M > n(v, c.relativeLuminance(I >> 8)) ? L : I;
                }
                return L;
              }
              const y = l(_, m, o), w = n(v, c.relativeLuminance(y >> 8));
              if (w < o) {
                const L = s(_, m, o);
                return w > n(v, c.relativeLuminance(L >> 8)) ? y : L;
              }
              return y;
            }
          }, t.reduceLuminance = s, t.increaseLuminance = l, t.toChannels = function(_) {
            return [_ >> 24 & 255, _ >> 16 & 255, _ >> 8 & 255, 255 & _];
          }, t.toColor = function(_, m, o, v) {
            return { css: g.toCss(_, m, o, v), rgba: g.toRgba(_, m, o, v) };
          };
        }(e = r.rgba || (r.rgba = {})), r.toPaddedHex = i, r.contrastRatio = n;
      }, 8969: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreTerminal = void 0;
        const h = a(844), f = a(2585), d = a(4348), u = a(7866), b = a(744), g = a(7302), c = a(6975), e = a(8460), i = a(1753), n = a(1480), t = a(7994), s = a(9282), l = a(5435), _ = a(5981), m = a(2660);
        let o = !1;
        class v extends h.Disposable {
          constructor(y) {
            super(), this._onBinary = this.register(new e.EventEmitter()), this.onBinary = this._onBinary.event, this._onData = this.register(new e.EventEmitter()), this.onData = this._onData.event, this._onLineFeed = this.register(new e.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onResize = this.register(new e.EventEmitter()), this.onResize = this._onResize.event, this._onWriteParsed = this.register(new e.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event, this._onScroll = this.register(new e.EventEmitter()), this._instantiationService = new d.InstantiationService(), this.optionsService = this.register(new g.OptionsService(y)), this._instantiationService.setService(f.IOptionsService, this.optionsService), this._bufferService = this.register(this._instantiationService.createInstance(b.BufferService)), this._instantiationService.setService(f.IBufferService, this._bufferService), this._logService = this.register(this._instantiationService.createInstance(u.LogService)), this._instantiationService.setService(f.ILogService, this._logService), this.coreService = this.register(this._instantiationService.createInstance(c.CoreService)), this._instantiationService.setService(f.ICoreService, this.coreService), this.coreMouseService = this.register(this._instantiationService.createInstance(i.CoreMouseService)), this._instantiationService.setService(f.ICoreMouseService, this.coreMouseService), this.unicodeService = this.register(this._instantiationService.createInstance(n.UnicodeService)), this._instantiationService.setService(f.IUnicodeService, this.unicodeService), this._charsetService = this._instantiationService.createInstance(t.CharsetService), this._instantiationService.setService(f.ICharsetService, this._charsetService), this._oscLinkService = this._instantiationService.createInstance(m.OscLinkService), this._instantiationService.setService(f.IOscLinkService, this._oscLinkService), this._inputHandler = this.register(new l.InputHandler(this._bufferService, this._charsetService, this.coreService, this._logService, this.optionsService, this._oscLinkService, this.coreMouseService, this.unicodeService)), this.register((0, e.forwardEvent)(this._inputHandler.onLineFeed, this._onLineFeed)), this.register(this._inputHandler), this.register((0, e.forwardEvent)(this._bufferService.onResize, this._onResize)), this.register((0, e.forwardEvent)(this.coreService.onData, this._onData)), this.register((0, e.forwardEvent)(this.coreService.onBinary, this._onBinary)), this.register(this.coreService.onRequestScrollToBottom(() => this.scrollToBottom())), this.register(this.coreService.onUserInput(() => this._writeBuffer.handleUserInput())), this.register(this.optionsService.onSpecificOptionChange("windowsMode", (w) => this._handleWindowsModeOptionChange(w))), this.register(this._bufferService.onScroll((w) => {
              this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
            })), this.register(this._inputHandler.onScroll((w) => {
              this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: 0 }), this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
            })), this._writeBuffer = this.register(new _.WriteBuffer((w, L) => this._inputHandler.parse(w, L))), this.register((0, e.forwardEvent)(this._writeBuffer.onWriteParsed, this._onWriteParsed)), this.register((0, h.toDisposable)(() => {
              var w;
              (w = this._windowsMode) === null || w === void 0 || w.dispose(), this._windowsMode = void 0;
            }));
          }
          get onScroll() {
            return this._onScrollApi || (this._onScrollApi = this.register(new e.EventEmitter()), this._onScroll.event((y) => {
              var w;
              (w = this._onScrollApi) === null || w === void 0 || w.fire(y.position);
            })), this._onScrollApi.event;
          }
          get cols() {
            return this._bufferService.cols;
          }
          get rows() {
            return this._bufferService.rows;
          }
          get buffers() {
            return this._bufferService.buffers;
          }
          get options() {
            return this.optionsService.options;
          }
          set options(y) {
            for (const w in y)
              this.optionsService.options[w] = y[w];
          }
          write(y, w) {
            this._writeBuffer.write(y, w);
          }
          writeSync(y, w) {
            this._logService.logLevel <= f.LogLevelEnum.WARN && !o && (this._logService.warn("writeSync is unreliable and will be removed soon."), o = !0), this._writeBuffer.writeSync(y, w);
          }
          resize(y, w) {
            isNaN(y) || isNaN(w) || (y = Math.max(y, b.MINIMUM_COLS), w = Math.max(w, b.MINIMUM_ROWS), this._bufferService.resize(y, w));
          }
          scroll(y, w = !1) {
            this._bufferService.scroll(y, w);
          }
          scrollLines(y, w, L) {
            this._bufferService.scrollLines(y, w, L);
          }
          scrollPages(y) {
            this._bufferService.scrollPages(y);
          }
          scrollToTop() {
            this._bufferService.scrollToTop();
          }
          scrollToBottom() {
            this._bufferService.scrollToBottom();
          }
          scrollToLine(y) {
            this._bufferService.scrollToLine(y);
          }
          registerEscHandler(y, w) {
            return this._inputHandler.registerEscHandler(y, w);
          }
          registerDcsHandler(y, w) {
            return this._inputHandler.registerDcsHandler(y, w);
          }
          registerCsiHandler(y, w) {
            return this._inputHandler.registerCsiHandler(y, w);
          }
          registerOscHandler(y, w) {
            return this._inputHandler.registerOscHandler(y, w);
          }
          _setup() {
            this.optionsService.rawOptions.windowsMode && this._enableWindowsMode();
          }
          reset() {
            this._inputHandler.reset(), this._bufferService.reset(), this._charsetService.reset(), this.coreService.reset(), this.coreMouseService.reset();
          }
          _handleWindowsModeOptionChange(y) {
            var w;
            y ? this._enableWindowsMode() : ((w = this._windowsMode) === null || w === void 0 || w.dispose(), this._windowsMode = void 0);
          }
          _enableWindowsMode() {
            if (!this._windowsMode) {
              const y = [];
              y.push(this.onLineFeed(s.updateWindowsModeWrappedState.bind(null, this._bufferService))), y.push(this.registerCsiHandler({ final: "H" }, () => ((0, s.updateWindowsModeWrappedState)(this._bufferService), !1))), this._windowsMode = { dispose: () => {
                for (const w of y)
                  w.dispose();
              } };
            }
          }
        }
        r.CoreTerminal = v;
      }, 8460: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.forwardEvent = r.EventEmitter = void 0, r.EventEmitter = class {
          constructor() {
            this._listeners = [], this._disposed = !1;
          }
          get event() {
            return this._event || (this._event = (a) => (this._listeners.push(a), { dispose: () => {
              if (!this._disposed) {
                for (let h = 0; h < this._listeners.length; h++)
                  if (this._listeners[h] === a)
                    return void this._listeners.splice(h, 1);
              }
            } })), this._event;
          }
          fire(a, h) {
            const f = [];
            for (let d = 0; d < this._listeners.length; d++)
              f.push(this._listeners[d]);
            for (let d = 0; d < f.length; d++)
              f[d].call(void 0, a, h);
          }
          dispose() {
            this._listeners && (this._listeners.length = 0), this._disposed = !0;
          }
        }, r.forwardEvent = function(a, h) {
          return a((f) => h.fire(f));
        };
      }, 5435: function(T, r, a) {
        var h = this && this.__decorate || function(W, p, C, E) {
          var R, O = arguments.length, F = O < 3 ? p : E === null ? E = Object.getOwnPropertyDescriptor(p, C) : E;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            F = Reflect.decorate(W, p, C, E);
          else
            for (var Y = W.length - 1; Y >= 0; Y--)
              (R = W[Y]) && (F = (O < 3 ? R(F) : O > 3 ? R(p, C, F) : R(p, C)) || F);
          return O > 3 && F && Object.defineProperty(p, C, F), F;
        }, f = this && this.__param || function(W, p) {
          return function(C, E) {
            p(C, E, W);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.InputHandler = r.WindowsOptionsReportType = void 0;
        const d = a(2584), u = a(7116), b = a(2015), g = a(844), c = a(482), e = a(8437), i = a(8460), n = a(643), t = a(511), s = a(3734), l = a(2585), _ = a(6242), m = a(6351), o = a(5941), v = { "(": 0, ")": 1, "*": 2, "+": 3, "-": 1, ".": 2 }, S = 131072;
        function y(W, p) {
          if (W > 24)
            return p.setWinLines || !1;
          switch (W) {
            case 1:
              return !!p.restoreWin;
            case 2:
              return !!p.minimizeWin;
            case 3:
              return !!p.setWinPosition;
            case 4:
              return !!p.setWinSizePixels;
            case 5:
              return !!p.raiseWin;
            case 6:
              return !!p.lowerWin;
            case 7:
              return !!p.refreshWin;
            case 8:
              return !!p.setWinSizeChars;
            case 9:
              return !!p.maximizeWin;
            case 10:
              return !!p.fullscreenWin;
            case 11:
              return !!p.getWinState;
            case 13:
              return !!p.getWinPosition;
            case 14:
              return !!p.getWinSizePixels;
            case 15:
              return !!p.getScreenSizePixels;
            case 16:
              return !!p.getCellSizePixels;
            case 18:
              return !!p.getWinSizeChars;
            case 19:
              return !!p.getScreenSizeChars;
            case 20:
              return !!p.getIconTitle;
            case 21:
              return !!p.getWinTitle;
            case 22:
              return !!p.pushTitle;
            case 23:
              return !!p.popTitle;
            case 24:
              return !!p.setWinLines;
          }
          return !1;
        }
        var w;
        (function(W) {
          W[W.GET_WIN_SIZE_PIXELS = 0] = "GET_WIN_SIZE_PIXELS", W[W.GET_CELL_SIZE_PIXELS = 1] = "GET_CELL_SIZE_PIXELS";
        })(w = r.WindowsOptionsReportType || (r.WindowsOptionsReportType = {}));
        let L = 0;
        class M extends g.Disposable {
          constructor(p, C, E, R, O, F, Y, P, G = new b.EscapeSequenceParser()) {
            super(), this._bufferService = p, this._charsetService = C, this._coreService = E, this._logService = R, this._optionsService = O, this._oscLinkService = F, this._coreMouseService = Y, this._unicodeService = P, this._parser = G, this._parseBuffer = new Uint32Array(4096), this._stringDecoder = new c.StringToUtf32(), this._utf8Decoder = new c.Utf8ToUtf32(), this._workCell = new t.CellData(), this._windowTitle = "", this._iconName = "", this._windowTitleStack = [], this._iconNameStack = [], this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = e.DEFAULT_ATTR_DATA.clone(), this._onRequestBell = this.register(new i.EventEmitter()), this.onRequestBell = this._onRequestBell.event, this._onRequestRefreshRows = this.register(new i.EventEmitter()), this.onRequestRefreshRows = this._onRequestRefreshRows.event, this._onRequestReset = this.register(new i.EventEmitter()), this.onRequestReset = this._onRequestReset.event, this._onRequestSendFocus = this.register(new i.EventEmitter()), this.onRequestSendFocus = this._onRequestSendFocus.event, this._onRequestSyncScrollBar = this.register(new i.EventEmitter()), this.onRequestSyncScrollBar = this._onRequestSyncScrollBar.event, this._onRequestWindowsOptionsReport = this.register(new i.EventEmitter()), this.onRequestWindowsOptionsReport = this._onRequestWindowsOptionsReport.event, this._onA11yChar = this.register(new i.EventEmitter()), this.onA11yChar = this._onA11yChar.event, this._onA11yTab = this.register(new i.EventEmitter()), this.onA11yTab = this._onA11yTab.event, this._onCursorMove = this.register(new i.EventEmitter()), this.onCursorMove = this._onCursorMove.event, this._onLineFeed = this.register(new i.EventEmitter()), this.onLineFeed = this._onLineFeed.event, this._onScroll = this.register(new i.EventEmitter()), this.onScroll = this._onScroll.event, this._onTitleChange = this.register(new i.EventEmitter()), this.onTitleChange = this._onTitleChange.event, this._onColor = this.register(new i.EventEmitter()), this.onColor = this._onColor.event, this._parseStack = { paused: !1, cursorStartX: 0, cursorStartY: 0, decodedLength: 0, position: 0 }, this._specialColors = [256, 257, 258], this.register(this._parser), this._dirtyRowTracker = new I(this._bufferService), this._activeBuffer = this._bufferService.buffer, this.register(this._bufferService.buffers.onBufferActivate((B) => this._activeBuffer = B.activeBuffer)), this._parser.setCsiHandlerFallback((B, k) => {
              this._logService.debug("Unknown CSI code: ", { identifier: this._parser.identToString(B), params: k.toArray() });
            }), this._parser.setEscHandlerFallback((B) => {
              this._logService.debug("Unknown ESC code: ", { identifier: this._parser.identToString(B) });
            }), this._parser.setExecuteHandlerFallback((B) => {
              this._logService.debug("Unknown EXECUTE code: ", { code: B });
            }), this._parser.setOscHandlerFallback((B, k, A) => {
              this._logService.debug("Unknown OSC code: ", { identifier: B, action: k, data: A });
            }), this._parser.setDcsHandlerFallback((B, k, A) => {
              k === "HOOK" && (A = A.toArray()), this._logService.debug("Unknown DCS code: ", { identifier: this._parser.identToString(B), action: k, payload: A });
            }), this._parser.setPrintHandler((B, k, A) => this.print(B, k, A)), this._parser.registerCsiHandler({ final: "@" }, (B) => this.insertChars(B)), this._parser.registerCsiHandler({ intermediates: " ", final: "@" }, (B) => this.scrollLeft(B)), this._parser.registerCsiHandler({ final: "A" }, (B) => this.cursorUp(B)), this._parser.registerCsiHandler({ intermediates: " ", final: "A" }, (B) => this.scrollRight(B)), this._parser.registerCsiHandler({ final: "B" }, (B) => this.cursorDown(B)), this._parser.registerCsiHandler({ final: "C" }, (B) => this.cursorForward(B)), this._parser.registerCsiHandler({ final: "D" }, (B) => this.cursorBackward(B)), this._parser.registerCsiHandler({ final: "E" }, (B) => this.cursorNextLine(B)), this._parser.registerCsiHandler({ final: "F" }, (B) => this.cursorPrecedingLine(B)), this._parser.registerCsiHandler({ final: "G" }, (B) => this.cursorCharAbsolute(B)), this._parser.registerCsiHandler({ final: "H" }, (B) => this.cursorPosition(B)), this._parser.registerCsiHandler({ final: "I" }, (B) => this.cursorForwardTab(B)), this._parser.registerCsiHandler({ final: "J" }, (B) => this.eraseInDisplay(B, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "J" }, (B) => this.eraseInDisplay(B, !0)), this._parser.registerCsiHandler({ final: "K" }, (B) => this.eraseInLine(B, !1)), this._parser.registerCsiHandler({ prefix: "?", final: "K" }, (B) => this.eraseInLine(B, !0)), this._parser.registerCsiHandler({ final: "L" }, (B) => this.insertLines(B)), this._parser.registerCsiHandler({ final: "M" }, (B) => this.deleteLines(B)), this._parser.registerCsiHandler({ final: "P" }, (B) => this.deleteChars(B)), this._parser.registerCsiHandler({ final: "S" }, (B) => this.scrollUp(B)), this._parser.registerCsiHandler({ final: "T" }, (B) => this.scrollDown(B)), this._parser.registerCsiHandler({ final: "X" }, (B) => this.eraseChars(B)), this._parser.registerCsiHandler({ final: "Z" }, (B) => this.cursorBackwardTab(B)), this._parser.registerCsiHandler({ final: "`" }, (B) => this.charPosAbsolute(B)), this._parser.registerCsiHandler({ final: "a" }, (B) => this.hPositionRelative(B)), this._parser.registerCsiHandler({ final: "b" }, (B) => this.repeatPrecedingCharacter(B)), this._parser.registerCsiHandler({ final: "c" }, (B) => this.sendDeviceAttributesPrimary(B)), this._parser.registerCsiHandler({ prefix: ">", final: "c" }, (B) => this.sendDeviceAttributesSecondary(B)), this._parser.registerCsiHandler({ final: "d" }, (B) => this.linePosAbsolute(B)), this._parser.registerCsiHandler({ final: "e" }, (B) => this.vPositionRelative(B)), this._parser.registerCsiHandler({ final: "f" }, (B) => this.hVPosition(B)), this._parser.registerCsiHandler({ final: "g" }, (B) => this.tabClear(B)), this._parser.registerCsiHandler({ final: "h" }, (B) => this.setMode(B)), this._parser.registerCsiHandler({ prefix: "?", final: "h" }, (B) => this.setModePrivate(B)), this._parser.registerCsiHandler({ final: "l" }, (B) => this.resetMode(B)), this._parser.registerCsiHandler({ prefix: "?", final: "l" }, (B) => this.resetModePrivate(B)), this._parser.registerCsiHandler({ final: "m" }, (B) => this.charAttributes(B)), this._parser.registerCsiHandler({ final: "n" }, (B) => this.deviceStatus(B)), this._parser.registerCsiHandler({ prefix: "?", final: "n" }, (B) => this.deviceStatusPrivate(B)), this._parser.registerCsiHandler({ intermediates: "!", final: "p" }, (B) => this.softReset(B)), this._parser.registerCsiHandler({ intermediates: " ", final: "q" }, (B) => this.setCursorStyle(B)), this._parser.registerCsiHandler({ final: "r" }, (B) => this.setScrollRegion(B)), this._parser.registerCsiHandler({ final: "s" }, (B) => this.saveCursor(B)), this._parser.registerCsiHandler({ final: "t" }, (B) => this.windowOptions(B)), this._parser.registerCsiHandler({ final: "u" }, (B) => this.restoreCursor(B)), this._parser.registerCsiHandler({ intermediates: "'", final: "}" }, (B) => this.insertColumns(B)), this._parser.registerCsiHandler({ intermediates: "'", final: "~" }, (B) => this.deleteColumns(B)), this._parser.registerCsiHandler({ intermediates: '"', final: "q" }, (B) => this.selectProtected(B)), this._parser.registerCsiHandler({ intermediates: "$", final: "p" }, (B) => this.requestMode(B, !0)), this._parser.registerCsiHandler({ prefix: "?", intermediates: "$", final: "p" }, (B) => this.requestMode(B, !1)), this._parser.setExecuteHandler(d.C0.BEL, () => this.bell()), this._parser.setExecuteHandler(d.C0.LF, () => this.lineFeed()), this._parser.setExecuteHandler(d.C0.VT, () => this.lineFeed()), this._parser.setExecuteHandler(d.C0.FF, () => this.lineFeed()), this._parser.setExecuteHandler(d.C0.CR, () => this.carriageReturn()), this._parser.setExecuteHandler(d.C0.BS, () => this.backspace()), this._parser.setExecuteHandler(d.C0.HT, () => this.tab()), this._parser.setExecuteHandler(d.C0.SO, () => this.shiftOut()), this._parser.setExecuteHandler(d.C0.SI, () => this.shiftIn()), this._parser.setExecuteHandler(d.C1.IND, () => this.index()), this._parser.setExecuteHandler(d.C1.NEL, () => this.nextLine()), this._parser.setExecuteHandler(d.C1.HTS, () => this.tabSet()), this._parser.registerOscHandler(0, new _.OscHandler((B) => (this.setTitle(B), this.setIconName(B), !0))), this._parser.registerOscHandler(1, new _.OscHandler((B) => this.setIconName(B))), this._parser.registerOscHandler(2, new _.OscHandler((B) => this.setTitle(B))), this._parser.registerOscHandler(4, new _.OscHandler((B) => this.setOrReportIndexedColor(B))), this._parser.registerOscHandler(8, new _.OscHandler((B) => this.setHyperlink(B))), this._parser.registerOscHandler(10, new _.OscHandler((B) => this.setOrReportFgColor(B))), this._parser.registerOscHandler(11, new _.OscHandler((B) => this.setOrReportBgColor(B))), this._parser.registerOscHandler(12, new _.OscHandler((B) => this.setOrReportCursorColor(B))), this._parser.registerOscHandler(104, new _.OscHandler((B) => this.restoreIndexedColor(B))), this._parser.registerOscHandler(110, new _.OscHandler((B) => this.restoreFgColor(B))), this._parser.registerOscHandler(111, new _.OscHandler((B) => this.restoreBgColor(B))), this._parser.registerOscHandler(112, new _.OscHandler((B) => this.restoreCursorColor(B))), this._parser.registerEscHandler({ final: "7" }, () => this.saveCursor()), this._parser.registerEscHandler({ final: "8" }, () => this.restoreCursor()), this._parser.registerEscHandler({ final: "D" }, () => this.index()), this._parser.registerEscHandler({ final: "E" }, () => this.nextLine()), this._parser.registerEscHandler({ final: "H" }, () => this.tabSet()), this._parser.registerEscHandler({ final: "M" }, () => this.reverseIndex()), this._parser.registerEscHandler({ final: "=" }, () => this.keypadApplicationMode()), this._parser.registerEscHandler({ final: ">" }, () => this.keypadNumericMode()), this._parser.registerEscHandler({ final: "c" }, () => this.fullReset()), this._parser.registerEscHandler({ final: "n" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "o" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "|" }, () => this.setgLevel(3)), this._parser.registerEscHandler({ final: "}" }, () => this.setgLevel(2)), this._parser.registerEscHandler({ final: "~" }, () => this.setgLevel(1)), this._parser.registerEscHandler({ intermediates: "%", final: "@" }, () => this.selectDefaultCharset()), this._parser.registerEscHandler({ intermediates: "%", final: "G" }, () => this.selectDefaultCharset());
            for (const B in u.CHARSETS)
              this._parser.registerEscHandler({ intermediates: "(", final: B }, () => this.selectCharset("(" + B)), this._parser.registerEscHandler({ intermediates: ")", final: B }, () => this.selectCharset(")" + B)), this._parser.registerEscHandler({ intermediates: "*", final: B }, () => this.selectCharset("*" + B)), this._parser.registerEscHandler({ intermediates: "+", final: B }, () => this.selectCharset("+" + B)), this._parser.registerEscHandler({ intermediates: "-", final: B }, () => this.selectCharset("-" + B)), this._parser.registerEscHandler({ intermediates: ".", final: B }, () => this.selectCharset("." + B)), this._parser.registerEscHandler({ intermediates: "/", final: B }, () => this.selectCharset("/" + B));
            this._parser.registerEscHandler({ intermediates: "#", final: "8" }, () => this.screenAlignmentPattern()), this._parser.setErrorHandler((B) => (this._logService.error("Parsing error: ", B), B)), this._parser.registerDcsHandler({ intermediates: "$", final: "q" }, new m.DcsHandler((B, k) => this.requestStatusString(B, k)));
          }
          getAttrData() {
            return this._curAttrData;
          }
          _preserveStack(p, C, E, R) {
            this._parseStack.paused = !0, this._parseStack.cursorStartX = p, this._parseStack.cursorStartY = C, this._parseStack.decodedLength = E, this._parseStack.position = R;
          }
          _logSlowResolvingAsync(p) {
            this._logService.logLevel <= l.LogLevelEnum.WARN && Promise.race([p, new Promise((C, E) => setTimeout(() => E("#SLOW_TIMEOUT"), 5e3))]).catch((C) => {
              if (C !== "#SLOW_TIMEOUT")
                throw C;
              console.warn("async parser handler taking longer than 5000 ms");
            });
          }
          _getCurrentLinkId() {
            return this._curAttrData.extended.urlId;
          }
          parse(p, C) {
            let E, R = this._activeBuffer.x, O = this._activeBuffer.y, F = 0;
            const Y = this._parseStack.paused;
            if (Y) {
              if (E = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, C))
                return this._logSlowResolvingAsync(E), E;
              R = this._parseStack.cursorStartX, O = this._parseStack.cursorStartY, this._parseStack.paused = !1, p.length > S && (F = this._parseStack.position + S);
            }
            if (this._logService.logLevel <= l.LogLevelEnum.DEBUG && this._logService.debug("parsing data" + (typeof p == "string" ? ` "${p}"` : ` "${Array.prototype.map.call(p, (P) => String.fromCharCode(P)).join("")}"`), typeof p == "string" ? p.split("").map((P) => P.charCodeAt(0)) : p), this._parseBuffer.length < p.length && this._parseBuffer.length < S && (this._parseBuffer = new Uint32Array(Math.min(p.length, S))), Y || this._dirtyRowTracker.clearRange(), p.length > S)
              for (let P = F; P < p.length; P += S) {
                const G = P + S < p.length ? P + S : p.length, B = typeof p == "string" ? this._stringDecoder.decode(p.substring(P, G), this._parseBuffer) : this._utf8Decoder.decode(p.subarray(P, G), this._parseBuffer);
                if (E = this._parser.parse(this._parseBuffer, B))
                  return this._preserveStack(R, O, B, P), this._logSlowResolvingAsync(E), E;
              }
            else if (!Y) {
              const P = typeof p == "string" ? this._stringDecoder.decode(p, this._parseBuffer) : this._utf8Decoder.decode(p, this._parseBuffer);
              if (E = this._parser.parse(this._parseBuffer, P))
                return this._preserveStack(R, O, P, 0), this._logSlowResolvingAsync(E), E;
            }
            this._activeBuffer.x === R && this._activeBuffer.y === O || this._onCursorMove.fire(), this._onRequestRefreshRows.fire(this._dirtyRowTracker.start, this._dirtyRowTracker.end);
          }
          print(p, C, E) {
            let R, O;
            const F = this._charsetService.charset, Y = this._optionsService.rawOptions.screenReaderMode, P = this._bufferService.cols, G = this._coreService.decPrivateModes.wraparound, B = this._coreService.modes.insertMode, k = this._curAttrData;
            let A = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._activeBuffer.x && E - C > 0 && A.getWidth(this._activeBuffer.x - 1) === 2 && A.setCellFromCodePoint(this._activeBuffer.x - 1, 0, 1, k.fg, k.bg, k.extended);
            for (let x = C; x < E; ++x) {
              if (R = p[x], O = this._unicodeService.wcwidth(R), R < 127 && F) {
                const H = F[String.fromCharCode(R)];
                H && (R = H.charCodeAt(0));
              }
              if (Y && this._onA11yChar.fire((0, c.stringFromCodePoint)(R)), this._getCurrentLinkId() && this._oscLinkService.addLineToLink(this._getCurrentLinkId(), this._activeBuffer.ybase + this._activeBuffer.y), O || !this._activeBuffer.x) {
                if (this._activeBuffer.x + O - 1 >= P) {
                  if (G) {
                    for (; this._activeBuffer.x < P; )
                      A.setCellFromCodePoint(this._activeBuffer.x++, 0, 1, k.fg, k.bg, k.extended);
                    this._activeBuffer.x = 0, this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData(), !0)) : (this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !0), A = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
                  } else if (this._activeBuffer.x = P - 1, O === 2)
                    continue;
                }
                if (B && (A.insertCells(this._activeBuffer.x, O, this._activeBuffer.getNullCell(k), k), A.getWidth(P - 1) === 2 && A.setCellFromCodePoint(P - 1, n.NULL_CELL_CODE, n.NULL_CELL_WIDTH, k.fg, k.bg, k.extended)), A.setCellFromCodePoint(this._activeBuffer.x++, R, O, k.fg, k.bg, k.extended), O > 0)
                  for (; --O; )
                    A.setCellFromCodePoint(this._activeBuffer.x++, 0, 0, k.fg, k.bg, k.extended);
              } else
                A.getWidth(this._activeBuffer.x - 1) ? A.addCodepointToCell(this._activeBuffer.x - 1, R) : A.addCodepointToCell(this._activeBuffer.x - 2, R);
            }
            E - C > 0 && (A.loadCell(this._activeBuffer.x - 1, this._workCell), this._workCell.getWidth() === 2 || this._workCell.getCode() > 65535 ? this._parser.precedingCodepoint = 0 : this._workCell.isCombined() ? this._parser.precedingCodepoint = this._workCell.getChars().charCodeAt(0) : this._parser.precedingCodepoint = this._workCell.content), this._activeBuffer.x < P && E - C > 0 && A.getWidth(this._activeBuffer.x) === 0 && !A.hasContent(this._activeBuffer.x) && A.setCellFromCodePoint(this._activeBuffer.x, 0, 1, k.fg, k.bg, k.extended), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
          }
          registerCsiHandler(p, C) {
            return p.final !== "t" || p.prefix || p.intermediates ? this._parser.registerCsiHandler(p, C) : this._parser.registerCsiHandler(p, (E) => !y(E.params[0], this._optionsService.rawOptions.windowOptions) || C(E));
          }
          registerDcsHandler(p, C) {
            return this._parser.registerDcsHandler(p, new m.DcsHandler(C));
          }
          registerEscHandler(p, C) {
            return this._parser.registerEscHandler(p, C);
          }
          registerOscHandler(p, C) {
            return this._parser.registerOscHandler(p, new _.OscHandler(C));
          }
          bell() {
            return this._onRequestBell.fire(), !0;
          }
          lineFeed() {
            return this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._optionsService.rawOptions.convertEol && (this._activeBuffer.x = 0), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._activeBuffer.x >= this._bufferService.cols && this._activeBuffer.x--, this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._onLineFeed.fire(), !0;
          }
          carriageReturn() {
            return this._activeBuffer.x = 0, !0;
          }
          backspace() {
            var p;
            if (!this._coreService.decPrivateModes.reverseWraparound)
              return this._restrictCursor(), this._activeBuffer.x > 0 && this._activeBuffer.x--, !0;
            if (this._restrictCursor(this._bufferService.cols), this._activeBuffer.x > 0)
              this._activeBuffer.x--;
            else if (this._activeBuffer.x === 0 && this._activeBuffer.y > this._activeBuffer.scrollTop && this._activeBuffer.y <= this._activeBuffer.scrollBottom && (!((p = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)) === null || p === void 0) && p.isWrapped)) {
              this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y).isWrapped = !1, this._activeBuffer.y--, this._activeBuffer.x = this._bufferService.cols - 1;
              const C = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
              C.hasWidth(this._activeBuffer.x) && !C.hasContent(this._activeBuffer.x) && this._activeBuffer.x--;
            }
            return this._restrictCursor(), !0;
          }
          tab() {
            if (this._activeBuffer.x >= this._bufferService.cols)
              return !0;
            const p = this._activeBuffer.x;
            return this._activeBuffer.x = this._activeBuffer.nextStop(), this._optionsService.rawOptions.screenReaderMode && this._onA11yTab.fire(this._activeBuffer.x - p), !0;
          }
          shiftOut() {
            return this._charsetService.setgLevel(1), !0;
          }
          shiftIn() {
            return this._charsetService.setgLevel(0), !0;
          }
          _restrictCursor(p = this._bufferService.cols - 1) {
            this._activeBuffer.x = Math.min(p, Math.max(0, this._activeBuffer.x)), this._activeBuffer.y = this._coreService.decPrivateModes.origin ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y)) : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y)), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
          }
          _setCursor(p, C) {
            this._dirtyRowTracker.markDirty(this._activeBuffer.y), this._coreService.decPrivateModes.origin ? (this._activeBuffer.x = p, this._activeBuffer.y = this._activeBuffer.scrollTop + C) : (this._activeBuffer.x = p, this._activeBuffer.y = C), this._restrictCursor(), this._dirtyRowTracker.markDirty(this._activeBuffer.y);
          }
          _moveCursor(p, C) {
            this._restrictCursor(), this._setCursor(this._activeBuffer.x + p, this._activeBuffer.y + C);
          }
          cursorUp(p) {
            const C = this._activeBuffer.y - this._activeBuffer.scrollTop;
            return C >= 0 ? this._moveCursor(0, -Math.min(C, p.params[0] || 1)) : this._moveCursor(0, -(p.params[0] || 1)), !0;
          }
          cursorDown(p) {
            const C = this._activeBuffer.scrollBottom - this._activeBuffer.y;
            return C >= 0 ? this._moveCursor(0, Math.min(C, p.params[0] || 1)) : this._moveCursor(0, p.params[0] || 1), !0;
          }
          cursorForward(p) {
            return this._moveCursor(p.params[0] || 1, 0), !0;
          }
          cursorBackward(p) {
            return this._moveCursor(-(p.params[0] || 1), 0), !0;
          }
          cursorNextLine(p) {
            return this.cursorDown(p), this._activeBuffer.x = 0, !0;
          }
          cursorPrecedingLine(p) {
            return this.cursorUp(p), this._activeBuffer.x = 0, !0;
          }
          cursorCharAbsolute(p) {
            return this._setCursor((p.params[0] || 1) - 1, this._activeBuffer.y), !0;
          }
          cursorPosition(p) {
            return this._setCursor(p.length >= 2 ? (p.params[1] || 1) - 1 : 0, (p.params[0] || 1) - 1), !0;
          }
          charPosAbsolute(p) {
            return this._setCursor((p.params[0] || 1) - 1, this._activeBuffer.y), !0;
          }
          hPositionRelative(p) {
            return this._moveCursor(p.params[0] || 1, 0), !0;
          }
          linePosAbsolute(p) {
            return this._setCursor(this._activeBuffer.x, (p.params[0] || 1) - 1), !0;
          }
          vPositionRelative(p) {
            return this._moveCursor(0, p.params[0] || 1), !0;
          }
          hVPosition(p) {
            return this.cursorPosition(p), !0;
          }
          tabClear(p) {
            const C = p.params[0];
            return C === 0 ? delete this._activeBuffer.tabs[this._activeBuffer.x] : C === 3 && (this._activeBuffer.tabs = {}), !0;
          }
          cursorForwardTab(p) {
            if (this._activeBuffer.x >= this._bufferService.cols)
              return !0;
            let C = p.params[0] || 1;
            for (; C--; )
              this._activeBuffer.x = this._activeBuffer.nextStop();
            return !0;
          }
          cursorBackwardTab(p) {
            if (this._activeBuffer.x >= this._bufferService.cols)
              return !0;
            let C = p.params[0] || 1;
            for (; C--; )
              this._activeBuffer.x = this._activeBuffer.prevStop();
            return !0;
          }
          selectProtected(p) {
            const C = p.params[0];
            return C === 1 && (this._curAttrData.bg |= 536870912), C !== 2 && C !== 0 || (this._curAttrData.bg &= -536870913), !0;
          }
          _eraseInBufferLine(p, C, E, R = !1, O = !1) {
            const F = this._activeBuffer.lines.get(this._activeBuffer.ybase + p);
            F.replaceCells(C, E, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData(), O), R && (F.isWrapped = !1);
          }
          _resetBufferLine(p, C = !1) {
            const E = this._activeBuffer.lines.get(this._activeBuffer.ybase + p);
            E.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), C), this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + p), E.isWrapped = !1;
          }
          eraseInDisplay(p, C = !1) {
            let E;
            switch (this._restrictCursor(this._bufferService.cols), p.params[0]) {
              case 0:
                for (E = this._activeBuffer.y, this._dirtyRowTracker.markDirty(E), this._eraseInBufferLine(E++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, C); E < this._bufferService.rows; E++)
                  this._resetBufferLine(E, C);
                this._dirtyRowTracker.markDirty(E);
                break;
              case 1:
                for (E = this._activeBuffer.y, this._dirtyRowTracker.markDirty(E), this._eraseInBufferLine(E, 0, this._activeBuffer.x + 1, !0, C), this._activeBuffer.x + 1 >= this._bufferService.cols && (this._activeBuffer.lines.get(E + 1).isWrapped = !1); E--; )
                  this._resetBufferLine(E, C);
                this._dirtyRowTracker.markDirty(0);
                break;
              case 2:
                for (E = this._bufferService.rows, this._dirtyRowTracker.markDirty(E - 1); E--; )
                  this._resetBufferLine(E, C);
                this._dirtyRowTracker.markDirty(0);
                break;
              case 3:
                const R = this._activeBuffer.lines.length - this._bufferService.rows;
                R > 0 && (this._activeBuffer.lines.trimStart(R), this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - R, 0), this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - R, 0), this._onScroll.fire(0));
            }
            return !0;
          }
          eraseInLine(p, C = !1) {
            switch (this._restrictCursor(this._bufferService.cols), p.params[0]) {
              case 0:
                this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0, C);
                break;
              case 1:
                this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, !1, C);
                break;
              case 2:
                this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, !0, C);
            }
            return this._dirtyRowTracker.markDirty(this._activeBuffer.y), !0;
          }
          insertLines(p) {
            this._restrictCursor();
            let C = p.params[0] || 1;
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const E = this._activeBuffer.ybase + this._activeBuffer.y, R = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, O = this._bufferService.rows - 1 + this._activeBuffer.ybase - R + 1;
            for (; C--; )
              this._activeBuffer.lines.splice(O - 1, 1), this._activeBuffer.lines.splice(E, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
          }
          deleteLines(p) {
            this._restrictCursor();
            let C = p.params[0] || 1;
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const E = this._activeBuffer.ybase + this._activeBuffer.y;
            let R;
            for (R = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom, R = this._bufferService.rows - 1 + this._activeBuffer.ybase - R; C--; )
              this._activeBuffer.lines.splice(E, 1), this._activeBuffer.lines.splice(R, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom), this._activeBuffer.x = 0, !0;
          }
          insertChars(p) {
            this._restrictCursor();
            const C = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return C && (C.insertCells(this._activeBuffer.x, p.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          deleteChars(p) {
            this._restrictCursor();
            const C = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return C && (C.deleteCells(this._activeBuffer.x, p.params[0] || 1, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          scrollUp(p) {
            let C = p.params[0] || 1;
            for (; C--; )
              this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          scrollDown(p) {
            let C = p.params[0] || 1;
            for (; C--; )
              this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1), this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(e.DEFAULT_ATTR_DATA));
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          scrollLeft(p) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const C = p.params[0] || 1;
            for (let E = this._activeBuffer.scrollTop; E <= this._activeBuffer.scrollBottom; ++E) {
              const R = this._activeBuffer.lines.get(this._activeBuffer.ybase + E);
              R.deleteCells(0, C, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), R.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          scrollRight(p) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const C = p.params[0] || 1;
            for (let E = this._activeBuffer.scrollTop; E <= this._activeBuffer.scrollBottom; ++E) {
              const R = this._activeBuffer.lines.get(this._activeBuffer.ybase + E);
              R.insertCells(0, C, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), R.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          insertColumns(p) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const C = p.params[0] || 1;
            for (let E = this._activeBuffer.scrollTop; E <= this._activeBuffer.scrollBottom; ++E) {
              const R = this._activeBuffer.lines.get(this._activeBuffer.ybase + E);
              R.insertCells(this._activeBuffer.x, C, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), R.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          deleteColumns(p) {
            if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop)
              return !0;
            const C = p.params[0] || 1;
            for (let E = this._activeBuffer.scrollTop; E <= this._activeBuffer.scrollBottom; ++E) {
              const R = this._activeBuffer.lines.get(this._activeBuffer.ybase + E);
              R.deleteCells(this._activeBuffer.x, C, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), R.isWrapped = !1;
            }
            return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom), !0;
          }
          eraseChars(p) {
            this._restrictCursor();
            const C = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
            return C && (C.replaceCells(this._activeBuffer.x, this._activeBuffer.x + (p.params[0] || 1), this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData()), this._dirtyRowTracker.markDirty(this._activeBuffer.y)), !0;
          }
          repeatPrecedingCharacter(p) {
            if (!this._parser.precedingCodepoint)
              return !0;
            const C = p.params[0] || 1, E = new Uint32Array(C);
            for (let R = 0; R < C; ++R)
              E[R] = this._parser.precedingCodepoint;
            return this.print(E, 0, E.length), !0;
          }
          sendDeviceAttributesPrimary(p) {
            return p.params[0] > 0 || (this._is("xterm") || this._is("rxvt-unicode") || this._is("screen") ? this._coreService.triggerDataEvent(d.C0.ESC + "[?1;2c") : this._is("linux") && this._coreService.triggerDataEvent(d.C0.ESC + "[?6c")), !0;
          }
          sendDeviceAttributesSecondary(p) {
            return p.params[0] > 0 || (this._is("xterm") ? this._coreService.triggerDataEvent(d.C0.ESC + "[>0;276;0c") : this._is("rxvt-unicode") ? this._coreService.triggerDataEvent(d.C0.ESC + "[>85;95;0c") : this._is("linux") ? this._coreService.triggerDataEvent(p.params[0] + "c") : this._is("screen") && this._coreService.triggerDataEvent(d.C0.ESC + "[>83;40003;0c")), !0;
          }
          _is(p) {
            return (this._optionsService.rawOptions.termName + "").indexOf(p) === 0;
          }
          setMode(p) {
            for (let C = 0; C < p.length; C++)
              switch (p.params[C]) {
                case 4:
                  this._coreService.modes.insertMode = !0;
                  break;
                case 20:
                  this._optionsService.options.convertEol = !0;
              }
            return !0;
          }
          setModePrivate(p) {
            for (let C = 0; C < p.length; C++)
              switch (p.params[C]) {
                case 1:
                  this._coreService.decPrivateModes.applicationCursorKeys = !0;
                  break;
                case 2:
                  this._charsetService.setgCharset(0, u.DEFAULT_CHARSET), this._charsetService.setgCharset(1, u.DEFAULT_CHARSET), this._charsetService.setgCharset(2, u.DEFAULT_CHARSET), this._charsetService.setgCharset(3, u.DEFAULT_CHARSET);
                  break;
                case 3:
                  this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(132, this._bufferService.rows), this._onRequestReset.fire());
                  break;
                case 6:
                  this._coreService.decPrivateModes.origin = !0, this._setCursor(0, 0);
                  break;
                case 7:
                  this._coreService.decPrivateModes.wraparound = !0;
                  break;
                case 12:
                  this._optionsService.options.cursorBlink = !0;
                  break;
                case 45:
                  this._coreService.decPrivateModes.reverseWraparound = !0;
                  break;
                case 66:
                  this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire();
                  break;
                case 9:
                  this._coreMouseService.activeProtocol = "X10";
                  break;
                case 1e3:
                  this._coreMouseService.activeProtocol = "VT200";
                  break;
                case 1002:
                  this._coreMouseService.activeProtocol = "DRAG";
                  break;
                case 1003:
                  this._coreMouseService.activeProtocol = "ANY";
                  break;
                case 1004:
                  this._coreService.decPrivateModes.sendFocus = !0, this._onRequestSendFocus.fire();
                  break;
                case 1005:
                  this._logService.debug("DECSET 1005 not supported (see #2507)");
                  break;
                case 1006:
                  this._coreMouseService.activeEncoding = "SGR";
                  break;
                case 1015:
                  this._logService.debug("DECSET 1015 not supported (see #2507)");
                  break;
                case 1016:
                  this._coreMouseService.activeEncoding = "SGR_PIXELS";
                  break;
                case 25:
                  this._coreService.isCursorHidden = !1;
                  break;
                case 1048:
                  this.saveCursor();
                  break;
                case 1049:
                  this.saveCursor();
                case 47:
                case 1047:
                  this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
                  break;
                case 2004:
                  this._coreService.decPrivateModes.bracketedPasteMode = !0;
              }
            return !0;
          }
          resetMode(p) {
            for (let C = 0; C < p.length; C++)
              switch (p.params[C]) {
                case 4:
                  this._coreService.modes.insertMode = !1;
                  break;
                case 20:
                  this._optionsService.options.convertEol = !1;
              }
            return !0;
          }
          resetModePrivate(p) {
            for (let C = 0; C < p.length; C++)
              switch (p.params[C]) {
                case 1:
                  this._coreService.decPrivateModes.applicationCursorKeys = !1;
                  break;
                case 3:
                  this._optionsService.rawOptions.windowOptions.setWinLines && (this._bufferService.resize(80, this._bufferService.rows), this._onRequestReset.fire());
                  break;
                case 6:
                  this._coreService.decPrivateModes.origin = !1, this._setCursor(0, 0);
                  break;
                case 7:
                  this._coreService.decPrivateModes.wraparound = !1;
                  break;
                case 12:
                  this._optionsService.options.cursorBlink = !1;
                  break;
                case 45:
                  this._coreService.decPrivateModes.reverseWraparound = !1;
                  break;
                case 66:
                  this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire();
                  break;
                case 9:
                case 1e3:
                case 1002:
                case 1003:
                  this._coreMouseService.activeProtocol = "NONE";
                  break;
                case 1004:
                  this._coreService.decPrivateModes.sendFocus = !1;
                  break;
                case 1005:
                  this._logService.debug("DECRST 1005 not supported (see #2507)");
                  break;
                case 1006:
                case 1016:
                  this._coreMouseService.activeEncoding = "DEFAULT";
                  break;
                case 1015:
                  this._logService.debug("DECRST 1015 not supported (see #2507)");
                  break;
                case 25:
                  this._coreService.isCursorHidden = !0;
                  break;
                case 1048:
                  this.restoreCursor();
                  break;
                case 1049:
                case 47:
                case 1047:
                  this._bufferService.buffers.activateNormalBuffer(), p.params[C] === 1049 && this.restoreCursor(), this._coreService.isCursorInitialized = !0, this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1), this._onRequestSyncScrollBar.fire();
                  break;
                case 2004:
                  this._coreService.decPrivateModes.bracketedPasteMode = !1;
              }
            return !0;
          }
          requestMode(p, C) {
            const E = this._coreService.decPrivateModes, { activeProtocol: R, activeEncoding: O } = this._coreMouseService, F = this._coreService, { buffers: Y, cols: P } = this._bufferService, { active: G, alt: B } = Y, k = this._optionsService.rawOptions, A = (U) => U ? 1 : 2, x = p.params[0];
            return H = x, $ = C ? x === 2 ? 3 : x === 4 ? A(F.modes.insertMode) : x === 12 ? 4 : x === 20 ? A(k.convertEol) : 0 : x === 1 ? A(E.applicationCursorKeys) : x === 3 ? k.windowOptions.setWinLines ? P === 80 ? 2 : P === 132 ? 1 : 0 : 0 : x === 6 ? A(E.origin) : x === 7 ? A(E.wraparound) : x === 8 ? 3 : x === 9 ? A(R === "X10") : x === 12 ? A(k.cursorBlink) : x === 25 ? A(!F.isCursorHidden) : x === 45 ? A(E.reverseWraparound) : x === 66 ? A(E.applicationKeypad) : x === 1e3 ? A(R === "VT200") : x === 1002 ? A(R === "DRAG") : x === 1003 ? A(R === "ANY") : x === 1004 ? A(E.sendFocus) : x === 1005 ? 4 : x === 1006 ? A(O === "SGR") : x === 1015 ? 4 : x === 1016 ? A(O === "SGR_PIXELS") : x === 1048 ? 1 : x === 47 || x === 1047 || x === 1049 ? A(G === B) : x === 2004 ? A(E.bracketedPasteMode) : 0, F.triggerDataEvent(`${d.C0.ESC}[${C ? "" : "?"}${H};${$}$y`), !0;
            var H, $;
          }
          _updateAttrColor(p, C, E, R, O) {
            return C === 2 ? (p |= 50331648, p &= -16777216, p |= s.AttributeData.fromColorRGB([E, R, O])) : C === 5 && (p &= -50331904, p |= 33554432 | 255 & E), p;
          }
          _extractColor(p, C, E) {
            const R = [0, 0, -1, 0, 0, 0];
            let O = 0, F = 0;
            do {
              if (R[F + O] = p.params[C + F], p.hasSubParams(C + F)) {
                const Y = p.getSubParams(C + F);
                let P = 0;
                do
                  R[1] === 5 && (O = 1), R[F + P + 1 + O] = Y[P];
                while (++P < Y.length && P + F + 1 + O < R.length);
                break;
              }
              if (R[1] === 5 && F + O >= 2 || R[1] === 2 && F + O >= 5)
                break;
              R[1] && (O = 1);
            } while (++F + C < p.length && F + O < R.length);
            for (let Y = 2; Y < R.length; ++Y)
              R[Y] === -1 && (R[Y] = 0);
            switch (R[0]) {
              case 38:
                E.fg = this._updateAttrColor(E.fg, R[1], R[3], R[4], R[5]);
                break;
              case 48:
                E.bg = this._updateAttrColor(E.bg, R[1], R[3], R[4], R[5]);
                break;
              case 58:
                E.extended = E.extended.clone(), E.extended.underlineColor = this._updateAttrColor(E.extended.underlineColor, R[1], R[3], R[4], R[5]);
            }
            return F;
          }
          _processUnderline(p, C) {
            C.extended = C.extended.clone(), (!~p || p > 5) && (p = 1), C.extended.underlineStyle = p, C.fg |= 268435456, p === 0 && (C.fg &= -268435457), C.updateExtended();
          }
          _processSGR0(p) {
            p.fg = e.DEFAULT_ATTR_DATA.fg, p.bg = e.DEFAULT_ATTR_DATA.bg, p.extended = p.extended.clone(), p.extended.underlineStyle = 0, p.extended.underlineColor &= -67108864, p.updateExtended();
          }
          charAttributes(p) {
            if (p.length === 1 && p.params[0] === 0)
              return this._processSGR0(this._curAttrData), !0;
            const C = p.length;
            let E;
            const R = this._curAttrData;
            for (let O = 0; O < C; O++)
              E = p.params[O], E >= 30 && E <= 37 ? (R.fg &= -50331904, R.fg |= 16777216 | E - 30) : E >= 40 && E <= 47 ? (R.bg &= -50331904, R.bg |= 16777216 | E - 40) : E >= 90 && E <= 97 ? (R.fg &= -50331904, R.fg |= 16777224 | E - 90) : E >= 100 && E <= 107 ? (R.bg &= -50331904, R.bg |= 16777224 | E - 100) : E === 0 ? this._processSGR0(R) : E === 1 ? R.fg |= 134217728 : E === 3 ? R.bg |= 67108864 : E === 4 ? (R.fg |= 268435456, this._processUnderline(p.hasSubParams(O) ? p.getSubParams(O)[0] : 1, R)) : E === 5 ? R.fg |= 536870912 : E === 7 ? R.fg |= 67108864 : E === 8 ? R.fg |= 1073741824 : E === 9 ? R.fg |= 2147483648 : E === 2 ? R.bg |= 134217728 : E === 21 ? this._processUnderline(2, R) : E === 22 ? (R.fg &= -134217729, R.bg &= -134217729) : E === 23 ? R.bg &= -67108865 : E === 24 ? (R.fg &= -268435457, this._processUnderline(0, R)) : E === 25 ? R.fg &= -536870913 : E === 27 ? R.fg &= -67108865 : E === 28 ? R.fg &= -1073741825 : E === 29 ? R.fg &= 2147483647 : E === 39 ? (R.fg &= -67108864, R.fg |= 16777215 & e.DEFAULT_ATTR_DATA.fg) : E === 49 ? (R.bg &= -67108864, R.bg |= 16777215 & e.DEFAULT_ATTR_DATA.bg) : E === 38 || E === 48 || E === 58 ? O += this._extractColor(p, O, R) : E === 59 ? (R.extended = R.extended.clone(), R.extended.underlineColor = -1, R.updateExtended()) : E === 100 ? (R.fg &= -67108864, R.fg |= 16777215 & e.DEFAULT_ATTR_DATA.fg, R.bg &= -67108864, R.bg |= 16777215 & e.DEFAULT_ATTR_DATA.bg) : this._logService.debug("Unknown SGR attribute: %d.", E);
            return !0;
          }
          deviceStatus(p) {
            switch (p.params[0]) {
              case 5:
                this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);
                break;
              case 6:
                const C = this._activeBuffer.y + 1, E = this._activeBuffer.x + 1;
                this._coreService.triggerDataEvent(`${d.C0.ESC}[${C};${E}R`);
            }
            return !0;
          }
          deviceStatusPrivate(p) {
            if (p.params[0] === 6) {
              const C = this._activeBuffer.y + 1, E = this._activeBuffer.x + 1;
              this._coreService.triggerDataEvent(`${d.C0.ESC}[?${C};${E}R`);
            }
            return !0;
          }
          softReset(p) {
            return this._coreService.isCursorHidden = !1, this._onRequestSyncScrollBar.fire(), this._activeBuffer.scrollTop = 0, this._activeBuffer.scrollBottom = this._bufferService.rows - 1, this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._coreService.reset(), this._charsetService.reset(), this._activeBuffer.savedX = 0, this._activeBuffer.savedY = this._activeBuffer.ybase, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, this._coreService.decPrivateModes.origin = !1, !0;
          }
          setCursorStyle(p) {
            const C = p.params[0] || 1;
            switch (C) {
              case 1:
              case 2:
                this._optionsService.options.cursorStyle = "block";
                break;
              case 3:
              case 4:
                this._optionsService.options.cursorStyle = "underline";
                break;
              case 5:
              case 6:
                this._optionsService.options.cursorStyle = "bar";
            }
            const E = C % 2 == 1;
            return this._optionsService.options.cursorBlink = E, !0;
          }
          setScrollRegion(p) {
            const C = p.params[0] || 1;
            let E;
            return (p.length < 2 || (E = p.params[1]) > this._bufferService.rows || E === 0) && (E = this._bufferService.rows), E > C && (this._activeBuffer.scrollTop = C - 1, this._activeBuffer.scrollBottom = E - 1, this._setCursor(0, 0)), !0;
          }
          windowOptions(p) {
            if (!y(p.params[0], this._optionsService.rawOptions.windowOptions))
              return !0;
            const C = p.length > 1 ? p.params[1] : 0;
            switch (p.params[0]) {
              case 14:
                C !== 2 && this._onRequestWindowsOptionsReport.fire(w.GET_WIN_SIZE_PIXELS);
                break;
              case 16:
                this._onRequestWindowsOptionsReport.fire(w.GET_CELL_SIZE_PIXELS);
                break;
              case 18:
                this._bufferService && this._coreService.triggerDataEvent(`${d.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
                break;
              case 22:
                C !== 0 && C !== 2 || (this._windowTitleStack.push(this._windowTitle), this._windowTitleStack.length > 10 && this._windowTitleStack.shift()), C !== 0 && C !== 1 || (this._iconNameStack.push(this._iconName), this._iconNameStack.length > 10 && this._iconNameStack.shift());
                break;
              case 23:
                C !== 0 && C !== 2 || this._windowTitleStack.length && this.setTitle(this._windowTitleStack.pop()), C !== 0 && C !== 1 || this._iconNameStack.length && this.setIconName(this._iconNameStack.pop());
            }
            return !0;
          }
          saveCursor(p) {
            return this._activeBuffer.savedX = this._activeBuffer.x, this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg, this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg, this._activeBuffer.savedCharset = this._charsetService.charset, !0;
          }
          restoreCursor(p) {
            return this._activeBuffer.x = this._activeBuffer.savedX || 0, this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0), this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg, this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg, this._charsetService.charset = this._savedCharset, this._activeBuffer.savedCharset && (this._charsetService.charset = this._activeBuffer.savedCharset), this._restrictCursor(), !0;
          }
          setTitle(p) {
            return this._windowTitle = p, this._onTitleChange.fire(p), !0;
          }
          setIconName(p) {
            return this._iconName = p, !0;
          }
          setOrReportIndexedColor(p) {
            const C = [], E = p.split(";");
            for (; E.length > 1; ) {
              const R = E.shift(), O = E.shift();
              if (/^\d+$/.exec(R)) {
                const F = parseInt(R);
                if (0 <= F && F < 256)
                  if (O === "?")
                    C.push({ type: 0, index: F });
                  else {
                    const Y = (0, o.parseColor)(O);
                    Y && C.push({ type: 1, index: F, color: Y });
                  }
              }
            }
            return C.length && this._onColor.fire(C), !0;
          }
          setHyperlink(p) {
            const C = p.split(";");
            return !(C.length < 2) && (C[1] ? this._createHyperlink(C[0], C[1]) : !C[0] && this._finishHyperlink());
          }
          _createHyperlink(p, C) {
            this._getCurrentLinkId() && this._finishHyperlink();
            const E = p.split(":");
            let R;
            const O = E.findIndex((F) => F.startsWith("id="));
            return O !== -1 && (R = E[O].slice(3) || void 0), this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = this._oscLinkService.registerLink({ id: R, uri: C }), this._curAttrData.updateExtended(), !0;
          }
          _finishHyperlink() {
            return this._curAttrData.extended = this._curAttrData.extended.clone(), this._curAttrData.extended.urlId = 0, this._curAttrData.updateExtended(), !0;
          }
          _setOrReportSpecialColor(p, C) {
            const E = p.split(";");
            for (let R = 0; R < E.length && !(C >= this._specialColors.length); ++R, ++C)
              if (E[R] === "?")
                this._onColor.fire([{ type: 0, index: this._specialColors[C] }]);
              else {
                const O = (0, o.parseColor)(E[R]);
                O && this._onColor.fire([{ type: 1, index: this._specialColors[C], color: O }]);
              }
            return !0;
          }
          setOrReportFgColor(p) {
            return this._setOrReportSpecialColor(p, 0);
          }
          setOrReportBgColor(p) {
            return this._setOrReportSpecialColor(p, 1);
          }
          setOrReportCursorColor(p) {
            return this._setOrReportSpecialColor(p, 2);
          }
          restoreIndexedColor(p) {
            if (!p)
              return this._onColor.fire([{ type: 2 }]), !0;
            const C = [], E = p.split(";");
            for (let R = 0; R < E.length; ++R)
              if (/^\d+$/.exec(E[R])) {
                const O = parseInt(E[R]);
                0 <= O && O < 256 && C.push({ type: 2, index: O });
              }
            return C.length && this._onColor.fire(C), !0;
          }
          restoreFgColor(p) {
            return this._onColor.fire([{ type: 2, index: 256 }]), !0;
          }
          restoreBgColor(p) {
            return this._onColor.fire([{ type: 2, index: 257 }]), !0;
          }
          restoreCursorColor(p) {
            return this._onColor.fire([{ type: 2, index: 258 }]), !0;
          }
          nextLine() {
            return this._activeBuffer.x = 0, this.index(), !0;
          }
          keypadApplicationMode() {
            return this._logService.debug("Serial port requested application keypad."), this._coreService.decPrivateModes.applicationKeypad = !0, this._onRequestSyncScrollBar.fire(), !0;
          }
          keypadNumericMode() {
            return this._logService.debug("Switching back to normal keypad."), this._coreService.decPrivateModes.applicationKeypad = !1, this._onRequestSyncScrollBar.fire(), !0;
          }
          selectDefaultCharset() {
            return this._charsetService.setgLevel(0), this._charsetService.setgCharset(0, u.DEFAULT_CHARSET), !0;
          }
          selectCharset(p) {
            return p.length !== 2 ? (this.selectDefaultCharset(), !0) : (p[0] === "/" || this._charsetService.setgCharset(v[p[0]], u.CHARSETS[p[1]] || u.DEFAULT_CHARSET), !0);
          }
          index() {
            return this._restrictCursor(), this._activeBuffer.y++, this._activeBuffer.y === this._activeBuffer.scrollBottom + 1 ? (this._activeBuffer.y--, this._bufferService.scroll(this._eraseAttrData())) : this._activeBuffer.y >= this._bufferService.rows && (this._activeBuffer.y = this._bufferService.rows - 1), this._restrictCursor(), !0;
          }
          tabSet() {
            return this._activeBuffer.tabs[this._activeBuffer.x] = !0, !0;
          }
          reverseIndex() {
            if (this._restrictCursor(), this._activeBuffer.y === this._activeBuffer.scrollTop) {
              const p = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
              this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, p, 1), this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData())), this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
            } else
              this._activeBuffer.y--, this._restrictCursor();
            return !0;
          }
          fullReset() {
            return this._parser.reset(), this._onRequestReset.fire(), !0;
          }
          reset() {
            this._curAttrData = e.DEFAULT_ATTR_DATA.clone(), this._eraseAttrDataInternal = e.DEFAULT_ATTR_DATA.clone();
          }
          _eraseAttrData() {
            return this._eraseAttrDataInternal.bg &= -67108864, this._eraseAttrDataInternal.bg |= 67108863 & this._curAttrData.bg, this._eraseAttrDataInternal;
          }
          setgLevel(p) {
            return this._charsetService.setgLevel(p), !0;
          }
          screenAlignmentPattern() {
            const p = new t.CellData();
            p.content = 4194304 | "E".charCodeAt(0), p.fg = this._curAttrData.fg, p.bg = this._curAttrData.bg, this._setCursor(0, 0);
            for (let C = 0; C < this._bufferService.rows; ++C) {
              const E = this._activeBuffer.ybase + this._activeBuffer.y + C, R = this._activeBuffer.lines.get(E);
              R && (R.fill(p), R.isWrapped = !1);
            }
            return this._dirtyRowTracker.markAllDirty(), this._setCursor(0, 0), !0;
          }
          requestStatusString(p, C) {
            const E = this._bufferService.buffer, R = this._optionsService.rawOptions;
            return ((O) => (this._coreService.triggerDataEvent(`${d.C0.ESC}${O}${d.C0.ESC}\\`), !0))(p === '"q' ? `P1$r${this._curAttrData.isProtected() ? 1 : 0}"q` : p === '"p' ? 'P1$r61;1"p' : p === "r" ? `P1$r${E.scrollTop + 1};${E.scrollBottom + 1}r` : p === "m" ? "P1$r0m" : p === " q" ? `P1$r${{ block: 2, underline: 4, bar: 6 }[R.cursorStyle] - (R.cursorBlink ? 1 : 0)} q` : "P0$r");
          }
          markRangeDirty(p, C) {
            this._dirtyRowTracker.markRangeDirty(p, C);
          }
        }
        r.InputHandler = M;
        let I = class {
          constructor(W) {
            this._bufferService = W, this.clearRange();
          }
          clearRange() {
            this.start = this._bufferService.buffer.y, this.end = this._bufferService.buffer.y;
          }
          markDirty(W) {
            W < this.start ? this.start = W : W > this.end && (this.end = W);
          }
          markRangeDirty(W, p) {
            W > p && (L = W, W = p, p = L), W < this.start && (this.start = W), p > this.end && (this.end = p);
          }
          markAllDirty() {
            this.markRangeDirty(0, this._bufferService.rows - 1);
          }
        };
        I = h([f(0, l.IBufferService)], I);
      }, 844: (T, r) => {
        function a(h) {
          for (const f of h)
            f.dispose();
          h.length = 0;
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.getDisposeArrayDisposable = r.disposeArray = r.toDisposable = r.Disposable = void 0, r.Disposable = class {
          constructor() {
            this._disposables = [], this._isDisposed = !1;
          }
          dispose() {
            this._isDisposed = !0;
            for (const h of this._disposables)
              h.dispose();
            this._disposables.length = 0;
          }
          register(h) {
            return this._disposables.push(h), h;
          }
          unregister(h) {
            const f = this._disposables.indexOf(h);
            f !== -1 && this._disposables.splice(f, 1);
          }
        }, r.toDisposable = function(h) {
          return { dispose: h };
        }, r.disposeArray = a, r.getDisposeArrayDisposable = function(h) {
          return { dispose: () => a(h) };
        };
      }, 1505: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.FourKeyMap = r.TwoKeyMap = void 0;
        class a {
          constructor() {
            this._data = {};
          }
          set(f, d, u) {
            this._data[f] || (this._data[f] = {}), this._data[f][d] = u;
          }
          get(f, d) {
            return this._data[f] ? this._data[f][d] : void 0;
          }
          clear() {
            this._data = {};
          }
        }
        r.TwoKeyMap = a, r.FourKeyMap = class {
          constructor() {
            this._data = new a();
          }
          set(h, f, d, u, b) {
            this._data.get(h, f) || this._data.set(h, f, new a()), this._data.get(h, f).set(d, u, b);
          }
          get(h, f, d, u) {
            var b;
            return (b = this._data.get(h, f)) === null || b === void 0 ? void 0 : b.get(d, u);
          }
          clear() {
            this._data.clear();
          }
        };
      }, 6114: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.isChromeOS = r.isLinux = r.isWindows = r.isIphone = r.isIpad = r.isMac = r.getSafariVersion = r.isSafari = r.isLegacyEdge = r.isFirefox = r.isNode = void 0, r.isNode = typeof navigator > "u";
        const a = r.isNode ? "node" : navigator.userAgent, h = r.isNode ? "node" : navigator.platform;
        r.isFirefox = a.includes("Firefox"), r.isLegacyEdge = a.includes("Edge"), r.isSafari = /^((?!chrome|android).)*safari/i.test(a), r.getSafariVersion = function() {
          if (!r.isSafari)
            return 0;
          const f = a.match(/Version\/(\d+)/);
          return f === null || f.length < 2 ? 0 : parseInt(f[1]);
        }, r.isMac = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"].includes(h), r.isIpad = h === "iPad", r.isIphone = h === "iPhone", r.isWindows = ["Windows", "Win16", "Win32", "WinCE"].includes(h), r.isLinux = h.indexOf("Linux") >= 0, r.isChromeOS = /\bCrOS\b/.test(a);
      }, 6106: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.SortedList = void 0;
        let a = 0;
        r.SortedList = class {
          constructor(h) {
            this._getKey = h, this._array = [];
          }
          clear() {
            this._array.length = 0;
          }
          insert(h) {
            this._array.length !== 0 ? (a = this._search(this._getKey(h), 0, this._array.length - 1), this._array.splice(a, 0, h)) : this._array.push(h);
          }
          delete(h) {
            if (this._array.length === 0)
              return !1;
            const f = this._getKey(h);
            if (f === void 0 || (a = this._search(f, 0, this._array.length - 1), a === -1) || this._getKey(this._array[a]) !== f)
              return !1;
            do
              if (this._array[a] === h)
                return this._array.splice(a, 1), !0;
            while (++a < this._array.length && this._getKey(this._array[a]) === f);
            return !1;
          }
          *getKeyIterator(h) {
            if (this._array.length !== 0 && (a = this._search(h, 0, this._array.length - 1), !(a < 0 || a >= this._array.length) && this._getKey(this._array[a]) === h))
              do
                yield this._array[a];
              while (++a < this._array.length && this._getKey(this._array[a]) === h);
          }
          forEachByKey(h, f) {
            if (this._array.length !== 0 && (a = this._search(h, 0, this._array.length - 1), !(a < 0 || a >= this._array.length) && this._getKey(this._array[a]) === h))
              do
                f(this._array[a]);
              while (++a < this._array.length && this._getKey(this._array[a]) === h);
          }
          values() {
            return this._array.values();
          }
          _search(h, f, d) {
            if (d < f)
              return f;
            let u = Math.floor((f + d) / 2);
            const b = this._getKey(this._array[u]);
            if (b > h)
              return this._search(h, f, u - 1);
            if (b < h)
              return this._search(h, u + 1, d);
            for (; u > 0 && this._getKey(this._array[u - 1]) === h; )
              u--;
            return u;
          }
        };
      }, 7226: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DebouncedIdleTask = r.IdleTaskQueue = r.PriorityTaskQueue = void 0;
        const h = a(6114);
        class f {
          constructor() {
            this._tasks = [], this._i = 0;
          }
          enqueue(b) {
            this._tasks.push(b), this._start();
          }
          flush() {
            for (; this._i < this._tasks.length; )
              this._tasks[this._i]() || this._i++;
            this.clear();
          }
          clear() {
            this._idleCallback && (this._cancelCallback(this._idleCallback), this._idleCallback = void 0), this._i = 0, this._tasks.length = 0;
          }
          _start() {
            this._idleCallback || (this._idleCallback = this._requestCallback(this._process.bind(this)));
          }
          _process(b) {
            this._idleCallback = void 0;
            let g = 0, c = 0, e = b.timeRemaining(), i = 0;
            for (; this._i < this._tasks.length; ) {
              if (g = Date.now(), this._tasks[this._i]() || this._i++, g = Math.max(1, Date.now() - g), c = Math.max(g, c), i = b.timeRemaining(), 1.5 * c > i)
                return e - g < -20 && console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(e - g))}ms`), void this._start();
              e = i;
            }
            this.clear();
          }
        }
        class d extends f {
          _requestCallback(b) {
            return setTimeout(() => b(this._createDeadline(16)));
          }
          _cancelCallback(b) {
            clearTimeout(b);
          }
          _createDeadline(b) {
            const g = Date.now() + b;
            return { timeRemaining: () => Math.max(0, g - Date.now()) };
          }
        }
        r.PriorityTaskQueue = d, r.IdleTaskQueue = !h.isNode && "requestIdleCallback" in window ? class extends f {
          _requestCallback(u) {
            return requestIdleCallback(u);
          }
          _cancelCallback(u) {
            cancelIdleCallback(u);
          }
        } : d, r.DebouncedIdleTask = class {
          constructor() {
            this._queue = new r.IdleTaskQueue();
          }
          set(u) {
            this._queue.clear(), this._queue.enqueue(u);
          }
          flush() {
            this._queue.flush();
          }
        };
      }, 9282: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.updateWindowsModeWrappedState = void 0;
        const h = a(643);
        r.updateWindowsModeWrappedState = function(f) {
          const d = f.buffer.lines.get(f.buffer.ybase + f.buffer.y - 1), u = d == null ? void 0 : d.get(f.cols - 1), b = f.buffer.lines.get(f.buffer.ybase + f.buffer.y);
          b && u && (b.isWrapped = u[h.CHAR_DATA_CODE_INDEX] !== h.NULL_CELL_CODE && u[h.CHAR_DATA_CODE_INDEX] !== h.WHITESPACE_CELL_CODE);
        };
      }, 3734: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ExtendedAttrs = r.AttributeData = void 0;
        class a {
          constructor() {
            this.fg = 0, this.bg = 0, this.extended = new h();
          }
          static toColorRGB(d) {
            return [d >>> 16 & 255, d >>> 8 & 255, 255 & d];
          }
          static fromColorRGB(d) {
            return (255 & d[0]) << 16 | (255 & d[1]) << 8 | 255 & d[2];
          }
          clone() {
            const d = new a();
            return d.fg = this.fg, d.bg = this.bg, d.extended = this.extended.clone(), d;
          }
          isInverse() {
            return 67108864 & this.fg;
          }
          isBold() {
            return 134217728 & this.fg;
          }
          isUnderline() {
            return this.hasExtendedAttrs() && this.extended.underlineStyle !== 0 ? 1 : 268435456 & this.fg;
          }
          isBlink() {
            return 536870912 & this.fg;
          }
          isInvisible() {
            return 1073741824 & this.fg;
          }
          isItalic() {
            return 67108864 & this.bg;
          }
          isDim() {
            return 134217728 & this.bg;
          }
          isStrikethrough() {
            return 2147483648 & this.fg;
          }
          isProtected() {
            return 536870912 & this.bg;
          }
          getFgColorMode() {
            return 50331648 & this.fg;
          }
          getBgColorMode() {
            return 50331648 & this.bg;
          }
          isFgRGB() {
            return (50331648 & this.fg) == 50331648;
          }
          isBgRGB() {
            return (50331648 & this.bg) == 50331648;
          }
          isFgPalette() {
            return (50331648 & this.fg) == 16777216 || (50331648 & this.fg) == 33554432;
          }
          isBgPalette() {
            return (50331648 & this.bg) == 16777216 || (50331648 & this.bg) == 33554432;
          }
          isFgDefault() {
            return (50331648 & this.fg) == 0;
          }
          isBgDefault() {
            return (50331648 & this.bg) == 0;
          }
          isAttributeDefault() {
            return this.fg === 0 && this.bg === 0;
          }
          getFgColor() {
            switch (50331648 & this.fg) {
              case 16777216:
              case 33554432:
                return 255 & this.fg;
              case 50331648:
                return 16777215 & this.fg;
              default:
                return -1;
            }
          }
          getBgColor() {
            switch (50331648 & this.bg) {
              case 16777216:
              case 33554432:
                return 255 & this.bg;
              case 50331648:
                return 16777215 & this.bg;
              default:
                return -1;
            }
          }
          hasExtendedAttrs() {
            return 268435456 & this.bg;
          }
          updateExtended() {
            this.extended.isEmpty() ? this.bg &= -268435457 : this.bg |= 268435456;
          }
          getUnderlineColor() {
            if (268435456 & this.bg && ~this.extended.underlineColor)
              switch (50331648 & this.extended.underlineColor) {
                case 16777216:
                case 33554432:
                  return 255 & this.extended.underlineColor;
                case 50331648:
                  return 16777215 & this.extended.underlineColor;
                default:
                  return this.getFgColor();
              }
            return this.getFgColor();
          }
          getUnderlineColorMode() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? 50331648 & this.extended.underlineColor : this.getFgColorMode();
          }
          isUnderlineColorRGB() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 50331648 : this.isFgRGB();
          }
          isUnderlineColorPalette() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 16777216 || (50331648 & this.extended.underlineColor) == 33554432 : this.isFgPalette();
          }
          isUnderlineColorDefault() {
            return 268435456 & this.bg && ~this.extended.underlineColor ? (50331648 & this.extended.underlineColor) == 0 : this.isFgDefault();
          }
          getUnderlineStyle() {
            return 268435456 & this.fg ? 268435456 & this.bg ? this.extended.underlineStyle : 1 : 0;
          }
        }
        r.AttributeData = a;
        class h {
          constructor(d = 0, u = 0) {
            this._ext = 0, this._urlId = 0, this._ext = d, this._urlId = u;
          }
          get ext() {
            return this._urlId ? -469762049 & this._ext | this.underlineStyle << 26 : this._ext;
          }
          set ext(d) {
            this._ext = d;
          }
          get underlineStyle() {
            return this._urlId ? 5 : (469762048 & this._ext) >> 26;
          }
          set underlineStyle(d) {
            this._ext &= -469762049, this._ext |= d << 26 & 469762048;
          }
          get underlineColor() {
            return 67108863 & this._ext;
          }
          set underlineColor(d) {
            this._ext &= -67108864, this._ext |= 67108863 & d;
          }
          get urlId() {
            return this._urlId;
          }
          set urlId(d) {
            this._urlId = d;
          }
          clone() {
            return new h(this._ext, this._urlId);
          }
          isEmpty() {
            return this.underlineStyle === 0 && this._urlId === 0;
          }
        }
        r.ExtendedAttrs = h;
      }, 9092: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferStringIterator = r.Buffer = r.MAX_BUFFER_SIZE = void 0;
        const h = a(6349), f = a(8437), d = a(511), u = a(643), b = a(4634), g = a(4863), c = a(7116), e = a(3734), i = a(7226);
        r.MAX_BUFFER_SIZE = 4294967295, r.Buffer = class {
          constructor(t, s, l) {
            this._hasScrollback = t, this._optionsService = s, this._bufferService = l, this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.tabs = {}, this.savedY = 0, this.savedX = 0, this.savedCurAttrData = f.DEFAULT_ATTR_DATA.clone(), this.savedCharset = c.DEFAULT_CHARSET, this.markers = [], this._nullCell = d.CellData.fromCharData([0, u.NULL_CELL_CHAR, u.NULL_CELL_WIDTH, u.NULL_CELL_CODE]), this._whitespaceCell = d.CellData.fromCharData([0, u.WHITESPACE_CELL_CHAR, u.WHITESPACE_CELL_WIDTH, u.WHITESPACE_CELL_CODE]), this._isClearing = !1, this._memoryCleanupQueue = new i.IdleTaskQueue(), this._memoryCleanupPosition = 0, this._cols = this._bufferService.cols, this._rows = this._bufferService.rows, this.lines = new h.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
          }
          getNullCell(t) {
            return t ? (this._nullCell.fg = t.fg, this._nullCell.bg = t.bg, this._nullCell.extended = t.extended) : (this._nullCell.fg = 0, this._nullCell.bg = 0, this._nullCell.extended = new e.ExtendedAttrs()), this._nullCell;
          }
          getWhitespaceCell(t) {
            return t ? (this._whitespaceCell.fg = t.fg, this._whitespaceCell.bg = t.bg, this._whitespaceCell.extended = t.extended) : (this._whitespaceCell.fg = 0, this._whitespaceCell.bg = 0, this._whitespaceCell.extended = new e.ExtendedAttrs()), this._whitespaceCell;
          }
          getBlankLine(t, s) {
            return new f.BufferLine(this._bufferService.cols, this.getNullCell(t), s);
          }
          get hasScrollback() {
            return this._hasScrollback && this.lines.maxLength > this._rows;
          }
          get isCursorInViewport() {
            const t = this.ybase + this.y - this.ydisp;
            return t >= 0 && t < this._rows;
          }
          _getCorrectBufferLength(t) {
            if (!this._hasScrollback)
              return t;
            const s = t + this._optionsService.rawOptions.scrollback;
            return s > r.MAX_BUFFER_SIZE ? r.MAX_BUFFER_SIZE : s;
          }
          fillViewportRows(t) {
            if (this.lines.length === 0) {
              t === void 0 && (t = f.DEFAULT_ATTR_DATA);
              let s = this._rows;
              for (; s--; )
                this.lines.push(this.getBlankLine(t));
            }
          }
          clear() {
            this.ydisp = 0, this.ybase = 0, this.y = 0, this.x = 0, this.lines = new h.CircularList(this._getCorrectBufferLength(this._rows)), this.scrollTop = 0, this.scrollBottom = this._rows - 1, this.setupTabStops();
          }
          resize(t, s) {
            const l = this.getNullCell(f.DEFAULT_ATTR_DATA);
            let _ = 0;
            const m = this._getCorrectBufferLength(s);
            if (m > this.lines.maxLength && (this.lines.maxLength = m), this.lines.length > 0) {
              if (this._cols < t)
                for (let v = 0; v < this.lines.length; v++)
                  _ += +this.lines.get(v).resize(t, l);
              let o = 0;
              if (this._rows < s)
                for (let v = this._rows; v < s; v++)
                  this.lines.length < s + this.ybase && (this._optionsService.rawOptions.windowsMode ? this.lines.push(new f.BufferLine(t, l)) : this.ybase > 0 && this.lines.length <= this.ybase + this.y + o + 1 ? (this.ybase--, o++, this.ydisp > 0 && this.ydisp--) : this.lines.push(new f.BufferLine(t, l)));
              else
                for (let v = this._rows; v > s; v--)
                  this.lines.length > s + this.ybase && (this.lines.length > this.ybase + this.y + 1 ? this.lines.pop() : (this.ybase++, this.ydisp++));
              if (m < this.lines.maxLength) {
                const v = this.lines.length - m;
                v > 0 && (this.lines.trimStart(v), this.ybase = Math.max(this.ybase - v, 0), this.ydisp = Math.max(this.ydisp - v, 0), this.savedY = Math.max(this.savedY - v, 0)), this.lines.maxLength = m;
              }
              this.x = Math.min(this.x, t - 1), this.y = Math.min(this.y, s - 1), o && (this.y += o), this.savedX = Math.min(this.savedX, t - 1), this.scrollTop = 0;
            }
            if (this.scrollBottom = s - 1, this._isReflowEnabled && (this._reflow(t, s), this._cols > t))
              for (let o = 0; o < this.lines.length; o++)
                _ += +this.lines.get(o).resize(t, l);
            this._cols = t, this._rows = s, this._memoryCleanupQueue.clear(), _ > 0.1 * this.lines.length && (this._memoryCleanupPosition = 0, this._memoryCleanupQueue.enqueue(() => this._batchedMemoryCleanup()));
          }
          _batchedMemoryCleanup() {
            let t = !0;
            this._memoryCleanupPosition >= this.lines.length && (this._memoryCleanupPosition = 0, t = !1);
            let s = 0;
            for (; this._memoryCleanupPosition < this.lines.length; )
              if (s += this.lines.get(this._memoryCleanupPosition++).cleanupMemory(), s > 100)
                return !0;
            return t;
          }
          get _isReflowEnabled() {
            return this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
          }
          _reflow(t, s) {
            this._cols !== t && (t > this._cols ? this._reflowLarger(t, s) : this._reflowSmaller(t, s));
          }
          _reflowLarger(t, s) {
            const l = (0, b.reflowLargerGetLinesToRemove)(this.lines, this._cols, t, this.ybase + this.y, this.getNullCell(f.DEFAULT_ATTR_DATA));
            if (l.length > 0) {
              const _ = (0, b.reflowLargerCreateNewLayout)(this.lines, l);
              (0, b.reflowLargerApplyNewLayout)(this.lines, _.layout), this._reflowLargerAdjustViewport(t, s, _.countRemoved);
            }
          }
          _reflowLargerAdjustViewport(t, s, l) {
            const _ = this.getNullCell(f.DEFAULT_ATTR_DATA);
            let m = l;
            for (; m-- > 0; )
              this.ybase === 0 ? (this.y > 0 && this.y--, this.lines.length < s && this.lines.push(new f.BufferLine(t, _))) : (this.ydisp === this.ybase && this.ydisp--, this.ybase--);
            this.savedY = Math.max(this.savedY - l, 0);
          }
          _reflowSmaller(t, s) {
            const l = this.getNullCell(f.DEFAULT_ATTR_DATA), _ = [];
            let m = 0;
            for (let o = this.lines.length - 1; o >= 0; o--) {
              let v = this.lines.get(o);
              if (!v || !v.isWrapped && v.getTrimmedLength() <= t)
                continue;
              const S = [v];
              for (; v.isWrapped && o > 0; )
                v = this.lines.get(--o), S.unshift(v);
              const y = this.ybase + this.y;
              if (y >= o && y < o + S.length)
                continue;
              const w = S[S.length - 1].getTrimmedLength(), L = (0, b.reflowSmallerGetNewLineLengths)(S, this._cols, t), M = L.length - S.length;
              let I;
              I = this.ybase === 0 && this.y !== this.lines.length - 1 ? Math.max(0, this.y - this.lines.maxLength + M) : Math.max(0, this.lines.length - this.lines.maxLength + M);
              const W = [];
              for (let F = 0; F < M; F++) {
                const Y = this.getBlankLine(f.DEFAULT_ATTR_DATA, !0);
                W.push(Y);
              }
              W.length > 0 && (_.push({ start: o + S.length + m, newLines: W }), m += W.length), S.push(...W);
              let p = L.length - 1, C = L[p];
              C === 0 && (p--, C = L[p]);
              let E = S.length - M - 1, R = w;
              for (; E >= 0; ) {
                const F = Math.min(R, C);
                if (S[p] === void 0)
                  break;
                if (S[p].copyCellsFrom(S[E], R - F, C - F, F, !0), C -= F, C === 0 && (p--, C = L[p]), R -= F, R === 0) {
                  E--;
                  const Y = Math.max(E, 0);
                  R = (0, b.getWrappedLineTrimmedLength)(S, Y, this._cols);
                }
              }
              for (let F = 0; F < S.length; F++)
                L[F] < t && S[F].setCell(L[F], l);
              let O = M - I;
              for (; O-- > 0; )
                this.ybase === 0 ? this.y < s - 1 ? (this.y++, this.lines.pop()) : (this.ybase++, this.ydisp++) : this.ybase < Math.min(this.lines.maxLength, this.lines.length + m) - s && (this.ybase === this.ydisp && this.ydisp++, this.ybase++);
              this.savedY = Math.min(this.savedY + M, this.ybase + s - 1);
            }
            if (_.length > 0) {
              const o = [], v = [];
              for (let p = 0; p < this.lines.length; p++)
                v.push(this.lines.get(p));
              const S = this.lines.length;
              let y = S - 1, w = 0, L = _[w];
              this.lines.length = Math.min(this.lines.maxLength, this.lines.length + m);
              let M = 0;
              for (let p = Math.min(this.lines.maxLength - 1, S + m - 1); p >= 0; p--)
                if (L && L.start > y + M) {
                  for (let C = L.newLines.length - 1; C >= 0; C--)
                    this.lines.set(p--, L.newLines[C]);
                  p++, o.push({ index: y + 1, amount: L.newLines.length }), M += L.newLines.length, L = _[++w];
                } else
                  this.lines.set(p, v[y--]);
              let I = 0;
              for (let p = o.length - 1; p >= 0; p--)
                o[p].index += I, this.lines.onInsertEmitter.fire(o[p]), I += o[p].amount;
              const W = Math.max(0, S + m - this.lines.maxLength);
              W > 0 && this.lines.onTrimEmitter.fire(W);
            }
          }
          stringIndexToBufferIndex(t, s, l = !1) {
            for (; s; ) {
              const _ = this.lines.get(t);
              if (!_)
                return [-1, -1];
              const m = l ? _.getTrimmedLength() : _.length;
              for (let o = 0; o < m; ++o)
                if (_.get(o)[u.CHAR_DATA_WIDTH_INDEX] && (s -= _.get(o)[u.CHAR_DATA_CHAR_INDEX].length || 1), s < 0)
                  return [t, o];
              t++;
            }
            return [t, 0];
          }
          translateBufferLineToString(t, s, l = 0, _) {
            const m = this.lines.get(t);
            return m ? m.translateToString(s, l, _) : "";
          }
          getWrappedRangeForLine(t) {
            let s = t, l = t;
            for (; s > 0 && this.lines.get(s).isWrapped; )
              s--;
            for (; l + 1 < this.lines.length && this.lines.get(l + 1).isWrapped; )
              l++;
            return { first: s, last: l };
          }
          setupTabStops(t) {
            for (t != null ? this.tabs[t] || (t = this.prevStop(t)) : (this.tabs = {}, t = 0); t < this._cols; t += this._optionsService.rawOptions.tabStopWidth)
              this.tabs[t] = !0;
          }
          prevStop(t) {
            for (t == null && (t = this.x); !this.tabs[--t] && t > 0; )
              ;
            return t >= this._cols ? this._cols - 1 : t < 0 ? 0 : t;
          }
          nextStop(t) {
            for (t == null && (t = this.x); !this.tabs[++t] && t < this._cols; )
              ;
            return t >= this._cols ? this._cols - 1 : t < 0 ? 0 : t;
          }
          clearMarkers(t) {
            this._isClearing = !0;
            for (let s = 0; s < this.markers.length; s++)
              this.markers[s].line === t && (this.markers[s].dispose(), this.markers.splice(s--, 1));
            this._isClearing = !1;
          }
          clearAllMarkers() {
            this._isClearing = !0;
            for (let t = 0; t < this.markers.length; t++)
              this.markers[t].dispose(), this.markers.splice(t--, 1);
            this._isClearing = !1;
          }
          addMarker(t) {
            const s = new g.Marker(t);
            return this.markers.push(s), s.register(this.lines.onTrim((l) => {
              s.line -= l, s.line < 0 && s.dispose();
            })), s.register(this.lines.onInsert((l) => {
              s.line >= l.index && (s.line += l.amount);
            })), s.register(this.lines.onDelete((l) => {
              s.line >= l.index && s.line < l.index + l.amount && s.dispose(), s.line > l.index && (s.line -= l.amount);
            })), s.register(s.onDispose(() => this._removeMarker(s))), s;
          }
          _removeMarker(t) {
            this._isClearing || this.markers.splice(this.markers.indexOf(t), 1);
          }
          iterator(t, s, l, _, m) {
            return new n(this, t, s, l, _, m);
          }
        };
        class n {
          constructor(s, l, _ = 0, m = s.lines.length, o = 0, v = 0) {
            this._buffer = s, this._trimRight = l, this._startIndex = _, this._endIndex = m, this._startOverscan = o, this._endOverscan = v, this._startIndex < 0 && (this._startIndex = 0), this._endIndex > this._buffer.lines.length && (this._endIndex = this._buffer.lines.length), this._current = this._startIndex;
          }
          hasNext() {
            return this._current < this._endIndex;
          }
          next() {
            const s = this._buffer.getWrappedRangeForLine(this._current);
            s.first < this._startIndex - this._startOverscan && (s.first = this._startIndex - this._startOverscan), s.last > this._endIndex + this._endOverscan && (s.last = this._endIndex + this._endOverscan), s.first = Math.max(s.first, 0), s.last = Math.min(s.last, this._buffer.lines.length);
            let l = "";
            for (let _ = s.first; _ <= s.last; ++_)
              l += this._buffer.translateBufferLineToString(_, this._trimRight);
            return this._current = s.last + 1, { range: s, content: l };
          }
        }
        r.BufferStringIterator = n;
      }, 8437: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferLine = r.DEFAULT_ATTR_DATA = void 0;
        const h = a(482), f = a(643), d = a(511), u = a(3734);
        r.DEFAULT_ATTR_DATA = Object.freeze(new u.AttributeData());
        let b = 0;
        class g {
          constructor(e, i, n = !1) {
            this.isWrapped = n, this._combined = {}, this._extendedAttrs = {}, this._data = new Uint32Array(3 * e);
            const t = i || d.CellData.fromCharData([0, f.NULL_CELL_CHAR, f.NULL_CELL_WIDTH, f.NULL_CELL_CODE]);
            for (let s = 0; s < e; ++s)
              this.setCell(s, t);
            this.length = e;
          }
          get(e) {
            const i = this._data[3 * e + 0], n = 2097151 & i;
            return [this._data[3 * e + 1], 2097152 & i ? this._combined[e] : n ? (0, h.stringFromCodePoint)(n) : "", i >> 22, 2097152 & i ? this._combined[e].charCodeAt(this._combined[e].length - 1) : n];
          }
          set(e, i) {
            this._data[3 * e + 1] = i[f.CHAR_DATA_ATTR_INDEX], i[f.CHAR_DATA_CHAR_INDEX].length > 1 ? (this._combined[e] = i[1], this._data[3 * e + 0] = 2097152 | e | i[f.CHAR_DATA_WIDTH_INDEX] << 22) : this._data[3 * e + 0] = i[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | i[f.CHAR_DATA_WIDTH_INDEX] << 22;
          }
          getWidth(e) {
            return this._data[3 * e + 0] >> 22;
          }
          hasWidth(e) {
            return 12582912 & this._data[3 * e + 0];
          }
          getFg(e) {
            return this._data[3 * e + 1];
          }
          getBg(e) {
            return this._data[3 * e + 2];
          }
          hasContent(e) {
            return 4194303 & this._data[3 * e + 0];
          }
          getCodePoint(e) {
            const i = this._data[3 * e + 0];
            return 2097152 & i ? this._combined[e].charCodeAt(this._combined[e].length - 1) : 2097151 & i;
          }
          isCombined(e) {
            return 2097152 & this._data[3 * e + 0];
          }
          getString(e) {
            const i = this._data[3 * e + 0];
            return 2097152 & i ? this._combined[e] : 2097151 & i ? (0, h.stringFromCodePoint)(2097151 & i) : "";
          }
          isProtected(e) {
            return 536870912 & this._data[3 * e + 2];
          }
          loadCell(e, i) {
            return b = 3 * e, i.content = this._data[b + 0], i.fg = this._data[b + 1], i.bg = this._data[b + 2], 2097152 & i.content && (i.combinedData = this._combined[e]), 268435456 & i.bg && (i.extended = this._extendedAttrs[e]), i;
          }
          setCell(e, i) {
            2097152 & i.content && (this._combined[e] = i.combinedData), 268435456 & i.bg && (this._extendedAttrs[e] = i.extended), this._data[3 * e + 0] = i.content, this._data[3 * e + 1] = i.fg, this._data[3 * e + 2] = i.bg;
          }
          setCellFromCodePoint(e, i, n, t, s, l) {
            268435456 & s && (this._extendedAttrs[e] = l), this._data[3 * e + 0] = i | n << 22, this._data[3 * e + 1] = t, this._data[3 * e + 2] = s;
          }
          addCodepointToCell(e, i) {
            let n = this._data[3 * e + 0];
            2097152 & n ? this._combined[e] += (0, h.stringFromCodePoint)(i) : (2097151 & n ? (this._combined[e] = (0, h.stringFromCodePoint)(2097151 & n) + (0, h.stringFromCodePoint)(i), n &= -2097152, n |= 2097152) : n = i | 4194304, this._data[3 * e + 0] = n);
          }
          insertCells(e, i, n, t) {
            if ((e %= this.length) && this.getWidth(e - 1) === 2 && this.setCellFromCodePoint(e - 1, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()), i < this.length - e) {
              const s = new d.CellData();
              for (let l = this.length - e - i - 1; l >= 0; --l)
                this.setCell(e + i + l, this.loadCell(e + l, s));
              for (let l = 0; l < i; ++l)
                this.setCell(e + l, n);
            } else
              for (let s = e; s < this.length; ++s)
                this.setCell(s, n);
            this.getWidth(this.length - 1) === 2 && this.setCellFromCodePoint(this.length - 1, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs());
          }
          deleteCells(e, i, n, t) {
            if (e %= this.length, i < this.length - e) {
              const s = new d.CellData();
              for (let l = 0; l < this.length - e - i; ++l)
                this.setCell(e + l, this.loadCell(e + i + l, s));
              for (let l = this.length - i; l < this.length; ++l)
                this.setCell(l, n);
            } else
              for (let s = e; s < this.length; ++s)
                this.setCell(s, n);
            e && this.getWidth(e - 1) === 2 && this.setCellFromCodePoint(e - 1, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()), this.getWidth(e) !== 0 || this.hasContent(e) || this.setCellFromCodePoint(e, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs());
          }
          replaceCells(e, i, n, t, s = !1) {
            if (s)
              for (e && this.getWidth(e - 1) === 2 && !this.isProtected(e - 1) && this.setCellFromCodePoint(e - 1, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()), i < this.length && this.getWidth(i - 1) === 2 && !this.isProtected(i) && this.setCellFromCodePoint(i, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()); e < i && e < this.length; )
                this.isProtected(e) || this.setCell(e, n), e++;
            else
              for (e && this.getWidth(e - 1) === 2 && this.setCellFromCodePoint(e - 1, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()), i < this.length && this.getWidth(i - 1) === 2 && this.setCellFromCodePoint(i, 0, 1, (t == null ? void 0 : t.fg) || 0, (t == null ? void 0 : t.bg) || 0, (t == null ? void 0 : t.extended) || new u.ExtendedAttrs()); e < i && e < this.length; )
                this.setCell(e++, n);
          }
          resize(e, i) {
            if (e === this.length)
              return 4 * this._data.length * 2 < this._data.buffer.byteLength;
            const n = 3 * e;
            if (e > this.length) {
              if (this._data.buffer.byteLength >= 4 * n)
                this._data = new Uint32Array(this._data.buffer, 0, n);
              else {
                const t = new Uint32Array(n);
                t.set(this._data), this._data = t;
              }
              for (let t = this.length; t < e; ++t)
                this.setCell(t, i);
            } else {
              this._data = this._data.subarray(0, n);
              const t = Object.keys(this._combined);
              for (let l = 0; l < t.length; l++) {
                const _ = parseInt(t[l], 10);
                _ >= e && delete this._combined[_];
              }
              const s = Object.keys(this._extendedAttrs);
              for (let l = 0; l < s.length; l++) {
                const _ = parseInt(s[l], 10);
                _ >= e && delete this._extendedAttrs[_];
              }
            }
            return this.length = e, 4 * n * 2 < this._data.buffer.byteLength;
          }
          cleanupMemory() {
            if (4 * this._data.length * 2 < this._data.buffer.byteLength) {
              const e = new Uint32Array(this._data.length);
              return e.set(this._data), this._data = e, 1;
            }
            return 0;
          }
          fill(e, i = !1) {
            if (i)
              for (let n = 0; n < this.length; ++n)
                this.isProtected(n) || this.setCell(n, e);
            else {
              this._combined = {}, this._extendedAttrs = {};
              for (let n = 0; n < this.length; ++n)
                this.setCell(n, e);
            }
          }
          copyFrom(e) {
            this.length !== e.length ? this._data = new Uint32Array(e._data) : this._data.set(e._data), this.length = e.length, this._combined = {};
            for (const i in e._combined)
              this._combined[i] = e._combined[i];
            this._extendedAttrs = {};
            for (const i in e._extendedAttrs)
              this._extendedAttrs[i] = e._extendedAttrs[i];
            this.isWrapped = e.isWrapped;
          }
          clone() {
            const e = new g(0);
            e._data = new Uint32Array(this._data), e.length = this.length;
            for (const i in this._combined)
              e._combined[i] = this._combined[i];
            for (const i in this._extendedAttrs)
              e._extendedAttrs[i] = this._extendedAttrs[i];
            return e.isWrapped = this.isWrapped, e;
          }
          getTrimmedLength() {
            for (let e = this.length - 1; e >= 0; --e)
              if (4194303 & this._data[3 * e + 0])
                return e + (this._data[3 * e + 0] >> 22);
            return 0;
          }
          copyCellsFrom(e, i, n, t, s) {
            const l = e._data;
            if (s)
              for (let m = t - 1; m >= 0; m--) {
                for (let o = 0; o < 3; o++)
                  this._data[3 * (n + m) + o] = l[3 * (i + m) + o];
                268435456 & l[3 * (i + m) + 2] && (this._extendedAttrs[n + m] = e._extendedAttrs[i + m]);
              }
            else
              for (let m = 0; m < t; m++) {
                for (let o = 0; o < 3; o++)
                  this._data[3 * (n + m) + o] = l[3 * (i + m) + o];
                268435456 & l[3 * (i + m) + 2] && (this._extendedAttrs[n + m] = e._extendedAttrs[i + m]);
              }
            const _ = Object.keys(e._combined);
            for (let m = 0; m < _.length; m++) {
              const o = parseInt(_[m], 10);
              o >= i && (this._combined[o - i + n] = e._combined[o]);
            }
          }
          translateToString(e = !1, i = 0, n = this.length) {
            e && (n = Math.min(n, this.getTrimmedLength()));
            let t = "";
            for (; i < n; ) {
              const s = this._data[3 * i + 0], l = 2097151 & s;
              t += 2097152 & s ? this._combined[i] : l ? (0, h.stringFromCodePoint)(l) : f.WHITESPACE_CELL_CHAR, i += s >> 22 || 1;
            }
            return t;
          }
        }
        r.BufferLine = g;
      }, 4841: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.getRangeLength = void 0, r.getRangeLength = function(a, h) {
          if (a.start.y > a.end.y)
            throw new Error(`Buffer range end (${a.end.x}, ${a.end.y}) cannot be before start (${a.start.x}, ${a.start.y})`);
          return h * (a.end.y - a.start.y) + (a.end.x - a.start.x + 1);
        };
      }, 4634: (T, r) => {
        function a(h, f, d) {
          if (f === h.length - 1)
            return h[f].getTrimmedLength();
          const u = !h[f].hasContent(d - 1) && h[f].getWidth(d - 1) === 1, b = h[f + 1].getWidth(0) === 2;
          return u && b ? d - 1 : d;
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.getWrappedLineTrimmedLength = r.reflowSmallerGetNewLineLengths = r.reflowLargerApplyNewLayout = r.reflowLargerCreateNewLayout = r.reflowLargerGetLinesToRemove = void 0, r.reflowLargerGetLinesToRemove = function(h, f, d, u, b) {
          const g = [];
          for (let c = 0; c < h.length - 1; c++) {
            let e = c, i = h.get(++e);
            if (!i.isWrapped)
              continue;
            const n = [h.get(c)];
            for (; e < h.length && i.isWrapped; )
              n.push(i), i = h.get(++e);
            if (u >= c && u < e) {
              c += n.length - 1;
              continue;
            }
            let t = 0, s = a(n, t, f), l = 1, _ = 0;
            for (; l < n.length; ) {
              const o = a(n, l, f), v = o - _, S = d - s, y = Math.min(v, S);
              n[t].copyCellsFrom(n[l], _, s, y, !1), s += y, s === d && (t++, s = 0), _ += y, _ === o && (l++, _ = 0), s === 0 && t !== 0 && n[t - 1].getWidth(d - 1) === 2 && (n[t].copyCellsFrom(n[t - 1], d - 1, s++, 1, !1), n[t - 1].setCell(d - 1, b));
            }
            n[t].replaceCells(s, d, b);
            let m = 0;
            for (let o = n.length - 1; o > 0 && (o > t || n[o].getTrimmedLength() === 0); o--)
              m++;
            m > 0 && (g.push(c + n.length - m), g.push(m)), c += n.length - 1;
          }
          return g;
        }, r.reflowLargerCreateNewLayout = function(h, f) {
          const d = [];
          let u = 0, b = f[u], g = 0;
          for (let c = 0; c < h.length; c++)
            if (b === c) {
              const e = f[++u];
              h.onDeleteEmitter.fire({ index: c - g, amount: e }), c += e - 1, g += e, b = f[++u];
            } else
              d.push(c);
          return { layout: d, countRemoved: g };
        }, r.reflowLargerApplyNewLayout = function(h, f) {
          const d = [];
          for (let u = 0; u < f.length; u++)
            d.push(h.get(f[u]));
          for (let u = 0; u < d.length; u++)
            h.set(u, d[u]);
          h.length = f.length;
        }, r.reflowSmallerGetNewLineLengths = function(h, f, d) {
          const u = [], b = h.map((i, n) => a(h, n, f)).reduce((i, n) => i + n);
          let g = 0, c = 0, e = 0;
          for (; e < b; ) {
            if (b - e < d) {
              u.push(b - e);
              break;
            }
            g += d;
            const i = a(h, c, f);
            g > i && (g -= i, c++);
            const n = h[c].getWidth(g - 1) === 2;
            n && g--;
            const t = n ? d - 1 : d;
            u.push(t), e += t;
          }
          return u;
        }, r.getWrappedLineTrimmedLength = a;
      }, 5295: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferSet = void 0;
        const h = a(9092), f = a(8460), d = a(844);
        class u extends d.Disposable {
          constructor(g, c) {
            super(), this._optionsService = g, this._bufferService = c, this._onBufferActivate = this.register(new f.EventEmitter()), this.onBufferActivate = this._onBufferActivate.event, this.reset(), this.register(this._optionsService.onSpecificOptionChange("scrollback", () => this.resize(this._bufferService.cols, this._bufferService.rows))), this.register(this._optionsService.onSpecificOptionChange("tabStopWidth", () => this.setupTabStops()));
          }
          reset() {
            this._normal = new h.Buffer(!0, this._optionsService, this._bufferService), this._normal.fillViewportRows(), this._alt = new h.Buffer(!1, this._optionsService, this._bufferService), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }), this.setupTabStops();
          }
          get alt() {
            return this._alt;
          }
          get active() {
            return this._activeBuffer;
          }
          get normal() {
            return this._normal;
          }
          activateNormalBuffer() {
            this._activeBuffer !== this._normal && (this._normal.x = this._alt.x, this._normal.y = this._alt.y, this._alt.clearAllMarkers(), this._alt.clear(), this._activeBuffer = this._normal, this._onBufferActivate.fire({ activeBuffer: this._normal, inactiveBuffer: this._alt }));
          }
          activateAltBuffer(g) {
            this._activeBuffer !== this._alt && (this._alt.fillViewportRows(g), this._alt.x = this._normal.x, this._alt.y = this._normal.y, this._activeBuffer = this._alt, this._onBufferActivate.fire({ activeBuffer: this._alt, inactiveBuffer: this._normal }));
          }
          resize(g, c) {
            this._normal.resize(g, c), this._alt.resize(g, c), this.setupTabStops(g);
          }
          setupTabStops(g) {
            this._normal.setupTabStops(g), this._alt.setupTabStops(g);
          }
        }
        r.BufferSet = u;
      }, 511: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CellData = void 0;
        const h = a(482), f = a(643), d = a(3734);
        class u extends d.AttributeData {
          constructor() {
            super(...arguments), this.content = 0, this.fg = 0, this.bg = 0, this.extended = new d.ExtendedAttrs(), this.combinedData = "";
          }
          static fromCharData(g) {
            const c = new u();
            return c.setFromCharData(g), c;
          }
          isCombined() {
            return 2097152 & this.content;
          }
          getWidth() {
            return this.content >> 22;
          }
          getChars() {
            return 2097152 & this.content ? this.combinedData : 2097151 & this.content ? (0, h.stringFromCodePoint)(2097151 & this.content) : "";
          }
          getCode() {
            return this.isCombined() ? this.combinedData.charCodeAt(this.combinedData.length - 1) : 2097151 & this.content;
          }
          setFromCharData(g) {
            this.fg = g[f.CHAR_DATA_ATTR_INDEX], this.bg = 0;
            let c = !1;
            if (g[f.CHAR_DATA_CHAR_INDEX].length > 2)
              c = !0;
            else if (g[f.CHAR_DATA_CHAR_INDEX].length === 2) {
              const e = g[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0);
              if (55296 <= e && e <= 56319) {
                const i = g[f.CHAR_DATA_CHAR_INDEX].charCodeAt(1);
                56320 <= i && i <= 57343 ? this.content = 1024 * (e - 55296) + i - 56320 + 65536 | g[f.CHAR_DATA_WIDTH_INDEX] << 22 : c = !0;
              } else
                c = !0;
            } else
              this.content = g[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0) | g[f.CHAR_DATA_WIDTH_INDEX] << 22;
            c && (this.combinedData = g[f.CHAR_DATA_CHAR_INDEX], this.content = 2097152 | g[f.CHAR_DATA_WIDTH_INDEX] << 22);
          }
          getAsCharData() {
            return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
          }
        }
        r.CellData = u;
      }, 643: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.WHITESPACE_CELL_CODE = r.WHITESPACE_CELL_WIDTH = r.WHITESPACE_CELL_CHAR = r.NULL_CELL_CODE = r.NULL_CELL_WIDTH = r.NULL_CELL_CHAR = r.CHAR_DATA_CODE_INDEX = r.CHAR_DATA_WIDTH_INDEX = r.CHAR_DATA_CHAR_INDEX = r.CHAR_DATA_ATTR_INDEX = r.DEFAULT_EXT = r.DEFAULT_ATTR = r.DEFAULT_COLOR = void 0, r.DEFAULT_COLOR = 0, r.DEFAULT_ATTR = 256 | r.DEFAULT_COLOR << 9, r.DEFAULT_EXT = 0, r.CHAR_DATA_ATTR_INDEX = 0, r.CHAR_DATA_CHAR_INDEX = 1, r.CHAR_DATA_WIDTH_INDEX = 2, r.CHAR_DATA_CODE_INDEX = 3, r.NULL_CELL_CHAR = "", r.NULL_CELL_WIDTH = 1, r.NULL_CELL_CODE = 0, r.WHITESPACE_CELL_CHAR = " ", r.WHITESPACE_CELL_WIDTH = 1, r.WHITESPACE_CELL_CODE = 32;
      }, 4863: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Marker = void 0;
        const h = a(8460), f = a(844);
        class d {
          constructor(b) {
            this.line = b, this.isDisposed = !1, this._disposables = [], this._id = d._nextId++, this._onDispose = this.register(new h.EventEmitter()), this.onDispose = this._onDispose.event;
          }
          get id() {
            return this._id;
          }
          dispose() {
            this.isDisposed || (this.isDisposed = !0, this.line = -1, this._onDispose.fire(), (0, f.disposeArray)(this._disposables), this._disposables.length = 0);
          }
          register(b) {
            return this._disposables.push(b), b;
          }
        }
        r.Marker = d, d._nextId = 1;
      }, 7116: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DEFAULT_CHARSET = r.CHARSETS = void 0, r.CHARSETS = {}, r.DEFAULT_CHARSET = r.CHARSETS.B, r.CHARSETS[0] = { "`": "◆", a: "▒", b: "␉", c: "␌", d: "␍", e: "␊", f: "°", g: "±", h: "␤", i: "␋", j: "┘", k: "┐", l: "┌", m: "└", n: "┼", o: "⎺", p: "⎻", q: "─", r: "⎼", s: "⎽", t: "├", u: "┤", v: "┴", w: "┬", x: "│", y: "≤", z: "≥", "{": "π", "|": "≠", "}": "£", "~": "·" }, r.CHARSETS.A = { "#": "£" }, r.CHARSETS.B = void 0, r.CHARSETS[4] = { "#": "£", "@": "¾", "[": "ij", "\\": "½", "]": "|", "{": "¨", "|": "f", "}": "¼", "~": "´" }, r.CHARSETS.C = r.CHARSETS[5] = { "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, r.CHARSETS.R = { "#": "£", "@": "à", "[": "°", "\\": "ç", "]": "§", "{": "é", "|": "ù", "}": "è", "~": "¨" }, r.CHARSETS.Q = { "@": "à", "[": "â", "\\": "ç", "]": "ê", "^": "î", "`": "ô", "{": "é", "|": "ù", "}": "è", "~": "û" }, r.CHARSETS.K = { "@": "§", "[": "Ä", "\\": "Ö", "]": "Ü", "{": "ä", "|": "ö", "}": "ü", "~": "ß" }, r.CHARSETS.Y = { "#": "£", "@": "§", "[": "°", "\\": "ç", "]": "é", "`": "ù", "{": "à", "|": "ò", "}": "è", "~": "ì" }, r.CHARSETS.E = r.CHARSETS[6] = { "@": "Ä", "[": "Æ", "\\": "Ø", "]": "Å", "^": "Ü", "`": "ä", "{": "æ", "|": "ø", "}": "å", "~": "ü" }, r.CHARSETS.Z = { "#": "£", "@": "§", "[": "¡", "\\": "Ñ", "]": "¿", "{": "°", "|": "ñ", "}": "ç" }, r.CHARSETS.H = r.CHARSETS[7] = { "@": "É", "[": "Ä", "\\": "Ö", "]": "Å", "^": "Ü", "`": "é", "{": "ä", "|": "ö", "}": "å", "~": "ü" }, r.CHARSETS["="] = { "#": "ù", "@": "à", "[": "é", "\\": "ç", "]": "ê", "^": "î", _: "è", "`": "ô", "{": "ä", "|": "ö", "}": "ü", "~": "û" };
      }, 2584: (T, r) => {
        var a, h;
        Object.defineProperty(r, "__esModule", { value: !0 }), r.C1_ESCAPED = r.C1 = r.C0 = void 0, function(f) {
          f.NUL = "\0", f.SOH = "", f.STX = "", f.ETX = "", f.EOT = "", f.ENQ = "", f.ACK = "", f.BEL = "\x07", f.BS = "\b", f.HT = "	", f.LF = `
`, f.VT = "\v", f.FF = "\f", f.CR = "\r", f.SO = "", f.SI = "", f.DLE = "", f.DC1 = "", f.DC2 = "", f.DC3 = "", f.DC4 = "", f.NAK = "", f.SYN = "", f.ETB = "", f.CAN = "", f.EM = "", f.SUB = "", f.ESC = "\x1B", f.FS = "", f.GS = "", f.RS = "", f.US = "", f.SP = " ", f.DEL = "";
        }(a = r.C0 || (r.C0 = {})), (h = r.C1 || (r.C1 = {})).PAD = "", h.HOP = "", h.BPH = "", h.NBH = "", h.IND = "", h.NEL = "", h.SSA = "", h.ESA = "", h.HTS = "", h.HTJ = "", h.VTS = "", h.PLD = "", h.PLU = "", h.RI = "", h.SS2 = "", h.SS3 = "", h.DCS = "", h.PU1 = "", h.PU2 = "", h.STS = "", h.CCH = "", h.MW = "", h.SPA = "", h.EPA = "", h.SOS = "", h.SGCI = "", h.SCI = "", h.CSI = "", h.ST = "", h.OSC = "", h.PM = "", h.APC = "", (r.C1_ESCAPED || (r.C1_ESCAPED = {})).ST = `${a.ESC}\\`;
      }, 7399: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.evaluateKeyboardEvent = void 0;
        const h = a(2584), f = { 48: ["0", ")"], 49: ["1", "!"], 50: ["2", "@"], 51: ["3", "#"], 52: ["4", "$"], 53: ["5", "%"], 54: ["6", "^"], 55: ["7", "&"], 56: ["8", "*"], 57: ["9", "("], 186: [";", ":"], 187: ["=", "+"], 188: [",", "<"], 189: ["-", "_"], 190: [".", ">"], 191: ["/", "?"], 192: ["`", "~"], 219: ["[", "{"], 220: ["\\", "|"], 221: ["]", "}"], 222: ["'", '"'] };
        r.evaluateKeyboardEvent = function(d, u, b, g) {
          const c = { type: 0, cancel: !1, key: void 0 }, e = (d.shiftKey ? 1 : 0) | (d.altKey ? 2 : 0) | (d.ctrlKey ? 4 : 0) | (d.metaKey ? 8 : 0);
          switch (d.keyCode) {
            case 0:
              d.key === "UIKeyInputUpArrow" ? c.key = u ? h.C0.ESC + "OA" : h.C0.ESC + "[A" : d.key === "UIKeyInputLeftArrow" ? c.key = u ? h.C0.ESC + "OD" : h.C0.ESC + "[D" : d.key === "UIKeyInputRightArrow" ? c.key = u ? h.C0.ESC + "OC" : h.C0.ESC + "[C" : d.key === "UIKeyInputDownArrow" && (c.key = u ? h.C0.ESC + "OB" : h.C0.ESC + "[B");
              break;
            case 8:
              if (d.altKey) {
                c.key = h.C0.ESC + h.C0.DEL;
                break;
              }
              c.key = h.C0.DEL;
              break;
            case 9:
              if (d.shiftKey) {
                c.key = h.C0.ESC + "[Z";
                break;
              }
              c.key = h.C0.HT, c.cancel = !0;
              break;
            case 13:
              c.key = d.altKey ? h.C0.ESC + h.C0.CR : h.C0.CR, c.cancel = !0;
              break;
            case 27:
              c.key = h.C0.ESC, d.altKey && (c.key = h.C0.ESC + h.C0.ESC), c.cancel = !0;
              break;
            case 37:
              if (d.metaKey)
                break;
              e ? (c.key = h.C0.ESC + "[1;" + (e + 1) + "D", c.key === h.C0.ESC + "[1;3D" && (c.key = h.C0.ESC + (b ? "b" : "[1;5D"))) : c.key = u ? h.C0.ESC + "OD" : h.C0.ESC + "[D";
              break;
            case 39:
              if (d.metaKey)
                break;
              e ? (c.key = h.C0.ESC + "[1;" + (e + 1) + "C", c.key === h.C0.ESC + "[1;3C" && (c.key = h.C0.ESC + (b ? "f" : "[1;5C"))) : c.key = u ? h.C0.ESC + "OC" : h.C0.ESC + "[C";
              break;
            case 38:
              if (d.metaKey)
                break;
              e ? (c.key = h.C0.ESC + "[1;" + (e + 1) + "A", b || c.key !== h.C0.ESC + "[1;3A" || (c.key = h.C0.ESC + "[1;5A")) : c.key = u ? h.C0.ESC + "OA" : h.C0.ESC + "[A";
              break;
            case 40:
              if (d.metaKey)
                break;
              e ? (c.key = h.C0.ESC + "[1;" + (e + 1) + "B", b || c.key !== h.C0.ESC + "[1;3B" || (c.key = h.C0.ESC + "[1;5B")) : c.key = u ? h.C0.ESC + "OB" : h.C0.ESC + "[B";
              break;
            case 45:
              d.shiftKey || d.ctrlKey || (c.key = h.C0.ESC + "[2~");
              break;
            case 46:
              c.key = e ? h.C0.ESC + "[3;" + (e + 1) + "~" : h.C0.ESC + "[3~";
              break;
            case 36:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "H" : u ? h.C0.ESC + "OH" : h.C0.ESC + "[H";
              break;
            case 35:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "F" : u ? h.C0.ESC + "OF" : h.C0.ESC + "[F";
              break;
            case 33:
              d.shiftKey ? c.type = 2 : d.ctrlKey ? c.key = h.C0.ESC + "[5;" + (e + 1) + "~" : c.key = h.C0.ESC + "[5~";
              break;
            case 34:
              d.shiftKey ? c.type = 3 : d.ctrlKey ? c.key = h.C0.ESC + "[6;" + (e + 1) + "~" : c.key = h.C0.ESC + "[6~";
              break;
            case 112:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "P" : h.C0.ESC + "OP";
              break;
            case 113:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "Q" : h.C0.ESC + "OQ";
              break;
            case 114:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "R" : h.C0.ESC + "OR";
              break;
            case 115:
              c.key = e ? h.C0.ESC + "[1;" + (e + 1) + "S" : h.C0.ESC + "OS";
              break;
            case 116:
              c.key = e ? h.C0.ESC + "[15;" + (e + 1) + "~" : h.C0.ESC + "[15~";
              break;
            case 117:
              c.key = e ? h.C0.ESC + "[17;" + (e + 1) + "~" : h.C0.ESC + "[17~";
              break;
            case 118:
              c.key = e ? h.C0.ESC + "[18;" + (e + 1) + "~" : h.C0.ESC + "[18~";
              break;
            case 119:
              c.key = e ? h.C0.ESC + "[19;" + (e + 1) + "~" : h.C0.ESC + "[19~";
              break;
            case 120:
              c.key = e ? h.C0.ESC + "[20;" + (e + 1) + "~" : h.C0.ESC + "[20~";
              break;
            case 121:
              c.key = e ? h.C0.ESC + "[21;" + (e + 1) + "~" : h.C0.ESC + "[21~";
              break;
            case 122:
              c.key = e ? h.C0.ESC + "[23;" + (e + 1) + "~" : h.C0.ESC + "[23~";
              break;
            case 123:
              c.key = e ? h.C0.ESC + "[24;" + (e + 1) + "~" : h.C0.ESC + "[24~";
              break;
            default:
              if (!d.ctrlKey || d.shiftKey || d.altKey || d.metaKey)
                if (b && !g || !d.altKey || d.metaKey)
                  !b || d.altKey || d.ctrlKey || d.shiftKey || !d.metaKey ? d.key && !d.ctrlKey && !d.altKey && !d.metaKey && d.keyCode >= 48 && d.key.length === 1 ? c.key = d.key : d.key && d.ctrlKey && (d.key === "_" && (c.key = h.C0.US), d.key === "@" && (c.key = h.C0.NUL)) : d.keyCode === 65 && (c.type = 1);
                else {
                  const i = f[d.keyCode], n = i == null ? void 0 : i[d.shiftKey ? 1 : 0];
                  if (n)
                    c.key = h.C0.ESC + n;
                  else if (d.keyCode >= 65 && d.keyCode <= 90) {
                    const t = d.ctrlKey ? d.keyCode - 64 : d.keyCode + 32;
                    let s = String.fromCharCode(t);
                    d.shiftKey && (s = s.toUpperCase()), c.key = h.C0.ESC + s;
                  } else if (d.keyCode === 32)
                    c.key = h.C0.ESC + (d.ctrlKey ? h.C0.NUL : " ");
                  else if (d.key === "Dead" && d.code.startsWith("Key")) {
                    let t = d.code.slice(3, 4);
                    d.shiftKey || (t = t.toLowerCase()), c.key = h.C0.ESC + t, c.cancel = !0;
                  }
                }
              else
                d.keyCode >= 65 && d.keyCode <= 90 ? c.key = String.fromCharCode(d.keyCode - 64) : d.keyCode === 32 ? c.key = h.C0.NUL : d.keyCode >= 51 && d.keyCode <= 55 ? c.key = String.fromCharCode(d.keyCode - 51 + 27) : d.keyCode === 56 ? c.key = h.C0.DEL : d.keyCode === 219 ? c.key = h.C0.ESC : d.keyCode === 220 ? c.key = h.C0.FS : d.keyCode === 221 && (c.key = h.C0.GS);
          }
          return c;
        };
      }, 482: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Utf8ToUtf32 = r.StringToUtf32 = r.utf32ToString = r.stringFromCodePoint = void 0, r.stringFromCodePoint = function(a) {
          return a > 65535 ? (a -= 65536, String.fromCharCode(55296 + (a >> 10)) + String.fromCharCode(a % 1024 + 56320)) : String.fromCharCode(a);
        }, r.utf32ToString = function(a, h = 0, f = a.length) {
          let d = "";
          for (let u = h; u < f; ++u) {
            let b = a[u];
            b > 65535 ? (b -= 65536, d += String.fromCharCode(55296 + (b >> 10)) + String.fromCharCode(b % 1024 + 56320)) : d += String.fromCharCode(b);
          }
          return d;
        }, r.StringToUtf32 = class {
          constructor() {
            this._interim = 0;
          }
          clear() {
            this._interim = 0;
          }
          decode(a, h) {
            const f = a.length;
            if (!f)
              return 0;
            let d = 0, u = 0;
            if (this._interim) {
              const b = a.charCodeAt(u++);
              56320 <= b && b <= 57343 ? h[d++] = 1024 * (this._interim - 55296) + b - 56320 + 65536 : (h[d++] = this._interim, h[d++] = b), this._interim = 0;
            }
            for (let b = u; b < f; ++b) {
              const g = a.charCodeAt(b);
              if (55296 <= g && g <= 56319) {
                if (++b >= f)
                  return this._interim = g, d;
                const c = a.charCodeAt(b);
                56320 <= c && c <= 57343 ? h[d++] = 1024 * (g - 55296) + c - 56320 + 65536 : (h[d++] = g, h[d++] = c);
              } else
                g !== 65279 && (h[d++] = g);
            }
            return d;
          }
        }, r.Utf8ToUtf32 = class {
          constructor() {
            this.interim = new Uint8Array(3);
          }
          clear() {
            this.interim.fill(0);
          }
          decode(a, h) {
            const f = a.length;
            if (!f)
              return 0;
            let d, u, b, g, c = 0, e = 0, i = 0;
            if (this.interim[0]) {
              let s = !1, l = this.interim[0];
              l &= (224 & l) == 192 ? 31 : (240 & l) == 224 ? 15 : 7;
              let _, m = 0;
              for (; (_ = 63 & this.interim[++m]) && m < 4; )
                l <<= 6, l |= _;
              const o = (224 & this.interim[0]) == 192 ? 2 : (240 & this.interim[0]) == 224 ? 3 : 4, v = o - m;
              for (; i < v; ) {
                if (i >= f)
                  return 0;
                if (_ = a[i++], (192 & _) != 128) {
                  i--, s = !0;
                  break;
                }
                this.interim[m++] = _, l <<= 6, l |= 63 & _;
              }
              s || (o === 2 ? l < 128 ? i-- : h[c++] = l : o === 3 ? l < 2048 || l >= 55296 && l <= 57343 || l === 65279 || (h[c++] = l) : l < 65536 || l > 1114111 || (h[c++] = l)), this.interim.fill(0);
            }
            const n = f - 4;
            let t = i;
            for (; t < f; ) {
              for (; !(!(t < n) || 128 & (d = a[t]) || 128 & (u = a[t + 1]) || 128 & (b = a[t + 2]) || 128 & (g = a[t + 3])); )
                h[c++] = d, h[c++] = u, h[c++] = b, h[c++] = g, t += 4;
              if (d = a[t++], d < 128)
                h[c++] = d;
              else if ((224 & d) == 192) {
                if (t >= f)
                  return this.interim[0] = d, c;
                if (u = a[t++], (192 & u) != 128) {
                  t--;
                  continue;
                }
                if (e = (31 & d) << 6 | 63 & u, e < 128) {
                  t--;
                  continue;
                }
                h[c++] = e;
              } else if ((240 & d) == 224) {
                if (t >= f)
                  return this.interim[0] = d, c;
                if (u = a[t++], (192 & u) != 128) {
                  t--;
                  continue;
                }
                if (t >= f)
                  return this.interim[0] = d, this.interim[1] = u, c;
                if (b = a[t++], (192 & b) != 128) {
                  t--;
                  continue;
                }
                if (e = (15 & d) << 12 | (63 & u) << 6 | 63 & b, e < 2048 || e >= 55296 && e <= 57343 || e === 65279)
                  continue;
                h[c++] = e;
              } else if ((248 & d) == 240) {
                if (t >= f)
                  return this.interim[0] = d, c;
                if (u = a[t++], (192 & u) != 128) {
                  t--;
                  continue;
                }
                if (t >= f)
                  return this.interim[0] = d, this.interim[1] = u, c;
                if (b = a[t++], (192 & b) != 128) {
                  t--;
                  continue;
                }
                if (t >= f)
                  return this.interim[0] = d, this.interim[1] = u, this.interim[2] = b, c;
                if (g = a[t++], (192 & g) != 128) {
                  t--;
                  continue;
                }
                if (e = (7 & d) << 18 | (63 & u) << 12 | (63 & b) << 6 | 63 & g, e < 65536 || e > 1114111)
                  continue;
                h[c++] = e;
              }
            }
            return c;
          }
        };
      }, 225: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeV6 = void 0;
        const a = [[768, 879], [1155, 1158], [1160, 1161], [1425, 1469], [1471, 1471], [1473, 1474], [1476, 1477], [1479, 1479], [1536, 1539], [1552, 1557], [1611, 1630], [1648, 1648], [1750, 1764], [1767, 1768], [1770, 1773], [1807, 1807], [1809, 1809], [1840, 1866], [1958, 1968], [2027, 2035], [2305, 2306], [2364, 2364], [2369, 2376], [2381, 2381], [2385, 2388], [2402, 2403], [2433, 2433], [2492, 2492], [2497, 2500], [2509, 2509], [2530, 2531], [2561, 2562], [2620, 2620], [2625, 2626], [2631, 2632], [2635, 2637], [2672, 2673], [2689, 2690], [2748, 2748], [2753, 2757], [2759, 2760], [2765, 2765], [2786, 2787], [2817, 2817], [2876, 2876], [2879, 2879], [2881, 2883], [2893, 2893], [2902, 2902], [2946, 2946], [3008, 3008], [3021, 3021], [3134, 3136], [3142, 3144], [3146, 3149], [3157, 3158], [3260, 3260], [3263, 3263], [3270, 3270], [3276, 3277], [3298, 3299], [3393, 3395], [3405, 3405], [3530, 3530], [3538, 3540], [3542, 3542], [3633, 3633], [3636, 3642], [3655, 3662], [3761, 3761], [3764, 3769], [3771, 3772], [3784, 3789], [3864, 3865], [3893, 3893], [3895, 3895], [3897, 3897], [3953, 3966], [3968, 3972], [3974, 3975], [3984, 3991], [3993, 4028], [4038, 4038], [4141, 4144], [4146, 4146], [4150, 4151], [4153, 4153], [4184, 4185], [4448, 4607], [4959, 4959], [5906, 5908], [5938, 5940], [5970, 5971], [6002, 6003], [6068, 6069], [6071, 6077], [6086, 6086], [6089, 6099], [6109, 6109], [6155, 6157], [6313, 6313], [6432, 6434], [6439, 6440], [6450, 6450], [6457, 6459], [6679, 6680], [6912, 6915], [6964, 6964], [6966, 6970], [6972, 6972], [6978, 6978], [7019, 7027], [7616, 7626], [7678, 7679], [8203, 8207], [8234, 8238], [8288, 8291], [8298, 8303], [8400, 8431], [12330, 12335], [12441, 12442], [43014, 43014], [43019, 43019], [43045, 43046], [64286, 64286], [65024, 65039], [65056, 65059], [65279, 65279], [65529, 65531]], h = [[68097, 68099], [68101, 68102], [68108, 68111], [68152, 68154], [68159, 68159], [119143, 119145], [119155, 119170], [119173, 119179], [119210, 119213], [119362, 119364], [917505, 917505], [917536, 917631], [917760, 917999]];
        let f;
        r.UnicodeV6 = class {
          constructor() {
            if (this.version = "6", !f) {
              f = new Uint8Array(65536), f.fill(1), f[0] = 0, f.fill(0, 1, 32), f.fill(0, 127, 160), f.fill(2, 4352, 4448), f[9001] = 2, f[9002] = 2, f.fill(2, 11904, 42192), f[12351] = 1, f.fill(2, 44032, 55204), f.fill(2, 63744, 64256), f.fill(2, 65040, 65050), f.fill(2, 65072, 65136), f.fill(2, 65280, 65377), f.fill(2, 65504, 65511);
              for (let d = 0; d < a.length; ++d)
                f.fill(0, a[d][0], a[d][1] + 1);
            }
          }
          wcwidth(d) {
            return d < 32 ? 0 : d < 127 ? 1 : d < 65536 ? f[d] : function(u, b) {
              let g, c = 0, e = b.length - 1;
              if (u < b[0][0] || u > b[e][1])
                return !1;
              for (; e >= c; )
                if (g = c + e >> 1, u > b[g][1])
                  c = g + 1;
                else {
                  if (!(u < b[g][0]))
                    return !0;
                  e = g - 1;
                }
              return !1;
            }(d, h) ? 0 : d >= 131072 && d <= 196605 || d >= 196608 && d <= 262141 ? 2 : 1;
          }
        };
      }, 5981: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.WriteBuffer = void 0;
        const h = a(8460), f = a(844);
        class d extends f.Disposable {
          constructor(b) {
            super(), this._action = b, this._writeBuffer = [], this._callbacks = [], this._pendingData = 0, this._bufferOffset = 0, this._isSyncWriting = !1, this._syncCalls = 0, this._didUserInput = !1, this._onWriteParsed = this.register(new h.EventEmitter()), this.onWriteParsed = this._onWriteParsed.event;
          }
          handleUserInput() {
            this._didUserInput = !0;
          }
          writeSync(b, g) {
            if (g !== void 0 && this._syncCalls > g)
              return void (this._syncCalls = 0);
            if (this._pendingData += b.length, this._writeBuffer.push(b), this._callbacks.push(void 0), this._syncCalls++, this._isSyncWriting)
              return;
            let c;
            for (this._isSyncWriting = !0; c = this._writeBuffer.shift(); ) {
              this._action(c);
              const e = this._callbacks.shift();
              e && e();
            }
            this._pendingData = 0, this._bufferOffset = 2147483647, this._isSyncWriting = !1, this._syncCalls = 0;
          }
          write(b, g) {
            if (this._pendingData > 5e7)
              throw new Error("write data discarded, use flow control to avoid losing data");
            if (!this._writeBuffer.length) {
              if (this._bufferOffset = 0, this._didUserInput)
                return this._didUserInput = !1, this._pendingData += b.length, this._writeBuffer.push(b), this._callbacks.push(g), void this._innerWrite();
              setTimeout(() => this._innerWrite());
            }
            this._pendingData += b.length, this._writeBuffer.push(b), this._callbacks.push(g);
          }
          _innerWrite(b = 0, g = !0) {
            const c = b || Date.now();
            for (; this._writeBuffer.length > this._bufferOffset; ) {
              const e = this._writeBuffer[this._bufferOffset], i = this._action(e, g);
              if (i) {
                const t = (s) => Date.now() - c >= 12 ? setTimeout(() => this._innerWrite(0, s)) : this._innerWrite(c, s);
                return void i.catch((s) => (queueMicrotask(() => {
                  throw s;
                }), Promise.resolve(!1))).then(t);
              }
              const n = this._callbacks[this._bufferOffset];
              if (n && n(), this._bufferOffset++, this._pendingData -= e.length, Date.now() - c >= 12)
                break;
            }
            this._writeBuffer.length > this._bufferOffset ? (this._bufferOffset > 50 && (this._writeBuffer = this._writeBuffer.slice(this._bufferOffset), this._callbacks = this._callbacks.slice(this._bufferOffset), this._bufferOffset = 0), setTimeout(() => this._innerWrite())) : (this._writeBuffer.length = 0, this._callbacks.length = 0, this._pendingData = 0, this._bufferOffset = 0), this._onWriteParsed.fire();
          }
        }
        r.WriteBuffer = d;
      }, 5941: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.toRgbString = r.parseColor = void 0;
        const a = /^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/, h = /^[\da-f]+$/;
        function f(d, u) {
          const b = d.toString(16), g = b.length < 2 ? "0" + b : b;
          switch (u) {
            case 4:
              return b[0];
            case 8:
              return g;
            case 12:
              return (g + g).slice(0, 3);
            default:
              return g + g;
          }
        }
        r.parseColor = function(d) {
          if (!d)
            return;
          let u = d.toLowerCase();
          if (u.indexOf("rgb:") === 0) {
            u = u.slice(4);
            const b = a.exec(u);
            if (b) {
              const g = b[1] ? 15 : b[4] ? 255 : b[7] ? 4095 : 65535;
              return [Math.round(parseInt(b[1] || b[4] || b[7] || b[10], 16) / g * 255), Math.round(parseInt(b[2] || b[5] || b[8] || b[11], 16) / g * 255), Math.round(parseInt(b[3] || b[6] || b[9] || b[12], 16) / g * 255)];
            }
          } else if (u.indexOf("#") === 0 && (u = u.slice(1), h.exec(u) && [3, 6, 9, 12].includes(u.length))) {
            const b = u.length / 3, g = [0, 0, 0];
            for (let c = 0; c < 3; ++c) {
              const e = parseInt(u.slice(b * c, b * c + b), 16);
              g[c] = b === 1 ? e << 4 : b === 2 ? e : b === 3 ? e >> 4 : e >> 8;
            }
            return g;
          }
        }, r.toRgbString = function(d, u = 16) {
          const [b, g, c] = d;
          return `rgb:${f(b, u)}/${f(g, u)}/${f(c, u)}`;
        };
      }, 5770: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.PAYLOAD_LIMIT = void 0, r.PAYLOAD_LIMIT = 1e7;
      }, 6351: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DcsHandler = r.DcsParser = void 0;
        const h = a(482), f = a(8742), d = a(5770), u = [];
        r.DcsParser = class {
          constructor() {
            this._handlers = /* @__PURE__ */ Object.create(null), this._active = u, this._ident = 0, this._handlerFb = () => {
            }, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
          }
          dispose() {
            this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
            }, this._active = u;
          }
          registerHandler(g, c) {
            this._handlers[g] === void 0 && (this._handlers[g] = []);
            const e = this._handlers[g];
            return e.push(c), { dispose: () => {
              const i = e.indexOf(c);
              i !== -1 && e.splice(i, 1);
            } };
          }
          clearHandler(g) {
            this._handlers[g] && delete this._handlers[g];
          }
          setHandlerFallback(g) {
            this._handlerFb = g;
          }
          reset() {
            if (this._active.length)
              for (let g = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; g >= 0; --g)
                this._active[g].unhook(!1);
            this._stack.paused = !1, this._active = u, this._ident = 0;
          }
          hook(g, c) {
            if (this.reset(), this._ident = g, this._active = this._handlers[g] || u, this._active.length)
              for (let e = this._active.length - 1; e >= 0; e--)
                this._active[e].hook(c);
            else
              this._handlerFb(this._ident, "HOOK", c);
          }
          put(g, c, e) {
            if (this._active.length)
              for (let i = this._active.length - 1; i >= 0; i--)
                this._active[i].put(g, c, e);
            else
              this._handlerFb(this._ident, "PUT", (0, h.utf32ToString)(g, c, e));
          }
          unhook(g, c = !0) {
            if (this._active.length) {
              let e = !1, i = this._active.length - 1, n = !1;
              if (this._stack.paused && (i = this._stack.loopPosition - 1, e = c, n = this._stack.fallThrough, this._stack.paused = !1), !n && e === !1) {
                for (; i >= 0 && (e = this._active[i].unhook(g), e !== !0); i--)
                  if (e instanceof Promise)
                    return this._stack.paused = !0, this._stack.loopPosition = i, this._stack.fallThrough = !1, e;
                i--;
              }
              for (; i >= 0; i--)
                if (e = this._active[i].unhook(!1), e instanceof Promise)
                  return this._stack.paused = !0, this._stack.loopPosition = i, this._stack.fallThrough = !0, e;
            } else
              this._handlerFb(this._ident, "UNHOOK", g);
            this._active = u, this._ident = 0;
          }
        };
        const b = new f.Params();
        b.addParam(0), r.DcsHandler = class {
          constructor(g) {
            this._handler = g, this._data = "", this._params = b, this._hitLimit = !1;
          }
          hook(g) {
            this._params = g.length > 1 || g.params[0] ? g.clone() : b, this._data = "", this._hitLimit = !1;
          }
          put(g, c, e) {
            this._hitLimit || (this._data += (0, h.utf32ToString)(g, c, e), this._data.length > d.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
          }
          unhook(g) {
            let c = !1;
            if (this._hitLimit)
              c = !1;
            else if (g && (c = this._handler(this._data, this._params), c instanceof Promise))
              return c.then((e) => (this._params = b, this._data = "", this._hitLimit = !1, e));
            return this._params = b, this._data = "", this._hitLimit = !1, c;
          }
        };
      }, 2015: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.EscapeSequenceParser = r.VT500_TRANSITION_TABLE = r.TransitionTable = void 0;
        const h = a(844), f = a(8742), d = a(6242), u = a(6351);
        class b {
          constructor(i) {
            this.table = new Uint8Array(i);
          }
          setDefault(i, n) {
            this.table.fill(i << 4 | n);
          }
          add(i, n, t, s) {
            this.table[n << 8 | i] = t << 4 | s;
          }
          addMany(i, n, t, s) {
            for (let l = 0; l < i.length; l++)
              this.table[n << 8 | i[l]] = t << 4 | s;
          }
        }
        r.TransitionTable = b;
        const g = 160;
        r.VT500_TRANSITION_TABLE = function() {
          const e = new b(4095), i = Array.apply(null, Array(256)).map((m, o) => o), n = (m, o) => i.slice(m, o), t = n(32, 127), s = n(0, 24);
          s.push(25), s.push.apply(s, n(28, 32));
          const l = n(0, 14);
          let _;
          for (_ in e.setDefault(1, 0), e.addMany(t, 0, 2, 0), l)
            e.addMany([24, 26, 153, 154], _, 3, 0), e.addMany(n(128, 144), _, 3, 0), e.addMany(n(144, 152), _, 3, 0), e.add(156, _, 0, 0), e.add(27, _, 11, 1), e.add(157, _, 4, 8), e.addMany([152, 158, 159], _, 0, 7), e.add(155, _, 11, 3), e.add(144, _, 11, 9);
          return e.addMany(s, 0, 3, 0), e.addMany(s, 1, 3, 1), e.add(127, 1, 0, 1), e.addMany(s, 8, 0, 8), e.addMany(s, 3, 3, 3), e.add(127, 3, 0, 3), e.addMany(s, 4, 3, 4), e.add(127, 4, 0, 4), e.addMany(s, 6, 3, 6), e.addMany(s, 5, 3, 5), e.add(127, 5, 0, 5), e.addMany(s, 2, 3, 2), e.add(127, 2, 0, 2), e.add(93, 1, 4, 8), e.addMany(t, 8, 5, 8), e.add(127, 8, 5, 8), e.addMany([156, 27, 24, 26, 7], 8, 6, 0), e.addMany(n(28, 32), 8, 0, 8), e.addMany([88, 94, 95], 1, 0, 7), e.addMany(t, 7, 0, 7), e.addMany(s, 7, 0, 7), e.add(156, 7, 0, 0), e.add(127, 7, 0, 7), e.add(91, 1, 11, 3), e.addMany(n(64, 127), 3, 7, 0), e.addMany(n(48, 60), 3, 8, 4), e.addMany([60, 61, 62, 63], 3, 9, 4), e.addMany(n(48, 60), 4, 8, 4), e.addMany(n(64, 127), 4, 7, 0), e.addMany([60, 61, 62, 63], 4, 0, 6), e.addMany(n(32, 64), 6, 0, 6), e.add(127, 6, 0, 6), e.addMany(n(64, 127), 6, 0, 0), e.addMany(n(32, 48), 3, 9, 5), e.addMany(n(32, 48), 5, 9, 5), e.addMany(n(48, 64), 5, 0, 6), e.addMany(n(64, 127), 5, 7, 0), e.addMany(n(32, 48), 4, 9, 5), e.addMany(n(32, 48), 1, 9, 2), e.addMany(n(32, 48), 2, 9, 2), e.addMany(n(48, 127), 2, 10, 0), e.addMany(n(48, 80), 1, 10, 0), e.addMany(n(81, 88), 1, 10, 0), e.addMany([89, 90, 92], 1, 10, 0), e.addMany(n(96, 127), 1, 10, 0), e.add(80, 1, 11, 9), e.addMany(s, 9, 0, 9), e.add(127, 9, 0, 9), e.addMany(n(28, 32), 9, 0, 9), e.addMany(n(32, 48), 9, 9, 12), e.addMany(n(48, 60), 9, 8, 10), e.addMany([60, 61, 62, 63], 9, 9, 10), e.addMany(s, 11, 0, 11), e.addMany(n(32, 128), 11, 0, 11), e.addMany(n(28, 32), 11, 0, 11), e.addMany(s, 10, 0, 10), e.add(127, 10, 0, 10), e.addMany(n(28, 32), 10, 0, 10), e.addMany(n(48, 60), 10, 8, 10), e.addMany([60, 61, 62, 63], 10, 0, 11), e.addMany(n(32, 48), 10, 9, 12), e.addMany(s, 12, 0, 12), e.add(127, 12, 0, 12), e.addMany(n(28, 32), 12, 0, 12), e.addMany(n(32, 48), 12, 9, 12), e.addMany(n(48, 64), 12, 0, 11), e.addMany(n(64, 127), 12, 12, 13), e.addMany(n(64, 127), 10, 12, 13), e.addMany(n(64, 127), 9, 12, 13), e.addMany(s, 13, 13, 13), e.addMany(t, 13, 13, 13), e.add(127, 13, 0, 13), e.addMany([27, 156, 24, 26], 13, 14, 0), e.add(g, 0, 2, 0), e.add(g, 8, 5, 8), e.add(g, 6, 0, 6), e.add(g, 11, 0, 11), e.add(g, 13, 13, 13), e;
        }();
        class c extends h.Disposable {
          constructor(i = r.VT500_TRANSITION_TABLE) {
            super(), this._transitions = i, this._parseStack = { state: 0, handlers: [], handlerPos: 0, transition: 0, chunkPos: 0 }, this.initialState = 0, this.currentState = this.initialState, this._params = new f.Params(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, this._printHandlerFb = (n, t, s) => {
            }, this._executeHandlerFb = (n) => {
            }, this._csiHandlerFb = (n, t) => {
            }, this._escHandlerFb = (n) => {
            }, this._errorHandlerFb = (n) => n, this._printHandler = this._printHandlerFb, this._executeHandlers = /* @__PURE__ */ Object.create(null), this._csiHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null), this.register((0, h.toDisposable)(() => {
              this._csiHandlers = /* @__PURE__ */ Object.create(null), this._executeHandlers = /* @__PURE__ */ Object.create(null), this._escHandlers = /* @__PURE__ */ Object.create(null);
            })), this._oscParser = this.register(new d.OscParser()), this._dcsParser = this.register(new u.DcsParser()), this._errorHandler = this._errorHandlerFb, this.registerEscHandler({ final: "\\" }, () => !0);
          }
          _identifier(i, n = [64, 126]) {
            let t = 0;
            if (i.prefix) {
              if (i.prefix.length > 1)
                throw new Error("only one byte as prefix supported");
              if (t = i.prefix.charCodeAt(0), t && 60 > t || t > 63)
                throw new Error("prefix must be in range 0x3c .. 0x3f");
            }
            if (i.intermediates) {
              if (i.intermediates.length > 2)
                throw new Error("only two bytes as intermediates are supported");
              for (let l = 0; l < i.intermediates.length; ++l) {
                const _ = i.intermediates.charCodeAt(l);
                if (32 > _ || _ > 47)
                  throw new Error("intermediate must be in range 0x20 .. 0x2f");
                t <<= 8, t |= _;
              }
            }
            if (i.final.length !== 1)
              throw new Error("final must be a single byte");
            const s = i.final.charCodeAt(0);
            if (n[0] > s || s > n[1])
              throw new Error(`final must be in range ${n[0]} .. ${n[1]}`);
            return t <<= 8, t |= s, t;
          }
          identToString(i) {
            const n = [];
            for (; i; )
              n.push(String.fromCharCode(255 & i)), i >>= 8;
            return n.reverse().join("");
          }
          setPrintHandler(i) {
            this._printHandler = i;
          }
          clearPrintHandler() {
            this._printHandler = this._printHandlerFb;
          }
          registerEscHandler(i, n) {
            const t = this._identifier(i, [48, 126]);
            this._escHandlers[t] === void 0 && (this._escHandlers[t] = []);
            const s = this._escHandlers[t];
            return s.push(n), { dispose: () => {
              const l = s.indexOf(n);
              l !== -1 && s.splice(l, 1);
            } };
          }
          clearEscHandler(i) {
            this._escHandlers[this._identifier(i, [48, 126])] && delete this._escHandlers[this._identifier(i, [48, 126])];
          }
          setEscHandlerFallback(i) {
            this._escHandlerFb = i;
          }
          setExecuteHandler(i, n) {
            this._executeHandlers[i.charCodeAt(0)] = n;
          }
          clearExecuteHandler(i) {
            this._executeHandlers[i.charCodeAt(0)] && delete this._executeHandlers[i.charCodeAt(0)];
          }
          setExecuteHandlerFallback(i) {
            this._executeHandlerFb = i;
          }
          registerCsiHandler(i, n) {
            const t = this._identifier(i);
            this._csiHandlers[t] === void 0 && (this._csiHandlers[t] = []);
            const s = this._csiHandlers[t];
            return s.push(n), { dispose: () => {
              const l = s.indexOf(n);
              l !== -1 && s.splice(l, 1);
            } };
          }
          clearCsiHandler(i) {
            this._csiHandlers[this._identifier(i)] && delete this._csiHandlers[this._identifier(i)];
          }
          setCsiHandlerFallback(i) {
            this._csiHandlerFb = i;
          }
          registerDcsHandler(i, n) {
            return this._dcsParser.registerHandler(this._identifier(i), n);
          }
          clearDcsHandler(i) {
            this._dcsParser.clearHandler(this._identifier(i));
          }
          setDcsHandlerFallback(i) {
            this._dcsParser.setHandlerFallback(i);
          }
          registerOscHandler(i, n) {
            return this._oscParser.registerHandler(i, n);
          }
          clearOscHandler(i) {
            this._oscParser.clearHandler(i);
          }
          setOscHandlerFallback(i) {
            this._oscParser.setHandlerFallback(i);
          }
          setErrorHandler(i) {
            this._errorHandler = i;
          }
          clearErrorHandler() {
            this._errorHandler = this._errorHandlerFb;
          }
          reset() {
            this.currentState = this.initialState, this._oscParser.reset(), this._dcsParser.reset(), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0, this._parseStack.state !== 0 && (this._parseStack.state = 2, this._parseStack.handlers = []);
          }
          _preserveStack(i, n, t, s, l) {
            this._parseStack.state = i, this._parseStack.handlers = n, this._parseStack.handlerPos = t, this._parseStack.transition = s, this._parseStack.chunkPos = l;
          }
          parse(i, n, t) {
            let s, l = 0, _ = 0, m = 0;
            if (this._parseStack.state)
              if (this._parseStack.state === 2)
                this._parseStack.state = 0, m = this._parseStack.chunkPos + 1;
              else {
                if (t === void 0 || this._parseStack.state === 1)
                  throw this._parseStack.state = 1, new Error("improper continuation due to previous async handler, giving up parsing");
                const o = this._parseStack.handlers;
                let v = this._parseStack.handlerPos - 1;
                switch (this._parseStack.state) {
                  case 3:
                    if (t === !1 && v > -1) {
                      for (; v >= 0 && (s = o[v](this._params), s !== !0); v--)
                        if (s instanceof Promise)
                          return this._parseStack.handlerPos = v, s;
                    }
                    this._parseStack.handlers = [];
                    break;
                  case 4:
                    if (t === !1 && v > -1) {
                      for (; v >= 0 && (s = o[v](), s !== !0); v--)
                        if (s instanceof Promise)
                          return this._parseStack.handlerPos = v, s;
                    }
                    this._parseStack.handlers = [];
                    break;
                  case 6:
                    if (l = i[this._parseStack.chunkPos], s = this._dcsParser.unhook(l !== 24 && l !== 26, t), s)
                      return s;
                    l === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                    break;
                  case 5:
                    if (l = i[this._parseStack.chunkPos], s = this._oscParser.end(l !== 24 && l !== 26, t), s)
                      return s;
                    l === 27 && (this._parseStack.transition |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0;
                }
                this._parseStack.state = 0, m = this._parseStack.chunkPos + 1, this.precedingCodepoint = 0, this.currentState = 15 & this._parseStack.transition;
              }
            for (let o = m; o < n; ++o) {
              switch (l = i[o], _ = this._transitions.table[this.currentState << 8 | (l < 160 ? l : g)], _ >> 4) {
                case 2:
                  for (let L = o + 1; ; ++L) {
                    if (L >= n || (l = i[L]) < 32 || l > 126 && l < g) {
                      this._printHandler(i, o, L), o = L - 1;
                      break;
                    }
                    if (++L >= n || (l = i[L]) < 32 || l > 126 && l < g) {
                      this._printHandler(i, o, L), o = L - 1;
                      break;
                    }
                    if (++L >= n || (l = i[L]) < 32 || l > 126 && l < g) {
                      this._printHandler(i, o, L), o = L - 1;
                      break;
                    }
                    if (++L >= n || (l = i[L]) < 32 || l > 126 && l < g) {
                      this._printHandler(i, o, L), o = L - 1;
                      break;
                    }
                  }
                  break;
                case 3:
                  this._executeHandlers[l] ? this._executeHandlers[l]() : this._executeHandlerFb(l), this.precedingCodepoint = 0;
                  break;
                case 0:
                  break;
                case 1:
                  if (this._errorHandler({ position: o, code: l, currentState: this.currentState, collect: this._collect, params: this._params, abort: !1 }).abort)
                    return;
                  break;
                case 7:
                  const v = this._csiHandlers[this._collect << 8 | l];
                  let S = v ? v.length - 1 : -1;
                  for (; S >= 0 && (s = v[S](this._params), s !== !0); S--)
                    if (s instanceof Promise)
                      return this._preserveStack(3, v, S, _, o), s;
                  S < 0 && this._csiHandlerFb(this._collect << 8 | l, this._params), this.precedingCodepoint = 0;
                  break;
                case 8:
                  do
                    switch (l) {
                      case 59:
                        this._params.addParam(0);
                        break;
                      case 58:
                        this._params.addSubParam(-1);
                        break;
                      default:
                        this._params.addDigit(l - 48);
                    }
                  while (++o < n && (l = i[o]) > 47 && l < 60);
                  o--;
                  break;
                case 9:
                  this._collect <<= 8, this._collect |= l;
                  break;
                case 10:
                  const y = this._escHandlers[this._collect << 8 | l];
                  let w = y ? y.length - 1 : -1;
                  for (; w >= 0 && (s = y[w](), s !== !0); w--)
                    if (s instanceof Promise)
                      return this._preserveStack(4, y, w, _, o), s;
                  w < 0 && this._escHandlerFb(this._collect << 8 | l), this.precedingCodepoint = 0;
                  break;
                case 11:
                  this._params.reset(), this._params.addParam(0), this._collect = 0;
                  break;
                case 12:
                  this._dcsParser.hook(this._collect << 8 | l, this._params);
                  break;
                case 13:
                  for (let L = o + 1; ; ++L)
                    if (L >= n || (l = i[L]) === 24 || l === 26 || l === 27 || l > 127 && l < g) {
                      this._dcsParser.put(i, o, L), o = L - 1;
                      break;
                    }
                  break;
                case 14:
                  if (s = this._dcsParser.unhook(l !== 24 && l !== 26), s)
                    return this._preserveStack(6, [], 0, _, o), s;
                  l === 27 && (_ |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
                  break;
                case 4:
                  this._oscParser.start();
                  break;
                case 5:
                  for (let L = o + 1; ; L++)
                    if (L >= n || (l = i[L]) < 32 || l > 127 && l < g) {
                      this._oscParser.put(i, o, L), o = L - 1;
                      break;
                    }
                  break;
                case 6:
                  if (s = this._oscParser.end(l !== 24 && l !== 26), s)
                    return this._preserveStack(5, [], 0, _, o), s;
                  l === 27 && (_ |= 1), this._params.reset(), this._params.addParam(0), this._collect = 0, this.precedingCodepoint = 0;
              }
              this.currentState = 15 & _;
            }
          }
        }
        r.EscapeSequenceParser = c;
      }, 6242: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.OscHandler = r.OscParser = void 0;
        const h = a(5770), f = a(482), d = [];
        r.OscParser = class {
          constructor() {
            this._state = 0, this._active = d, this._id = -1, this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
            }, this._stack = { paused: !1, loopPosition: 0, fallThrough: !1 };
          }
          registerHandler(u, b) {
            this._handlers[u] === void 0 && (this._handlers[u] = []);
            const g = this._handlers[u];
            return g.push(b), { dispose: () => {
              const c = g.indexOf(b);
              c !== -1 && g.splice(c, 1);
            } };
          }
          clearHandler(u) {
            this._handlers[u] && delete this._handlers[u];
          }
          setHandlerFallback(u) {
            this._handlerFb = u;
          }
          dispose() {
            this._handlers = /* @__PURE__ */ Object.create(null), this._handlerFb = () => {
            }, this._active = d;
          }
          reset() {
            if (this._state === 2)
              for (let u = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; u >= 0; --u)
                this._active[u].end(!1);
            this._stack.paused = !1, this._active = d, this._id = -1, this._state = 0;
          }
          _start() {
            if (this._active = this._handlers[this._id] || d, this._active.length)
              for (let u = this._active.length - 1; u >= 0; u--)
                this._active[u].start();
            else
              this._handlerFb(this._id, "START");
          }
          _put(u, b, g) {
            if (this._active.length)
              for (let c = this._active.length - 1; c >= 0; c--)
                this._active[c].put(u, b, g);
            else
              this._handlerFb(this._id, "PUT", (0, f.utf32ToString)(u, b, g));
          }
          start() {
            this.reset(), this._state = 1;
          }
          put(u, b, g) {
            if (this._state !== 3) {
              if (this._state === 1)
                for (; b < g; ) {
                  const c = u[b++];
                  if (c === 59) {
                    this._state = 2, this._start();
                    break;
                  }
                  if (c < 48 || 57 < c)
                    return void (this._state = 3);
                  this._id === -1 && (this._id = 0), this._id = 10 * this._id + c - 48;
                }
              this._state === 2 && g - b > 0 && this._put(u, b, g);
            }
          }
          end(u, b = !0) {
            if (this._state !== 0) {
              if (this._state !== 3)
                if (this._state === 1 && this._start(), this._active.length) {
                  let g = !1, c = this._active.length - 1, e = !1;
                  if (this._stack.paused && (c = this._stack.loopPosition - 1, g = b, e = this._stack.fallThrough, this._stack.paused = !1), !e && g === !1) {
                    for (; c >= 0 && (g = this._active[c].end(u), g !== !0); c--)
                      if (g instanceof Promise)
                        return this._stack.paused = !0, this._stack.loopPosition = c, this._stack.fallThrough = !1, g;
                    c--;
                  }
                  for (; c >= 0; c--)
                    if (g = this._active[c].end(!1), g instanceof Promise)
                      return this._stack.paused = !0, this._stack.loopPosition = c, this._stack.fallThrough = !0, g;
                } else
                  this._handlerFb(this._id, "END", u);
              this._active = d, this._id = -1, this._state = 0;
            }
          }
        }, r.OscHandler = class {
          constructor(u) {
            this._handler = u, this._data = "", this._hitLimit = !1;
          }
          start() {
            this._data = "", this._hitLimit = !1;
          }
          put(u, b, g) {
            this._hitLimit || (this._data += (0, f.utf32ToString)(u, b, g), this._data.length > h.PAYLOAD_LIMIT && (this._data = "", this._hitLimit = !0));
          }
          end(u) {
            let b = !1;
            if (this._hitLimit)
              b = !1;
            else if (u && (b = this._handler(this._data), b instanceof Promise))
              return b.then((g) => (this._data = "", this._hitLimit = !1, g));
            return this._data = "", this._hitLimit = !1, b;
          }
        };
      }, 8742: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.Params = void 0;
        const a = 2147483647;
        class h {
          constructor(d = 32, u = 32) {
            if (this.maxLength = d, this.maxSubParamsLength = u, u > 256)
              throw new Error("maxSubParamsLength must not be greater than 256");
            this.params = new Int32Array(d), this.length = 0, this._subParams = new Int32Array(u), this._subParamsLength = 0, this._subParamsIdx = new Uint16Array(d), this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
          }
          static fromArray(d) {
            const u = new h();
            if (!d.length)
              return u;
            for (let b = Array.isArray(d[0]) ? 1 : 0; b < d.length; ++b) {
              const g = d[b];
              if (Array.isArray(g))
                for (let c = 0; c < g.length; ++c)
                  u.addSubParam(g[c]);
              else
                u.addParam(g);
            }
            return u;
          }
          clone() {
            const d = new h(this.maxLength, this.maxSubParamsLength);
            return d.params.set(this.params), d.length = this.length, d._subParams.set(this._subParams), d._subParamsLength = this._subParamsLength, d._subParamsIdx.set(this._subParamsIdx), d._rejectDigits = this._rejectDigits, d._rejectSubDigits = this._rejectSubDigits, d._digitIsSub = this._digitIsSub, d;
          }
          toArray() {
            const d = [];
            for (let u = 0; u < this.length; ++u) {
              d.push(this.params[u]);
              const b = this._subParamsIdx[u] >> 8, g = 255 & this._subParamsIdx[u];
              g - b > 0 && d.push(Array.prototype.slice.call(this._subParams, b, g));
            }
            return d;
          }
          reset() {
            this.length = 0, this._subParamsLength = 0, this._rejectDigits = !1, this._rejectSubDigits = !1, this._digitIsSub = !1;
          }
          addParam(d) {
            if (this._digitIsSub = !1, this.length >= this.maxLength)
              this._rejectDigits = !0;
            else {
              if (d < -1)
                throw new Error("values lesser than -1 are not allowed");
              this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength, this.params[this.length++] = d > a ? a : d;
            }
          }
          addSubParam(d) {
            if (this._digitIsSub = !0, this.length)
              if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength)
                this._rejectSubDigits = !0;
              else {
                if (d < -1)
                  throw new Error("values lesser than -1 are not allowed");
                this._subParams[this._subParamsLength++] = d > a ? a : d, this._subParamsIdx[this.length - 1]++;
              }
          }
          hasSubParams(d) {
            return (255 & this._subParamsIdx[d]) - (this._subParamsIdx[d] >> 8) > 0;
          }
          getSubParams(d) {
            const u = this._subParamsIdx[d] >> 8, b = 255 & this._subParamsIdx[d];
            return b - u > 0 ? this._subParams.subarray(u, b) : null;
          }
          getSubParamsAll() {
            const d = {};
            for (let u = 0; u < this.length; ++u) {
              const b = this._subParamsIdx[u] >> 8, g = 255 & this._subParamsIdx[u];
              g - b > 0 && (d[u] = this._subParams.slice(b, g));
            }
            return d;
          }
          addDigit(d) {
            let u;
            if (this._rejectDigits || !(u = this._digitIsSub ? this._subParamsLength : this.length) || this._digitIsSub && this._rejectSubDigits)
              return;
            const b = this._digitIsSub ? this._subParams : this.params, g = b[u - 1];
            b[u - 1] = ~g ? Math.min(10 * g + d, a) : d;
          }
        }
        r.Params = h;
      }, 5741: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.AddonManager = void 0, r.AddonManager = class {
          constructor() {
            this._addons = [];
          }
          dispose() {
            for (let a = this._addons.length - 1; a >= 0; a--)
              this._addons[a].instance.dispose();
          }
          loadAddon(a, h) {
            const f = { instance: h, dispose: h.dispose, isDisposed: !1 };
            this._addons.push(f), h.dispose = () => this._wrappedAddonDispose(f), h.activate(a);
          }
          _wrappedAddonDispose(a) {
            if (a.isDisposed)
              return;
            let h = -1;
            for (let f = 0; f < this._addons.length; f++)
              if (this._addons[f] === a) {
                h = f;
                break;
              }
            if (h === -1)
              throw new Error("Could not dispose an addon that has not been loaded");
            a.isDisposed = !0, a.dispose.apply(a.instance), this._addons.splice(h, 1);
          }
        };
      }, 8771: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferApiView = void 0;
        const h = a(3785), f = a(511);
        r.BufferApiView = class {
          constructor(d, u) {
            this._buffer = d, this.type = u;
          }
          init(d) {
            return this._buffer = d, this;
          }
          get cursorY() {
            return this._buffer.y;
          }
          get cursorX() {
            return this._buffer.x;
          }
          get viewportY() {
            return this._buffer.ydisp;
          }
          get baseY() {
            return this._buffer.ybase;
          }
          get length() {
            return this._buffer.lines.length;
          }
          getLine(d) {
            const u = this._buffer.lines.get(d);
            if (u)
              return new h.BufferLineApiView(u);
          }
          getNullCell() {
            return new f.CellData();
          }
        };
      }, 3785: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferLineApiView = void 0;
        const h = a(511);
        r.BufferLineApiView = class {
          constructor(f) {
            this._line = f;
          }
          get isWrapped() {
            return this._line.isWrapped;
          }
          get length() {
            return this._line.length;
          }
          getCell(f, d) {
            if (!(f < 0 || f >= this._line.length))
              return d ? (this._line.loadCell(f, d), d) : this._line.loadCell(f, new h.CellData());
          }
          translateToString(f, d, u) {
            return this._line.translateToString(f, d, u);
          }
        };
      }, 8285: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferNamespaceApi = void 0;
        const h = a(8771), f = a(8460);
        r.BufferNamespaceApi = class {
          constructor(d) {
            this._core = d, this._onBufferChange = new f.EventEmitter(), this.onBufferChange = this._onBufferChange.event, this._normal = new h.BufferApiView(this._core.buffers.normal, "normal"), this._alternate = new h.BufferApiView(this._core.buffers.alt, "alternate"), this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
          }
          get active() {
            if (this._core.buffers.active === this._core.buffers.normal)
              return this.normal;
            if (this._core.buffers.active === this._core.buffers.alt)
              return this.alternate;
            throw new Error("Active buffer is neither normal nor alternate");
          }
          get normal() {
            return this._normal.init(this._core.buffers.normal);
          }
          get alternate() {
            return this._alternate.init(this._core.buffers.alt);
          }
        };
      }, 7975: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.ParserApi = void 0, r.ParserApi = class {
          constructor(a) {
            this._core = a;
          }
          registerCsiHandler(a, h) {
            return this._core.registerCsiHandler(a, (f) => h(f.toArray()));
          }
          addCsiHandler(a, h) {
            return this.registerCsiHandler(a, h);
          }
          registerDcsHandler(a, h) {
            return this._core.registerDcsHandler(a, (f, d) => h(f, d.toArray()));
          }
          addDcsHandler(a, h) {
            return this.registerDcsHandler(a, h);
          }
          registerEscHandler(a, h) {
            return this._core.registerEscHandler(a, h);
          }
          addEscHandler(a, h) {
            return this.registerEscHandler(a, h);
          }
          registerOscHandler(a, h) {
            return this._core.registerOscHandler(a, h);
          }
          addOscHandler(a, h) {
            return this.registerOscHandler(a, h);
          }
        };
      }, 7090: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeApi = void 0, r.UnicodeApi = class {
          constructor(a) {
            this._core = a;
          }
          register(a) {
            this._core.unicodeService.register(a);
          }
          get versions() {
            return this._core.unicodeService.versions;
          }
          get activeVersion() {
            return this._core.unicodeService.activeVersion;
          }
          set activeVersion(a) {
            this._core.unicodeService.activeVersion = a;
          }
        };
      }, 744: function(T, r, a) {
        var h = this && this.__decorate || function(e, i, n, t) {
          var s, l = arguments.length, _ = l < 3 ? i : t === null ? t = Object.getOwnPropertyDescriptor(i, n) : t;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            _ = Reflect.decorate(e, i, n, t);
          else
            for (var m = e.length - 1; m >= 0; m--)
              (s = e[m]) && (_ = (l < 3 ? s(_) : l > 3 ? s(i, n, _) : s(i, n)) || _);
          return l > 3 && _ && Object.defineProperty(i, n, _), _;
        }, f = this && this.__param || function(e, i) {
          return function(n, t) {
            i(n, t, e);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.BufferService = r.MINIMUM_ROWS = r.MINIMUM_COLS = void 0;
        const d = a(2585), u = a(5295), b = a(8460), g = a(844);
        r.MINIMUM_COLS = 2, r.MINIMUM_ROWS = 1;
        let c = class extends g.Disposable {
          constructor(e) {
            super(), this.isUserScrolling = !1, this._onResize = this.register(new b.EventEmitter()), this.onResize = this._onResize.event, this._onScroll = this.register(new b.EventEmitter()), this.onScroll = this._onScroll.event, this.cols = Math.max(e.rawOptions.cols || 0, r.MINIMUM_COLS), this.rows = Math.max(e.rawOptions.rows || 0, r.MINIMUM_ROWS), this.buffers = this.register(new u.BufferSet(e, this));
          }
          get buffer() {
            return this.buffers.active;
          }
          resize(e, i) {
            this.cols = e, this.rows = i, this.buffers.resize(e, i), this._onResize.fire({ cols: e, rows: i });
          }
          reset() {
            this.buffers.reset(), this.isUserScrolling = !1;
          }
          scroll(e, i = !1) {
            const n = this.buffer;
            let t;
            t = this._cachedBlankLine, t && t.length === this.cols && t.getFg(0) === e.fg && t.getBg(0) === e.bg || (t = n.getBlankLine(e, i), this._cachedBlankLine = t), t.isWrapped = i;
            const s = n.ybase + n.scrollTop, l = n.ybase + n.scrollBottom;
            if (n.scrollTop === 0) {
              const _ = n.lines.isFull;
              l === n.lines.length - 1 ? _ ? n.lines.recycle().copyFrom(t) : n.lines.push(t.clone()) : n.lines.splice(l + 1, 0, t.clone()), _ ? this.isUserScrolling && (n.ydisp = Math.max(n.ydisp - 1, 0)) : (n.ybase++, this.isUserScrolling || n.ydisp++);
            } else {
              const _ = l - s + 1;
              n.lines.shiftElements(s + 1, _ - 1, -1), n.lines.set(l, t.clone());
            }
            this.isUserScrolling || (n.ydisp = n.ybase), this._onScroll.fire(n.ydisp);
          }
          scrollLines(e, i, n) {
            const t = this.buffer;
            if (e < 0) {
              if (t.ydisp === 0)
                return;
              this.isUserScrolling = !0;
            } else
              e + t.ydisp >= t.ybase && (this.isUserScrolling = !1);
            const s = t.ydisp;
            t.ydisp = Math.max(Math.min(t.ydisp + e, t.ybase), 0), s !== t.ydisp && (i || this._onScroll.fire(t.ydisp));
          }
          scrollPages(e) {
            this.scrollLines(e * (this.rows - 1));
          }
          scrollToTop() {
            this.scrollLines(-this.buffer.ydisp);
          }
          scrollToBottom() {
            this.scrollLines(this.buffer.ybase - this.buffer.ydisp);
          }
          scrollToLine(e) {
            const i = e - this.buffer.ydisp;
            i !== 0 && this.scrollLines(i);
          }
        };
        c = h([f(0, d.IOptionsService)], c), r.BufferService = c;
      }, 7994: (T, r) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CharsetService = void 0, r.CharsetService = class {
          constructor() {
            this.glevel = 0, this._charsets = [];
          }
          reset() {
            this.charset = void 0, this._charsets = [], this.glevel = 0;
          }
          setgLevel(a) {
            this.glevel = a, this.charset = this._charsets[a];
          }
          setgCharset(a, h) {
            this._charsets[a] = h, this.glevel === a && (this.charset = h);
          }
        };
      }, 1753: function(T, r, a) {
        var h = this && this.__decorate || function(t, s, l, _) {
          var m, o = arguments.length, v = o < 3 ? s : _ === null ? _ = Object.getOwnPropertyDescriptor(s, l) : _;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            v = Reflect.decorate(t, s, l, _);
          else
            for (var S = t.length - 1; S >= 0; S--)
              (m = t[S]) && (v = (o < 3 ? m(v) : o > 3 ? m(s, l, v) : m(s, l)) || v);
          return o > 3 && v && Object.defineProperty(s, l, v), v;
        }, f = this && this.__param || function(t, s) {
          return function(l, _) {
            s(l, _, t);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreMouseService = void 0;
        const d = a(2585), u = a(8460), b = a(844), g = { NONE: { events: 0, restrict: () => !1 }, X10: { events: 1, restrict: (t) => t.button !== 4 && t.action === 1 && (t.ctrl = !1, t.alt = !1, t.shift = !1, !0) }, VT200: { events: 19, restrict: (t) => t.action !== 32 }, DRAG: { events: 23, restrict: (t) => t.action !== 32 || t.button !== 3 }, ANY: { events: 31, restrict: (t) => !0 } };
        function c(t, s) {
          let l = (t.ctrl ? 16 : 0) | (t.shift ? 4 : 0) | (t.alt ? 8 : 0);
          return t.button === 4 ? (l |= 64, l |= t.action) : (l |= 3 & t.button, 4 & t.button && (l |= 64), 8 & t.button && (l |= 128), t.action === 32 ? l |= 32 : t.action !== 0 || s || (l |= 3)), l;
        }
        const e = String.fromCharCode, i = { DEFAULT: (t) => {
          const s = [c(t, !1) + 32, t.col + 32, t.row + 32];
          return s[0] > 255 || s[1] > 255 || s[2] > 255 ? "" : `\x1B[M${e(s[0])}${e(s[1])}${e(s[2])}`;
        }, SGR: (t) => {
          const s = t.action === 0 && t.button !== 4 ? "m" : "M";
          return `\x1B[<${c(t, !0)};${t.col};${t.row}${s}`;
        }, SGR_PIXELS: (t) => {
          const s = t.action === 0 && t.button !== 4 ? "m" : "M";
          return `\x1B[<${c(t, !0)};${t.x};${t.y}${s}`;
        } };
        let n = class extends b.Disposable {
          constructor(t, s) {
            super(), this._bufferService = t, this._coreService = s, this._protocols = {}, this._encodings = {}, this._activeProtocol = "", this._activeEncoding = "", this._lastEvent = null, this._onProtocolChange = this.register(new u.EventEmitter()), this.onProtocolChange = this._onProtocolChange.event;
            for (const l of Object.keys(g))
              this.addProtocol(l, g[l]);
            for (const l of Object.keys(i))
              this.addEncoding(l, i[l]);
            this.reset();
          }
          addProtocol(t, s) {
            this._protocols[t] = s;
          }
          addEncoding(t, s) {
            this._encodings[t] = s;
          }
          get activeProtocol() {
            return this._activeProtocol;
          }
          get areMouseEventsActive() {
            return this._protocols[this._activeProtocol].events !== 0;
          }
          set activeProtocol(t) {
            if (!this._protocols[t])
              throw new Error(`unknown protocol "${t}"`);
            this._activeProtocol = t, this._onProtocolChange.fire(this._protocols[t].events);
          }
          get activeEncoding() {
            return this._activeEncoding;
          }
          set activeEncoding(t) {
            if (!this._encodings[t])
              throw new Error(`unknown encoding "${t}"`);
            this._activeEncoding = t;
          }
          reset() {
            this.activeProtocol = "NONE", this.activeEncoding = "DEFAULT", this._lastEvent = null;
          }
          triggerMouseEvent(t) {
            if (t.col < 0 || t.col >= this._bufferService.cols || t.row < 0 || t.row >= this._bufferService.rows || t.button === 4 && t.action === 32 || t.button === 3 && t.action !== 32 || t.button !== 4 && (t.action === 2 || t.action === 3) || (t.col++, t.row++, t.action === 32 && this._lastEvent && this._equalEvents(this._lastEvent, t, this._activeEncoding === "SGR_PIXELS")) || !this._protocols[this._activeProtocol].restrict(t))
              return !1;
            const s = this._encodings[this._activeEncoding](t);
            return s && (this._activeEncoding === "DEFAULT" ? this._coreService.triggerBinaryEvent(s) : this._coreService.triggerDataEvent(s, !0)), this._lastEvent = t, !0;
          }
          explainEvents(t) {
            return { down: !!(1 & t), up: !!(2 & t), drag: !!(4 & t), move: !!(8 & t), wheel: !!(16 & t) };
          }
          _equalEvents(t, s, l) {
            if (l) {
              if (t.x !== s.x || t.y !== s.y)
                return !1;
            } else if (t.col !== s.col || t.row !== s.row)
              return !1;
            return t.button === s.button && t.action === s.action && t.ctrl === s.ctrl && t.alt === s.alt && t.shift === s.shift;
          }
        };
        n = h([f(0, d.IBufferService), f(1, d.ICoreService)], n), r.CoreMouseService = n;
      }, 6975: function(T, r, a) {
        var h = this && this.__decorate || function(n, t, s, l) {
          var _, m = arguments.length, o = m < 3 ? t : l === null ? l = Object.getOwnPropertyDescriptor(t, s) : l;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            o = Reflect.decorate(n, t, s, l);
          else
            for (var v = n.length - 1; v >= 0; v--)
              (_ = n[v]) && (o = (m < 3 ? _(o) : m > 3 ? _(t, s, o) : _(t, s)) || o);
          return m > 3 && o && Object.defineProperty(t, s, o), o;
        }, f = this && this.__param || function(n, t) {
          return function(s, l) {
            t(s, l, n);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.CoreService = void 0;
        const d = a(2585), u = a(8460), b = a(1439), g = a(844), c = Object.freeze({ insertMode: !1 }), e = Object.freeze({ applicationCursorKeys: !1, applicationKeypad: !1, bracketedPasteMode: !1, origin: !1, reverseWraparound: !1, sendFocus: !1, wraparound: !0 });
        let i = class extends g.Disposable {
          constructor(n, t, s) {
            super(), this._bufferService = n, this._logService = t, this._optionsService = s, this.isCursorInitialized = !1, this.isCursorHidden = !1, this._onData = this.register(new u.EventEmitter()), this.onData = this._onData.event, this._onUserInput = this.register(new u.EventEmitter()), this.onUserInput = this._onUserInput.event, this._onBinary = this.register(new u.EventEmitter()), this.onBinary = this._onBinary.event, this._onRequestScrollToBottom = this.register(new u.EventEmitter()), this.onRequestScrollToBottom = this._onRequestScrollToBottom.event, this.modes = (0, b.clone)(c), this.decPrivateModes = (0, b.clone)(e);
          }
          reset() {
            this.modes = (0, b.clone)(c), this.decPrivateModes = (0, b.clone)(e);
          }
          triggerDataEvent(n, t = !1) {
            if (this._optionsService.rawOptions.disableStdin)
              return;
            const s = this._bufferService.buffer;
            t && this._optionsService.rawOptions.scrollOnUserInput && s.ybase !== s.ydisp && this._onRequestScrollToBottom.fire(), t && this._onUserInput.fire(), this._logService.debug(`sending data "${n}"`, () => n.split("").map((l) => l.charCodeAt(0))), this._onData.fire(n);
          }
          triggerBinaryEvent(n) {
            this._optionsService.rawOptions.disableStdin || (this._logService.debug(`sending binary "${n}"`, () => n.split("").map((t) => t.charCodeAt(0))), this._onBinary.fire(n));
          }
        };
        i = h([f(0, d.IBufferService), f(1, d.ILogService), f(2, d.IOptionsService)], i), r.CoreService = i;
      }, 9074: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.DecorationService = void 0;
        const h = a(8055), f = a(8460), d = a(844), u = a(6106);
        let b = 0, g = 0;
        class c extends d.Disposable {
          constructor() {
            super(), this._decorations = new u.SortedList((n) => n == null ? void 0 : n.marker.line), this._onDecorationRegistered = this.register(new f.EventEmitter()), this.onDecorationRegistered = this._onDecorationRegistered.event, this._onDecorationRemoved = this.register(new f.EventEmitter()), this.onDecorationRemoved = this._onDecorationRemoved.event, this.register((0, d.toDisposable)(() => {
              for (const n of this._decorations.values())
                this._onDecorationRemoved.fire(n);
              this.reset();
            }));
          }
          get decorations() {
            return this._decorations.values();
          }
          registerDecoration(n) {
            if (n.marker.isDisposed)
              return;
            const t = new e(n);
            if (t) {
              const s = t.marker.onDispose(() => t.dispose());
              t.onDispose(() => {
                t && (this._decorations.delete(t) && this._onDecorationRemoved.fire(t), s.dispose());
              }), this._decorations.insert(t), this._onDecorationRegistered.fire(t);
            }
            return t;
          }
          reset() {
            for (const n of this._decorations.values())
              n.dispose();
            this._decorations.clear();
          }
          *getDecorationsAtCell(n, t, s) {
            var l, _, m;
            let o = 0, v = 0;
            for (const S of this._decorations.getKeyIterator(t))
              o = (l = S.options.x) !== null && l !== void 0 ? l : 0, v = o + ((_ = S.options.width) !== null && _ !== void 0 ? _ : 1), n >= o && n < v && (!s || ((m = S.options.layer) !== null && m !== void 0 ? m : "bottom") === s) && (yield S);
          }
          forEachDecorationAtCell(n, t, s, l) {
            this._decorations.forEachByKey(t, (_) => {
              var m, o, v;
              b = (m = _.options.x) !== null && m !== void 0 ? m : 0, g = b + ((o = _.options.width) !== null && o !== void 0 ? o : 1), n >= b && n < g && (!s || ((v = _.options.layer) !== null && v !== void 0 ? v : "bottom") === s) && l(_);
            });
          }
          dispose() {
            for (const n of this._decorations.values())
              this._onDecorationRemoved.fire(n);
            this.reset();
          }
        }
        r.DecorationService = c;
        class e extends d.Disposable {
          constructor(n) {
            super(), this.options = n, this.isDisposed = !1, this.onRenderEmitter = this.register(new f.EventEmitter()), this.onRender = this.onRenderEmitter.event, this._onDispose = this.register(new f.EventEmitter()), this.onDispose = this._onDispose.event, this._cachedBg = null, this._cachedFg = null, this.marker = n.marker, this.options.overviewRulerOptions && !this.options.overviewRulerOptions.position && (this.options.overviewRulerOptions.position = "full");
          }
          get backgroundColorRGB() {
            return this._cachedBg === null && (this.options.backgroundColor ? this._cachedBg = h.css.toColor(this.options.backgroundColor) : this._cachedBg = void 0), this._cachedBg;
          }
          get foregroundColorRGB() {
            return this._cachedFg === null && (this.options.foregroundColor ? this._cachedFg = h.css.toColor(this.options.foregroundColor) : this._cachedFg = void 0), this._cachedFg;
          }
          dispose() {
            this._onDispose.fire(), super.dispose();
          }
        }
      }, 4348: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.InstantiationService = r.ServiceCollection = void 0;
        const h = a(2585), f = a(8343);
        class d {
          constructor(...b) {
            this._entries = /* @__PURE__ */ new Map();
            for (const [g, c] of b)
              this.set(g, c);
          }
          set(b, g) {
            const c = this._entries.get(b);
            return this._entries.set(b, g), c;
          }
          forEach(b) {
            for (const [g, c] of this._entries.entries())
              b(g, c);
          }
          has(b) {
            return this._entries.has(b);
          }
          get(b) {
            return this._entries.get(b);
          }
        }
        r.ServiceCollection = d, r.InstantiationService = class {
          constructor() {
            this._services = new d(), this._services.set(h.IInstantiationService, this);
          }
          setService(u, b) {
            this._services.set(u, b);
          }
          getService(u) {
            return this._services.get(u);
          }
          createInstance(u, ...b) {
            const g = (0, f.getServiceDependencies)(u).sort((i, n) => i.index - n.index), c = [];
            for (const i of g) {
              const n = this._services.get(i.id);
              if (!n)
                throw new Error(`[createInstance] ${u.name} depends on UNKNOWN service ${i.id}.`);
              c.push(n);
            }
            const e = g.length > 0 ? g[0].index : b.length;
            if (b.length !== e)
              throw new Error(`[createInstance] First service dependency of ${u.name} at position ${e + 1} conflicts with ${b.length} static arguments`);
            return new u(...b, ...c);
          }
        };
      }, 7866: function(T, r, a) {
        var h = this && this.__decorate || function(c, e, i, n) {
          var t, s = arguments.length, l = s < 3 ? e : n === null ? n = Object.getOwnPropertyDescriptor(e, i) : n;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            l = Reflect.decorate(c, e, i, n);
          else
            for (var _ = c.length - 1; _ >= 0; _--)
              (t = c[_]) && (l = (s < 3 ? t(l) : s > 3 ? t(e, i, l) : t(e, i)) || l);
          return s > 3 && l && Object.defineProperty(e, i, l), l;
        }, f = this && this.__param || function(c, e) {
          return function(i, n) {
            e(i, n, c);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.LogService = void 0;
        const d = a(844), u = a(2585), b = { debug: u.LogLevelEnum.DEBUG, info: u.LogLevelEnum.INFO, warn: u.LogLevelEnum.WARN, error: u.LogLevelEnum.ERROR, off: u.LogLevelEnum.OFF };
        let g = class extends d.Disposable {
          constructor(c) {
            super(), this._optionsService = c, this.logLevel = u.LogLevelEnum.OFF, this._updateLogLevel(), this.register(this._optionsService.onSpecificOptionChange("logLevel", () => this._updateLogLevel()));
          }
          _updateLogLevel() {
            this.logLevel = b[this._optionsService.rawOptions.logLevel];
          }
          _evalLazyOptionalParams(c) {
            for (let e = 0; e < c.length; e++)
              typeof c[e] == "function" && (c[e] = c[e]());
          }
          _log(c, e, i) {
            this._evalLazyOptionalParams(i), c.call(console, "xterm.js: " + e, ...i);
          }
          debug(c, ...e) {
            this.logLevel <= u.LogLevelEnum.DEBUG && this._log(console.log, c, e);
          }
          info(c, ...e) {
            this.logLevel <= u.LogLevelEnum.INFO && this._log(console.info, c, e);
          }
          warn(c, ...e) {
            this.logLevel <= u.LogLevelEnum.WARN && this._log(console.warn, c, e);
          }
          error(c, ...e) {
            this.logLevel <= u.LogLevelEnum.ERROR && this._log(console.error, c, e);
          }
        };
        g = h([f(0, u.IOptionsService)], g), r.LogService = g;
      }, 7302: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.OptionsService = r.DEFAULT_OPTIONS = void 0;
        const h = a(8460), f = a(6114), d = a(844);
        r.DEFAULT_OPTIONS = { cols: 80, rows: 24, cursorBlink: !1, cursorStyle: "block", cursorWidth: 1, customGlyphs: !0, drawBoldTextInBrightColors: !0, fastScrollModifier: "alt", fastScrollSensitivity: 5, fontFamily: "courier-new, courier, monospace", fontSize: 15, fontWeight: "normal", fontWeightBold: "bold", lineHeight: 1, letterSpacing: 0, linkHandler: null, logLevel: "info", scrollback: 1e3, scrollOnUserInput: !0, scrollSensitivity: 1, screenReaderMode: !1, smoothScrollDuration: 0, macOptionIsMeta: !1, macOptionClickForcesSelection: !1, minimumContrastRatio: 1, disableStdin: !1, allowProposedApi: !1, allowTransparency: !1, tabStopWidth: 8, theme: {}, rightClickSelectsWord: f.isMac, windowOptions: {}, windowsMode: !1, wordSeparator: " ()[]{}',\"`", altClickMovesCursor: !0, convertEol: !1, termName: "xterm", cancelEvents: !1, overviewRulerWidth: 0 };
        const u = ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
        class b extends d.Disposable {
          constructor(c) {
            super(), this._onOptionChange = this.register(new h.EventEmitter()), this.onOptionChange = this._onOptionChange.event;
            const e = Object.assign({}, r.DEFAULT_OPTIONS);
            for (const i in c)
              if (i in e)
                try {
                  const n = c[i];
                  e[i] = this._sanitizeAndValidateOption(i, n);
                } catch (n) {
                  console.error(n);
                }
            this.rawOptions = e, this.options = Object.assign({}, e), this._setupOptions();
          }
          onSpecificOptionChange(c, e) {
            return this.onOptionChange((i) => {
              i === c && e(this.rawOptions[c]);
            });
          }
          onMultipleOptionChange(c, e) {
            return this.onOptionChange((i) => {
              c.indexOf(i) !== -1 && e();
            });
          }
          _setupOptions() {
            const c = (i) => {
              if (!(i in r.DEFAULT_OPTIONS))
                throw new Error(`No option with key "${i}"`);
              return this.rawOptions[i];
            }, e = (i, n) => {
              if (!(i in r.DEFAULT_OPTIONS))
                throw new Error(`No option with key "${i}"`);
              n = this._sanitizeAndValidateOption(i, n), this.rawOptions[i] !== n && (this.rawOptions[i] = n, this._onOptionChange.fire(i));
            };
            for (const i in this.rawOptions) {
              const n = { get: c.bind(this, i), set: e.bind(this, i) };
              Object.defineProperty(this.options, i, n);
            }
          }
          _sanitizeAndValidateOption(c, e) {
            switch (c) {
              case "cursorStyle":
                if (e || (e = r.DEFAULT_OPTIONS[c]), !function(i) {
                  return i === "block" || i === "underline" || i === "bar";
                }(e))
                  throw new Error(`"${e}" is not a valid value for ${c}`);
                break;
              case "wordSeparator":
                e || (e = r.DEFAULT_OPTIONS[c]);
                break;
              case "fontWeight":
              case "fontWeightBold":
                if (typeof e == "number" && 1 <= e && e <= 1e3)
                  break;
                e = u.includes(e) ? e : r.DEFAULT_OPTIONS[c];
                break;
              case "cursorWidth":
                e = Math.floor(e);
              case "lineHeight":
              case "tabStopWidth":
                if (e < 1)
                  throw new Error(`${c} cannot be less than 1, value: ${e}`);
                break;
              case "minimumContrastRatio":
                e = Math.max(1, Math.min(21, Math.round(10 * e) / 10));
                break;
              case "scrollback":
                if ((e = Math.min(e, 4294967295)) < 0)
                  throw new Error(`${c} cannot be less than 0, value: ${e}`);
                break;
              case "fastScrollSensitivity":
              case "scrollSensitivity":
                if (e <= 0)
                  throw new Error(`${c} cannot be less than or equal to 0, value: ${e}`);
              case "rows":
              case "cols":
                if (!e && e !== 0)
                  throw new Error(`${c} must be numeric, value: ${e}`);
            }
            return e;
          }
        }
        r.OptionsService = b;
      }, 2660: function(T, r, a) {
        var h = this && this.__decorate || function(b, g, c, e) {
          var i, n = arguments.length, t = n < 3 ? g : e === null ? e = Object.getOwnPropertyDescriptor(g, c) : e;
          if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
            t = Reflect.decorate(b, g, c, e);
          else
            for (var s = b.length - 1; s >= 0; s--)
              (i = b[s]) && (t = (n < 3 ? i(t) : n > 3 ? i(g, c, t) : i(g, c)) || t);
          return n > 3 && t && Object.defineProperty(g, c, t), t;
        }, f = this && this.__param || function(b, g) {
          return function(c, e) {
            g(c, e, b);
          };
        };
        Object.defineProperty(r, "__esModule", { value: !0 }), r.OscLinkService = void 0;
        const d = a(2585);
        let u = class {
          constructor(b) {
            this._bufferService = b, this._nextId = 1, this._entriesWithId = /* @__PURE__ */ new Map(), this._dataByLinkId = /* @__PURE__ */ new Map();
          }
          registerLink(b) {
            const g = this._bufferService.buffer;
            if (b.id === void 0) {
              const s = g.addMarker(g.ybase + g.y), l = { data: b, id: this._nextId++, lines: [s] };
              return s.onDispose(() => this._removeMarkerFromLink(l, s)), this._dataByLinkId.set(l.id, l), l.id;
            }
            const c = b, e = this._getEntryIdKey(c), i = this._entriesWithId.get(e);
            if (i)
              return this.addLineToLink(i.id, g.ybase + g.y), i.id;
            const n = g.addMarker(g.ybase + g.y), t = { id: this._nextId++, key: this._getEntryIdKey(c), data: c, lines: [n] };
            return n.onDispose(() => this._removeMarkerFromLink(t, n)), this._entriesWithId.set(t.key, t), this._dataByLinkId.set(t.id, t), t.id;
          }
          addLineToLink(b, g) {
            const c = this._dataByLinkId.get(b);
            if (c && c.lines.every((e) => e.line !== g)) {
              const e = this._bufferService.buffer.addMarker(g);
              c.lines.push(e), e.onDispose(() => this._removeMarkerFromLink(c, e));
            }
          }
          getLinkData(b) {
            var g;
            return (g = this._dataByLinkId.get(b)) === null || g === void 0 ? void 0 : g.data;
          }
          _getEntryIdKey(b) {
            return `${b.id};;${b.uri}`;
          }
          _removeMarkerFromLink(b, g) {
            const c = b.lines.indexOf(g);
            c !== -1 && (b.lines.splice(c, 1), b.lines.length === 0 && (b.data.id !== void 0 && this._entriesWithId.delete(b.key), this._dataByLinkId.delete(b.id)));
          }
        };
        u = h([f(0, d.IBufferService)], u), r.OscLinkService = u;
      }, 8343: (T, r) => {
        function a(h, f, d) {
          f.di$target === f ? f.di$dependencies.push({ id: h, index: d }) : (f.di$dependencies = [{ id: h, index: d }], f.di$target = f);
        }
        Object.defineProperty(r, "__esModule", { value: !0 }), r.createDecorator = r.getServiceDependencies = r.serviceRegistry = void 0, r.serviceRegistry = /* @__PURE__ */ new Map(), r.getServiceDependencies = function(h) {
          return h.di$dependencies || [];
        }, r.createDecorator = function(h) {
          if (r.serviceRegistry.has(h))
            return r.serviceRegistry.get(h);
          const f = function(d, u, b) {
            if (arguments.length !== 3)
              throw new Error("@IServiceName-decorator can only be used to decorate a parameter");
            a(f, d, b);
          };
          return f.toString = () => h, r.serviceRegistry.set(h, f), f;
        };
      }, 2585: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.IDecorationService = r.IUnicodeService = r.IOscLinkService = r.IOptionsService = r.ILogService = r.LogLevelEnum = r.IInstantiationService = r.ICharsetService = r.ICoreService = r.ICoreMouseService = r.IBufferService = void 0;
        const h = a(8343);
        var f;
        r.IBufferService = (0, h.createDecorator)("BufferService"), r.ICoreMouseService = (0, h.createDecorator)("CoreMouseService"), r.ICoreService = (0, h.createDecorator)("CoreService"), r.ICharsetService = (0, h.createDecorator)("CharsetService"), r.IInstantiationService = (0, h.createDecorator)("InstantiationService"), (f = r.LogLevelEnum || (r.LogLevelEnum = {}))[f.DEBUG = 0] = "DEBUG", f[f.INFO = 1] = "INFO", f[f.WARN = 2] = "WARN", f[f.ERROR = 3] = "ERROR", f[f.OFF = 4] = "OFF", r.ILogService = (0, h.createDecorator)("LogService"), r.IOptionsService = (0, h.createDecorator)("OptionsService"), r.IOscLinkService = (0, h.createDecorator)("OscLinkService"), r.IUnicodeService = (0, h.createDecorator)("UnicodeService"), r.IDecorationService = (0, h.createDecorator)("DecorationService");
      }, 1480: (T, r, a) => {
        Object.defineProperty(r, "__esModule", { value: !0 }), r.UnicodeService = void 0;
        const h = a(8460), f = a(225);
        r.UnicodeService = class {
          constructor() {
            this._providers = /* @__PURE__ */ Object.create(null), this._active = "", this._onChange = new h.EventEmitter(), this.onChange = this._onChange.event;
            const d = new f.UnicodeV6();
            this.register(d), this._active = d.version, this._activeProvider = d;
          }
          dispose() {
            this._onChange.dispose();
          }
          get versions() {
            return Object.keys(this._providers);
          }
          get activeVersion() {
            return this._active;
          }
          set activeVersion(d) {
            if (!this._providers[d])
              throw new Error(`unknown Unicode version "${d}"`);
            this._active = d, this._activeProvider = this._providers[d], this._onChange.fire(d);
          }
          register(d) {
            this._providers[d.version] = d;
          }
          wcwidth(d) {
            return this._activeProvider.wcwidth(d);
          }
          getStringCellWidth(d) {
            let u = 0;
            const b = d.length;
            for (let g = 0; g < b; ++g) {
              let c = d.charCodeAt(g);
              if (55296 <= c && c <= 56319) {
                if (++g >= b)
                  return u + this.wcwidth(c);
                const e = d.charCodeAt(g);
                56320 <= e && e <= 57343 ? c = 1024 * (c - 55296) + e - 56320 + 65536 : u += this.wcwidth(e);
              }
              u += this.wcwidth(c);
            }
            return u;
          }
        };
      } }, V = {};
      function N(T) {
        var r = V[T];
        if (r !== void 0)
          return r.exports;
        var a = V[T] = { exports: {} };
        return D[T].call(a.exports, a, a.exports, N), a.exports;
      }
      var J = {};
      return (() => {
        var T = J;
        Object.defineProperty(T, "__esModule", { value: !0 }), T.Terminal = void 0;
        const r = N(3236), a = N(9042), h = N(7975), f = N(7090), d = N(5741), u = N(8285), b = ["cols", "rows"];
        T.Terminal = class {
          constructor(g) {
            this._core = new r.Terminal(g), this._addonManager = new d.AddonManager(), this._publicOptions = Object.assign({}, this._core.options);
            const c = (i) => this._core.options[i], e = (i, n) => {
              this._checkReadonlyOptions(i), this._core.options[i] = n;
            };
            for (const i in this._core.options) {
              const n = { get: c.bind(this, i), set: e.bind(this, i) };
              Object.defineProperty(this._publicOptions, i, n);
            }
          }
          _checkReadonlyOptions(g) {
            if (b.includes(g))
              throw new Error(`Option "${g}" can only be set in the constructor`);
          }
          _checkProposedApi() {
            if (!this._core.optionsService.rawOptions.allowProposedApi)
              throw new Error("You must set the allowProposedApi option to true to use proposed API");
          }
          get onBell() {
            return this._core.onBell;
          }
          get onBinary() {
            return this._core.onBinary;
          }
          get onCursorMove() {
            return this._core.onCursorMove;
          }
          get onData() {
            return this._core.onData;
          }
          get onKey() {
            return this._core.onKey;
          }
          get onLineFeed() {
            return this._core.onLineFeed;
          }
          get onRender() {
            return this._core.onRender;
          }
          get onResize() {
            return this._core.onResize;
          }
          get onScroll() {
            return this._core.onScroll;
          }
          get onSelectionChange() {
            return this._core.onSelectionChange;
          }
          get onTitleChange() {
            return this._core.onTitleChange;
          }
          get onWriteParsed() {
            return this._core.onWriteParsed;
          }
          get element() {
            return this._core.element;
          }
          get parser() {
            return this._parser || (this._parser = new h.ParserApi(this._core)), this._parser;
          }
          get unicode() {
            return this._checkProposedApi(), new f.UnicodeApi(this._core);
          }
          get textarea() {
            return this._core.textarea;
          }
          get rows() {
            return this._core.rows;
          }
          get cols() {
            return this._core.cols;
          }
          get buffer() {
            return this._buffer || (this._buffer = new u.BufferNamespaceApi(this._core)), this._buffer;
          }
          get markers() {
            return this._checkProposedApi(), this._core.markers;
          }
          get modes() {
            const g = this._core.coreService.decPrivateModes;
            let c = "none";
            switch (this._core.coreMouseService.activeProtocol) {
              case "X10":
                c = "x10";
                break;
              case "VT200":
                c = "vt200";
                break;
              case "DRAG":
                c = "drag";
                break;
              case "ANY":
                c = "any";
            }
            return { applicationCursorKeysMode: g.applicationCursorKeys, applicationKeypadMode: g.applicationKeypad, bracketedPasteMode: g.bracketedPasteMode, insertMode: this._core.coreService.modes.insertMode, mouseTrackingMode: c, originMode: g.origin, reverseWraparoundMode: g.reverseWraparound, sendFocusMode: g.sendFocus, wraparoundMode: g.wraparound };
          }
          get options() {
            return this._publicOptions;
          }
          set options(g) {
            for (const c in g)
              this._publicOptions[c] = g[c];
          }
          blur() {
            this._core.blur();
          }
          focus() {
            this._core.focus();
          }
          resize(g, c) {
            this._verifyIntegers(g, c), this._core.resize(g, c);
          }
          open(g) {
            this._core.open(g);
          }
          attachCustomKeyEventHandler(g) {
            this._core.attachCustomKeyEventHandler(g);
          }
          registerLinkProvider(g) {
            return this._core.registerLinkProvider(g);
          }
          registerCharacterJoiner(g) {
            return this._checkProposedApi(), this._core.registerCharacterJoiner(g);
          }
          deregisterCharacterJoiner(g) {
            this._checkProposedApi(), this._core.deregisterCharacterJoiner(g);
          }
          registerMarker(g = 0) {
            return this._verifyIntegers(g), this._core.addMarker(g);
          }
          registerDecoration(g) {
            var c, e, i;
            return this._checkProposedApi(), this._verifyPositiveIntegers((c = g.x) !== null && c !== void 0 ? c : 0, (e = g.width) !== null && e !== void 0 ? e : 0, (i = g.height) !== null && i !== void 0 ? i : 0), this._core.registerDecoration(g);
          }
          hasSelection() {
            return this._core.hasSelection();
          }
          select(g, c, e) {
            this._verifyIntegers(g, c, e), this._core.select(g, c, e);
          }
          getSelection() {
            return this._core.getSelection();
          }
          getSelectionPosition() {
            return this._core.getSelectionPosition();
          }
          clearSelection() {
            this._core.clearSelection();
          }
          selectAll() {
            this._core.selectAll();
          }
          selectLines(g, c) {
            this._verifyIntegers(g, c), this._core.selectLines(g, c);
          }
          dispose() {
            this._addonManager.dispose(), this._core.dispose();
          }
          scrollLines(g) {
            this._verifyIntegers(g), this._core.scrollLines(g);
          }
          scrollPages(g) {
            this._verifyIntegers(g), this._core.scrollPages(g);
          }
          scrollToTop() {
            this._core.scrollToTop();
          }
          scrollToBottom() {
            this._core.scrollToBottom();
          }
          scrollToLine(g) {
            this._verifyIntegers(g), this._core.scrollToLine(g);
          }
          clear() {
            this._core.clear();
          }
          write(g, c) {
            this._core.write(g, c);
          }
          writeln(g, c) {
            this._core.write(g), this._core.write(`\r
`, c);
          }
          paste(g) {
            this._core.paste(g);
          }
          refresh(g, c) {
            this._verifyIntegers(g, c), this._core.refresh(g, c);
          }
          reset() {
            this._core.reset();
          }
          clearTextureAtlas() {
            this._core.clearTextureAtlas();
          }
          loadAddon(g) {
            return this._addonManager.loadAddon(this, g);
          }
          static get strings() {
            return a;
          }
          _verifyIntegers(...g) {
            for (const c of g)
              if (c === 1 / 0 || isNaN(c) || c % 1 != 0)
                throw new Error("This API only accepts integers");
          }
          _verifyPositiveIntegers(...g) {
            for (const c of g)
              if (c && (c === 1 / 0 || isNaN(c) || c % 1 != 0 || c < 0))
                throw new Error("This API only accepts positive integers");
          }
        };
      })(), J;
    })();
  });
})(dr);
var re = {}, fr = {
  get exports() {
    return re;
  },
  set exports(z) {
    re = z;
  }
};
(function(z, Z) {
  (function(D, V) {
    z.exports = V();
  })(self, function() {
    return (() => {
      var D = {};
      return (() => {
        var V = D;
        Object.defineProperty(V, "__esModule", { value: !0 }), V.FitAddon = void 0, V.FitAddon = class {
          constructor() {
          }
          activate(N) {
            this._terminal = N;
          }
          dispose() {
          }
          fit() {
            const N = this.proposeDimensions();
            if (!N || !this._terminal || isNaN(N.cols) || isNaN(N.rows))
              return;
            const J = this._terminal._core;
            this._terminal.rows === N.rows && this._terminal.cols === N.cols || (J._renderService.clear(), this._terminal.resize(N.cols, N.rows));
          }
          proposeDimensions() {
            if (!this._terminal || !this._terminal.element || !this._terminal.element.parentElement)
              return;
            const N = this._terminal._core, J = N._renderService.dimensions;
            if (J.css.cell.width === 0 || J.css.cell.height === 0)
              return;
            const T = this._terminal.options.scrollback === 0 ? 0 : N.viewport.scrollBarWidth, r = window.getComputedStyle(this._terminal.element.parentElement), a = parseInt(r.getPropertyValue("height")), h = Math.max(0, parseInt(r.getPropertyValue("width"))), f = window.getComputedStyle(this._terminal.element), d = a - (parseInt(f.getPropertyValue("padding-top")) + parseInt(f.getPropertyValue("padding-bottom"))), u = h - (parseInt(f.getPropertyValue("padding-right")) + parseInt(f.getPropertyValue("padding-left"))) - T;
            return { cols: Math.max(2, Math.floor(u / J.css.cell.width)), rows: Math.max(1, Math.floor(d / J.css.cell.height)) };
          }
        };
      })(), D;
    })();
  });
})(fr);
const ur = {
  bell: "onBell",
  binary: "onBinary",
  cursorMove: "onCursorMove",
  input: "onData",
  key: "onKey",
  lineFeed: "onLineFeed",
  render: "onRender",
  writeParsed: "onWriteParsed",
  resize: "onResize",
  scroll: "onScroll",
  selectionChange: "onSelectionChange",
  titleChange: "onTitleChange"
}, _r = {
  props: {
    options: {
      type: Object
    },
    listen: {
      type: Array,
      default: () => ["input"]
    },
    themeName: {
      type: String
    }
  },
  emits: [
    // lifecycle
    "opened",
    "disposed",
    // xterm.js
    "bell",
    "binary",
    "cursorMove",
    "input",
    "key",
    "lineFeed",
    "render",
    "writeParsed",
    "resize",
    "scroll",
    "selectionChange",
    "titleChange"
  ],
  setup(z, { emit: Z, expose: D }) {
    const V = ir(null), N = new te.Terminal(z.options), J = new re.FitAddon();
    function T() {
      J.fit();
    }
    function r(f) {
      const d = lr[f];
      N && d && (N.options.theme = d);
    }
    const a = new ResizeObserver(T);
    N.loadAddon(J);
    for (let f = 0; f < z.listen.length; f++) {
      const d = z.listen[f], u = ur[d];
      d === "selectionChange" ? N[u](
        () => Z(d, {
          hasSelection: N.hasSelection() ? 1 : 0,
          selection: N.getSelection(),
          position: N.getSelectionPosition()
        })
      ) : u && N[u]((b) => Z(d, b));
    }
    const h = {
      fit: T,
      updateTheme: r,
      // Skipped: open, dispose, loadAddon, +Experimental
      blur() {
        return N.blur();
      },
      focus() {
        return N.focus();
      },
      resize(f, d) {
        return N.resize(f, d);
      },
      attachCustomKeyEventHandler(f) {
        return N.attachCustomKeyEventHandler(f);
      },
      registerLinkProvider(f) {
        return N.registerLinkProvider(f);
      },
      registerMarker(f) {
        return N.registerMarker(f);
      },
      registerDecoration(f) {
        return N.registerDecoration(f);
      },
      hasSelection() {
        return N.hasSelection();
      },
      getSelection() {
        return N.getSelection();
      },
      getSelectionPosition() {
        return N.getSelectionPosition();
      },
      clearSelection() {
        return N.clearSelection();
      },
      select(f, d, u) {
        return N.select(f, d, u);
      },
      selectAll() {
        return N.selectAll();
      },
      selectLines(f, d) {
        return N.selectLines(f, d);
      },
      scrollLines(f) {
        return N.scrollLines(f);
      },
      scrollPages(f) {
        return N.scrollPages(f);
      },
      scrollToTop() {
        return N.scrollToTop();
      },
      scrollToBottom() {
        return N.scrollToBottom();
      },
      scrollToLine(f) {
        return N.scrollToLine(f);
      },
      clear() {
        return N.clear();
      },
      write(f, d) {
        return N.write(f, d);
      },
      writeln(f, d) {
        return N.writeln(f, d);
      },
      paste(f) {
        return N.paste(f);
      },
      refresh(f, d) {
        return N.refresh(f, d);
      },
      clearTextureAtlas() {
        return N.clearTextureAtlas();
      },
      reset() {
        return N.reset();
      }
    };
    return sr(() => {
      N.open(V.value), N.element.style.height = "100%", r(z.themeName), a.observe(V.value), Z("opened");
    }), nr(() => z.themeName, r), or(() => {
      a.unobserve(V.value), N.dispose(), Z("disposed");
    }), D(h), { ...h, elem: V };
  },
  template: `<div style="position: relative; width: 100%; height: 100%;" v-bind="$attrs">
      <div ref="elem" style="position: absolute; width: 100%; height: 100%;"></div>
    </div>
    `
}, er = {
  XTerm: _r
};
function br(z) {
  Object.keys(er).forEach((Z) => {
    z.component(Z, er[Z]);
  });
}
export {
  br as install
};
